flow-cc 0.1.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/README.md +66 -0
- package/VERSION +1 -0
- package/bin/install.js +149 -0
- package/hooks/flow-check-update.js +53 -0
- package/hooks/flow-statusline.js +112 -0
- package/package.json +15 -0
- package/skills/flow-done.md +117 -0
- package/skills/flow-go.md +132 -0
- package/skills/flow-init.md +218 -0
- package/skills/flow-intro.md +92 -0
- package/skills/flow-spec.md +235 -0
- package/skills/flow-status.md +72 -0
- package/skills/flow-task.md +125 -0
- package/skills/flow-update.md +79 -0
- package/templates/CLAUDE.md.template +31 -0
- package/templates/ROADMAP.md.template +15 -0
- package/templates/STATE.md.template +23 -0
- package/templates/lessons.md.template +12 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow:task
|
|
3
|
+
description: Lightweight task execution — bug fixes, cleanup, and small features without a PRD
|
|
4
|
+
user_invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /flow:task — Lightweight Task Execution
|
|
8
|
+
|
|
9
|
+
You are executing the `/flow:task` skill. This is for small, focused work — bug fixes, cleanup, one-off features — that doesn't warrant a full PRD. Understand the task, execute it, verify it works, commit it, and document it.
|
|
10
|
+
|
|
11
|
+
RULES:
|
|
12
|
+
- NO AGENT TEAMS. NO PRD. Single execution context.
|
|
13
|
+
- Exception: ONE Task agent for an isolated subtask to prevent context bloat.
|
|
14
|
+
- This skill MUST work without `/flow:init`. Missing planning files are fine.
|
|
15
|
+
|
|
16
|
+
## Step 1 — Context Load
|
|
17
|
+
|
|
18
|
+
Read ALL of the following in parallel. If any file is missing, skip it gracefully:
|
|
19
|
+
- `.planning/STATE.md`
|
|
20
|
+
- `.planning/ROADMAP.md`
|
|
21
|
+
- `CLAUDE.md`
|
|
22
|
+
- `tasks/lessons.md`
|
|
23
|
+
- `PRD.md`
|
|
24
|
+
|
|
25
|
+
If no `.planning/` directory exists, print:
|
|
26
|
+
> No `.planning/` directory found — running standalone. Task will still be executed, verified, and committed.
|
|
27
|
+
|
|
28
|
+
Then continue.
|
|
29
|
+
|
|
30
|
+
## Step 2 — Task Understanding
|
|
31
|
+
|
|
32
|
+
Parse the user's argument (text provided after `/flow:task`).
|
|
33
|
+
|
|
34
|
+
IF no argument was provided:
|
|
35
|
+
- Use AskUserQuestion: "What needs to be done?"
|
|
36
|
+
- Provide 2-4 example options based on common task types (fix, cleanup, add, update)
|
|
37
|
+
|
|
38
|
+
Run a quick codebase scan (Grep/Glob) for files relevant to the task description.
|
|
39
|
+
|
|
40
|
+
## Step 3 — Quick Clarification
|
|
41
|
+
|
|
42
|
+
Ask 0-3 clarifying questions maximum.
|
|
43
|
+
|
|
44
|
+
RULES:
|
|
45
|
+
- NEVER MORE THAN 3 QUESTIONS.
|
|
46
|
+
- USE AskUserQuestion with 2-4 CONCRETE OPTIONS derived from codebase exploration.
|
|
47
|
+
- IF THE TASK IS UNAMBIGUOUS, ASK ZERO QUESTIONS. Proceed directly.
|
|
48
|
+
|
|
49
|
+
Decision gate: Can you identify WHAT to change, WHERE to change it, and the EXPECTED OUTCOME? If yes, skip to Step 4.
|
|
50
|
+
|
|
51
|
+
## Step 4 — Scope Guard
|
|
52
|
+
|
|
53
|
+
Estimate:
|
|
54
|
+
- Number of files affected
|
|
55
|
+
- Number of architectural layers touched (e.g., UI, API, DB, config)
|
|
56
|
+
|
|
57
|
+
IF 5+ files OR 3+ architectural layers:
|
|
58
|
+
- Use AskUserQuestion to recommend `/flow:spec` instead:
|
|
59
|
+
- Option 1: "Switch to /flow:spec (Recommended)" — "This touches [N] files across [N] layers. A PRD will keep it organized."
|
|
60
|
+
- Option 2: "Continue with /flow:task" — "I understand the scope. Execute it here."
|
|
61
|
+
|
|
62
|
+
The user can always override. Do not block.
|
|
63
|
+
|
|
64
|
+
## Step 5 — Execute
|
|
65
|
+
|
|
66
|
+
Do the work directly in the current context.
|
|
67
|
+
|
|
68
|
+
RULES:
|
|
69
|
+
- NO AGENT TEAMS. NO PRD. Direct execution.
|
|
70
|
+
- Exception: ONE Task agent is allowed for a single isolated subtask if it prevents context bloat.
|
|
71
|
+
- Follow existing code patterns and conventions found in CLAUDE.md and the codebase.
|
|
72
|
+
|
|
73
|
+
## Step 6 — Verify (MANDATORY)
|
|
74
|
+
|
|
75
|
+
RULE: NEVER SILENTLY SKIP VERIFICATION.
|
|
76
|
+
|
|
77
|
+
1. Check CLAUDE.md for project-specific verification commands (build, test, lint).
|
|
78
|
+
2. If no CLAUDE.md commands: check `package.json` scripts, `Makefile`, `pyproject.toml`, or similar for standard commands.
|
|
79
|
+
3. If verification commands are found: run them.
|
|
80
|
+
4. If NO verification commands exist anywhere: print a warning and continue.
|
|
81
|
+
> ⚠ No verification commands found. Skipping automated verification.
|
|
82
|
+
5. If verification fails: fix the issue and re-verify. Up to 2 fix cycles.
|
|
83
|
+
6. If still failing after 2 cycles: report the failure clearly with the error output. Do not silently move on.
|
|
84
|
+
|
|
85
|
+
## Step 7 — Commit
|
|
86
|
+
|
|
87
|
+
- Stage ONLY the files you changed (never `git add .` or `git add -A`)
|
|
88
|
+
- Commit message format: `fix:` / `feat:` / `refactor:` / `chore:` followed by a concise description
|
|
89
|
+
- Do NOT push
|
|
90
|
+
|
|
91
|
+
## Step 8 — Update Docs
|
|
92
|
+
|
|
93
|
+
IF `.planning/STATE.md` exists:
|
|
94
|
+
- Append to the "What Was Built" section (or create it if missing):
|
|
95
|
+
```
|
|
96
|
+
- /flow:task — [description] ([N] files, commit [short SHA])
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
RULES:
|
|
100
|
+
- DO NOT update ROADMAP.md — tasks are not milestone phases.
|
|
101
|
+
- DO NOT update PRD.md — tasks are not part of the spec.
|
|
102
|
+
- DO NOT create `.planning/` if it doesn't exist.
|
|
103
|
+
|
|
104
|
+
Quick lessons prompt via AskUserQuestion:
|
|
105
|
+
- "Any lessons from this task worth capturing?"
|
|
106
|
+
- Option 1: "No, nothing new" — Skip lessons.
|
|
107
|
+
- Option 2: "Yes, let me describe it" — Capture to `tasks/lessons.md` in PATTERN/CAUSE/FIX/RULE format.
|
|
108
|
+
|
|
109
|
+
If `tasks/lessons.md` doesn't exist, skip the lessons prompt.
|
|
110
|
+
|
|
111
|
+
## Step 9 — Summary
|
|
112
|
+
|
|
113
|
+
Print a compact completion block:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
✓ /flow:task complete
|
|
117
|
+
[description of what was done]
|
|
118
|
+
Files: [N] changed | Commit: [short SHA]
|
|
119
|
+
Verified: [pass/fail/skipped]
|
|
120
|
+
|
|
121
|
+
Next:
|
|
122
|
+
→ /flow:task [description] for another quick fix
|
|
123
|
+
→ /flow:go to continue milestone phases
|
|
124
|
+
→ /flow:done to wrap up the session
|
|
125
|
+
```
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flow:update
|
|
3
|
+
description: Update Flow plugin to the latest version from npm
|
|
4
|
+
user_invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /flow:update — Update Flow Plugin
|
|
8
|
+
|
|
9
|
+
You are executing the `/flow:update` skill. Follow these steps exactly:
|
|
10
|
+
|
|
11
|
+
## Step 1: Check current version
|
|
12
|
+
|
|
13
|
+
Read `~/.claude/commands/flow/VERSION` to get the installed version. Print it:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
Flow v<installed> installed
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
If the VERSION file does not exist, print this and stop:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
Flow is not installed. Install with: npx flow-cc
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Step 2: Check latest version
|
|
26
|
+
|
|
27
|
+
Run `npm view flow-cc version` to get the latest published version. Print it:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
Latest available: v<latest>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If the npm command fails (offline, package not found), print:
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
Could not check for updates — are you online?
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
And stop.
|
|
40
|
+
|
|
41
|
+
## Step 3: Compare versions
|
|
42
|
+
|
|
43
|
+
If installed version equals latest version, print this and stop:
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
Flow is up to date (v<version>)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Step 4: Confirm update
|
|
50
|
+
|
|
51
|
+
Print the available update and ask the user to confirm:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Update available: v<installed> → v<latest>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Wait for user confirmation before proceeding.
|
|
58
|
+
|
|
59
|
+
## Step 5: Run update
|
|
60
|
+
|
|
61
|
+
Run `npx flow-cc` to re-install with the latest version. Show the output.
|
|
62
|
+
|
|
63
|
+
## Step 6: Confirm success
|
|
64
|
+
|
|
65
|
+
Read `~/.claude/commands/flow/VERSION` again to get the new version. Print:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
Updated Flow: v<old> → v<new>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Step 7: Clear update notification
|
|
72
|
+
|
|
73
|
+
Delete `~/.claude/cache/flow-update-check.json` so the statusline notification disappears.
|
|
74
|
+
|
|
75
|
+
Print:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Restart Claude Code to see changes.
|
|
79
|
+
```
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Claude Code Instructions
|
|
2
|
+
|
|
3
|
+
## Quick Context
|
|
4
|
+
{{PROJECT_DESCRIPTION}}
|
|
5
|
+
|
|
6
|
+
**Tech Stack:** {{TECH_STACK}}
|
|
7
|
+
|
|
8
|
+
### START (Every Session)
|
|
9
|
+
1. Read this file (CLAUDE.md)
|
|
10
|
+
2. Read `.planning/STATE.md` for current status
|
|
11
|
+
3. Read `.planning/ROADMAP.md` for milestone progress
|
|
12
|
+
4. Read `PRD.md` for current execution spec (if one exists)
|
|
13
|
+
|
|
14
|
+
## Execution Rules
|
|
15
|
+
- **Plan before building.** For non-trivial work, read the PRD phase section before touching anything.
|
|
16
|
+
- **Delegate immediately.** If a task touches 3+ files, spawn an agent team within your first 2 tool calls.
|
|
17
|
+
- **Verify everything.** Run {{VERIFY_COMMANDS}} after agent work lands. Nothing is done until proven.
|
|
18
|
+
|
|
19
|
+
## Git Workflow
|
|
20
|
+
- All changes via PR. Never commit directly to main.
|
|
21
|
+
- Branch naming: `fix/short-description` or `feat/short-description`
|
|
22
|
+
|
|
23
|
+
## Session-End Docs (MANDATORY)
|
|
24
|
+
1. `.planning/STATE.md` — replace session notes (don't append), keep <80 lines
|
|
25
|
+
2. `.planning/ROADMAP.md` — update phase progress
|
|
26
|
+
3. `tasks/lessons.md` — add new lessons, refine existing ones
|
|
27
|
+
4. Commit doc updates to feature branch
|
|
28
|
+
|
|
29
|
+
## Critical Rules
|
|
30
|
+
- No assumptions — ask if requirements unclear
|
|
31
|
+
- Fight entropy — leave code better than you found it
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Roadmap
|
|
2
|
+
|
|
3
|
+
## Milestones
|
|
4
|
+
|
|
5
|
+
| Version | Milestone | Status | Phases |
|
|
6
|
+
|---------|-----------|--------|--------|
|
|
7
|
+
| v1 | {{FIRST_MILESTONE}} | Pending — needs `/flow:spec` | TBD |
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## v1: {{FIRST_MILESTONE}}
|
|
12
|
+
|
|
13
|
+
**Goal:** {{MILESTONE_GOAL}}
|
|
14
|
+
|
|
15
|
+
**Phases:** Run `/flow:spec` to define implementation phases.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Project State
|
|
2
|
+
|
|
3
|
+
## Current Position
|
|
4
|
+
- **Milestone:** {{FIRST_MILESTONE}} (v1)
|
|
5
|
+
- **Phase:** Not started — run `/flow:spec` to build PRD
|
|
6
|
+
- **Branch:** main
|
|
7
|
+
- **Last Session:** {{DATE}}
|
|
8
|
+
|
|
9
|
+
## Milestone Progress
|
|
10
|
+
|
|
11
|
+
| Phase | Name | Status |
|
|
12
|
+
|-------|------|--------|
|
|
13
|
+
| — | Run `/flow:spec` to define phases | — |
|
|
14
|
+
|
|
15
|
+
## What Was Built (This Session)
|
|
16
|
+
- Project initialized with `/flow:init`
|
|
17
|
+
- Created: CLAUDE.md, STATE.md, ROADMAP.md, tasks/lessons.md
|
|
18
|
+
|
|
19
|
+
## Key Decisions
|
|
20
|
+
- (none yet)
|
|
21
|
+
|
|
22
|
+
## Next Actions
|
|
23
|
+
1. Run `/flow:spec` to interview and generate PRD for {{FIRST_MILESTONE}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} — Lessons Learned
|
|
2
|
+
|
|
3
|
+
Format: PATTERN → CAUSE → FIX → RULE
|
|
4
|
+
|
|
5
|
+
## Execution Patterns
|
|
6
|
+
<!-- Lessons about workflow, delegation, verification -->
|
|
7
|
+
|
|
8
|
+
## Domain Knowledge
|
|
9
|
+
<!-- Lessons about business logic, data models, user behavior -->
|
|
10
|
+
|
|
11
|
+
## Technical Patterns
|
|
12
|
+
<!-- Lessons about the tech stack, libraries, deployment -->
|