mirror of
https://github.com/mvschwarz/openrig.git
synced 2026-11-07 22:58:42 -10:00
mirror(skills): apply the 0.5.0 whole-set canon->edges mirror pass
Regenerates the product-repo public-skill manifests from the shared authored sources and rewrites the shipped skill edges (plugin + spec) per the oracle-declared membership and layout. Ceremony sits on top of the back-merge commit that reconciled v0.4.8's release-artifact history into the 0.5.0 lineage. The primary content change from v0.4.8's mirror is the openrig-user SKILL.md update carrying the 0.5.0 context-library + paced-delivery + --context / --body-context awareness authored per the locked spec (agent-driven translation for how the rig context / rig walk verbs compose with send/broadcast/queue/walk delivery). Complementary role- SOP updates land alongside for queue-handoff, seat-continuity-and-handover, session-compaction-and-restore, watchdog, and mission-slice-sop. The dev-planner mission-slice-sop proportionality-edit restoration (deferred post-0.4.8 per the single- writer rule) is in the mirror as well. Inputs pulled from the shared conventions layer (SHAs pinned in the release ledger): - Oracle membership (product-public-skills.yaml) - Denylist rules (internal-tokens.yaml) - Edge layout (skill-edge-layout.yaml) - Skill canon root (the skills/ directory of the shared conventions layer) Discipline applied by the mirror per each shipping skill: - Layer-1 provenance-frontmatter strip. - Layer-3 internal-fence strip. - Deterministic leak-scan against the denylist; the script throws on any post-strip content leak, so ship-set writes are only reached when every shipping skill passes the scan. MATURATION-GATED SKIP (recorded honestly): two skills sit in the oracle's ship_after_fix section with CONDITION = MATURATION (not sanitization) — retiring-and-inheriting-a-seat and oversight-team. Both are body-clean of denylist tokens, but neither has met its maturation condition (retiring-and-inheriting-a-seat awaits pilot graduation from draft to provisional; oversight-team awaits real oversight-rig usage before graduation). Per the oracle's own YAML- comment intent + the release-management ruling for this cut, both skills SKIP mirror application in 0.5.0 — likely landing in 0.5.1 after their conditions are met. The mirror script's ship-set logic does NOT yet distinguish the two condition kinds (sanitize: script-verifiable via leak-scan; matura- tion: stage-field-verifiable). Both conditions currently share the ship_after_fix section but only sanitize is script-enforced; matura- tion lives in YAML comments (documentation, not enforcement). The skip was applied MANUALLY at ceremony time per the just-added play- book rule that every ship_after_fix skill's named condition must be verified MET before its files ship. The class is banked as a 5.1 scanner-hardening candidate: the oracle gains a machine-readable condition field (e.g. gate: sanitize|maturation + stage check against canon frontmatter) and the mirror script enforces it. Until then, the manual check stands as the enforcement mechanism. The 3 shipped-tree files that the script would have produced for these two skills were removed from the commit set post-mirror-run, leaving the generated.json manifest entries as a documented statement of oracle membership (accurate to intent) while the tree-side files honestly reflect the maturation-gate skip. No product-code changes; version fields untouched. This commit is the canon->edges mirror only; the Release 0.5.0 version-bump commit sits on top.
This commit is contained in:
1 parent
bdd7866a4f
commit
cabd2b2f99
11 files changed
+120
-103
No files matched your search
+11
-72
@@ -41,10 +41,6 @@ function readInstructionFile(filePath) {
|
||||
return fs.readFileSync(expanded, "utf8");
|
||||
}
|
||||
|
||||
function sanitizeKey(value) {
|
||||
return value.replace(/[^a-zA-Z0-9_.@-]/g, "_");
|
||||
}
|
||||
|
||||
function sessionKey(input) {
|
||||
const raw = [
|
||||
process.env.OPENRIG_SESSION_NAME,
|
||||
@@ -55,65 +51,13 @@ function sessionKey(input) {
|
||||
input.sessionName,
|
||||
input.transcript_path ? path.basename(input.transcript_path, ".jsonl") : "",
|
||||
].find((value) => typeof value === "string" && value.trim().length > 0) || "unknown-session";
|
||||
return sanitizeKey(raw);
|
||||
}
|
||||
|
||||
// OPR.0.4.1.09 (rev1-r2 hook-path leak fix): MUST match claude-compaction-enforcer.ts
|
||||
// declaredSeatOf EXACTLY — a seat is authoritative ONLY inside a WELL-FORMED leading
|
||||
// frontmatter fence (opened AND closed `---`); the body is NEVER scanned; malformed/absent
|
||||
// frontmatter -> null (generic). Duplicated (not imported) because this hook is a standalone
|
||||
// portable plugin asset that cannot import the compiled daemon TS; semantics are kept
|
||||
// identical so the enforcer and hook paths refuse wrong-seat extras the same way.
|
||||
function declaredSeatOf(content) {
|
||||
const fm = /^\s*---\s*\n([\s\S]*?)\n---/.exec(content);
|
||||
if (!fm) return null;
|
||||
const m = /^[ \t]*(?:target[_-]?seat|seat|session(?:[_-]?name)?)[ \t]*:[ \t]*["']?([^"'\n#]+?)["']?[ \t]*$/im.exec(fm[1]);
|
||||
return m ? m[1].trim() : null;
|
||||
}
|
||||
|
||||
// OPR.0.4.1.09 (rev1-r2): resolve the seat-safe EXTRA-FILE CONTENT for
|
||||
// postCompactInstruction, mirroring the enforcer resolvePostCompactExtra: (1) prefer the
|
||||
// PER-SEAT extra post-compact-extra/<seat>.md; (2) else the GLOBAL messageFilePath. In
|
||||
// EITHER case a file whose WELL-FORMED frontmatter declares a DIFFERENT seat is REFUSED
|
||||
// (returns "") so a foreign-seat extra never leaks into the marker via the hook path
|
||||
// (the enforcer path already refused it). Generic/this-seat/malformed -> inject.
|
||||
function readSeatSafeExtraFile(input, globalFilePath) {
|
||||
const seatKey = sessionKey(input);
|
||||
const refusedIfForeign = (content) => {
|
||||
const declared = declaredSeatOf(content);
|
||||
return declared && sanitizeKey(declared) !== seatKey ? "" : content;
|
||||
};
|
||||
// 1. Per-seat extra preferred (seat-keyed path; still defensively seat-checked to match
|
||||
// the enforcer, which refuses a per-seat file declaring a different seat).
|
||||
const perSeatPath = path.join(getOpenRigHome(), "compaction", "post-compact-extra", `${seatKey}.md`);
|
||||
if (fs.existsSync(perSeatPath)) {
|
||||
return refusedIfForeign(fs.readFileSync(perSeatPath, "utf8"));
|
||||
}
|
||||
// 2. Global messageFilePath fallback, seat-checked.
|
||||
if (!globalFilePath) return "";
|
||||
const content = readInstructionFile(globalFilePath);
|
||||
if (!content) return "";
|
||||
return refusedIfForeign(content);
|
||||
return raw.replace(/[^a-zA-Z0-9_.@-]/g, "_");
|
||||
}
|
||||
|
||||
function pendingMarkerPath(input) {
|
||||
return path.join(getOpenRigHome(), "compaction", "restore-pending", `${sessionKey(input)}.json`);
|
||||
}
|
||||
|
||||
// OPR.0.4.1.09: pointer to this seat's per-seat post-compaction extra
|
||||
// (compaction/post-compact-extra/<seat>.md), surfaced by the bridge reader.
|
||||
// Returned ONLY when it EXISTS, so the marker never points at an unresolvable
|
||||
// restoreMapPath; null otherwise.
|
||||
function perSeatRestoreMapPath(input) {
|
||||
const p = path.join(getOpenRigHome(), "compaction", "post-compact-extra", `${sessionKey(input)}.md`);
|
||||
try {
|
||||
fs.accessSync(p);
|
||||
return p;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function writePendingRestoreMarker(input, parsed, restoreInstruction, customMessage) {
|
||||
const markerPath = pendingMarkerPath(input);
|
||||
fs.mkdirSync(path.dirname(markerPath), { recursive: true });
|
||||
@@ -130,8 +74,6 @@ function writePendingRestoreMarker(input, parsed, restoreInstruction, customMess
|
||||
expectedAck: "restored from packet at <path>; resumed at step <X>",
|
||||
deliveredAt: null,
|
||||
deliveryCount: 0,
|
||||
// OPR.0.4.1.09: per-seat restore-map pointer (post-compact-extra/<seat>.md) or null.
|
||||
restoreMapPath: perSeatRestoreMapPath(input),
|
||||
};
|
||||
fs.writeFileSync(markerPath, `${JSON.stringify(payload, null, 2)}\n`, "utf8");
|
||||
return markerPath;
|
||||
@@ -144,7 +86,7 @@ function writePendingRestoreMarker(input, parsed, restoreInstruction, customMess
|
||||
// enabled but restore text has not been written yet, use OpenRig's default
|
||||
// instruction to load the canonical restore skill. Inline instructions and
|
||||
// file-path content are both included when both are configured.
|
||||
function readClaudeCompactionMessage(input) {
|
||||
function readClaudeCompactionMessage() {
|
||||
const configPath = path.join(getOpenRigHome(), "config.json");
|
||||
let inline = "";
|
||||
let filePath = "";
|
||||
@@ -173,20 +115,17 @@ function readClaudeCompactionMessage(input) {
|
||||
|
||||
const parts = [];
|
||||
if (inline && inline.length > 0) {
|
||||
// Inline has no file/seat to declare; keep as-is.
|
||||
parts.push(`Inline restore instruction:\n${inline}`);
|
||||
}
|
||||
// OPR.0.4.1.09 (rev1-r2): the FILE portion is SEAT-SAFE — per-seat extra preferred, a
|
||||
// foreign-seat global refused (mirrors the enforcer). Checked even when messageFilePath
|
||||
// is unset, because the per-seat extra is an independent mechanism (the enforcer also
|
||||
// checks the per-seat path regardless of the global config).
|
||||
try {
|
||||
const fileText = readSeatSafeExtraFile(input, filePath);
|
||||
if (fileText) {
|
||||
parts.push(`Additional restore instruction file:\n${fileText}`);
|
||||
if (filePath && filePath.length > 0) {
|
||||
try {
|
||||
const fileText = readInstructionFile(filePath);
|
||||
if (fileText) {
|
||||
parts.push(`Additional restore instruction file (${filePath}):\n${fileText}`);
|
||||
}
|
||||
} catch {
|
||||
// Keep any inline instruction; unreadable extra files degrade quietly.
|
||||
}
|
||||
} catch {
|
||||
// Keep any inline instruction; unreadable extra files degrade quietly.
|
||||
}
|
||||
if (parts.length > 0) return parts.join("\n\n");
|
||||
if (policyEnabled && !inlineConfigured && !filePathConfigured) {
|
||||
@@ -208,7 +147,7 @@ try {
|
||||
args.push(input.transcript_path);
|
||||
}
|
||||
|
||||
const customMessage = readClaudeCompactionMessage(input);
|
||||
const customMessage = readClaudeCompactionMessage();
|
||||
|
||||
const result = spawnSync("node", args, { encoding: "utf8" });
|
||||
if (result.status !== 0) {
|
||||
|
||||
@@ -12,7 +12,10 @@ metadata:
|
||||
|
||||
# Mission/Slice SOP — how you work a mission & slice
|
||||
|
||||
Use this skill to actually **do** mission/slice work the way OpenRig expects: author the convention sections, track on the canonical files, prove on them, hand off through them, and survive compaction on them. **Do the work described here; do not merely explain the protocol.** The deterministic backstop is `rig scope audit` — the audit classifier is the source of truth for adherence. The conventions themselves live in ONE document: **`docs/reference/sdlc-conventions.md`** in the repo, materialized by the daemon at **`$OPENRIG_HOME/reference/sdlc-conventions.md`** (default `~/.openrig/reference/sdlc-conventions.md`) on an installed package — this skill teaches the flow; the SSOT defines the formats.
|
||||
Use this skill to actually **do** mission/slice work the way OpenRig expects: author the convention sections, track on the canonical files, prove on them, hand off through them, and survive compaction on them. **Do the work described here; do not merely explain the protocol.** The deterministic backstop is `rig scope audit` — an **advisory, fail-open** check (it records and advises, never blocks a write; see Proportionality below), not an authority you serve. The conventions themselves live in ONE document: **`docs/reference/sdlc-conventions.md`** in the repo, materialized by the daemon at **`$OPENRIG_HOME/reference/sdlc-conventions.md`** (default `~/.openrig/reference/sdlc-conventions.md`) on an installed package — this skill teaches the flow; the SSOT defines the formats.
|
||||
|
||||
## Proportionality — this SOP serves shipping; it is not the work itself
|
||||
The working product is the deliverable. This bookkeeping exists so the work survives handoff, compaction, and review — nothing more. **Match it to stakes:** OpenRig core = full ceremony; Studio Box / SDK / app slices = pragmatic — the mini-requirements may BE the whole PRD, and a couple of honest, LOOKed proof lines beat an elaborate contract. The `rig scope audit` backstop is **advisory and fail-open** (its own SSOT says so): it never blocks a build and is not a gate you clear before proceeding. If you're spending more time on the convention files or the audit than on the running product, stop and go build. Running the full apparatus on a small change is the letter-worship failure, not diligence.
|
||||
|
||||
## The SDLC flow (intent → proof)
|
||||
|
||||
@@ -30,7 +33,7 @@ intent → mini-requirements + proof contract → (UI slices: mockups)
|
||||
- **PARSER CONTRACT (README AND IMPLEMENTATION-PRD, from first draft — a parser contract, not stylistic):** each doc carries a verbatim, **undecorated** `## Mini-requirements` heading with a **numbered list**, and a verbatim, **undecorated** `## Proof contract` heading whose checkbox (`- [ ]`) lines are **character-identical** across the two files. `rig scope audit` parses the PRD's `## Proof contract`; a prose rollup (e.g. `## Required proof …`) or any renamed/decorated heading trips **`proof_contract_missing_or_malformed`** and forces a post-lock format patch. Never rename or decorate these two headings, and keep the PRD's checkbox lines byte-for-byte equal to the README's.
|
||||
- **REFERENCE-NOT-RESTATE (public / runnable examples — an honesty rail, from first draft):** any example that shows output or a value the referenced file/command **derives** — repo/runtime counts, current-state totals, hashes, timestamps — must **reference the source/derivation, omit the volatile value, or pin an explicitly stable fixture**; never hardcode the live count/state in a public or shipped doc. "Illustrative" derived output is a lie on a timer: `OK registry (2 manifests)` goes false the instant an entry lands. Write the invariant form (`OK registry (<N> manifests)`, N = entries in `registry.json`) or name the fixture instead of the momentary number. Restated derivable state in a public doc is a defect `rig scope audit` will not catch — the author owns it.
|
||||
3. **Plan-lock**: `rig scope slice approve <slice> --scope spec` — "the PRD matches the intent; THIS artifact set is what gets built." One daemon-side write: frontmatter stamp + append-only audit row.
|
||||
- **PRE-PLAN-LOCK SELF-CHECK (MANDATORY):** before requesting `--scope spec`, run `rig scope audit --mission <mission> --json`, inspect the target slice's entry, and request the lock **only when that slice shows ZERO findings**. Do not carry a format defect (e.g. `proof_contract_missing_or_malformed`) into the lock and force a post-lock correction.
|
||||
- **PRE-PLAN-LOCK SELF-CHECK (advisory, not a gate):** before requesting `--scope spec`, it's worth running `rig scope audit --mission <mission> --json` and clearing any real **format** defect (e.g. `proof_contract_missing_or_malformed`) so the parser can read your proof contract — that's a genuine machine-parsing need, cheap to fix. But the audit is fail-open: findings do NOT block the lock or the build, and you do NOT need a zero-findings score to proceed. Fix what's real, skip what isn't, keep moving.
|
||||
4. **Build the locked set** — look at the mockups, not just the spec text.
|
||||
5. **QA visual compare**: for each deliverable, load the planned mockup, produce the real artifact in a test/demo environment, visually compare, and record the verdict.
|
||||
6. **Drop proof**: `rig proof add <slice> --artifact-type qa --verdict PASS --candidate-sha <tip> --money-evidence "…" --evidences "1,3" --media "walk.webm,panel.png" --self-check "…"` — the C1 header's closed sets validate at drop time; `--evidences` joins the drop to its proof-contract items and `--media` names the curated proof/-relative media the drop stands behind (that pairing + media set is what the UI's DELIVERED section renders).
|
||||
@@ -44,7 +47,7 @@ intent → mini-requirements + proof contract → (UI slices: mockups)
|
||||
|
||||
## The canonical files (the operating surface)
|
||||
|
||||
> The canonical files below are the **operating surface of the work** — you track on them, prove on them, hand off through them, and survive compaction on them. They are NOT side-artifacts to "maintain"; keeping them current *is* the work.
|
||||
> The canonical files below are the **operating surface of the work** — you track on them, prove on them, hand off through them, and survive compaction on them. Keep them current because that is what lets the work survive handoff, compaction, and review — but they **serve** the product, they are not the product. If you're polishing these files while the actual thing isn't shipping, you've inverted it: go build, then update them.
|
||||
|
||||
- **README.md** (mission + slice) — the overview, OPENING with the convention sections (`## Intent` / `## Mini-requirements` / `## Proof contract`). The **mission README carries this SOP at its bottom.**
|
||||
- **IMPLEMENTATION-PRD.md** — the full PRD; opens with the mini-requirements; the `## Proof contract` here is what the UI's DELIVERED pairing joins proof against.
|
||||
@@ -100,7 +103,7 @@ When you `rig capture` a pane, **greyed / ghost autocomplete suggestions are NOT
|
||||
|
||||
## Moment-of-truth checklist
|
||||
|
||||
- **Starting a slice?** → intent recorded verbatim? **PRD carries a verbatim numbered `## Mini-requirements` + a verbatim `## Proof contract` whose `- [ ]` lines are character-identical to the README's** (parser contract)? **no example restates derivable state** — counts/hashes/timestamps referenced, omitted, or pinned to a stable fixture, never hardcoded (reference-not-restate)? mockups attached (UI slices)? **`rig scope audit --mission <m> --json` shows ZERO findings for this slice** BEFORE plan-lock (`--scope spec`)?
|
||||
- **Starting a slice?** → intent recorded verbatim? **PRD carries a verbatim numbered `## Mini-requirements` + a verbatim `## Proof contract` whose `- [ ]` lines are character-identical to the README's** (parser contract)? **no example restates derivable state** — counts/hashes/timestamps referenced, omitted, or pinned to a stable fixture, never hardcoded (reference-not-restate)? mockups attached (UI slices)? ran `rig scope audit` and fixed any real **format** defect so the parser reads the proof contract (advisory — a clean score is NOT required to lock)?
|
||||
- **Finishing a slice?** → every proof-contract item has curated evidence via `rig proof add … --evidences --media` (C1 drops — never only hand-placed files)? PROGRESS updated? MISSION_NOTES `§1` refreshed? proof locked (`--scope delivery`)? Handed off via queue?
|
||||
- **Committing?** → PROGRESS updated?
|
||||
- **Compacting?** → filed your state in MISSION_NOTES?
|
||||
|
||||
@@ -311,7 +311,7 @@ The floor and YOLO are **launch flags** OpenRig sets deterministically; the Lock
|
||||
## v0.3.x Starter, Workspace, And Plugin Surfaces
|
||||
|
||||
OpenRig v0.3.0 adds `rig agent-image`, `rig context-pack`, `rig workspace`, and
|
||||
`rig config init-workspace`. It also shifts fresh-user starter guidance toward
|
||||
`rig config init-workspace`. *(0.5.0: the `rig context-pack` alias is retired — the store + compose library is the single `rig context` noun; see "Context packs and paced delivery (0.5.0)".)* It also shifts fresh-user starter guidance toward
|
||||
`product-team` for human-directed work and `conveyor` for workflow-oriented
|
||||
work. Treat `demo` as legacy/test content unless a task specifically asks for
|
||||
the old demo spec.
|
||||
@@ -471,14 +471,14 @@ honestly and the UI exposes a one-click open-missing affordance.
|
||||
|
||||
v0.4.0 flips the five most frequently invoked read-commands from firehose-by-default to compact-by-default, and `rig queue list` adopts the docker / kubectl read-command grammar. **All defaults preserve breadth and capability — the firehose is one explicit flag away.**
|
||||
|
||||
### `rig ps` — current-rig default + compact-by-default + `-A`/`--all-rigs` + `--full`
|
||||
### `rig ps` — scope-aware: bare `rig ps` = ALL rigs; `--nodes` = your rig only
|
||||
|
||||
```bash
|
||||
rig ps # CURRENT-RIG, all-states, compact rig summaries (default)
|
||||
rig ps --json # compact JSON array (TL;DR per node: session, rig, activity, assigned/pending, resumeTokenPresent boolean)
|
||||
rig ps -A # all-rigs (fleet breadth; was the v0.3.4 default)
|
||||
rig ps --rig <name> # explicit-rig (overrides current-rig default)
|
||||
rig ps --nodes # compact node inventory (current rig)
|
||||
rig ps # ALL active rigs on the host, one compact row each — RUN FIRST to know the world
|
||||
rig ps --rig <name> # one named rig's summary
|
||||
rig ps --nodes --rig <name> # per-node (seat) detail for a NAMED rig — the normal drill-in
|
||||
rig ps --nodes # per-node detail — CURRENT rig ONLY (deliberately narrow; NOT the whole host)
|
||||
rig ps --json # compact JSON (default = a bare array of ALL non-archived rigs)
|
||||
rig ps --nodes -A # cross-rig node inventory (was v0.3.4 default)
|
||||
rig ps --nodes --full # complete record (the v0.3.4 per-node default shape; resumeToken VALUE retained here for downstream consumers)
|
||||
rig ps --nodes --session <sess> # narrow to one canonical session
|
||||
@@ -486,12 +486,12 @@ rig ps --active # opt-in active-state filter (does NOT change the al
|
||||
```
|
||||
|
||||
**v0.4.0 breadth + projection changes**:
|
||||
- **Default breadth is CURRENT-RIG** (derived from `OPENRIG_SESSION_NAME`'s `@<rig>` suffix), not all-rigs. `-A` / `--all-rigs` widens to fleet. Matches the `rig queue list -A` pattern.
|
||||
- **Rig-level `rig ps` lists ALL active rigs** (one row each — the cheap "know the world" view). The **`--nodes` (per-seat) view defaults to your CURRENT rig only** (from `OPENRIG_SESSION_NAME`'s `@<rig>` suffix); `--rig <name>` picks another rig, `-A` widens `--nodes` to the whole host (expensive — prefer `--fields`/`--limit`).
|
||||
- **Per-node TL;DR projection (compact) is the default**; `--full` returns the raw byte-equivalent passthrough. Daemon-side `recoveryGuidance` relocated to a guidance-by-reference map (no longer duplicated per-node) — even `--full` benefits.
|
||||
- **All-states stays default** (different from `rig queue list` which defaults to active-only) — for `ps`, non-running states ARE often the actionable signal.
|
||||
- **Resume-token security**: `--full` JSON emits `resumeTokenPresent` (boolean) — the actual `resumeToken` value also remains in `--full` for downstream consumers that legitimately need it, but the compact default never carries it (an orch glance never accidentally leaks token material).
|
||||
|
||||
**STOP using `rig ps --nodes --json` as a fleet-wide casual status check assuming the v0.3.4 shape.** The v0.4.0 default is CURRENT-RIG + compact; explicit `-A --full` is the fleet firehose. The ~77,000-token status-glance incident is closed twice over (compact + scope).
|
||||
**⚠ SCOPE-AWARENESS — the one that bites:** `rig ps --nodes` (and `--nodes --json`) show ONLY your current rig's seats, by design — the narrow default protects your context window. **Narrow output is not the whole world.** Never conclude "my rig is the only rig on the host" from a `--nodes` read — run bare `rig ps` FIRST (cheap; it lists every rig), then `rig ps --nodes --rig <name>` for the one you need. (`-A` = the expensive whole-host node read; use sparingly. The ~77k-token status-glance incident is closed by compact + scope.)
|
||||
|
||||
### `rig whoami` — compact-by-default + `--full` (`--verbose` alias)
|
||||
|
||||
@@ -532,16 +532,16 @@ rig restore-check --as <session> # narrow to one seat
|
||||
|
||||
Closes the largest measured bomb (~79,000 → low thousands). Summary correctly identifies EVERY not-ready seat (no false-ready omission); detail is dropped only for ready seats.
|
||||
|
||||
### `rig context` — compact summary + `--full`
|
||||
### `rig context` — context-window usage viewer (0.4.x; REMOVED in 0.5.0)
|
||||
|
||||
```bash
|
||||
rig context # compact summary
|
||||
rig context # compact summary (0.4.x only)
|
||||
rig context --full # complete current payload
|
||||
rig context --rig <name> # narrow to one rig
|
||||
rig context --threshold 80 # filter to seats at/above 80%
|
||||
```
|
||||
|
||||
Lower leverage than the others but keeps the read-command surface compact-by-default after the upgrade.
|
||||
Lower leverage than the others; keeps the read-command surface compact-by-default after the 0.4.0 upgrade. **⚠ 0.5.0: this usage viewer is removed entirely and the `rig context` name is reassigned to the context library (store + compose) — see "Context packs and paced delivery (0.5.0)" below. On a 0.5.0 host, bare `rig context` is the library, not this viewer.**
|
||||
|
||||
### Why this matters
|
||||
|
||||
@@ -701,7 +701,7 @@ JSON form exposes `peersNote` directly for programmatic consumers.
|
||||
## Inventory and Monitoring
|
||||
|
||||
```bash
|
||||
rig ps # CURRENT-RIG, compact rig summaries (v0.4.0 default)
|
||||
rig ps # ALL active rigs on the host, one compact row each (run FIRST to know the world)
|
||||
rig ps --nodes # compact node inventory (current rig)
|
||||
rig ps -A # all-rigs breadth (was the pre-0.4.0 default)
|
||||
rig ps --nodes --full # complete per-node record (the firehose — opt-in)
|
||||
@@ -759,6 +759,7 @@ rig send <session> "message" --json
|
||||
- `--dangerously-interact --reason "<why>"` — the ONLY override of the prompt/permission guard: deliberately drive an interactive prompt/permission block (implies `--raw`, requires `--reason`, audit-logged).
|
||||
- `--host <id>` — send on a remote host declared in `~/.openrig/hosts.yaml` (ssh hosts shell out; http hosts go CLI-direct to the remote daemon).
|
||||
- `--from <session>` — originating session for the envelope sender/actor (provenance; defaults to `$OPENRIG_SESSION_NAME`, and is plumbed through cross-host sends so the remote envelope names the origin, not the relay).
|
||||
- `--context <ref>` **(0.5.0)** — attach a composed context pack/piece by ref (see "Context packs and paced delivery"). Small piece → `send --context`; a real pack → `rig walk`. The noun `rig context` composes the ref; the verb delivers it.
|
||||
|
||||
> **Durable work goes to the QUEUE, not `send`.** `rig send` is an *ephemeral* message to a pane — it can be missed, and its delivery status is pane-render, not receipt. If you are **assigning work, or the message is important enough that losing it would be a real bummer**, use `rig queue` (below): it's durable, owned, tracked, and survives compaction and restart. Reach for `send` for a quick conversational nudge; reach for the **queue** for anything that must not get lost. Do not default to `send` for work — that's the most common mistake.
|
||||
|
||||
@@ -905,6 +906,56 @@ rig auth seats … --runtime codex # seat -> profile registry (metadata
|
||||
|
||||
**Hard secret boundary:** no token value is ever printed, logged, queued, streamed, or committed; status/validate report presence/mode/login-state only; seat labels are metadata, not live-account proof. MVP is `--runtime codex`; other runtimes use the same surface with a different `--runtime`, never a parallel command.
|
||||
|
||||
## Context packs and paced delivery (0.5.0)
|
||||
|
||||
**Compose context once, hand it to a seat cleanly.** A library primitive plus a set of delivery flags. The rule that keeps the grammar coherent — internalize this one: **the noun stores and composes; the verbs deliver.** `rig context` never sends anything; delivery is only ever `rig send` / `rig broadcast` / `rig walk` / `rig queue`.
|
||||
|
||||
> Version note: this is the 0.5.0 surface, pinned to the team-locked spec — not yet on lagging hosts. In 0.4.x, bare `rig context` was a context-window usage viewer (above); in 0.5.0 that viewer is removed and the `rig context` name belongs to the library here.
|
||||
|
||||
### `rig context` — the store + compose library (never delivers)
|
||||
|
||||
Manage and compose context (any text/markdown) into reusable **packs**. Every piece and pack has a stable, **path-like ref** — you address context the way you address files (`packs/compaction-restore`, `as-built/queue-internals`).
|
||||
|
||||
```bash
|
||||
rig context list # what's in the library
|
||||
rig context show <ref> # read a piece or pack
|
||||
rig context add <ref> --from <file> # put a piece in the store
|
||||
rig context rm <ref>
|
||||
rig context compose --out packs/<ref> --from <fileA> <fileB> ... # ordered pieces -> a durable pack
|
||||
```
|
||||
|
||||
- Sensible default store location; works unconfigured, can be pointed elsewhere later (another folder now; a machine or URL later).
|
||||
- `compose` (v1) is honest ordered concatenation of named files into a durable pack with a ref — "here's a file, read a file."
|
||||
- **No delivery verb lives on the noun.** To get a pack to a seat, hand its ref to a delivery verb below.
|
||||
|
||||
### `rig walk` — paced delivery of a sequence
|
||||
|
||||
```bash
|
||||
rig walk <seat> --through <ref | file ...> --pace 10s
|
||||
```
|
||||
|
||||
Walk a seat *through* a pack: each piece is sent into the pane, spaced by `--pace`, so the agent processes between sends (the human paste → wait → paste rhythm). Its own top-level verb, push-direction — the walker leads and does not wait for replies; the spacing does the work. Reach for `walk` on onboarding, repriming, or a fleet update — anything absorbed in order rather than all at once.
|
||||
|
||||
### The delivery grammar — send a ref, walk a pack, or attach it to a qitem
|
||||
|
||||
| When | Verb |
|
||||
|---|---|
|
||||
| One thing, now | `rig send <seat> --context <ref>` |
|
||||
| One thing, everyone | `rig broadcast --rig <rig> --context <ref>` |
|
||||
| A sequence, absorbed | `rig walk <seat> --through <ref> --pace 10s` |
|
||||
| Context riding a durable handoff | `rig queue create … --body-context <ref>` |
|
||||
|
||||
- **Rule of thumb:** small piece → `send --context`; real pack → `walk`. An oversized `send --context` warns "this is walk-sized" instead of blasting the pane.
|
||||
- **`--body-context` snapshot rule:** a qitem built from a ref stores the **resolved content** in its body **plus the ref for provenance** — the handoff carries what was actually sent, and a later library edit never silently rewrites a past handoff's history.
|
||||
- **The orchestrator habit — assign work *with* its context attached:**
|
||||
```bash
|
||||
rig context compose --out packs/qitem-brief --from as-built/queue.md conventions/c1-proof.md
|
||||
rig queue create --destination dev-driver@build --body-context packs/qitem-brief --summary "…"
|
||||
```
|
||||
The assignee never greps for the as-built; the curated context rides the durable handoff, survives compaction, and is auditable.
|
||||
|
||||
**Skills tier vs context tier:** skills are the HOT tier (ambient, finite, always-visible front-matter); context packs are the COLD tier (unbounded, fetched on instruction — "walk yourself through `packs/tui-onboarding`"). Don't overrun the skill layer by using skills as context packs — that's what this primitive is for.
|
||||
|
||||
## Lifecycle
|
||||
|
||||
### Bring a rig up
|
||||
@@ -1161,13 +1212,13 @@ Verification loop:
|
||||
```bash
|
||||
rig discover --json
|
||||
rig adopt <fragment.yaml> --bindings-file <bindings.yaml> --target-rig <rigId>
|
||||
rig ps --nodes --json
|
||||
rig ps --nodes --rig <rigId> # the target rig's nodes (--nodes alone = your current rig)
|
||||
rig export <rigId> -o rig.yaml
|
||||
```
|
||||
|
||||
Success looks like:
|
||||
- the new sessions stop appearing in `rig discover`
|
||||
- the new logical IDs appear in `rig ps --nodes --json`
|
||||
- the new logical IDs appear in `rig ps --nodes --rig <rigId>`
|
||||
- `rig export` includes the new pod
|
||||
|
||||
### Mixed-origin rigs are allowed
|
||||
@@ -1185,7 +1236,7 @@ Current safety rule:
|
||||
The proven operator pattern is:
|
||||
- keep one OpenRig manager session outside the rig it manages
|
||||
- address the target by rig name, not cached rig ID
|
||||
- resolve the current owner from fresh `rig ps --nodes --json`
|
||||
- find the target rig with bare `rig ps` (lists all rigs), then resolve its owner from `rig ps --nodes --rig <target>` (a bare `--nodes` read is your current rig only, not the target's)
|
||||
- send the manager the spec path, bindings path, and verification steps with `rig send`
|
||||
|
||||
This lets ordinary agents ask the manager for OpenRig help instead of every agent needing to be an OpenRig expert.
|
||||
@@ -1318,7 +1369,7 @@ Design assumptions that hold in the shipped CLI:
|
||||
|
||||
1. `rig whoami --json`
|
||||
2. `rig transcript <your-session> --tail 100`
|
||||
3. `rig ps --nodes --json`
|
||||
3. `rig ps` — lists ALL rigs on the host (know the world FIRST); then `rig ps --nodes --rig <your-rig>` for your seats. ⚠ `rig ps --nodes --json` alone is your CURRENT rig only — do NOT mistake it for the whole host (a freshly-compacted agent has no other context to catch the lie).
|
||||
4. `rig chatroom history <rig> --limit 50`
|
||||
|
||||
## Commands That Do Not Exist
|
||||
|
||||
@@ -151,6 +151,8 @@ Every qitem carries:
|
||||
- `state` — one of: `pending | in-progress | done | blocked | failed | denied | canceled | handed-off`
|
||||
- `closure_reason` + `closure_target` — set on terminal closure per hot-potato rule
|
||||
|
||||
**(0.5.0) `--body-context <ref>` — context riding the handoff.** `rig queue create … --body-context <ref>` attaches a composed context pack to the qitem. The snapshot rule: the qitem stores the **resolved content** in its body **plus the ref for provenance** — the handoff carries what was actually sent, and a later edit to the library never silently rewrites a past handoff's history. (The `rig context` noun composes the ref; the queue delivers it — the noun has no send.) See `openrig-user` → "Context packs and paced delivery."
|
||||
|
||||
The fields are auditable across both `rigx queue` (config-layer) and
|
||||
`rig queue` (daemon-shipped) surfaces. Watchdog policies and workflow
|
||||
runtime project new owners off these fields.
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@ metadata:
|
||||
- mental-model-ha
|
||||
- scope-recovery
|
||||
- session-compaction-and-restore
|
||||
- retiring-and-inheriting-a-seat
|
||||
- agent-startup-and-context-ingestion
|
||||
- agent-starters
|
||||
- composable-priming-packs
|
||||
@@ -107,7 +108,7 @@ A seat stays `Stable` even if multiple candidate-occupants were produced and dis
|
||||
## Hard boundaries (do-not list; verbatim)
|
||||
|
||||
- **Do NOT collapse `rebuild` and `seat handover` into one primitive.** The design specifically separates them so the system can describe what actually happened.
|
||||
- **Do NOT introduce successor-suffix seat names** (`lead2`/`lead3`). Stable seat identity is the architectural goal.
|
||||
- **Do NOT introduce successor-suffix seat names** (`lead2`/`lead3`). Stable seat identity is the architectural goal. *(Reconciliation: this governs the **live** seat address, which stays clean — the seat name is whoever sits now. A **retired** tenure IS versioned (`<seat>-vN`) as the separately-recorded provenance trail / cold wake-target — that is the lineage, not a live successor-suffix. See `retiring-and-inheriting-a-seat` and its lineage ledger.)*
|
||||
- **Do NOT report `seatBindingOutcome: handed_over`** if the provenance record didn't write durably.
|
||||
- **Do NOT auto-rollback a half-completed handover** by re-attaching the old occupant unless detach completed cleanly first.
|
||||
|
||||
|
||||
+1
@@ -15,6 +15,7 @@ metadata:
|
||||
- composable-priming-packs
|
||||
- session-source-fork
|
||||
- seat-continuity-and-handover
|
||||
- retiring-and-inheriting-a-seat
|
||||
- claude-compact-in-place
|
||||
- pre-maintenance-agent-preservation
|
||||
---
|
||||
|
||||
@@ -15,6 +15,7 @@ metadata:
|
||||
- intake-routing
|
||||
- human-in-the-loop
|
||||
- status-not-chat-orchestrator
|
||||
- oversight-team
|
||||
---
|
||||
|
||||
# Watchdog
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
"claude-compaction-restore",
|
||||
"openrig-architect",
|
||||
"agent-startup-and-context-ingestion",
|
||||
"applying-a-permission-policy"
|
||||
"applying-a-permission-policy",
|
||||
"retiring-and-inheriting-a-seat",
|
||||
"oversight-team"
|
||||
],
|
||||
"ship_misses_add": [
|
||||
"topology-mutation-and-seat-management",
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
"core/session-source-fork/SKILL.md": "43004907271759be52436fb7f30678e9632c9794bd34dec5f96f4e929c1107f2",
|
||||
"core/specification-system/SKILL.md": "5226d6e8b1362df89ba3d5afd82e4b4add355870132ca4b140d7f9f4324ffdc1",
|
||||
"core/topology-mutation-and-seat-management/SKILL.md": "9ba55ef83d2669c23525f0874d3303a87760f3574bc77d0a53cbca9daae295ea",
|
||||
"core/watchdog/SKILL.md": "58c6ff3ce08a82ca2ff796b1c887e6832562a9ee18fee8fbfe197a5160429697",
|
||||
"core/watchdog/SKILL.md": "09cec210690de736c533600097446cabb25b6a6b68b18207d56bbe5cef12e316",
|
||||
"pods/oversight-team/SKILL.md": "cf7bc94d7051b06cdd0c994a74874f0b03761fb7410a1f704ff50611847eb2e2",
|
||||
"process/agent-browser/LOCAL-INSIGHTS.md": "e793e30464517bfe0eee3485fb03206292338552cf7ccaadb1713e39bf21b043",
|
||||
"process/agent-browser/OPENRIG.md": "d15123689824c934b51ba572bc7c4d995651e2f606e0e53697263f4ecde108c9",
|
||||
"process/agent-browser/SKILL.md": "f2709bae71a8c60f6a4b80a6873560cdea9632000ed4b28d082dfae58801199b",
|
||||
@@ -46,19 +47,20 @@
|
||||
"plugin": {
|
||||
"applying-a-permission-policy/SKILL.md": "5a3958cbb945c971d520c98719820fff3930f8738db1b997707436d91e2e4f8a",
|
||||
"claude-compaction-restore/SKILL.md": "16e0a2e0ef711872ede33aeacd92e22f8e1b7c851112aecd4133a9004e376722",
|
||||
"claude-compaction-restore/scripts/precompact-hook.mjs": "be1161c8528f81dcecc7b3f88c17622496e6d8b7c4f376347bf4eb3b37e4d311",
|
||||
"claude-compaction-restore/scripts/precompact-hook.mjs": "3b739a39210985e6aa2da493bfcda58a1587b258440444188e65133b9450ebac",
|
||||
"claude-compaction-restore/scripts/restore-from-jsonl.mjs": "9de164582eed8270d8e257860d156fade3b1295ca952c23b10d3db8569dd964c",
|
||||
"claude-compaction-restore/templates/compact-instruction.md": "682c778464517b831902ddc2678c055545899b4751a1d32391ce965d5eb7061d",
|
||||
"claude-compaction-restore/templates/post-compact-restore-instruction.md": "10a5a7e5e052f3aa000a4209f386dc4eb90a3c2bba449ca685f124714f59e47a",
|
||||
"delegating-work/SKILL.md": "9809781b3ee8d0ffcb411af3ebd3b48257f9dbd9eac652350c0e30d000c0d236",
|
||||
"forming-an-openrig-mental-model/SKILL.md": "fa471c5bcf3a9b7672ac3ea674271343fbe2700365773cee9ee715b7180d3752",
|
||||
"messaging-the-human/SKILL.md": "95484b323586a229d05cc2298a93a1000601dba3d47f0258c245e123fef10a53",
|
||||
"mission-slice-sop/SKILL.md": "dc80a2195d01b1cf3819754a102f4b46ebf048e991cc5bdcdb4cc07348765f4c",
|
||||
"mission-slice-sop/SKILL.md": "37f0b5918a49722203058f7fa06fd5b21197be055d869c6cc6a7beee855c2e4e",
|
||||
"openrig-skills/SKILL.md": "95de99fa436f3828cc14c9d5a0f3f32298d48adf1a4a7a41633102b643f79016",
|
||||
"openrig-user/SKILL.md": "a60f38fa732750dbcd6bf449485e0f6efa27b30c9b7e368da3a9cc4c2ed58cf1",
|
||||
"queue-handoff/SKILL.md": "9413dd28597beb4f4d4e0c1c195625bf39e559bce963e43ca3797ca448a9f2b9",
|
||||
"seat-continuity-and-handover/SKILL.md": "4ccf8535e92ce1f282af9b85a630fd6bebebd4750cae53f257818833d306e500",
|
||||
"session-compaction-and-restore/SKILL.md": "20783614bc278285743f007347ffec4fe40d5d7f28ed5fd4ef0438534785bc06",
|
||||
"openrig-user/SKILL.md": "190473deb326b83324dc3bf7403ad03fbac26516a98994c30a429b9e03ae7441",
|
||||
"queue-handoff/SKILL.md": "4fc502e08fb316b25b8f12d18c92e62fde97ab56a13a5b9b58ad4534aca54f3f",
|
||||
"retiring-and-inheriting-a-seat/SKILL.md": "f2e3e5d8417badb836eb91bdf34cd8be1236a8d455fdca4ad42df28e21b4473a",
|
||||
"seat-continuity-and-handover/SKILL.md": "1371b783364a6b86e43939e89738254519b9425113123a1ae990db96f78f2c76",
|
||||
"session-compaction-and-restore/SKILL.md": "2e785328d6e847e931d0d4a1152b075bab4501be17336b3730fea6c14bd4b6e0",
|
||||
"software-for-agents/SKILL.md": "352e0e46a85c4ff74c6c805692de8386281030c8681c7dbd21923bd72bcfa9f8"
|
||||
},
|
||||
"spec": {
|
||||
@@ -76,7 +78,8 @@
|
||||
"core/session-source-fork/SKILL.md": "43004907271759be52436fb7f30678e9632c9794bd34dec5f96f4e929c1107f2",
|
||||
"core/specification-system/SKILL.md": "5226d6e8b1362df89ba3d5afd82e4b4add355870132ca4b140d7f9f4324ffdc1",
|
||||
"core/topology-mutation-and-seat-management/SKILL.md": "9ba55ef83d2669c23525f0874d3303a87760f3574bc77d0a53cbca9daae295ea",
|
||||
"core/watchdog/SKILL.md": "58c6ff3ce08a82ca2ff796b1c887e6832562a9ee18fee8fbfe197a5160429697",
|
||||
"core/watchdog/SKILL.md": "09cec210690de736c533600097446cabb25b6a6b68b18207d56bbe5cef12e316",
|
||||
"pods/oversight-team/SKILL.md": "cf7bc94d7051b06cdd0c994a74874f0b03761fb7410a1f704ff50611847eb2e2",
|
||||
"process/agent-browser/LOCAL-INSIGHTS.md": "e793e30464517bfe0eee3485fb03206292338552cf7ccaadb1713e39bf21b043",
|
||||
"process/agent-browser/OPENRIG.md": "d15123689824c934b51ba572bc7c4d995651e2f606e0e53697263f4ecde108c9",
|
||||
"process/agent-browser/SKILL.md": "f2709bae71a8c60f6a4b80a6873560cdea9632000ed4b28d082dfae58801199b",
|
||||
|
||||
@@ -204,6 +204,13 @@
|
||||
],
|
||||
"category": "pods"
|
||||
},
|
||||
"oversight-team": {
|
||||
"edges": [
|
||||
"canonical",
|
||||
"spec"
|
||||
],
|
||||
"category": "pods"
|
||||
},
|
||||
"plan-review": {
|
||||
"edges": [
|
||||
"canonical",
|
||||
@@ -224,6 +231,12 @@
|
||||
],
|
||||
"category": "pm"
|
||||
},
|
||||
"retiring-and-inheriting-a-seat": {
|
||||
"edges": [
|
||||
"plugin"
|
||||
],
|
||||
"category": null
|
||||
},
|
||||
"review-team": {
|
||||
"edges": [
|
||||
"canonical",
|
||||
|
||||
@@ -15,6 +15,7 @@ metadata:
|
||||
- intake-routing
|
||||
- human-in-the-loop
|
||||
- status-not-chat-orchestrator
|
||||
- oversight-team
|
||||
---
|
||||
|
||||
# Watchdog
|
||||
|
||||
Reference in new issue
Block a user