Imported from tommy-ca/grok-build-plugins (
long-horizon-swarm/skills/openspec-intent-flow/SKILL.md). Install upstream withnpx skills add tommy-ca/grok-build-plugins --skill openspec-intent-flow. Copyright stays with the author.
OpenSpec intent-driven flow
OpenSpec is the on-disk spec language. The swarm overlay is the execution engine. This skill binds them. It does not invent types. It does not replace poteto-mode.
Builds on long-horizon-swarm, planner-worker-split, field-guide, review-lenses, and show-me-your-work.
When
- User names OpenSpec,
/opsx:*, intent-driven, spec-driven, or "agree before you build". - The long-horizon overlay is active and a Spec artifact would otherwise be a free-form spec blob.
- The work is a program with observable behaviour and decisions that should survive the change.
Not for a one-line bug-fix. That stays on Bug fix.
Disk
If openspec/config.yaml is missing, write:
schema: intent-driven
Then use this layout. Do not invent a twin.
openspec/specs/<capability>/spec.md
openspec/changes/<change>/proposal.md
openspec/changes/<change>/specs/<capability>/spec.md
openspec/changes/<change>/design.md
openspec/changes/<change>/adr.md
openspec/changes/<change>/tasks.md
adr/NNNN-<slug>.md
long-horizon/<change>/
The change id is the overlay program id and the TaskTree root id. long-horizon/<change>/ holds extras and, when bun can run orch.ts, the orch unit store. HostStore is the board only when orch cannot run.
Gates
explore? -> proposal -> (specs || design) -> adr -> tasks -> apply -> archive
Refuse to spawn workers or implementers until tasks.md exists and adr.md is present and validates. The propose gate (proposal → specs/design → adr → tasks) stays strictly serial. specs and design may proceed in parallel after proposal (existing gate). If tasks.md is missing, implementer spawn is refused naming the tasks / propose gate.
Parallel bands and N-briefs apply
After tasks.md exists and passes openspec validate --strict:
- N-briefs fan-out: Horizon/Drove MAY spawn N briefs for independent
P-parallelleaves under## Parallel bandheadings. - Exclusive write targets: Each brief/arm runs in a distinct exclusive worktree (or conceptKey write target). Never dual-write sibling trees.
- Join on evidence: Horizon/Drove joins arms on evidence paths (e.g.,
briefs/herd/<arm>-evidence.md), not on first-idle alone. - True gates stay serial: Serial numbered sections (
## 0.Preconditions,## 1.Validate,## 2.STOP handoff,## 3.Archive) and Todd-go apply authority remain true gates. Soft-after leaves sequence after their prerequisites without forcing unrelated P-parallel tasks into a fake total order. - No Drove caps invented: Do not document or invent Drove
max_concurrentstanding-order numbers inside gbp product text; concurrency is governed by orchestrator capacity and exclusive worktrees. - No claim from propose alone: Never claim parallelism-sync done from propose prose alone; completion is gated on post-apply Prove bars.
Binding
Read references/openspec-binding.md in this plugin. Cites fleet OpenSpec × pstack orch compose at /workspace/fleet-external-agents/openspec-pstack-orch/ (propose gated B8, parallel after tasks, exclusive worktrees; no vendor copy; no Drove quotas). Short form:
- capability kebab-case =
conceptKey - each
#### Scenario= one Brief.ACCEPTANCE line - each
tasks.mdcheckbox = one Unit design.md= program DesignDoclong-horizon/<id>/design-docs/<conceptKey>.md= per-key DesignDoc- adr.md row = show-me-your-work row
- archive = Close step + merge deltas into
openspec/specs/+ Field Guide curate
Commands as playbook steps, not a second router
| User says | Do |
|---|---|
/opsx:explore or "explore first" |
Investigation / how / prototype. No files. |
/opsx:propose |
Write proposal.md, then specs + design, then adr, then tasks. Stop for review unless the user said apply too. |
/opsx:apply |
Long-horizon-swarm scale/drain/land, one Unit per checkbox. |
/opsx:update |
Revise change-folder artifacts from Field Guide surprises. Never edit openspec/specs/ here. |
/opsx:verify |
Review-lenses + ledger on the selected board at the current SHA. |
/opsx:sync or /opsx:archive |
Merge deltas into truth specs, move change to archive, encode lessons. |
If the OpenSpec CLI is on PATH, prefer openspec status --change <id> and openspec archive <id> over hand-merging. If it is not, merge by the delta headers and record cli: absent in the trail.
Git discipline
Proposal artifacts land on the integration branch before apply starts. Apply runs in exclusive worktrees. Archive waits until implementation is on the integration branch. This is sequence-verifiable-units plus playbooks/shipping.md, not a new VCS.
Planner vs worker
Planner writes proposal, specs, design, adr, tasks, Field Guide index. Worker implements one checkbox. Worker may append a Field Guide surprise. Worker may not edit proposal, design, adr, or openspec/specs/.