@openrig/cli 0.3.0 → 0.3.2
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/.claude-plugin/plugin.json +15 -0
- package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +24 -0
- package/daemon/assets/plugins/openrig-core/LICENSE +200 -0
- package/daemon/assets/plugins/openrig-core/README.md +42 -0
- package/daemon/assets/plugins/openrig-core/hooks/claude.json +78 -0
- package/daemon/assets/plugins/openrig-core/hooks/codex.json +37 -0
- package/daemon/assets/{openrig-activity-hook-relay.cjs → plugins/openrig-core/hooks/scripts/activity-relay.cjs} +12 -0
- package/daemon/assets/plugins/openrig-core/hooks/scripts/compaction-restore-bridge.cjs +172 -0
- package/daemon/assets/plugins/openrig-core/skills/agent-startup-and-context-ingestion/SKILL.md +104 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +131 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +174 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +433 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/compact-instruction.md +1 -0
- package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/templates/post-compact-restore-instruction.md +1 -0
- package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +305 -0
- package/daemon/{specs/agents/shared/skills/rig-architect → assets/plugins/openrig-core/skills/openrig-architect}/SKILL.md +38 -19
- package/daemon/assets/plugins/openrig-core/skills/openrig-operator/SKILL.md +222 -0
- package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +597 -0
- package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +122 -0
- package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +137 -0
- package/daemon/assets/vm-preview-fixtures/README.md +48 -0
- package/daemon/assets/vm-preview-fixtures/workflows/sample-basic-loop.yaml +79 -0
- package/daemon/dist/adapters/claude-code-adapter.d.ts +1 -3
- package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/claude-code-adapter.js +17 -57
- package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
- package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux-transport.js +81 -2
- package/daemon/dist/adapters/cmux-transport.js.map +1 -1
- package/daemon/dist/adapters/cmux.d.ts +4 -0
- package/daemon/dist/adapters/cmux.d.ts.map +1 -1
- package/daemon/dist/adapters/cmux.js +87 -0
- package/daemon/dist/adapters/cmux.js.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts +14 -3
- package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
- package/daemon/dist/adapters/codex-runtime-adapter.js +45 -58
- package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
- package/daemon/dist/adapters/tmux.d.ts +36 -0
- package/daemon/dist/adapters/tmux.d.ts.map +1 -1
- package/daemon/dist/adapters/tmux.js +66 -0
- package/daemon/dist/adapters/tmux.js.map +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts +5 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.d.ts.map +1 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.js +5 -1
- package/daemon/dist/db/migrations/037_mission_control_actions.js.map +1 -1
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts +32 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.d.ts.map +1 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js +37 -0
- package/daemon/dist/db/migrations/040_workflow_specs_diagnostic.js.map +1 -0
- package/daemon/dist/db/migrations/041_rig_policy.d.ts +32 -0
- package/daemon/dist/db/migrations/041_rig_policy.d.ts.map +1 -0
- package/daemon/dist/db/migrations/041_rig_policy.js +47 -0
- package/daemon/dist/db/migrations/041_rig_policy.js.map +1 -0
- package/daemon/dist/domain/agent-images/resume-token-discovery.js +1 -1
- package/daemon/dist/domain/agent-images/resume-token-discovery.js.map +1 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.d.ts.map +1 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.js +2 -1
- package/daemon/dist/domain/agent-images/snapshot-capturer.js.map +1 -1
- package/daemon/dist/domain/agent-manifest.d.ts.map +1 -1
- package/daemon/dist/domain/agent-manifest.js +143 -37
- package/daemon/dist/domain/agent-manifest.js.map +1 -1
- package/daemon/dist/domain/agent-resolver.js +1 -1
- package/daemon/dist/domain/agent-resolver.js.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.d.ts.map +1 -1
- package/daemon/dist/domain/bootstrap-orchestrator.js +86 -6
- package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
- package/daemon/dist/domain/bundle-agent-images-router.d.ts +95 -0
- package/daemon/dist/domain/bundle-agent-images-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-agent-images-router.js +140 -0
- package/daemon/dist/domain/bundle-agent-images-router.js.map +1 -0
- package/daemon/dist/domain/bundle-assembler.d.ts +18 -1
- package/daemon/dist/domain/bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-assembler.js +11 -1
- package/daemon/dist/domain/bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/bundle-audit.d.ts +89 -0
- package/daemon/dist/domain/bundle-audit.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-audit.js +87 -0
- package/daemon/dist/domain/bundle-audit.js.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.d.ts +57 -0
- package/daemon/dist/domain/bundle-conflict-detector.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-conflict-detector.js +49 -0
- package/daemon/dist/domain/bundle-conflict-detector.js.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts +100 -0
- package/daemon/dist/domain/bundle-context-packs-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-context-packs-router.js +158 -0
- package/daemon/dist/domain/bundle-context-packs-router.js.map +1 -0
- package/daemon/dist/domain/bundle-plugins-router.d.ts +69 -0
- package/daemon/dist/domain/bundle-plugins-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-plugins-router.js +87 -0
- package/daemon/dist/domain/bundle-plugins-router.js.map +1 -0
- package/daemon/dist/domain/bundle-skills-router.d.ts +62 -0
- package/daemon/dist/domain/bundle-skills-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-skills-router.js +90 -0
- package/daemon/dist/domain/bundle-skills-router.js.map +1 -0
- package/daemon/dist/domain/bundle-types.d.ts +106 -0
- package/daemon/dist/domain/bundle-types.d.ts.map +1 -1
- package/daemon/dist/domain/bundle-types.js +375 -0
- package/daemon/dist/domain/bundle-types.js.map +1 -1
- package/daemon/dist/domain/bundle-workflow-specs-router.d.ts +94 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.d.ts.map +1 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.js +144 -0
- package/daemon/dist/domain/bundle-workflow-specs-router.js.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts +81 -0
- package/daemon/dist/domain/claude-compaction-enforcer.d.ts.map +1 -0
- package/daemon/dist/domain/claude-compaction-enforcer.js +242 -0
- package/daemon/dist/domain/claude-compaction-enforcer.js.map +1 -0
- package/daemon/dist/domain/cmux-layout-service.d.ts +41 -0
- package/daemon/dist/domain/cmux-layout-service.d.ts.map +1 -0
- package/daemon/dist/domain/cmux-layout-service.js +184 -0
- package/daemon/dist/domain/cmux-layout-service.js.map +1 -0
- package/daemon/dist/domain/context-monitor.d.ts +19 -1
- package/daemon/dist/domain/context-monitor.d.ts.map +1 -1
- package/daemon/dist/domain/context-monitor.js +62 -14
- package/daemon/dist/domain/context-monitor.js.map +1 -1
- package/daemon/dist/domain/graph-projection.d.ts +6 -0
- package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
- package/daemon/dist/domain/graph-projection.js +6 -0
- package/daemon/dist/domain/graph-projection.js.map +1 -1
- package/daemon/dist/domain/kernel-boot-tracker.d.ts +74 -0
- package/daemon/dist/domain/kernel-boot-tracker.d.ts.map +1 -0
- package/daemon/dist/domain/kernel-boot-tracker.js +213 -0
- package/daemon/dist/domain/kernel-boot-tracker.js.map +1 -0
- package/daemon/dist/domain/kernel-boot.d.ts +50 -0
- package/daemon/dist/domain/kernel-boot.d.ts.map +1 -0
- package/daemon/dist/domain/kernel-boot.js +147 -0
- package/daemon/dist/domain/kernel-boot.js.map +1 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts +5 -0
- package/daemon/dist/domain/mission-control/mission-control-read-layer.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-read-layer.js +16 -2
- package/daemon/dist/domain/mission-control/mission-control-read-layer.js.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.d.ts.map +1 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js +3 -1
- package/daemon/dist/domain/mission-control/mission-control-write-contract.js.map +1 -1
- package/daemon/dist/domain/native-resume-probe.js +7 -7
- package/daemon/dist/domain/native-resume-probe.js.map +1 -1
- package/daemon/dist/domain/node-inventory.d.ts +18 -0
- package/daemon/dist/domain/node-inventory.d.ts.map +1 -1
- package/daemon/dist/domain/node-inventory.js +98 -0
- package/daemon/dist/domain/node-inventory.js.map +1 -1
- package/daemon/dist/domain/node-launcher.d.ts +12 -0
- package/daemon/dist/domain/node-launcher.d.ts.map +1 -1
- package/daemon/dist/domain/node-launcher.js +25 -1
- package/daemon/dist/domain/node-launcher.js.map +1 -1
- package/daemon/dist/domain/plugin-discovery-service.d.ts +150 -0
- package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -0
- package/daemon/dist/domain/plugin-discovery-service.js +468 -0
- package/daemon/dist/domain/plugin-discovery-service.js.map +1 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts +54 -0
- package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -0
- package/daemon/dist/domain/plugin-vendor-service.js +111 -0
- package/daemon/dist/domain/plugin-vendor-service.js.map +1 -0
- package/daemon/dist/domain/pod-bundle-assembler.d.ts +16 -1
- package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
- package/daemon/dist/domain/pod-bundle-assembler.js +11 -1
- package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
- package/daemon/dist/domain/profile-resolver.d.ts +13 -3
- package/daemon/dist/domain/profile-resolver.d.ts.map +1 -1
- package/daemon/dist/domain/profile-resolver.js +11 -7
- package/daemon/dist/domain/profile-resolver.js.map +1 -1
- package/daemon/dist/domain/projection-planner.d.ts +7 -1
- package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
- package/daemon/dist/domain/projection-planner.js +44 -4
- package/daemon/dist/domain/projection-planner.js.map +1 -1
- package/daemon/dist/domain/ps-projection.d.ts +22 -0
- package/daemon/dist/domain/ps-projection.d.ts.map +1 -1
- package/daemon/dist/domain/ps-projection.js +57 -0
- package/daemon/dist/domain/ps-projection.js.map +1 -1
- package/daemon/dist/domain/queue-repository.d.ts +44 -1
- package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
- package/daemon/dist/domain/queue-repository.js +112 -6
- package/daemon/dist/domain/queue-repository.js.map +1 -1
- package/daemon/dist/domain/restore-check-service.d.ts +4 -0
- package/daemon/dist/domain/restore-check-service.d.ts.map +1 -1
- package/daemon/dist/domain/restore-check-service.js +16 -7
- package/daemon/dist/domain/restore-check-service.js.map +1 -1
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts +48 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.js +96 -0
- package/daemon/dist/domain/rig-policy/rig-policy-defaults.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts +46 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.js +171 -0
- package/daemon/dist/domain/rig-policy/rig-policy-store.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts +145 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.js +52 -0
- package/daemon/dist/domain/rig-policy/rig-policy-types.js.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts +58 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.d.ts.map +1 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.js +211 -0
- package/daemon/dist/domain/rig-policy/rig-policy-validator.js.map +1 -0
- package/daemon/dist/domain/rigspec-instantiator.d.ts +1 -1
- package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
- package/daemon/dist/domain/rigspec-instantiator.js +109 -18
- package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
- package/daemon/dist/domain/seat-activity-service.d.ts +79 -0
- package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -0
- package/daemon/dist/domain/seat-activity-service.js +123 -0
- package/daemon/dist/domain/seat-activity-service.js.map +1 -0
- package/daemon/dist/domain/session-transport.d.ts.map +1 -1
- package/daemon/dist/domain/session-transport.js +33 -0
- package/daemon/dist/domain/session-transport.js.map +1 -1
- package/daemon/dist/domain/skill-library-discovery.d.ts +68 -0
- package/daemon/dist/domain/skill-library-discovery.d.ts.map +1 -0
- package/daemon/dist/domain/skill-library-discovery.js +144 -0
- package/daemon/dist/domain/skill-library-discovery.js.map +1 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts +31 -0
- package/daemon/dist/domain/slices/slice-indexer.d.ts.map +1 -1
- package/daemon/dist/domain/slices/slice-indexer.js +111 -6
- package/daemon/dist/domain/slices/slice-indexer.js.map +1 -1
- package/daemon/dist/domain/spec-library-service.d.ts +6 -0
- package/daemon/dist/domain/spec-library-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-service.js +19 -0
- package/daemon/dist/domain/spec-library-service.js.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts +43 -0
- package/daemon/dist/domain/spec-library-workflow-scanner.d.ts.map +1 -1
- package/daemon/dist/domain/spec-library-workflow-scanner.js +157 -3
- package/daemon/dist/domain/spec-library-workflow-scanner.js.map +1 -1
- package/daemon/dist/domain/spec-review-service.d.ts +1 -1
- package/daemon/dist/domain/spec-review-service.d.ts.map +1 -1
- package/daemon/dist/domain/spec-review-service.js +14 -1
- package/daemon/dist/domain/spec-review-service.js.map +1 -1
- package/daemon/dist/domain/types.d.ts +106 -10
- package/daemon/dist/domain/types.d.ts.map +1 -1
- package/daemon/dist/domain/types.js.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts +25 -1
- package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
- package/daemon/dist/domain/user-settings/settings-store.js +186 -4
- package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.d.ts +49 -0
- package/daemon/dist/domain/workflow-spec-cache.d.ts.map +1 -1
- package/daemon/dist/domain/workflow-spec-cache.js +96 -0
- package/daemon/dist/domain/workflow-spec-cache.js.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts +7 -0
- package/daemon/dist/domain/workspace/default-workspace-scaffold.d.ts.map +1 -1
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js +201 -3
- package/daemon/dist/domain/workspace/default-workspace-scaffold.js.map +1 -1
- package/daemon/dist/domain/workspace/getting-started-narrative.d.ts +15 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.js +237 -0
- package/daemon/dist/domain/workspace/getting-started-narrative.js.map +1 -0
- package/daemon/dist/domain/workspace/workspace-doctor.d.ts +197 -0
- package/daemon/dist/domain/workspace/workspace-doctor.d.ts.map +1 -0
- package/daemon/dist/domain/workspace/workspace-doctor.js +448 -0
- package/daemon/dist/domain/workspace/workspace-doctor.js.map +1 -0
- package/daemon/dist/index.d.ts +2 -1
- package/daemon/dist/index.d.ts.map +1 -1
- package/daemon/dist/index.js +63 -17
- package/daemon/dist/index.js.map +1 -1
- package/daemon/dist/lib/pane-envelope.d.ts +7 -0
- package/daemon/dist/lib/pane-envelope.d.ts.map +1 -0
- package/daemon/dist/lib/pane-envelope.js +38 -0
- package/daemon/dist/lib/pane-envelope.js.map +1 -0
- package/daemon/dist/middleware/auth-bearer-token.d.ts +47 -5
- package/daemon/dist/middleware/auth-bearer-token.d.ts.map +1 -1
- package/daemon/dist/middleware/auth-bearer-token.js +109 -8
- package/daemon/dist/middleware/auth-bearer-token.js.map +1 -1
- package/daemon/dist/routes/bundles.d.ts.map +1 -1
- package/daemon/dist/routes/bundles.js +966 -7
- package/daemon/dist/routes/bundles.js.map +1 -1
- package/daemon/dist/routes/config.d.ts.map +1 -1
- package/daemon/dist/routes/config.js +19 -2
- package/daemon/dist/routes/config.js.map +1 -1
- package/daemon/dist/routes/info.d.ts +3 -0
- package/daemon/dist/routes/info.d.ts.map +1 -0
- package/daemon/dist/routes/info.js +20 -0
- package/daemon/dist/routes/info.js.map +1 -0
- package/daemon/dist/routes/kernel-status.d.ts +3 -0
- package/daemon/dist/routes/kernel-status.d.ts.map +1 -0
- package/daemon/dist/routes/kernel-status.js +40 -0
- package/daemon/dist/routes/kernel-status.js.map +1 -0
- package/daemon/dist/routes/mission-control.d.ts.map +1 -1
- package/daemon/dist/routes/mission-control.js +25 -2
- package/daemon/dist/routes/mission-control.js.map +1 -1
- package/daemon/dist/routes/missions.d.ts +3 -0
- package/daemon/dist/routes/missions.d.ts.map +1 -0
- package/daemon/dist/routes/missions.js +195 -0
- package/daemon/dist/routes/missions.js.map +1 -0
- package/daemon/dist/routes/plugins.d.ts +3 -0
- package/daemon/dist/routes/plugins.d.ts.map +1 -0
- package/daemon/dist/routes/plugins.js +223 -0
- package/daemon/dist/routes/plugins.js.map +1 -0
- package/daemon/dist/routes/queue.d.ts +18 -0
- package/daemon/dist/routes/queue.d.ts.map +1 -1
- package/daemon/dist/routes/queue.js +97 -5
- package/daemon/dist/routes/queue.js.map +1 -1
- package/daemon/dist/routes/rig-cmux.d.ts +3 -0
- package/daemon/dist/routes/rig-cmux.d.ts.map +1 -0
- package/daemon/dist/routes/rig-cmux.js +121 -0
- package/daemon/dist/routes/rig-cmux.js.map +1 -0
- package/daemon/dist/routes/rig-policy.d.ts +9 -0
- package/daemon/dist/routes/rig-policy.d.ts.map +1 -0
- package/daemon/dist/routes/rig-policy.js +174 -0
- package/daemon/dist/routes/rig-policy.js.map +1 -0
- package/daemon/dist/routes/rigs.d.ts.map +1 -1
- package/daemon/dist/routes/rigs.js +10 -2
- package/daemon/dist/routes/rigs.js.map +1 -1
- package/daemon/dist/routes/sessions.d.ts.map +1 -1
- package/daemon/dist/routes/sessions.js +26 -3
- package/daemon/dist/routes/sessions.js.map +1 -1
- package/daemon/dist/routes/skills.d.ts +3 -0
- package/daemon/dist/routes/skills.d.ts.map +1 -0
- package/daemon/dist/routes/skills.js +147 -0
- package/daemon/dist/routes/skills.js.map +1 -0
- package/daemon/dist/routes/slices.d.ts.map +1 -1
- package/daemon/dist/routes/slices.js +15 -0
- package/daemon/dist/routes/slices.js.map +1 -1
- package/daemon/dist/routes/spec-library.d.ts.map +1 -1
- package/daemon/dist/routes/spec-library.js +16 -1
- package/daemon/dist/routes/spec-library.js.map +1 -1
- package/daemon/dist/routes/up.d.ts +25 -0
- package/daemon/dist/routes/up.d.ts.map +1 -1
- package/daemon/dist/routes/up.js +70 -3
- package/daemon/dist/routes/up.js.map +1 -1
- package/daemon/dist/routes/workspace.d.ts.map +1 -1
- package/daemon/dist/routes/workspace.js +80 -1
- package/daemon/dist/routes/workspace.js.map +1 -1
- package/daemon/dist/server.d.ts +41 -0
- package/daemon/dist/server.d.ts.map +1 -1
- package/daemon/dist/server.js +41 -0
- package/daemon/dist/server.js.map +1 -1
- package/daemon/dist/startup.d.ts.map +1 -1
- package/daemon/dist/startup.js +236 -6
- package/daemon/dist/startup.js.map +1 -1
- package/daemon/specs/agents/apps/vault-specialist/agent.yaml +0 -1
- package/daemon/specs/agents/conveyor/builder/agent.yaml +0 -1
- package/daemon/specs/agents/conveyor/lead/agent.yaml +0 -1
- package/daemon/specs/agents/conveyor/planner/agent.yaml +0 -1
- package/daemon/specs/agents/conveyor/reviewer/agent.yaml +0 -1
- package/daemon/specs/agents/design/product-designer/agent.yaml +0 -1
- package/daemon/specs/agents/development/implementer/agent.yaml +0 -1
- package/daemon/specs/agents/development/qa/agent.yaml +0 -1
- package/daemon/specs/agents/development/qa/guidance/role.md +0 -2
- package/daemon/specs/agents/orchestration/orchestrator/agent.yaml +0 -1
- package/daemon/specs/agents/orchestration/orchestrator/guidance/role.md +28 -4
- package/daemon/specs/agents/research/analyst/agent.yaml +0 -1
- package/daemon/specs/agents/research/synthesizer/agent.yaml +0 -1
- package/daemon/specs/agents/review/independent-reviewer/agent.yaml +0 -1
- package/daemon/specs/agents/shared/agent.yaml +6 -6
- package/daemon/specs/agents/shared/skills/core/openrig-architect/SKILL.md +361 -0
- package/daemon/specs/agents/shared/skills/core/openrig-installer/SKILL.md +142 -0
- package/daemon/specs/agents/shared/skills/core/openrig-user/SKILL.md +288 -6
- package/daemon/specs/agents/shared/skills/core/openrig-user-settings/SKILL.md +4 -4
- package/daemon/specs/agents/shared/skills/core/rig-lifecycle/SKILL.md +116 -0
- package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +0 -1
- package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +2 -2
- package/daemon/specs/agents/shared/skills/process/agent-browser/LOCAL-INSIGHTS.md +6 -6
- package/daemon/specs/agents/shared/skills/process/agent-browser/OPENRIG.md +40 -0
- package/daemon/specs/agents/shared/skills/process/agent-browser/SKILL.md +10 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/OPENRIG.md +48 -0
- package/daemon/specs/agents/shared/skills/process/brainstorming/SKILL.md +11 -0
- package/daemon/specs/agents/shared/skills/process/dogfood/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/executing-plans/OPENRIG.md +56 -0
- package/daemon/specs/agents/shared/skills/process/executing-plans/SKILL.md +10 -0
- package/daemon/specs/agents/shared/skills/process/frontend-design/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/systematic-debugging/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/using-superpowers/OPENRIG.md +48 -0
- package/daemon/specs/agents/shared/skills/process/using-superpowers/SKILL.md +11 -0
- package/daemon/specs/agents/shared/skills/process/verification-before-completion/SKILL.md +5 -0
- package/daemon/specs/agents/shared/skills/process/writing-plans/OPENRIG.md +52 -0
- package/daemon/specs/agents/shared/skills/process/writing-plans/SKILL.md +12 -2
- package/daemon/specs/rigs/launch/conveyor/rig.yaml +1 -1
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/agent.yaml +35 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/guidance/role.md +50 -0
- package/daemon/specs/rigs/launch/kernel/agents/advisor/lead/startup/context.md +37 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/agent.yaml +35 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/guidance/role.md +49 -0
- package/daemon/specs/rigs/launch/kernel/agents/operator/agent/startup/context.md +63 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/agent.yaml +35 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/guidance/role.md +33 -0
- package/daemon/specs/rigs/launch/kernel/agents/queue/worker/startup/context.md +30 -0
- package/daemon/specs/rigs/launch/kernel/culture/CULTURE.md +69 -0
- package/daemon/specs/rigs/launch/kernel/rig-claude-only.yaml +59 -0
- package/daemon/specs/rigs/launch/kernel/rig-codex-only.yaml +59 -0
- package/daemon/specs/rigs/launch/kernel/rig.yaml +69 -0
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +13 -1
- package/dist/client.js.map +1 -1
- package/dist/commands/bundle.d.ts.map +1 -1
- package/dist/commands/bundle.js +123 -2
- package/dist/commands/bundle.js.map +1 -1
- package/dist/commands/config-init-workspace.d.ts.map +1 -1
- package/dist/commands/config-init-workspace.js +293 -5
- package/dist/commands/config-init-workspace.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +11 -3
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/daemon.d.ts.map +1 -1
- package/dist/commands/daemon.js +53 -1
- package/dist/commands/daemon.js.map +1 -1
- package/dist/commands/heartbeat.d.ts.map +1 -1
- package/dist/commands/heartbeat.js +0 -5
- package/dist/commands/heartbeat.js.map +1 -1
- package/dist/commands/plugin.d.ts +4 -0
- package/dist/commands/plugin.d.ts.map +1 -0
- package/dist/commands/plugin.js +395 -0
- package/dist/commands/plugin.js.map +1 -0
- package/dist/commands/ps.d.ts.map +1 -1
- package/dist/commands/ps.js +51 -8
- package/dist/commands/ps.js.map +1 -1
- package/dist/commands/queue.d.ts +6 -0
- package/dist/commands/queue.d.ts.map +1 -1
- package/dist/commands/queue.js +103 -5
- package/dist/commands/queue.js.map +1 -1
- package/dist/commands/rig-policy.d.ts +48 -0
- package/dist/commands/rig-policy.d.ts.map +1 -0
- package/dist/commands/rig-policy.js +429 -0
- package/dist/commands/rig-policy.js.map +1 -0
- package/dist/commands/scope.d.ts +6 -0
- package/dist/commands/scope.d.ts.map +1 -0
- package/dist/commands/scope.js +659 -0
- package/dist/commands/scope.js.map +1 -0
- package/dist/commands/send.d.ts +8 -0
- package/dist/commands/send.d.ts.map +1 -1
- package/dist/commands/send.js +8 -0
- package/dist/commands/send.js.map +1 -1
- package/dist/commands/up.d.ts.map +1 -1
- package/dist/commands/up.js +60 -1
- package/dist/commands/up.js.map +1 -1
- package/dist/commands/workflow.d.ts +9 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +139 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/commands/workspace.d.ts +20 -0
- package/dist/commands/workspace.d.ts.map +1 -1
- package/dist/commands/workspace.js +138 -7
- package/dist/commands/workspace.js.map +1 -1
- package/dist/config-store.d.ts +18 -1
- package/dist/config-store.d.ts.map +1 -1
- package/dist/config-store.js +167 -4
- package/dist/config-store.js.map +1 -1
- package/dist/daemon-lifecycle.d.ts +45 -2
- package/dist/daemon-lifecycle.d.ts.map +1 -1
- package/dist/daemon-lifecycle.js +90 -9
- package/dist/daemon-lifecycle.js.map +1 -1
- package/dist/host-registry.d.ts +1 -1
- package/dist/host-registry.js +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/scope/dot-id.d.ts +43 -0
- package/dist/lib/scope/dot-id.d.ts.map +1 -0
- package/dist/lib/scope/dot-id.js +165 -0
- package/dist/lib/scope/dot-id.js.map +1 -0
- package/dist/lib/scope/scope-fs.d.ts +79 -0
- package/dist/lib/scope/scope-fs.d.ts.map +1 -0
- package/dist/lib/scope/scope-fs.js +468 -0
- package/dist/lib/scope/scope-fs.js.map +1 -0
- package/dist/lib/scope/templates.d.ts +38 -0
- package/dist/lib/scope/templates.d.ts.map +1 -0
- package/dist/lib/scope/templates.js +109 -0
- package/dist/lib/scope/templates.js.map +1 -0
- package/dist/lib/scope/types.d.ts +61 -0
- package/dist/lib/scope/types.d.ts.map +1 -0
- package/dist/lib/scope/types.js +38 -0
- package/dist/lib/scope/types.js.map +1 -0
- package/dist/lib/scope-templates/backlog-deprecation.md +26 -0
- package/dist/lib/scope-templates/backlog-tech-debt.md +22 -0
- package/dist/lib/scope-templates/bug-fix.md +30 -0
- package/dist/lib/scope-templates/mission-notes.md +97 -0
- package/dist/lib/scope-templates/mission-placeholder.md +20 -0
- package/dist/lib/scope-templates/mission-release.md +25 -0
- package/dist/lib/scope-templates/placeholder.md +30 -0
- package/dist/lib/scope-templates/release-feature.md +26 -0
- package/dist/lib/scope-templates/research.md +22 -0
- package/package.json +2 -2
- package/ui/dist/assets/index-C_Q5FczU.css +1 -0
- package/ui/dist/assets/index-GjTxfi9S.js +547 -0
- package/ui/dist/index.html +2 -2
- package/daemon/specs/agents/shared/skills/claude-compact-in-place/SKILL.md +0 -100
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/SKILL.md +0 -256
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/Dockerfile +0 -39
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/scripts/build-e2e-image.sh +0 -37
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/control-plane-test.yaml +0 -40
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/e2e-report-template.md +0 -94
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-collision-fragment.yaml +0 -13
- package/daemon/specs/agents/shared/skills/process/containerized-e2e/templates/expansion-pod-fragment.yaml +0 -14
- package/ui/dist/assets/index-BDHU1JUK.js +0 -412
- package/ui/dist/assets/index-DXTyJSqu.css +0 -1
|
@@ -0,0 +1,659 @@
|
|
|
1
|
+
// release-0.3.2 slice 12 — `rig scope` CLI primitive.
|
|
2
|
+
//
|
|
3
|
+
// Command grammar: rig scope <tier> <verb>. v0 ships `mission` +
|
|
4
|
+
// `slice` tiers; `project` and `sub-slice` are reserved per the
|
|
5
|
+
// substrate convention `conventions/scope-and-versioning/README.md`
|
|
6
|
+
// (stage: provisional). The CLI mints stable dot-IDs into created
|
|
7
|
+
// mission/slice frontmatter per §1 of that convention.
|
|
8
|
+
import fs from "node:fs";
|
|
9
|
+
import path from "node:path";
|
|
10
|
+
import { Command } from "commander";
|
|
11
|
+
import { CLOSE_REASONS, MISSION_TEMPLATE_KINDS, SLICE_TEMPLATE_KINDS, ScopeCliError, } from "../lib/scope/types.js";
|
|
12
|
+
import { DEFAULT_PROJECT_PREFIX, inferMissionDotId, isMissionDotId, nextEscapeBandOrdinal, sliceIdFromMission, } from "../lib/scope/dot-id.js";
|
|
13
|
+
import { ensureMissionIdPersisted, findMission, findSlice, listMissions, listSlices, moveSlice, nextSliceNN, pad2, resolveMissionsRoot, splitFrontmatter, todayDateISO, updateFrontmatter, } from "../lib/scope/scope-fs.js";
|
|
14
|
+
import { renderMissionNotesTemplate, renderMissionTemplate, renderSliceTemplate, titleFromSlug, } from "../lib/scope/templates.js";
|
|
15
|
+
function makeStdout() {
|
|
16
|
+
return { write: (text) => process.stdout.write(text) };
|
|
17
|
+
}
|
|
18
|
+
function emit(out, payload, json, lines) {
|
|
19
|
+
if (json) {
|
|
20
|
+
out.write(JSON.stringify(payload, null, 2) + "\n");
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
if (lines) {
|
|
24
|
+
for (const line of lines)
|
|
25
|
+
out.write(line + "\n");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
out.write(JSON.stringify(payload, null, 2) + "\n");
|
|
29
|
+
}
|
|
30
|
+
function fail(err, json, out) {
|
|
31
|
+
if (err instanceof ScopeCliError) {
|
|
32
|
+
if (json) {
|
|
33
|
+
out.write(JSON.stringify({
|
|
34
|
+
ok: false,
|
|
35
|
+
error: { fact: err.fact, consequence: err.consequence, action: err.action },
|
|
36
|
+
}, null, 2) + "\n");
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
process.stderr.write(`Error: ${err.fact}\n${err.consequence}\n${err.action}\n`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
44
|
+
process.stderr.write(`Error: ${message}\n`);
|
|
45
|
+
}
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
function slugify(raw) {
|
|
49
|
+
return raw
|
|
50
|
+
.toLowerCase()
|
|
51
|
+
.trim()
|
|
52
|
+
.replace(/[^a-z0-9]+/g, "-")
|
|
53
|
+
.replace(/^-+|-+$/g, "");
|
|
54
|
+
}
|
|
55
|
+
function getOpts(cmd) {
|
|
56
|
+
// commander v13 attaches opts on the parent.
|
|
57
|
+
let walker = cmd;
|
|
58
|
+
while (walker) {
|
|
59
|
+
const o = walker.opts();
|
|
60
|
+
if (o.workspace)
|
|
61
|
+
return o;
|
|
62
|
+
walker = walker.parent;
|
|
63
|
+
}
|
|
64
|
+
return {};
|
|
65
|
+
}
|
|
66
|
+
// ---------------------------------------------------------------------
|
|
67
|
+
// rig scope slice ls
|
|
68
|
+
// ---------------------------------------------------------------------
|
|
69
|
+
function buildSliceLsCommand() {
|
|
70
|
+
const cmd = new Command("ls")
|
|
71
|
+
.description("List slices in a mission (or across all missions)")
|
|
72
|
+
.option("--mission <name>", "Restrict to a single mission")
|
|
73
|
+
.option("--state <state>", "Filter: active | closed | shipped | all", "active")
|
|
74
|
+
.option("--json", "Machine-readable output")
|
|
75
|
+
.action(async (opts, command) => {
|
|
76
|
+
const out = makeStdout();
|
|
77
|
+
const json = Boolean(opts.json);
|
|
78
|
+
const state = opts.state ?? "active";
|
|
79
|
+
if (!["active", "closed", "shipped", "all"].includes(state)) {
|
|
80
|
+
fail(new ScopeCliError({
|
|
81
|
+
fact: `Unknown --state value "${state}".`,
|
|
82
|
+
consequence: "Command did not run.",
|
|
83
|
+
action: "Pick one of: active, closed, shipped, all.",
|
|
84
|
+
}), json, out);
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
88
|
+
const missions = opts.mission
|
|
89
|
+
? [findMission(missionsRoot, opts.mission)]
|
|
90
|
+
: listMissions(missionsRoot);
|
|
91
|
+
const rows = [];
|
|
92
|
+
const lines = [];
|
|
93
|
+
for (const mission of missions) {
|
|
94
|
+
const slices = listSlices(mission, state);
|
|
95
|
+
for (const slice of slices) {
|
|
96
|
+
rows.push({
|
|
97
|
+
mission: mission.name,
|
|
98
|
+
name: slice.name,
|
|
99
|
+
nn: slice.nn,
|
|
100
|
+
slug: slice.slug,
|
|
101
|
+
id: slice.id,
|
|
102
|
+
status: slice.status,
|
|
103
|
+
path: slice.absPath,
|
|
104
|
+
});
|
|
105
|
+
lines.push(`${mission.name}/${slice.name} ${slice.id ?? "—"} ${slice.status ?? "—"}`);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
emit(out, { ok: true, count: rows.length, slices: rows }, json, lines.length === 0 ? ["(no slices)"] : lines);
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
fail(err, json, out);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return cmd;
|
|
115
|
+
}
|
|
116
|
+
// ---------------------------------------------------------------------
|
|
117
|
+
// rig scope slice show
|
|
118
|
+
// ---------------------------------------------------------------------
|
|
119
|
+
function buildSliceShowCommand() {
|
|
120
|
+
return new Command("show")
|
|
121
|
+
.description("Inspect a single slice (frontmatter + README + children)")
|
|
122
|
+
.argument("<slice-path>", "Slice path (absolute, relative-to-substrate, or NN-slug)")
|
|
123
|
+
.option("--mission <name>", "Hint mission when path is just NN-slug")
|
|
124
|
+
.option("--json", "Machine-readable output")
|
|
125
|
+
.action(async (slicePath, opts, command) => {
|
|
126
|
+
const out = makeStdout();
|
|
127
|
+
const json = Boolean(opts.json);
|
|
128
|
+
try {
|
|
129
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
130
|
+
const slice = findSlice(missionsRoot, slicePath, opts.mission ?? null);
|
|
131
|
+
const readme = slice.readmePath ? fs.readFileSync(slice.readmePath, "utf8") : null;
|
|
132
|
+
const children = fs.readdirSync(slice.absPath, { withFileTypes: true })
|
|
133
|
+
.map((e) => ({ name: e.name, kind: e.isDirectory() ? "dir" : "file" }));
|
|
134
|
+
const payload = {
|
|
135
|
+
ok: true,
|
|
136
|
+
slice: {
|
|
137
|
+
mission: slice.missionName,
|
|
138
|
+
name: slice.name,
|
|
139
|
+
id: slice.id,
|
|
140
|
+
status: slice.status,
|
|
141
|
+
path: slice.absPath,
|
|
142
|
+
frontmatter: slice.frontmatter,
|
|
143
|
+
readme,
|
|
144
|
+
children,
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
if (json) {
|
|
148
|
+
out.write(JSON.stringify(payload, null, 2) + "\n");
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
out.write(`Slice: ${slice.missionName}/${slice.name}\n`);
|
|
152
|
+
out.write(` id: ${slice.id ?? "—"}\n`);
|
|
153
|
+
out.write(` status: ${slice.status ?? "—"}\n`);
|
|
154
|
+
out.write(` path: ${slice.absPath}\n`);
|
|
155
|
+
out.write(` children: ${children.length}\n`);
|
|
156
|
+
if (readme) {
|
|
157
|
+
out.write("\n--- README ---\n");
|
|
158
|
+
out.write(readme);
|
|
159
|
+
if (!readme.endsWith("\n"))
|
|
160
|
+
out.write("\n");
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
catch (err) {
|
|
165
|
+
fail(err, json, out);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
// ---------------------------------------------------------------------
|
|
170
|
+
// rig scope slice create
|
|
171
|
+
// ---------------------------------------------------------------------
|
|
172
|
+
function buildSliceCreateCommand() {
|
|
173
|
+
return new Command("create")
|
|
174
|
+
.description("Create a new slice in a mission")
|
|
175
|
+
.argument("<mission>", "Mission name")
|
|
176
|
+
.argument("<slug>", "Short slug (becomes the folder name's suffix)")
|
|
177
|
+
.option("--template <kind>", `Template: ${SLICE_TEMPLATE_KINDS.join(" | ")}`, "placeholder")
|
|
178
|
+
.option("--title <text>", "Display title (defaults to titlecased slug)")
|
|
179
|
+
.option("--json", "Machine-readable output")
|
|
180
|
+
.action(async (missionName, rawSlug, opts, command) => {
|
|
181
|
+
const out = makeStdout();
|
|
182
|
+
const json = Boolean(opts.json);
|
|
183
|
+
try {
|
|
184
|
+
const kind = opts.template;
|
|
185
|
+
if (!SLICE_TEMPLATE_KINDS.includes(kind)) {
|
|
186
|
+
throw new ScopeCliError({
|
|
187
|
+
fact: `Unknown --template kind "${kind}".`,
|
|
188
|
+
consequence: "Slice not created.",
|
|
189
|
+
action: `Pick one of: ${SLICE_TEMPLATE_KINDS.join(", ")}.`,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
const slug = slugify(rawSlug);
|
|
193
|
+
if (!slug) {
|
|
194
|
+
throw new ScopeCliError({
|
|
195
|
+
fact: `Slug "${rawSlug}" reduces to empty after slugification.`,
|
|
196
|
+
consequence: "Slice not created.",
|
|
197
|
+
action: "Pick a slug containing letters or digits.",
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
201
|
+
const mission = findMission(missionsRoot, missionName);
|
|
202
|
+
// Persist the parent mission's id back into its README at the
|
|
203
|
+
// SAME moment we mint the child's id (per convention §1
|
|
204
|
+
// lazy-adoption rule + guard BC BLOCK 3 — every child-mint site
|
|
205
|
+
// must persist the parent's id, not just slice create).
|
|
206
|
+
const missionId = ensureMissionIdPersisted(mission, missionsRoot);
|
|
207
|
+
const nn = nextSliceNN(mission.absPath);
|
|
208
|
+
const sliceFolder = `${pad2(nn)}-${slug}`;
|
|
209
|
+
const sliceAbs = path.join(mission.absPath, "slices", sliceFolder);
|
|
210
|
+
if (fs.existsSync(sliceAbs)) {
|
|
211
|
+
throw new ScopeCliError({
|
|
212
|
+
fact: `Slice folder ${sliceAbs} already exists.`,
|
|
213
|
+
consequence: "Refusing to overwrite.",
|
|
214
|
+
action: "Pick a different slug, or rm -rf the existing folder first.",
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
const id = sliceIdFromMission(missionId, nn);
|
|
218
|
+
const title = opts.title ?? titleFromSlug(slug);
|
|
219
|
+
const body = renderSliceTemplate(kind, {
|
|
220
|
+
id,
|
|
221
|
+
slice_number: pad2(nn),
|
|
222
|
+
slug,
|
|
223
|
+
mission: mission.name,
|
|
224
|
+
title,
|
|
225
|
+
created_date: todayDateISO(),
|
|
226
|
+
});
|
|
227
|
+
fs.mkdirSync(sliceAbs, { recursive: true });
|
|
228
|
+
const readmePath = path.join(sliceAbs, "README.md");
|
|
229
|
+
fs.writeFileSync(readmePath, body, "utf8");
|
|
230
|
+
const payload = {
|
|
231
|
+
ok: true,
|
|
232
|
+
slice: {
|
|
233
|
+
mission: mission.name,
|
|
234
|
+
name: sliceFolder,
|
|
235
|
+
id,
|
|
236
|
+
path: sliceAbs,
|
|
237
|
+
readmePath,
|
|
238
|
+
template: kind,
|
|
239
|
+
},
|
|
240
|
+
};
|
|
241
|
+
emit(out, payload, json, [
|
|
242
|
+
`Created ${mission.name}/slices/${sliceFolder}`,
|
|
243
|
+
` id: ${id}`,
|
|
244
|
+
` template: ${kind}`,
|
|
245
|
+
` path: ${sliceAbs}`,
|
|
246
|
+
]);
|
|
247
|
+
}
|
|
248
|
+
catch (err) {
|
|
249
|
+
fail(err, json, out);
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
// ---------------------------------------------------------------------
|
|
254
|
+
// rig scope slice ship
|
|
255
|
+
// ---------------------------------------------------------------------
|
|
256
|
+
function buildSliceShipCommand() {
|
|
257
|
+
return new Command("ship")
|
|
258
|
+
.description("Ship a slice to a release mission (preserves git history)")
|
|
259
|
+
.argument("<slice-path>", "Slice path (absolute, relative, or NN-slug)")
|
|
260
|
+
.argument("<release-mission>", "Target release mission name")
|
|
261
|
+
.option("--mission <name>", "Hint mission when slice-path is just NN-slug")
|
|
262
|
+
.option("--json", "Machine-readable output")
|
|
263
|
+
.action(async (slicePath, releaseMission, opts, command) => {
|
|
264
|
+
const out = makeStdout();
|
|
265
|
+
const json = Boolean(opts.json);
|
|
266
|
+
try {
|
|
267
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
268
|
+
const slice = findSlice(missionsRoot, slicePath, opts.mission ?? null);
|
|
269
|
+
const target = findMission(missionsRoot, releaseMission);
|
|
270
|
+
const targetSlicesDir = path.join(target.absPath, "slices");
|
|
271
|
+
fs.mkdirSync(targetSlicesDir, { recursive: true });
|
|
272
|
+
const newNN = nextSliceNN(target.absPath);
|
|
273
|
+
const slug = slice.slug ?? slugify(slice.name);
|
|
274
|
+
const newName = `${pad2(newNN)}-${slug}`;
|
|
275
|
+
const destAbs = path.join(targetSlicesDir, newName);
|
|
276
|
+
const { usedGit, repoRoot } = moveSlice(slice.absPath, destAbs);
|
|
277
|
+
const targetId = ensureMissionIdPersisted(target, missionsRoot);
|
|
278
|
+
const newSliceId = sliceIdFromMission(targetId, newNN);
|
|
279
|
+
const newReadme = path.join(destAbs, "README.md");
|
|
280
|
+
if (fs.existsSync(newReadme)) {
|
|
281
|
+
updateFrontmatter(newReadme, {
|
|
282
|
+
id: newSliceId,
|
|
283
|
+
mission: target.name,
|
|
284
|
+
status: `shipped-to-${target.name}`,
|
|
285
|
+
"shipped-on": todayDateISO(),
|
|
286
|
+
"shipped-from": slice.missionName,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
emit(out, {
|
|
290
|
+
ok: true,
|
|
291
|
+
shipped: {
|
|
292
|
+
from: { mission: slice.missionName, name: slice.name, id: slice.id },
|
|
293
|
+
to: { mission: target.name, name: newName, id: newSliceId, path: destAbs },
|
|
294
|
+
git: { usedGit, repoRoot },
|
|
295
|
+
},
|
|
296
|
+
}, json, [
|
|
297
|
+
`Shipped ${slice.missionName}/${slice.name} → ${target.name}/slices/${newName}`,
|
|
298
|
+
` id: ${newSliceId}`,
|
|
299
|
+
` git: ${usedGit ? "git mv" : "fs.rename (not in a git repo)"}`,
|
|
300
|
+
]);
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
fail(err, json, out);
|
|
304
|
+
}
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
// ---------------------------------------------------------------------
|
|
308
|
+
// rig scope slice close
|
|
309
|
+
// ---------------------------------------------------------------------
|
|
310
|
+
function buildSliceCloseCommand() {
|
|
311
|
+
return new Command("close")
|
|
312
|
+
.description("Close a slice (move to <mission>/closed/, update status)")
|
|
313
|
+
.argument("<slice-path>", "Slice path (absolute, relative, or NN-slug)")
|
|
314
|
+
.requiredOption("--reason <reason>", `Closure reason: ${CLOSE_REASONS.join(" | ")}`)
|
|
315
|
+
.option("--note <text>", "Optional closure note")
|
|
316
|
+
.option("--mission <name>", "Hint mission when slice-path is just NN-slug")
|
|
317
|
+
.option("--json", "Machine-readable output")
|
|
318
|
+
.action(async (slicePath, opts, command) => {
|
|
319
|
+
const out = makeStdout();
|
|
320
|
+
const json = Boolean(opts.json);
|
|
321
|
+
try {
|
|
322
|
+
const reason = opts.reason;
|
|
323
|
+
if (!CLOSE_REASONS.includes(reason)) {
|
|
324
|
+
throw new ScopeCliError({
|
|
325
|
+
fact: `Unknown --reason "${reason}".`,
|
|
326
|
+
consequence: "Slice not closed.",
|
|
327
|
+
action: `Pick one of: ${CLOSE_REASONS.join(", ")}.`,
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
331
|
+
const slice = findSlice(missionsRoot, slicePath, opts.mission ?? null);
|
|
332
|
+
const mission = findMission(missionsRoot, slice.missionName);
|
|
333
|
+
const closedDir = path.join(mission.absPath, "closed");
|
|
334
|
+
fs.mkdirSync(closedDir, { recursive: true });
|
|
335
|
+
const destName = slice.name;
|
|
336
|
+
const destAbs = path.join(closedDir, destName);
|
|
337
|
+
const { usedGit, repoRoot } = moveSlice(slice.absPath, destAbs);
|
|
338
|
+
const newReadme = path.join(destAbs, "README.md");
|
|
339
|
+
if (fs.existsSync(newReadme)) {
|
|
340
|
+
const updates = {
|
|
341
|
+
status: `closed-${reason}`,
|
|
342
|
+
"closed-on": todayDateISO(),
|
|
343
|
+
};
|
|
344
|
+
if (opts.note)
|
|
345
|
+
updates["closure-note"] = opts.note;
|
|
346
|
+
updateFrontmatter(newReadme, updates);
|
|
347
|
+
}
|
|
348
|
+
emit(out, {
|
|
349
|
+
ok: true,
|
|
350
|
+
closed: {
|
|
351
|
+
mission: slice.missionName,
|
|
352
|
+
name: destName,
|
|
353
|
+
id: slice.id,
|
|
354
|
+
reason,
|
|
355
|
+
note: opts.note ?? null,
|
|
356
|
+
path: destAbs,
|
|
357
|
+
git: { usedGit, repoRoot },
|
|
358
|
+
},
|
|
359
|
+
}, json, [
|
|
360
|
+
`Closed ${slice.missionName}/${slice.name} → ${slice.missionName}/closed/${destName}`,
|
|
361
|
+
` reason: ${reason}`,
|
|
362
|
+
` git: ${usedGit ? "git mv" : "fs.rename (not in a git repo)"}`,
|
|
363
|
+
]);
|
|
364
|
+
}
|
|
365
|
+
catch (err) {
|
|
366
|
+
fail(err, json, out);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
// ---------------------------------------------------------------------
|
|
371
|
+
// rig scope slice move
|
|
372
|
+
// ---------------------------------------------------------------------
|
|
373
|
+
function buildSliceMoveCommand() {
|
|
374
|
+
return new Command("move")
|
|
375
|
+
.description("Move a slice between missions (re-numbers in destination)")
|
|
376
|
+
.argument("<slice-path>", "Slice path (absolute, relative, or NN-slug)")
|
|
377
|
+
.argument("<dest-mission>", "Destination mission name")
|
|
378
|
+
.option("--mission <name>", "Hint source mission when slice-path is just NN-slug")
|
|
379
|
+
.option("--json", "Machine-readable output")
|
|
380
|
+
.action(async (slicePath, destMission, opts, command) => {
|
|
381
|
+
const out = makeStdout();
|
|
382
|
+
const json = Boolean(opts.json);
|
|
383
|
+
try {
|
|
384
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
385
|
+
const slice = findSlice(missionsRoot, slicePath, opts.mission ?? null);
|
|
386
|
+
const target = findMission(missionsRoot, destMission);
|
|
387
|
+
const targetSlicesDir = path.join(target.absPath, "slices");
|
|
388
|
+
fs.mkdirSync(targetSlicesDir, { recursive: true });
|
|
389
|
+
const newNN = nextSliceNN(target.absPath);
|
|
390
|
+
const slug = slice.slug ?? slugify(slice.name);
|
|
391
|
+
const newName = `${pad2(newNN)}-${slug}`;
|
|
392
|
+
const destAbs = path.join(targetSlicesDir, newName);
|
|
393
|
+
const { usedGit, repoRoot } = moveSlice(slice.absPath, destAbs);
|
|
394
|
+
const targetId = ensureMissionIdPersisted(target, missionsRoot);
|
|
395
|
+
const newSliceId = sliceIdFromMission(targetId, newNN);
|
|
396
|
+
const newReadme = path.join(destAbs, "README.md");
|
|
397
|
+
if (fs.existsSync(newReadme)) {
|
|
398
|
+
updateFrontmatter(newReadme, {
|
|
399
|
+
id: newSliceId,
|
|
400
|
+
mission: target.name,
|
|
401
|
+
"moved-on": todayDateISO(),
|
|
402
|
+
"moved-from": slice.missionName,
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
emit(out, {
|
|
406
|
+
ok: true,
|
|
407
|
+
moved: {
|
|
408
|
+
from: { mission: slice.missionName, name: slice.name, id: slice.id },
|
|
409
|
+
to: { mission: target.name, name: newName, id: newSliceId, path: destAbs },
|
|
410
|
+
git: { usedGit, repoRoot },
|
|
411
|
+
},
|
|
412
|
+
}, json, [
|
|
413
|
+
`Moved ${slice.missionName}/${slice.name} → ${target.name}/slices/${newName}`,
|
|
414
|
+
` id: ${newSliceId}`,
|
|
415
|
+
` git: ${usedGit ? "git mv" : "fs.rename (not in a git repo)"}`,
|
|
416
|
+
]);
|
|
417
|
+
}
|
|
418
|
+
catch (err) {
|
|
419
|
+
fail(err, json, out);
|
|
420
|
+
}
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
// ---------------------------------------------------------------------
|
|
424
|
+
// rig scope mission ls / show / create
|
|
425
|
+
// ---------------------------------------------------------------------
|
|
426
|
+
function buildMissionLsCommand() {
|
|
427
|
+
return new Command("ls")
|
|
428
|
+
.description("List missions (top-level folders with README.md)")
|
|
429
|
+
.option("--json", "Machine-readable output")
|
|
430
|
+
.action(async (opts, command) => {
|
|
431
|
+
const out = makeStdout();
|
|
432
|
+
const json = Boolean(opts.json);
|
|
433
|
+
try {
|
|
434
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
435
|
+
const missions = listMissions(missionsRoot);
|
|
436
|
+
const rows = missions.map((m) => ({
|
|
437
|
+
name: m.name,
|
|
438
|
+
id: m.id,
|
|
439
|
+
path: m.absPath,
|
|
440
|
+
activeSliceCount: m.activeSliceCount,
|
|
441
|
+
closedSliceCount: m.closedSliceCount,
|
|
442
|
+
}));
|
|
443
|
+
emit(out, { ok: true, count: rows.length, missions: rows }, json, rows.length === 0
|
|
444
|
+
? ["(no missions)"]
|
|
445
|
+
: rows.map((r) => `${r.name} ${r.id ?? "—"} active=${r.activeSliceCount} closed=${r.closedSliceCount}`));
|
|
446
|
+
}
|
|
447
|
+
catch (err) {
|
|
448
|
+
fail(err, json, out);
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
function buildMissionShowCommand() {
|
|
453
|
+
return new Command("show")
|
|
454
|
+
.description("Inspect a single mission")
|
|
455
|
+
.argument("<mission>", "Mission name")
|
|
456
|
+
.option("--json", "Machine-readable output")
|
|
457
|
+
.action(async (missionName, opts, command) => {
|
|
458
|
+
const out = makeStdout();
|
|
459
|
+
const json = Boolean(opts.json);
|
|
460
|
+
try {
|
|
461
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
462
|
+
const mission = findMission(missionsRoot, missionName);
|
|
463
|
+
const readme = mission.readmePath ? fs.readFileSync(mission.readmePath, "utf8") : null;
|
|
464
|
+
const slices = listSlices(mission, "all").map((s) => ({
|
|
465
|
+
name: s.name, id: s.id, status: s.status, nn: s.nn,
|
|
466
|
+
}));
|
|
467
|
+
const payload = {
|
|
468
|
+
ok: true,
|
|
469
|
+
mission: {
|
|
470
|
+
name: mission.name,
|
|
471
|
+
id: mission.id,
|
|
472
|
+
path: mission.absPath,
|
|
473
|
+
activeSliceCount: mission.activeSliceCount,
|
|
474
|
+
closedSliceCount: mission.closedSliceCount,
|
|
475
|
+
frontmatter: mission.frontmatter,
|
|
476
|
+
readme,
|
|
477
|
+
slices,
|
|
478
|
+
},
|
|
479
|
+
};
|
|
480
|
+
if (json) {
|
|
481
|
+
out.write(JSON.stringify(payload, null, 2) + "\n");
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
out.write(`Mission: ${mission.name}\n`);
|
|
485
|
+
out.write(` id: ${mission.id ?? "—"}\n`);
|
|
486
|
+
out.write(` active slices: ${mission.activeSliceCount}\n`);
|
|
487
|
+
out.write(` closed slices: ${mission.closedSliceCount}\n`);
|
|
488
|
+
out.write(` path: ${mission.absPath}\n`);
|
|
489
|
+
if (readme) {
|
|
490
|
+
out.write("\n--- README ---\n");
|
|
491
|
+
out.write(readme);
|
|
492
|
+
if (!readme.endsWith("\n"))
|
|
493
|
+
out.write("\n");
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
catch (err) {
|
|
498
|
+
fail(err, json, out);
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
}
|
|
502
|
+
function buildMissionCreateCommand() {
|
|
503
|
+
return new Command("create")
|
|
504
|
+
.description("Create a new mission (mints a stable dot-ID into frontmatter)")
|
|
505
|
+
.argument("<name>", "Mission folder name (e.g., release-0.4.0, backlog-foo)")
|
|
506
|
+
.option("--template <kind>", `Template: ${MISSION_TEMPLATE_KINDS.join(" | ")} (auto when name matches release-X.Y.Z)`, "")
|
|
507
|
+
.option("--id <dot-id>", "Explicit dot-ID. Overrides name-pattern inference.")
|
|
508
|
+
.option("--title <text>", "Display title (defaults to titlecased name)")
|
|
509
|
+
.option("--no-mission-notes", "Skip the auto-scaffold of MISSION_NOTES.md (rare; default is to scaffold from conventions/mission-notes/TEMPLATE.md)")
|
|
510
|
+
.option("--json", "Machine-readable output")
|
|
511
|
+
.action(async (rawName, opts, command) => {
|
|
512
|
+
const out = makeStdout();
|
|
513
|
+
const json = Boolean(opts.json);
|
|
514
|
+
try {
|
|
515
|
+
const name = rawName.trim();
|
|
516
|
+
if (!name || /[\\/\s]/.test(name)) {
|
|
517
|
+
throw new ScopeCliError({
|
|
518
|
+
fact: `Invalid mission name "${rawName}".`,
|
|
519
|
+
consequence: "Mission not created.",
|
|
520
|
+
action: "Pick a name with no whitespace or path separators.",
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
const missionsRoot = resolveMissionsRoot({ override: getOpts(command).workspace });
|
|
524
|
+
const absPath = path.join(missionsRoot, name);
|
|
525
|
+
if (fs.existsSync(absPath)) {
|
|
526
|
+
throw new ScopeCliError({
|
|
527
|
+
fact: `Mission folder ${absPath} already exists.`,
|
|
528
|
+
consequence: "Refusing to overwrite.",
|
|
529
|
+
action: "Pick a different name, or use `rig scope mission show <name>` to inspect the existing mission.",
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
// Resolve template kind: explicit > release-pattern auto > placeholder.
|
|
533
|
+
const isReleaseName = /^release-\d+\.\d+(?:\.\d+)?$/.test(name);
|
|
534
|
+
let templateKind = opts.template;
|
|
535
|
+
if (!templateKind)
|
|
536
|
+
templateKind = isReleaseName ? "release" : "placeholder";
|
|
537
|
+
if (!MISSION_TEMPLATE_KINDS.includes(templateKind)) {
|
|
538
|
+
throw new ScopeCliError({
|
|
539
|
+
fact: `Unknown --template kind "${templateKind}".`,
|
|
540
|
+
consequence: "Mission not created.",
|
|
541
|
+
action: `Pick one of: ${MISSION_TEMPLATE_KINDS.join(", ")}.`,
|
|
542
|
+
});
|
|
543
|
+
}
|
|
544
|
+
// Mint the dot-ID.
|
|
545
|
+
let id;
|
|
546
|
+
if (opts.id) {
|
|
547
|
+
// Tier-aware validation per guard BC verdict (BLOCK 1).
|
|
548
|
+
// A mission ID has 2-3 numeric segments after the prefix
|
|
549
|
+
// (release X.Y or X.Y.Z; escape-band 99.x.y). Reject
|
|
550
|
+
// slice-shaped IDs (4 segments) so the parent identity stays
|
|
551
|
+
// unambiguous.
|
|
552
|
+
if (!isMissionDotId(opts.id)) {
|
|
553
|
+
throw new ScopeCliError({
|
|
554
|
+
fact: `Supplied --id "${opts.id}" is not a mission-tier dot-ID.`,
|
|
555
|
+
consequence: "Mission not created. A mission ID has the shape <PFX>.<ver> (2-3 numeric segments), not a slice shape <PFX>.<ver>.<n>.",
|
|
556
|
+
action: "Use a mission-shaped dot-ID like OPR.0.3.2 (release) or OPR.99.0.1 (escape band). For slice IDs, scope automatically mints them when you create a slice.",
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
id = opts.id;
|
|
560
|
+
}
|
|
561
|
+
else if (isReleaseName) {
|
|
562
|
+
id = inferMissionDotId(name, null);
|
|
563
|
+
}
|
|
564
|
+
else {
|
|
565
|
+
const peers = listMissions(missionsRoot);
|
|
566
|
+
const ordinal = nextEscapeBandOrdinal(peers.map((p) => p.id));
|
|
567
|
+
id = inferMissionDotId(name, ordinal);
|
|
568
|
+
}
|
|
569
|
+
// Resolve titles + render templates BEFORE any filesystem side
|
|
570
|
+
// effects (banked verify-first-then-write — guard catch on
|
|
571
|
+
// OPR.0.3.2.21.FR-3 qitem-20260601121058: a stale
|
|
572
|
+
// OPENRIG_MISSION_NOTES_TEMPLATE_PATH used to throw AFTER
|
|
573
|
+
// mkdirSync + README write, leaking a half-created mission dir
|
|
574
|
+
// that future `mission create <same-name>` would reject as
|
|
575
|
+
// already-existing). Rendering MISSION_NOTES first means a
|
|
576
|
+
// stale env-var fails before any disk mutation.
|
|
577
|
+
const title = opts.title ?? titleFromSlug(name.replace(/^release-/, ""));
|
|
578
|
+
const releaseVersion = isReleaseName ? name.replace(/^release-/, "") : "";
|
|
579
|
+
const readmeBody = renderMissionTemplate(templateKind, {
|
|
580
|
+
id,
|
|
581
|
+
slug: name,
|
|
582
|
+
mission: name,
|
|
583
|
+
title,
|
|
584
|
+
created_date: todayDateISO(),
|
|
585
|
+
release_version: releaseVersion,
|
|
586
|
+
});
|
|
587
|
+
let missionNotesRendered = null;
|
|
588
|
+
if (opts.missionNotes !== false) {
|
|
589
|
+
const r = renderMissionNotesTemplate({
|
|
590
|
+
mission_id: id,
|
|
591
|
+
mission_name: title,
|
|
592
|
+
created_date: todayDateISO(),
|
|
593
|
+
});
|
|
594
|
+
missionNotesRendered = { rendered: r.rendered, resolvedFrom: r.resolvedFrom };
|
|
595
|
+
}
|
|
596
|
+
// All renders succeeded — safe to touch the filesystem.
|
|
597
|
+
fs.mkdirSync(absPath, { recursive: true });
|
|
598
|
+
fs.mkdirSync(path.join(absPath, "slices"), { recursive: true });
|
|
599
|
+
const readmePath = path.join(absPath, "README.md");
|
|
600
|
+
fs.writeFileSync(readmePath, readmeBody, "utf8");
|
|
601
|
+
let missionNotesPath = null;
|
|
602
|
+
let missionNotesResolvedFrom = null;
|
|
603
|
+
if (missionNotesRendered) {
|
|
604
|
+
missionNotesPath = path.join(absPath, "MISSION_NOTES.md");
|
|
605
|
+
fs.writeFileSync(missionNotesPath, missionNotesRendered.rendered, "utf8");
|
|
606
|
+
missionNotesResolvedFrom = missionNotesRendered.resolvedFrom;
|
|
607
|
+
}
|
|
608
|
+
const humanLines = [
|
|
609
|
+
`Created mission ${name}`,
|
|
610
|
+
` id: ${id}`,
|
|
611
|
+
` template: ${templateKind}`,
|
|
612
|
+
` path: ${absPath}`,
|
|
613
|
+
];
|
|
614
|
+
if (missionNotesPath) {
|
|
615
|
+
humanLines.push(` mission-notes: ${missionNotesPath} (template: ${missionNotesResolvedFrom})`);
|
|
616
|
+
}
|
|
617
|
+
emit(out, {
|
|
618
|
+
ok: true,
|
|
619
|
+
mission: {
|
|
620
|
+
name,
|
|
621
|
+
id,
|
|
622
|
+
template: templateKind,
|
|
623
|
+
path: absPath,
|
|
624
|
+
readmePath,
|
|
625
|
+
missionNotesPath,
|
|
626
|
+
missionNotesResolvedFrom,
|
|
627
|
+
},
|
|
628
|
+
}, json, humanLines);
|
|
629
|
+
}
|
|
630
|
+
catch (err) {
|
|
631
|
+
fail(err, json, out);
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
// ---------------------------------------------------------------------
|
|
636
|
+
// Aggregate
|
|
637
|
+
// ---------------------------------------------------------------------
|
|
638
|
+
export function scopeCommand() {
|
|
639
|
+
const cmd = new Command("scope")
|
|
640
|
+
.description("Scope tree primitive: missions, slices, sub-slices (per conventions/scope-and-versioning)")
|
|
641
|
+
.option("--workspace <path>", "Override workspace root (otherwise inferred from cwd or $OPENRIG_WORK_ROOT)");
|
|
642
|
+
const slice = new Command("slice").description("Slice-tier commands");
|
|
643
|
+
slice.addCommand(buildSliceLsCommand());
|
|
644
|
+
slice.addCommand(buildSliceShowCommand());
|
|
645
|
+
slice.addCommand(buildSliceCreateCommand());
|
|
646
|
+
slice.addCommand(buildSliceShipCommand());
|
|
647
|
+
slice.addCommand(buildSliceCloseCommand());
|
|
648
|
+
slice.addCommand(buildSliceMoveCommand());
|
|
649
|
+
cmd.addCommand(slice);
|
|
650
|
+
const mission = new Command("mission").description("Mission-tier commands");
|
|
651
|
+
mission.addCommand(buildMissionLsCommand());
|
|
652
|
+
mission.addCommand(buildMissionShowCommand());
|
|
653
|
+
mission.addCommand(buildMissionCreateCommand());
|
|
654
|
+
cmd.addCommand(mission);
|
|
655
|
+
return cmd;
|
|
656
|
+
}
|
|
657
|
+
// Re-exports for tests.
|
|
658
|
+
export { DEFAULT_PROJECT_PREFIX, splitFrontmatter };
|
|
659
|
+
//# sourceMappingURL=scope.js.map
|