Repository navigation
chore: adopt agents-master Claude config and fix baseline issues - #2
Conversation
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
There was a problem hiding this comment.
🟡 Changes recommended
Critical hook execution, command-safety, deployment, and project-configuration issues remain unresolved.
14 open issues
ESM hooks fail under the repository's CommonJS configuration · New Branch name enables shell command injection · New Chained git commit commands bypass the commit guard · New Fallback audit misses earlier commits in multi-commit pushes · New Content validation hook fails under CommonJS · New Architecture hook fails because ESM syntax is used in CommonJS · New Pages deployment publishes internal agent configuration · New Reviewer agent uses unavailable pnpm test command · New Completion timeout is configured but unenforced · New Agent routing hook is registered under the wrong event · New Release checklist uses commands and checks absent from this repository · New Placeholder guard misses tokens containing digits · New Root configuration references nonexistent AGENTS.md · New Canonical URL uses meta instead of link element · New
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
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
There was a problem hiding this comment.
🟡 Changes recommended
One or more issues must be addressed before approval.
13 open issues
Pages deployment publishes internal agent configuration Content agent uses nonexistent paths and validation command · New Desktop agent targets nonexistent React/Tauri application · New Post-push check fails on branches without CI workflows · New Commit guard misses Git global options and paths · New Test-file edits bypass assertion checks · New Pre-push audit misses Git global options · New Pre-push audit ignores configured enablement · New Commit guard ignores configured behavior settings · New Remediation skill mandates unauthorized commits · New Content skill uses nonexistent data and validation commands · New Scaffold mode targets nonexistent application structure · New Pages workflow publishes repository configuration files · New
13 resolved since last review
Architecture hook fails because ESM syntax is used in CommonJS Content validation hook fails under CommonJS Fallback audit misses earlier commits in multi-commit pushes Chained git commit commands bypass the commit guard Branch name enables shell command injection ESM hooks fail under the repository's CommonJS configuration Placeholder guard misses tokens containing digits Release checklist uses commands and checks absent from this repository Agent routing hook is registered under the wrong event Completion timeout is configured but unenforced Reviewer agent uses unavailable pnpm test command Canonical URL uses meta instead of link element Root configuration references nonexistent AGENTS.md
Review effort: Lite
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
There was a problem hiding this comment.
🟡 Changes recommended
Active moderate and critical findings leave edit-time architecture and TODO checks incomplete, break test detection and skill discovery, omit PR CI coverage, and allow common secret-bearing dotenv files to be published.
7 open issues
Pages deployment publishes internal agent configuration Edit hooks skip architecture checks without post-edit file content · New Assertion heuristic misses Node assert methods · New Edit hooks skip TODO checks without inline content · New Lowercase Skill.md prevents TDD skill discovery · New Workflow lacks pull_request trigger for forked PRs · New Command extractor misses documented npx and pnpm shorthand · New
12 resolved since last review
Pages workflow publishes repository configuration files Scaffold mode targets nonexistent application structure Content skill uses nonexistent data and validation commands Remediation skill mandates unauthorized commits Commit guard ignores configured behavior settings Pre-push audit ignores configured enablement Pre-push audit misses Git global options Test-file edits bypass assertion checks Commit guard misses Git global options and paths Post-push check fails on branches without CI workflows Desktop agent targets nonexistent React/Tauri application Content agent uses nonexistent paths and validation command
Review effort: Lite
| --- | ||
| name: test-driven-development | ||
| description: Enforce RED → GREEN → COMMIT → REFACTOR cycle with constitutional adherence, quality gates, and evidence-based completion |
There was a problem hiding this comment.
Fixed in e452c3c: renamed to .claude/skills/test-driven-development/SKILL.md.
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



Phase 1 of the codebase cleanup.
CLAUDE.mdand.claude/(agents, skills, hooks) from agents-master, configured for this static site.github/in.gitignore; add ignore rules for secrets.gitattributes(LF in the repo, binary assets marked); no existing files are renormalizeddeploy.ymlworkflow (it uploaded a nonexistent./websitefolder and failed on every run);static.ymlstill deploys the site*_PLACEHOLDERvalues in postsnpm testpasses 111 of 111 andnpm run blog:validatepasses.