@bluenyang/reins 0.1.2 → 0.1.3-rc.2
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 +11 -9
- package/cli/dist/commands/check.js +32 -1
- package/cli/dist/commands/gate.js +83 -1
- package/cli/dist/commands/install.js +1 -0
- package/cli/dist/commands/knowledge.js +111 -0
- package/cli/dist/commands/migrate.js +1 -0
- package/cli/dist/commands/new.js +193 -0
- package/cli/dist/commands/retro.js +7 -0
- package/cli/dist/commands/stages.js +31 -0
- package/cli/dist/commands/status.js +9 -0
- package/cli/dist/lib/git.js +10 -0
- package/cli/dist/lib/retro.js +179 -0
- package/cli/dist/lib/upstream.js +14 -1
- package/cli/dist/reins.js +92 -3
- package/cli/dist/scripts/sync-version.js +23 -7
- package/docs/README.ko.md +11 -9
- package/harness/CHANGELOG.md +4 -0
- package/harness/VERSION +1 -1
- package/harness/roles/advisor.md +2 -0
- package/harness/roles/code-review.md +2 -0
- package/harness/roles/deploy.md +22 -1
- package/harness/roles/docs.md +2 -0
- package/harness/roles/implementer.md +2 -0
- package/harness/roles/lookup.md +2 -0
- package/harness/roles/pl.md +2 -0
- package/harness/roles/planner.md +2 -0
- package/harness/roles/pm.md +3 -1
- package/harness/roles/qa-design.md +2 -0
- package/harness/roles/qa-run.md +2 -0
- package/harness/roles/verify-tool.md +4 -3
- package/harness/schemas/intent.schema.json +1 -1
- package/package.json +1 -1
- package/skills/reins-implement/SKILL.md +20 -0
- package/skills/reins-intent/SKILL.md +8 -17
- package/skills/reins-loop/SKILL.md +10 -38
- package/skills/reins-loop/references/vendor-cli.md +2 -2
- package/skills/reins-release/SKILL.md +17 -0
- package/skills/reins-retro/SKILL.md +20 -0
- package/skills/reins-review/SKILL.md +23 -0
- package/skills/reins-roadmap/SKILL.md +17 -0
- package/skills/reins-setup/SKILL.md +1 -1
- package/skills/reins-spec/SKILL.md +22 -0
- package/skills/reins-test/SKILL.md +18 -0
|
@@ -1,35 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reins-intent
|
|
3
|
-
description: Turn a request into an approved intent
|
|
3
|
+
description: Turn a request into an approved intent — runs the questionnaire with the user, writes .agents/intent/NNN_slug/intent.md and holds for the user's approval. Use when the user brings a new feature, change or problem, says new intent, or before any spec, plan or code exists for the work. Stops at the approved intent; the spec is reins-spec.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# reins-intent
|
|
7
7
|
|
|
8
|
-
The
|
|
9
|
-
summary may be vetoed by the user** (R64). Everything here leads to one of them; never cross either alone.
|
|
8
|
+
The point where a person decides (design §4): **the intent is approved by the user.** Never cross it alone. pm role. Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
1. **Check first.** `reins check --drift`. HOLD or STOP → follow it.
|
|
11
|
+
2. Search what was already decided or rejected: `reins recall <keywords>` (until it ships:
|
|
13
12
|
`grep -l 'decisions:.*<keyword>' .loctx/history/*` and `.agents/knowledge/`). A rejected proposal is not
|
|
14
13
|
raised again (C8).
|
|
15
|
-
2. Next id = highest `.agents/intent/NNN_*` + 1, three digits; slug in kebab-case.
|
|
16
14
|
3. **Questionnaire — ask only what only the user knows**, in one batch: the problem, the desired outcome,
|
|
17
15
|
constraints, what not to do. State your defaults for everything else instead of asking.
|
|
18
|
-
4.
|
|
16
|
+
4. `reins new intent <slug> [--version <v>] [--origin user]` creates `.agents/intent/<NNN>_<slug>/intent.md` from the template with the next id. Write it in the
|
|
19
17
|
user's words and language; record the questions and answers under the questionnaire section;
|
|
20
18
|
`status: draft`, `origin: user`, `version:` the release it targets.
|
|
21
19
|
5. Show it and **ask for approval. Never set `approved` yourself.** On the user's explicit yes:
|
|
22
20
|
`status: approved`, `approvals: [{role: user, at: <date>}]`, and commit only that change with the trailer
|
|
23
21
|
`Approved-by: <the user's name>` (`git commit -m "docs(intent): approve <NNN> <slug>" -m "Approved-by: …"`).
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
6. planner: copy `templates/spec.md`; every requirement is `S-n` with the intent sentence it comes from;
|
|
27
|
-
invariants in AGENTS.md checked (conflict or none); `summary_for_user:` 3–5 lines in the user's language.
|
|
28
|
-
7. pm reviews against the intent; qa-design gives the first review (bus `kind: review`). Fix, then
|
|
29
|
-
`status: reviewed`.
|
|
30
|
-
8. **Show `summary_for_user` and the acceptance criteria; the user may veto** (G2 → revise the spec). No veto →
|
|
31
|
-
`status: accepted`, `approvals:` pm, qa-design and `{role: user, kind: summary}`; commit with
|
|
32
|
-
`Approved-by:`. Then hand over to `reins-loop`.
|
|
23
|
+
Next: `reins-spec`.
|
|
33
24
|
|
|
34
|
-
|
|
35
|
-
its role file as instructions; say so in the history line.
|
|
25
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess.
|
|
26
|
+
A role bound to a vendor with no generated files yet runs on Claude with its role file as instructions; say so in the history line.
|
|
@@ -1,50 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reins-loop
|
|
3
|
-
description:
|
|
3
|
+
description: Conduct an accepted spec through the reins loop by calling the stage skills in order — reins-spec, reins-implement, reins-review, reins-test, reins-release, reins-retro — and stopping where a check says. Use when an intent is approved, when the user says continue, next ticket or run the loop, or to resume where reins status points. Holds only the common rules; each stage's procedure lives in its skill.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# reins-loop
|
|
7
7
|
|
|
8
|
-
Roles judge, scripts enforce.
|
|
8
|
+
Roles judge, scripts enforce. Each stage skill starts with its own check, and **its verdict decides what happens next**:
|
|
9
9
|
CONTINUE → go on · HOLD → ask the user (one line: reason id + what you need) · STOP → do what `resume` says,
|
|
10
10
|
then re-run the same check · ESCALATE → the next role in the chain (pl → pm → advisor → user).
|
|
11
|
-
Exit codes 0/10/20/30.
|
|
11
|
+
Exit codes 0/10/20/30. Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`).
|
|
12
12
|
|
|
13
|
-
##
|
|
14
|
-
1.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
3. For each order-of-work item: `.loctx/ticket/<NNN>-<n>_<slug>.md` from `templates/ticket.md`. Anything
|
|
18
|
-
the ticket cannot decide alone goes in `asks:`.
|
|
13
|
+
## Order
|
|
14
|
+
1. `reins-roadmap` (when the roadmap changes) → `reins-intent` → `reins-spec`
|
|
15
|
+
2. For each ticket: `reins-implement` → `reins-review` (back to implement on a failed verdict; next ticket until none is left)
|
|
16
|
+
3. `reins-test` → `reins-release` → `reins-retro`
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
4. **T1** `reins check --stage ticket-start --ticket <id>`. Open `asks:` hold for the user; the check also
|
|
22
|
-
names recorded decisions that may already answer them.
|
|
23
|
-
5. Branch `type/<NNN>-<slug>` from the default branch. implementer (`reins-implementer` subagent):
|
|
24
|
-
ticket → plan section → `reins recall` → implement, **one commit per finished unit** (the hook runs **T2**).
|
|
25
|
-
A diff outside the plan updates plan.md's departure log in the same commit (P2), or opens a new ticket (C10).
|
|
26
|
-
6. **Verify.** Write `.loctx/bus/<id>_<nn>.request.yaml` (`kind: verify`); verify-tool runs
|
|
27
|
-
`reins gate --ticket <id>` and answers in `<id>_<nn>.response.yaml` with the report paths as `evidence:`.
|
|
28
|
-
Bus values that contain `: ` or ` #`, or start with one of `- [ { * & ! | > ' " % @`, go in double quotes; an unquoted one breaks the YAML and the check stops with F2.
|
|
29
|
-
**T3** `reins check --stage verdict --ticket <id>`. Fail → back to 5 (a second failure escalates, D1).
|
|
30
|
-
7. **Review.** code-review gets the diff against plan and spec (`kind: review`) and proposes fixes only;
|
|
31
|
-
Prompt = the role's `must_not` + its procedure (body of code-review.md) + the request + the COMPLETE `git diff <range>` (all files; only
|
|
32
|
-
installed copies under `.agents/` and `.claude/` may be excluded by path) + "do not run commands, do not re-run checks";
|
|
33
|
-
after a fix, re-review gets the fix commit's diff only. CLI recipes: `references/vendor-cli.md`.
|
|
34
|
-
pl decides fix or proceed. Nobody judges their own work.
|
|
35
|
-
8. **Close.** `status: done`; one history page or line in `.loctx/history/` naming the ticket id, its commits,
|
|
36
|
-
and a `decisions:` line; then delete the ticket file and its bus files.
|
|
18
|
+
Resume: `reins status` names the stage; call that stage's skill again. Stop on any HOLD or STOP and report; never cross the user's two decisions (intent approval, spec summary veto) alone.
|
|
37
19
|
|
|
38
|
-
**Metrics.** After each role run, report what it cost: `reins metrics record --role <
|
|
39
|
-
Tokens come from the vendor — Claude subagent: the Agent result's token count · `codex exec`: the "tokens used"
|
|
40
|
-
line · `agy`, `cursor-agent` with `--output-format json`: the usage field when present. No count from the
|
|
41
|
-
vendor → record nothing, never guess. `reins check` and `reins gate` log themselves to
|
|
42
|
-
`.loctx/reports/metrics.jsonl`; `reins metrics` summarises it.
|
|
20
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess. Tokens come from the vendor — Claude subagent: the Agent result's token count · `codex exec`: the "tokens used" line · `agy`, `cursor-agent` with `--output-format json`: the usage field when present. `reins check` and `reins gate` log themselves to `.loctx/reports/metrics.jsonl`; `reins metrics` summarises it.
|
|
43
21
|
|
|
44
|
-
|
|
45
|
-
9. When every planned ticket is done: **T5** `reins check --stage rc-close --release <version>`. Report to
|
|
46
|
-
the user. Push, PR and release happen only on the user's instruction, in the deploy role (T4 runs in the
|
|
47
|
-
pre-push hook); a stable release is always the user's explicit call (A2).
|
|
48
|
-
|
|
49
|
-
On an interruption (G1) write where you are — ticket, step, last commit, open bus files, next command — to
|
|
50
|
-
the ticket, so the same command resumes.
|
|
22
|
+
On an interruption (G1) write where you are — ticket, step, last commit, open bus files, next command — to the ticket, so the same command resumes.
|
|
@@ -11,8 +11,8 @@ codex exec -m <model> -s read-only --ephemeral -C <repo> -o <response.yaml> - <
|
|
|
11
11
|
|
|
12
12
|
- Read-only sandbox (`-s read-only`), no session kept (`--ephemeral`); the answer is written to `-o`.
|
|
13
13
|
- `prompt.md` = the role's `must_not` + its procedure (the body of code-review.md) + the bus request + the COMPLETE
|
|
14
|
-
`git diff <range
|
|
15
|
-
|
|
14
|
+
`git diff <range> -- . ":!.agents/harness" ":!.agents/skills" ":!.agents/SKILLS.md" ":!.claude"` inlined (all other files, not filtered to `changes[]` paths) followed by `git diff --stat <range> -- .agents/harness .agents/skills .agents/SKILLS.md .claude`; installed copies
|
|
15
|
+
are always allowed to change) + "do not run commands, do not re-run checks".
|
|
16
16
|
- Output lands in the `-o` file.
|
|
17
17
|
- Re-review: inline only the fix commit's diff.
|
|
18
18
|
- Tokens: the line after `tokens used` in the output.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reins-release
|
|
3
|
+
description: Release a finished version as the deploy role — T5 rc-close check, then branch → PR → green CI → merge, then the rc dispatch and ledger. Stable only on the user's explicit instruction. Use when the version is tested and the user says release, open the PR or cut the rc. Never pushes to the default branch directly.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reins-release
|
|
7
|
+
|
|
8
|
+
deploy role, inside the pre-release loop only. Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
9
|
+
|
|
10
|
+
1. **Check first (T5).** `reins check --stage rc-close --release <version>`. Not CONTINUE → no dispatch; follow the verdict. T4 runs in the pre-push hook and holds a direct push to the default branch.
|
|
11
|
+
2. Follow the deploy role's procedures in `.agents/harness/roles/deploy.md`: **Merge procedure** (push the feature branch, `gh pr create`, `gh pr checks --watch`, `gh pr merge --rebase --delete-branch` on green only) and **rc procedure** (rc number from T5, dispatch, identify the run, ledger line, user approves on npm). Do not restate them here; announce each step.
|
|
12
|
+
3. Stable is always the user's explicit call (A2); then set the intent `status: released` as deploy.md says.
|
|
13
|
+
4. Anything in stop group A → stop and report.
|
|
14
|
+
|
|
15
|
+
Next: `reins-retro`.
|
|
16
|
+
|
|
17
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reins-retro
|
|
3
|
+
description: Entry point for the retrospective of a released version, as the pm role — reads the state and proposes what to learn and promote. Use after a release, or when the user says retro or retrospective. Aggregates repeats, proposes knowledge promotions and accepts only what the user approves; this skill does not release or plan.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reins-retro
|
|
7
|
+
|
|
8
|
+
pm role. Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
9
|
+
|
|
10
|
+
1. **Check first.** `reins status`. HOLD or STOP → follow it.
|
|
11
|
+
2. **Aggregate.** `reins retro --release <v>` after an rc (or with no flag, any time). It counts repeats across units (a ticket counts once): stop ids, review reasons, decisions, failed rounds (HOLD/STOP), tokens by role, and promotion candidates (a key seen in 2+ units not yet in active knowledge). `--json` for machine reading.
|
|
12
|
+
3. **Summarise for the user in their language**: stops, review findings, failed rounds, tokens, and the candidate list. Short; no raw dump.
|
|
13
|
+
4. **Propose.** For each candidate: `reins knowledge propose <key> --from <history pages>`. A key seen once but named by the user is proposed the same way, with its evidence in `--from`. This writes drafts to `.loctx/knowledge-proposals/` and records no approval. Show every draft to the user. A candidate you judge not to be a lesson: `reins knowledge dismiss <key> --reason <why>`, and tell the user; it comes back if it repeats in more units.
|
|
14
|
+
5. **Approval gate.** Only after the user explicitly approves a draft, run `reins knowledge accept <draft>`, and commit the new `.agents/knowledge/` file with the trailer `Approved-by: user`. Declined or silent drafts are not accepted; never accept on your own, and no agent message counts as approval. An entry without `approved` stops the verifier.
|
|
15
|
+
6. **Carry forward.** A generic lesson (not specific to one ticket) also becomes one line in `docs/ROADMAP.md` as a next-intent candidate.
|
|
16
|
+
7. **Record.** Write a history page in `.loctx/history/` with a `decisions:` line (accepted keys) and a `reasons:` line (why declined or deferred).
|
|
17
|
+
|
|
18
|
+
Next: `reins-roadmap`, or the next intent via `reins-intent`.
|
|
19
|
+
|
|
20
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reins-review
|
|
3
|
+
description: Verify and review a finished ticket — verify-tool runs the gates and answers the bus request, T3 gives the verdict, code-review checks the diff against plan and spec, pl decides, then the ticket is closed. Also reviews a range the user edited without a ticket (drift and review only). Use after implementation, when the user says verify, review or close the ticket. Does not implement.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reins-review
|
|
7
|
+
|
|
8
|
+
Nobody judges their own work. Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
9
|
+
|
|
10
|
+
## With a ticket
|
|
11
|
+
1. **Check first.** `reins check --drift`. Then verify: `reins new request <id> verify` creates `.loctx/bus/<id>_<nn>.request.yaml`; fill changes · why · tried · not_tried · revert. verify-tool runs
|
|
12
|
+
`reins gate --ticket <id> --respond`, which runs the gates, keeps the raw reports and writes `<id>_<nn>.response.yaml` (report paths as `evidence:`) for the open verify request.
|
|
13
|
+
Bus values that contain `: ` or ` #`, or start with one of `- [ { * & ! | > ' " % @`, go in double quotes; an unquoted one breaks the YAML and the check stops with F2.
|
|
14
|
+
2. **T3** `reins check --stage verdict --ticket <id>`. Fail → back to `reins-implement` (a second failure escalates, D1).
|
|
15
|
+
3. **Review.** `reins new request <id> review`. code-review gets the diff against plan and spec and proposes fixes only. Build the prompt and call it as in `../reins-loop/references/vendor-cli.md` (the diff excludes only installed copies and appends their `git diff --stat`). After a fix, re-review gets the fix commit's diff only. pl decides fix or proceed.
|
|
16
|
+
4. **Close.** `status: done`; one history page or line in `.loctx/history/` naming the ticket id, its commits and a `decisions:` line; then delete the ticket file and its bus files.
|
|
17
|
+
|
|
18
|
+
## Without a ticket (a range the user edited)
|
|
19
|
+
Run `reins check --drift` only. Skip the verify exchange and T3. Leave a review-only bus pair (`kind: review`, the range in the ticket slot), review the range's diff as above, report to the user. Do not close a ticket or write history.
|
|
20
|
+
|
|
21
|
+
Next: another ticket → `reins-implement`; none left → `reins-test`.
|
|
22
|
+
|
|
23
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess. Claude role runs: the Agent result's token count.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reins-roadmap
|
|
3
|
+
description: Update the public roadmap (docs/ROADMAP.md and docs/ROADMAP.ko.md) and pick the target version of the next work, as the pm role. Use when the user says to change the roadmap, reprioritise, add or drop a planned version, or asks what comes next. Does not write an intent (reins-intent) or any spec.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reins-roadmap
|
|
7
|
+
|
|
8
|
+
pm role. Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
9
|
+
|
|
10
|
+
1. **Check first.** `reins status` and `reins check --drift`. HOLD or STOP → follow it; do not edit the roadmap on top of drift.
|
|
11
|
+
2. Read the user's instruction, `docs/ROADMAP.md` and the open intents (`reins status`). Ask only what only the user knows (what moves, why); state defaults for the rest.
|
|
12
|
+
3. Edit `docs/ROADMAP.md` and its Korean twin `docs/ROADMAP.ko.md` together (R67), keeping the two linked. Show the diff and the target version for the next work.
|
|
13
|
+
4. Commit the roadmap change as its own unit. Nothing leaves the machine.
|
|
14
|
+
|
|
15
|
+
Next: `reins-intent` for the chosen work.
|
|
16
|
+
|
|
17
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess.
|
|
@@ -6,7 +6,7 @@ description: Install reins in this repository, or move an existing harness onto
|
|
|
6
6
|
# reins-setup
|
|
7
7
|
|
|
8
8
|
You act as the **pm** role (`.agents/harness/roles/pm.md` once installed). The CLI does the work; you collect
|
|
9
|
-
the answers only the user can give and report what happened. Run the CLI as `npx @bluenyang/reins@0.1.2 …`
|
|
9
|
+
the answers only the user can give and report what happened. Run the CLI as `npx @bluenyang/reins@0.1.3-rc.2 …`
|
|
10
10
|
(the version is pinned to this skill's release; inside the reins repository itself: `node cli/dist/reins.js …`).
|
|
11
11
|
|
|
12
12
|
Defaults from the plugin settings: language `${user_config.language}`, install mode `${user_config.default_mode}`.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reins-spec
|
|
3
|
+
description: Turn an approved intent into an accepted spec, a reviewed plan and ticket files — planner writes spec.md, pm and qa-design review it, the user may veto its summary, then pl writes plan.md and the tickets via reins new. Use when an intent is approved and has no accepted spec yet, or the user says write the spec or plan this. Does not write the intent (reins-intent) or implement.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reins-spec
|
|
7
|
+
|
|
8
|
+
The point where a person decides (design §4): **the spec summary may be vetoed by the user** (R64). Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
9
|
+
|
|
10
|
+
1. **Check first.** `reins check --drift`, then read the intent's frontmatter: it must be `status: approved`. No approved intent → HOLD: ask the user, or send them to `reins-intent`.
|
|
11
|
+
2. **planner:** copy `templates/spec.md`; every requirement is `S-n` with the intent sentence it comes from;
|
|
12
|
+
invariants in AGENTS.md checked (conflict or none); `summary_for_user:` 3–5 lines in the user's language.
|
|
13
|
+
3. pm reviews against the intent; qa-design gives the first review (bus `kind: review`, `reins new request <ticket> review` when a ticket exists). Fix, then `status: reviewed`.
|
|
14
|
+
4. **Show `summary_for_user` and the acceptance criteria; the user may veto** (G2 → revise the spec). No veto →
|
|
15
|
+
`status: accepted`, `approvals:` pm, qa-design and `{role: user, kind: summary}`; commit with `Approved-by:`.
|
|
16
|
+
5. **pl — plan:** copy `templates/plan.md` into the intent folder: files that change, **order of work (one item = one ticket)**, risks, proof, test checklist; `tickets: [<NNN>-1, …]`, `agents:` roles.
|
|
17
|
+
6. qa-design reviews the plan lightly (bus `kind: review`) → `status: reviewed`. Commit.
|
|
18
|
+
7. For each order-of-work item: `reins new ticket <intent> <step> <slug> [--title] [--depends] [--release] [--role]` creates `.loctx/ticket/<NNN>-<n>_<slug>.md`. Anything the ticket cannot decide alone goes in `asks:`.
|
|
19
|
+
|
|
20
|
+
Next: `reins-implement`.
|
|
21
|
+
|
|
22
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reins-test
|
|
3
|
+
description: Test a version before release — qa-design designs e2e scenarios from the spec's acceptance criteria, qa-run executes them, verify-tool builds and reports. Use when every planned ticket of a version is done, or the user says test the version or run the e2e scenarios. Does not release (reins-release).
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# reins-test
|
|
7
|
+
|
|
8
|
+
Run the CLI as `npx @bluenyang/reins@<v>` where `<v>` is `version` in `.agents/harness/install.yaml` (inside the reins repository: `node cli/dist/reins.js`). Verdicts: CONTINUE (exit 0) go on · HOLD (10) ask the user, one line: reason id + what you need · STOP (20) do what `resume` says, then re-run the same check · ESCALATE (30) next role in the chain (pl → pm → advisor → user).
|
|
9
|
+
|
|
10
|
+
1. **Check first.** `reins status` and `reins check --drift`. The version must have no open ticket and every planned ticket done; anything left → HOLD (do not re-run T3 on a closed ticket).
|
|
11
|
+
2. **qa-design:** write the e2e scenarios from the version's spec acceptance criteria (call per `../reins-loop/references/vendor-cli.md`).
|
|
12
|
+
3. **qa-run:** execute the scenarios; keep raw output under `.loctx/reports/`.
|
|
13
|
+
4. **verify-tool:** `pnpm build` (or the build gate in gates.yaml) and report pass/fail with the raw output attached.
|
|
14
|
+
5. pl decides from the results. Failures go back as tickets (`reins new ticket …`, `release: stabilization` after an rc).
|
|
15
|
+
|
|
16
|
+
Next: `reins-release`.
|
|
17
|
+
|
|
18
|
+
**Metrics.** After each role run, report what it cost with one call: `reins metrics record --role <role> --tokens <n> --intent <id> [--ticket <id>] --vendor <v> --model <m>`. No token count from the vendor → record nothing, never guess.
|