@bluenyang/reins 0.2.0 → 0.3.0-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.
Files changed (97) hide show
  1. package/README.md +50 -203
  2. package/cli/dist/commands/config-models.js +206 -127
  3. package/cli/dist/commands/config.js +104 -16
  4. package/cli/dist/commands/configure.js +166 -134
  5. package/cli/dist/commands/install.js +161 -217
  6. package/cli/dist/commands/migrate.js +23 -48
  7. package/cli/dist/commands/update.js +203 -30
  8. package/cli/dist/lib/agents-md.js +111 -0
  9. package/cli/dist/lib/bindings.js +227 -386
  10. package/cli/dist/lib/detect.js +7 -2
  11. package/cli/dist/lib/generate.js +56 -75
  12. package/cli/dist/lib/harness.js +0 -3
  13. package/cli/dist/lib/migrate-plan.js +3 -3
  14. package/cli/dist/lib/prompter.js +4 -4
  15. package/cli/dist/lib/reader.js +20 -0
  16. package/cli/dist/lib/upstream.js +0 -17
  17. package/cli/dist/lib/vendor-write.js +9 -56
  18. package/cli/dist/reins.js +59 -270
  19. package/docs/README.ko.md +31 -204
  20. package/harness/CHANGELOG.md +8 -3
  21. package/harness/VERSION +1 -1
  22. package/harness/models.yaml +8 -0
  23. package/harness/policy/common-red-lines.yaml +4 -4
  24. package/harness/roles/advisor.md +10 -14
  25. package/harness/roles/auditor.md +17 -0
  26. package/harness/roles/executor.md +32 -0
  27. package/harness/roles/implementer.md +23 -21
  28. package/harness/roles/pl.md +44 -21
  29. package/harness/roles/planner.md +17 -19
  30. package/harness/roles/pm.md +16 -21
  31. package/harness/schemas/bindings.schema.json +55 -0
  32. package/harness/schemas/install.schema.json +1 -2
  33. package/harness/schemas/intent.schema.json +1 -13
  34. package/harness/templates/agents-md-blocks.md +52 -17
  35. package/harness/templates/audit.md +25 -0
  36. package/harness/templates/history.md +14 -0
  37. package/harness/templates/intent.md +5 -0
  38. package/harness/templates/spec.md +4 -2
  39. package/package.json +1 -2
  40. package/skills/audit/SKILL.md +28 -0
  41. package/skills/implement/SKILL.md +30 -0
  42. package/skills/intent/SKILL.md +28 -0
  43. package/skills/merge/SKILL.md +26 -0
  44. package/skills/onboard/SKILL.md +31 -0
  45. package/skills/reins-setup/SKILL.md +16 -25
  46. package/skills/release/SKILL.md +26 -0
  47. package/skills/retro/SKILL.md +30 -0
  48. package/skills/review/SKILL.md +27 -0
  49. package/skills/roadmap/SKILL.md +29 -0
  50. package/skills/spec/SKILL.md +27 -0
  51. package/skills/test/SKILL.md +26 -0
  52. package/cli/dist/commands/check.js +0 -379
  53. package/cli/dist/commands/gate.js +0 -136
  54. package/cli/dist/commands/knowledge.js +0 -111
  55. package/cli/dist/commands/metrics.js +0 -138
  56. package/cli/dist/commands/new.js +0 -190
  57. package/cli/dist/commands/retro.js +0 -7
  58. package/cli/dist/commands/stages.js +0 -562
  59. package/cli/dist/commands/status.js +0 -281
  60. package/cli/dist/lib/enforcement.js +0 -125
  61. package/cli/dist/lib/memory.js +0 -96
  62. package/cli/dist/lib/metrics.js +0 -223
  63. package/cli/dist/lib/retro.js +0 -179
  64. package/cli/dist/lib/verdict.js +0 -15
  65. package/cli/dist/lib/work.js +0 -106
  66. package/cli/dist/scripts/enforcement.js +0 -24
  67. package/harness/policy/budget.yaml +0 -13
  68. package/harness/policy/enforcement.yaml +0 -98
  69. package/harness/policy/stops.yaml +0 -29
  70. package/harness/policy/transitions.yaml +0 -13
  71. package/harness/roles/code-review.md +0 -27
  72. package/harness/roles/deploy.md +0 -50
  73. package/harness/roles/docs.md +0 -19
  74. package/harness/roles/lookup.md +0 -22
  75. package/harness/roles/qa-design.md +0 -22
  76. package/harness/roles/qa-run.md +0 -19
  77. package/harness/roles/verify-tool.md +0 -21
  78. package/harness/schemas/bindings-local.schema.json +0 -21
  79. package/harness/schemas/bus-request.schema.json +0 -17
  80. package/harness/schemas/bus-response.schema.json +0 -14
  81. package/harness/schemas/enforcement.schema.json +0 -22
  82. package/harness/schemas/plan.schema.json +0 -10
  83. package/harness/schemas/ticket.schema.json +0 -15
  84. package/harness/templates/bus/request.yaml +0 -20
  85. package/harness/templates/bus/response.yaml +0 -10
  86. package/harness/templates/plan.md +0 -23
  87. package/harness/templates/ticket.md +0 -29
  88. package/skills/reins-implement/SKILL.md +0 -20
  89. package/skills/reins-intent/SKILL.md +0 -26
  90. package/skills/reins-loop/SKILL.md +0 -26
  91. package/skills/reins-loop/references/vendor-cli.md +0 -41
  92. package/skills/reins-release/SKILL.md +0 -18
  93. package/skills/reins-retro/SKILL.md +0 -20
  94. package/skills/reins-review/SKILL.md +0 -23
  95. package/skills/reins-roadmap/SKILL.md +0 -17
  96. package/skills/reins-spec/SKILL.md +0 -22
  97. package/skills/reins-test/SKILL.md +0 -18
@@ -1,23 +0,0 @@
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 `cli` in `.agents/harness/install.yaml` (no `cli` line: installed before 0.1.3, run `npx @bluenyang/reins@latest update` once) (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.
@@ -1,17 +0,0 @@
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 `cli` in `.agents/harness/install.yaml` (no `cli` line: installed before 0.1.3, run `npx @bluenyang/reins@latest update` once) (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.
@@ -1,22 +0,0 @@
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 `cli` in `.agents/harness/install.yaml` (no `cli` line: installed before 0.1.3, run `npx @bluenyang/reins@latest update` once) (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.
@@ -1,18 +0,0 @@
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 `cli` in `.agents/harness/install.yaml` (no `cli` line: installed before 0.1.3, run `npx @bluenyang/reins@latest update` once) (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.