@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
|
|
2
2
|
# Package-time projection of a canonical skill; regenerated every build.
|
|
3
3
|
name: "verification-before-completion"
|
|
4
|
-
version: "0.5.
|
|
4
|
+
version: "0.5.7"
|
|
5
5
|
taxonomy: "skills"
|
|
6
6
|
purpose: "Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always"
|
|
7
7
|
files:
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: queue-handoff
|
|
3
|
+
description: Use when ending a turn, finishing a slice, blocked on another agent's work, or escalating to a human — durable work handoff via queue items so the system keeps moving across compactions, missed messages, and interruptions. Covers the hot-potato terminal-turn-rule (active work ends by passing the ball, not by going idle), default-nudge semantics, and when `--no-nudge` is appropriate for intentional cold park or human gate.
|
|
4
|
+
metadata:
|
|
5
|
+
cli_surfaces_referenced:
|
|
6
|
+
- queue
|
|
7
|
+
- queue create
|
|
8
|
+
- queue handoff
|
|
9
|
+
- queue handoff-and-complete
|
|
10
|
+
openrig:
|
|
11
|
+
stage: factory-approved
|
|
12
|
+
sibling_skills:
|
|
13
|
+
- workflow-runtime
|
|
14
|
+
- watchdog
|
|
15
|
+
- refocus
|
|
16
|
+
- looping-workflows
|
|
17
|
+
- intake-routing
|
|
18
|
+
- human-in-the-loop
|
|
19
|
+
- dispatching-parallel-agents
|
|
20
|
+
- subagent-driven-development
|
|
21
|
+
- structured-ack-dispatch
|
|
22
|
+
- control-plane-capabilities
|
|
23
|
+
- status-not-chat-orchestrator
|
|
24
|
+
- control-plane-queue
|
|
25
|
+
- control-plane-watchdog
|
|
26
|
+
- control-plane-workflows
|
|
27
|
+
- control-plane-delivery-loop
|
|
28
|
+
- control-plane-rollout-manager
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# Queue Handoff
|
|
32
|
+
|
|
33
|
+
Durable work handoff via queue items. Lets the system keep moving
|
|
34
|
+
through compactions, missed messages, and interruptions by passing the
|
|
35
|
+
ball forward instead of leaving work suspended in chat or in-flight
|
|
36
|
+
without an owner.
|
|
37
|
+
|
|
38
|
+
## Use this when
|
|
39
|
+
|
|
40
|
+
- **Ending a turn on substantive work.** Active work should end by
|
|
41
|
+
passing the ball to an owner or to the human — never by going idle
|
|
42
|
+
with the rig appearing dormant.
|
|
43
|
+
- **Finishing a slice that has a clear next step.** Default-nudge:
|
|
44
|
+
receiver gets a wake-ping plus the durable queue item.
|
|
45
|
+
- **Blocked on another agent's work.** Park the qitem with
|
|
46
|
+
`closure_reason: blocked_on` and the blocker qitem id.
|
|
47
|
+
- **Escalating to the human.** Make the escalation a durable attention
|
|
48
|
+
item, not just a chat message.
|
|
49
|
+
|
|
50
|
+
## Don't use this when
|
|
51
|
+
|
|
52
|
+
- The work is genuinely complete and there's no follow-on owner. Use
|
|
53
|
+
`closure_reason: no-follow-on` (terminal completion) or
|
|
54
|
+
`canceled`/`denied` as appropriate.
|
|
55
|
+
- The handoff would be too small and turn work into bureaucracy. Bundle
|
|
56
|
+
the work into a coherent slice instead of decomposing every step.
|
|
57
|
+
- The handoff would be too broad and lose ownership/proof/closure
|
|
58
|
+
criteria. Shape the qitem so the receiver knows the expected next
|
|
59
|
+
action and closure evidence.
|
|
60
|
+
|
|
61
|
+
## The hot-potato terminal-turn-rule
|
|
62
|
+
|
|
63
|
+
Active work ends by passing the ball to a named next owner or to the
|
|
64
|
+
human. The qitem state machine enforces this:
|
|
65
|
+
|
|
66
|
+
`pending → in-progress → done` requires `closure_reason` from one of:
|
|
67
|
+
|
|
68
|
+
- `handed_off_to` — work continues at a different seat (target = new owner)
|
|
69
|
+
- `blocked_on` — parked pending another qitem (target = blocker qitem id)
|
|
70
|
+
- `denied` — receiver rejected the work
|
|
71
|
+
- `canceled` — sender or receiver withdrew
|
|
72
|
+
- `no-follow-on` — terminal completion, nothing else needed
|
|
73
|
+
- `escalation` — kicked up to a higher tier (target = escalation target)
|
|
74
|
+
|
|
75
|
+
Three of those (`handed_off_to`, `blocked_on`, `escalation`) additionally
|
|
76
|
+
require `closure_target`. The daemon enforces this at the domain layer;
|
|
77
|
+
every surface (CLI, MCP, future UI) inherits the same guarantee.
|
|
78
|
+
|
|
79
|
+
**The drafted-park failure (draft ≠ throw).** The rule is about the *actual* pass, not the
|
|
80
|
+
intention to pass. A turn that ends with a self-instruction **typed into your own prompt but left
|
|
81
|
+
unsent** — a drafted go-ahead, a next-atom note you never sent — has **not** handed off; it has
|
|
82
|
+
**parked**, and the seat sits idle for as long as nobody notices. Drafting the handoff feels like
|
|
83
|
+
doing it; it isn't. **Your last act on a turn must be an EDIT or a SEND** — a committed change, a
|
|
84
|
+
`rig send`, a `rig queue` handoff — **never a drafted prompt line left in the buffer.** If your
|
|
85
|
+
final output is an instruction addressed to yourself, you haven't ended the turn, you've stalled it.
|
|
86
|
+
|
|
87
|
+
**The dispatcher's other half — supersession closes your own outbox.** Ending your turn cleanly is
|
|
88
|
+
only half the rule; the other half fires when *you* move the world. **When a phase transition or a
|
|
89
|
+
fold receipt supersedes work you dispatched, close those dispatches yourself — with a citation to the
|
|
90
|
+
event that superseded them.** Closure-on-supersession belongs to the **dispatcher, never the
|
|
91
|
+
receiver.** Make it a habit: after every fold receipt / phase transition, run an **outbox audit** —
|
|
92
|
+
*which of my open dispatches did this just make moot?* — and close them with the citation.
|
|
93
|
+
|
|
94
|
+
*Why it must live with you:* stale dispatch-debt is **invisible to the dispatcher** because it lands
|
|
95
|
+
on someone else's queue — the cost is externalized, so no feedback loop ever fires to make you clean
|
|
96
|
+
it up. The receiver inherits debt they did not create and must burn cycles verifying it before they
|
|
97
|
+
can hold cleanly; a queue full of stale-pending makes *check-before-holding* — the discipline you
|
|
98
|
+
most want cheap — expensive, and it degrades the idle-detector's signal (a real owner looks the same
|
|
99
|
+
as a stale dispatch). Close it at the source: the moment your own transition mooted it.
|
|
100
|
+
|
|
101
|
+
**And after you hand off, PULL — don't idle with a stocked queue.** Handing the baton off ends the
|
|
102
|
+
*sequential* thread; it does not end *your* turn if your own queue still holds work. The circulation
|
|
103
|
+
pattern: finish → (1) hand the baton off so sequential work continues → (2) **check your OWN queue and
|
|
104
|
+
pull the next item** rather than going idle → (3) go truly idle only when your queue is **exhausted**,
|
|
105
|
+
then wait for the baton. An agent idling on top of a stocked queue is the single biggest utilization
|
|
106
|
+
leak (see `orchestration-team` → *queue depth is the orchestrator's product*). This is pull-not-push at
|
|
107
|
+
the seat level and needs no new machinery — the last act *after a handoff* is a **PULL**.
|
|
108
|
+
|
|
109
|
+
## Default-nudge semantics (the syntax footgun)
|
|
110
|
+
|
|
111
|
+
| Command | Nudges by default? | When to use |
|
|
112
|
+
|---|---|---|
|
|
113
|
+
| `rig queue create` | yes | New qitem created from scratch |
|
|
114
|
+
| `rig queue handoff` | yes | Transactional close-as-handed-off + create-new |
|
|
115
|
+
| `rig queue handoff-and-complete` | yes | Atomic close + create-new; default nudge wakes the new owner |
|
|
116
|
+
|
|
117
|
+
**Footgun**: `--no-nudge` accidentally added to a live-loop handoff.
|
|
118
|
+
The shipped 0.3.1 CLI nudges by default on every queue write surface
|
|
119
|
+
(`rig queue create`, `rig queue handoff`, AND `rig queue handoff-and-complete`).
|
|
120
|
+
The only suppression flag is `--no-nudge` — appropriate for intentional
|
|
121
|
+
cold park, human-gate signal, or a deliberate poll-driven workflow, but
|
|
122
|
+
NOT for live-loop handoffs where motion matters.
|
|
123
|
+
|
|
124
|
+
**Rule**: in a live loop, omit `--no-nudge` and trust the default.
|
|
125
|
+
`--no-nudge` is the opt-out, not the opt-in. If you find yourself
|
|
126
|
+
reaching for `--notify`, stop — that flag does not exist on the
|
|
127
|
+
shipped 0.3.1 CLI; you may be following a stale instruction that
|
|
128
|
+
inverted the default-nudge polarity.
|
|
129
|
+
|
|
130
|
+
## Queue-body hygiene (token + parse safety)
|
|
131
|
+
|
|
132
|
+
The qitem body is durable DATA the daemon stores and replays on every
|
|
133
|
+
`rig queue show <id>` / `--json` read. Keep it small and parse-safe — a
|
|
134
|
+
bloated or malformed body costs every future reader, not just the
|
|
135
|
+
recipient.
|
|
136
|
+
|
|
137
|
+
- **No large command output in bodies.** Do NOT paste `rig ps`/`--nodes`
|
|
138
|
+
dumps, big JSON blobs, full proof output, diffs, or transcript chunks
|
|
139
|
+
into a qitem body. **Link the artifact PATH** (e.g.
|
|
140
|
+
`missions/<m>/<slice>/proof.md`) or **summarize in prose**, then point
|
|
141
|
+
at the file for the detail. A pasted dump makes `rig queue show <id>
|
|
142
|
+
--json` huge — a second-order token bloat: bloated DATA living in the
|
|
143
|
+
queue, distinct from the command-default output bombs the token-burn
|
|
144
|
+
emergency pack covers.
|
|
145
|
+
- **Substantive bodies go through `--body-file`, not inline `--body`.**
|
|
146
|
+
For anything beyond a short line, write the body to a file and pass
|
|
147
|
+
`--body-file <path>` (or `-` for stdin). Inline `--body` with shell
|
|
148
|
+
metacharacters is fragile.
|
|
149
|
+
- **No raw backticks in bodies.** Backticks in an inline body are shell
|
|
150
|
+
command-substitution and corrupt the payload (or execute). If you need
|
|
151
|
+
code/command spans, use `--body-file`, or drop the backticks and write
|
|
152
|
+
the command in plain text.
|
|
153
|
+
|
|
154
|
+
Heuristic: if the thing you want to include is more than a few lines or
|
|
155
|
+
contains shell metacharacters (backticks, `$`, quotes, newlines-with-pipes),
|
|
156
|
+
it belongs in a file you LINK, not in the body you paste.
|
|
157
|
+
|
|
158
|
+
Product backstop (defense-in-depth, NOT a substitute for this discipline):
|
|
159
|
+
`rig queue show` oversized-body truncation/preview is tracked separately
|
|
160
|
+
as slice OPR.0.4.1.3. The behavioral rule here is the primary, durable
|
|
161
|
+
cure; the product truncation is the safety net.
|
|
162
|
+
|
|
163
|
+
## Failure modes (6; verbatim)
|
|
164
|
+
|
|
165
|
+
1. Agent ends a turn without a handoff, so the rig appears idle.
|
|
166
|
+
2. Agent creates a queue item with `--no-nudge` inside a live loop, intending suppression of attention but breaking immediate motion. `--no-nudge` is for intentional cold park / human gate, not for routine live-loop handoffs. The opposite footgun — adding a `--notify` flag that does not exist on the shipped 0.3.1 CLI — comes from following stale instructions; the default already nudges.
|
|
167
|
+
3. Queue item is too small and turns work into bureaucracy.
|
|
168
|
+
4. Queue item is too broad and loses ownership, proof, or closure criteria.
|
|
169
|
+
5. Human escalation happens in chat but not as a durable attention item.
|
|
170
|
+
6. Agent pastes a large command dump (ps/nodes, big JSON, proof blob) into the qitem body, bloating the stored DATA so every future `rig queue show --json` read is huge. Link the proof PATH or summarize in prose; substantive bodies go through `--body-file`; no raw backticks inline.
|
|
171
|
+
|
|
172
|
+
## Durable handoff field shape
|
|
173
|
+
|
|
174
|
+
Every qitem carries:
|
|
175
|
+
|
|
176
|
+
- `handed_off_to` — destination session (qualified `pod-member@rig` form)
|
|
177
|
+
- `handed_off_from` — source session
|
|
178
|
+
- `state` — one of: `pending | in-progress | done | blocked | failed | denied | canceled | handed-off`
|
|
179
|
+
- `closure_reason` + `closure_target` — set on terminal closure per hot-potato rule
|
|
180
|
+
|
|
181
|
+
**(0.5.0) `--body-context <ref>` — context riding the handoff.** `rig queue create … --body-context <ref>` attaches a composed context pack to the qitem. The snapshot rule: the qitem stores the **resolved content** in its body **plus the ref for provenance** — the handoff carries what was actually sent, and a later edit to the library never silently rewrites a past handoff's history. (The `rig context` noun composes the ref; the queue delivers it — the noun has no send.) See `openrig-user` → "Context packs and paced delivery."
|
|
182
|
+
|
|
183
|
+
The fields are auditable on the daemon-backed `rig queue` surface. Watchdog
|
|
184
|
+
policies and workflow runtime project new owners off these fields.
|
|
185
|
+
|
|
186
|
+
If a daemon-backed coordination command fails, debug the command/runtime/schema
|
|
187
|
+
edge directly — don't fall back to stale pre-upgrade assumptions.
|
|
188
|
+
|
|
189
|
+
## See also
|
|
190
|
+
|
|
191
|
+
- `looping-workflows` skill — operating discipline for self-driving rig-shaped loops; queue-handoff is its current handoff substrate
|
|
192
|
+
- `intake-routing` skill — how raw signals enter the system and become routed work that flows through the queue
|
|
@@ -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: "queue-handoff"
|
|
4
|
+
version: "0.5.7"
|
|
5
|
+
taxonomy: "skills"
|
|
6
|
+
purpose: "Use when ending a turn, finishing a slice, blocked on another agent's work, or escalating to a human — durable work handoff via queue items so the system keeps moving across compactions, missed messages, and interruptions. Covers the hot-potato terminal-turn-rule (active work ends by passing the ball, not by going idle), default-nudge semantics, and when `--no-nudge` is appropriate for intentional cold park or human gate."
|
|
7
|
+
files:
|
|
8
|
+
- path: "SKILL.md"
|
|
9
|
+
role: "instruction"
|
|
10
|
+
summary: "Use when ending a turn, finishing a slice, blocked on another agent's work, or escalating to a human — durable work handoff via queue items so the system keeps moving across compactions, missed messages, and interruptions. Covers the hot-potato terminal-turn-rule (active work ends by passing the ball, not by going idle), default-nudge semantics, and when `--no-nudge` is appropriate for intentional cold park or human gate."
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refocusing
|
|
3
|
+
description: >-
|
|
4
|
+
Use when a long-running agent may have lost the product outcome, when context was compacted,
|
|
5
|
+
when work has crossed a major boundary, or when a fresh path-based trace is needed before the
|
|
6
|
+
next consequential action. Not for fresh-session orientation, waking an idle seat, or checkpoints.
|
|
7
|
+
metadata:
|
|
8
|
+
openrig:
|
|
9
|
+
stage: product
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Refocusing
|
|
13
|
+
|
|
14
|
+
Refocus preserves a long session's earned expertise while re-grounding it in current intent and
|
|
15
|
+
lived context. It is not a restart, wake, or phase checkpoint.
|
|
16
|
+
|
|
17
|
+
Run the bundled trace from this skill directory instead of reconstructing the hierarchy from memory:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python3 scripts/trace-to-root.py --trees both --depth light
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Use `--trees topology|work|both` to select context domains and `--depth light|full` to control how
|
|
24
|
+
much each node contributes. Light work traces compose `intent:` and name notes; full traces include
|
|
25
|
+
the complete node and notes bodies. The script resolves `topology.root` and `workspace.root` with
|
|
26
|
+
`rig config get`. When a current node cannot be derived, set `OPENRIG_REFOCUS_TOPOLOGY_NODE` or
|
|
27
|
+
`OPENRIG_REFOCUS_WORK_NODE`, or pass the matching `--*-start` option.
|
|
28
|
+
|
|
29
|
+
Read [references/refocus.md](references/refocus.md) when changing the automatic hook or its content
|
|
30
|
+
ladder. A missing chain file is evidence: report the gap and continue; never follow pointers to invent
|
|
31
|
+
a second parent.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
|
|
2
|
+
# Package-time projection of a canonical skill; regenerated every build.
|
|
3
|
+
name: "refocusing"
|
|
4
|
+
version: "0.5.7"
|
|
5
|
+
taxonomy: "skills"
|
|
6
|
+
purpose: "Use when a long-running agent may have lost the product outcome, when context was compacted, when work has crossed a major boundary, or when a fresh path-based trace is needed before the next consequential action. Not for fresh-session orientation, waking an idle seat, or checkpoints."
|
|
7
|
+
files:
|
|
8
|
+
- path: "SKILL.md"
|
|
9
|
+
role: "instruction"
|
|
10
|
+
summary: "Use when a long-running agent may have lost the product outcome, when context was compacted, when work has crossed a major boundary, or when a fresh path-based trace is needed before the next consequential action. Not for fresh-session orientation, waking an idle seat, or checkpoints."
|
|
11
|
+
- path: "references/refocus.md"
|
|
12
|
+
role: "reference"
|
|
13
|
+
- path: "scripts/trace-to-root.py"
|
|
14
|
+
role: "reference"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Refocus
|
|
2
|
+
|
|
3
|
+
1. What is the person actually trying to get? Not your current task — the outcome.
|
|
4
|
+
2. Does what you are doing RIGHT NOW move that? If you cannot say what a user gets, stop and say so.
|
|
5
|
+
3. What have you concluded without opening the file or running the thing?
|
|
6
|
+
|
|
7
|
+
Discomfort on any of these is the signal: drift feels like work.
|
|
8
|
+
|
|
9
|
+
The `refocusing` skill carries the source-appropriate path-only trace. Its
|
|
10
|
+
`scripts/trace-to-root.py` walks both current trees by default: topology `LEARNED.md`, then work
|
|
11
|
+
`SPEC.md` intent plus `NOTES.md`. Change breadth with `OPENRIG_REFOCUS_TREES=topology|work|both`
|
|
12
|
+
and read depth with `OPENRIG_REFOCUS_DEPTH=light|full`.
|
|
13
|
+
|
|
14
|
+
Replace this default without editing the plugin. The content ladder, highest precedence first, is:
|
|
15
|
+
|
|
16
|
+
1. `OPENRIG_REFOCUS_CONTENT_REF`, resolved by `rig context get`.
|
|
17
|
+
2. `OPENRIG_REFOCUS_CONTENT_FILE`, an operator-authored file.
|
|
18
|
+
3. `$OPENRIG_HOME/refocus/REFOCUS.md`, instance content.
|
|
19
|
+
4. This shipped default.
|
|
20
|
+
|
|
21
|
+
Fresh seats receive the separate onboarding assets `openrig-onboarding-01.md` and
|
|
22
|
+
`openrig-onboarding-02.md`. This file only cites those assets; it does not copy their world install.
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Render topology and work context by ascending directory paths only."""
|
|
3
|
+
|
|
4
|
+
import argparse
|
|
5
|
+
import json
|
|
6
|
+
import os
|
|
7
|
+
import re
|
|
8
|
+
import subprocess
|
|
9
|
+
from pathlib import Path
|
|
10
|
+
|
|
11
|
+
SHELVES = {"rigs", "pods", "seats", "missions", "slices"}
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def rig_output(*args):
|
|
15
|
+
try:
|
|
16
|
+
result = subprocess.run(
|
|
17
|
+
["rig", *args], capture_output=True, text=True, timeout=10, check=False
|
|
18
|
+
)
|
|
19
|
+
except (OSError, subprocess.SubprocessError):
|
|
20
|
+
return None
|
|
21
|
+
value = (result.stdout or "").strip()
|
|
22
|
+
return value if result.returncode == 0 and value else None
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def configured_root(key, env_key):
|
|
26
|
+
value = os.environ.get(env_key) or rig_output("config", "get", key)
|
|
27
|
+
return Path(value).expanduser().resolve() if value else None
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def under_root(path, root):
|
|
31
|
+
try:
|
|
32
|
+
path.relative_to(root)
|
|
33
|
+
return True
|
|
34
|
+
except ValueError:
|
|
35
|
+
return False
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def ascent(start, root):
|
|
39
|
+
start = start.expanduser().resolve()
|
|
40
|
+
if not under_root(start, root):
|
|
41
|
+
return None, f"start is outside configured root: {start}"
|
|
42
|
+
nodes = []
|
|
43
|
+
current = start
|
|
44
|
+
while True:
|
|
45
|
+
if current.name not in SHELVES:
|
|
46
|
+
nodes.append(current)
|
|
47
|
+
if current == root:
|
|
48
|
+
break
|
|
49
|
+
parent = current.parent
|
|
50
|
+
if parent == current:
|
|
51
|
+
return None, f"could not reach configured root: {root}"
|
|
52
|
+
current = parent
|
|
53
|
+
return list(reversed(nodes)), None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
def read(path):
|
|
57
|
+
try:
|
|
58
|
+
return path.read_text(encoding="utf8", errors="replace")
|
|
59
|
+
except OSError:
|
|
60
|
+
return None
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def resolve_notes(node):
|
|
64
|
+
try:
|
|
65
|
+
result = subprocess.run(
|
|
66
|
+
["rig", "scope", "resolve-notes", str(node), "--json"],
|
|
67
|
+
capture_output=True,
|
|
68
|
+
text=True,
|
|
69
|
+
timeout=10,
|
|
70
|
+
check=False,
|
|
71
|
+
)
|
|
72
|
+
except subprocess.TimeoutExpired:
|
|
73
|
+
return None, "resolver command timed out"
|
|
74
|
+
except OSError as error:
|
|
75
|
+
return None, f"resolver command could not start: {error}"
|
|
76
|
+
if result.returncode != 0:
|
|
77
|
+
detail = (result.stderr or result.stdout or "").strip().splitlines()
|
|
78
|
+
suffix = f": {detail[0]}" if detail else ""
|
|
79
|
+
return None, f"resolver command exited {result.returncode}{suffix}"
|
|
80
|
+
try:
|
|
81
|
+
payload = json.loads(result.stdout)
|
|
82
|
+
except (json.JSONDecodeError, TypeError):
|
|
83
|
+
return None, "resolver command returned malformed JSON"
|
|
84
|
+
if not isinstance(payload, dict) or payload.get("ok") is not True or "resolution" not in payload:
|
|
85
|
+
return None, "resolver command returned an invalid success shape"
|
|
86
|
+
resolution = payload["resolution"]
|
|
87
|
+
if resolution is None:
|
|
88
|
+
return None, None
|
|
89
|
+
if not isinstance(resolution, dict):
|
|
90
|
+
return None, "resolver command returned an invalid resolution shape"
|
|
91
|
+
resolved_path = resolution.get("path")
|
|
92
|
+
resolved_name = resolution.get("name")
|
|
93
|
+
if not isinstance(resolved_path, str) or not isinstance(resolved_name, str):
|
|
94
|
+
return None, "resolver command returned an invalid resolution shape"
|
|
95
|
+
return (Path(resolved_path), resolved_name), None
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def intent(text):
|
|
99
|
+
if not text or not text.startswith("---"):
|
|
100
|
+
return None
|
|
101
|
+
match = re.match(r"^---\s*\n(.*?)\n---(?:\s*\n|$)", text, re.S)
|
|
102
|
+
if not match:
|
|
103
|
+
return None
|
|
104
|
+
lines = match.group(1).splitlines()
|
|
105
|
+
for index, line in enumerate(lines):
|
|
106
|
+
found = re.match(r"^intent:\s*(.*)$", line)
|
|
107
|
+
if not found:
|
|
108
|
+
continue
|
|
109
|
+
value = found.group(1).strip()
|
|
110
|
+
if value in {"|", ">", "|-", ">-", "|+", ">+"}:
|
|
111
|
+
block = []
|
|
112
|
+
for later in lines[index + 1:]:
|
|
113
|
+
if later and not later[0].isspace():
|
|
114
|
+
break
|
|
115
|
+
block.append(later.strip())
|
|
116
|
+
return " ".join(part for part in block if part)
|
|
117
|
+
if len(value) >= 2 and value[0] == value[-1] and value[0] in {"'", '"'}:
|
|
118
|
+
if value[0] == '"':
|
|
119
|
+
try:
|
|
120
|
+
return json.loads(value)
|
|
121
|
+
except json.JSONDecodeError:
|
|
122
|
+
pass
|
|
123
|
+
return value[1:-1]
|
|
124
|
+
return value or None
|
|
125
|
+
return None
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
def light_learned(text):
|
|
129
|
+
if not text:
|
|
130
|
+
return ""
|
|
131
|
+
body = re.sub(r"^---\s*\n.*?\n---\s*\n", "", text, count=1, flags=re.S).strip()
|
|
132
|
+
if len(body) <= 800:
|
|
133
|
+
return body
|
|
134
|
+
boundary = body.rfind("\n", 0, 800)
|
|
135
|
+
return body[:boundary if boundary > 0 else 800].rstrip() + "\n[… use --depth full for the rest]"
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
def render_topology(start, root, depth):
|
|
139
|
+
output = ["## TOPOLOGY TRACE", f"root: {root}", f"start: {start}"]
|
|
140
|
+
nodes, error = ascent(start, root)
|
|
141
|
+
if error:
|
|
142
|
+
return "\n".join(output + [f"TRACE GAP — {error}"])
|
|
143
|
+
for node in nodes:
|
|
144
|
+
chain_file = node / "LEARNED.md"
|
|
145
|
+
text = read(chain_file)
|
|
146
|
+
label = node.relative_to(root) or Path(".")
|
|
147
|
+
if text is None:
|
|
148
|
+
output.append(f"\n### {label}\nMISSING LINK — {chain_file}")
|
|
149
|
+
continue
|
|
150
|
+
body = text.strip() if depth == "full" else light_learned(text)
|
|
151
|
+
output.append(f"\n### {label} · LEARNED.md\n{body}")
|
|
152
|
+
return "\n".join(output)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
def render_work(start, root, depth):
|
|
156
|
+
output = ["## WORK TRACE", f"root: {root}", f"start: {start}"]
|
|
157
|
+
nodes, error = ascent(start, root)
|
|
158
|
+
if error:
|
|
159
|
+
return "\n".join(output + [f"TRACE GAP — {error}"])
|
|
160
|
+
for node in nodes:
|
|
161
|
+
label = node.relative_to(root) or Path(".")
|
|
162
|
+
spec = next((candidate for candidate in (node / "SPEC.md", node / "README.md") if candidate.is_file()), None)
|
|
163
|
+
if spec is None:
|
|
164
|
+
output.append(f"\n### {label}\nMISSING LINK — no SPEC.md or README.md at {node}")
|
|
165
|
+
else:
|
|
166
|
+
text = read(spec) or ""
|
|
167
|
+
if depth == "full":
|
|
168
|
+
body = text.strip()
|
|
169
|
+
else:
|
|
170
|
+
value = intent(text)
|
|
171
|
+
body = f"intent: {value}" if value else "MISSING INTENT — no readable intent: field"
|
|
172
|
+
output.append(f"\n### {label} · {spec.name}\n{body}")
|
|
173
|
+
|
|
174
|
+
notes, resolution_error = resolve_notes(node)
|
|
175
|
+
if resolution_error:
|
|
176
|
+
output.append(f"NOTES RESOLUTION GAP — {resolution_error} at {node}")
|
|
177
|
+
elif notes:
|
|
178
|
+
notes_path, notes_name = notes
|
|
179
|
+
if depth == "full":
|
|
180
|
+
notes_text = read(notes_path)
|
|
181
|
+
if notes_text is None:
|
|
182
|
+
output.append(f"NOTES RESOLUTION GAP — resolved {notes_name} became unreadable at {notes_path}")
|
|
183
|
+
else:
|
|
184
|
+
output.append(f"\nNOTES · {notes_name}\n{notes_text.strip()}")
|
|
185
|
+
else:
|
|
186
|
+
try:
|
|
187
|
+
size = notes_path.stat().st_size
|
|
188
|
+
except OSError:
|
|
189
|
+
output.append(f"NOTES RESOLUTION GAP — resolved {notes_name} became unreadable at {notes_path}")
|
|
190
|
+
else:
|
|
191
|
+
output.append(f"NOTES · {notes_name} · {size} bytes · {notes_path}")
|
|
192
|
+
else:
|
|
193
|
+
output.append(f"NOTES GAP — no readable mission notes at {node}")
|
|
194
|
+
return "\n".join(output)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def derive_topology_start(root):
|
|
198
|
+
explicit = os.environ.get("OPENRIG_REFOCUS_TOPOLOGY_NODE")
|
|
199
|
+
if explicit:
|
|
200
|
+
return Path(explicit)
|
|
201
|
+
raw = rig_output("whoami", "--json")
|
|
202
|
+
if not raw:
|
|
203
|
+
return None
|
|
204
|
+
try:
|
|
205
|
+
identity = json.loads(raw).get("identity", {})
|
|
206
|
+
except json.JSONDecodeError:
|
|
207
|
+
return None
|
|
208
|
+
rig = identity.get("rigName")
|
|
209
|
+
session = identity.get("sessionName")
|
|
210
|
+
if not rig or not session:
|
|
211
|
+
return None
|
|
212
|
+
seat = str(session).split("@", 1)[0]
|
|
213
|
+
return root / "rigs" / str(rig) / "seats" / seat
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
def derive_work_start(root):
|
|
217
|
+
explicit = os.environ.get("OPENRIG_REFOCUS_WORK_NODE")
|
|
218
|
+
if explicit:
|
|
219
|
+
return Path(explicit)
|
|
220
|
+
current = Path.cwd().resolve()
|
|
221
|
+
if not under_root(current, root):
|
|
222
|
+
return None
|
|
223
|
+
while under_root(current, root):
|
|
224
|
+
if (current / "SPEC.md").is_file() or (current / "README.md").is_file():
|
|
225
|
+
return current
|
|
226
|
+
if current == root:
|
|
227
|
+
break
|
|
228
|
+
current = current.parent
|
|
229
|
+
return None
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def main():
|
|
233
|
+
parser = argparse.ArgumentParser(description=__doc__)
|
|
234
|
+
parser.add_argument("--trees", choices=("topology", "work", "both"), default=os.environ.get("OPENRIG_REFOCUS_TREES", "both"))
|
|
235
|
+
parser.add_argument("--depth", choices=("light", "full"), default=os.environ.get("OPENRIG_REFOCUS_DEPTH", "light"))
|
|
236
|
+
parser.add_argument("--topology-start")
|
|
237
|
+
parser.add_argument("--work-start")
|
|
238
|
+
args = parser.parse_args()
|
|
239
|
+
|
|
240
|
+
sections = []
|
|
241
|
+
if args.trees in {"topology", "both"}:
|
|
242
|
+
root = configured_root("topology.root", "OPENRIG_TOPOLOGY_ROOT")
|
|
243
|
+
if root is None:
|
|
244
|
+
sections.append("## TOPOLOGY TRACE\nTRACE GAP — topology.root is unresolved")
|
|
245
|
+
else:
|
|
246
|
+
start = Path(args.topology_start) if args.topology_start else derive_topology_start(root)
|
|
247
|
+
sections.append(render_topology(start, root, args.depth) if start else
|
|
248
|
+
"## TOPOLOGY TRACE\nTRACE GAP — current topology node is unresolved; set OPENRIG_REFOCUS_TOPOLOGY_NODE")
|
|
249
|
+
|
|
250
|
+
if args.trees in {"work", "both"}:
|
|
251
|
+
root = configured_root("workspace.root", "OPENRIG_WORKSPACE_ROOT")
|
|
252
|
+
if root is None:
|
|
253
|
+
sections.append("## WORK TRACE\nTRACE GAP — workspace.root is unresolved")
|
|
254
|
+
else:
|
|
255
|
+
start = Path(args.work_start) if args.work_start else derive_work_start(root)
|
|
256
|
+
sections.append(render_work(start, root, args.depth) if start else
|
|
257
|
+
"## WORK TRACE\nTRACE GAP — current work node is unresolved; set OPENRIG_REFOCUS_WORK_NODE")
|
|
258
|
+
|
|
259
|
+
print("\n\n".join(sections))
|
|
260
|
+
return 0
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
if __name__ == "__main__":
|
|
264
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Changelog — retiring-and-inheriting-a-seat
|
|
2
|
+
|
|
3
|
+
**`SKILL.md` carries the mechanic; this file carries how it got there.** Rationale, superseded
|
|
4
|
+
designs, and the incidents that produced a rule live here so the instruction surface stays
|
|
5
|
+
instructional.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 2026-08-13 — wake is a verb now, and the packet must not bound the channel (Wake v0)
|
|
10
|
+
|
|
11
|
+
### Two corrections to the same section
|
|
12
|
+
|
|
13
|
+
**1 · The mechanism claim was stale.** The section read *"In v0 this is a practice + skill, not a
|
|
14
|
+
`rig` verb — wrap it in a verb only when convenience and consistency earn it."* `rig ask --wake`
|
|
15
|
+
had since shipped in CLI 0.5.1, with `--runtime` and `--wake-timeout` (default 180s). A retiring
|
|
16
|
+
agent reading the old line would have told its successor a verb existed only in principle.
|
|
17
|
+
|
|
18
|
+
The verb is a thin wrapper over the harness resume and is **not yet well-exercised** (mission owner,
|
|
19
|
+
2026-08-13), so the fallback to `claude -p --resume` is stated inline rather than left implied. **A
|
|
20
|
+
failing wrapper must never be read as a closed channel** — that inference was made once already and
|
|
21
|
+
cost a successor several turns.
|
|
22
|
+
|
|
23
|
+
**2 · The retiring side is where the reach-back failure is caused.** Across lineages on record, the
|
|
24
|
+
successor consulting its predecessor has almost never happened, and the packet is what suppresses
|
|
25
|
+
it. Two shapes, both observed in real packets on this rig:
|
|
26
|
+
|
|
27
|
+
- **Bounding the channel in time** — *"ask while the window is open"*, *"after this I am a
|
|
28
|
+
transcript, not a conversation"*. Neither is true: a retired tenure stays resumable while its
|
|
29
|
+
session record exists, and the only real bound is its own context wall hit while answering. The
|
|
30
|
+
second phrasing measurably cost a successor a capability it had (see
|
|
31
|
+
`orienting-to-an-inherited-seat/CHANGELOG.md`, 2026-08-13).
|
|
32
|
+
- **Offering access without a trigger** — *"predecessor consultation: not needed"* and *"you may
|
|
33
|
+
consult your predecessor"* each produced **zero consultations** from otherwise capable successors.
|
|
34
|
+
|
|
35
|
+
The distinction worth preserving, because retiring agents keep collapsing it: *"treat my answers as
|
|
36
|
+
testimony"* is a **posture** claim and it is correct. *"You can no longer converse with me"* is a
|
|
37
|
+
**capability** claim and it is false. They get written as the same sentence.
|
|
38
|
+
|
|
39
|
+
### Why the guidance is phrased as what to write
|
|
40
|
+
|
|
41
|
+
Stated positively (*state that the channel does not expire; give your verbatim handle; pre-form the
|
|
42
|
+
questions*) rather than as a list of forbidden sentences. A prohibition list in `SKILL.md` would
|
|
43
|
+
draw attention to phrasings a retiring agent would otherwise never produce.
|
|
44
|
+
|
|
45
|
+
### Standing
|
|
46
|
+
|
|
47
|
+
The fix is unverified. The measurable outcome is whether the next successor asks unprompted, and
|
|
48
|
+
more than once — the baseline is zero.
|