devflow-kit 0.9.0 → 1.1.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 +197 -29
- package/LICENSE +1 -1
- package/README.md +185 -309
- package/dist/cli.js +7 -1
- package/dist/commands/ambient.d.ts +18 -0
- package/dist/commands/ambient.js +136 -0
- package/dist/commands/init.d.ts +23 -0
- package/dist/commands/init.js +393 -571
- package/dist/commands/list.d.ts +3 -0
- package/dist/commands/list.js +20 -0
- package/dist/commands/memory.d.ts +22 -0
- package/dist/commands/memory.js +175 -0
- package/dist/commands/uninstall.d.ts +10 -0
- package/dist/commands/uninstall.js +418 -78
- package/dist/plugins.d.ts +46 -0
- package/dist/plugins.js +169 -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 +80 -0
- package/dist/utils/post-install.js +508 -0
- package/dist/utils/safe-delete-install.d.ts +29 -0
- package/dist/utils/safe-delete-install.js +191 -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-ambient/.claude-plugin/plugin.json +7 -0
- package/plugins/devflow-ambient/README.md +49 -0
- package/plugins/devflow-ambient/commands/ambient.md +110 -0
- package/plugins/devflow-ambient/skills/ambient-router/SKILL.md +89 -0
- package/plugins/devflow-ambient/skills/ambient-router/references/skill-catalog.md +64 -0
- 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 +28 -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 +138 -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-driven-development/SKILL.md +139 -0
- package/plugins/devflow-core-skills/skills/test-driven-development/references/rationalization-prevention.md +111 -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/ambient-prompt.sh +48 -0
- package/scripts/hooks/background-memory-update.sh +208 -0
- package/scripts/hooks/ensure-memory-gitignore.sh +17 -0
- package/scripts/hooks/pre-compact-memory.sh +87 -0
- package/scripts/hooks/session-start-memory.sh +126 -0
- package/scripts/hooks/stop-update-memory.sh +85 -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/ambient-router/SKILL.md +89 -0
- package/shared/skills/ambient-router/references/skill-catalog.md +64 -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 +138 -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-driven-development/SKILL.md +139 -0
- package/shared/skills/test-driven-development/references/rationalization-prevention.md +111 -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 +160 -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/get-issue.md +0 -286
- 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 -493
- 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/get-issue.md +0 -16
- 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 -20
- 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
|
@@ -1,428 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-smell
|
|
3
|
-
description: Automatically detect anti-patterns, fake solutions, and workarounds when implementing functionality. Use when adding new features, reviewing code changes, or when suspicious patterns appear. Enforces honest, production-ready solutions.
|
|
4
|
-
allowed-tools: Read, Grep, Glob
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Code Smell Skill
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
Detect and prevent anti-patterns that indicate fake solutions or workarounds:
|
|
12
|
-
1. **Hardcoded data** - Simulating functionality instead of implementing
|
|
13
|
-
2. **Missing labels** - Workarounds without clear documentation
|
|
14
|
-
3. **Fake solutions** - Code that pretends to work but doesn't
|
|
15
|
-
4. **Magic values** - Unexplained constants and configuration
|
|
16
|
-
|
|
17
|
-
## When This Skill Activates
|
|
18
|
-
|
|
19
|
-
Automatically triggers when:
|
|
20
|
-
- New functionality is being implemented
|
|
21
|
-
- Code changes are being made
|
|
22
|
-
- Mock data or test fixtures appear outside tests
|
|
23
|
-
- Comments suggesting temporary solutions
|
|
24
|
-
- Configuration or constants are added
|
|
25
|
-
|
|
26
|
-
## Critical Anti-Patterns
|
|
27
|
-
|
|
28
|
-
### 1. Hardcoded Data Detection (FAKE SOLUTIONS)
|
|
29
|
-
|
|
30
|
-
**CRITICAL**: Never hardcode responses to simulate working functionality.
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
// ❌ VIOLATION: Fake solution pretending to work
|
|
34
|
-
async function getUserProfile(userId: string): Promise<UserProfile> {
|
|
35
|
-
// HACK: Hardcoded response until API is ready
|
|
36
|
-
return {
|
|
37
|
-
id: userId,
|
|
38
|
-
name: "John Doe",
|
|
39
|
-
email: "john@example.com",
|
|
40
|
-
avatar: "https://example.com/default.jpg"
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// ❌ VIOLATION: Mock data masquerading as real functionality
|
|
45
|
-
async function fetchRecommendations(userId: string): Promise<Product[]> {
|
|
46
|
-
// TODO: Connect to recommendation engine
|
|
47
|
-
return [
|
|
48
|
-
{ id: "1", name: "Product 1", price: 99.99 },
|
|
49
|
-
{ id: "2", name: "Product 2", price: 149.99 }
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// ✅ CORRECT: Honest implementation or explicit mock
|
|
54
|
-
async function getUserProfile(userId: string): Promise<Result<UserProfile, Error>> {
|
|
55
|
-
try {
|
|
56
|
-
const response = await api.get(`/users/${userId}`);
|
|
57
|
-
return { ok: true, value: response.data };
|
|
58
|
-
} catch (error) {
|
|
59
|
-
return { ok: false, error };
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// ✅ CORRECT: Clearly labeled mock for testing
|
|
64
|
-
// MOCK: For development only, not production-ready
|
|
65
|
-
async function getUserProfileMock(userId: string): Promise<UserProfile> {
|
|
66
|
-
return {
|
|
67
|
-
id: userId,
|
|
68
|
-
name: "Test User",
|
|
69
|
-
email: "test@example.com"
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
**Detection patterns:**
|
|
75
|
-
- Hardcoded return objects in business functions
|
|
76
|
-
- Static arrays/objects returned from "fetch" functions
|
|
77
|
-
- Functions with only return statements (no actual logic)
|
|
78
|
-
- Comments like "TODO: implement" with fake data below
|
|
79
|
-
- Default values that look like real data
|
|
80
|
-
|
|
81
|
-
### 2. Missing Label Detection (UNDOCUMENTED WORKAROUNDS)
|
|
82
|
-
|
|
83
|
-
**CRITICAL**: All workarounds, hacks, and temporary solutions MUST be labeled.
|
|
84
|
-
|
|
85
|
-
```typescript
|
|
86
|
-
// ❌ VIOLATION: Workaround without label
|
|
87
|
-
function processPayment(amount: number): boolean {
|
|
88
|
-
// Skip validation for now
|
|
89
|
-
return true;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// ❌ VIOLATION: Temporary fix without documentation
|
|
93
|
-
async function syncData() {
|
|
94
|
-
await sleep(1000); // Wait for previous operation
|
|
95
|
-
await performSync();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// ❌ VIOLATION: Hack without explanation
|
|
99
|
-
function getUserPermissions(userId: string): string[] {
|
|
100
|
-
if (userId === "admin") return ["*"]; // Give admin all permissions
|
|
101
|
-
return ["read"];
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// ✅ CORRECT: Clearly labeled workaround
|
|
105
|
-
function processPayment(amount: number): boolean {
|
|
106
|
-
// TEMPORARY: Validation disabled until payment gateway integration complete
|
|
107
|
-
// TODO: Add amount validation, currency checks, fraud detection
|
|
108
|
-
// Target: Sprint 23 (2025-11-15)
|
|
109
|
-
// Ticket: PAY-456
|
|
110
|
-
return true;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// ✅ CORRECT: Documented hack with rationale
|
|
114
|
-
async function syncData() {
|
|
115
|
-
// HACK: Sleep required due to race condition in legacy sync system
|
|
116
|
-
// Root cause: Event system doesn't guarantee order
|
|
117
|
-
// Proper fix: Implement event sequencing (3-week effort)
|
|
118
|
-
// Acceptable: Race condition occurs <0.1% of operations
|
|
119
|
-
await sleep(1000);
|
|
120
|
-
await performSync();
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// ✅ CORRECT: Explicit exception with justification
|
|
124
|
-
function getUserPermissions(userId: string): string[] {
|
|
125
|
-
// ARCHITECTURE EXCEPTION: Hardcoded admin check
|
|
126
|
-
// Justification: Permission system must work if database is down
|
|
127
|
-
// Security review: Approved 2025-09-01 (ticket SEC-789)
|
|
128
|
-
if (userId === "admin") return ["*"];
|
|
129
|
-
return ["read"];
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Required labels:**
|
|
134
|
-
- `HACK:` - Workaround for specific problem
|
|
135
|
-
- `MOCK:` - Fake data for testing/development
|
|
136
|
-
- `TODO:` - Work that needs to be done
|
|
137
|
-
- `TEMPORARY:` - Short-term solution with deadline
|
|
138
|
-
- `NOT-PRODUCTION:` - Code that should never ship
|
|
139
|
-
- `ARCHITECTURE EXCEPTION:` - Violates pattern with justification
|
|
140
|
-
|
|
141
|
-
**Detection patterns:**
|
|
142
|
-
- Comments without required labels
|
|
143
|
-
- Suspicious code without documentation
|
|
144
|
-
- Empty catch blocks without explanation
|
|
145
|
-
- Early returns without rationale
|
|
146
|
-
- Magic numbers without explanation
|
|
147
|
-
|
|
148
|
-
### 3. Fake Functionality Detection (DECEPTIVE CODE)
|
|
149
|
-
|
|
150
|
-
**CRITICAL**: Code must actually work or be clearly marked as non-functional.
|
|
151
|
-
|
|
152
|
-
```typescript
|
|
153
|
-
// ❌ VIOLATION: Pretending to validate but doing nothing
|
|
154
|
-
function validateEmail(email: string): boolean {
|
|
155
|
-
// Just accept anything for now
|
|
156
|
-
return true;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
// ❌ VIOLATION: Fake error handling
|
|
160
|
-
async function sendEmail(to: string, subject: string, body: string): Promise<void> {
|
|
161
|
-
try {
|
|
162
|
-
// TODO: Implement SMTP
|
|
163
|
-
console.log(`Email sent to ${to}`);
|
|
164
|
-
} catch (error) {
|
|
165
|
-
// Ignore errors
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// ❌ VIOLATION: Simulated async operation
|
|
170
|
-
async function fetchData(url: string): Promise<any> {
|
|
171
|
-
await new Promise(resolve => setTimeout(resolve, 100)); // Fake loading time
|
|
172
|
-
return { success: true, data: [] }; // Fake response
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
// ✅ CORRECT: Honest unimplemented function
|
|
176
|
-
function validateEmail(email: string): Result<boolean, Error> {
|
|
177
|
-
return {
|
|
178
|
-
ok: false,
|
|
179
|
-
error: new Error('NOT-IMPLEMENTED: Email validation pending regex pattern approval')
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
// ✅ CORRECT: Real implementation or clear mock
|
|
184
|
-
// MOCK: Email service for development (replace before production)
|
|
185
|
-
async function sendEmailMock(to: string, subject: string, body: string): Promise<Result<void, Error>> {
|
|
186
|
-
console.log(`[MOCK EMAIL] To: ${to}, Subject: ${subject}`);
|
|
187
|
-
return { ok: true, value: undefined };
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
// Real implementation
|
|
191
|
-
async function sendEmailReal(to: string, subject: string, body: string): Promise<Result<void, Error>> {
|
|
192
|
-
try {
|
|
193
|
-
await smtpClient.send({ to, subject, body });
|
|
194
|
-
return { ok: true, value: undefined };
|
|
195
|
-
} catch (error) {
|
|
196
|
-
return { ok: false, error: error as Error };
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
**Detection patterns:**
|
|
202
|
-
- Functions that return `true` with no logic
|
|
203
|
-
- Empty try/catch blocks
|
|
204
|
-
- Console.log masquerading as functionality
|
|
205
|
-
- setTimeout used to simulate async operations
|
|
206
|
-
- Functions with only TODO comments inside
|
|
207
|
-
|
|
208
|
-
### 4. Magic Value Detection (UNEXPLAINED CONSTANTS)
|
|
209
|
-
|
|
210
|
-
**CRITICAL**: All magic values must be explained with constants or comments.
|
|
211
|
-
|
|
212
|
-
```typescript
|
|
213
|
-
// ❌ VIOLATION: Magic numbers
|
|
214
|
-
function calculateDiscount(price: number, userLevel: number): number {
|
|
215
|
-
if (userLevel >= 5) {
|
|
216
|
-
return price * 0.15;
|
|
217
|
-
} else if (userLevel >= 3) {
|
|
218
|
-
return price * 0.10;
|
|
219
|
-
}
|
|
220
|
-
return 0;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
// ❌ VIOLATION: Magic strings
|
|
224
|
-
function getUserRole(userId: string): string {
|
|
225
|
-
const user = getUser(userId);
|
|
226
|
-
if (user.permissions.includes("admin_access")) {
|
|
227
|
-
return "admin";
|
|
228
|
-
}
|
|
229
|
-
return "user";
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
// ❌ VIOLATION: Magic configuration
|
|
233
|
-
setTimeout(() => {
|
|
234
|
-
retryOperation();
|
|
235
|
-
}, 5000);
|
|
236
|
-
|
|
237
|
-
// ✅ CORRECT: Named constants with documentation
|
|
238
|
-
const USER_LEVEL_THRESHOLD = {
|
|
239
|
-
PREMIUM: 5, // Premium tier: $50/month subscribers
|
|
240
|
-
STANDARD: 3, // Standard tier: $20/month subscribers
|
|
241
|
-
FREE: 0 // Free tier
|
|
242
|
-
} as const;
|
|
243
|
-
|
|
244
|
-
const DISCOUNT_RATE = {
|
|
245
|
-
PREMIUM: 0.15, // 15% discount for premium users
|
|
246
|
-
STANDARD: 0.10, // 10% discount for standard users
|
|
247
|
-
NONE: 0
|
|
248
|
-
} as const;
|
|
249
|
-
|
|
250
|
-
function calculateDiscount(price: number, userLevel: number): number {
|
|
251
|
-
if (userLevel >= USER_LEVEL_THRESHOLD.PREMIUM) {
|
|
252
|
-
return price * DISCOUNT_RATE.PREMIUM;
|
|
253
|
-
} else if (userLevel >= USER_LEVEL_THRESHOLD.STANDARD) {
|
|
254
|
-
return price * DISCOUNT_RATE.STANDARD;
|
|
255
|
-
}
|
|
256
|
-
return DISCOUNT_RATE.NONE;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
// ✅ CORRECT: Explicit role constants
|
|
260
|
-
enum UserRole {
|
|
261
|
-
ADMIN = "admin",
|
|
262
|
-
USER = "user"
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
const PERMISSION_ROLE_MAP = {
|
|
266
|
-
"admin_access": UserRole.ADMIN,
|
|
267
|
-
"user_access": UserRole.USER
|
|
268
|
-
} as const;
|
|
269
|
-
|
|
270
|
-
// ✅ CORRECT: Configuration with rationale
|
|
271
|
-
const RETRY_CONFIG = {
|
|
272
|
-
// Retry after 5 seconds to allow rate limit reset
|
|
273
|
-
// Based on API documentation: 10 requests per minute
|
|
274
|
-
DELAY_MS: 5000,
|
|
275
|
-
MAX_ATTEMPTS: 3
|
|
276
|
-
} as const;
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
**Detection patterns:**
|
|
280
|
-
- Numeric literals in business logic (except 0, 1, -1)
|
|
281
|
-
- String literals compared in conditionals
|
|
282
|
-
- Unexplained timeouts or delays
|
|
283
|
-
- Array indices without explanation
|
|
284
|
-
- Percentage or ratio calculations without constants
|
|
285
|
-
|
|
286
|
-
## Code Smell Report Format
|
|
287
|
-
|
|
288
|
-
```markdown
|
|
289
|
-
🚨 CODE SMELLS DETECTED
|
|
290
|
-
|
|
291
|
-
## 🔴 CRITICAL - Fake Solution
|
|
292
|
-
**File**: src/services/user.ts:45
|
|
293
|
-
**Issue**: Hardcoded user data pretending to fetch from API
|
|
294
|
-
**Evidence**:
|
|
295
|
-
```typescript
|
|
296
|
-
async function getUserProfile(userId: string) {
|
|
297
|
-
return { id: userId, name: "John Doe", email: "john@example.com" };
|
|
298
|
-
}
|
|
299
|
-
```
|
|
300
|
-
**Problem**: This code pretends to work but returns fake data
|
|
301
|
-
**Impact**: Will fail in production, misleads other developers
|
|
302
|
-
**Action**: Either implement real API call or label as MOCK
|
|
303
|
-
|
|
304
|
-
## 🔴 CRITICAL - Unlabeled Workaround
|
|
305
|
-
**File**: src/utils/sync.ts:23
|
|
306
|
-
**Issue**: Sleep statement without explanation
|
|
307
|
-
**Evidence**:
|
|
308
|
-
```typescript
|
|
309
|
-
await sleep(1000);
|
|
310
|
-
await performSync();
|
|
311
|
-
```
|
|
312
|
-
**Problem**: Workaround without documentation of why it's needed
|
|
313
|
-
**Required**: Add HACK: label explaining race condition
|
|
314
|
-
**Action**: Document the workaround or fix the root cause
|
|
315
|
-
|
|
316
|
-
## 🔴 CRITICAL - Deceptive Validation
|
|
317
|
-
**File**: src/validation/email.ts:12
|
|
318
|
-
**Issue**: Validation function that doesn't validate
|
|
319
|
-
**Evidence**:
|
|
320
|
-
```typescript
|
|
321
|
-
function validateEmail(email: string): boolean {
|
|
322
|
-
return true; // Accept anything for now
|
|
323
|
-
}
|
|
324
|
-
```
|
|
325
|
-
**Problem**: Function name promises validation but does nothing
|
|
326
|
-
**Impact**: Security risk, data quality issues
|
|
327
|
-
**Action**: Implement validation or return NotImplementedError
|
|
328
|
-
|
|
329
|
-
## 🟡 HIGH - Magic Values
|
|
330
|
-
**File**: src/billing/discount.ts:34
|
|
331
|
-
**Issue**: Unexplained discount percentages
|
|
332
|
-
**Evidence**:
|
|
333
|
-
```typescript
|
|
334
|
-
if (userLevel >= 5) return price * 0.15;
|
|
335
|
-
```
|
|
336
|
-
**Problem**: Magic numbers without explanation
|
|
337
|
-
**Action**: Extract to named constants with documentation
|
|
338
|
-
|
|
339
|
-
## 📊 Summary
|
|
340
|
-
- **Critical**: 8 fake solutions detected
|
|
341
|
-
- **Critical**: 5 unlabeled workarounds
|
|
342
|
-
- **High**: 12 magic values
|
|
343
|
-
- **Files affected**: 9
|
|
344
|
-
|
|
345
|
-
## 🛑 HONESTY CHECK FAILED
|
|
346
|
-
|
|
347
|
-
This code violates the "NO FAKE SOLUTIONS" principle:
|
|
348
|
-
- Functions pretend to work but return hardcoded data
|
|
349
|
-
- Workarounds exist without clear documentation
|
|
350
|
-
- Magic values indicate rushed implementation
|
|
351
|
-
|
|
352
|
-
## ✅ Required Actions
|
|
353
|
-
|
|
354
|
-
1. **Label all workarounds** - Add HACK:/TEMPORARY:/MOCK: labels
|
|
355
|
-
2. **Remove fake solutions** - Implement real functionality or mark as NOT-PRODUCTION
|
|
356
|
-
3. **Document magic values** - Extract to named constants
|
|
357
|
-
4. **Be transparent** - If something doesn't work, say so clearly
|
|
358
|
-
|
|
359
|
-
## 🎯 Example Fix
|
|
360
|
-
|
|
361
|
-
Before:
|
|
362
|
-
```typescript
|
|
363
|
-
async function getRecommendations(userId: string) {
|
|
364
|
-
return [{ id: "1", name: "Product 1" }];
|
|
365
|
-
}
|
|
366
|
-
```
|
|
367
|
-
|
|
368
|
-
After (honest):
|
|
369
|
-
```typescript
|
|
370
|
-
// MOCK: Recommendations service not yet implemented
|
|
371
|
-
// TODO: Integrate with ML recommendation engine (ticket: REC-123)
|
|
372
|
-
// Target: Sprint 25
|
|
373
|
-
// NOT-PRODUCTION: This will fail in production
|
|
374
|
-
async function getRecommendationsMock(userId: string): Promise<Product[]> {
|
|
375
|
-
return [
|
|
376
|
-
{ id: "1", name: "Mock Product 1", price: 99.99 }
|
|
377
|
-
];
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
// Proper implementation
|
|
381
|
-
async function getRecommendations(userId: string): Promise<Result<Product[], Error>> {
|
|
382
|
-
return {
|
|
383
|
-
ok: false,
|
|
384
|
-
error: new Error('NOT-IMPLEMENTED: Awaiting ML service deployment')
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
```
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
## Integration with Quality Gates
|
|
391
|
-
|
|
392
|
-
This skill prevents:
|
|
393
|
-
- Merging fake functionality to main branch
|
|
394
|
-
- Deploying unlabeled workarounds to production
|
|
395
|
-
- Shipping code that pretends to work
|
|
396
|
-
- Accumulating technical debt without documentation
|
|
397
|
-
|
|
398
|
-
## Red Flags - Immediate Stop
|
|
399
|
-
|
|
400
|
-
Stop immediately if you detect:
|
|
401
|
-
- Multiple fake solutions in same PR
|
|
402
|
-
- Production code with MOCK: labels
|
|
403
|
-
- Security-critical functions returning true without logic
|
|
404
|
-
- Database operations with hardcoded responses
|
|
405
|
-
- API clients returning static data
|
|
406
|
-
|
|
407
|
-
## Success Criteria
|
|
408
|
-
|
|
409
|
-
Code passes smell check when:
|
|
410
|
-
- ✅ No hardcoded return data in business logic
|
|
411
|
-
- ✅ All workarounds have required labels
|
|
412
|
-
- ✅ All fake/mock code clearly marked
|
|
413
|
-
- ✅ Magic values extracted to named constants
|
|
414
|
-
- ✅ Comments include rationale and timeline
|
|
415
|
-
- ✅ Functions do what their names promise
|
|
416
|
-
|
|
417
|
-
## Philosophy Enforcement
|
|
418
|
-
|
|
419
|
-
This skill enforces the core principle:
|
|
420
|
-
|
|
421
|
-
**"NO FAKE SOLUTIONS - Never hardcode responses or data to simulate working functionality"**
|
|
422
|
-
|
|
423
|
-
Code must either:
|
|
424
|
-
1. Work correctly (real implementation)
|
|
425
|
-
2. Fail honestly (return error explaining what's missing)
|
|
426
|
-
3. Be clearly labeled (MOCK:, TEMPORARY:, NOT-PRODUCTION:)
|
|
427
|
-
|
|
428
|
-
No middle ground. No deception.
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: debug
|
|
3
|
-
description: Auto-launch systematic debugging when errors, crashes, or failures occur. Use when encountering exceptions, failed tests, build errors, or unexpected behavior that needs investigation.
|
|
4
|
-
allowed-tools: Task
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Debug Skill - Auto-Dispatcher
|
|
8
|
-
|
|
9
|
-
**Purpose**: Detect when systematic debugging is needed and auto-launch the debug agent.
|
|
10
|
-
|
|
11
|
-
## When to Activate
|
|
12
|
-
|
|
13
|
-
Auto-activates when:
|
|
14
|
-
- Errors or exceptions encountered
|
|
15
|
-
- Tests failing
|
|
16
|
-
- Build/compilation errors
|
|
17
|
-
- Application crashes
|
|
18
|
-
- Unexpected behavior needs investigation
|
|
19
|
-
- User mentions "broken", "not working", "failing"
|
|
20
|
-
|
|
21
|
-
## Lightweight Assessment
|
|
22
|
-
|
|
23
|
-
```markdown
|
|
24
|
-
Quick check (don't do heavy analysis):
|
|
25
|
-
1. Is this a simple typo/syntax error? → Fix inline
|
|
26
|
-
2. Is this a complex/unclear issue? → Launch debug agent
|
|
27
|
-
3. Are there multiple potential causes? → Launch debug agent
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Decision Logic
|
|
31
|
-
|
|
32
|
-
**Fix inline** (simple issues):
|
|
33
|
-
- Syntax errors with clear fix
|
|
34
|
-
- Typos in variable names
|
|
35
|
-
- Missing imports
|
|
36
|
-
- Simple logic errors
|
|
37
|
-
|
|
38
|
-
**Launch debug agent** (complex issues):
|
|
39
|
-
- Unknown root cause
|
|
40
|
-
- Multiple symptoms
|
|
41
|
-
- Intermittent failures
|
|
42
|
-
- Performance degradation
|
|
43
|
-
- System-level issues
|
|
44
|
-
- Requires investigation
|
|
45
|
-
|
|
46
|
-
## Auto-Launch Debug Agent
|
|
47
|
-
|
|
48
|
-
When debugging is needed:
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
I've detected [error type] that requires systematic debugging.
|
|
52
|
-
|
|
53
|
-
**Issue**: [brief description]
|
|
54
|
-
**Symptoms**: [what's happening]
|
|
55
|
-
|
|
56
|
-
Launching debug agent for systematic investigation...
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Then launch the debug agent using Task tool:
|
|
60
|
-
|
|
61
|
-
```
|
|
62
|
-
Task(
|
|
63
|
-
subagent_type="debug",
|
|
64
|
-
description="Debug systematic analysis",
|
|
65
|
-
prompt="Systematically debug the following issue: [issue description].
|
|
66
|
-
|
|
67
|
-
Current symptoms: [symptoms]
|
|
68
|
-
Error messages: [if any]
|
|
69
|
-
Context: [relevant context]"
|
|
70
|
-
)
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## Post-Agent Summary
|
|
74
|
-
|
|
75
|
-
After agent completes, summarize key findings:
|
|
76
|
-
|
|
77
|
-
```markdown
|
|
78
|
-
🔍 **Debug Session Complete**
|
|
79
|
-
|
|
80
|
-
**Root Cause**: [from agent findings]
|
|
81
|
-
**Fix Applied**: [solution]
|
|
82
|
-
**Prevention**: [how to avoid]
|
|
83
|
-
**Documentation**: `.docs/debug/[session-id].md`
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Examples
|
|
87
|
-
|
|
88
|
-
**Example 1: Simple - Fix Inline**
|
|
89
|
-
```
|
|
90
|
-
User: "Getting error: Cannot find module 'fs'"
|
|
91
|
-
Skill: "Missing import. Adding: import fs from 'fs'"
|
|
92
|
-
[Fixes inline, no agent needed]
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
**Example 2: Complex - Launch Agent**
|
|
96
|
-
```
|
|
97
|
-
User: "Tests passing locally but failing in CI"
|
|
98
|
-
Skill: "This requires investigation of environment differences.
|
|
99
|
-
Launching debug agent..."
|
|
100
|
-
[Launches debug agent for systematic analysis]
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
**Example 3: Unclear - Launch Agent**
|
|
104
|
-
```
|
|
105
|
-
User: "App crashes randomly after 5 minutes"
|
|
106
|
-
Skill: "Intermittent crash requires systematic debugging.
|
|
107
|
-
Launching debug agent to investigate..."
|
|
108
|
-
[Launches debug agent]
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Key Points
|
|
112
|
-
|
|
113
|
-
- **Lightweight**: Skill does minimal assessment (~20 lines)
|
|
114
|
-
- **Smart dispatch**: Knows when to fix vs investigate
|
|
115
|
-
- **No heavy analysis**: Delegates to debug agent
|
|
116
|
-
- **Autonomous**: Auto-launches without asking
|
|
117
|
-
- **Clean context**: Main session stays focused
|
|
118
|
-
|
|
119
|
-
This keeps the main session clean while ensuring systematic debugging happens when needed.
|