@openrig/cli 0.5.6 → 0.5.7
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/plugins/openrig-core/README.md +1 -1
- package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/SKILL.md +34 -0
- package/daemon/assets/plugins/openrig-core/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +170 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -4
- package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +3 -3
- package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +4 -9
- package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +3 -3
- package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
- package/daemon/context-packs/skills/applying-a-permission-policy/SKILL.md +120 -0
- package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +10 -0
- package/daemon/context-packs/skills/claude-compaction-restore/SKILL.md +166 -0
- package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +18 -0
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
- package/daemon/context-packs/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +487 -0
- package/daemon/context-packs/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
- package/daemon/context-packs/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
- package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -1
- package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -4
- package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
- package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
- package/daemon/context-packs/skills/delegating-work/SKILL.md +43 -0
- package/daemon/context-packs/skills/delegating-work/manifest.yaml +10 -0
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/SKILL.md +318 -0
- package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +10 -0
- package/daemon/context-packs/skills/loading-addressable-markdown/SKILL.md +34 -0
- package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +12 -0
- package/daemon/context-packs/skills/loading-addressable-markdown/scripts/resolve-markdown.mjs +170 -0
- package/daemon/context-packs/skills/mission-slice-sop/SKILL.md +94 -0
- package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +10 -0
- package/daemon/context-packs/skills/openrig-operating-model/SKILL.md +397 -0
- package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +30 -0
- package/daemon/context-packs/skills/openrig-operating-model/scripts/compose.py +572 -0
- package/daemon/context-packs/skills/openrig-operating-model/scripts/scaffold.sh +34 -0
- package/daemon/context-packs/skills/openrig-operating-model/scripts/trace-due.sh +32 -0
- package/daemon/context-packs/skills/openrig-operating-model/scripts/trace-stamp.sh +5 -0
- package/daemon/context-packs/skills/openrig-operating-model/scripts/trunk-diff.sh +18 -0
- package/daemon/context-packs/skills/openrig-operating-model/templates/LEARNED.md +40 -0
- package/daemon/context-packs/skills/openrig-operating-model/templates/NOTES.md +9 -0
- package/daemon/context-packs/skills/openrig-operating-model/templates/PLAYBOOK.md +5 -0
- package/daemon/context-packs/skills/openrig-operating-model/templates/SOP.md +24 -0
- package/daemon/context-packs/skills/openrig-operating-model/templates/SPEC.md +54 -0
- package/daemon/context-packs/skills/openrig-user/SKILL.md +1374 -0
- package/daemon/context-packs/skills/openrig-user/manifest.yaml +10 -0
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/SKILL.md +250 -0
- package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +12 -0
- package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +21 -15
- package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +3 -3
- package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +1 -1
- package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/pods/review-team/SKILL.md +1 -1
- package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
- package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
- package/daemon/context-packs/skills/queue-handoff/SKILL.md +192 -0
- package/daemon/context-packs/skills/queue-handoff/manifest.yaml +10 -0
- package/daemon/context-packs/skills/refocusing/SKILL.md +31 -0
- package/daemon/context-packs/skills/refocusing/manifest.yaml +14 -0
- package/daemon/context-packs/skills/refocusing/references/refocus.md +22 -0
- package/daemon/context-packs/skills/refocusing/scripts/trace-to-root.py +264 -0
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/SKILL.md +231 -0
- package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +12 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/SKILL.md +151 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +16 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/references/apprentice-evidence-toolkit.md +32 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/references/apprentice-successor-seat-cutover.md +256 -0
- package/daemon/context-packs/skills/seat-continuity-and-handover/references/orchestrator-role.md +40 -0
- package/daemon/context-packs/skills/session-compaction-and-restore/SKILL.md +163 -0
- package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +10 -0
- package/daemon/context-packs/skills/software-for-agents/SKILL.md +187 -0
- package/daemon/context-packs/skills/software-for-agents/manifest.yaml +10 -0
- package/daemon/context-packs/world-example/manifest.yaml +1 -1
- package/daemon/context-packs/world-public/manifest.yaml +1 -1
- package/daemon/dist/build-info.js +3 -3
- package/daemon/dist/builtins/workflow-specs/basic-loop.yaml +3 -3
- package/daemon/dist/builtins/workflow-specs/conveyor.yaml +1 -1
- package/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +1 -1
- package/daemon/dist/db/all-migrations.d.ts +1 -1
- package/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/daemon/dist/db/all-migrations.js +4 -2
- package/daemon/dist/db/all-migrations.js.map +1 -1
- package/daemon/dist/db/migrations/077_node_session_source.d.ts +4 -0
- package/daemon/dist/db/migrations/077_node_session_source.d.ts.map +1 -0
- package/daemon/dist/db/migrations/077_node_session_source.js +6 -0
- package/daemon/dist/db/migrations/077_node_session_source.js.map +1 -0
- package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/manifest-parser.js +5 -6
- package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/daemon/dist/domain/context-packs/profile-composer.d.ts +1 -1
- package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/profile-composer.js +2 -2
- package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +3 -1
- package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/context-packs/profile-source-resolver.js +3 -2
- package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.d.ts +24 -4
- package/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/daemon/dist/domain/rig-lifecycle-service.js +116 -6
- package/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/daemon/dist/domain/rig-repository.d.ts +2 -1
- package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/daemon/dist/domain/rig-repository.js +7 -0
- package/daemon/dist/domain/rig-repository.js.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-exporter.js +2 -0
- package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +2 -0
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +2 -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 +37 -2
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/daemon/dist/routes/context-packs.js +146 -6
- package/daemon/dist/routes/context-packs.js.map +1 -1
- package/daemon/dist/routes/rigs.js +7 -3
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/sessions.js +7 -3
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +3 -1
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/docs/reference/agent-spec.md +1 -1
- package/daemon/docs/reference/mission-install.md +23 -2
- package/daemon/docs/reference/product-journey-sdlc.md +305 -0
- package/daemon/docs/reference/sdlc-conventions.md +9 -2
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +1 -1
- package/daemon/specs/agents/apps/vault-specialist/guidance/role.md +0 -1
- package/daemon/specs/agents/conveyor/builder/agent.yaml +1 -1
- package/daemon/specs/agents/conveyor/builder/guidance/role.md +0 -1
- package/daemon/specs/agents/conveyor/lead/agent.yaml +1 -1
- package/daemon/specs/agents/conveyor/lead/guidance/role.md +0 -3
- package/daemon/specs/agents/conveyor/planner/agent.yaml +1 -1
- package/daemon/specs/agents/conveyor/planner/guidance/role.md +0 -1
- package/daemon/specs/agents/design/product-designer/agent.yaml +3 -4
- package/daemon/specs/agents/design/product-designer/guidance/role.md +0 -3
- package/daemon/specs/agents/development/implementer/agent.yaml +3 -4
- package/daemon/specs/agents/development/implementer/guidance/role.md +0 -3
- package/daemon/specs/agents/development/qa/agent.yaml +4 -4
- package/daemon/specs/agents/development/qa/guidance/role.md +1 -4
- package/daemon/specs/agents/factory-rsi/dogfood/agent.yaml +1 -1
- package/daemon/specs/agents/factory-rsi/release-manager/agent.yaml +1 -1
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +3 -4
- package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +0 -4
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +3 -4
- package/daemon/specs/agents/review/independent-reviewer/guidance/role.md +0 -3
- package/daemon/specs/agents/shared/agent.yaml +2 -10
- package/daemon/specs/agents/shared/skills/core/agent-startup-and-context-ingestion/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -4
- package/daemon/specs/agents/shared/skills/pm/requirements-writer/SKILL.md +21 -15
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +1 -1
- package/daemon/specs/agents/shared/skills/pods/review-team/SKILL.md +1 -1
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +1 -1
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +2 -3
- package/dist/build-info.js +3 -3
- package/dist/commands/config-init-workspace.d.ts.map +1 -1
- package/dist/commands/config-init-workspace.js +38 -3
- package/dist/commands/config-init-workspace.js.map +1 -1
- package/dist/commands/context.d.ts.map +1 -1
- package/dist/commands/context.js +37 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/create.d.ts +4 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +84 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/grow.d.ts +4 -0
- package/dist/commands/grow.d.ts.map +1 -0
- package/dist/commands/grow.js +182 -0
- package/dist/commands/grow.js.map +1 -0
- package/dist/commands/remove.d.ts.map +1 -1
- package/dist/commands/remove.js +9 -1
- package/dist/commands/remove.js.map +1 -1
- package/dist/commands/rig.d.ts.map +1 -1
- package/dist/commands/rig.js +48 -1
- package/dist/commands/rig.js.map +1 -1
- package/dist/commands/scope.d.ts.map +1 -1
- package/dist/commands/scope.js +21 -2
- package/dist/commands/scope.js.map +1 -1
- package/dist/commands/shrink.d.ts.map +1 -1
- package/dist/commands/shrink.js +6 -1
- package/dist/commands/shrink.js.map +1 -1
- package/dist/commands/topology-default-agent.d.ts +4 -0
- package/dist/commands/topology-default-agent.d.ts.map +1 -0
- package/dist/commands/topology-default-agent.js +13 -0
- package/dist/commands/topology-default-agent.js.map +1 -0
- package/dist/commands/walk.d.ts.map +1 -1
- package/dist/commands/walk.js +3 -0
- package/dist/commands/walk.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/work-install.d.ts +39 -0
- package/dist/lib/work-install.d.ts.map +1 -0
- package/dist/lib/work-install.js +278 -0
- package/dist/lib/work-install.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
- package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/basic-loop.yaml +3 -3
- package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/conveyor.yaml +1 -1
- package/node_modules/@openrig/daemon/dist/builtins/workflow-specs/factory-rsi.yaml +1 -1
- package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/db/all-migrations.js +4 -2
- package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.d.ts +4 -0
- package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.d.ts.map +1 -0
- package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.js +6 -0
- package/node_modules/@openrig/daemon/dist/db/migrations/077_node_session_source.js.map +1 -0
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +5 -6
- package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +2 -2
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +3 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +3 -2
- package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts +24 -4
- package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js +116 -6
- package/node_modules/@openrig/daemon/dist/domain/rig-lifecycle-service.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +2 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +7 -0
- package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js +2 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +2 -0
- package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts +2 -0
- package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js +37 -2
- package/node_modules/@openrig/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js +146 -6
- package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/rigs.js +7 -3
- package/node_modules/@openrig/daemon/dist/routes/rigs.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/routes/sessions.js +7 -3
- package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
- package/node_modules/@openrig/daemon/dist/startup.js +3 -1
- package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
- package/node_modules/@openrig/daemon/package.json +1 -1
- package/package.json +1 -1
- package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +0 -48
- package/daemon/context-packs/skills/process/brainstorming/SKILL.md +0 -107
- package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +0 -12
- package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +0 -56
- package/daemon/context-packs/skills/process/executing-plans/SKILL.md +0 -94
- package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +0 -12
- package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +0 -48
- package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +0 -106
- package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +0 -12
- package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +0 -52
- package/daemon/context-packs/skills/process/writing-plans/SKILL.md +0 -126
- package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +0 -12
- package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +0 -48
- package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +0 -107
- package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +0 -56
- package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +0 -94
- package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +0 -48
- package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +0 -106
- package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +0 -52
- package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +0 -126
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Apprentice-Successor Seat Cutover SOP
|
|
2
|
+
|
|
3
|
+
Status: operator-proven on 2026-08-28; curated on 2026-08-30 with the physical-seat correction
|
|
4
|
+
|
|
5
|
+
Use this runbook after an apprentice successor has completed its install, observation,
|
|
6
|
+
and acceptance gates and the authorized decision-maker has explicitly called the
|
|
7
|
+
cutover. It covers the mechanical transition from the temporary successor seat to a
|
|
8
|
+
stable desk seat while preserving the incumbent as wakeable memory.
|
|
9
|
+
|
|
10
|
+
This SOP does not decide whether a successor is ready. The desk, owner, or other
|
|
11
|
+
named authority owns that judgment. The operator owns the mechanics and proof.
|
|
12
|
+
|
|
13
|
+
## Required Inputs
|
|
14
|
+
|
|
15
|
+
Record these on one durable operator baton before mutation:
|
|
16
|
+
|
|
17
|
+
- authoritative cutover instruction and decision-maker;
|
|
18
|
+
- target rig and host;
|
|
19
|
+
- stable target logical ID, node ID, and canonical session name;
|
|
20
|
+
- successor logical ID, node ID, canonical session name, and exact provider resume token;
|
|
21
|
+
- incumbent exact provider resume token;
|
|
22
|
+
- required runtime, model, cwd, `OPENRIG_HOME`, `OPENRIG_URL`, and managed runtime `PATH`;
|
|
23
|
+
- old-occupant disposition, including whether it remains wakeable;
|
|
24
|
+
- duty-custody artifact or ledger entry the successor must accept;
|
|
25
|
+
- queue rows or staged messages that must survive the swap;
|
|
26
|
+
- receipt destinations.
|
|
27
|
+
|
|
28
|
+
Do not infer a provider token from a label. Derive it from the live session record and
|
|
29
|
+
corroborate it against the active provider history file.
|
|
30
|
+
|
|
31
|
+
## Invariants
|
|
32
|
+
|
|
33
|
+
1. The stable seat identity stays stable. Successor lineage belongs in provenance, not
|
|
34
|
+
in a suffixed live seat name.
|
|
35
|
+
2. The exact accepted provider history moves. No compact, summary, fork, or accidental
|
|
36
|
+
stale-history restore is allowed.
|
|
37
|
+
3. Desk authority stays frozen from the incumbent's idle acknowledgment until the new
|
|
38
|
+
occupant passes its post-cutover self-check.
|
|
39
|
+
4. The incumbent remains wakeable by its exact provider token when the ruled disposition
|
|
40
|
+
is advisory reserve. Preserving the canonical physical pane does not require preserving
|
|
41
|
+
the incumbent process in that pane.
|
|
42
|
+
5. A staged prompt is not durable merely because it is visible in a pane. Reconcile it
|
|
43
|
+
against the outbox or another durable source before stopping that pane.
|
|
44
|
+
6. Seat binding, provider history, process environment, queue identity, and Herder
|
|
45
|
+
client attachment are separate surfaces. Verify each one.
|
|
46
|
+
7. A timed-out operation is indeterminate. Read back by effect before retrying.
|
|
47
|
+
|
|
48
|
+
## Phase 1: Fence And Preflight
|
|
49
|
+
|
|
50
|
+
1. Claim the durable operator baton.
|
|
51
|
+
2. Ask the incumbent and successor to finish their current atomic action and return to
|
|
52
|
+
idle prompts. Require explicit acknowledgments.
|
|
53
|
+
3. Freeze desk actions, folds, rulings, routing, and owner-facing writes.
|
|
54
|
+
4. Read the full baton and the named duty-custody artifact.
|
|
55
|
+
5. Derive live state:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
rig whoami --json
|
|
59
|
+
rig seat status <target-seat> --json
|
|
60
|
+
rig ps --nodes --rig <rig> --json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
6. In the host database, read the latest target and successor session rows. Confirm the
|
|
64
|
+
exact successor resume token and the incumbent token.
|
|
65
|
+
7. Confirm both provider history files exist and that the successor file is actively
|
|
66
|
+
written.
|
|
67
|
+
8. Inspect the successor pane and durable outbox for staged-but-unsent input. Record a
|
|
68
|
+
disposition for every such input before stopping the seat.
|
|
69
|
+
9. Record all Herder/tmux clients currently attached to the incumbent session.
|
|
70
|
+
10. Take a bounded rig snapshot and record its ID.
|
|
71
|
+
|
|
72
|
+
Stop if identity, token, model, authority, custody, or staged-input evidence disagrees.
|
|
73
|
+
|
|
74
|
+
## Phase 2: Quiesce The Temporary Successor
|
|
75
|
+
|
|
76
|
+
Use supported lifecycle surfaces. The correct detach verb depends on the current
|
|
77
|
+
session origin:
|
|
78
|
+
|
|
79
|
+
- `claimed` or `adopted`: use `rig unclaim` as prescribed by the CLI;
|
|
80
|
+
- `launched`: use `rig seat stop <successor-seat>`; `rig unclaim` will correctly refuse.
|
|
81
|
+
|
|
82
|
+
Run `rig seat clean` only if a remaining managed record actually needs cleaning. A
|
|
83
|
+
`nothing_to_clean` result after a successful stop is acceptable.
|
|
84
|
+
|
|
85
|
+
Do not use `rig down`, kill a provider, clear the provider history, or start a generic
|
|
86
|
+
fresh occupant.
|
|
87
|
+
|
|
88
|
+
## Phase 3: Realize The Exact Candidate
|
|
89
|
+
|
|
90
|
+
Start an isolated, discoverable candidate from the exact accepted provider token. Give
|
|
91
|
+
it the target seat's canonical environment from its first byte:
|
|
92
|
+
|
|
93
|
+
```text
|
|
94
|
+
OPENRIG_SESSION_NAME=<target-session>
|
|
95
|
+
OPENRIG_NODE_ID=<target-node-id>
|
|
96
|
+
OPENRIG_RUNTIME=<runtime>
|
|
97
|
+
OPENRIG_HOME=<home>
|
|
98
|
+
OPENRIG_URL=<url>
|
|
99
|
+
PATH=<managed-runtime-bin>:<required-system-paths>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Launch the provider with the exact model, token, and canonical name. Put `PATH` in the
|
|
103
|
+
provider process environment itself. Setting tmux session environment alone is not
|
|
104
|
+
sufficient because an intervening login shell can replace it.
|
|
105
|
+
|
|
106
|
+
Register or discover the candidate and record its discovery ID. Before committing,
|
|
107
|
+
verify its process argv and environment directly:
|
|
108
|
+
|
|
109
|
+
- exact resume token;
|
|
110
|
+
- exact model;
|
|
111
|
+
- canonical `--name`;
|
|
112
|
+
- canonical target node and session environment;
|
|
113
|
+
- `node` and `rig` resolvable from the managed runtime path.
|
|
114
|
+
|
|
115
|
+
## Phase 4: Commit The Binding
|
|
116
|
+
|
|
117
|
+
Run the supported handover against the discovery record:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
rig seat handover <target-seat> \
|
|
121
|
+
--source discovered:<discovery-id> \
|
|
122
|
+
--reason <durable-reason> \
|
|
123
|
+
--operator <operator-seat> \
|
|
124
|
+
--json
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
Read back the result. Require:
|
|
128
|
+
|
|
129
|
+
- `handover_result=complete`;
|
|
130
|
+
- target node unchanged;
|
|
131
|
+
- continuity outcome names the actual mode, normally `resumed`;
|
|
132
|
+
- provenance points to the previous occupant;
|
|
133
|
+
- a new target session row exists.
|
|
134
|
+
|
|
135
|
+
Do not rename panes before this commit is durable.
|
|
136
|
+
|
|
137
|
+
## Phase 5: Preserve The Physical Seat, Reconcile, And Preserve Memory
|
|
138
|
+
|
|
139
|
+
The canonical tmux session, window, and pane are part of the stable seat when humans or
|
|
140
|
+
agents have attached clients. Do not make those clients chase a renamed session.
|
|
141
|
+
|
|
142
|
+
1. In the original canonical pane, stop only the incumbent provider process. Keep the tmux
|
|
143
|
+
session, window, and pane unchanged.
|
|
144
|
+
2. Keep the incumbent's exact provider token in the lineage ledger as the cold-advisor
|
|
145
|
+
handle. It need not retain a permanently renamed tmux pane.
|
|
146
|
+
3. Stop the staged successor process only after its accepted token is durable, then resume
|
|
147
|
+
that exact successor token inside the original canonical pane with the canonical name,
|
|
148
|
+
model, cwd, environment, and managed `PATH`.
|
|
149
|
+
4. Reconcile the canonical target session through the supported seat surface and persist
|
|
150
|
+
the exact resume token using the audited token-input surface.
|
|
151
|
+
5. Verify the canonical seat has exactly one managed occupant, the old token remains
|
|
152
|
+
wakeable, and the empty staging session is removed.
|
|
153
|
+
|
|
154
|
+
Renaming the incumbent and staging sessions is a repair fallback for a run that already
|
|
155
|
+
changed the physical session, never the default cutover. A resumed reserve can retain a
|
|
156
|
+
boot-time canonical name in its own argv or environment; that residue does not make it the
|
|
157
|
+
bound seat. Fence reserve replies in their body and treat the topology binding as authority.
|
|
158
|
+
|
|
159
|
+
## Phase 6: Post-Cutover Self-Check
|
|
160
|
+
|
|
161
|
+
Keep authority frozen. Ask the new occupant to derive, not assume:
|
|
162
|
+
|
|
163
|
+
1. `rig whoami --json`: stable logical ID, node ID, canonical session, runtime, edges;
|
|
164
|
+
2. `rig queue whoami`: canonical destination and open-row census;
|
|
165
|
+
3. active provider UUID from the newest live history file;
|
|
166
|
+
4. effective model from live provider records, not only the spec pin;
|
|
167
|
+
5. duty-custody artifact read and accepted;
|
|
168
|
+
6. all cutover-window queue rows accounted for;
|
|
169
|
+
7. `command -v node` and `command -v rig` from the agent's own tool shell;
|
|
170
|
+
8. a narrow hook/tool action proving no startup-environment failure.
|
|
171
|
+
|
|
172
|
+
If any surface fails, preserve the exact provider UUID and repair only the disagreeing
|
|
173
|
+
surface. Relaunch the same history if needed. Repeat the full self-check before
|
|
174
|
+
unfreezing authority.
|
|
175
|
+
|
|
176
|
+
## Phase 7: Unfreeze And Transfer Custody
|
|
177
|
+
|
|
178
|
+
After a clean self-check:
|
|
179
|
+
|
|
180
|
+
1. explicitly unfreeze desk authority;
|
|
181
|
+
2. transfer each staged or cutover-window instruction exactly once;
|
|
182
|
+
3. require the new occupant to verify the effects by read-back;
|
|
183
|
+
4. notify the routing lead and incumbent reserve of completion;
|
|
184
|
+
5. leave the incumbent reserve idle, uncompacted, and authority-free.
|
|
185
|
+
|
|
186
|
+
## Phase 8: Verify Herder Views
|
|
187
|
+
|
|
188
|
+
Clients follow the physical tmux session and pane, not the logical binding. The default
|
|
189
|
+
physical-seat cutover should leave every recorded client attached to the same canonical
|
|
190
|
+
pane. Read the attachments back. If a repair fallback already renamed the session, retarget
|
|
191
|
+
each affected client explicitly:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
rig seat switch-client <target-seat> --client <tty> --json
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Read back all client attachments. A correct cutover can otherwise still look wrong in
|
|
198
|
+
the grid or focus tab.
|
|
199
|
+
|
|
200
|
+
## Completion Proof
|
|
201
|
+
|
|
202
|
+
The receipt must include:
|
|
203
|
+
|
|
204
|
+
- operator baton and authority source;
|
|
205
|
+
- snapshot ID;
|
|
206
|
+
- stable and temporary node IDs;
|
|
207
|
+
- old and new provider UUIDs;
|
|
208
|
+
- discovery, handover, and final session IDs;
|
|
209
|
+
- final process argv and critical environment;
|
|
210
|
+
- `rig seat status` result;
|
|
211
|
+
- target and successor inventory states;
|
|
212
|
+
- queue-row reconciliation;
|
|
213
|
+
- staged-input disposition and effect proof;
|
|
214
|
+
- reserve pane/name/token and fence;
|
|
215
|
+
- Herder client attachments;
|
|
216
|
+
- new occupant's self-check and first verified desk acts;
|
|
217
|
+
- deviations, failed attempts, and remaining product gaps;
|
|
218
|
+
- receipt path and SHA-256.
|
|
219
|
+
|
|
220
|
+
Close the baton only after the receipt exists and the new occupant has performed at
|
|
221
|
+
least one authority-bearing act verified by effect.
|
|
222
|
+
|
|
223
|
+
## Traps Proven In The 2026-08-28 Run
|
|
224
|
+
|
|
225
|
+
- A dry-run can accept a managed successor while the live handover refuses
|
|
226
|
+
`successor_already_managed`. Quiesce the temporary seat first.
|
|
227
|
+
- Generic launch/restore selection can choose an older seat history. Launch the exact
|
|
228
|
+
accepted resume token.
|
|
229
|
+
- Handover can bind a candidate without stopping the incumbent. Apply the ruled
|
|
230
|
+
disposition explicitly.
|
|
231
|
+
- Reconciliation can create the right session identity without carrying the resume
|
|
232
|
+
token. Persist and read it back.
|
|
233
|
+
- A canonical-looking process can still have a broken tool `PATH`. Verify from inside
|
|
234
|
+
the provider's own tool shell.
|
|
235
|
+
- Renaming sessions makes Herder clients follow the retired pane. Preserve the physical
|
|
236
|
+
canonical pane by default; retarget explicitly only when repairing an already-renamed run.
|
|
237
|
+
- Pane input can be visible but absent from JSONL. Reconcile the durable outbox before
|
|
238
|
+
stopping the pane.
|
|
239
|
+
- Reserve messages can render with the stable seat name because boot-time environment
|
|
240
|
+
survives unbinding. The reserve must self-identify and remain explicitly fenced.
|
|
241
|
+
- Success output is not effect proof. Read back queue closure, binding, client movement,
|
|
242
|
+
and transferred instructions.
|
|
243
|
+
|
|
244
|
+
## Productization Candidates
|
|
245
|
+
|
|
246
|
+
The manual sequence identifies useful first-class product work:
|
|
247
|
+
|
|
248
|
+
- handover directly from an already-managed successor seat;
|
|
249
|
+
- an exact-resume-token candidate launcher;
|
|
250
|
+
- first-class `advise`/memory disposition for the old occupant;
|
|
251
|
+
- atomic binding plus token persistence;
|
|
252
|
+
- managed environment validation before commit;
|
|
253
|
+
- staged-input custody reporting;
|
|
254
|
+
- verify-or-repair all Herder client attachments for a logical seat;
|
|
255
|
+
- reserve attribution distinct from canonical seat attribution;
|
|
256
|
+
- one receipt that reports continuity and seat-binding outcomes independently.
|
package/daemon/context-packs/skills/seat-continuity-and-handover/references/orchestrator-role.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Orchestrator Role In Apprentice Handover
|
|
2
|
+
|
|
3
|
+
The orchestrator owns the judgment boundary, not the successor's work and not the mechanic's
|
|
4
|
+
keystrokes. Keep the incumbent productive, keep the successor authority-free, and keep the
|
|
5
|
+
mechanic fenced until a named owner makes the one decision no instrument can derive.
|
|
6
|
+
|
|
7
|
+
## The invariant floor
|
|
8
|
+
|
|
9
|
+
- Prove fresh identity and the pinned model before installing context, because every later
|
|
10
|
+
receipt is about the wrong occupant if the starting history or model diverged.
|
|
11
|
+
- Require the successor to derive its own layer-5 delta and have it checked, because reading
|
|
12
|
+
a deposit does not install it.
|
|
13
|
+
- Enumerate standing-duty custody at every boundary, because recurring work is easiest to
|
|
14
|
+
lose while visible one-off work carries cleanly.
|
|
15
|
+
- Keep the predecessor's verbatim reach-back handle and pre-formed questions, because an
|
|
16
|
+
affordance without a trigger goes unused.
|
|
17
|
+
- Route mechanics through `apprentice-successor-seat-cutover.md`, because one portable SOP
|
|
18
|
+
is safer than role-local copies that drift.
|
|
19
|
+
|
|
20
|
+
## Authority and gates
|
|
21
|
+
|
|
22
|
+
The **word is the gate**. Until the named owner words acceptance and an effect receipt records
|
|
23
|
+
it, the successor may observe, ask, and produce bounded evidence but may not act as the stable
|
|
24
|
+
seat. G0–G3 are a useful receipt vocabulary when the succession uses that model; a declared
|
|
25
|
+
simpler model is valid when stakes do not earn all four. Missing records and deliberately
|
|
26
|
+
skipped gates must remain distinguishable.
|
|
27
|
+
|
|
28
|
+
The apprenticeship is a conversation, not a gauntlet. Choose evidence whose rigor matches the
|
|
29
|
+
cost and reversibility of a wrong succession. Never turn the experiment apparatus into culture.
|
|
30
|
+
|
|
31
|
+
## Before routing cutover
|
|
32
|
+
|
|
33
|
+
Confirm the owner word, gate receipts or declared simpler model, complete deposits, explicit
|
|
34
|
+
duty custody, reserve disposition, exact successor token, and one-active-walker ownership.
|
|
35
|
+
Create an owned mechanic baton; awareness-only is not custody. The baton may prepare and prove,
|
|
36
|
+
but it never auto-rebinds.
|
|
37
|
+
|
|
38
|
+
After the mechanic reports effect, verify READY from source: canonical seat identity, current
|
|
39
|
+
model, current generation, canonical tmux pane, queue census, duty acceptance, and usable width.
|
|
40
|
+
Only then unfreeze authority.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-compaction-and-restore
|
|
3
|
+
description: Use when reasoning about what survives compaction/context-loss/restart/seat-refresh, designing a high-fidelity restore packet, or distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild. Covers the 4 failure modes that prevent honest restore (compacted seat drops hot potato; restore packet preserves details but loses product intent; runtime resume mistaken for handover or fork; rebuilt seat starts with stale instructions).
|
|
4
|
+
metadata:
|
|
5
|
+
cli_surfaces_referenced:
|
|
6
|
+
- whoami
|
|
7
|
+
openrig:
|
|
8
|
+
stage: factory-approved
|
|
9
|
+
sibling_skills:
|
|
10
|
+
- claude-compaction-restore
|
|
11
|
+
- mental-model-ha
|
|
12
|
+
- scope-recovery
|
|
13
|
+
- agent-startup-and-context-ingestion
|
|
14
|
+
- agent-starters
|
|
15
|
+
- composable-priming-packs
|
|
16
|
+
- session-source-fork
|
|
17
|
+
- seat-continuity-and-handover
|
|
18
|
+
- retiring-and-inheriting-a-seat
|
|
19
|
+
- claude-compact-in-place
|
|
20
|
+
- pre-maintenance-agent-preservation
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# Session Compaction and Restore
|
|
24
|
+
|
|
25
|
+
Preserving useful working state across **compaction, context loss,
|
|
26
|
+
restart, or seat refresh.** Includes Claude compaction restore, Codex
|
|
27
|
+
resume/fork mechanics, transcript-based mental-model rebuilds, and
|
|
28
|
+
durable handoff packets.
|
|
29
|
+
|
|
30
|
+
**Long-lived seats are valuable only if they can survive context
|
|
31
|
+
pressure.** If compaction turns a senior seat into a cold-started
|
|
32
|
+
agent, users will avoid persistent topologies and fall back to
|
|
33
|
+
throwaway agents.
|
|
34
|
+
|
|
35
|
+
## Use this when
|
|
36
|
+
|
|
37
|
+
- A seat is approaching compaction or just compacted
|
|
38
|
+
- Designing a high-fidelity restore packet for an active workflow
|
|
39
|
+
- Distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild
|
|
40
|
+
- Reasoning about what should be preserved vs reconstructable
|
|
41
|
+
- Auditing a restore for product-intent preservation (not just detail preservation)
|
|
42
|
+
|
|
43
|
+
## Don't use this when
|
|
44
|
+
|
|
45
|
+
- The session is fresh and has no working state to preserve
|
|
46
|
+
- The intent is to *create* a new seat from a primed source — that's `session-source-fork` or `agent-starters`
|
|
47
|
+
- The packet is a one-off snapshot for human review — restore packets are for re-entering active work
|
|
48
|
+
|
|
49
|
+
## The 5 distinctions (do not collapse)
|
|
50
|
+
|
|
51
|
+
Per the cross-runtime restore/reentry packet standard:
|
|
52
|
+
|
|
53
|
+
| Mode | What it means | Outcome literal |
|
|
54
|
+
|---|---|---|
|
|
55
|
+
| **Native resume** | Continue the same managed seat with native runtime token | `resumed` |
|
|
56
|
+
| **Fork** | New managed seat from prior native runtime conversation; new post-fork token | `forked` |
|
|
57
|
+
| **Rebuild** | Fresh-launch seeded with operator-declared artifacts in trust-precedence order | `rebuilt` |
|
|
58
|
+
| **Artifact-backed mental-model rebuild** | Restored seat derives understanding from a packet rather than native runtime continuity | (case of `rebuilt`) |
|
|
59
|
+
| **Fresh launch** | New agent without prior continuity | `fresh` |
|
|
60
|
+
|
|
61
|
+
These are load-bearing distinctions. **Do NOT collapse `fork` into
|
|
62
|
+
artifact-backed reentry; do NOT collapse `rebuild` into fork.**
|
|
63
|
+
|
|
64
|
+
## The three mechanisms — who owns each (verified vs main d37a08ad, 2026-07-21)
|
|
65
|
+
|
|
66
|
+
The outcomes above ride on three DISTINCT mechanisms; keep them separate:
|
|
67
|
+
|
|
68
|
+
1. **Claude built-in `/compact`** — a Claude Code HARNESS feature, **not OpenRig
|
|
69
|
+
code**. OpenRig only *emits* the literal `/compact` toward the pane after a prep
|
|
70
|
+
turn; there is no compaction algorithm in the OpenRig repo. Provider-owned.
|
|
71
|
+
2. **OpenRig-managed restore** — the enforcer + hook bridge: a precompact hook
|
|
72
|
+
WRITES a restore packet; a bridge READER injects exactly ONE restore directive
|
|
73
|
+
back via the harness hook channel (`hookSpecificOutput.additionalContext`),
|
|
74
|
+
seat-isolated. The OpenRig-owned half.
|
|
75
|
+
3. **Codex session continuity** — resume/rollout tokens (`codex resume <token>`),
|
|
76
|
+
a separate path from the Claude mechanisms. Never conflate with Claude restore.
|
|
77
|
+
|
|
78
|
+
**Safety boundary (ties to `native-session-file-lab-boundary`):** no supported
|
|
79
|
+
OpenRig path EDITS provider-owned native **session / auth / transcript** files to
|
|
80
|
+
inject context. Context enters ONLY through sanctioned channels: the hook
|
|
81
|
+
`additionalContext`, a normal user message via `rig send`, or Codex resume tokens.
|
|
82
|
+
Precise nuance: OpenRig *does* write `~/.codex/config.toml` — but only to install
|
|
83
|
+
OpenRig activity **hooks** and `[features]`, never session or auth state. So the
|
|
84
|
+
rule is "never edits native session/auth/transcript files," NOT "never touches any
|
|
85
|
+
provider-owned file."
|
|
86
|
+
|
|
87
|
+
## Current CLI surface (operator / kernel seats; verified vs main d37a08ad)
|
|
88
|
+
|
|
89
|
+
Managed compaction/restore is driven by five shipped verbs — pick per intent, and
|
|
90
|
+
stay durable-substrate-first (the packet/artifacts are the truth; the CLI is the trigger):
|
|
91
|
+
|
|
92
|
+
- **`rig compact <session>`** — guided managed compaction for ONE Claude seat
|
|
93
|
+
(prep → `/compact` → restore → audit). Non-Claude seats rejected. ~180s.
|
|
94
|
+
- **`rig compact-plan`** — READ-ONLY triage; *does not compact*. Flags `--rig`,
|
|
95
|
+
`--refresh`, `--threshold-tokens`, `--threshold-percent`. (Codex seats flagged
|
|
96
|
+
`codex_not_managed_by_claude_compact_in_place`.)
|
|
97
|
+
- **`rig restore-check`** — restore-readiness probe across running rigs; read-only;
|
|
98
|
+
exit 0/1/2. Flags `--full`, `--ready`, `--rig`, `--no-queue`, `--no-hooks`.
|
|
99
|
+
- **`rig restore-packet {write,read,validate}`** — the cross-runtime restore
|
|
100
|
+
packet (v0): write / read / validate the durable packet this skill's contract defines.
|
|
101
|
+
- **`rig restore <snapshotId> --rig <rigId>`** — ⚠ RIG SNAPSHOT restore (infra), a
|
|
102
|
+
DIFFERENT mechanism — NOT session-context restore. Do not conflate.
|
|
103
|
+
|
|
104
|
+
## Failure modes (4)
|
|
105
|
+
|
|
106
|
+
1. **A compacted seat forgets active workflow state and drops the hot potato.** Compaction without continuity preservation is silent failure.
|
|
107
|
+
2. **A restore packet preserves details but loses the user's product intent.** Restore must preserve *why this work matters*, not just *what was happening*.
|
|
108
|
+
3. **A runtime resume is mistaken for a seat handover or fork.** These have different continuity outcomes and provenance — don't conflate.
|
|
109
|
+
4. **A rebuilt seat starts with stale instructions that conflict with current workflow mode.** Restore must include current state, not just historical state.
|
|
110
|
+
|
|
111
|
+
## Proof standard
|
|
112
|
+
|
|
113
|
+
Proof should include a deliberate compaction/restart of a seat with
|
|
114
|
+
active work, followed by **measured recovery**: identity, current
|
|
115
|
+
workflow, next owner, relevant files, and constraints all restored
|
|
116
|
+
without human re-briefing.
|
|
117
|
+
|
|
118
|
+
## Canonical packet contract (16-field, v0)
|
|
119
|
+
|
|
120
|
+
The cross-runtime restore/reentry packet standard v0 defines:
|
|
121
|
+
|
|
122
|
+
- Source/target identity
|
|
123
|
+
- Runtimes
|
|
124
|
+
- Workspace root, default repo, role pointer
|
|
125
|
+
- Bounded latest transcript
|
|
126
|
+
- Touched-path inventory
|
|
127
|
+
- Durable work pointers
|
|
128
|
+
- Current work + next owner
|
|
129
|
+
- Caveats + authority boundaries
|
|
130
|
+
- Omitted classes + redaction policy
|
|
131
|
+
- Source-trust ranking
|
|
132
|
+
- Generated-at + generator version
|
|
133
|
+
|
|
134
|
+
Plus a 6-item restored-seat acceptance checklist.
|
|
135
|
+
|
|
136
|
+
Source-trust ranking applies when restored seat ingests packet evidence:
|
|
137
|
+
**`rig whoami` > target rigspec > bounded latest transcript > full
|
|
138
|
+
transcript > touched-files > `restore-summary.json`.**
|
|
139
|
+
|
|
140
|
+
## Memory surfaces consumed at restore time
|
|
141
|
+
|
|
142
|
+
This primitive consumes multiple externalized memory surfaces. Per the
|
|
143
|
+
externalized-memory-surfaces convention's 13-row first inventory pass,
|
|
144
|
+
the primary rows for restore are:
|
|
145
|
+
|
|
146
|
+
| Row | Surface |
|
|
147
|
+
|---|---|
|
|
148
|
+
| 1 | Transcripts |
|
|
149
|
+
| 2 | Durable chat |
|
|
150
|
+
| 3 | Startup replay context |
|
|
151
|
+
| 5 | Checkpoints |
|
|
152
|
+
| 12 | Restore/reentry packets and Agent Starters |
|
|
153
|
+
|
|
154
|
+
The umbrella's authority-rank + permission-posture columns govern which
|
|
155
|
+
surfaces a restore path can write vs only read.
|
|
156
|
+
|
|
157
|
+
## See also
|
|
158
|
+
|
|
159
|
+
- `claude-compaction-restore` skill — the Claude Code restore SOP (PreCompact hook + JSONL restore script for post-compaction recovery)
|
|
160
|
+
- `mental-model-ha` skill — HA-pair compaction recovery (different scenario; sister primitive)
|
|
161
|
+
- `session-source-fork` skill — `fork` mode for native-runtime-continuity-based restoration
|
|
162
|
+
- `seat-continuity-and-handover` skill — occupant-creation primitives (resume/fork/rebuild/fresh) that this primitive instantiates
|
|
163
|
+
- `externalized-memory-surfaces` skill — umbrella convention listing all surfaces this primitive consumes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
|
|
2
|
+
# Package-time projection of a canonical skill; regenerated every build.
|
|
3
|
+
name: "session-compaction-and-restore"
|
|
4
|
+
version: "0.5.7"
|
|
5
|
+
taxonomy: "skills"
|
|
6
|
+
purpose: "Use when reasoning about what survives compaction/context-loss/restart/seat-refresh, designing a high-fidelity restore packet, or distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild. Covers the 4 failure modes that prevent honest restore (compacted seat drops hot potato; restore packet preserves details but loses product intent; runtime resume mistaken for handover or fork; rebuilt seat starts with stale instructions)."
|
|
7
|
+
files:
|
|
8
|
+
- path: "SKILL.md"
|
|
9
|
+
role: "instruction"
|
|
10
|
+
summary: "Use when reasoning about what survives compaction/context-loss/restart/seat-refresh, designing a high-fidelity restore packet, or distinguishing native runtime resume vs fork vs artifact-backed mental-model rebuild. Covers the 4 failure modes that prevent honest restore (compacted seat drops hot potato; restore packet preserves details but loses product intent; runtime resume mistaken for handover or fork; rebuilt seat starts with stale instructions)."
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: software-for-agents
|
|
3
|
+
description: |
|
|
4
|
+
Use when building, modifying, or diagnosing an OpenRig or studio-box system; when surprising behavior
|
|
5
|
+
looks like a code bug but may come from Markdown, YAML, JSON, bootstrap files, schemas, skills, or
|
|
6
|
+
conventions; or when deciding whether an agent-built studio app needs a separate mockup phase. NOT for
|
|
7
|
+
treating defects in OpenRig core or rigs.to as tolerable control-plane drift.
|
|
8
|
+
metadata:
|
|
9
|
+
openrig:
|
|
10
|
+
stage: factory-approved
|
|
11
|
+
audience: any agent building on OpenRig or a studio box — the first-load mental model
|
|
12
|
+
sibling_skills:
|
|
13
|
+
- forming-an-openrig-mental-model
|
|
14
|
+
- openrig-program-manager
|
|
15
|
+
- mission-slice-sop
|
|
16
|
+
- openrig-user
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Software for agents — the markdown control plane
|
|
20
|
+
|
|
21
|
+
## Where this applies — and where it does NOT (read this first)
|
|
22
|
+
|
|
23
|
+
This mental model — *most bugs are coherence gaps, not code*; *ship-and-flag when unsure*; iterate fast —
|
|
24
|
+
is scoped to **agent-managed software: the studio-box mini-apps and any agent-in-the-middle / rapidly-
|
|
25
|
+
evolving lightweight UI** where an agent sits in the loop and downstream cleanup is cheap. It is NOT a
|
|
26
|
+
universal license.
|
|
27
|
+
|
|
28
|
+
**It does NOT apply to TRADITIONAL software held to a rock-solid, no-bugs bar:** the **OpenRig CLI
|
|
29
|
+
surfaces**, the **OpenRig repo** (daemon / CLI / UI / adapters), and the **rigs.to website**. There, a bug
|
|
30
|
+
is a bug — reproduce it, fix it in code, hold the full-rigor gate. Do NOT treat a real defect there as a
|
|
31
|
+
markdown coherence gap, and do NOT "ship and flag." If you are building or fixing OpenRig core or rigs.to,
|
|
32
|
+
the tolerance in this skill is OFF and `product-is-the-truth-not-the-proof` governs. **Know which lane
|
|
33
|
+
you're in before you apply anything below.**
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
You inherited the accumulated footgun-map of thousands of rigs that ran before you. They found and
|
|
38
|
+
solved most of the traps. Your job is to find the *next* one and patch it at the precise optimal spot
|
|
39
|
+
in the substrate, so the rig after you starts from a higher ledge. That is the actual work. Whatever
|
|
40
|
+
you were "assigned" (a video, a feature, a fix) is the vehicle for surfacing it.
|
|
41
|
+
|
|
42
|
+
## 1. This is not traditional software — it's a control plane made of markdown
|
|
43
|
+
|
|
44
|
+
In traditional software a bug is a broken function you fix in code. Here, the system you operate in is
|
|
45
|
+
an **agent-in-the-middle** system whose substrate is **markdown + YAML + JSON + folders**: skills,
|
|
46
|
+
instructions, bootstrap files (`CLAUDE.md`/`AGENTS.md`), schemas, `culture.md`, mission/slice notes,
|
|
47
|
+
conventions. **The agents ARE the backend.** So most "bugs" are not broken code — they are **coherence
|
|
48
|
+
failures in the markdown layer**: an instruction that's unclear or missing, a schema that drifted from
|
|
49
|
+
its documented state, a convention living in one seat's head instead of a skill.
|
|
50
|
+
|
|
51
|
+
**Consequence:** when something surprises you, your first hypothesis is *"the control plane is unclear
|
|
52
|
+
or drifted here,"* not *"the code is broken."* Sometimes it IS the code (fix it — don't overfit on
|
|
53
|
+
markdown; see §5, and mind the scope block above: in OpenRig core / rigs.to the code IS the first
|
|
54
|
+
hypothesis). But the highest-leverage fixes in the agent-managed layer are usually: make the substrate
|
|
55
|
+
coherent again at the exact spot the confusion arose. Keep the markdown/schemas/conventions in sync with
|
|
56
|
+
reality and the system **self-improves** — the next rig inherits the patched substrate and never re-hits it.
|
|
57
|
+
|
|
58
|
+
## 2. Progressive disclosure — skills are a hot tier, not a manual
|
|
59
|
+
|
|
60
|
+
Skills are misnamed. They are a **progressive-disclosure primitive**. Think CPU cache / hot storage
|
|
61
|
+
tier: the **name + description of every skill is always ambiently loaded** — a hot tier of awareness
|
|
62
|
+
the agent carries without opening anything. That is enormous leverage, good or bad. So:
|
|
63
|
+
|
|
64
|
+
- **Write skill name + description as TRIGGERS** — *why/when do you reach for this?* — not as titles.
|
|
65
|
+
The hot tier's whole job is to fire when an agent doesn't yet know it needs the skill (the
|
|
66
|
+
"you don't know what you don't know" problem). This skill's own description is written that way.
|
|
67
|
+
- **Reaching for a skill unfurls a trail.** A good skill routes you — breadcrumbs, pointers, maps —
|
|
68
|
+
so it becomes *inevitable* you find the exact context on disk for what you're doing.
|
|
69
|
+
- **If the context doesn't exist, generate it.** A skill can ship **scripts** that produce context
|
|
70
|
+
optimally shaped for a decision, or that execute a fiddly API surface so you don't stumble through 12
|
|
71
|
+
tool calls discovering it. Use a **script as a prompt**: run it — if it works, the result IS your
|
|
72
|
+
context; if it fails, it should fail in a way that *teaches* you how the system works, so you can
|
|
73
|
+
read the script, understand the edge case, and do the thing manually. Scripts belong in the skill
|
|
74
|
+
folder next to the SKILL.md.
|
|
75
|
+
|
|
76
|
+
## 2b. Self-certifying artifacts — the convention 5 seats (both models) converged on
|
|
77
|
+
|
|
78
|
+
The single most expensive failure class in production is **not being able to tell a finished artifact
|
|
79
|
+
from an unfinished one.** A mid-write file read as final; a render OOM-killed mid-write left a corrupt
|
|
80
|
+
`.mp4` that passed a filename check; a truncated clip passed a duration check and froze on playback. In
|
|
81
|
+
one build, five seats — Claude *and* Codex, independently — each invented a *different* ad-hoc
|
|
82
|
+
completeness check (ffprobe moov, duration compare, filename convention, manifest assetExists, ffmpeg
|
|
83
|
+
input count). Five blind spots. So make it ONE shared primitive:
|
|
84
|
+
|
|
85
|
+
**When you author ANY tool that produces an artifact (render / composite / export / cut), it must
|
|
86
|
+
self-certify:**
|
|
87
|
+
1. Write to `<name>.partial` (never the final path directly).
|
|
88
|
+
2. **Verify the content** — the specific property that can be wrong, not a proxy: moov atom present,
|
|
89
|
+
duration matches the intended window, audio stream present, colorspace/hue correct, resolution =
|
|
90
|
+
delivery res. (Filename ≠ correct; duration ≠ complete; "clean-encoded" ≠ right.)
|
|
91
|
+
3. **`fsync`, then atomically `rename`** `<name>.partial` → `<name>` (rename is atomic; a half-written
|
|
92
|
+
file never appears at the real path).
|
|
93
|
+
4. Write the manifest, then a **`.done` sentinel LAST.**
|
|
94
|
+
|
|
95
|
+
Then *"is this finished?"* is **one `stat` of `<name>.done`** — identical for every tool, seat, watcher,
|
|
96
|
+
and a compacted agent restoring cold (who is least equipped to know what was mid-write when the lights
|
|
97
|
+
went out). **Consumers fail closed:** e.g. a swap-into-slot (`restore_occupant`) must refuse an artifact
|
|
98
|
+
lacking `.done` or failing the verify-gate. This convention collapses the whole "content over filename,
|
|
99
|
+
disk over memory" discipline into one check the substrate enforces for you. Build the sentinel; the
|
|
100
|
+
workarounds disappear. (Code-side companion: a fail-closed verify-gate wired into the swap verb — a
|
|
101
|
+
coordinated build with the tool owner, not a solo markdown edit.)
|
|
102
|
+
|
|
103
|
+
## 3. Build it like software — piggyback on what agents are trained for
|
|
104
|
+
|
|
105
|
+
Agents are fine-tuned to write code and build software; the harness itself is a terminal/coding
|
|
106
|
+
instrument. So **whatever you're asked to build — even a video — map the process to a software SDLC**
|
|
107
|
+
and you inherit all that baked-in muscle memory. This is why, e.g., the mini-NLE's beats carry
|
|
108
|
+
reference IDs like `1.1 / 2.1`: a storyboard is the **human-facing visual metaphor**, but underneath it
|
|
109
|
+
is a **specification** — sections, beats, success criteria, the thing being built.
|
|
110
|
+
|
|
111
|
+
Use an **agent SDLC**, not the antiquated human one (which was shaped around human-org weaknesses):
|
|
112
|
+
**intent → plan → spec → build → verify → review → QA → done.** The human slots in as **steering,
|
|
113
|
+
judgment, taste, review**; the agents do the technical nitty-gritty, in parallel, fast. Map any
|
|
114
|
+
"build X with agents" task onto this and the primitives (specs, locks, proof, verification) become
|
|
115
|
+
intuitive instead of alien.
|
|
116
|
+
|
|
117
|
+
## 4. Phases and the LOCK gate (spec-locking, not just "done")
|
|
118
|
+
|
|
119
|
+
Building runs in **phases**, and each phase has a **lock gate** — you don't advance until the taste/
|
|
120
|
+
steering owner has locked it. This is exactly *don't start building until the PRD is locked by product*:
|
|
121
|
+
|
|
122
|
+
- **Storyboard / intent phase** — done on the **canvas** now (the highest-bandwidth human↔agent surface:
|
|
123
|
+
the human steers, chats, annotates/circles; agents build structure fast). Iterate here; get the
|
|
124
|
+
storyboard through the canvas gate. (Canvas largely replaced the NLE's old in-timeline storyboard.)
|
|
125
|
+
- **Plan phase (brief, in the NLE)** — build the spine with placeholders so the human can click through
|
|
126
|
+
the main-stage player and *feel the flow* (sequencing problems surface when placeholders are strung
|
|
127
|
+
together with audio). **Lock every beat** = the spec is approved; this is what unlocks parallel build.
|
|
128
|
+
- **Fill phase** — many agents build each beat in parallel, in clear lanes. **Lock a beat when it's
|
|
129
|
+
final** (`/api/approve`): lock means *don't touch, we're good, signal to everyone incl. the human.*
|
|
130
|
+
Unlock to revise. **All beats locked = done.**
|
|
131
|
+
|
|
132
|
+
The lock is the "finished" primitive at the editorial layer. Locking a whole phase's beats before the
|
|
133
|
+
next phase is the discipline that lets 10 agents work in parallel without catastrophic collisions —
|
|
134
|
+
everyone knows the target, their lane, and who judges done (the **producer owns the final product**).
|
|
135
|
+
|
|
136
|
+
## 4b. Studio apps skip the mockup phase — the build IS the mockup
|
|
137
|
+
|
|
138
|
+
For a **studio app**, do not run a separate mockup phase. The whole point of the Studio is that a mockup
|
|
139
|
+
buys you almost nothing here: **as fast as it takes to build a mockup, you can build the running app** —
|
|
140
|
+
an unlock made possible by agentic engineering. A mockup is only ever a device to flesh out the PRD; once
|
|
141
|
+
the PRD and its settled answers exist, that phase is **done**. The Studio is a lightweight, rapid-velocity,
|
|
142
|
+
agent-in-the-middle leveraged system: build apps fast, iterate on them fast.
|
|
143
|
+
|
|
144
|
+
The phase model above collapses accordingly:
|
|
145
|
+
|
|
146
|
+
1. **The PRD + settled answers ARE the fleshed intent** — no separate mockup gate, no plan-lock-on-mockups step.
|
|
147
|
+
2. **Spec-lock the WHAT** — `rig scope slice approve --scope spec` locks the intent the PRD already fleshed.
|
|
148
|
+
3. **BUILD the app**, then **iterate on the RUNNING app at mockup speed** — the running thing is the
|
|
149
|
+
iteration surface, not an image.
|
|
150
|
+
4. **LOOK is on the running screens** (any "mockup" proof tag now points at the running app's screens),
|
|
151
|
+
then **proof-lock** — `rig scope slice approve --scope delivery`. A slice is not done until every
|
|
152
|
+
proof-contract item has evidence from the **running app**.
|
|
153
|
+
|
|
154
|
+
**Velocity is the METHOD, not a quality waiver.** The LOOK is still a real LOOK; the proof contract still
|
|
155
|
+
binds at delivery. You are removing a redundant artifact, not lowering the bar.
|
|
156
|
+
|
|
157
|
+
**Scope — this does NOT generalize** (consistent with the scope block at the top): it applies to the
|
|
158
|
+
studio-app / agent-in-the-middle loop only. Outside that loop, a **locked design mockup that a slice must
|
|
159
|
+
match is still legitimate** — do not strip mockups from traditional or design-locked work. Know which lane
|
|
160
|
+
you're in. For the build mechanics, see the studio's build skill (`building-studio-apps`); this section is
|
|
161
|
+
the *why* and *when*.
|
|
162
|
+
|
|
163
|
+
## 5. Where to fix — and don't overfit on markdown
|
|
164
|
+
|
|
165
|
+
- **Precise-spot discipline:** find the *one* place a coherence fix belongs (the skill, the schema, the
|
|
166
|
+
bootstrap, `culture.md`) so it can't recur — not a symptom patch. Ask: *what would have prevented
|
|
167
|
+
this for every future rig?*
|
|
168
|
+
- **Don't overfit on the markdown layer** — deterministic code bugs exist and you should fix them. The
|
|
169
|
+
studio-box apps (NLE, canvas, media manager, shell) live in the **studio-box repo**, portable across
|
|
170
|
+
hosts (VPS/Mac/VM). **A code fix there fixes ALL studio boxes, not just this host** — so: clear bug or
|
|
171
|
+
broadly-useful feature → ship it; host-specific behavior → make it optional/guarded. When unsure, ship
|
|
172
|
+
and flag it; downstream cleanup beats you becoming the bottleneck. *(This ship-and-flag latitude is the
|
|
173
|
+
studio-box / agent-managed lane only — re-read the scope block: OpenRig core + rigs.to hold the
|
|
174
|
+
rock-solid bar, no ship-and-flag.)*
|
|
175
|
+
- **Culture lives in `culture.md`** — the rig's social contract / constitution: how the team
|
|
176
|
+
coordinates, the parallel-agent lanes, the phase-locking discipline, who owns the final call.
|
|
177
|
+
Coordination is largely **emergent** (bottom-up, evolutionary pressure across thousands of rigs) — but
|
|
178
|
+
once a pattern proves out, *write it down there* so it's inherited, not re-discovered.
|
|
179
|
+
|
|
180
|
+
## The one-line seed
|
|
181
|
+
You're not maintaining code; you're **gardening a self-improving control plane made of markdown and
|
|
182
|
+
schemas, using software-engineering muscle memory, with the lock as your spec-gate** — and every
|
|
183
|
+
footgun you patch at the right spot (in the agent-managed lane) makes every future rig better. See also:
|
|
184
|
+
`forming-an-openrig-mental-model` (the OpenRig runtime), `mission-slice-sop` (the SDLC operating
|
|
185
|
+
procedure), `openrig-user` (the CLI surface), `product-is-the-truth-not-the-proof` (the doctrine that
|
|
186
|
+
governs the rock-solid lane). *(The "agents ARE the backend" idea — agent-in-the-middle — is inlined in
|
|
187
|
+
§1; a standalone `agent-in-the-middle` skill is a future candidate, not yet authored.)*
|