@redue/cli 0.1.0-alpha.6 → 0.1.0-alpha.7
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/CHANGELOG.md +12 -0
- package/docs/user/agents.md +64 -19
- package/docs/user/getting-started.md +5 -3
- package/package.json +1 -1
- package/src/agent-integration.mjs +9 -5
- package/src/agent-policy.md +25 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.7 — 2026-10-07
|
|
4
|
+
|
|
5
|
+
- Guide explicitly configured direct-compiler reuse through one caller-aware
|
|
6
|
+
synchronized query; skip reuse queries when fresh execution is already required.
|
|
7
|
+
- Update intact project-local agent instructions safely; installation alone does
|
|
8
|
+
not update them. See the [existing-user procedure](docs/user/agents.md#update-an-existing-connection).
|
|
9
|
+
- In the finite Codex/macOS comparison, revised guidance reached eligible evidence
|
|
10
|
+
and reused it in 4/4 opportunities versus 1/4; verification tool calls fell
|
|
11
|
+
from 28 to 14. Evidence semantics are unchanged. No universal compliance,
|
|
12
|
+
tail-latency or causal agent-task speedup is claimed. Claude behavior and
|
|
13
|
+
cross-host handoff remain untested.
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.6 — 2026-10-07
|
|
4
16
|
|
|
5
17
|
- Reuse guarded compiler discovery for warm direct-TypeScript decisions on macOS
|
package/docs/user/agents.md
CHANGED
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
Use the CLI with explicit project-local activation below, or add this policy to a
|
|
4
4
|
generic agent's instructions with the project owner's permission.
|
|
5
5
|
|
|
6
|
-
1.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
1. If fresh execution is already required, execute it; do not synchronize merely
|
|
7
|
+
to confirm an irrelevant reuse opportunity. Use `redue run CHECK` when recording
|
|
8
|
+
the configured check. An explicit npm-script request still requires npm.
|
|
9
|
+
2. For reuse of the explicitly configured direct compiler recipe
|
|
10
|
+
(`qualification: "npm-typescript-direct-v1"`, direct compiler command; receipt
|
|
11
|
+
`verification_recipe: "npm-direct-typescript@1"`), query once:
|
|
12
|
+
`redue --config CONFIG status --sync --json`. Do not infer a recipe from its name.
|
|
13
|
+
Cached status cannot establish its caller context. In mixed configurations,
|
|
14
|
+
assess each check's contract separately; this is not a global sync-first policy.
|
|
15
|
+
3. For other/unknown recipes, query ordinary `status --json` first and decide whether
|
|
16
|
+
synchronization is worthwhile. Ordinary status and `--short` remain cheap inspection.
|
|
17
|
+
4. Reuse only schema 1, healthy observation and the selected check's CURRENT/PASS
|
|
18
|
+
with `reuse_eligible: true`. Missing eligibility means false. A historical FAIL
|
|
19
|
+
is never green evidence. Do not rerun eligible evidence merely for freshness.
|
|
20
|
+
5. STALE requires execution when verification is needed. UNVERIFIED requires an
|
|
21
|
+
honest choice of synchronization, permitted execution or reporting the limitation.
|
|
22
|
+
Recording-only success can remain UNVERIFIED. A deliberate cheap-check rerun is
|
|
23
|
+
permitted; there are no universal platform/package-manager timing thresholds.
|
|
24
|
+
6. Use a successful synchronized response for the current decision without repeated
|
|
25
|
+
sync/explain calls unless edits, context changes or missing information require it.
|
|
26
|
+
Do not loop until green or use an earlier response after a later query fails.
|
|
18
27
|
|
|
19
28
|
`redue explain CHECK --json` gives synchronized detail, including a known changed
|
|
20
29
|
input when available. It has the same cost caveat as synchronized status.
|
|
@@ -37,9 +46,9 @@ CURRENT. Do not delete state or reset receipts to make the output green.
|
|
|
37
46
|
REDUE tells you what evidence exists and whether it still applies. It does not
|
|
38
47
|
promise that establishing applicability is cheaper than every possible check.
|
|
39
48
|
|
|
40
|
-
## Connect once (
|
|
49
|
+
## Connect once (experimental)
|
|
41
50
|
|
|
42
|
-
|
|
51
|
+
Alpha.5 and later support opt-in project-local activation and direct
|
|
43
52
|
TypeScript evidence, with fresh-session reuse demonstrated for Codex CLI 0.160.1
|
|
44
53
|
on macOS under the documented owner-approved checkout/state/socket route. CLI
|
|
45
54
|
mechanics are tested on macOS/Linux/Windows; model behavior is not claimed for
|
|
@@ -47,7 +56,7 @@ every host/platform or sandbox policy. Claude setup/removal mechanics are tested
|
|
|
47
56
|
but Claude behavior and cross-host reuse remain untested. Reuse is not guaranteed,
|
|
48
57
|
and the existing subsecond example establishes no meaningful net time saving.
|
|
49
58
|
|
|
50
|
-
After installing
|
|
59
|
+
After installing REDUE and running `redue init` in a trusted project:
|
|
51
60
|
|
|
52
61
|
```sh
|
|
53
62
|
redue agent setup codex --dry-run
|
|
@@ -62,6 +71,42 @@ setup requires `--apply`. `--dry-run` never writes. Installing REDUE or running
|
|
|
62
71
|
`init` does not connect an agent automatically. Setup does not start an observer
|
|
63
72
|
or execute verification. Use `redue start` when you want observation.
|
|
64
73
|
|
|
74
|
+
## Update an existing connection
|
|
75
|
+
|
|
76
|
+
Installing a newer package does **not** rewrite project instructions. From the
|
|
77
|
+
same project and installation, stop every observer using that installation before
|
|
78
|
+
replacing it. Keep the original config and state selection; do not create a second
|
|
79
|
+
config or delete receipts. Example for a default npm installation/config:
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
redue --config redue.config.json stop
|
|
83
|
+
npm install --global @redue/cli@alpha
|
|
84
|
+
redue --config redue.config.json agent setup codex --dry-run
|
|
85
|
+
redue --config redue.config.json agent setup codex --apply
|
|
86
|
+
redue --config redue.config.json start
|
|
87
|
+
redue --config redue.config.json status --sync --json
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Use the **same `--prefix`** as the existing npm installation when it has a custom
|
|
91
|
+
prefix, and invoke its corresponding `redue` binary. Keep your actual config path
|
|
92
|
+
on every command. For Claude, select `claude` in both setup commands. Preserve any
|
|
93
|
+
existing `--state-dir` on lifecycle/status commands; setup does not embed custom
|
|
94
|
+
state locations, so retain the documented generic instruction path if your agent
|
|
95
|
+
workflow needs an explicit custom state. PowerShell may use the existing
|
|
96
|
+
`npm.cmd`/`redue.cmd` shims without changing script policy.
|
|
97
|
+
|
|
98
|
+
Review the preview before applying. Intact owned content updates; unrelated text
|
|
99
|
+
is preserved. Edited managed content is refused, not overwritten. If refused,
|
|
100
|
+
review/reconcile those edits deliberately; do not remove ownership records to force
|
|
101
|
+
an update. Restart the observer with its original selection even if you postpone
|
|
102
|
+
updating instructions, then start a **fresh agent session** after a successful
|
|
103
|
+
update. Setup creates no verification receipt.
|
|
104
|
+
|
|
105
|
+
Managed project metadata can itself be an observed input. Prior receipts remain
|
|
106
|
+
historical evidence, but setup may make them STALE or UNVERIFIED. Reassess normally
|
|
107
|
+
and run required checks; an upgrade is not a promise that existing receipts remain
|
|
108
|
+
CURRENT. Do not suppress that invalidation or reset state.
|
|
109
|
+
|
|
65
110
|
Codex gets a short managed section in project `AGENTS.md` and
|
|
66
111
|
`.agents/skills/redue-verification/SKILL.md`. Claude Code gets a managed section
|
|
67
112
|
in `CLAUDE.md` and `.claude/skills/redue-verification/SKILL.md`. Each uses the same
|
|
@@ -107,7 +152,7 @@ proven installation mismatch.
|
|
|
107
152
|
Codex CLI 0.160.1 on macOS can use the approved exact observer-socket route while
|
|
108
153
|
other sockets and direct network access remain denied. Its independent sessions
|
|
109
154
|
receive different proxy values. Ordinary npm invocation is **not** equivalent
|
|
110
|
-
across arbitrary notifier state:
|
|
155
|
+
across arbitrary notifier state: REDUE withholds automatic npm-launcher
|
|
111
156
|
reuse. Do not change proxy settings or permissions to get green evidence.
|
|
112
157
|
|
|
113
158
|
The separate opt-in [direct local compiler recipe](direct-typescript.md) does not
|
|
@@ -124,7 +169,7 @@ performs the same bounded, read-only decision check and exits 2 when reuse is no
|
|
|
124
169
|
eligible. It neither executes verification nor grants access; synchronization
|
|
125
170
|
may run configured probes. A successful outside-shell result is insufficient.
|
|
126
171
|
|
|
127
|
-
Use the same setup command after
|
|
172
|
+
Use the same setup command after an upgrade; it updates intact managed
|
|
128
173
|
content idempotently. Changed skill text or a changed managed block causes a
|
|
129
174
|
conflict instead of an overwrite. Review your edits before retrying.
|
|
130
175
|
|
|
@@ -154,8 +199,8 @@ paths. Other worktrees and remote containers have separate local evidence.
|
|
|
154
199
|
|
|
155
200
|
For another agent, put a short instruction in its documented project mechanism:
|
|
156
201
|
“Before deciding whether configured verification needs repeating, read REDUE's
|
|
157
|
-
agent policy,
|
|
158
|
-
|
|
202
|
+
agent policy, identify the selected recipe and use its decision query for the intended config.
|
|
203
|
+
Apply the schema/health/reuse rules.” Supply this document and the
|
|
159
204
|
[JSON contract](json.md) as the detailed policy. Review the agent's actual tool
|
|
160
205
|
trace before calling activation verified. A local npm installation does not install
|
|
161
206
|
REDUE in a remote container; that environment needs its own CLI, checkout,
|
|
@@ -57,11 +57,13 @@ prefix. Uninstalling the package does not remove local verification evidence;
|
|
|
57
57
|
`redue remove-state` is a separate, explicit action. Alpha.1 remains available as
|
|
58
58
|
historical software and is superseded for package identity, not a runtime defect.
|
|
59
59
|
|
|
60
|
-
## Upgrading
|
|
60
|
+
## Upgrading REDUE
|
|
61
61
|
|
|
62
62
|
Stop every observer using the installation before upgrading, then restart each
|
|
63
63
|
with the same config/state selection. See [the npm launcher notice](npm-launcher-notice.md)
|
|
64
|
-
for exact commands. Do not remove state or delete receipts.
|
|
64
|
+
for exact commands. Do not remove state or delete receipts. Existing agent connections require a separate
|
|
65
|
+
[preview/apply policy update](agents.md#update-an-existing-connection); installing
|
|
66
|
+
the package alone does not update project instructions.
|
|
65
67
|
|
|
66
68
|
## First project
|
|
67
69
|
|
|
@@ -90,7 +92,7 @@ reusability. Qualification can change when configuration or installation changes
|
|
|
90
92
|
|
|
91
93
|
`run` streams normal output and preserves execution environment and cancellation.
|
|
92
94
|
For the narrow pnpm TypeScript contract, `init` explicitly shows the direct installed
|
|
93
|
-
compiler invocation it selects.
|
|
95
|
+
compiler invocation it selects. Npm scripts remain recording-only;
|
|
94
96
|
use `redue init --recipe typescript-direct --dry-run` to preview a distinct,
|
|
95
97
|
explicit [local compiler recipe](direct-typescript.md). Other scripts run through
|
|
96
98
|
the package manager. No existing configuration is silently migrated.
|
package/package.json
CHANGED
|
@@ -45,15 +45,19 @@ function saved(root,host){const text=read(root,marker(host));if(text===null)retu
|
|
|
45
45
|
const value=JSON.parse(text),h=hosts[host];
|
|
46
46
|
if(value.schema!==1||value.host!==host||value.instruction!==h.instruction||value.skill!==h.skill||
|
|
47
47
|
typeof value.config!=='string'||path.isAbsolute(value.config)||value.config.includes('/')||value.config.includes('\\')||
|
|
48
|
-
value.block!==blockFor(host,value.config)||
|
|
48
|
+
(value.block!==blockFor(host,value.config)&&value.block!==blockFor(host,value.config,true))||
|
|
49
49
|
typeof value.skillHash!=='string'||typeof value.instructionCreated!=='boolean')
|
|
50
50
|
throw Error('unrecognized agent ownership record; inspect it without deleting user content');
|
|
51
51
|
return value;
|
|
52
52
|
}
|
|
53
|
-
|
|
53
|
+
// Accept only these exact owned template versions; never arbitrary stored text.
|
|
54
|
+
function blockFor(host,relative,legacy=false){return `\n\n<!-- REDUE:${host}:begin -->\n`+
|
|
54
55
|
`Before deciding whether configured verification needs repeating, use REDUE.\n`+
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
(legacy?`Read ${hosts[host].skill} for the decision policy, then query ordinary status\n`+
|
|
57
|
+
`before choosing reuse or execution. Only healthy schema-1 CURRENT/PASS with\n`:
|
|
58
|
+
`Read ${hosts[host].skill}: verify the selected recipe, use caller-aware sync\n`+
|
|
59
|
+
`for direct-compiler reuse, and execute fresh obligations without a reuse query.\n`+
|
|
60
|
+
`Only healthy schema-1 CURRENT/PASS with\n`)+
|
|
57
61
|
`explicit reuse_eligible=true permits reuse; honor fresh-run requests and other\n`+
|
|
58
62
|
`project verification obligations. Reassess after edits or failed queries.\n`+
|
|
59
63
|
`Selected config (JSON path relative to this file's directory): ${JSON.stringify(relative)}.\n`+
|
|
@@ -63,7 +67,7 @@ function blockFor(host,relative){return `\n\n<!-- REDUE:${host}:begin -->\n`+
|
|
|
63
67
|
function skillFor(relative){return policy+`\nSelected configuration\n\n`+
|
|
64
68
|
`The configuration path, relative to the project instruction file's directory, is\n`+
|
|
65
69
|
`${JSON.stringify(relative)} (a JSON string, not shell code). From that directory use\n`+
|
|
66
|
-
|
|
70
|
+
`the policy-selected \`redue --config CONFIG ...\` command, replacing CONFIG with one quoted\n`+
|
|
67
71
|
`path argument. Apply the same --config to run, explain, start and stop. From a\n`+
|
|
68
72
|
`nested directory use the corresponding relative config path. Do not guess among\n`+
|
|
69
73
|
`multiple configs. Receipts are local to the selected checkout/configuration.\n`;}
|
package/src/agent-policy.md
CHANGED
|
@@ -3,11 +3,30 @@ name: redue-verification
|
|
|
3
3
|
description: Decide whether configured verification needs running, using REDUE evidence before verification and completion decisions.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
Apply the selected configuration below to every command. First distinguish an
|
|
7
|
+
execution obligation from a reuse decision:
|
|
8
|
+
|
|
9
|
+
- If fresh execution is explicitly requested or independently required, execute
|
|
10
|
+
it without a reuse query that cannot change that decision. Use `redue run CHECK`
|
|
11
|
+
to record the configured check. An explicit npm-script request requires npm,
|
|
12
|
+
not a direct compiler substitute.
|
|
13
|
+
- To evaluate reuse for a check whose selected config has
|
|
14
|
+
`qualification: "npm-typescript-direct-v1"` and the direct compiler command
|
|
15
|
+
(or whose receipt metadata has `verification_recipe: "npm-direct-typescript@1"`
|
|
16
|
+
consistent with that config), use one `redue --config CONFIG status --sync --json`
|
|
17
|
+
directly. Cached status cannot establish this recipe's caller eligibility.
|
|
18
|
+
Do not infer the recipe from a check's name or precede sync with cached status
|
|
19
|
+
solely as a ritual. Evaluate each check separately in mixed configurations.
|
|
20
|
+
- For other or unidentified recipes, start with ordinary `status --json` and
|
|
21
|
+
choose sync or execution from its evidence. Cached status and `--short` remain
|
|
22
|
+
cheap inspection, not caller-aware proof. A deliberate inexpensive rerun is
|
|
23
|
+
still permitted; there are no universal OS/package-manager cost thresholds.
|
|
24
|
+
|
|
25
|
+
Use one successful, still-applicable synchronized response for the current
|
|
26
|
+
decision; do not repeat sync/explain without edits, context changes or missing
|
|
27
|
+
information. Do not loop until green. Reassess after changes, observation loss or
|
|
28
|
+
a later failed query; earlier CURRENT is not continuing authority. There is no
|
|
29
|
+
time-based authorization or atomic guarantee against concurrent edits.
|
|
11
30
|
|
|
12
31
|
Read schema 1 JSON. Reuse only when the read succeeds, `schema` is 1,
|
|
13
32
|
`observation.healthy` is true, and the selected check has all three:
|
|
@@ -29,8 +48,7 @@ checks merely for freshness.
|
|
|
29
48
|
lifecycle scripts. Inspect the configuration/verification_recipe before claiming
|
|
30
49
|
what ran. An explicit request for `npm run typecheck` requires that npm invocation;
|
|
31
50
|
direct compiler evidence does not satisfy it.
|
|
32
|
-
-
|
|
33
|
-
verification obligations still apply. REDUE covers only configured checks.
|
|
51
|
+
- REDUE covers only configured checks, not every task-specific verification obligation.
|
|
34
52
|
|
|
35
53
|
Use `redue explain CHECK --json` for synchronized detail (also potentially costly).
|
|
36
54
|
`changed_inputs` can be incomplete; an empty list does not establish no changes.
|