devrites 3.2.2 → 3.2.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.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/docs/architecture.md +6 -2
- package/docs/command-map.md +3 -3
- package/docs/engine/agent-contract.md +3 -2
- package/docs/harness-compliance.md +2 -2
- package/docs/orchestration.md +15 -12
- package/docs/porting-to-a-new-harness.md +2 -1
- package/docs/skills.md +7 -2
- package/engine/hooks.go +39 -4
- package/engine/hooks_agent_dispatch.go +1193 -0
- package/engine/hooks_workspace.go +78 -10
- package/engine/internal/forge/forge.go +0 -2
- package/engine/internal/harness/compliance.go +1 -1
- package/engine/internal/harness/harness.go +3 -0
- package/engine/internal/lib/doubtcoverage.go +2 -12
- package/engine/internal/lib/reconcile.go +4 -29
- package/engine/internal/lib/reconcile_test.go +14 -10
- package/engine/main.go +4 -1
- package/engine/tests/hook_test.go +874 -1
- package/engine/tests/lib_parity_test.go +5 -17
- package/engine/tests/parity_reconcile_test.go +1 -1
- package/engine/tests/parity_test.go +2 -6
- package/pack/.claude/skills/devrites-api-interface/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-audit/SKILL.md +5 -6
- package/pack/.claude/skills/devrites-browser-proof/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-debug-recovery/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-doubt/SKILL.md +2 -1
- package/pack/.claude/skills/devrites-frontend-craft/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-interview/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-lib/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-lib/reference/model-tiers.md +4 -3
- package/pack/.claude/skills/devrites-lib/reference/parallel-dispatch.md +4 -5
- package/pack/.claude/skills/devrites-lib/reference/standards/agents.md +14 -8
- package/pack/.claude/skills/devrites-prose-craft/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-refresh-indexes/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-source-driven/SKILL.md +1 -0
- package/pack/.claude/skills/devrites-ux-shape/SKILL.md +1 -0
- package/pack/.claude/skills/rite/SKILL.md +1 -0
- package/pack/.claude/skills/rite-adopt/SKILL.md +1 -0
- package/pack/.claude/skills/rite-autocomplete/SKILL.md +1 -0
- package/pack/.claude/skills/rite-build/SKILL.md +2 -1
- package/pack/.claude/skills/rite-build/reference/phase-contract.md +3 -4
- package/pack/.claude/skills/rite-build/reference/wright-dispatch.md +11 -12
- package/pack/.claude/skills/rite-clarify/SKILL.md +1 -0
- package/pack/.claude/skills/rite-converge/SKILL.md +1 -0
- package/pack/.claude/skills/rite-customize/SKILL.md +1 -0
- package/pack/.claude/skills/rite-define/SKILL.md +1 -0
- package/pack/.claude/skills/rite-doctor/SKILL.md +1 -0
- package/pack/.claude/skills/rite-dogfood/SKILL.md +1 -0
- package/pack/.claude/skills/rite-explain/SKILL.md +4 -2
- package/pack/.claude/skills/rite-frame/SKILL.md +1 -0
- package/pack/.claude/skills/rite-handoff/SKILL.md +1 -0
- package/pack/.claude/skills/rite-learn/SKILL.md +1 -0
- package/pack/.claude/skills/rite-plan/SKILL.md +1 -0
- package/pack/.claude/skills/rite-polish/SKILL.md +1 -0
- package/pack/.claude/skills/rite-pov/SKILL.md +1 -0
- package/pack/.claude/skills/rite-pr-feedback/SKILL.md +1 -0
- package/pack/.claude/skills/rite-pressure-test/SKILL.md +1 -0
- package/pack/.claude/skills/rite-prototype/SKILL.md +1 -0
- package/pack/.claude/skills/rite-prove/SKILL.md +1 -0
- package/pack/.claude/skills/rite-quick/SKILL.md +1 -0
- package/pack/.claude/skills/rite-resolve/SKILL.md +1 -0
- package/pack/.claude/skills/rite-review/SKILL.md +1 -0
- package/pack/.claude/skills/rite-seal/SKILL.md +1 -0
- package/pack/.claude/skills/rite-seal/reference/phase-contract.md +2 -3
- package/pack/.claude/skills/rite-seal/reference/risk-and-rollback.md +10 -12
- package/pack/.claude/skills/rite-ship/SKILL.md +1 -0
- package/pack/.claude/skills/rite-spec/SKILL.md +1 -0
- package/pack/.claude/skills/rite-status/SKILL.md +1 -0
- package/pack/.claude/skills/rite-temper/SKILL.md +3 -2
- package/pack/.claude/skills/rite-upgrade/SKILL.md +3 -1
- package/pack/.claude/skills/rite-vet/SKILL.md +1 -0
- package/pack/.claude/skills/rite-zoom-out/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-api-interface/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-audit/SKILL.md +5 -6
- package/pack/generated/claude/skills/devrites-browser-proof/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-debug-recovery/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-doubt/SKILL.md +2 -1
- package/pack/generated/claude/skills/devrites-frontend-craft/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-interview/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-lib/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-lib/reference/model-tiers.md +4 -3
- package/pack/generated/claude/skills/devrites-lib/reference/parallel-dispatch.md +4 -5
- package/pack/generated/claude/skills/devrites-lib/reference/standards/agents.md +14 -8
- package/pack/generated/claude/skills/devrites-prose-craft/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-refresh-indexes/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-source-driven/SKILL.md +1 -0
- package/pack/generated/claude/skills/devrites-ux-shape/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-adopt/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-autocomplete/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-build/SKILL.md +2 -1
- package/pack/generated/claude/skills/rite-build/reference/phase-contract.md +3 -4
- package/pack/generated/claude/skills/rite-build/reference/wright-dispatch.md +11 -12
- package/pack/generated/claude/skills/rite-clarify/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-converge/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-customize/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-define/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-doctor/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-dogfood/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-explain/SKILL.md +4 -2
- package/pack/generated/claude/skills/rite-frame/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-handoff/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-learn/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-plan/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-polish/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-pov/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-pr-feedback/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-pressure-test/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-prototype/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-prove/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-quick/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-resolve/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-review/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-seal/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-seal/reference/phase-contract.md +2 -3
- package/pack/generated/claude/skills/rite-seal/reference/risk-and-rollback.md +10 -12
- package/pack/generated/claude/skills/rite-ship/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-spec/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-status/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-temper/SKILL.md +3 -2
- package/pack/generated/claude/skills/rite-upgrade/SKILL.md +3 -1
- package/pack/generated/claude/skills/rite-vet/SKILL.md +1 -0
- package/pack/generated/claude/skills/rite-zoom-out/SKILL.md +1 -0
- package/pack/generated/codex/AGENTS.md +2 -4
- package/pack/generated/codex/hooks.json +24 -5
- package/pack/generated/codex/skills/devrites-api-interface/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-audit/SKILL.md +10 -10
- package/pack/generated/codex/skills/devrites-browser-proof/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-debug-recovery/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-doubt/SKILL.md +7 -5
- package/pack/generated/codex/skills/devrites-frontend-craft/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-interview/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-lib/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-lib/reference/model-tiers.md +4 -3
- package/pack/generated/codex/skills/devrites-lib/reference/parallel-dispatch.md +4 -5
- package/pack/generated/codex/skills/devrites-lib/reference/standards/agents.md +14 -8
- package/pack/generated/codex/skills/devrites-prose-craft/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-refresh-indexes/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-source-driven/SKILL.md +6 -4
- package/pack/generated/codex/skills/devrites-ux-shape/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-adopt/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-autocomplete/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-build/SKILL.md +7 -5
- package/pack/generated/codex/skills/rite-build/reference/phase-contract.md +3 -4
- package/pack/generated/codex/skills/rite-build/reference/wright-dispatch.md +11 -12
- package/pack/generated/codex/skills/rite-clarify/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-converge/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-customize/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-define/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-doctor/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-dogfood/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-explain/SKILL.md +9 -6
- package/pack/generated/codex/skills/rite-frame/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-handoff/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-learn/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-plan/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-polish/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-pov/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-pr-feedback/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-pressure-test/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-prototype/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-prove/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-quick/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-resolve/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-review/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-seal/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-seal/reference/phase-contract.md +2 -3
- package/pack/generated/codex/skills/rite-seal/reference/risk-and-rollback.md +10 -12
- package/pack/generated/codex/skills/rite-ship/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-spec/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-status/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-temper/SKILL.md +8 -6
- package/pack/generated/codex/skills/rite-upgrade/SKILL.md +8 -5
- package/pack/generated/codex/skills/rite-vet/SKILL.md +6 -4
- package/pack/generated/codex/skills/rite-zoom-out/SKILL.md +6 -4
- package/package.json +1 -1
- package/scripts/codex-generate.sh +32 -18
- package/scripts/live-hosts/agent-result.schema.json +2 -1
- package/scripts/live-hosts/claude.sh +2 -2
- package/scripts/live-hosts/codex.sh +4 -0
- package/scripts/live-hosts/fake-host.py +1 -8
- package/scripts/live-hosts/host-transport.py +1 -2
- package/scripts/run-agent-contract-evals.py +3 -3
- package/scripts/run-evals.sh +3 -34
- package/scripts/validate-frontmatter.py +34 -1
- package/engine/testdata/golden/TestParityA1Guard/inline-fallback-silent.golden +0 -1
- package/engine/testdata/golden/TestParityDoubtCoverage/arg=inline.golden +0 -3
- package/engine/testdata/golden/TestParityDoubtCoverage/arg=missing-inline.golden +0 -3
- package/scripts/eval-runner.py +0 -275
- package/scripts/eval-scorer.mjs +0 -46
- package/scripts/render-eval-summary.py +0 -48
- /package/engine/testdata/golden/TestParityReconcile/{inline-fallback → close-window}/snapshot.golden +0 -0
- /package/engine/testdata/golden/TestParityReconcile/{inline-fallback.golden → close-window.golden} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to DevRites are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and DevRites adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Releases are generated automatically by [semantic-release](https://semantic-release.gitbook.io/) from Conventional Commits on `main`.
|
|
4
4
|
|
|
5
|
+
## [3.2.3](https://github.com/ViktorsBaikers/DevRites/compare/v3.2.2...v3.2.3) (2026-07-25)
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
* **agents:** enforce native specialist dispatch ([4ac3eb1](https://github.com/ViktorsBaikers/DevRites/commit/4ac3eb1a407ed8df4d3097984fbc0e369a5918b4))
|
|
10
|
+
* **agents:** satisfy staticcheck error style ([cc21c46](https://github.com/ViktorsBaikers/DevRites/commit/cc21c4600171111dc30065327a9cd0ffff2420bc))
|
|
11
|
+
* **skills:** avoid false invocation reference ([45f25bb](https://github.com/ViktorsBaikers/DevRites/commit/45f25bb70516460d753bccaa5ba78cce73e2a1d0))
|
|
12
|
+
|
|
5
13
|
## [3.2.2](https://github.com/ViktorsBaikers/DevRites/compare/v3.2.1...v3.2.2) (2026-07-25)
|
|
6
14
|
|
|
7
15
|
### Fixed
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ final commit, push, and tag, and it requires a typed `GO` confirmation.
|
|
|
25
25
|
Unattended runs may create local WIP checkpoint commits along the way, but only
|
|
26
26
|
Ship collapses and pushes them.
|
|
27
27
|
|
|
28
|
-
**Status:** [`v3.2.
|
|
28
|
+
**Status:** [`v3.2.3`](https://github.com/ViktorsBaikers/DevRites/releases/tag/v3.2.3): see [`CHANGELOG.md`](CHANGELOG.md) for release notes.
|
|
29
29
|
|
|
30
30
|
## Quick start
|
|
31
31
|
|
package/docs/architecture.md
CHANGED
|
@@ -318,7 +318,8 @@ contract.
|
|
|
318
318
|
- **Drift**: an explicit **Spec Drift Guard** in build/prove/polish/review/seal.
|
|
319
319
|
- **Design**: `devrites-frontend-craft` + a four-phase `/rite-polish` orchestrator (code + backend always; UI normalize + polish when UI is in scope).
|
|
320
320
|
- **Agents**: 18 fresh-context roles at flat depth one: 17 read-only leaves and
|
|
321
|
-
one wright.
|
|
321
|
+
one wright. Dispatch order is named, then guarded generic; if neither can
|
|
322
|
+
spawn, the workflow stops for HITL.
|
|
322
323
|
- **Review**: **feature-scoped** multi-axis review with severity labels and
|
|
323
324
|
fresh-context agents at the seal.
|
|
324
325
|
- **Scope**: clarify → seal (decide) → ship (commit → push → tag or PR,
|
|
@@ -332,7 +333,10 @@ contract.
|
|
|
332
333
|
1. **Invocation semantics are explicit in frontmatter.** `user-invocable`
|
|
333
334
|
controls whether a skill is a public command; `disable-model-invocation`
|
|
334
335
|
independently marks explicit-only public utilities and the internal
|
|
335
|
-
`devrites-lib` library.
|
|
336
|
+
`devrites-lib` library. `required-agent-roles` is the canonical list of
|
|
337
|
+
unconditional fresh-agent roles for one invocation (`none` is explicit);
|
|
338
|
+
Codex derives its fail-closed dispatch receipt from the installed mirror.
|
|
339
|
+
Model-invocable phases can still hand off and route;
|
|
336
340
|
per-phase side-effect discipline (for example, "stop after one slice") is
|
|
337
341
|
enforced in the skill **body**, because invocation flags cannot express it.
|
|
338
342
|
2. **`context: fork` used selectively.** Verified it is a real field (isolated
|
package/docs/command-map.md
CHANGED
|
@@ -144,9 +144,9 @@ the shared reference library.
|
|
|
144
144
|
Only the root dispatches; leaves never dispatch other leaves. The first
|
|
145
145
|
fallback is a generic `explorer` or `worker` that reads the same role contract,
|
|
146
146
|
but only when the host preserves the required read-only or exact-write
|
|
147
|
-
boundary. If no safe fresh-context option is available, the
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
boundary. If no safe fresh-context option is available, the workflow stops for
|
|
148
|
+
HITL. The root never executes a specialist role. Declared leaf identity and
|
|
149
|
+
scope guards fail closed. A missing or crashed engine blocks the tool call
|
|
150
150
|
instead of granting permission to continue.
|
|
151
151
|
|
|
152
152
|
## Engineering rules (`pack/.claude/skills/devrites-lib/reference/standards/`)
|
|
@@ -132,7 +132,8 @@ timeline rows remain readable beside v1 rows.
|
|
|
132
132
|
|
|
133
133
|
The v1 validator accepts only:
|
|
134
134
|
|
|
135
|
-
- `execution_mode`: `named` · `generic` · `inline` · `none
|
|
135
|
+
- `execution_mode`: `named` · `generic` · `inline` · `none` (`inline` remains
|
|
136
|
+
readable for historical telemetry; current specialist dispatch never emits it);
|
|
136
137
|
- `guard_strength`: `enforced` · `observed` · `unavailable` · `bypassed` · `n/a`;
|
|
137
138
|
- `host`: `engine` · `claude` · `codex`;
|
|
138
139
|
- registered `DRV-*` reason and rule IDs;
|
|
@@ -166,6 +167,6 @@ reasons are:
|
|
|
166
167
|
| `DRV-GIT-AMBIGUOUS-*` / `DRV-GIT-INPUT-TOO-LARGE` | direct-literal Git parser boundary |
|
|
167
168
|
| `DRV-GIT-DESTRUCTIVE-*` | destructive-operation classifier |
|
|
168
169
|
| `DRV-GIT-AUTHORITY-*` / `DRV-GIT-WORKSPACE-UNAVAILABLE` | exact one-shot authority and replay gate |
|
|
169
|
-
| `DRV-AGENT-*` | named/generic
|
|
170
|
+
| `DRV-AGENT-*` | named/generic execution, historical inline telemetry, and result reconciliation |
|
|
170
171
|
|
|
171
172
|
Add a reason to that registry before an emitting rule or eval depends on it.
|
|
@@ -40,7 +40,7 @@ the table and the code can never silently drift apart.
|
|
|
40
40
|
| Stop gate | Conditional | Conditional | all rest points | observe-only finding + manual host-specific rite-status | yes | high | Both deliver Stop; stop-gate blocks with DEVRITES_STOP_GATE=enforce or DEVRITES_HOOK_PROFILE=strict. |
|
|
41
41
|
| SubagentStart discipline injection | Native | Native | review/build fan-out | agent file preamble | yes | high | subagent-orient wired on both. |
|
|
42
42
|
| Skill invocation | Native | Adapter-backed | all public rites | explicit file read | yes | high | Claude: native /rite. Codex: $rite over the mirrored .agents/skills tree. |
|
|
43
|
-
| Reviewer subagent dispatch | Native |
|
|
43
|
+
| Reviewer subagent dispatch | Native | Adapter-backed | review/seal confidence | HITL stop; no root inline review | yes | high | Codex V2 requires the exact named role and verifies its durable parent/child rollout because V2 collaboration lifecycle calls bypass hooks; V1 keeps the guarded explorer fallback. |
|
|
44
44
|
| Standards step-0 load | Native | Instruction-backed | all phases | explicit standards read | partial | medium | Claude: skill Reads core.md. Codex: an AGENTS.md directive to read it. |
|
|
45
45
|
| Project activation | Native | Conditional | Codex-only startup | inspect hooks/config, decide trust, then rerun doctor | yes | medium | Codex silently skips every .codex/ layer in an untrusted project; trust remains an operator decision after inspection. |
|
|
46
46
|
|
|
@@ -52,7 +52,7 @@ Tiers: **Native** (the harness exposes and delivers the surface directly; policy
|
|
|
52
52
|
|
|
53
53
|
The matrix above records what each host can support. The agent-contract eval
|
|
54
54
|
checks whether the complete dispatch path behaves as claimed. Its 12 scenarios
|
|
55
|
-
cover named reviewer and wright runs, generic and
|
|
55
|
+
cover named reviewer and wright runs, generic fallback and dispatch unavailability, denial
|
|
56
56
|
paths, stale or malformed results, session orientation, interruption, and
|
|
57
57
|
post-compaction recovery. Every scenario runs once on Claude and once on
|
|
58
58
|
Codex, for 24 isolated cells.
|
package/docs/orchestration.md
CHANGED
|
@@ -34,18 +34,21 @@ or out-of-scope returns before adding anything to canonical state.
|
|
|
34
34
|
|
|
35
35
|
Use the first safe option available:
|
|
36
36
|
|
|
37
|
-
1. the named project role;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
isolated staging);
|
|
41
|
-
3.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
37
|
+
1. the named project role; Codex V2 uses its exact `agent_type`, a unique
|
|
38
|
+
`task_name`, and a durable rollout proving native rules, wait, and result;
|
|
39
|
+
2. a generic V1 `explorer`/`worker` only when the host still enforces read-only
|
|
40
|
+
or exact wright scope (or isolated staging);
|
|
41
|
+
3. a HITL stop when neither safe fresh-context option is callable.
|
|
42
|
+
|
|
43
|
+
Specialist work never runs in the root context. Declared leaf identity is
|
|
44
|
+
fail-closed: a missing or crashed `devrites-engine` guard blocks the tool call.
|
|
45
|
+
Every installed skill also carries `required-agent-roles` frontmatter. Codex
|
|
46
|
+
arms those unconditional roles when the user invokes the skill and blocks Stop
|
|
47
|
+
until each role has a confirmed start, wait, and non-empty result. `none`
|
|
48
|
+
explicitly declares that the skill has no unconditional fresh-agent requirement;
|
|
49
|
+
conditional fan-out still follows the phase's documented triggers.
|
|
50
|
+
Leaves never ask the human, write `.devrites/**`, change phase, commit, push,
|
|
51
|
+
install, deploy, migrate live data, or perform irreversible actions.
|
|
49
52
|
|
|
50
53
|
## Single-writer build lifecycle
|
|
51
54
|
|
|
@@ -21,7 +21,8 @@ The harness must invoke DevRites and route to `/rite-spec` (or the host's explic
|
|
|
21
21
|
- Skill discovery path is project-local and installed by `npx devrites`.
|
|
22
22
|
- Session/project orientation runs automatically at startup/compact/resume, or the missing surface is recorded in `docs/harness-compliance.md`.
|
|
23
23
|
- `devrites-engine` hooks/gates are wired, or each degraded gate has an honest fallback and confidence label.
|
|
24
|
-
- Subagent support is mapped; if unavailable,
|
|
24
|
+
- Subagent support is mapped; if unavailable, required reviewer/wright work
|
|
25
|
+
stops for HITL rather than running in the root context.
|
|
25
26
|
- Skills, agents, standards, hooks, and harness guidance stay project-local;
|
|
26
27
|
the optional shared `devrites-engine` executable is the sole sanctioned
|
|
27
28
|
global artifact and must remain skippable with `--no-binary`.
|
package/docs/skills.md
CHANGED
|
@@ -18,6 +18,11 @@ only when needed; small utilities keep their narrower contract local. The npm
|
|
|
18
18
|
`devrites` shim bootstraps or proxies the engine directly (see
|
|
19
19
|
[`cli.md`](cli.md)).
|
|
20
20
|
|
|
21
|
+
Every canonical skill declares `required-agent-roles`. A comma-separated list
|
|
22
|
+
means those fresh agents are mandatory for a Codex invocation; `none` means no
|
|
23
|
+
agent is unconditionally required. Host generation preserves the field and
|
|
24
|
+
validation rejects missing or unresolved role contracts.
|
|
25
|
+
|
|
21
26
|
## Naming convention
|
|
22
27
|
|
|
23
28
|
`rite-*` is the namespace for lifecycle and utility commands. Its utilities are
|
|
@@ -248,8 +253,8 @@ context with only the slice contract; all other agents are read-only.
|
|
|
248
253
|
| [`devrites-slice-wright`](../pack/.claude/agents/devrites-slice-wright.md) | Turn ONE exact allowlisted slice into the smallest complete, idiomatic, proven implementation. Writes code + tests only; returns a typed artifact for the root to reconcile, gate, and record. Writes no `.devrites/` bookkeeping; single-threaded per tree. |
|
|
249
254
|
|
|
250
255
|
Dispatch contract + return shape + fallback: [`rite-build/reference/wright-dispatch.md`](../pack/.claude/skills/rite-build/reference/wright-dispatch.md).
|
|
251
|
-
The shared topology, named → generic →
|
|
252
|
-
|
|
256
|
+
The shared topology, named → guarded generic → HITL stop, and fail-closed identity
|
|
257
|
+
rules live in [`standards/agents.md`](../pack/.claude/skills/devrites-lib/reference/standards/agents.md).
|
|
253
258
|
|
|
254
259
|
---
|
|
255
260
|
|
package/engine/hooks.go
CHANGED
|
@@ -467,7 +467,7 @@ func hookReviewerReadonly(h harness.Harness, stdin io.Reader, stdout, stderr io.
|
|
|
467
467
|
return exitOK
|
|
468
468
|
}
|
|
469
469
|
in := h.ParseGuardInput(bytes.NewReader(data))
|
|
470
|
-
kind :=
|
|
470
|
+
kind := devritesAgentForGuard(h, in)
|
|
471
471
|
if kind == devritesAgentNone &&
|
|
472
472
|
os.Getenv("DEVRITES_CODEX_GENERIC_AGENT_COMPAT") == "1" &&
|
|
473
473
|
in.AgentType == "" {
|
|
@@ -540,11 +540,46 @@ var subagentOrientContext string
|
|
|
540
540
|
// Spawned agents have fresh context and do not load the rite-* framework the
|
|
541
541
|
// same way as the main thread. The output matches devrites-subagent-orient.sh.
|
|
542
542
|
func hookSubagentOrient(h harness.Harness, stdin io.Reader, stdout, stderr io.Writer) int {
|
|
543
|
-
|
|
544
|
-
if
|
|
543
|
+
data, err := io.ReadAll(stdin)
|
|
544
|
+
if err != nil {
|
|
545
|
+
return exitOK
|
|
546
|
+
}
|
|
547
|
+
agentType := h.SubagentAgentType(bytes.NewReader(data))
|
|
548
|
+
context := strings.ReplaceAll(subagentOrientContext, "\r\n", "\n")
|
|
549
|
+
if h == harness.Codex {
|
|
550
|
+
in, parseErr := parseAgentDispatchHookInput(bytes.NewReader(data))
|
|
551
|
+
root, ok := agentDispatchRoot()
|
|
552
|
+
if parseErr != nil || !ok || in.SessionID == "" || in.TurnID == "" || in.AgentID == "" {
|
|
553
|
+
if !strings.HasPrefix(agentType, "devrites-") {
|
|
554
|
+
return exitOK
|
|
555
|
+
}
|
|
556
|
+
context += "\n\n- **Dispatch binding unavailable.** Return blocked without doing specialist work; the parent must retry a confirmed spawn."
|
|
557
|
+
} else {
|
|
558
|
+
role, bound, bindErr := bindAgentDispatchStart(root, in)
|
|
559
|
+
if bindErr != nil {
|
|
560
|
+
context += "\n\n- **Dispatch binding failed.** Return blocked without doing specialist work; the parent must repair the agent-start receipt."
|
|
561
|
+
} else if bound {
|
|
562
|
+
if in.AgentType == role {
|
|
563
|
+
context += fmt.Sprintf(
|
|
564
|
+
"\n\n- **Confirmed role.** Your named Codex profile is `%s`; follow its loaded `developer_instructions` and execute only the unchanged packet from the parent.",
|
|
565
|
+
role,
|
|
566
|
+
)
|
|
567
|
+
} else {
|
|
568
|
+
context += fmt.Sprintf(
|
|
569
|
+
"\n\n- **Confirmed role.** Your generic `%s` identity is bound to `%s`; the spawn hook injected `.codex/agents/%s.toml` `developer_instructions` into your message. Follow them and execute only the unchanged packet from the parent.",
|
|
570
|
+
in.AgentType, role, role,
|
|
571
|
+
)
|
|
572
|
+
}
|
|
573
|
+
} else if !strings.HasPrefix(agentType, "devrites-") {
|
|
574
|
+
return exitOK
|
|
575
|
+
} else {
|
|
576
|
+
context += "\n\n- **Unbound named start.** Return blocked without doing specialist work; no matching root spawn receipt exists."
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
} else if !strings.HasPrefix(agentType, "devrites-") {
|
|
545
580
|
return exitOK // Stay silent without a DevRites agent identity.
|
|
546
581
|
}
|
|
547
|
-
out, err := h.SubagentStartContext(
|
|
582
|
+
out, err := h.SubagentStartContext(context)
|
|
548
583
|
if err != nil {
|
|
549
584
|
debugf(stderr, "subagent-orient: %v", err)
|
|
550
585
|
return exitOK
|