@bluenyang/reins 0.3.0 → 0.3.1-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 +4 -3
- package/cli/dist/commands/config-gates.js +95 -0
- package/cli/dist/commands/config-models.js +72 -1
- package/cli/dist/commands/config.js +9 -2
- package/cli/dist/commands/configure.js +158 -14
- package/cli/dist/commands/install.js +52 -43
- package/cli/dist/commands/update.js +21 -4
- package/cli/dist/lib/agents-md.js +27 -5
- package/cli/dist/lib/bindings.js +79 -7
- package/cli/dist/lib/detect.js +6 -1
- package/cli/dist/lib/gate-refresh.js +82 -0
- package/cli/dist/lib/gate-script.js +77 -0
- package/cli/dist/lib/generate.js +17 -4
- package/cli/dist/lib/vendor-write.js +111 -6
- package/cli/dist/reins.js +28 -4
- package/docs/README.ko.md +4 -3
- package/harness/CHANGELOG.md +12 -0
- package/harness/VERSION +1 -1
- package/harness/models.yaml +2 -2
- package/harness/roles/auditor.md +7 -4
- package/harness/roles/pl.md +1 -1
- package/harness/schemas/bindings.schema.json +12 -3
- package/package.json +1 -1
- package/skills/audit/SKILL.md +7 -6
- package/skills/onboard/SKILL.md +1 -1
- package/skills/reins-setup/SKILL.md +4 -4
- package/skills/retro/SKILL.md +5 -3
package/cli/dist/reins.js
CHANGED
|
@@ -5,7 +5,9 @@ import { runInstall } from './commands/install.js';
|
|
|
5
5
|
import { runMigrate } from './commands/migrate.js';
|
|
6
6
|
import { formatUpdate, runUpdate } from './commands/update.js';
|
|
7
7
|
import { configureBindings, configureGates } from './commands/configure.js';
|
|
8
|
-
import {
|
|
8
|
+
import { refreshGates } from './commands/config-gates.js';
|
|
9
|
+
import { applicable, formatGateDiff } from './lib/gate-refresh.js';
|
|
10
|
+
import { NotARepository, repoRoot } from './lib/git.js';
|
|
9
11
|
import { LOCAL_DELEGATION_NOTE } from './lib/local-delegation.js';
|
|
10
12
|
import { formatBindings, runConfig } from './commands/config.js';
|
|
11
13
|
import { defaultsAsker, stdinAsker } from './lib/ask.js';
|
|
@@ -154,6 +156,7 @@ config
|
|
|
154
156
|
.option('--set <pairs...>', 'default|<group>|<group>.<role>=<model> or =<vendor>:<model>')
|
|
155
157
|
.option('--models <pairs...>', '<pl|advisor>=<model>,<model>,… (several models)')
|
|
156
158
|
.option('--off <groups...>', 'switch groups off (the PM does their work)')
|
|
159
|
+
.option('--fallback <pairs...>', '<group>|<group>.<role>=<model>|none — what to call when that model cannot be called')
|
|
157
160
|
.option('--mode <mode>', 'single | multi')
|
|
158
161
|
.option('--audit <state>', 'on | off — the per-version audit')
|
|
159
162
|
.option('--tools <pairs...>', '<tool>=on|off')
|
|
@@ -174,6 +177,7 @@ config
|
|
|
174
177
|
set: o.set,
|
|
175
178
|
models: o.models,
|
|
176
179
|
off: o.off,
|
|
180
|
+
fallback: o.fallback,
|
|
177
181
|
mode: o.mode,
|
|
178
182
|
audit: o.audit,
|
|
179
183
|
tools: o.tools,
|
|
@@ -209,11 +213,19 @@ config
|
|
|
209
213
|
});
|
|
210
214
|
config
|
|
211
215
|
.command('gates')
|
|
212
|
-
.description('
|
|
216
|
+
.description('the project gates: --add <name>… appends subdirectory proposals; --refresh finds the gates again and shows what differs from gates.yaml')
|
|
213
217
|
.option('--add <names...>', 'proposal names to append after the existing gates')
|
|
218
|
+
.option('--refresh', 'run the discovery of installation again and show the differences')
|
|
219
|
+
.option('--apply <names...>', 'with --refresh: the differences to apply, by name, or `all`')
|
|
214
220
|
.option('--json')
|
|
215
|
-
.action((o) => {
|
|
216
|
-
const
|
|
221
|
+
.action(async (o) => {
|
|
222
|
+
const refresh = !!o.refresh || !!o.apply;
|
|
223
|
+
// on a terminal, --refresh alone lets the user pick; with --apply or --json it never asks
|
|
224
|
+
if (refresh && !o.apply && !o.json && isInteractive()) {
|
|
225
|
+
await refreshGates(repoRoot(process.cwd()), await clackPrompter());
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const r = configureGates(refresh ? { refresh: true, apply: o.apply } : { add: o.add });
|
|
217
229
|
if (o.json) {
|
|
218
230
|
process.stdout.write(`${JSON.stringify(r, null, 2)}\n`);
|
|
219
231
|
process.exit(r.code ?? 0);
|
|
@@ -222,6 +234,18 @@ config
|
|
|
222
234
|
process.stderr.write(`reins config gates: ${r.refused}\n`);
|
|
223
235
|
process.exit(r.code ?? 2);
|
|
224
236
|
}
|
|
237
|
+
if (refresh) {
|
|
238
|
+
const diff = r.diff ?? [];
|
|
239
|
+
for (const d of diff)
|
|
240
|
+
process.stdout.write(`${formatGateDiff(d)}\n`);
|
|
241
|
+
if (applicable(diff).length === 0)
|
|
242
|
+
process.stdout.write('up to date\n');
|
|
243
|
+
else if (r.applied?.length)
|
|
244
|
+
process.stdout.write(`applied: ${r.applied.join(', ')} — gates.yaml and the gate script were written\n`);
|
|
245
|
+
else
|
|
246
|
+
process.stdout.write('nothing written — apply with: reins config gates --refresh --apply <name…|all>\n');
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
225
249
|
for (const n of r.added)
|
|
226
250
|
process.stdout.write(`added: ${n}\n`);
|
|
227
251
|
if (!r.available.length)
|
package/docs/README.ko.md
CHANGED
|
@@ -8,7 +8,7 @@ BlueNyang과 Team Croffle의 저장소 열두 곳이 같은 하네스 계통을
|
|
|
8
8
|
|
|
9
9
|
## 상태
|
|
10
10
|
|
|
11
|
-
**0.3.
|
|
11
|
+
**0.3.1-rc.2가 릴리스 후보입니다**(intent 021): `npx @bluenyang/reins@0.3.1-rc.2`. **0.3.0이 최신 릴리스입니다**(intent 019, 020): `npx @bluenyang/reins install`. 0.2.0까지는 스킬과 훅이 작업 중에 `npx @bluenyang/reins`를 불렀습니다. 0.3은 그것을 없애고, `reins update`가 0.1.x·0.2.0 설치를 옮깁니다. 버전마다 바뀐 것은 [CHANGELOG.md](../CHANGELOG.md)에, 앞으로의 계획은 [로드맵](ROADMAP.ko.md)에 있습니다.
|
|
12
12
|
|
|
13
13
|
## 동작 방식
|
|
14
14
|
|
|
@@ -45,10 +45,10 @@ reins 자체를 개발하려면 `git clone https://github.com/bluenyang/reins.gi
|
|
|
45
45
|
|
|
46
46
|
| 명령 | 하는 일 |
|
|
47
47
|
|---|---|
|
|
48
|
-
| `install` | 하네스를 배치하고, 에이전트 도구를 감지하고, 게이트를 확인하고, 프로젝트 게이트 명령을 부르는
|
|
48
|
+
| `install` | 하네스를 배치하고, 에이전트 도구를 감지하고, 게이트를 확인하고, 검사 스크립트 `.agents/harness/run-gates.sh`(프로젝트 게이트 명령을 돌리고 출력을 감사용으로 남김)를 쓰고 그것을 부르는 훅 한 줄을 제안하고(`--hooks`면 husky에 넣음), 온보딩 표시를 남깁니다. `--mode manual\|auto`, `--dry-run`, `--json` |
|
|
49
49
|
| `migrate` | 이전 하네스나 `.ai/` 작업 공간을 이 배치로 옮기고, 이전 `AGENTS.md`는 PM이 합치도록 따로 둡니다. `--legacy local\|committed`, `--dry-run` |
|
|
50
50
|
| `update` | 패키지의 하네스를 다시 적용합니다. 손으로 고친 생성 파일은 덮어쓰기 전에 묻고(`--force`), 0.1.x·0.2.0 설치를 0.3으로 옮기며 옛 작업 파일을 보여 줍니다(`--yes`면 지움) |
|
|
51
|
-
| `config` | 터미널에서 화면: 모델과 역할, 에이전트 도구, 모드(single·multi), 감사. `config bindings`·`config gates`는 플래그로(`configure`는 별칭) |
|
|
51
|
+
| `config` | 터미널에서 화면: 모델과 역할, 에이전트 도구, 모드(single·multi), 감사. `config bindings`·`config gates`는 플래그로(`configure`는 별칭). `config gates --refresh`는 프로젝트 검사를 다시 찾아 `gates.yaml`과의 차이(new·changed·gone)를 보여 주고 고른 것만 반영합니다(터미널이 아니면 `--apply <이름…|all>`). 화면의 `gates` 항목에서도 같은 일을 합니다. 군이나 역할에 대체 모델을 적을 수 있습니다(`config bindings --fallback <군>[.<역할>]=<model>`). 첫 모델을 부를 수 없을 때 쓰도록 대체 실행 줄이 위임 표에 들어갑니다 |
|
|
52
52
|
|
|
53
53
|
## 스킬
|
|
54
54
|
|
|
@@ -59,6 +59,7 @@ reins 자체를 개발하려면 `git clone https://github.com/bluenyang/reins.gi
|
|
|
59
59
|
- [proposal.ko.md](proposal.ko.md): 문제, 목표, 요구사항
|
|
60
60
|
- [design.ko.md](design.ko.md): 배치, 역할, 흐름, 감사, 파일 형식, CLI
|
|
61
61
|
- [ROADMAP.ko.md](ROADMAP.ko.md): 버전
|
|
62
|
+
- [conversation/](conversation/): 메인테이너의 설계 대화. 무엇을 두고 고민했고 왜 그렇게 정했는지를 적은 것이며 규칙은 아닙니다
|
|
62
63
|
- 영어판: [proposal.md](proposal.md), [design.md](design.md), [ROADMAP.md](ROADMAP.md). 둘이 어긋나면 한글판이 기준입니다.
|
|
63
64
|
|
|
64
65
|
## 라이선스
|
package/harness/CHANGELOG.md
CHANGED
|
@@ -2,7 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Read by `reins update`: it lists the entries newer than a project's pinned version.
|
|
4
4
|
|
|
5
|
+
## 0.3.1
|
|
6
|
+
- The `retro` skill and the retrospector propose knowledge candidates from decisions and failures repeated in history and the audit.
|
|
7
|
+
- `.claude/settings.json` is merged: reins changes only the deny rules it wrote (listed under `owned:` in `generated.yaml`) and keeps the user's entries, also with `--force` and in a file it never wrote. The audit counts only those rules as drift.
|
|
8
|
+
- The auditor is read-only: its call line no longer asks for write access, it returns the audit record as its answer and the PM writes it unchanged.
|
|
9
|
+
- New `.agents/harness/run-gates.sh`: runs the gates of `gates.yaml` and keeps their output in `.loctx/reports/gates/<tree>.log`. Hooks call it with one line (`sh .agents/harness/run-gates.sh pre-commit`); `update` rewrites the hooks block 0.3.0 wrote and shows what it held. The PM fills missing logs before the audit; the retro deletes them.
|
|
10
|
+
- `models.yaml` adds `claude-fable-5-2`, `gpt-6-sol` and `gpt-6-luna`.
|
|
11
|
+
- `update` heads the `.agents/AGENTS.previous.md` it makes from an install of 0.2.0 or earlier with a warning not to run the reins commands named in it.
|
|
12
|
+
- Fallback models: `fallback` on a group or a role in `bindings.yaml` (and the personal file); the delegation table names the fallback and how to call it, and the PM uses it when a role's call cannot be made. A `bindings.yaml` that holds a `fallback` is refused by the `config` of 0.3.0, so everyone on the team moves to 0.3.1. `update` carries a 0.2.0 `fallback` over with its model.
|
|
13
|
+
- `config gates --refresh [--apply <name…|all>]` and a `gates` item on the config screen: the discovery of installation runs again, the differences from `gates.yaml` are shown, and only what is picked is applied; the gate script follows.
|
|
14
|
+
- A call line in the delegation table uses the vendor's default command (`codex`, `agy`, `cursor-agent`) when the settings record no CLI for it, instead of the vendor's name.
|
|
15
|
+
|
|
5
16
|
## 0.3.0
|
|
17
|
+
- Stable 2026-11-10 (same harness as rc.4).
|
|
6
18
|
- rc.3: every skill's delegation section and the delegation block point to `.loctx/delegation.local.md` first; the flow block, `implement`, `spec`, `audit` and the implementer, planner and auditor roles commit at meaningful units (revertible without taking other work along) instead of one commit per unit; the audit reads PR and CI records the PM collects and stays offline.
|
|
7
19
|
- rc.2: `models.yaml` lists known models per vendor; a mode switch adds `reins:mode-changed` (no AGENTS.previous.md); the `onboard` skill handles it.
|
|
8
20
|
- Seven role groups replace the twelve roles; bindings.yaml version 2 (mode, audit, groups); `update` converts version 1.
|
package/harness/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.3.
|
|
1
|
+
0.3.1
|
package/harness/models.yaml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
# agy and cursor-agent list theirs; this list is their fallback. `other` always lets the user type an ID.
|
|
3
3
|
schema: reins/models@1
|
|
4
4
|
vendors:
|
|
5
|
-
claude: [claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5-1]
|
|
6
|
-
openai: [gpt-6.1-sol, gpt-6.1-terra, gpt-6-astra]
|
|
5
|
+
claude: [claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5-2, claude-fable-5-1]
|
|
6
|
+
openai: [gpt-6.1-sol, gpt-6.1-terra, gpt-6-astra, gpt-6-sol, gpt-6-luna]
|
|
7
7
|
google: [gemini-4-argon-high, gemini-4-argon-medium, gemini-4-argon-low, gemini-3.8-flash-medium]
|
|
8
8
|
cursor: [cursor-grok-4.5-high-fast]
|
package/harness/roles/auditor.md
CHANGED
|
@@ -3,16 +3,19 @@ group: auditor
|
|
|
3
3
|
summary: "Audits a finished version against the harness only."
|
|
4
4
|
roles:
|
|
5
5
|
auditor:
|
|
6
|
-
does: "Judge whether the version followed the flow in AGENTS.md, from the records alone, and
|
|
6
|
+
does: "Judge whether the version followed the flow in AGENTS.md, from the records alone, and return the full text of the audit record; the PM writes it to .agents/audit/<version>.md unchanged."
|
|
7
7
|
must_not:
|
|
8
8
|
- "judge code quality or test results as such; they are evidence that a step ran"
|
|
9
9
|
- "call a step kept without an evidence path; that is \"cannot confirm\""
|
|
10
10
|
- "read the working conversation"
|
|
11
11
|
- "fetch from the network; a record it lacks is \"cannot confirm\" and is asked of the PM"
|
|
12
|
-
|
|
12
|
+
- "write or edit files; it runs read-only and returns the record as its answer"
|
|
13
|
+
tools: { write: false, shell: true, push: false }
|
|
13
14
|
---
|
|
14
15
|
# auditor
|
|
15
16
|
|
|
16
|
-
Reads: AGENTS.md and the harness settings as they were, the intent, spec, `docs/ROADMAP.md`, `.loctx/ROADMAP.local.md`, git history, history, gate and test logs, and the PR and CI records the PM collected (`.loctx/reports/<version>/`): PR number, who merged it and when, merge and head SHA, CI checks and results, the gate output in the PR body, as the host's CLI printed them.
|
|
17
|
+
Reads: AGENTS.md and the harness settings as they were, the intent, spec, `docs/ROADMAP.md`, `.loctx/ROADMAP.local.md`, git history, history, gate and test logs, the gate log of each commit (`.loctx/reports/gates/<tree>.log`, where `<tree>` is `git rev-parse <commit>^{tree}`), and the PR and CI records the PM collected (`.loctx/reports/<version>/`): PR number, who merged it and when, merge and head SHA, CI checks and results, the gate output in the PR body, as the host's CLI printed them.
|
|
17
18
|
|
|
18
|
-
For each step of the flow (local roadmap → roadmap → intent → approval → spec → approval → implementation and commits → review → test → merge): kept, violated, cannot confirm, or skipped on the user's instruction (recorded in `waivers:`). Judge against the rules in force at the time. Commits: each commit is a meaningful unit — a point you can revert or reset to without taking other working work or features with it; several commits for one work unit (implementation, review fixes) are fine, and small units that may be reverted together may share one. A commit that mixes unrelated work, so one part cannot be reverted alone, is a violation. Changing the spec's work units themselves (adding, dropping, scope, order) without approval is a violation. A generated or harness file changed by a commit that is not an `update`/`config` commit is a violation. For each violation: the criticism, and a remedy (by severity, with PL or Advisor opinions).
|
|
19
|
+
For each step of the flow (local roadmap → roadmap → intent → approval → spec → approval → implementation and commits → review → test → merge): kept, violated, cannot confirm, or skipped on the user's instruction (recorded in `waivers:`). Judge against the rules in force at the time. Commits: each commit is a meaningful unit — a point you can revert or reset to without taking other working work or features with it; several commits for one work unit (implementation, review fixes) are fine, and small units that may be reverted together may share one. A commit that mixes unrelated work, so one part cannot be reverted alone, is a violation. Gates: the log of each commit's tree holds a run with `worktree: clean` and `exit: 0`; say whether it was left at commit time or filled in before the audit (`stage: audit`). No such run is "cannot confirm"; a clean run that ends with another `exit:` is a violation. Changing the spec's work units themselves (adding, dropping, scope, order) without approval is a violation. A generated or harness file changed by a commit that is not an `update`/`config` commit is a violation. In `.claude/settings.json` only reins' deny rules count (listed under `owned:` in `.agents/harness/generated.yaml`); the user's own entries there are not drift. For each violation: the criticism, and a remedy (by severity, with PL or Advisor opinions).
|
|
20
|
+
|
|
21
|
+
Returns: the whole record in the form of `.agents/harness/templates/audit.md`, as the answer. The PM keeps that answer as it came under `.loctx/reports/<version>/`, writes it to `.agents/audit/<version>.md` without changing or shortening a verdict, and adds only the user's decision in its own section.
|
package/harness/roles/pl.md
CHANGED
|
@@ -31,7 +31,7 @@ roles:
|
|
|
31
31
|
- "edit the document"
|
|
32
32
|
tools: { write: false, shell: true, push: false }
|
|
33
33
|
retrospector:
|
|
34
|
-
does: "After a version, read the audit and the release and propose changes to AGENTS.md, skills and the harness, including whether the groups switched on paid for themselves."
|
|
34
|
+
does: "After a version, read the audit and the release and propose changes to AGENTS.md, skills and the harness, including whether the groups switched on paid for themselves, and propose knowledge candidates from the decisions and failures repeated in history and the audit."
|
|
35
35
|
must_not:
|
|
36
36
|
- "apply a proposal; the user accepts and the PM or `config`/`update` applies"
|
|
37
37
|
tools: { write: false, shell: true, push: false }
|
|
@@ -33,13 +33,21 @@
|
|
|
33
33
|
"type": "object", "required": ["vendor", "model"], "additionalProperties": false,
|
|
34
34
|
"properties": { "vendor": { "type": "string", "minLength": 1 }, "model": { "type": "string", "minLength": 1 } }
|
|
35
35
|
},
|
|
36
|
-
"
|
|
36
|
+
"roleBinding": {
|
|
37
|
+
"type": "object", "required": ["vendor", "model"], "additionalProperties": false,
|
|
38
|
+
"properties": {
|
|
39
|
+
"vendor": { "type": "string", "minLength": 1 }, "model": { "type": "string", "minLength": 1 },
|
|
40
|
+
"fallback": { "$ref": "#/$defs/binding" }
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"roles": { "type": "object", "additionalProperties": { "$ref": "#/$defs/roleBinding" } },
|
|
37
44
|
"one": {
|
|
38
45
|
"type": "object", "additionalProperties": false,
|
|
39
46
|
"dependentRequired": { "vendor": ["model"], "model": ["vendor"] },
|
|
40
47
|
"properties": {
|
|
41
48
|
"vendor": { "type": "string", "minLength": 1 }, "model": { "type": "string", "minLength": 1 },
|
|
42
|
-
"roles": { "$ref": "#/$defs/roles" }
|
|
49
|
+
"roles": { "$ref": "#/$defs/roles" },
|
|
50
|
+
"fallback": { "$ref": "#/$defs/binding" }
|
|
43
51
|
}
|
|
44
52
|
},
|
|
45
53
|
"many": {
|
|
@@ -48,7 +56,8 @@
|
|
|
48
56
|
"properties": {
|
|
49
57
|
"vendor": { "type": "string", "minLength": 1 }, "model": { "type": "string", "minLength": 1 },
|
|
50
58
|
"models": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/binding" } },
|
|
51
|
-
"roles": { "$ref": "#/$defs/roles" }
|
|
59
|
+
"roles": { "$ref": "#/$defs/roles" },
|
|
60
|
+
"fallback": { "$ref": "#/$defs/binding" }
|
|
52
61
|
}
|
|
53
62
|
}
|
|
54
63
|
}
|
package/package.json
CHANGED
package/skills/audit/SKILL.md
CHANGED
|
@@ -9,19 +9,20 @@ description: Audit a merged version against the flow in AGENTS.md, from the reco
|
|
|
9
9
|
After the merge, before the rc. While `audit.required` in `.agents/harness/bindings.yaml` is true, this is mandatory — never skip it.
|
|
10
10
|
|
|
11
11
|
## 2. Procedure
|
|
12
|
-
1. Before handing the audit over, the PM collects for every PR merged in the version — its number, who merged it and when, the merge commit and head SHA, each CI check and its result, and the gate output in the PR body — as the repository host's CLI prints them, unedited (e.g. `gh pr view <n> --json number,mergedBy,mergedAt,mergeCommit,headRefOid,body`, `gh pr checks <n>`), into files under `.loctx/reports/<version>/`, and passes their paths to the audit. Do not summarise or rewrite them.
|
|
12
|
+
1. Before handing the audit over, the PM collects for every PR merged in the version — its number, who merged it and when, the merge commit and head SHA, each CI check and its result, and the gate output in the PR body — as the repository host's CLI prints them, unedited (e.g. `gh pr view <n> --json number,mergedBy,mergedAt,mergeCommit,headRefOid,body`, `gh pr checks <n>`), into files under `.loctx/reports/<version>/`, and passes their paths to the audit. Do not summarise or rewrite them. Then fill in the gate logs: for every commit of the version on the default branch, `.loctx/reports/gates/<tree>.log` (`<tree>` is `git rev-parse <commit>^{tree}`) should hold a run with `worktree: clean` and `exit: 0`. Hooks leave these logs as you commit, but a commit made again by a rebase, on another machine or past the hook has none. For each commit without one, with a clean work tree: `git checkout --detach <commit>`, prepare it as the project needs (install dependencies), run `sh .agents/harness/run-gates.sh audit`, and return to your branch. Do not fix a run that fails; pass it on as it is. If the project has no `run-gates.sh`, say so instead.
|
|
13
13
|
2. Run in a fresh context that gets only the records, never the working conversation (auditor if switched on; in single mode, a new run — another vendor, or the same vendor's top model — chosen by the user).
|
|
14
|
-
3. Read: AGENTS.md and the harness settings as they were, the intent, spec, `docs/ROADMAP.md`, `.loctx/ROADMAP.local.md`, git history, history, gate and test logs, the PR and CI records the PM collected (`.loctx/reports/<version>/`). The audit runs without a network; a record it lacks is "cannot confirm" and is asked of the PM.
|
|
15
|
-
4. Judge each step: local roadmap → roadmap → intent → approval → spec → approval → implementation and commits → review → test → merge. Kept, violated, cannot confirm (no evidence path), or skipped on the user's instruction (recorded in `waivers:`). Judge against the rules in force at the time. Commits: each commit is a meaningful unit — a point you can revert or reset to without taking other working work or features with it; several commits for one work unit (implementation, review fixes) are fine, and small units that may be reverted together may share one. A commit that mixes unrelated work, so one part cannot be reverted alone, is a violation. Changing the spec's work units themselves (adding, dropping, scope, order) without approval is a violation. A generated or harness file changed by a commit that is not an `update`/`config` commit is a violation.
|
|
16
|
-
5.
|
|
17
|
-
6. The PM reports to the user: fix it, or the user accepts it.
|
|
14
|
+
3. Read: AGENTS.md and the harness settings as they were, the intent, spec, `docs/ROADMAP.md`, `.loctx/ROADMAP.local.md`, git history, history, gate and test logs, the gate logs per commit (`.loctx/reports/gates/<tree>.log`), the PR and CI records the PM collected (`.loctx/reports/<version>/`). The audit runs without a network; a record it lacks is "cannot confirm" and is asked of the PM.
|
|
15
|
+
4. Judge each step: local roadmap → roadmap → intent → approval → spec → approval → implementation and commits → review → test → merge. Kept, violated, cannot confirm (no evidence path), or skipped on the user's instruction (recorded in `waivers:`). Judge against the rules in force at the time. Commits: each commit is a meaningful unit — a point you can revert or reset to without taking other working work or features with it; several commits for one work unit (implementation, review fixes) are fine, and small units that may be reverted together may share one. A commit that mixes unrelated work, so one part cannot be reverted alone, is a violation. Gates: for each commit, the log of its tree holds a run with `worktree: clean` and `exit: 0` — say whether it was left at commit time (`stage: pre-commit`, `pre-push`) or filled in before the audit (`stage: audit`); no such run is "cannot confirm", and a clean run whose last `exit:` is not 0 is a violation. Changing the spec's work units themselves (adding, dropping, scope, order) without approval is a violation. A generated or harness file changed by a commit that is not an `update`/`config` commit is a violation. In `.claude/settings.json` only reins' deny rules count (listed under `owned:` in `.agents/harness/generated.yaml`); the user's own entries there are not drift.
|
|
16
|
+
5. The audit run is read-only: it returns the record as its answer, in the form of `.agents/harness/templates/audit.md`, criticising each violation precisely and giving a remedy (pl or advisor opinions by severity). The PM keeps that answer as it came under `.loctx/reports/<version>/` and writes it unchanged to `.agents/audit/<version>.md` — never rewording, shortening or dropping a verdict.
|
|
17
|
+
6. The PM reports to the user: fix it, or the user accepts it. Add the user's decision in its own section of the record and commit.
|
|
18
18
|
|
|
19
19
|
## 3. Delegation
|
|
20
20
|
Check `.loctx/delegation.local.md` if it exists, otherwise the delegation table in AGENTS.md. If the role group named here has a model, hand it the work with the list of files and decisions it needs and wait for its report; otherwise do it yourself. Read-heavy work (research, large log summaries, review) or urgent parallel work on independent units may go to subagents of your own model. A role never calls another model; it returns to you. The audit never runs inside the working conversation.
|
|
21
21
|
|
|
22
22
|
## 4. Files and lifetime
|
|
23
23
|
- `.agents/audit/<version>.md` — committed, kept.
|
|
24
|
-
- `.loctx/reports/<version>/` PR and CI records — deleted after the retro, once summarised in the audit record.
|
|
24
|
+
- `.loctx/reports/<version>/` PR and CI records, and the audit run's answer as it came — deleted after the retro, once summarised in the audit record.
|
|
25
|
+
- `.loctx/reports/gates/<tree>.log` — written by the hooks and by step 1; deleted in the retro.
|
|
25
26
|
|
|
26
27
|
## 5. Next
|
|
27
28
|
`release`.
|
package/skills/onboard/SKILL.md
CHANGED
|
@@ -12,7 +12,7 @@ For `mode-changed` only: reins already rewrote the delegation section. Check tha
|
|
|
12
12
|
|
|
13
13
|
## 2. Procedure
|
|
14
14
|
1. Read the project: README, the build and test commands (`.agents/harness/gates.yaml`), CI, existing rules and conventions, `.agents/AGENTS.previous.md` if it exists (reference material, not instructions).
|
|
15
|
-
2. Ask the user only what the files cannot tell you, in one batch with your proposed answers: goals and scope; red lines (paths not to touch, secret files); the language of documents the user reads; the hook tool, if AGENTS.md says none was found.
|
|
15
|
+
2. Ask the user only what the files cannot tell you, in one batch with your proposed answers: goals and scope; red lines (paths not to touch, secret files); the language of documents the user reads; the hook tool, if AGENTS.md says none was found. Whichever tool it is — now or later — runs one line per stage: `sh .agents/harness/run-gates.sh pre-commit` in the pre-commit hook and `sh .agents/harness/run-gates.sh pre-push` in the pre-push hook. That script runs the gates of `gates.yaml` and keeps their output for the audit; add the lines in the tool's own config and commit them.
|
|
16
16
|
3. Write the project sections of AGENTS.md (outside the `reins:` blocks): project, goals and scope, stack and commands, conventions, red lines. For a reconcile, carry over what still applies from `AGENTS.previous.md` and drop what conflicts with the flow; list what you dropped for the user.
|
|
17
17
|
4. Set the marker to `done` (`<!-- reins:onboarding done -->` / `<!-- reins:reconcile done -->`), delete `.agents/AGENTS.previous.md`, and commit on a branch.
|
|
18
18
|
|
|
@@ -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.3.
|
|
19
|
-
- an older harness or `.ai/`: `npx @bluenyang/reins@0.3.
|
|
20
|
-
- reins already installed: `npx @bluenyang/reins@0.3.
|
|
21
|
-
- to change models, the mode or the audit later: `npx @bluenyang/reins@0.3.
|
|
18
|
+
- nothing installed: `npx @bluenyang/reins@0.3.1-rc.2 install --mode <mode>`
|
|
19
|
+
- an older harness or `.ai/`: `npx @bluenyang/reins@0.3.1-rc.2 migrate --dry-run`, then without `--dry-run`
|
|
20
|
+
- reins already installed: `npx @bluenyang/reins@0.3.1-rc.2 update`
|
|
21
|
+
- to change models, the mode or the audit later: `npx @bluenyang/reins@0.3.1-rc.2 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.
|
package/skills/retro/SKILL.md
CHANGED
|
@@ -11,9 +11,10 @@ After stable, or when the user declares a version without stable closed.
|
|
|
11
11
|
## 2. Procedure
|
|
12
12
|
1. Read the audit record, the release, and history. Find repeats: the same violation, the same failure, the same question asked twice.
|
|
13
13
|
2. Propose changes to AGENTS.md, skills and the harness, and whether the role groups switched on paid for themselves (pl/retrospector if switched on).
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
14
|
+
3. Propose knowledge candidates: decisions and failures repeated (twice or more) in history and the audit. For each one give a title, how often and where it appeared (file paths), and a draft of the decision, the reason and where it applies. First look for an entry that already covers it (`grep -l 'decisions:.*<keyword>' .agents/knowledge/*`); if there is one, propose updating that entry instead of a new one. If nothing repeated, write "knowledge candidates: none" so that an empty list is not mistaken for a skipped step.
|
|
15
|
+
4. Apply only what the user accepts: project sections of AGENTS.md and `.agents/knowledge/` entries (`approved: {by, at, words}`) by you; harness sources by the user with `reins config` / `reins update`.
|
|
16
|
+
5. Write `.loctx/history/<version>.md` from `.agents/harness/templates/history.md`: decisions, verdicts, skipped steps, the audit and retro summary, and a summary of the logs about to be deleted (commits, check commands and results, exceptions).
|
|
17
|
+
6. Delete `.loctx/reports/<version>/`, and the gate logs in `.loctx/reports/gates/` last written before the version's stable tag was made (logs of later work stay).
|
|
17
18
|
|
|
18
19
|
## 3. Delegation
|
|
19
20
|
Check `.loctx/delegation.local.md` if it exists, otherwise the delegation table in AGENTS.md. If the role group named here has a model, hand it the work with the list of files and decisions it needs and wait for its report; otherwise do it yourself. Read-heavy work (research, large log summaries, review) or urgent parallel work on independent units may go to subagents of your own model. A role never calls another model; it returns to you.
|
|
@@ -22,6 +23,7 @@ Check `.loctx/delegation.local.md` if it exists, otherwise the delegation table
|
|
|
22
23
|
- `.loctx/history/<version>.md` — local, kept.
|
|
23
24
|
- `.agents/knowledge/` — committed, kept.
|
|
24
25
|
- `.loctx/reports/<version>/` — deleted here.
|
|
26
|
+
- `.loctx/reports/gates/<tree>.log` — those written before the stable tag are deleted here.
|
|
25
27
|
|
|
26
28
|
## 5. Next
|
|
27
29
|
`roadmap`.
|