Read-set manifest: devrites-engine context --skills-root .pi/skills <slug> --phase build bundles every file named below into one deduplicated read. Trigger names map to the conditional rules in the sections that follow.
/rite-build: one verified slice
Active caller takes precedence per output.md.
Standalone HITL stops; standalone AFK chains under green proof, caps and pause
rules. Every wright returns after one slice.
HITL: /rite-build --parallel N (2≤N≤10; N=1≡serial) follows
reference/parallel-batch.md
(one-slice-cycle.md).
Root owns gates/bookkeeping; fresh
devrites-slice-wright writes source/tests.
Workflow Artifacts use
workflow-artifacts.md
(trigger workflow-artifacts — only when the plan declares them).
Execute reference/phase-contract.md
(one-slice-cycle.md,
afk-discipline.md); dispatch uses
reference/wright-dispatch.md.
Every wright contract names the writer-safe checks the wright runs (syntax/type/lint,
unit and self-check suites, a narrow local smoke) and never forbids them; only
artifact-producing, consumptive, or full canonical gates stay root-owned, and a
RUN: writer gate adds gates precheck to them;
dispatch open --contract refuses a contract that breaks this. Prior contracts in evidence.md are not a template for this. Failing case: the
contract says "skip tests mid-flight; root runs them after return", and the wright
returns three unit failures that a 20 s go test would have caught in-round.
Required rules
Read .pi/skills/devrites-lib/reference/standards/core.md first. Load only triggered rules:
coding/error/testing/tdd.md/patterns/DoD; binding
.devrites/principles.md; security; topology; data integrity; integration reliability.
Wright applies anti-slop; root verifies returns and never patches source. Refuse the rationalizations in
anti-patterns.
Invariants
- Standalone HITL default: serial on control (core.md #5). AFK/
--parallel N
uses parallel-batch.md.
Same-worktree multi-writer / root-emulated concurrency forbidden.
Native-worktree pilot = single-slice isolation when wright-dispatch.md
preflight + reconcile hold.
- Exact feature scope only (core.md #7); reject out-of-allowlist diffs
(
devrites-engine check diff-scope <slug> --allow <contract-paths>); record
adjacent issues. An adjacent issue or non-obvious rationale bound to specific
code anchors as a note — devrites-engine note add <slug> <file> "<verbatim quote>" <title> — so refactors regrade it instead of losing it
(notes.md).
- Re-prove affected behavior after edits (core.md #6); reuse observations only
under evidence validity.
- Unplanned dependency/design-system/gap/repair → Vet/Spec Drift Guard batch
sweep: every contract-assumption violation recorded before one folded
repair+vet. Ask only for licensing/cost/security/product or explicit
architecture-policy decisions (core.md #8).
- Root never edits product source/tests (
.devrites/ + Workflow Artifact only;
agents.md source-writing
boundary). Wright is sole product writer; extras in returned paths/git diff --name-only hard-stop via check diff-scope.
- Principles bind; irreversible conflict needs human exception or stop.
- Evidence beats confidence (core.md #6). Never weaken tests, skip TDD, widen
writers, or self-approve. Drift →
spec-drift-guard.md; checkpoint →
checkpoint.md.
- Async readiness waits during slice work follow
debug-recovery.md
(bounded poll + last-signal artifact; no blind sleep as primary strategy).
Workflow Artifact branch
--parallel N (opt-in)
Standalone HITL default/explicit 1 ≡ serial; AFK inherits cap. Under
Autocomplete, read and execute shared root-only
parallel-workspaces.md
(trigger parallel, including global cap 1): controller/source routing,
authorized pool, isolated first writer and continuous repair/re-Vet/refill.
Standalone Build remains local. 2–10 is a cap, not a quota; eligible
path-disjoint work refills after each landing
(parallel-batch.md).
Unattended runs (/rite-autocomplete, .devrites/AFK max_parallel) refill
inside the same run; HITL stops after each landing. This invocation's --parallel N
is the cap: leftover sentinel max_parallel is not consulted. Autocomplete with
that flag also writes or replaces only max_parallel: N. Non-integer/N≤0/N>10 hard refuse.
Each sibling lands alone when its review + proof are green (integrate --slice):
one local WIP(<slug>): commit onto the control branch (never pushed). Do not
integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair
round in its own worktree — never rebuilt from scratch while budget remains.
Post-writer inventory and affected rechecks follow phase-contract.md § Independent
Build review; fold accounts before one repair-all wright.
Plan-owned gaps still route through Spec Drift Guard
(batch sweep, one folded plan repair + one vet recheck inline); do not emit
a human Fix. Exhausted repair blocks and preserves everything;
cleanup --force salvages slice branches before removing worktrees —
human-gated to abandon a batch, orchestrator-emitted only as the salvage
step of an automatic frozen-lease re-batch.
AFK charges per landed sibling only. A retained lease resumes through its
controller; it blocks a competing Build root, not controller-owned source dispatch.
Details: parallel-batch.md.
Execute and reply
Run every step in reference/phase-contract.md: readiness, one target, dispatch
or canonical transaction, return inspection, independent code/doubt/test analysis,
approved fail-on-red proof, record, and applicable accounting. Continue/reply via
reference/output.md plus the shared
reply contract. Standalone AFK obeys remaining budget; Prove requires every slice built except a
deferred slice.
Phase exit
Complete when: Independent Build review and fail-on-red proof are green,
git diff --name-only ⊆ allowlist, no open Critical/Important, state.md cursor
advances with recorded evidence, and the control-branch checkpoint has landed
per checkpoint.md.
Failing case: wright reports "done" but independent review or proof was
skipped, red, or followed by an uncommitted repair → slice incomplete; do not
advance cursor or commit on control.
1---2name: rite-build-53description: Build the next approved vertical slice with evidence. HITL one-slice default; AFK/autocomplete refill eligible isolated work under --parallel N, one global writer cap under Autocomplete.4argument-hint: "[--parallel N] [slice number or name]"5user-invocable: true6metadata:7 source: https://skillmd.com/skills/viktorsbaikers/rite-build-58---910<!-- loads: {"always":["devrites-lib/reference/parallel-workspaces.md","devrites-lib/reference/standards/core.md","devrites-lib/reference/standards/code-navigation.md","devrites-lib/reference/standards/code-index.md","devrites-lib/reference/standards/agents.md","rite-build/reference/phase-contract.md","rite-build/reference/one-slice-cycle.md","rite-build/reference/wright-dispatch.md","rite-build/reference/checkpoint.md","rite-build/reference/spec-drift-guard.md","rite-build/reference/output.md","rite-build/reference/anti-patterns.md"],"rootOnly":["devrites-lib/reference/standards/code-index.md","devrites-lib/reference/parallel-workspaces.md","rite-build/reference/phase-contract.md","rite-build/reference/wright-dispatch.md","rite-build/reference/checkpoint.md","rite-build/reference/output.md","rite-build/reference/afk-discipline.md","rite-build/reference/checkpoint-protocol.md","rite-build/reference/parallel-batch.md","devrites-lib/reference/standards/afk-hitl.md","devrites-lib/reference/standards/workflow-artifacts.md"],"triggers":{"afk":["rite-build/reference/afk-discipline.md","devrites-lib/reference/standards/afk-hitl.md","rite-build/reference/checkpoint-protocol.md"],"applicability":["devrites-lib/reference/standards/repository-topology.md","devrites-lib/reference/standards/data-integrity.md","devrites-lib/reference/standards/integration-reliability.md"],"coding":["devrites-lib/reference/standards/coding-style.md"],"debug-recovery":["devrites-lib/reference/standards/debug-recovery.md"],"dod":["devrites-lib/reference/standards/definition-of-done.md"],"errors":["devrites-lib/reference/standards/error-handling.md"],"frontend":["rite-build/reference/frontend-trigger.md"],"parallel":["rite-build/reference/parallel-batch.md","devrites-lib/reference/parallel-workspaces.md"],"patterns":["devrites-lib/reference/standards/patterns.md"],"principles":["devrites-lib/reference/standards/principles.md"],"security":["devrites-lib/reference/standards/security.md"],"tdd":["rite-build/reference/tdd.md","devrites-lib/reference/standards/testing.md"],"workflow-artifacts":["devrites-lib/reference/standards/workflow-artifacts.md"]},"workspace":["brief.md","spec.md","state.md","decisions.md","assumptions.md","questions.md","decision-coverage.md","architecture.md","plan.md","tasks.md","traceability.md","eng-review.md","test-plan.md","gates.md","strategy.md"],"workspaceByRole":{"code-reviewer":["spec.md","plan.md","tasks.md","test-plan.md","architecture.md","decisions.md","state.md"],"doubt-reviewer":["spec.md","plan.md","tasks.md","state.md","decisions.md"],"slice-wright":["brief.md","spec.md","architecture.md","plan.md","tasks.md","test-plan.md","state.md","decisions.md","assumptions.md","questions.md"],"test-analyst":["spec.md","tasks.md","test-plan.md","state.md"]}} -->11> Read-set manifest: `devrites-engine context --skills-root .pi/skills <slug> --phase build` bundles every file named below into one deduplicated read. Trigger names map to the conditional rules in the sections that follow.121314# /rite-build: one verified slice1516Active caller takes precedence per [output.md](reference/output.md#caller-owned-continuation).17Standalone HITL stops; standalone AFK chains under green proof, caps and pause18rules. Every wright returns after one slice.19**HITL:** `/rite-build --parallel N` (2≤N≤10; N=1≡serial) follows20[`reference/parallel-batch.md`](reference/parallel-batch.md)21([`one-slice-cycle.md`](reference/one-slice-cycle.md)).2223Root owns gates/bookkeeping; fresh24[`devrites-slice-wright`](../../agents/devrites-slice-wright.md) writes source/tests.25Workflow Artifacts use26[`workflow-artifacts.md`](../devrites-lib/reference/standards/workflow-artifacts.md)27(trigger `workflow-artifacts` — only when the plan declares them).28Execute [`reference/phase-contract.md`](reference/phase-contract.md)29([`one-slice-cycle.md`](reference/one-slice-cycle.md),30[`afk-discipline.md`](reference/afk-discipline.md)); dispatch uses31[`reference/wright-dispatch.md`](reference/wright-dispatch.md).32Every wright contract names the writer-safe checks the wright runs (syntax/type/lint,33unit and self-check suites, a narrow local smoke) and never forbids them; only34artifact-producing, consumptive, or full canonical gates stay root-owned, and a35`RUN: writer` gate adds `gates precheck` to them;36`dispatch open --contract` refuses a contract that breaks this. Prior contracts in `evidence.md` are not a template for this. **Failing case:** the37contract says "skip tests mid-flight; root runs them after return", and the wright38returns three unit failures that a 20 s `go test` would have caught in-round.3940## Required rules4142Read `.pi/skills/devrites-lib/reference/standards/core.md` first. Load only triggered rules:43coding/error/testing/[`tdd.md`](reference/tdd.md)/patterns/DoD; binding44`.devrites/principles.md`; security; topology; data integrity; integration reliability.45Wright applies anti-slop; root verifies returns and never patches source. Refuse the rationalizations in46[`anti-patterns`](reference/anti-patterns.md).4748## Invariants4950- Standalone HITL default: serial on control (core.md #5). AFK/`--parallel N`51 uses [`parallel-batch.md`](reference/parallel-batch.md).52 Same-worktree multi-writer / root-emulated concurrency forbidden.53 Native-worktree pilot = single-slice isolation when `wright-dispatch.md`54 preflight + reconcile hold.55- Exact feature scope only (core.md #7); reject out-of-allowlist diffs56 (`devrites-engine check diff-scope <slug> --allow <contract-paths>`); record57 adjacent issues. An adjacent issue or non-obvious rationale bound to specific58 code anchors as a note — `devrites-engine note add <slug> <file> "<verbatim59 quote>" <title>` — so refactors regrade it instead of losing it60 ([`notes.md`](../devrites-lib/reference/workspace-artifact-schema.md#anchored-notes)).61- Re-prove affected behavior after edits (core.md #6); reuse observations only62 under [evidence validity](../devrites-lib/reference/candidate-integrity.md#evidence-validity).63- Unplanned dependency/design-system/gap/repair → Vet/Spec Drift Guard batch64 sweep: every contract-assumption violation recorded before one folded65 repair+vet. Ask only for licensing/cost/security/product or explicit66 architecture-policy decisions (core.md #8).67- Root never edits product source/tests (`.devrites/` + Workflow Artifact only;68 [agents.md](../devrites-lib/reference/standards/agents.md) source-writing69 boundary). Wright is sole product writer; extras in returned paths/`git diff70 --name-only` hard-stop via `check diff-scope`.71- Principles bind; irreversible conflict needs human exception or stop.72- Evidence beats confidence (core.md #6). Never weaken tests, skip TDD, widen73 writers, or self-approve. Drift →74 [`spec-drift-guard.md`](reference/spec-drift-guard.md); checkpoint →75 [`checkpoint.md`](reference/checkpoint.md).76- Async readiness waits during slice work follow77 [`debug-recovery.md`](../devrites-lib/reference/standards/debug-recovery.md)78 (bounded poll + last-signal artifact; no blind sleep as primary strategy).7980## Workflow Artifact branch8182<!-- workflow-artifact-adapter: {"module":"devrites-lib/reference/standards/workflow-artifacts.md","entry":"Vet-ready admitted bytes require root authorship outside product wright","action":"ROOT_TRANSACTION; root writes only admitted .devrites/** targets","return":"saved Build slice cursor; wright product allowlist unchanged"} -->83## `--parallel N` (opt-in)8485Standalone HITL default/explicit `1` ≡ serial; AFK inherits cap. Under86Autocomplete, read and execute shared root-only87[`parallel-workspaces.md`](../devrites-lib/reference/parallel-workspaces.md)88(trigger `parallel`, including global cap 1): controller/source routing,89authorized pool, isolated first writer and continuous repair/re-Vet/refill.90Standalone Build remains local. `2`–`10` is a cap, not a quota; eligible91path-disjoint work refills after each landing92([`parallel-batch.md`](reference/parallel-batch.md#dynamic-selection-and-re-batching)).93Unattended runs (`/rite-autocomplete`, `.devrites/AFK` `max_parallel`) refill94inside the same run; HITL stops after each landing. This invocation's `--parallel N`95is the cap: leftover sentinel `max_parallel` is not consulted. Autocomplete with96that flag also writes or replaces only `max_parallel: N`. Non-integer/`N≤0`/`N>10` hard refuse.97Each sibling lands alone when its review + proof are green (`integrate --slice`):98one local `WIP(<slug>):` commit onto the control branch (never pushed). Do not99integrate a sibling because the wright returned. A red/gap sibling gets a bounded repair100round in its own worktree — never rebuilt from scratch while budget remains.101Post-writer inventory and affected rechecks follow `phase-contract.md` § Independent102Build review; fold accounts before one repair-all wright.103Plan-owned gaps still route through Spec Drift Guard104(batch sweep, one folded plan repair + one vet recheck inline); do not emit105a human `Fix`. Exhausted repair blocks and preserves everything;106`cleanup --force` salvages slice branches before removing worktrees —107human-gated to abandon a batch, orchestrator-emitted only as the salvage108step of an automatic frozen-lease re-batch.109AFK charges per landed sibling only. A retained lease resumes through its110controller; it blocks a competing Build root, not controller-owned source dispatch.111Details: `parallel-batch.md`.112113## Execute and reply114115Run every step in `reference/phase-contract.md`: readiness, one target, dispatch116or canonical transaction, return inspection, independent code/doubt/test analysis,117approved fail-on-red proof, record, and applicable accounting. Continue/reply via118[`reference/output.md`](reference/output.md) plus the shared119[`reply contract`](../devrites-lib/reference/reply-contract.md). Standalone AFK obeys remaining budget; Prove requires every slice built except a120[deferred slice](../rite-plan/reference/slicing.md#deferred-slice).121122## Phase exit123124**Complete when:** Independent Build review and fail-on-red proof are green,125`git diff --name-only` ⊆ allowlist, no open Critical/Important, `state.md` cursor126advances with recorded evidence, and the control-branch checkpoint has landed127per [`checkpoint.md`](reference/checkpoint.md).128129**Failing case:** wright reports "done" but independent review or proof was130skipped, red, or followed by an uncommitted repair → slice incomplete; do not131advance cursor or commit on control.