Skip to content

feat(unic-archon-dlc): rebuild /setup as conversational skill + thin config lib (redesign step 03)#263

Merged
orioltf merged 5 commits into
developfrom
feature/unic-archon-dlc-setup
Jul 2, 2026
Merged

feat(unic-archon-dlc): rebuild /setup as conversational skill + thin config lib (redesign step 03)#263
orioltf merged 5 commits into
developfrom
feature/unic-archon-dlc-setup

Conversation

@orioltf

@orioltf orioltf commented Jul 2, 2026

Copy link
Copy Markdown
Member

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), /setup is 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.md rewritten conversational: Archon preflight (behavioural ≥ 0.5.0), discover state (reads rich .yaml or 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 the docs/agents/ + CLAUDE.md marker-block as idempotent prose.
  • lib/config-schema.mjs (new, the one surviving tested lib; imports yaml): loadConfig, validateConfig, deep idempotent mergeConfig (defaults < existing < answers), migrateLegacy (flat ADR-0001 JSON → rich shape, preserving hand-added labels like release), toYaml, detectRepoLayout. Covered by test/config-schema.test.mjs.
  • lib/archon-check.mjs: behavioural ≥ 0.5.0 min-floor (MIN_ARCHON_VERSION) replacing the exact-version match; unparseable versions non-blocking; incompatibleVersions override preserved.
  • Dissolved install-runner, setup-explorer, config-loader, agent-docs-writer (+ 6 tests) — 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 against this repo — the legacy .json is left in place (other plugins read it), no backup/delete.

Decisions (confirmed with maintainer)

  1. YAML via the yaml dep (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 .yaml alongside the untouched .json.

Verification

  • pnpm --filter unic-archon-dlc typecheck
  • pnpm --filter unic-archon-dlc test ✓ (115 tests)
  • Dogfood smoke: generate .yaml from .json → idempotent, all label tiers + release preserved, .json byte-identical ✓
  • pnpm ci:check ✓ (exit 0; the 5 Biome infos are pre-existing in unic-pr-review, not touched here)
  • Cross-platform: POSIX-shell heredoc flag retained (WSL2/Git Bash on Windows), all fs work via node:path/node:fs, no jq/awk/sort in discovery probes.

🤖 Generated with Claude Code

orioltf and others added 4 commits July 2, 2026 13:29
…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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md to a conversational, verify-only discovery flow that writes .archon/unic-dlc.config.yaml and keeps legacy .json intact.
  • 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.

Comment thread apps/claude-code/unic-archon-dlc/commands/setup.md
Comment thread apps/claude-code/unic-archon-dlc/commands/setup.md Outdated
Comment thread apps/claude-code/unic-archon-dlc/README.md Outdated
- 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>
@orioltf orioltf merged commit a9a7895 into develop Jul 2, 2026
9 checks passed
@orioltf orioltf deleted the feature/unic-archon-dlc-setup branch July 2, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants