@lemoncode/lemony 0.2.0 → 0.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 +19 -14
- package/catalog/VERSION +1 -1
- package/catalog/agents/architect.md +3 -1
- package/catalog/agents/implementer.md +43 -5
- package/catalog/agents/orchestrator.md +527 -60
- package/catalog/agents/partition.md +316 -0
- package/catalog/agents/reviewer.md +279 -67
- package/catalog/agents/spec-author.md +12 -3
- package/catalog/agents/triage.md +8 -5
- package/catalog/commands/add-capability.md +4 -4
- package/catalog/commands/define.md +7 -0
- package/catalog/commands/hotfix.md +15 -1
- package/catalog/commands/pause.md +5 -0
- package/catalog/commands/resume.md +38 -9
- package/catalog/commands/triage.md +2 -1
- package/catalog/harness.config.schema.json +40 -0
- package/catalog/hooks/init.sh +10 -3
- package/catalog/hooks/lib/merge-pr.sh +699 -0
- package/catalog/skills/mutation-testing/SKILL.md +78 -21
- package/catalog/skills/prd-to-spec/SKILL.md +48 -2
- package/catalog/skills/raise-discovery/SKILL.md +6 -0
- package/catalog/skills/resolve-discovery/SKILL.md +6 -5
- package/catalog/skills/security-review/SKILL.md +119 -6
- package/catalog/skills/spec-to-issue/SKILL.md +7 -1
- package/catalog/skills/task-closeout/SKILL.md +82 -18
- package/catalog/skills/triage-issue/SKILL.md +65 -4
- package/catalog/templates/claude-code/agents.md.tpl +42 -12
- package/catalog/templates/claude-code/harness.config.yml.tpl +37 -0
- package/dist/cli.mjs +748 -36
- package/package.json +10 -6
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@ to semver.
|
|
|
22
22
|
|
|
23
23
|
- **Node.js ≥ 24** and **npm ≥ 11** (`node --version`).
|
|
24
24
|
- **[Claude Code](https://claude.com/claude-code)** installed in the target repo.
|
|
25
|
+
- **[GitHub CLI](https://cli.github.com) ≥ 2.50**, authenticated (`gh auth login`) — the merge executor reads check status via `gh pr checks --json`, added in 2.50. An older gh fails closed (the gated path never merges) with gh's own `unknown flag` message.
|
|
25
26
|
|
|
26
27
|
## Install
|
|
27
28
|
|
|
@@ -127,20 +128,24 @@ directly; the Orchestrator and sub-agents do, gated by your repo's capabilities.
|
|
|
127
128
|
|
|
128
129
|
## Commands
|
|
129
130
|
|
|
130
|
-
The CLI ships
|
|
131
|
-
`lemony version` (or `-v`) prints the installed version.
|
|
132
|
-
|
|
133
|
-
| Command
|
|
134
|
-
|
|
|
135
|
-
| `install`
|
|
136
|
-
| `update`
|
|
137
|
-
| `repair`
|
|
138
|
-
| `rollback`
|
|
139
|
-
| `uninstall`
|
|
140
|
-
| `doctor`
|
|
141
|
-
| `status`
|
|
142
|
-
| `emit`
|
|
143
|
-
| `
|
|
131
|
+
The CLI ships 13 verbs. Run `lemony <command> --help` (or `-h`) for usage;
|
|
132
|
+
`lemony version` (or `--version` / `-v`) prints the installed version.
|
|
133
|
+
|
|
134
|
+
| Command | What it does | Key flags |
|
|
135
|
+
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
|
|
136
|
+
| `install` | Install into a fresh repo, or reconcile a pre-existing `.claude/`. | `--target=<claude-code>` `--task-storage-repo=<owner/name>` `--on-conflict=<vendor\|client>` |
|
|
137
|
+
| `update` | Move the install to the CLI's catalog version (3-way merge). | `--on-conflict=<vendor\|client>` `--dry-run` |
|
|
138
|
+
| `repair` | Re-sync at the **pinned** version (restore missing files, never clobber edits). | `--dry-run` |
|
|
139
|
+
| `rollback` | Restore a pre-change snapshot (offline). | `--to=<version>` `--list` `--cleanup` `--force` |
|
|
140
|
+
| `uninstall` | Remove vendor-managed files (keeps your docs, state, adopted skills). | `--labels` |
|
|
141
|
+
| `doctor` | Diagnose the installation (read-only); proposes `repair`. | — |
|
|
142
|
+
| `status` | Show installed version, branch drift, and open tasks. | — |
|
|
143
|
+
| `emit` | Append a telemetry event to `.claude/state/events.jsonl`. | `<type> [--key=value …]` |
|
|
144
|
+
| `discovery` | Reflect a raised/resolved discovery onto its issue (label flip; `pause` also comments). | `<pause\|resume>` `--task-id=<id>` `--tier=<T1..T6>` `--status=<…>` `--note=<text>` |
|
|
145
|
+
| `design-tokens` | Validate the design-token file, check WCAG contrast, or sync with a design tool (consume-if-exists). | `<validate\|contrast\|import\|export>` `--scan=<dir>` `--from=<file>` `--apply` `--only=<paths>` |
|
|
146
|
+
| `review-ledger` | Validate the Reviewer's evidence-ledger sidecar against the spec, the anchored diff and the declared gates (deterministic, agent-free). | `validate` `--task-id=<id>` `--anchor=<oid>` `--step=<N>` `--full-pass` |
|
|
147
|
+
| `spinoff` | Capture a non-blocking defect found mid-task as a pending stub. | `--title=<text>` `--body=<text>` `--parent=<id>` `--severity=<…>` `--kind=<…>` |
|
|
148
|
+
| `telemetry` | Inspect or control the local anonymous telemetry. | `status` `show` `flush` `enable` `disable [--purge-local]` |
|
|
144
149
|
|
|
145
150
|
The harness keeps a **committed baseline** under `.claude/.harness/baseline/<version>/` — a
|
|
146
151
|
verbatim copy of every installed vendor file at the pinned version — so `update` is a true
|
package/catalog/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.4.0
|
|
@@ -51,7 +51,9 @@ acceptance for `write-adr` / `playbook-iterate`. See the Orchestrator's §Closeo
|
|
|
51
51
|
its resolution from `discoveries.md` (when routed before the `**Resolution**`
|
|
52
52
|
block is recorded, the decision arrives in the spawn prompt instead — don't
|
|
53
53
|
stall looking for it in the entry); the changed code from the PR diff when a PR
|
|
54
|
-
exists (closeout) or from the branch when none does (mid-task routes
|
|
54
|
+
exists (closeout) or from the branch when none does (mid-task routes — under
|
|
55
|
+
auto-commit OFF read the **worktree**: mid-task the branch holds only
|
|
56
|
+
OK'd groups, or nothing before the first OK); or the
|
|
55
57
|
request. If the codebase is unfamiliar and the
|
|
56
58
|
task needs it, run `code-explorer` first.
|
|
57
59
|
2. **Do the one thing you were invoked for**, via its skill. Keep edits surgical and
|
|
@@ -51,14 +51,17 @@ what you run, only how many calls carry it.
|
|
|
51
51
|
work on the task branch `harness/<id>-<slug>` the Orchestrator created; the spec is
|
|
52
52
|
already committed there.
|
|
53
53
|
2. **Implement via TDD** — run the `tdd` skill: one red → green → refactor cycle per
|
|
54
|
-
behavior (vertical slices, never all-tests-then-all-code).
|
|
54
|
+
behavior (vertical slices, never all-tests-then-all-code). When your invocation
|
|
55
|
+
says **auto-commit is OFF**, the whole run obeys §Staging protocol (below) —
|
|
56
|
+
zero commits, staged save-points.
|
|
55
57
|
**Scope: exactly what the invocation hands you.** By default that is the whole
|
|
56
58
|
`tasks.md` list (all-at-once). In **step-by-step mode** the Orchestrator
|
|
57
59
|
invokes you per step — scoped to **one group**, handed **by reference** (the
|
|
58
60
|
group's id + header line): read that group's tasks from the spec's `tasks.md`
|
|
59
61
|
yourself. On a later iteration the reference comes with reviewer or
|
|
60
62
|
human-checkpoint feedback. Work the group's tasks
|
|
61
|
-
in order — one TDD cycle and small commits per task, as always
|
|
63
|
+
in order — one TDD cycle and small commits per task, as always (auto-commit
|
|
64
|
+
OFF: staged save-points per task — §Staging protocol) — then stop: do
|
|
62
65
|
**not** run ahead into the next group (the human checkpoints each group before the
|
|
63
66
|
next starts), and don't re-open tasks the human already OK'd unless the feedback
|
|
64
67
|
you were handed says so.
|
|
@@ -78,7 +81,9 @@ what you run, only how many calls carry it.
|
|
|
78
81
|
`tasks/<id>/discoveries.md`, return the one-line summary, and stop. The Orchestrator
|
|
79
82
|
mediates with the human and re-invokes you with the decision. Don't code past a
|
|
80
83
|
contradiction (T1), a genuine unspecified fork (T2), scope drift (T3), or work that
|
|
81
|
-
already exists (T4).
|
|
84
|
+
already exists (T4). A scope that turns out to hide **≥2 independently mergeable
|
|
85
|
+
units** the plan didn't reveal is a T2 too (partition or keep together is the human's
|
|
86
|
+
call — never cut it yourself). If instead you notice a defect that is **independent** of your
|
|
82
87
|
task — it doesn't block you and your change never touches it — don't pause and don't
|
|
83
88
|
fix it: **run `note-side-finding`** to add it to your return summary, then carry on
|
|
84
89
|
(blocking → discovery; independent → side-finding). The same channel covers
|
|
@@ -93,19 +98,52 @@ what you run, only how many calls carry it.
|
|
|
93
98
|
lint / tests + coverage / audit + a real run); otherwise run those gates inline.
|
|
94
99
|
Commit your work to the branch and **push it, best-effort** — a failed push (offline,
|
|
95
100
|
auth) is a warning in your summary, never a blocker; the commits stay safe locally,
|
|
96
|
-
then return a summary to the Orchestrator.
|
|
101
|
+
then return a summary to the Orchestrator. (Auto-commit OFF: no commit and
|
|
102
|
+
no push — leave **everything staged** and say so in the summary; the Orchestrator
|
|
103
|
+
commits at the human's OK.) The Orchestrator opens
|
|
97
104
|
the PR when you signal done — you don't open it.
|
|
98
105
|
6. **Report small, log rich** — your return summary is **capped**: the outcome
|
|
99
106
|
(done / blocked / discovery raised), key decisions or deviations as a few bullets,
|
|
100
107
|
the paths touched, a one-line verification result (command + outcome — the
|
|
101
108
|
checkpoint's "how to run it" is presented from it), and any `## Side-findings`
|
|
102
109
|
block. Long-form material — reasoning, alternatives weighed, per-task notes —
|
|
103
|
-
belongs in `progress.md` and the commit messages, never in the summary
|
|
110
|
+
belongs in `progress.md` and the commit messages, never in the summary
|
|
111
|
+
(auto-commit OFF: in `progress.md` alone — there are no commit messages
|
|
112
|
+
until the human OK, so it carries everything a fresh iteration will need): the
|
|
104
113
|
Orchestrator carries your summary in context for the rest of the task, so every
|
|
105
114
|
extra line taxes the whole run. The cap trims narrative, not signal — a blocker,
|
|
106
115
|
a deviation from the spec, or a side-finding is always stated, however long the
|
|
107
116
|
list.
|
|
108
117
|
|
|
118
|
+
## Staging protocol (auto-commit OFF)
|
|
119
|
+
|
|
120
|
+
Active **only when your invocation says so** — the human chose to review the work
|
|
121
|
+
**uncommitted**, so the branch must receive nothing until their OK. This inverts
|
|
122
|
+
the tdd add-early reflex; the branch history won't help you here, and a fresh
|
|
123
|
+
iteration only knows what this contract and the worktree tell it:
|
|
124
|
+
|
|
125
|
+
- **Zero commits, zero pushes.** Never `git commit`, never `git push` — not for
|
|
126
|
+
code, not for state. The Orchestrator commits once the human OKs.
|
|
127
|
+
- **Stage after every green task** — `git add -A` when a checkbox/task reaches
|
|
128
|
+
green (suite passing). The index is your save-point ladder: everything staged
|
|
129
|
+
is a proven-green floor.
|
|
130
|
+
- **Never stage mid-experiment.** A `git add` while red or mid-refactor silently
|
|
131
|
+
**overwrites the save-point** — `git status` looks identical afterwards, and
|
|
132
|
+
recovery yields nameless blobs (practically unrecoverable). Stage only at
|
|
133
|
+
green, immediately after the suite passes, and nowhere else.
|
|
134
|
+
- **Failed experiment ⇒ roll back to the save-point**: `git restore . && git clean -fd`
|
|
135
|
+
returns the worktree to the last staged state — staged content survives
|
|
136
|
+
verbatim, including new files (`clean` respects the index and `.gitignore`).
|
|
137
|
+
- **Watch what `-A` scoops.** Before your first stage, eyeball `git status` for
|
|
138
|
+
unexpected untracked files (secrets, scratch, build junk) — `git add -A`
|
|
139
|
+
trusts `.gitignore`. Fix the ignore file or remove the junk **before**
|
|
140
|
+
staging, never after (a cleanup `add` mid-experiment is exactly the
|
|
141
|
+
save-point-destroying move above).
|
|
142
|
+
- **On a fix iteration** (checkpoint `changes`), the Orchestrator hands you a
|
|
143
|
+
worktree that may carry the human's own revalidated edits: **stage everything
|
|
144
|
+
first** (`git add -A` — that snapshot is your safe starting point), then
|
|
145
|
+
iterate under this same protocol.
|
|
146
|
+
|
|
109
147
|
## Skills
|
|
110
148
|
|
|
111
149
|
The installer fills this list with the skills your repo's capabilities resolved to;
|