codeforge-dev 1.5.8 → 1.8.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.
Files changed (176) hide show
  1. package/.devcontainer/.env +4 -5
  2. package/.devcontainer/.env.example +29 -0
  3. package/.devcontainer/.gitignore +8 -0
  4. package/.devcontainer/.secrets.example +12 -0
  5. package/.devcontainer/CHANGELOG.md +186 -0
  6. package/.devcontainer/CLAUDE.md +108 -21
  7. package/.devcontainer/README.md +173 -57
  8. package/.devcontainer/config/defaults/keybindings.json +5 -0
  9. package/.devcontainer/config/{main-system-prompt.md → defaults/main-system-prompt.md} +135 -2
  10. package/.devcontainer/config/{settings.json → defaults/settings.json} +25 -6
  11. package/.devcontainer/config/file-manifest.json +20 -0
  12. package/.devcontainer/devcontainer.json +38 -2
  13. package/.devcontainer/docs/configuration-reference.md +90 -0
  14. package/.devcontainer/docs/keybindings.md +100 -0
  15. package/.devcontainer/docs/optional-features.md +129 -0
  16. package/.devcontainer/docs/plugins.md +154 -0
  17. package/.devcontainer/docs/troubleshooting.md +128 -0
  18. package/.devcontainer/features/README.md +21 -7
  19. package/.devcontainer/features/agent-browser/install.sh +6 -0
  20. package/.devcontainer/features/ast-grep/install.sh +6 -0
  21. package/.devcontainer/features/biome/README.md +27 -0
  22. package/.devcontainer/features/biome/install.sh +6 -0
  23. package/.devcontainer/features/ccburn/README.md +60 -0
  24. package/.devcontainer/features/ccburn/devcontainer-feature.json +38 -0
  25. package/.devcontainer/features/ccburn/install.sh +180 -0
  26. package/.devcontainer/features/ccstatusline/README.md +22 -21
  27. package/.devcontainer/features/ccstatusline/devcontainer-feature.json +6 -1
  28. package/.devcontainer/features/ccstatusline/install.sh +55 -16
  29. package/.devcontainer/features/ccusage/install.sh +6 -0
  30. package/.devcontainer/features/claude-monitor/install.sh +6 -0
  31. package/.devcontainer/features/dprint/README.md +30 -0
  32. package/.devcontainer/features/dprint/devcontainer-feature.json +18 -0
  33. package/.devcontainer/features/dprint/install.sh +131 -0
  34. package/.devcontainer/features/hadolint/README.md +35 -0
  35. package/.devcontainer/features/hadolint/devcontainer-feature.json +13 -0
  36. package/.devcontainer/features/hadolint/install.sh +86 -0
  37. package/.devcontainer/features/lsp-servers/devcontainer-feature.json +5 -0
  38. package/.devcontainer/features/lsp-servers/install.sh +7 -0
  39. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +6 -1
  40. package/.devcontainer/features/mcp-qdrant/install.sh +13 -6
  41. package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +6 -1
  42. package/.devcontainer/features/mcp-reasoner/install.sh +8 -1
  43. package/.devcontainer/features/notify-hook/devcontainer-feature.json +5 -0
  44. package/.devcontainer/features/notify-hook/install.sh +7 -0
  45. package/.devcontainer/features/ruff/README.md +26 -0
  46. package/.devcontainer/features/ruff/devcontainer-feature.json +21 -0
  47. package/.devcontainer/features/ruff/install.sh +74 -0
  48. package/.devcontainer/features/shellcheck/README.md +38 -0
  49. package/.devcontainer/features/shellcheck/devcontainer-feature.json +13 -0
  50. package/.devcontainer/features/shellcheck/install.sh +24 -0
  51. package/.devcontainer/features/shfmt/README.md +37 -0
  52. package/.devcontainer/features/shfmt/devcontainer-feature.json +13 -0
  53. package/.devcontainer/features/shfmt/install.sh +85 -0
  54. package/.devcontainer/features/splitrail/devcontainer-feature.json +5 -0
  55. package/.devcontainer/features/splitrail/install.sh +7 -0
  56. package/.devcontainer/features/tmux/install.sh +8 -0
  57. package/.devcontainer/features/tree-sitter/install.sh +6 -0
  58. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +3 -10
  59. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +1 -1
  60. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/__pycache__/format-on-stop.cpython-314.pyc +0 -0
  61. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-on-stop.py +133 -13
  62. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/.claude-plugin/plugin.json +1 -1
  63. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +4 -5
  64. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/__pycache__/lint-file.cpython-314.pyc +0 -0
  65. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +477 -78
  66. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/.claude-plugin/plugin.json +1 -1
  67. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/AGENT-REDIRECTION.md +226 -0
  68. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/REVIEW-RUBRIC.md +440 -0
  69. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +207 -0
  70. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/bash-exec.md +173 -0
  71. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +146 -0
  72. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/debug-logs.md +2 -0
  73. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/dependency-analyst.md +250 -0
  74. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +246 -0
  75. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/explorer.md +237 -0
  76. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +134 -0
  77. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/git-archaeologist.md +242 -0
  78. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/migrator.md +201 -0
  79. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/perf-profiler.md +265 -0
  80. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/refactorer.md +213 -0
  81. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/researcher.md +195 -0
  82. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/security-auditor.md +289 -0
  83. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +297 -0
  84. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/statusline-config.md +188 -0
  85. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/test-writer.md +248 -0
  86. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +51 -0
  87. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/advisory-test-runner.cpython-314.pyc +0 -0
  88. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/collect-edited-files.cpython-314.pyc +0 -0
  89. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/commit-reminder.cpython-314.pyc +0 -0
  90. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/git-state-injector.cpython-314.pyc +0 -0
  91. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/guard-readonly-bash.cpython-314.pyc +0 -0
  92. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/redirect-builtin-agents.cpython-314.pyc +0 -0
  93. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
  94. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/syntax-validator.cpython-314.pyc +0 -0
  95. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/ticket-linker.cpython-314.pyc +0 -0
  96. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/todo-harvester.cpython-314.pyc +0 -0
  97. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-no-regression.cpython-314.pyc +0 -0
  98. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/verify-tests-pass.cpython-314.pyc +0 -0
  99. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/advisory-test-runner.py +174 -0
  100. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/collect-edited-files.py +8 -6
  101. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/commit-reminder.py +90 -0
  102. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +114 -0
  103. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/guard-readonly-bash.py +611 -0
  104. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/redirect-builtin-agents.py +83 -0
  105. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +146 -2
  106. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/syntax-validator.py +9 -4
  107. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/ticket-linker.py +137 -0
  108. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/todo-harvester.py +130 -0
  109. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/verify-no-regression.py +221 -0
  110. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/verify-tests-pass.py +176 -0
  111. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design/SKILL.md +224 -0
  112. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design/references/error-handling.md +166 -0
  113. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design/references/rest-conventions.md +215 -0
  114. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/ast-grep-patterns/SKILL.md +211 -0
  115. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/ast-grep-patterns/references/language-patterns.md +327 -0
  116. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/claude-agent-sdk/SKILL.md +599 -0
  117. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/claude-agent-sdk/references/sdk-typescript-reference.md +954 -0
  118. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/dependency-management/SKILL.md +134 -0
  119. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/dependency-management/references/ecosystem-commands.md +264 -0
  120. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/dependency-management/references/license-compliance.md +80 -0
  121. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/SKILL.md +153 -0
  122. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/references/api-doc-templates.md +221 -0
  123. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/references/docstring-formats.md +296 -0
  124. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics/SKILL.md +276 -0
  125. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics/references/advanced-commands.md +332 -0
  126. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/git-forensics/references/investigation-playbooks.md +319 -0
  127. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/migration-patterns/SKILL.md +150 -0
  128. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/migration-patterns/references/javascript-migrations.md +179 -0
  129. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/migration-patterns/references/python-migrations.md +141 -0
  130. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/performance-profiling/SKILL.md +341 -0
  131. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/performance-profiling/references/interpreting-results.md +235 -0
  132. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/performance-profiling/references/tool-commands.md +395 -0
  133. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/refactoring-patterns/SKILL.md +344 -0
  134. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/refactoring-patterns/references/safe-transformations.md +247 -0
  135. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/refactoring-patterns/references/smell-catalog.md +332 -0
  136. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/security-checklist/SKILL.md +277 -0
  137. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/security-checklist/references/owasp-patterns.md +269 -0
  138. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/security-checklist/references/secrets-patterns.md +253 -0
  139. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +320 -0
  140. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/references/criteria-patterns.md +245 -0
  141. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/references/ears-templates.md +239 -0
  142. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/__pycache__/block-dangerous.cpython-314.pyc +0 -0
  143. package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/hooks/hooks.json +1 -1
  144. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/__pycache__/guard-protected.cpython-314.pyc +0 -0
  145. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +40 -39
  146. package/.devcontainer/scripts/check-setup.sh +72 -0
  147. package/.devcontainer/scripts/setup-aliases.sh +51 -6
  148. package/.devcontainer/scripts/setup-auth.sh +74 -0
  149. package/.devcontainer/scripts/setup-config.sh +112 -20
  150. package/.devcontainer/scripts/setup-plugins.sh +38 -46
  151. package/.devcontainer/scripts/setup-projects.sh +175 -0
  152. package/.devcontainer/scripts/setup-symlink-claude.sh +36 -0
  153. package/.devcontainer/scripts/setup-update-claude.sh +19 -8
  154. package/.devcontainer/scripts/setup.sh +49 -14
  155. package/README.md +23 -190
  156. package/package.json +1 -1
  157. package/setup.js +245 -71
  158. package/.devcontainer/features/claude-code/README.md +0 -498
  159. package/.devcontainer/features/claude-code/config/settings.json +0 -36
  160. package/.devcontainer/features/claude-code/config/system-prompt.md +0 -118
  161. package/.devcontainer/features/claude-code/config/world-building-sp.md +0 -1432
  162. package/.devcontainer/features/claude-code/devcontainer-feature.json +0 -42
  163. package/.devcontainer/features/claude-code/install.sh +0 -466
  164. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/.claude-plugin/plugin.json +0 -7
  165. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/hooks/hooks.json +0 -17
  166. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/.claude-plugin/plugin.json +0 -6
  167. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/config/planning-instructions.md +0 -14
  168. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/functional-conjuring-map.md +0 -989
  169. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/hooks/hooks.json +0 -33
  170. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/__pycache__/post-enhance-task.cpython-314.pyc +0 -0
  171. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhance-planning.py +0 -71
  172. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-plan.sh +0 -68
  173. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-task.sh +0 -120
  174. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-plan.py +0 -133
  175. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-task.py +0 -253
  176. package/.devcontainer/scripts/setup-irie-claude.sh +0 -32
@@ -0,0 +1,134 @@
1
+ ---
2
+ name: dependency-management
3
+ description: >-
4
+ This skill should be used when the user asks to "check dependencies",
5
+ "audit dependencies", "find outdated packages", "check dependency health",
6
+ "scan for vulnerabilities", "find unused dependencies", "license check",
7
+ "npm audit", "pip audit", "cargo audit", or discusses dependency analysis,
8
+ supply chain security, package version gaps, or license compliance.
9
+ version: 0.1.0
10
+ ---
11
+
12
+ # Dependency Management
13
+
14
+ ## Mental Model
15
+
16
+ Dependency health is **ongoing hygiene**, not a one-time audit. Every dependency is a trust relationship — you inherit its bugs, vulnerabilities, and license obligations. Healthy projects monitor five dimensions continuously:
17
+
18
+ 1. **Currency** — How far behind are you? Major gaps accumulate breaking changes; patch gaps leave security holes open.
19
+ 2. **Security** — Are there known vulnerabilities? Severity × exploitability × exposure = actual risk.
20
+ 3. **Unused** — Dead dependencies increase attack surface and slow installs for zero value.
21
+ 4. **Conflicts** — Version mismatches cause subtle runtime bugs that are expensive to diagnose.
22
+ 5. **Licensing** — License obligations propagate transitively. One GPL dependency can change your distribution obligations.
23
+
24
+ Treat dependency updates like any other code change: assess, plan, execute, verify.
25
+
26
+ ---
27
+
28
+ ## Ecosystem Detection
29
+
30
+ Identify which package managers are in use before running any analysis. A project may span multiple ecosystems (e.g., Python backend + Node.js frontend).
31
+
32
+ | Ecosystem | Manifest Files | Lock Files |
33
+ |-----------|---------------|------------|
34
+ | **Node.js** | `package.json` | `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml` |
35
+ | **Python** | `pyproject.toml`, `setup.py`, `requirements*.txt`, `Pipfile` | `poetry.lock`, `uv.lock`, `Pipfile.lock` |
36
+ | **Rust** | `Cargo.toml` | `Cargo.lock` |
37
+ | **Go** | `go.mod` | `go.sum` |
38
+
39
+ Use `Glob` to discover manifests. Read each manifest to count direct dependencies before running analysis commands.
40
+
41
+ For monorepos, identify each workspace/package separately and analyze independently.
42
+
43
+ ---
44
+
45
+ ## Analysis Workflow
46
+
47
+ ### Phase 1: Outdated Packages
48
+
49
+ Check currency across all detected ecosystems. Categorize findings by version gap:
50
+
51
+ - **Major** — Likely breaking changes. Review changelog before upgrading.
52
+ - **Minor** — New features, generally low risk.
53
+ - **Patch** — Bug fixes and security patches. Upgrade promptly.
54
+
55
+ Prioritize patch-level upgrades first — they carry the least risk and often fix security issues.
56
+
57
+ ### Phase 2: Security Vulnerabilities
58
+
59
+ Run ecosystem-specific audit tools. For each finding, report:
60
+ - Package name and installed version
61
+ - Vulnerability ID (CVE, GHSA)
62
+ - Severity (critical / high / medium / low)
63
+ - Fixed version (if available)
64
+ - Whether it is a **direct** or **transitive** dependency
65
+
66
+ Direct dependencies are simpler to fix. Transitive vulnerabilities may require upgrading an intermediary package.
67
+
68
+ ### Phase 3: Unused Dependencies
69
+
70
+ Cross-reference manifest declarations with source imports:
71
+ 1. Read the manifest to list declared dependencies.
72
+ 2. Search for import/require statements across all source files.
73
+ 3. Flag packages with zero import matches as potentially unused.
74
+
75
+ Mark known implicit-use categories separately: plugins, CLI tools, type packages (`@types/*`), test frameworks in `devDependencies`, build tools, and runtime-loaded modules. These get a "verify manually" note rather than a definitive "unused" label.
76
+
77
+ ### Phase 4: Version Conflicts
78
+
79
+ Check for conflicting version requirements in the dependency tree. Peer dependency issues in Node.js, version resolution conflicts in Python, and duplicate packages at different versions all indicate problems.
80
+
81
+ ### Phase 5: License Compliance
82
+
83
+ Classify all dependency licenses and flag risk:
84
+ - **Permissive** (MIT, BSD, Apache-2.0, ISC) — Safe for all use.
85
+ - **Weak copyleft** (LGPL, MPL) — Safe as library, restrictions on modifications.
86
+ - **Strong copyleft** (GPL, AGPL) — May require source disclosure. Flag for commercial projects.
87
+ - **Unknown/Missing** — Flag for manual review. Unlicensed code carries legal risk.
88
+
89
+ ---
90
+
91
+ ## Version Gap Classification
92
+
93
+ | Gap | Risk | Action |
94
+ |-----|------|--------|
95
+ | Patch (0.0.x) | Low | Upgrade promptly — bug fixes and security patches |
96
+ | Minor (0.x.0) | Low–Medium | Review changelog, usually safe to upgrade |
97
+ | Major (x.0.0) | Medium–High | Review migration guide, test thoroughly |
98
+ | Multiple majors behind | High | Plan incremental upgrade path, one major at a time |
99
+
100
+ ---
101
+
102
+ ## Vulnerability Severity
103
+
104
+ CVSS scores provide a starting point but need context:
105
+
106
+ | CVSS Range | Label | Typical Action |
107
+ |------------|-------|---------------|
108
+ | 9.0–10.0 | Critical | Patch immediately. These often have active exploits. |
109
+ | 7.0–8.9 | High | Patch within days. Check if your usage triggers the vulnerability. |
110
+ | 4.0–6.9 | Medium | Patch within weeks. Assess exploitability in your context. |
111
+ | 0.1–3.9 | Low | Patch during regular maintenance. Low exploitability. |
112
+
113
+ A critical vulnerability in a transitive dependency used only in tests has lower effective risk than a medium vulnerability in a direct dependency exposed to user input. Always assess exploitability in context.
114
+
115
+ ---
116
+
117
+ ## Ambiguity Policy
118
+
119
+ | Ambiguity | Default |
120
+ |-----------|---------|
121
+ | **Scope not specified** | Run all five phases (outdated, security, unused, conflicts, licenses) |
122
+ | **Ecosystem not specified** | Analyze all detected ecosystems |
123
+ | **Severity threshold** | Report all severities, highlight critical and high |
124
+ | **Update recommendations** | Advisory only — never modify manifests or lock files |
125
+ | **Direct vs transitive** | Always distinguish; prioritize direct dependencies |
126
+
127
+ ---
128
+
129
+ ## Reference Files
130
+
131
+ | File | Contents |
132
+ |------|----------|
133
+ | [Ecosystem Commands](references/ecosystem-commands.md) | Per-ecosystem command tables for npm, pip/uv, cargo, and go — outdated checks, audits, unused detection, conflict checks, and license listing |
134
+ | [License Compliance](references/license-compliance.md) | License classification table, SPDX identifiers, commercial implications, common conflicts, and recommended actions per risk level |
@@ -0,0 +1,264 @@
1
+ # Ecosystem Commands Reference
2
+
3
+ Per-ecosystem command reference for dependency analysis. All commands are **read-only** — they inspect but never modify the project.
4
+
5
+ If a command is not found, note it as unavailable and skip. Do not attempt to install tools.
6
+
7
+ ---
8
+
9
+ ## Node.js (npm / yarn / pnpm)
10
+
11
+ ### Outdated Packages
12
+
13
+ ```bash
14
+ # npm
15
+ npm outdated 2>/dev/null || true
16
+
17
+ # yarn
18
+ yarn outdated 2>/dev/null || true
19
+
20
+ # pnpm
21
+ pnpm outdated 2>/dev/null || true
22
+ ```
23
+
24
+ Output columns: Package, Current, Wanted (semver-compatible), Latest (newest).
25
+
26
+ ### Security Audit
27
+
28
+ ```bash
29
+ # npm — structured output for parsing
30
+ npm audit --json 2>/dev/null || true
31
+
32
+ # npm — human-readable summary
33
+ npm audit 2>/dev/null || true
34
+
35
+ # yarn
36
+ yarn audit 2>/dev/null || true
37
+
38
+ # pnpm
39
+ pnpm audit 2>/dev/null || true
40
+ ```
41
+
42
+ ### Unused Detection
43
+
44
+ No built-in command. Cross-reference `package.json` dependencies with source imports:
45
+
46
+ ```bash
47
+ # List declared dependencies
48
+ node -e "const p=require('./package.json'); console.log(Object.keys(p.dependencies||{}).join('\n'))"
49
+
50
+ # Search for imports (use Grep tool, not bash grep)
51
+ # Pattern: require('pkg') or import ... from 'pkg'
52
+ ```
53
+
54
+ Known exceptions to flag as "verify manually":
55
+ - `@types/*` packages — TypeScript type definitions, no runtime import
56
+ - Packages in `devDependencies` used only by build/test tooling
57
+ - Babel/ESLint/Prettier plugins loaded by configuration
58
+ - `dotenv` and similar packages loaded via `-r` flag or preload
59
+
60
+ ### Version Conflicts
61
+
62
+ ```bash
63
+ # Check for peer dependency issues
64
+ npm ls 2>&1 | head -100 || true
65
+
66
+ # Check for duplicated packages
67
+ npm ls --all 2>/dev/null | head -200 || true
68
+ ```
69
+
70
+ ### License Listing
71
+
72
+ ```bash
73
+ # Using npx (no install needed)
74
+ npx license-checker --summary 2>/dev/null || true
75
+
76
+ # Detailed per-package
77
+ npx license-checker --json 2>/dev/null || true
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Python (pip / uv / poetry)
83
+
84
+ ### Outdated Packages
85
+
86
+ ```bash
87
+ # pip
88
+ pip list --outdated 2>/dev/null || true
89
+
90
+ # uv
91
+ uv pip list --outdated 2>/dev/null || true
92
+
93
+ # poetry
94
+ poetry show --outdated 2>/dev/null || true
95
+ ```
96
+
97
+ ### Security Audit
98
+
99
+ ```bash
100
+ # pip-audit (preferred)
101
+ pip-audit 2>/dev/null || true
102
+
103
+ # pip-audit with JSON output
104
+ pip-audit --format json 2>/dev/null || true
105
+
106
+ # safety (alternative)
107
+ safety check 2>/dev/null || true
108
+ ```
109
+
110
+ ### Unused Detection
111
+
112
+ Cross-reference manifest with source imports:
113
+
114
+ ```bash
115
+ # List declared dependencies from pyproject.toml
116
+ python3 -c "
117
+ import tomllib, pathlib
118
+ data = tomllib.loads(pathlib.Path('pyproject.toml').read_text())
119
+ deps = data.get('project', {}).get('dependencies', [])
120
+ for d in deps:
121
+ print(d.split('>=')[0].split('==')[0].split('<')[0].split('>')[0].split('~=')[0].strip())
122
+ " 2>/dev/null || true
123
+ ```
124
+
125
+ Then use Grep to search for `import pkg` or `from pkg import` across `.py` files.
126
+
127
+ Known exceptions: pytest plugins, mypy/ruff extensions, ASGI/WSGI servers (uvicorn, gunicorn), and packages used only in configuration files.
128
+
129
+ ### Version Conflicts
130
+
131
+ ```bash
132
+ # pip check for broken dependencies
133
+ pip check 2>/dev/null || true
134
+ ```
135
+
136
+ ### License Listing
137
+
138
+ ```bash
139
+ # pip-licenses
140
+ pip-licenses 2>/dev/null || true
141
+
142
+ # pip-licenses with format
143
+ pip-licenses --format=json 2>/dev/null || true
144
+ ```
145
+
146
+ ---
147
+
148
+ ## Rust (cargo)
149
+
150
+ ### Outdated Packages
151
+
152
+ ```bash
153
+ # Requires cargo-outdated
154
+ cargo outdated 2>/dev/null || true
155
+
156
+ # Alternative: check Cargo.toml against crates.io manually
157
+ cargo search <crate_name> 2>/dev/null || true
158
+ ```
159
+
160
+ ### Security Audit
161
+
162
+ ```bash
163
+ # Requires cargo-audit
164
+ cargo audit 2>/dev/null || true
165
+
166
+ # JSON output
167
+ cargo audit --json 2>/dev/null || true
168
+ ```
169
+
170
+ ### Unused Detection
171
+
172
+ ```bash
173
+ # Requires cargo-udeps (nightly)
174
+ cargo +nightly udeps 2>/dev/null || true
175
+ ```
176
+
177
+ If `cargo-udeps` is unavailable, cross-reference `Cargo.toml` `[dependencies]` with `use` statements in `src/**/*.rs`.
178
+
179
+ ### Version Conflicts
180
+
181
+ ```bash
182
+ # Check dependency tree for duplicates
183
+ cargo tree --duplicates 2>/dev/null || true
184
+ ```
185
+
186
+ ### License Listing
187
+
188
+ ```bash
189
+ # Requires cargo-license
190
+ cargo license 2>/dev/null || true
191
+
192
+ # Alternative: cargo-deny
193
+ cargo deny check licenses 2>/dev/null || true
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Go
199
+
200
+ ### Outdated Packages
201
+
202
+ ```bash
203
+ # List all dependencies with available updates
204
+ go list -u -m all 2>/dev/null || true
205
+ ```
206
+
207
+ ### Security Audit
208
+
209
+ ```bash
210
+ # Official Go vulnerability checker
211
+ govulncheck ./... 2>/dev/null || true
212
+ ```
213
+
214
+ ### Unused Detection
215
+
216
+ Go modules are imported explicitly. Check for modules in `go.mod` not imported in any `.go` file:
217
+
218
+ ```bash
219
+ # List declared modules
220
+ go list -m all 2>/dev/null | tail -n +2 || true
221
+
222
+ # Tidy check (would remove unused, but don't run with -v to avoid modifications)
223
+ # Instead, compare go.mod with actual imports via Grep
224
+ ```
225
+
226
+ ### Version Conflicts
227
+
228
+ Go uses minimum version selection — conflicts are rare. Check for replace directives that may mask issues:
229
+
230
+ ```bash
231
+ # Show replace directives
232
+ grep -n "replace" go.mod 2>/dev/null || true
233
+
234
+ # Verify module graph consistency
235
+ go mod verify 2>/dev/null || true
236
+ ```
237
+
238
+ ### License Listing
239
+
240
+ ```bash
241
+ # Requires go-licenses
242
+ go-licenses csv ./... 2>/dev/null || true
243
+
244
+ # Alternative: manual check via go.sum and module proxy
245
+ ```
246
+
247
+ ---
248
+
249
+ ## Error Handling
250
+
251
+ When a tool is not installed:
252
+ - Note it as **unavailable** in the report.
253
+ - Skip that check and proceed to the next.
254
+ - Suggest installation if the tool would provide significant value.
255
+ - Never attempt to install tools — that changes system state.
256
+
257
+ Common missing tools and alternatives:
258
+ | Tool | Ecosystem | Alternative |
259
+ |------|-----------|-------------|
260
+ | `cargo-audit` | Rust | Check RustSec advisory DB manually |
261
+ | `cargo-outdated` | Rust | `cargo search` per crate |
262
+ | `pip-audit` | Python | `safety check` |
263
+ | `govulncheck` | Go | Check Go vulnerability DB manually |
264
+ | `license-checker` | Node.js | Read `license` field from each `node_modules/*/package.json` |
@@ -0,0 +1,80 @@
1
+ # License Compliance Reference
2
+
3
+ ## License Classification
4
+
5
+ | Category | Licenses | SPDX IDs | Obligations |
6
+ |----------|----------|----------|-------------|
7
+ | **Permissive** | MIT, BSD 2-Clause, BSD 3-Clause, Apache 2.0, ISC, Unlicense, CC0, Zlib | `MIT`, `BSD-2-Clause`, `BSD-3-Clause`, `Apache-2.0`, `ISC`, `Unlicense`, `CC0-1.0`, `Zlib` | Attribution in LICENSE file. Minimal restrictions. |
8
+ | **Weak Copyleft** | LGPL 2.1, LGPL 3.0, MPL 2.0, EPL 2.0 | `LGPL-2.1-only`, `LGPL-3.0-only`, `MPL-2.0`, `EPL-2.0` | Modifications to the library itself must be shared. Using as a dependency is fine. |
9
+ | **Strong Copyleft** | GPL 2.0, GPL 3.0, AGPL 3.0 | `GPL-2.0-only`, `GPL-3.0-only`, `AGPL-3.0-only` | Derivative works must use the same license. AGPL extends to network use. |
10
+ | **Non-Commercial** | CC BY-NC, various | `CC-BY-NC-4.0` | Cannot use in commercial products. |
11
+ | **Unknown / Custom** | Proprietary, no license, custom terms | — | Requires legal review. No license = all rights reserved by default. |
12
+
13
+ ---
14
+
15
+ ## Commercial Usage Implications
16
+
17
+ ### Permissive Licenses (Low Risk)
18
+
19
+ Safe for all use cases including proprietary/commercial software. Main obligation is preserving copyright notices and license text, typically in a NOTICES or LICENSE file.
20
+
21
+ Apache 2.0 additionally includes a patent grant — it protects users from patent claims by contributors.
22
+
23
+ ### Weak Copyleft (Medium Risk)
24
+
25
+ Safe when used as a **library dependency** without modification. If you modify the library's source code, those modifications must be released under the same license. Dynamic linking is generally safe; static linking may trigger copyleft depending on the license.
26
+
27
+ **MPL 2.0** is file-level copyleft — only modified files need to be shared, not the entire project.
28
+
29
+ ### Strong Copyleft (High Risk)
30
+
31
+ **GPL**: Any software that links to or includes GPL code may be considered a derivative work, requiring the entire project to be released under GPL. This is incompatible with proprietary/closed-source distribution.
32
+
33
+ **AGPL**: Same as GPL, but also triggered by providing the software as a network service (SaaS). If users interact with AGPL code over a network, you must provide source code access.
34
+
35
+ **Impact on SaaS**: AGPL is the highest-risk license for SaaS products. A single AGPL dependency can require releasing your entire service's source code.
36
+
37
+ ### No License / Unknown
38
+
39
+ Code without a license defaults to **all rights reserved**. You have no legal right to use, modify, or distribute it. Flag these for immediate review and either:
40
+ - Contact the author to request a license
41
+ - Replace the dependency with a licensed alternative
42
+
43
+ ---
44
+
45
+ ## Common License Conflicts
46
+
47
+ | Combination | Compatible? | Notes |
48
+ |-------------|-------------|-------|
49
+ | MIT + Apache-2.0 | Yes | Both permissive, no conflict |
50
+ | MIT + GPL-3.0 | One-way | GPL project can include MIT code; MIT project cannot include GPL code without becoming GPL |
51
+ | Apache-2.0 + GPL-2.0 | No | Patent clause conflict. Apache-2.0 is compatible with GPL-3.0 but not GPL-2.0 |
52
+ | LGPL + Proprietary | Yes (with care) | Use as a library via dynamic linking. Do not modify LGPL source in your codebase |
53
+ | GPL + Proprietary | No | Cannot combine in a single distributed work |
54
+ | AGPL + SaaS | Problematic | Network use triggers source disclosure |
55
+ | Any + Unlicensed | No | No license = no permission to use |
56
+
57
+ ---
58
+
59
+ ## Recommended Actions by Risk Level
60
+
61
+ | Risk Level | Action |
62
+ |-----------|--------|
63
+ | **Permissive only** | No action needed. Ensure LICENSE/NOTICES file includes all attributions. |
64
+ | **Weak copyleft present** | Verify the dependency is used as a library without source modifications. Document in compliance notes. |
65
+ | **Strong copyleft present** | Escalate to legal/management. Evaluate whether the dependency can be replaced. Document the dependency chain. |
66
+ | **AGPL in SaaS context** | Treat as critical. Either replace the dependency or prepare for source disclosure. |
67
+ | **Unknown/missing license** | Block the dependency. Do not use code without explicit license grants. |
68
+ | **License changed in update** | Check license changes before upgrading — some packages have changed from permissive to restrictive between versions. |
69
+
70
+ ---
71
+
72
+ ## Detection Patterns
73
+
74
+ Search for license information in this order:
75
+ 1. `LICENSE`, `LICENSE.md`, `LICENSE.txt` in the package root
76
+ 2. `license` field in `package.json` (Node.js)
77
+ 3. `license` field in `Cargo.toml` (Rust)
78
+ 4. `License` classifier in `pyproject.toml` or `setup.py` (Python)
79
+ 5. SPDX identifier in source file headers
80
+ 6. Package registry metadata (npm registry, PyPI, crates.io)
@@ -0,0 +1,153 @@
1
+ ---
2
+ name: documentation-patterns
3
+ description: >-
4
+ This skill should be used when the user asks to "write a README",
5
+ "write documentation", "add docstrings", "add JSDoc", "document the API",
6
+ "create architecture docs", "documentation template", "update the docs",
7
+ or discusses docstring formats, README structure, API documentation,
8
+ inline comments, or technical writing patterns.
9
+ version: 0.1.0
10
+ ---
11
+
12
+ # Documentation Patterns
13
+
14
+ ## Mental Model
15
+
16
+ Documentation has **audiences**. README for new users, API docs for integrators, architecture docs for maintainers, inline docs for contributors. Wrong audience = wrong documentation. Before writing, identify who will read it and what they need to accomplish.
17
+
18
+ **Key principles:**
19
+ - **Accuracy over completeness.** Inaccurate documentation is worse than missing documentation. Only document behavior verified by reading code. Mark uncertainty with `TODO: verify`.
20
+ - **Audience determines format.** A README walks someone through getting started. An API reference lists every parameter with types. An architecture doc explains why decisions were made. Don't mix formats.
21
+ - **Code is the source of truth.** Never copy code into documentation — reference file paths instead. Copied snippets rot as soon as the source changes.
22
+ - **Concise, specific, active voice.** "Returns a list of users" not "A list of users is returned by this function." Cut filler words entirely.
23
+ - **Show, don't tell.** A working example communicates more than three paragraphs of explanation.
24
+
25
+ ---
26
+
27
+ ## Documentation Types and Audiences
28
+
29
+ | Type | Audience | Purpose | Format |
30
+ |------|----------|---------|--------|
31
+ | **README** | New users, evaluators | What is this? How do I use it? | Markdown, top-level |
32
+ | **API Reference** | Integrators, consumers | Every endpoint/function with types and examples | Markdown or OpenAPI |
33
+ | **Architecture** | Maintainers, new team members | How the system works and why | Markdown with diagrams |
34
+ | **Inline (docstrings)** | Contributors, IDE users | What this function does, parameters, returns | Language-specific format |
35
+ | **Changelog** | Users, upgraders | What changed between versions | Markdown, keep-a-changelog format |
36
+ | **Configuration** | Operators, deployers | All config options with types and defaults | Markdown table or .env.example |
37
+
38
+ ---
39
+
40
+ ## README Structure
41
+
42
+ Answer five questions, in order:
43
+
44
+ ### 1. What is this?
45
+
46
+ One paragraph. Project name, what it does, who it is for. No jargon. If someone reads only this paragraph, they should know whether to keep reading.
47
+
48
+ ### 2. How do I install it?
49
+
50
+ Prerequisites (with exact versions), installation steps, environment setup. Copy-pasteable commands.
51
+
52
+ ### 3. How do I use it?
53
+
54
+ Quick start example. Show the simplest possible usage that produces a visible result. Include the expected output.
55
+
56
+ ### 4. How do I configure it?
57
+
58
+ Table of configuration options: name, type, required/optional, default, description. Environment variables, config files, CLI flags.
59
+
60
+ ### 5. How do I contribute?
61
+
62
+ Development setup, how to run tests, how to submit changes. Link to CONTRIBUTING.md for details.
63
+
64
+ ---
65
+
66
+ ## Sizing Rules
67
+
68
+ Documentation files consumed by AI tools (CLAUDE.md, specs, architecture docs) should be **≤200 lines** each. Split large documents by concern. Each file should be independently useful.
69
+
70
+ For human-facing docs (README, API reference), there is no hard limit, but prefer shorter docs that link to detailed sub-pages over monolithic documents.
71
+
72
+ ---
73
+
74
+ ## Style Principles
75
+
76
+ 1. **Concise** — "To configure..." not "In order to configure...". Cut "basically", "simply", "just", "actually".
77
+ 2. **Specific** — Use exact types, values, and names. "`api_key` (string, required)" not "pass a key."
78
+ 3. **Accurate** — Document only verified behavior. Mark uncertainty with `TODO: verify`.
79
+ 4. **Active voice** — "The function returns a list" not "A list is returned."
80
+ 5. **Show, don't tell** — Code examples over prose explanations.
81
+ 6. **Consistent** — Match the project's existing documentation style for tense, format, and conventions.
82
+ 7. **Audience-appropriate** — README uses everyday language. API docs use technical precision. Architecture docs explain rationale.
83
+
84
+ ---
85
+
86
+ ## Inline Documentation Strategy
87
+
88
+ ### When to Document
89
+
90
+ Document every **public** function, class, and module. Skip private/internal helpers unless their behavior is non-obvious.
91
+
92
+ Priority order:
93
+ 1. Public API functions and methods
94
+ 2. Class/module-level docstrings
95
+ 3. Complex algorithms (inline comments explaining *why*)
96
+ 4. Configuration and constants with non-obvious values
97
+
98
+ ### Style Detection
99
+
100
+ Before adding docstrings, check which style the project already uses:
101
+
102
+ ```
103
+ # Python — look for existing patterns
104
+ Grep: """ → Google-style or NumPy-style
105
+ Grep: :param → Sphinx/reStructuredText
106
+ Grep: Parameters\n---------- → NumPy-style
107
+
108
+ # JavaScript/TypeScript
109
+ Grep: @param → JSDoc/TSDoc
110
+ Grep: @returns → JSDoc/TSDoc
111
+
112
+ # Go
113
+ Grep: ^// [A-Z].*function → godoc convention
114
+
115
+ # Rust
116
+ Grep: /// → rustdoc
117
+ Grep: //! → module-level rustdoc
118
+ ```
119
+
120
+ Follow the existing style. If no docstrings exist, use the language's recommended default.
121
+
122
+ ---
123
+
124
+ ## Verification
125
+
126
+ Before finalizing documentation:
127
+
128
+ 1. **Every command is correct** — Try running install commands, API examples, and code snippets against the actual project.
129
+ 2. **Every path exists** — Reference only files that actually exist in the codebase.
130
+ 3. **Every parameter matches the code** — Check function signatures against the documented parameters.
131
+ 4. **Links work** — Verify internal references and external URLs.
132
+ 5. **Version numbers are current** — Check package versions in install commands.
133
+
134
+ ---
135
+
136
+ ## Ambiguity Policy
137
+
138
+ | Ambiguity | Default |
139
+ |-----------|---------|
140
+ | **Audience not specified** | Write for the most common audience for the doc type (README → new users, docstrings → contributors) |
141
+ | **Scope not specified** | Document the public API surface; skip internals |
142
+ | **Format not specified** | Follow existing project conventions; fall back to language defaults |
143
+ | **Level of detail** | Include parameters, return values, and one example per function |
144
+ | **Behavior uncertain** | Mark with `TODO: verify — [specific question]` rather than guessing |
145
+
146
+ ---
147
+
148
+ ## Reference Files
149
+
150
+ | File | Contents |
151
+ |------|----------|
152
+ | [Docstring Formats](references/docstring-formats.md) | Complete templates for Python (Google, NumPy, Sphinx), TypeScript/JavaScript (JSDoc, TSDoc), Go (godoc), and Rust (rustdoc) with detection patterns |
153
+ | [API Doc Templates](references/api-doc-templates.md) | REST endpoint documentation template, request/response examples, parameter tables, error documentation, OpenAPI annotation patterns, and Mermaid diagram quick reference |