feat(claude-code): test quality system — agents, skills, hooks, docs - #11
Merged
Conversation
Introduces a coordinated set of Claude Code automations spanning the full test lifecycle: evaluation, design, implementation, review, and durable solutions. ## Components committed in this PR - `.claude/hooks/validate-workflow.sh` wired into PostToolUse Write|Edit chain in `.claude/settings.json`. Script does YAML syntax check (always) + actionlint deeper analysis (if installed). Surfaces issues as systemMessage so they appear inline before CI sees them. - `docs/test-quality-system.md` documents the full system: when to invoke each piece, the delegation graph, templates for new collaborators. ## Personal artifacts (under gitignored .claude/, see docs for templates) - `test-architect` agent — senior strategist; evaluates posture, reviews failures, designs solutions; delegates to test-engineer for impl and to documentation-expert for write-ups - `test-engineer` agent — implementer; writes/refactors tests, runs them, opens PRs; never disables tests as a fix - `/test-triage` skill — playbook for high-failure-rate triage (50%+ red), walks through artifact pull → error clustering → root cause → solution - `/test-posture-review` skill — quarterly coverage/reliability/runtime audit producing a structured posture report ## Why this shape User asked for a system that "evaluates, implements, reviews, identifies, and produces long-lasting solutions" with one agent leveraging another for docs. That naturally splits into a read-leaning architect and an edit-active engineer, with the architect delegating doc work to the built-in `documentation-expert` subagent. ## Validation - validate-workflow.sh pipe-tested: silent on valid YAML, reports syntax errors via systemMessage on invalid YAML, runs actionlint if installed - jq -e confirms the new hook entry parses cleanly in settings.json - Skills appear in Claude Code's skill listing when this branch is checked out ## Pre-existing limitation surfaced (not addressed here) `.claude/` is globally gitignored, so hook scripts (including the pre-existing protect-paths.sh, auto-format.sh, etc.) are not on origin/main — they're per-developer artifacts. Settings.json references them by path. New collaborators must recreate scripts from the docs templates. This PR follows the established convention; cleaning up the bootstrap should be a separate follow-up. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A coordinated Claude Code automation system covering the full test lifecycle for this project.
test-architecttest-engineer/test-triage/test-posture-reviewvalidate-workflow.sh.github/workflows/*.ymleditsdocs/test-quality-system.mdWhat's actually in the diff
.claude/settings.json— addsbash .claude/hooks/validate-workflow.shto the PostToolUse Write|Edit hook chaindocs/test-quality-system.md— full documentation including bootstrap templatesThe hook script and the agent/skill files live under
.claude/which is globally gitignored on this project (same pattern as.claude/scripts/perdocs/claude-code-setup.md). They're per-developer artifacts. Templates live in the new doc.Why this design
Your ask: an agent system that evaluates project state, implements maximally effective testing throughout the lifecycle, reviews results, and produces long-lasting solutions, with one agent leveraging another for high-quality documentation.
That naturally splits into:
test-architect(read-leaning): evaluation, review, root-cause identification, solution design. Delegates implementation and docs.test-engineer(edit-active): writes test code, runs it, opens PRs. Never disables a test as a fix — escalates to architect.documentation-expert(built-in subagent): handles all write-up work for both above.Plus two skills that codify repeatable playbooks (
/test-triage,/test-posture-review) so the patterns scale beyond a single user prompt.Plus the hook (
validate-workflow.sh) closing the gap that PR #8 surfaced — workflow file edits should fail-fast on syntax issues rather than waiting for CI to discover them.Test plan
validate-workflow.shpipe-tested: silent on valid YAML, reports syntax errors via systemMessagejq -econfirms new hook entry parsesFollow-up worth tracking
Pre-existing:
.claude/is globally gitignored on this project, so the existing hook scripts (protect-paths.sh, auto-format.sh, etc.) and nowvalidate-workflow.share NOT on origin/main even thoughsettings.jsonreferences them. New collaborators must recreate from templates in the docs. A separate "bootstrap experience for.claude/hooks/" cleanup PR would be valuable but is out of scope here.🤖 Generated with Claude Code