@mhd-ghaith-abtah/flow 0.8.0-beta.0 → 0.8.0-beta.2

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 CHANGED
@@ -6,6 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.8.0-beta.2] — 2026-05-23
10
+
11
+ ### Fixed
12
+ - **Headless `flow init --yes` now drops `.caveman-enable` marker** — closes a parity gap between the slash workflow and the headless orchestrator. The slash `/flow-init` (skills/flow-init/workflow.md step 8b) has always dropped a zero-byte `.caveman-enable` in the project root when Caveman is requested, so allowlist-mode users (`~/.config/caveman/config.json` = `{"defaultMode": "off"}`) get Caveman activated there automatically. The headless orchestrator skipped this step despite README + usage.md both claiming the installer "drops a `.caveman-enable` marker". Surfaced by a user dogfooding the v0.8.0-beta.1 npm tarball into their actual project. Fix: `lib/init/orchestrate.js` now writes the marker after the Caveman dispatcher runs (skipped under `dryRun: true`, idempotent if the file already exists, non-fatal on write failure). 3 new tests cover the marker-written / no-marker-when-subset-none / no-marker-in-dry-run cases. docs/usage.md §16d updated — the manual `touch .caveman-enable` workaround is no longer needed on either install path. 191/191 tests pass.
13
+
14
+ ### Changed
15
+ - **Docs audit + greenfield/Caveman sections** — full sweep of every doc file for staleness post-v0.8.0-beta.1. `docs/quickstart.md` rewritten: bootstrap order now includes the `flow install-skills` step (was missing — same gap users hit before the install-skills command shipped), Q count corrected to 9 (was 8 pre-Q7c), ECC install snippet updated from the dead `./install.sh` path to the github-pin form, `/flow-doctor --fix` (which doesn't exist) replaced with `--repair-upstream`, retro output path corrected from `<date>.md` to `<epic-id>-retro.md`. `docs/migrate-from-bmad.md` stops naming specific BMad slash commands (`/bmad-create-prd`, `/bmad-create-story`) since those changed between BMad versions; now points at the BMad 6+ `/bmad:bmm:<step>` namespace as the current shape. `docs/profiles.md` clarifies that tokens-per-story figures assume Caveman = `full`. README's "When to use which command" table swapped specific BMad slash names for a version-agnostic pointer; the install diagram shows the actual github pin + Caveman fork commands. `docs/usage.md` gains two new sections: §2c "Starting from zero (greenfield + BMad planning)" — the PRD → architecture → stories → import-bmad → /flow-story arc for users with only an idea; and §17 "How Caveman enhances Flow" — the token-math justification, mode reference, fork-pin story, opt-out paths.
16
+
17
+ ## [0.8.0-beta.1] — 2026-05-23
18
+
19
+ ### Added
20
+ - **`flow install-skills` command** — closes the bootstrap gap between npm install and Claude Code slash command discovery. After `npm install -g @mhd-ghaith-abtah/flow@beta`, run `flow install-skills` to symlink the four `skills/flow-*` directories into `~/.claude/skills/` (or `<project>/.claude/skills/` with `--scope project` for the team-commit pattern; `--scope both` for both). Idempotent (skips already-correctly-linked targets); refuses to clobber real directories at the target without `--force`; replaces wrong-source symlinks silently. 9 new tests covering home/project/both scopes, refusal-without-force, force-replace, dry-run, idempotent re-run, and wrong-source-symlink replacement. README + docs/usage.md updated with the corrected bootstrap order (`npm install -g` → `flow install-skills` → `/flow-init`).
21
+
9
22
  ## [0.8.0-beta.0] — 2026-05-23
10
23
 
11
24
  ### Added
package/README.md CHANGED
@@ -23,25 +23,26 @@ Existing per-story workflows are token-heavy. BMad's create-story re-reads epics
23
23
  > **Status (v0.7.2-beta.0, published 2026-05-19):** Flow is live on npm as a **beta channel**. Stable `latest` will be promoted from beta after a soak period. Expect minor breaking changes between beta releases until then.
24
24
 
25
25
  ```bash
26
- # Inside Claude Code (recommended for first install interactive)
27
- /flow-init
28
-
29
- # Headless install via npm — beta channel (no Claude Code required)
26
+ # 1. Install the Node CLI + bootstrap the Claude Code surface
30
27
  npm install -g @mhd-ghaith-abtah/flow@beta
28
+ flow install-skills # one-time; symlinks 4 skills into ~/.claude/skills/
29
+
30
+ # 2. Then EITHER (interactive):
31
+ /flow-init # inside Claude Code
32
+
33
+ # OR (headless, no Claude Code needed):
31
34
  flow init --profile standard --yes # chains detect → upstreams → MCPs → scaffold
35
+
36
+ # Useful at any point:
32
37
  flow plan --profile standard # preview without executing
33
38
  flow doctor # health check
34
39
 
35
- # One-shot via npx — no install
36
- npx -y @mhd-ghaith-abtah/flow@beta init --profile mini --yes
37
-
38
- # Or from a clone (development / contributing)
40
+ # Dev clone (contributors):
39
41
  git clone https://github.com/mhd-ghaith-abtah/flow.git
40
- cd flow && npm install && tools/dev-link.sh
41
- flow plan --profile standard
42
+ cd flow && npm install && tools/dev-link.sh # dev-mode equivalent of install-skills + PATH link
42
43
  ```
43
44
 
44
- Two paths, same end state. `/flow-init` is interactive Claude Code drives the Q&A, error recovery, and multi-step ceremony. `flow init --yes` is headless pre-populates every answer from the profile defaults so it runs end-to-end without prompts (override individual knobs via `--ecc-scope`, `--bmad-subset`, `--ecc-subset`). Both invoke the same upstream installers and scaffold the same files.
45
+ The `flow install-skills` step is what makes `/flow-init` resolve in Claude Code npm puts the package in your global node_modules, but Claude Code only scans `~/.claude/skills/`. After install-skills, both paths (interactive slash or headless CLI) reach the same orchestrator and write the same files. Override individual knobs via `--ecc-scope`, `--bmad-subset`, `--ecc-subset`. Full guide: [docs/usage.md](docs/usage.md).
45
46
 
46
47
  The installer detects your project shape, then:
47
48
  - Installs Flow's four skills (`flow-init`, `flow-sprint`, `flow-story`, `flow-doctor`)
@@ -55,6 +56,8 @@ The installer detects your project shape, then:
55
56
 
56
57
  ## Quickstart
57
58
 
59
+ > **Want every option in one place?** See the long-form [Usage Guide](docs/usage.md) — installation paths, daily workflow, sprint commands, profiles, ECC scope, maintenance, uninstall, full CLI reference, common scenarios (recipe book), and troubleshooting. The block below is the 30-second version.
60
+
58
61
  ```bash
59
62
  $ /flow-init # one time per project
60
63
  $ /flow-sprint add "First story" --epic E1 --tags ui # add a story
@@ -94,7 +97,8 @@ flow install
94
97
  ├── Phase B: install Flow's own skills + adapters + templates
95
98
  ├── Phase C: delegate to upstream installers
96
99
  │ ├── npx bmad-method install --modules <curated subset>
97
- └── ECC ./install.sh --profile <curated subset>
100
+ ├── npx -y -p "github:affaan-m/ECC#<commit>" ecc-install --target <user|project> --profile <curated subset>
101
+ │ └── npx -y "github:mhd-ghaith-abtah/caveman#flow-pin-v0.1" # temporary fork, see Caveman FAQ
98
102
  ├── Phase D: install MCP servers (context7, playwright, linear, …)
99
103
  ├── Phase E: scaffold flow.config.yaml + docs/flow/
100
104
  └── Phase F: smoke test (flow doctor)
@@ -108,8 +112,8 @@ After `/flow-init` you'll have slash commands from all three projects active. Us
108
112
 
109
113
  | Goal | Command | Owner |
110
114
  |---|---|---|
111
- | Write a PRD, architecture doc, or epic list | `/bmad-create-prd`, `/bmad-create-architecture`, `/bmad-create-epic` | BMad |
112
- | Generate a fresh story from a BMad epic | `/bmad-create-story` (then `/flow-sprint import-bmad`) | BMad → Flow |
115
+ | Plan a brand-new project (PRD architecture stories) | BMad's own workflow (slash names vary by version — BMad 6 uses `/bmad:bmm:2-plan-workflow`, `/bmad:bmm:3-solutioning`, `/bmad:bmm:4-implementation`) | BMad |
116
+ | Import BMad's planning output into Flow | `/flow-sprint import-bmad` or `flow sprint import-bmad` | BMad → Flow |
113
117
  | Add a story to the current sprint | `/flow-sprint add "<title>" --epic E1` | Flow |
114
118
  | Pick the next story to work on | `/flow-sprint next` | Flow |
115
119
  | **Implement → review → verify → commit → PR** | `/flow-story` | Flow (orchestrates ECC) |
@@ -117,11 +121,11 @@ After `/flow-init` you'll have slash commands from all three projects active. Us
117
121
  | Just run a code review | `/code-review` | ECC |
118
122
  | Just run the documentation updater | `/update-docs` | ECC |
119
123
  | Health-check the whole install | `/flow-doctor` | Flow |
120
- | End-of-sprint retro | `/flow-sprint retro` | Flow |
124
+ | End-of-sprint retro | `/flow-sprint retro E1` (epic-scoped) | Flow |
121
125
 
122
126
  **Rule of thumb:** if you're moving a story through its lifecycle (plan → code → review → ship), use `/flow-story` — it dispatches to the right ECC primitive at the right phase. If you want to invoke an ECC primitive directly (e.g., to re-review uncommitted code without advancing the story), call it by name; Flow won't get in the way.
123
127
 
124
- **Don't mix:** `/bmad-create-story` and `/flow-sprint add` both create story files. Pick one per project — Flow's import-bmad subcommand bridges the two if you start with BMad and want Flow to take over.
128
+ **Don't double-create:** BMad's create-story slash command and `/flow-sprint add` both produce story files. Pick one per project — Flow's `import-bmad` subcommand bridges the two if you start with BMad and want Flow to take over per-story orchestration.
125
129
 
126
130
  ## FAQ
127
131
 
package/bin/flow.js CHANGED
@@ -24,6 +24,7 @@ ${chalk.bold('Usage:')}
24
24
  ${chalk.bold('Commands:')}
25
25
  init Interactive first-time setup (same as /flow-init in Claude Code)
26
26
  install Non-interactive install with flags
27
+ install-skills Symlink Flow skills into ~/.claude/skills/ (bootstrap)
27
28
  plan Dry-run: show the resolved install plan
28
29
  status What's installed where
29
30
  doctor [--mcp <id>] Health check
@@ -68,7 +69,7 @@ Version ${PKG.version} · ${chalk.dim(PKG.homepage)}
68
69
  `;
69
70
 
70
71
  const COMMANDS = [
71
- 'init', 'install', 'plan', 'status', 'doctor', 'add', 'remove', 'uninstall',
72
+ 'init', 'install', 'install-skills', 'plan', 'status', 'doctor', 'add', 'remove', 'uninstall',
72
73
  'list-profiles', 'list-components', 'list-mcps', 'mcp', 'sprint', 'help', 'version', '--version'
73
74
  ];
74
75
 
@@ -6,7 +6,7 @@ Flow doesn't replace BMad — it sits on top of it and adds a lightweight per-st
6
6
 
7
7
  - Your BMad PRD, architecture, and epic documents — `/flow-init` does NOT touch these
8
8
  - Your BMad story files in `docs/_bmad-output/stories/` — Flow reads them as references
9
- - The BMad slash commands — `/bmad-create-prd`, `/bmad-create-epic`, `/bmad-create-story` still work
9
+ - The BMad slash commands keep working Flow doesn't remove or rename them. The exact slash names depend on which BMad version is installed (BMad 6+ uses the `/bmad:bmm:<step>` namespace, e.g. `/bmad:bmm:2-plan-workflow`, `/bmad:bmm:3-solutioning`, `/bmad:bmm:4-implementation`; older releases used a flatter `/bmad-*` form). Check `~/.claude/skills/` after install to see what BMad registered.
10
10
  - `_bmad/_config/manifest.yaml` — Flow records the BMad version for repair
11
11
 
12
12
  ## What changes
@@ -17,7 +17,7 @@ Flow doesn't replace BMad — it sits on top of it and adds a lightweight per-st
17
17
  - `journeys/`, `retros/`, `archive/`, `deferred.md`, `artifacts/`
18
18
  - `flow.config.yaml` — adapter + profile config (committed; team-share safe)
19
19
  - A new branch convention: `flow/<story-id>-<slug>` — used by `/flow-story` for auto-branching
20
- - `/flow-story` becomes the per-story orchestrator instead of `/bmad-create-story` + manual stepping
20
+ - `/flow-story` becomes the per-story orchestrator instead of BMad's own per-story workflow + manual stepping
21
21
 
22
22
  ## Migration
23
23
 
@@ -68,14 +68,15 @@ Then create one story stub per entry — `templates/story.md.tmpl` is the shape.
68
68
 
69
69
  ## Coexistence
70
70
 
71
- Once migrated, you can still create new BMad stories with `/bmad-create-story` and import them into Flow:
71
+ Once migrated, you can still create new stories through BMad's own slash commands (whatever your BMad version exposes) and re-import:
72
72
 
73
73
  ```
74
- /bmad-create-story # writes docs/_bmad-output/stories/E1-002-<slug>.md
75
- /flow-sprint import-bmad # detects new BMad story files, generates Flow stubs
74
+ # Run BMad's create-story flow — exact command depends on your BMad version.
75
+ # Then back into Flow:
76
+ /flow-sprint import-bmad # detects new BMad story files, generates Flow stubs
76
77
  ```
77
78
 
78
- The reverse — Flow → BMad — isn't supported. Flow's story stubs are deliberately lighter than BMad's, so round-tripping would lose information. If you need a full BMad-shape story file later, run `/bmad-create-story` and Flow will detect + link it.
79
+ The reverse — Flow → BMad — isn't supported. Flow's story stubs are deliberately lighter than BMad's, so round-tripping would lose information. If you need a full BMad-shape story file later, run BMad's create-story flow and Flow will detect + link it on the next `import-bmad`.
79
80
 
80
81
  ## Rollback
81
82
 
package/docs/profiles.md CHANGED
@@ -4,13 +4,15 @@ Profiles are named bundles that pick the right adapters + upstream subsets + MCP
4
4
 
5
5
  ## At a glance
6
6
 
7
- | Profile | Best for | Tokens/story | Review | E2E | PR | Issue tracker | ECC scope |
7
+ | Profile | Best for | Tokens/story* | Review | E2E | PR | Issue tracker | ECC scope |
8
8
  |---|---|---:|---|---|---|---|---|
9
9
  | `mini` | Solo, one repo, light review | ~20k | `code-review` only | none | GitHub | GitHub Issues | user |
10
10
  | `standard` | Solo/small team, formal review | ~40k | `code-review` + language reviewer + security on risk tags | Playwright MCP | GitHub | GitHub Issues | user |
11
11
  | `team` | Multi-repo, multi-LLM review | ~60k | + adversarial + edge-case + separate-model reviewer | Playwright MCP | GitHub (sibling PRs) | Linear | **project** |
12
12
  | `minimal` | Bare Flow, no upstreams | <10k | none | none | none | none | user |
13
13
 
14
+ *Tokens-per-story figures assume **Caveman is active in `full` mode** — Caveman compresses Claude Code's responses ~46% on input and ~75% on output, which is the only way these numbers are realistic. Without Caveman, multiply by ~3–4×. See [usage.md §17](usage.md#17-how-caveman-enhances-flow) for the math.
15
+
14
16
  ## What each profile changes
15
17
 
16
18
  ### `minimal`
@@ -4,28 +4,41 @@ A 10-minute path from zero to first shipped story.
4
4
 
5
5
  ## Prerequisites
6
6
 
7
- - [Claude Code](https://claude.com/claude-code) installed (`claude` on PATH)
8
- - Node 20+ (for the `flow` CLI; not strictly required if you only use slash commands)
7
+ - [Claude Code](https://claude.com/claude-code) installed (`claude` on PATH) — only required if you want the `/flow-*` slash commands. The headless CLI works without it.
8
+ - Node 20+
9
9
  - Git repo, with `origin` set if you want PRs
10
10
 
11
11
  ## Install
12
12
 
13
- Inside Claude Code, in your project root:
13
+ ```bash
14
+ # 1. Install the Node CLI
15
+ npm install -g @mhd-ghaith-abtah/flow@beta
16
+ flow --version # → 0.8.0-beta.1 (or newer)
14
17
 
18
+ # 2. Bootstrap Claude Code's slash command discovery
19
+ flow install-skills # symlinks 4 skills into ~/.claude/skills/
20
+
21
+ # 3. Pick a path per project:
22
+ flow init --profile mini --yes # headless (no Claude Code needed)
23
+ # OR, inside Claude Code:
24
+ /flow-init # interactive Q&A
15
25
  ```
16
- /flow-init
17
- ```
18
26
 
19
- This launches an interactive installer. It will:
27
+ `flow install-skills` is the bridge — npm puts Flow in `~/.npm-global/lib/node_modules/...` but Claude Code only scans `~/.claude/skills/<name>/`. Without that step, `/flow-init` won't resolve. Re-run after every Flow upgrade to refresh the symlinks (idempotent).
28
+
29
+ ## What the installer does
30
+
31
+ Either path (slash or headless `--yes`) walks the same chain:
20
32
 
21
33
  1. **Detect project shape** — package manager, framework, existing BMad/ECC install, CLAUDE.md presence
22
- 2. **Ask ~8 questions** — profile (mini/standard/team), adapters (issue tracker, PR platform, E2E, verify), upstream subsets (BMad, ECC, Caveman)
23
- 3. **Delegate to upstream installers** `npx bmad-method install --modules <curated>`, `ECC ./install.sh --profile <curated>`, plus Caveman
24
- 4. **Set up MCP servers** — context7, playwright, linear (if selected)
25
- 5. **Scaffold docs/flow/ + flow.config.yaml** — sprint.yaml, stories/, journeys/, retros/, deferred.md
34
+ 2. **Ask ~9 questions** (interactive only `--yes` pre-fills from profile defaults):
35
+ - Q1 profile · Q2–Q5 adapters (issue tracker, PR, E2E, verify) · Q6 BMad subset · Q7 ECC subset · Q7c ECC install scope (user/project) · Q7b Caveman mode · Q8 BMad migration (if detected) · Q9 secrets store
36
+ 3. **Delegate to upstream installers** — `npx bmad-method install --modules <curated>`, `npx -y -p "github:affaan-m/ECC#<commit>" ecc-install --target <user|project>`, Caveman from a Flow-maintained fork pinned at `flow-pin-v0.1` (see [usage.md §6](usage.md#6-ecc-install-scope) for the fork-pin story)
37
+ 4. **Register MCPs** — context7, playwright, linear, etc. (per profile)
38
+ 5. **Scaffold `docs/flow/` + `flow.config.yaml` + `install-state.json`**
26
39
  6. **Optionally migrate** an existing BMad `sprint-status.yaml`
27
40
 
28
- Re-running is idempotent `/flow-init --update` will diff against the recorded state and apply only deltas.
41
+ Re-running is idempotent. To re-resolve against an existing install, see [`flow init --update`](usage.md#8-updating-an-existing-install). To restore deleted scaffold files, see [`flow init --repair`](usage.md#9-repairing-a-broken-install).
29
42
 
30
43
  ## First story
31
44
 
@@ -37,12 +50,12 @@ Re-running is idempotent — `/flow-init --update` will diff against the recorde
37
50
 
38
51
  `/flow-story` auto-detects the current phase (plan / implement / review / verify / e2e / docs / commit / pr) from `sprint.yaml` + git branch + commit state, and invokes the right ECC primitive at each step. It chains phases automatically until it hits a destructive boundary (commit, PR) or a CRITICAL/HIGH review finding, then pauses for your CONFIRM.
39
52
 
40
- **Useful flags:**
53
+ **Useful `/flow-story` flags:**
41
54
 
42
55
  | Flag | Effect |
43
56
  |---|---|
44
57
  | `--auto` | No CONFIRM gates. Use for low-risk stories. |
45
- | `--auto-merge` | After PR opens, poll `gh pr merge --auto` until CI passes (15-min cap). |
58
+ | `--auto-merge` | After PR opens, poll `gh pr merge --auto` until CI passes (90-second wait cap per attempt; longer CI ends the turn + handoff). |
46
59
  | `--hard-review` | Force adversarial + edge-case reviewers regardless of tags. |
47
60
  | `--no-review` | Skip code review. Risky. Use for trivial config tweaks. |
48
61
  | `--no-verify` | Skip the verify command. Risky. |
@@ -53,30 +66,54 @@ Re-running is idempotent — `/flow-init --update` will diff against the recorde
53
66
 
54
67
  ## Closing out a story
55
68
 
56
- After a PR merges, `/flow-story` auto-detects the `merge-done` phase and asks for CONFIRM to flip the story to `done`. Or you can do it manually:
69
+ After a PR merges, `/flow-story` auto-detects the `merge-done` phase and asks for CONFIRM to flip the story to `done`. Or do it manually:
57
70
 
58
- ```
71
+ ```bash
72
+ # Inside Claude Code:
59
73
  /flow-sprint done E1-001
74
+
75
+ # Or headless:
76
+ flow sprint done E1-001 --note "Merged via auto-merge"
60
77
  ```
61
78
 
62
79
  ## End-of-sprint
63
80
 
64
81
  ```
65
- /flow-sprint retro
82
+ /flow-sprint retro E1
66
83
  ```
67
84
 
68
- Generates `docs/flow/retros/<date>.md` from your last sprint's stories: what shipped, what got deferred, review-finding rollup, verify failure rate.
85
+ Generates `docs/flow/retros/E1-retro.md` (one file per epic, not per date) from the epic's archived story files: shipped count, cycle time, deferred carry-forward, plus blank "What worked / What didn't / Carry into next epic" sections for you to edit.
69
86
 
70
87
  ## Health check
71
88
 
72
- ```
89
+ ```bash
90
+ # Inside Claude Code:
73
91
  /flow-doctor
92
+
93
+ # Headless:
94
+ flow doctor
95
+ flow doctor --json
96
+ flow doctor --verbose
97
+ ```
98
+
99
+ Verifies catalog / state / adapter files / MCP registration / required CLIs / upstream installations. Surfaces an ECC scope-collision section when both user-scope and project-scope ECC content exist.
100
+
101
+ To get repair commands for a specific upstream (BMad / ECC / Caveman pin drift):
102
+
103
+ ```bash
104
+ flow doctor --repair-upstream ecc # prints the reinstall command
105
+ flow doctor --repair-upstream bmad
106
+ flow doctor --repair-upstream caveman
74
107
  ```
75
108
 
76
- Verifies catalog / state / adapter files / MCP registration / required CLIs / upstream installations. Probes for known bugs (caveman-shrink mis-registered, severity-label stripping, loose marker matches). Add `--fix` for safe auto-repairs (prints the commands; doesn't auto-run anything destructive).
109
+ The `--repair-upstream` path prints commands but does NOT auto-run them upstream installs touch user-scope state, so the user runs them deliberately.
77
110
 
78
- ## Next
111
+ ## Where to go next
79
112
 
80
- - [profiles.md](profiles.md) choosing mini vs standard vs team
81
- - [adapters.md](adapters.md) — picking + swapping integrations
82
- - [migrate-from-bmad.md](migrate-from-bmad.md) — porting an existing BMad project
113
+ | Goal | Link |
114
+ |---|---|
115
+ | Comprehensive how-to (every flag, every scenario) | [usage.md](usage.md) |
116
+ | Choosing a profile (mini vs standard vs team) | [profiles.md](profiles.md) |
117
+ | Picking + swapping integrations | [adapters.md](adapters.md) |
118
+ | Porting an existing BMad project | [migrate-from-bmad.md](migrate-from-bmad.md) |
119
+ | Starting from zero with planning (PRD → architecture → stories) | [usage.md §2c](usage.md#2c-starting-from-zero-greenfield--bmad-planning) |