@skyf0xx/hedgehog 0.1.12 → 0.1.13

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.
@@ -0,0 +1,172 @@
1
+ ---
2
+ name: hedgehog-planning-intake
3
+ description: Use once per project, at the start, and again on a scoped pass when new domain scope enters play — runs the vendored BMAD-METHOD planning shelf, mines its output into scope boundary/domain modules/the Add-ons decision, and gates on Confirm & Lock before anything is written. Invoked by the `planner` agent; don't run standalone.
4
+ ---
5
+
6
+ # Hedgehog Planning Intake
7
+
8
+ Turns a person's description of a problem into `TODO.md` (with its
9
+ `## Add-ons` block) and `docs/design/<module>-notes.md` per module, by
10
+ running the vendored BMAD-METHOD planning shelf and mining its output.
11
+ This is the mechanics `planner` calls once its "does Hedgehog apply at
12
+ all" check passes — the interpretive judgment (scope boundary, module
13
+ split, Add-ons decision, Confirm & Lock) still belongs to `planner`; this
14
+ skill is the fixed procedure that judgment runs inside.
15
+
16
+ ## Phase 0 — BMAD elicitation
17
+
18
+ State the BMAD attribution, then run the vendored shelf in full
19
+ sequence, every time — no per-project skip logic, no reduced default
20
+ set:
21
+
22
+ 1. `bmad-brainstorming` (`skills/BMAD/core-skills/bmad-brainstorming`) —
23
+ diverge on the idea before locking anything.
24
+ 2. `bmad-product-brief` (`skills/BMAD/bmm-skills/1-analysis/bmad-product-brief`)
25
+ — the product brief.
26
+ 3. `bmad-prfaq` (`skills/BMAD/bmm-skills/1-analysis/bmad-prfaq`) — vets
27
+ the idea press-release-style.
28
+ 4. `bmad-prd` (`skills/BMAD/bmm-skills/2-plan-workflows/bmad-prd`) — the
29
+ PRD, including its Glossary (entities, relationships, cardinality).
30
+ 5. `bmad-ux` (`skills/BMAD/bmm-skills/2-plan-workflows/bmad-ux`) — the UX
31
+ spec, `DESIGN.md` + `EXPERIENCE.md`.
32
+ 6. `bmad-deep-recon` (`skills/BMAD/core-skills/bmad-deep-recon`) —
33
+ market/competitive/user-voice research.
34
+
35
+ Any skill may itself invoke `bmad-advanced-elicitation`
36
+ (`skills/BMAD/core-skills/bmad-advanced-elicitation`) at its own pause
37
+ points — that's expected, let it run.
38
+
39
+ Write each skill's output to `.hedgehog/BMAD/`, per the fixed layout:
40
+
41
+ ```
42
+ .hedgehog/BMAD/
43
+ 00-manifest.md # attribution + pinned version + date + which skills ran
44
+ 01-brainstorming.md
45
+ 02-brief.md
46
+ 03-prfaq.md
47
+ 04-prd.md
48
+ 05-ux-spec/
49
+ DESIGN.md
50
+ EXPERIENCE.md
51
+ 06-research.md
52
+ ```
53
+
54
+ Every file/folder carries a one-line attribution header. `00-manifest.md`
55
+ states the source repo, pinned version (`skills/BMAD/ATTRIBUTION.md` has
56
+ the pinned commit), date, and which skills ran.
57
+
58
+ `.hedgehog/BMAD/` is archival and immutable once written. Nothing in
59
+ `hedgehog-loop`'s day-to-day operation, `hedgehog-bootstrap`, or
60
+ `reviewer` reads this folder live — `planner` reads it exactly once,
61
+ right after the shelf completes, to mine it. After that it's historical
62
+ record only, the same relationship the commit log has to a merged PR.
63
+
64
+ ## Phase 1 — Mining
65
+
66
+ Read `.hedgehog/BMAD/` once and do the interpretive work BMAD's docs
67
+ don't do for you — none of BMAD's outputs contain a ready-made
68
+ Auth/Queue/Mobile toggle or a module-ownership/FK table; the PRD's
69
+ Glossary is the closest thing, but it's vocabulary-shaped prose, not a
70
+ decision table:
71
+
72
+ 1. **Scope boundary** — derive from the brief's Scope section plus the
73
+ PRD's Glossary/Features. In scope: what the elicited material actually
74
+ called for. Out of scope: anything the brief or PRD flagged as
75
+ deferred, painful-but-not-now, or explicitly excluded.
76
+ 2. **Domain modules** — derive from the PRD's Glossary (entity,
77
+ relationships, cardinality): one table = one module, same rule as
78
+ Hedgehog has always used. A cluster with its own lifecycle, referenced
79
+ by other things, is a candidate module; a thing mentioned only as a
80
+ property of another isn't.
81
+ 3. **Cross-module references** — from the Glossary's relationships/
82
+ cardinality, identify which module's schema holds the FK, so build
83
+ order between modules is clear before anyone writes a schema.
84
+ 4. **Add-ons decision** (Auth, Queue, Mobile) — check BMAD's docs (brief,
85
+ PRD, UX spec) for each trigger first:
86
+ - **Auth** — on if the material describes accounts, logins, or
87
+ per-user/per-account data.
88
+ - **Queue** — on if at least one described operation is genuinely
89
+ long-running, needs retries, or fans out.
90
+ - **Mobile** — on if the material explicitly wants a mobile app
91
+ alongside or instead of web.
92
+
93
+ Infer first, gap-fill second — this is not a second full interview.
94
+ For any add-on the text leaves genuinely unresolved (not mentioned
95
+ either way), ask the user directly, the same direct-question posture
96
+ as an ambiguous scope boundary: "does this need user accounts/login,
97
+ or is it just for you?", "is anything here a background job, or is it
98
+ all instant reads and writes?", "web only, or mobile too?" A "no" is a
99
+ resolved answer, not a gap. Never default an add-on on or off without
100
+ either a concrete trigger in BMAD's docs or a direct answer — an
101
+ unasked add-on question is a guess.
102
+ 5. **Run Confirm & Lock** (below) before writing anything.
103
+ 6. **Write `TODO.md`** — the checklist mirroring Bootstrap, Phase A, and
104
+ Phase B steps per module and add-on in scope, plus the `## Add-ons`
105
+ block (see "The Add-ons block" below).
106
+ 7. **File `docs/design/<module>-notes.md` per module** — sourced from
107
+ `.hedgehog/BMAD/05-ux-spec/EXPERIENCE.md` (information architecture,
108
+ states, flows) and `DESIGN.md` (visual identity): file each module's
109
+ slice into its own notes file, same fixed filename pattern, same
110
+ "every module gets one, even if empty" rule as always — a module with
111
+ no UX-spec material yet still gets a `docs/design/<module>-notes.md`
112
+ stating that plainly, not a missing file. `ux-planner` reads this file
113
+ as raw screen/flow material at that module's Phase B.
114
+ 8. **Fill root `CLAUDE.md`'s `{{PROJECT_NAME}}` and `{{PROJECT_SUMMARY}}`
115
+ placeholders**, first run only, then delete the installer's HTML
116
+ comment block at the top of that file. Leave every other line
117
+ untouched.
118
+
119
+ On a later run (new scope entering play), skip steps 4 and 8 unless new
120
+ scope genuinely changes an add-on trigger (e.g. accounts get added where
121
+ there were none) or the project's identity itself changed — append new
122
+ module sections to `TODO.md` only, never touch an existing module's
123
+ checked boxes or reorder modules already in progress.
124
+
125
+ ## The Add-ons block
126
+
127
+ `TODO.md` carries the Add-ons decision directly — no side-channel
128
+ document. Write a short, fixed-format `## Add-ons` block into `TODO.md`:
129
+
130
+ ```
131
+ ## Add-ons
132
+ - Auth: on — accounts/login in scope
133
+ - Queue: off — no long-running ops
134
+ - Mobile: off — not requested
135
+ ```
136
+
137
+ Each line: the add-on, on/off, a one-line reason it landed there. This is
138
+ the single stable, machine-checkable field every downstream check reads
139
+ — `hedgehog-bootstrap`, `bootstrap`, `hedgehog-loop`, and `reviewer` all
140
+ check `TODO.md`'s `## Add-ons` block, not any other file. An absent
141
+ `## Add-ons` block reads as "never decided," not "decided off" — those
142
+ two are distinct and downstream checks treat them differently.
143
+
144
+ ## Confirm & Lock
145
+
146
+ Everything through Phase 1 mining is provisional and cheap to change —
147
+ nothing has been written yet. This stage is the last point before that
148
+ stops being true, so it's a hard stop, not a recap in passing.
149
+
150
+ 🔒 **Confirm & Lock**. Show, in full, not condensed:
151
+
152
+ - The scope boundary (in / out), sourced from the brief + PRD.
153
+ - The Add-ons decision (Auth / Queue / Mobile, each explicitly on or
154
+ off, with the one-line reason — from BMAD's docs or a direct answer).
155
+ - The domain vocabulary / module list, in build order, with any
156
+ cross-module FK dependencies flagged.
157
+ - Which BMAD skills ran and where their output lives
158
+ (`.hedgehog/BMAD/`).
159
+
160
+ Then state plainly what happens on confirmation, before it happens:
161
+
162
+ > This locks in `TODO.md` (with the `## Add-ons` block) and
163
+ > `docs/design/<module>-notes.md` per module, and hands off to the
164
+ > `bootstrap` agent to scaffold the workspace and whichever add-ons are
165
+ > on. Phase A build (schema first) starts on the first module once that
166
+ > closes. Anything wrong or missing — say so now; it's a normal edit
167
+ > before this point, and a Correction Protocol entry after. Confirm to
168
+ > proceed, or tell me what to change.
169
+
170
+ Wait for an explicit go-ahead. A revision here is just another mining
171
+ pass — update the draft, re-run this stage, don't write anything until
172
+ the confirmation holds.
@@ -2,19 +2,21 @@
2
2
  Hedgehog project CLAUDE.md template.
3
3
 
4
4
  This file is copied into a consuming project's repo root at install
5
- time. Placeholders wrapped in {{ }} are filled in once, at Intake, by
6
- the `planner` agent (or by hand). Everything outside the placeholders is
7
- a constant of the Hedgehog discipline and should be left as-is.
5
+ time. Placeholders wrapped in {{ }} are filled in once, at planning
6
+ intake, by the `planner` agent (or by hand). Everything outside the
7
+ placeholders is a constant of the Hedgehog discipline and should be
8
+ left as-is.
8
9
 
9
10
  Delete this comment block after the placeholders are filled in.
10
11
  -->
11
12
 
12
13
  # {{PROJECT_NAME}}
13
14
 
14
- {{PROJECT_SUMMARY — 2–4 sentences the `planner` writes at Intake: what
15
- this project is, who it's for, and what it does. State current intent, not
16
- history. Keep it tight — the full product narrative, scope boundary, and
17
- domain vocabulary live in docs/context.md, not here.}}
15
+ {{PROJECT_SUMMARY — 2–4 sentences the `planner` writes at planning
16
+ intake: what this project is, who it's for, and what it does. State
17
+ current intent, not history. Keep it tight — the full product narrative,
18
+ scope boundary, and domain vocabulary live in `.hedgehog/BMAD/` (the
19
+ planning documents) and `TODO.md`, not here.}}
18
20
 
19
21
  This project is built with **Hedgehog**: a backend-first, one-step-at-a-time
20
22
  build discipline. The rules below aren't project preferences — they're how
@@ -25,10 +27,12 @@ the build stays mechanically correct. Follow them exactly.
25
27
  If `{{PROJECT_SUMMARY}}` above is still an unfilled placeholder, this is a
26
28
  brand-new install and nothing has been built yet. Open with something
27
29
  short and warm — 🦔 plus one line asking what the user wants to build —
28
- then hand straight to `planner` to run Intake. Don't re-explain the
29
- discipline or summarize this file; the greeting is one line, not a tour.
30
- Skip this entirely once the placeholder is filled in — every later session
31
- starts with `TODO.md`, not a greeting.
30
+ then hand straight to `planner`, which runs planning intake on
31
+ BMAD-METHOD (brainstorming → brief → PRD → UX spec), then mines that
32
+ output into Hedgehog's own scope boundary and `## Add-ons` decision.
33
+ Don't re-explain the discipline or summarize this file; the greeting is
34
+ one line, not a tour. Skip this entirely once the placeholder is filled
35
+ in — every later session starts with `TODO.md`, not a greeting.
32
36
 
33
37
  ## How to work here
34
38
 
@@ -36,12 +40,14 @@ The build is a loop of small, gated, committed steps. You never hold the
36
40
  whole plan in context — the plan lives in the structure:
37
41
 
38
42
  - **`TODO.md`** is the live checklist and the source of truth for what's
39
- next. Read it at the start of every session. Its only state is
43
+ next, including the `## Add-ons` block (Auth/Queue/Mobile, each on or
44
+ off). Read it at the start of every session. Its only state is
40
45
  checked/unchecked.
41
- - **`docs/context.md`** is the product's current-state document — product
42
- narrative, scope boundary, domain vocabulary. Every project has one,
43
- written by `planner` at Intake and kept current on later Intakes. It
44
- states what's true now, never a history of what changed.
46
+ - **`.hedgehog/BMAD/`** is the archival record of planning intake —
47
+ BMAD-METHOD's brainstorming, brief, PRD, and UX spec output, written
48
+ once by `planner` and never edited after. It's historical record, the
49
+ same relationship the commit log has to a merged PR — nothing in the
50
+ day-to-day build reads it live.
45
51
  - **The commit log** is the record of what's built and why. Conventional
46
52
  commits (`feat(<module>): schema`, `feat(<module>): api`, …) are how
47
53
  progress is read, not a conversation summary.
@@ -70,24 +76,25 @@ steps from memory:
70
76
  step. Invoke it at the start of any build session and for "what's next".
71
77
  - **`hedgehog-bootstrap`** — run **once**, at project start, to scaffold
72
78
  the core stack, the enforcement config, and whichever add-ons (Auth,
73
- Queue, Mobile) Intake turned on. Skip if `nx.json` already exists.
79
+ Queue, Mobile) planning intake turned on. Skip if `nx.json` already
80
+ exists.
74
81
  - **`conventional-commits`** — when a change spans several steps in one
75
82
  working-tree pass and needs splitting back into per-step commits (mainly
76
83
  Correction Protocol cleanups).
77
- - **`hedgehog-intake`** — the Intake elicitation/synthesis procedure
78
- (scope boundary, add-ons decision, domain vocabulary). Invoked by the
79
- `planner` agent; don't run it standalone.
80
84
 
81
85
  ### The agents — delegate the judgment calls
82
86
 
83
- - **`planner`** — Intake (whether Hedgehog applies at all, scope
84
- boundary, the add-ons decision, and domain vocabulary) at project
85
- start, and module scoping when new scope enters play. Writes `TODO.md`,
86
- `docs/context.md`, and `docs/design/<module>-notes.md`. On first
87
- Intake, hands off to the `bootstrap` agent once Confirm & Lock holds.
87
+ - **`planner`** — planning intake (whether Hedgehog applies at all, then
88
+ `hedgehog-planning-intake`'s BMAD-METHOD brainstorming/brief/PRD/UX-spec
89
+ shelf, mined into scope boundary, the Add-ons decision, and domain
90
+ vocabulary) at project start, and module scoping when new scope enters
91
+ play. Writes `TODO.md` (including its `## Add-ons` block),
92
+ `.hedgehog/BMAD/`, and `docs/design/<module>-notes.md`. On first run,
93
+ hands off to the `bootstrap` agent once Confirm & Lock holds.
88
94
  - **`bootstrap`** — runs `hedgehog-bootstrap`'s core steps (always) plus
89
- whichever add-on steps Intake turned on. Triggered automatically by
90
- `planner` after first Intake; skip if `nx.json` already exists.
95
+ whichever add-on steps planning intake turned on. Triggered
96
+ automatically by `planner` after its first run; skip if `nx.json`
97
+ already exists.
91
98
  - **`ux-planner`** — once per module in Phase B, after the hook exists and
92
99
  before the screen: writes `docs/design/<module>.md`.
93
100
  - **`ui-builder`** — builds screens from the ux-planner rationale.
@@ -107,9 +114,9 @@ every host OS) · Railway · **ts-rest** contracts · **Zod** validation ·
107
114
  Pino logging · Vitest + Playwright (tests) · Conventional Commits +
108
115
  commitlint + lefthook · Sentry.
109
116
 
110
- **Add-ons** — each on or off per project, decided at Intake and recorded
111
- in `docs/context.md`'s Add-ons note; check that file for this project's
112
- actual picks rather than assuming any of these are present:
117
+ **Add-ons** — each on or off per project, decided at planning intake and
118
+ recorded in `TODO.md`'s `## Add-ons` block; check that block for this
119
+ project's actual picks rather than assuming any of these are present:
113
120
 
114
121
  | Add-on | Adds |
115
122
  | --- | --- |
@@ -119,8 +126,8 @@ actual picks rather than assuming any of these are present:
119
126
 
120
127
  An add-on that's off means the corresponding piece of infra genuinely
121
128
  isn't in this codebase — don't write code assuming `packages/auth`,
122
- `apps/worker`, or `apps/mobile` exist without checking `docs/context.md`
123
- first.
129
+ `apps/worker`, or `apps/mobile` exist without checking `TODO.md`'s
130
+ `## Add-ons` block first.
124
131
 
125
132
  Don't substitute libraries, in core or in whichever add-ons are on. If a
126
133
  package or generator name changed upstream, verify against current docs
@@ -145,13 +152,14 @@ packages/
145
152
  shared cross-cutting types + utils
146
153
  libs/
147
154
  <module>/port · <module>/repository · <module>/service (one triplet per table)
155
+ .hedgehog/
156
+ BMAD/ archival planning intake output (brief, PRD, UX spec, research) — write-once, from planner
148
157
  docs/
149
- context.md product narrative, scope boundary, add-ons decision, domain vocabulary (Intake)
150
- design <module>-notes.md (Intake) and <module>.md (ux-planner)
158
+ design <module>-notes.md (planner, sourced from BMAD's UX spec) and <module>.md (ux-planner)
151
159
  ```
152
160
 
153
- Check `docs/context.md`'s Add-ons note before assuming any "only if"
154
- line above is actually present in this codebase.
161
+ Check `TODO.md`'s `## Add-ons` block before assuming any "only if" line
162
+ above is actually present in this codebase.
155
163
 
156
164
  ### Core rules
157
165
 
@@ -195,8 +203,8 @@ off. Keep it thin.
195
203
  **When the build is done:** once every module in scope has both phases
196
204
  checked, the build session is complete. **Delete `TODO.md`** — a finished
197
205
  checklist is noise, and the commit log is the durable record of what was
198
- built. **`docs/context.md` stays** — it's the product's current-state
199
- document, not a checklist.
206
+ built. **`.hedgehog/BMAD/` stays** — it's the archival planning record,
207
+ not a checklist.
200
208
 
201
209
  ## Managing context
202
210
 
@@ -208,11 +216,12 @@ context small:
208
216
  `TODO.md` and continue. Nothing is lost, because the checklist, commits,
209
217
  and code hold all the state. Prefer this over letting one session
210
218
  accumulate the entire project.
211
- - **A cleared or new session recovers by reading `TODO.md`,
212
- `docs/context.md`, and the commit log**, never by needing the prior
213
- conversation.
219
+ - **A cleared or new session recovers by reading `TODO.md` and the
220
+ commit log**, never by needing the prior conversation. `.hedgehog/BMAD/`
221
+ is available if the product narrative itself needs re-reading, but
222
+ day-to-day recovery doesn't need it.
214
223
  - **Delegate heavy work to agents.** The project scaffold (`bootstrap`),
215
- Intake elicitation (`planner`), screen builds (`ui-builder`), and
224
+ planning intake (`planner`), screen builds (`ui-builder`), and
216
225
  reviews (`reviewer`) each run in their own isolated context — so that
217
226
  work doesn't pile up in the main thread.
218
227
  - **Don't paste large context back in.** If you find yourself
@@ -1,17 +1,26 @@
1
1
  # TODO
2
2
 
3
3
  <!-- 2-3 sentences: what is this project. Full product narrative, scope
4
- boundary, and domain vocabulary live in docs/context.md — every project
5
- has one, written by planner at Intake. -->
4
+ boundary, and domain vocabulary live in .hedgehog/BMAD/04-prd.md — every
5
+ project has one, written by planner from BMAD-METHOD's planning shelf. -->
6
6
 
7
7
  ## Context
8
8
 
9
- (fill in per project — see docs/context.md for the full picture)
9
+ (fill in per project — see .hedgehog/BMAD/04-prd.md for the full picture)
10
+
11
+ ## Add-ons
12
+
13
+ <!-- Written by planner at planning intake. Each line: on/off + the
14
+ one-line reason. An absent block reads as "never decided," not "off". -->
15
+
16
+ - Auth: (fill in: on/off — reason)
17
+ - Queue: (fill in: on/off — reason)
18
+ - Mobile: (fill in: on/off — reason)
10
19
 
11
20
  ## Bootstrap
12
21
 
13
- <!-- Add-on steps (planner marks each on/skipped at Intake, per
14
- docs/context.md's Add-ons note) run live, one at a time, after core. A
22
+ <!-- Add-on steps (planner marks each on/skipped at planning intake, per
23
+ the ## Add-ons block above) run live, one at a time, after core. A
15
24
  skipped add-on gets checked off as skipped, not left unchecked. -->
16
25
 
17
26
  - [x] Nx workspace + `packages/config` (incl. `docker-compose.yml` for local Postgres) — core, landed via `hedgehog init`, verified via `hedgehog-bootstrap-core`