@openrig/cli 0.1.8 → 0.1.10

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 (87) hide show
  1. package/daemon/dist/adapters/claude-code-adapter.d.ts +14 -0
  2. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  3. package/daemon/dist/adapters/claude-code-adapter.js +103 -8
  4. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  5. package/daemon/dist/adapters/cmux-transport.d.ts +7 -2
  6. package/daemon/dist/adapters/cmux-transport.d.ts.map +1 -1
  7. package/daemon/dist/adapters/cmux-transport.js +149 -24
  8. package/daemon/dist/adapters/cmux-transport.js.map +1 -1
  9. package/daemon/dist/adapters/cmux.d.ts.map +1 -1
  10. package/daemon/dist/adapters/cmux.js +1 -0
  11. package/daemon/dist/adapters/cmux.js.map +1 -1
  12. package/daemon/dist/adapters/codex-runtime-adapter.d.ts +11 -0
  13. package/daemon/dist/adapters/codex-runtime-adapter.d.ts.map +1 -1
  14. package/daemon/dist/adapters/codex-runtime-adapter.js +65 -7
  15. package/daemon/dist/adapters/codex-runtime-adapter.js.map +1 -1
  16. package/daemon/dist/domain/graph-projection.d.ts +2 -2
  17. package/daemon/dist/domain/graph-projection.d.ts.map +1 -1
  18. package/daemon/dist/domain/native-resume-probe.d.ts.map +1 -1
  19. package/daemon/dist/domain/native-resume-probe.js +11 -0
  20. package/daemon/dist/domain/native-resume-probe.js.map +1 -1
  21. package/daemon/dist/domain/pod-bundle-assembler.d.ts.map +1 -1
  22. package/daemon/dist/domain/pod-bundle-assembler.js +10 -0
  23. package/daemon/dist/domain/pod-bundle-assembler.js.map +1 -1
  24. package/daemon/dist/domain/rigspec-codec.d.ts.map +1 -1
  25. package/daemon/dist/domain/rigspec-codec.js +2 -0
  26. package/daemon/dist/domain/rigspec-codec.js.map +1 -1
  27. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  28. package/daemon/dist/domain/rigspec-schema.js +28 -0
  29. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  30. package/daemon/dist/domain/session-registry.d.ts +1 -1
  31. package/daemon/dist/domain/session-registry.d.ts.map +1 -1
  32. package/daemon/dist/domain/session-registry.js.map +1 -1
  33. package/daemon/dist/domain/startup-orchestrator.d.ts +1 -1
  34. package/daemon/dist/domain/startup-orchestrator.d.ts.map +1 -1
  35. package/daemon/dist/domain/startup-orchestrator.js +21 -22
  36. package/daemon/dist/domain/startup-orchestrator.js.map +1 -1
  37. package/daemon/dist/domain/types.d.ts +6 -2
  38. package/daemon/dist/domain/types.d.ts.map +1 -1
  39. package/daemon/dist/startup.d.ts.map +1 -1
  40. package/daemon/dist/startup.js +14 -0
  41. package/daemon/dist/startup.js.map +1 -1
  42. package/daemon/docs/reference/agent-spec.md +411 -0
  43. package/daemon/docs/reference/agent-startup-guide.md +358 -0
  44. package/daemon/docs/reference/edge-types.md +126 -0
  45. package/daemon/docs/reference/rig-bundle.md +367 -0
  46. package/daemon/docs/reference/rig-spec.md +479 -0
  47. package/daemon/specs/agents/product-management/pm/agent.yaml +37 -0
  48. package/daemon/specs/agents/product-management/pm/guidance/role.md +43 -0
  49. package/daemon/specs/agents/shared/agent.yaml +17 -0
  50. package/daemon/specs/agents/shared/skills/pm/backlog-capture/SKILL.md +43 -0
  51. package/daemon/specs/agents/shared/skills/pm/context-builder/SKILL.md +87 -0
  52. package/daemon/specs/agents/shared/skills/pm/exec-summary/SKILL.md +84 -0
  53. package/daemon/specs/agents/shared/skills/pm/office-hours/SKILL.md +129 -0
  54. package/daemon/specs/agents/shared/skills/pm/plan-review/SKILL.md +98 -0
  55. package/daemon/specs/agents/shared/skills/pm/requirements-writer/SKILL.md +113 -0
  56. package/daemon/specs/agents/shared/skills/pm/ui-mockup/SKILL.md +76 -0
  57. package/daemon/specs/agents/shared/skills/rig-architect/SKILL.md +342 -0
  58. package/daemon/specs/rigs/focused/pm-team/CULTURE.md +17 -0
  59. package/daemon/specs/rigs/focused/pm-team/rig.yaml +51 -0
  60. package/dist/bin-wrapper.js +0 -0
  61. package/dist/commands/daemon.d.ts.map +1 -1
  62. package/dist/commands/daemon.js +3 -2
  63. package/dist/commands/daemon.js.map +1 -1
  64. package/dist/commands/doctor.d.ts +6 -1
  65. package/dist/commands/doctor.d.ts.map +1 -1
  66. package/dist/commands/doctor.js +53 -10
  67. package/dist/commands/doctor.js.map +1 -1
  68. package/dist/commands/setup.d.ts +48 -0
  69. package/dist/commands/setup.d.ts.map +1 -0
  70. package/dist/commands/setup.js +457 -0
  71. package/dist/commands/setup.js.map +1 -0
  72. package/dist/daemon-lifecycle.d.ts +7 -0
  73. package/dist/daemon-lifecycle.d.ts.map +1 -1
  74. package/dist/daemon-lifecycle.js +116 -19
  75. package/dist/daemon-lifecycle.js.map +1 -1
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +2 -0
  78. package/dist/index.js.map +1 -1
  79. package/package.json +1 -1
  80. package/ui/dist/assets/index-DlMH-REm.css +1 -0
  81. package/ui/dist/assets/{index-CXZYxZbF.js → index-lEO-zBxz.js} +26 -26
  82. package/ui/dist/index.html +2 -2
  83. package/dist/commands/claim.d.ts +0 -4
  84. package/dist/commands/claim.d.ts.map +0 -1
  85. package/dist/commands/claim.js +0 -40
  86. package/dist/commands/claim.js.map +0 -1
  87. package/ui/dist/assets/index-BsXbqPEl.css +0 -1
@@ -0,0 +1,479 @@
1
+ # RigSpec Reference
2
+
3
+ Version: 0.2 (pod-aware)
4
+ Last validated against code: 2026-04-11
5
+ Source of truth: `packages/daemon/src/domain/rigspec-schema.ts`, `packages/daemon/src/domain/types.ts`
6
+
7
+ This is the canonical reference for the pod-aware RigSpec YAML format. Every field, validation rule, and default documented here was traced from the actual parser and validator code, not from prior documentation.
8
+
9
+ ---
10
+
11
+ ## Minimal Valid Example
12
+
13
+ ```yaml
14
+ version: "0.2"
15
+ name: my-rig
16
+
17
+ pods:
18
+ - id: dev
19
+ label: Development
20
+ members:
21
+ - id: impl
22
+ agent_ref: "local:agents/impl"
23
+ profile: default
24
+ runtime: claude-code
25
+ cwd: "."
26
+ edges: []
27
+
28
+ edges: []
29
+ ```
30
+
31
+ ## Complete Example (all features)
32
+
33
+ ```yaml
34
+ version: "0.2"
35
+ name: my-product-team
36
+ summary: A full product squad with orchestration, development, and review pods.
37
+
38
+ culture_file: culture/CULTURE.md
39
+
40
+ docs:
41
+ - path: SETUP.md
42
+ - path: README.md
43
+
44
+ startup:
45
+ files:
46
+ - path: guidance/team-norms.md
47
+ delivery_hint: guidance_merge
48
+ required: true
49
+ actions: []
50
+
51
+ services:
52
+ kind: compose
53
+ compose_file: docker-compose.yaml
54
+ project_name: my-product
55
+ profiles: [core]
56
+ down_policy: down
57
+ wait_for:
58
+ - url: http://127.0.0.1:5432/health
59
+ - service: redis
60
+ condition: healthy
61
+ surfaces:
62
+ urls:
63
+ - name: App
64
+ url: http://127.0.0.1:3000
65
+ commands:
66
+ - name: psql
67
+ command: "psql postgresql://app:dev@127.0.0.1:5432/app"
68
+ checkpoints:
69
+ - id: postgres
70
+ export: "docker compose exec -T postgres pg_dump -U app > {{artifacts_dir}}/postgres.sql"
71
+ import: "cat {{artifacts_dir}}/postgres.sql | docker compose exec -T postgres psql -U app"
72
+
73
+ pods:
74
+ - id: orch
75
+ label: Orchestration
76
+ members:
77
+ - id: lead
78
+ agent_ref: "local:agents/orchestrator"
79
+ profile: default
80
+ runtime: claude-code
81
+ cwd: "."
82
+ - id: peer
83
+ agent_ref: "local:agents/orchestrator"
84
+ profile: default
85
+ runtime: codex
86
+ cwd: "."
87
+ edges: []
88
+
89
+ - id: dev
90
+ label: Development
91
+ summary: Implementation and quality assurance pair.
92
+ continuity_policy:
93
+ enabled: true
94
+ sync_triggers: [pre_compaction, pre_shutdown]
95
+ artifacts:
96
+ session_log: true
97
+ restore_brief: true
98
+ restore_protocol:
99
+ peer_driven: true
100
+ verify_via_quiz: false
101
+ startup:
102
+ files:
103
+ - path: guidance/dev-sop.md
104
+ delivery_hint: guidance_merge
105
+ required: true
106
+ actions: []
107
+ members:
108
+ - id: impl
109
+ agent_ref: "local:agents/impl"
110
+ profile: default
111
+ runtime: claude-code
112
+ cwd: "."
113
+ label: "Implementation Lead"
114
+ model: claude-opus-4-6
115
+ restore_policy: resume_if_possible
116
+ startup:
117
+ files:
118
+ - path: guidance/impl-specific.md
119
+ delivery_hint: send_text
120
+ required: false
121
+ applies_on: [fresh_start]
122
+ actions:
123
+ - type: send_text
124
+ value: "Load the implementation-pair skill and begin."
125
+ phase: after_ready
126
+ idempotent: true
127
+ - id: qa
128
+ agent_ref: "local:agents/qa"
129
+ profile: default
130
+ runtime: codex
131
+ cwd: "."
132
+ edges:
133
+ - kind: delegates_to
134
+ from: impl
135
+ to: qa
136
+
137
+ - id: rev
138
+ label: Review
139
+ members:
140
+ - id: r1
141
+ agent_ref: "local:agents/reviewer"
142
+ profile: default
143
+ runtime: claude-code
144
+ cwd: "."
145
+ - id: r2
146
+ agent_ref: "local:agents/reviewer"
147
+ profile: default
148
+ runtime: codex
149
+ cwd: "."
150
+ edges: []
151
+
152
+ edges:
153
+ - kind: delegates_to
154
+ from: orch.lead
155
+ to: dev.impl
156
+ - kind: delegates_to
157
+ from: orch.peer
158
+ to: dev.qa
159
+ - kind: can_observe
160
+ from: rev.r1
161
+ to: dev.impl
162
+ - kind: can_observe
163
+ from: rev.r2
164
+ to: dev.qa
165
+ ```
166
+
167
+ ---
168
+
169
+ ## Top-Level Fields
170
+
171
+ | Field | Type | Required | Default | Description |
172
+ |-------|------|----------|---------|-------------|
173
+ | `version` | string | yes | — | Must be `"0.2"` for pod-aware specs. |
174
+ | `name` | string | yes | — | Rig name. Used in session naming (`{pod}-{member}@{name}`), snapshot identification, and spec library lookup. |
175
+ | `summary` | string | no | — | Human-readable description. Shown in spec library, review surfaces, and `rig specs show`. |
176
+ | `culture_file` | string | no | — | Relative path to a rig-wide culture/constitution file. Must be a safe relative path (no `..`, no absolute). |
177
+ | `docs` | Doc[] | no | — | Documentation files that should travel with the rig. Included in rig bundles. Each entry has a `path` field (safe relative path). The engine does not consume these — they are for humans and agents setting up the environment before launch. |
178
+ | `startup` | StartupBlock | no | — | Rig-level startup files and actions. Applied to all members via the startup layering model. |
179
+ | `services` | ServicesBlock | no | — | Optional managed services (Docker Compose). When present, services boot before any agent launches. |
180
+ | `pods` | Pod[] | yes | — | At least one pod required. Each pod is a bounded context containing members and pod-local edges. |
181
+ | `edges` | CrossPodEdge[] | no | `[]` | Cross-pod edges connecting members in different pods. Must use fully-qualified `pod.member` IDs. |
182
+
183
+ ---
184
+
185
+ ## Pod
186
+
187
+ | Field | Type | Required | Default | Description |
188
+ |-------|------|----------|---------|-------------|
189
+ | `id` | string | yes | — | Pod identifier. Must not contain dots. Must be unique within the rig. Used as the first segment of session names and logical IDs. |
190
+ | `label` | string | yes | — | Human-readable pod name. Shown in UI explorer, graph groupings, and detail surfaces. |
191
+ | `summary` | string | no | — | Pod description. |
192
+ | `continuity_policy` | ContinuityPolicy | no | — | Pod-level continuity/restore policy. Controls compaction recovery, artifact management, and peer-driven restoration. |
193
+ | `startup` | StartupBlock | no | — | Pod-level startup files and actions. Applied to all members in this pod via the startup layering model. |
194
+ | `members` | Member[] | yes | — | At least one member required (enforced by pods needing content). |
195
+ | `edges` | PodLocalEdge[] | no | `[]` | Edges between members within this pod. Must use unqualified member IDs (not `pod.member`). |
196
+
197
+ ### Pod ID Rules
198
+
199
+ - Must not contain dots (`.`)
200
+ - Must be unique across all pods in the rig
201
+ - Becomes the first segment of the qualified logical ID: `{podId}.{memberId}`
202
+ - Becomes the first segment of the canonical session name: `{podId}-{memberId}@{rigName}`
203
+
204
+ ---
205
+
206
+ ## Member
207
+
208
+ | Field | Type | Required | Default | Description |
209
+ |-------|------|----------|---------|-------------|
210
+ | `id` | string | yes | — | Member identifier. Must not contain dots. Must be unique within the pod. |
211
+ | `agent_ref` | string | yes | — | Reference to an AgentSpec. Must start with `local:` (relative) or `path:` (absolute). Exception: `builtin:terminal` for infrastructure nodes. |
212
+ | `profile` | string | yes | — | Profile name from the referenced AgentSpec. Use `default` for the default profile. Exception: `none` for terminal nodes. |
213
+ | `runtime` | string | yes | — | Agent runtime. Current supported values: `claude-code`, `codex`, `terminal`. |
214
+ | `cwd` | string | yes | — | Working directory for the agent. Resolved relative to the rig root (the directory containing the rig spec). Use `"."` for the rig root itself. Can be overridden at launch time with `rig up --cwd`. |
215
+ | `label` | string | no | — | Human-readable member name. Shown in UI when present. |
216
+ | `model` | string | no | — | Model override. Runtime-specific (e.g., `claude-opus-4-6` for Claude Code). |
217
+ | `restore_policy` | string | no | `resume_if_possible` | Restore behavior. One of: `resume_if_possible`, `relaunch_fresh`, `checkpoint_only`. |
218
+ | `startup` | StartupBlock | no | — | Member-level startup files and actions. Applied only to this member. |
219
+
220
+ ### Terminal Nodes
221
+
222
+ Terminal nodes are infrastructure processes (servers, log tails, build watchers) that are not agent runtimes. They require an exact triple:
223
+
224
+ ```yaml
225
+ runtime: terminal
226
+ agent_ref: "builtin:terminal"
227
+ profile: none
228
+ ```
229
+
230
+ All three must be present together. Any partial combination is a validation error.
231
+
232
+ ### agent_ref Rules
233
+
234
+ - Must start with `local:` or `path:`
235
+ - `local:` paths are relative to the rig spec file's directory (the rig root)
236
+ - `path:` paths are absolute filesystem paths
237
+ - The referenced path must contain an `agent.yaml` file
238
+ - Exception: `builtin:terminal` for terminal nodes
239
+
240
+ ### Session Naming
241
+
242
+ The canonical session name is derived from the pod ID, member ID, and rig name:
243
+
244
+ ```
245
+ {podId}-{memberId}@{rigName}
246
+ ```
247
+
248
+ Example: pod `dev`, member `impl`, rig `my-team` → session `dev-impl@my-team`
249
+
250
+ This is human-authored (you choose the pod/member IDs) and system-validated (the system enforces the format).
251
+
252
+ ---
253
+
254
+ ## Edges
255
+
256
+ ### Edge Kinds
257
+
258
+ | Kind | Meaning | Use When |
259
+ |------|---------|----------|
260
+ | `delegates_to` | Source delegates work to target. Constrains launch order. | Orchestrator → implementer, lead → worker |
261
+ | `spawned_by` | Target was spawned by source. Constrains launch order. | Parent → child in hierarchical topologies |
262
+ | `can_observe` | Source can observe target's output. Does NOT constrain launch order. | Reviewer → implementer, monitor → worker |
263
+ | `collaborates_with` | Peer collaboration relationship. Does NOT constrain launch order. | Co-equal peers working together |
264
+ | `escalates_to` | Source escalates to target for decisions. Does NOT constrain launch order. | Worker → lead for escalation |
265
+
266
+ ### Pod-Local Edges
267
+
268
+ Edges within a pod use **unqualified member IDs** (just the member `id`, not `pod.member`):
269
+
270
+ ```yaml
271
+ pods:
272
+ - id: dev
273
+ members:
274
+ - id: impl
275
+ # ...
276
+ - id: qa
277
+ # ...
278
+ edges:
279
+ - kind: delegates_to
280
+ from: impl # NOT dev.impl
281
+ to: qa # NOT dev.qa
282
+ ```
283
+
284
+ Both `from` and `to` must reference members that exist in the same pod.
285
+
286
+ ### Cross-Pod Edges
287
+
288
+ Edges between pods use **fully-qualified `pod.member` IDs**:
289
+
290
+ ```yaml
291
+ edges:
292
+ - kind: delegates_to
293
+ from: orch.lead # pod.member format
294
+ to: dev.impl # pod.member format
295
+ ```
296
+
297
+ Cross-pod edges must reference different pods. An edge where both `from` and `to` are in the same pod is a validation error — use pod-local edges instead.
298
+
299
+ ---
300
+
301
+ ## Startup Block
302
+
303
+ Startup blocks can appear at three levels: rig, pod, and member. They are merged additively via the startup layering model (see `docs/reference/startup-layering.md`).
304
+
305
+ ### Files
306
+
307
+ | Field | Type | Required | Default | Description |
308
+ |-------|------|----------|---------|-------------|
309
+ | `path` | string | yes | — | Relative path to the file. Must be a safe relative path. |
310
+ | `delivery_hint` | string | no | `auto` | How the file is delivered. One of: `auto`, `guidance_merge`, `skill_install`, `send_text`. |
311
+ | `required` | boolean | no | `true` | Whether startup fails if this file cannot be delivered. |
312
+ | `applies_on` | string[] | no | `[fresh_start, restore]` | When this file is delivered. Subset of: `fresh_start`, `restore`. |
313
+
314
+ #### Delivery Hints
315
+
316
+ | Hint | Behavior |
317
+ |------|----------|
318
+ | `auto` | System chooses based on file type and context. |
319
+ | `guidance_merge` | Merged into the runtime's guidance file (`CLAUDE.md` or `AGENTS.md`) as a managed block. Delivered before harness boot. |
320
+ | `skill_install` | Installed as a skill in the runtime's skill directory. Delivered before harness boot. |
321
+ | `send_text` | Sent as text to the agent's terminal after the harness is ready. Requires the agent TUI to be active. |
322
+
323
+ ### Actions
324
+
325
+ | Field | Type | Required | Default | Description |
326
+ |-------|------|----------|---------|-------------|
327
+ | `type` | string | yes | — | Action type. One of: `slash_command`, `send_text`. Note: `shell` is explicitly NOT supported in v1. |
328
+ | `value` | string | yes | — | The command or text to send. |
329
+ | `phase` | string | no | `after_files` | When to execute. One of: `after_files` (after startup files are delivered), `after_ready` (after harness readiness check passes). |
330
+ | `idempotent` | boolean | yes | — | Whether this action is safe to replay on restore. **Required field.** Non-idempotent actions must NOT include `restore` in `applies_on`. |
331
+ | `applies_on` | string[] | no | `[fresh_start, restore]` | When this action runs. Subset of: `fresh_start`, `restore`. |
332
+
333
+ ---
334
+
335
+ ## Services Block
336
+
337
+ The services block is optional. When present, services boot before any agent node launches. If service health checks fail, agent launch is blocked.
338
+
339
+ | Field | Type | Required | Default | Description |
340
+ |-------|------|----------|---------|-------------|
341
+ | `kind` | string | yes | — | Service backend. Only `compose` is supported in v1. |
342
+ | `compose_file` | string | yes | — | Relative path to the Docker Compose file. Must be a safe relative path. Resolved relative to rig root. |
343
+ | `project_name` | string | no | derived from rig name | Docker Compose project name. Must match `[a-z0-9][a-z0-9_-]*`. If omitted, derived by sanitizing the rig name. |
344
+ | `profiles` | string[] | no | — | Compose profiles to activate. |
345
+ | `down_policy` | string | no | `down` | What happens on `rig down`. One of: `leave_running`, `down`, `down_and_volumes`. |
346
+ | `wait_for` | WaitTarget[] | no | — | Health targets that must pass before agent launch. |
347
+ | `surfaces` | Surfaces | no | — | Metadata about accessible URLs and commands. Not executed — informational only. |
348
+ | `checkpoints` | CheckpointHook[] | no | — | Shell commands for checkpoint export/import during snapshot/restore. |
349
+
350
+ ### Wait Targets
351
+
352
+ Each target must define exactly one of `service`, `url`, or `tcp`:
353
+
354
+ ```yaml
355
+ wait_for:
356
+ # HTTP probe — hits the URL, expects 2xx
357
+ - url: http://127.0.0.1:8200/v1/sys/health
358
+
359
+ # TCP probe — connects to host:port
360
+ - tcp: "127.0.0.1:5432"
361
+
362
+ # Compose health check — requires Docker health to report "healthy"
363
+ - service: postgres
364
+ condition: healthy
365
+ ```
366
+
367
+ | Field | Type | Required | Description |
368
+ |-------|------|----------|-------------|
369
+ | `url` | string | one of three | HTTP URL to probe. |
370
+ | `tcp` | string | one of three | `host:port` for TCP probe. |
371
+ | `service` | string | one of three | Compose service name. Requires `condition: healthy`. |
372
+ | `condition` | string | only with `service` | Must be `healthy`. Only valid with `service` targets. |
373
+
374
+ ### Surfaces
375
+
376
+ ```yaml
377
+ surfaces:
378
+ urls:
379
+ - name: Vault UI
380
+ url: http://127.0.0.1:8200/ui
381
+ commands:
382
+ - name: Vault status
383
+ command: "vault status -address=http://127.0.0.1:8200"
384
+ ```
385
+
386
+ Surfaces are metadata only. They are displayed in the UI and in `rig env status` output but are NOT executed by OpenRig.
387
+
388
+ ### Checkpoint Hooks
389
+
390
+ ```yaml
391
+ checkpoints:
392
+ - id: postgres
393
+ export: "docker compose exec -T postgres pg_dump -U app > {{artifacts_dir}}/postgres.sql"
394
+ import: "cat {{artifacts_dir}}/postgres.sql | docker compose exec -T postgres psql -U app"
395
+ ```
396
+
397
+ | Field | Type | Required | Description |
398
+ |-------|------|----------|-------------|
399
+ | `id` | string | yes | Unique identifier for this checkpoint. |
400
+ | `export` | string | yes | Shell command to export state. `{{artifacts_dir}}` is replaced with a daemon-managed path. |
401
+ | `import` | string | no | Shell command to import state on restore. |
402
+
403
+ Checkpoint hooks are shell commands run by the daemon. They are best-effort — a failed export does not block snapshot, but continuity is classified as `receipt_only` instead of `checkpointed`.
404
+
405
+ ---
406
+
407
+ ## Continuity Policy
408
+
409
+ Optional pod-level configuration for compaction recovery behavior.
410
+
411
+ ```yaml
412
+ continuity_policy:
413
+ enabled: true
414
+ sync_triggers: [pre_compaction, pre_shutdown, manual, milestone]
415
+ artifacts:
416
+ session_log: true
417
+ restore_brief: true
418
+ quiz: false
419
+ restore_protocol:
420
+ peer_driven: true
421
+ verify_via_quiz: false
422
+ ```
423
+
424
+ | Field | Type | Required | Default | Description |
425
+ |-------|------|----------|---------|-------------|
426
+ | `enabled` | boolean | yes | — | Whether continuity is active for this pod. |
427
+ | `sync_triggers` | string[] | no | — | When to sync. Values: `pre_compaction`, `pre_shutdown`, `manual`, `milestone`. |
428
+ | `artifacts.session_log` | boolean | no | — | Whether to maintain a session log. |
429
+ | `artifacts.restore_brief` | boolean | no | — | Whether to maintain a restore brief. |
430
+ | `artifacts.quiz` | boolean | no | — | Whether to use quiz-based verification. |
431
+ | `restore_protocol.peer_driven` | boolean | no | — | Whether peers drive the restore process. |
432
+ | `restore_protocol.verify_via_quiz` | boolean | no | — | Whether to verify restoration via quiz. |
433
+
434
+ ---
435
+
436
+ ## Validation Rules Summary
437
+
438
+ These rules are enforced by the validator. A spec that violates any of these will be rejected by `rig spec validate` and `rig up`.
439
+
440
+ 1. `version` and `name` are required non-empty strings.
441
+ 2. `pods` must be a non-empty array.
442
+ 3. Pod IDs must not contain dots and must be unique.
443
+ 4. Pod labels are required.
444
+ 5. Member IDs must not contain dots and must be unique within their pod.
445
+ 6. `agent_ref`, `profile`, `runtime`, and `cwd` are required for every member.
446
+ 7. Terminal nodes require the exact triple: `runtime: terminal`, `agent_ref: builtin:terminal`, `profile: none`.
447
+ 8. `agent_ref` must start with `local:` (relative) or `path:` (absolute), except `builtin:terminal`.
448
+ 9. `local:` refs must be relative paths. `path:` refs must be absolute paths.
449
+ 10. `restore_policy` must be one of: `resume_if_possible`, `relaunch_fresh`, `checkpoint_only`.
450
+ 11. Pod-local edges use unqualified member IDs. Cross-pod edges use `pod.member` format.
451
+ 12. Cross-pod edges must reference different pods.
452
+ 13. Edge kinds must be one of: `delegates_to`, `spawned_by`, `can_observe`, `collaborates_with`, `escalates_to`.
453
+ 14. All file paths (`culture_file`, startup file paths, `compose_file`) must be safe relative paths.
454
+ 15. `services.kind` must be `compose`.
455
+ 16. `services.compose_file` is required when services is present.
456
+ 17. `services.project_name` must match `[a-z0-9][a-z0-9_-]*`.
457
+ 18. `services.down_policy` must be one of: `leave_running`, `down`, `down_and_volumes`.
458
+ 19. Each wait target must define exactly one of: `service`, `url`, `tcp`.
459
+ 20. `condition` is only valid on `service` targets and must be `healthy`.
460
+ 21. Startup file `delivery_hint` must be one of: `auto`, `guidance_merge`, `skill_install`, `send_text`.
461
+ 22. Startup action `type` must be one of: `slash_command`, `send_text`. (`shell` is explicitly rejected.)
462
+ 23. Startup action `phase` must be one of: `after_files`, `after_ready`.
463
+ 24. Startup action `idempotent` is a required boolean.
464
+ 25. Non-idempotent actions must not include `restore` in `applies_on`.
465
+ 26. `applies_on` values must be from: `fresh_start`, `restore`.
466
+
467
+ ---
468
+
469
+ ## Shipped Examples
470
+
471
+ These are the built-in specs shipped with OpenRig. Read them as worked examples.
472
+
473
+ | Spec | Location | Pods | Members | Services |
474
+ |------|----------|------|---------|----------|
475
+ | `product-team` | `packages/daemon/specs/rigs/product-team.yaml` | orch, dev, rev | 7 (lead, peer, impl, qa, design, r1, r2) | no |
476
+ | `implementation-pair` | `packages/daemon/specs/rigs/implementation-pair.yaml` | dev | 2 (impl, qa) | no |
477
+ | `adversarial-review` | `packages/daemon/specs/rigs/adversarial-review.yaml` | orch, rev | 3 (lead, r1, r2) | no |
478
+ | `research-team` | `packages/daemon/specs/rigs/research-team.yaml` | orch, research | 3 (lead, analyst, synthesizer) | no |
479
+ | `secrets-manager` | `packages/daemon/specs/rigs/launch/secrets-manager/rig.yaml` | vault | 1 (specialist) | yes (Vault) |
@@ -0,0 +1,37 @@
1
+ name: pm
2
+ version: "1.0"
3
+ description: >
4
+ Product Manager agent — owns the "what" and "why" for features.
5
+ Runs the 8-step feature flow from idea capture through dev handoff.
6
+ Never makes architecture decisions, estimates, or implementation choices.
7
+
8
+ defaults:
9
+ runtime: claude-code
10
+
11
+ imports:
12
+ - ref: "local:../../shared"
13
+
14
+ profiles:
15
+ default:
16
+ uses:
17
+ skills:
18
+ - openrig-user
19
+ - office-hours
20
+ - context-builder
21
+ - requirements-writer
22
+ - ui-mockup
23
+ - plan-review
24
+ - exec-summary
25
+ - backlog-capture
26
+
27
+ resources:
28
+ guidance:
29
+ - id: role
30
+ path: guidance/role.md
31
+
32
+ startup:
33
+ files:
34
+ - path: guidance/role.md
35
+ delivery_hint: send_text
36
+ required: true
37
+ actions: []
@@ -0,0 +1,43 @@
1
+ # Product Manager Agent
2
+
3
+ ## Role
4
+ Senior Product Manager. Own the "what" and "why" — never architecture, estimates, or implementation details.
5
+
6
+ ## 8-Step Feature Flow
7
+
8
+ 1. **Capture** — run `backlog-capture` and record the idea in `idea_backlog.md`.
9
+ 2. **Validate** — run `office-hours` and produce `validation.md` with a `GO`, `REFINE`, or `PAUSE` verdict.
10
+ 3. **Context** — run `context-builder` and produce `background.md` using `validation.md` as the starting point.
11
+ 4. **Require** — run `requirements-writer` and produce `requirements.md` using `validation.md` and `background.md`.
12
+ 5. **Mockup** — run `ui-mockup` and produce `supporting/mockup-ascii.md` plus one or more `mockup-*.html` artifacts.
13
+ 6. **Review** — run `plan-review` and record issues or revisions before handoff.
14
+ 7. **Summarize** — run `exec-summary` and produce `executive-summary.md` from the full artifact set.
15
+ 8. **Handoff** — prepare the branch/ticket handoff only after the earlier artifacts are coherent.
16
+
17
+ Each step's output feeds the next. `validation.md` is the foundation for the rest of the feature packet.
18
+
19
+ ## Working Norms
20
+
21
+ 1. **Research before you build** — every feature needs context (competitive, regulatory, customer) before requirements are finalized.
22
+ 2. **Requirements are literal** — AI agents treat requirements.md as instructions. Be precise. No aspirational content.
23
+ 3. **Stay in your lane** — PM writes requirements, researcher gathers context, coder builds prototypes. Escalate when you hit a boundary.
24
+ 4. **Write things down** — every step should leave artifacts in the feature folder. Nothing important lives only in conversation.
25
+
26
+ ## Feature Folder Structure
27
+
28
+ ```text
29
+ {feature}/
30
+ ├── validation.md
31
+ ├── background.md
32
+ ├── requirements.md
33
+ ├── executive-summary.md
34
+ └── supporting/
35
+ ├── mockup-ascii.md
36
+ └── mockup-*.html
37
+ ```
38
+
39
+ ## Key Outputs
40
+ - validation.md — GO/REFINE/PAUSE verdict on feature ideas
41
+ - background.md — synthesized context for a feature
42
+ - requirements.md — structured acceptance criteria and business rules
43
+ - executive-summary.md — single document orienting sales, leadership, and engineering
@@ -36,5 +36,22 @@ resources:
36
36
  path: skills/pods/development-team
37
37
  - id: review-team
38
38
  path: skills/pods/review-team
39
+ - id: rig-architect
40
+ path: skills/rig-architect
41
+ # PM skills
42
+ - id: office-hours
43
+ path: skills/pm/office-hours
44
+ - id: context-builder
45
+ path: skills/pm/context-builder
46
+ - id: requirements-writer
47
+ path: skills/pm/requirements-writer
48
+ - id: ui-mockup
49
+ path: skills/pm/ui-mockup
50
+ - id: plan-review
51
+ path: skills/pm/plan-review
52
+ - id: exec-summary
53
+ path: skills/pm/exec-summary
54
+ - id: backlog-capture
55
+ path: skills/pm/backlog-capture
39
56
 
40
57
  profiles: {}
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: backlog-capture
3
+ description: "Quickly capture product ideas, feature requests, or insights from meetings and conversations. Rapid documentation with smart categorization and deduplication."
4
+ ---
5
+
6
+ You help a product manager rapidly capture ideas, feature requests, and insights into a structured backlog.
7
+
8
+ ## When to Use
9
+
10
+ - After meetings where feature ideas or requests surfaced
11
+ - When a customer or sales rep mentions a need
12
+ - When competitive research reveals a gap
13
+ - When a PM has a shower thought worth recording
14
+
15
+ ## Process
16
+
17
+ 1. **Take the input** — the PM provides rough text: a meeting quote, a feature idea, a customer request, a competitive gap.
18
+
19
+ 2. **Structure it** — produce a one-liner for the backlog with:
20
+ - **Bold name** — short, descriptive feature name
21
+ - **Description** — 1-3 sentences covering: what it is, who it's for, why it matters, where it originated (meeting, customer, competitor)
22
+ - **Epic/area** — which product area it belongs to
23
+ - **Dependencies** — if it relates to existing features or backlog items
24
+
25
+ 3. **Check for duplicates** — search the existing backlog for similar items. If a match exists:
26
+ - Update the existing item with new evidence rather than creating a duplicate
27
+ - Add the new source/date to the existing description
28
+
29
+ 4. **Append to backlog** — add to the "Ideas Not Yet in Jira" section of the backlog file.
30
+
31
+ ## Output Format
32
+
33
+ ```markdown
34
+ - **[Feature Name]** — [Description. Who needs it. Why. Origin (meeting/customer/competitor, date).] Belongs under [Epic] epic. [Dependencies if any.]
35
+ ```
36
+
37
+ ## Guidelines
38
+
39
+ - **Capture fast, refine later.** The goal is not to lose the idea. Polish comes during prioritization.
40
+ - **Include the source.** "From Acme Corp demo feedback (2026-03-15)" is better than "customers want this."
41
+ - **Convert relative dates to absolute.** "Next Thursday" becomes "2026-04-10."
42
+ - **One idea per entry.** If a meeting produced 5 ideas, create 5 entries.
43
+ - **Don't validate here.** That's what `/office-hours` is for. Just capture.