specflow-cc 1.0.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 +73 -0
- package/LICENSE +21 -0
- package/README.md +246 -0
- package/agents/impl-reviewer.md +271 -0
- package/agents/spec-auditor.md +196 -0
- package/agents/spec-creator.md +155 -0
- package/agents/spec-executor.md +235 -0
- package/agents/spec-reviser.md +184 -0
- package/agents/spec-splitter.md +197 -0
- package/bin/install.js +398 -0
- package/commands/sf/audit.md +210 -0
- package/commands/sf/deps.md +234 -0
- package/commands/sf/done.md +271 -0
- package/commands/sf/fix.md +272 -0
- package/commands/sf/help.md +263 -0
- package/commands/sf/history.md +268 -0
- package/commands/sf/init.md +217 -0
- package/commands/sf/list.md +127 -0
- package/commands/sf/metrics.md +319 -0
- package/commands/sf/new.md +171 -0
- package/commands/sf/next.md +182 -0
- package/commands/sf/pause.md +211 -0
- package/commands/sf/plan.md +210 -0
- package/commands/sf/priority.md +198 -0
- package/commands/sf/resume.md +248 -0
- package/commands/sf/review.md +258 -0
- package/commands/sf/revise.md +232 -0
- package/commands/sf/run.md +265 -0
- package/commands/sf/show.md +203 -0
- package/commands/sf/split.md +341 -0
- package/commands/sf/status.md +170 -0
- package/commands/sf/todo.md +130 -0
- package/commands/sf/todos.md +133 -0
- package/hooks/statusline.js +69 -0
- package/package.json +37 -0
- package/templates/audit.md +61 -0
- package/templates/project.md +39 -0
- package/templates/spec.md +59 -0
- package/templates/state.md +32 -0
- package/templates/todo.md +15 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sf:todos
|
|
3
|
+
description: List all to-do items sorted by priority
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Read
|
|
6
|
+
- Bash
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<purpose>
|
|
10
|
+
Display all to-do items from the backlog, sorted by priority. Shows ID, description, priority, and creation date. Provides quick access to convert items to specifications.
|
|
11
|
+
</purpose>
|
|
12
|
+
|
|
13
|
+
<context>
|
|
14
|
+
@.specflow/todos/TODO.md
|
|
15
|
+
</context>
|
|
16
|
+
|
|
17
|
+
<workflow>
|
|
18
|
+
|
|
19
|
+
## Step 1: Verify Initialization
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
[ -d .specflow ] && echo "OK" || echo "NOT_INITIALIZED"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**If NOT_INITIALIZED:**
|
|
26
|
+
```
|
|
27
|
+
SpecFlow not initialized.
|
|
28
|
+
|
|
29
|
+
Run `/sf init` to start.
|
|
30
|
+
```
|
|
31
|
+
Exit.
|
|
32
|
+
|
|
33
|
+
## Step 2: Check for TODO.md
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
[ -f .specflow/todos/TODO.md ] && echo "EXISTS" || echo "NO_TODOS"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**If NO_TODOS:**
|
|
40
|
+
```
|
|
41
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
42
|
+
TO-DO LIST
|
|
43
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
|
+
|
|
45
|
+
No to-do items found.
|
|
46
|
+
|
|
47
|
+
Add your first idea:
|
|
48
|
+
`/sf todo "your idea here"`
|
|
49
|
+
```
|
|
50
|
+
Exit.
|
|
51
|
+
|
|
52
|
+
## Step 3: Parse TODO.md
|
|
53
|
+
|
|
54
|
+
Read `.specflow/todos/TODO.md` and extract each todo block:
|
|
55
|
+
- ID (TODO-XXX)
|
|
56
|
+
- Date (from header)
|
|
57
|
+
- Description
|
|
58
|
+
- Priority (high | medium | low | —)
|
|
59
|
+
- Notes (optional)
|
|
60
|
+
|
|
61
|
+
Look for pattern:
|
|
62
|
+
```
|
|
63
|
+
## TODO-XXX — YYYY-MM-DD
|
|
64
|
+
**Description:** ...
|
|
65
|
+
**Priority:** ...
|
|
66
|
+
**Notes:** ...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Step 4: Sort by Priority
|
|
70
|
+
|
|
71
|
+
Sort todos:
|
|
72
|
+
1. high
|
|
73
|
+
2. medium
|
|
74
|
+
3. low
|
|
75
|
+
4. — (unset)
|
|
76
|
+
|
|
77
|
+
Within same priority, sort by date (oldest first).
|
|
78
|
+
|
|
79
|
+
## Step 5: Count Statistics
|
|
80
|
+
|
|
81
|
+
- Total todos
|
|
82
|
+
- By priority (high, medium, low, unset)
|
|
83
|
+
|
|
84
|
+
## Step 6: Display List
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
88
|
+
TO-DO LIST
|
|
89
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
90
|
+
|
|
91
|
+
| # | ID | Description | Priority | Created |
|
|
92
|
+
|----|----------|--------------------------|----------|------------|
|
|
93
|
+
| 1 | TODO-001 | Add caching for API | high | 2024-01-10 |
|
|
94
|
+
| 2 | TODO-003 | Refactor AuthService | medium | 2024-01-12 |
|
|
95
|
+
| 3 | TODO-002 | Update documentation | low | 2024-01-11 |
|
|
96
|
+
| 4 | TODO-004 | Research WebSocket | — | 2024-01-13 |
|
|
97
|
+
|
|
98
|
+
**Total:** {N} items ({high} high, {medium} medium, {low} low, {unset} unset)
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
**Actions:**
|
|
103
|
+
- `/sf plan 1` — convert first item to specification
|
|
104
|
+
- `/sf plan TODO-001` — convert by ID
|
|
105
|
+
- `/sf priority` — change priorities
|
|
106
|
+
- `/sf todo "new idea"` — add new item
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Step 7: Show Notes (if any have notes)
|
|
110
|
+
|
|
111
|
+
If any todo has non-empty notes:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
**Notes:**
|
|
117
|
+
|
|
118
|
+
**TODO-001:** Consider Redis or in-memory
|
|
119
|
+
**TODO-003:** Split into smaller services first
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
</workflow>
|
|
123
|
+
|
|
124
|
+
<success_criteria>
|
|
125
|
+
- [ ] Initialization verified
|
|
126
|
+
- [ ] TODO.md parsed if exists
|
|
127
|
+
- [ ] All todos extracted with ID, description, priority, date
|
|
128
|
+
- [ ] Sorted by priority then date
|
|
129
|
+
- [ ] Numbered list displayed (# column for easy reference)
|
|
130
|
+
- [ ] Statistics shown
|
|
131
|
+
- [ ] Clear actions provided
|
|
132
|
+
- [ ] Notes shown if present
|
|
133
|
+
</success_criteria>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Claude Code Statusline - SpecFlow Edition
|
|
3
|
+
// Shows: model | spec status | directory | context usage
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
|
|
8
|
+
// Read JSON from stdin (Claude Code protocol)
|
|
9
|
+
let input = '';
|
|
10
|
+
process.stdin.setEncoding('utf8');
|
|
11
|
+
process.stdin.on('data', chunk => input += chunk);
|
|
12
|
+
process.stdin.on('end', () => {
|
|
13
|
+
try {
|
|
14
|
+
const data = JSON.parse(input);
|
|
15
|
+
const model = data.model?.display_name || 'Claude';
|
|
16
|
+
const dir = data.workspace?.current_dir || process.cwd();
|
|
17
|
+
const remaining = data.context_window?.remaining_percentage;
|
|
18
|
+
|
|
19
|
+
// Context window display (shows USED percentage)
|
|
20
|
+
let ctx = '';
|
|
21
|
+
if (remaining != null) {
|
|
22
|
+
const rem = Math.round(remaining);
|
|
23
|
+
const used = Math.max(0, Math.min(100, 100 - rem));
|
|
24
|
+
|
|
25
|
+
// Build progress bar (10 segments)
|
|
26
|
+
const filled = Math.floor(used / 10);
|
|
27
|
+
const bar = '█'.repeat(filled) + '░'.repeat(10 - filled);
|
|
28
|
+
|
|
29
|
+
// Color based on usage
|
|
30
|
+
if (used < 50) {
|
|
31
|
+
ctx = ` \x1b[32m${bar} ${used}%\x1b[0m`;
|
|
32
|
+
} else if (used < 65) {
|
|
33
|
+
ctx = ` \x1b[33m${bar} ${used}%\x1b[0m`;
|
|
34
|
+
} else if (used < 80) {
|
|
35
|
+
ctx = ` \x1b[38;5;208m${bar} ${used}%\x1b[0m`;
|
|
36
|
+
} else {
|
|
37
|
+
ctx = ` \x1b[5;31m💀 ${bar} ${used}%\x1b[0m`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// SpecFlow status from STATE.md
|
|
42
|
+
let sfStatus = '';
|
|
43
|
+
const stateFile = path.join(dir, '.specflow', 'STATE.md');
|
|
44
|
+
if (fs.existsSync(stateFile)) {
|
|
45
|
+
try {
|
|
46
|
+
const content = fs.readFileSync(stateFile, 'utf8');
|
|
47
|
+
const specMatch = content.match(/\*\*Active Specification:\*\*\s*(\S+)/);
|
|
48
|
+
const statusMatch = content.match(/\*\*Status:\*\*\s*(\S+)/);
|
|
49
|
+
|
|
50
|
+
const spec = specMatch ? specMatch[1] : null;
|
|
51
|
+
const status = statusMatch ? statusMatch[1] : null;
|
|
52
|
+
|
|
53
|
+
if (spec && spec !== '—' && spec !== 'none') {
|
|
54
|
+
sfStatus = `\x1b[36m[SF: ${spec}`;
|
|
55
|
+
if (status) {
|
|
56
|
+
sfStatus += ` ${status}`;
|
|
57
|
+
}
|
|
58
|
+
sfStatus += ']\x1b[0m │ ';
|
|
59
|
+
}
|
|
60
|
+
} catch (e) {}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Output
|
|
64
|
+
const dirname = path.basename(dir);
|
|
65
|
+
process.stdout.write(`${sfStatus}\x1b[2m${model}\x1b[0m │ \x1b[2m${dirname}\x1b[0m${ctx}`);
|
|
66
|
+
} catch (e) {
|
|
67
|
+
// Silent fail - don't break statusline on parse errors
|
|
68
|
+
}
|
|
69
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "specflow-cc",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Spec-driven development system for Claude Code — quality-first workflow with explicit audit cycles",
|
|
5
|
+
"bin": {
|
|
6
|
+
"specflow-cc": "bin/install.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin",
|
|
10
|
+
"commands",
|
|
11
|
+
"agents",
|
|
12
|
+
"templates",
|
|
13
|
+
"hooks",
|
|
14
|
+
"CHANGELOG.md"
|
|
15
|
+
],
|
|
16
|
+
"keywords": [
|
|
17
|
+
"claude",
|
|
18
|
+
"claude-code",
|
|
19
|
+
"ai",
|
|
20
|
+
"spec-driven",
|
|
21
|
+
"development",
|
|
22
|
+
"audit"
|
|
23
|
+
],
|
|
24
|
+
"author": "ivkan",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/ivkan/specflow-cc.git"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/ivkan/specflow-cc",
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/ivkan/specflow-cc/issues"
|
|
33
|
+
},
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=16.7.0"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
spec_id: SPEC-XXX
|
|
3
|
+
audit_version: v1
|
|
4
|
+
auditor: fresh-context
|
|
5
|
+
date: YYYY-MM-DD
|
|
6
|
+
verdict: pass | fail | conditional
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Audit Report: SPEC-XXX
|
|
10
|
+
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
[One-line summary of the audit outcome]
|
|
14
|
+
|
|
15
|
+
## Specification Analysis
|
|
16
|
+
|
|
17
|
+
### Clarity
|
|
18
|
+
- [ ] Task description is unambiguous
|
|
19
|
+
- [ ] Requirements are specific and measurable
|
|
20
|
+
- [ ] Acceptance criteria are testable
|
|
21
|
+
|
|
22
|
+
### Completeness
|
|
23
|
+
- [ ] All necessary files listed
|
|
24
|
+
- [ ] Interfaces/types defined where needed
|
|
25
|
+
- [ ] Edge cases considered
|
|
26
|
+
|
|
27
|
+
### Feasibility
|
|
28
|
+
- [ ] Complexity estimate is reasonable
|
|
29
|
+
- [ ] No conflicting requirements
|
|
30
|
+
- [ ] Dependencies are identified
|
|
31
|
+
|
|
32
|
+
## Issues Found
|
|
33
|
+
|
|
34
|
+
### Critical (blocks implementation)
|
|
35
|
+
|
|
36
|
+
<!-- Issues that must be resolved before implementation -->
|
|
37
|
+
|
|
38
|
+
1. **[Issue Title]**
|
|
39
|
+
- Location: [section/line]
|
|
40
|
+
- Problem: [description]
|
|
41
|
+
- Suggestion: [how to fix]
|
|
42
|
+
|
|
43
|
+
### Major (should fix)
|
|
44
|
+
|
|
45
|
+
<!-- Issues that significantly affect implementation quality -->
|
|
46
|
+
|
|
47
|
+
### Minor (nice to fix)
|
|
48
|
+
|
|
49
|
+
<!-- Small improvements, clarifications -->
|
|
50
|
+
|
|
51
|
+
## Verdict
|
|
52
|
+
|
|
53
|
+
**[PASS | FAIL | CONDITIONAL]**
|
|
54
|
+
|
|
55
|
+
[Explanation of the verdict and any conditions for proceeding]
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Response History
|
|
60
|
+
|
|
61
|
+
<!-- Filled by /sf revise -->
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# PROJECT.md Template
|
|
2
|
+
|
|
3
|
+
## What This Is
|
|
4
|
+
|
|
5
|
+
[One sentence describing what this project is]
|
|
6
|
+
|
|
7
|
+
## Core Value
|
|
8
|
+
|
|
9
|
+
[The ONE thing that must work for this project to be valuable]
|
|
10
|
+
|
|
11
|
+
## Tech Stack
|
|
12
|
+
|
|
13
|
+
| Layer | Technology |
|
|
14
|
+
|-------|------------|
|
|
15
|
+
| Language | [e.g., TypeScript] |
|
|
16
|
+
| Framework | [e.g., Next.js] |
|
|
17
|
+
| Database | [e.g., PostgreSQL] |
|
|
18
|
+
| ORM | [e.g., Prisma] |
|
|
19
|
+
| Styling | [e.g., Tailwind CSS] |
|
|
20
|
+
|
|
21
|
+
## Project Structure
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
[Directory tree showing main folders]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Patterns & Conventions
|
|
28
|
+
|
|
29
|
+
- [Pattern 1: e.g., API routes in /app/api/]
|
|
30
|
+
- [Pattern 2: e.g., Components in PascalCase]
|
|
31
|
+
- [Pattern 3]
|
|
32
|
+
|
|
33
|
+
## Constraints
|
|
34
|
+
|
|
35
|
+
- [Constraint 1: e.g., Must work offline]
|
|
36
|
+
- [Constraint 2]
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
*Generated by SpecFlow on [date]*
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: SPEC-XXX
|
|
3
|
+
type: feature | refactor | bugfix
|
|
4
|
+
status: draft | audited | running | review | done
|
|
5
|
+
priority: high | medium | low
|
|
6
|
+
complexity: small | medium | large
|
|
7
|
+
created: YYYY-MM-DD
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# [Task Title]
|
|
11
|
+
|
|
12
|
+
## Context
|
|
13
|
+
|
|
14
|
+
[Why this is needed — background, motivation, problem being solved]
|
|
15
|
+
|
|
16
|
+
## Task
|
|
17
|
+
|
|
18
|
+
[What needs to be done — clear description of the work]
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
### Interfaces (if applicable)
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// Type definitions, API contracts, etc.
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Files to Create/Modify
|
|
29
|
+
|
|
30
|
+
- [ ] `path/to/file.ext` — [what to do]
|
|
31
|
+
- [ ] `path/to/another.ext` — [what to do]
|
|
32
|
+
|
|
33
|
+
### Files to Delete
|
|
34
|
+
|
|
35
|
+
- [ ] `path/to/old.ext` — [reason for deletion]
|
|
36
|
+
|
|
37
|
+
## Acceptance Criteria
|
|
38
|
+
|
|
39
|
+
- [ ] [Criterion 1 — specific, measurable]
|
|
40
|
+
- [ ] [Criterion 2 — specific, measurable]
|
|
41
|
+
- [ ] [Criterion 3 — specific, measurable]
|
|
42
|
+
|
|
43
|
+
## Constraints
|
|
44
|
+
|
|
45
|
+
- [What NOT to do]
|
|
46
|
+
- [Boundaries and limitations]
|
|
47
|
+
|
|
48
|
+
## Assumptions
|
|
49
|
+
|
|
50
|
+
> Filled by spec-creator agent. Review and correct if needed.
|
|
51
|
+
|
|
52
|
+
- [Assumption 1]
|
|
53
|
+
- [Assumption 2]
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Audit History
|
|
58
|
+
|
|
59
|
+
<!-- Filled by /sf audit -->
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# STATE.md Template
|
|
2
|
+
|
|
3
|
+
## Current Position
|
|
4
|
+
|
|
5
|
+
- **Active Specification:** [none | SPEC-XXX]
|
|
6
|
+
- **Status:** [idle | drafting | auditing | running | reviewing]
|
|
7
|
+
- **Next Step:** [/sf new | /sf audit | /sf run | /sf review | /sf done]
|
|
8
|
+
|
|
9
|
+
## Queue
|
|
10
|
+
|
|
11
|
+
| # | ID | Title | Priority | Status |
|
|
12
|
+
|---|----|-------|----------|--------|
|
|
13
|
+
| — | — | — | — | — |
|
|
14
|
+
|
|
15
|
+
## Decisions
|
|
16
|
+
|
|
17
|
+
| Date | Specification | Decision |
|
|
18
|
+
|------|---------------|----------|
|
|
19
|
+
| — | — | — |
|
|
20
|
+
|
|
21
|
+
## Project Patterns
|
|
22
|
+
|
|
23
|
+
- [Patterns discovered during work]
|
|
24
|
+
|
|
25
|
+
## Warnings
|
|
26
|
+
|
|
27
|
+
| Date | Specification | Reason |
|
|
28
|
+
|------|---------------|--------|
|
|
29
|
+
| — | — | — |
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
*Last updated: [date]*
|