Skip to content

chore: adopt agents-master Claude config and fix baseline issues - #2

Merged
emscape merged 5 commits into
mainfrom
chore/agents-master-baseline
Nov 3, 2026
Merged

emscape merged 5 commits into
mainfrom
chore/agents-master-baseline

Conversation

@emscape

@emscape emscape commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Phase 1 of the codebase cleanup.

  • Add CLAUDE.md and .claude/ (agents, skills, hooks) from agents-master, configured for this static site
  • Stop ignoring .github/ in .gitignore; add ignore rules for secrets
  • Add .gitattributes (LF in the repo, binary assets marked); no existing files are renormalized
  • Remove the stale deploy.yml workflow (it uploaded a nonexistent ./website folder and failed on every run); static.yml still deploys the site
  • Fill in the unfilled template placeholders in the Spark Site Studio post's page head, and fix its title typo
  • Show which post failed in the blog-validation tests, and add a test that rejects unfilled *_PLACEHOLDER values in posts

npm test passes 111 of 111 and npm run blog:validate passes.

WHY:
- Brings the repo in line with the agents-master template (CLAUDE.md,
  .claude agents/skills/hooks) before the wider cleanup, so the
  guardrails apply to the work that follows
- .gitignore ignored all of .github/, so new GitHub config would be
  silently dropped
- deploy.yml uploaded a nonexistent ./website folder and failed on every
  push and PR; static.yml is the workflow that deploys the site
- The Spark Site Studio post was published with unfilled template
  placeholders in its page head (title, description, canonical URL,
  social and structured-data tags)

EXPECTED:
- npm test passes (111/111), including the previously failing title test
  and a new test that rejects unfilled *_PLACEHOLDER values in posts
- npm run blog:validate passes
- Only "Deploy static content to Pages" runs on push to main
- .gitattributes stores text with LF; no existing files are renormalized

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Critical hook execution, command-safety, deployment, and project-configuration issues remain unresolved.

14 open issues
What changed in this PR

This PR adds Claude project tooling, improves repository hygiene, fixes Spark Site Studio metadata, and strengthens blog validation.

Changes:

  • Adds .claude/ agents, skills, hooks, and project guidance.
  • Removes the broken deployment workflow and adds Git attributes/secret ignores.
  • Fixes blog metadata and adds placeholder validation.
File Summary
tests/​blog-validation.test.js Improves diagnostics and validates unfilled placeholders.
data/​blog-index.json Corrects the post title.
CLAUDE.md Adds project-specific Claude guidance.
blog/​spark-site-studio/​post-data.json Corrects the post title.
blog/​spark-site-studio/​index.html Fills SEO metadata placeholders.
.gitignore Updates repository and secret ignore rules.
.github/​workflows/​deploy.yml Removes the obsolete deployment workflow.
.gitattributes Defines line endings and binary handling.
.claude/​skills/​web-search-routing/​SKILL.md Adds web-search routing guidance.
.claude/​skills/​theater-test-detection/​SKILL.md Adds test-quality guidance.
.claude/​skills/​test-driven-development/​Skill.md Adds TDD workflow guidance.
.claude/​skills/​state-consistency-check.md Adds state-consistency checks.
.claude/​skills/​repo-bootstrap-audit.md Adds repository bootstrap audit guidance.
.claude/​skills/​release-readiness.md Adds release-readiness guidance.
.claude/​skills/​refactor-trigger-detector.md Adds refactor detection guidance.
.claude/​skills/​refactor-boundary-check.md Adds refactor boundary guidance.
.claude/​skills/​puzzle-reviewer.md Adds puzzle review guidance.
.claude/​skills/​project-mode-switch.md Adds project-mode guidance.
.claude/​skills/​playability-validator.md Adds playability validation guidance.
.claude/​skills/​mock-verification/​SKILL.md Adds mock verification guidance.
.claude/​skills/​minimal-implementation-enforcer.md Adds minimal implementation guidance.
.claude/​skills/​integration-guard.md Adds integration guard guidance.
.claude/​skills/​feature-scaffold.md Adds feature scaffolding guidance.
.claude/​skills/​feature-boundary-check.md Adds feature boundary guidance.
.claude/​skills/​content-case-author.md Adds content authoring guidance.
.claude/​skills/​constitutional-refactor/​references/​ralph-promises.md Adds refactor reference material.
.claude/​skills/​constitutional-refactor/​references/​observation-techniques.md Adds observation reference material.
.claude/​skills/​constitutional-refactor/​references/​disconnect-matrix-template.md Adds refactor template material.
.claude/​skills/​constitutional-refactor/​references/​bridge-patterns.md Adds bridge pattern references.
.claude/​skills/​constitutional-orchestrator/​SKILL.md Adds orchestration guidance.
.claude/​skills/​constitutional-fix/​SKILL.md Adds constitutional fix guidance.
.claude/​skills/​cl12-examples/​SKILL.md Adds CL12 examples.
.claude/​skills/​cl12-examples/​references/​runtime-verification.md Adds runtime verification references.
.claude/​skills/​cl12-examples/​references/​complete-examples.md Adds complete examples.
.claude/​settings.json Registers Claude hooks.
.claude/​hooks/​validate-content.js Adds content validation hook logic.
.claude/​hooks/​session-start.sh Starts session orientation.
.claude/​hooks/​session-start.cjs Prints project context.
.claude/​hooks/​hooks.json Documents hook registration.
.claude/​hooks/​config.json Configures project hooks.
.claude/​hooks/​check-todo-format.js Adds TODO-format checks.
.claude/​hooks/​check-search-command.js Adds search-command checks.
.claude/​hooks/​check-script-exists.js Adds script existence checks.
.claude/​hooks/​check-env-guard.js Adds environment guard checks.
.claude/​hooks/​check-empty-tests.js Adds empty-test detection.
.claude/​hooks/​check-dep-guard.js Adds dependency guard checks.
.claude/​hooks/​check-commit-message.js Adds commit-message validation.
.claude/​hooks/​check-ci-status-after-push.js Adds post-push CI checks.
.claude/​hooks/​check-branch-delete-guard.test.js Tests branch deletion protection.
.claude/​hooks/​check-bash-description.js Adds Bash description checks.
.claude/​hooks/​check-arch-boundary.js Adds architecture boundary checks.
.claude/​hooks/​check-agent-routing.js Adds agent routing checks.
.claude/​agents/​ui-builder.md Adds UI builder agent guidance.
.claude/​agents/​qa-reviewer.md Adds QA reviewer guidance.
.claude/​agents/​performance-sanity-checker.md Adds performance review guidance.
.claude/​agents/​integration-architect.md Adds integration architecture guidance.
.claude/​agents/​failure-mode-analyzer.md Adds failure-mode analysis guidance.
.claude/​agents/​domain-engineer.md Adds domain engineering guidance.
.claude/​agents/​dev-experience-optimizer.md Adds developer-experience guidance.
.claude/​agents/​content-integrity-auditor.md Adds content integrity guidance.
.claude/​agents/​content-editor.md Adds content editing guidance.
.claude/​agents/​architect.md Adds architecture agent guidance.

Review effort: Lite

Comment thread .claude/hooks/check-arch-boundary.mjs Resolved
Comment thread .claude/hooks/check-commit-message.js Resolved
Comment thread .claude/hooks/check-git-push-audit.js Resolved
Comment thread .claude/hooks/validate-content.mjs Resolved
Comment thread .claude/settings.json Resolved
Comment thread .claude/skills/release-readiness.md Resolved
Comment thread tests/blog-validation.test.js Resolved
Comment thread CLAUDE.md Resolved
Comment thread blog/spark-site-studio/index.html Resolved
WHY:
- Five hooks used ESM import under "type": "commonjs" and crashed on every invocation
- Commit guard only matched commands starting with git commit; chained commits bypassed it
- Push audit diffed only HEAD~1, skipping earlier unpushed commits
- CI-status hook built shell strings from the branch name and could wait on gh run watch indefinitely
- Pages deploy uploaded the whole repo, publishing .claude/ and CLAUDE.md on the site
- qa-reviewer and release-readiness referenced pnpm, Tauri and packages that don't exist here
- Placeholder check missed tokens containing digits; canonical URL used <meta> instead of <link>; CLAUDE.md pointed at a nonexistent root AGENTS.md
- check-agent-routing.js was never registered, and as a UserPromptSubmit hook exiting 1 its output would only reach the terminal

EXPECTED:
- validate-content, check-arch-boundary, check-empty-tests, check-script-exists and check-todo-format run as .mjs without SyntaxError
- check-commit-message.test.js: chained, multi-line and heredoc-fed commits without WHY/EXPECTED are blocked; heredoc bodies stay with their own command
- check-git-push-audit.test.js: diff range is @{upstream}...HEAD, then the origin default branch, then HEAD~1, then the empty tree
- check-ci-status-after-push.test.js: branch passed as a literal argv element; gh run watch killed at completion_timeout_seconds
- static.yml removes .claude and CLAUDE.md before uploading the Pages artifact
- npm test (111), npm run blog:validate and node --test .claude/hooks/*.test.js (131) pass

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

One or more issues must be addressed before approval.

13 open issues
13 resolved since last review

Review effort: Lite

Comment thread .claude/agents/content-editor.md Resolved
Comment thread .claude/agents/ui-builder.md Resolved
Comment thread .claude/hooks/check-commit-message.js Resolved
Comment thread .claude/hooks/check-empty-tests.mjs Resolved
Comment thread .claude/hooks/config.json Resolved
Comment thread .claude/skills/content-case-author.md Resolved
Comment thread .claude/skills/project-mode-switch.md Resolved
Comment thread .github/workflows/static.yml Resolved
WHY:
- Imported agents/skills still targeted the mystery-game project (packages/, apps/desktop, Tauri, pnpm, puzzles)
- agents-master master gained a shared git/gh parser, config loader and project-override model that this copy lacked
- Commit guard missed git -C, path-qualified git and bash -c forms, and ignored commit_guard settings
- Push audit ignored push_audit.enabled; check-empty-tests skipped Edit/MultiEdit; CI watch had no deadline
- constitutional-fix committed on every loop iteration without approval
- CI hook failed on every branch push because no workflow ran outside main; Pages still published .github/

EXPECTED:
- Game-specific agents (4) and skills (10) removed; remaining .claude files match agents-master master except the .mjs hooks, adapted qa-reviewer/release-readiness and the fixes below
- Project settings live in .claude/hooks.config.json; config.json is the shared template
- check-commit-message.test.js: git -C, global options, /usr/bin/git, bash -c and heredoc commits checked; warn/block/disabled per commit_guard
- hook-config-integration.test.cjs: push_audit.enabled=false skips the audit; commit_guard overrides honored; Edit payloads checked by check-empty-tests
- check-ci-status-after-push.test.js: tryRun kills a child at timeoutMs and reports timedOut
- ci.yml runs npm test, blog:validate and hook tests on every push; static.yml removes .claude, CLAUDE.md and .github before upload
- npm test (111), npm run blog:validate and hook tests (466) pass

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .claude/hooks/check-arch-boundary.mjs Resolved
Comment thread .claude/hooks/check-empty-tests.mjs Resolved
Comment thread .claude/hooks/check-todo-format.mjs Resolved
Comment on lines +1 to +3
---
name: test-driven-development
description: Enforce RED → GREEN → COMMIT → REFACTOR cycle with constitutional adherence, quality gates, and evidence-based completion

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in e452c3c: renamed to .claude/skills/test-driven-development/SKILL.md.

Comment thread .github/workflows/ci.yml Resolved
Comment thread .claude/hooks/check-script-exists.mjs Resolved
WHY:
- On CI (Linux, git 2.56) git diff --staged exits 0 with a staged blob missing, so the audit scanned partial output and passed
- The "staged diff that cannot be read" hook test failed in CI for that reason; git 2.51 on Windows fails the diff, so it passed locally

EXPECTED:
- check-git-push-audit.js checks every blob a diff reads with git cat-file --batch-check (submodule entries skipped) and blocks if any is missing
- check-git-push-audit.test.js "a staged diff that cannot be read blocks instead of auditing partial output" passes on CI
- Hook tests (466), npm test (111) and npm run blog:validate pass
WHY:
- check-arch-boundary (PreToolUse) and check-todo-format skipped Edit/MultiEdit payloads, which carry no content field
- check-empty-tests flagged files using Node assert methods (assert.equal etc.) as having no assertions
- check-script-exists comment claimed npx and pnpm shorthand support that the matcher never had
- test-driven-development/Skill.md is not found on case-sensitive systems, where skills load from SKILL.md
- ci.yml had no pull_request trigger, so PRs from forks got no checks
- .gitignore missed dotenv variants such as .env.production, which Pages would publish

EXPECTED:
- hook-config-integration.test.cjs: Edit and MultiEdit adding a forbidden import exit 2, a clean Edit exits 0, an unmatched old_string still checks new_string
- hook-config-integration.test.cjs: bare TODO after an Edit exits 1 in block mode; assert.equal/assert.strict.deepEqual files pass; files with no assertion calls still fail
- Skill file is .claude/skills/test-driven-development/SKILL.md; CI runs on pull_request
- git check-ignore: .env.production and .env.development ignored, .env.local.example still tracked
- Hook tests (474), npm test (111) and npm run blog:validate pass

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .claude/hooks/check-env-guard.js Resolved
Comment thread .claude/hooks/check-git-push-audit.js Resolved
Comment thread .claude/hooks/check-merge-guard.js Resolved
@emscape
emscape merged commit b5480db into main Nov 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants