@odarino/haren 1.7.0 → 1.8.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/CHANGELOG.md +17 -0
- package/README.md +68 -8
- package/content/skills/implement/SKILL.md +24 -0
- package/content/skills/plan/SKILL.md +5 -0
- package/content/templates/task-brief.md +40 -0
- package/content/templates/tasks.md +2 -0
- package/dist/index.js +1857 -435
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Each section lists what changed in one release. `haren upgrade` prints the sections between your old version and the new one.
|
|
4
4
|
|
|
5
|
+
## 1.8.0
|
|
6
|
+
|
|
7
|
+
Both new features are experimental and off by default. With the flags off, haren behaves as in 1.7.0.
|
|
8
|
+
|
|
9
|
+
### New
|
|
10
|
+
|
|
11
|
+
- **Experimental features** (`experimental:` in `manifest.yaml`): `haren experimental enable|disable|list <name>` and `haren init --experimental <a,b>`. Known: `multi-host`, `multi-model`. An unknown value prints a warning.
|
|
12
|
+
- **More coding agents (experimental, `multi-host`)**: `haren init --hosts <a,b>` installs haren for `agents-md`, `codex`, `qwen-code`, `opencode` and `kimi-code`, next to `claude-code` and `cursor`. The list is saved as `hosts:` in `manifest.yaml`; `haren upgrade` adds it to existing workspaces. Output for Claude Code and Cursor does not change.
|
|
13
|
+
- The brainstorm gate accepts `--host <id>` and understands Qwen Code and Codex tool names.
|
|
14
|
+
- **Multi-model (experimental, `multi-model`)**: Claude plans and reviews while another agent writes the code. `models.executor` in `manifest.yaml` names the runner (any host with a non-interactive mode), the model, env (`${VAR}` only for secrets), `maxRetries` and `timeoutMinutes`. `haren exec --module <m> --task <n> [--retry --feedback <file>] [--clean]` runs one task in its own git worktree, runs its `**Test:**` command, checks for writes to the haren folder and writes a result file. `haren-implement` reviews, merges or asks for a retry. New template `task-brief.md`; `tasks.md` gains optional `**Repo:**` and `**Test:**` lines.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `haren upgrade` adds the `hosts:` list to `manifest.yaml` of existing workspaces.
|
|
19
|
+
|
|
5
20
|
## 1.7.0
|
|
6
21
|
|
|
7
22
|
### New
|
|
23
|
+
|
|
8
24
|
- **Component catalog** (`collect-components` skill): one file, `artifacts/03-modules/component-catalog.md`, lists the common UI components (with a short ASCII sketch), shared services and shared functions of your repos. The plan reads it before it designs new code. Implement updates it after each task.
|
|
9
25
|
- **Implementation checklist**: the plan writes `checklist.md` next to `tasks.md`, with concrete checks per task (tests, reuse, files, contract, edge cases). Implement ticks only what it verified. A difference from the plan is written as `— changed: {what and why}`, and a skip as `— skipped: {reason}`. Evaluate checks each tick.
|
|
10
26
|
- **Choose the mockup format**: with `ui.mockups: ask`, `generate-mockup` asks before the first mockup: ASCII, Claude Artifact or a local browser tab.
|
|
@@ -13,6 +29,7 @@ Each section lists what changed in one release. `haren upgrade` prints the secti
|
|
|
13
29
|
- **What's new**: `haren upgrade` prints this changelog for the versions you skipped.
|
|
14
30
|
|
|
15
31
|
### Fixed
|
|
32
|
+
|
|
16
33
|
- `haren track status` no longer crashes on a module status from an old `progress.json` (for example `specified`). Such a module can move to `decomposed` or `planned`.
|
|
17
34
|
- `track status --repos`, `track commit` and `track check` use the same repo key rule. When `manifest.yaml` has no `repos`, the key is `default`.
|
|
18
35
|
- The brainstorm gate no longer blocks writes to files outside the workspace.
|
package/README.md
CHANGED
|
@@ -177,13 +177,15 @@ every repo.
|
|
|
177
177
|
|
|
178
178
|
## Commands
|
|
179
179
|
|
|
180
|
-
| Command
|
|
181
|
-
|
|
|
182
|
-
| `haren init`
|
|
183
|
-
| `haren upgrade`
|
|
184
|
-
| `haren plugin`
|
|
185
|
-
| `haren migrate`
|
|
186
|
-
| `haren
|
|
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
|
+
| `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`, and prints what's new since your old version (from [CHANGELOG.md](CHANGELOG.md)). 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 migrate` | Migration mode only: `inventory [--module m]`, `extract <unit>`, `gate <unit> [--approve]`. It runs the adapter commands. See [Migration mode](#migration-mode). |
|
|
186
|
+
| `haren experimental` | Turn experimental features on or off: `enable <name>`, `disable <name>`, `list`. Known: `multi-host`, `multi-model`. See [More coding agents](#more-coding-agents-experimental). |
|
|
187
|
+
| `haren exec` | _(experimental, `multi-model`)_ Run one task with the executor model in its own git worktree: `--module <m> --task <n> [--retry --feedback <file>] [--clean]`. See [Multi-model](#multi-model-experimental). |
|
|
188
|
+
| `haren agent` | Manage the local agent bridge _(experimental — for the in-progress Haren Portal)_. |
|
|
187
189
|
|
|
188
190
|
`haren agent` works in both layouts. It uses the git remote of the haren repo as
|
|
189
191
|
the Portal project key.
|
|
@@ -197,7 +199,7 @@ haren init \
|
|
|
197
199
|
--project "my-app" \
|
|
198
200
|
--mode blueprint \ # blueprint | explore | inherit | migration | undecided
|
|
199
201
|
--language English \
|
|
200
|
-
--editor both \ # claude-code | cursor | both
|
|
202
|
+
--editor both \ # claude-code | cursor | both (or --hosts, see below)
|
|
201
203
|
--iterations \ # enable iteration-based planning
|
|
202
204
|
--duration "2 weeks" --start-date 2026-06-08 --demo-day Friday
|
|
203
205
|
```
|
|
@@ -563,6 +565,62 @@ root.
|
|
|
563
565
|
- **Cursor** → `.cursorrules` + `.cursor/rules/haren.mdc` + `.cursor/hooks.json`
|
|
564
566
|
(registers the gate via `beforeFileEdit`/`preToolUse`).
|
|
565
567
|
|
|
568
|
+
#### More coding agents (experimental)
|
|
569
|
+
|
|
570
|
+
With the `multi-host` experimental feature, `--hosts <a,b>` installs haren for
|
|
571
|
+
more agents. The list is saved as `hosts:` in `manifest.yaml`, and
|
|
572
|
+
`haren upgrade` refreshes each host. `--editor` still works and maps to
|
|
573
|
+
`--hosts`.
|
|
574
|
+
|
|
575
|
+
```bash
|
|
576
|
+
haren experimental enable multi-host # or: haren init --experimental multi-host
|
|
577
|
+
haren init --hosts claude-code,codex,opencode
|
|
578
|
+
```
|
|
579
|
+
|
|
580
|
+
| Host | Files | Gate hook |
|
|
581
|
+
| ------------- | --------------------------------------------------------------------------- | ----------------------- |
|
|
582
|
+
| `claude-code` | `CLAUDE.md`, `.claude/` | yes |
|
|
583
|
+
| `cursor` | `.cursorrules`, `.cursor/` | yes |
|
|
584
|
+
| `agents-md` | `AGENTS.md` | no (instructions only) |
|
|
585
|
+
| `codex` | `AGENTS.md`, `.agents/skills/`, `.codex/agents/*.toml`, `.codex/hooks.json` | yes |
|
|
586
|
+
| `qwen-code` | `AGENTS.md`, `.agents/skills/`, `.qwen/agents/`, `.qwen/settings.json` | yes |
|
|
587
|
+
| `opencode` | `AGENTS.md`, `.agents/skills/`, `.opencode/agents/` | no (init prints a note) |
|
|
588
|
+
| `kimi-code` | `AGENTS.md`, `.agents/skills/`, `.agents/agents/` | no (init prints a note) |
|
|
589
|
+
|
|
590
|
+
Several hosts share one haren block in `AGENTS.md` and one copy of the skills
|
|
591
|
+
in `.agents/skills/`. `haren experimental list` shows the features.
|
|
592
|
+
|
|
593
|
+
#### Multi-model (experimental)
|
|
594
|
+
|
|
595
|
+
With `multi-model` (it also needs `multi-host`), Claude plans and reviews, and
|
|
596
|
+
another coding agent writes the code. Add an executor to `manifest.yaml`:
|
|
597
|
+
|
|
598
|
+
```yaml
|
|
599
|
+
experimental: [multi-host, multi-model]
|
|
600
|
+
models:
|
|
601
|
+
executor:
|
|
602
|
+
runner: codex # any host with a non-interactive mode
|
|
603
|
+
model: gpt-5.4 # optional
|
|
604
|
+
env: # optional, passed only to the executor
|
|
605
|
+
ANTHROPIC_BASE_URL: https://api.example.com/anthropic
|
|
606
|
+
ANTHROPIC_AUTH_TOKEN: ${EXECUTOR_API_KEY}
|
|
607
|
+
maxRetries: 2 # default 2
|
|
608
|
+
timeoutMinutes: 30 # default 30
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
Secrets never go in `manifest.yaml`. An `env` key with `KEY`, `TOKEN` or
|
|
612
|
+
`SECRET` in its name must have a `${VAR}` value. The CLI reads the variable
|
|
613
|
+
at run time and never prints it.
|
|
614
|
+
|
|
615
|
+
`haren exec --module <m> --task <n>` runs one task of `tasks.md` in its own
|
|
616
|
+
git worktree (`.haren-worktrees/<m>-<n>`, branch `exec/<m>/<n>`), runs the
|
|
617
|
+
task's `**Test:**` command, checks that no file in the haren folder changed,
|
|
618
|
+
and writes `artifacts/05-exec/<m>/<n>/result-<k>.json`. `--retry --feedback <file>`
|
|
619
|
+
runs it again with review notes. `--clean` removes the worktree and the branch.
|
|
620
|
+
The `haren-implement` skill drives this loop: it reviews each diff, merges a
|
|
621
|
+
passing task with `git merge --no-ff`, and asks you before it fixes a task
|
|
622
|
+
that failed every retry. `haren exec` never merges and never pushes.
|
|
623
|
+
|
|
566
624
|
Both editors also get every haren skill and agent in their native folders:
|
|
567
625
|
`.claude/skills/haren-<skill>/`, `.claude/agents/haren-<agent>.md`, and the same
|
|
568
626
|
under `.cursor/`. The `haren-` prefix keeps them apart from your own skills and
|
|
@@ -590,6 +648,8 @@ also migrates an older project:
|
|
|
590
648
|
- `progress.json` moves to version 2: `lastCommit` becomes one commit per repo.
|
|
591
649
|
- The root files (`CLAUDE.md`, `.claude/`, `.cursor/`, and so on) are
|
|
592
650
|
regenerated.
|
|
651
|
+
- From 1.8.0, `manifest.yaml` gets a `hosts:` list (the coding agents haren is
|
|
652
|
+
installed for). Experimental features stay off until you turn them on.
|
|
593
653
|
|
|
594
654
|
Run `haren upgrade --dry-run` to see every step without writing anything. The
|
|
595
655
|
upgrade needs Bun ≥ 1.2.21.
|
|
@@ -53,6 +53,30 @@ For each feature:
|
|
|
53
53
|
- (c) Commit the haren files (session log, `checklist.md`, `component-catalog.md`, `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.
|
|
54
54
|
- Never push
|
|
55
55
|
|
|
56
|
+
## Multi-model executor (experimental)
|
|
57
|
+
|
|
58
|
+
Use this section only when `manifest.yaml` has `multi-model` in `experimental` and a `models.executor` block, and the runner is not `claude-code` with no `env`. In all other cases, skip this section.
|
|
59
|
+
|
|
60
|
+
In this mode another model writes the code. You review it. Replace step 2 of the Implementation Loop with these steps for each task:
|
|
61
|
+
|
|
62
|
+
1. Run `haren exec --module <module> --task <n>`. Do not write the code yourself. Do not write to the haren folder while it runs (no session log, no `haren track`): the CLI reports any change there as a violation.
|
|
63
|
+
2. Read the result file that the command prints (`artifacts/05-exec/<module>/<n>/result-<k>.json`). Read the diff: `git -C <repo> diff <baseBranch>...<branch>`, with `baseBranch` and `branch` from the result.
|
|
64
|
+
3. Review the diff against the spec stories and the task. A result with `pass: false` is a FAIL. A result with `pass: true` can still FAIL your review.
|
|
65
|
+
4. PASS:
|
|
66
|
+
- Run `git -C <repo> merge --no-ff <branch>` on `baseBranch`.
|
|
67
|
+
- Run `haren exec --clean --module <module> --task <n>`. It removes the worktree and the branch, and moves the run files to `cleaned-<time>/`.
|
|
68
|
+
- Go on with step 3 of the Implementation Loop (checklist, tracking, session log). The merge commit is the code commit of the task.
|
|
69
|
+
5. FAIL and `retriesLeft` > 0:
|
|
70
|
+
- Write the review points to `artifacts/05-exec/<module>/<n>/feedback-<k>.md`. Each point names the file, the problem and the expected behavior.
|
|
71
|
+
- Run `haren exec --module <module> --task <n> --retry --feedback <that file>`. Then go back to step 2.
|
|
72
|
+
6. FAIL and `retriesLeft` = 0: stop. Ask the user to choose one option, and wait for the answer:
|
|
73
|
+
- A) Claude fixes the task in the worktree. Commit the fix on `<branch>` in the worktree (`git -C <worktree> commit`), then merge as in step 4.
|
|
74
|
+
- B) Skip the task: `haren track feature <module> <feature> blocked`.
|
|
75
|
+
- C) The user handles the task.
|
|
76
|
+
Never fix the task yourself without this answer.
|
|
77
|
+
|
|
78
|
+
The CLI counts the retries. Do not count them yourself. `haren exec` never merges and never pushes. A failed run keeps its worktree, so you and the user can read it.
|
|
79
|
+
|
|
56
80
|
## Fast path
|
|
57
81
|
|
|
58
82
|
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.
|
|
@@ -133,6 +133,11 @@ Using `templates/tasks.md`:
|
|
|
133
133
|
- Every task MUST reference at least one STORY-ID from the spec
|
|
134
134
|
- Tasks should be small enough for one implementation session
|
|
135
135
|
- Include test tasks alongside implementation tasks
|
|
136
|
+
- **Multi-model (experimental):** when `manifest.yaml` has `multi-model` in `experimental`, another model builds each task from its brief alone. Then each task also has:
|
|
137
|
+
- `**Test:**` with the command that runs the tests of this task only
|
|
138
|
+
- `**Interfaces:**` with the functions, types or endpoints the task must expose or use
|
|
139
|
+
- `**Files:**` with every file to create, modify or test
|
|
140
|
+
- `**Repo:**` with the repo key, when the module has more than one repo
|
|
136
141
|
|
|
137
142
|
#### Checklist (implementation checklist)
|
|
138
143
|
Write to: the active plan path, next to tasks.md, as `checklist.md`. When iterations are enabled, write it in Step 9 for each iteration, not at the root level.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Task {{number}}: {{title}}
|
|
2
|
+
|
|
3
|
+
You are the executor for one task of a planned module. Write the code and the tests for this task only.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
{{description}}
|
|
8
|
+
|
|
9
|
+
## Acceptance criteria
|
|
10
|
+
|
|
11
|
+
The task must meet the acceptance criteria of these stories in the spec: {{stories}}.
|
|
12
|
+
|
|
13
|
+
## Files to read
|
|
14
|
+
|
|
15
|
+
- Spec: `{{specPath}}`
|
|
16
|
+
- Design: `{{designPath}}`
|
|
17
|
+
|
|
18
|
+
## Files to change
|
|
19
|
+
|
|
20
|
+
{{files}}
|
|
21
|
+
|
|
22
|
+
## Interfaces
|
|
23
|
+
|
|
24
|
+
{{interfaces}}
|
|
25
|
+
|
|
26
|
+
## Test command
|
|
27
|
+
|
|
28
|
+
Run this command before you stop. It must pass:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
{{test}}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- Do not write to the haren folder (`{{harenDir}}`). Read it only.
|
|
37
|
+
- Do not commit. Do not create, switch or change branches.
|
|
38
|
+
- Do not write files outside this repo.
|
|
39
|
+
- Change only what the task needs.
|
|
40
|
+
{{feedback}}
|