devrites-lib
Internal shared DevRites helper library. Documents cross-cutting engine commands and references; not a user workflow. Do not invoke directly.
SKILL.mdpack/.claude/skills/devrites-lib/SKILL.md
GitHubdevrites-lib: shared workflow contracts
Do not invoke this skill directly.
Ownership boundary
- The host owns instruction loading, exact-agent dispatch, scheduling, waiting, follow-up, results, and history. Skills state the role/result, never native fields or dispatch receipts.
- Dispatch every workflow-required role fresh. A missing role stops for HITL; never skip, substitute, or perform its work in the root.
- The root owns DevRites state/artifacts but never source/tests. Codex grants it
workspace permission only because children cannot elevate; writing follows
reference/standards/agents.md. - The engine owns the retained deterministic structure, atomic-write, install, evidence-freshness, and safety primitives only.
Workspace orientation
Use the supplied slug or read .devrites/ACTIVE. Require its authoritative
state.md; read it directly, then only needed phase artifacts. Never infer
lifecycle state from chat or optional README.md.
Shared references
reference/standards/agents.md: native custom-agent roles, immutable inputs, result contracts, and source-boundary review.reference/candidate-integrity.md: the content-bound candidate lifecycle from Build through Ship (workspace-artifact-schema.md).reference/reply-contract.md: compact user-facing completion states. The host renders the response normally.reference/visual-playbooks/index.md: progressive visual HTML playbook router (load matching ids only; dual-read outline).
Deterministic engine surface
The engine is limited to:
- Checks:
check candidate(content-bound identity),check readiness(structure;--emit-bindingemits the Build-input binding),check preconditions(Vet preflight rows),check seal(structure plus exact artifact bindings and evidence freshness),check slice(slice contract preflight before wright dispatch),check task-graph,check diff-scope(mechanical changed-paths ⊆ allowlist before reviewer dispatch),check path-disjoint,check skill-trust,check indexes,check regression(progress high-water mark),check drift(readiness-input attribution),check windows(deferral-marker waivers),check dup(advisory near-duplicates),check anchors(Critical/Important quote anchoring),check perturb(safe-perturbation probe),detect commands(repository test/lint wiring). - Observation:
observe summary(orientalias),observe slice,next(minimal remaining lifecycle path),handoff(deterministic resume record). - Coordination:
contextemits one deduplicated read-set bundle from each skill'sloads:manifest into.devrites/work/<slug>/ctx/— dispatch targets read it instead of selecting files. It printsunselected=[...]for declared triggers not passed; an omitted applicable trigger is a gap, not a shortcut. A--rolecall is a dispatch, so theagentstrigger auto-fires when declared (auto=[agents]in output); a role with no agent contract file fails instead of emitting a contract-less packet. Manifest grammar:alwaysloads every call;triggersmaps names to files that load only when passed or suggested;workspacelists the feature artifacts every reader may need;workspaceByRolemaps a dispatch role to its own artifact list — present role wins, absent role falls back toworkspace, an empty list means the role reads no workspace files. The engine printssuggested=[...]triggers inferred from workspace facts (AFK/parallel flags, frontend/security wording, principles presence); confirm them rather than re-deriving conditions. Repeat calls with unchanged inputs printunchangedand reuse the existing bundle.dispatchowns the launch-wave barrier — seal needs a distinct handle per role (the last start seals), return needs seal, open --claim-session/--claim takes the wave's file claim (released by the completing return or abandon --release), and start/return auto-record into themetricsledger;candidate freezeandpacketwrite a wave's frozen diff and packets.claimowns the advisory session-scopedclaims.jsonlledger;noteowns anchorednotes.mdentries (check sealrefuses non-exact anchors);parallelowns deterministic worktree lease/create/integrate/ cleanup for parallel slices. gatesowns the machine-checked acceptance ledger (gates.md):scaffold,status,run,reverify,lint,precheck,attest,abandon— grammar and authoring rules inreference/standards/gates.md.- Atomic state:
state resolvefor answer/drop/batch,state merge-manifestfor the predecessor-chain union,state set/state appendfor cursor fields and ledger sections, transactionalstate close, andmigratefor fail-closed workspace-schema normalization. secret-scan,open-visual, andversionremain read-only helpers.- Offline, local
install,update, anduninstall; their shell/npm callers acquire the candidate bundle, source, and binary before invoking the engine.
Exact native agents/checklists own semantics; the host filesystem owns ledger reads/preview/confirmed no-clobber writes, spec grammar re-reading, question-id allocation, clarify cursor edits, AFK accounting, recovery accounting, and read-only diagnostics. Repository scripts and CI own gates.