Skip to content

Upgrade openspec integration from 1.2.0-generated assets to 1.14.1 #713

Open

Description

@jflowers

Summary

The repo's openspec-generated skills/commands were generated by openspec 1.2.0 and carry heavy /uf.init customizations. The installed CLI is now 1.14.1. This issue tracks the full upgrade: regenerate stock artifacts at 1.14.1, fork the schema, re-apply uf customizations against updated anchors, extend the scaffold engine, and add opencode version gating to uf doctor / uf init.

Current state

  • 4 opsx commands (apply/archive/explore/propose) + 4 openspec skills, generatedBy: "1.2.0"
  • Custom schema at openspec/schemas/unbound-force/ (schema.yaml + proposal/spec/design/tasks templates) — validates under 1.14.1 (openspec schema validate passes; recognized as source: project)
  • openspec/config.yaml: schema: unbound-force, constitution context, proposal/specs/design/tasks rules
  • .opencode/commands/uf.init.md post-init injection anchors match 1.2.0-era stock text — stale for 1.14.1, injections will silently fail
  • uf setup installs openspec unpinned (npm install -g @fission-ai/openspec@latest)
  • internal/scaffold/assets/openspec/schemas/unbound-force/ mirrors the repo schema
  • internal/doctor/checks.go opencode check is presence-only (no versionCmd/minVersion); uf init (cmd/unbound-force/main.go runInit) never invokes doctor
  • internal/scaffold/openspec/ contains only a stale .DS_Store

Agreed decisions

  1. Strategy A — rebase onto stock: run openspec update in the repo to regenerate stock 1.14.1 files, then re-apply uf customizations with updated anchors. The update intentionally clobbers customizations; re-application is the reconciliation step.
  2. Schema — fork + re-apply: openspec schema fork spec-driven unbound-force (temp name if overwrite is refused), then re-apply constitution customizations. Includes fixing the schema.yaml proposal instruction that says "all three org constitution principles" — the constitution has FOUR principles.
  3. Repo workflow set: ALL 12 workflows (propose, explore, new, continue, apply, update, ff, sync, archive, bulk-archive, verify, onboard). The contributor's global openspec config must move off the legacy custom 4-workflow profile (auto-migrated, currently propose/explore/apply/archive + auto-injected sync) — e.g. openspec config profile core plus expanded workflows, then openspec update in the project.
  4. /uf.init scaffold expected-file checks target the core set only (6 commands + 6 skills: propose, explore, apply, update, sync, archive). Core is the default profile for consumers; repo-level extras are never required of consumers. A consumer missing update (legacy-migrated profiles) gets a warning, not a failure.
  5. Doctor preflight before init: uf init runs a targeted opencode-only doctor check before scaffolding (reusing doctor's shared check machinery with injected LookPath/ExecCmd for testability). Missing or unsupported opencode → hard abort with install/upgrade guidance. Full doctor is unsuitable pre-init (Scaffolded Files checks would fail on a fresh directory).
  6. Opencode version floor: >= 1.0, configurable — hard-coded default 1.0 in the doctor toolSpec, overridable via .uf/config.yaml.
  7. Parity only for new 1.14.1 features — no adoption of stores/worksets/view.

Gap analysis 1.2.0 → 1.14.1 (key deltas)

  1. New: opsx-sync command + openspec-sync-specs skill; archive runs sync inline with verification + sync-blocked states (1.2.0 delegated sync to a background subagent — upstream now forbids that)
  2. Stale JSON contracts in uf files: outputPath → resolvedOutputPath; new status JSON fields planningHome, changeRoot, artifactPaths, actionContext; task completion via openspec list --json counts (not reading tasks.md); hardcoded paths should use returned roots
  3. New CLI commands: update, schema (which/validate/fork/init), store, context, workset, view, templates, new, show --type spec --json --no-scenarios, list --specs; --store <id> flag on many commands
  4. .openspec.yaml optional fields: skip_specs: true (zero-delta changes), retire_capabilities: true — additive, no migration needed for the 129 existing changes
  5. Built-in spec-driven schema instructions much richer: capability inventory workflow, delta ## Purpose sections, 500-char requirement description limit (--strict), checkbox semantics (only x/X count as done), task-group discipline (tests+docs land with their group), store-aware planningHome.root
  6. Upstream removed branch creation from workflows (uf must re-inject its branch guard); upstream added own write-confirmation gates (partially duplicate uf's injected gates); explore mode has native capture-to-change flow; ASCII-only diagrams (no Unicode box-drawing); archive doesn't stack date prefix on already-dated names
  7. openspec update regenerates skills/commands for configured tools with smart version detection via generatedBy markers, profile-aware (global config profile default core), legacy cleanup, migrations

12-workflow inventory (1.14.1)

Workflow Command Skill
propose opsx-propose.md openspec-propose
explore opsx-explore.md openspec-explore
new opsx-new.md openspec-new-change
continue opsx-continue.md openspec-continue-change
apply opsx-apply.md openspec-apply-change
update opsx-update.md openspec-update-change
ff opsx-ff.md openspec-ff-change
sync opsx-sync.md openspec-sync-specs
archive opsx-archive.md openspec-archive-change
bulk-archive opsx-bulk-archive.md openspec-bulk-archive-change
verify opsx-verify.md openspec-verify-change
onboard opsx-onboard.md openspec-onboard

Core workflows = propose, explore, apply, update, sync, archive. /opsx:verify is an expanded workflow — the fresh scratch openspec init lacked it because the contributor's global profile is custom (legacy 4-command set auto-migrated).

Doctor + init gating workstream

  1. Doctor opencode version check (internal/doctor/checks.go): upgrade the opencode toolSpec to versionCmd: []string{"opencode", "--version"} + parser (handle bare 1.19.0 and prefixed variants) + minVersion: "1.0" + major.minor comparison reusing the parseVersionParts pattern (as checkGoVersion/checkPodmanVersion do). Floor overridable via .uf/config.yaml (exact key shape to be decided in the spec; ToolSeverities already wired via cfg.Doctor.Tools).
  2. Init preflight (cmd/unbound-force/main.go runInit + exported doctor preflight function): uf init calls the targeted opencode-only doctor check BEFORE scaffold.Run; Fail → hard abort with install/upgrade hints. Applies to all init modes (incl. --divisor, --stealth, --check).
  3. Tests: doctor_test.go for version parse/floor/config override; main_test.go for preflight abort behavior.

Plan

  • Phase 0 — baseline: make check on main; branch opsx/upgrade-openspec-1141; openspec new change scaffold; write spec artifacts (proposal, specs delta, design, tasks — including the doctor-preflight workstream) and commit before implementation.
  • Phase 1 — regenerate stock: set global config profile to all 12 workflows (openspec config profile); run openspec update; verify 12 commands + 12 skills at generatedBy 1.14.1; config.yaml unchanged (schema: unbound-force); review git status, stage explicitly.
  • Phase 2 — schema fork: openspec schema fork spec-driven unbound-force (temp name if overwrite refused); re-apply constitution customizations (proposal: Constitution Alignment + FOUR-principles fix; design: reference alignment; tasks: constitution verification + [P] parallel-eligible rules); openspec schema validate.
  • Phase 3 — re-apply uf injections with a reconciliation table. KEEP: branch guards + opsx/<name> creation, Dewey retrieval sections, uf.unleash/uf.cobalt-crush handoffs, explicit staging, archive return-to-main prompt. DROP: sync-to-subagent delegation (superseded by inline sync), Unicode diagrams (adopt ASCII), duplicated generic confirmations. Heavy re-anchored injections on core 6; light touch on expanded files (explicit-staging + return-to-main on bulk-archive; Dewey retrieval on verify); onboard stays stock; the 7 expanded workflows are pure additions.
  • Phase 4 — scaffold engine: mirror schema to internal/scaffold/assets/openspec/schemas/unbound-force/ (preserve # scaffolded by uf version marker); rewrite /uf.init injection anchors for 1.14.1 structure (branch step inserted after the "Create the change directory" step); add opsx-sync + openspec-sync-specs to expected-file checks (core-set semantics); update scaffold tests (scaffold_test.go:745-749 pins embedded schema file list; scaffold_test.go:176-209 pins uf.unleash openspec-branch text); remove stale internal/scaffold/openspec/ dir; implement doctor opencode version check + uf init targeted preflight with hard abort.
  • Phase 5 — dogfood + docs: openspec validate, status --json contract fields (resolvedOutputPath, planningHome, changeRoot, artifactPaths, actionContext), schema validate, make check, /opsx:verify smoke test against this change itself; docs (CHANGELOG, AGENTS.md structural updates + expected contributor profile, docs issue — user-facing for uf consumers); review council.

Risks / notes

  • openspec update may perform extra legacy cleanup/migrations beyond regeneration — review git status carefully and stage explicitly (never git add -A / git add . on feature branches).
  • Injection anchors in /uf.init are long-term fragility — follow-up: wrapper skills (Strategy C) to decouple uf customizations from stock file internals.
  • No migration needed for the 129 existing changes; skip_specs/retire_capabilities are additive.
  • Profile is machine-global, not per-repo (openspec config list/set/get, config profile [preset]; only core preset is non-interactive). Document the expected contributor profile in AGENTS.md.

Activity

  1. added
    enhancement
    on Oct 13, 2026
  2. self-assigned this
    on Oct 13, 2026
  3. jflowers commented on Nov 2, 2026

    @jflowers
    ContributorAuthor

    Divisor Triage: VALID — enhancement (objective)

    The Divisor review panel assessed this issue across six personas (adversary, architect, curator, guard, SRE, testing). The panel classifies it VALID as an enhancement, objective, by unanimous vote (6/6).

    Verified against the repository

    • The four openspec skills carry generatedBy: "1.2.0" markers, and the four opsx commands exist (.opencode/skills/openspec-{propose,apply-change,archive-change,explore}/SKILL.md, .opencode/commands/opsx-*.md).
    • internal/doctor/checks.go defines the opencode toolSpec as presence-only (no versionCmd/minVersion); the reusable version-check machinery (parseVersionParts, checkGoVersion, checkPodmanVersion) already exists for the proposed gating.
    • uf setup installs openspec unpinned: internal/setup/setup.go:690 runs npm install -g @fission-ai/openspec@latest.
    • openspec/config.yaml sets schema: unbound-force, matching the fork-and-re-apply plan.
    • Duplicate searches (primary and fallback) return no competing open issue.

    Recommendations for the spec phase

    1. Re-verify the constitution-principle count at implementation time. Decision 2 replaces "all three org constitution principles" with FOUR, but the live org constitution (v1.4.0, amended 2026-10-14 — one day after this issue was filed) defines SIX principles; "four" traces to the stale context block in openspec/config.yaml, which Phase 1 leaves unchanged. Prefer count-free phrasing ("all org constitution principles") or derivation from .specify/memory/constitution.md, and bring the config.yaml context block into scope.
    2. Decide the pinning question explicitly. Phase 1 depends on the openspec CLI's version, yet no agreed decision or plan phase addresses the unpinned @latest install. Scope in pinning or content-integrity verification, or record the exclusion as a decision.
    3. Check the generatedBy marker location in Phase 1. The markers live only on the skills; the opsx commands carry description-only frontmatter. Verify how openspec update detects command regeneration before relying on marker-based verification.
    4. State unit coverage targets in the spec. The issue names test files but not coverage targets; the scope-based make coverage-gate covers changed packages by default (Constitution IV).

    Advisory: consider splitting the doctor/init gating workstream

    One persona (divisor-sre) recommends, advisorially, separating the doctor + init gating work (internal/doctor/checks.go, runInit in cmd/unbound-force/main.go, doctor_test.go, main_test.go) from the openspec asset workstream: the file sets are disjoint, each verifies and ships independently, and the gating protects consumers during the upgrade window regardless of the openspec version. The panel does not require a split (1/6 personas); the suggestion is recorded for the spec author.

    Next steps

    Proceed with the planned OpenSpec change (opsx/upgrade-openspec-1141) and fold the recommendations above into the Phase 0 spec artifacts.

    This triage was performed by the Divisor review panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions