Skip to content

feat: move opencode.json management from uf setup to uf init (Spec 017) - #67

Merged
jflowers merged 1 commit into
mainfrom
017-init-opencode-config
Mar 29, 2026
Merged

jflowers merged 1 commit into
mainfrom
017-init-opencode-config

Conversation

@jflowers

Copy link
Copy Markdown
Contributor

Summary

  • Move opencode.json management from uf setup to uf init so developers get Dewey MCP + Swarm plugin config from uf init alone
  • configureOpencodeJSON() in scaffold: creates/updates opencode.json with mcp.dewey (when dewey in PATH) and opencode-swarm-plugin (when .hive/ exists)
  • Idempotent by default, --force overwrites stale entries, DryRun support
  • Fix uf doctor MCP key mismatch: checks "mcp" first (canonical), "mcpServers" fallback
  • Fix uf doctor command field extraction: handles both string and array-style command fields
  • Remove configureOpencodeJSON() from setup, renumber 16 to 15 steps
  • Forward ReadFile/WriteFile/DryRun in runUnboundInit() injection chain
  • Legacy mcpServers.dewey treated as already configured (no duplicate entries)
  • Byte-identical output on no-change re-runs
  • 21 new tests (16 scaffold + 4 doctor + 1 integration), 3 setup tests updated

Spec Artifacts

Full Speckit pipeline at specs/017-init-opencode-config/: spec (21 FRs, 4 user stories), plan, tasks (37 completed), data-model, research (6 decisions), quickstart, checklist.

Constitution Check

All 4 principles PASS. Review council approved with advisories (5 Divisor reviewers, 2 iterations).

- Add configureOpencodeJSON() to scaffold with Dewey MCP server
  and Swarm plugin entries, idempotent with --force overwrite
- Add ReadFile, WriteFile, DryRun to scaffold.Options for
  injectable I/O and dry-run support
- Fix uf doctor MCP key mismatch ("mcp" canonical, "mcpServers"
  fallback) and array-style command field extraction
- Remove configureOpencodeJSON() from setup, renumber 16→15 steps
- Forward ReadFile/WriteFile/DryRun in runUnboundInit() injection chain
- Legacy mcpServers.dewey treated as already configured (no duplicates)
- Byte-identical output on no-change re-runs (FR-016)
- 16 new scaffold tests, 4 new doctor tests, 1 integration test
- Full spec artifacts (spec, plan, tasks, data-model, research)
@jflowers
jflowers merged commit d0f9b71 into main Mar 29, 2026
1 check passed
@jflowers
jflowers deleted the 017-init-opencode-config branch March 29, 2026 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant