@openrig/cli 0.4.6 → 0.4.8
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/daemon/assets/guidance/CULTURE-default.md +19 -0
- package/daemon/assets/guidance/openrig-start.md +20 -5
- package/daemon/assets/plugins/openrig-core/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md +120 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +9 -6
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +11 -72
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +0 -0
- package/daemon/assets/plugins/openrig-core/skills/delegating-work/SKILL.md +43 -0
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +36 -22
- package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +108 -0
- package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +7 -13
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +88 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +189 -105
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +26 -9
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +11 -9
- package/daemon/assets/plugins/openrig-core/skills/session-compaction-and-restore/SKILL.md +162 -0
- package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +165 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts +0 -9
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +13 -46
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts +1 -1
- package/daemon/dist/adapters/claude-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-resume.js +8 -2
- package/daemon/dist/adapters/claude-resume.js.map +1 -1
- package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux-transport.js +8 -1
- package/daemon/dist/adapters/cmux-transport.js.map +1 -1
- package/daemon/dist/adapters/cmux.d.ts +9 -0
- package/daemon/dist/adapters/cmux.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux.js +21 -0
- package/daemon/dist/adapters/cmux.js.map +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts +1 -1
- package/daemon/dist/adapters/codex-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-resume.js +4 -2
- package/daemon/dist/adapters/codex-resume.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +3 -0
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +30 -9
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts +1 -1
- package/daemon/dist/adapters/pi-resume.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-resume.js +7 -2
- package/daemon/dist/adapters/pi-resume.js.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js +4 -1
- package/daemon/dist/adapters/pi-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/yolo-mode.d.ts +23 -0
- package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -0
- package/daemon/dist/adapters/yolo-mode.js +49 -0
- package/daemon/dist/adapters/yolo-mode.js.map +1 -0
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/db/migrations/055_node_permission_policy.d.ts +13 -0
- package/daemon/dist/db/migrations/055_node_permission_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/055_node_permission_policy.js +17 -0
- package/daemon/dist/db/migrations/055_node_permission_policy.js.map +1 -0
- package/daemon/dist/db/migrations/056_rig_permission_policy.d.ts +13 -0
- package/daemon/dist/db/migrations/056_rig_permission_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/056_rig_permission_policy.js +17 -0
- package/daemon/dist/db/migrations/056_rig_permission_policy.js.map +1 -0
- package/daemon/dist/db/migrations/057_node_policy_provenance.d.ts +19 -0
- package/daemon/dist/db/migrations/057_node_policy_provenance.d.ts.map +1 -0
- package/daemon/dist/db/migrations/057_node_policy_provenance.js +26 -0
- package/daemon/dist/db/migrations/057_node_policy_provenance.js.map +1 -0
- package/daemon/dist/db/migrations/058_rig_policy_provenance.d.ts +15 -0
- package/daemon/dist/db/migrations/058_rig_policy_provenance.d.ts.map +1 -0
- package/daemon/dist/db/migrations/058_rig_policy_provenance.js +22 -0
- package/daemon/dist/db/migrations/058_rig_policy_provenance.js.map +1 -0
- package/daemon/dist/domain/builtin-policy-reference.d.ts +13 -0
- package/daemon/dist/domain/builtin-policy-reference.d.ts.map +1 -0
- package/daemon/dist/domain/builtin-policy-reference.js +58 -0
- package/daemon/dist/domain/builtin-policy-reference.js.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +3 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -1
- package/daemon/dist/domain/claude-compaction-enforcer.js +19 -3
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -1
- package/daemon/dist/domain/cmux-layout-service.d.ts +36 -0
- package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -1
- package/daemon/dist/domain/cmux-layout-service.js +100 -28
- package/daemon/dist/domain/cmux-layout-service.js.map +1 -1
- package/daemon/dist/domain/context-monitor.d.ts +2 -0
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +14 -0
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.js +1 -1
- package/daemon/dist/domain/feed/attention-aggregator.js.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-reader.js +12 -10
- package/daemon/dist/domain/hosts/hosts-registry-reader.js.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/hosts-registry-writer.js +3 -2
- package/daemon/dist/domain/hosts/hosts-registry-writer.js.map +1 -1
- package/daemon/dist/domain/hosts/read-through.js +1 -1
- package/daemon/dist/domain/hosts/read-through.js.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.d.ts.map +1 -1
- package/daemon/dist/domain/hosts/remote-daemon-http.js +8 -5
- package/daemon/dist/domain/hosts/remote-daemon-http.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts +1 -1
- package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +11 -4
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +3 -12
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +57 -15
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/permission-policy/policy-ref.d.ts +89 -0
- package/daemon/dist/domain/permission-policy/policy-ref.d.ts.map +1 -0
- package/daemon/dist/domain/permission-policy/policy-ref.js +171 -0
- package/daemon/dist/domain/permission-policy/policy-ref.js.map +1 -0
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts +34 -0
- package/daemon/dist/domain/permission-policy/policy-spec.d.ts.map +1 -0
- package/daemon/dist/domain/permission-policy/policy-spec.js +106 -0
- package/daemon/dist/domain/permission-policy/policy-spec.js.map +1 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts +2 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
- package/daemon/dist/domain/plugin-vendor-service.js +23 -0
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
- package/daemon/dist/domain/projection-lane.d.ts +7 -0
- package/daemon/dist/domain/projection-lane.d.ts.map +1 -0
- package/daemon/dist/domain/projection-lane.js +28 -0
- package/daemon/dist/domain/projection-lane.js.map +1 -0
- package/daemon/dist/domain/ps-projection.d.ts +19 -0
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +46 -6
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +14 -10
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +33 -12
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.d.ts +14 -0
- package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/restore-orchestrator.js +90 -6
- package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
- package/daemon/dist/domain/review/compose.d.ts +77 -4
- package/daemon/dist/domain/review/compose.d.ts.map +1 -1
- package/daemon/dist/domain/review/compose.js +152 -16
- package/daemon/dist/domain/review/compose.js.map +1 -1
- package/daemon/dist/domain/review/fleet-compose.js +1 -1
- package/daemon/dist/domain/review/fleet-compose.js.map +1 -1
- package/daemon/dist/domain/review/gather.d.ts +1 -1
- package/daemon/dist/domain/review/gather.d.ts.map +1 -1
- package/daemon/dist/domain/review/gather.js +92 -67
- package/daemon/dist/domain/review/gather.js.map +1 -1
- package/daemon/dist/domain/review/proof-io.d.ts +2 -0
- package/daemon/dist/domain/review/proof-io.d.ts.map +1 -0
- package/daemon/dist/domain/review/proof-io.js +38 -0
- package/daemon/dist/domain/review/proof-io.js.map +1 -0
- package/daemon/dist/domain/rig-expansion-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-expansion-service.js +10 -1
- package/daemon/dist/domain/rig-expansion-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +45 -0
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +75 -1
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-codec.js +6 -0
- package/daemon/dist/domain/rigspec-codec.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +8 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts +18 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +202 -10
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.d.ts +11 -0
- package/daemon/dist/domain/rigspec-preflight.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-preflight.js +35 -1
- package/daemon/dist/domain/rigspec-preflight.js.map +1 -1
- package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-schema.js +25 -0
- package/daemon/dist/domain/rigspec-schema.js.map +1 -1
- package/daemon/dist/domain/runtime-adapter.d.ts +5 -0
- package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/runtime-adapter.js.map +1 -1
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +8 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.js +57 -0
- package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +38 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js +98 -0
- package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -0
- package/daemon/dist/domain/scope/scope-approve.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-approve.js +22 -1
- package/daemon/dist/domain/scope/scope-approve.js.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.d.ts.map +1 -1
- package/daemon/dist/domain/scope/scope-audit.js +57 -20
- package/daemon/dist/domain/scope/scope-audit.js.map +1 -1
- package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
- package/daemon/dist/domain/seat-handover-service.js +7 -1
- package/daemon/dist/domain/seat-handover-service.js.map +1 -1
- package/daemon/dist/domain/session-transport.d.ts +17 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +44 -0
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/slices/qitem-membership.d.ts +17 -0
- package/daemon/dist/domain/slices/qitem-membership.d.ts.map +1 -0
- package/daemon/dist/domain/slices/qitem-membership.js +60 -0
- package/daemon/dist/domain/slices/qitem-membership.js.map +1 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts +5 -0
- package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-detail-projector.js +157 -11
- package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.d.ts +86 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +422 -45
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.d.ts +9 -0
- package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/startup-orchestrator.js +71 -3
- package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.d.ts +4 -0
- package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/successor-session-launcher.js +2 -0
- package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts +12 -11
- package/daemon/dist/domain/terminal/cmux-provider-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js +61 -28
- package/daemon/dist/domain/terminal/cmux-provider-adapter.js.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts +27 -10
- package/daemon/dist/domain/terminal/herdr-adapter.d.ts.map +1 -1
- package/daemon/dist/domain/terminal/herdr-adapter.js +74 -33
- package/daemon/dist/domain/terminal/herdr-adapter.js.map +1 -1
- package/daemon/dist/domain/transcript-capture.d.ts +3 -0
- package/daemon/dist/domain/transcript-capture.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-capture.js +28 -0
- package/daemon/dist/domain/transcript-capture.js.map +1 -1
- package/daemon/dist/domain/transcript-store.d.ts +10 -0
- package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
- package/daemon/dist/domain/transcript-store.js +26 -0
- package/daemon/dist/domain/transcript-store.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +21 -0
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +9 -4
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.js +1 -1
- package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -1
- package/daemon/dist/routes/agent-images.d.ts.map +1 -1
- package/daemon/dist/routes/agent-images.js +2 -0
- package/daemon/dist/routes/agent-images.js.map +1 -1
- package/daemon/dist/routes/mission-control.js +1 -1
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/missions.d.ts +7 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -1
- package/daemon/dist/routes/missions.js +6 -1
- package/daemon/dist/routes/missions.js.map +1 -1
- package/daemon/dist/routes/ps.d.ts.map +1 -1
- package/daemon/dist/routes/ps.js +5 -1
- package/daemon/dist/routes/ps.js.map +1 -1
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +9 -2
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +29 -10
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/scope-audit.d.ts.map +1 -1
- package/daemon/dist/routes/scope-audit.js +141 -135
- package/daemon/dist/routes/scope-audit.js.map +1 -1
- package/daemon/dist/routes/sessions.js +2 -1
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +48 -38
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/transcripts.d.ts.map +1 -1
- package/daemon/dist/routes/transcripts.js +62 -33
- package/daemon/dist/routes/transcripts.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +42 -12
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-startup-guide.md +1 -0
- package/daemon/docs/reference/rig-spec.md +19 -0
- package/daemon/policies/builtin/locked.policy.md +24 -0
- package/daemon/policies/builtin/open.policy.md +24 -0
- package/daemon/policies/builtin/standard.policy.md +25 -0
- package/daemon/policies/builtin/yolo.policy.md +20 -0
- package/daemon/policies/examples/my-cautious-dev.policy.md +40 -0
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/builder/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/lead/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/planner/agent.yaml +2 -1
- package/daemon/specs/agents/conveyor/reviewer/agent.yaml +2 -1
- package/daemon/specs/agents/design/product-designer/agent.yaml +12 -2
- package/daemon/specs/agents/development/implementer/agent.yaml +12 -2
- package/daemon/specs/agents/development/qa/agent.yaml +12 -2
- package/daemon/specs/agents/development/qa/guidance/role.md +1 -0
- package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +2 -1
- package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +2 -1
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +12 -2
- package/daemon/specs/agents/product-management/pm/agent.yaml +1 -2
- package/daemon/specs/agents/research/analyst/agent.yaml +2 -1
- package/daemon/specs/agents/research/synthesizer/agent.yaml +2 -1
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +12 -2
- package/daemon/specs/agents/shared/agent.yaml +5 -8
- package/daemon/specs/agents/shared/runtime/claude-settings.fragment.json +1 -8
- package/daemon/specs/agents/shared/skills/core/agent-starters/SKILL.md +132 -0
- package/daemon/{assets/plugins/openrig-core/skills → specs/agents/shared/skills/core}/agent-startup-and-context-ingestion/SKILL.md +27 -19
- package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +264 -0
- package/daemon/specs/agents/shared/skills/core/cross-host-rig-commands/SKILL.md +190 -0
- package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +104 -0
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +23 -8
- package/daemon/specs/agents/shared/skills/core/openrig-cmux/SKILL.md +0 -5
- package/daemon/specs/agents/shared/skills/core/openrig-herdr/SKILL.md +1 -6
- package/daemon/specs/agents/shared/skills/core/openrig-upgrade/SKILL.md +460 -0
- package/daemon/specs/agents/shared/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +22 -11
- package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +160 -0
- package/daemon/specs/agents/shared/skills/core/specification-system/SKILL.md +103 -0
- package/daemon/specs/agents/shared/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
- package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +125 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +3 -3
- package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +1 -1
- package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +6 -3
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/find-polluter.sh +0 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +1 -1
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +13 -2
- package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +1 -1
- package/daemon/specs/rigs/focused/pm-team/CULTURE.md +1 -1
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +2 -2
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +5 -4
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +2 -2
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +3 -5
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +2 -2
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +3 -4
- package/daemon/specs/rigs/preview/product-team/CULTURE.md +1 -1
- package/dist/bin-wrapper.d.ts.map +1 -1
- package/dist/bin-wrapper.js +3 -1
- package/dist/bin-wrapper.js.map +1 -1
- package/dist/build-info.js +3 -3
- package/dist/cli-error.d.ts +33 -0
- package/dist/cli-error.d.ts.map +1 -0
- package/dist/cli-error.js +94 -0
- package/dist/cli-error.js.map +1 -0
- package/dist/commands/config-init-workspace.js +1 -1
- package/dist/commands/doctor.d.ts +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +17 -11
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/host.d.ts.map +1 -1
- package/dist/commands/host.js +24 -10
- package/dist/commands/host.js.map +1 -1
- package/dist/commands/proof.js +1 -1
- package/dist/commands/proof.js.map +1 -1
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +16 -2
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +103 -24
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +122 -0
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/scope.js +2 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +118 -24
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/setup.d.ts +14 -0
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +131 -8
- package/dist/commands/setup.js.map +1 -1
- package/dist/commands/slack.d.ts +37 -0
- package/dist/commands/slack.d.ts.map +1 -0
- package/dist/commands/slack.js +274 -0
- package/dist/commands/slack.js.map +1 -0
- package/dist/commands/ui.d.ts +1 -0
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +2 -0
- package/dist/commands/ui.js.map +1 -1
- package/dist/commands/up.js +1 -1
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/whoami.d.ts.map +1 -1
- package/dist/commands/whoami.js +3 -3
- package/dist/commands/whoami.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +45 -14
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts +6 -1
- package/dist/host-registry.d.ts.map +1 -1
- package/dist/host-registry.js +15 -6
- package/dist/host-registry.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/scope/scaffold-placeholder.d.ts +38 -0
- package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -0
- package/dist/lib/scope/scaffold-placeholder.js +98 -0
- package/dist/lib/scope/scaffold-placeholder.js.map +1 -0
- package/dist/lib/scope/scope-audit.d.ts.map +1 -1
- package/dist/lib/scope/scope-audit.js +57 -20
- package/dist/lib/scope/scope-audit.js.map +1 -1
- package/dist/lib/scope-templates/backlog-deprecation.md +1 -1
- package/dist/lib/scope-templates/backlog-tech-debt.md +1 -1
- package/dist/lib/scope-templates/bug-fix.md +1 -1
- package/dist/lib/scope-templates/implementation-prd.md +1 -1
- package/dist/lib/scope-templates/mission-notes.md +7 -2
- package/dist/lib/scope-templates/mission-placeholder.md +1 -1
- package/dist/lib/scope-templates/mission-progress.md +1 -1
- package/dist/lib/scope-templates/mission-release.md +1 -1
- package/dist/lib/scope-templates/placeholder.md +1 -1
- package/dist/lib/scope-templates/proof.md +1 -1
- package/dist/lib/scope-templates/release-feature.md +1 -1
- package/dist/lib/scope-templates/research.md +1 -1
- package/dist/lib/scope-templates/slice-progress.md +1 -1
- package/dist/remote-host-ops.d.ts.map +1 -1
- package/dist/remote-host-ops.js +2 -2
- package/dist/remote-host-ops.js.map +1 -1
- package/dist/slack/config.d.ts +41 -0
- package/dist/slack/config.d.ts.map +1 -0
- package/dist/slack/config.js +60 -0
- package/dist/slack/config.js.map +1 -0
- package/dist/slack/inbound.d.ts +75 -0
- package/dist/slack/inbound.d.ts.map +1 -0
- package/dist/slack/inbound.js +133 -0
- package/dist/slack/inbound.js.map +1 -0
- package/dist/slack/message.d.ts +26 -0
- package/dist/slack/message.d.ts.map +1 -0
- package/dist/slack/message.js +60 -0
- package/dist/slack/message.js.map +1 -0
- package/dist/slack/outbound.d.ts +39 -0
- package/dist/slack/outbound.d.ts.map +1 -0
- package/dist/slack/outbound.js +52 -0
- package/dist/slack/outbound.js.map +1 -0
- package/dist/slack/queue-bridge.d.ts +56 -0
- package/dist/slack/queue-bridge.d.ts.map +1 -0
- package/dist/slack/queue-bridge.js +114 -0
- package/dist/slack/queue-bridge.js.map +1 -0
- package/dist/slack/secrets.d.ts +21 -0
- package/dist/slack/secrets.d.ts.map +1 -0
- package/dist/slack/secrets.js +73 -0
- package/dist/slack/secrets.js.map +1 -0
- package/dist/slack/slack-api.d.ts +49 -0
- package/dist/slack/slack-api.d.ts.map +1 -0
- package/dist/slack/slack-api.js +110 -0
- package/dist/slack/slack-api.js.map +1 -0
- package/dist/slack/state-store.d.ts +62 -0
- package/dist/slack/state-store.d.ts.map +1 -0
- package/dist/slack/state-store.js +132 -0
- package/dist/slack/state-store.js.map +1 -0
- package/package.json +1 -1
- package/ui/dist/assets/{index-zrFqS7gL.js → index-DkNi0RT8.js} +184 -184
- package/ui/dist/assets/index-N-SdPj-I.css +32 -0
- package/ui/dist/index.html +2 -2
- package/daemon/assets/plugins/openrig-core/skills/openrig-architect/SKILL.md +0 -361
- package/daemon/assets/plugins/openrig-core/skills/openrig-cmux/SKILL.md +0 -86
- package/daemon/assets/plugins/openrig-core/skills/openrig-herdr/SKILL.md +0 -158
- package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +0 -222
- package/daemon/docs/reference/product-factory-vps-runbook.md +0 -132
- package/daemon/specs/agents/shared/skills/core/mission-slice-sop/SKILL.md +0 -113
- package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +0 -142
- package/daemon/specs/agents/shared/skills/core/openrig-operator/SKILL.md +0 -110
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +0 -1245
- package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +0 -153
- package/daemon/specs/agents/shared/skills/pm/backlog-capture/SKILL.md +0 -43
- package/daemon/specs/agents/shared/skills/pm/context-builder/SKILL.md +0 -87
- package/daemon/specs/agents/shared/skills/pm/exec-summary/SKILL.md +0 -84
- package/daemon/specs/agents/shared/skills/pm/office-hours/SKILL.md +0 -129
- package/daemon/specs/agents/shared/skills/pm/plan-review/SKILL.md +0 -98
- package/daemon/specs/agents/shared/skills/pm/requirements-writer/SKILL.md +0 -113
- package/daemon/specs/agents/shared/skills/pm/ui-mockup/SKILL.md +0 -76
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +0 -148
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +0 -266
- package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +0 -210
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/CREATION-LOG.md +0 -119
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-academic.md +0 -14
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-pressure-1.md +0 -58
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-pressure-2.md +0 -68
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/test-pressure-3.md +0 -69
- package/ui/dist/assets/index-CFqxa0zW.css +0 -32
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# OpenRig default culture
|
|
2
|
+
|
|
3
|
+
This is the universal operating floor for every OpenRig team. A rig's own culture may add role- or domain-specific guidance on top of it.
|
|
4
|
+
|
|
5
|
+
## Pragmatic truth-seeking
|
|
6
|
+
|
|
7
|
+
Be plain and forthcoming. Say when something is wrong, show the evidence that matters, and change your mind quickly when the evidence changes. Do not agree performatively, and do not manufacture objections to look rigorous.
|
|
8
|
+
|
|
9
|
+
## Principles over rules
|
|
10
|
+
|
|
11
|
+
Use judgment from the goal in front of you. Keep hard rules for genuinely high-stakes boundaries: never destroy an authenticated owner environment, never push or publish without authorization, and never leak secrets.
|
|
12
|
+
|
|
13
|
+
## Ship good, working product
|
|
14
|
+
|
|
15
|
+
Bias toward action and deliver what the user asked for. Guardrails, reviews, and proofs serve the product; they are not the product. A real blocker should be named precisely while unblocked work continues.
|
|
16
|
+
|
|
17
|
+
## Match rigor to stakes
|
|
18
|
+
|
|
19
|
+
Use root-cause discipline, verify the real user path, and protect owner state. Be thorough where failure has real consequences and decisive on low-risk details. When process starts taking more attention than the product, simplify and get back to shipping.
|
|
@@ -5,6 +5,11 @@ You are running inside an OpenRig-managed topology.
|
|
|
5
5
|
This file is the thin bootstrap overlay, not the full OpenRig manual.
|
|
6
6
|
Use it to recover identity, communicate, and regain context after launch or compaction.
|
|
7
7
|
|
|
8
|
+
When you are unsure which packaged skill applies, start with the global `openrig-skills` index. It routes to every shipped skill in one hop:
|
|
9
|
+
|
|
10
|
+
- Claude Code: `~/.claude/skills/openrig-skills/SKILL.md`
|
|
11
|
+
- Codex: `~/.agents/skills/openrig-skills/SKILL.md`
|
|
12
|
+
|
|
8
13
|
For the full OpenRig command surface, load the packaged `openrig-user` skill now.
|
|
9
14
|
If your runtime supports skills, use that mechanism.
|
|
10
15
|
If it does not auto-load skills reliably, read the packaged copy directly from your current project or workspace:
|
|
@@ -14,14 +19,15 @@ If it does not auto-load skills reliably, read the packaged copy directly from y
|
|
|
14
19
|
|
|
15
20
|
That skill covers the broader surface, including chatroom, discovery, adopt/bind/attach, lifecycle, specs, bundles, and richer operator workflows.
|
|
16
21
|
|
|
17
|
-
Your per-session startup guidance
|
|
18
|
-
Load
|
|
22
|
+
Your per-session startup guidance also names the process skills for your role and pod.
|
|
23
|
+
Load AND invoke those now, before proceeding with any work, using your runtime's supported skill mechanism.
|
|
24
|
+
This shared overlay is only the common bootstrap floor, not the full operating manual for your seat.
|
|
19
25
|
|
|
20
26
|
## Working missions and slices (the SDLC)
|
|
21
27
|
|
|
22
28
|
If your seat works missions or slices, load the packaged `mission-slice-sop` skill BEFORE authoring or building — it teaches the flow the Living Notes UI projects: intent → mini-requirements + proof contract (→ mockups for UI slices) → plan-lock (`rig scope slice approve --scope spec`) → build the locked set → QA visual compare → `rig proof add … --media` drops (the C1 drop verb — never hand-place proof files) → proof-lock (`--scope delivery`).
|
|
23
29
|
|
|
24
|
-
The conventions themselves (section names, proof-contract format, the two locks, C1 proof headers) live in ONE shipped document: `docs/reference/sdlc-conventions.md`
|
|
30
|
+
The conventions themselves (section names, proof-contract format, the two locks, C1 proof headers) live in ONE shipped document: `docs/reference/sdlc-conventions.md` in the repo, materialized at `$OPENRIG_HOME/reference/sdlc-conventions.md` (default `~/.openrig/reference/sdlc-conventions.md`) on an installed package. `rig scope slice create` scaffolds the convention sections for every template kind; `rig scope audit` is the advisory backstop — it records and advises, it never blocks your work.
|
|
25
31
|
|
|
26
32
|
## Identity
|
|
27
33
|
|
|
@@ -50,7 +56,12 @@ Broadcast to all peers in your rig:
|
|
|
50
56
|
rig broadcast --rig <name> "message"
|
|
51
57
|
```
|
|
52
58
|
|
|
53
|
-
## Transcript
|
|
59
|
+
## Secondary Transcript Check
|
|
60
|
+
|
|
61
|
+
After compaction, recover work from durable artifacts first: the restore map,
|
|
62
|
+
current `MISSION_NOTES.md`, and your owned queue items. Transcript output is a
|
|
63
|
+
secondary check and may be unavailable or incomplete for some runtimes. Little
|
|
64
|
+
or no output does not mean the session was quiet.
|
|
54
65
|
|
|
55
66
|
Read recent transcript output:
|
|
56
67
|
```bash
|
|
@@ -64,4 +75,8 @@ rig transcript <session> --grep "pattern"
|
|
|
64
75
|
|
|
65
76
|
## After Compaction
|
|
66
77
|
|
|
67
|
-
If you lose context, run `rig whoami --json` immediately. It tells you who you
|
|
78
|
+
If you lose context, run `rig whoami --json` immediately. It tells you who you
|
|
79
|
+
are, who your peers are, and how to reach them. Rebuild the work from the
|
|
80
|
+
restore map, current `MISSION_NOTES.md`, and your owned queue items. Use
|
|
81
|
+
`rig transcript` only as a secondary check; if it returns little or nothing,
|
|
82
|
+
do not conclude that the session was quiet.
|
|
@@ -4,7 +4,7 @@ Canonical OpenRig skills and hooks for cross-runtime agent topology coordination
|
|
|
4
4
|
|
|
5
5
|
## What this plugin ships
|
|
6
6
|
|
|
7
|
-
**Skills (
|
|
7
|
+
**Skills (10):** the canonical OpenRig operating knowledge — how to use the `rig` CLI, how to design rig topologies, how to recover from compaction, how to hand work off durably between agents, and how to maintain seat continuity across handovers and restarts.
|
|
8
8
|
|
|
9
9
|
**Hooks:** activity-tracking hooks (Claude Code: 4 events; Codex: 3 events) that POST agent state to the OpenRig daemon for real-time UI seat-status updates.
|
|
10
10
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: applying-a-permission-policy
|
|
3
|
+
description: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
|
|
4
|
+
metadata:
|
|
5
|
+
openrig:
|
|
6
|
+
stage: established # config cells VM-verified + cold-transfer PASSING (rerun #2, 627abbb6) + built-in SPEC FILES landed → skill translates FROM the spec (POINT-not-COPY). The two established criteria met 2026-08-04. Reviewed at push.
|
|
7
|
+
tested_against: # VERSION STAMP — the whole point; re-verify at every harness bump
|
|
8
|
+
claude_code: "2.1.220 — VM-CONFIRMED 2026-08-03 (all cells)"
|
|
9
|
+
codex: "0.120.0 — VM-CONFIRMED 2026-08-03 (sandbox_mode/approval_policy; on-failure deprecated-but-accepted)"
|
|
10
|
+
pi: "0.83.0 — VM-CONFIRMED 2026-08-03: --approve/--no-approve govern PROJECT-RESOURCE TRUST, NOT tool permissions; Pi has NO permission surface (see Pi leg)"
|
|
11
|
+
verification_status: "Live-verified 2026-08-03/04 (dev-qa @ v-openrig-build). Claude 2.1.220 + Codex 0.120.0 config cells CONFIRMED live. Pi 0.83.0 divergence folded (flags = project-resource trust, not a permission gate). Cold-transfer rerun #1 blocked on the force_push/push_to_remote prefix collision → added the PREFIX-COLLISION rule. Cold-transfer rerun #2 (qitem 001c95fd, verdict SHA 627abbb6bf08ad2f350e2101f11438975def7b193b8da8bbcb747647239afc358): TRANSFERS — all 5 gate checks pass (collision resolved deterministically without asking; single ordinary write confirmation; defaultMode floor written; Codex workspace-write/on-request; Pi compute-nothing). Blocking collision/floor defect CLOSED → gate cleared, 4.8-shippable (provisional-with-passing-cold-transfer). Non-blocking seam closed: the built-in SPEC FILES landed (arch-accepted, source:builtin) → skill translates FROM the spec, interim in-skill pinned summary retired (POINT-not-COPY). stage:ESTABLISHED 2026-08-04 — both criteria met."
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Applying a permission policy
|
|
15
|
+
|
|
16
|
+
## Translation is best-effort — read this first
|
|
17
|
+
This skill provides the policy schema and OpenRig's best current understanding of how to translate it to each harness. That guidance is **best-effort and version-stamped**: harness permission surfaces change frequently across versions, so a mapping that is correct today can drift on a later release. When you apply a config-surface policy:
|
|
18
|
+
- **Verify against the current docs for your installed harness version.** Treat this skill's tables as version-stamped starting points (see `tested_against`), not settled truth.
|
|
19
|
+
- **Prefer testing in a protected or disposable environment first.** An incorrect write can lock a seat out or over-permit it, so confirm the format before applying it to a live seat.
|
|
20
|
+
- **Hand-editing via the harness's own settings tools is always a valid path.** If a translation is uncertain, setting the policy directly — or asking the user to — is a legitimate outcome, not a failure.
|
|
21
|
+
|
|
22
|
+
The reliable, deterministic parts are the **blunt instruments**: the YOLO full-bypass flag and the floor (Claude `acceptEdits` / Codex `workspace-write`), which ride the stable launch-flag surface. **Fine-grained config-rule translation — the allow/ask/deny prefix rules and the Codex posture — is the best-effort part** and carries no guarantee of exact fidelity. If a translation looks wrong, fall back to a blunt instrument or a direct hand-edit.
|
|
23
|
+
|
|
24
|
+
## ⚠ Read this preamble first — why this is a SKILL, not a script (do not "improve" it into a deterministic updater)
|
|
25
|
+
Harness permission formats are a **moving target**. The exact fact this skill is stamped against — Claude Code 2.1.220 permission rules are **prefix-only** (no flag-precise Bash match) — is *version-specific*; the rule grammar can change on the next point release. A hardcoded/deterministic updater would foot-gun the instant it does, and a wrong permission write can **lock a seat out or silently over-permit it**. So the maintained artifact is this caveated, version-stamped skill that an agent reads and applies **interactively, grounding in the live format** — never a code path that writes blindly. If you are tempted to replace this with a deterministic projector: that temptation is the bug this preamble exists to stop.
|
|
26
|
+
|
|
27
|
+
## When to reach for this
|
|
28
|
+
- A rig/seat has a policy attached (`rig.yaml … permission_policy: <file>`), and you're at **setup/preflight** — apply it (**mandatory for autonomous seats**, see the freeze warning).
|
|
29
|
+
- A user asks "apply the Standard/Open/Locked/Operator policy here" or "set up permissions like <host>".
|
|
30
|
+
- NOT for authoring policies (that's the policy spec) and NOT for daemon-level enforcement (OpenRig is agnostic — it injects nothing).
|
|
31
|
+
|
|
32
|
+
## What you're translating (the boundary)
|
|
33
|
+
INPUT = a **harness-neutral policy spec** (arch's schema): `default_posture`, `floor`, `allow`/`ask`/`deny` as **semantic actions** (`push_to_remote`, `delete_files`, …), `destructive_class`, `source: builtin|custom`. You TRANSLATE that intent → the harness's live config. You never invent policy; you never pre-bake harness config into the spec.
|
|
34
|
+
|
|
35
|
+
## The apply flow (interactive — the interactive-ask IS the product)
|
|
36
|
+
1. **Read the policy spec** + its `source:` marker (built-in read-only from the package = copy-to-customize before editing; custom = user space).
|
|
37
|
+
2. **PREFLIGHT (mandatory) — ground yourself in THIS environment:**
|
|
38
|
+
- **daemon-HOME must equal seat-HOME**, or a user-level Claude write never reaches the seat (assessment iv). Check; if they differ, **stop and ask** — do not write into the wrong HOME.
|
|
39
|
+
- Read the harness's **actual current config file** + confirm its schema against your installed version (`claude --version`, the live settings.json shape, codex/pi versions). If the format differs from this skill's `tested_against`, trust the LIVE format and flag the drift.
|
|
40
|
+
3. **Derive the per-harness config** from the semantic actions (see the three legs below). Compute the Codex posture-collapse + Pi bit.
|
|
41
|
+
4. **Show the concrete DIFF before writing** (old → new, per file). Never a blind write.
|
|
42
|
+
5. **Resolve best-effort actions by the built-in's rule FIRST, then ask only on genuine ambiguity.** Best-effort destructive actions (`force_push`, `delete_files`, `delete_everything`, `read_secrets`) default to **`ask`** (never a `deny` that can't be enforced) — apply that default rather than stopping to question-back. Surface a question only when the policy is genuinely ambiguous or the seat is interactive. **For a same-prefix collision (`push_to_remote` vs `force_push`, both `Bash(git push:*)`), NEVER ask — apply the deterministic PREFIX-COLLISION rule in the Claude leg.** (Live cold-transfers caught fresh agents *question-backing* — first on the `force_push` default, then on the prefix collision — instead of applying the fixed rule; both freeze an autonomous seat.) On a Claude-only fleet, if the policy denies `network_egress`, **say so explicitly**: it is NOT enforceable — Claude has no network gate, a `Bash(curl:*)`/`Bash(wget:*)` deny is best-effort, and `python`/`node` fetch bypasses it (live-verified: `urllib` reached HTTPS 200 under a curl/wget deny). Route real egress-gating to the Codex sandbox, or record it as advisory on Claude.
|
|
43
|
+
6. **Back up the current config**, then write. Prefer the **user-level** file (`~/.claude/settings.json`) for durable policy — it's the clobber-resistant tier (deny wins across the union). **ALWAYS include `defaultMode: "acceptEdits"` in the Claude settings.json you write** — the floor key must be PRESENT in the file, or the config policy strips the floor. (This is the exact gap a live cold-transfer test FAILED on: the fresh agent wrote allow/deny lists but omitted `defaultMode`, leaving the seat below the floor.)
|
|
44
|
+
7. **Verify** the write landed and the seat can see it (re-read; confirm `defaultMode: "acceptEdits"` is present; for an autonomous seat, confirm no `ask` will freeze it).
|
|
45
|
+
|
|
46
|
+
## Two surfaces — and this skill writes only ONE of them
|
|
47
|
+
Permissions live on two surfaces with opposite stability — which is the whole reason for the agent-driven split:
|
|
48
|
+
- **LAUNCH-FLAG surface — STABLE (>1yr) → OpenRig sets it DETERMINISTICALLY, NOT this skill.** The flags OpenRig passes at boot: Claude `--permission-mode` / `--dangerously-skip-permissions`; Codex sandbox/bypass flags; Pi `--approve`/`--no-approve`. **Two things live here, both OpenRig-owned: the FLOOR (minimum, by default) and YOLO (full bypass, opt-in).**
|
|
49
|
+
- **CONFIG-FILE surface — CHAOTIC → NEVER deterministic → THIS SKILL'S DOMAIN.** Claude `settings.json` allow/ask/deny + defaultMode; Codex `config.toml` approval rules. This is where the Locked / Standard / Open policies get applied — agent-driven, version-stamped, caveated. (Pi has **no permission surface at all** — its `--approve`/`--no-approve` flags govern project-resource trust, not tool permissions (VM-confirmed Pi 0.83.0); a permission policy does not translate to Pi. See the Pi leg.)
|
|
50
|
+
|
|
51
|
+
**THE FLOOR (launch-flag, OpenRig-set — this skill KNOWS it, never WRITES it):** Claude `--permission-mode acceptEdits` (keep it); **Codex workspace-only** (stop forcing `danger-full-access` — ≈ Codex's own default ≈ setting-nothing = agnostic); Pi `--no-approve` (a project-resource-trust floor — Pi has no permission gate; see the Pi leg). **One consistent unconditional minimum** (no by-context switching — that mode idea is parked 5.0). A chosen config-file policy layers ON TOP of the floor.
|
|
52
|
+
|
|
53
|
+
**YOLO MODE (launch-flag, OpenRig-set, opt-in — for people done with permissions):** OpenRig boots every seat with the full-bypass flag (Claude `--dangerously-skip-permissions`; Codex full-bypass). **When YOLO is on, CONFIG-FILE POLICY IS MOOT** — this skill does NOT apply a config policy (or explicitly notes it's overridden by the flag); don't fight the bypass. YOLO is OpenRig's deterministic job, not this skill's. (**Operator = YOLO mode** — subsumed.)
|
|
54
|
+
|
|
55
|
+
## The three harness legs (skill-owned mapping knowledge, version-stamped + caveated)
|
|
56
|
+
|
|
57
|
+
### Claude — `~/.claude/settings.json` (user-level, clobber-resistant)
|
|
58
|
+
- **Action → prefix map** (VM-CONFIRMED @ Claude 2.1.220, 2026-08-03 — every row exercised through real Claude tool calls). `fidelity`: `clean` = the prefix honors intent; `best_effort` = prefix-only can't fully enforce → prefer `ask`, never a `deny` that lies.
|
|
59
|
+
|
|
60
|
+
| Semantic action | `permissions.*` prefix rule(s) | fidelity |
|
|
61
|
+
|---|---|---|
|
|
62
|
+
| push_to_remote | `Bash(git push:*)` | clean |
|
|
63
|
+
| force_push | ask the flag-first forms `Bash(git push --force:*)` `Bash(git push -f:*)` `Bash(git push --force-with-lease:*)`; base `Bash(git push:*)` follows push_to_remote (see the collision rule) | **best_effort** — catches flag-FIRST force; flag-LAST (`git push origin main --force`) leaks |
|
|
64
|
+
| create_pr | `Bash(gh pr create:*)` | clean |
|
|
65
|
+
| publish_package | `Bash(npm publish:*)` `Bash(pnpm publish:*)` `Bash(yarn publish:*)` `Bash(cargo publish:*)` | clean (multi-pattern) |
|
|
66
|
+
| merge_or_release | `Bash(git merge:*)` `Bash(git tag:*)` `Bash(gh release:*)` | best_effort — protected-branch semantics not expressible |
|
|
67
|
+
| delete_files | `Bash(rm:*)` | **best_effort** — target-first leak (`rm <t> -rf` slips); scope not boundable → default `ask` |
|
|
68
|
+
| delete_everything | `Bash(rm -rf:*)` `Bash(rm -fr:*)` | **best_effort** — same leak → default to `ask`, never a silent deny |
|
|
69
|
+
| reset_or_discard_vcs | `Bash(git reset:*)` `Bash(git clean:*)` `Bash(git checkout:*)` `Bash(git branch -D:*)` | best_effort |
|
|
70
|
+
| drop_persistent_store | `Bash(dropdb:*)` `Bash(docker volume rm:*)` (+ project-specific) | best_effort (open-ended) → `ask` |
|
|
71
|
+
| rig_up / rig_down | `Bash(rig up:*)` / `Bash(rig down:*)` | clean — ⚠ an `ask` here FREEZES an autonomous seat |
|
|
72
|
+
| mutate_topology | `Bash(rig add:*)` `Bash(rig remove:*)` `Bash(rig rename:*)` | clean |
|
|
73
|
+
| run_toolchain | `Bash(npm:*)` `Bash(npx:*)` `Bash(pnpm:*)` `Bash(yarn:*)` `Bash(node:*)` `Bash(tsc:*)` `Bash(vitest:*)` `Bash(jest:*)` | clean (the known set) |
|
|
74
|
+
| run_arbitrary_shell | `Bash(*)` — this IS the `default_posture` knob | clean |
|
|
75
|
+
| network_egress | `Bash(curl:*)` `Bash(wget:*)` (partial) | **best_effort** — Claude has NO native network gate; real floor = Codex sandbox (route it there) |
|
|
76
|
+
| read_secrets | `Read(./.env)` `Read(~/.ssh/**)` `Read(**/*secret*)` (path-scoped) | **best_effort** — path-based, not secret-aware |
|
|
77
|
+
| install_dependencies | `Bash(npm install:*)` `Bash(pip install:*)` `Bash(brew install:*)` | clean |
|
|
78
|
+
- **PREFIX-ONLY caveat** — cannot flag-precisely gate (`force_push` vs `push_to_remote` both match `Bash(git push:*)`); **target-first leak** (`rm <target> -rf` slips a `Bash(rm -rf*)` deny). Actions marked `best_effort` in the taxonomy (`force_push`, `delete_files`, `read_secrets`) → surface the caveat and prefer `ask` over a `deny` you can't enforce (a `deny` that leaks lies).
|
|
79
|
+
- **PREFIX-COLLISION resolution (deterministic — resolve it, NEVER ask).** When two actions collapse to the SAME base prefix with different dispositions — the canonical case is `push_to_remote`=allow + `force_push`=ask, both basing to `Bash(git push:*)` — you cannot put that base prefix in both `allow` and `ask`. Resolve without a question-back:
|
|
80
|
+
- **Push allowed + force asked (Standard / Open):** put the base `Bash(git push:*)` per push's disposition (`allow`), AND add the flag-first force forms to `ask` (`Bash(git push --force:*)`, `Bash(git push -f:*)`, `Bash(git push --force-with-lease:*)`). RECORD in your diff that this is best-effort — flag-LAST force (`git push origin main --force`) leaks past the flag-first ask rules and runs under the allow. Don't block on it.
|
|
81
|
+
- **Push denied (Locked):** `Bash(git push:*)` in `deny` already covers force — no conflict.
|
|
82
|
+
This is a FIXED rule, not a user decision — apply it and note the leak. (A live cold-transfer FAILED because a fresh agent *blocked asking* "how to resolve the force_push/push_to_remote collision" instead of applying this default.)
|
|
83
|
+
- **`defaultMode: "acceptEdits"` is the FLOOR and MUST be written into every Claude settings.json you produce.** It is not a knob you tune, but it IS a key you must always include — a config policy that omits it strips the floor (the cold-transfer failure). Live-confirmed schema: `{"permissions":{"allow":[],"ask":[],"deny":[],"defaultMode":"acceptEdits"}}`.
|
|
84
|
+
|
|
85
|
+
### Codex — `~/.codex/config.toml` (via the existing X10 `codex_config_fragment` splice path — reuse, don't invent)
|
|
86
|
+
- Codex is **per-posture, not per-action**: the whole action set **collapses** to the nearest `{sandbox_mode, approval_policy}` pair. **Built-in → posture** (VM-CONFIRMED @ Codex 0.120.0, 2026-08-03 — each posture applied to a real seat: read-only blocked writes+egress, workspace-write allowed writes/blocked egress, danger-full-access allowed both):
|
|
87
|
+
|
|
88
|
+
| Built-in | `sandbox_mode` | `approval_policy` | Collapse note (surface this to the user) |
|
|
89
|
+
|---|---|---|---|
|
|
90
|
+
| Locked | `read-only` | `on-request` | read-only blocks all writes + egress, prompts on escalation — OVER-restricts `edit_files` vs the Claude floor |
|
|
91
|
+
| Standard ⭐ | `workspace-write` | `on-request` | workspace writes allowed, egress blocked by sandbox, prompt on escalation — UNDER-gates `create_pr` (no per-action ask; folds into the prompt) |
|
|
92
|
+
| Open | `danger-full-access` | `on-failure` | everything allowed, prompt only on failure — OVER-permits the `destructive_class` vs the Claude ask-gates |
|
|
93
|
+
| YOLO | *(flag-surface — full-bypass launch flag, NOT config.toml)* | — | not a config write; the rip-out adapter owns it |
|
|
94
|
+
|
|
95
|
+
Valid values (VM-confirmed @ Codex 0.120.0): `sandbox_mode` ∈ {read-only, workspace-write, danger-full-access}; `approval_policy` ∈ {on-request, on-failure, never, untrusted, granular} (`granular` observed live at 0.120.0). ⚠ `on-failure` (used by Open) is marked **deprecated** in 0.120.0 help but still accepted — revisit if a future Codex drops it.
|
|
96
|
+
- Surface the collapse: "Codex can't gate per-action; this policy becomes sandbox=X approval=Y, which over-permits Z / under-permits W."
|
|
97
|
+
|
|
98
|
+
### Pi — NO permission surface at all (VM-confirmed Pi 0.83.0 — the earlier "approval bit" reading was WRONG)
|
|
99
|
+
- **Pi has no tool-permission gate — neither a config store NOR a permission-posture flag.** Live verification confirmed: Pi 0.83.0's `--approve`/`-a` and `--no-approve`/`-na` govern **project-resource trust** (whether project extensions/resources appear in RPC `get_commands`), **NOT** tool-call approval. There is no sandbox or permission mechanism to map a policy onto.
|
|
100
|
+
- So a permission policy **does not translate to Pi**. Do NOT say `--approve` = "auto-approve all", or that a posture "collapses to a Pi approval bit" — that was an earlier misread, corrected here. This skill computes **nothing** for Pi.
|
|
101
|
+
- Whatever the OpenRig adapter sets (`--no-approve` by default) is a project-resource-trust floor, not a permission posture — not this skill's to derive.
|
|
102
|
+
- Behavior to know (resource-trust, NOT permission-gating): under default ask / `--no-approve`, a project resource is silently **absent** from RPC `get_commands`; it appears under `--approve`. Never mistake that for permission enforcement.
|
|
103
|
+
- **Say this to the user for a Pi seat:** "Pi has no permission-policy surface today — the policy applies to Claude/Codex; Pi runs under its project-resource-trust flag unchanged."
|
|
104
|
+
|
|
105
|
+
## ⚠ The two warnings that save real fleets
|
|
106
|
+
- **`ask` FREEZES an autonomous/headless Claude seat** — it hangs on the first non-edit op. So for autonomous fleets apply **Open/YOLO** (or a policy with no asks) **at setup** — the floor only covers edits; bash still asks without an applied policy. Never leave an autonomous seat on a policy with live `ask` gates. (Pi has no permission ask at all — see the Pi leg; Codex prompts per its posture, not per-action.)
|
|
107
|
+
- **daemon-HOME ≠ seat-HOME** silently voids user-level writes — always the preflight check above.
|
|
108
|
+
|
|
109
|
+
## The built-ins — DEFINED by the shipped policy spec files (translate FROM the spec; POINT, don't COPY)
|
|
110
|
+
The four built-in policies ship as read-only spec files (`source: builtin`, `policy_schema_version: 1`) — they are the AUTHORITATIVE definitions. **Do NOT restate their action-sets here.** An earlier in-skill copy drifted (it under-asked `publish_package`/`merge_or_release`, which the spec ASKs) — the exact reason POINT-don't-COPY is the rule. Read the attached/selected spec and translate its semantic-action sets (`default_posture` / `allow` / `ask` / `deny` / `destructive_class`) per the three legs above.
|
|
111
|
+
- **Locked / Standard ⭐ / Open** — `surface: config`. Translate to the Claude / Codex config surface. **Standard ⭐** is the recommended default: routine dev incl. push allowed, the outward/release/history-rewriting acts (`create_pr`, `publish_package`, `merge_or_release`, `force_push`) ASK, destructive_class ASKs. Standard has live `ask` gates → not for a headless-autonomous Claude seat (use Open or YOLO). Locked = deny-default whitelist; Open = allow-default, destructive_class asks only.
|
|
112
|
+
- **YOLO** — `surface: flag`, `launch_posture: full_bypass`. This skill does **NOT** translate it — it points at OpenRig's deterministic flag-surface opt-in (the rip-out YOLO setting). When YOLO is on, any config-surface policy is MOOT (the bypass overrides it). (Subsumes the former "Operator".)
|
|
113
|
+
|
|
114
|
+
Built-ins ship read-only in the package (canonical names); copy-to-customize into user space (custom, user-named); the `source:` frontmatter marker travels on copy. Onboarding presents these as a required MENU (explain each + ask which; no-choice = the floor).
|
|
115
|
+
|
|
116
|
+
## Boundary (keeps this the only maintained piece)
|
|
117
|
+
This skill TRANSLATES + APPLIES only. It does **not** define policies (the policy spec does) and does **not** enforce at the daemon (OpenRig is agnostic). Spec = *what* (neutral intent); this skill = *how, on this harness version* (the caveated, version-stamped translation).
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
*Stage: ESTABLISHED (2026-08-04) — both criteria met: (1) cold-transfer PASSING (rerun #2, verdict SHA 627abbb6, all 5 gate checks TRANSFER); (2) the built-in policy SPEC FILES landed (`source: builtin`, arch-accepted) as the authoritative source — the skill now translates FROM the spec and the interim in-skill pinned summary is retired (POINT-not-COPY). Config cells VM-CONFIRMED (Claude 2.1.220 / Codex 0.120.0); Pi has no permission surface (compute-nothing). Reviewed at push. feedback.md maintained.*
|
|
@@ -4,15 +4,17 @@ description: Use when a Claude Code session has just compacted, is about to comp
|
|
|
4
4
|
metadata:
|
|
5
5
|
openrig:
|
|
6
6
|
stage: factory-approved
|
|
7
|
-
last_verified: "2026-05-04"
|
|
8
|
-
distribution_scope: product-bound
|
|
9
|
-
source_evidence: |
|
|
10
|
-
Load-bearing for any OpenRig seat that may compact. PreCompact hook
|
|
11
|
-
is wired into Claude Code's settings (e.g. ~/.claude/settings.json)
|
|
12
|
-
so the restore packet is generated automatically before compaction.
|
|
13
7
|
sibling_skills:
|
|
8
|
+
- mental-model-ha
|
|
9
|
+
- scope-recovery
|
|
10
|
+
- session-compaction-and-restore
|
|
14
11
|
- agent-startup-and-context-ingestion
|
|
12
|
+
- agent-starters
|
|
13
|
+
- composable-priming-packs
|
|
14
|
+
- session-source-fork
|
|
15
15
|
- seat-continuity-and-handover
|
|
16
|
+
- claude-compact-in-place
|
|
17
|
+
- pre-maintenance-agent-preservation
|
|
16
18
|
---
|
|
17
19
|
|
|
18
20
|
# Claude Compaction Restore
|
|
@@ -105,6 +107,7 @@ After the first restore pass, audit yourself before continuing.
|
|
|
105
107
|
|
|
106
108
|
## Guardrails
|
|
107
109
|
|
|
110
|
+
- Compaction is survival, not housekeeping — never compact to free space, "lean" a seat, or capture/prepare an agent starter (the `rig agent-image` library). It is lossy (a compacted Claude is confident-but-hollow); compact only when a seat is genuinely near its context limit, with a before/after plan. A starter's value is being *functional*, not small — see the `agent-starters` skill.
|
|
108
111
|
- Do not silently launch fresh after compaction.
|
|
109
112
|
- Do not continue from memory when restore evidence exists.
|
|
110
113
|
- Do not defer required restore reading until a later user task. The restore is
|
|
@@ -41,10 +41,6 @@ function readInstructionFile(filePath) {
|
|
|
41
41
|
return fs.readFileSync(expanded, "utf8");
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
function sanitizeKey(value) {
|
|
45
|
-
return value.replace(/[^a-zA-Z0-9_.@-]/g, "_");
|
|
46
|
-
}
|
|
47
|
-
|
|
48
44
|
function sessionKey(input) {
|
|
49
45
|
const raw = [
|
|
50
46
|
process.env.OPENRIG_SESSION_NAME,
|
|
@@ -55,65 +51,13 @@ function sessionKey(input) {
|
|
|
55
51
|
input.sessionName,
|
|
56
52
|
input.transcript_path ? path.basename(input.transcript_path, ".jsonl") : "",
|
|
57
53
|
].find((value) => typeof value === "string" && value.trim().length > 0) || "unknown-session";
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// OPR.0.4.1.09 (rev1-r2 hook-path leak fix): MUST match claude-compaction-enforcer.ts
|
|
62
|
-
// declaredSeatOf EXACTLY — a seat is authoritative ONLY inside a WELL-FORMED leading
|
|
63
|
-
// frontmatter fence (opened AND closed `---`); the body is NEVER scanned; malformed/absent
|
|
64
|
-
// frontmatter -> null (generic). Duplicated (not imported) because this hook is a standalone
|
|
65
|
-
// portable plugin asset that cannot import the compiled daemon TS; semantics are kept
|
|
66
|
-
// identical so the enforcer and hook paths refuse wrong-seat extras the same way.
|
|
67
|
-
function declaredSeatOf(content) {
|
|
68
|
-
const fm = /^\s*---\s*\n([\s\S]*?)\n---/.exec(content);
|
|
69
|
-
if (!fm) return null;
|
|
70
|
-
const m = /^[ \t]*(?:target[_-]?seat|seat|session(?:[_-]?name)?)[ \t]*:[ \t]*["']?([^"'\n#]+?)["']?[ \t]*$/im.exec(fm[1]);
|
|
71
|
-
return m ? m[1].trim() : null;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// OPR.0.4.1.09 (rev1-r2): resolve the seat-safe EXTRA-FILE CONTENT for
|
|
75
|
-
// postCompactInstruction, mirroring the enforcer resolvePostCompactExtra: (1) prefer the
|
|
76
|
-
// PER-SEAT extra post-compact-extra/<seat>.md; (2) else the GLOBAL messageFilePath. In
|
|
77
|
-
// EITHER case a file whose WELL-FORMED frontmatter declares a DIFFERENT seat is REFUSED
|
|
78
|
-
// (returns "") so a foreign-seat extra never leaks into the marker via the hook path
|
|
79
|
-
// (the enforcer path already refused it). Generic/this-seat/malformed -> inject.
|
|
80
|
-
function readSeatSafeExtraFile(input, globalFilePath) {
|
|
81
|
-
const seatKey = sessionKey(input);
|
|
82
|
-
const refusedIfForeign = (content) => {
|
|
83
|
-
const declared = declaredSeatOf(content);
|
|
84
|
-
return declared && sanitizeKey(declared) !== seatKey ? "" : content;
|
|
85
|
-
};
|
|
86
|
-
// 1. Per-seat extra preferred (seat-keyed path; still defensively seat-checked to match
|
|
87
|
-
// the enforcer, which refuses a per-seat file declaring a different seat).
|
|
88
|
-
const perSeatPath = path.join(getOpenRigHome(), "compaction", "post-compact-extra", `${seatKey}.md`);
|
|
89
|
-
if (fs.existsSync(perSeatPath)) {
|
|
90
|
-
return refusedIfForeign(fs.readFileSync(perSeatPath, "utf8"));
|
|
91
|
-
}
|
|
92
|
-
// 2. Global messageFilePath fallback, seat-checked.
|
|
93
|
-
if (!globalFilePath) return "";
|
|
94
|
-
const content = readInstructionFile(globalFilePath);
|
|
95
|
-
if (!content) return "";
|
|
96
|
-
return refusedIfForeign(content);
|
|
54
|
+
return raw.replace(/[^a-zA-Z0-9_.@-]/g, "_");
|
|
97
55
|
}
|
|
98
56
|
|
|
99
57
|
function pendingMarkerPath(input) {
|
|
100
58
|
return path.join(getOpenRigHome(), "compaction", "restore-pending", `${sessionKey(input)}.json`);
|
|
101
59
|
}
|
|
102
60
|
|
|
103
|
-
// OPR.0.4.1.09: pointer to this seat's per-seat post-compaction extra
|
|
104
|
-
// (compaction/post-compact-extra/<seat>.md), surfaced by the bridge reader.
|
|
105
|
-
// Returned ONLY when it EXISTS, so the marker never points at an unresolvable
|
|
106
|
-
// restoreMapPath; null otherwise.
|
|
107
|
-
function perSeatRestoreMapPath(input) {
|
|
108
|
-
const p = path.join(getOpenRigHome(), "compaction", "post-compact-extra", `${sessionKey(input)}.md`);
|
|
109
|
-
try {
|
|
110
|
-
fs.accessSync(p);
|
|
111
|
-
return p;
|
|
112
|
-
} catch {
|
|
113
|
-
return null;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
61
|
function writePendingRestoreMarker(input, parsed, restoreInstruction, customMessage) {
|
|
118
62
|
const markerPath = pendingMarkerPath(input);
|
|
119
63
|
fs.mkdirSync(path.dirname(markerPath), { recursive: true });
|
|
@@ -130,8 +74,6 @@ function writePendingRestoreMarker(input, parsed, restoreInstruction, customMess
|
|
|
130
74
|
expectedAck: "restored from packet at <path>; resumed at step <X>",
|
|
131
75
|
deliveredAt: null,
|
|
132
76
|
deliveryCount: 0,
|
|
133
|
-
// OPR.0.4.1.09: per-seat restore-map pointer (post-compact-extra/<seat>.md) or null.
|
|
134
|
-
restoreMapPath: perSeatRestoreMapPath(input),
|
|
135
77
|
};
|
|
136
78
|
fs.writeFileSync(markerPath, `${JSON.stringify(payload, null, 2)}\n`, "utf8");
|
|
137
79
|
return markerPath;
|
|
@@ -144,7 +86,7 @@ function writePendingRestoreMarker(input, parsed, restoreInstruction, customMess
|
|
|
144
86
|
// enabled but restore text has not been written yet, use OpenRig's default
|
|
145
87
|
// instruction to load the canonical restore skill. Inline instructions and
|
|
146
88
|
// file-path content are both included when both are configured.
|
|
147
|
-
function readClaudeCompactionMessage(
|
|
89
|
+
function readClaudeCompactionMessage() {
|
|
148
90
|
const configPath = path.join(getOpenRigHome(), "config.json");
|
|
149
91
|
let inline = "";
|
|
150
92
|
let filePath = "";
|
|
@@ -173,20 +115,17 @@ function readClaudeCompactionMessage(input) {
|
|
|
173
115
|
|
|
174
116
|
const parts = [];
|
|
175
117
|
if (inline && inline.length > 0) {
|
|
176
|
-
// Inline has no file/seat to declare; keep as-is.
|
|
177
118
|
parts.push(`Inline restore instruction:\n${inline}`);
|
|
178
119
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
120
|
+
if (filePath && filePath.length > 0) {
|
|
121
|
+
try {
|
|
122
|
+
const fileText = readInstructionFile(filePath);
|
|
123
|
+
if (fileText) {
|
|
124
|
+
parts.push(`Additional restore instruction file (${filePath}):\n${fileText}`);
|
|
125
|
+
}
|
|
126
|
+
} catch {
|
|
127
|
+
// Keep any inline instruction; unreadable extra files degrade quietly.
|
|
187
128
|
}
|
|
188
|
-
} catch {
|
|
189
|
-
// Keep any inline instruction; unreadable extra files degrade quietly.
|
|
190
129
|
}
|
|
191
130
|
if (parts.length > 0) return parts.join("\n\n");
|
|
192
131
|
if (policyEnabled && !inlineConfigured && !filePathConfigured) {
|
|
@@ -208,7 +147,7 @@ try {
|
|
|
208
147
|
args.push(input.transcript_path);
|
|
209
148
|
}
|
|
210
149
|
|
|
211
|
-
const customMessage = readClaudeCompactionMessage(
|
|
150
|
+
const customMessage = readClaudeCompactionMessage();
|
|
212
151
|
|
|
213
152
|
const result = spawnSync("node", args, { encoding: "utf8" });
|
|
214
153
|
if (result.status !== 0) {
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: delegating-work
|
|
3
|
+
description: "Use when you have a task and must decide WHO does it — yourself, a spawned subagent, or another agent in the topology that already holds the context. The rule: how much would a blank slate have to read in to do this correctly? A lot → route to a context-holding agent; a little → subagent; unsure → a real agent or yourself. NOT the mechanics of fanning out (that's dispatching-parallel-agents / subagent-driven-development) — this is the who/whether decision, and the failure mode that makes teams abandon subagents."
|
|
4
|
+
metadata:
|
|
5
|
+
openrig:
|
|
6
|
+
stage: field-captured
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Delegating work — who should do this task?
|
|
10
|
+
|
|
11
|
+
## The core question: context performance
|
|
12
|
+
Getting work done well is a context problem. The agent best suited to a task is **the one who already holds the context that task requires.** Before you spawn a subagent or grind it out yourself, ask who that is.
|
|
13
|
+
|
|
14
|
+
## The decision
|
|
15
|
+
**Ask: how much would a blank slate have to read in before it could do this correctly?**
|
|
16
|
+
|
|
17
|
+
- **A lot to read in → route to a real agent in the topology that already holds it.** This is what the role structure is FOR — reviewers, QA, implementers who have been on a project over time. An agent that already understands the work produces a better, safer result than any amount of briefing.
|
|
18
|
+
- **A little — a prompt plus light grounding is enough → spawn a subagent.**
|
|
19
|
+
- **Genuinely unsure → err toward a real agent, or do it yourself.**
|
|
20
|
+
|
|
21
|
+
## Subagents are underused — reach for them far more
|
|
22
|
+
For self-contained work that is fully specifiable in the prompt, spawn a subagent instead of spending your own context: tracing, research, grounding passes, summarizing, scanning log files, searching, fetching, web search, mechanical extraction with citations. This is the common shape and it is under-used.
|
|
23
|
+
|
|
24
|
+
## The failure mode — the part that matters most
|
|
25
|
+
**Subagents start as blank slates, and you cannot anticipate everything they need to know.** Give one a task where there is a lot to understand and it will have blind spots it does not know it has — it will complete the task and **return a false conclusion**, not from weakness but because it lacked the context to know what "correct" even looked like.
|
|
26
|
+
|
|
27
|
+
This is the unknown-unknowns problem, and it is the single most common subagent failure: **a poorly-contextualized summary is worse than no summary, because it arrives looking like an answer.** Overreliance on subagents for context-heavy work causes more problems than it solves — and a team burned by it stops using subagents at all, which is the wrong correction. The fix is not "avoid subagents"; it is "match the task to the context it needs."
|
|
28
|
+
|
|
29
|
+
## The practical test
|
|
30
|
+
Before delegating to a blank slate, ask: **would a wrong-but-plausible answer here be detectable?** If the requester cannot check the result against something they already know — a citation they can open, a count they can re-run — the blind-spot risk is unacceptable, and that task belongs with an agent that holds the context.
|
|
31
|
+
|
|
32
|
+
## Worked examples
|
|
33
|
+
- **GOOD (→ subagent):** extract how four apps implement a UI mechanism, with `file:line` citations and an explicit instruction to report facts, not recommendations. Self-contained; the requester can verify the citations.
|
|
34
|
+
- **BAD to delegate blind (→ routed to the context-holder):** an independent security re-sweep of a rewritten git branch, where knowing which commit range must stay byte-identical, and that "lightly obfuscated real values" is the thing to hunt, takes a paragraph to explain and one sentence to get wrong. It went to the agent already holding the context.
|
|
35
|
+
|
|
36
|
+
## It generalizes
|
|
37
|
+
This is really **"route work to whoever holds the context,"** with subagents as the option for work that needs none. The audience is **every agent** — implementers and QA seats make this call as much as orchestrators do.
|
|
38
|
+
|
|
39
|
+
## Once you've decided
|
|
40
|
+
- Decided on subagents for 2+ independent tasks → `dispatching-parallel-agents` (the fan-out mechanics).
|
|
41
|
+
- Subagents executing a plan's independent tasks → `subagent-driven-development`.
|
|
42
|
+
- Routing to a real agent you will direct over multiple rounds → `directing-partner-agents`.
|
|
43
|
+
- The right context-holder is the human → `human-in-the-loop`.
|
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: forming-an-openrig-mental-model
|
|
3
3
|
description: |
|
|
4
|
-
Use when an agent is newly oriented to OpenRig and needs to form an accurate mental model of the system fast — what rigs are, how skills load, what the topology shapes mean, what the product loop is. For agents booting into a new seat or returning to OpenRig work after time away. NOT for
|
|
4
|
+
Use when an agent is newly oriented to OpenRig and needs to form an accurate mental model of the system fast — what rigs are, how skills load, what the topology shapes mean, what the product loop is. For agents booting into a new seat or returning to OpenRig work after time away. NOT for compaction recovery (use claude-compaction-restore for that) or for specific operational procedures.
|
|
5
5
|
metadata:
|
|
6
|
+
cli_surfaces_referenced:
|
|
7
|
+
- ask
|
|
8
|
+
- capture
|
|
9
|
+
- down
|
|
10
|
+
- ps
|
|
11
|
+
- send
|
|
12
|
+
- transcript
|
|
13
|
+
- up
|
|
14
|
+
- whoami
|
|
6
15
|
openrig:
|
|
7
16
|
stage: factory-approved
|
|
8
|
-
last_verified: "2026-05-04"
|
|
9
|
-
distribution_scope: product-bound
|
|
10
|
-
source_evidence: |
|
|
11
|
-
Authored 2026-05-02 in response to founder-observed pattern: agents
|
|
12
|
-
Distinct from HA-pair mental-model preservation (which is a
|
|
13
|
-
pair-of-seats coordination pattern). This skill serves the legitimate
|
|
14
|
-
need to form an initial mental model of OpenRig as a system.
|
|
15
17
|
sibling_skills:
|
|
16
18
|
- openrig-user
|
|
17
19
|
- openrig-operator
|
|
20
|
+
- openrig-builder
|
|
18
21
|
- openrig-architect
|
|
19
|
-
|
|
22
|
+
- openrig-upgrade
|
|
23
|
+
- ai-dev-workflows
|
|
24
|
+
- software-for-agents
|
|
20
25
|
---
|
|
21
26
|
|
|
22
27
|
# Forming an OpenRig Mental Model
|
|
@@ -165,13 +170,14 @@ cost when you reach for one.
|
|
|
165
170
|
| Home | Purpose |
|
|
166
171
|
|---|---|
|
|
167
172
|
| `<rig-cwd>/.claude/skills/`, `<rig-cwd>/.agents/skills/` | Where the harness actually loads from. Populated by `rig up`. |
|
|
168
|
-
| `~/.claude/skills/`, `~/.agents/skills/` | Your personal/global skills
|
|
169
|
-
| openrig
|
|
170
|
-
| `~/.openrig/skills/` |
|
|
173
|
+
| `~/.claude/skills/`, `~/.agents/skills/` | Your personal / user-installed global skills, loaded by the harness itself (independent of OpenRig). NOT where OpenRig's own bootstrap skills live — those ship in the product (below) and project into the cwd `.claude/skills/` at `rig up`. |
|
|
174
|
+
| `openrig/packages/daemon/{specs/agents/shared/skills,assets/plugins/*/skills}/` | Product skills that ship with OpenRig — the spec pool + the bundled plugin assets (openrig-user, openrig-operator, openrig-architect, forming-an-openrig-mental-model, queue-handoff, claude-compaction-restore, …). |
|
|
175
|
+
| `~/.openrig/skills/` | Future runtime install home for OpenRig-shipped skills. |
|
|
176
|
+
| the skills authoring workspace | Skill authoring source (not runtime-loaded). |
|
|
171
177
|
|
|
172
|
-
The harness only sees the first two. Other locations are
|
|
173
|
-
source-of-truth — they reach the harness via projection or
|
|
174
|
-
not directly.
|
|
178
|
+
The harness only sees the first two. Other locations are authoring,
|
|
179
|
+
shipping, and source-of-truth — they reach the harness via projection or
|
|
180
|
+
NPM install, not directly.
|
|
175
181
|
|
|
176
182
|
---
|
|
177
183
|
|
|
@@ -237,6 +243,8 @@ If you're booting into a new seat in an OpenRig rig:
|
|
|
237
243
|
|
|
238
244
|
You're now oriented enough to start doing useful work.
|
|
239
245
|
|
|
246
|
+
**Permission policy (at setup):** OpenRig sets only a minimal usability floor on your harness permissions, then offers recommended policies you opt into (Locked / Standard / Open — or YOLO to bypass). If you're creating or bringing up a rig, that's a choice you make, not something OpenRig decides for you — see openrig-user's "Permission policy — pick one at setup" and the `applying-a-permission-policy` skill.
|
|
247
|
+
|
|
240
248
|
---
|
|
241
249
|
|
|
242
250
|
## Going deeper (canonical references)
|
|
@@ -250,19 +258,25 @@ For real depth, these are the load-bearing canonical docs:
|
|
|
250
258
|
| `openrig/docs/reference/rig-spec.md` | The RigSpec YAML format — pods, members, edges, all fields |
|
|
251
259
|
| `openrig/docs/reference/agent-spec.md` | The AgentSpec YAML format — resources, profiles, imports |
|
|
252
260
|
| `openrig/docs/reference/agent-startup-guide.md` | The 7-layer startup layering model; delivery hints |
|
|
261
|
+
| the product taxonomy | Canonical vocabulary (read literally) |
|
|
262
|
+
| `substrate/shared-docs/HOST-TOPOLOGY.md` | Host-level doctrine — rig classes, context patterns, lifecycle, authoring SOP |
|
|
263
|
+
| `substrate/shared-docs/SUBSTRATE-CONVENTIONS.md` | Filesystem layout doctrine for substrate |
|
|
253
264
|
| `https://agentskills.io/specification` | The cross-runtime skill standard |
|
|
254
265
|
|
|
255
|
-
If
|
|
256
|
-
|
|
257
|
-
|
|
266
|
+
If you're going to be authoring rigs, read `HOST-TOPOLOGY.md` §7 (the
|
|
267
|
+
authoring SOP) before touching YAML.
|
|
268
|
+
|
|
269
|
+
If you're going to be doing skill work, read
|
|
270
|
+
the factory-design reference and the
|
|
271
|
+
`operating-the-skill-library` skill that lives in
|
|
272
|
+
`substrate/shared-docs/rigs/skill-library/agents/shared/skills/`.
|
|
258
273
|
|
|
259
274
|
---
|
|
260
275
|
|
|
261
276
|
## What this skill is NOT for
|
|
262
277
|
|
|
263
|
-
- **
|
|
264
|
-
|
|
265
|
-
pattern that preserves a shared mental model across compactions.
|
|
278
|
+
- **Compaction recovery.** That's `claude-compaction-restore`. Different
|
|
279
|
+
skill, different scenario.
|
|
266
280
|
- **Operating a specific rig.** Specific rigs have their own DESIGN.md and
|
|
267
281
|
CULTURE.md. Read those.
|
|
268
282
|
- **Authoring a new rig.** Use the `openrig-architect` skill for that.
|
|
@@ -285,7 +299,7 @@ that fit your actual work.
|
|
|
285
299
|
| "I should manage Codex's compaction the way I manage Claude's" | No. Codex auto-compacts cleanly; Claude doesn't. Different runtimes, different lifecycles. |
|
|
286
300
|
| "MEMORY.md auto-loads, so I don't need to read it" | Maybe. Sometimes MEMORY.md auto-loads via system reminders; sometimes not. Don't assume. If your work touches the topics it covers, read it explicitly. |
|
|
287
301
|
| "Skills inherit from a parent or compose like classes" | No. Skills are flat artifacts; composition happens via AgentSpec `profile.uses.skills` (structural) or soft cross-references in skill bodies (advisory). Not via OO-style inheritance. |
|
|
288
|
-
| "
|
|
302
|
+
| "The substrate `shared-docs/skills/` folder is the canonical runtime path" | No. The harness doesn't read there. It's an authoring workspace. Runtime loads from `.claude/skills/`, `.agents/skills/`, and product built-in. |
|
|
289
303
|
|
|
290
304
|
---
|
|
291
305
|
|