codeforge-dev 1.7.0 → 1.9.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 (158) hide show
  1. package/.devcontainer/.env +4 -6
  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 +181 -0
  6. package/.devcontainer/CLAUDE.md +57 -20
  7. package/.devcontainer/README.md +111 -56
  8. package/.devcontainer/config/{main-system-prompt.md → defaults/main-system-prompt.md} +72 -0
  9. package/.devcontainer/config/defaults/rules/spec-workflow.md +67 -0
  10. package/.devcontainer/config/defaults/rules/workspace-scope.md +7 -0
  11. package/.devcontainer/config/defaults/settings.json +67 -0
  12. package/.devcontainer/config/file-manifest.json +32 -0
  13. package/.devcontainer/devcontainer.json +20 -0
  14. package/.devcontainer/docs/configuration-reference.md +90 -0
  15. package/.devcontainer/docs/keybindings.md +100 -0
  16. package/.devcontainer/docs/optional-features.md +129 -0
  17. package/.devcontainer/docs/plugins.md +154 -0
  18. package/.devcontainer/docs/troubleshooting.md +128 -0
  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/install.sh +6 -0
  24. package/.devcontainer/features/ccstatusline/devcontainer-feature.json +5 -0
  25. package/.devcontainer/features/ccstatusline/install.sh +7 -0
  26. package/.devcontainer/features/ccusage/install.sh +6 -0
  27. package/.devcontainer/features/claude-monitor/install.sh +6 -0
  28. package/.devcontainer/features/dprint/README.md +30 -0
  29. package/.devcontainer/features/dprint/devcontainer-feature.json +18 -0
  30. package/.devcontainer/features/dprint/install.sh +131 -0
  31. package/.devcontainer/features/hadolint/README.md +35 -0
  32. package/.devcontainer/features/hadolint/devcontainer-feature.json +13 -0
  33. package/.devcontainer/features/hadolint/install.sh +86 -0
  34. package/.devcontainer/features/lsp-servers/devcontainer-feature.json +5 -0
  35. package/.devcontainer/features/lsp-servers/install.sh +7 -0
  36. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +5 -0
  37. package/.devcontainer/features/mcp-qdrant/install.sh +13 -6
  38. package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +5 -0
  39. package/.devcontainer/features/mcp-reasoner/install.sh +8 -1
  40. package/.devcontainer/features/notify-hook/devcontainer-feature.json +5 -0
  41. package/.devcontainer/features/notify-hook/install.sh +7 -0
  42. package/.devcontainer/features/ruff/README.md +26 -0
  43. package/.devcontainer/features/ruff/devcontainer-feature.json +21 -0
  44. package/.devcontainer/features/ruff/install.sh +74 -0
  45. package/.devcontainer/features/shellcheck/README.md +38 -0
  46. package/.devcontainer/features/shellcheck/devcontainer-feature.json +13 -0
  47. package/.devcontainer/features/shellcheck/install.sh +24 -0
  48. package/.devcontainer/features/shfmt/README.md +37 -0
  49. package/.devcontainer/features/shfmt/devcontainer-feature.json +13 -0
  50. package/.devcontainer/features/shfmt/install.sh +85 -0
  51. package/.devcontainer/features/splitrail/devcontainer-feature.json +5 -0
  52. package/.devcontainer/features/splitrail/install.sh +7 -0
  53. package/.devcontainer/features/tmux/install.sh +8 -0
  54. package/.devcontainer/features/tree-sitter/install.sh +6 -0
  55. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +104 -104
  56. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/.claude-plugin/plugin.json +7 -0
  57. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/README.md +158 -0
  58. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/hooks/hooks.json +39 -0
  59. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/collect-edited-files.py +47 -0
  60. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/format-on-stop.py +297 -0
  61. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/lint-file.py +536 -0
  62. package/.devcontainer/plugins/devs-marketplace/plugins/auto-code-quality/scripts/syntax-validator.py +146 -0
  63. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +1 -1
  64. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/__pycache__/format-on-stop.cpython-314.pyc +0 -0
  65. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-on-stop.py +114 -9
  66. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/.claude-plugin/plugin.json +1 -1
  67. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +4 -5
  68. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/__pycache__/lint-file.cpython-314.pyc +0 -0
  69. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +478 -76
  70. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/.claude-plugin/plugin.json +1 -1
  71. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/AGENT-REDIRECTION.md +226 -0
  72. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +94 -1
  73. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/bash-exec.md +4 -4
  74. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +14 -23
  75. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/debug-logs.md +20 -0
  76. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/dependency-analyst.md +20 -0
  77. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +99 -1
  78. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/explorer.md +20 -0
  79. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +152 -9
  80. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/git-archaeologist.md +18 -0
  81. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/migrator.md +114 -1
  82. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/perf-profiler.md +24 -0
  83. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/refactorer.md +101 -1
  84. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/researcher.md +33 -1
  85. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/security-auditor.md +24 -0
  86. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +65 -24
  87. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/statusline-config.md +3 -3
  88. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/test-writer.md +99 -1
  89. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +100 -56
  90. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/advisory-test-runner.cpython-314.pyc +0 -0
  91. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/collect-edited-files.cpython-314.pyc +0 -0
  92. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/commit-reminder.cpython-314.pyc +0 -0
  93. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/git-state-injector.cpython-314.pyc +0 -0
  94. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/redirect-builtin-agents.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/advisory-test-runner.py +174 -0
  98. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/collect-edited-files.py +8 -6
  99. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/commit-reminder.py +90 -0
  100. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +114 -0
  101. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +61 -0
  102. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py +121 -0
  103. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/ticket-linker.py +137 -0
  104. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/todo-harvester.py +130 -0
  105. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design/SKILL.md +224 -0
  106. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design/references/error-handling.md +166 -0
  107. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/api-design/references/rest-conventions.md +215 -0
  108. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/ast-grep-patterns/SKILL.md +211 -0
  109. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/ast-grep-patterns/references/language-patterns.md +327 -0
  110. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/dependency-management/SKILL.md +134 -0
  111. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/dependency-management/references/ecosystem-commands.md +264 -0
  112. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/dependency-management/references/license-compliance.md +80 -0
  113. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/SKILL.md +153 -0
  114. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/references/api-doc-templates.md +221 -0
  115. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/documentation-patterns/references/docstring-formats.md +296 -0
  116. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/migration-patterns/SKILL.md +150 -0
  117. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/migration-patterns/references/javascript-migrations.md +179 -0
  118. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/migration-patterns/references/python-migrations.md +141 -0
  119. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-check/SKILL.md +86 -0
  120. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/SKILL.md +97 -0
  121. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/backlog-template.md +7 -0
  122. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/roadmap-template.md +13 -0
  123. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/SKILL.md +101 -0
  124. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/references/template.md +110 -0
  125. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-update/SKILL.md +124 -0
  126. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +32 -0
  127. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/__pycache__/block-dangerous.cpython-314.pyc +0 -0
  128. package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/hooks/hooks.json +1 -1
  129. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/__pycache__/guard-protected.cpython-314.pyc +0 -0
  130. package/.devcontainer/scripts/check-setup.sh +72 -0
  131. package/.devcontainer/scripts/setup-aliases.sh +43 -3
  132. package/.devcontainer/scripts/setup-auth.sh +74 -0
  133. package/.devcontainer/scripts/setup-config.sh +117 -24
  134. package/.devcontainer/scripts/setup-update-claude.sh +8 -0
  135. package/.devcontainer/scripts/setup.sh +46 -13
  136. package/README.md +23 -190
  137. package/package.json +42 -42
  138. package/setup.js +245 -71
  139. package/.devcontainer/config/settings.json +0 -70
  140. package/.devcontainer/features/claude-code/README.md +0 -498
  141. package/.devcontainer/features/claude-code/config/settings.json +0 -72
  142. package/.devcontainer/features/claude-code/config/system-prompt.md +0 -118
  143. package/.devcontainer/features/claude-code/config/world-building-sp.md +0 -1432
  144. package/.devcontainer/features/claude-code/devcontainer-feature.json +0 -42
  145. package/.devcontainer/features/claude-code/install.sh +0 -466
  146. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/.claude-plugin/plugin.json +0 -7
  147. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/hooks/hooks.json +0 -17
  148. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/.claude-plugin/plugin.json +0 -6
  149. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/config/planning-instructions.md +0 -14
  150. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/functional-conjuring-map.md +0 -989
  151. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/hooks/hooks.json +0 -33
  152. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/__pycache__/post-enhance-task.cpython-314.pyc +0 -0
  153. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhance-planning.py +0 -71
  154. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-plan.sh +0 -68
  155. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-task.sh +0 -120
  156. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-plan.py +0 -133
  157. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-task.py +0 -253
  158. /package/.devcontainer/config/{keybindings.json → defaults/keybindings.json} +0 -0
@@ -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 |