@openrig/cli 0.5.14 → 0.5.16

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.
Files changed (244) hide show
  1. package/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md +159 -108
  2. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +1 -0
  3. package/daemon/context-packs/onboarding-width/manifest.yaml +1 -1
  4. package/daemon/context-packs/onboarding-width/public-what-you-can-do.md +1 -0
  5. package/daemon/context-packs/skills/agent-operated-software/manifest.yaml +1 -1
  6. package/daemon/context-packs/skills/agent-operated-workflows/manifest.yaml +1 -1
  7. package/daemon/context-packs/skills/applying-a-permission-policy/SKILL.md +159 -108
  8. package/daemon/context-packs/skills/applying-a-permission-policy/manifest.yaml +3 -3
  9. package/daemon/context-packs/skills/claude-compaction-restore/manifest.yaml +1 -1
  10. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +1 -1
  11. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +1 -1
  12. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +1 -1
  13. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +1 -1
  14. package/daemon/context-packs/skills/core/messaging-the-human/manifest.yaml +1 -1
  15. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +1 -1
  16. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +1 -1
  17. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +1 -1
  18. package/daemon/context-packs/skills/core/openrig-skills/SKILL.md +1 -0
  19. package/daemon/context-packs/skills/core/openrig-skills/manifest.yaml +1 -1
  20. package/daemon/context-packs/skills/core/openrig-software-factory/SKILL.md +138 -0
  21. package/daemon/context-packs/skills/core/openrig-software-factory/manifest.yaml +12 -0
  22. package/daemon/context-packs/skills/core/openrig-software-factory/references/worked-example.md +543 -0
  23. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +1 -1
  24. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +1 -1
  25. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +1 -1
  26. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +1 -1
  27. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +1 -1
  28. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +1 -1
  29. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +1 -1
  30. package/daemon/context-packs/skills/delegating-work/manifest.yaml +1 -1
  31. package/daemon/context-packs/skills/forming-an-openrig-mental-model/manifest.yaml +1 -1
  32. package/daemon/context-packs/skills/loading-addressable-markdown/manifest.yaml +1 -1
  33. package/daemon/context-packs/skills/mission-slice-sop/manifest.yaml +1 -1
  34. package/daemon/context-packs/skills/openrig-operating-model/manifest.yaml +1 -1
  35. package/daemon/context-packs/skills/openrig-user/manifest.yaml +1 -1
  36. package/daemon/context-packs/skills/orienting-to-an-inherited-seat/manifest.yaml +1 -1
  37. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +1 -1
  38. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +1 -1
  39. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +1 -1
  40. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +1 -1
  41. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +1 -1
  42. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +1 -1
  43. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +1 -1
  44. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +1 -1
  45. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +1 -1
  46. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +1 -1
  47. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +1 -1
  48. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +1 -1
  49. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +1 -1
  50. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +1 -1
  51. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +1 -1
  52. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +1 -1
  53. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +1 -1
  54. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +1 -1
  55. package/daemon/context-packs/skills/queue-handoff/manifest.yaml +1 -1
  56. package/daemon/context-packs/skills/refocusing/manifest.yaml +1 -1
  57. package/daemon/context-packs/skills/retiring-and-inheriting-a-seat/manifest.yaml +1 -1
  58. package/daemon/context-packs/skills/seat-continuity-and-handover/manifest.yaml +1 -1
  59. package/daemon/context-packs/skills/session-compaction-and-restore/manifest.yaml +1 -1
  60. package/daemon/context-packs/skills/software-for-agents/manifest.yaml +1 -1
  61. package/daemon/context-packs/world-example/manifest.yaml +1 -1
  62. package/daemon/context-packs/world-public/manifest.yaml +1 -1
  63. package/daemon/dist/adapters/claude-code-adapter.js +5 -5
  64. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  65. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -15
  66. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  67. package/daemon/dist/adapters/codex-runtime-adapter.js +79 -93
  68. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  69. package/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  70. package/daemon/dist/adapters/pi-runner-protocol.js +14 -9
  71. package/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  72. package/daemon/dist/adapters/pi-runner.d.ts +6 -15
  73. package/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  74. package/daemon/dist/adapters/pi-runner.js +151 -71
  75. package/daemon/dist/adapters/pi-runner.js.map +1 -1
  76. package/daemon/dist/build-info.js +3 -3
  77. package/daemon/dist/db/all-migrations.d.ts +1 -1
  78. package/daemon/dist/db/all-migrations.d.ts.map +1 -1
  79. package/daemon/dist/db/all-migrations.js +4 -2
  80. package/daemon/dist/db/all-migrations.js.map +1 -1
  81. package/daemon/dist/db/migrations/085_rig_claude_managed_block_file.d.ts +13 -0
  82. package/daemon/dist/db/migrations/085_rig_claude_managed_block_file.d.ts.map +1 -0
  83. package/daemon/dist/db/migrations/085_rig_claude_managed_block_file.js +17 -0
  84. package/daemon/dist/db/migrations/085_rig_claude_managed_block_file.js.map +1 -0
  85. package/daemon/dist/domain/bootstrap-orchestrator.js +2 -2
  86. package/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  87. package/daemon/dist/domain/managed-blocks.d.ts +3 -0
  88. package/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  89. package/daemon/dist/domain/managed-blocks.js +5 -0
  90. package/daemon/dist/domain/managed-blocks.js.map +1 -1
  91. package/daemon/dist/domain/native-process-lineage.d.ts +23 -0
  92. package/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  93. package/daemon/dist/domain/native-process-lineage.js +84 -4
  94. package/daemon/dist/domain/native-process-lineage.js.map +1 -1
  95. package/daemon/dist/domain/projection-planner.d.ts +2 -1
  96. package/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  97. package/daemon/dist/domain/projection-planner.js +3 -2
  98. package/daemon/dist/domain/projection-planner.js.map +1 -1
  99. package/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  100. package/daemon/dist/domain/restore-orchestrator.js +20 -3
  101. package/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  102. package/daemon/dist/domain/rig-repository.d.ts +6 -0
  103. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  104. package/daemon/dist/domain/rig-repository.js +16 -0
  105. package/daemon/dist/domain/rig-repository.js.map +1 -1
  106. package/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  107. package/daemon/dist/domain/rig-teardown.js +6 -5
  108. package/daemon/dist/domain/rig-teardown.js.map +1 -1
  109. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  110. package/daemon/dist/domain/rigspec-codec.js +2 -0
  111. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  112. package/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  113. package/daemon/dist/domain/rigspec-exporter.js +3 -0
  114. package/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  115. package/daemon/dist/domain/rigspec-instantiator.d.ts +18 -0
  116. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  117. package/daemon/dist/domain/rigspec-instantiator.js +120 -7
  118. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  119. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  120. package/daemon/dist/domain/rigspec-schema.js +23 -1
  121. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  122. package/daemon/dist/domain/runtime-adapter.d.ts +2 -0
  123. package/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  124. package/daemon/dist/domain/runtime-adapter.js.map +1 -1
  125. package/daemon/dist/domain/seat-attention-reconciler.d.ts +2 -6
  126. package/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  127. package/daemon/dist/domain/seat-attention-reconciler.js +15 -6
  128. package/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  129. package/daemon/dist/domain/seat-identity-reconciler.d.ts +5 -1
  130. package/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  131. package/daemon/dist/domain/seat-identity-reconciler.js +36 -10
  132. package/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  133. package/daemon/dist/domain/seat-lifecycle-service.d.ts +3 -0
  134. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  135. package/daemon/dist/domain/seat-lifecycle-service.js +3 -0
  136. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  137. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  138. package/daemon/dist/domain/startup-orchestrator.js +8 -0
  139. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  140. package/daemon/dist/domain/types.d.ts +4 -0
  141. package/daemon/dist/domain/types.d.ts.map +1 -1
  142. package/daemon/dist/routes/sessions.js +12 -1
  143. package/daemon/dist/routes/sessions.js.map +1 -1
  144. package/daemon/dist/routes/up.js +4 -4
  145. package/daemon/dist/routes/up.js.map +1 -1
  146. package/daemon/docs/reference/agent-startup-guide.md +11 -3
  147. package/daemon/docs/reference/getting-started.md +211 -14
  148. package/daemon/docs/reference/rig-spec.md +38 -0
  149. package/daemon/policies/builtin/yolo.policy.md +14 -4
  150. package/daemon/specs/agents/shared/skills/core/openrig-skills/SKILL.md +1 -0
  151. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/SKILL.md +138 -0
  152. package/daemon/specs/agents/shared/skills/core/openrig-software-factory/references/worked-example.md +543 -0
  153. package/dist/build-info.js +3 -3
  154. package/dist/commands/launch.d.ts.map +1 -1
  155. package/dist/commands/launch.js +27 -2
  156. package/dist/commands/launch.js.map +1 -1
  157. package/dist/commands/up.d.ts.map +1 -1
  158. package/dist/commands/up.js +13 -2
  159. package/dist/commands/up.js.map +1 -1
  160. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +5 -5
  161. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  162. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.d.ts +5 -15
  163. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  164. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js +79 -93
  165. package/node_modules/@openrig/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  166. package/node_modules/@openrig/daemon/dist/adapters/pi-runner-protocol.d.ts.map +1 -1
  167. package/node_modules/@openrig/daemon/dist/adapters/pi-runner-protocol.js +14 -9
  168. package/node_modules/@openrig/daemon/dist/adapters/pi-runner-protocol.js.map +1 -1
  169. package/node_modules/@openrig/daemon/dist/adapters/pi-runner.d.ts +6 -15
  170. package/node_modules/@openrig/daemon/dist/adapters/pi-runner.d.ts.map +1 -1
  171. package/node_modules/@openrig/daemon/dist/adapters/pi-runner.js +151 -71
  172. package/node_modules/@openrig/daemon/dist/adapters/pi-runner.js.map +1 -1
  173. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  174. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts +1 -1
  175. package/node_modules/@openrig/daemon/dist/db/all-migrations.d.ts.map +1 -1
  176. package/node_modules/@openrig/daemon/dist/db/all-migrations.js +4 -2
  177. package/node_modules/@openrig/daemon/dist/db/all-migrations.js.map +1 -1
  178. package/node_modules/@openrig/daemon/dist/db/migrations/085_rig_claude_managed_block_file.d.ts +13 -0
  179. package/node_modules/@openrig/daemon/dist/db/migrations/085_rig_claude_managed_block_file.d.ts.map +1 -0
  180. package/node_modules/@openrig/daemon/dist/db/migrations/085_rig_claude_managed_block_file.js +17 -0
  181. package/node_modules/@openrig/daemon/dist/db/migrations/085_rig_claude_managed_block_file.js.map +1 -0
  182. package/node_modules/@openrig/daemon/dist/domain/bootstrap-orchestrator.js +2 -2
  183. package/node_modules/@openrig/daemon/dist/domain/bootstrap-orchestrator.js.map +1 -1
  184. package/node_modules/@openrig/daemon/dist/domain/managed-blocks.d.ts +3 -0
  185. package/node_modules/@openrig/daemon/dist/domain/managed-blocks.d.ts.map +1 -1
  186. package/node_modules/@openrig/daemon/dist/domain/managed-blocks.js +5 -0
  187. package/node_modules/@openrig/daemon/dist/domain/managed-blocks.js.map +1 -1
  188. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.d.ts +23 -0
  189. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.d.ts.map +1 -1
  190. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.js +84 -4
  191. package/node_modules/@openrig/daemon/dist/domain/native-process-lineage.js.map +1 -1
  192. package/node_modules/@openrig/daemon/dist/domain/projection-planner.d.ts +2 -1
  193. package/node_modules/@openrig/daemon/dist/domain/projection-planner.d.ts.map +1 -1
  194. package/node_modules/@openrig/daemon/dist/domain/projection-planner.js +3 -2
  195. package/node_modules/@openrig/daemon/dist/domain/projection-planner.js.map +1 -1
  196. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.d.ts.map +1 -1
  197. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js +20 -3
  198. package/node_modules/@openrig/daemon/dist/domain/restore-orchestrator.js.map +1 -1
  199. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +6 -0
  200. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  201. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +16 -0
  202. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
  203. package/node_modules/@openrig/daemon/dist/domain/rig-teardown.d.ts.map +1 -1
  204. package/node_modules/@openrig/daemon/dist/domain/rig-teardown.js +6 -5
  205. package/node_modules/@openrig/daemon/dist/domain/rig-teardown.js.map +1 -1
  206. package/node_modules/@openrig/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  207. package/node_modules/@openrig/daemon/dist/domain/rigspec-codec.js +2 -0
  208. package/node_modules/@openrig/daemon/dist/domain/rigspec-codec.js.map +1 -1
  209. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.d.ts.map +1 -1
  210. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js +3 -0
  211. package/node_modules/@openrig/daemon/dist/domain/rigspec-exporter.js.map +1 -1
  212. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +18 -0
  213. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  214. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +120 -7
  215. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  216. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  217. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +23 -1
  218. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
  219. package/node_modules/@openrig/daemon/dist/domain/runtime-adapter.d.ts +2 -0
  220. package/node_modules/@openrig/daemon/dist/domain/runtime-adapter.d.ts.map +1 -1
  221. package/node_modules/@openrig/daemon/dist/domain/runtime-adapter.js.map +1 -1
  222. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.d.ts +2 -6
  223. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.d.ts.map +1 -1
  224. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.js +15 -6
  225. package/node_modules/@openrig/daemon/dist/domain/seat-attention-reconciler.js.map +1 -1
  226. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.d.ts +5 -1
  227. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.d.ts.map +1 -1
  228. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.js +36 -10
  229. package/node_modules/@openrig/daemon/dist/domain/seat-identity-reconciler.js.map +1 -1
  230. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts +3 -0
  231. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -1
  232. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js +3 -0
  233. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js.map +1 -1
  234. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  235. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.js +8 -0
  236. package/node_modules/@openrig/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  237. package/node_modules/@openrig/daemon/dist/domain/types.d.ts +4 -0
  238. package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
  239. package/node_modules/@openrig/daemon/dist/routes/sessions.js +12 -1
  240. package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
  241. package/node_modules/@openrig/daemon/dist/routes/up.js +4 -4
  242. package/node_modules/@openrig/daemon/dist/routes/up.js.map +1 -1
  243. package/node_modules/@openrig/daemon/package.json +1 -1
  244. package/package.json +1 -1
@@ -1,117 +1,168 @@
1
1
  ---
2
2
  name: applying-a-permission-policy
3
- description: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
3
+ description: >-
4
+ Use when a user asks an agent to configure OpenRig command permissions, reduce
5
+ repeated native approval prompts, or apply a selected rig/seat permission policy.
4
6
  metadata:
5
7
  openrig:
6
8
  stage: established
7
- tested_against: # VERSION STAMP — the whole point; re-verify at every harness bump
8
- claude_code: "2.1.220 — VM-CONFIRMED 2026-08-03 (all cells)"
9
- codex: "0.120.0 — VM-CONFIRMED 2026-08-03 (sandbox_mode/approval_policy; on-failure deprecated-but-accepted)"
10
- pi: "0.83.0 — VM-CONFIRMED 2026-08-03: --approve/--no-approve govern PROJECT-RESOURCE TRUST, NOT tool permissions; Pi has NO permission surface (see Pi leg)"
11
- verification_status: "Historical compatibility checks on the versions and dates in tested_against. These observations do not establish behavior on a later harness; verify its current format before applying the mapping."
9
+ docs_checked: "2026-09-25"
10
+ verification_status: "Verify the installed harness version and effective settings; a rule-parser result is not a native permission test."
12
11
  ---
13
12
 
14
13
  # Applying a permission policy
15
14
 
16
- ## Translation is best-effort — read this first
17
- This skill provides the policy schema and OpenRig's best current understanding of how to translate it to each harness. That guidance is **best-effort and version-stamped**: harness permission surfaces change frequently across versions, so a mapping that is correct today can drift on a later release. When you apply a config-surface policy:
18
- - **Verify against the current docs for your installed harness version.** Treat this skill's tables as version-stamped starting points (see `tested_against`), not settled truth.
19
- - **Prefer testing in a protected or disposable environment first.** An incorrect write can lock a seat out or over-permit it, so confirm the format before applying it to a live seat.
20
- - **Hand-editing via the harness's own settings tools is always a valid path.** If a translation is uncertain, setting the policy directly — or asking the user to — is a legitimate outcome, not a failure.
21
-
22
- The reliable, deterministic parts are the **blunt instruments**: the YOLO full-bypass flag and the floor (Claude `acceptEdits` / Codex `workspace-write`), which ride the stable launch-flag surface. **Fine-grained config-rule translation — the allow/ask/deny prefix rules and the Codex posture — is the best-effort part** and carries no guarantee of exact fidelity. If a translation looks wrong, fall back to a blunt instrument or a direct hand-edit.
23
-
24
- ## ⚠ Read this preamble first — why this is a SKILL, not a script (do not "improve" it into a deterministic updater)
25
- Harness permission formats are a **moving target**. The exact fact this skill is stamped against — Claude Code 2.1.220 permission rules are **prefix-only** (no flag-precise Bash match) — is *version-specific*; the rule grammar can change on the next point release. A hardcoded/deterministic updater would foot-gun the instant it does, and a wrong permission write can **lock a seat out or silently over-permit it**. So the maintained artifact is this caveated, version-stamped skill that an agent reads and applies **interactively, grounding in the live format** — never a code path that writes blindly. If you are tempted to replace this with a deterministic projector: that temptation is the bug this preamble exists to stop.
26
-
27
- ## When to reach for this
28
- - A rig/seat has a policy attached (`rig.yaml … permission_policy: <file>`), and you're at **setup/preflight** — apply it (**mandatory for autonomous seats**, see the freeze warning).
29
- - A user asks "apply the Standard/Open/Locked/Operator policy here" or "set up permissions like <host>".
30
- - NOT for authoring policies (that's the policy spec) and NOT for daemon-level enforcement (OpenRig is agnostic — it injects nothing).
31
-
32
- ## What you're translating (the boundary)
33
- INPUT = a **harness-neutral policy spec** (semantic action schema): `default_posture`, `floor`, `allow`/`ask`/`deny` as **semantic actions** (`push_to_remote`, `delete_files`, …), `destructive_class`, `source: builtin|custom`. You TRANSLATE that intent → the harness's live config. You never invent policy; you never pre-bake harness config into the spec.
34
-
35
- ## The apply flow (interactive — the interactive-ask IS the product)
36
- 1. **Read the policy spec** + its `source:` marker (built-in read-only from the package = copy-to-customize before editing; custom = user space).
37
- 2. **PREFLIGHT (mandatory) — ground yourself in THIS environment:**
38
- - **daemon-HOME must equal seat-HOME**, or a user-level Claude write never reaches the seat. Check; if they differ, **stop and ask** — do not write into the wrong HOME.
39
- - Read the harness's **actual current config file** + confirm its schema against your installed version (`claude --version`, the live settings.json shape, codex/pi versions). If the format differs from this skill's `tested_against`, trust the LIVE format and flag the drift.
40
- 3. **Derive the per-harness config** from the semantic actions (see the three legs below). Compute the Codex posture-collapse + Pi bit.
41
- 4. **Show the concrete DIFF before writing** (old → new, per file). Never a blind write.
42
- 5. **Resolve best-effort actions by the built-in's rule FIRST, then ask only on genuine ambiguity.** Best-effort destructive actions (`force_push`, `delete_files`, `delete_everything`, `read_secrets`) default to **`ask`** (never a `deny` that can't be enforced) — apply that default rather than stopping to question-back. Surface a question only when the policy is genuinely ambiguous or the seat is interactive. **For a same-prefix collision (`push_to_remote` vs `force_push`, both `Bash(git push:*)`), NEVER ask — apply the deterministic PREFIX-COLLISION rule in the Claude leg.** On a Claude-only fleet, if the policy denies `network_egress`, **say so explicitly**: it is NOT enforceable — Claude has no network gate, a `Bash(curl:*)`/`Bash(wget:*)` deny is best-effort, and `python`/`node` fetch bypasses it (live-verified: `urllib` reached HTTPS 200 under a curl/wget deny). Route real egress-gating to the Codex sandbox, or record it as advisory on Claude.
43
- 6. **Back up the current config**, then write. Prefer the **user-level** file (`~/.claude/settings.json`) for durable policy — it's the clobber-resistant tier (deny wins across the union). **ALWAYS include `defaultMode: "acceptEdits"` in the Claude settings.json you write** — the floor key must be PRESENT in the file, or the config policy strips the floor.
44
- 7. **Verify** the write landed and the seat can see it (re-read; confirm `defaultMode: "acceptEdits"` is present; for an autonomous seat, confirm no `ask` will freeze it).
45
-
46
- ## Two surfaces — and this skill writes only ONE of them
47
- Permissions live on two surfaces with opposite stability — which is the whole reason for the agent-driven split:
48
- - **LAUNCH-FLAG surface — STABLE (>1yr) → OpenRig sets it DETERMINISTICALLY, NOT this skill.** The flags OpenRig passes at boot: Claude `--permission-mode` / `--dangerously-skip-permissions`; Codex sandbox/bypass flags; Pi `--approve`/`--no-approve`. **Two things live here, both OpenRig-owned: the FLOOR (minimum, by default) and YOLO (full bypass, opt-in).**
49
- - **CONFIG-FILE surface — CHAOTIC → NEVER deterministic → THIS SKILL'S DOMAIN.** Claude `settings.json` allow/ask/deny + defaultMode; Codex `config.toml` approval rules. This is where the Locked / Standard / Open policies get applied — agent-driven, version-stamped, caveated. (Pi has **no permission surface at all** — its `--approve`/`--no-approve` flags govern project-resource trust, not tool permissions (VM-confirmed Pi 0.83.0); a permission policy does not translate to Pi. See the Pi leg.)
50
-
51
- **THE FLOOR (launch-flag, OpenRig-set — this skill KNOWS it, never WRITES it):** Claude `--permission-mode acceptEdits` (keep it); **Codex workspace-only** (stop forcing `danger-full-access` — ≈ Codex's own default ≈ setting-nothing = agnostic); Pi `--no-approve` (a project-resource-trust floor — Pi has no permission gate; see the Pi leg). **One consistent unconditional minimum**. A chosen config-file policy layers ON TOP of the floor.
52
-
53
- **YOLO MODE (launch-flag, OpenRig-set, opt-in — for people done with permissions):** OpenRig boots every seat with the full-bypass flag (Claude `--dangerously-skip-permissions`; Codex full-bypass). **When YOLO is on, CONFIG-FILE POLICY IS MOOT** — this skill does NOT apply a config policy (or explicitly notes it's overridden by the flag); don't fight the bypass. YOLO is OpenRig's deterministic job, not this skill's. (**Operator = YOLO mode** — subsumed.)
54
-
55
- ## The three harness legs (skill-owned mapping knowledge, version-stamped + caveated)
56
-
57
- ### Claude — `~/.claude/settings.json` (user-level, clobber-resistant)
58
- - **Action → prefix map** (VM-CONFIRMED @ Claude 2.1.220, 2026-08-03 — every row exercised through real Claude tool calls). `fidelity`: `clean` = the prefix honors intent; `best_effort` = prefix-only can't fully enforce → prefer `ask`, never a `deny` that lies.
59
-
60
- | Semantic action | `permissions.*` prefix rule(s) | fidelity |
61
- |---|---|---|
62
- | push_to_remote | `Bash(git push:*)` | clean |
63
- | force_push | ask the flag-first forms `Bash(git push --force:*)` `Bash(git push -f:*)` `Bash(git push --force-with-lease:*)`; base `Bash(git push:*)` follows push_to_remote (see the collision rule) | **best_effort** — catches flag-FIRST force; flag-LAST (`git push origin main --force`) leaks |
64
- | create_pr | `Bash(gh pr create:*)` | clean |
65
- | publish_package | `Bash(npm publish:*)` `Bash(pnpm publish:*)` `Bash(yarn publish:*)` `Bash(cargo publish:*)` | clean (multi-pattern) |
66
- | merge_or_release | `Bash(git merge:*)` `Bash(git tag:*)` `Bash(gh release:*)` | best_effort — protected-branch semantics not expressible |
67
- | delete_files | `Bash(rm:*)` | **best_effort** — target-first leak (`rm <t> -rf` slips); scope not boundable → default `ask` |
68
- | delete_everything | `Bash(rm -rf:*)` `Bash(rm -fr:*)` | **best_effort** — same leak → default to `ask`, never a silent deny |
69
- | reset_or_discard_vcs | `Bash(git reset:*)` `Bash(git clean:*)` `Bash(git checkout:*)` `Bash(git branch -D:*)` | best_effort |
70
- | drop_persistent_store | `Bash(dropdb:*)` `Bash(docker volume rm:*)` (+ project-specific) | best_effort (open-ended) → `ask` |
71
- | rig_up / rig_down | `Bash(rig up:*)` / `Bash(rig down:*)` | clean — ⚠ an `ask` here FREEZES an autonomous seat |
72
- | mutate_topology | `Bash(rig add:*)` `Bash(rig remove:*)` `Bash(rig rename:*)` | clean |
73
- | run_toolchain | `Bash(npm:*)` `Bash(npx:*)` `Bash(pnpm:*)` `Bash(yarn:*)` `Bash(node:*)` `Bash(tsc:*)` `Bash(vitest:*)` `Bash(jest:*)` | clean (the known set) |
74
- | run_arbitrary_shell | `Bash(*)` — this IS the `default_posture` knob | clean |
75
- | network_egress | `Bash(curl:*)` `Bash(wget:*)` (partial) | **best_effort** — Claude has NO native network gate; real floor = Codex sandbox (route it there) |
76
- | read_secrets | `Read(./.env)` `Read(~/.ssh/**)` `Read(**/*secret*)` (path-scoped) | **best_effort** — path-based, not secret-aware |
77
- | install_dependencies | `Bash(npm install:*)` `Bash(pip install:*)` `Bash(brew install:*)` | clean |
78
- - **PREFIX-ONLY caveat** — cannot flag-precisely gate (`force_push` vs `push_to_remote` both match `Bash(git push:*)`); **target-first leak** (`rm <target> -rf` slips a `Bash(rm -rf*)` deny). Actions marked `best_effort` in the taxonomy (`force_push`, `delete_files`, `read_secrets`) → surface the caveat and prefer `ask` over a `deny` you can't enforce (a `deny` that leaks lies).
79
- - **PREFIX-COLLISION resolution (deterministic — resolve it, NEVER ask).** When two actions collapse to the SAME base prefix with different dispositions — the canonical case is `push_to_remote`=allow + `force_push`=ask, both basing to `Bash(git push:*)` — you cannot put that base prefix in both `allow` and `ask`. Resolve without a question-back:
80
- - **Push allowed + force asked (Standard / Open):** put the base `Bash(git push:*)` per push's disposition (`allow`), AND add the flag-first force forms to `ask` (`Bash(git push --force:*)`, `Bash(git push -f:*)`, `Bash(git push --force-with-lease:*)`). RECORD in your diff that this is best-effort — flag-LAST force (`git push origin main --force`) leaks past the flag-first ask rules and runs under the allow. Don't block on it.
81
- - **Push denied (Locked):** `Bash(git push:*)` in `deny` already covers force — no conflict.
82
- This is a FIXED rule, not a user decision — apply it and note the leak.
83
- - **`defaultMode: "acceptEdits"` is the FLOOR and MUST be written into every Claude settings.json you produce.** It is not a knob you tune, but it IS a key you must always include — a config policy that omits it strips the floor. Live-confirmed schema: `{"permissions":{"allow":[],"ask":[],"deny":[],"defaultMode":"acceptEdits"}}`.
84
-
85
- ### Codex — `~/.codex/config.toml` (via the existing `codex_config_fragment` splice path — reuse, don't invent)
86
- - Codex is **per-posture, not per-action**: the whole action set **collapses** to the nearest `{sandbox_mode, approval_policy}` pair. **Built-in → posture** (VM-CONFIRMED @ Codex 0.120.0, 2026-08-03 — each posture applied to a real seat: read-only blocked writes+egress, workspace-write allowed writes/blocked egress, danger-full-access allowed both):
87
-
88
- | Built-in | `sandbox_mode` | `approval_policy` | Collapse note (surface this to the user) |
89
- |---|---|---|---|
90
- | Locked | `read-only` | `on-request` | read-only blocks all writes + egress, prompts on escalation — OVER-restricts `edit_files` vs the Claude floor |
91
- | Standard ⭐ | `workspace-write` | `on-request` | workspace writes allowed, egress blocked by sandbox, prompt on escalation — UNDER-gates `create_pr` (no per-action ask; folds into the prompt) |
92
- | Open | `danger-full-access` | `on-failure` | everything allowed, prompt only on failure — OVER-permits the `destructive_class` vs the Claude ask-gates |
93
- | YOLO | *(flag-surface — full-bypass launch flag, NOT config.toml)* | — | not a config write; the rip-out adapter owns it |
94
-
95
- Valid values (VM-confirmed @ Codex 0.120.0): `sandbox_mode` ∈ {read-only, workspace-write, danger-full-access}; `approval_policy` ∈ {on-request, on-failure, never, untrusted, granular} (`granular` observed live at 0.120.0). ⚠ `on-failure` (used by Open) is marked **deprecated** in 0.120.0 help but still accepted — revisit if a future Codex drops it.
96
- - Surface the collapse: "Codex can't gate per-action; this policy becomes sandbox=X approval=Y, which over-permits Z / under-permits W."
97
-
98
- ### Pi — NO permission surface at all (VM-confirmed Pi 0.83.0 — the earlier "approval bit" reading was WRONG)
99
- - **Pi has no tool-permission gate — neither a config store NOR a permission-posture flag.** Live verification confirmed: Pi 0.83.0's `--approve`/`-a` and `--no-approve`/`-na` govern **project-resource trust** (whether project extensions/resources appear in RPC `get_commands`), **NOT** tool-call approval. There is no sandbox or permission mechanism to map a policy onto.
100
- - So a permission policy **does not translate to Pi**. Do NOT say `--approve` = "auto-approve all", or that a posture "collapses to a Pi approval bit" — that was an earlier misread, corrected here. This skill computes **nothing** for Pi.
101
- - Whatever the OpenRig adapter sets (`--no-approve` by default) is a project-resource-trust floor, not a permission posture — not this skill's to derive.
102
- - Behavior to know (resource-trust, NOT permission-gating): under default ask / `--no-approve`, a project resource is silently **absent** from RPC `get_commands`; it appears under `--approve`. Never mistake that for permission enforcement.
103
- - **Say this to the user for a Pi seat:** "Pi has no permission-policy surface today — the policy applies to Claude/Codex; Pi runs under its project-resource-trust flag unchanged."
104
-
105
- ## ⚠ The two warnings that save real fleets
106
- - **`ask` FREEZES an autonomous/headless Claude seat** — it hangs on the first non-edit op. So for autonomous fleets apply **Open/YOLO** (or a policy with no asks) **at setup** — the floor only covers edits; bash still asks without an applied policy. Never leave an autonomous seat on a policy with live `ask` gates. (Pi has no permission ask at all — see the Pi leg; Codex prompts per its posture, not per-action.)
107
- - **daemon-HOME ≠ seat-HOME** silently voids user-level writes — always the preflight check above.
108
-
109
- ## The built-ins — DEFINED by the shipped policy spec files (translate FROM the spec; POINT, don't COPY)
110
- The four built-in policies ship as read-only spec files (`source: builtin`, `policy_schema_version: 1`) — they are the AUTHORITATIVE definitions. **Do NOT restate their action-sets here.** The selected spec supplies the action sets; a second copy in this skill can diverge. Read the attached/selected spec and translate its semantic-action sets (`default_posture` / `allow` / `ask` / `deny` / `destructive_class`) per the three legs above.
111
- - **Locked / Standard ⭐ / Open** — `surface: config`. Translate to the Claude / Codex config surface. **Standard ⭐** is the recommended default: routine dev incl. push allowed, the outward/release/history-rewriting acts (`create_pr`, `publish_package`, `merge_or_release`, `force_push`) ASK, destructive_class ASKs. Standard has live `ask` gates → not for a headless-autonomous Claude seat (use Open or YOLO). Locked = deny-default whitelist; Open = allow-default, destructive_class asks only.
112
- - **YOLO** — `surface: flag`, `launch_posture: full_bypass`. This skill does **NOT** translate it — it points at OpenRig's deterministic flag-surface opt-in (the rip-out YOLO setting). When YOLO is on, any config-surface policy is MOOT (the bypass overrides it). (Subsumes the former "Operator".)
113
-
114
- Built-ins ship read-only in the package (canonical names); copy-to-customize into user space (custom, user-named); the `source:` frontmatter marker travels on copy. Onboarding presents these as a required MENU (explain each + ask which; no-choice = the floor).
115
-
116
- ## Boundary (keeps this the only maintained piece)
117
- This skill TRANSLATES + APPLIES only. It does **not** define policies (the policy spec does) and does **not** enforce at the daemon (OpenRig is agnostic). Spec = *what* (neutral intent); this skill = *how, on this harness version* (the caveated, version-stamped translation).
15
+ Configure the user's chosen permissions in the harness that runs the agent.
16
+ OpenRig operating posture, native command rules, sandbox access and launch flags
17
+ are separate controls. A command rule grants execution capability, not authority
18
+ to invent tasks, publish work or change another host.
19
+
20
+ ## Choose the intended scope
21
+
22
+ Use an existing explicit choice; otherwise explain these options and ask which
23
+ the user wants. Do not ask again for routine steps already authorized.
24
+
25
+ | Choice | What the agent configures |
26
+ | --- | --- |
27
+ | Keep prompts | Preserve current native settings and handle requests when they arise. |
28
+ | Remember selected commands | Add native allow rules for the chosen family or narrower verbs, leaving other rules and sandbox settings intact. |
29
+ | Broader permissive operation | Explain filesystem/network exposure and configure only the explicitly selected native mode and compatible launch settings. |
30
+
31
+ **Allowing the whole `rig` family covers all its verbs**, including lifecycle,
32
+ topology/config changes and commands that can launch other processes. It is not
33
+ a read-only grant. Offer narrower prefixes such as `rig ps` or `rig queue list`
34
+ when that better fits the request. Do not widen a choice to arbitrary shell
35
+ execution, an entire interpreter or a generic shell wrapper.
36
+
37
+ ## Apply the choice for the user
38
+
39
+ 1. Identify the target seat, executable/version, launch settings and config roots:
40
+ `HOME`, `CODEX_HOME` or `CLAUDE_CONFIG_DIR` as applicable. They may differ between
41
+ operator, daemon and seat. Resolve the intended user's/project's files before
42
+ writing; do not repair another home to make the paths agree.
43
+ 2. Read relevant existing permission rules and managed restrictions. Select the
44
+ intended scope: one project or the user's sessions. Consult installed native
45
+ help and official references below when formats differ.
46
+ 3. Prepare a concrete diff. Preserve deny/ask rules, approval/sandbox posture,
47
+ hooks, auth, MCP, model settings and unrelated values. An allow must not erase
48
+ a stricter rule or managed requirement. Report a real conflict instead of
49
+ silently bypassing it.
50
+ 4. Back up touched files and merge only authorized additions, avoiding duplicates.
51
+ The agent performs these edits; hand-editing is an option, not a required user
52
+ chore. Apply the selected scope without another conversational permission round.
53
+ Native enforcement still applies.
54
+ 5. Read back the diff and validate the format. Confirm how that version loads
55
+ changes. If it requires a new session, preserve work and use its supported
56
+ resume path within the user's authority; a file write does not prove that an
57
+ existing conversation loaded it.
58
+ 6. Verify an ordinary matching operation twice in the target conversation and
59
+ check that an unrelated command gained no matching rule. Use harmless reads,
60
+ not destructive probes. Report effective settings and remaining prompts.
61
+ A parser match alone does not establish native behavior.
62
+
63
+ For rollback, remove only this setup's additions, preserving later unrelated
64
+ edits. Builtin policy specs remain read-only; customize in user space.
65
+
66
+ ## Codex command rules
67
+
68
+ Codex command rules can allow matching commands outside the sandbox without
69
+ another prompt. They leave other sandbox/network settings unchanged.
70
+ Check `codex --version` and `codex execpolicy check --help`.
71
+ See the [official rules reference](https://learn.chatgpt.com/docs/agent-configuration/rules).
72
+
73
+ Choose the destination **before writing**, according to the user's scope:
74
+
75
+ - **This project only:** verify the installed version supports project rules and
76
+ derive this session's actual project/worktree config root and trust state.
77
+ Current docs describe `<repo>/.codex/rules/` in a trusted project config layer.
78
+ Use that layer only after confirming it is supported, active and trusted for
79
+ the intended project. If any of those facts is unsupported or unverified,
80
+ report the limitation and leave user-layer rules unchanged; do not silently
81
+ mark a project trusted or substitute a user-wide allowance.
82
+ - **Explicitly user-wide:** use `rules/` under the target user's actual
83
+ `CODEX_HOME` (normally `~/.codex/rules`). This can affect other projects using
84
+ that home. The TUI's remember-allow action also writes a user-layer rule;
85
+ do not use it to implement a project-only request.
86
+
87
+ Merge the chosen rule into a `.rules` file in the selected layer. The prefix
88
+ itself has no project restriction; even a project-layer rule does not constrain
89
+ which targets an allowed `rig` command can affect:
90
+
91
+ ```python
92
+ prefix_rule(pattern = ["rig"], decision = "allow")
93
+ ```
94
+
95
+ For narrower access use `["rig", "ps"]` or `["rig", "queue", "list"]`, adjusting
96
+ examples. For absolute-path invocations, derive the target seat's actual `rig`
97
+ executable and add that exact path as a separate prefix; a bare rule does not
98
+ match it. Never copy another machine's path.
99
+
100
+ ```sh
101
+ codex execpolicy check --pretty --rules /absolute/path/to/openrig.rules -- rig ps --json
102
+ codex execpolicy check --pretty --rules /absolute/path/to/openrig.rules -- printf permission-check
103
+ ```
104
+
105
+ Inspect matches, not only exit status; repeat `--rules` for other effective
106
+ files. A matching `prompt` or `forbidden` overrides allow. Verify rule loading
107
+ in the target conversation after the required reload. For project-only scope,
108
+ confirm the layer is active there and absent from an unrelated project's active
109
+ layers. An evaluator given an explicit `--rules` file proves matching, not that
110
+ scope or automatic loading. Existing user-wide rules may already permit the
111
+ same command: preserve and disclose them, attribute matches, and do not claim
112
+ project isolation or remove those rules without a separate authorized choice.
113
+
114
+ The standalone evaluator checks supplied argv; native shell parsing can split
115
+ ordinary commands/chains first. A raw `zsh -lc` non-match does not prove that
116
+ native `rig && rig` fails. Verify both surfaces without broadening the rule to
117
+ `bash`, `sh`, `node` or generic wrappers.
118
+
119
+ ## Claude Code command rules
120
+
121
+ Check `claude --version` and [official permission syntax](https://code.claude.com/docs/en/permissions).
122
+ Merge the chosen entry into existing `permissions.allow`; this fragment is not
123
+ a replacement settings file:
124
+
125
+ ```json
126
+ {
127
+ "permissions": {
128
+ "allow": ["Bash(rig *)"]
129
+ }
130
+ }
131
+ ```
132
+
133
+ Current syntax uses ` *` for a command family; `Bash(rig:*)` is also supported.
134
+ Narrower examples are `Bash(rig ps *)` and `Bash(rig queue list *)`.
135
+ Preserve `deny`/`ask` entries and `defaultMode`; do not add `Bash(*)` or switch
136
+ to bypass to resolve a mismatch. Inspect native `/permissions` and verify the
137
+ actual command spelling.
138
+
139
+ Choose scope using the [settings reference](https://code.claude.com/docs/en/settings):
140
+ `.claude/settings.local.json` for personal project settings,
141
+ `.claude/settings.json` for deliberately shared project settings, or
142
+ `settings.json` under the target's `CLAUDE_CONFIG_DIR` (normally `~/.claude`).
143
+ Confirm the effective project root, especially for worktrees. Keep personal
144
+ settings out of commits. Managed restrictions and sandbox/network controls
145
+ still apply; a Bash allow is not a general network policy.
146
+
147
+ ## Existing policies and broader modes
148
+
149
+ For a named policy, read its actual `permission_policy` spec and `source` marker.
150
+ Translate intended actions using supported native controls; do not collapse all
151
+ Codex policies to a single posture or claim shell patterns perfectly express
152
+ semantic actions such as force-push. Preserve stricter rules. If exact translation
153
+ is unavailable, explain the remaining choice instead of selecting broader access.
154
+
155
+ For explicitly chosen broader operation, inspect
156
+ `rig policy current --spec <user-owned-rig.yaml>` and the compatible getting-started guide's **Opt-in permissive
157
+ operation** section. OpenRig's Codex `builtin:yolo` supplies `-s danger-full-access`;
158
+ it does not itself select `approval_policy` and replaces a named
159
+ `codex_config_profile` argument. Claude's corresponding launch flag is
160
+ `--dangerously-skip-permissions`. Neither a resource `profile: default` nor OpenRig
161
+ operating posture is a native permission policy. Do not change shipped defaults
162
+ or assume editing a launch spec changes an existing seat.
163
+
164
+ A headless seat may wait at a native prompt. Arrange an answer path or choose
165
+ suitable command rules; unattended work is not implicit consent to bypass.
166
+ For Pi, the previously supported `--approve`/`--no-approve` surface concerns
167
+ project-resource trust, not shell permissions; verify its installed capabilities
168
+ instead of treating those flags as a command allowlist.
@@ -1,10 +1,10 @@
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: "applying-a-permission-policy"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
- purpose: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
6
+ purpose: "Use when a user asks an agent to configure OpenRig command permissions, reduce repeated native approval prompts, or apply a selected rig/seat permission policy."
7
7
  files:
8
8
  - path: "SKILL.md"
9
9
  role: "instruction"
10
- summary: "Use when a permission policy is attached to a rig/seat (rig.yaml permission_policy:), or a user asks you to apply one, and you must translate that harness-neutral policy into the target harness's LIVE permission config — Claude settings.json / Codex config.toml / Pi run flags. Agent-driven and interactive: you read the policy, ground yourself in YOUR harness version, show the diff, and ask before writing. NOT for defining policies (that's the policy spec) and NOT a set-and-forget updater."
10
+ summary: "Use when a user asks an agent to configure OpenRig command permissions, reduce repeated native approval prompts, or apply a selected rig/seat permission policy."
@@ -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: "claude-compaction-restore"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when a Claude Code session has just compacted, is about to compact, reached context limit, resumed after /compact, or needs to rebuild its working mental model from Claude JSONL transcripts and touched files."
7
7
  files:
@@ -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: "agent-starters"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when creating, refreshing, packaging, inspecting, promoting, or deprecating a named per-seat starting point — Agent Starter manifest authoring, the 6-state lifecycle (captured → named → inspectable → used → promoted → deprecated), provenance honesty, and refusal rules. NOT a VM image; a managed starting point composed from agent role + startup context + optional native session source + provenance."
7
7
  files:
@@ -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: "agent-startup-and-context-ingestion"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when designing or auditing how an agent becomes useful after launch — AGENTS.md overlays, role files, skills, rig specs, workflow specs, startup checklists, refocus messages, \"rig context\" surface. Covers the 4 failure modes that make startup context fail (old rig spec misses current operating mode; current agents never told about new guidance; startup file as dumping ground; orchestrator transmits implementation without preserving product intent)."
7
7
  files:
@@ -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: "cross-host-rig-commands"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when addressing a registered remote OpenRig host, choosing its transport, or interpreting a cross-host result."
7
7
  files:
@@ -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: "human-in-the-loop"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when classifying a slice closeout (auto-continue / human gate / park), routing a real decision to a human, or designing a human queue/dashboard surface. Treats humans as durable network participants with attention surfaces, queues, and decision records — escalation lands as a durable attention item, not a chat message. Approval is NOT required for every clean closeout; the default RSI conveyor continues unless an explicit human gate is reached."
7
7
  files:
@@ -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: "messaging-the-human"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when project policy calls for a human decision or update, a human delivery is pending or failed, or a reply must resume the right work."
7
7
  files:
@@ -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: "openrig-architect"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when designing multi-agent topologies that run ON OpenRig — authoring RigSpec and AgentSpec files for new rigs, creating agent startup content (guidance / skills / culture), or diagnosing why a launched rig's agents aren't behaving as intended. NOT for changing OpenRig itself (use openrig-builder); NOT for ordinary CLI operation of an existing rig (use openrig-user). Covers the full authoring lifecycle from user intent to validated, launchable rig."
7
7
  files:
@@ -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: "openrig-cmux"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when opening OpenRig fleet terminals into cmux — turning a rig, pod, mission, slice, or saved view into live agent tiles via `rig terminal --provider cmux`, or driving cmux on an agent's request. Same OpenRig view semantics as openrig-herdr (the verbs, honest-partial/degrade, read-only cross-rig, scroll/copy, same-size-only duplicates); cmux is the **best-effort** provider (herdr is the default and the proof-gated one). Prefer openrig-herdr unless cmux is specifically wanted."
7
7
  files:
@@ -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: "openrig-herdr"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when opening OpenRig fleet terminals as a herdr wall — turning a rig, pod, mission, slice, or saved view into live interactive agent tiles via `rig terminal`, watching another rig read-only, or driving herdr on an agent's request (\"open all my rigs + a mission as views\"). Covers the `rig terminal open|views|status` verbs, the honest-partial/degrade reading of the result, the read-only-by-construction rail for cross-rig views, scroll/copy out of the box, and the same-size-only duplicate-pane "
7
7
  files:
@@ -71,6 +71,7 @@ These are auto-delivered to every rig; their name+description are already in you
71
71
  ### Load when your role or task calls for it (repo-shipped, profile-selected)
72
72
  These ship in the OpenRig repo and reach a seat when its profile selects them. To use one, select it in your profile's `uses.skills`, or open it directly at `packages/daemon/specs/agents/shared/skills/core/<skill>/SKILL.md`.
73
73
 
74
+ - **openrig-software-factory** — a user wants continuing reviewed work: manual/team, queue-only orchestration or an explicit Workflow; add one or two seats to the running starter when useful, with context, ownership, concurrency, spend and permission limits. Load `rig context get skills/core/openrig-software-factory/SKILL.md`.
74
75
  - **openrig-architect** — authoring a rig or topology (NOT for changing OpenRig itself — that's `openrig-builder`).
75
76
  - **openrig-cmux** — driving the `cmux` terminal provider.
76
77
  - **openrig-herdr** — opening/managing seat terminals via the default proof-gated provider.
@@ -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: "openrig-skills"
4
- version: "0.5.14"
4
+ version: "0.5.16"
5
5
  taxonomy: "skills"
6
6
  purpose: "Use when you're operating OpenRig and need the right skill or context for fleet recovery, seat handover, new-seat orientation, a watchdog wake, cross-host reach to an agent on another machine, rig packaging, an OpenRig upgrade, systematic debugging, queue triage, or implementation planning; also use when you don't know what applies or nothing is projected on cold boot."
7
7
  files:
@@ -0,0 +1,138 @@
1
+ ---
2
+ name: openrig-software-factory
3
+ description: >-
4
+ Use when a user wants a continuing software team for a real repository, or has a
5
+ first OpenRig team and needs a repeatable path for reviewed work and later tasks.
6
+ metadata:
7
+ cli_surfaces_referenced:
8
+ - context get
9
+ - context list
10
+ - context show
11
+ - grow
12
+ - queue create
13
+ - queue handoff
14
+ - workflow compile
15
+ - workflow instantiate-lifecycle
16
+ openrig:
17
+ stage: WIP
18
+ transfer_test: pending
19
+ ---
20
+
21
+ # OpenRig Software Factory
22
+
23
+ Start with a useful repository outcome and add coordination when it earns its
24
+ cost. A beginner can complete reviewed work without Workflow. These are choices
25
+ using existing capabilities, not stages everyone must graduate through.
26
+
27
+ ## Choose how the team works
28
+
29
+ | Need | Start here | Add more when… |
30
+ | --- | --- | --- |
31
+ | One change, close human guidance | Manual/team work: give an owner the outcome, use repository instructions, implement and obtain the chosen independent check. | Work must survive turns or move between seats. |
32
+ | Continuing work with visible ownership | Queue-supported orchestration: use `rig queue create`, claim work, then `rig queue handoff` with the candidate/evidence to the next owner. Record real blockers and the continuation. No Workflow instance is needed. | Repeated steps need an explicit dependency graph and permitted exits. |
33
+ | An explicit execution contract | Workflow: inspect `rig workflow compile`, then deliberately use `rig workflow instantiate-lifecycle`. Advance its packets through the workflow projection mechanism. | The actual project needs reusable profiles, additional roles or gates. |
34
+
35
+ For the concrete queue loop, wake behavior and optional two-slice Workflow,
36
+ read [references/worked-example.md](references/worked-example.md). Installed copy:
37
+ `rig context get skills/core/openrig-software-factory/references/worked-example.md`.
38
+ A roadmap, YAML file or wake does not execute work or authorize a new outcome.
39
+
40
+ ## Establish the working agreement
41
+
42
+ Read the repository instructions, current work and desired user-visible result.
43
+ Verify the intended instance, code/work roots, real seat addresses and native
44
+ readiness. Reuse a suitable small team; an existing agent can bootstrap it.
45
+ A kernel operator is optional and is not automatically the project owner.
46
+
47
+ Agree the work boundary, time/spend limit, who answers unresolved choices, and
48
+ when to stop: checked result, no authorized next work, exhausted budget, or a real
49
+ user/permission/provider blocker. Background daemon checks are not themselves
50
+ model turns, but delivered wakes and resumed work **can spend tokens**. Prefer
51
+ an event-driven wait to frequent empty reminders. Wakes cannot answer a user
52
+ question, clear a permission prompt or guarantee progress.
53
+
54
+ **Choose permissions before launching or assigning work.** Offer ordinary prompts,
55
+ persistent rules for selected commands, or deliberately broader access. Follow
56
+ [Applying a permission policy](#find-the-compatible-permission-guide) to perform
57
+ the user's choice and verify it in the target conversation. Preserve restrictions
58
+ and unrelated settings. A whole `rig` allowance covers every verb, not just reads;
59
+ it does not grant new product authority or change everyone else's defaults.
60
+
61
+ Keep purpose, acceptance, decisions and evidence in existing project files.
62
+ Deliver selected context and obtain each seat's scope reaction; retrieval alone
63
+ is not peer delivery. The owner carries the candidate through the chosen check
64
+ and bounded repairs, reports how to try it, and retains the next authorized task
65
+ or explicitly reports none. Preserve work and custody before a supported stop.
66
+
67
+ ## Grow your factory
68
+
69
+ Choose the team size separately from the coordination method above:
70
+
71
+ 1. **Use the two-agent starter.** Keep the existing owner and independent checker
72
+ while that pair meets the workload. The owner can implement and coordinate.
73
+ 2. **Add one or two seats to the running rig.** This is the usual next step.
74
+ Follow [Grow the running team](references/worked-example.md#grow-the-running-team)
75
+ for `rig grow` commands, readiness/context/work
76
+ assignment, and saving the expanded topology. Existing sessions need no
77
+ rebuild or down/up cycle solely to add capacity.
78
+ 3. **Author a custom rig when you want a different structure.** Read
79
+ [OpenRig Architect](../openrig-architect/SKILL.md), available through
80
+ `rig context get skills/core/openrig-architect/SKILL.md`. Request:
81
+ “Design a user-owned rig for [outcome] using the compatible RigSpec/AgentSpec
82
+ guidance. Reuse suitable agents, define responsibilities and context, and
83
+ validate the files. Preserve the existing rig and agree any new launch.”
84
+
85
+ As independent work grows, the original owner can concentrate on orchestration,
86
+ multiple builders can implement separate outcomes, and the checker can retain
87
+ independent review capacity. Record that division explicitly; adding seats does
88
+ not assign work, change permissions or create parallelism. Agree file/worktree
89
+ boundaries and integration ownership, follow the project's existing review policy,
90
+ and keep active concurrency within the user's time/spend budget. Two seats are
91
+ an entry point, not a finished factory or a maximum.
92
+
93
+ ## Read compatible guidance
94
+
95
+ Before installation, use this file and companion at the same published tag or
96
+ commit as the selected package. After installation:
97
+
98
+ ```sh
99
+ rig --version
100
+ rig context list --json
101
+ rig context show skills/core/openrig-software-factory --json
102
+ rig context get skills/core/openrig-software-factory/SKILL.md
103
+ ```
104
+
105
+ Compare build identity as well as version. Preserve missing, unreadable or older
106
+ recipe results; do not silently substitute newer main or skip a missing companion.
107
+
108
+ ### Find the compatible permission guide
109
+
110
+ Retrieve the maintained procedure with
111
+ `rig context get skills/applying-a-permission-policy/SKILL.md`.
112
+ For source or archive readers, locate it below; the companion getting-started
113
+ guide contains optional broader launch-mode recipes under **Opt-in permissive
114
+ operation**. These paths are relative to the named root, not this skill:
115
+
116
+ | Reading from | Procedure and guide, at the same version as this recipe |
117
+ | --- | --- |
118
+ | Source checkout, including `skills/_canonical` | Below the repository root: `packages/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md` and `docs/reference/getting-started.md`. |
119
+ | npm installation | Below the matching `npm root -g` or local `npm root`: `@openrig/cli/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md` and `@openrig/cli/daemon/docs/reference/getting-started.md`. |
120
+ | Unpacked npm archive | Below the extraction directory: `package/daemon/assets/plugins/openrig-core/skills/applying-a-permission-policy/SKILL.md` and `package/daemon/docs/reference/getting-started.md`. |
121
+
122
+ For installed guidance, use the npm installation that supplies the selected
123
+ `rig` executable; another prefix or local project can contain a different version.
124
+ If the matching guide or section is missing, report the gap before proceeding;
125
+ do not substitute current main or guidance from another installation.
126
+
127
+ ## Request to give your agent
128
+
129
+ > Help me achieve [observable change] in this repository. Read the compatible
130
+ > Software Factory recipe, choose the lightest useful team/queue/Workflow path,
131
+ > and keep the next owner visible. Preserve existing files and permissions.
132
+ > Agree time/spend limits, perform the authorized work and chosen independent
133
+ > check, and ask only about unresolved decisions or effects outside that scope.
134
+ > Keep publication and destructive changes out of this task.
135
+
136
+ When commands, defaults or permission semantics change, check this source and
137
+ companion together and regenerate their existing projections. Website guidance
138
+ should link to the same versioned recipe, not maintain another procedure.
@@ -0,0 +1,12 @@
1
+ # GENERATED by scripts/generate-context-packs.mjs — DO NOT EDIT.
2
+ # Package-time projection of a canonical skill; regenerated every build.
3
+ name: "openrig-software-factory"
4
+ version: "0.5.16"
5
+ taxonomy: "skills"
6
+ purpose: "Use when a user wants a continuing software team for a real repository, or has a first OpenRig team and needs a repeatable path for reviewed work and later tasks."
7
+ files:
8
+ - path: "SKILL.md"
9
+ role: "instruction"
10
+ summary: "Use when a user wants a continuing software team for a real repository, or has a first OpenRig team and needs a repeatable path for reviewed work and later tasks."
11
+ - path: "references/worked-example.md"
12
+ role: "reference"