feat(unic-archon-dlc): rebuild /setup as conversational skill + thin config lib (redesign step 03)#263
Merged
Merged
Conversation
…config lib Redesign step 03. `/setup` becomes a conversational command that detects the stack, runs verify-only skill discovery (MCP/skills introspection + CLI probes, never installs), registers a capability→tool map, verifies Matt Pocock's declared skill suite (warn + degrade, non-blocking), and writes the rich `.archon/unic-dlc.config.yaml`. Supersedes ADR-0001 (ADR-0019). Why: under the two-axis architecture (ADR-0016/0018) setup is tracker/tenant/OS wiring — the archetypal "how" — so it belongs in config + composition, not a bespoke lib. Only the genuinely deterministic concern (schema-validate + idempotent merge + YAML emit) stays as tested code. - New lib/config-schema.mjs (imports `yaml`): loadConfig (yaml/json), validateConfig, deep idempotent mergeConfig, migrateLegacy (flat JSON → rich shape, preserving hand-added labels like `release`), toYaml, detectRepoLayout. Covered by test/config-schema.test.mjs. - archon-check.mjs: behavioural `>= 0.5.0` min-floor (MIN_ARCHON_VERSION) replacing exact-version match; unparseable is non-blocking; override kept. - Dissolve install-runner, setup-explorer, config-loader, agent-docs-writer (+ their tests); docs/agents + CLAUDE.md marker-block re-homed to command prose. See ADR-0018. - Add `yaml` dep (pinned via pnpm catalog). README config reference rewritten to the rich YAML schema. Dogfood `.archon/unic-dlc.config.yaml` generated by running the built lib (legacy `.json` left in place for other tools). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Promote the conversational-/setup CHANGELOG entry and sync marketplace.json + package.json. Minor bump: the config format moves from JSON to the rich `.archon/unic-dlc.config.yaml` (ADR-0018/0019). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s table Set row 03 → ✅ (PR #263) and advance row 04 (/specs) to▶️ next. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The rich-YAML config table was edited after the format pass; re-run Prettier so the root checks pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR redesigns unic-archon-dlc’s /setup into a conversational command and introduces a thin, tested YAML-backed config library (lib/config-schema.mjs) intended to become the shared config substrate across DLC “boxes”, alongside a new yaml runtime dependency.
Changes:
- Add
lib/config-schema.mjs(+ tests) to load/validate/merge/migrate legacy JSON configs and emit the rich.archon/unic-dlc.config.yaml. - Rewrite
commands/setup.mdto a conversational, verify-only discovery flow that writes.archon/unic-dlc.config.yamland keeps legacy.jsonintact. - Update Archon preflight to enforce a minimum supported Archon version (≥ 0.5.0), bump plugin version to
0.2.0, and update docs/changelog accordingly.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds yaml to the workspace catalog. |
| pnpm-lock.yaml | Locks yaml@2.6.1 and adds it as a dependency of unic-archon-dlc. |
| apps/claude-code/unic-archon-dlc/test/setup-explorer.test.mjs | Removes tests for deleted setup-explorer module. |
| apps/claude-code/unic-archon-dlc/test/install-runner.test.mjs | Removes tests for deleted install-runner module. |
| apps/claude-code/unic-archon-dlc/test/install-helpers.test.mjs | Removes tests for deleted install helper functions. |
| apps/claude-code/unic-archon-dlc/test/install-claude-md.test.mjs | Removes tests for deleted agent-docs-writer CLAUDE.md updater. |
| apps/claude-code/unic-archon-dlc/test/install-agent-docs.test.mjs | Removes tests for deleted agent-docs-writer docs generator. |
| apps/claude-code/unic-archon-dlc/test/config-schema.test.mjs | Adds coverage for the new config schema/load/merge/migrate/YAML round-trip behavior. |
| apps/claude-code/unic-archon-dlc/test/config-loader.test.mjs | Removes tests for deleted JSON-only config-loader. |
| apps/claude-code/unic-archon-dlc/test/archon-check.test.mjs | Updates tests to cover min-floor version logic and parsing behavior. |
| apps/claude-code/unic-archon-dlc/README.md | Rewrites configuration reference from flat JSON to rich YAML schema. |
| apps/claude-code/unic-archon-dlc/package.json | Bumps version to 0.2.0, updates test list, and adds yaml runtime dependency. |
| apps/claude-code/unic-archon-dlc/lib/setup-explorer.mjs | Deletes the old project exploration helper. |
| apps/claude-code/unic-archon-dlc/lib/install-runner.mjs | Deletes the old setup installer/merger/writer implementation. |
| apps/claude-code/unic-archon-dlc/lib/config-schema.mjs | Adds the new “thin config lib” (defaults/merge/validate/load/migrate/toYaml/detectRepoLayout). |
| apps/claude-code/unic-archon-dlc/lib/config-loader.mjs | Deletes the old JSON-only config loader/validator. |
| apps/claude-code/unic-archon-dlc/lib/archon-check.mjs | Changes Archon version check from exact match to behavioral min-floor enforcement. |
| apps/claude-code/unic-archon-dlc/lib/agent-docs-writer.mjs | Deletes the old docs/agents and CLAUDE.md marker-block writer. |
| apps/claude-code/unic-archon-dlc/docs/redesign/README.md | Marks redesign step 03 (/setup) as completed and advances step 04. |
| apps/claude-code/unic-archon-dlc/commands/setup.md | Conversational rewrite of /setup, including YAML config writing logic. |
| apps/claude-code/unic-archon-dlc/CHANGELOG.md | Documents the breaking config change and the new config-schema library. |
| apps/claude-code/unic-archon-dlc/.claude-plugin/plugin.json | Bumps plugin version to 0.2.0. |
| apps/claude-code/unic-archon-dlc/.claude-plugin/marketplace.json | Bumps marketplace version to 0.2.0. |
| .archon/unic-dlc.config.yaml | Adds a dogfooded rich YAML config for this repo. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- setup.md Step 5: fail fast with `stage: 'config'` when an existing config is
present but unreadable, instead of falling back to `{}` and clobbering it
(restores the never-clobber guarantee). Guard the loadConfig error contract
with a new malformed-content test.
- setup.md + README: soften the "config every box reads" claim — it is the
substrate the *redesigned* boxes read; pre-redesign `.archon/workflows/*`
still use the old JSON/keys until migrated in their own steps.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Redesign step 03 —
/setup(the linchpin: skill-discovery + config registry every other box reads). Per the redesign banner, PLAN.md + ADRs 0016–0021 win where the step body differs — so this is the conversational rewrite, not an extension of the old JSON installer.Under the two-axis architecture (ADR-0016/0018),
/setupis tracker/tenant/OS wiring — the archetypal how — so it belongs in config + composition, not a bespoke lib. The one genuinely deterministic concern (schema-validate + idempotent merge + YAML emit) stays as tested code. Supersedes ADR-0001 (ADR-0019).Changes
commands/setup.mdrewritten conversational: Archon preflight (behavioural≥ 0.5.0), discover state (reads rich.yamlor legacy.json), verify-only skill discovery (MCP/skills introspection + CLI probes — never installs) building a capability→tool map, verify Matt Pocock's declared skill suite (warn + degrade, non-blocking), collect only the gaps, write config, re-home thedocs/agents/+CLAUDE.mdmarker-block as idempotent prose.lib/config-schema.mjs(new, the one surviving tested lib; importsyaml):loadConfig,validateConfig, deep idempotentmergeConfig(defaults < existing < answers),migrateLegacy(flat ADR-0001 JSON → rich shape, preserving hand-added labels likerelease),toYaml,detectRepoLayout. Covered bytest/config-schema.test.mjs.lib/archon-check.mjs: behavioural≥ 0.5.0min-floor (MIN_ARCHON_VERSION) replacing the exact-version match; unparseable versions non-blocking;incompatibleVersionsoverride preserved.install-runner,setup-explorer,config-loader,agent-docs-writer(+ 6 tests) — ADR-0018.yamldep (pinned via pnpm catalog). README config reference rewritten to the rich YAML schema..archon/unic-dlc.config.yamlgenerated by running the built lib against this repo — the legacy.jsonis left in place (other plugins read it), no backup/delete.Decisions (confirmed with maintainer)
yamldep (lib-owned parse/emit round-trip). 2.docs/agents+ CLAUDE.md block re-homed to command prose (feat(unic-ticket-specification): add portable ticket-specification workflow plugin #257-lightweight). 3. Dissolve setup-owned libs only. 4. Write.yamlalongside the untouched.json.Verification
pnpm --filter unic-archon-dlc typecheck✓pnpm --filter unic-archon-dlc test✓ (115 tests).yamlfrom.json→ idempotent, all label tiers +releasepreserved,.jsonbyte-identical ✓pnpm ci:check✓ (exit 0; the 5 Biome infos are pre-existing inunic-pr-review, not touched here)node:path/node:fs, nojq/awk/sortin discovery probes.🤖 Generated with Claude Code