diff --git a/.claude/agents/fixer.md b/.claude/agents/cypher/fixer.md similarity index 100% rename from .claude/agents/fixer.md rename to .claude/agents/cypher/fixer.md diff --git a/.claude/agents/git-pr.md b/.claude/agents/cypher/git-pr.md similarity index 100% rename from .claude/agents/git-pr.md rename to .claude/agents/cypher/git-pr.md diff --git a/.claude/agents/qa-test-coverage.md b/.claude/agents/cypher/qa-test-coverage.md similarity index 100% rename from .claude/agents/qa-test-coverage.md rename to .claude/agents/cypher/qa-test-coverage.md diff --git a/.claude/agents/scrubber.md b/.claude/agents/cypher/scrubber.md similarity index 100% rename from .claude/agents/scrubber.md rename to .claude/agents/cypher/scrubber.md diff --git a/.claude/agents/ticket-worker.md b/.claude/agents/cypher/ticket-worker.md similarity index 100% rename from .claude/agents/ticket-worker.md rename to .claude/agents/cypher/ticket-worker.md diff --git a/.claude/agents/triager.md b/.claude/agents/cypher/triager.md similarity index 100% rename from .claude/agents/triager.md rename to .claude/agents/cypher/triager.md diff --git a/.claude/commands/cleanup-worktrees.md b/.claude/commands/cypher/cleanup-worktrees.md similarity index 95% rename from .claude/commands/cleanup-worktrees.md rename to .claude/commands/cypher/cleanup-worktrees.md index bbb03fb16..fd2b53828 100644 --- a/.claude/commands/cleanup-worktrees.md +++ b/.claude/commands/cypher/cleanup-worktrees.md @@ -1,3 +1,7 @@ +--- +description: List, inspect, and remove worktrees created by /fix-tickets in /tmp/claude-widgets/ +--- + # Cleanup Worktrees Command ## Description diff --git a/.claude/commands/fix-tickets.md b/.claude/commands/cypher/fix-tickets.md similarity index 96% rename from .claude/commands/fix-tickets.md rename to .claude/commands/cypher/fix-tickets.md index b32228e6d..53b31d0e1 100644 --- a/.claude/commands/fix-tickets.md +++ b/.claude/commands/cypher/fix-tickets.md @@ -1,3 +1,8 @@ +--- +description: Full lifecycle - fetch JIRA tickets, create worktrees, implement fixes, create PRs, poll review +argument-hint: "[TICKET-ID...]" +--- + # Fix Tickets Command ## Description @@ -115,9 +120,9 @@ Launch ALL workers in a **single message** with multiple `Task()` calls for true ``` Task({ - subagent_type: "ticket-worker", + subagent_type: "cypher:ticket-worker", description: "Fix ticket {TICKET_ID}", - prompt: `You are a ticket-worker agent. Follow the instructions in .claude/agents/ticket-worker.md. + prompt: `You are a ticket-worker agent. Follow the instructions in .claude/agents/cypher/ticket-worker.md. TICKET_ID: {TICKET_ID} WORKTREE_PATH: /tmp/claude-widgets/{TICKET_ID} @@ -137,7 +142,7 @@ Priority: {priority} Dependencies are already installed and packages are already built in the worktree. -Read .claude/agents/ticket-worker.md for your full workflow. Use systematic debugging to understand the root cause, apply TDD (write failing test first, then implement fix), verify all tests pass, stage changes (NO commit), and return result JSON.`, +Read .claude/agents/cypher/ticket-worker.md for your full workflow. Use systematic debugging to understand the root cause, apply TDD (write failing test first, then implement fix), verify all tests pass, stage changes (NO commit), and return result JSON.`, run_in_background: true }) ``` diff --git a/.claude/commands/fix.md b/.claude/commands/cypher/fix.md similarity index 97% rename from .claude/commands/fix.md rename to .claude/commands/cypher/fix.md index 7a9618161..83f137180 100644 --- a/.claude/commands/fix.md +++ b/.claude/commands/cypher/fix.md @@ -1,3 +1,8 @@ +--- +description: Stage 3 of bug-fix pipeline - implement fixes for triaged bugs, create PRs, poll review feedback +argument-hint: "[TICKET-ID...]" +--- + # Fix Command ## Description @@ -107,7 +112,7 @@ Agent({ subagent_type: "general-purpose", model: "sonnet", description: "Fix ticket {TICKET_ID}", - prompt: `You are a fixer agent. Follow the instructions in .claude/agents/fixer.md. + prompt: `You are a fixer agent. Follow the instructions in .claude/agents/cypher/fixer.md. TICKET_ID: {TICKET_ID} WORKTREE_PATH: /tmp/claude-widgets/{TICKET_ID} @@ -127,7 +132,7 @@ Description: Dependencies are already installed and packages are already built in the worktree. -Read .claude/agents/fixer.md for your full workflow. Implement the fix, run tests, stage changes (NO commit), and return result JSON.`, +Read .claude/agents/cypher/fixer.md for your full workflow. Implement the fix, run tests, stage changes (NO commit), and return result JSON.`, run_in_background: true }) ``` diff --git a/.claude/commands/scrub.md b/.claude/commands/cypher/scrub.md similarity index 92% rename from .claude/commands/scrub.md rename to .claude/commands/cypher/scrub.md index a0e7999ba..f258d00d9 100644 --- a/.claude/commands/scrub.md +++ b/.claude/commands/cypher/scrub.md @@ -1,3 +1,8 @@ +--- +description: Stage 1 of bug-fix pipeline - classify bug tickets as prioritize/followup/dolater for AI-readiness +argument-hint: "[TICKET-ID...]" +--- + # Scrub Command ## Description @@ -61,7 +66,7 @@ Agent({ subagent_type: "general-purpose", model: "haiku", description: "Scrub ticket {TICKET_ID}", - prompt: `You are a scrubber agent. Follow the instructions in .claude/agents/scrubber.md. + prompt: `You are a scrubber agent. Follow the instructions in .claude/agents/cypher/scrubber.md. TICKET_ID: {TICKET_ID} @@ -80,7 +85,7 @@ Description: Comments: {all comments} -Read .claude/agents/scrubber.md for your full workflow. Evaluate this ticket and return result JSON.`, +Read .claude/agents/cypher/scrubber.md for your full workflow. Evaluate this ticket and return result JSON.`, run_in_background: true }) ``` diff --git a/.claude/commands/spec-drift-changed.md b/.claude/commands/cypher/spec-drift-changed.md similarity index 98% rename from .claude/commands/spec-drift-changed.md rename to .claude/commands/cypher/spec-drift-changed.md index be63b7b6c..f6aaddd73 100644 --- a/.claude/commands/spec-drift-changed.md +++ b/.claude/commands/cypher/spec-drift-changed.md @@ -1,3 +1,7 @@ +--- +description: Validate ai-docs affected by staged/unstaged changes (lightweight pre-commit drift check) +--- + # Spec Drift Detection — Changed Files Only Validate ai-docs affected by any staged/unstaged changes — whether the changes are to ai-docs themselves OR to source code that has corresponding ai-docs. Lightweight mode for pre-commit validation. diff --git a/.claude/commands/spec-drift.md b/.claude/commands/cypher/spec-drift.md similarity index 98% rename from .claude/commands/spec-drift.md rename to .claude/commands/cypher/spec-drift.md index 1d5a834c1..dfb7d8887 100644 --- a/.claude/commands/spec-drift.md +++ b/.claude/commands/cypher/spec-drift.md @@ -1,3 +1,7 @@ +--- +description: Full SDD ai-docs validation against source code via parallel agents across 7 drift categories +--- + # Spec Drift Detection — Full Scan Run a comprehensive validation of all SDD ai-docs against actual source code. Deploys a parallel agent team to catch documentation drift across 7 categories. diff --git a/.claude/commands/submit-pr.md b/.claude/commands/cypher/submit-pr.md similarity index 97% rename from .claude/commands/submit-pr.md rename to .claude/commands/cypher/submit-pr.md index 0d8d7e6bd..0f84398c8 100644 --- a/.claude/commands/submit-pr.md +++ b/.claude/commands/cypher/submit-pr.md @@ -1,3 +1,8 @@ +--- +description: Commit, push, and create a draft PR for a ticket fixed in a worktree (no subagents) +argument-hint: "" +--- + # Submit PR Command ## Description diff --git a/.claude/commands/triage.md b/.claude/commands/cypher/triage.md similarity index 92% rename from .claude/commands/triage.md rename to .claude/commands/cypher/triage.md index b887b68f2..7f9e57c39 100644 --- a/.claude/commands/triage.md +++ b/.claude/commands/cypher/triage.md @@ -1,3 +1,8 @@ +--- +description: Stage 2 of bug-fix pipeline - root-cause prioritized bugs and propose fixes (read-only) +argument-hint: "[TICKET-ID...]" +--- + # Triage Command ## Description @@ -60,7 +65,7 @@ Agent({ subagent_type: "general-purpose", model: "sonnet", description: "Triage ticket {TICKET_ID}", - prompt: `You are a triager agent. Follow the instructions in .claude/agents/triager.md. + prompt: `You are a triager agent. Follow the instructions in .claude/agents/cypher/triager.md. TICKET_ID: {TICKET_ID} REPO_ROOT: {absolute path to main repo} @@ -79,7 +84,7 @@ Description: Comments: {all comments, including Scrubber's classification} -Read .claude/agents/triager.md for your full workflow. Analyze this bug, identify the root cause, and return a fix suggestion as JSON.`, +Read .claude/agents/cypher/triager.md for your full workflow. Analyze this bug, identify the root cause, and return a fix suggestion as JSON.`, run_in_background: true }) ``` diff --git a/.claude/hooks/check-ai-docs-drift.sh b/.claude/hooks/check-ai-docs-drift.sh index 1c667d691..134d8c3ec 100755 --- a/.claude/hooks/check-ai-docs-drift.sh +++ b/.claude/hooks/check-ai-docs-drift.sh @@ -7,9 +7,9 @@ # 3. If command is NOT git commit -> exit 0 (allow immediately) # 4. Check if ANY staged files are under packages/contact-center/ # 5. If none -> exit 0 (allow) -# 6. Check for verification marker (created by /spec-drift-changed) +# 6. Check for verification marker (created by /cypher:spec-drift-changed) # 7. If marker exists -> exit 0 (allow — marker stays until content changes) -# 8. If no marker -> exit 2 (BLOCK, instruct to run /spec-drift-changed) +# 8. If no marker -> exit 2 (BLOCK, instruct to run /cypher:spec-drift-changed) CC_PKG="packages/contact-center" @@ -57,6 +57,6 @@ echo "" echo "Staged contact-center files:" echo "$STAGED_CC" | sed 's/^/ - /' echo "" -echo "Run /spec-drift-changed to validate ai-docs against source code before committing." +echo "Run /cypher:spec-drift-changed to validate ai-docs against source code before committing." echo "The command will check documentation accuracy and create a verification marker." exit 2 # Exit code 2 = blocking error in Claude Code hooks diff --git a/CLAUDE.md b/CLAUDE.md index 5513353ee..e432bd6c5 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -54,9 +54,9 @@ corepack enable # If yarn is unavailable | Command | Stage | Agent | Model | Purpose | |---------|-------|-------|-------|---------| -| `/scrub` | 1 | scrubber | haiku | Classify bugs: `prioritize` / `followup` / `dolater` | -| `/triage` | 2 | triager | sonnet | Root-cause analysis, produce fix suggestion | -| `/fix` | 3 | fixer | sonnet | Implement fix in worktree, TDD, create PR | +| `/cypher:scrub` | 1 | cypher:scrubber | haiku | Classify bugs: `prioritize` / `followup` / `dolater` | +| `/cypher:triage` | 2 | cypher:triager | sonnet | Root-cause analysis, produce fix suggestion | +| `/cypher:fix` | 3 | cypher:fixer | sonnet | Implement fix in worktree, TDD, create PR | Inter-stage state passes via **Jira comments** (durable, human-visible). Each stage reads previous stage's comments. Jira labels track progress: `scrubbed` → `prioritize`/`followup`/`dolater` → `triaged` → `fixing` → `fixed`. @@ -65,9 +65,11 @@ Jira labels track progress: `scrubbed` → `prioritize`/`followup`/`dolater` → | Command | Purpose | |---------|---------| -| `/fix-tickets` | Full lifecycle: fetch Jira tickets → worktree → implement → PR (uses superpowers skills) | -| `/submit-pr` | Commit + push + create PR for a worktree. Runs in main conversation (no subagents) | -| `/cleanup-worktrees` | List, inspect, and remove worktrees in `/tmp/claude-widgets/` | +| `/cypher:fix-tickets` | Full lifecycle: fetch Jira tickets → worktree → implement → PR (uses superpowers skills) | +| `/cypher:submit-pr` | Commit + push + create PR for a worktree. Runs in main conversation (no subagents) | +| `/cypher:cleanup-worktrees` | List, inspect, and remove worktrees in `/tmp/claude-widgets/` | +| `/cypher:spec-drift` | Full SDD ai-docs validation across 7 drift categories | +| `/cypher:spec-drift-changed` | Validate ai-docs for staged/unstaged changes (pre-commit) | ## Subagent Constraints