instar 1.2.68 → 1.2.70
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/dist/commands/server.js +1 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +9 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/StandardsRegistryParser.d.ts +50 -0
- package/dist/core/StandardsRegistryParser.d.ts.map +1 -0
- package/dist/core/StandardsRegistryParser.js +120 -0
- package/dist/core/StandardsRegistryParser.js.map +1 -0
- package/dist/core/installCodexHooks.d.ts.map +1 -1
- package/dist/core/installCodexHooks.js +7 -2
- package/dist/core/installCodexHooks.js.map +1 -1
- package/dist/core/reviewers/standards-conformance.d.ts +49 -0
- package/dist/core/reviewers/standards-conformance.d.ts.map +1 -0
- package/dist/core/reviewers/standards-conformance.js +120 -0
- package/dist/core/reviewers/standards-conformance.js.map +1 -0
- package/dist/core/types.d.ts +10 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.d.ts +65 -0
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.d.ts.map +1 -0
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.js +178 -0
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.js.map +1 -0
- package/dist/server/AgentServer.d.ts +2 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +19 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +1 -0
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/specReviewRoutes.d.ts +32 -0
- package/dist/server/specReviewRoutes.d.ts.map +1 -0
- package/dist/server/specReviewRoutes.js +120 -0
- package/dist/server/specReviewRoutes.js.map +1 -0
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +3 -3
- package/upgrades/1.2.69.md +73 -0
- package/upgrades/1.2.70.md +72 -0
- package/upgrades/side-effects/codex-parity-canary-scope-coherence.md +34 -0
- package/upgrades/side-effects/standards-conformance-gate.md +87 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Side-effects review — standards-conformance gate
|
|
2
|
+
|
|
3
|
+
**Scope**: Make the living constitution enforceable — a code-backed reviewer that
|
|
4
|
+
reads `docs/STANDARDS-REGISTRY.md` and signals possible standard-violations in a
|
|
5
|
+
draft spec, turning the manual/prompt-driven conformance pass into structure. The
|
|
6
|
+
rung-3 normative slice; directly fixes `[[feedback_spec_review_against_standards]]`
|
|
7
|
+
(the North Star draft violated No-Manual-Work, review missed it, Justin caught it).
|
|
8
|
+
Spec: `docs/specs/standards-conformance-gate.md` (approved; Claude-authored +
|
|
9
|
+
manual review — see honest convergence note).
|
|
10
|
+
|
|
11
|
+
**Files touched**:
|
|
12
|
+
- `src/core/StandardsRegistryParser.ts` — NEW. Deterministic parse of the
|
|
13
|
+
constitution into `{family,name,rule,inPractice}[]` (tracks the five standards
|
|
14
|
+
`##` families so non-article `###` sections — Genesis etc. — are excluded);
|
|
15
|
+
`runRegistryCanary` (state-detector: ≥15 articles + anchor articles present).
|
|
16
|
+
- `src/core/reviewers/standards-conformance.ts` — NEW. `StandardsConformanceReviewer`:
|
|
17
|
+
injected `IntelligenceProvider` (subscription path), anti-injection prompt (spec
|
|
18
|
+
fenced as untrusted data), degrade-safe (no provider/throw/unparseable → empty
|
|
19
|
+
report), drops hallucinated standards not in the registry, `capable` tier.
|
|
20
|
+
- `src/server/specReviewRoutes.ts` — NEW. `POST /spec/conformance-check` (markdown
|
|
21
|
+
or specPath, traversal-guarded) → report + registry canary; `GET
|
|
22
|
+
/spec/conformance-metrics`; file-backed metrics (reloads on restart); 503-stub
|
|
23
|
+
when disabled. Exports `runConformanceCheck` for the (deferred) CLI.
|
|
24
|
+
- `src/server/AgentServer.ts` — mount the routes; new optional `intelligence` in
|
|
25
|
+
`AgentServerOptions`.
|
|
26
|
+
- `src/commands/server.ts` — pass `intelligence: sharedIntelligence` to AgentServer.
|
|
27
|
+
- `src/server/CapabilityIndex.ts` — `spec` → `INTERNAL_PREFIXES`.
|
|
28
|
+
- `src/config/ConfigDefaults.ts` + `src/core/types.ts` — `specReview.conformance.enabled`
|
|
29
|
+
default true (auto init+migration).
|
|
30
|
+
- `docs/specs/06-state-detector-registry.md` — registry-parser row.
|
|
31
|
+
- Tests: unit/integration/e2e for the gate; updated `capabilities-discoverability`
|
|
32
|
+
to scan `specReviewRoutes.ts` (so the `spec` INTERNAL prefix resolves).
|
|
33
|
+
|
|
34
|
+
**Under-block**: The gate SIGNALS only — it cannot block anything in v1 (no code
|
|
35
|
+
path grants it authority), so it cannot wrongly stop a spec. The registry canary
|
|
36
|
+
runs on every check; a drifted/partial registry surfaces in the response
|
|
37
|
+
(`registryCanary.ok=false`) rather than silently producing a clean report. The
|
|
38
|
+
traversal guard rejects specPath escaping specsDir.
|
|
39
|
+
|
|
40
|
+
**Over-block**: None possible — signal-only. A false-positive finding costs one
|
|
41
|
+
advisory line in a report the human reads, never a blocked commit.
|
|
42
|
+
|
|
43
|
+
**Level-of-abstraction fit**: The constitution stays the single source of truth
|
|
44
|
+
(the parser reads it; nothing duplicates the standards). The reviewer reuses the
|
|
45
|
+
established LLM-reviewer pattern (injected provider, anti-injection, fail-open)
|
|
46
|
+
rather than a bespoke LLM client. The route is a thin surface over parser +
|
|
47
|
+
reviewer. Signal-vs-authority is structural: the reviewer has no `block` path.
|
|
48
|
+
|
|
49
|
+
**Signal vs authority**: The whole feature is a signal producer. The human
|
|
50
|
+
ratification + the instar-dev `approved:true` gate retain all authority. Promotion
|
|
51
|
+
to a blocking/warn signal in the precommit gate is the tracked `scg-blocking-authority`
|
|
52
|
+
follow-up, gated on measured precision.
|
|
53
|
+
|
|
54
|
+
**Interactions**:
|
|
55
|
+
- Reads `docs/STANDARDS-REGISTRY.md` from `config.projectDir/docs`. For Echo (repo
|
|
56
|
+
checkout) it's present; a deployed agent without the repo docs gets a clean 503
|
|
57
|
+
("constitution unreadable") — correct (the gate is a build-time tool, inert where
|
|
58
|
+
there's no constitution).
|
|
59
|
+
- Adds one `capable`-tier LLM call per conformance check (per-spec, rare) through
|
|
60
|
+
`sharedIntelligence` — degrade-safe, never blocks spec work if the provider is down.
|
|
61
|
+
- New `intelligence` option on AgentServer is additive (optional); existing
|
|
62
|
+
construction unaffected.
|
|
63
|
+
- File-backed metrics at `stateDir/spec-conformance-metrics.json` (atomic
|
|
64
|
+
temp+rename); corrupt → fresh.
|
|
65
|
+
|
|
66
|
+
**External surfaces**:
|
|
67
|
+
- `POST /spec/conformance-check`, `GET /spec/conformance-metrics` (INTERNAL prefix).
|
|
68
|
+
- New config `specReview.conformance.enabled` (default true).
|
|
69
|
+
- New exported `runConformanceCheck` (for the deferred CLI).
|
|
70
|
+
|
|
71
|
+
**Deferred (tracked)**: `instar spec conformance` CLI (`scg-cli`) — thin wrapper
|
|
72
|
+
over `runConformanceCheck`; the route delivers the capability. Auto-blocking
|
|
73
|
+
authority (`scg-blocking-authority`). Richer markdown parser (`scg-richer-parser`).
|
|
74
|
+
|
|
75
|
+
**Rollback cost**: Low, strictly additive. Remove the routes + reviewer + parser;
|
|
76
|
+
the constitution returns to being read only by the manual `/spec-converge` pass
|
|
77
|
+
(today's state). No existing runtime path is modified.
|
|
78
|
+
|
|
79
|
+
**Migration parity**: New server-side code + routes + config default (init +
|
|
80
|
+
`migrateConfig` via ConfigDefaults) + INTERNAL prefix. The parser reads a
|
|
81
|
+
repo-shipped doc (no per-agent state). No hook/template/skill-file change.
|
|
82
|
+
|
|
83
|
+
**Convergence honesty**: Claude-authored + manual review only; full
|
|
84
|
+
`/spec-converge` + `/crossreview` multi-model tooling absent on host. Ratified by
|
|
85
|
+
Justin with that caveat explicit. CI + the known-violating-spec e2e are the
|
|
86
|
+
strongest current evidence; a fuller multi-model review remains advisable —
|
|
87
|
+
fittingly, this is the tool that would make that conformance pass structural.
|