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
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
# Correct Dependency Patterns
|
|
2
|
+
|
|
3
|
+
Best practices for dependency management.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Secure Version Pinning
|
|
8
|
+
|
|
9
|
+
### Exact Pinning (Most Secure)
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"express": "4.18.2",
|
|
15
|
+
"lodash": "4.17.21"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**When to use**: Production apps, security-critical dependencies
|
|
21
|
+
|
|
22
|
+
### Caret with Lockfile (Balanced)
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"express": "^4.18.2",
|
|
28
|
+
"typescript": "^5.3.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**When to use**: Most projects, allows patch updates
|
|
34
|
+
|
|
35
|
+
### Tilde for Patch-Only (Conservative)
|
|
36
|
+
|
|
37
|
+
```json
|
|
38
|
+
{
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"critical-lib": "~1.2.3"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**When to use**: When you need bug fixes but not new features
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Lockfile Management
|
|
50
|
+
|
|
51
|
+
### Commit Lockfile
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Always commit your lockfile
|
|
55
|
+
git add package-lock.json
|
|
56
|
+
git add yarn.lock
|
|
57
|
+
git add pnpm-lock.yaml
|
|
58
|
+
|
|
59
|
+
# CI should use frozen installs
|
|
60
|
+
npm ci # Not npm install
|
|
61
|
+
yarn --frozen-lockfile
|
|
62
|
+
pnpm install --frozen-lockfile
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Renovate/Dependabot Config
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
// renovate.json
|
|
69
|
+
{
|
|
70
|
+
"extends": ["config:base"],
|
|
71
|
+
"schedule": ["before 9am on Monday"],
|
|
72
|
+
"packageRules": [
|
|
73
|
+
{
|
|
74
|
+
"matchPackagePatterns": ["*"],
|
|
75
|
+
"groupName": "all dependencies",
|
|
76
|
+
"groupSlug": "all"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"matchUpdateTypes": ["patch", "minor"],
|
|
80
|
+
"automerge": true
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Dependency Auditing
|
|
89
|
+
|
|
90
|
+
### Regular Audit Workflow
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Weekly audit
|
|
94
|
+
npm audit
|
|
95
|
+
|
|
96
|
+
# Fix automatically what's safe
|
|
97
|
+
npm audit fix
|
|
98
|
+
|
|
99
|
+
# Manual review for breaking changes
|
|
100
|
+
npm audit fix --dry-run
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Pre-commit Hook
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
// package.json
|
|
107
|
+
{
|
|
108
|
+
"scripts": {
|
|
109
|
+
"preinstall": "npm audit --audit-level=high"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### CI Pipeline Check
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
# GitHub Actions
|
|
118
|
+
- name: Security audit
|
|
119
|
+
run: npm audit --audit-level=high
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Minimal Dependencies
|
|
125
|
+
|
|
126
|
+
### Native Alternatives
|
|
127
|
+
|
|
128
|
+
| Instead of | Use Native |
|
|
129
|
+
|------------|------------|
|
|
130
|
+
| `moment` | `Intl.DateTimeFormat`, `date-fns` |
|
|
131
|
+
| `lodash` (full) | Native methods, `lodash-es` (tree-shake) |
|
|
132
|
+
| `left-pad` | `String.prototype.padStart()` |
|
|
133
|
+
| `is-array` | `Array.isArray()` |
|
|
134
|
+
| `is-number` | `typeof x === 'number'` |
|
|
135
|
+
|
|
136
|
+
### Tree-Shaking Imports
|
|
137
|
+
|
|
138
|
+
```typescript
|
|
139
|
+
// AVOID: Imports entire library
|
|
140
|
+
import _ from 'lodash';
|
|
141
|
+
_.debounce(fn, 100);
|
|
142
|
+
|
|
143
|
+
// BETTER: Import only what you need
|
|
144
|
+
import debounce from 'lodash/debounce';
|
|
145
|
+
debounce(fn, 100);
|
|
146
|
+
|
|
147
|
+
// BEST: Use ESM for tree-shaking
|
|
148
|
+
import { debounce } from 'lodash-es';
|
|
149
|
+
debounce(fn, 100);
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## License Compliance
|
|
155
|
+
|
|
156
|
+
### License Whitelist
|
|
157
|
+
|
|
158
|
+
```json
|
|
159
|
+
// .licensrc.json
|
|
160
|
+
{
|
|
161
|
+
"whitelist": [
|
|
162
|
+
"MIT",
|
|
163
|
+
"ISC",
|
|
164
|
+
"BSD-2-Clause",
|
|
165
|
+
"BSD-3-Clause",
|
|
166
|
+
"Apache-2.0"
|
|
167
|
+
],
|
|
168
|
+
"blacklist": [
|
|
169
|
+
"GPL-3.0",
|
|
170
|
+
"AGPL-3.0"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### CI License Check
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# Check licenses in CI
|
|
179
|
+
npx license-checker --failOn "GPL-3.0;AGPL-3.0"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## Supply Chain Security
|
|
185
|
+
|
|
186
|
+
### Package Verification
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Verify package integrity
|
|
190
|
+
npm pack <package-name> --dry-run
|
|
191
|
+
|
|
192
|
+
# Check package signatures (npm v8.12+)
|
|
193
|
+
npm audit signatures
|
|
194
|
+
|
|
195
|
+
# Review before install
|
|
196
|
+
npm view <package-name>
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Minimal Attack Surface
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
// Use optional dependencies wisely
|
|
203
|
+
{
|
|
204
|
+
"dependencies": {
|
|
205
|
+
"core-lib": "^1.0.0"
|
|
206
|
+
},
|
|
207
|
+
"optionalDependencies": {
|
|
208
|
+
"platform-specific": "^1.0.0"
|
|
209
|
+
},
|
|
210
|
+
"devDependencies": {
|
|
211
|
+
"test-utils": "^1.0.0"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Dependency Review for PRs
|
|
217
|
+
|
|
218
|
+
```yaml
|
|
219
|
+
# GitHub Actions - dependency review
|
|
220
|
+
- name: Dependency Review
|
|
221
|
+
uses: actions/dependency-review-action@v3
|
|
222
|
+
with:
|
|
223
|
+
fail-on-severity: high
|
|
224
|
+
deny-licenses: GPL-3.0, AGPL-3.0
|
|
225
|
+
```
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# Extended Violation Examples
|
|
2
|
+
|
|
3
|
+
Detailed examples of dependency violations by category.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Security Vulnerability Violations
|
|
8
|
+
|
|
9
|
+
### Known CVEs - Extended Examples
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Check for known vulnerabilities
|
|
13
|
+
npm audit
|
|
14
|
+
# or
|
|
15
|
+
yarn audit
|
|
16
|
+
# or
|
|
17
|
+
pnpm audit
|
|
18
|
+
|
|
19
|
+
# Output example:
|
|
20
|
+
# High: Prototype Pollution in lodash
|
|
21
|
+
# Package: lodash
|
|
22
|
+
# Dependency of: my-package
|
|
23
|
+
# Path: my-package > lodash
|
|
24
|
+
# More info: https://github.com/advisories/GHSA-xxx
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Vulnerable Version Ranges
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
// PROBLEM: Wide version range includes vulnerable versions
|
|
31
|
+
{
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"lodash": "^4.0.0" // Includes vulnerable 4.17.0-4.17.20
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// SOLUTION: Pin to safe version or use range excluding vulnerable
|
|
38
|
+
{
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"lodash": "^4.17.21" // First safe version
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Malicious Package Red Flags
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
// RED FLAGS for potentially malicious packages:
|
|
49
|
+
{
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"loadsh": "1.0.0", // Typosquat of "lodash"
|
|
52
|
+
"event-stream": "3.3.6", // Known compromised version
|
|
53
|
+
"random-unknown-pkg": "0.0.1" // No downloads, no repo
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// VERIFY packages:
|
|
58
|
+
// - Check npm page for download counts
|
|
59
|
+
// - Verify repository link
|
|
60
|
+
// - Check maintainer history
|
|
61
|
+
// - Look for typosquatting
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Version Management Violations
|
|
67
|
+
|
|
68
|
+
### Unpinned Versions
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
// PROBLEM: Can get different versions on each install
|
|
72
|
+
{
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"express": "*", // Any version!
|
|
75
|
+
"lodash": "latest", // Whatever is latest
|
|
76
|
+
"moment": "" // Empty = latest
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// SOLUTION: Pin exact or use caret with lockfile
|
|
81
|
+
{
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"express": "4.18.2", // Exact pin
|
|
84
|
+
"lodash": "^4.17.21", // Caret + lockfile
|
|
85
|
+
"moment": "~2.29.4" // Tilde for patch only
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Missing Lockfile
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# PROBLEM: No lockfile committed
|
|
94
|
+
.gitignore:
|
|
95
|
+
package-lock.json # Don't ignore this!
|
|
96
|
+
yarn.lock # Don't ignore this!
|
|
97
|
+
|
|
98
|
+
# SOLUTION: Commit lockfile
|
|
99
|
+
git add package-lock.json # or yarn.lock
|
|
100
|
+
git commit -m "Add lockfile for reproducible builds"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Dependency Conflicts
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# PROBLEM: Multiple versions of same package
|
|
107
|
+
npm ls react
|
|
108
|
+
# my-app
|
|
109
|
+
# +-- react@18.2.0
|
|
110
|
+
# \-- some-library
|
|
111
|
+
# \-- react@17.0.2 # Conflict!
|
|
112
|
+
|
|
113
|
+
# SOLUTION: Use resolutions/overrides
|
|
114
|
+
# package.json (yarn)
|
|
115
|
+
{
|
|
116
|
+
"resolutions": {
|
|
117
|
+
"react": "18.2.0"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
# package.json (npm)
|
|
122
|
+
{
|
|
123
|
+
"overrides": {
|
|
124
|
+
"react": "18.2.0"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Dependency Health Violations
|
|
132
|
+
|
|
133
|
+
### Outdated Packages
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Check for outdated
|
|
137
|
+
npm outdated
|
|
138
|
+
|
|
139
|
+
# Package Current Wanted Latest
|
|
140
|
+
# lodash 4.17.15 4.17.21 4.17.21 # Security update!
|
|
141
|
+
# typescript 4.9.5 4.9.5 5.3.2 # Major version
|
|
142
|
+
# @types/node 18.0.0 18.19.0 20.10.0 # Minor updates
|
|
143
|
+
|
|
144
|
+
# Prioritize:
|
|
145
|
+
# 1. Security patches (lodash)
|
|
146
|
+
# 2. Bug fixes (minor updates)
|
|
147
|
+
# 3. Major versions (careful review)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Unused Dependencies
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Find unused dependencies
|
|
154
|
+
npx depcheck
|
|
155
|
+
|
|
156
|
+
# Unused dependencies:
|
|
157
|
+
# * moment # Listed but never imported
|
|
158
|
+
# * lodash # Listed but never imported
|
|
159
|
+
|
|
160
|
+
# SOLUTION: Remove unused
|
|
161
|
+
npm uninstall moment lodash
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Unnecessary Heavy Dependencies
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
// PROBLEM: Heavy dependencies for simple tasks
|
|
168
|
+
{
|
|
169
|
+
"dependencies": {
|
|
170
|
+
"moment": "^2.29.4", // 300KB for date formatting
|
|
171
|
+
"lodash": "^4.17.21", // 70KB for one function
|
|
172
|
+
"left-pad": "^1.3.0" // 1KB for string padding
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// SOLUTION: Use native or lighter alternatives
|
|
177
|
+
// Native date formatting
|
|
178
|
+
new Date().toLocaleDateString();
|
|
179
|
+
|
|
180
|
+
// Native array methods instead of lodash
|
|
181
|
+
array.filter(x => x.active);
|
|
182
|
+
|
|
183
|
+
// Native string padding
|
|
184
|
+
'5'.padStart(2, '0');
|
|
185
|
+
|
|
186
|
+
// Or import only what you need
|
|
187
|
+
import { debounce } from 'lodash/debounce';
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## License Violations
|
|
193
|
+
|
|
194
|
+
### Incompatible Licenses
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
# Check licenses
|
|
198
|
+
npx license-checker --summary
|
|
199
|
+
|
|
200
|
+
# Watch for incompatible combinations:
|
|
201
|
+
# - GPL in MIT project (viral license)
|
|
202
|
+
# - Commercial-only licenses
|
|
203
|
+
# - AGPL in SaaS (requires source disclosure)
|
|
204
|
+
|
|
205
|
+
# Example problematic output:
|
|
206
|
+
# GPL-3.0: some-package # Requires your code to be GPL too!
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Missing License
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Find packages without license
|
|
213
|
+
npx license-checker --onlyunknown
|
|
214
|
+
|
|
215
|
+
# Packages with unknown license:
|
|
216
|
+
# - internal-company-pkg@1.0.0 # Verify this is intentional
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Supply Chain Violations
|
|
222
|
+
|
|
223
|
+
### Transitive Dependencies
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
# Check dependency tree depth
|
|
227
|
+
npm ls --all | wc -l
|
|
228
|
+
# If > 1000, high supply chain risk
|
|
229
|
+
|
|
230
|
+
# Audit transitive deps
|
|
231
|
+
npm audit --all
|
|
232
|
+
|
|
233
|
+
# SOLUTION: Minimize dependencies, audit regularly
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Maintainer Concerns
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
// RED FLAGS:
|
|
240
|
+
// - Package with 1 maintainer who's inactive
|
|
241
|
+
// - No recent releases but many open issues
|
|
242
|
+
// - Repository archived or deleted
|
|
243
|
+
// - Maintainer account compromised (check news)
|
|
244
|
+
|
|
245
|
+
// Check package health:
|
|
246
|
+
// https://snyk.io/advisor/npm-package/{package-name}
|
|
247
|
+
```
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: documentation-patterns
|
|
3
|
+
description: Documentation analysis patterns for code review. Detects doc drift from code changes, missing documentation for public APIs, stale comments, and misleading README sections. Loaded by Reviewer agent when focus=documentation.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
allowed-tools: Read, Grep, Glob
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Documentation Patterns
|
|
9
|
+
|
|
10
|
+
Domain expertise for documentation quality and alignment. Use alongside `review-methodology` for complete documentation reviews.
|
|
11
|
+
|
|
12
|
+
## Iron Law
|
|
13
|
+
|
|
14
|
+
> **DOCUMENTATION MUST MATCH REALITY**
|
|
15
|
+
>
|
|
16
|
+
> Outdated documentation is worse than no documentation. It actively misleads. Every code
|
|
17
|
+
> change that affects behavior requires a documentation check. Comments that explain "what"
|
|
18
|
+
> instead of "why" are noise. The best documentation is code that doesn't need documentation.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Documentation Categories
|
|
23
|
+
|
|
24
|
+
### 1. Code Documentation Issues
|
|
25
|
+
|
|
26
|
+
| Issue | Problem | Fix |
|
|
27
|
+
|-------|---------|-----|
|
|
28
|
+
| Missing docstrings | Complex functions without explanation | Add JSDoc with params, returns, throws |
|
|
29
|
+
| Outdated comments | Comments that contradict code | Update or remove |
|
|
30
|
+
| "What" comments | `// Loop through users` | Explain "why" instead |
|
|
31
|
+
| Magic algorithms | Complex logic without explanation | Document algorithm and rationale |
|
|
32
|
+
|
|
33
|
+
**Brief Example - Missing vs. Complete:**
|
|
34
|
+
```typescript
|
|
35
|
+
// BAD: No documentation on complex function
|
|
36
|
+
export function calculateProratedAmount(plan: Plan, startDate: Date, endDate: Date): number;
|
|
37
|
+
|
|
38
|
+
// GOOD: Purpose, params, returns, edge cases documented
|
|
39
|
+
/**
|
|
40
|
+
* Calculates prorated billing amount when switching plans mid-cycle.
|
|
41
|
+
* @param plan - The new plan to prorate to
|
|
42
|
+
* @returns Prorated amount in cents (can be negative for downgrades)
|
|
43
|
+
*/
|
|
44
|
+
export function calculateProratedAmount(plan: Plan, startDate: Date, endDate: Date): number;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2. API Documentation Issues
|
|
48
|
+
|
|
49
|
+
| Issue | Problem | Fix |
|
|
50
|
+
|-------|---------|-----|
|
|
51
|
+
| Missing params | Callers don't know valid values | Document all params with types and constraints |
|
|
52
|
+
| Missing returns | Return shape unknown | Describe return structure and units |
|
|
53
|
+
| Missing errors | Callers don't know what to catch | List all thrown error types |
|
|
54
|
+
|
|
55
|
+
**Brief Example - Incomplete vs. Complete:**
|
|
56
|
+
```typescript
|
|
57
|
+
// BAD: No params, no errors documented
|
|
58
|
+
/** Creates a subscription. */
|
|
59
|
+
async function createSubscription(userId: string, planId: string): Promise<Subscription>;
|
|
60
|
+
|
|
61
|
+
// GOOD: Full contract documented
|
|
62
|
+
/**
|
|
63
|
+
* @param userId - User's unique identifier
|
|
64
|
+
* @param planId - Plan ID from /plans endpoint
|
|
65
|
+
* @throws {UserNotFoundError} If userId doesn't exist
|
|
66
|
+
* @throws {PlanNotFoundError} If planId doesn't exist
|
|
67
|
+
*/
|
|
68
|
+
async function createSubscription(userId: string, planId: string): Promise<Subscription>;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 3. Alignment Issues
|
|
72
|
+
|
|
73
|
+
| Issue | Problem | Fix |
|
|
74
|
+
|-------|---------|-----|
|
|
75
|
+
| Code-comment drift | Comment says 3 retries, code does 5 | Update comment or use constant |
|
|
76
|
+
| Stale README | Examples use removed functions | Keep README in sync with code |
|
|
77
|
+
| Missing changelog | Breaking changes undocumented | Document all notable changes |
|
|
78
|
+
|
|
79
|
+
**Brief Example - Drift vs. Aligned:**
|
|
80
|
+
```typescript
|
|
81
|
+
// BAD: Comment doesn't match code
|
|
82
|
+
// Retries up to 3 times
|
|
83
|
+
for (let i = 0; i < 5; i++) { /* ... */ }
|
|
84
|
+
|
|
85
|
+
// GOOD: Use constant to keep aligned
|
|
86
|
+
const MAX_RETRIES = 5;
|
|
87
|
+
for (let i = 0; i < MAX_RETRIES; i++) { /* ... */ }
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Extended References
|
|
93
|
+
|
|
94
|
+
For extended examples and detection commands:
|
|
95
|
+
|
|
96
|
+
- **[references/violations.md](references/violations.md)** - Extended violation examples with explanations
|
|
97
|
+
- **[references/patterns.md](references/patterns.md)** - Complete correct pattern examples
|
|
98
|
+
- **[references/detection.md](references/detection.md)** - Bash commands for finding issues
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Severity Guidelines
|
|
103
|
+
|
|
104
|
+
| Severity | Description | Examples |
|
|
105
|
+
|----------|-------------|----------|
|
|
106
|
+
| **CRITICAL** | Actively misleading | Comments contradict code; API docs with wrong types; README with broken steps; Changelog missing breaking changes |
|
|
107
|
+
| **HIGH** | Significant gaps | Public APIs undocumented; Complex algorithms unexplained; Errors not documented; Migration guides missing |
|
|
108
|
+
| **MEDIUM** | Moderate issues | Some params undocumented; Examples could be clearer; "What" comments instead of "why" |
|
|
109
|
+
| **LOW** | Minor improvements | Could add more examples; Formatting inconsistencies; Typos |
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Documentation Checklist
|
|
114
|
+
|
|
115
|
+
Before approving changes:
|
|
116
|
+
|
|
117
|
+
- [ ] All public APIs have JSDoc/docstrings
|
|
118
|
+
- [ ] Parameters and return values documented
|
|
119
|
+
- [ ] Error conditions documented
|
|
120
|
+
- [ ] Complex algorithms explained
|
|
121
|
+
- [ ] Comments explain "why", not "what"
|
|
122
|
+
- [ ] README reflects current state
|
|
123
|
+
- [ ] CHANGELOG updated for notable changes
|
|
124
|
+
- [ ] No TODO comments for completed work
|
|
125
|
+
- [ ] Examples work with current API
|