@skyf0xx/hedgehog 2.0.0 → 2.0.1

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 CHANGED
@@ -23,18 +23,16 @@ Hedgehog pairs **BMAD's planning** with **disciplined execution**, in one workfl
23
23
  2. An enforced build order
24
24
  3. Agents and skills that make good engineering the default
25
25
 
26
- Hedgehog ships more than one **core** — a fixed stack, agent set, and
27
- build order for one project shape. `full-stack-app` is the original: Nx,
28
- NestJS, Drizzle, ts-rest, Next.js, backend-first (see **The Hedgehog
29
- Loop**, below). A second core, `landing-page`, applies the same
30
- discipline to a different shape — Astro, GSAP, a fixed pipeline for
31
- turning a brief into a traceable, non-templated page instead of a
32
- domain-module build order (see **The Chain Method**, below). Which core
33
- applies is decided once, at planning intake, from what you describe.
26
+ Hedgehog currently builds:
27
+
28
+ 1. **Full-stack TypeScript apps**: built module by module, backend
29
+ first, on a fixed stack
30
+ 2. **Beautiful, unique landing pages**: a fixed pipeline from brief to
31
+ a traceable, distinct page built on modern frameworks
34
32
 
35
33
  ## Hedgehog's secret to great outcomes
36
34
 
37
- - **Progressive layering:** each core builds one stable layer at a time types → schema → backend → UI on `full-stack-app`; brief → feeling → tokens → sequence → artifact on `landing-page`
35
+ - **Progressive layering:** each core builds one stable layer at a time: types → schema → backend → UI on `full-stack-app`; brief → feeling → tokens → sequence → artifact on `landing-page`
38
36
  - **Small context loops:** decompose work into atomic, verifiable changes
39
37
  - **Self-documenting architecture:** the codebase carries the context, not the AI
40
38
  - **Traceable evolution:** decisions are preserved through conventional commits
@@ -45,9 +43,9 @@ applies is decided once, at planning intake, from what you describe.
45
43
 
46
44
  AI coding starts fast, then breaks down. Context accumulates, prompts get longer, architecture drifts. Eventually, adding one more feature feels dangerous.
47
45
 
48
- Hedgehog's answer: guardrails, not more discipline from the AI.
46
+ Hedgehog fixes this with guardrails instead of more discipline from the AI.
49
47
 
50
- ## Plans Expire. Structure Doesn't
48
+ ### Plans Expire. Structure Doesn't
51
49
 
52
50
  Without a build order enforced mechanically, an AI (or a person) has to carry the whole plan in its head: architecture, sequencing, past decisions, etc. as an ever-growing prompt.
53
51
 
@@ -55,107 +53,57 @@ Hedgehog doesn't ask the AI to remember a plan. It makes the plan visible in the
55
53
 
56
54
  ### The AI should never wonder what to do next
57
55
 
58
- Instead of asking AI to hold an entire application in context, Hedgehog turns the build into a sequence of small, deterministic steps. The exact sequence depends on the project's core a stateful app and a landing page don't share a build order, so they don't share an enforcement mechanism either. On the `full-stack-app` core:
56
+ Instead of asking AI to hold an entire application in context, Hedgehog turns the build into a sequence of small, deterministic steps. The exact sequence depends on the project's core: a stateful app and a landing page don't share a build order, so they don't share an enforcement mechanism either. On the `full-stack-app` core:
59
57
 
60
58
  Each module is built progressively: schema → contract → repository → service → controller. Every step is gated by tests and committed before the next begins.
61
59
 
62
60
  Backend comes first. Every module gets a working, typed API before any screen is built. The frontend becomes a consumer of stable capabilities, not a parallel source of complexity.
63
61
 
64
- The build order is not something you negotiate with the AI. It is encoded into the process the same is true on the `landing-page` core, just for a different sequence (see **The Chain Method**, below).
62
+ The build order is not something you negotiate with the AI. It is encoded into the process, per core (see **The Hedgehog Loop**, below).
65
63
 
66
64
  ![Small steps, big leverage: small context loops, continuous verification, traceable evolution, sustainable velocity](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/docs/images/small-steps.png)
67
65
 
68
- ## The Hedgehog Loop (full-stack-app core)
66
+ ## The Hedgehog Loop
67
+
68
+ Every core runs the same loop: plan, bootstrap, then build in a fixed,
69
+ mechanically-enforced order on an opinionated stack.
69
70
 
70
71
  ``` text
71
- Planning intake - BMAD-METHOD's brief/PRD/UX spec, mined into scope
72
- boundary + domain vocabulary (planner agent)
73
-
74
- Bootstrap (once per project)
72
+ Planning intake - BMAD-METHOD's planning shelf, mined into this core's
73
+ scoping artifact
75
74
 
76
- Phase A, per module - schema → contract → repository → service → controller
75
+ Bootstrap
77
76
 
78
- Phase A closes for the module (gated: typecheck, lint, test)
77
+ Build in gated steps
79
78
 
80
- Phase B, per module - hook → UX rationale → screen
81
-
82
- Repeat for the next module or the next step
79
+ Repeat for the next step
83
80
  ```
84
81
 
85
-
86
82
  ![Why Hedgehog works: a different way to build with AI, comparing traditional AI workflow to Hedgehog](https://raw.githubusercontent.com/skyf0xx/hedgehog/master/docs/images/why.png)
87
83
 
88
- ## The Chain Method (landing-page core)
89
-
90
- A different shape gets a different loop, not a variant of this one —
91
- there's no domain module to build, so the enforced order is a pipeline
92
- instead of a layer sequence:
93
-
94
- ``` text
95
- Planning intake - BMAD-METHOD's brief/PR-FAQ/PRD/UX spec, mined into a
96
- subject/audience/single-job statement (planner agent)
97
-
98
- Bootstrap (once per project - Astro + Tailwind workspace)
99
-
100
- Strategy - subject statement → adjective pairs → visceral/behavioral/
101
- reflective sort → top/heart/base note timing (landing-strategist)
102
-
103
- Systems - ingredient dials + copy voice (parallel) → token system →
104
- signature motif (landing-systems)
105
-
106
- Sequence - per-section transitions, weight, pacing (landing-sequencer)
107
-
108
- Audit - traceability/distinctiveness + usability, reconciled to a pass
109
- (landing-critic) - redlines route back to the phase that owns them
110
-
111
- Build - the artifact, in Astro (landing-builder)
112
- ```
113
-
114
- Every choice traces back to a sentence in the subject statement, or it
115
- gets cut — that traceability is what keeps the output from converging on
116
- the same templated look every AI-generated page defaults to.
84
+ Each core defines its own build order and stack.
117
85
 
118
86
  ## Installation
119
87
 
120
88
  From an empty project folder:
121
89
 
122
90
  ``` bash
123
- npx @skyf0xx/hedgehog init
124
- ```
125
-
126
- This installs the `full-stack-app` core by default. For the landing-page
127
- core instead:
91
+ # 1. Full-stack app (Nx, NestJS, Drizzle, ts-rest, Next.js)
92
+ npx @skyf0xx/hedgehog init --ts-full-stack-app
128
93
 
129
- ``` bash
130
- npx @skyf0xx/hedgehog init --core=landing-page
94
+ # 2. Landing page (Astro, Tailwind, GSAP)
95
+ npx @skyf0xx/hedgehog init --landing-page
131
96
  ```
132
97
 
133
- Then open Claude Code and describe what you want to build. The
134
- `planner` agent decides which core actually applies (overriding the
135
- installer's default if what you describe doesn't match it), then runs
136
- that core's own planning intake — both cores run BMAD-METHOD's
137
- brainstorming, brief, PR-FAQ, PRD, UX spec, and deep-recon in full;
138
- `full-stack-app` mines that output into scope boundary and domain
139
- vocabulary, `landing-page` mines it into a subject/audience/job
140
- statement. Once you confirm, it scaffolds the project itself.
141
-
142
- The chosen core's workspace - for `full-stack-app`: Nx, `packages/config`,
143
- `packages/db`, `apps/api`, `apps/web`, and every enforcement file; for
144
- `landing-page`: the Astro + Tailwind workspace and its animation library
145
- set - lands instantly from a pre-verified template rather than being
146
- generated live; bootstrap then verifies it (and, on `full-stack-app`,
147
- runs whichever add-ons planning intake determined your project needs).
148
-
149
- Or paste the repo URL to your Agent and have it install for you.
98
+ Then open Claude Code and describe what you want to build.
150
99
 
151
- On a project that's already installed Hedgehog, pick up agent/skill
152
- changes from a newer release with:
100
+ To update:
153
101
 
154
102
  ``` bash
155
103
  npx @skyf0xx/hedgehog update
156
104
  ```
157
105
 
158
- This refreshes `.claude/agents/` and `.claude/skills/` only it never
106
+ This refreshes `.claude/agents/` and `.claude/skills/` only. It never
159
107
  touches `CLAUDE.md`, `TODO.md`, the core workspace, or
160
108
  `skills/BMAD`, since those carry project-specific or write-once content.
161
109
 
@@ -175,59 +123,17 @@ Under the hood, it applies the practices experienced engineers rely on:
175
123
  - continuous verification
176
124
  - conventional commits
177
125
 
178
- AI becomes the builder operating inside those constraints - turning ideas into software without requiring you to manage every implementation detail.
126
+ AI becomes the builder operating inside those constraints, turning ideas into software without requiring you to manage every implementation detail.
179
127
 
180
128
  ## Architecture
181
129
 
182
- Hedgehog is a package of agents and skills, built on an opinionated stack per core so the build order above is mechanical and enforced by the tooling itself.
183
-
184
- ### `full-stack-app` core
185
-
186
- | Layer | Choice | Why |
187
- | --- | --- | --- |
188
- | Monorepo | Nx | Enforces module boundaries at compile time. |
189
- | Package manager | pnpm | Prevents accidental cross-package dependencies. |
190
- | Backend | NestJS | Modules naturally mirror Hedgehog's build progression. |
191
- | ORM | Drizzle + drizzle-zod | Database schema is the single source of truth. |
192
- | Database | PostgreSQL | Simple, relational, predictable. |
193
- | Local infra | Docker Compose | Postgres/Redis run identically on every machine. |
194
- | Platform | Railway | Infrastructure is available from the first commit. |
195
- | API contract | ts-rest | Contracts are code, not documentation. |
196
- | Validation | Zod | One schema for runtime and compile time. |
197
- | Auth | Better Auth | Secure by default from day one. |
198
- | Data fetching | TanStack Query | UI consumes typed APIs, never implementation details. |
199
- | Web | Next.js + ShadCN + Tailwind | UI remains a thin presentation layer. |
200
- | Mobile | Expo + RN Reusables | Shares contracts and design tokens with web. |
201
- | Jobs | BullMQ + Redis | Async boundaries exist before they're needed. |
202
- | Logging | Pino | Structured logs from the first feature. |
203
- | Linting | ESLint + Prettier | One shared standard across every module. |
204
- | Testing | Vitest + Playwright | Every step is verifiable before progressing. |
205
- | Commits | Conventional Commits | Architectural decisions become permanent history. |
206
- | Observability | Sentry | Failures map cleanly back to module boundaries. |
207
-
208
- ### `landing-page` core
209
-
210
- Every choice below maps to a specific dial or phase in the Chain
211
- Method — nothing here is a default reached for out of habit:
212
-
213
- | Layer | Choice | Why |
214
- | --- | --- | --- |
215
- | Framework | Astro | Zero-JS-by-default shell; islands only where interaction is actually needed. |
216
- | Styling | Tailwind (v4, CSS-first) | Config as token layer only — no component library pre-deciding how things look. |
217
- | Animation | GSAP + ScrollTrigger | Owns per-section pacing and top/heart/base fade timing with real control. |
218
- | Scroll feel | Lenis | The "weight and suspension" dial, instead of default browser scroll physics. |
219
- | Copy reveal | SplitType | Line/word/char splitting — makes copy rhythm visible in motion, not just static text. |
220
- | Motif | SVG-first + Paper.js | Hand-authored graphics; Paper.js for a motif that evolves (augmentation/inversion) across sections. |
221
- | Motif transforms | GSAP MorphSVGPlugin | Ships free inside the `gsap` package — for a motif that physically transforms across sections. |
222
- | Texture | Custom SVG noise/grain filter | Cheap materiality layer nothing else in the stack owns. |
223
- | Design handoff | Figma MCP / Stitch MCP | Input only, at the Strategist/Builder boundaries — never allowed to set spacing/style defaults directly. |
224
- | 3D (rare) | React Three Fiber | Only when the subject is genuinely spatial; skipped by default. |
130
+ Hedgehog is a package of agents and skills, built on an opinionated stack per core so the build order above is mechanical and enforced by the tooling itself. See [ARCHITECTURE.md](ARCHITECTURE.md) for details.
225
131
 
226
132
  ## How Hedgehog Compares
227
133
 
228
134
  Superpowers and BMAD both improve on raw prompting: one gives the AI good habits, the other a planning process. Alone, either can still be broken by convention.
229
135
 
230
- Hedgehog runs BMAD for planning on both cores the same full shelf either way, mined differently per core's own shape then enforces the build that follows with tooling, not convention Nx boundaries, commit hooks, and phase gates on `full-stack-app`; a redline-gated pipeline on `landing-page`.
136
+ Hedgehog runs BMAD for planning on both cores (the same full shelf either way, mined differently per core's own shape), then enforces the build that follows with tooling, not convention: Nx boundaries, commit hooks, and phase gates on `full-stack-app`; a redline-gated pipeline on `landing-page`.
231
137
 
232
138
  | | Superpowers | BMAD | Hedgehog + BMAD |
233
139
  | --- | --- | --- | --- |
package/bin/cli.mjs CHANGED
@@ -3,8 +3,8 @@
3
3
  // into the current repo, so the discipline travels with the project.
4
4
  //
5
5
  // Usage:
6
- // npx @skyf0xx/hedgehog init scaffold, full-stack-app core (default)
7
- // npx @skyf0xx/hedgehog init --core=landing-page scaffold with a named core instead
6
+ // npx @skyf0xx/hedgehog init scaffold, ts-full-stack-app core (default)
7
+ // npx @skyf0xx/hedgehog init --landing-page scaffold the landing-page core instead
8
8
  // npx @skyf0xx/hedgehog init --force overwrite files that already exist
9
9
  // npx @skyf0xx/hedgehog update refresh .claude/agents + .claude/skills
10
10
  // npx @skyf0xx/hedgehog --help
@@ -20,6 +20,16 @@ const DEST_ROOT = process.cwd();
20
20
  const CORES_ROOT = join(PKG_ROOT, 'src/golden-cores');
21
21
  const DEFAULT_CORE = 'full-stack-app';
22
22
 
23
+ // One install flag per core, named for what a user is asking to build
24
+ // rather than the internal src/golden-cores/<name> directory — the two
25
+ // diverge deliberately so the CLI's public surface can stay stable
26
+ // while cores are renamed or added underneath it. Adding a core means
27
+ // adding one entry here (and a matching src/golden-cores/<dir>).
28
+ const CORE_FLAGS = {
29
+ '--ts-full-stack-app': 'full-stack-app',
30
+ '--landing-page': 'landing-page',
31
+ };
32
+
23
33
  // ── tiny ANSI helpers (no deps) ─────────────────────────────────────────
24
34
  const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
25
35
  const paint = (code, s) => (useColor ? `\x1b[${code}m${s}\x1b[0m` : s);
@@ -148,16 +158,18 @@ CLAUDE.md / TODO.md templates into the repo root, so the discipline is
148
158
  committed alongside your code.
149
159
 
150
160
  ${bold('Usage')}
151
- npx @skyf0xx/hedgehog init scaffold, ${DEFAULT_CORE} core (default)
152
- npx @skyf0xx/hedgehog init --core=<name> scaffold with a named core instead
153
- npx @skyf0xx/hedgehog init --force overwrite existing files
154
- npx @skyf0xx/hedgehog update refresh .claude/agents + .claude/skills
161
+ npx @skyf0xx/hedgehog init scaffold, ${DEFAULT_CORE} core (default)
162
+ npx @skyf0xx/hedgehog init --ts-full-stack-app scaffold the full-stack-app core explicitly
163
+ npx @skyf0xx/hedgehog init --landing-page scaffold the landing-page core instead
164
+ npx @skyf0xx/hedgehog init --force overwrite existing files
165
+ npx @skyf0xx/hedgehog update refresh .claude/agents + .claude/skills
155
166
  npx @skyf0xx/hedgehog --help
156
167
 
157
168
  Available cores: ${cores.join(', ')}
158
169
 
159
- After it runs, commit the payload, open Claude Code, and say
160
- "bootstrap this project" to trigger the matching bootstrap-core skill.
170
+ After it runs, commit the payload, open Claude Code, and describe what
171
+ you want to build the planner agent runs planning intake, then hands
172
+ off to bootstrap.
161
173
 
162
174
  ${bold('update')} re-copies only .claude/agents and .claude/skills from the
163
175
  installed Hedgehog version, so an already-bootstrapped project can pick up
@@ -226,14 +238,20 @@ async function init({ force, core }) {
226
238
  console.log('Next steps:');
227
239
  console.log(` 1. ${bold('git add -A && git commit -m "chore: install Hedgehog"')}`);
228
240
  console.log(` 2. ${bold('pnpm install')}`);
229
- console.log(` 3. Open Claude Code and say: ${bold('"bootstrap this project"')}\n`);
230
- console.log(dim(`Core: ${bold(core)} — already scaffolded and verified.`));
241
+ console.log(` 3. Open Claude Code and describe what you want to build.`);
242
+ console.log(
243
+ dim(
244
+ ` The ${bold('planner')} agent runs planning intake, then hands off to bootstrap.`,
245
+ ),
246
+ );
247
+ console.log();
248
+ console.log(dim(`Core: ${bold(core)} (installer default — planner may override it).`));
231
249
  console.log(
232
250
  dim(
233
251
  core === DEFAULT_CORE
234
252
  ? '(Nx, packages/config, packages/db, apps/api, apps/web) — bootstrap\n' +
235
- 'now only runs whichever add-ons (Auth, Queue, Mobile) Intake calls for.'
236
- : 'bootstrap now only runs whichever add-on steps this core defines, if any.',
253
+ 'runs whichever add-ons (Auth, Queue, Mobile) intake calls for.'
254
+ : 'bootstrap runs whichever add-on steps this core defines, if any.',
237
255
  ),
238
256
  );
239
257
  }
@@ -279,8 +297,17 @@ async function main() {
279
297
  }
280
298
  const cmd = args[0];
281
299
  const force = args.includes('--force') || args.includes('-f');
282
- const coreArg = args.find((a) => a.startsWith('--core='));
283
- const core = coreArg ? coreArg.slice('--core='.length) : DEFAULT_CORE;
300
+ const coreFlag = args.find((a) => a in CORE_FLAGS);
301
+ if (coreFlag === undefined && args.some((a) => a.startsWith('--core='))) {
302
+ const attempted = args.find((a) => a.startsWith('--core='));
303
+ console.error(
304
+ `${red('Unknown flag:')} ${attempted}\n\n` +
305
+ `Use an explicit core flag instead: ${Object.keys(CORE_FLAGS).join(', ')}\n`,
306
+ );
307
+ process.exitCode = 1;
308
+ return;
309
+ }
310
+ const core = coreFlag ? CORE_FLAGS[coreFlag] : DEFAULT_CORE;
284
311
 
285
312
  if (cmd === 'init') {
286
313
  await init({ force, core });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyf0xx/hedgehog",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Install the Hedgehog build discipline (agents + skills) into a repo.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -57,7 +57,7 @@ re-copy: patch the specific file at its source.
57
57
 
58
58
  ### 2. Land `src/golden-cores/landing-page/`
59
59
 
60
- In the common case this is already done — `hedgehog init --core=landing-page`'s
60
+ In the common case this is already done — `hedgehog init --landing-page`'s
61
61
  installer copies `src/golden-cores/landing-page/` to the repo root at
62
62
  install time, the same way it copies `src/agents` to `.claude/agents`.
63
63
  Check whether the core files are already present (same check as step 1).