@lvlup-sw/exarchos 2.4.3 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +7 -2
- package/AGENTS.md +2 -2
- package/README.md +91 -57
- package/agents/.gitkeep +0 -0
- package/agents/fixer.md +62 -0
- package/agents/implementer.md +68 -0
- package/agents/reviewer.md +50 -0
- package/commands/dogfood.md +31 -0
- package/commands/ideate.md +1 -1
- package/commands/oneshot.md +178 -0
- package/commands/plan.md +1 -1
- package/commands/prune.md +90 -0
- package/commands/review.md +58 -0
- package/dist/exarchos.js +582 -142
- package/hooks/hooks.json +8 -0
- package/package.json +18 -6
- package/scripts/sync-versions.sh +31 -22
- package/skills/{brainstorming → claude/brainstorming}/SKILL.md +16 -0
- package/skills/{brainstorming → claude/brainstorming}/references/design-template.md +9 -0
- package/skills/{cleanup → claude/cleanup}/SKILL.md +6 -0
- package/skills/{debug → claude/debug}/SKILL.md +41 -0
- package/skills/{debug → claude/debug}/references/hotfix-track.md +12 -49
- package/skills/{debug → claude/debug}/references/investigation-checklist.md +3 -3
- package/skills/{debug → claude/debug}/references/thorough-track.md +12 -42
- package/skills/{delegation → claude/delegation}/SKILL.md +128 -40
- package/skills/{delegation → claude/delegation}/references/agent-teams-saga.md +4 -1
- package/skills/claude/delegation/references/fix-mode.md +118 -0
- package/skills/{delegation → claude/delegation}/references/implementer-prompt.md +29 -1
- package/skills/{delegation → claude/delegation}/references/parallel-strategy.md +1 -1
- package/skills/{delegation → claude/delegation}/references/state-management.md +33 -0
- package/skills/{delegation → claude/delegation}/references/troubleshooting.md +2 -2
- package/skills/{delegation → claude/delegation}/references/workflow-steps.md +6 -10
- package/skills/{delegation → claude/delegation}/references/worktree-enforcement.md +13 -7
- package/skills/claude/dogfood/SKILL.md +235 -0
- package/skills/claude/dogfood/references/report-template.md +109 -0
- package/skills/claude/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/{git-worktrees → claude/git-worktrees}/SKILL.md +6 -9
- package/skills/{implementation-planning → claude/implementation-planning}/SKILL.md +32 -27
- package/skills/claude/implementation-planning/references/task-template.md +63 -0
- package/skills/{implementation-planning → claude/implementation-planning}/references/testing-strategy-guide.md +22 -1
- package/skills/{implementation-planning → claude/implementation-planning}/references/worked-example.md +2 -2
- package/skills/claude/oneshot-workflow/SKILL.md +468 -0
- package/skills/claude/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/claude/prune-workflows/SKILL.md +290 -0
- package/skills/claude/prune-workflows/references/safeguards.md +74 -0
- package/skills/{quality-review → claude/quality-review}/SKILL.md +105 -10
- package/skills/{quality-review → claude/quality-review}/references/auto-transition.md +1 -1
- package/skills/claude/quality-review/references/axiom-integration.md +135 -0
- package/skills/{refactor → claude/refactor}/SKILL.md +32 -39
- package/skills/{refactor → claude/refactor}/references/doc-update-checklist.md +2 -3
- package/skills/{refactor → claude/refactor}/references/explore-checklist.md +4 -6
- package/skills/{refactor → claude/refactor}/references/overhaul-track.md +20 -50
- package/skills/{refactor → claude/refactor/references}/phases/polish-implement.md +2 -2
- package/skills/{refactor → claude/refactor/references}/phases/polish-validate.md +1 -1
- package/skills/{refactor → claude/refactor}/references/polish-track.md +18 -46
- package/skills/{shepherd → claude/shepherd}/SKILL.md +42 -10
- package/skills/{shepherd → claude/shepherd}/references/fix-strategies.md +1 -2
- package/skills/claude/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/{spec-review → claude/spec-review}/SKILL.md +48 -10
- package/skills/{spec-review → claude/spec-review}/references/worked-example.md +1 -1
- package/skills/{synthesis → claude/synthesis}/SKILL.md +72 -10
- package/skills/{synthesis → claude/synthesis}/references/github-native-stacking.md +3 -4
- package/skills/{synthesis → claude/synthesis}/references/synthesis-steps.md +11 -13
- package/skills/{workflow-state → claude/workflow-state}/SKILL.md +50 -6
- package/skills/{workflow-state → claude/workflow-state}/references/mcp-tool-reference.md +5 -5
- package/skills/{workflow-state → claude/workflow-state}/references/phase-transitions.md +28 -3
- package/skills/codex/brainstorming/SKILL.md +182 -0
- package/skills/codex/brainstorming/references/design-template.md +107 -0
- package/skills/codex/brainstorming/references/worked-example.md +58 -0
- package/skills/codex/cleanup/SKILL.md +169 -0
- package/skills/codex/cleanup/references/merge-verification.md +40 -0
- package/skills/codex/debug/SKILL.md +247 -0
- package/skills/codex/debug/references/hotfix-track.md +105 -0
- package/skills/codex/debug/references/investigation-checklist.md +217 -0
- package/skills/codex/debug/references/rca-template.md +150 -0
- package/skills/codex/debug/references/state-schema.md +294 -0
- package/skills/codex/debug/references/thorough-track.md +171 -0
- package/skills/codex/debug/references/triage-questions.md +155 -0
- package/skills/codex/debug/references/troubleshooting.md +47 -0
- package/skills/codex/delegation/SKILL.md +353 -0
- package/skills/codex/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/codex/delegation/references/agent-teams-saga.md +254 -0
- package/skills/codex/delegation/references/fix-mode.md +118 -0
- package/skills/codex/delegation/references/fixer-prompt.md +174 -0
- package/skills/codex/delegation/references/implementer-prompt.md +401 -0
- package/skills/codex/delegation/references/parallel-strategy.md +124 -0
- package/skills/codex/delegation/references/pbt-patterns.md +172 -0
- package/skills/codex/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/codex/delegation/references/rationalization-refutation.md +15 -0
- package/skills/codex/delegation/references/state-management.md +84 -0
- package/skills/codex/delegation/references/testing-patterns.md +146 -0
- package/skills/codex/delegation/references/troubleshooting.md +109 -0
- package/skills/codex/delegation/references/worked-example.md +104 -0
- package/skills/codex/delegation/references/workflow-steps.md +131 -0
- package/skills/codex/delegation/references/worktree-enforcement.md +71 -0
- package/skills/codex/dogfood/SKILL.md +235 -0
- package/skills/codex/dogfood/references/report-template.md +109 -0
- package/skills/codex/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/codex/git-worktrees/SKILL.md +193 -0
- package/skills/codex/git-worktrees/references/commands-reference.md +78 -0
- package/skills/codex/implementation-planning/SKILL.md +289 -0
- package/skills/codex/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/codex/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/codex/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/codex/implementation-planning/references/task-template.md +63 -0
- package/skills/codex/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/codex/implementation-planning/references/worked-example.md +76 -0
- package/skills/codex/oneshot-workflow/SKILL.md +468 -0
- package/skills/codex/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/codex/prune-workflows/SKILL.md +290 -0
- package/skills/codex/prune-workflows/references/safeguards.md +74 -0
- package/skills/codex/quality-review/SKILL.md +371 -0
- package/skills/codex/quality-review/references/auto-transition.md +47 -0
- package/skills/codex/quality-review/references/axiom-integration.md +135 -0
- package/skills/codex/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/codex/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/codex/quality-review/references/gate-execution.md +60 -0
- package/skills/codex/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/codex/quality-review/references/review-report-template.md +65 -0
- package/skills/codex/quality-review/references/security-checklist.md +79 -0
- package/skills/codex/quality-review/references/typescript-standards.md +24 -0
- package/skills/codex/refactor/SKILL.md +196 -0
- package/skills/codex/refactor/references/brief-template.md +81 -0
- package/skills/codex/refactor/references/doc-update-checklist.md +113 -0
- package/skills/codex/refactor/references/explore-checklist.md +79 -0
- package/skills/codex/refactor/references/overhaul-track.md +194 -0
- package/skills/codex/refactor/references/phases/auto-chain.md +267 -0
- package/skills/codex/refactor/references/phases/brief.md +176 -0
- package/skills/codex/refactor/references/phases/explore.md +132 -0
- package/skills/codex/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/codex/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/codex/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/codex/refactor/references/phases/polish-implement.md +347 -0
- package/skills/codex/refactor/references/phases/polish-validate.md +218 -0
- package/skills/codex/refactor/references/phases/update-docs.md +234 -0
- package/skills/codex/refactor/references/polish-track.md +152 -0
- package/skills/codex/shepherd/SKILL.md +251 -0
- package/skills/codex/shepherd/references/assess-checklist.md +170 -0
- package/skills/codex/shepherd/references/escalation-criteria.md +53 -0
- package/skills/codex/shepherd/references/fix-strategies.md +289 -0
- package/skills/codex/shepherd/references/gate-event-emission.md +47 -0
- package/skills/codex/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/codex/spec-review/SKILL.md +294 -0
- package/skills/codex/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/codex/spec-review/references/review-checklist.md +79 -0
- package/skills/codex/spec-review/references/worked-example.md +72 -0
- package/skills/codex/synthesis/SKILL.md +217 -0
- package/skills/codex/synthesis/references/github-native-stacking.md +135 -0
- package/skills/codex/synthesis/references/merge-ordering.md +50 -0
- package/skills/codex/synthesis/references/pr-descriptions.md +87 -0
- package/skills/codex/synthesis/references/synthesis-steps.md +145 -0
- package/skills/codex/synthesis/references/troubleshooting.md +115 -0
- package/skills/codex/workflow-state/SKILL.md +254 -0
- package/skills/codex/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/codex/workflow-state/references/phase-transitions.md +206 -0
- package/skills/copilot/brainstorming/SKILL.md +182 -0
- package/skills/copilot/brainstorming/references/design-template.md +107 -0
- package/skills/copilot/brainstorming/references/worked-example.md +58 -0
- package/skills/copilot/cleanup/SKILL.md +169 -0
- package/skills/copilot/cleanup/references/merge-verification.md +40 -0
- package/skills/copilot/debug/SKILL.md +247 -0
- package/skills/copilot/debug/references/hotfix-track.md +105 -0
- package/skills/copilot/debug/references/investigation-checklist.md +217 -0
- package/skills/copilot/debug/references/rca-template.md +150 -0
- package/skills/copilot/debug/references/state-schema.md +294 -0
- package/skills/copilot/debug/references/thorough-track.md +171 -0
- package/skills/copilot/debug/references/triage-questions.md +155 -0
- package/skills/copilot/debug/references/troubleshooting.md +47 -0
- package/skills/copilot/delegation/SKILL.md +345 -0
- package/skills/copilot/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/copilot/delegation/references/agent-teams-saga.md +254 -0
- package/skills/copilot/delegation/references/fix-mode.md +118 -0
- package/skills/copilot/delegation/references/fixer-prompt.md +174 -0
- package/skills/copilot/delegation/references/implementer-prompt.md +401 -0
- package/skills/copilot/delegation/references/parallel-strategy.md +124 -0
- package/skills/copilot/delegation/references/pbt-patterns.md +172 -0
- package/skills/copilot/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/copilot/delegation/references/rationalization-refutation.md +15 -0
- package/skills/copilot/delegation/references/state-management.md +84 -0
- package/skills/copilot/delegation/references/testing-patterns.md +146 -0
- package/skills/copilot/delegation/references/troubleshooting.md +109 -0
- package/skills/copilot/delegation/references/worked-example.md +104 -0
- package/skills/copilot/delegation/references/workflow-steps.md +131 -0
- package/skills/copilot/delegation/references/worktree-enforcement.md +71 -0
- package/skills/copilot/dogfood/SKILL.md +235 -0
- package/skills/copilot/dogfood/references/report-template.md +109 -0
- package/skills/copilot/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/copilot/git-worktrees/SKILL.md +193 -0
- package/skills/copilot/git-worktrees/references/commands-reference.md +78 -0
- package/skills/copilot/implementation-planning/SKILL.md +289 -0
- package/skills/copilot/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/copilot/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/copilot/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/copilot/implementation-planning/references/task-template.md +63 -0
- package/skills/copilot/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/copilot/implementation-planning/references/worked-example.md +76 -0
- package/skills/copilot/oneshot-workflow/SKILL.md +468 -0
- package/skills/copilot/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/copilot/prune-workflows/SKILL.md +290 -0
- package/skills/copilot/prune-workflows/references/safeguards.md +74 -0
- package/skills/copilot/quality-review/SKILL.md +371 -0
- package/skills/copilot/quality-review/references/auto-transition.md +47 -0
- package/skills/copilot/quality-review/references/axiom-integration.md +135 -0
- package/skills/copilot/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/copilot/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/copilot/quality-review/references/gate-execution.md +60 -0
- package/skills/copilot/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/copilot/quality-review/references/review-report-template.md +65 -0
- package/skills/copilot/quality-review/references/security-checklist.md +79 -0
- package/skills/copilot/quality-review/references/typescript-standards.md +24 -0
- package/skills/copilot/refactor/SKILL.md +196 -0
- package/skills/copilot/refactor/references/brief-template.md +81 -0
- package/skills/copilot/refactor/references/doc-update-checklist.md +113 -0
- package/skills/copilot/refactor/references/explore-checklist.md +79 -0
- package/skills/copilot/refactor/references/overhaul-track.md +194 -0
- package/skills/copilot/refactor/references/phases/auto-chain.md +267 -0
- package/skills/copilot/refactor/references/phases/brief.md +176 -0
- package/skills/copilot/refactor/references/phases/explore.md +132 -0
- package/skills/copilot/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/copilot/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/copilot/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/copilot/refactor/references/phases/polish-implement.md +347 -0
- package/skills/copilot/refactor/references/phases/polish-validate.md +218 -0
- package/skills/copilot/refactor/references/phases/update-docs.md +234 -0
- package/skills/copilot/refactor/references/polish-track.md +152 -0
- package/skills/copilot/shepherd/SKILL.md +251 -0
- package/skills/copilot/shepherd/references/assess-checklist.md +170 -0
- package/skills/copilot/shepherd/references/escalation-criteria.md +53 -0
- package/skills/copilot/shepherd/references/fix-strategies.md +289 -0
- package/skills/copilot/shepherd/references/gate-event-emission.md +47 -0
- package/skills/copilot/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/copilot/spec-review/SKILL.md +294 -0
- package/skills/copilot/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/copilot/spec-review/references/review-checklist.md +79 -0
- package/skills/copilot/spec-review/references/worked-example.md +72 -0
- package/skills/copilot/synthesis/SKILL.md +217 -0
- package/skills/copilot/synthesis/references/github-native-stacking.md +135 -0
- package/skills/copilot/synthesis/references/merge-ordering.md +50 -0
- package/skills/copilot/synthesis/references/pr-descriptions.md +87 -0
- package/skills/copilot/synthesis/references/synthesis-steps.md +145 -0
- package/skills/copilot/synthesis/references/troubleshooting.md +115 -0
- package/skills/copilot/workflow-state/SKILL.md +254 -0
- package/skills/copilot/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/copilot/workflow-state/references/phase-transitions.md +206 -0
- package/skills/cursor/brainstorming/SKILL.md +182 -0
- package/skills/cursor/brainstorming/references/design-template.md +107 -0
- package/skills/cursor/brainstorming/references/worked-example.md +58 -0
- package/skills/cursor/cleanup/SKILL.md +169 -0
- package/skills/cursor/cleanup/references/merge-verification.md +40 -0
- package/skills/cursor/debug/SKILL.md +247 -0
- package/skills/cursor/debug/references/hotfix-track.md +105 -0
- package/skills/cursor/debug/references/investigation-checklist.md +217 -0
- package/skills/cursor/debug/references/rca-template.md +150 -0
- package/skills/cursor/debug/references/state-schema.md +294 -0
- package/skills/cursor/debug/references/thorough-track.md +171 -0
- package/skills/cursor/debug/references/triage-questions.md +155 -0
- package/skills/cursor/debug/references/troubleshooting.md +47 -0
- package/skills/cursor/delegation/SKILL.md +351 -0
- package/skills/cursor/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/cursor/delegation/references/agent-teams-saga.md +254 -0
- package/skills/cursor/delegation/references/fix-mode.md +118 -0
- package/skills/cursor/delegation/references/fixer-prompt.md +174 -0
- package/skills/cursor/delegation/references/implementer-prompt.md +401 -0
- package/skills/cursor/delegation/references/parallel-strategy.md +124 -0
- package/skills/cursor/delegation/references/pbt-patterns.md +172 -0
- package/skills/cursor/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/cursor/delegation/references/rationalization-refutation.md +15 -0
- package/skills/cursor/delegation/references/state-management.md +84 -0
- package/skills/cursor/delegation/references/testing-patterns.md +146 -0
- package/skills/cursor/delegation/references/troubleshooting.md +109 -0
- package/skills/cursor/delegation/references/worked-example.md +104 -0
- package/skills/cursor/delegation/references/workflow-steps.md +131 -0
- package/skills/cursor/delegation/references/worktree-enforcement.md +71 -0
- package/skills/cursor/dogfood/SKILL.md +235 -0
- package/skills/cursor/dogfood/references/report-template.md +109 -0
- package/skills/cursor/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/cursor/git-worktrees/SKILL.md +193 -0
- package/skills/cursor/git-worktrees/references/commands-reference.md +78 -0
- package/skills/cursor/implementation-planning/SKILL.md +289 -0
- package/skills/cursor/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/cursor/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/cursor/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/cursor/implementation-planning/references/task-template.md +63 -0
- package/skills/cursor/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/cursor/implementation-planning/references/worked-example.md +76 -0
- package/skills/cursor/oneshot-workflow/SKILL.md +468 -0
- package/skills/cursor/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/cursor/prune-workflows/SKILL.md +290 -0
- package/skills/cursor/prune-workflows/references/safeguards.md +74 -0
- package/skills/cursor/quality-review/SKILL.md +371 -0
- package/skills/cursor/quality-review/references/auto-transition.md +47 -0
- package/skills/cursor/quality-review/references/axiom-integration.md +135 -0
- package/skills/cursor/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/cursor/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/cursor/quality-review/references/gate-execution.md +60 -0
- package/skills/cursor/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/cursor/quality-review/references/review-report-template.md +65 -0
- package/skills/cursor/quality-review/references/security-checklist.md +79 -0
- package/skills/cursor/quality-review/references/typescript-standards.md +24 -0
- package/skills/cursor/refactor/SKILL.md +196 -0
- package/skills/cursor/refactor/references/brief-template.md +81 -0
- package/skills/cursor/refactor/references/doc-update-checklist.md +113 -0
- package/skills/cursor/refactor/references/explore-checklist.md +79 -0
- package/skills/cursor/refactor/references/overhaul-track.md +194 -0
- package/skills/cursor/refactor/references/phases/auto-chain.md +267 -0
- package/skills/cursor/refactor/references/phases/brief.md +176 -0
- package/skills/cursor/refactor/references/phases/explore.md +132 -0
- package/skills/cursor/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/cursor/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/cursor/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/cursor/refactor/references/phases/polish-implement.md +347 -0
- package/skills/cursor/refactor/references/phases/polish-validate.md +218 -0
- package/skills/cursor/refactor/references/phases/update-docs.md +234 -0
- package/skills/cursor/refactor/references/polish-track.md +152 -0
- package/skills/cursor/shepherd/SKILL.md +251 -0
- package/skills/cursor/shepherd/references/assess-checklist.md +170 -0
- package/skills/cursor/shepherd/references/escalation-criteria.md +53 -0
- package/skills/cursor/shepherd/references/fix-strategies.md +289 -0
- package/skills/cursor/shepherd/references/gate-event-emission.md +47 -0
- package/skills/cursor/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/cursor/spec-review/SKILL.md +294 -0
- package/skills/cursor/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/cursor/spec-review/references/review-checklist.md +79 -0
- package/skills/cursor/spec-review/references/worked-example.md +72 -0
- package/skills/cursor/synthesis/SKILL.md +217 -0
- package/skills/cursor/synthesis/references/github-native-stacking.md +135 -0
- package/skills/cursor/synthesis/references/merge-ordering.md +50 -0
- package/skills/cursor/synthesis/references/pr-descriptions.md +87 -0
- package/skills/cursor/synthesis/references/synthesis-steps.md +145 -0
- package/skills/cursor/synthesis/references/troubleshooting.md +115 -0
- package/skills/cursor/workflow-state/SKILL.md +254 -0
- package/skills/cursor/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/cursor/workflow-state/references/phase-transitions.md +206 -0
- package/skills/generic/brainstorming/SKILL.md +182 -0
- package/skills/generic/brainstorming/references/design-template.md +107 -0
- package/skills/generic/brainstorming/references/worked-example.md +58 -0
- package/skills/generic/cleanup/SKILL.md +169 -0
- package/skills/generic/cleanup/references/merge-verification.md +40 -0
- package/skills/generic/debug/SKILL.md +247 -0
- package/skills/generic/debug/references/hotfix-track.md +105 -0
- package/skills/generic/debug/references/investigation-checklist.md +217 -0
- package/skills/generic/debug/references/rca-template.md +150 -0
- package/skills/generic/debug/references/state-schema.md +294 -0
- package/skills/generic/debug/references/thorough-track.md +171 -0
- package/skills/generic/debug/references/triage-questions.md +155 -0
- package/skills/generic/debug/references/troubleshooting.md +47 -0
- package/skills/generic/delegation/SKILL.md +345 -0
- package/skills/generic/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/generic/delegation/references/agent-teams-saga.md +254 -0
- package/skills/generic/delegation/references/fix-mode.md +118 -0
- package/skills/generic/delegation/references/fixer-prompt.md +174 -0
- package/skills/generic/delegation/references/implementer-prompt.md +401 -0
- package/skills/generic/delegation/references/parallel-strategy.md +124 -0
- package/skills/generic/delegation/references/pbt-patterns.md +172 -0
- package/skills/generic/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/generic/delegation/references/rationalization-refutation.md +15 -0
- package/skills/generic/delegation/references/state-management.md +84 -0
- package/skills/generic/delegation/references/testing-patterns.md +146 -0
- package/skills/generic/delegation/references/troubleshooting.md +109 -0
- package/skills/generic/delegation/references/worked-example.md +104 -0
- package/skills/generic/delegation/references/workflow-steps.md +131 -0
- package/skills/generic/delegation/references/worktree-enforcement.md +71 -0
- package/skills/generic/dogfood/SKILL.md +235 -0
- package/skills/generic/dogfood/references/report-template.md +109 -0
- package/skills/generic/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/generic/git-worktrees/SKILL.md +193 -0
- package/skills/generic/git-worktrees/references/commands-reference.md +78 -0
- package/skills/generic/implementation-planning/SKILL.md +289 -0
- package/skills/generic/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/generic/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/generic/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/generic/implementation-planning/references/task-template.md +63 -0
- package/skills/generic/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/generic/implementation-planning/references/worked-example.md +76 -0
- package/skills/generic/oneshot-workflow/SKILL.md +468 -0
- package/skills/generic/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/generic/prune-workflows/SKILL.md +290 -0
- package/skills/generic/prune-workflows/references/safeguards.md +74 -0
- package/skills/generic/quality-review/SKILL.md +371 -0
- package/skills/generic/quality-review/references/auto-transition.md +47 -0
- package/skills/generic/quality-review/references/axiom-integration.md +135 -0
- package/skills/generic/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/generic/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/generic/quality-review/references/gate-execution.md +60 -0
- package/skills/generic/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/generic/quality-review/references/review-report-template.md +65 -0
- package/skills/generic/quality-review/references/security-checklist.md +79 -0
- package/skills/generic/quality-review/references/typescript-standards.md +24 -0
- package/skills/generic/refactor/SKILL.md +196 -0
- package/skills/generic/refactor/references/brief-template.md +81 -0
- package/skills/generic/refactor/references/doc-update-checklist.md +113 -0
- package/skills/generic/refactor/references/explore-checklist.md +79 -0
- package/skills/generic/refactor/references/overhaul-track.md +194 -0
- package/skills/generic/refactor/references/phases/auto-chain.md +267 -0
- package/skills/generic/refactor/references/phases/brief.md +176 -0
- package/skills/generic/refactor/references/phases/explore.md +132 -0
- package/skills/generic/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/generic/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/generic/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/generic/refactor/references/phases/polish-implement.md +347 -0
- package/skills/generic/refactor/references/phases/polish-validate.md +218 -0
- package/skills/generic/refactor/references/phases/update-docs.md +234 -0
- package/skills/generic/refactor/references/polish-track.md +152 -0
- package/skills/generic/shepherd/SKILL.md +251 -0
- package/skills/generic/shepherd/references/assess-checklist.md +170 -0
- package/skills/generic/shepherd/references/escalation-criteria.md +53 -0
- package/skills/generic/shepherd/references/fix-strategies.md +289 -0
- package/skills/generic/shepherd/references/gate-event-emission.md +47 -0
- package/skills/generic/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/generic/spec-review/SKILL.md +294 -0
- package/skills/generic/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/generic/spec-review/references/review-checklist.md +79 -0
- package/skills/generic/spec-review/references/worked-example.md +72 -0
- package/skills/generic/synthesis/SKILL.md +217 -0
- package/skills/generic/synthesis/references/github-native-stacking.md +135 -0
- package/skills/generic/synthesis/references/merge-ordering.md +50 -0
- package/skills/generic/synthesis/references/pr-descriptions.md +87 -0
- package/skills/generic/synthesis/references/synthesis-steps.md +145 -0
- package/skills/generic/synthesis/references/troubleshooting.md +115 -0
- package/skills/generic/workflow-state/SKILL.md +254 -0
- package/skills/generic/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/generic/workflow-state/references/phase-transitions.md +206 -0
- package/skills/opencode/brainstorming/SKILL.md +182 -0
- package/skills/opencode/brainstorming/references/design-template.md +107 -0
- package/skills/opencode/brainstorming/references/worked-example.md +58 -0
- package/skills/opencode/cleanup/SKILL.md +169 -0
- package/skills/opencode/cleanup/references/merge-verification.md +40 -0
- package/skills/opencode/debug/SKILL.md +247 -0
- package/skills/opencode/debug/references/hotfix-track.md +105 -0
- package/skills/opencode/debug/references/investigation-checklist.md +217 -0
- package/skills/opencode/debug/references/rca-template.md +150 -0
- package/skills/opencode/debug/references/state-schema.md +294 -0
- package/skills/opencode/debug/references/thorough-track.md +171 -0
- package/skills/opencode/debug/references/triage-questions.md +155 -0
- package/skills/opencode/debug/references/troubleshooting.md +47 -0
- package/skills/opencode/delegation/SKILL.md +353 -0
- package/skills/opencode/delegation/references/adaptive-orchestration.md +31 -0
- package/skills/opencode/delegation/references/agent-teams-saga.md +254 -0
- package/skills/opencode/delegation/references/fix-mode.md +118 -0
- package/skills/opencode/delegation/references/fixer-prompt.md +174 -0
- package/skills/opencode/delegation/references/implementer-prompt.md +401 -0
- package/skills/opencode/delegation/references/parallel-strategy.md +124 -0
- package/skills/opencode/delegation/references/pbt-patterns.md +172 -0
- package/skills/opencode/delegation/references/pr-fixes-mode.md +155 -0
- package/skills/opencode/delegation/references/rationalization-refutation.md +15 -0
- package/skills/opencode/delegation/references/state-management.md +84 -0
- package/skills/opencode/delegation/references/testing-patterns.md +146 -0
- package/skills/opencode/delegation/references/troubleshooting.md +109 -0
- package/skills/opencode/delegation/references/worked-example.md +104 -0
- package/skills/opencode/delegation/references/workflow-steps.md +131 -0
- package/skills/opencode/delegation/references/worktree-enforcement.md +71 -0
- package/skills/opencode/dogfood/SKILL.md +235 -0
- package/skills/opencode/dogfood/references/report-template.md +109 -0
- package/skills/opencode/dogfood/references/root-cause-patterns.md +227 -0
- package/skills/opencode/git-worktrees/SKILL.md +193 -0
- package/skills/opencode/git-worktrees/references/commands-reference.md +78 -0
- package/skills/opencode/implementation-planning/SKILL.md +289 -0
- package/skills/opencode/implementation-planning/references/plan-document-template.md +42 -0
- package/skills/opencode/implementation-planning/references/rationalization-refutation.md +13 -0
- package/skills/opencode/implementation-planning/references/spec-tracing-guide.md +51 -0
- package/skills/opencode/implementation-planning/references/task-template.md +63 -0
- package/skills/opencode/implementation-planning/references/testing-strategy-guide.md +109 -0
- package/skills/opencode/implementation-planning/references/worked-example.md +76 -0
- package/skills/opencode/oneshot-workflow/SKILL.md +468 -0
- package/skills/opencode/oneshot-workflow/references/choice-state.md +65 -0
- package/skills/opencode/prune-workflows/SKILL.md +290 -0
- package/skills/opencode/prune-workflows/references/safeguards.md +74 -0
- package/skills/opencode/quality-review/SKILL.md +371 -0
- package/skills/opencode/quality-review/references/auto-transition.md +47 -0
- package/skills/opencode/quality-review/references/axiom-integration.md +135 -0
- package/skills/opencode/quality-review/references/code-quality-checklist.md +171 -0
- package/skills/opencode/quality-review/references/convergence-and-verdict.md +48 -0
- package/skills/opencode/quality-review/references/gate-execution.md +60 -0
- package/skills/opencode/quality-review/references/rationalization-refutation.md +13 -0
- package/skills/opencode/quality-review/references/review-report-template.md +65 -0
- package/skills/opencode/quality-review/references/security-checklist.md +79 -0
- package/skills/opencode/quality-review/references/typescript-standards.md +24 -0
- package/skills/opencode/refactor/SKILL.md +196 -0
- package/skills/opencode/refactor/references/brief-template.md +81 -0
- package/skills/opencode/refactor/references/doc-update-checklist.md +113 -0
- package/skills/opencode/refactor/references/explore-checklist.md +79 -0
- package/skills/opencode/refactor/references/overhaul-track.md +194 -0
- package/skills/opencode/refactor/references/phases/auto-chain.md +267 -0
- package/skills/opencode/refactor/references/phases/brief.md +176 -0
- package/skills/opencode/refactor/references/phases/explore.md +132 -0
- package/skills/opencode/refactor/references/phases/overhaul-delegate.md +136 -0
- package/skills/opencode/refactor/references/phases/overhaul-plan.md +312 -0
- package/skills/opencode/refactor/references/phases/overhaul-review.md +304 -0
- package/skills/opencode/refactor/references/phases/polish-implement.md +347 -0
- package/skills/opencode/refactor/references/phases/polish-validate.md +218 -0
- package/skills/opencode/refactor/references/phases/update-docs.md +234 -0
- package/skills/opencode/refactor/references/polish-track.md +152 -0
- package/skills/opencode/shepherd/SKILL.md +251 -0
- package/skills/opencode/shepherd/references/assess-checklist.md +170 -0
- package/skills/opencode/shepherd/references/escalation-criteria.md +53 -0
- package/skills/opencode/shepherd/references/fix-strategies.md +289 -0
- package/skills/opencode/shepherd/references/gate-event-emission.md +47 -0
- package/skills/opencode/shepherd/references/shepherd-event-schemas.md +56 -0
- package/skills/opencode/spec-review/SKILL.md +294 -0
- package/skills/opencode/spec-review/references/rationalization-refutation.md +13 -0
- package/skills/opencode/spec-review/references/review-checklist.md +79 -0
- package/skills/opencode/spec-review/references/worked-example.md +72 -0
- package/skills/opencode/synthesis/SKILL.md +217 -0
- package/skills/opencode/synthesis/references/github-native-stacking.md +135 -0
- package/skills/opencode/synthesis/references/merge-ordering.md +50 -0
- package/skills/opencode/synthesis/references/pr-descriptions.md +87 -0
- package/skills/opencode/synthesis/references/synthesis-steps.md +145 -0
- package/skills/opencode/synthesis/references/troubleshooting.md +115 -0
- package/skills/opencode/workflow-state/SKILL.md +254 -0
- package/skills/opencode/workflow-state/references/mcp-tool-reference.md +89 -0
- package/skills/opencode/workflow-state/references/phase-transitions.md +206 -0
- package/.claude-plugin/marketplace.json +0 -34
- package/dist/node_modules/electron/index.js +0 -1
- package/dist/node_modules/electron/package.json +0 -1
- package/dist/node_modules/playwright-core/index.js +0 -1
- package/dist/node_modules/playwright-core/package.json +0 -1
- package/scripts/assess-refactor-scope.sh +0 -239
- package/scripts/check-coderabbit.sh +0 -288
- package/scripts/check-context-economy.sh +0 -405
- package/scripts/check-coverage-thresholds.sh +0 -194
- package/scripts/check-operational-resilience.sh +0 -306
- package/scripts/check-polish-scope.sh +0 -245
- package/scripts/check-post-merge.sh +0 -185
- package/scripts/check-pr-comments.sh +0 -127
- package/scripts/check-task-decomposition.sh +0 -451
- package/scripts/check-tdd-compliance.sh +0 -265
- package/scripts/check-workflow-determinism.sh +0 -312
- package/scripts/debug-review-gate.sh +0 -201
- package/scripts/extract-fix-tasks.sh +0 -179
- package/scripts/extract-task.sh +0 -67
- package/scripts/generate-traceability.sh +0 -209
- package/scripts/investigation-timer.sh +0 -171
- package/scripts/needs-schema-sync.sh +0 -174
- package/scripts/new-project.sh +0 -103
- package/scripts/post-delegation-check.sh +0 -317
- package/scripts/pre-synthesis-check.sh +0 -475
- package/scripts/reconcile-state.sh +0 -346
- package/scripts/review-diff.sh +0 -63
- package/scripts/review-verdict.sh +0 -169
- package/scripts/security-scan.sh +0 -248
- package/scripts/select-debug-track.sh +0 -186
- package/scripts/setup-worktree.sh +0 -323
- package/scripts/spec-coverage-check.sh +0 -230
- package/scripts/static-analysis-gate.sh +0 -261
- package/scripts/validate-companion.sh +0 -161
- package/scripts/validate-pr-body.sh +0 -158
- package/scripts/validate-pr-stack.sh +0 -146
- package/scripts/verify-delegation-saga.sh +0 -240
- package/scripts/verify-doc-links.sh +0 -211
- package/scripts/verify-ideate-artifacts.sh +0 -296
- package/scripts/verify-plan-coverage.sh +0 -408
- package/scripts/verify-provenance-chain.sh +0 -310
- package/scripts/verify-review-triage.sh +0 -219
- package/scripts/verify-worktree-baseline.sh +0 -159
- package/scripts/verify-worktree.sh +0 -84
- package/skills/delegation/references/fix-mode.md +0 -78
- package/skills/implementation-planning/references/task-template.md +0 -43
- package/skills/shared/prompts/context-reading.md +0 -66
- package/skills/shared/prompts/report-format.md +0 -54
- package/skills/shared/prompts/tdd-requirements.md +0 -39
- package/skills/shared/references/coding-standards.md +0 -46
- package/skills/shared/references/mcp-tool-guidance.md +0 -26
- package/skills/shared/references/skill-path-resolution.md +0 -10
- package/skills/shared/references/tdd.md +0 -41
- package/skills/shared/references/telemetry-awareness.md +0 -9
- /package/skills/{brainstorming → claude/brainstorming}/references/worked-example.md +0 -0
- /package/skills/{cleanup → claude/cleanup}/references/merge-verification.md +0 -0
- /package/skills/{debug → claude/debug}/references/rca-template.md +0 -0
- /package/skills/{debug → claude/debug}/references/state-schema.md +0 -0
- /package/skills/{debug → claude/debug}/references/triage-questions.md +0 -0
- /package/skills/{debug → claude/debug}/references/troubleshooting.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/adaptive-orchestration.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/fixer-prompt.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/pbt-patterns.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/pr-fixes-mode.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/rationalization-refutation.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/testing-patterns.md +0 -0
- /package/skills/{delegation → claude/delegation}/references/worked-example.md +0 -0
- /package/skills/{git-worktrees → claude/git-worktrees}/references/commands-reference.md +0 -0
- /package/skills/{implementation-planning → claude/implementation-planning}/references/plan-document-template.md +0 -0
- /package/skills/{implementation-planning → claude/implementation-planning}/references/rationalization-refutation.md +0 -0
- /package/skills/{implementation-planning → claude/implementation-planning}/references/spec-tracing-guide.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/code-quality-checklist.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/convergence-and-verdict.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/gate-execution.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/rationalization-refutation.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/review-report-template.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/security-checklist.md +0 -0
- /package/skills/{quality-review → claude/quality-review}/references/typescript-standards.md +0 -0
- /package/skills/{refactor → claude/refactor}/references/brief-template.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/auto-chain.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/brief.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/explore.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/overhaul-delegate.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/overhaul-plan.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/overhaul-review.md +0 -0
- /package/skills/{refactor → claude/refactor/references}/phases/update-docs.md +0 -0
- /package/skills/{shepherd → claude/shepherd}/references/assess-checklist.md +0 -0
- /package/skills/{shepherd → claude/shepherd}/references/escalation-criteria.md +0 -0
- /package/skills/{shepherd → claude/shepherd}/references/gate-event-emission.md +0 -0
- /package/skills/{spec-review → claude/spec-review}/references/rationalization-refutation.md +0 -0
- /package/skills/{spec-review → claude/spec-review}/references/review-checklist.md +0 -0
- /package/skills/{synthesis → claude/synthesis}/references/merge-ordering.md +0 -0
- /package/skills/{synthesis → claude/synthesis}/references/pr-descriptions.md +0 -0
- /package/skills/{synthesis → claude/synthesis}/references/troubleshooting.md +0 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
# Agent Teams Delegation Saga
|
|
2
|
+
|
|
3
|
+
> **Machine-readable version:** `exarchos_orchestrate({ action: "runbook", id: "agent-teams-saga" })`
|
|
4
|
+
> The runbook below is the authoritative sequence. The prose description provides human-readable context.
|
|
5
|
+
|
|
6
|
+
Event-first delegation saga for Agent Teams mode. Every coordination action is preceded by an Exarchos event emission. The event stream is the authoritative record; native API calls are side effects.
|
|
7
|
+
|
|
8
|
+
**Architectural principle:** Events record intent. Native API calls execute effects.
|
|
9
|
+
|
|
10
|
+
## Delegation Saga (6 Steps)
|
|
11
|
+
|
|
12
|
+
The dispatch follows a saga pattern with compensable, pivot, and retryable transactions.
|
|
13
|
+
|
|
14
|
+
### Step 1: Create Team (COMPENSABLE)
|
|
15
|
+
|
|
16
|
+
```yaml
|
|
17
|
+
# Emit event (source of truth)
|
|
18
|
+
exarchos_event append:
|
|
19
|
+
stream: {featureId}
|
|
20
|
+
event:
|
|
21
|
+
type: "team.spawned"
|
|
22
|
+
data:
|
|
23
|
+
teamSize: {N}
|
|
24
|
+
teammateNames: ["teammate-1", "teammate-2"]
|
|
25
|
+
taskCount: {M}
|
|
26
|
+
dispatchMode: "agent-team"
|
|
27
|
+
|
|
28
|
+
# Execute side effect
|
|
29
|
+
TeamCreate:
|
|
30
|
+
team_name: {featureId}
|
|
31
|
+
description: "SDLC delegation for {featureId}"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Idempotency: before retrying, check if `~/.claude/teams/{featureId}/` already exists.
|
|
35
|
+
|
|
36
|
+
### Gate: Team Verification
|
|
37
|
+
|
|
38
|
+
Before proceeding to Step 2:
|
|
39
|
+
1. Verify team config exists: `~/.claude/teams/{featureId}/config.json`
|
|
40
|
+
2. Verify config has valid `members` array
|
|
41
|
+
3. If check fails: emit `team.creation.failed` event, abort delegation
|
|
42
|
+
|
|
43
|
+
### Step 2: Create Native Tasks (COMPENSABLE)
|
|
44
|
+
|
|
45
|
+
Emit ALL task planning events in a single batched call (1 MCP call instead of N):
|
|
46
|
+
|
|
47
|
+
```yaml
|
|
48
|
+
# Emit ALL task events in one batch (source of truth)
|
|
49
|
+
exarchos_event batch_append:
|
|
50
|
+
stream: {featureId}
|
|
51
|
+
events:
|
|
52
|
+
- type: "team.task.planned"
|
|
53
|
+
taskId: "task-001"
|
|
54
|
+
title: {task.title}
|
|
55
|
+
modules: {task.files}
|
|
56
|
+
blockedBy: {task.blockedBy}
|
|
57
|
+
- type: "team.task.planned"
|
|
58
|
+
taskId: "task-002"
|
|
59
|
+
...
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`batch_append` atomicity: acquires the stream lock once, validates all events, writes with sequential sequence numbers in a single append. All-or-nothing -- if any event fails validation, none are written.
|
|
63
|
+
|
|
64
|
+
Then create native tasks and wire dependencies:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
# Execute side effects (one TaskCreate per task)
|
|
68
|
+
TaskCreate:
|
|
69
|
+
subject: {task.title}
|
|
70
|
+
description: {task.fullDescription}
|
|
71
|
+
activeForm: "Implementing {task.title}"
|
|
72
|
+
# Returns nativeTaskId
|
|
73
|
+
|
|
74
|
+
# Wire dependencies (after ALL tasks created -- requires sequential creation)
|
|
75
|
+
TaskUpdate:
|
|
76
|
+
taskId: {nativeTaskId}
|
|
77
|
+
addBlockedBy: [{blockerNativeTaskIds}]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Idempotency: before retrying, check `TaskList` for existing tasks with matching subjects to avoid duplicates.
|
|
81
|
+
|
|
82
|
+
After all tasks are created, store the correlation (orchestrator is the **sole writer** of `workflow.tasks[]`):
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
exarchos_workflow set:
|
|
86
|
+
featureId: {featureId}
|
|
87
|
+
updates:
|
|
88
|
+
tasks: [{...task, nativeTaskId: "returned-id"}]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 3: Spawn Teammates (PIVOT -- point of no return)
|
|
92
|
+
|
|
93
|
+
> This is the **pivot transaction**. Once teammates start working, their side effects (file writes, commits, worktree modifications) cannot be cleanly reversed. Steps 1-2 are compensable; Step 3+ are not fully reversible.
|
|
94
|
+
|
|
95
|
+
For each teammate:
|
|
96
|
+
|
|
97
|
+
```yaml
|
|
98
|
+
# Emit event (source of truth)
|
|
99
|
+
exarchos_event append:
|
|
100
|
+
stream: {featureId}
|
|
101
|
+
event:
|
|
102
|
+
type: "team.teammate.dispatched"
|
|
103
|
+
teammateName: {name}
|
|
104
|
+
worktreePath: {path}
|
|
105
|
+
assignedTaskIds: [{taskIds}]
|
|
106
|
+
model: "opus"
|
|
107
|
+
|
|
108
|
+
# Execute side effect
|
|
109
|
+
# Note: teammates inherit the lead's permission mode (per Claude Code docs).
|
|
110
|
+
# Do NOT set `mode` at spawn -- it is not respected.
|
|
111
|
+
Task:
|
|
112
|
+
subagent_type: "general-purpose"
|
|
113
|
+
team_name: {featureId}
|
|
114
|
+
name: {teammateName}
|
|
115
|
+
model: "opus"
|
|
116
|
+
prompt: {spawnPrompt} # See implementer-prompt.md template
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
> **Spawn prompt assembly:** `{spawnPrompt}` MUST include all universal sections from `implementer-prompt.md` (TDD Requirements, Files, Success Criteria, **Commit Strategy**, Completion) PLUS the Agent Teams-only sections (Coordination, Workflow Intelligence, Team Context, Historical Context). See the comparison table in `implementer-prompt.md` for the full section list. The Commit Strategy section with `git commit`/`git push` instructions is required — without it, teammates may skip pushing their work.
|
|
120
|
+
|
|
121
|
+
### Step 4: Monitor (RETRYABLE)
|
|
122
|
+
|
|
123
|
+
The orchestrator enters delegate mode (Shift+Tab). Hooks operate autonomously:
|
|
124
|
+
- **SubagentStart** -- injects live coordination data only (task status changes, newly unblocked tasks). Historical intelligence and team context are already in the spawn prompt.
|
|
125
|
+
- **TeammateIdle** -- runs quality gates, emits `team.task.completed` or `team.task.failed` events. Does NOT mutate `workflow.tasks[]` (single-writer principle). The orchestrator reads these events and updates state.
|
|
126
|
+
|
|
127
|
+
**Tiered monitoring strategy** (minimizes token cost):
|
|
128
|
+
|
|
129
|
+
| Tier | Tool | When | Cost |
|
|
130
|
+
|------|------|------|------|
|
|
131
|
+
| Routine | `exarchos_view workflow_status` | Every 30-60s | ~85 tokens |
|
|
132
|
+
| On task completion | `exarchos_workflow get` (fields: tasks) | When TeammateIdle fires | ~200 tokens |
|
|
133
|
+
| On-demand | `exarchos_view delegation_timeline` | Task stall or all complete | ~120 tokens |
|
|
134
|
+
|
|
135
|
+
Do NOT triple-read on every cycle. `delegation_timeline` replays the full event stream -- reserve for final summary or anomaly detection.
|
|
136
|
+
|
|
137
|
+
When the orchestrator detects `team.task.completed` events, it updates `workflow.tasks[]`:
|
|
138
|
+
```yaml
|
|
139
|
+
exarchos_workflow set:
|
|
140
|
+
featureId: {featureId}
|
|
141
|
+
updates:
|
|
142
|
+
tasks: [{...task, status: "complete", completedAt: timestamp}]
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Step 5: Disband (RETRYABLE)
|
|
146
|
+
|
|
147
|
+
When all tasks complete:
|
|
148
|
+
|
|
149
|
+
```yaml
|
|
150
|
+
# Emit event
|
|
151
|
+
exarchos_event append:
|
|
152
|
+
stream: {featureId}
|
|
153
|
+
event:
|
|
154
|
+
type: "team.disbanded"
|
|
155
|
+
totalDurationMs: {calculated}
|
|
156
|
+
tasksCompleted: {count}
|
|
157
|
+
tasksFailed: {count}
|
|
158
|
+
|
|
159
|
+
# Shutdown remaining teammates
|
|
160
|
+
SendMessage:
|
|
161
|
+
type: "shutdown_request"
|
|
162
|
+
recipient: {each remaining teammate}
|
|
163
|
+
|
|
164
|
+
# Cleanup native team (after all teammates confirm shutdown)
|
|
165
|
+
TeamDelete
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Step 6: Transition (RETRYABLE)
|
|
169
|
+
|
|
170
|
+
```yaml
|
|
171
|
+
exarchos_workflow set:
|
|
172
|
+
featureId: {featureId}
|
|
173
|
+
phase: "review"
|
|
174
|
+
# auto-emits workflow.transition event
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Saga Compensation
|
|
178
|
+
|
|
179
|
+
When the saga fails at any step, compensate in reverse order:
|
|
180
|
+
|
|
181
|
+
| Failed At | Compensating Actions | Idempotency Check |
|
|
182
|
+
|-----------|---------------------|-------------------|
|
|
183
|
+
| Step 1 (team create) | `TeamDelete` | Check `~/.claude/teams/{featureId}/` exists before delete |
|
|
184
|
+
| Step 2 (task create) | Delete created tasks via `TaskUpdate(status: "deleted")` x created, then `TeamDelete` | Check `TaskList` for existing tasks before delete |
|
|
185
|
+
| Step 3 (spawn -- PIVOT) | `SendMessage(type: "shutdown_request")` x spawned teammates, delete tasks, `TeamDelete` | Check team config `members` array for active teammates |
|
|
186
|
+
| Step 4+ (monitoring) | `exarchos_workflow cancel` (handles full compensation) | Already idempotent via workflow state check |
|
|
187
|
+
|
|
188
|
+
Compensation steps themselves must be idempotent: deleting an already-deleted team is a no-op; shutting down an already-terminated teammate is a no-op.
|
|
189
|
+
|
|
190
|
+
If a compensating action itself fails after 3 retries, mark the workflow with `_compensationFailed: true` and emit `team.compensation.failed`. The SessionStart hook detects this on next session for manual resolution.
|
|
191
|
+
|
|
192
|
+
## Claude Code Agent Teams Constraints
|
|
193
|
+
|
|
194
|
+
| Constraint | Impact |
|
|
195
|
+
|------------|--------|
|
|
196
|
+
| **No session resumption** for teammates | Teammates are ephemeral. On restart, SessionStart detects orphaned teams but cannot restore them. Spawn new teammates if delegation is incomplete. |
|
|
197
|
+
| **One team per session** | Naturally enforces single-orchestrator invariant. No additional locking needed. |
|
|
198
|
+
| **No nested teams** | Teammates cannot spawn sub-teams. Team composition is flat. |
|
|
199
|
+
| **Permissions inherit from lead** | Do NOT set `mode` at spawn -- not respected. All teammates inherit the lead's permission mode. |
|
|
200
|
+
| **Teammates load MCP automatically** | Exarchos MCP tools are available without explicit instruction. The spawn prompt guides WHICH tools to use, not HOW to access them. |
|
|
201
|
+
|
|
202
|
+
**CRITICAL:** Ensure your session is using the opus model for coding tasks. All teammates inherit the session model -- use Task tool dispatch if you need per-task model selection.
|
|
203
|
+
|
|
204
|
+
## Event Payload Conventions
|
|
205
|
+
|
|
206
|
+
Keep event payloads lean. Move diagnostics to state files.
|
|
207
|
+
|
|
208
|
+
- `team.task.completed`: prefer `fileCount: number` over `filesChanged: string[]`
|
|
209
|
+
- `team.task.failed`: prefer `gateNames: string[]` (max 10) over `gateResults: Record<string, unknown>`
|
|
210
|
+
- `failureReason`: max 200 characters
|
|
211
|
+
- Move full diagnostics to state file `reviews[taskId]`, not event payloads
|
|
212
|
+
|
|
213
|
+
## State Bridge (TeammateIdle)
|
|
214
|
+
|
|
215
|
+
When using Agent Teams mode, the `TeammateIdle` hook fires when a teammate completes its work and becomes idle. It bridges real-time Agent Teams coordination with the Exarchos event stream:
|
|
216
|
+
|
|
217
|
+
- **On quality pass:** Emits `team.task.completed` event to the event stream. Does NOT mutate `workflow.tasks[]` -- the orchestrator is the sole writer (single-writer principle).
|
|
218
|
+
- **On quality fail:** Returns exit code 2 (sends feedback to teammate, keeps it working). Emits `team.task.failed` event with gate results.
|
|
219
|
+
- **Circuit breaker:** On repeated quality failures, emits `team.task.failed` with circuit open signal.
|
|
220
|
+
- **Graceful degradation:** If no matching workflow/worktree found, gate still passes.
|
|
221
|
+
|
|
222
|
+
**Single-writer principle:** The orchestrator reads `team.task.completed` events during its monitoring loop and updates `workflow.tasks[]` via `exarchos_workflow set`. This eliminates CAS race conditions between hook and orchestrator writes. The 30-60s latency between event emission and projection update is acceptable -- native task dependency unblocking is automatic (handled by Claude Code) and unaffected by this delay.
|
|
223
|
+
|
|
224
|
+
This implements a **layered coordination** model:
|
|
225
|
+
- Agent Teams handles real-time dispatch and self-coordination
|
|
226
|
+
- Exarchos event stream records all lifecycle events (source of truth)
|
|
227
|
+
- Orchestrator materializes events into `workflow.tasks[]` (working projection)
|
|
228
|
+
|
|
229
|
+
## Agent Teams Event Emission
|
|
230
|
+
|
|
231
|
+
When using Agent Teams mode, the delegation saga emits events at each lifecycle boundary:
|
|
232
|
+
|
|
233
|
+
**Orchestrator-emitted events (saga steps):**
|
|
234
|
+
- `team.spawned` -- Step 1: team creation (`event.data`: teamSize, teammateNames, taskCount, dispatchMode)
|
|
235
|
+
- `team.task.planned` -- Step 2: task planning via `batch_append` (includes taskId, title, modules, blockedBy)
|
|
236
|
+
- `team.teammate.dispatched` -- Step 3: teammate spawn (includes teammateName, worktreePath, assignedTaskIds, model)
|
|
237
|
+
- `team.disbanded` -- Step 5: team disbandment (includes totalDurationMs, tasksCompleted, tasksFailed)
|
|
238
|
+
|
|
239
|
+
**Hook-emitted events (automatic via TeammateIdle):**
|
|
240
|
+
- `team.task.completed` -- After quality gates pass (includes taskId, teammateName, durationMs, filesChanged, testsPassed). Hook emits only; does NOT mutate workflow state.
|
|
241
|
+
- `team.task.failed` -- After quality gates fail (includes taskId, teammateName, failureReason, gateResults). Hook emits only.
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
**Superseded events:**
|
|
245
|
+
- `team.task.assigned` -- Superseded by the combination of `team.task.planned` (Step 2) + `team.teammate.dispatched` (Step 3). Existing event streams may still contain `team.task.assigned` events; CQRS views handle both old and new types during the transition period.
|
|
246
|
+
|
|
247
|
+
**Tool usage by delegation mode:**
|
|
248
|
+
|
|
249
|
+
| Delegation Mode | Task Completion Signal | State Update |
|
|
250
|
+
|----------------|----------------------|--------------|
|
|
251
|
+
| **Subagent mode** | `exarchos_orchestrate task_complete` (auto-emits `task.completed`) | Orchestrator calls `exarchos_workflow set` |
|
|
252
|
+
| **Agent team mode** | TeammateIdle hook emits `team.task.completed` | Orchestrator reads event, calls `exarchos_workflow set` |
|
|
253
|
+
|
|
254
|
+
> **Important:** Do NOT use `exarchos_orchestrate task_complete` or `task_fail` during agent team delegation. The TeammateIdle hook handles completion signaling. Using both would produce duplicate events in the stream.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fix-mode
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Fix Mode (--fixes)
|
|
6
|
+
|
|
7
|
+
When invoked with `--fixes`, delegation handles review failures instead of initial implementation.
|
|
8
|
+
|
|
9
|
+
## Trigger
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
/exarchos:delegate --fixes docs/plans/YYYY-MM-DD-feature.md
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or auto-invoked after review failures.
|
|
16
|
+
|
|
17
|
+
## Fix Mode Process
|
|
18
|
+
|
|
19
|
+
1. **Read failure details** from state using `mcp__plugin_exarchos_exarchos__exarchos_workflow` with `action: "get"`:
|
|
20
|
+
- Query `reviews` for review failures
|
|
21
|
+
|
|
22
|
+
2. **Extract fix tasks** from failure reports:
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
exarchos_orchestrate({
|
|
26
|
+
action: "extract_fix_tasks",
|
|
27
|
+
stateFile: "<path>",
|
|
28
|
+
reviewReport: "<path>",
|
|
29
|
+
repoRoot: "<path>"
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**On `passed: true`:** Tasks extracted successfully (JSON array in output).
|
|
34
|
+
**On `passed: false`:** Parse error — review report or state file malformed.
|
|
35
|
+
|
|
36
|
+
3. **Create fix tasks** for each issue:
|
|
37
|
+
- Use `fixer-prompt.md` template
|
|
38
|
+
- Include full issue context
|
|
39
|
+
- Specify target worktree
|
|
40
|
+
|
|
41
|
+
4. **Dispatch fixers** — prefer resume when `agentId` is available, otherwise fresh dispatch:
|
|
42
|
+
|
|
43
|
+
**Resume (Claude Code):**
|
|
44
|
+
```typescript
|
|
45
|
+
Task({
|
|
46
|
+
resume: "[agentId from workflow state]",
|
|
47
|
+
prompt: "Your implementation failed. [failure context]. Apply adversarial verification."
|
|
48
|
+
})
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Fresh dispatch (cross-platform):**
|
|
52
|
+
```typescript
|
|
53
|
+
Task({
|
|
54
|
+
subagent_type: "exarchos-fixer",
|
|
55
|
+
run_in_background: true,
|
|
56
|
+
description: "Fix: [issue summary]",
|
|
57
|
+
prompt: "[fixer-prompt template with issue details]"
|
|
58
|
+
})
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
5. **Re-review after fixes**:
|
|
62
|
+
After all fix tasks complete, auto-invoke review phase:
|
|
63
|
+
```typescript
|
|
64
|
+
Skill({ skill: "exarchos:review", args: "<state-file>" })
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Resume-First Strategy
|
|
68
|
+
|
|
69
|
+
When fixing failed tasks, prefer resuming the original agent over dispatching a fresh fixer. Resume preserves the implementer's full context (file reads, reasoning, partial progress), making fixes faster and more accurate.
|
|
70
|
+
|
|
71
|
+
### agentId Tracking
|
|
72
|
+
|
|
73
|
+
The `agentId` is captured from the `Task()` completion output and stored in workflow task state. The `SubagentStop` hook (`hooks/hooks.json`) automatically captures `agentId` when `exarchos-implementer` or `exarchos-fixer` agents complete.
|
|
74
|
+
|
|
75
|
+
Check workflow state for `agentId`:
|
|
76
|
+
```text
|
|
77
|
+
exarchos_workflow get with fields: ["tasks"]
|
|
78
|
+
→ tasks[id=<taskId>].agentId
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Decision Flow
|
|
82
|
+
|
|
83
|
+
1. **agentId available + Claude Code?** → Resume with failure context
|
|
84
|
+
2. **agentId unavailable or non-Claude-Code client?** → Fresh dispatch with `exarchos-fixer` agent type
|
|
85
|
+
3. **Resume fails?** → Fall back to fresh dispatch
|
|
86
|
+
|
|
87
|
+
### Gate Chain After Fix
|
|
88
|
+
|
|
89
|
+
After any fix (resume or fresh dispatch), run the `task-fix` runbook:
|
|
90
|
+
```typescript
|
|
91
|
+
exarchos_orchestrate({ action: "runbook", id: "task-fix" })
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
This executes the gate chain: re-run tests → TDD compliance check → static analysis → mark task complete if all pass. If runbook unavailable, use `describe` to retrieve gate schemas: `exarchos_orchestrate({ action: "describe", actions: ["check_tdd_compliance", "check_static_analysis", "task_complete"] })`
|
|
95
|
+
|
|
96
|
+
## Fix Task Structure
|
|
97
|
+
|
|
98
|
+
Each fix task extracted should include:
|
|
99
|
+
|
|
100
|
+
| Field | Description |
|
|
101
|
+
|-------|-------------|
|
|
102
|
+
| issue | Problem description from review |
|
|
103
|
+
| file | File path needing fix |
|
|
104
|
+
| line | Line number (if known) |
|
|
105
|
+
| worktree | Which worktree to fix in |
|
|
106
|
+
| branch | Which branch owns this fix |
|
|
107
|
+
| priority | HIGH / MEDIUM / LOW |
|
|
108
|
+
|
|
109
|
+
## Transition After Fixes
|
|
110
|
+
|
|
111
|
+
Fix mode goes back to the integration phase after fixes are applied,
|
|
112
|
+
then re-enters review to re-integrate and re-verify:
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
/exarchos:delegate --fixes -> [fixes applied] -> re-integrate -> /exarchos:review
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
This ensures fixed code is re-verified.
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Fixer Prompt Template
|
|
2
|
+
|
|
3
|
+
Use this template when dispatching fix tasks via the Task tool after review failures.
|
|
4
|
+
|
|
5
|
+
## Adversarial Verification Posture
|
|
6
|
+
|
|
7
|
+
You are a FIX agent. Do NOT trust the implementer's self-assessment of what went wrong.
|
|
8
|
+
|
|
9
|
+
- **Independently verify the failure** before applying corrections — re-read the failing test output yourself, do not rely on error summaries provided by the original implementer
|
|
10
|
+
- **Re-read the failing test output yourself** — compare the actual vs expected values; the implementer may have misdiagnosed the root cause
|
|
11
|
+
- **Verify the fix actually resolves the root cause,** not just the symptom — a test that passes for the wrong reason is worse than a failing test
|
|
12
|
+
- **Run ALL tests after fixing,** not just the failing one — regressions from targeted fixes are common and must be caught immediately
|
|
13
|
+
- **Check for silent failures** — verify that error paths are tested, not just happy paths; the original failure may mask additional issues
|
|
14
|
+
|
|
15
|
+
This posture exists because subagent self-assessment is an unreliable signal. Implementers are biased toward reporting success and may rationalize partial fixes as complete. Your job is to verify independently.
|
|
16
|
+
|
|
17
|
+
## Template
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
# Fix Task: [Issue Summary]
|
|
21
|
+
|
|
22
|
+
## CRITICAL: Worktree Verification (MANDATORY)
|
|
23
|
+
|
|
24
|
+
Before making ANY changes:
|
|
25
|
+
1. Run: `pwd`
|
|
26
|
+
2. Verify path contains `.worktrees/`
|
|
27
|
+
3. If NOT in worktree: STOP and report error
|
|
28
|
+
|
|
29
|
+
## Working Directory
|
|
30
|
+
[Absolute path to worktree]
|
|
31
|
+
|
|
32
|
+
## Issue to Fix
|
|
33
|
+
|
|
34
|
+
**Source:** [Spec Review | Quality Review | PR Feedback]
|
|
35
|
+
**File:** `[path/to/file.ts]`
|
|
36
|
+
**Line:** [line number if applicable]
|
|
37
|
+
**Priority:** [HIGH | MEDIUM | LOW]
|
|
38
|
+
|
|
39
|
+
### Problem
|
|
40
|
+
[Clear description of the issue from review]
|
|
41
|
+
|
|
42
|
+
### Expected Behavior
|
|
43
|
+
[What the code should do instead]
|
|
44
|
+
|
|
45
|
+
### Suggested Fix
|
|
46
|
+
[Specific guidance on how to fix, from review report]
|
|
47
|
+
|
|
48
|
+
## Verification
|
|
49
|
+
|
|
50
|
+
After implementing the fix:
|
|
51
|
+
|
|
52
|
+
1. **Run tests:**
|
|
53
|
+
```bash
|
|
54
|
+
npm run test:run
|
|
55
|
+
```
|
|
56
|
+
Ensure all tests pass.
|
|
57
|
+
|
|
58
|
+
2. **If this fix requires a new test:**
|
|
59
|
+
- Write test FIRST (TDD)
|
|
60
|
+
- Verify it fails for the expected reason
|
|
61
|
+
- Implement fix
|
|
62
|
+
- Verify test passes
|
|
63
|
+
|
|
64
|
+
3. **Run quality checks:**
|
|
65
|
+
```bash
|
|
66
|
+
npm run typecheck
|
|
67
|
+
npm run lint
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## TDD for New Tests
|
|
71
|
+
|
|
72
|
+
If adding a test to prevent regression:
|
|
73
|
+
|
|
74
|
+
```typescript
|
|
75
|
+
describe('[ComponentName]', () => {
|
|
76
|
+
it('should [expected behavior] when [condition]', () => {
|
|
77
|
+
// Arrange
|
|
78
|
+
[Setup that reproduces the bug]
|
|
79
|
+
|
|
80
|
+
// Act
|
|
81
|
+
[Execute the code path]
|
|
82
|
+
|
|
83
|
+
// Assert
|
|
84
|
+
expect(result).[matcher](expected);
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Success Criteria
|
|
90
|
+
|
|
91
|
+
- [ ] Worktree verified before changes
|
|
92
|
+
- [ ] Issue addressed per review feedback
|
|
93
|
+
- [ ] New test written if applicable
|
|
94
|
+
- [ ] All existing tests pass
|
|
95
|
+
- [ ] Type check passes
|
|
96
|
+
- [ ] Lint passes
|
|
97
|
+
- [ ] No regressions introduced
|
|
98
|
+
|
|
99
|
+
## Completion
|
|
100
|
+
|
|
101
|
+
When done, report:
|
|
102
|
+
1. Files modified
|
|
103
|
+
2. Test results
|
|
104
|
+
3. Summary of fix applied
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Usage Example
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
Task({
|
|
111
|
+
subagent_type: "general-purpose",
|
|
112
|
+
model: "opus",
|
|
113
|
+
description: "Fix: SQL injection vulnerability",
|
|
114
|
+
prompt: `
|
|
115
|
+
# Fix Task: SQL Injection in User Query
|
|
116
|
+
|
|
117
|
+
## CRITICAL: Worktree Verification (MANDATORY)
|
|
118
|
+
|
|
119
|
+
Before making ANY changes:
|
|
120
|
+
1. Run: \`pwd\`
|
|
121
|
+
2. Verify path contains \`.worktrees/\`
|
|
122
|
+
3. If NOT in worktree: STOP and report error
|
|
123
|
+
|
|
124
|
+
## Working Directory
|
|
125
|
+
/home/user/project/.worktrees/task-003
|
|
126
|
+
|
|
127
|
+
## Issue to Fix
|
|
128
|
+
|
|
129
|
+
**Source:** Quality Review
|
|
130
|
+
**File:** \`src/api/users.ts\`
|
|
131
|
+
**Line:** 42
|
|
132
|
+
**Priority:** HIGH
|
|
133
|
+
|
|
134
|
+
### Problem
|
|
135
|
+
Raw string interpolation in SQL query allows injection attacks.
|
|
136
|
+
|
|
137
|
+
### Expected Behavior
|
|
138
|
+
Use parameterized queries to prevent SQL injection.
|
|
139
|
+
|
|
140
|
+
### Suggested Fix
|
|
141
|
+
Replace:
|
|
142
|
+
\`\`\`typescript
|
|
143
|
+
db.query(\`SELECT * FROM users WHERE id = \${userId}\`)
|
|
144
|
+
\`\`\`
|
|
145
|
+
With:
|
|
146
|
+
\`\`\`typescript
|
|
147
|
+
db.query('SELECT * FROM users WHERE id = $1', [userId])
|
|
148
|
+
\`\`\`
|
|
149
|
+
|
|
150
|
+
## Verification
|
|
151
|
+
|
|
152
|
+
After implementing the fix:
|
|
153
|
+
|
|
154
|
+
1. Run tests: \`npm run test:run\`
|
|
155
|
+
2. Add test for SQL injection prevention
|
|
156
|
+
3. Run quality checks
|
|
157
|
+
|
|
158
|
+
## Success Criteria
|
|
159
|
+
|
|
160
|
+
- [ ] Worktree verified
|
|
161
|
+
- [ ] Parameterized query implemented
|
|
162
|
+
- [ ] Injection test added
|
|
163
|
+
- [ ] All tests pass
|
|
164
|
+
`
|
|
165
|
+
})
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Key Principles
|
|
169
|
+
|
|
170
|
+
1. **Always verify worktree** - First action is pwd check
|
|
171
|
+
2. **Clear issue description** - Include file, line, problem
|
|
172
|
+
3. **Specific fix guidance** - Show before/after when possible
|
|
173
|
+
4. **Verification steps** - Always run tests after fix
|
|
174
|
+
5. **TDD for regressions** - Add test to prevent recurrence
|