devflow-kit 3.11.0 → 3.12.1

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 (206) hide show
  1. package/CHANGELOG.md +73 -0
  2. package/dist/agents/architect.md +91 -0
  3. package/dist/agents/code.md +21 -25
  4. package/dist/agents/debug.md +22 -50
  5. package/dist/agents/design.md +9 -43
  6. package/dist/agents/fix.md +15 -29
  7. package/dist/agents/git.md +19 -22
  8. package/dist/agents/harden.md +14 -19
  9. package/dist/agents/knowledge.md +11 -19
  10. package/dist/agents/refactor.md +9 -14
  11. package/dist/agents/research.md +11 -34
  12. package/dist/agents/review.md +22 -52
  13. package/dist/agents/skim.md +7 -17
  14. package/dist/agents/triage.md +7 -14
  15. package/dist/cli/commands/uninstall.js +1 -1
  16. package/dist/commands/bug-analysis.md +32 -63
  17. package/dist/commands/code-review.md +39 -88
  18. package/dist/commands/debug.md +32 -82
  19. package/dist/commands/dynamic-build.md +157 -211
  20. package/dist/commands/dynamic-plan.md +71 -93
  21. package/dist/commands/dynamic-profile.md +7 -155
  22. package/dist/commands/dynamic-tickets.md +65 -186
  23. package/dist/commands/explore.md +27 -70
  24. package/dist/commands/implement.md +101 -189
  25. package/dist/commands/plan.md +61 -108
  26. package/dist/commands/release.md +26 -92
  27. package/dist/commands/research.md +37 -106
  28. package/dist/commands/resolve.md +65 -129
  29. package/dist/commands/self-review.md +36 -100
  30. package/dist/compliance-off/agents/git.md +15 -18
  31. package/dist/compliance-off/agents/triage.md +7 -14
  32. package/dist/compliance-off/commands/bug-analysis.md +32 -63
  33. package/dist/compliance-off/commands/code-review.md +35 -83
  34. package/dist/compliance-off/commands/dynamic-build.md +151 -205
  35. package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
  36. package/dist/compliance-off/commands/implement.md +97 -183
  37. package/dist/compliance-off/commands/plan.md +61 -108
  38. package/dist/compliance-off/commands/release.md +26 -91
  39. package/dist/compliance-off/commands/resolve.md +55 -129
  40. package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
  41. package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
  42. package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
  43. package/dist/core/plugins.js +3 -3
  44. package/dist/curation-compliance-off/agents/triage.md +7 -13
  45. package/dist/curation-compliance-off/commands/bug-analysis.md +22 -42
  46. package/dist/curation-compliance-off/commands/code-review.md +26 -63
  47. package/dist/curation-compliance-off/commands/dynamic-build.md +144 -194
  48. package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
  49. package/dist/curation-compliance-off/commands/implement.md +89 -164
  50. package/dist/curation-compliance-off/commands/plan.md +52 -87
  51. package/dist/curation-compliance-off/commands/release.md +18 -79
  52. package/dist/curation-compliance-off/commands/resolve.md +46 -109
  53. package/dist/curation-off/agents/architect.md +85 -0
  54. package/dist/curation-off/agents/code.md +20 -23
  55. package/dist/curation-off/agents/debug.md +20 -48
  56. package/dist/curation-off/agents/design.md +8 -41
  57. package/dist/curation-off/agents/fix.md +14 -27
  58. package/dist/curation-off/agents/harden.md +13 -18
  59. package/dist/curation-off/agents/knowledge.md +9 -17
  60. package/dist/curation-off/agents/refactor.md +8 -12
  61. package/dist/curation-off/agents/research.md +9 -32
  62. package/dist/curation-off/agents/review.md +11 -40
  63. package/dist/curation-off/agents/skim.md +7 -17
  64. package/dist/curation-off/agents/triage.md +7 -13
  65. package/dist/curation-off/commands/bug-analysis.md +22 -42
  66. package/dist/curation-off/commands/code-review.md +30 -68
  67. package/dist/curation-off/commands/debug.md +24 -63
  68. package/dist/curation-off/commands/dynamic-build.md +150 -200
  69. package/dist/curation-off/commands/dynamic-plan.md +60 -80
  70. package/dist/curation-off/commands/dynamic-tickets.md +54 -173
  71. package/dist/curation-off/commands/explore.md +18 -50
  72. package/dist/curation-off/commands/implement.md +93 -170
  73. package/dist/curation-off/commands/plan.md +52 -87
  74. package/dist/curation-off/commands/release.md +18 -80
  75. package/dist/curation-off/commands/research.md +26 -84
  76. package/dist/curation-off/commands/resolve.md +56 -109
  77. package/dist/curation-off/commands/self-review.md +27 -79
  78. package/dist/hud/components/version-badge.js +1 -1
  79. package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
  80. package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
  81. package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
  82. package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
  83. package/dist/targets/claude-code/curation-install.js +2 -2
  84. package/dist/variant-axes.json +5 -1
  85. package/package.json +1 -1
  86. package/src/assets/agents/_partials/_code.mds +3 -5
  87. package/src/assets/agents/_partials/_design.mds +86 -0
  88. package/src/assets/agents/architect.mds +45 -0
  89. package/src/assets/agents/code.mds +18 -20
  90. package/src/assets/agents/curate.md +26 -35
  91. package/src/assets/agents/debug.mds +22 -50
  92. package/src/assets/agents/design.mds +11 -114
  93. package/src/assets/agents/evaluate.md +6 -16
  94. package/src/assets/agents/explore.md +1 -2
  95. package/src/assets/agents/fix.mds +12 -24
  96. package/src/assets/agents/git.mds +20 -23
  97. package/src/assets/agents/harden.mds +14 -19
  98. package/src/assets/agents/knowledge.mds +10 -38
  99. package/src/assets/agents/polish.md +13 -39
  100. package/src/assets/agents/refactor.mds +6 -9
  101. package/src/assets/agents/research.mds +11 -34
  102. package/src/assets/agents/review.mds +12 -84
  103. package/src/assets/agents/skim.mds +7 -17
  104. package/src/assets/agents/synthesize.md +3 -21
  105. package/src/assets/agents/test.md +31 -32
  106. package/src/assets/agents/tracker.md +116 -229
  107. package/src/assets/agents/triage.mds +7 -26
  108. package/src/assets/agents/validate.md +1 -3
  109. package/src/assets/commands/_partials/_compliance.mds +2 -2
  110. package/src/assets/commands/_partials/_decisions.mds +17 -24
  111. package/src/assets/commands/_partials/_docs_root.mds +31 -10
  112. package/src/assets/commands/_partials/_engine.mds +36 -56
  113. package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
  114. package/src/assets/commands/_partials/_factory.mds +10 -104
  115. package/src/assets/commands/_partials/_knowledge.mds +48 -52
  116. package/src/assets/commands/_partials/_plan_contract.mds +2 -2
  117. package/src/assets/commands/_partials/_preamble.mds +21 -21
  118. package/src/assets/commands/_partials/_publication.mds +3 -3
  119. package/src/assets/commands/_partials/_roster.mds +12 -13
  120. package/src/assets/commands/_partials/_settings.mds +6 -3
  121. package/src/assets/commands/_partials/_ticket_template.mds +3 -7
  122. package/src/assets/commands/_partials/_tracker.mds +10 -5
  123. package/src/assets/commands/_partials/_wave.mds +23 -32
  124. package/src/assets/commands/bug-analysis.mds +3 -7
  125. package/src/assets/commands/code-review.mds +12 -33
  126. package/src/assets/commands/debug.mds +5 -47
  127. package/src/assets/commands/dynamic-build.mds +48 -70
  128. package/src/assets/commands/dynamic-plan.mds +23 -42
  129. package/src/assets/commands/dynamic-profile.mds +7 -57
  130. package/src/assets/commands/dynamic-tickets.mds +9 -29
  131. package/src/assets/commands/explore.mds +5 -44
  132. package/src/assets/commands/implement.mds +77 -119
  133. package/src/assets/commands/plan.mds +27 -57
  134. package/src/assets/commands/release.mds +4 -62
  135. package/src/assets/commands/research.mds +9 -55
  136. package/src/assets/commands/resolve.mds +40 -87
  137. package/src/assets/commands/self-review.mds +5 -45
  138. package/src/assets/mds/git/_ops_pr.mds +1 -0
  139. package/src/assets/mds/git/_ops_steps.mds +4 -4
  140. package/src/assets/mds/git/_pr.mds +1 -1
  141. package/src/assets/rules/engineering.md +1 -1
  142. package/src/assets/rules/quality.md +2 -2
  143. package/src/assets/scripts/ci-wait.cjs +154 -19
  144. package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
  145. package/src/assets/scripts/hooks/preamble +2 -3
  146. package/src/assets/scripts/pr-evidence.cjs +1 -0
  147. package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
  148. package/src/assets/scripts/resolve-root.cjs +190 -0
  149. package/src/assets/scripts/resolve-settings.cjs +14 -9
  150. package/src/assets/scripts/verify-evidence.cjs +551 -25
  151. package/src/assets/skills/accessibility/SKILL.md +28 -95
  152. package/src/assets/skills/agent-references/SKILL.md +2 -4
  153. package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
  154. package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
  155. package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
  156. package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
  157. package/src/assets/skills/apply-decisions/SKILL.md +5 -6
  158. package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
  159. package/src/assets/skills/architecture/SKILL.md +29 -105
  160. package/src/assets/skills/boundary-validation/SKILL.md +27 -78
  161. package/src/assets/skills/complexity/SKILL.md +8 -104
  162. package/src/assets/skills/compliance/SKILL.md +9 -67
  163. package/src/assets/skills/consistency/SKILL.md +7 -107
  164. package/src/assets/skills/database/SKILL.md +7 -72
  165. package/src/assets/skills/dependencies/SKILL.md +9 -109
  166. package/src/assets/skills/dependencies/references/detection.md +10 -0
  167. package/src/assets/skills/dependency-research/SKILL.md +9 -63
  168. package/src/assets/skills/design-review/SKILL.md +14 -37
  169. package/src/assets/skills/docs-framework/SKILL.md +4 -47
  170. package/src/assets/skills/documentation/SKILL.md +7 -71
  171. package/src/assets/skills/documentation/references/patterns.md +1 -1
  172. package/src/assets/skills/documentation/references/violations.md +1 -1
  173. package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
  174. package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
  175. package/src/assets/skills/gap-analysis/SKILL.md +1 -31
  176. package/src/assets/skills/git/SKILL.md +2 -22
  177. package/src/assets/skills/go/SKILL.md +24 -113
  178. package/src/assets/skills/java/SKILL.md +12 -98
  179. package/src/assets/skills/patterns/SKILL.md +8 -93
  180. package/src/assets/skills/performance/SKILL.md +29 -88
  181. package/src/assets/skills/python/SKILL.md +22 -120
  182. package/src/assets/skills/qa/SKILL.md +16 -54
  183. package/src/assets/skills/qa/references/browser-testing.md +0 -24
  184. package/src/assets/skills/qa/references/sources.md +2 -2
  185. package/src/assets/skills/quality-gates/SKILL.md +13 -100
  186. package/src/assets/skills/react/SKILL.md +33 -95
  187. package/src/assets/skills/regression/SKILL.md +8 -73
  188. package/src/assets/skills/reliability/SKILL.md +11 -120
  189. package/src/assets/skills/research-codebase/SKILL.md +7 -49
  190. package/src/assets/skills/research-competitor/SKILL.md +4 -39
  191. package/src/assets/skills/research-external/SKILL.md +5 -43
  192. package/src/assets/skills/research-market/SKILL.md +5 -43
  193. package/src/assets/skills/research-technology/SKILL.md +8 -68
  194. package/src/assets/skills/review-methodology/SKILL.md +10 -56
  195. package/src/assets/skills/rust/SKILL.md +19 -109
  196. package/src/assets/skills/security/SKILL.md +39 -66
  197. package/src/assets/skills/software-design/SKILL.md +20 -105
  198. package/src/assets/skills/software-design/references/patterns.md +84 -2
  199. package/src/assets/skills/software-design/references/violations.md +1 -1
  200. package/src/assets/skills/test-driven-development/SKILL.md +32 -107
  201. package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
  202. package/src/assets/skills/testing/SKILL.md +35 -53
  203. package/src/assets/skills/typescript/SKILL.md +23 -102
  204. package/src/assets/skills/ui-design/SKILL.md +26 -74
  205. package/src/assets/skills/worktree-support/SKILL.md +4 -10
  206. package/dist/curation-off/commands/dynamic-profile.md +0 -214
@@ -179,3 +179,13 @@ audit_deps() {
179
179
  | Licenses | `npx license-checker` |
180
180
  | Tree depth | `npm ls --all \| wc -l` |
181
181
  | Lockfile | `ls package-lock.json yarn.lock 2>/dev/null` |
182
+
183
+ ## Common Vulnerability Sources
184
+
185
+ | Registry | URL |
186
+ |----------|-----|
187
+ | npm Advisory | https://www.npmjs.com/advisories |
188
+ | Snyk Vuln DB | https://snyk.io/vuln |
189
+ | GitHub Advisory | https://github.com/advisories |
190
+ | NVD | https://nvd.nist.gov/ |
191
+ | CISA KEV | https://www.cisa.gov/known-exploited-vulnerabilities-catalog |
@@ -20,7 +20,7 @@ Research before building. Check if a battle-tested solution exists before writin
20
20
 
21
21
  ## When This Skill Activates
22
22
 
23
- **Triggers** — creating or modifying code that:
23
+ **Triggers** — creating or modifying utility or infrastructure code that:
24
24
  - Parses, formats, or validates data (dates, URLs, emails, UUIDs, etc.)
25
25
  - Implements common algorithms (sorting, diffing, hashing, encoding)
26
26
  - Wraps HTTP clients, retries, rate limiting, caching
@@ -28,51 +28,21 @@ Research before building. Check if a battle-tested solution exists before writin
28
28
  - Implements CLI argument parsing, logging, or configuration
29
29
  - Creates test utilities (mocking, fixtures, assertions)
30
30
 
31
- **Does NOT trigger** for:
32
- - Domain-specific business logic unique to this project
31
+ **Does not trigger** for:
32
+ - Domain-specific business logic unique to this project, where no generic solution could exist
33
33
  - Glue code connecting existing components
34
34
  - Trivial operations (< 5 lines, single-use)
35
35
  - Code that intentionally avoids external dependencies (e.g., zero-dep libraries)
36
36
 
37
- ---
38
-
39
37
  ## Research Process
40
38
 
41
39
  ### Phase 1: Need Analysis
42
40
 
43
- Before searching, define what you actually need:
44
-
45
- ```
46
- Need: {one-sentence description of the capability}
47
- Constraints: {runtime, bundle size, license, zero-dep requirement}
48
- Must-haves: {non-negotiable requirements}
49
- Nice-to-haves: {optional features}
50
- ```
41
+ Before searching, write the need in one sentence, with its constraints (runtime, bundle size, license, zero-dep requirement), its must-haves and its nice-to-haves.
51
42
 
52
43
  ### Phase 2: Search
53
44
 
54
- Spawn an Explore subagent when you can spawn agents, to keep main session context clean; otherwise search directly, using the template's questions as your checklist.
55
-
56
- **Prompt template** for the Explore agent:
57
-
58
- ```
59
- Agent(subagent_type="Explore"):
60
- "Research existing solutions for: {need description}
61
-
62
- Search for:
63
- 1. npm/PyPI/crates packages that solve this (check package.json/requirements.txt for ecosystem)
64
- 2. Existing utilities in this codebase (grep for related function names)
65
- 3. Framework built-ins that already handle this
66
-
67
- For each candidate, find:
68
- - Package name and weekly downloads (if applicable)
69
- - Last publish date and maintenance status
70
- - Bundle size / dependency count
71
- - API surface relevant to our need
72
- - License compatibility
73
-
74
- Return top 3 candidates with pros/cons, or confirm nothing suitable exists."
75
- ```
45
+ Spawn an Explore subagent when you can spawn agents, to keep main session context clean; otherwise search directly. Search for packages in the project's ecosystem (npm/PyPI/crates; check package.json/requirements.txt), existing utilities in this codebase, and framework built-ins. For each candidate, find weekly downloads, last publish date and maintenance status, bundle size and dependency count, the API surface relevant to the need, and license. Return the top 3 candidates with pros and cons, or confirm nothing suitable exists.
76
46
 
77
47
  ### Phase 3: Evaluate
78
48
 
@@ -97,34 +67,10 @@ Choose one of four outcomes:
97
67
  | **Compose** | No single package fits, but 2-3 small ones combine well | Install multiple, write glue code |
98
68
  | **Build** | Nothing fits, or dependency cost exceeds value | Write custom, document why |
99
69
 
100
- **Document the decision** in a code comment at the usage site:
101
-
102
- ```typescript
103
- // research: Adopted date-fns for date formatting (2M weekly downloads, 30KB)
104
- // research: Built custom — no package handles our specific wire format
105
- ```
106
-
107
- ---
70
+ **Document the decision** in a code comment at the usage site, for example `// research: Adopted date-fns for date formatting (2M weekly downloads, 30KB)` or `// research: Built custom — no package handles our specific wire format`.
108
71
 
109
72
  ## Anti-Patterns
110
73
 
111
- | Anti-Pattern | Correct Approach |
112
- |-------------|-----------------|
113
- | Adding a dependency for 5 lines of trivial code | Build — dependency overhead exceeds value |
114
- | Choosing the most popular package without checking fit | Evaluate API fit, not just popularity |
115
- | Wrapping a package so heavily it obscures the original | If wrapping > 50% of original API, reconsider |
116
- | Skipping research because "I know how to build this" | Research anyway — maintenance cost matters more than initial build |
117
- | Installing a massive framework for one utility function | Look for focused, single-purpose packages |
118
-
119
- ## Scope Limiter
120
-
121
- This skill concerns **utility and infrastructure code** only:
122
- - Data transformation, validation, formatting
123
- - Network operations, retries, caching
124
- - CLI tooling, logging, configuration
125
- - Test utilities and helpers
126
-
127
- It does NOT apply to **domain-specific business logic** where:
128
- - The logic encodes unique business rules
129
- - No generic solution could exist
130
- - The code is inherently project-specific
74
+ - Choosing the most popular package without checking fit: evaluate API fit, not just popularity.
75
+ - Wrapping a package so heavily it obscures the original: if wrapping > 50% of the original API, reconsider.
76
+ - Installing a massive framework for one utility function: look for focused, single-purpose packages.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: design-review
3
- description: This skill should be used when reviewing implementation plans for anti-patterns.
3
+ description: Use when reviewing implementation plans for anti-patterns.
4
4
  user-invocable: false
5
5
  allowed-tools: Read, Grep, Glob
6
6
  ---
7
7
 
8
8
  # Design Review
9
9
 
10
- Anti-pattern detection for implementation plans. Catches structural problems before they become code.
10
+ Anti-pattern detection for implementation plans.
11
11
 
12
12
  ## Iron Law
13
13
 
@@ -15,10 +15,7 @@ Anti-pattern detection for implementation plans. Catches structural problems bef
15
15
  >
16
16
  > A plan that implies N+1 queries will produce N+1 queries. A plan that omits error
17
17
  > handling will produce code with no error handling. Review the plan as rigorously as
18
- > you review the code — the plan is the blueprint that every implementation decision
19
- > follows.
20
-
21
- ---
18
+ > the code: every implementation decision follows it.
22
19
 
23
20
  ## Anti-Pattern Detection Rules
24
21
 
@@ -36,10 +33,7 @@ Anti-pattern detection for implementation plans. Catches structural problems bef
36
33
  Resolution: Replace loop with batch query: {proposed batch operation}.
37
34
  ```
38
35
 
39
- **What to suggest instead:**
40
- - Identify all IDs in the list first, then batch-fetch related records in one query
41
- - Use ORM eager loading (`.include`, `.with`, JOIN) at the list query level
42
- - Cache frequently accessed related data at the service layer
36
+ **Suggest:** collect the IDs first and batch-fetch the related rows in one query, or eager-load them (JOIN) in the list query.
43
37
 
44
38
  ### 2. God Functions
45
39
 
@@ -55,10 +49,7 @@ Resolution: Replace loop with batch query: {proposed batch operation}.
55
49
  Resolution: Split into: {responsibility 1} → {responsibility 2} → {responsibility 3}.
56
50
  ```
57
51
 
58
- **What to suggest instead:**
59
- - Each function should have a single, clear sentence description of its purpose
60
- - Extract notification, logging, and side effects to separate functions
61
- - Orchestrate composition at a higher level (service layer calls multiple focused functions)
52
+ **Suggest:** one purpose per function; move notification, logging and other side effects to their own functions, and compose them at the service layer.
62
53
 
63
54
  ### 3. Missing Parallelism
64
55
 
@@ -74,10 +65,7 @@ Resolution: Split into: {responsibility 1} → {responsibility 2} → {responsib
74
65
  Resolution: Execute {step A} and {step B} in parallel: {proposed parallel pattern}.
75
66
  ```
76
67
 
77
- **What to suggest instead:**
78
- - Use `Promise.all` / goroutines / async.gather for independent operations
79
- - Identify the critical path and move independent work off it
80
- - Explicitly note which steps have ordering requirements vs. which are independent
68
+ **Suggest:** run independent steps in parallel (`Promise.all`, goroutines, `asyncio.gather`), and name the steps that must stay in order.
81
69
 
82
70
  ### 4. Error Handling Gaps
83
71
 
@@ -94,10 +82,7 @@ Resolution: Execute {step A} and {step B} in parallel: {proposed parallel patter
94
82
  Resolution: Add: {on failure scenario} → {specific recovery action}.
95
83
  ```
96
84
 
97
- **What to suggest instead:**
98
- - For each external call, specify: what to do on timeout, on 4xx, on 5xx
99
- - For multi-step operations, specify compensation (rollback/undo) for each step
100
- - Use Result types or explicit error returns — no silent failures
85
+ **Suggest:** for each external call, the action on timeout, 4xx and 5xx; a compensation step for each step of a multi-step operation; Result types or explicit error returns, never a silent failure.
101
86
 
102
87
  ### 5. Missing Caching
103
88
 
@@ -113,10 +98,7 @@ Resolution: Add: {on failure scenario} → {specific recovery action}.
113
98
  Resolution: Cache {data} for {TTL}: {proposed cache strategy and invalidation}.
114
99
  ```
115
100
 
116
- **What to suggest instead:**
117
- - Application-level cache (Redis/Memcached) for cross-request data
118
- - In-memory cache for process-local reference data with short TTL
119
- - Specify cache invalidation: event-driven (on update), time-based (TTL), or both
101
+ **Suggest:** an application cache for cross-request data, a short-TTL in-memory cache for process-local reference data, and the invalidation (on update, by TTL, or both).
120
102
 
121
103
  ### 6. Poor Decomposition
122
104
 
@@ -132,12 +114,7 @@ Resolution: Cache {data} for {TTL}: {proposed cache strategy and invalidation}.
132
114
  Resolution: {concern A} belongs in {layer/module}; {concern B} belongs in {layer/module}.
133
115
  ```
134
116
 
135
- **What to suggest instead:**
136
- - Assign each step to exactly one layer: presentation, business logic, data access
137
- - Extract cross-cutting concerns (logging, auth, validation) to middleware or decorators
138
- - Each module should have a clear bounded context — changes to one shouldn't require changes to another
139
-
140
- ---
117
+ **Suggest:** one layer per step (presentation, business logic, data access); cross-cutting concerns (logging, auth, validation) in middleware or decorators; one bounded context per module.
141
118
 
142
119
  ## Extended References
143
120
 
@@ -147,9 +124,9 @@ Resolution: {concern A} belongs in {layer/module}; {concern B} belongs in {layer
147
124
 
148
125
  ## Severity Guidelines
149
126
 
150
- | Level | Criteria |
127
+ | Level | An anti-pattern that |
151
128
  |-------|----------|
152
- | **CRITICAL** | Anti-pattern that will cause correctness failures (data loss, security breach) |
153
- | **HIGH** | Anti-pattern that will cause significant performance or maintainability problems |
154
- | **MEDIUM** | Anti-pattern that will require architectural rework post-implementation |
155
- | **LOW** | Anti-pattern that reduces code quality but is easily refactored |
129
+ | **CRITICAL** | will cause correctness failures (data loss, security breach) |
130
+ | **HIGH** | will cause significant performance or maintainability problems |
131
+ | **MEDIUM** | will require architectural rework post-implementation |
132
+ | **LOW** | reduces code quality but is easily refactored |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docs-framework
3
- description: This skill should be used when creating files in the .devflow/docs/ directory.
3
+ description: Use when creating files in the .devflow/docs/ directory.
4
4
  user-invocable: false
5
5
  allowed-tools: Read, Bash, Glob
6
6
  ---
@@ -16,10 +16,7 @@ The canonical source for what Devflow names under `.devflow/docs/`. A command th
16
16
  > A run directory is `YYYY-MM-DD_HHMM` in local time; a second run in the same minute takes
17
17
  > seconds (`YYYY-MM-DD_HHMMSS`). Branch slugs replace `/` with `-`. Topic slugs are lowercase
18
18
  > alphanumeric with single dashes, at most 50 characters. The exceptions are the ones listed
19
- > under Naming Conventions, and no others. Inconsistent naming breaks tooling, searching, and
20
- > automation. Follow the pattern or fix the pattern for everyone.
21
-
22
- ---
19
+ > under Naming Conventions, and no others. Follow the pattern or fix the pattern for everyone.
23
20
 
24
21
  ## Directory Structure
25
22
 
@@ -74,26 +71,18 @@ All generated documentation lives under `.devflow/docs/` at the checkout's tople
74
71
 
75
72
  The head markers for incremental runs are not part of this tree. `/code-review` and `/bug-analysis` keep each one under the git directory of the worktree, at `<git dir>/devflow/reviews/{branch-slug}/.last-review-head` and `<git dir>/devflow/bug-analysis/{branch-slug}/.last-analysis-head`. `<git dir>` is the path that `git rev-parse --absolute-git-dir` prints, so each worktree has its own markers.
76
73
 
77
- ---
78
-
79
74
  ## Naming Conventions
80
75
 
81
76
  ### Timestamps
82
77
 
83
- `YYYY-MM-DD_HHMM`, local time (sortable, readable), computed once per run and reused for every path of that run:
84
- ```bash
85
- TIMESTAMP=$(date +%Y-%m-%d_%H%M) # Example: 2025-12-26_1430
86
- ```
78
+ `YYYY-MM-DD_HHMM`, local time (sortable, readable), computed once per run and reused for every path of that run.
87
79
  - **Same-minute collision.** `/code-review`, `/bug-analysis` and `/research` create their run directory themselves: when it already exists, the second run appends seconds (`2025-12-26_143005`). It sorts after its minute, so newest-first listings stay correct.
88
80
  - **Workflow runs** (`tickets/`, `design/{slug}/`, `waves/`) are stamped in local time by the workflow that creates them and take no collision suffix: a second run in the same minute writes into the first's directory.
89
81
  - A design document's timestamp is the suffix before `.md`, so a listing sorts by that suffix, not by the leading `{ISSUE_ID}`.
90
82
 
91
83
  ### Branch Slugs
92
84
 
93
- The branch name with every `/` replaced by `-`; case, dots and underscores are kept. A detached HEAD has no name and uses `standalone`:
94
- ```bash
95
- BRANCH_SLUG=$(b=$(git branch --show-current 2>/dev/null); echo "${b:-standalone}" | sed 's/\//-/g')
96
- ```
85
+ The branch name with every `/` replaced by `-`; case, dots and underscores are kept. A detached HEAD has no name and uses `standalone`.
97
86
  A slug builds a path or reaches a shell only when it matches `^[A-Za-z0-9._-]{1,200}$`. Every command derives `{branch_slug}` (the underscore spelling in `handoff-*` and `evidence-*`) this way, from the branch the work is on.
98
87
 
99
88
  ### Topic Slugs
@@ -114,16 +103,8 @@ TOPIC_SLUG=$(s=$(echo "$TOPIC" | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9
114
103
  | Type | Pattern | Example |
115
104
  |------|---------|---------|
116
105
  | Special indexes | `UPPERCASE.md` | `WORKING-MEMORY.md`, `INDEX.md` |
117
- | Reports and summaries | `{focus}.md`, `review-summary.md`, `bug-analysis-summary.md`, `research-summary.md`, `static-findings.md`, `resolution-summary.md` in the run directory | `2025-12-26_1430/security.md` |
118
- | Head markers | `<git dir>/devflow/reviews/{branch-slug}/.last-review-head`, `<git dir>/devflow/bug-analysis/{branch-slug}/.last-analysis-head` | Plain text file with SHA |
119
106
  | Status logs | `{timestamp}.md` | `2025-12-26_1430.md` |
120
107
  | Design documents | `{ISSUE_ID}-{topic-slug}.{timestamp}.md` | `42-jwt-auth.2026-04-07_1430.md` |
121
- | Design (several issues) | `multi-{topic-slug}.{timestamp}.md` | `multi-jwt-auth.2026-04-07_1430.md` |
122
- | Design (no issue) | `{topic-slug}.{timestamp}.md` | `jwt-auth.2026-04-07_1430.md` |
123
- | Per-ticket plan | `{ticket-slug}-plan.md` in `design/{slug}/{timestamp}/` | `design/wave/2026-04-07_1430/add-login-plan.md` |
124
- | Handoff, evidence | `handoff-{branch-slug}.md`, `evidence-{branch-slug}.md`, `evidence-wave-{slug}.md` | `evidence-feat-jwt-auth.md` |
125
-
126
- ---
127
108
 
128
109
  ## Helper Functions
129
110
 
@@ -138,8 +119,6 @@ get_docs_root() { git rev-parse --show-toplevel 2>/dev/null || pwd; }
138
119
  ensure_docs_dir() { mkdir -p "$(get_docs_root)/.devflow/docs/$1"; }
139
120
  ```
140
121
 
141
- ---
142
-
143
122
  ## Agent Persistence Rules
144
123
 
145
124
  ### Who Writes What
@@ -156,36 +135,14 @@ ensure_docs_dir() { mkdir -p "$(get_docs_root)/.devflow/docs/$1"; }
156
135
  - Git (fetch-issue: read-only, post-review-summary: consolidated review comment only)
157
136
  - Code agent (commits to git; its only file is the handoff section it appends when `HANDOFF_FILE` is given)
158
137
 
159
- ---
160
-
161
138
  ## Implementation Checklist
162
139
 
163
140
  When creating or modifying persisting agents or commands:
164
141
 
165
- - [ ] Use the run-directory timestamp (`YYYY-MM-DD_HHMM`, local time, seconds on a same-minute collision)
166
- - [ ] Derive the branch slug (replace `/` with `-`) and gate it before it builds a path
167
- - [ ] Derive topic slugs with the one rule (lowercase, single dashes, at most 50)
168
- - [ ] Create directory with `mkdir -p .devflow/docs/{subdir}`
169
142
  - [ ] Document output location in agent's final message
170
- - [ ] Follow special file naming (UPPERCASE for indexes)
171
- - [ ] Use helper functions when possible
172
143
  - [ ] Update relevant index files
173
144
 
174
- ---
175
-
176
- ## Integration
177
-
178
- This framework is used by:
179
- - **`/plan` and `/research`**: load it at the step that names the document, and build the path by its rules
180
- - **Commands that hand paths to agents** (`/code-review`, `/bug-analysis`, `/implement`, `/resolve`, the `/dynamic-*` commands): follow it, with the exceptions above
181
- - **Working Memory hooks**: Auto-maintains `.devflow/memory/WORKING-MEMORY.md`
182
- - **Curate agent**: background LLM agent (spawned via the session-start directive) promotes observations to ADRs/PFs via `assign-anchor`, which renders `decisions.md` / `pitfalls.md`
183
-
184
- ---
185
-
186
145
  ## Extended References
187
146
 
188
- For detailed patterns and violation examples:
189
-
190
147
  - **[patterns.md](./references/patterns.md)** - Full templates, helper functions, naming examples, edge cases
191
148
  - **[violations.md](./references/violations.md)** - Common violations with detection patterns and fixes
@@ -1,24 +1,22 @@
1
1
  ---
2
2
  name: documentation
3
- description: This skill should be used when reviewing for documentation drift or stale comments.
3
+ description: Use when reviewing for documentation drift or stale comments.
4
4
  user-invocable: false
5
5
  allowed-tools: Read, Grep, Glob
6
6
  ---
7
7
 
8
8
  # Documentation Patterns
9
9
 
10
- Domain expertise for documentation quality and alignment. Use alongside `devflow:review-methodology` for complete documentation reviews.
10
+ Detection patterns for documentation quality and alignment review. Use with `devflow:review-methodology`.
11
11
 
12
12
  ## Iron Law
13
13
 
14
- > **DOCUMENTATION MUST MATCH REALITY**
14
+ > **Documentation must match reality.**
15
15
  >
16
16
  > Outdated documentation is worse than no documentation. It actively misleads. Every code
17
17
  > change that affects behavior requires a documentation check. Comments that explain "what"
18
18
  > instead of "why" are noise. The best documentation is code that doesn't need documentation.
19
19
 
20
- ---
21
-
22
20
  ## Documentation Categories
23
21
 
24
22
  ### 1. Code Documentation Issues
@@ -30,20 +28,7 @@ Domain expertise for documentation quality and alignment. Use alongside `devflow
30
28
  | "What" comments | `// Loop through users` | Explain "why" instead |
31
29
  | Magic algorithms | Complex logic without explanation | Document algorithm and rationale |
32
30
  | Transition residue | "We no longer do X" notes, in-file changelogs, or refs to removed code/sections | Remove — git holds the history |
33
-
34
- **Brief Example - Missing vs. Complete:**
35
- ```typescript
36
- // BAD: No documentation on complex function
37
- export function calculateProratedAmount(plan: Plan, startDate: Date, endDate: Date): number;
38
-
39
- // GOOD: Purpose, params, returns, edge cases documented
40
- /**
41
- * Calculates prorated billing amount when switching plans mid-cycle.
42
- * @param plan - The new plan to prorate to
43
- * @returns Prorated amount in cents (can be negative for downgrades)
44
- */
45
- export function calculateProratedAmount(plan: Plan, startDate: Date, endDate: Date): number;
46
- ```
31
+ | Stale TODOs | TODO comments for completed work | Remove |
47
32
 
48
33
  ### 2. API Documentation Issues
49
34
 
@@ -53,22 +38,6 @@ export function calculateProratedAmount(plan: Plan, startDate: Date, endDate: Da
53
38
  | Missing returns | Return shape unknown | Describe return structure and units |
54
39
  | Missing errors | Callers don't know what to catch | List all thrown error types |
55
40
 
56
- **Brief Example - Incomplete vs. Complete:**
57
- ```typescript
58
- // BAD: No params, no errors documented
59
- /** Creates a subscription. */
60
- async function createSubscription(userId: string, planId: string): Promise<Subscription>;
61
-
62
- // GOOD: Full contract documented
63
- /**
64
- * @param userId - User's unique identifier
65
- * @param planId - Plan ID from /plans endpoint
66
- * @throws {UserNotFoundError} If userId doesn't exist
67
- * @throws {PlanNotFoundError} If planId doesn't exist
68
- */
69
- async function createSubscription(userId: string, planId: string): Promise<Subscription>;
70
- ```
71
-
72
41
  ### 3. Alignment Issues
73
42
 
74
43
  | Issue | Problem | Fix |
@@ -77,28 +46,11 @@ async function createSubscription(userId: string, planId: string): Promise<Subsc
77
46
  | Stale README | Examples use removed functions | Keep README in sync with code |
78
47
  | Missing changelog | Breaking changes undocumented | Document all notable changes |
79
48
 
80
- **Brief Example - Drift vs. Aligned:**
81
- ```typescript
82
- // BAD: Comment doesn't match code
83
- // Retries up to 3 times
84
- for (let i = 0; i < 5; i++) { /* ... */ }
85
-
86
- // GOOD: Use constant to keep aligned
87
- const MAX_RETRIES = 5;
88
- for (let i = 0; i < MAX_RETRIES; i++) { /* ... */ }
89
- ```
90
-
91
- ---
92
-
93
49
  ## Extended References
94
50
 
95
- For extended examples and detection commands:
96
-
97
- - **[references/violations.md](references/violations.md)** - Extended violation examples with explanations
98
- - **[references/patterns.md](references/patterns.md)** - Complete correct pattern examples
99
- - **[references/detection.md](references/detection.md)** - Bash commands for finding issues
100
-
101
- ---
51
+ - `references/violations.md` - Extended violation examples with explanations
52
+ - `references/patterns.md` - Complete correct pattern examples
53
+ - `references/detection.md` - Bash commands for finding issues
102
54
 
103
55
  ## Severity Guidelines
104
56
 
@@ -108,19 +60,3 @@ For extended examples and detection commands:
108
60
  | **HIGH** | Significant gaps | Public APIs undocumented; Complex algorithms unexplained; Errors not documented; Migration guides missing |
109
61
  | **MEDIUM** | Moderate issues | Some params undocumented; Examples could be clearer; "What" comments instead of "why" |
110
62
  | **LOW** | Minor improvements | Could add more examples; Formatting inconsistencies; Typos |
111
-
112
- ---
113
-
114
- ## Documentation Checklist
115
-
116
- Before approving changes:
117
-
118
- - [ ] All public APIs have JSDoc/docstrings
119
- - [ ] Parameters and return values documented
120
- - [ ] Error conditions documented
121
- - [ ] Complex algorithms explained
122
- - [ ] Comments explain "why", not "what"
123
- - [ ] README reflects current state
124
- - [ ] CHANGELOG updated for notable changes
125
- - [ ] No TODO comments for completed work
126
- - [ ] Examples work with current API
@@ -1,6 +1,6 @@
1
1
  # Correct Documentation Patterns
2
2
 
3
- Extended examples of proper documentation. See parent `SKILL.md` for brief examples and severity guidelines.
3
+ Extended examples of proper documentation. See parent `SKILL.md` for the rules and severity guidelines.
4
4
 
5
5
  ---
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Documentation Violation Examples
2
2
 
3
- Extended examples of documentation anti-patterns. See parent `SKILL.md` for brief examples and severity guidelines.
3
+ Extended examples of documentation anti-patterns. See parent `SKILL.md` for the rules and severity guidelines.
4
4
 
5
5
  ---
6
6