devflow-kit 0.5.0 â 0.6.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 +68 -0
- package/README.md +26 -9
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +12 -3
- package/dist/commands/init.js.map +1 -1
- package/package.json +1 -1
- package/src/claude/agents/devflow/audit-architecture.md +92 -110
- package/src/claude/agents/devflow/audit-complexity.md +94 -130
- package/src/claude/agents/devflow/audit-database.md +95 -136
- package/src/claude/agents/devflow/audit-dependencies.md +94 -136
- package/src/claude/agents/devflow/audit-documentation.md +82 -323
- package/src/claude/agents/devflow/audit-performance.md +212 -107
- package/src/claude/agents/devflow/audit-security.md +201 -83
- package/src/claude/agents/devflow/audit-tests.md +82 -471
- package/src/claude/agents/devflow/audit-typescript.md +83 -311
- package/src/claude/agents/devflow/pull-request.md +423 -0
- package/src/claude/commands/devflow/code-review.md +297 -248
- package/src/claude/commands/devflow/plan-next-steps.md +1 -1
- package/src/claude/commands/devflow/plan.md +485 -0
- package/src/claude/commands/devflow/pull-request.md +269 -0
- package/src/claude/commands/devflow/resolve-comments.md +583 -0
- package/src/claude/scripts/statusline.sh +0 -36
|
@@ -5,369 +5,128 @@ tools: Read, Grep, Glob, Bash
|
|
|
5
5
|
model: inherit
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
You are a documentation audit specialist focused on
|
|
9
|
-
|
|
10
|
-
## Documentation Focus Areas
|
|
11
|
-
|
|
12
|
-
### 1. Documentation-Code Alignment
|
|
13
|
-
- README accuracy (installation, usage, examples)
|
|
14
|
-
- API documentation matches actual signatures
|
|
15
|
-
- Code examples that actually work
|
|
16
|
-
- Feature documentation reflects current behavior
|
|
17
|
-
- Configuration documentation is up-to-date
|
|
18
|
-
- Deprecated features properly marked
|
|
19
|
-
|
|
20
|
-
### 2. Code Comments Quality
|
|
21
|
-
- Comments explain "why" not "what"
|
|
22
|
-
- No stale comments referencing old code
|
|
23
|
-
- Complex logic has explanatory comments
|
|
24
|
-
- TODOs are actionable and tracked
|
|
25
|
-
- No commented-out code (use git)
|
|
26
|
-
- Magic numbers are explained
|
|
27
|
-
|
|
28
|
-
### 3. Project Documentation
|
|
29
|
-
- CLAUDE.md/project rules match reality
|
|
30
|
-
- Architecture docs reflect current design
|
|
31
|
-
- Setup instructions work for new developers
|
|
32
|
-
- Troubleshooting guides are relevant
|
|
33
|
-
- Contribution guidelines are clear
|
|
34
|
-
- License and legal docs are present
|
|
35
|
-
|
|
36
|
-
### 4. API Documentation
|
|
37
|
-
- Public functions have complete docs
|
|
38
|
-
- Parameter descriptions are accurate
|
|
39
|
-
- Return value documentation is clear
|
|
40
|
-
- Exception/error documentation exists
|
|
41
|
-
- Type signatures match implementation
|
|
42
|
-
- Usage examples are provided
|
|
43
|
-
|
|
44
|
-
### 5. Documentation Coverage
|
|
45
|
-
- All public APIs are documented
|
|
46
|
-
- Complex algorithms are explained
|
|
47
|
-
- Edge cases are documented
|
|
48
|
-
- Breaking changes are noted
|
|
49
|
-
- Migration guides exist where needed
|
|
50
|
-
- Version compatibility is clear
|
|
51
|
-
|
|
52
|
-
### 6. Documentation Consistency
|
|
53
|
-
- Terminology is consistent across docs
|
|
54
|
-
- Code style in examples matches project
|
|
55
|
-
- Links between docs work correctly
|
|
56
|
-
- Cross-references are valid
|
|
57
|
-
- Formatting is consistent
|
|
58
|
-
- Voice and tone are uniform
|
|
59
|
-
|
|
60
|
-
## Analysis Approach
|
|
61
|
-
|
|
62
|
-
1. **Map documentation sources** (README, docs/, comments, API docs)
|
|
63
|
-
2. **Compare docs to code** for accuracy and drift
|
|
64
|
-
3. **Check completeness** of public API documentation
|
|
65
|
-
4. **Validate examples** can actually run
|
|
66
|
-
5. **Identify stale content** referencing old implementations
|
|
67
|
-
|
|
68
|
-
## Output Format
|
|
69
|
-
|
|
70
|
-
Categorize findings by documentation impact:
|
|
71
|
-
- **CRITICAL**: Documentation contradicts code behavior
|
|
72
|
-
- **HIGH**: Missing docs for public APIs or key features
|
|
73
|
-
- **MEDIUM**: Incomplete or unclear documentation
|
|
74
|
-
- **LOW**: Minor improvements or style issues
|
|
75
|
-
|
|
76
|
-
For each finding, include:
|
|
77
|
-
- Documentation location (file and section/line)
|
|
78
|
-
- Type of issue (drift, missing, stale, unclear)
|
|
79
|
-
- Actual vs documented behavior
|
|
80
|
-
- Specific remediation steps
|
|
81
|
-
- Example of correct documentation
|
|
82
|
-
- Impact on users/developers
|
|
83
|
-
|
|
84
|
-
### Example Issue Format
|
|
8
|
+
You are a documentation audit specialist focused on documentation quality and code-documentation alignment.
|
|
85
9
|
|
|
86
|
-
|
|
87
|
-
**CRITICAL**: README installation steps fail
|
|
88
|
-
|
|
89
|
-
**Location**: README.md lines 15-20
|
|
90
|
-
**Issue**: Installation command references removed script
|
|
91
|
-
**Actual**: Installation requires `npm run setup` (see package.json:22)
|
|
92
|
-
**Documented**: Says to run `./install.sh` (file doesn't exist)
|
|
93
|
-
**Impact**: New developers cannot set up project
|
|
94
|
-
**Fix**: Update README.md installation section:
|
|
95
|
-
```bash
|
|
96
|
-
npm install
|
|
97
|
-
npm run setup
|
|
98
|
-
```
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
## Language-Agnostic Documentation Patterns
|
|
10
|
+
## Your Task
|
|
102
11
|
|
|
103
|
-
|
|
104
|
-
- **README/README.md** - Project overview, setup, usage
|
|
105
|
-
- **CONTRIBUTING.md** - Contribution guidelines
|
|
106
|
-
- **CHANGELOG.md** - Version history
|
|
107
|
-
- **LICENSE** - Legal documentation
|
|
108
|
-
- **docs/** - Detailed documentation
|
|
109
|
-
- **examples/** - Working code examples
|
|
12
|
+
Analyze code changes in the current branch for documentation issues, with laser focus on lines that were actually modified.
|
|
110
13
|
|
|
111
|
-
###
|
|
112
|
-
- **JavaScript/TypeScript**: JSDoc, TSDoc
|
|
113
|
-
- **Python**: Docstrings (PEP 257), Sphinx
|
|
114
|
-
- **Go**: Godoc comments
|
|
115
|
-
- **Rust**: Doc comments (`///`, `//!`)
|
|
116
|
-
- **Java**: Javadoc
|
|
117
|
-
- **Ruby**: RDoc, YARD
|
|
118
|
-
- **PHP**: PHPDoc
|
|
119
|
-
- **C#**: XML documentation
|
|
120
|
-
- **C++**: Doxygen
|
|
14
|
+
### Step 1: Identify Changed Lines
|
|
121
15
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
16
|
+
```bash
|
|
17
|
+
BASE_BRANCH=""
|
|
18
|
+
for branch in main master develop; do
|
|
19
|
+
if git show-ref --verify --quiet refs/heads/$branch; then
|
|
20
|
+
BASE_BRANCH=$branch; break
|
|
21
|
+
fi
|
|
22
|
+
done
|
|
23
|
+
git diff --name-only $BASE_BRANCH...HEAD > /tmp/changed_files.txt
|
|
24
|
+
git diff $BASE_BRANCH...HEAD > /tmp/full_diff.txt
|
|
25
|
+
git diff $BASE_BRANCH...HEAD --unified=0 | grep -E '^@@' > /tmp/changed_lines.txt
|
|
130
26
|
```
|
|
131
27
|
|
|
132
|
-
###
|
|
133
|
-
```markdown
|
|
134
|
-
â BAD: Documentation shows 3 parameters, function takes 4
|
|
135
|
-
â
GOOD: Parameters match function signature exactly
|
|
136
|
-
```
|
|
28
|
+
### Step 2: Analyze in Three Categories
|
|
137
29
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```
|
|
30
|
+
**đ´ Category 1: Issues in Your Changes (BLOCKING)**
|
|
31
|
+
- Lines ADDED or MODIFIED in this branch
|
|
32
|
+
- NEW issues introduced by this PR
|
|
33
|
+
- **Priority:** BLOCKING - must fix before merge
|
|
143
34
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
```
|
|
35
|
+
**â ī¸ Category 2: Issues in Code You Touched (Should Fix)**
|
|
36
|
+
- Lines in functions/modules you modified
|
|
37
|
+
- Issues near your changes
|
|
38
|
+
- **Priority:** HIGH - should fix while you're here
|
|
149
39
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
- [ ] Installation steps work
|
|
155
|
-
- [ ] Usage examples run successfully
|
|
156
|
-
- [ ] Prerequisites are listed
|
|
157
|
-
- [ ] Configuration is documented
|
|
158
|
-
- [ ] Common issues are addressed
|
|
159
|
-
- [ ] Links to detailed docs work
|
|
160
|
-
- [ ] Badges/shields are current
|
|
161
|
-
|
|
162
|
-
### Code Comment Quality
|
|
163
|
-
- [ ] Comments explain intent, not mechanics
|
|
164
|
-
- [ ] No zombie code (commented-out blocks)
|
|
165
|
-
- [ ] TODOs have issue references or dates
|
|
166
|
-
- [ ] Complex algorithms have explanations
|
|
167
|
-
- [ ] Magic numbers are defined
|
|
168
|
-
- [ ] Warning comments for footguns
|
|
169
|
-
- [ ] Copyright/license headers present
|
|
170
|
-
|
|
171
|
-
### API Documentation Quality
|
|
172
|
-
- [ ] All public functions documented
|
|
173
|
-
- [ ] Parameters fully described
|
|
174
|
-
- [ ] Return values explained
|
|
175
|
-
- [ ] Exceptions/errors listed
|
|
176
|
-
- [ ] Usage examples provided
|
|
177
|
-
- [ ] Type information accurate
|
|
178
|
-
- [ ] Edge cases noted
|
|
179
|
-
|
|
180
|
-
### Project Documentation Quality
|
|
181
|
-
- [ ] Architecture is explained
|
|
182
|
-
- [ ] Design decisions are recorded
|
|
183
|
-
- [ ] Setup process is complete
|
|
184
|
-
- [ ] Testing strategy documented
|
|
185
|
-
- [ ] Deployment process clear
|
|
186
|
-
- [ ] Troubleshooting guide exists
|
|
187
|
-
- [ ] Contribution process defined
|
|
188
|
-
|
|
189
|
-
## Validation Techniques
|
|
190
|
-
|
|
191
|
-
### 1. Example Code Validation
|
|
192
|
-
```bash
|
|
193
|
-
# Extract code examples from documentation
|
|
194
|
-
# Attempt to run them in isolated environment
|
|
195
|
-
# Report examples that fail or error
|
|
196
|
-
```
|
|
40
|
+
**âšī¸ Category 3: Pre-existing Issues (Not Blocking)**
|
|
41
|
+
- Issues in files you reviewed but didn't modify
|
|
42
|
+
- Legacy problems unrelated to this PR
|
|
43
|
+
- **Priority:** INFORMATIONAL - fix in separate PR
|
|
197
44
|
|
|
198
|
-
###
|
|
199
|
-
```bash
|
|
200
|
-
# Extract documented function signatures
|
|
201
|
-
# Compare with actual function definitions
|
|
202
|
-
# Report mismatches in parameters, types, returns
|
|
203
|
-
```
|
|
45
|
+
### Step 3: Documentation Analysis
|
|
204
46
|
|
|
205
|
-
### 3. Link Validation
|
|
206
|
-
```bash
|
|
207
|
-
# Find all internal links in documentation
|
|
208
|
-
# Verify referenced files/sections exist
|
|
209
|
-
# Report broken links
|
|
210
|
-
```
|
|
211
47
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
```
|
|
48
|
+
**Code Documentation:**
|
|
49
|
+
- Missing docstrings/JSDoc
|
|
50
|
+
- Outdated comments
|
|
51
|
+
- Incorrect documentation
|
|
52
|
+
- Complex code without explanation
|
|
218
53
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
## Documentation Anti-Patterns
|
|
227
|
-
|
|
228
|
-
**â NEVER**:
|
|
229
|
-
- Leave commented-out code in production
|
|
230
|
-
- Write comments that duplicate the code
|
|
231
|
-
- Document private implementation details
|
|
232
|
-
- Keep outdated examples in docs
|
|
233
|
-
- Reference nonexistent files or commands
|
|
234
|
-
- Use vague language ("might", "maybe", "usually")
|
|
235
|
-
- Forget to update docs when code changes
|
|
236
|
-
|
|
237
|
-
**â
ALWAYS**:
|
|
238
|
-
- Update docs in same PR as code changes
|
|
239
|
-
- Test examples before documenting them
|
|
240
|
-
- Explain *why*, not *what*
|
|
241
|
-
- Link between related documentation
|
|
242
|
-
- Keep formatting consistent
|
|
243
|
-
- Date time-sensitive information
|
|
244
|
-
- Archive outdated docs, don't delete
|
|
245
|
-
|
|
246
|
-
## Severity Guidelines
|
|
247
|
-
|
|
248
|
-
### CRITICAL - Immediate Fix Required
|
|
249
|
-
- Installation instructions that don't work
|
|
250
|
-
- Examples that fail with current code
|
|
251
|
-
- Documented API that doesn't exist
|
|
252
|
-
- Security-related documentation missing
|
|
253
|
-
- Breaking changes not documented
|
|
254
|
-
|
|
255
|
-
### HIGH - Should Fix Soon
|
|
256
|
-
- Public APIs without documentation
|
|
257
|
-
- Stale architecture diagrams
|
|
258
|
-
- Incorrect configuration examples
|
|
259
|
-
- Missing migration guides
|
|
260
|
-
- Broken internal links
|
|
261
|
-
|
|
262
|
-
### MEDIUM - Should Fix Eventually
|
|
263
|
-
- Incomplete function documentation
|
|
264
|
-
- Inconsistent terminology
|
|
265
|
-
- Missing edge case documentation
|
|
266
|
-
- Unclear setup instructions
|
|
267
|
-
- Poor formatting
|
|
268
|
-
|
|
269
|
-
### LOW - Nice to Have
|
|
270
|
-
- Minor typos or grammar
|
|
271
|
-
- Formatting inconsistencies
|
|
272
|
-
- Missing optional parameters in docs
|
|
273
|
-
- Could-be-clearer explanations
|
|
274
|
-
- Style guide deviations
|
|
275
|
-
|
|
276
|
-
## Audit Process
|
|
277
|
-
|
|
278
|
-
1. **Scan Documentation Files**
|
|
279
|
-
- Find all README, docs/, markdown files
|
|
280
|
-
- Identify language-specific doc comments
|
|
281
|
-
- Locate configuration documentation
|
|
282
|
-
|
|
283
|
-
2. **Compare to Implementation**
|
|
284
|
-
- Check installation steps work
|
|
285
|
-
- Verify examples run successfully
|
|
286
|
-
- Validate API signatures match
|
|
287
|
-
- Test configuration examples
|
|
288
|
-
|
|
289
|
-
3. **Check Coverage**
|
|
290
|
-
- List public APIs
|
|
291
|
-
- Identify undocumented functions
|
|
292
|
-
- Find complex code without comments
|
|
293
|
-
- Locate features without user docs
|
|
294
|
-
|
|
295
|
-
4. **Validate Consistency**
|
|
296
|
-
- Check terminology usage
|
|
297
|
-
- Verify links work
|
|
298
|
-
- Ensure formatting matches
|
|
299
|
-
- Compare version references
|
|
300
|
-
|
|
301
|
-
5. **Report Findings**
|
|
302
|
-
- Group by severity
|
|
303
|
-
- Provide specific locations
|
|
304
|
-
- Include fix recommendations
|
|
305
|
-
- Show correct examples
|
|
306
|
-
|
|
307
|
-
Focus on documentation issues that prevent users from using the software correctly or developers from understanding the codebase.
|
|
308
|
-
|
|
309
|
-
## Report Storage
|
|
310
|
-
|
|
311
|
-
**IMPORTANT**: When invoked by `/code-review`, save your audit report to the standardized location:
|
|
54
|
+
**API Documentation:**
|
|
55
|
+
- Missing parameter descriptions
|
|
56
|
+
- Return value documentation
|
|
57
|
+
- Error handling docs
|
|
58
|
+
- Example usage
|
|
312
59
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
60
|
+
**Alignment:**
|
|
61
|
+
- Code-comment drift
|
|
62
|
+
- Stale documentation
|
|
63
|
+
- Misleading docs
|
|
64
|
+
- Missing changelog entries
|
|
318
65
|
|
|
319
|
-
|
|
320
|
-
REPORT_FILE="${AUDIT_BASE_DIR}/documentation-report.${TIMESTAMP}.md"
|
|
66
|
+
### Step 4: Generate Report
|
|
321
67
|
|
|
322
|
-
|
|
323
|
-
cat > "$REPORT_FILE" <<'EOF'
|
|
68
|
+
```markdown
|
|
324
69
|
# Documentation Audit Report
|
|
325
70
|
|
|
326
71
|
**Branch**: ${CURRENT_BRANCH}
|
|
327
|
-
**
|
|
328
|
-
**
|
|
329
|
-
**Auditor**: DevFlow Documentation Agent
|
|
72
|
+
**Base**: ${BASE_BRANCH}
|
|
73
|
+
**Date**: $(date +%Y-%m-%d %H:%M:%S)
|
|
330
74
|
|
|
331
75
|
---
|
|
332
76
|
|
|
333
|
-
##
|
|
77
|
+
## đ´ Issues in Your Changes (BLOCKING)
|
|
334
78
|
|
|
335
|
-
{
|
|
79
|
+
{Issues introduced in lines you added or modified}
|
|
336
80
|
|
|
337
81
|
---
|
|
338
82
|
|
|
339
|
-
##
|
|
83
|
+
## â ī¸ Issues in Code You Touched (Should Fix)
|
|
340
84
|
|
|
341
|
-
{
|
|
85
|
+
{Issues in code you modified or functions you updated}
|
|
342
86
|
|
|
343
87
|
---
|
|
344
88
|
|
|
345
|
-
##
|
|
89
|
+
## âšī¸ Pre-existing Issues (Not Blocking)
|
|
346
90
|
|
|
347
|
-
{
|
|
91
|
+
{Issues in files you reviewed but didn't modify}
|
|
348
92
|
|
|
349
93
|
---
|
|
350
94
|
|
|
351
|
-
##
|
|
352
|
-
|
|
353
|
-
{MEDIUM severity incomplete or unclear documentation}
|
|
95
|
+
## Summary
|
|
354
96
|
|
|
355
|
-
|
|
97
|
+
**Your Changes:**
|
|
98
|
+
- đ´ CRITICAL/HIGH/MEDIUM counts
|
|
356
99
|
|
|
357
|
-
|
|
100
|
+
**Code You Touched:**
|
|
101
|
+
- â ī¸ HIGH/MEDIUM counts
|
|
358
102
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
---
|
|
103
|
+
**Pre-existing:**
|
|
104
|
+
- âšī¸ MEDIUM/LOW counts
|
|
362
105
|
|
|
363
|
-
|
|
106
|
+
**Documentation Score**: {X}/10
|
|
364
107
|
|
|
365
|
-
**Recommendation**:
|
|
108
|
+
**Merge Recommendation**:
|
|
109
|
+
- â BLOCK (if critical issues in your changes)
|
|
110
|
+
- â ī¸ REVIEW REQUIRED (if high issues)
|
|
111
|
+
- â
APPROVED WITH CONDITIONS
|
|
112
|
+
- â
APPROVED
|
|
113
|
+
```
|
|
366
114
|
|
|
367
|
-
|
|
115
|
+
### Step 5: Save Report
|
|
368
116
|
|
|
369
|
-
|
|
117
|
+
```bash
|
|
118
|
+
REPORT_FILE="${AUDIT_BASE_DIR}/documentation-report.${TIMESTAMP}.md"
|
|
119
|
+
mkdir -p "$(dirname "$REPORT_FILE")"
|
|
120
|
+
cat > "$REPORT_FILE" <<'REPORT'
|
|
121
|
+
{Generated report content}
|
|
122
|
+
REPORT
|
|
123
|
+
echo "â
Documentation audit saved: $REPORT_FILE"
|
|
370
124
|
```
|
|
371
125
|
|
|
372
|
-
|
|
373
|
-
|
|
126
|
+
## Key Principles
|
|
127
|
+
|
|
128
|
+
1. **Focus on changed lines first** - Developer introduced these
|
|
129
|
+
2. **Context matters** - Issues near changes should be fixed together
|
|
130
|
+
3. **Be fair** - Don't block PRs for legacy code
|
|
131
|
+
4. **Be specific** - Exact file:line with examples
|
|
132
|
+
5. **Be actionable** - Clear fixes
|