@skyf0xx/hedgehog-core-full-stack-app 1.1.0 → 1.2.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/CLAUDE.core.md +9 -33
- package/agents/backend-eng.md +12 -17
- package/agents/front-end-eng.md +5 -8
- package/package.json +1 -1
- package/skills/hedgehog-loop/SKILL.md +12 -16
package/CLAUDE.core.md
CHANGED
|
@@ -22,46 +22,25 @@ steps from memory:
|
|
|
22
22
|
`hedgehog verify`, which commits it on a pass. Also holds the Correction
|
|
23
23
|
Protocol for fixing a wrong upstream step. Invoke it at the start of any
|
|
24
24
|
build session and for "what's next".
|
|
25
|
+
<!-- hedgehog:bootstrap-only start -->
|
|
25
26
|
- **`hedgehog-bootstrap`** — run **once**, at project start, to scaffold
|
|
26
27
|
the core stack, the enforcement config, and whichever add-ons (Auth,
|
|
27
28
|
Queue, Mobile) planning intake turned on. Skip if `nx.json` already
|
|
28
29
|
exists.
|
|
30
|
+
<!-- hedgehog:bootstrap-only end -->
|
|
29
31
|
- **`conventional-commits`** — when a change spans several steps in one
|
|
30
32
|
working-tree pass and needs splitting back into per-step commits (mainly
|
|
31
33
|
Correction Protocol cleanups).
|
|
32
34
|
|
|
33
35
|
### The agents — delegate the judgment calls
|
|
34
36
|
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
`hedgehog-planning-intake`'s **Re-entry pass**: the BMAD shelf and
|
|
43
|
-
`bootstrap` are both skipped, new modules are mined into additional
|
|
44
|
-
intents, and `hedgehog plan` appends their tasks without touching
|
|
45
|
-
anything already built.
|
|
46
|
-
- **`bootstrap`** — runs `hedgehog-bootstrap`'s core steps (always) plus
|
|
47
|
-
whichever add-on steps planning intake turned on. Triggered
|
|
48
|
-
automatically by `planner` after its first run; skip if `nx.json`
|
|
49
|
-
already exists.
|
|
50
|
-
- **`backend-eng`** — builds each module's Phase A layers (schema →
|
|
51
|
-
contract → repository → service → controller → queue?), one
|
|
52
|
-
`hedgehog claim`ed packet at a time, gated by `hedgehog verify`.
|
|
53
|
-
- **`ux-planner`** — once per module in Phase B, after the hook exists and
|
|
54
|
-
before the screen: writes `docs/design/<module>.md`, reading
|
|
55
|
-
`.hedgehog/BMAD/05-ux-spec/` directly (or
|
|
56
|
-
`docs/design/<module>-notes.md` if a prior run already filed one). Where
|
|
57
|
-
the archive holds no UX spec, it asks for visual input rather than
|
|
58
|
-
inferring a direction.
|
|
59
|
-
- **`front-end-eng`** — builds each module's Phase B layers (hook, screen)
|
|
60
|
-
from the ux-planner rationale, one `hedgehog claim`ed packet at a time,
|
|
61
|
-
gated by `hedgehog verify`.
|
|
62
|
-
- **`reviewer`** — phase-transition and Correction Protocol checks the
|
|
63
|
-
mechanical gate can't make (port discipline, FK-by-ID discipline,
|
|
64
|
-
contract shape).
|
|
37
|
+
`backend-eng` builds each module's Phase A layers (schema → contract →
|
|
38
|
+
repository → service → controller → queue?), one `hedgehog claim`ed
|
|
39
|
+
packet at a time, gated by `hedgehog verify`. `front-end-eng` builds
|
|
40
|
+
each module's Phase B layers (hook, screen) from `ux-planner`'s
|
|
41
|
+
rationale, the same way. See `hedgehog-loop` for exactly which agent
|
|
42
|
+
owns which layer and the claim/verify sequencing — that skill is the
|
|
43
|
+
source, not restated here.
|
|
65
44
|
|
|
66
45
|
## The constants (do not deviate)
|
|
67
46
|
|
|
@@ -121,9 +100,6 @@ docs/
|
|
|
121
100
|
design <module>.md (ux-planner, reading .hedgehog/BMAD/05-ux-spec/ directly)
|
|
122
101
|
```
|
|
123
102
|
|
|
124
|
-
Check `.hedgehog/addons.yaml` before assuming any "only if" line above is
|
|
125
|
-
actually present in this codebase.
|
|
126
|
-
|
|
127
103
|
### Core rules
|
|
128
104
|
|
|
129
105
|
- **One table = one domain module.** Each carries the full step sequence.
|
package/agents/backend-eng.md
CHANGED
|
@@ -51,12 +51,12 @@ catch.
|
|
|
51
51
|
## Core Responsibilities
|
|
52
52
|
|
|
53
53
|
- **`schema`**: define the table in `packages/db` (Drizzle). One domain
|
|
54
|
-
module
|
|
55
|
-
|
|
56
|
-
module to `packages/db/src/schema/index.ts`
|
|
57
|
-
layer) so the table is importable outside
|
|
58
|
-
package's own `src/index.ts` re-exports that
|
|
59
|
-
changes after bootstrap.
|
|
54
|
+
module per table, cross-module references FK-by-ID only (root
|
|
55
|
+
CLAUDE.md's Core rules) — never a foreign schema import. Add one
|
|
56
|
+
re-export line for the module to `packages/db/src/schema/index.ts`
|
|
57
|
+
(in scope for this layer) so the table is importable outside
|
|
58
|
+
`packages/db` — the package's own `src/index.ts` re-exports that
|
|
59
|
+
barrel and never changes after bootstrap.
|
|
60
60
|
- **`contract`**: derive the Zod schema from Drizzle (`drizzle-zod`) and
|
|
61
61
|
wire the ts-rest contract in `packages/contracts`. A `date`-mode
|
|
62
62
|
`timestamp` column reflected through `createSelectSchema` is overridden
|
|
@@ -101,8 +101,7 @@ catch.
|
|
|
101
101
|
the packet's scope and rules don't account for; your own tests prove
|
|
102
102
|
internal consistency, never coverage of what was asked. INHERITED DEBT
|
|
103
103
|
is what the layers you depend on declared they left for you; declare
|
|
104
|
-
your own with `hedgehog debt add <task-id> "<note>"
|
|
105
|
-
code comment nothing reads. Its WHY NOW section
|
|
104
|
+
your own with `hedgehog debt add <task-id> "<note>"`. Its WHY NOW section
|
|
106
105
|
already confirms the module is in scope and every dependency is
|
|
107
106
|
`complete` — no need to re-derive that by hand. Cross-module FK
|
|
108
107
|
targets should already have their own schema landed (the packet's
|
|
@@ -122,14 +121,10 @@ catch.
|
|
|
122
121
|
name the shared files that changed (typically `pnpm-lock.yaml`, root
|
|
123
122
|
`tsconfig.json`) in your report — the orchestrating session commits
|
|
124
123
|
them separately, since you report but never commit (next step).
|
|
125
|
-
3. **Report the work as done; do not commit it yourself.**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
verification command, and on a pass writes the commit (the packet's
|
|
130
|
-
exact Conventional Commit message) itself. Any shared workspace files
|
|
131
|
-
you flagged in step 2 are a separate commit the orchestrating session
|
|
132
|
-
makes before dispatching `hedgehog verify`, not something you commit.
|
|
124
|
+
3. **Report the work as done; do not commit it yourself.** Any shared
|
|
125
|
+
workspace files you flagged in step 2 are a separate commit the
|
|
126
|
+
orchestrating session makes before dispatching `hedgehog verify`, not
|
|
127
|
+
something you commit.
|
|
133
128
|
4. One layer at a time — never start the next layer before
|
|
134
129
|
`hedgehog verify` reports the current one `complete`.
|
|
135
130
|
5. Once `hedgehog verify` reports the `controller` layer (and any bundled
|
|
@@ -154,7 +149,7 @@ catch.
|
|
|
154
149
|
reported rather than chosen here. `verify` cannot check any of this,
|
|
155
150
|
which is exactly why it's on you.
|
|
156
151
|
- Never import another module's repository, service, or schema directly
|
|
157
|
-
—
|
|
152
|
+
— FK-by-ID only (root CLAUDE.md's Core rules), resolved at the
|
|
158
153
|
contract/controller layer (parallel calls) or via a same-repository
|
|
159
154
|
Drizzle join against the other module's *schema*, never its adapter.
|
|
160
155
|
- Never write queue infra when the Queue add-on is off (per
|
package/agents/front-end-eng.md
CHANGED
|
@@ -96,8 +96,7 @@ don't reach for a second one.
|
|
|
96
96
|
and rules don't account for; your own tests prove internal
|
|
97
97
|
consistency, never coverage of what was asked. INHERITED DEBT is what
|
|
98
98
|
the layers you depend on declared they left for you; declare your own
|
|
99
|
-
with `hedgehog debt add <task-id> "<note>"
|
|
100
|
-
nothing reads. Its WHY NOW section already
|
|
99
|
+
with `hedgehog debt add <task-id> "<note>"`. Its WHY NOW section already
|
|
101
100
|
confirms Phase A is closed for this module (the `hook`/`screen`
|
|
102
101
|
layer's dependencies wouldn't be `complete` otherwise) — no need to
|
|
103
102
|
re-derive that by hand. If you're handed a step outside a packet with
|
|
@@ -116,12 +115,10 @@ don't reach for a second one.
|
|
|
116
115
|
the workspace, and name the shared files that changed (typically
|
|
117
116
|
`pnpm-lock.yaml`, root `tsconfig.json`) in your report — the
|
|
118
117
|
orchestrating session commits them separately (next step).
|
|
119
|
-
3. **Report the work as done; do not commit it yourself.**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
separate commit the orchestrating session makes before dispatching
|
|
124
|
-
`hedgehog verify`, not something you commit.
|
|
118
|
+
3. **Report the work as done; do not commit it yourself.** Any shared
|
|
119
|
+
workspace files you flagged in step 2 are a separate commit the
|
|
120
|
+
orchestrating session makes before dispatching `hedgehog verify`, not
|
|
121
|
+
something you commit.
|
|
125
122
|
4. Build the screen consuming the hook the same way — packet, build,
|
|
126
123
|
report, `hedgehog verify`.
|
|
127
124
|
5. One layer at a time — `hook` fully `complete` before the `screen`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyf0xx/hedgehog-core-full-stack-app",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Hedgehog's full-stack-app core: an Nx/pnpm/NestJS/Next.js workspace, backend-first domain module build discipline, and the agents and skills that drive it.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -44,14 +44,14 @@ Phase A.
|
|
|
44
44
|
|
|
45
45
|
## The Domain Module Pattern
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
Root CLAUDE.md's Core rules own "one table = one domain module" and
|
|
48
|
+
"FK-by-ID only" — this section is their mechanics. `users`, `orders`,
|
|
49
|
+
`order_items` are each their own module, carrying the full step sequence
|
|
50
|
+
below. The schema is the source of truth for module boundaries.
|
|
50
51
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
knows related entities only as an ID.
|
|
52
|
+
If `orders.user_id` references `users`, the `orders` schema holds a plain
|
|
53
|
+
FK column. The `orders` repository and service depend only on their own
|
|
54
|
+
ports — a service knows related entities only as an ID.
|
|
55
55
|
|
|
56
56
|
- Need the related row? Resolve it at the contract/controller layer
|
|
57
57
|
(parallel calls to each module's own endpoint), or join against the
|
|
@@ -193,12 +193,8 @@ writes `docs/design/<module>.md`, not its own compiled layer — the
|
|
|
193
193
|
`hedgehog verify <task-id> --owner <owner>` (the same owner that
|
|
194
194
|
claimed it; verify requires the lease owner). Building happens in
|
|
195
195
|
parallel; verifying does not — verify writes a commit, and commits go
|
|
196
|
-
through one at a time.
|
|
197
|
-
|
|
198
|
-
a pass writes the commit (the exact Conventional Commit message from
|
|
199
|
-
the tables above, plus the updated build graph) and unlocks the next
|
|
200
|
-
layer. On a scope violation or a failing check, the task moves to
|
|
201
|
-
`blocked` with a `blocked_reason` of `scope_violation` or
|
|
196
|
+
through one at a time. On a scope violation or a failing check, the
|
|
197
|
+
task moves to `blocked` with a `blocked_reason` of `scope_violation` or
|
|
202
198
|
`verification_failed`, and nothing downstream unlocks. Fix the work,
|
|
203
199
|
then run `hedgehog retry <task-id>` to return the task to `planned`,
|
|
204
200
|
claim it again (by task id — see below), and verify again —
|
|
@@ -238,7 +234,7 @@ the built work against it there, because nothing else in the build does.
|
|
|
238
234
|
A layer that hits a limitation the next layer must compensate for
|
|
239
235
|
declares it with `hedgehog debt add <task-id> "<note>"`; the note lands
|
|
240
236
|
in the **INHERITED DEBT** section of every packet that depends on that
|
|
241
|
-
task.
|
|
237
|
+
task.
|
|
242
238
|
|
|
243
239
|
Each `hedgehog verify` call commits exactly one layer, built right for
|
|
244
240
|
what's known now; a wrong layer is fixed forward later via the
|
|
@@ -615,8 +611,8 @@ the graph doesn't have a task for.
|
|
|
615
611
|
committed.
|
|
616
612
|
- The screen step doesn't start blank — `ux-planner` runs once per module,
|
|
617
613
|
after the hook is committed, before `front-end-eng` starts the screen.
|
|
618
|
-
- `packages/config` is the single source for shared config
|
|
619
|
-
|
|
614
|
+
- `packages/config` is the single source for shared config (root
|
|
615
|
+
CLAUDE.md's Core rules).
|
|
620
616
|
|
|
621
617
|
## Stop Condition
|
|
622
618
|
|