@odarino/haren 1.3.3 → 1.4.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 CHANGED
@@ -22,7 +22,7 @@ research → discover → decompose → plan → implement → evaluate
22
22
 
23
23
  Instead of letting an LLM jump straight to code, haren enforces a phased
24
24
  workflow: brainstorm and research first, decompose into modules, write a plan,
25
- *then* implement. The result is fewer wasted tokens, fewer half-built features,
25
+ _then_ implement. The result is fewer wasted tokens, fewer half-built features,
26
26
  and a paper trail of decisions you can actually review.
27
27
 
28
28
  ---
@@ -30,7 +30,7 @@ and a paper trail of decisions you can actually review.
30
30
  ## Why
31
31
 
32
32
  LLM coding agents are eager. Ask for a feature and they'll start writing files
33
- before anyone has agreed on *what* is being built. haren adds the missing
33
+ before anyone has agreed on _what_ is being built. haren adds the missing
34
34
  front-half of the SDLC and **gates implementation behind planning** — a module
35
35
  cannot be coded until it has reached `planned` status. The gate is enforced by a
36
36
  hook, not just a prompt, so the discipline holds even when the model forgets.
@@ -177,12 +177,12 @@ every repo.
177
177
 
178
178
  ## Commands
179
179
 
180
- | Command | What it does |
181
- |---------|--------------|
182
- | `haren init` | Set up haren in the current directory: scaffold a new haren folder, or set up a cloned one. Interactive, or pass flags (below). |
180
+ | Command | What it does |
181
+ | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
182
+ | `haren init` | Set up haren in the current directory: scaffold a new haren folder, or set up a cloned one. Interactive, or pass flags (below). |
183
183
  | `haren upgrade` | Update framework files in an existing haren folder to the installed version, and migrate old `manifest.yaml` / `progress.json`. It also restores missing plugins from `plugins.json`. Use `--yes` to accept plugins from unofficial sources. |
184
- | `haren plugin` | Manage plugins: `add <name\|source>`, `remove <name>`, `list`, `doctor`, `run <hook>`. See [PLUGINS.md](PLUGINS.md). |
185
- | `haren agent` | Manage the local agent bridge *(experimental — for the in-progress Haren Portal)*. |
184
+ | `haren plugin` | Manage plugins: `add <name\|source>`, `remove <name>`, `list`, `doctor`, `run <hook>`. See [PLUGINS.md](PLUGINS.md). |
185
+ | `haren agent` | Manage the local agent bridge _(experimental — for the in-progress Haren Portal)_. |
186
186
 
187
187
  `haren agent` works in both layouts. It uses the git remote of the haren repo as
188
188
  the Portal project key.
@@ -203,15 +203,15 @@ haren init \
203
203
 
204
204
  Layout and folder flags:
205
205
 
206
- | Flag | Effect |
207
- |------|--------|
208
- | `--dir <path>` | Run in this directory instead of the current one. |
209
- | `--layout monorepo\|workspace` | Skip layout detection. |
210
- | `--haren-dir <name>` | Name of the new haren folder (default `haren`). |
211
- | `--yes` | Accept the defaults and skip the confirm prompt. Required when there is no terminal. |
212
- | `--dry-run` | Print the plan and exit. Nothing is written. |
213
- | `--plugin <name\|source>` | Install a plugin. Repeat the flag for more plugins. |
214
- | `--force` | Re-scaffold an existing haren folder. It keeps the folder name, the layout, and the repos in `manifest.yaml`. |
206
+ | Flag | Effect |
207
+ | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
208
+ | `--dir <path>` | Run in this directory instead of the current one. |
209
+ | `--layout monorepo\|workspace` | Skip layout detection. |
210
+ | `--haren-dir <name>` | Name of the new haren folder (default `haren`). |
211
+ | `--yes` | Accept the defaults and skip the confirm prompt. Required when there is no terminal. |
212
+ | `--dry-run` | Print the plan and exit. Nothing is written. |
213
+ | `--plugin <name\|source>` | Install a plugin. Repeat the flag for more plugins. |
214
+ | `--force` | Re-scaffold an existing haren folder. It keeps the folder name, the layout, and the repos in `manifest.yaml`. |
215
215
 
216
216
  ### The plan preview
217
217
 
@@ -271,6 +271,84 @@ A skill for a new developer or a new workspace. It does three things:
271
271
  It never clones and never changes git state. To clone a missing repo, run
272
272
  `haren init`.
273
273
 
274
+ ### `haren track`
275
+
276
+ Use `haren track` to update `progress.json`, the artifact index, and
277
+ `events/events.jsonl`. Do not edit these files by hand with `jq` or `sed`.
278
+ The command finds the haren folder from the current folder. Use `--haren-dir <path>`
279
+ or `HAREN_DIR` to choose one. It keeps all other keys in `progress.json`.
280
+
281
+ ```bash
282
+ haren track status <module> <status>
283
+ haren track feature <module> <feature> [status]
284
+ haren track commit <module> <repoKey> <sha>
285
+ haren track artifact <id> --type <type> --path <path> [--module <m>] [--status <s>]
286
+ haren track event <type> [--module m] [--phase p] [--feature f] [--data '<json object>']
287
+ haren track override on --reason "<text>" [--hours <n>]
288
+ haren track override off
289
+ ```
290
+
291
+ - `status` checks the module transition. It creates a missing module only at
292
+ `discovered` or `decomposed`. Transitions:
293
+ `discovered → decomposed → planned → implementing → evaluating → completed → released`.
294
+ `implementing` and `evaluating` can go to `blocked`. `blocked` goes back to
295
+ `implementing` or `planned`.
296
+ - `feature` without a status adds the feature as `pending`. With a status it checks
297
+ the transition: `pending → in-progress → evaluating → passing | fixing | blocked`,
298
+ `fixing → evaluating`, `blocked → in-progress`.
299
+ - `commit` sets `lastCommit[repoKey]`, adds `repoKey` to the module `repos`, and
300
+ sets `branch` to `feat/<module>` if it has no value.
301
+ - `artifact` adds or updates the row with this ID in
302
+ `artifacts/_registry/artifact-index.md`. `--type` is free text. `--status`
303
+ defaults to `draft`.
304
+ - `override on` lets the code gate allow all writes for a fix that the user asked
305
+ for. It sets `gateOverride: { reason, until }` in `progress.json`. `--hours`
306
+ defaults to 2. After the time ends, the gate ignores the override. Run
307
+ `override off` when the fix is done. `HAREN_GATE=off` has the same effect for
308
+ one process.
309
+
310
+ The command exits with code 1 and a message for an invalid transition, an unknown
311
+ module, or a bad option.
312
+
313
+ #### Code gate
314
+
315
+ The `brainstorm-gate` hook allows a write outside the haren folder only inside
316
+ the repos of a module at `planned`, `implementing`, `evaluating`, `completed`, or
317
+ `released` (the keys in the module `repos`). A repo with `role: e2e` is allowed
318
+ when any module is at `planned` or later. A module with no `repos`, or with the
319
+ key `default`, allows all files. Files outside the workspace folder follow the
320
+ same "any planned module" rule. An active override allows all writes.
321
+
322
+ #### `events/events.jsonl`
323
+
324
+ One JSON object per line. Fields:
325
+
326
+ | Field | Value |
327
+ | ----------- | --------------------------------------------- |
328
+ | `type` | Event type (required) |
329
+ | `timestamp` | ISO time (required, `haren track` sets it) |
330
+ | `module` | Module name |
331
+ | `phase` | One of the phase values below |
332
+ | `feature` | Feature name |
333
+ | other | Data for the event type (see below, `--data`) |
334
+
335
+ Phase values: `ideate`, `discover`, `research`, `decompose`, `plan`, `implement`,
336
+ `evaluate`, `release`, `blocked`.
337
+
338
+ Event types that `haren track` writes:
339
+
340
+ | Type | Written by | Other fields |
341
+ | ---------------- | ---------------- | --------------------------------------------------- |
342
+ | `module-status` | `track status` | `from` (null for a new module), `to`, `phase` |
343
+ | `feature-status` | `track feature` | `feature`, `from` (null for a new feature), `to` |
344
+ | `commit` | `track commit` | `repo`, `sha` |
345
+ | `artifact` | `track artifact` | `id`, `artifactType`, `path`, `status` |
346
+ | `gate-override` | `track override` | `action` (`on` or `off`), `reason` and `until` (on) |
347
+
348
+ Skills also write these types with `haren track event`: `ideate-complete`,
349
+ `discover-complete`, `feature-ready`, `escalate-human`, `iteration-complete`,
350
+ `release-step`. Any other type is accepted.
351
+
274
352
  ---
275
353
 
276
354
  ## How it works
@@ -279,12 +357,12 @@ It never clones and never changes git state. To clone a missing repo, run
279
357
 
280
358
  You pick a mode at init that matches where your project stands:
281
359
 
282
- | Mode | When |
283
- |------|------|
360
+ | Mode | When |
361
+ | ----------- | ------------------------------------------------------------ |
284
362
  | `blueprint` | Greenfield project that already has docs/specs to work from. |
285
- | `explore` | Greenfield project starting from just an idea. |
286
- | `inherit` | Brownfield project with an existing codebase. |
287
- | `undecided` | Let the agent help you choose on first session. |
363
+ | `explore` | Greenfield project starting from just an idea. |
364
+ | `inherit` | Brownfield project with an existing codebase. |
365
+ | `undecided` | Let the agent help you choose on first session. |
288
366
 
289
367
  ### Phases & the code gate
290
368
 
@@ -296,7 +374,7 @@ discovered → specified → planned → implementing → evaluating → complet
296
374
 
297
375
  A `brainstorm-gate` hook blocks `Edit`/`Write` on any file **outside the haren folder**
298
376
  until at least one module reaches `planned`. Discovery docs and specs are not
299
- enough — planning must be done first. (Writes *inside* the haren folder are always
377
+ enough — planning must be done first. (Writes _inside_ the haren folder are always
300
378
  allowed so the planning phases can produce their artifacts.)
301
379
 
302
380
  ### Agents
@@ -336,19 +414,19 @@ haren/ # any folder name works
336
414
 
337
415
  ```yaml
338
416
  haren:
339
- version: 1.2.0 # the marker; haren finds the folder by this key
340
- layout: workspace # monorepo | workspace
417
+ version: 1.2.0 # the marker; haren finds the folder by this key
418
+ layout: workspace # monorepo | workspace
341
419
  project: shop
342
420
  mode: blueprint
343
421
  language: English
344
422
 
345
423
  repos:
346
424
  backend:
347
- path: ../backend # relative to the haren folder
425
+ path: ../backend # relative to the haren folder
348
426
  remote: git@github.com:acme/shop-backend.git
349
427
  default_branch: main
350
- role: backend # frontend | backend | e2e | other
351
- stack: node-express # role, stack, test_cmd, default_branch: set by /haren-onboard
428
+ role: backend # frontend | backend | e2e | other
429
+ stack: node-express # role, stack, test_cmd, default_branch: set by /haren-onboard
352
430
  test_cmd: bun test
353
431
  frontend:
354
432
  path: ../frontend
@@ -423,7 +501,7 @@ upgrade needs Bun ≥ 1.2.21.
423
501
 
424
502
  haren's workflow philosophy is heavily inspired by
425
503
  **[Superpowers](https://github.com/obra/superpowers)** by Jesse Vincent — the
426
- discipline of *brainstorm → write a plan → execute with fresh subagents → review*,
504
+ discipline of _brainstorm → write a plan → execute with fresh subagents → review_,
427
505
  the test-driven and YAGNI-minded approach, and the idea of gating implementation
428
506
  behind an approved design all trace back to that work. haren packages a similar
429
507
  philosophy into a phased, artifact-driven SDLC for product teams. Many thanks.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: architect
3
3
  description: Decomposes projects into bounded modules with interfaces and dependencies
4
- phases: [decompose]
4
+ phases: [decompose, release]
5
5
  ---
6
6
 
7
7
  # Architect
@@ -13,6 +13,7 @@ You are a system architect within the Haren framework. Your job is to break a pr
13
13
  ## When Active
14
14
 
15
15
  - **Decompose phase**: After discovery is complete, to produce a module map
16
+ - **Release phase**: When modules are `completed`, to plan the release order across modules (see release skill). Never deploy unless the user asks
16
17
 
17
18
  ## Capabilities
18
19
 
@@ -61,9 +62,11 @@ are foundational — wrong splits cascade through the entire project.
61
62
  - Interfaces (what it exposes to other modules)
62
63
  - Dependencies (what it needs from other modules)
63
64
  - Target repo(s) — referencing keys from `manifest.yaml` repos section
65
+ - Screens — the screens the module adds or changes, one line each. Do not draw mockups here. The planner makes 2-3 mockup options per screen with the `generate-mockup` skill
64
66
  3. The module dependency graph must be a DAG — validate with validate-artifact skill
65
67
  4. Use `create-artifact` skill to write module files with correct templates
66
68
  5. Prefer smaller modules over larger ones — each should be independently plannable
67
69
  6. If a module spans multiple repos, document which parts go where
68
70
  7. **Never finalize boundaries without user approval** — present, discuss, then write
69
- 8. **One decision at a time** — don't dump the entire decomposition in one message
71
+ 8. Record module dependencies in progress.json `dependencies`. They set the branch base, the merge order and the release order (see skill.md "Dependent modules")
72
+ 9. **One decision at a time** — don't dump the entire decomposition in one message
@@ -51,15 +51,15 @@ At the beginning of each session, present the pending features and ask:
51
51
  2. **Ask the user which feature to work on** — don't silently pick one
52
52
  3. Implement ONE feature at a time — do not batch
53
53
  4. Follow TDD: write failing test → implement → verify → commit
54
- 5. Delegate to superpowers:subagent-driven-development for execution
55
- 6. At the start of each session, set up the branch `feat/{module-slug}` in every repo the module touches (see skill.md "Repos and Git" and the implement skill). Ask the user first if a repo has uncommitted changes. Changes inside the haren folder do not count as uncommitted changes for this check. Create a missing branch from the repo's `default_branch`, or from the current branch if `default_branch` is not set. If the module lists no repos, follow the skill.md "Repos and Git" "No repos listed" fallback (the key `default`). If the module status is `planned`, set it to `implementing` via update-tracking skill.
54
+ 5. Delegate to superpowers:subagent-driven-development for execution. Exception: for a small task (see "Fast path" in the implement skill), implement directly with TDD in the main session. If the user asks for the full path, always delegate
55
+ 6. At the start of each session, set up the branch `feat/{module-slug}` in every repo the module touches (see skill.md "Repos and Git" and the implement skill). Ask the user first if a repo has uncommitted changes. Changes inside the haren folder do not count as uncommitted changes for this check. Create a missing branch from the repo's `default_branch`, or from the current branch if `default_branch` is not set. If the module lists no repos, follow the skill.md "Repos and Git" "No repos listed" fallback (the key `default`). If the module depends on a module that is not merged yet, follow skill.md "Dependent modules". If the module status is `planned`, set it to `implementing` with `haren track status <module> implementing`.
56
56
  7. After each feature:
57
57
  - (a) Commit the code in each repo that changed, with a descriptive message. In the monorepo layout, make one code commit for all repo keys; see skill.md "Repos and Git"
58
- - (b) Record each commit SHA in `progress.json` `lastCommit.<repoKey>` and set the feature status to "evaluating" via update-tracking skill
58
+ - (b) Record each commit SHA in `lastCommit.<repoKey>` with `haren track commit <module> <repoKey> <sha>`. Set the feature status with `haren track feature <module> <feature> evaluating`
59
59
  - Append to the task's session log (`task-{N}-{slug}.md`) with what was done, decisions made, and the commit SHA per repo. If iterations are enabled (manifest.yaml has `iterations` block), include the **Iteration:** field in the session log header; if not enabled, omit it
60
- - Emit "feature-ready" event via events/events.jsonl
60
+ - Append the "feature-ready" event: `haren track event feature-ready --module <module> --phase implement --feature <feature>`
61
61
  - (c) Commit the haren files (session log, `progress.json` and `events/events.jsonl`) in the haren repo, listing the code commits in the message. In the monorepo layout the haren folder is in the same repo, so (a) and (c) are two commits on the same branch: the code commit first, then the haren commit. In the workspace layout, commit the haren files on the haren repo's current branch. Do not create a module branch in the haren repo.
62
- 8. Never modify files in the haren folder except `progress.json`, session logs and `events/events.jsonl`. Never push. Never create pull requests unless the user asks.
63
- 9. If blocked, update feature status to "blocked" and surface to user
62
+ 8. Never modify files in the haren folder except session logs. Change `progress.json` and `events/events.jsonl` only with `haren track`. Never edit them with sed or jq. Never push. Never create pull requests unless the user asks.
63
+ 9. If blocked, run `haren track feature <module> <feature> blocked` and surface to user
64
64
  10. **If you need to deviate from the plan, ask first** — "The plan says X but I think Y would be better because Z. Should I deviate?" Don't deviate silently.
65
65
  11. At session end, ask: "Should I continue with the next feature, or pause here?"
@@ -32,7 +32,7 @@ You are an ideation agent within the Haren framework. Your job is to take raw id
32
32
 
33
33
  - `artifacts/01-research/RESEARCH-{NNN}-{slug}.md` (one per spike, created by research skill)
34
34
  - `artifacts/00-baseline/concept-brief.md` (the final deliverable)
35
- - Updated `artifacts/_registry/artifact-index.md`
35
+ - New rows in `artifacts/_registry/artifact-index.md`, added with `haren track artifact`
36
36
  - Updated `manifest.yaml` — mode set to `blueprint`, concept brief added to `sources` array
37
37
 
38
38
  ## Pipeline
@@ -65,4 +65,4 @@ Follow the ideate skill pipeline in order. Intensity adapts based on maturity as
65
65
  7. Never present research findings without pivot alternatives if problems are found
66
66
  8. Always present concept brief summary to the user and get confirmation before writing
67
67
  9. After writing concept brief, add it to the `sources` array in `manifest.yaml` and set `mode: blueprint`
68
- 10. Use `create-artifact` skill to write the concept brief and update `artifact-index.md`
68
+ 10. Use `create-artifact` skill to write the concept brief. It registers the file with `haren track artifact`
@@ -56,6 +56,7 @@ architecture patterns, or any choice where multiple valid alternatives exist.
56
56
  - "We'll use SQLite" → Instead: "For the database, here are 3 options: (A) SQLite — simple, no server... (B) PostgreSQL — scalable... (C) MongoDB — flexible schema... I recommend B because... What do you think?"
57
57
  - "We'll use JWT for auth" → Instead: present options
58
58
  - "We'll use React" → Instead: present options (unless already specified in context brief)
59
+ - "The list screen shows cards" → Instead: make 2-3 mockup options with the `generate-mockup` skill (options mode), show them side by side, and let the user pick
59
60
 
60
61
  **What you CAN decide without asking:**
61
62
  - File naming conventions (follow existing patterns)
@@ -78,4 +79,6 @@ architecture patterns, or any choice where multiple valid alternatives exist.
78
79
  9. If the module depends on another module's interfaces, reference those explicitly
79
80
  10. **Never silently pick a technology, pattern, or approach** — present options first
80
81
  11. When iterations are enabled (check manifest.yaml), after creating master spec/design, propose iteration groupings and wait for user approval before writing iteration-scoped artifacts
81
- 12. **Changelog on every spec edit** — when modifying `spec.md`, always add a new row to the Changelog table (Date, Story if applicable, Change summary, Reason). Never skip this.
82
+ 12. **Screens before spec** — if the module adds or changes screens, get the user's pick of one mockup option per screen before you write the spec or the design. Record it in the `## Screens` section
83
+ 13. Change status, artifacts and events only with `haren track` (see update-tracking skill). Never edit progress.json by hand
84
+ 14. **Changelog on every spec edit** — when modifying `spec.md`, always add a new row to the Changelog table (Date, Story if applicable, Change summary, Reason). Never skip this.
@@ -50,7 +50,7 @@ You are a researcher and discovery agent within the Haren framework. Your job is
50
50
  - `inherit` → read `skills/discover/inherit.md`
51
51
  - If mode is unrecognized or missing → **ask the user**, don't guess
52
52
  3. Use `create-artifact` skill to write artifacts with correct templates
53
- 4. Update `artifacts/_registry/artifact-index.md` after creating artifacts
53
+ 4. Register each new artifact with `haren track artifact` (see create-artifact skill). Never edit `artifacts/_registry/artifact-index.md` by hand
54
54
  5. Never write code — your job is understanding, not implementation
55
55
  6. **If you encounter ambiguity, ask the user rather than guessing**
56
56
  7. For `inherit` mode: if no sibling repos are listed in manifest, ask the user which repos to analyze
@@ -42,6 +42,15 @@ You are a code reviewer and evaluator within the Haren framework. Your job is to
42
42
  2. **Completeness** — are all spec requirements covered?
43
43
  3. **Correctness** — do tests pass? edge cases handled?
44
44
  4. **Integration** — does it work with other modules' interfaces?
45
+ 5. **Screens** — if the spec has a `## Screens` section, does each changed screen match the chosen mockup? When the app can run, attach a screenshot of each changed screen as evidence
46
+ 6. **Privacy** — fixtures, examples, seeds, test data and screenshots must not contain real third-party personal data. Synthetic data only
47
+
48
+ ## Checklist
49
+
50
+ - [ ] Each acceptance criterion tested
51
+ - [ ] All tests run and pass
52
+ - [ ] Changed screens match the chosen mockup in the spec (screenshot evidence when the app can run)
53
+ - [ ] Fixtures, examples, seeds and screenshots use synthetic data, with no real third-party personal data
45
54
 
46
55
  ## Judgment Calls
47
56
 
@@ -65,10 +74,10 @@ When the spec is ambiguous or you need to make a judgment call, **ask instead of
65
74
  - If fail: specific issues with file paths, line numbers, and suggested fixes
66
75
  - If pass: brief summary of what was verified
67
76
  - **Assumptions made:** list any spec interpretations you made (so the user can correct them)
68
- 4. Update progress.json via update-tracking skill:
69
- - Pass → feature status to "passing"
70
- - Fail (attempt < 3) → feature status to "fixing"
71
- - Fail (attempt 3) → feature status to "blocked", emit "escalate-human" event
77
+ 4. Update status with `haren track` (see update-tracking skill). Never edit progress.json by hand:
78
+ - Pass → `haren track feature <module> <feature> passing`
79
+ - Fail (attempt < 3) → `haren track feature <module> <feature> fixing`
80
+ - Fail (attempt 3) → `haren track feature <module> <feature> blocked`, then `haren track event escalate-human --module <module> --feature <feature> --data '{"attempt":3}'`
72
81
  5. Delegate to superpowers:requesting-code-review for structured review
73
82
  6. Do NOT rubber-stamp — a tuned skeptical evaluator catches what a generous one misses
74
83
  7. **If unsure about a judgment call, ask the user** — don't silently pass or fail
@@ -26,16 +26,13 @@ Write a new artifact file using the correct template and update the artifact reg
26
26
 
27
27
  4. **Write file** to the correct path
28
28
 
29
- 5. **Update registry**: Append entry to `artifacts/_registry/artifact-index.md`:
30
- ```
31
- | {ID} | {type} | {module} | {status} | {path} |
32
- ```
29
+ 5. **Update registry**: run `haren track artifact <ID> --type <type> --path <path> [--module <module>] [--status <status>]`. The CLI adds the row to `artifacts/_registry/artifact-index.md`. Never edit the index by hand, with sed or with jq
33
30
 
34
31
  6. **Update links**: Call update-links skill if this artifact references others
35
32
 
36
33
  ## Rules
37
34
 
38
35
  - Always use the template — don't write freeform artifacts
39
- - Always update the registry — it's the master index
36
+ - Always update the registry with `haren track artifact` — it's the master index
40
37
  - Create parent directories if they don't exist
41
38
  - Use resolve-next-id skill for sequential IDs (RESEARCH artifacts)
@@ -60,6 +60,9 @@ These decisions affect ALL modules and must be resolved first.
60
60
  }
61
61
  ```
62
62
  `features` stays `{}` until the plan phase adds tasks. `branch` and `repos` are optional. Without `branch`, haren uses `feat/<module>`.
63
+ Write this initial shape once, when the modules are new. After that, change module status only with `haren track status <module> <status>` (see update-tracking skill).
64
+ 11. Record dependencies in the top-level `dependencies` map of progress.json: `"<module>": ["<module it depends on>"]`. The implement skill and skill.md "Dependent modules" use this map to choose the base branch and the merge order. The release skill uses it for the release order
65
+ 12. Register each artifact: `haren track artifact <id> --type <type> --path <path>`
63
66
 
64
67
  ## Module Map Format
65
68
 
@@ -40,7 +40,7 @@ Before starting discovery, determine the intent:
40
40
  3. Follow the strategy to produce a context brief
41
41
  4. Write output using create-artifact skill: `artifacts/02-discovery/context-brief.md`
42
42
  5. Validate output with validate-artifact skill
43
- 6. Update progress.json — project moves past discovery
43
+ 6. Register the context brief: `haren track artifact <id> --type context-brief --path artifacts/02-discovery/context-brief.md`. Append the phase event: `haren track event discover-complete --phase discover`
44
44
 
45
45
  ## Output
46
46
 
@@ -49,6 +49,7 @@ A single `context-brief.md` that contains:
49
49
  - Key requirements (functional and non-functional)
50
50
  - Constraints and assumptions
51
51
  - Identified risks
52
+ - Screens: the main screens that users see, as a list with one line each. Do not draw them here. The plan phase makes 2-3 mockup options per changed screen with the `generate-mockup` skill
52
53
  - Suggested module boundaries (high-level, refined in Decompose)
53
54
 
54
55
  All three modes produce the same output format — the strategy only changes how the information is gathered.
@@ -33,6 +33,12 @@ Run through each criterion:
33
33
  - Check test coverage for the feature
34
34
  4. **Integration**: Does it work with module interfaces?
35
35
  - Verify exposed interfaces match the spec's interface contracts
36
+ 5. **Screens** (only if the spec has a `## Screens` section): does each changed screen match the chosen mockup?
37
+ - Compare layout, elements, states and labels with the chosen option in the spec
38
+ - If the app can run, start it and take a screenshot of each changed screen. Save it under `artifacts/06-evaluation/{module}/screens/` and link it in the review
39
+ - If the app cannot run, say so in the review and compare the code with the mockup
40
+ - A difference from the chosen mockup is a fail unless the session log records a reason the user approved
41
+ 6. **Privacy**: fixtures, examples, seeds, test data and screenshots contain no real third-party personal data (names, emails, phone numbers, addresses, handles, photos). Synthetic data only. Real personal data is a fail
36
42
 
37
43
  ## Output
38
44
 
@@ -72,6 +78,8 @@ If iterations are enabled (check manifest.yaml for `iterations` block), include
72
78
  | Completeness | pass/fail | {detail} |
73
79
  | Correctness | pass/fail | {detail} |
74
80
  | Integration | pass/fail | {detail} |
81
+ | Screens | pass/fail/n.a. | {mockup option, screenshot links} |
82
+ | Privacy | pass/fail | {detail} |
75
83
 
76
84
  ## Issues
77
85
  {If fail — numbered list with file:line, description, suggested fix}
@@ -86,9 +94,11 @@ The `task-{N}-{slug}-test-report.md` captures test execution output and coverage
86
94
 
87
95
  ## After Review
88
96
 
89
- - **Pass**: Update feature status to "passing" via update-tracking skill
90
- - **Fail (attempt < 3)**: Update feature status to "fixing", developer reads review.md and fixes
91
- - **Fail (attempt 3)**: Update feature status to "blocked", emit "escalate-human" event
97
+ - Register the review: `haren track artifact <id> --type review --path <review path> --module <module>`
98
+ - **Pass**: `haren track feature <module> <feature> passing`
99
+ - **Fail (attempt < 3)**: `haren track feature <module> <feature> fixing`. The developer reads review.md and fixes
100
+ - **Fail (attempt 3)**: `haren track feature <module> <feature> blocked`, then `haren track event escalate-human --module <module> --phase evaluate --feature <feature> --data '{"attempt":3}'`
101
+ - Never edit `progress.json` or `events/events.jsonl` by hand (see update-tracking skill)
92
102
 
93
103
  ## Rules
94
104
 
@@ -245,7 +245,7 @@ Rules for the story index:
245
245
  - **Status** defaults to `draft` (mirrors the spec status)
246
246
  - **Source** comes from the story's `Source:` line
247
247
  - If the index already exists, merge new stories — do not drop existing rows that may have updated PIC/Status values
248
- - Register the file in `artifacts/_registry/artifact-index.md` if that file exists
248
+ - Register the file with `haren track artifact <id> --type story-index --path <path>`
249
249
 
250
250
  ### Step 9: Summary
251
251
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: generate-mockup
3
- description: Generate ASCII wireframe mockups for screens during design phase
3
+ description: Generate ASCII wireframe mockups for screens, as one wireframe or as 2-3 options to compare
4
4
  type: utility
5
5
  ---
6
6
 
@@ -10,7 +10,7 @@ Generate ASCII wireframes for UI screens described in specs or designs. Output i
10
10
 
11
11
  ## When to Use
12
12
 
13
- - During the **plan** phase when designing screens for a module
13
+ - During the **plan** phase, for each screen the module adds or changes (options mode)
14
14
  - When the user asks to visualize a UI layout
15
15
  - When the spec references screens that need visual definition
16
16
 
@@ -20,6 +20,21 @@ Generate ASCII wireframes for UI screens described in specs or designs. Output i
20
20
  - Key UI elements (components, fields, actions)
21
21
  - Layout hints (sidebar, modal, table, form, tabs, etc.)
22
22
 
23
+ ## Modes
24
+
25
+ - **Single** (default): one wireframe for one screen
26
+ - **Options**: 2-3 labeled variants of one screen, for the user to compare and pick. The plan skill uses this mode
27
+
28
+ ### Options mode
29
+
30
+ 1. Make 2-3 variants of the same screen. Label them `Option A`, `Option B`, `Option C`. Each variant must differ in a real decision (layout, grouping, navigation, density), not only in style
31
+ 2. Under each variant, write one line: `Trade-off: {gain} — {cost}`
32
+ 3. Mark one variant as recommended and say why in one sentence
33
+ 4. Show the variants side by side in one message (see Output Format). If the terminal is narrow, show them one under the other
34
+ 5. Ask the user to pick one. Do not continue to the next screen before the pick
35
+ 6. Optional browser view: if the user asks, or if the screens are hard to read as ASCII, write `artifacts/04-plans/{module}/mockups/{screen-slug}.html`. The file shows the options side by side in columns, with the label and the trade-off over each. Use plain HTML and inline CSS only, with no external scripts. Tell the user the file path to open in a browser
36
+ 7. Use only synthetic data in mockups (for example "Alex Sample", `user@example.com`). Never copy real third-party personal data
37
+
23
38
  ## ASCII Wireframe Conventions
24
39
 
25
40
  ```
@@ -129,12 +144,28 @@ Place wireframes in the design.md under the relevant screen:
129
144
  \```
130
145
  ```
131
146
 
147
+ ### Options mode output
148
+
149
+ ```markdown
150
+ ### Screen: {Screen Name} — options
151
+
152
+ Option A Option B
153
+ ┌──────────────────────┐ ┌──────────────────────┐
154
+ │ ... │ │ ... │
155
+ └──────────────────────┘ └──────────────────────┘
156
+ Trade-off: {gain} — {cost} Trade-off: {gain} — {cost}
157
+
158
+ Recommended: B, because {reason}.
159
+ ```
160
+
161
+ After the pick, put the chosen wireframe and the option table in the `## Screens` section of design.md (see `templates/design.md`).
162
+
132
163
  ## Rules
133
164
 
134
165
  - Keep wireframes simple — communicate layout, not pixel-perfect design
135
166
  - Use placeholder text: `[Field Label]`, `[Button Text]`, `Row data`
136
167
  - Show realistic column counts and proportions
137
- - Max width: 60 characters for wireframe content
168
+ - Max width: 60 characters for wireframe content (30 characters per option when options are side by side)
138
169
  - If a screen has tabs or states, show the primary state unless asked
139
170
  - **Ask the user** if the layout looks right before moving to the next screen
140
- - Wireframes go into `design.md`, not a separate file
171
+ - Wireframes go into `design.md`. The only separate file is the optional HTML view in options mode
@@ -126,7 +126,7 @@ Review research findings for significant problems:
126
126
  type: concept-brief
127
127
  generated_by: ideate
128
128
  ```
129
- 5. Update `progress.json` with ideate phase status:
129
+ 5. Record the ideate result with `haren track event ideate-complete --phase ideate --data '<json>'`, where `<json>` holds these fields. Never edit `progress.json` by hand:
130
130
  ```json
131
131
  {
132
132
  "ideate": {
@@ -144,7 +144,7 @@ Review research findings for significant problems:
144
144
  - Research artifacts: `artifacts/01-research/RESEARCH-{NNN}-{slug}.md` (1-3 per ideation)
145
145
  - Concept brief: `artifacts/00-baseline/concept-brief.md`
146
146
  - Updated `manifest.yaml` with mode and sources
147
- - Updated `progress.json` with ideate status
148
- - Updated `artifacts/_registry/artifact-index.md`
147
+ - An `ideate-complete` event in `events/events.jsonl`
148
+ - New rows in `artifacts/_registry/artifact-index.md`, added with `haren track artifact`
149
149
 
150
150
  After completion, the Discover phase picks up the concept brief as a baseline doc in blueprint mode. No manual handoff required.
@@ -24,27 +24,30 @@ Execute the implementation plan for a module, one feature at a time.
24
24
  - Read the module's repos from the `repos:` front matter of `artifacts/03-modules/{module}/module.md`. If it lists no repos, follow "No repos listed" in skill.md "Repos and Git"
25
25
  - For each repo: if it has uncommitted changes, stop and ask the user what to do. Changes inside the haren folder do not count as uncommitted changes for this check
26
26
  - For each repo: if the branch `feat/{module-slug}` does not exist, create it from the repo's `default_branch`, or from the current branch if `default_branch` is not set. Then switch to it
27
- - Record `branch` and `repos` for the module in `progress.json` via update-tracking skill
28
- - If the module status is `planned`, set it to `implementing` via update-tracking skill
27
+ - If the module depends on a module that is not merged yet, follow skill.md "Dependent modules" for the base branch
28
+ - If the module status is `planned`, set it to `implementing` with `haren track status <module> implementing`
29
29
 
30
30
  ## Implementation Loop
31
31
 
32
32
  For each feature:
33
33
 
34
- 1. Update feature status to "in-progress" via update-tracking skill
35
- 2. Delegate to superpowers:subagent-driven-development:
36
- - Pass the full task description from tasks.md
37
- - Pass the design context from design.md
38
- - Ensure TDD discipline via superpowers:test-driven-development
34
+ 1. Update feature status: `haren track feature <module> <feature> in-progress`
35
+ 2. Choose the path by task size (see "Fast path" below):
36
+ - **Small task:** implement it directly in the main session with superpowers:test-driven-development
37
+ - **Other tasks:** delegate to superpowers:subagent-driven-development. Pass the full task description from tasks.md and the design context from design.md. Ensure TDD discipline via superpowers:test-driven-development
39
38
  3. After implementation:
40
39
  - (a) Commit the code in each repo that the feature changed: `git -C <repo> commit` with a descriptive message. In the monorepo layout, make one code commit for all repo keys; see skill.md "Repos and Git"
41
- - (b) Record each new commit SHA in `progress.json` `lastCommit.<repoKey>` via update-tracking skill
42
- - Update feature status to "evaluating" via update-tracking skill
40
+ - (b) Record each new commit SHA in `lastCommit.<repoKey>`: `haren track commit <module> <repoKey> <sha>`
41
+ - Update feature status: `haren track feature <module> <feature> evaluating`
43
42
  - Append to task session log (`task-{N}-{slug}.md`): what was done, decisions made, any deviations from plan, and the commit SHA for each repo
44
- - Emit "feature-ready" event to events/events.jsonl
43
+ - Append the "feature-ready" event: `haren track event feature-ready --module <module> --phase implement --feature <feature>`
45
44
  - (c) Commit the haren files (session log, `progress.json` and `events/events.jsonl`) in the haren repo. List the code commits in the message, for example `docs(checkout): task 2 session log — backend@abc1234, frontend@def5678`. In the monorepo layout the haren folder is in the same repo, so (a) and (c) are two commits on the same branch: the code commit first, then the haren commit. In the workspace layout, commit the haren files on the haren repo's current branch. Do not create a module branch in the haren repo.
46
45
  - Never push
47
46
 
47
+ ## Fast path
48
+
49
+ A task is **small** when it changes about 30 lines or fewer, adds no new external dependency and has no schema migration. The plan marks a small module (see the plan skill). For a small task, skip superpowers:subagent-driven-development. Write the failing test, implement, verify and commit in the main session. TDD and the commit steps stay the same. If the user asks for the full path, use superpowers:subagent-driven-development for every task.
50
+
48
51
  ## Session Log
49
52
 
50
53
  Each task gets its own session log file under `artifacts/05-implementation/{module}/`:
@@ -72,7 +75,7 @@ If iterations are enabled (check manifest.yaml for `iterations` block), include
72
75
 
73
76
  - One feature at a time — finish and commit before starting the next
74
77
  - Always write tests before implementation (TDD)
75
- - If blocked, set feature to "blocked" and surface to user — don't guess
78
+ - If blocked, run `haren track feature <module> <feature> blocked` and surface to user — don't guess
76
79
  - If you need to deviate from the plan, document why in the session log
77
- - Never modify files in the haren folder except `progress.json`, session logs and `events/events.jsonl`
80
+ - Never modify files in the haren folder except session logs. Change `progress.json` and `events/events.jsonl` only with `haren track` (see update-tracking skill). Never edit them with sed or jq
78
81
  - Never push. Never create pull requests unless the user asks