devflow-kit 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +74 -0
- package/dist/agents/architect.md +87 -0
- package/dist/agents/code.md +21 -25
- package/dist/agents/debug.md +21 -49
- package/dist/agents/design.md +9 -43
- package/dist/agents/fix.md +15 -29
- package/dist/agents/git.md +19 -22
- package/dist/agents/harden.md +14 -19
- package/dist/agents/knowledge.md +11 -19
- package/dist/agents/refactor.md +9 -14
- package/dist/agents/research.md +11 -34
- package/dist/agents/review.md +22 -52
- package/dist/agents/skim.md +7 -17
- package/dist/agents/triage.md +7 -14
- package/dist/cli/commands/backup-session.js +131 -0
- package/dist/cli/commands/compliance.js +16 -3
- package/dist/cli/commands/curation.js +12 -4
- package/dist/cli/commands/init.js +36 -55
- package/dist/cli/commands/install-report.js +95 -0
- package/dist/cli/commands/legacy-sweep.js +140 -45
- package/dist/cli/commands/rules.js +50 -13
- package/dist/cli/commands/uninstall.js +62 -24
- package/dist/commands/bug-analysis.md +31 -62
- package/dist/commands/code-review.md +38 -87
- package/dist/commands/debug.md +32 -82
- package/dist/commands/dynamic-build.md +155 -211
- package/dist/commands/dynamic-plan.md +71 -93
- package/dist/commands/dynamic-profile.md +7 -155
- package/dist/commands/dynamic-tickets.md +65 -186
- package/dist/commands/explore.md +27 -70
- package/dist/commands/implement.md +98 -186
- package/dist/commands/plan.md +60 -107
- package/dist/commands/release.md +25 -91
- package/dist/commands/research.md +34 -103
- package/dist/commands/resolve.md +64 -128
- package/dist/commands/self-review.md +35 -99
- package/dist/compliance-off/agents/git.md +15 -18
- package/dist/compliance-off/agents/triage.md +7 -14
- package/dist/compliance-off/commands/bug-analysis.md +31 -62
- package/dist/compliance-off/commands/code-review.md +34 -82
- package/dist/compliance-off/commands/dynamic-build.md +149 -205
- package/dist/compliance-off/commands/dynamic-tickets.md +65 -186
- package/dist/compliance-off/commands/implement.md +94 -180
- package/dist/compliance-off/commands/plan.md +60 -107
- package/dist/compliance-off/commands/release.md +25 -90
- package/dist/compliance-off/commands/resolve.md +54 -128
- package/dist/compliance-off/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/compliance-off/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/core/compliance.js +14 -0
- package/dist/core/fs-atomic.js +5 -1
- package/dist/core/orphan-sweep.js +20 -2
- package/dist/core/path-set.js +15 -0
- package/dist/core/plugins.js +6 -5
- package/dist/core/reference-sweep.js +42 -25
- package/dist/core/retired-shipped-names.js +278 -0
- package/dist/curation-compliance-off/agents/triage.md +7 -13
- package/dist/curation-compliance-off/commands/bug-analysis.md +21 -41
- package/dist/curation-compliance-off/commands/code-review.md +25 -62
- package/dist/curation-compliance-off/commands/dynamic-build.md +142 -194
- package/dist/curation-compliance-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-compliance-off/commands/implement.md +86 -161
- package/dist/curation-compliance-off/commands/plan.md +51 -86
- package/dist/curation-compliance-off/commands/release.md +17 -78
- package/dist/curation-compliance-off/commands/resolve.md +45 -108
- package/dist/curation-off/agents/architect.md +81 -0
- package/dist/curation-off/agents/code.md +20 -23
- package/dist/curation-off/agents/debug.md +19 -47
- package/dist/curation-off/agents/design.md +8 -41
- package/dist/curation-off/agents/fix.md +14 -27
- package/dist/curation-off/agents/harden.md +13 -18
- package/dist/curation-off/agents/knowledge.md +9 -17
- package/dist/curation-off/agents/refactor.md +8 -12
- package/dist/curation-off/agents/research.md +9 -32
- package/dist/curation-off/agents/review.md +11 -40
- package/dist/curation-off/agents/skim.md +7 -17
- package/dist/curation-off/agents/triage.md +7 -13
- package/dist/curation-off/commands/bug-analysis.md +21 -41
- package/dist/curation-off/commands/code-review.md +29 -67
- package/dist/curation-off/commands/debug.md +24 -63
- package/dist/curation-off/commands/dynamic-build.md +148 -200
- package/dist/curation-off/commands/dynamic-plan.md +60 -80
- package/dist/curation-off/commands/dynamic-tickets.md +54 -173
- package/dist/curation-off/commands/explore.md +18 -50
- package/dist/curation-off/commands/implement.md +90 -167
- package/dist/curation-off/commands/plan.md +51 -86
- package/dist/curation-off/commands/release.md +17 -79
- package/dist/curation-off/commands/research.md +23 -81
- package/dist/curation-off/commands/resolve.md +55 -108
- package/dist/curation-off/commands/self-review.md +26 -78
- package/dist/skills/git/references/pr/update-pr-evidence.md +2 -1
- package/dist/skills/git/references/tracker/github/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/jira/ensure-pr-ready.md +3 -3
- package/dist/skills/git/references/tracker/linear/ensure-pr-ready.md +3 -3
- package/dist/targets/claude-code/compliance-install.js +38 -13
- package/dist/targets/claude-code/compliance-off-files.js +5 -1
- package/dist/targets/claude-code/curation-install.js +77 -32
- package/dist/targets/claude-code/folder-swap.js +142 -0
- package/dist/targets/claude-code/install-backup.js +780 -0
- package/dist/targets/claude-code/installer.js +383 -192
- package/dist/targets/claude-code/legacy-skill-hashes.js +170 -0
- package/dist/targets/claude-code/linked-folder.js +5 -11
- package/dist/targets/claude-code/reference-converge.js +15 -2
- package/dist/targets/claude-code/rules-folder.js +34 -0
- package/dist/targets/claude-code/shipped-set.js +160 -0
- package/dist/targets/claude-code/workflow-folder-install.js +32 -12
- package/dist/variant-axes.json +5 -1
- package/package.json +1 -1
- package/src/assets/agents/_partials/_code.mds +3 -5
- package/src/assets/agents/_partials/_design.mds +86 -0
- package/src/assets/agents/architect.mds +41 -0
- package/src/assets/agents/code.mds +18 -20
- package/src/assets/agents/curate.md +26 -35
- package/src/assets/agents/debug.mds +21 -49
- package/src/assets/agents/design.mds +11 -114
- package/src/assets/agents/evaluate.md +6 -16
- package/src/assets/agents/explore.md +1 -2
- package/src/assets/agents/fix.mds +12 -24
- package/src/assets/agents/git.mds +20 -23
- package/src/assets/agents/harden.mds +14 -19
- package/src/assets/agents/knowledge.mds +10 -38
- package/src/assets/agents/polish.md +13 -39
- package/src/assets/agents/refactor.mds +6 -9
- package/src/assets/agents/research.mds +11 -34
- package/src/assets/agents/review.mds +12 -84
- package/src/assets/agents/skim.mds +7 -17
- package/src/assets/agents/synthesize.md +3 -21
- package/src/assets/agents/test.md +31 -32
- package/src/assets/agents/tracker.md +116 -229
- package/src/assets/agents/triage.mds +7 -26
- package/src/assets/agents/validate.md +1 -3
- package/src/assets/commands/_partials/_compliance.mds +2 -2
- package/src/assets/commands/_partials/_decisions.mds +17 -24
- package/src/assets/commands/_partials/_docs_root.mds +31 -10
- package/src/assets/commands/_partials/_engine.mds +34 -56
- package/src/assets/commands/_partials/_evidence_policy.mds +1 -1
- package/src/assets/commands/_partials/_factory.mds +10 -104
- package/src/assets/commands/_partials/_knowledge.mds +47 -51
- package/src/assets/commands/_partials/_plan_contract.mds +2 -2
- package/src/assets/commands/_partials/_preamble.mds +21 -21
- package/src/assets/commands/_partials/_publication.mds +3 -3
- package/src/assets/commands/_partials/_roster.mds +12 -13
- package/src/assets/commands/_partials/_settings.mds +6 -3
- package/src/assets/commands/_partials/_ticket_template.mds +3 -7
- package/src/assets/commands/_partials/_tracker.mds +10 -5
- package/src/assets/commands/_partials/_wave.mds +23 -32
- package/src/assets/commands/bug-analysis.mds +3 -7
- package/src/assets/commands/code-review.mds +12 -33
- package/src/assets/commands/debug.mds +5 -47
- package/src/assets/commands/dynamic-build.mds +48 -70
- package/src/assets/commands/dynamic-plan.mds +23 -42
- package/src/assets/commands/dynamic-profile.mds +7 -57
- package/src/assets/commands/dynamic-tickets.mds +9 -29
- package/src/assets/commands/explore.mds +5 -44
- package/src/assets/commands/implement.mds +75 -117
- package/src/assets/commands/plan.mds +27 -57
- package/src/assets/commands/release.mds +4 -62
- package/src/assets/commands/research.mds +7 -53
- package/src/assets/commands/resolve.mds +40 -87
- package/src/assets/commands/self-review.mds +5 -45
- package/src/assets/mds/git/_ops_pr.mds +1 -0
- package/src/assets/mds/git/_ops_steps.mds +4 -4
- package/src/assets/mds/git/_pr.mds +1 -1
- package/src/assets/rules/engineering.md +1 -1
- package/src/assets/rules/quality.md +2 -2
- package/src/assets/scripts/ci-wait.cjs +150 -18
- package/src/assets/scripts/hooks/assets/orchestrator-charter.md +3 -3
- package/src/assets/scripts/hooks/preamble +2 -3
- package/src/assets/scripts/pr-evidence.cjs +1 -0
- package/src/assets/scripts/resolve-evidence-policy.cjs +14 -13
- package/src/assets/scripts/resolve-root.cjs +186 -0
- package/src/assets/scripts/resolve-settings.cjs +14 -9
- package/src/assets/scripts/verify-evidence.cjs +355 -22
- package/src/assets/skills/accessibility/SKILL.md +28 -95
- package/src/assets/skills/agent-references/SKILL.md +2 -4
- package/src/assets/skills/agent-references/references/commands/implement-evidence-asks.md +1 -1
- package/src/assets/skills/agent-references/references/commands/implement-levels.md +4 -7
- package/src/assets/skills/agent-references/references/commands/implement-revalidate.md +1 -1
- package/src/assets/skills/agent-references/references/commands/plan-levels.md +2 -2
- package/src/assets/skills/apply-decisions/SKILL.md +5 -6
- package/src/assets/skills/apply-feature-knowledge/SKILL.md +3 -13
- package/src/assets/skills/architecture/SKILL.md +29 -105
- package/src/assets/skills/boundary-validation/SKILL.md +27 -78
- package/src/assets/skills/complexity/SKILL.md +8 -104
- package/src/assets/skills/compliance/SKILL.md +9 -67
- package/src/assets/skills/consistency/SKILL.md +7 -107
- package/src/assets/skills/database/SKILL.md +7 -72
- package/src/assets/skills/dependencies/SKILL.md +9 -109
- package/src/assets/skills/dependencies/references/detection.md +10 -0
- package/src/assets/skills/dependency-research/SKILL.md +9 -63
- package/src/assets/skills/design-review/SKILL.md +1 -35
- package/src/assets/skills/docs-framework/SKILL.md +4 -47
- package/src/assets/skills/documentation/SKILL.md +7 -71
- package/src/assets/skills/documentation/references/patterns.md +1 -1
- package/src/assets/skills/documentation/references/violations.md +1 -1
- package/src/assets/skills/feature-knowledge/SKILL.md +19 -222
- package/src/assets/skills/feature-knowledge/references/new-kb.md +128 -0
- package/src/assets/skills/gap-analysis/SKILL.md +1 -31
- package/src/assets/skills/git/SKILL.md +2 -22
- package/src/assets/skills/go/SKILL.md +24 -113
- package/src/assets/skills/java/SKILL.md +12 -98
- package/src/assets/skills/patterns/SKILL.md +8 -93
- package/src/assets/skills/performance/SKILL.md +29 -88
- package/src/assets/skills/python/SKILL.md +22 -120
- package/src/assets/skills/qa/SKILL.md +16 -54
- package/src/assets/skills/qa/references/browser-testing.md +0 -24
- package/src/assets/skills/qa/references/sources.md +2 -2
- package/src/assets/skills/quality-gates/SKILL.md +13 -100
- package/src/assets/skills/react/SKILL.md +33 -95
- package/src/assets/skills/regression/SKILL.md +8 -73
- package/src/assets/skills/reliability/SKILL.md +11 -120
- package/src/assets/skills/research-codebase/SKILL.md +7 -49
- package/src/assets/skills/research-competitor/SKILL.md +4 -39
- package/src/assets/skills/research-external/SKILL.md +5 -43
- package/src/assets/skills/research-market/SKILL.md +5 -43
- package/src/assets/skills/research-technology/SKILL.md +8 -68
- package/src/assets/skills/review-methodology/SKILL.md +10 -56
- package/src/assets/skills/rust/SKILL.md +19 -109
- package/src/assets/skills/security/SKILL.md +39 -66
- package/src/assets/skills/software-design/SKILL.md +20 -105
- package/src/assets/skills/software-design/references/patterns.md +84 -2
- package/src/assets/skills/software-design/references/violations.md +1 -1
- package/src/assets/skills/test-driven-development/SKILL.md +32 -107
- package/src/assets/skills/test-driven-development/references/rationalization-prevention.md +33 -1
- package/src/assets/skills/testing/SKILL.md +35 -53
- package/src/assets/skills/typescript/SKILL.md +23 -102
- package/src/assets/skills/ui-design/SKILL.md +26 -74
- package/src/assets/skills/worktree-support/SKILL.md +4 -10
- 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
|
|
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,
|
|
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
|
|
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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design-review
|
|
3
|
-
description:
|
|
3
|
+
description: Use when reviewing implementation plans for anti-patterns.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
allowed-tools: Read, Grep, Glob
|
|
6
6
|
---
|
|
@@ -18,8 +18,6 @@ Anti-pattern detection for implementation plans. Catches structural problems bef
|
|
|
18
18
|
> you review the code — the plan is the blueprint that every implementation decision
|
|
19
19
|
> follows.
|
|
20
20
|
|
|
21
|
-
---
|
|
22
|
-
|
|
23
21
|
## Anti-Pattern Detection Rules
|
|
24
22
|
|
|
25
23
|
### 1. N+1 Queries
|
|
@@ -36,11 +34,6 @@ Anti-pattern detection for implementation plans. Catches structural problems bef
|
|
|
36
34
|
Resolution: Replace loop with batch query: {proposed batch operation}.
|
|
37
35
|
```
|
|
38
36
|
|
|
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
|
|
43
|
-
|
|
44
37
|
### 2. God Functions
|
|
45
38
|
|
|
46
39
|
**What to look for in a plan:**
|
|
@@ -55,11 +48,6 @@ Resolution: Replace loop with batch query: {proposed batch operation}.
|
|
|
55
48
|
Resolution: Split into: {responsibility 1} → {responsibility 2} → {responsibility 3}.
|
|
56
49
|
```
|
|
57
50
|
|
|
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)
|
|
62
|
-
|
|
63
51
|
### 3. Missing Parallelism
|
|
64
52
|
|
|
65
53
|
**What to look for in a plan:**
|
|
@@ -74,11 +62,6 @@ Resolution: Split into: {responsibility 1} → {responsibility 2} → {responsib
|
|
|
74
62
|
Resolution: Execute {step A} and {step B} in parallel: {proposed parallel pattern}.
|
|
75
63
|
```
|
|
76
64
|
|
|
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
|
|
81
|
-
|
|
82
65
|
### 4. Error Handling Gaps
|
|
83
66
|
|
|
84
67
|
**What to look for in a plan:**
|
|
@@ -94,11 +77,6 @@ Resolution: Execute {step A} and {step B} in parallel: {proposed parallel patter
|
|
|
94
77
|
Resolution: Add: {on failure scenario} → {specific recovery action}.
|
|
95
78
|
```
|
|
96
79
|
|
|
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
|
|
101
|
-
|
|
102
80
|
### 5. Missing Caching
|
|
103
81
|
|
|
104
82
|
**What to look for in a plan:**
|
|
@@ -113,11 +91,6 @@ Resolution: Add: {on failure scenario} → {specific recovery action}.
|
|
|
113
91
|
Resolution: Cache {data} for {TTL}: {proposed cache strategy and invalidation}.
|
|
114
92
|
```
|
|
115
93
|
|
|
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
|
|
120
|
-
|
|
121
94
|
### 6. Poor Decomposition
|
|
122
95
|
|
|
123
96
|
**What to look for in a plan:**
|
|
@@ -132,13 +105,6 @@ Resolution: Cache {data} for {TTL}: {proposed cache strategy and invalidation}.
|
|
|
132
105
|
Resolution: {concern A} belongs in {layer/module}; {concern B} belongs in {layer/module}.
|
|
133
106
|
```
|
|
134
107
|
|
|
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
|
-
---
|
|
141
|
-
|
|
142
108
|
## Extended References
|
|
143
109
|
|
|
144
110
|
| Reference | Content |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: docs-framework
|
|
3
|
-
description:
|
|
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.
|
|
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:
|
|
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
|
-
|
|
10
|
+
Detection patterns for documentation quality and alignment review. Use with `devflow:review-methodology`.
|
|
11
11
|
|
|
12
12
|
## Iron Law
|
|
13
13
|
|
|
14
|
-
> **
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
-
|
|
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
|
# Documentation Violation Examples
|
|
2
2
|
|
|
3
|
-
Extended examples of documentation anti-patterns. See parent `SKILL.md` for
|
|
3
|
+
Extended examples of documentation anti-patterns. See parent `SKILL.md` for the rules and severity guidelines.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|