--- name: openspec description: "Manage repo openspec/ specs and changes via openspec CLI: initialize repos, author proposals/delta specs/designs/tasks, validate strictly, review, and archive." license: MIT metadata: kind: task author: Médéric HURIER (Fmind) source: github.com/fmind/dot/tree/main/skills/openspec created: "2026-11-27" updated: "2026-11-29" --- # OpenSpec Opt-in technical spec layer for multi-feature or contract-heavy repos: `AGENTS.md` stays a lean constitution, `docs/` owns user guides, `openspec/specs/` owns `SHALL/MUST` contracts (paired by slug with opt-in `features/*.feature` BDD files), `openspec/changes/` owns active proposals and optional mini-ADRs (replacing [spec-prd](../docs/references/spec-prd.md)), `docs/decisions/` owns irreversible ADRs ([adr-rfc](../docs/references/adr-rfc.md)), and [bf](../bf/SKILL.md) owns cross-repo notes. Skip OpenSpec on small CLIs, libs, scripts, or doc sites, and apply small bug fixes directly. ## Workflow 1. **Opt in and initialize**: - Pin `"github:Fission-AI/OpenSpec"` with glibc Linux/macOS asset patterns ([tool versions](../mise/references/tool-versions.md)), set `OPENSPEC_TELEMETRY = "0"`, add `check:specs` running `openspec validate --all --strict --no-interactive` and `openspec validate --archived --strict --no-interactive` (wired into `check:local.depends`), exclude `openspec/changes/archive` in `lychee` and `vale`, and run `mise lock`. - Scaffold `openspec/` without upstream skills and copy [config.yaml](templates/config.yaml) to `openspec/config.yaml` (external collaborators can vet `openspec init --scope project --profile core --no-animation openspec status --change --json openspec instructions proposal --change --json ``` - Write concise `proposal.md`, delta `specs//spec.md`, optional `design.md`, and `tasks.md` (`skip_specs: true` in `.openspec.yaml` for refactors/docs) per [authoring](references/authoring.md) budgets. - Run `openspec validate --type change --strict --no-interactive` and risk-gated design review ([subagent](../subagent/SKILL.md)). 1. **Implement & verify**: load `openspec instructions apply --change --json`, execute slices, check `- [x]` items, run `mise run all`, and verify completeness against specs. 1. **Archive & finalize**: load `openspec instructions archive --change --json`, run `openspec archive -y ` (`--skip-specs` if no spec changed), replace new `TBD` `## Purpose` (`>= 50` chars), sync `## Examples` and tables if flags/config/limits changed, and run `mise run format` and `mise run check:specs`. ## Gotchas - **`--archived` overrides `--all`**: run both validation commands separately in `check:specs`. - **Quote YAML rules in `openspec/config.yaml`**: unquoted `: ` turns a rule into a map (silently dropping that artifact's `rules`), and unquoted ` #` truncates it as a comment. Always double-quote rule strings. - **Omitting `design.md` leaves `design` in `missingPrerequisites`**: `status` shows `isComplete: false` and `apply` lists `missingPrerequisites: ["design"]`; `validate` and `archive` still pass. - **Use glibc Linux tarballs**: `-musl` binaries link `/lib/ld-musl-*` and fail on Debian/Ubuntu. - **Close stdin non-interactively**: pass `