devflow-kit 0.8.1 → 1.0.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/CHANGELOG.md +185 -29
- package/LICENSE +1 -1
- package/README.md +179 -308
- package/dist/cli.js +3 -1
- package/dist/commands/init.d.ts +21 -0
- package/dist/commands/init.js +311 -575
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.js +20 -0
- package/dist/commands/uninstall.d.ts +10 -0
- package/dist/commands/uninstall.js +351 -78
- package/dist/plugins.d.ts +46 -0
- package/dist/plugins.js +162 -0
- package/dist/utils/cli.d.ts +5 -0
- package/dist/utils/cli.js +14 -0
- package/dist/utils/installer.d.ts +41 -0
- package/dist/utils/installer.js +177 -0
- package/dist/utils/paths.d.ts +10 -0
- package/dist/utils/paths.js +23 -3
- package/dist/utils/post-install.d.ts +68 -0
- package/dist/utils/post-install.js +427 -0
- package/dist/utils/safe-delete-install.d.ts +22 -0
- package/dist/utils/safe-delete-install.js +156 -0
- package/dist/utils/safe-delete.d.ts +12 -0
- package/dist/utils/safe-delete.js +83 -0
- package/package.json +18 -8
- package/plugins/devflow-audit-claude/.claude-plugin/plugin.json +7 -0
- package/plugins/devflow-audit-claude/README.md +46 -0
- package/plugins/devflow-audit-claude/agents/claude-md-auditor.md +134 -0
- package/plugins/devflow-audit-claude/commands/audit-claude.md +85 -0
- package/plugins/devflow-code-review/.claude-plugin/plugin.json +31 -0
- package/plugins/devflow-code-review/README.md +73 -0
- package/plugins/devflow-code-review/agents/git.md +272 -0
- package/plugins/devflow-code-review/agents/reviewer.md +119 -0
- package/plugins/devflow-code-review/agents/synthesizer.md +204 -0
- package/plugins/devflow-code-review/commands/code-review-teams.md +262 -0
- package/plugins/devflow-code-review/commands/code-review.md +141 -0
- package/plugins/devflow-code-review/skills/accessibility/SKILL.md +229 -0
- package/plugins/devflow-code-review/skills/accessibility/references/detection.md +171 -0
- package/plugins/devflow-code-review/skills/accessibility/references/patterns.md +670 -0
- package/plugins/devflow-code-review/skills/accessibility/references/violations.md +419 -0
- package/plugins/devflow-code-review/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-code-review/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-code-review/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-code-review/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/SKILL.md +153 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/references/detection.md +337 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/references/patterns.md +873 -0
- package/plugins/devflow-code-review/skills/architecture-patterns/references/violations.md +575 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/SKILL.md +143 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/references/detection.md +264 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/references/patterns.md +487 -0
- package/plugins/devflow-code-review/skills/complexity-patterns/references/violations.md +361 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/SKILL.md +140 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/references/detection.md +207 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/references/patterns.md +202 -0
- package/plugins/devflow-code-review/skills/consistency-patterns/references/violations.md +213 -0
- package/plugins/devflow-code-review/skills/database-patterns/SKILL.md +134 -0
- package/plugins/devflow-code-review/skills/database-patterns/references/detection.md +208 -0
- package/plugins/devflow-code-review/skills/database-patterns/references/patterns.md +394 -0
- package/plugins/devflow-code-review/skills/database-patterns/references/violations.md +332 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/SKILL.md +141 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/references/detection.md +181 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/references/patterns.md +225 -0
- package/plugins/devflow-code-review/skills/dependencies-patterns/references/violations.md +247 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/SKILL.md +125 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/references/detection.md +190 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/references/patterns.md +189 -0
- package/plugins/devflow-code-review/skills/documentation-patterns/references/violations.md +163 -0
- package/plugins/devflow-code-review/skills/frontend-design/SKILL.md +254 -0
- package/plugins/devflow-code-review/skills/frontend-design/references/detection.md +184 -0
- package/plugins/devflow-code-review/skills/frontend-design/references/patterns.md +511 -0
- package/plugins/devflow-code-review/skills/frontend-design/references/violations.md +453 -0
- package/plugins/devflow-code-review/skills/performance-patterns/SKILL.md +154 -0
- package/plugins/devflow-code-review/skills/performance-patterns/references/detection.md +351 -0
- package/plugins/devflow-code-review/skills/performance-patterns/references/patterns.md +503 -0
- package/plugins/devflow-code-review/skills/performance-patterns/references/violations.md +354 -0
- package/plugins/devflow-code-review/skills/react/SKILL.md +276 -0
- package/plugins/devflow-code-review/skills/react/references/patterns.md +1331 -0
- package/plugins/devflow-code-review/skills/react/references/violations.md +565 -0
- package/plugins/devflow-code-review/skills/regression-patterns/SKILL.md +146 -0
- package/plugins/devflow-code-review/skills/regression-patterns/references/detection.md +237 -0
- package/plugins/devflow-code-review/skills/regression-patterns/references/patterns.md +226 -0
- package/plugins/devflow-code-review/skills/regression-patterns/references/violations.md +225 -0
- package/plugins/devflow-code-review/skills/review-methodology/SKILL.md +119 -0
- package/plugins/devflow-code-review/skills/review-methodology/references/patterns.md +186 -0
- package/plugins/devflow-code-review/skills/review-methodology/references/report-template.md +142 -0
- package/plugins/devflow-code-review/skills/review-methodology/references/violations.md +125 -0
- package/plugins/devflow-code-review/skills/security-patterns/SKILL.md +156 -0
- package/plugins/devflow-code-review/skills/security-patterns/references/detection.md +287 -0
- package/plugins/devflow-code-review/skills/security-patterns/references/patterns.md +507 -0
- package/plugins/devflow-code-review/skills/security-patterns/references/violations.md +237 -0
- package/plugins/devflow-code-review/skills/test-patterns/SKILL.md +183 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/detection.md +149 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/patterns.md +220 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/report-template.md +108 -0
- package/plugins/devflow-code-review/skills/test-patterns/references/violations.md +221 -0
- package/plugins/devflow-core-skills/.claude-plugin/plugin.json +27 -0
- package/plugins/devflow-core-skills/README.md +50 -0
- package/plugins/devflow-core-skills/skills/accessibility/SKILL.md +229 -0
- package/plugins/devflow-core-skills/skills/accessibility/references/detection.md +171 -0
- package/plugins/devflow-core-skills/skills/accessibility/references/patterns.md +670 -0
- package/plugins/devflow-core-skills/skills/accessibility/references/violations.md +419 -0
- package/plugins/devflow-core-skills/skills/core-patterns/SKILL.md +162 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/checklist.md +276 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/code-smell-violations.md +144 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/detection.md +303 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/patterns.md +576 -0
- package/plugins/devflow-core-skills/skills/core-patterns/references/violations.md +369 -0
- package/plugins/devflow-core-skills/skills/docs-framework/SKILL.md +134 -0
- package/plugins/devflow-core-skills/skills/docs-framework/references/patterns.md +346 -0
- package/plugins/devflow-core-skills/skills/docs-framework/references/violations.md +221 -0
- package/plugins/devflow-core-skills/skills/frontend-design/SKILL.md +254 -0
- package/plugins/devflow-core-skills/skills/frontend-design/references/detection.md +184 -0
- package/plugins/devflow-core-skills/skills/frontend-design/references/patterns.md +511 -0
- package/plugins/devflow-core-skills/skills/frontend-design/references/violations.md +453 -0
- package/plugins/devflow-core-skills/skills/git-safety/SKILL.md +122 -0
- package/plugins/devflow-core-skills/skills/git-safety/references/detection.md +290 -0
- package/plugins/devflow-core-skills/skills/git-safety/references/patterns.md +289 -0
- package/plugins/devflow-core-skills/skills/git-safety/references/violations.md +18 -0
- package/plugins/devflow-core-skills/skills/git-workflow/SKILL.md +158 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/commit-patterns.md +115 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/commit-violations.md +77 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/pr-patterns.md +127 -0
- package/plugins/devflow-core-skills/skills/git-workflow/references/pr-violations.md +96 -0
- package/plugins/devflow-core-skills/skills/github-patterns/SKILL.md +153 -0
- package/plugins/devflow-core-skills/skills/github-patterns/references/patterns.md +572 -0
- package/plugins/devflow-core-skills/skills/github-patterns/references/violations.md +298 -0
- package/plugins/devflow-core-skills/skills/input-validation/SKILL.md +148 -0
- package/plugins/devflow-core-skills/skills/input-validation/references/detection.md +283 -0
- package/plugins/devflow-core-skills/skills/input-validation/references/patterns.md +361 -0
- package/plugins/devflow-core-skills/skills/input-validation/references/violations.md +224 -0
- package/plugins/devflow-core-skills/skills/react/SKILL.md +276 -0
- package/plugins/devflow-core-skills/skills/react/references/patterns.md +1331 -0
- package/plugins/devflow-core-skills/skills/react/references/violations.md +565 -0
- package/plugins/devflow-core-skills/skills/test-patterns/SKILL.md +183 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/detection.md +149 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/patterns.md +220 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/report-template.md +108 -0
- package/plugins/devflow-core-skills/skills/test-patterns/references/violations.md +221 -0
- package/plugins/devflow-core-skills/skills/typescript/SKILL.md +176 -0
- package/plugins/devflow-core-skills/skills/typescript/references/patterns.md +1105 -0
- package/plugins/devflow-core-skills/skills/typescript/references/violations.md +433 -0
- package/plugins/devflow-debug/.claude-plugin/plugin.json +18 -0
- package/plugins/devflow-debug/README.md +65 -0
- package/plugins/devflow-debug/agents/git.md +272 -0
- package/plugins/devflow-debug/commands/debug-teams.md +231 -0
- package/plugins/devflow-debug/commands/debug.md +160 -0
- package/plugins/devflow-debug/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-debug/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-debug/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-debug/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-debug/skills/git-safety/SKILL.md +122 -0
- package/plugins/devflow-debug/skills/git-safety/references/detection.md +290 -0
- package/plugins/devflow-debug/skills/git-safety/references/patterns.md +289 -0
- package/plugins/devflow-debug/skills/git-safety/references/violations.md +18 -0
- package/plugins/devflow-implement/.claude-plugin/plugin.json +21 -0
- package/plugins/devflow-implement/README.md +71 -0
- package/plugins/devflow-implement/agents/coder.md +122 -0
- package/plugins/devflow-implement/agents/git.md +272 -0
- package/plugins/devflow-implement/agents/scrutinizer.md +80 -0
- package/plugins/devflow-implement/agents/shepherd.md +94 -0
- package/plugins/devflow-implement/agents/simplifier.md +62 -0
- package/plugins/devflow-implement/agents/skimmer.md +88 -0
- package/plugins/devflow-implement/agents/synthesizer.md +204 -0
- package/plugins/devflow-implement/agents/validator.md +86 -0
- package/plugins/devflow-implement/commands/implement-teams.md +608 -0
- package/plugins/devflow-implement/commands/implement.md +426 -0
- package/plugins/devflow-implement/skills/accessibility/SKILL.md +229 -0
- package/plugins/devflow-implement/skills/accessibility/references/detection.md +171 -0
- package/plugins/devflow-implement/skills/accessibility/references/patterns.md +670 -0
- package/plugins/devflow-implement/skills/accessibility/references/violations.md +419 -0
- package/plugins/devflow-implement/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-implement/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-implement/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-implement/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-implement/skills/frontend-design/SKILL.md +254 -0
- package/plugins/devflow-implement/skills/frontend-design/references/detection.md +184 -0
- package/plugins/devflow-implement/skills/frontend-design/references/patterns.md +511 -0
- package/plugins/devflow-implement/skills/frontend-design/references/violations.md +453 -0
- package/plugins/devflow-implement/skills/implementation-patterns/SKILL.md +162 -0
- package/plugins/devflow-implement/skills/implementation-patterns/references/patterns.md +1063 -0
- package/plugins/devflow-implement/skills/implementation-patterns/references/violations.md +483 -0
- package/plugins/devflow-implement/skills/self-review/SKILL.md +149 -0
- package/plugins/devflow-implement/skills/self-review/references/patterns.md +405 -0
- package/plugins/devflow-implement/skills/self-review/references/report-template.md +253 -0
- package/plugins/devflow-implement/skills/self-review/references/violations.md +308 -0
- package/plugins/devflow-resolve/.claude-plugin/plugin.json +19 -0
- package/plugins/devflow-resolve/README.md +65 -0
- package/plugins/devflow-resolve/agents/git.md +272 -0
- package/plugins/devflow-resolve/agents/resolver.md +131 -0
- package/plugins/devflow-resolve/agents/simplifier.md +62 -0
- package/plugins/devflow-resolve/commands/resolve-teams.md +298 -0
- package/plugins/devflow-resolve/commands/resolve.md +237 -0
- package/plugins/devflow-resolve/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-resolve/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-resolve/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-resolve/skills/agent-teams/references/team-patterns.md +217 -0
- package/plugins/devflow-resolve/skills/implementation-patterns/SKILL.md +162 -0
- package/plugins/devflow-resolve/skills/implementation-patterns/references/patterns.md +1063 -0
- package/plugins/devflow-resolve/skills/implementation-patterns/references/violations.md +483 -0
- package/plugins/devflow-resolve/skills/security-patterns/SKILL.md +156 -0
- package/plugins/devflow-resolve/skills/security-patterns/references/detection.md +287 -0
- package/plugins/devflow-resolve/skills/security-patterns/references/patterns.md +507 -0
- package/plugins/devflow-resolve/skills/security-patterns/references/violations.md +237 -0
- package/plugins/devflow-self-review/.claude-plugin/plugin.json +7 -0
- package/plugins/devflow-self-review/README.md +38 -0
- package/plugins/devflow-self-review/agents/scrutinizer.md +80 -0
- package/plugins/devflow-self-review/agents/simplifier.md +62 -0
- package/plugins/devflow-self-review/agents/validator.md +86 -0
- package/plugins/devflow-self-review/commands/self-review.md +126 -0
- package/plugins/devflow-self-review/skills/core-patterns/SKILL.md +162 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/checklist.md +276 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/code-smell-violations.md +144 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/detection.md +303 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/patterns.md +576 -0
- package/plugins/devflow-self-review/skills/core-patterns/references/violations.md +369 -0
- package/plugins/devflow-self-review/skills/self-review/SKILL.md +149 -0
- package/plugins/devflow-self-review/skills/self-review/references/patterns.md +405 -0
- package/plugins/devflow-self-review/skills/self-review/references/report-template.md +253 -0
- package/plugins/devflow-self-review/skills/self-review/references/violations.md +308 -0
- package/plugins/devflow-specify/.claude-plugin/plugin.json +15 -0
- package/plugins/devflow-specify/README.md +46 -0
- package/plugins/devflow-specify/agents/skimmer.md +88 -0
- package/plugins/devflow-specify/agents/synthesizer.md +204 -0
- package/plugins/devflow-specify/commands/specify-teams.md +314 -0
- package/plugins/devflow-specify/commands/specify.md +179 -0
- package/plugins/devflow-specify/skills/agent-teams/SKILL.md +124 -0
- package/plugins/devflow-specify/skills/agent-teams/references/cleanup.md +104 -0
- package/plugins/devflow-specify/skills/agent-teams/references/communication.md +122 -0
- package/plugins/devflow-specify/skills/agent-teams/references/team-patterns.md +217 -0
- package/scripts/hooks/background-memory-update.sh +167 -0
- package/scripts/hooks/pre-compact-memory.sh +81 -0
- package/scripts/hooks/session-start-memory.sh +84 -0
- package/scripts/hooks/stop-update-memory.sh +81 -0
- package/shared/agents/coder.md +122 -0
- package/shared/agents/git.md +272 -0
- package/shared/agents/resolver.md +131 -0
- package/shared/agents/reviewer.md +119 -0
- package/shared/agents/scrutinizer.md +80 -0
- package/shared/agents/shepherd.md +94 -0
- package/shared/agents/simplifier.md +62 -0
- package/shared/agents/skimmer.md +88 -0
- package/shared/agents/synthesizer.md +204 -0
- package/shared/agents/validator.md +86 -0
- package/shared/skills/accessibility/SKILL.md +229 -0
- package/shared/skills/accessibility/references/detection.md +171 -0
- package/shared/skills/accessibility/references/patterns.md +670 -0
- package/shared/skills/accessibility/references/violations.md +419 -0
- package/shared/skills/agent-teams/SKILL.md +124 -0
- package/shared/skills/agent-teams/references/cleanup.md +104 -0
- package/shared/skills/agent-teams/references/communication.md +122 -0
- package/shared/skills/agent-teams/references/team-patterns.md +217 -0
- package/shared/skills/architecture-patterns/SKILL.md +153 -0
- package/shared/skills/architecture-patterns/references/detection.md +337 -0
- package/shared/skills/architecture-patterns/references/patterns.md +873 -0
- package/shared/skills/architecture-patterns/references/violations.md +575 -0
- package/shared/skills/complexity-patterns/SKILL.md +143 -0
- package/shared/skills/complexity-patterns/references/detection.md +264 -0
- package/shared/skills/complexity-patterns/references/patterns.md +487 -0
- package/shared/skills/complexity-patterns/references/violations.md +361 -0
- package/shared/skills/consistency-patterns/SKILL.md +140 -0
- package/shared/skills/consistency-patterns/references/detection.md +207 -0
- package/shared/skills/consistency-patterns/references/patterns.md +202 -0
- package/shared/skills/consistency-patterns/references/violations.md +213 -0
- package/shared/skills/core-patterns/SKILL.md +162 -0
- package/shared/skills/core-patterns/references/checklist.md +276 -0
- package/shared/skills/core-patterns/references/code-smell-violations.md +144 -0
- package/shared/skills/core-patterns/references/detection.md +303 -0
- package/shared/skills/core-patterns/references/patterns.md +576 -0
- package/shared/skills/core-patterns/references/violations.md +369 -0
- package/shared/skills/database-patterns/SKILL.md +134 -0
- package/shared/skills/database-patterns/references/detection.md +208 -0
- package/shared/skills/database-patterns/references/patterns.md +394 -0
- package/shared/skills/database-patterns/references/violations.md +332 -0
- package/shared/skills/dependencies-patterns/SKILL.md +141 -0
- package/shared/skills/dependencies-patterns/references/detection.md +181 -0
- package/shared/skills/dependencies-patterns/references/patterns.md +225 -0
- package/shared/skills/dependencies-patterns/references/violations.md +247 -0
- package/shared/skills/docs-framework/SKILL.md +134 -0
- package/shared/skills/docs-framework/references/patterns.md +346 -0
- package/shared/skills/docs-framework/references/violations.md +221 -0
- package/shared/skills/documentation-patterns/SKILL.md +125 -0
- package/shared/skills/documentation-patterns/references/detection.md +190 -0
- package/shared/skills/documentation-patterns/references/patterns.md +189 -0
- package/shared/skills/documentation-patterns/references/violations.md +163 -0
- package/shared/skills/frontend-design/SKILL.md +254 -0
- package/shared/skills/frontend-design/references/detection.md +184 -0
- package/shared/skills/frontend-design/references/patterns.md +511 -0
- package/shared/skills/frontend-design/references/violations.md +453 -0
- package/shared/skills/git-safety/SKILL.md +122 -0
- package/shared/skills/git-safety/references/detection.md +290 -0
- package/shared/skills/git-safety/references/patterns.md +289 -0
- package/shared/skills/git-safety/references/violations.md +18 -0
- package/shared/skills/git-workflow/SKILL.md +158 -0
- package/shared/skills/git-workflow/references/commit-patterns.md +115 -0
- package/shared/skills/git-workflow/references/commit-violations.md +77 -0
- package/shared/skills/git-workflow/references/pr-patterns.md +127 -0
- package/shared/skills/git-workflow/references/pr-violations.md +96 -0
- package/shared/skills/github-patterns/SKILL.md +153 -0
- package/shared/skills/github-patterns/references/patterns.md +572 -0
- package/shared/skills/github-patterns/references/violations.md +298 -0
- package/shared/skills/implementation-patterns/SKILL.md +162 -0
- package/shared/skills/implementation-patterns/references/patterns.md +1063 -0
- package/shared/skills/implementation-patterns/references/violations.md +483 -0
- package/shared/skills/input-validation/SKILL.md +148 -0
- package/shared/skills/input-validation/references/detection.md +283 -0
- package/shared/skills/input-validation/references/patterns.md +361 -0
- package/shared/skills/input-validation/references/violations.md +224 -0
- package/shared/skills/performance-patterns/SKILL.md +154 -0
- package/shared/skills/performance-patterns/references/detection.md +351 -0
- package/shared/skills/performance-patterns/references/patterns.md +503 -0
- package/shared/skills/performance-patterns/references/violations.md +354 -0
- package/shared/skills/react/SKILL.md +276 -0
- package/shared/skills/react/references/patterns.md +1331 -0
- package/shared/skills/react/references/violations.md +565 -0
- package/shared/skills/regression-patterns/SKILL.md +146 -0
- package/shared/skills/regression-patterns/references/detection.md +237 -0
- package/shared/skills/regression-patterns/references/patterns.md +226 -0
- package/shared/skills/regression-patterns/references/violations.md +225 -0
- package/shared/skills/review-methodology/SKILL.md +119 -0
- package/shared/skills/review-methodology/references/patterns.md +186 -0
- package/shared/skills/review-methodology/references/report-template.md +142 -0
- package/shared/skills/review-methodology/references/violations.md +125 -0
- package/shared/skills/security-patterns/SKILL.md +156 -0
- package/shared/skills/security-patterns/references/detection.md +287 -0
- package/shared/skills/security-patterns/references/patterns.md +507 -0
- package/shared/skills/security-patterns/references/violations.md +237 -0
- package/shared/skills/self-review/SKILL.md +149 -0
- package/shared/skills/self-review/references/patterns.md +405 -0
- package/shared/skills/self-review/references/report-template.md +253 -0
- package/shared/skills/self-review/references/violations.md +308 -0
- package/shared/skills/test-patterns/SKILL.md +183 -0
- package/shared/skills/test-patterns/references/detection.md +149 -0
- package/shared/skills/test-patterns/references/patterns.md +220 -0
- package/shared/skills/test-patterns/references/report-template.md +108 -0
- package/shared/skills/test-patterns/references/violations.md +221 -0
- package/shared/skills/typescript/SKILL.md +176 -0
- package/shared/skills/typescript/references/patterns.md +1105 -0
- package/shared/skills/typescript/references/violations.md +433 -0
- package/src/templates/claudeignore.template +188 -0
- package/src/templates/managed-settings.json +146 -0
- package/src/templates/settings.json +59 -0
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/uninstall.d.ts.map +0 -1
- package/dist/commands/uninstall.js.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/paths.d.ts.map +0 -1
- package/dist/utils/paths.js.map +0 -1
- package/src/claude/CLAUDE.md +0 -400
- package/src/claude/agents/devflow/audit-architecture.md +0 -132
- package/src/claude/agents/devflow/audit-complexity.md +0 -132
- package/src/claude/agents/devflow/audit-database.md +0 -132
- package/src/claude/agents/devflow/audit-dependencies.md +0 -132
- package/src/claude/agents/devflow/audit-documentation.md +0 -132
- package/src/claude/agents/devflow/audit-performance.md +0 -256
- package/src/claude/agents/devflow/audit-security.md +0 -259
- package/src/claude/agents/devflow/audit-tests.md +0 -132
- package/src/claude/agents/devflow/audit-typescript.md +0 -132
- package/src/claude/agents/devflow/brainstorm.md +0 -279
- package/src/claude/agents/devflow/catch-up.md +0 -345
- package/src/claude/agents/devflow/code-review.md +0 -307
- package/src/claude/agents/devflow/commit.md +0 -380
- package/src/claude/agents/devflow/debug.md +0 -476
- package/src/claude/agents/devflow/design.md +0 -491
- package/src/claude/agents/devflow/pr-comments.md +0 -285
- package/src/claude/agents/devflow/project-state.md +0 -419
- package/src/claude/agents/devflow/pull-request.md +0 -423
- package/src/claude/agents/devflow/release.md +0 -1137
- package/src/claude/agents/devflow/tech-debt.md +0 -338
- package/src/claude/commands/devflow/brainstorm.md +0 -68
- package/src/claude/commands/devflow/breakdown.md +0 -125
- package/src/claude/commands/devflow/catch-up.md +0 -29
- package/src/claude/commands/devflow/code-review.md +0 -237
- package/src/claude/commands/devflow/commit.md +0 -17
- package/src/claude/commands/devflow/debug.md +0 -56
- package/src/claude/commands/devflow/design.md +0 -82
- package/src/claude/commands/devflow/devlog.md +0 -408
- package/src/claude/commands/devflow/implement.md +0 -100
- package/src/claude/commands/devflow/plan.md +0 -223
- package/src/claude/commands/devflow/pull-request.md +0 -269
- package/src/claude/commands/devflow/release.md +0 -251
- package/src/claude/commands/devflow/resolve-comments.md +0 -583
- package/src/claude/scripts/statusline.sh +0 -47
- package/src/claude/settings.json +0 -6
- package/src/claude/skills/devflow/code-smell/SKILL.md +0 -428
- package/src/claude/skills/devflow/debug/SKILL.md +0 -119
- package/src/claude/skills/devflow/error-handling/SKILL.md +0 -597
- package/src/claude/skills/devflow/input-validation/SKILL.md +0 -514
- package/src/claude/skills/devflow/pattern-check/SKILL.md +0 -238
- package/src/claude/skills/devflow/research/SKILL.md +0 -138
- package/src/claude/skills/devflow/test-design/SKILL.md +0 -384
package/src/claude/CLAUDE.md
DELETED
|
@@ -1,400 +0,0 @@
|
|
|
1
|
-
# Global Claude Code Instructions
|
|
2
|
-
|
|
3
|
-
## ROLE
|
|
4
|
-
|
|
5
|
-
Your role is to act as a strict, unbiased, and uncompromising critic of all thoughts, requests, code, designs, or suggestions presented by the user.
|
|
6
|
-
|
|
7
|
-
- **No pleasing** - Do not soften responses or reassure unnecessarily
|
|
8
|
-
- **Bias removal** - Avoid positive bias, flattery, or hedging
|
|
9
|
-
- **Strict critique** - Search for weaknesses, risks, limitations, and failure points
|
|
10
|
-
- **Assertive suggestions** - Propose better, stricter alternatives with confidence
|
|
11
|
-
- **Evidence-driven** - Base critiques on reasoning, logic, and best practices
|
|
12
|
-
- **Priority** - Challenge assumptions, expose blind spots, recommend stronger approaches even if it conflicts with user's initial idea
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Engineering Principles
|
|
17
|
-
|
|
18
|
-
**IMPORTANT**: Follow these principles strictly when implementing features:
|
|
19
|
-
|
|
20
|
-
1. **Always use Result types** - Never throw errors in business logic
|
|
21
|
-
2. **Inject dependencies** - Makes testing trivial
|
|
22
|
-
3. **Compose with pipes** - Readable, maintainable chains
|
|
23
|
-
4. **Immutable by default** - No mutations, return new objects
|
|
24
|
-
5. **Type everything** - Use explicit types, avoid dynamic types
|
|
25
|
-
6. **Test behaviors, not implementation** - Focus on integration tests
|
|
26
|
-
7. **Resource cleanup** - Always use proper cleanup patterns (try/finally, context managers, defer, RAII)
|
|
27
|
-
8. **Structured logging** - Use structured logs with context
|
|
28
|
-
9. **Validate at boundaries** - Parse, don't validate (use schema validation libraries)
|
|
29
|
-
10. **Performance matters** - Measure, benchmark, optimize
|
|
30
|
-
|
|
31
|
-
### Core Concepts
|
|
32
|
-
|
|
33
|
-
**Result Types**: Represent success/failure explicitly in return types instead of throwing exceptions
|
|
34
|
-
```
|
|
35
|
-
Success: { ok: true, value: T }
|
|
36
|
-
Failure: { ok: false, error: E }
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
**Dependency Injection**: Pass dependencies through constructors/parameters instead of creating them internally
|
|
40
|
-
```
|
|
41
|
-
Instead of: class Service { db = new Database() }
|
|
42
|
-
Use: class Service { constructor(db: Database) }
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
**Immutable Updates**: Return new objects instead of mutating existing ones
|
|
46
|
-
```
|
|
47
|
-
Instead of: user.name = "new"; return user;
|
|
48
|
-
Use: return { ...user, name: "new" };
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**Composable Functions**: Build complex operations by chaining simple pure functions
|
|
52
|
-
```
|
|
53
|
-
processData = pipe(validate, transform, persist, log);
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Critical Anti-Patterns
|
|
59
|
-
|
|
60
|
-
When working on any codebase, follow these rules to prevent foolishness:
|
|
61
|
-
|
|
62
|
-
1. **NO FAKE SOLUTIONS** - Never hardcode responses or data to simulate working functionality
|
|
63
|
-
2. **BE TRANSPARENT** - Always explain when something is a workaround, mock, or temporary fix
|
|
64
|
-
3. **FAIL HONESTLY** - If something can't work, say so clearly instead of hiding it
|
|
65
|
-
4. **LABEL EVERYTHING** - Use clear comments: `HACK:`, `MOCK:`, `TODO:`, `TEMPORARY:`, `NOT-PRODUCTION:`
|
|
66
|
-
5. **PRODUCTION ONLY** - Unless specifically asked for mocks/demos, only implement real solutions
|
|
67
|
-
|
|
68
|
-
### Response Format
|
|
69
|
-
When encountering limitations:
|
|
70
|
-
- ❌ "This won't work because [reason]"
|
|
71
|
-
- ⚠️ "I could work around it by [approach], but this isn't production-ready"
|
|
72
|
-
- ✅ "Here's a real solution: [approach]"
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Code Quality Enforcement
|
|
77
|
-
|
|
78
|
-
**CRITICAL**: Never fix issues by working around bad architecture. Always fix root causes.
|
|
79
|
-
|
|
80
|
-
### Before Making Any Changes
|
|
81
|
-
|
|
82
|
-
1. **Identify the root architectural issue** - Don't fix symptoms
|
|
83
|
-
2. **Propose the correct design pattern** - Show what good architecture looks like
|
|
84
|
-
3. **Explain why current approach is wrong** - Be specific about the problems
|
|
85
|
-
4. **Get explicit approval** for architectural changes before implementing
|
|
86
|
-
5. **NEVER implement "quick fixes"** when fundamental design is flawed
|
|
87
|
-
|
|
88
|
-
### API Consistency Rules
|
|
89
|
-
|
|
90
|
-
ENFORCE these strictly:
|
|
91
|
-
- If one method returns Result types, ALL related methods must
|
|
92
|
-
- If dependency injection is used, apply it consistently throughout
|
|
93
|
-
- Stick to ONE async pattern (don't mix callback/promise/async styles)
|
|
94
|
-
- NO global state unless explicitly justified
|
|
95
|
-
|
|
96
|
-
### Change Process for Failing Tests
|
|
97
|
-
|
|
98
|
-
1. **STOP** - Don't fix tests immediately
|
|
99
|
-
2. **ANALYZE** - What is the root architectural issue?
|
|
100
|
-
3. **PROPOSE** - What would correct design look like?
|
|
101
|
-
4. **COMMUNICATE** - Always say: "I found test failure. Root cause is [X]. To fix properly, I need to [design change]. Should I proceed with proper fix?"
|
|
102
|
-
5. **IMPLEMENT** - Design changes first, then update tests
|
|
103
|
-
|
|
104
|
-
### Red Flags - Stop Immediately If:
|
|
105
|
-
|
|
106
|
-
- Adding try/catch blocks around test expectations
|
|
107
|
-
- Writing repetitive error handling boilerplate everywhere
|
|
108
|
-
- Using environment variables to work around test conflicts
|
|
109
|
-
- Mocking things that should be easily testable
|
|
110
|
-
- Adding timeouts/sleeps to tests to avoid race conditions
|
|
111
|
-
|
|
112
|
-
### Quality Gates
|
|
113
|
-
|
|
114
|
-
Before declaring work complete:
|
|
115
|
-
- Can you explain the design to junior developer in 2 minutes?
|
|
116
|
-
- Are there any "magic" behaviors or implicit dependencies?
|
|
117
|
-
- Would this design survive production environment?
|
|
118
|
-
- Are tests simple and focused on behavior?
|
|
119
|
-
- Is error handling consistent throughout?
|
|
120
|
-
- **Don't run the entire test suite all at once** - Only specific test files, one by one
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
### Production Build Optimization
|
|
125
|
-
|
|
126
|
-
**CRITICAL**: Never ship test files, debug symbols, or sourcemaps to production.
|
|
127
|
-
|
|
128
|
-
**Requirements:**
|
|
129
|
-
1. **Separate configs** - Dev config (with debug info) vs prod config (optimized)
|
|
130
|
-
2. **Exclude tests** - No test files in build output
|
|
131
|
-
3. **Exclude debug artifacts** - No sourcemaps, debug symbols, or profiling data
|
|
132
|
-
4. **Clean builds** - Remove old artifacts before building
|
|
133
|
-
5. **Watch mode** - Fast rebuilds during development
|
|
134
|
-
|
|
135
|
-
**Implementation checklist:**
|
|
136
|
-
- [ ] Production build excludes test files
|
|
137
|
-
- [ ] Production build excludes sourcemaps/debug symbols
|
|
138
|
-
- [ ] Separate dev build with full debug info
|
|
139
|
-
- [ ] Pre-build cleanup of old artifacts
|
|
140
|
-
- [ ] Watch mode for development
|
|
141
|
-
- [ ] Verify package contents before publishing
|
|
142
|
-
|
|
143
|
-
**File patterns to exclude from production:**
|
|
144
|
-
**/.test.
|
|
145
|
-
**/.spec.
|
|
146
|
-
**/_test.
|
|
147
|
-
**/*.map
|
|
148
|
-
**/debug/
|
|
149
|
-
**/coverage/
|
|
150
|
-
**/tests/
|
|
151
|
-
**/tests/
|
|
152
|
-
|
|
153
|
-
**Build script structure:**
|
|
154
|
-
```json
|
|
155
|
-
{
|
|
156
|
-
"prebuild": "clean artifacts",
|
|
157
|
-
"build": "production build (no debug)",
|
|
158
|
-
"build:dev": "development build (with debug)",
|
|
159
|
-
"build:watch": "watch mode for development"
|
|
160
|
-
}
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
---
|
|
164
|
-
|
|
165
|
-
## Testing & Build Standards
|
|
166
|
-
|
|
167
|
-
### Test Quality Standards
|
|
168
|
-
|
|
169
|
-
Tests must validate BEHAVIOR, not work around BAD DESIGN:
|
|
170
|
-
- If tests need complex setup, the design is probably wrong
|
|
171
|
-
- If tests have repetitive boilerplate, the API is probably wrong
|
|
172
|
-
- If mocking is difficult, dependencies are probably wrong
|
|
173
|
-
- Tests should be SIMPLE when design is correct
|
|
174
|
-
|
|
175
|
-
### Test Suite Safety
|
|
176
|
-
|
|
177
|
-
**CRITICAL**: Always configure tests to run sequentially to prevent resource
|
|
178
|
-
exhaustion and crashes.
|
|
179
|
-
|
|
180
|
-
**Requirements:**
|
|
181
|
-
1. **Sequential execution** - One test at a time, no parallelism
|
|
182
|
-
2. **Memory limits** - Set explicit limits for test processes
|
|
183
|
-
3. **Resource cleanup** - Clean temp files/databases before and after tests
|
|
184
|
-
4. **Isolation** - Separate unit/integration/e2e test suites
|
|
185
|
-
|
|
186
|
-
**Implementation checklist:**
|
|
187
|
-
- [ ] Test runner configured for sequential execution (maxWorkers=1, no parallel)
|
|
188
|
-
- [ ] Memory limits set in test command (language-specific)
|
|
189
|
-
- [ ] Cleanup hooks: before (clean temp files) and after (close connections)
|
|
190
|
-
- [ ] Default `test` command runs safely (unit then integration, sequentially)
|
|
191
|
-
|
|
192
|
-
**Framework-specific flags:**
|
|
193
|
-
- **Vitest/Jest**: `maxWorkers: 1`, `--runInBand`, `fileParallelism: false`
|
|
194
|
-
- **pytest**: `-n 0` (no xdist), `--maxprocesses=1`
|
|
195
|
-
- **Go**: `-p 1` (parallel=1)
|
|
196
|
-
- **Rust**: `-- --test-threads=1`
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
|
|
200
|
-
## Architecture Documentation
|
|
201
|
-
|
|
202
|
-
**MANDATORY**: Document ALL architectural decisions directly in code:
|
|
203
|
-
|
|
204
|
-
### 1. Document Design Patterns at Class/Module Level
|
|
205
|
-
```
|
|
206
|
-
/**
|
|
207
|
-
* TaskManager uses pure event-driven architecture
|
|
208
|
-
* Pattern: All operations (commands AND queries) go through EventBus
|
|
209
|
-
* Rationale: Consistency, testability, extensibility
|
|
210
|
-
* Trade-offs: Slight performance overhead for reads
|
|
211
|
-
*/
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
### 2. Document Architectural Boundaries
|
|
215
|
-
```
|
|
216
|
-
// ARCHITECTURE: This service MUST NOT access repository directly
|
|
217
|
-
// All data access goes through event handlers
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
### 3. Document Pattern Violations with Justification
|
|
221
|
-
```
|
|
222
|
-
// ARCHITECTURE EXCEPTION: Direct DB access for health checks
|
|
223
|
-
// Justification: Health endpoint must work even if event system is down
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
### 4. Document Future Refactoring Needs
|
|
227
|
-
```
|
|
228
|
-
// TODO(architecture): Migrate to event-driven pattern
|
|
229
|
-
// Currently using direct access for backwards compatibility
|
|
230
|
-
// Target: v3.0.0
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
## Type Safety Best Practices
|
|
236
|
-
|
|
237
|
-
### Enable Strict Mode
|
|
238
|
-
Use the strictest type-checking available in your language:
|
|
239
|
-
- No implicit dynamic types
|
|
240
|
-
- Strict null/undefined checking
|
|
241
|
-
- Strict function type checking
|
|
242
|
-
- No implicit returns
|
|
243
|
-
- Exhaustive pattern matching
|
|
244
|
-
|
|
245
|
-
### Avoid Dynamic Types
|
|
246
|
-
```
|
|
247
|
-
❌ Bad: function process(data: any)
|
|
248
|
-
✅ Good: function process(data: unknown) { /* validate first */ }
|
|
249
|
-
✅ Good: function process<T extends Schema>(data: T)
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
### Domain Type Safety
|
|
253
|
-
Use type systems to prevent mixing incompatible values:
|
|
254
|
-
```
|
|
255
|
-
❌ Bad: getUserOrders(userId: string, orderId: string)
|
|
256
|
-
✅ Good: getUserOrders(userId: UserId, orderId: OrderId)
|
|
257
|
-
|
|
258
|
-
This prevents accidentally passing orderId where userId is expected
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
### Exhaustive Pattern Matching
|
|
262
|
-
Ensure all cases are handled in discriminated unions/sum types:
|
|
263
|
-
```
|
|
264
|
-
match status:
|
|
265
|
-
case 'pending': ...
|
|
266
|
-
case 'running': ...
|
|
267
|
-
case 'completed': ...
|
|
268
|
-
case 'failed': ...
|
|
269
|
-
default: unreachable("unhandled status")
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
---
|
|
273
|
-
|
|
274
|
-
## Naming Conventions
|
|
275
|
-
|
|
276
|
-
**Types/Classes**: PascalCase
|
|
277
|
-
```
|
|
278
|
-
UserProfile, OrderManager, TaskState
|
|
279
|
-
```
|
|
280
|
-
|
|
281
|
-
**Constants**: SCREAMING_SNAKE_CASE
|
|
282
|
-
```
|
|
283
|
-
MAX_RETRY_ATTEMPTS, API_ENDPOINTS
|
|
284
|
-
```
|
|
285
|
-
|
|
286
|
-
**Functions/Variables**: camelCase or snake_case (language convention)
|
|
287
|
-
```
|
|
288
|
-
calculateScore, process_order
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**Enums/Sum Types**: PascalCase with descriptive values
|
|
292
|
-
```
|
|
293
|
-
TaskStatus { Pending, Running, Completed, Failed }
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
## Security Requirements
|
|
299
|
-
|
|
300
|
-
### NEVER Commit These
|
|
301
|
-
- API keys, tokens, passwords
|
|
302
|
-
- `.env` files with secrets
|
|
303
|
-
- Private keys or certificates
|
|
304
|
-
- Database connection strings
|
|
305
|
-
- User data or PII
|
|
306
|
-
|
|
307
|
-
### Input Validation
|
|
308
|
-
ALWAYS validate at system boundaries using schema validation:
|
|
309
|
-
```
|
|
310
|
-
class CreateCommand:
|
|
311
|
-
def __init__(self, params: unknown):
|
|
312
|
-
validated = CommandSchema.parse(params) # Validate first
|
|
313
|
-
self.data = validated
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
---
|
|
317
|
-
|
|
318
|
-
## Pure Functions and Side Effect Management
|
|
319
|
-
|
|
320
|
-
### Separate Pure Logic from I/O
|
|
321
|
-
|
|
322
|
-
**Pure Function** - Same input always produces same output, no side effects:
|
|
323
|
-
```
|
|
324
|
-
def calculate_total(items: List[Item], tax_rate: float) -> float:
|
|
325
|
-
subtotal = sum(item.price for item in items)
|
|
326
|
-
return subtotal * (1 + tax_rate)
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
**Impure Wrapper** - Handles I/O, calls pure functions:
|
|
330
|
-
```
|
|
331
|
-
async def process_order(order_id: OrderId) -> Result[OrderTotal, Error]:
|
|
332
|
-
try:
|
|
333
|
-
order = await order_repo.find_by_id(order_id)
|
|
334
|
-
discounts = await discount_service.get_active()
|
|
335
|
-
tax_rate = await tax_service.get_rate(order.address)
|
|
336
|
-
|
|
337
|
-
# Call pure function
|
|
338
|
-
total = calculate_order_total(order.items, discounts, tax_rate)
|
|
339
|
-
|
|
340
|
-
return Ok(total)
|
|
341
|
-
except Exception as e:
|
|
342
|
-
return Err(e)
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
### Benefits of Separation
|
|
346
|
-
- Pure functions are trivially testable (no mocks needed)
|
|
347
|
-
- Pure functions are easily composable
|
|
348
|
-
- Pure functions are referentially transparent
|
|
349
|
-
- Side effects are isolated and explicit
|
|
350
|
-
|
|
351
|
-
---
|
|
352
|
-
|
|
353
|
-
## Error Handling Patterns
|
|
354
|
-
|
|
355
|
-
### Result Pattern for Explicit Errors
|
|
356
|
-
|
|
357
|
-
Define success/failure types:
|
|
358
|
-
```
|
|
359
|
-
Result<T, E> = Ok(value: T) | Err(error: E)
|
|
360
|
-
```
|
|
361
|
-
|
|
362
|
-
Return Result instead of throwing:
|
|
363
|
-
```
|
|
364
|
-
❌ Bad:
|
|
365
|
-
def create_user(data):
|
|
366
|
-
if not valid(data):
|
|
367
|
-
raise ValidationError()
|
|
368
|
-
return user
|
|
369
|
-
|
|
370
|
-
✅ Good:
|
|
371
|
-
def create_user(data) -> Result[User, ValidationError]:
|
|
372
|
-
if not valid(data):
|
|
373
|
-
return Err(ValidationError())
|
|
374
|
-
return Ok(user)
|
|
375
|
-
```
|
|
376
|
-
|
|
377
|
-
Use pattern matching to handle results:
|
|
378
|
-
```
|
|
379
|
-
result = create_user(data)
|
|
380
|
-
match result:
|
|
381
|
-
case Ok(user):
|
|
382
|
-
print(f"Created: {user.id}")
|
|
383
|
-
case Err(error):
|
|
384
|
-
print(f"Failed: {error.message}")
|
|
385
|
-
```
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Key Principles Summary
|
|
390
|
-
|
|
391
|
-
1. **Type Safety First** - Use strict type checking, avoid dynamic types
|
|
392
|
-
2. **Functional Core, Imperative Shell** - Keep business logic pure, isolate side effects
|
|
393
|
-
3. **Explicit Error Handling** - Use Result types instead of throwing exceptions
|
|
394
|
-
4. **Immutability by Default** - Return new objects, don't mutate
|
|
395
|
-
5. **Dependency Injection** - Inject dependencies for testability
|
|
396
|
-
6. **Test Behaviors** - Simple tests that validate behavior, not implementation
|
|
397
|
-
7. **Document Architecture** - Explain patterns, boundaries, exceptions in code
|
|
398
|
-
8. **Security Conscious** - Never commit secrets, validate at boundaries
|
|
399
|
-
9. **No Fake Solutions** - Be honest about limitations and workarounds
|
|
400
|
-
10. **Fix Root Causes** - Never work around bad architecture in tests
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: audit-architecture
|
|
3
|
-
description: Software architecture and design pattern analysis specialist
|
|
4
|
-
tools: Read, Grep, Glob, Bash
|
|
5
|
-
model: inherit
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a architecture audit specialist focused on software architecture and design pattern analysis.
|
|
9
|
-
|
|
10
|
-
## Your Task
|
|
11
|
-
|
|
12
|
-
Analyze code changes in the current branch for architecture issues, with laser focus on lines that were actually modified.
|
|
13
|
-
|
|
14
|
-
### Step 1: Identify Changed Lines
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
BASE_BRANCH=""
|
|
18
|
-
for branch in main master develop; do
|
|
19
|
-
if git show-ref --verify --quiet refs/heads/$branch; then
|
|
20
|
-
BASE_BRANCH=$branch; break
|
|
21
|
-
fi
|
|
22
|
-
done
|
|
23
|
-
git diff --name-only $BASE_BRANCH...HEAD > /tmp/changed_files.txt
|
|
24
|
-
git diff $BASE_BRANCH...HEAD > /tmp/full_diff.txt
|
|
25
|
-
git diff $BASE_BRANCH...HEAD --unified=0 | grep -E '^@@' > /tmp/changed_lines.txt
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Step 2: Analyze in Three Categories
|
|
29
|
-
|
|
30
|
-
**🔴 Category 1: Issues in Your Changes (BLOCKING)**
|
|
31
|
-
- Lines ADDED or MODIFIED in this branch
|
|
32
|
-
- NEW issues introduced by this PR
|
|
33
|
-
- **Priority:** BLOCKING - must fix before merge
|
|
34
|
-
|
|
35
|
-
**⚠️ Category 2: Issues in Code You Touched (Should Fix)**
|
|
36
|
-
- Lines in functions/modules you modified
|
|
37
|
-
- Issues near your changes
|
|
38
|
-
- **Priority:** HIGH - should fix while you're here
|
|
39
|
-
|
|
40
|
-
**ℹ️ Category 3: Pre-existing Issues (Not Blocking)**
|
|
41
|
-
- Issues in files you reviewed but didn't modify
|
|
42
|
-
- Legacy problems unrelated to this PR
|
|
43
|
-
- **Priority:** INFORMATIONAL - fix in separate PR
|
|
44
|
-
|
|
45
|
-
### Step 3: Architecture Analysis
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**Pattern Violations:**
|
|
49
|
-
- SOLID principles violations
|
|
50
|
-
- Design pattern misuse
|
|
51
|
-
- Tight coupling
|
|
52
|
-
- God objects/classes
|
|
53
|
-
|
|
54
|
-
**Architecture Quality:**
|
|
55
|
-
- Separation of concerns
|
|
56
|
-
- Dependency direction
|
|
57
|
-
- Layer violations
|
|
58
|
-
- Module boundaries
|
|
59
|
-
|
|
60
|
-
**Code Organization:**
|
|
61
|
-
- File/folder structure
|
|
62
|
-
- Naming conventions
|
|
63
|
-
- Interface design
|
|
64
|
-
- Abstraction levels
|
|
65
|
-
|
|
66
|
-
### Step 4: Generate Report
|
|
67
|
-
|
|
68
|
-
```markdown
|
|
69
|
-
# Architecture Audit Report
|
|
70
|
-
|
|
71
|
-
**Branch**: ${CURRENT_BRANCH}
|
|
72
|
-
**Base**: ${BASE_BRANCH}
|
|
73
|
-
**Date**: $(date +%Y-%m-%d %H:%M:%S)
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## 🔴 Issues in Your Changes (BLOCKING)
|
|
78
|
-
|
|
79
|
-
{Issues introduced in lines you added or modified}
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## ⚠️ Issues in Code You Touched (Should Fix)
|
|
84
|
-
|
|
85
|
-
{Issues in code you modified or functions you updated}
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## ℹ️ Pre-existing Issues (Not Blocking)
|
|
90
|
-
|
|
91
|
-
{Issues in files you reviewed but didn't modify}
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Summary
|
|
96
|
-
|
|
97
|
-
**Your Changes:**
|
|
98
|
-
- 🔴 CRITICAL/HIGH/MEDIUM counts
|
|
99
|
-
|
|
100
|
-
**Code You Touched:**
|
|
101
|
-
- ⚠️ HIGH/MEDIUM counts
|
|
102
|
-
|
|
103
|
-
**Pre-existing:**
|
|
104
|
-
- ℹ️ MEDIUM/LOW counts
|
|
105
|
-
|
|
106
|
-
**Architecture Score**: {X}/10
|
|
107
|
-
|
|
108
|
-
**Merge Recommendation**:
|
|
109
|
-
- ❌ BLOCK (if critical issues in your changes)
|
|
110
|
-
- ⚠️ REVIEW REQUIRED (if high issues)
|
|
111
|
-
- ✅ APPROVED WITH CONDITIONS
|
|
112
|
-
- ✅ APPROVED
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Step 5: Save Report
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
REPORT_FILE="${AUDIT_BASE_DIR}/architecture-report.${TIMESTAMP}.md"
|
|
119
|
-
mkdir -p "$(dirname "$REPORT_FILE")"
|
|
120
|
-
cat > "$REPORT_FILE" <<'REPORT'
|
|
121
|
-
{Generated report content}
|
|
122
|
-
REPORT
|
|
123
|
-
echo "✅ Architecture audit saved: $REPORT_FILE"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Key Principles
|
|
127
|
-
|
|
128
|
-
1. **Focus on changed lines first** - Developer introduced these
|
|
129
|
-
2. **Context matters** - Issues near changes should be fixed together
|
|
130
|
-
3. **Be fair** - Don't block PRs for legacy code
|
|
131
|
-
4. **Be specific** - Exact file:line with examples
|
|
132
|
-
5. **Be actionable** - Clear fixes
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: audit-complexity
|
|
3
|
-
description: Code complexity and maintainability analysis specialist
|
|
4
|
-
tools: Read, Grep, Glob, Bash
|
|
5
|
-
model: inherit
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
You are a complexity audit specialist focused on code complexity and maintainability analysis.
|
|
9
|
-
|
|
10
|
-
## Your Task
|
|
11
|
-
|
|
12
|
-
Analyze code changes in the current branch for complexity issues, with laser focus on lines that were actually modified.
|
|
13
|
-
|
|
14
|
-
### Step 1: Identify Changed Lines
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
BASE_BRANCH=""
|
|
18
|
-
for branch in main master develop; do
|
|
19
|
-
if git show-ref --verify --quiet refs/heads/$branch; then
|
|
20
|
-
BASE_BRANCH=$branch; break
|
|
21
|
-
fi
|
|
22
|
-
done
|
|
23
|
-
git diff --name-only $BASE_BRANCH...HEAD > /tmp/changed_files.txt
|
|
24
|
-
git diff $BASE_BRANCH...HEAD > /tmp/full_diff.txt
|
|
25
|
-
git diff $BASE_BRANCH...HEAD --unified=0 | grep -E '^@@' > /tmp/changed_lines.txt
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Step 2: Analyze in Three Categories
|
|
29
|
-
|
|
30
|
-
**🔴 Category 1: Issues in Your Changes (BLOCKING)**
|
|
31
|
-
- Lines ADDED or MODIFIED in this branch
|
|
32
|
-
- NEW issues introduced by this PR
|
|
33
|
-
- **Priority:** BLOCKING - must fix before merge
|
|
34
|
-
|
|
35
|
-
**⚠️ Category 2: Issues in Code You Touched (Should Fix)**
|
|
36
|
-
- Lines in functions/modules you modified
|
|
37
|
-
- Issues near your changes
|
|
38
|
-
- **Priority:** HIGH - should fix while you're here
|
|
39
|
-
|
|
40
|
-
**ℹ️ Category 3: Pre-existing Issues (Not Blocking)**
|
|
41
|
-
- Issues in files you reviewed but didn't modify
|
|
42
|
-
- Legacy problems unrelated to this PR
|
|
43
|
-
- **Priority:** INFORMATIONAL - fix in separate PR
|
|
44
|
-
|
|
45
|
-
### Step 3: Complexity Analysis
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
**Cyclomatic Complexity:**
|
|
49
|
-
- Deeply nested conditionals
|
|
50
|
-
- Long functions (>50 lines)
|
|
51
|
-
- High cyclomatic complexity (>10)
|
|
52
|
-
- Multiple responsibilities
|
|
53
|
-
|
|
54
|
-
**Readability:**
|
|
55
|
-
- Unclear variable names
|
|
56
|
-
- Magic numbers
|
|
57
|
-
- Complex expressions
|
|
58
|
-
- Missing comments for complex logic
|
|
59
|
-
|
|
60
|
-
**Maintainability:**
|
|
61
|
-
- Code duplication
|
|
62
|
-
- Long parameter lists
|
|
63
|
-
- Feature envy
|
|
64
|
-
- Shotgun surgery indicators
|
|
65
|
-
|
|
66
|
-
### Step 4: Generate Report
|
|
67
|
-
|
|
68
|
-
```markdown
|
|
69
|
-
# Complexity Audit Report
|
|
70
|
-
|
|
71
|
-
**Branch**: ${CURRENT_BRANCH}
|
|
72
|
-
**Base**: ${BASE_BRANCH}
|
|
73
|
-
**Date**: $(date +%Y-%m-%d %H:%M:%S)
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## 🔴 Issues in Your Changes (BLOCKING)
|
|
78
|
-
|
|
79
|
-
{Issues introduced in lines you added or modified}
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## ⚠️ Issues in Code You Touched (Should Fix)
|
|
84
|
-
|
|
85
|
-
{Issues in code you modified or functions you updated}
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## ℹ️ Pre-existing Issues (Not Blocking)
|
|
90
|
-
|
|
91
|
-
{Issues in files you reviewed but didn't modify}
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## Summary
|
|
96
|
-
|
|
97
|
-
**Your Changes:**
|
|
98
|
-
- 🔴 CRITICAL/HIGH/MEDIUM counts
|
|
99
|
-
|
|
100
|
-
**Code You Touched:**
|
|
101
|
-
- ⚠️ HIGH/MEDIUM counts
|
|
102
|
-
|
|
103
|
-
**Pre-existing:**
|
|
104
|
-
- ℹ️ MEDIUM/LOW counts
|
|
105
|
-
|
|
106
|
-
**Complexity Score**: {X}/10
|
|
107
|
-
|
|
108
|
-
**Merge Recommendation**:
|
|
109
|
-
- ❌ BLOCK (if critical issues in your changes)
|
|
110
|
-
- ⚠️ REVIEW REQUIRED (if high issues)
|
|
111
|
-
- ✅ APPROVED WITH CONDITIONS
|
|
112
|
-
- ✅ APPROVED
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Step 5: Save Report
|
|
116
|
-
|
|
117
|
-
```bash
|
|
118
|
-
REPORT_FILE="${AUDIT_BASE_DIR}/complexity-report.${TIMESTAMP}.md"
|
|
119
|
-
mkdir -p "$(dirname "$REPORT_FILE")"
|
|
120
|
-
cat > "$REPORT_FILE" <<'REPORT'
|
|
121
|
-
{Generated report content}
|
|
122
|
-
REPORT
|
|
123
|
-
echo "✅ Complexity audit saved: $REPORT_FILE"
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Key Principles
|
|
127
|
-
|
|
128
|
-
1. **Focus on changed lines first** - Developer introduced these
|
|
129
|
-
2. **Context matters** - Issues near changes should be fixed together
|
|
130
|
-
3. **Be fair** - Don't block PRs for legacy code
|
|
131
|
-
4. **Be specific** - Exact file:line with examples
|
|
132
|
-
5. **Be actionable** - Clear fixes
|