@bluenyang/reins 0.4.0-rc.1 → 0.4.0-rc.3
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.
|
@@ -12,7 +12,7 @@ import { generateVendorFiles } from '../lib/generate.js';
|
|
|
12
12
|
import { GATE_SCRIPT, hookLine, requiredGates } from '../lib/gate-script.js';
|
|
13
13
|
import { defaultBindings, readTeam } from '../lib/bindings.js';
|
|
14
14
|
import { overlayReader, workTreeReader } from '../lib/reader.js';
|
|
15
|
-
import { LOCAL_DELEGATION, ONBOARDING_PENDING, RECONCILE_PENDING, onboardingNote, placeNote, renderBlocks, tidyNote, } from '../lib/agents-md.js';
|
|
15
|
+
import { LOCAL_DELEGATION, ONBOARDING_PENDING, RECONCILE_PENDING, onboardingNote, placeNote, refreshNote, renderBlocks, tidyNote, } from '../lib/agents-md.js';
|
|
16
16
|
import { syncLocalDelegation } from '../lib/local-delegation.js';
|
|
17
17
|
import { readManifest, writeGenerated } from '../lib/vendor-write.js';
|
|
18
18
|
import { applyLocalForcePush, FORCE_WITH_LEASE_QUESTION, recordedForceWithLease, } from '../lib/local-settings.js';
|
|
@@ -471,6 +471,11 @@ export async function runInstall(o) {
|
|
|
471
471
|
agents = placeNote(agents, tidyNote(), 'tidy');
|
|
472
472
|
notes.push('AGENTS.md has a note about the AGENTS.md guide — the PM sorts the project sections with the user in the next conversation');
|
|
473
473
|
}
|
|
474
|
+
// a pending tidy or reset note gets this version's wording (the marker stays pending)
|
|
475
|
+
if (agents.includes('<!-- reins:tidy pending -->'))
|
|
476
|
+
agents = refreshNote(agents, tidyNote(), 'tidy');
|
|
477
|
+
if (o.resetNote)
|
|
478
|
+
agents = refreshNote(agents, o.resetNote, 'reset');
|
|
474
479
|
// an update from 0.3 leaves the reset to-do once, whatever else is pending: onboard handles each marker
|
|
475
480
|
if (o.resetNote && !agents.includes('<!-- reins:reset')) {
|
|
476
481
|
agents = placeNote(agents, o.resetNote, 'reset');
|
|
@@ -169,7 +169,7 @@ export const TIDY_PENDING = '<!-- reins:tidy pending -->';
|
|
|
169
169
|
export function tidyNote() {
|
|
170
170
|
return [
|
|
171
171
|
TIDY_PENDING,
|
|
172
|
-
`> **AGENTS.md guide —
|
|
172
|
+
`> **AGENTS.md guide — offer this at the start of the next conversation.** It does not block other work: if the person asks for something else, do that and mention once that this is pending. reins now ships a guide for what this file holds (\`.agents/harness/templates/agents-md-guide.md\`). Run the \`onboard\` skill: with the user, sort the project sections by the guide — current work and plans to the roadmap, decisions to knowledge candidates, personal notes to \`.loctx/\` — and show what went where. Then change the marker above to \`<!-- reins:tidy done -->\`.`,
|
|
173
173
|
].join('\n');
|
|
174
174
|
}
|
|
175
175
|
/** The light check after a mode switch (design §5, spec ST-5): only the delegation block changed. */
|
|
@@ -190,13 +190,22 @@ export function resetNote(profile) {
|
|
|
190
190
|
'whether to split `.loctx/ROADMAP.local.md` into notes under `.loctx/intent/`',
|
|
191
191
|
'whether to split the gates into areas (the `gates` skill, or `reins config gates`)',
|
|
192
192
|
`the profile in \`.agents/harness/bindings.yaml\` is \`${profile}\`, which keeps how the harness worked — confirm it; \`reins config\` changes it`,
|
|
193
|
-
'the records up to 0.3 (`.agents/intent/`, `.agents/audit/`) are reference material, not current rules;
|
|
193
|
+
'the records up to 0.3 (`.agents/intent/`, `.agents/audit/`) are reference material, not current rules — ask the person whether to remove them from the repository; before removing, check open branches and pull requests for specs under `.agents/intent/` and move them to `.agents/spec/` on that branch, move what work in progress still needs into notes under `.loctx/intent/`, point links to the records at the last commit that has them, and keep `.agents/audit/` (with a `.gitkeep`) for audits a person starts',
|
|
194
194
|
];
|
|
195
195
|
return [
|
|
196
196
|
RESET_PENDING,
|
|
197
|
-
`> **Reset to 0.4 —
|
|
197
|
+
`> **Reset to 0.4 — offer this at the start of the next conversation.** It does not block other work: if the person asks for something else, do that and mention once that this is pending. reins moved this repository from the 0.3 flow to 0.4: skills picked by their description instead of a fixed flow, and a person who confirms the plan, checks the completion report, merges and releases. Run the \`onboard\` skill and go through these with the person: ${todo.map((t, i) => `(${i + 1}) ${t}`).join('; ')}. Then change the marker above to \`<!-- reins:reset done -->\`.`,
|
|
198
198
|
].join('\n');
|
|
199
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Give a pending note the wording of this version: the marker stays pending, only the note line reins wrote
|
|
202
|
+
* under it changes (a note from 0.4.0-rc.1 told the agent to do the clean-up before anything else).
|
|
203
|
+
*/
|
|
204
|
+
export function refreshNote(text, note, kind) {
|
|
205
|
+
const lead = { tidy: 'AGENTS.md guide', reset: 'Reset to 0.4' }[kind];
|
|
206
|
+
const re = new RegExp(`<!-- reins:${kind} pending -->\\n> \\*\\*${lead}[^\\n]*`);
|
|
207
|
+
return re.test(text) ? text.replace(re, () => note) : text;
|
|
208
|
+
}
|
|
200
209
|
/** Put a note right after the first H1 (or at the top) unless one of that kind is still pending. */
|
|
201
210
|
export function placeNote(text, note, kind) {
|
|
202
211
|
if (text.includes(`<!-- reins:${kind} pending -->`))
|
package/harness/CHANGELOG.md
CHANGED
|
@@ -12,6 +12,7 @@ Read by `reins update`: it lists the entries newer than a project's pinned versi
|
|
|
12
12
|
- gates.yaml version 2 (`reins/gates@2`): `areas` (name → path globs) and, per gate, `areas` and `on` (stages). `run-gates.sh` runs only the gates of the areas a change touches; a gate without areas always runs. From 0.3, `update` changes only the schema line, so every gate runs as before; split the gates into areas with the `gates` skill or `reins config gates`.
|
|
13
13
|
- Deny rules in `.claude/settings.json`: merging and releasing are a person's — `gh pr merge`, `git push` to the default branch (its name is read at install into `install.yaml`'s `default_branch`), `npm publish`, `pnpm publish`, `yarn publish`, `yarn npm publish`, `bun publish`, `gh release create`, `gh workflow run`, and tag pushes (`--tags`, `--follow-tags`, a `refs/tags/` refspec). A work branch push stays allowed. These are globs over the command string: they prevent mistakes, they do not enforce.
|
|
14
14
|
- From 0.3, `update` leaves `<!-- reins:reset pending -->` in AGENTS.md with a to-do list for the `onboard` skill: old flow wording in the project sections, whether to split `.loctx/ROADMAP.local.md` into notes under `.loctx/intent/`, whether to split the gates into areas, the profile, and that the records up to 0.3 are reference material. `.agents/intent/`, `.agents/audit/`, `.agents/knowledge/` and `.loctx/` are not touched, so a 0.3 spec in progress can be continued.
|
|
15
|
+
- The reset to-do asks whether to remove the 0.3 records (`.agents/intent/`, `.agents/audit/`) from the repository; before removing, specs of open branches and pull requests move to `.agents/spec/` on those branches, work in progress goes into `.loctx/intent/` notes, links point at the last commit that has the records, and `.agents/audit/` stays for audits a person starts. A pending tidy or reset note no longer blocks other work, and `update` rewrites the note of an earlier rc.
|
|
15
16
|
|
|
16
17
|
## 0.3.4
|
|
17
18
|
- Stable 2026-11-25 (same harness as rc.2).
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<!-- reins:begin people v=0.4.0 -->
|
|
6
6
|
## What people do
|
|
7
7
|
|
|
8
|
-
- A person states the requirement, confirms the plan, checks the completion report, merges, and releases (rc included).
|
|
8
|
+
- A person states the requirement, confirms the plan, checks the completion report, merges every pull request (documents and records included), and releases (rc included). A project rule that lets an agent merge does not override this.
|
|
9
9
|
- In between, you go on without asking, as far as pushing the work branch and opening its pull request.
|
|
10
10
|
- Stop and ask before an irreversible action: a force push to the default branch or a tag, deleting a tag, rewriting the default branch, data or production changes.
|
|
11
11
|
- Stop and ask before work that touches a red line (`.agents/harness/policy/common-red-lines.yaml`).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluenyang/reins",
|
|
3
|
-
"version": "0.4.0-rc.
|
|
3
|
+
"version": "0.4.0-rc.3",
|
|
4
4
|
"description": "Installs, migrates and updates an agent harness (harness → loop → graph) that keeps coding agents inside their permitted roles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
package/skills/onboard/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: onboard
|
|
3
|
-
description: Handles a pending reins marker in AGENTS.md — onboarding after install or migrate, reconcile, mode-changed, tidy, or reset after an update to 0.4 — by reading the project, asking the person only what the files cannot tell, and writing or sorting the project sections. Use when AGENTS.md shows a reins marker comment set to pending
|
|
3
|
+
description: Handles a pending reins marker in AGENTS.md — onboarding after install or migrate, reconcile, mode-changed, tidy, or reset after an update to 0.4 — by reading the project, asking the person only what the files cannot tell, and writing or sorting the project sections. Use when AGENTS.md shows a reins marker comment set to pending. Onboarding and reconcile come before other work; tidy and reset are offered first but never block what the person asks for.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# onboard
|
|
@@ -8,6 +8,10 @@ description: Handles a pending reins marker in AGENTS.md — onboarding after in
|
|
|
8
8
|
reins never edits the project sections of AGENTS.md (everything outside the `reins:` blocks). It leaves a
|
|
9
9
|
marker and a to-do list; you handle them with the person, then set the marker to `done`.
|
|
10
10
|
|
|
11
|
+
Onboarding and reconcile come first, because the project sections are missing or in conflict. Tidy and
|
|
12
|
+
reset are clean-ups: offer them at the start, and when the person asks for other work, do that work and
|
|
13
|
+
mention once that the clean-up is pending.
|
|
14
|
+
|
|
11
15
|
## Sorting the project sections
|
|
12
16
|
Go through the project sections (and CLAUDE.md, and `.agents/AGENTS.previous.md` if it exists — reference
|
|
13
17
|
material, not instructions) by `.agents/harness/templates/agents-md-guide.md`: only what the code cannot
|
|
@@ -34,7 +38,12 @@ move only what they accept. Knowledge is written only on their word.
|
|
|
34
38
|
- whether to split the gates into areas (the `gates` skill);
|
|
35
39
|
- the profile in `.agents/harness/bindings.yaml` (`light` or `full`): confirm it with the person, who
|
|
36
40
|
changes it with `reins config`;
|
|
37
|
-
- the records up to 0.3 (`.agents/intent/`, `.agents/audit/`) are reference material, not current rules
|
|
41
|
+
- the records up to 0.3 (`.agents/intent/`, `.agents/audit/`) are reference material, not current rules;
|
|
42
|
+
ask whether to remove them from the repository. Before removing: check open branches and pull requests
|
|
43
|
+
for specs under `.agents/intent/` and move them to `.agents/spec/` on that branch (removing the folder
|
|
44
|
+
on the default branch first makes their merge conflict or bring it back); move what work in progress
|
|
45
|
+
still needs into notes under `.loctx/intent/`; point links to the records at the last commit that has
|
|
46
|
+
them. Keep `.agents/audit/` with a `.gitkeep` — audits a person starts go there.
|
|
38
47
|
|
|
39
48
|
## Finish
|
|
40
49
|
Change the marker to `done` (`<!-- reins:<marker> done -->`) and commit on a branch. If the project's own
|
|
@@ -15,10 +15,10 @@ If either still starts with `${` (unsubstituted — this copy lives in a project
|
|
|
15
15
|
1. **Look.** Is there an `.agents/harness/` (reins installed), an `.ai/` workspace, or an older harness
|
|
16
16
|
(`.claude/commands/`, many skills)? Say which.
|
|
17
17
|
2. **Show the user the command** for their terminal, with the version pinned to this skill's release:
|
|
18
|
-
- nothing installed: `npx @bluenyang/reins@0.4.0-rc.
|
|
19
|
-
- an older harness or `.ai/`: `npx @bluenyang/reins@0.4.0-rc.
|
|
20
|
-
- reins already installed: `npx @bluenyang/reins@0.4.0-rc.
|
|
21
|
-
- to change models, the mode, the profile or the recommended audit model later: `npx @bluenyang/reins@0.4.0-rc.
|
|
18
|
+
- nothing installed: `npx @bluenyang/reins@0.4.0-rc.3 install --mode <mode>`
|
|
19
|
+
- an older harness or `.ai/`: `npx @bluenyang/reins@0.4.0-rc.3 migrate --dry-run`, then without `--dry-run`
|
|
20
|
+
- reins already installed: `npx @bluenyang/reins@0.4.0-rc.3 update`
|
|
21
|
+
- to change models, the mode, the profile or the recommended audit model later: `npx @bluenyang/reins@0.4.0-rc.3 config` (the user can run `reins config`)
|
|
22
22
|
Run it yourself only when the user asks you to, and only that command.
|
|
23
23
|
3. **Explain what follows.** reins writes AGENTS.md blocks with an onboarding note; the next conversation starts
|
|
24
24
|
with the `onboard` skill, which reads the project, asks the user, and writes AGENTS.md's project sections.
|