@bluenyang/reins 0.1.5 → 0.2.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.
@@ -12,8 +12,9 @@
12
12
  "roles": {
13
13
  "type": "object",
14
14
  "additionalProperties": {
15
- "type": "object", "required": ["model"],
16
- "properties": { "model": { "type": "string", "minLength": 1 } }
15
+ "type": "object",
16
+ "anyOf": [{ "required": ["model"] }, { "required": ["enabled"] }],
17
+ "properties": { "model": { "type": "string", "minLength": 1 }, "enabled": { "type": "boolean" } }
17
18
  }
18
19
  }
19
20
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bluenyang/reins",
3
- "version": "0.1.5",
3
+ "version": "0.2.0",
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": {
@@ -38,6 +38,7 @@
38
38
  "prepare": "husky"
39
39
  },
40
40
  "dependencies": {
41
+ "@clack/prompts": "^1.8.1",
41
42
  "ajv": "^8.20.0",
42
43
  "commander": "^14.0.0",
43
44
  "yaml": "^2.9.1"
@@ -19,6 +19,8 @@ Resume: `reins status` names the stage; call that stage's skill again. Stop on a
19
19
 
20
20
  **Models.** Take the model a role runs on from `reins status --json` (`bindings`: `{role, vendor, model, source}`) — your own override, else the team binding, else its fallback, else pm's model. Never read `bindings.yaml` for it and never use the default from the role file.
21
21
 
22
+ **Off roles.** A role whose `bindings` entry has `enabled: false` is switched off for this user: do not call it. Its `covered_by` does the work (`caller`: the role that needs the lookup searches itself; `user`: ask the user), keeps the off role's `must_not`, and hands a judgement on its own work to the next role of the chain (pl → pm → advisor → user). A role with `enabled: true` but no `.claude/agents/reins-<role>.md` is on only through the user's local file (the team switched it off): call it on its resolved `model` from `reins status --json` — on Claude, a general subagent given the role file's body (`.agents/harness/roles/<role>.md`).
23
+
22
24
  **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.
23
25
 
24
26
  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.
@@ -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.5 …`
9
+ the answers only the user can give and report what happened. Run the CLI as `npx @bluenyang/reins@0.2.0 …`
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}`.
@@ -22,6 +22,8 @@ user confirms it.
22
22
  vendors to use (show the detected ones) · language of the documents the user reads · public repository?
23
23
  3. **Apply** non-interactively: `reins install <tier> --mode auto` (or `reins migrate <tier> --mode auto`).
24
24
  Then adjust what the user changed: `reins configure bindings --set <role>=<model> …`.
25
+ The user can also change bindings and switch roles on or off themselves in a terminal with `reins config`;
26
+ as the agent, keep using the flag form (`reins configure bindings --set …`, `--disable|--enable`).
25
27
  4. **Gates.** Show `.agents/harness/gates.yaml`; run `reins gate` once. A gate that fails or mutates files is
26
28
  the user's call — never edit the project's scripts to make it pass.
27
29
  5. **Hooks are proposed, not added.** Show the proposal from the install notes; only on the user's yes run