@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,171 @@
|
|
|
1
|
+
# Code Quality Checklist
|
|
2
|
+
|
|
3
|
+
Detailed review criteria for code quality, SOLID principles, DRY enforcement, and structural standards. Used during Step 2 of the quality review process.
|
|
4
|
+
|
|
5
|
+
## Adversarial Review Posture
|
|
6
|
+
|
|
7
|
+
You are an ADVERSARIAL reviewer. Your job is to find quality issues, not rubber-stamp passing code.
|
|
8
|
+
|
|
9
|
+
- Do NOT trust that "tests pass" means the code is well-structured
|
|
10
|
+
- Do NOT accept "it works" as sufficient quality evidence
|
|
11
|
+
- Do NOT assume the implementer followed SOLID principles without verifying
|
|
12
|
+
- Independently check each quality dimension against the actual code
|
|
13
|
+
- Treat every claim of quality as unverified until you see the evidence yourself
|
|
14
|
+
|
|
15
|
+
Consult `references/rationalization-refutation.md` when you feel tempted to accept a rationalization for skipping quality checks.
|
|
16
|
+
|
|
17
|
+
## 1. Code Quality
|
|
18
|
+
|
|
19
|
+
| Aspect | Check For |
|
|
20
|
+
|--------|-----------|
|
|
21
|
+
| Readability | Clear variable/function names |
|
|
22
|
+
| Complexity | Functions <30 lines, single responsibility |
|
|
23
|
+
| Duplication | DRY - no copy-paste code |
|
|
24
|
+
| Comments | Only where logic isn't self-evident |
|
|
25
|
+
| Formatting | Consistent with project style |
|
|
26
|
+
|
|
27
|
+
## 1.1 DRY Enforcement
|
|
28
|
+
|
|
29
|
+
| Pattern | Threshold | Priority |
|
|
30
|
+
|---------|-----------|----------|
|
|
31
|
+
| Identical code blocks | 3+ occurrences OR 5+ lines | HIGH (3+), MEDIUM (2) |
|
|
32
|
+
| Similar code (literals differ) | 3+ occurrences | MEDIUM |
|
|
33
|
+
| Repeated validation logic | 2+ locations | HIGH |
|
|
34
|
+
| Repeated business rules | 2+ locations | HIGH |
|
|
35
|
+
| Copy-pasted tests | 3+ similar tests | LOW |
|
|
36
|
+
| Magic literals | Same value 3+ times | MEDIUM |
|
|
37
|
+
|
|
38
|
+
**Detection approach (prefer MCP tools):**
|
|
39
|
+
- Use `search_for_pattern` to find duplicate code blocks
|
|
40
|
+
- Use `find_referencing_symbols` to trace dependency usage
|
|
41
|
+
- Use `get_symbols_overview` to understand module structure
|
|
42
|
+
|
|
43
|
+
**Detection checklist:**
|
|
44
|
+
- [ ] Search for identical multi-line blocks (5+ lines duplicated)
|
|
45
|
+
- [ ] Flag validation code outside designated validation layer
|
|
46
|
+
- [ ] Trace business rule conditionals - must have single source
|
|
47
|
+
- [ ] Check for repeated string/number literals without constants
|
|
48
|
+
|
|
49
|
+
## 2. SOLID Principles
|
|
50
|
+
|
|
51
|
+
| Principle | Verify | Specific Checks |
|
|
52
|
+
|-----------|--------|-----------------|
|
|
53
|
+
| **S**RP | One reason to change | Max 1 public type/file; class name matches responsibility |
|
|
54
|
+
| **O**CP | Extensible without modification | No switch/if-else on types; uses strategy/polymorphism |
|
|
55
|
+
| **L**SP | Subtypes substitutable | No `NotImplementedException`; no precondition strengthening |
|
|
56
|
+
| **I**SP | No forced dependencies | Interface <= 5 methods; no empty implementations |
|
|
57
|
+
| **D**IP | Depend on abstractions | No `new` for services; constructor injection only |
|
|
58
|
+
|
|
59
|
+
### ISP Violation Patterns
|
|
60
|
+
|
|
61
|
+
| Pattern | Detection | Priority |
|
|
62
|
+
|---------|-----------|----------|
|
|
63
|
+
| Fat interface (> 5 methods) | Count methods on interface | MEDIUM |
|
|
64
|
+
| Mixed read/write interface | Check for getters + mutators together | MEDIUM |
|
|
65
|
+
| Empty/throw implementations | Scan for `NotImplementedException`, empty bodies | HIGH |
|
|
66
|
+
| Vague interface names | `IService`, `IManager`, `IHandler` without qualifier | LOW |
|
|
67
|
+
| Partial interface usage | Client uses < 50% of interface methods | MEDIUM |
|
|
68
|
+
|
|
69
|
+
**ISP Checklist:**
|
|
70
|
+
- [ ] No interface has more than 5 methods
|
|
71
|
+
- [ ] Interfaces are role-specific (IReadable, IWritable, not IDataAccess)
|
|
72
|
+
- [ ] No classes implement interfaces with NotImplementedException
|
|
73
|
+
- [ ] Interface names describe a single capability
|
|
74
|
+
|
|
75
|
+
## 2.1 Control Flow Standards
|
|
76
|
+
|
|
77
|
+
| Standard | Check For |
|
|
78
|
+
|----------|-----------|
|
|
79
|
+
| Guard clauses | Validate at method entry, not nested |
|
|
80
|
+
| Early returns | Exit as soon as result is known |
|
|
81
|
+
| No arrow code | Deeply nested if/else is a smell |
|
|
82
|
+
| Conditional abstraction | Large switch/if-else extracted to helper |
|
|
83
|
+
|
|
84
|
+
### Guard Clause Pattern
|
|
85
|
+
|
|
86
|
+
**Preferred:**
|
|
87
|
+
```typescript
|
|
88
|
+
if (input == null) return;
|
|
89
|
+
// Main logic flat
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Avoid:**
|
|
93
|
+
```typescript
|
|
94
|
+
if (input != null) {
|
|
95
|
+
// Entire body nested
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## 2.2 Structural Standards
|
|
100
|
+
|
|
101
|
+
| Standard | Check For | Priority |
|
|
102
|
+
|----------|-----------|----------|
|
|
103
|
+
| One responsibility per file | Public types in dedicated files | HIGH |
|
|
104
|
+
| Composition over inheritance | See checklist below | MEDIUM-HIGH |
|
|
105
|
+
| Sealed by default | `sealed` unless designed for extension | LOW |
|
|
106
|
+
|
|
107
|
+
### Composition Over Inheritance Checklist
|
|
108
|
+
|
|
109
|
+
| Smell | Detection | Priority | Fix |
|
|
110
|
+
|-------|-----------|----------|-----|
|
|
111
|
+
| Inheritance depth > 2 | Count hierarchy levels | MEDIUM | Refactor to delegation |
|
|
112
|
+
| Base class, multiple concerns | Base has unrelated methods | MEDIUM | Split into interfaces + composition |
|
|
113
|
+
| `protected` for code sharing | Many protected methods (> 2/class) | MEDIUM | Extract to utility or inject strategy |
|
|
114
|
+
| Override that only extends | `super.method()` + additions | MEDIUM | Use decorator pattern |
|
|
115
|
+
| Inherit for one method | Extends to reuse single method | HIGH | Compose with delegation |
|
|
116
|
+
|
|
117
|
+
**Composition Checklist:**
|
|
118
|
+
- [ ] Inheritance represents true "is-a" relationship, not code reuse
|
|
119
|
+
- [ ] Class hierarchy depth <= 2
|
|
120
|
+
- [ ] `protected` methods rare (< 2 per class)
|
|
121
|
+
- [ ] No override methods that just call super + add logic
|
|
122
|
+
|
|
123
|
+
**Language-specific rules:** See `~/.claude/rules/coding-standards-{language}.md`
|
|
124
|
+
|
|
125
|
+
## 3. Error Handling
|
|
126
|
+
|
|
127
|
+
| Check | Verify |
|
|
128
|
+
|-------|--------|
|
|
129
|
+
| Errors caught | Try/catch where needed |
|
|
130
|
+
| Errors meaningful | Clear error messages |
|
|
131
|
+
| Errors propagated | Proper error bubbling |
|
|
132
|
+
| No silent failures | All errors handled or logged |
|
|
133
|
+
| Input validation | At system boundaries |
|
|
134
|
+
|
|
135
|
+
## 4. Test Quality
|
|
136
|
+
|
|
137
|
+
| Aspect | Verify |
|
|
138
|
+
|--------|--------|
|
|
139
|
+
| Arrange-Act-Assert | Clear test structure |
|
|
140
|
+
| Test isolation | No shared state issues |
|
|
141
|
+
| Meaningful assertions | Not just "expect(true)" |
|
|
142
|
+
| Edge cases | Boundary conditions tested |
|
|
143
|
+
| Error paths | Failure scenarios covered |
|
|
144
|
+
|
|
145
|
+
## 5. Performance
|
|
146
|
+
|
|
147
|
+
| Check | Verify |
|
|
148
|
+
|-------|--------|
|
|
149
|
+
| No N+1 queries | Batch operations used |
|
|
150
|
+
| Efficient algorithms | No obvious O(n^2) when O(n) works |
|
|
151
|
+
| Memory management | No leaks, proper cleanup |
|
|
152
|
+
| Async patterns | Proper await usage |
|
|
153
|
+
|
|
154
|
+
## 6. Frontend Aesthetics (if applicable)
|
|
155
|
+
|
|
156
|
+
For frontend code (React, Vue, HTML/CSS, etc.), verify distinctive design:
|
|
157
|
+
|
|
158
|
+
| Check | Verify |
|
|
159
|
+
|-------|--------|
|
|
160
|
+
| Distinctive typography | Not using Inter, Roboto, Arial, or system defaults |
|
|
161
|
+
| Intentional color palette | CSS variables defined, not ad-hoc colors |
|
|
162
|
+
| Purposeful motion | Orchestrated animations, not scattered micro-interactions |
|
|
163
|
+
| Atmospheric backgrounds | Layered/textured, not flat solid colors |
|
|
164
|
+
| Overall distinctiveness | Doesn't exhibit "AI slop" patterns |
|
|
165
|
+
|
|
166
|
+
**Anti-patterns to flag:**
|
|
167
|
+
- Purple gradients on white backgrounds
|
|
168
|
+
- Perfectly centered symmetric layouts
|
|
169
|
+
- Generic font choices
|
|
170
|
+
- Flat #f5f5f5 or pure white/black backgrounds
|
|
171
|
+
- Animation without purpose
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Convergence Check & Verdict Determination
|
|
2
|
+
|
|
3
|
+
## Check Convergence
|
|
4
|
+
|
|
5
|
+
Before computing the verdict, query the convergence view for the aggregate D1-D5 status from all gate events emitted during the pipeline:
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
exarchos_orchestrate({
|
|
9
|
+
action: "check_convergence",
|
|
10
|
+
featureId: "<id>"
|
|
11
|
+
})
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The handler returns:
|
|
15
|
+
- `passed: true` — all five dimensions (D1-D5) have at least one gate result and all gates passed
|
|
16
|
+
- `passed: false` — one or more dimensions have failing gates or no gate coverage yet
|
|
17
|
+
- `uncheckedDimensions` — dimensions with no gate events (cold pipeline)
|
|
18
|
+
- `dimensions` — per-dimension summary with gate counts and convergence status
|
|
19
|
+
|
|
20
|
+
Use the convergence result as structured input to the verdict:
|
|
21
|
+
- If `uncheckedDimensions` is non-empty, note which dimensions lack gate coverage in the review report
|
|
22
|
+
- If a dimension has `converged: false`, include it as a finding in the verdict input
|
|
23
|
+
- If `passed: true`, it provides strong evidence for APPROVED (pending qualitative assessment)
|
|
24
|
+
|
|
25
|
+
## Determine Verdict
|
|
26
|
+
|
|
27
|
+
Classify review findings into a routing verdict via orchestrate:
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
exarchos_orchestrate({
|
|
31
|
+
action: "check_review_verdict",
|
|
32
|
+
featureId: "<id>",
|
|
33
|
+
high: <N>,
|
|
34
|
+
medium: <N>,
|
|
35
|
+
low: <N>,
|
|
36
|
+
dimensionResults: {
|
|
37
|
+
"D1": { passed: true, findingCount: 0 },
|
|
38
|
+
"D2": { passed: true, findingCount: 0 },
|
|
39
|
+
// ... include results from each gate run above
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The handler automatically emits per-dimension and summary `gate.executed` events. No manual event emission needed.
|
|
45
|
+
|
|
46
|
+
**On `verdict: "APPROVED"`:** Proceed to synthesis.
|
|
47
|
+
**On `verdict: "NEEDS_FIXES"`:** Route to `/exarchos:delegate --fixes`.
|
|
48
|
+
**On `verdict: "BLOCKED"`:** Return to design phase.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Gate Execution Details
|
|
2
|
+
|
|
3
|
+
## Step 1: Static Analysis
|
|
4
|
+
|
|
5
|
+
Run the static analysis gate via orchestrate:
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
exarchos_orchestrate({
|
|
9
|
+
action: "check_static_analysis",
|
|
10
|
+
featureId: "<id>",
|
|
11
|
+
repoRoot: "<repo-root>"
|
|
12
|
+
})
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The handler runs lint, typecheck, and quality-check (if available), distinguishing errors from warnings. It automatically emits a `gate.executed` event with dimension D2.
|
|
16
|
+
|
|
17
|
+
**On `passed: true`:** All analysis passes — proceed to Step 2.
|
|
18
|
+
**On `passed: false`:** Errors found — fix before continuing review.
|
|
19
|
+
|
|
20
|
+
## Step 2: Code Walkthrough
|
|
21
|
+
|
|
22
|
+
Assess each modified file against the quality checklists:
|
|
23
|
+
- Consult `code-quality-checklist.md` for code quality, SOLID, DRY, and structural criteria
|
|
24
|
+
- Consult `security-checklist.md` for security review criteria
|
|
25
|
+
- Consult `typescript-standards.md` for TypeScript-specific conventions (file organization, naming, patterns)
|
|
26
|
+
|
|
27
|
+
## Step 2.5: Security Scan (Automated)
|
|
28
|
+
|
|
29
|
+
Run automated security pattern detection via orchestrate:
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
exarchos_orchestrate({
|
|
33
|
+
action: "check_security_scan",
|
|
34
|
+
featureId: "<id>",
|
|
35
|
+
repoRoot: "<repo-root>",
|
|
36
|
+
baseBranch: "main"
|
|
37
|
+
})
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The handler automatically emits a `gate.executed` event with dimension D1.
|
|
41
|
+
|
|
42
|
+
**On `passed: true`:** No security patterns detected.
|
|
43
|
+
**On `passed: false`:** Potential security issues found — include in review report.
|
|
44
|
+
|
|
45
|
+
## Step 2.6: Extended Quality Gates (Optional)
|
|
46
|
+
|
|
47
|
+
When available, run additional quality gates for D3-D5 dimensions:
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
// D3: Context Economy — code complexity impacting LLM context
|
|
51
|
+
exarchos_orchestrate({ action: "check_context_economy", featureId: "<id>", repoRoot: "<repo-root>", baseBranch: "main" })
|
|
52
|
+
|
|
53
|
+
// D4: Operational Resilience — empty catches (excluding intentional fire-and-forget telemetry), swallowed errors, console.log
|
|
54
|
+
exarchos_orchestrate({ action: "check_operational_resilience", featureId: "<id>", repoRoot: "<repo-root>", baseBranch: "main" })
|
|
55
|
+
|
|
56
|
+
// D5: Workflow Determinism — .only/.skip, non-deterministic time/random, debug artifacts
|
|
57
|
+
exarchos_orchestrate({ action: "check_workflow_determinism", featureId: "<id>", repoRoot: "<repo-root>", baseBranch: "main" })
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Each handler automatically emits `gate.executed` events with the appropriate dimension. Findings from these checks are advisory and feed into the convergence view but do not independently block the review.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Rationalization Refutation — Quality Review
|
|
2
|
+
|
|
3
|
+
Common rationalizations that undermine quality review rigor, with counter-arguments and correct actions.
|
|
4
|
+
|
|
5
|
+
| Rationalization | Counter-argument | What to do instead |
|
|
6
|
+
|-----------------|------------------|--------------------|
|
|
7
|
+
| "The code works so quality doesn't matter" | Working code that violates SOLID, DRY, or readability standards becomes unmaintainable code. "Works" is the minimum bar, not the quality bar. Technical debt from low-quality code costs more to fix later than to prevent now. | Evaluate every quality dimension independently: readability, SOLID compliance, DRY, error handling, test quality. Working code that fails quality review goes back for fixes. |
|
|
8
|
+
| "This is temporary code" | There is no such thing as temporary code in production. Temporary code survives because removing it requires understanding it, and low-quality temporary code resists understanding. | Apply the same quality standards to all code. If the code is truly temporary, it should have a removal plan with a deadline and a tracking issue. |
|
|
9
|
+
| "Refactoring later is fine" | "Later" never comes. Every deferred refactor adds to a backlog that grows faster than it shrinks. The code you defer today becomes the legacy code someone struggles with tomorrow. | Require the refactor now if it addresses a HIGH or MEDIUM quality finding. Only defer LOW-priority items, and only with an explicit tracking issue. |
|
|
10
|
+
| "The tests cover it" | Test coverage does not equal code quality. Tests can cover 100% of poorly structured, duplicated, insecure code. Coverage measures execution paths, not maintainability, readability, or security. | Review the code on its own merits: structure, naming, SOLID, DRY, error handling. Then review the tests for quality too — tests are code and deserve the same scrutiny. |
|
|
11
|
+
| "It's just a style issue" | Consistent style is a quality issue. Style inconsistencies increase cognitive load, slow onboarding, and introduce subtle bugs when developers misread unfamiliar patterns. | Enforce project style standards. Flag style violations as LOW priority but still require them to be fixed. Style is not optional — it is part of maintainability. |
|
|
12
|
+
| "The implementer is more experienced, they know best" | Experience does not prevent quality lapses. Even expert developers write code with SOLID violations, missing error handling, and unnecessary complexity — especially under time pressure. | Apply the checklist uniformly regardless of author experience. Quality standards are objective criteria, not subjective opinions. Trust the checklist, not the reputation. |
|
|
13
|
+
| "It's too late to change the architecture" | If the architecture has quality issues, approving it locks them in permanently. The cost of fixing architecture now is high; the cost of living with broken architecture forever is higher. | Flag architectural quality issues as HIGH priority. If they truly cannot be fixed in this cycle, document them as accepted technical debt with an explicit remediation plan. |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Quality Review Report Template
|
|
2
|
+
|
|
3
|
+
Use this template to structure the output of Step 3 (Generate Report) in the quality review process.
|
|
4
|
+
|
|
5
|
+
## Template
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
## Quality Review Report
|
|
9
|
+
|
|
10
|
+
### Summary
|
|
11
|
+
- Status: [APPROVED | NEEDS_FIXES | BLOCKED]
|
|
12
|
+
- Reviewed: [timestamp]
|
|
13
|
+
- Reviewer: Claude Code
|
|
14
|
+
|
|
15
|
+
### Findings Summary
|
|
16
|
+
|
|
17
|
+
| Severity | Category | File:Line | Issue |
|
|
18
|
+
|----------|----------|-----------|-------|
|
|
19
|
+
| HIGH | [category] | `path/to/file.ts:42` | [Brief description] |
|
|
20
|
+
| MEDIUM | [category] | `path/to/file.ts:88` | [Brief description] |
|
|
21
|
+
| LOW | [category] | `path/to/file.ts:15` | [Brief description] |
|
|
22
|
+
|
|
23
|
+
### Findings Detail
|
|
24
|
+
|
|
25
|
+
#### HIGH-Priority
|
|
26
|
+
1. [Finding title]
|
|
27
|
+
- File: `path/to/file.ts:42`
|
|
28
|
+
- Category: [security | correctness | performance | maintainability]
|
|
29
|
+
- Current: [What the code does now]
|
|
30
|
+
- Fix: [Required change]
|
|
31
|
+
|
|
32
|
+
#### MEDIUM-Priority
|
|
33
|
+
1. [Finding title]
|
|
34
|
+
- File: `path/to/file.ts:88`
|
|
35
|
+
- Category: [security | correctness | performance | maintainability]
|
|
36
|
+
- Current: [What the code does now]
|
|
37
|
+
- Suggestion: [Recommended change]
|
|
38
|
+
|
|
39
|
+
#### LOW-Priority
|
|
40
|
+
1. [Finding title]
|
|
41
|
+
- File: `path/to/file.ts:15`
|
|
42
|
+
- Category: [style | documentation | optimization]
|
|
43
|
+
- Note: [Observation]
|
|
44
|
+
|
|
45
|
+
### Verdict
|
|
46
|
+
[APPROVED] Ready for synthesis
|
|
47
|
+
[NEEDS_FIXES] Fix HIGH-priority items, then re-review
|
|
48
|
+
[BLOCKED] Critical issues require design discussion
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Verdict Criteria
|
|
52
|
+
|
|
53
|
+
| Verdict | Condition |
|
|
54
|
+
|---------|-----------|
|
|
55
|
+
| **APPROVED** | No HIGH-priority findings; MEDIUM/LOW acceptable |
|
|
56
|
+
| **NEEDS_FIXES** | One or more HIGH-priority findings that must be resolved |
|
|
57
|
+
| **BLOCKED** | Critical architectural or security issues requiring design discussion |
|
|
58
|
+
|
|
59
|
+
## Report Guidelines
|
|
60
|
+
|
|
61
|
+
- List every finding with file path and line number
|
|
62
|
+
- HIGH-priority findings must include a concrete fix description
|
|
63
|
+
- MEDIUM priority findings should include a suggested approach
|
|
64
|
+
- LOW priority findings are observations for future improvement
|
|
65
|
+
- The verdict drives the next workflow transition (synthesize, fix loop, or redesign)
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Security Review Checklist
|
|
2
|
+
|
|
3
|
+
Security review criteria based on OWASP Top 10 patterns. Used during Step 2 of the quality review process.
|
|
4
|
+
|
|
5
|
+
## Security Basics
|
|
6
|
+
|
|
7
|
+
| Check | Verify |
|
|
8
|
+
|-------|--------|
|
|
9
|
+
| Input sanitization | User input validated |
|
|
10
|
+
| No secrets in code | Use environment variables |
|
|
11
|
+
| SQL injection | Parameterized queries |
|
|
12
|
+
| XSS prevention | Output encoding |
|
|
13
|
+
|
|
14
|
+
## OWASP Top 10 (2021) Patterns
|
|
15
|
+
|
|
16
|
+
When reviewing code that handles user input, authentication, or data access, check for these common vulnerability patterns:
|
|
17
|
+
|
|
18
|
+
### Broken Access Control (A01)
|
|
19
|
+
- Authorization checks on every endpoint
|
|
20
|
+
- No direct object references without access validation
|
|
21
|
+
- Default deny for permissions
|
|
22
|
+
|
|
23
|
+
### Cryptographic Failures (A02)
|
|
24
|
+
- No secrets, API keys, or credentials in source code
|
|
25
|
+
- Sensitive data encrypted at rest and in transit
|
|
26
|
+
- PII properly handled per data classification
|
|
27
|
+
|
|
28
|
+
### Injection (A03)
|
|
29
|
+
- SQL queries use parameterized statements, never string concatenation
|
|
30
|
+
- Shell commands use safe APIs, never template strings with user input
|
|
31
|
+
- Output encoding applied to all user-controlled data (XSS)
|
|
32
|
+
- Content Security Policy headers set
|
|
33
|
+
|
|
34
|
+
### Insecure Design (A04)
|
|
35
|
+
- Threat modeling performed for critical flows
|
|
36
|
+
- Business logic validated server-side
|
|
37
|
+
- Rate limiting and resource controls in place
|
|
38
|
+
|
|
39
|
+
### Security Misconfiguration (A05)
|
|
40
|
+
- No debug mode in production config
|
|
41
|
+
- Error messages don't leak stack traces or internal details
|
|
42
|
+
- Security headers configured (CORS, CSP, HSTS)
|
|
43
|
+
|
|
44
|
+
### Vulnerable and Outdated Components (A06)
|
|
45
|
+
- Dependencies checked for known vulnerabilities
|
|
46
|
+
- No end-of-life frameworks or libraries
|
|
47
|
+
- Component versions tracked and updated
|
|
48
|
+
|
|
49
|
+
### Identification and Authentication Failures (A07)
|
|
50
|
+
- Passwords are hashed with bcrypt/argon2, never stored in plaintext
|
|
51
|
+
- Session tokens have sufficient entropy
|
|
52
|
+
- Rate limiting on authentication endpoints
|
|
53
|
+
|
|
54
|
+
### Software and Data Integrity Failures (A08)
|
|
55
|
+
- User input is validated before deserialization
|
|
56
|
+
- Type checking enforced on deserialized objects
|
|
57
|
+
- No eval() or equivalent on untrusted data
|
|
58
|
+
- CI/CD pipeline integrity verified
|
|
59
|
+
|
|
60
|
+
### Security Logging and Monitoring Failures (A09)
|
|
61
|
+
- Security-relevant events are logged
|
|
62
|
+
- Logs do not contain sensitive data
|
|
63
|
+
- Alerting configured for suspicious activity
|
|
64
|
+
|
|
65
|
+
### Server-Side Request Forgery (A10)
|
|
66
|
+
- URL inputs validated against allowlists
|
|
67
|
+
- Internal network access restricted from user-controlled requests
|
|
68
|
+
- DNS rebinding protections in place
|
|
69
|
+
|
|
70
|
+
## Detection Checklist
|
|
71
|
+
|
|
72
|
+
- [ ] No hardcoded secrets or API keys
|
|
73
|
+
- [ ] All user input validated at system boundaries
|
|
74
|
+
- [ ] SQL/NoSQL queries use parameterized statements
|
|
75
|
+
- [ ] Output encoding applied for XSS prevention
|
|
76
|
+
- [ ] Authentication uses secure hashing algorithms
|
|
77
|
+
- [ ] Authorization checks present on all endpoints
|
|
78
|
+
- [ ] Error messages do not expose internal details
|
|
79
|
+
- [ ] Dependencies checked for known vulnerabilities
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# TypeScript Standards
|
|
2
|
+
|
|
3
|
+
## File Organization
|
|
4
|
+
|
|
5
|
+
- **One primary export per file**: Main class/function/component as default or named export
|
|
6
|
+
- **Barrel exports OK**: `index.ts` can re-export from module
|
|
7
|
+
- **Co-locate tests**: `component.test.ts` alongside `component.ts`
|
|
8
|
+
|
|
9
|
+
## Type Design
|
|
10
|
+
|
|
11
|
+
| Rule | Standard |
|
|
12
|
+
|------|----------|
|
|
13
|
+
| Interfaces over type aliases | For object shapes that might be extended |
|
|
14
|
+
| Discriminated unions | For type-safe variant handling |
|
|
15
|
+
| `readonly` by default | For properties that shouldn't change |
|
|
16
|
+
| No `any` | Use `unknown` with type guards or proper generics |
|
|
17
|
+
| Strict mode | `strict: true` in tsconfig required |
|
|
18
|
+
|
|
19
|
+
## Modern TypeScript
|
|
20
|
+
|
|
21
|
+
- **Const assertions**: Use `as const` for literal types
|
|
22
|
+
- **Template literal types**: For string pattern validation
|
|
23
|
+
- **No assertions without guards**: `as` requires prior type check
|
|
24
|
+
- **Satisfies operator**: For type checking without widening
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor
|
|
3
|
+
description: "Code improvement workflow with polish and overhaul tracks. Triggers: 'refactor', 'clean up', 'restructure', 'reorganize', or /refactor. Phases: explore, brief, implement, validate. Existing code only — Do NOT use for bug fixes (/debug) or new features (/ideate)."
|
|
4
|
+
metadata:
|
|
5
|
+
author: exarchos
|
|
6
|
+
version: 1.0.0
|
|
7
|
+
mcp-server: exarchos
|
|
8
|
+
category: workflow
|
|
9
|
+
phase-affinity:
|
|
10
|
+
- explore
|
|
11
|
+
- brief
|
|
12
|
+
- polish-implement
|
|
13
|
+
- polish-validate
|
|
14
|
+
- polish-update-docs
|
|
15
|
+
- overhaul-plan
|
|
16
|
+
- overhaul-plan-review
|
|
17
|
+
- overhaul-delegate
|
|
18
|
+
- overhaul-review
|
|
19
|
+
- overhaul-update-docs
|
|
20
|
+
- synthesize
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Refactor Workflow Skill
|
|
24
|
+
|
|
25
|
+
## Overview
|
|
26
|
+
|
|
27
|
+
Two-track workflow for improving existing code. Polish track for small, contained refactors; overhaul track for architectural changes and migrations. Both tracks emphasize exploration before commitment and mandatory documentation updates.
|
|
28
|
+
|
|
29
|
+
## Triggers
|
|
30
|
+
|
|
31
|
+
Activate this skill when:
|
|
32
|
+
- User runs `/refactor` command
|
|
33
|
+
- User wants to improve existing code structure
|
|
34
|
+
- User mentions "refactor", "restructure", "clean up", "migrate"
|
|
35
|
+
- User asks to "move", "extract", "rename", or "reorganize" code
|
|
36
|
+
|
|
37
|
+
**Disambiguation:** If the user says "fix" or "clean up" — use `/refactor` when the code *works* but needs structural improvement. Use `/debug` when something is *broken* (error, crash, wrong behavior).
|
|
38
|
+
|
|
39
|
+
## Workflow Overview
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
/refactor
|
|
43
|
+
|
|
|
44
|
+
+-----+-----+
|
|
45
|
+
| Explore |
|
|
46
|
+
+-----+-----+
|
|
47
|
+
|
|
|
48
|
+
+--------------+--------------+
|
|
49
|
+
| |
|
|
50
|
+
--polish (default)
|
|
51
|
+
| |
|
|
52
|
+
v v
|
|
53
|
+
+--------------+ +--------------+
|
|
54
|
+
| Polish | | Overhaul |
|
|
55
|
+
| Track | | Track |
|
|
56
|
+
+--------------+ +--------------+
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Command Interface
|
|
60
|
+
|
|
61
|
+
### Start Refactor Workflow
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
# Default: overhaul track
|
|
65
|
+
/refactor "Description of what needs refactoring"
|
|
66
|
+
|
|
67
|
+
# Fast path: polish track
|
|
68
|
+
/refactor --polish "Small contained refactor description"
|
|
69
|
+
|
|
70
|
+
# Explore first, then decide track
|
|
71
|
+
/refactor --explore "Unsure of scope, explore first"
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Mid-Workflow Commands
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
# Switch from polish to overhaul (during explore/brief)
|
|
78
|
+
/refactor --switch-overhaul
|
|
79
|
+
|
|
80
|
+
# Resume after context compaction
|
|
81
|
+
/rehydrate
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Track Comparison
|
|
85
|
+
|
|
86
|
+
| Aspect | Polish | Overhaul |
|
|
87
|
+
|--------|--------|----------|
|
|
88
|
+
| Scope | <=5 files, single concern | No limit |
|
|
89
|
+
| Worktree | No (direct) | Yes (isolated) |
|
|
90
|
+
| Delegation | No | Yes (full workflow) |
|
|
91
|
+
| Documentation | Mandatory update phase | Mandatory update phase |
|
|
92
|
+
| Human Checkpoints | 0 | 1 (merge) |
|
|
93
|
+
|
|
94
|
+
## Characterization Testing (Both Tracks)
|
|
95
|
+
|
|
96
|
+
Before modifying any existing code behavior, capture current behavior as characterization tests. This is a mandatory pre-step for both tracks:
|
|
97
|
+
|
|
98
|
+
1. **Before changes:** Write tests that document what the code **currently does** (not what it should do). Exercise the code through the most appropriate observable seam (API, CLI, integration boundary, or function) with representative inputs and assert on actual outputs/effects.
|
|
99
|
+
2. **During changes:** Any characterization test failure means behavior changed. Evaluate: intentional or accidental?
|
|
100
|
+
3. **After changes:** Document which characterization test failures were expected. Remaining characterization tests become regression tests.
|
|
101
|
+
|
|
102
|
+
This aligns with Michael Feathers' approach in *Working Effectively with Legacy Code* — understand behavior before changing it.
|
|
103
|
+
|
|
104
|
+
## Polish Track
|
|
105
|
+
|
|
106
|
+
Fast path for small, contained refactors (<=5 files, single concern). Orchestrator may write code directly (exception to orchestrator constraints). No worktree, no delegation.
|
|
107
|
+
|
|
108
|
+
HSM phases: `explore` → `brief` → `polish-implement` → `polish-validate` → `polish-update-docs` → `completed`
|
|
109
|
+
|
|
110
|
+
For detailed phase instructions, state management, and auto-chain behavior, see `@skills/refactor/references/polish-track.md`.
|
|
111
|
+
|
|
112
|
+
## Overhaul Track
|
|
113
|
+
|
|
114
|
+
Rigorous path for architectural changes, migrations, and multi-file restructuring. Uses full delegation model with worktree isolation.
|
|
115
|
+
|
|
116
|
+
HSM phases: `explore` → `brief` → `overhaul-plan` → `overhaul-plan-review` → `overhaul-delegate` → `overhaul-review` → `overhaul-update-docs` → `synthesize` → `completed`
|
|
117
|
+
|
|
118
|
+
For detailed phase instructions, skill invocations, and auto-chain behavior, see `@skills/refactor/references/overhaul-track.md`.
|
|
119
|
+
|
|
120
|
+
## State Management
|
|
121
|
+
|
|
122
|
+
Initialize refactor workflow:
|
|
123
|
+
```
|
|
124
|
+
action: "init", featureId: "refactor-<slug>", workflowType: "refactor"
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Use `describe` to discover the full state schema at runtime: `exarchos_workflow({ action: "describe", actions: ["init"] })`.
|
|
128
|
+
|
|
129
|
+
### Phase Transitions and Guards
|
|
130
|
+
|
|
131
|
+
> **Sequential traversal required.** Every phase MUST be traversed in order — you cannot skip phases, even if you have all the data for a later phase ready. For example, `explore` must transition to `brief` before `overhaul-plan` — attempting `explore` → `overhaul-plan` directly will be rejected by the HSM. From `brief` you must go to `polish-implement` or `overhaul-plan`, not directly to `completed`. Each transition requires its guard to be satisfied via `updates` sent alongside the `phase` parameter in a single `set` call. See `@skills/refactor/references/polish-track.md` or `@skills/refactor/references/overhaul-track.md` for the exact tool call at each step.
|
|
132
|
+
|
|
133
|
+
Every phase transition has a guard that must be satisfied. Before transitioning, consult `@skills/workflow-state/references/phase-transitions.md` for the exact prerequisite for each guard.
|
|
134
|
+
|
|
135
|
+
The pattern for every transition: send the guard prerequisite in `updates` and the target in `phase` in a single `set` call.
|
|
136
|
+
|
|
137
|
+
### Schema Discovery
|
|
138
|
+
|
|
139
|
+
Use `exarchos_workflow({ action: "describe", actions: ["set", "init"] })` for
|
|
140
|
+
parameter schemas and `exarchos_workflow({ action: "describe", playbook: "refactor" })`
|
|
141
|
+
for phase transitions, guards, and playbook guidance.
|
|
142
|
+
|
|
143
|
+
### Decision Runbooks
|
|
144
|
+
|
|
145
|
+
For track-selection criteria at the explore phase, query the decision runbook:
|
|
146
|
+
`exarchos_orchestrate({ action: "runbook", id: "scope-decision" })`
|
|
147
|
+
|
|
148
|
+
This runbook provides structured criteria for choosing between polish and overhaul tracks based on file count, structural impact, and PR scope.
|
|
149
|
+
|
|
150
|
+
## Track Switching
|
|
151
|
+
|
|
152
|
+
If scope expands beyond polish limits during explore or brief phase, use `mcp__exarchos__exarchos_workflow` with `action: "set"` to set `track` to "overhaul" and update `explore.scopeAssessment.recommendedTrack`.
|
|
153
|
+
|
|
154
|
+
**Scope thresholds:** If >5 files affected OR changes cross module boundaries -> recommend overhaul track.
|
|
155
|
+
|
|
156
|
+
**Indicators to switch:**
|
|
157
|
+
- More than 5 files affected
|
|
158
|
+
- Multiple concerns identified
|
|
159
|
+
- Cross-module changes needed
|
|
160
|
+
- Test coverage gaps require new tests
|
|
161
|
+
|
|
162
|
+
Output: "Scope expanded beyond polish limits. Switching to overhaul track."
|
|
163
|
+
|
|
164
|
+
## Integration Points
|
|
165
|
+
|
|
166
|
+
**CRITICAL:** All skill invocations MUST use explicit `Skill()` tool calls:
|
|
167
|
+
|
|
168
|
+
| Skill | Invocation | Usage |
|
|
169
|
+
|-------|------------|-------|
|
|
170
|
+
| `/plan` | `[Invoke the exarchos:plan skill with args: --refactor <state-file>]` | Task extraction from brief |
|
|
171
|
+
| `/delegate` | `[Invoke the exarchos:delegate skill with args: <state-file>]` | Subagent dispatch for TDD |
|
|
172
|
+
| `/review` | `[Invoke the exarchos:review skill with args: <state-file>]` | Quality review |
|
|
173
|
+
| `/synthesize` | `[Invoke the exarchos:synthesize skill with args: <feature>]` | PR creation |
|
|
174
|
+
|
|
175
|
+
## Anti-Patterns
|
|
176
|
+
|
|
177
|
+
| Don't | Do Instead |
|
|
178
|
+
|-------|------------|
|
|
179
|
+
| Skip exploration | Always assess scope first (see `references/explore-checklist.md`) |
|
|
180
|
+
| Use polish for large changes | Switch to overhaul when scope expands |
|
|
181
|
+
| Skip doc updates | Documentation is mandatory (see `references/doc-update-checklist.md`) |
|
|
182
|
+
| Add features during refactor | Scope creep - stick to brief goals |
|
|
183
|
+
| Skip tests because "just moving code" | Refactors need test verification |
|
|
184
|
+
| Create design document for polish | Use brief in state file instead |
|
|
185
|
+
| Work in main for overhaul | Use worktree isolation |
|
|
186
|
+
|
|
187
|
+
## Exarchos Integration
|
|
188
|
+
|
|
189
|
+
When Exarchos MCP tools are available, emit events throughout the refactor workflow:
|
|
190
|
+
|
|
191
|
+
1. **At workflow start (explore):** `mcp__exarchos__exarchos_event` with `action: "append"` → `workflow.started` with workflowType "refactor"
|
|
192
|
+
2. **On track selection:** Auto-emitted by `exarchos_workflow` `set` when `phase` is provided — emits `workflow.transition` with selected track (polish/overhaul)
|
|
193
|
+
3. **On each phase transition:** Auto-emitted by `exarchos_workflow` `set` when `phase` is provided — emits `workflow.transition` with from/to/trigger/featureId
|
|
194
|
+
4. **Overhaul track stacking:** Handled by `/delegate` (subagents use `git commit` + `git push` per implementer prompt)
|
|
195
|
+
5. **Polish track commit:** Single `git commit -m "refactor: <description>"` + `git push` — no multi-branch stacking needed
|
|
196
|
+
6. **On complete:** Auto-emitted by `exarchos_workflow` `set` when transitioning to terminal state — emits `workflow.transition` to "completed"
|