Skip to content

Extensibility#14

Merged
mrsimpson merged 10 commits intomainfrom
extensibility
Mar 19, 2026
Merged

Extensibility#14
mrsimpson merged 10 commits intomainfrom
extensibility

Conversation

@mrsimpson
Copy link
Copy Markdown
Contributor

No description provided.

…ons, buildHarnessWriters, loadExtensions

Add Zod schema and AdeExtensions type to types.ts (type definitions allowed in RED phase).
Add zod to @codemcp/ade-core deps, jiti to @codemcp/ade-cli deps.
Tests cover schema validation, catalog merging, harness writer extension, and extension file loading.
…s, buildHarnessWriters

- Add mergeExtensions(catalog, extensions) to packages/core — merges facet contributions
  and new facets without mutating the original catalog
- Export AdeExtensions, AdeExtensionsSchema, mergeExtensions from @codemcp/ade-core
- Add buildHarnessWriters(extensions) to @codemcp/ade-harnesses — appends extension
  harness writers after built-ins without mutating allHarnessWriters
- Create packages/cli/src/extensions.ts with loadExtensions(projectRoot) — discovers
  ade.extensions.ts/.mjs/.js, validates via Zod, loads .ts files via jiti
- Wire loadExtensions into CLI index.ts — setup and install commands now consume extensions
- Accept harnessWriters as parameter in runSetup and runInstall for testability
- Add ade.extensions.mjs SAP example file in repo root
- Fix install.spec.ts mock to include allHarnessWriters with vi.hoisted mockInstall
…rder tests

Add zod 4.3.6 to pnpm workspace catalog so it resolves correctly when
root Vitest transforms @codemcp/ade-core source files. Reference catalog:
from core and cli package.json. Add zod as root devDependency.

Also replace the placeholder search-order test with two real tests:
- loads .js fallback when only .js exists
- prefers .mjs over .js when both exist
…and knowledge

Verify the full pipeline: an AdeExtensions facet contribution with an inline
skill + knowledge recipe, merged via mergeExtensions, run through runSetup,
produces the expected SKILL.md in .ade/skills/, knowledge_sources in the lock
file, and the extension option recorded in config.yaml.
Add test simulating npx-from-different-cwd: loadExtensions(userProjectDir)
loads the user's file; loadExtensions(cliPackageDir) returns {} — proving
the CLI install location is never consulted.

Also add docs/guide/extensions.md: terse guide covering facetContributions,
new facets, harness writers, validation, and upstream-compatibility table.
@mrsimpson mrsimpson merged commit a23b830 into main Mar 19, 2026
1 check passed
@mrsimpson mrsimpson deleted the extensibility branch March 19, 2026 21:01
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.

1 participant