@odarino/haren 1.1.2 → 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/README.md +228 -19
- package/content/agents/developer.md +14 -11
- package/content/agents/qa-engineer.md +32 -20
- package/content/skills/ideate/SKILL.md +1 -1
- package/content/skills/implement/SKILL.md +16 -6
- package/content/skills/onboard/SKILL.md +93 -0
- package/content/skills/read-context/SKILL.md +11 -6
- package/content/skills/update-tracking/SKILL.md +13 -3
- package/content/templates/module.md +1 -1
- package/dist/index.js +1602 -653
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -35,19 +35,66 @@ 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.
|
|
37
37
|
|
|
38
|
-
Everything lives in a single `haren/`
|
|
38
|
+
Everything lives in a single haren folder (`haren/` by default) you can read, diff, and commit.
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
42
|
## Requirements
|
|
43
43
|
|
|
44
|
-
- **[Bun](https://bun.com) ≥ 1.2** — installed and on your `PATH`.
|
|
44
|
+
- **[Bun](https://bun.com) ≥ 1.2.21** — installed and on your `PATH`.
|
|
45
45
|
haren runs on the Bun runtime; Node.js alone is not sufficient.
|
|
46
|
+
The one-line installer below installs Bun for you if it is missing.
|
|
46
47
|
- An AI coding agent: **[Claude Code](https://claude.com/claude-code)** or
|
|
47
48
|
**[Cursor](https://cursor.com)** (or both).
|
|
48
49
|
|
|
49
50
|
## Install
|
|
50
51
|
|
|
52
|
+
**macOS / Linux**
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
curl -fsSL https://raw.githubusercontent.com/odarino/haren/main/install.sh | bash
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**Windows (PowerShell)**
|
|
59
|
+
|
|
60
|
+
```powershell
|
|
61
|
+
irm https://raw.githubusercontent.com/odarino/haren/main/install.ps1 | iex
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The script does these steps:
|
|
65
|
+
|
|
66
|
+
1. It installs Bun with the official Bun installer if Bun is missing. The Bun
|
|
67
|
+
installer can add Bun to your shell profile or your user `PATH`.
|
|
68
|
+
2. It installs `@odarino/haren` with `bun add -g`.
|
|
69
|
+
3. If `haren` on your `PATH` is missing or is a different copy, it prints the
|
|
70
|
+
line to add. It always runs the `haren` that Bun installed.
|
|
71
|
+
4. It asks for your workspace folder and runs `haren init --dir <folder>`.
|
|
72
|
+
It does not use your home folder as the workspace.
|
|
73
|
+
|
|
74
|
+
Step 4 runs only when the script can ask you a question: it needs a terminal,
|
|
75
|
+
and `CI` must be empty, `false` or `0`. In other cases the script only installs
|
|
76
|
+
and prints the next step. These cases include CI and a script with redirected
|
|
77
|
+
input (for example `ssh host "..."` without `-t`).
|
|
78
|
+
|
|
79
|
+
Pin a version with `HAREN_VERSION`. The default is `latest`. The `1.2.0`
|
|
80
|
+
example works only after version 1.2.0 is published to npm.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
curl -fsSL https://raw.githubusercontent.com/odarino/haren/main/install.sh | HAREN_VERSION=1.2.0 bash
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
```powershell
|
|
87
|
+
try { $env:HAREN_VERSION = '1.2.0'; irm https://raw.githubusercontent.com/odarino/haren/main/install.ps1 | iex } finally { Remove-Item Env:HAREN_VERSION }
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The `finally` part clears the variable, also when the install fails. A later
|
|
91
|
+
install in the same PowerShell window then gets `latest` again.
|
|
92
|
+
|
|
93
|
+
After the release is tagged, you can also download the script from a release
|
|
94
|
+
tag, for example `.../haren/v1.2.0/install.sh`.
|
|
95
|
+
|
|
96
|
+
**With a package manager** (Bun must be installed):
|
|
97
|
+
|
|
51
98
|
```bash
|
|
52
99
|
npm install -g @odarino/haren
|
|
53
100
|
# or run without installing:
|
|
@@ -60,28 +107,67 @@ npx @odarino/haren init
|
|
|
60
107
|
|
|
61
108
|
```bash
|
|
62
109
|
cd your-project
|
|
63
|
-
haren init # scaffold a haren
|
|
110
|
+
haren init # scaffold a haren folder (interactive)
|
|
64
111
|
```
|
|
65
112
|
|
|
66
|
-
`init`
|
|
67
|
-
|
|
68
|
-
|
|
113
|
+
`init` detects your layout (see [Layouts](#layouts)), asks a few questions
|
|
114
|
+
(project name, mode, language, editor), and shows a plan. After you confirm, it
|
|
115
|
+
creates the haren folder plus the editor config your agent reads on every
|
|
116
|
+
session. Then open the project (the workspace root) in your editor and run
|
|
117
|
+
`/haren-onboard`, or say:
|
|
69
118
|
|
|
70
119
|
> **"what's next?"**
|
|
71
120
|
|
|
72
|
-
The agent reads `
|
|
121
|
+
The agent reads `skill.md` in the haren folder, orients itself from `manifest.yaml` and
|
|
73
122
|
`progress.json`, and guides you into the right phase.
|
|
74
123
|
|
|
75
124
|
---
|
|
76
125
|
|
|
126
|
+
## Layouts
|
|
127
|
+
|
|
128
|
+
haren supports two project layouts. `haren init` detects which one you have.
|
|
129
|
+
|
|
130
|
+
**Monorepo** — one git repo. The haren folder lives inside it.
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
my-app/ (.git)
|
|
134
|
+
├── backend/
|
|
135
|
+
├── frontend/
|
|
136
|
+
├── haren/
|
|
137
|
+
├── CLAUDE.md # generated, committed with the repo
|
|
138
|
+
└── .claude/
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
**Multi-repo workspace** — a plain folder (no `.git`) with several git repos.
|
|
142
|
+
haren is its own repo next to the code repos.
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
workspace/ (no .git)
|
|
146
|
+
├── backend/ (.git)
|
|
147
|
+
├── frontend/ (.git)
|
|
148
|
+
├── cmis_ai_rules/ (.git — the haren repo, any folder name)
|
|
149
|
+
├── CLAUDE.md # generated per machine, not versioned
|
|
150
|
+
└── .claude/ # generated per machine, not versioned
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The haren folder can have any name. haren finds it by the top-level `haren:`
|
|
154
|
+
marker in its `manifest.yaml`, not by its name. Open your editor at the
|
|
155
|
+
**workspace root** (the folder that holds all the repos), so one session sees
|
|
156
|
+
every repo.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
77
160
|
## Commands
|
|
78
161
|
|
|
79
162
|
| Command | What it does |
|
|
80
163
|
|---------|--------------|
|
|
81
|
-
| `haren init` |
|
|
82
|
-
| `haren upgrade` | Update framework files
|
|
164
|
+
| `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). |
|
|
165
|
+
| `haren upgrade` | Update framework files in an existing haren folder to the installed version, and migrate old `manifest.yaml` / `progress.json`. |
|
|
83
166
|
| `haren agent` | Manage the local agent bridge *(experimental — for the in-progress Haren Portal)*. |
|
|
84
167
|
|
|
168
|
+
`haren agent` works in both layouts. It uses the git remote of the haren repo as
|
|
169
|
+
the Portal project key.
|
|
170
|
+
|
|
85
171
|
Run `haren` with no arguments for help.
|
|
86
172
|
|
|
87
173
|
### `init` flags (skip the prompts)
|
|
@@ -96,7 +182,74 @@ haren init \
|
|
|
96
182
|
--duration "2 weeks" --start-date 2026-06-08 --demo-day Friday
|
|
97
183
|
```
|
|
98
184
|
|
|
99
|
-
|
|
185
|
+
Layout and folder flags:
|
|
186
|
+
|
|
187
|
+
| Flag | Effect |
|
|
188
|
+
|------|--------|
|
|
189
|
+
| `--dir <path>` | Run in this directory instead of the current one. |
|
|
190
|
+
| `--layout monorepo\|workspace` | Skip layout detection. |
|
|
191
|
+
| `--haren-dir <name>` | Name of the new haren folder (default `haren`). |
|
|
192
|
+
| `--yes` | Accept the defaults and skip the confirm prompt. Required when there is no terminal. |
|
|
193
|
+
| `--dry-run` | Print the plan and exit. Nothing is written. |
|
|
194
|
+
| `--force` | Re-scaffold an existing haren folder. It keeps the folder name, the layout, and the repos in `manifest.yaml`. |
|
|
195
|
+
|
|
196
|
+
### The plan preview
|
|
197
|
+
|
|
198
|
+
`init` writes nothing until you confirm. It prints a plan first:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Plan:
|
|
202
|
+
/path/to/workspace/
|
|
203
|
+
├── cmis_ai_rules/ + create (git init, own repo)
|
|
204
|
+
│ ├── manifest.yaml + create layout: workspace
|
|
205
|
+
│ ├── artifacts/ + create
|
|
206
|
+
│ └── hooks/ + create
|
|
207
|
+
├── CLAUDE.md + create (generated, not versioned)
|
|
208
|
+
├── backend/ = keep
|
|
209
|
+
└── frontend/ = keep
|
|
210
|
+
|
|
211
|
+
? Apply this plan? (Y)es / (n)o / (e)dit selection
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Markers: `+` create, `~` modify, `=` keep, `↓` clone, `!` warning (for example a
|
|
215
|
+
folder that is not a git repo, or a repo with no remote to clone).
|
|
216
|
+
|
|
217
|
+
In a workspace, `init` runs `git init` in the new haren folder. It makes no
|
|
218
|
+
commit. The root files (`CLAUDE.md`, `.cursorrules`, `.claude/`, `.cursor/`) are
|
|
219
|
+
generated per machine and are not versioned. If you already have content in
|
|
220
|
+
`CLAUDE.md` or `.cursorrules`, haren keeps it. haren writes only between
|
|
221
|
+
`<!-- haren:begin -->` and `<!-- haren:end -->`.
|
|
222
|
+
|
|
223
|
+
### Set up a teammate
|
|
224
|
+
|
|
225
|
+
The haren repo is the source of truth. A teammate does not run a full init.
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
git clone <haren-repo-url> workspace/cmis_ai_rules
|
|
229
|
+
cd workspace/cmis_ai_rules
|
|
230
|
+
haren init
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
`init` finds the manifest, clones each missing repo from its `remote`, and
|
|
234
|
+
generates the root files in the parent folder. Then open the workspace root in
|
|
235
|
+
the editor and run `/haren-onboard`. If a clone fails, `init` continues with the
|
|
236
|
+
other repos, then exits with code 1. Run `haren init` again to retry only the
|
|
237
|
+
missing repos. If all is in place, `init` prints "Already set up".
|
|
238
|
+
|
|
239
|
+
### `/haren-onboard`
|
|
240
|
+
|
|
241
|
+
A skill for a new developer or a new workspace. It does three things:
|
|
242
|
+
|
|
243
|
+
1. **Analyze repos.** It reads the build files of each repo and proposes `stack`,
|
|
244
|
+
`test_cmd`, `default_branch`, and `role`. It writes them to `manifest.yaml`
|
|
245
|
+
only after you approve.
|
|
246
|
+
2. **Health check.** It reports repos that are missing, not git repos, dirty, or
|
|
247
|
+
on a branch other than `default_branch`.
|
|
248
|
+
3. **Briefing.** It summarizes the current phase, the active modules, and the
|
|
249
|
+
next step.
|
|
250
|
+
|
|
251
|
+
It never clones and never changes git state. To clone a missing repo, run
|
|
252
|
+
`haren init`.
|
|
100
253
|
|
|
101
254
|
---
|
|
102
255
|
|
|
@@ -121,9 +274,9 @@ Each module progresses through phases **in order** — you can't skip ahead:
|
|
|
121
274
|
discovered → specified → planned → implementing → evaluating → completed
|
|
122
275
|
```
|
|
123
276
|
|
|
124
|
-
A `brainstorm-gate` hook blocks `Edit`/`Write` on any file **outside
|
|
277
|
+
A `brainstorm-gate` hook blocks `Edit`/`Write` on any file **outside the haren folder**
|
|
125
278
|
until at least one module reaches `planned`. Discovery docs and specs are not
|
|
126
|
-
enough — planning must be done first. (Writes *inside*
|
|
279
|
+
enough — planning must be done first. (Writes *inside* the haren folder are always
|
|
127
280
|
allowed so the planning phases can produce their artifacts.)
|
|
128
281
|
|
|
129
282
|
### Agents
|
|
@@ -141,11 +294,11 @@ Skills are the procedures the agent follows — `discover` (brainstorming),
|
|
|
141
294
|
(`create-artifact`, `validate-artifact`, `search-artifact`, `update-tracking`,
|
|
142
295
|
and more).
|
|
143
296
|
|
|
144
|
-
### The
|
|
297
|
+
### The haren folder
|
|
145
298
|
|
|
146
299
|
```
|
|
147
|
-
haren/
|
|
148
|
-
├── manifest.yaml # project config (mode, language,
|
|
300
|
+
haren/ # any folder name works
|
|
301
|
+
├── manifest.yaml # project config (layout, repos, mode, language, sources)
|
|
149
302
|
├── progress.json # auto-managed state — phases & module status
|
|
150
303
|
├── skill.md # the LLM's operating manual (read every session)
|
|
151
304
|
├── FEEDBACK.md # append-only log of framework friction
|
|
@@ -159,6 +312,51 @@ haren/
|
|
|
159
312
|
├── 04-plans/ ├── 05-implementation/ └── 06-evaluation/
|
|
160
313
|
```
|
|
161
314
|
|
|
315
|
+
### manifest.yaml
|
|
316
|
+
|
|
317
|
+
```yaml
|
|
318
|
+
haren:
|
|
319
|
+
version: 1.2.0 # the marker; haren finds the folder by this key
|
|
320
|
+
layout: workspace # monorepo | workspace
|
|
321
|
+
project: shop
|
|
322
|
+
mode: blueprint
|
|
323
|
+
language: English
|
|
324
|
+
|
|
325
|
+
repos:
|
|
326
|
+
backend:
|
|
327
|
+
path: ../backend # relative to the haren folder
|
|
328
|
+
remote: git@github.com:acme/shop-backend.git
|
|
329
|
+
default_branch: main
|
|
330
|
+
role: backend # frontend | backend | e2e | other
|
|
331
|
+
stack: node-express # role, stack, test_cmd, default_branch: set by /haren-onboard
|
|
332
|
+
test_cmd: bun test
|
|
333
|
+
frontend:
|
|
334
|
+
path: ../frontend
|
|
335
|
+
remote: git@github.com:acme/shop-frontend.git
|
|
336
|
+
default_branch: main
|
|
337
|
+
role: frontend
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
In a monorepo, `remote` is empty and each `path` points inside the same repo.
|
|
341
|
+
|
|
342
|
+
### Git conventions
|
|
343
|
+
|
|
344
|
+
When a module touches code, haren follows these rules:
|
|
345
|
+
|
|
346
|
+
- A module uses the branch `feat/<module-slug>` in **every repo it touches**.
|
|
347
|
+
- Code is committed in each code repo. haren files (artifacts, session log,
|
|
348
|
+
`progress.json`) are committed in the haren repo. In a monorepo, that is a
|
|
349
|
+
second commit on the same branch.
|
|
350
|
+
- `progress.json` records `branch`, `repos`, and a `lastCommit` per repo key.
|
|
351
|
+
- haren never pushes and never opens a pull request unless you ask.
|
|
352
|
+
|
|
353
|
+
### E2E tests
|
|
354
|
+
|
|
355
|
+
The `qa-engineer` agent writes Playwright tests in the UI repo, which is the
|
|
356
|
+
`repos` entry with `role: frontend`. In a workspace, the tests live in
|
|
357
|
+
`<frontend repo>/e2e/<module>/`. In a monorepo, they live in `e2e/` at the repo
|
|
358
|
+
root.
|
|
359
|
+
|
|
162
360
|
### Editor integration
|
|
163
361
|
|
|
164
362
|
`init` wires up whichever editor(s) you choose:
|
|
@@ -168,19 +366,30 @@ haren/
|
|
|
168
366
|
- **Cursor** → `.cursorrules` + `.cursor/rules/haren.mdc` + `.cursor/hooks.json`
|
|
169
367
|
(registers the gate via `beforeFileEdit`/`preToolUse`).
|
|
170
368
|
|
|
171
|
-
|
|
369
|
+
These files go in the workspace root (the parent of the haren folder). Existing
|
|
370
|
+
config files are kept: haren writes only inside its marked block.
|
|
172
371
|
|
|
173
372
|
---
|
|
174
373
|
|
|
175
374
|
## Upgrading
|
|
176
375
|
|
|
177
376
|
```bash
|
|
178
|
-
cd your-project
|
|
377
|
+
cd your-workspace # or the project root, or the haren folder itself
|
|
179
378
|
haren upgrade
|
|
180
379
|
```
|
|
181
380
|
|
|
182
|
-
This refreshes the agents, skills, and
|
|
183
|
-
installed CLI version, leaving your artifacts
|
|
381
|
+
This refreshes the agents, skills, templates, and the gate hook in the haren
|
|
382
|
+
folder to match the installed CLI version, leaving your artifacts untouched. It
|
|
383
|
+
also migrates an older project:
|
|
384
|
+
|
|
385
|
+
- `manifest.yaml` gets the `haren:` marker and `layout`. A `repos` list becomes
|
|
386
|
+
a map with `remote` values.
|
|
387
|
+
- `progress.json` moves to version 2: `lastCommit` becomes one commit per repo.
|
|
388
|
+
- The root files (`CLAUDE.md`, `.claude/`, `.cursor/`, and so on) are
|
|
389
|
+
regenerated.
|
|
390
|
+
|
|
391
|
+
Run `haren upgrade --dry-run` to see every step without writing anything. The
|
|
392
|
+
upgrade needs Bun ≥ 1.2.21.
|
|
184
393
|
|
|
185
394
|
---
|
|
186
395
|
|
|
@@ -21,7 +21,7 @@ You are a developer within the Haren framework. Your job is to implement planned
|
|
|
21
21
|
|
|
22
22
|
- Write production code and tests in target repos
|
|
23
23
|
- Follow TDD discipline (test first, implement, verify)
|
|
24
|
-
- Make incremental commits
|
|
24
|
+
- Make incremental commits in each target repo, on the module branch `feat/{module-slug}`
|
|
25
25
|
- Maintain session logs for cross-session continuity
|
|
26
26
|
|
|
27
27
|
## Inputs
|
|
@@ -29,9 +29,9 @@ You are a developer within the Haren framework. Your job is to implement planned
|
|
|
29
29
|
- Tasks and design from the **active plan path** (see skill.md Plan Paths convention)
|
|
30
30
|
- `artifacts/03-modules/{module}/spec.md` — BA-owned spec for requirements context
|
|
31
31
|
- `artifacts/04-plans/{module}/design.md` — master design for broader context
|
|
32
|
-
- `
|
|
32
|
+
- `manifest.yaml` — project config: `layout`, `repos`, and the `iterations` block
|
|
33
33
|
- `progress.json` — current feature status
|
|
34
|
-
- Target repo(s)
|
|
34
|
+
- Target repo(s): the `repos:` keys in the module's `module.md`, resolved as in skill.md "Repos and Git"
|
|
35
35
|
|
|
36
36
|
## Outputs
|
|
37
37
|
|
|
@@ -52,11 +52,14 @@ At the beginning of each session, present the pending features and ask:
|
|
|
52
52
|
3. Implement ONE feature at a time — do not batch
|
|
53
53
|
4. Follow TDD: write failing test → implement → verify → commit
|
|
54
54
|
5. Delegate to superpowers:subagent-driven-development for execution
|
|
55
|
-
6.
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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.
|
|
56
|
+
7. After each feature:
|
|
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
|
|
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
|
|
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
|
|
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
|
+
11. At session end, ask: "Should I continue with the next feature, or pause here?"
|
|
@@ -28,17 +28,29 @@ You are a QA automation engineer within the Haren framework. Your job is to conv
|
|
|
28
28
|
## Inputs
|
|
29
29
|
|
|
30
30
|
- Excel test report file (.xlsx)
|
|
31
|
-
- Frontend source code (for selector discovery)
|
|
31
|
+
- Frontend source code in `$FRONTEND` (for selector discovery)
|
|
32
32
|
- Backend API routes (for understanding business logic)
|
|
33
33
|
- Playwright config and existing test infrastructure
|
|
34
34
|
|
|
35
35
|
## Outputs
|
|
36
36
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
37
|
+
- `$E2E/<module-slug>/manifests/<name>.manifest.json` — structured test case manifest
|
|
38
|
+
- `$E2E/<module-slug>/tests/<function>.spec.ts` — Playwright test scripts
|
|
39
|
+
- `$E2E/<module-slug>/helpers/` — shared auth, navigation, page object helpers
|
|
40
|
+
- `$E2E/<module-slug>/reconciliation/selector-audit.json` — selector verification report
|
|
41
|
+
- `$E2E/<module-slug>/reconciliation/reconciliation.json` — coverage reconciliation report
|
|
42
|
+
|
|
43
|
+
## Paths
|
|
44
|
+
|
|
45
|
+
Run every command from the workspace root (the folder that holds the haren folder). Before Phase 1, resolve these paths from the haren folder's `manifest.yaml` (see skill.md "Repos and Git"):
|
|
46
|
+
|
|
47
|
+
- `$FRONTEND` — the UI repo folder: the `repos` entry with `role: frontend`. If more than one repo has this role, use the one listed in the module's `module.md`. If no repo has the role, ask the user which folder holds the UI. After the user agrees, set `role: frontend` on that repo in `manifest.yaml`, and add a `repos` entry for it if none exists.
|
|
48
|
+
- `$E2E` — the folder for the tests:
|
|
49
|
+
- `layout: workspace` → `$FRONTEND/e2e`, so the tests are versioned with the UI repo
|
|
50
|
+
- `layout: monorepo` → `e2e` at the repo root
|
|
51
|
+
- `$SKILL_DIR` — `.cursor/skills/excel-tc-to-e2e` (Cursor) or `.claude/skills/excel-tc-to-e2e` (Claude Code), relative to the workspace root.
|
|
52
|
+
|
|
53
|
+
Use these variables in every path below. Never write tests outside `$E2E`. Run every command from the workspace root, except Playwright itself: run it from the folder that holds `playwright.config.*` (usually `$FRONTEND`).
|
|
42
54
|
|
|
43
55
|
## The Pipeline
|
|
44
56
|
|
|
@@ -49,12 +61,12 @@ You MUST execute these phases in order. Do not skip or combine phases.
|
|
|
49
61
|
Run the Python extraction script. NEVER fabricate manifest data.
|
|
50
62
|
|
|
51
63
|
```bash
|
|
52
|
-
python3 $SKILL_DIR/scripts/extract_test_cases.py "<excel_path>" --output "
|
|
64
|
+
python3 $SKILL_DIR/scripts/extract_test_cases.py "<excel_path>" --output "$E2E/<module-slug>/manifests/<slugified-name>.manifest.json"
|
|
53
65
|
```
|
|
54
66
|
|
|
55
67
|
Derive `<module-slug>` from the Excel filename or user instruction (e.g., `update-shoryuid`, `share-all`). Create the module directory structure:
|
|
56
68
|
```bash
|
|
57
|
-
mkdir -p
|
|
69
|
+
mkdir -p $E2E/<module-slug>/{manifests,tests,fixtures,helpers,reconciliation}
|
|
58
70
|
```
|
|
59
71
|
|
|
60
72
|
Read the manifest and confirm: total TCs, functions detected, priority breakdown.
|
|
@@ -65,8 +77,8 @@ This is the most critical phase. You MUST build a selector inventory from the ac
|
|
|
65
77
|
|
|
66
78
|
**Step 2a — Search for existing test attributes:**
|
|
67
79
|
```bash
|
|
68
|
-
grep -rn 'data-testid'
|
|
69
|
-
grep -rn 'aria-label'
|
|
80
|
+
grep -rn 'data-testid' $FRONTEND/src/ --include='*.tsx' --include='*.jsx' | head -100
|
|
81
|
+
grep -rn 'aria-label' $FRONTEND/src/ --include='*.tsx' --include='*.jsx' | head -50
|
|
70
82
|
```
|
|
71
83
|
|
|
72
84
|
**Step 2b — Read the page components** for every Function in the manifest:
|
|
@@ -99,7 +111,7 @@ Present this map to confirm you found real selectors before proceeding.
|
|
|
99
111
|
|
|
100
112
|
### Phase 3: Generate
|
|
101
113
|
|
|
102
|
-
Read the full skill at
|
|
114
|
+
Read the full skill at `$SKILL_DIR/SKILL.md` and follow Phase 2 generation rules. Key rules:
|
|
103
115
|
|
|
104
116
|
1. One `.spec.ts` per Function group
|
|
105
117
|
2. Every TC in manifest appears in exactly one file
|
|
@@ -142,7 +154,7 @@ ALWAYS use sub-agents for Phase 3 generation. Partition by Function group from t
|
|
|
142
154
|
- Its slice of manifest TCs (tc_ids, descriptions, expected_outputs)
|
|
143
155
|
- The selector map from Phase 2
|
|
144
156
|
- The codebase context: auth flow, route structure, existing helpers, component selectors
|
|
145
|
-
- The output file path (
|
|
157
|
+
- The output file path (`$E2E/<module-slug>/tests/<function>.spec.ts`)
|
|
146
158
|
- All generation rules (selector rules, NOT_AUTOMATABLE rules, annotation format)
|
|
147
159
|
|
|
148
160
|
**Sub-agent prompt template:**
|
|
@@ -152,8 +164,8 @@ You are generating Playwright E2E tests. Write <file-path> covering these TCs: <
|
|
|
152
164
|
Selector map (use ONLY these — do not invent selectors):
|
|
153
165
|
<selector-map>
|
|
154
166
|
|
|
155
|
-
Auth: use loginAs(page, "<role>") from
|
|
156
|
-
Navigation: use <helper> from
|
|
167
|
+
Auth: use loginAs(page, "<role>") from $E2E/<module-slug>/helpers/auth.ts
|
|
168
|
+
Navigation: use <helper> from $E2E/<module-slug>/helpers/navigation.ts
|
|
157
169
|
|
|
158
170
|
Rules:
|
|
159
171
|
- Every Expected Output MUST become expect() assertions
|
|
@@ -171,7 +183,7 @@ Rules:
|
|
|
171
183
|
Run the audit script against what you just generated:
|
|
172
184
|
|
|
173
185
|
```bash
|
|
174
|
-
python3 $SKILL_DIR/scripts/audit_selectors.py --test-dir
|
|
186
|
+
python3 $SKILL_DIR/scripts/audit_selectors.py --test-dir $E2E/<module-slug>/tests --source-dir $FRONTEND/src --output $E2E/<module-slug>/reconciliation/selector-audit.json
|
|
175
187
|
```
|
|
176
188
|
|
|
177
189
|
**If fabricated selectors are found (status: FAIL), you MUST fix them:**
|
|
@@ -192,7 +204,7 @@ After fixing, re-run the audit. Repeat until:
|
|
|
192
204
|
Run the assertion depth audit to catch tests with weak or missing assertions:
|
|
193
205
|
|
|
194
206
|
```bash
|
|
195
|
-
python3 $SKILL_DIR/scripts/audit_assertions.py --test-dir
|
|
207
|
+
python3 $SKILL_DIR/scripts/audit_assertions.py --test-dir $E2E/<module-slug>/tests --output $E2E/<module-slug>/reconciliation/assertion-audit.json
|
|
196
208
|
```
|
|
197
209
|
|
|
198
210
|
The script flags three severity levels:
|
|
@@ -247,7 +259,7 @@ Use Playwright MCP (if available) or write a temporary capture script. For each
|
|
|
247
259
|
3. Take a full-page screenshot
|
|
248
260
|
4. If the page has forms/dialogs that need to be opened (e.g., "Create New" modal), click to open them and screenshot that state too
|
|
249
261
|
|
|
250
|
-
Save screenshots to
|
|
262
|
+
Save screenshots to `$E2E/<module-slug>/reconciliation/screenshots/` for reference.
|
|
251
263
|
|
|
252
264
|
**Step 5c — Read screenshots and resolve selectors:**
|
|
253
265
|
|
|
@@ -278,7 +290,7 @@ Some VERIFY_SELECTORs are really flow unknowns, not selector unknowns. Group the
|
|
|
278
290
|
|
|
279
291
|
After resolving, re-run the selector audit to confirm:
|
|
280
292
|
```bash
|
|
281
|
-
python3 $SKILL_DIR/scripts/audit_selectors.py --test-dir
|
|
293
|
+
python3 $SKILL_DIR/scripts/audit_selectors.py --test-dir $E2E/<module-slug>/tests --source-dir $FRONTEND/src
|
|
282
294
|
```
|
|
283
295
|
|
|
284
296
|
The goal is to minimize VERIFY_SELECTOR count — ideally to zero, but any remaining ones should have clear, specific reasoning.
|
|
@@ -288,7 +300,7 @@ The goal is to minimize VERIFY_SELECTOR count — ideally to zero, but any remai
|
|
|
288
300
|
Run the reconciliation script:
|
|
289
301
|
|
|
290
302
|
```bash
|
|
291
|
-
python3 $SKILL_DIR/scripts/reconcile.py --manifest "
|
|
303
|
+
python3 $SKILL_DIR/scripts/reconcile.py --manifest "$E2E/<module-slug>/manifests/<name>.manifest.json" --test-dir $E2E/<module-slug>/tests --output $E2E/<module-slug>/reconciliation/reconciliation.json
|
|
292
304
|
```
|
|
293
305
|
|
|
294
306
|
The pipeline is complete ONLY when ALL of these pass:
|
|
@@ -331,7 +343,7 @@ Result: PASS / FAIL
|
|
|
331
343
|
3. ALWAYS run the audit script AFTER generating and fix failures
|
|
332
344
|
4. NEVER skip Phase 4 (audit) or Phase 6 (reconcile)
|
|
333
345
|
5. If the audit keeps failing after 3 fix iterations, stop and surface to user
|
|
334
|
-
6. `$
|
|
346
|
+
6. Resolve `$FRONTEND`, `$E2E` and `$SKILL_DIR` as described in "Paths" before Phase 1
|
|
335
347
|
7. Read the full skill SKILL.md at the start — this agent doc is the enforcement layer, the skill has the detailed rules
|
|
336
348
|
8. ALWAYS ask user permission before capturing screenshots — never access the running app without consent
|
|
337
349
|
9. NEVER store credentials in files — use them only in-memory for the Playwright session
|
|
@@ -12,7 +12,7 @@ delegates:
|
|
|
12
12
|
|
|
13
13
|
# Ideate
|
|
14
14
|
|
|
15
|
-
> **Trigger:** When the user presents a raw idea, concept, or "I want to build X" statement — read and follow this skill. Also read the agent definition at `
|
|
15
|
+
> **Trigger:** When the user presents a raw idea, concept, or "I want to build X" statement — read and follow this skill. Also read the agent definition at `agents/ideator.md` in the haren folder.
|
|
16
16
|
|
|
17
17
|
Take a raw idea at any maturity level and transform it into a validated, research-backed concept brief. The concept brief becomes a baseline document for the Discover phase (blueprint mode).
|
|
18
18
|
|
|
@@ -18,8 +18,14 @@ Execute the implementation plan for a module, one feature at a time.
|
|
|
18
18
|
2. Read tasks from the **active plan path** (see skill.md Plan Paths convention)
|
|
19
19
|
3. Read `progress.json` to find current feature status
|
|
20
20
|
4. Read `artifacts/05-implementation/{module}/task-{N}-{slug}.md` if it exists for the target feature (previous session context)
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
5. If iterations enabled, also read the **master plan path** for broader module context if needed
|
|
22
|
+
6. Pick the highest-priority feature in "pending" status
|
|
23
|
+
7. Set up the module branch. Follow skill.md "Repos and Git":
|
|
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
|
+
- 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
|
+
- 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
|
|
23
29
|
|
|
24
30
|
## Implementation Loop
|
|
25
31
|
|
|
@@ -31,10 +37,13 @@ For each feature:
|
|
|
31
37
|
- Pass the design context from design.md
|
|
32
38
|
- Ensure TDD discipline via superpowers:test-driven-development
|
|
33
39
|
3. After implementation:
|
|
34
|
-
- Commit code in the
|
|
40
|
+
- (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
|
|
35
42
|
- Update feature status to "evaluating" via update-tracking skill
|
|
36
|
-
- Append to task session log (`task-{N}-{slug}.md`): what was done, decisions made, any deviations from plan
|
|
43
|
+
- 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
|
|
37
44
|
- Emit "feature-ready" event to events/events.jsonl
|
|
45
|
+
- (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
|
+
- Never push
|
|
38
47
|
|
|
39
48
|
## Session Log
|
|
40
49
|
|
|
@@ -52,7 +61,7 @@ If iterations are enabled (check manifest.yaml for `iterations` block), include
|
|
|
52
61
|
### Working on: {feature-name}
|
|
53
62
|
- Key decisions made and why
|
|
54
63
|
- Files created/modified
|
|
55
|
-
- Commit
|
|
64
|
+
- Commit SHA per repo (for example backend@abc1234)
|
|
56
65
|
- Any deviations from the plan
|
|
57
66
|
|
|
58
67
|
### Next up
|
|
@@ -65,4 +74,5 @@ If iterations are enabled (check manifest.yaml for `iterations` block), include
|
|
|
65
74
|
- Always write tests before implementation (TDD)
|
|
66
75
|
- If blocked, set feature to "blocked" and surface to user — don't guess
|
|
67
76
|
- If you need to deviate from the plan, document why in the session log
|
|
68
|
-
- Never modify haren
|
|
77
|
+
- Never modify files in the haren folder except `progress.json`, session logs and `events/events.jsonl`
|
|
78
|
+
- Never push. Never create pull requests unless the user asks
|