@codemcp/ade 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.beads/issues.jsonl +37 -0
- package/.beads/last-touched +1 -1
- package/.kiro/agents/ade.json +10 -2
- package/.kiro/settings/mcp.json +6 -1
- package/.opencode/agents/ade.md +7 -2
- package/.vibe/beads-state-ade-extension-override-skills-d44z9p.json +29 -0
- package/.vibe/beads-state-ade-fix-docset-writing-37fuoj.json +29 -0
- package/.vibe/development-plan-extension-override-skills.md +110 -0
- package/.vibe/development-plan-fix-docset-writing.md +77 -0
- package/.vibe/docs/architecture.md +201 -0
- package/.vibe/docs/design.md +179 -0
- package/.vibe/docs/requirements.md +17 -0
- package/ade.extensions.mjs +13 -15
- package/config.lock.yaml +6 -1
- package/docs/CLI-PRD.md +38 -40
- package/docs/CLI-design.md +47 -57
- package/docs/guide/extensions.md +6 -14
- package/package.json +1 -1
- package/packages/cli/dist/index.js +15213 -5579
- package/packages/cli/package.json +1 -1
- package/packages/cli/src/commands/conventions.integration.spec.ts +29 -4
- package/packages/cli/src/commands/extensions.integration.spec.ts +26 -4
- package/packages/cli/src/commands/install.ts +2 -0
- package/packages/cli/src/commands/knowledge-docset.integration.spec.ts +179 -0
- package/packages/cli/src/commands/knowledge.integration.spec.ts +24 -36
- package/packages/cli/src/commands/setup.spec.ts +1 -101
- package/packages/cli/src/commands/setup.ts +23 -36
- package/packages/cli/src/knowledge-installer.spec.ts +43 -3
- package/packages/cli/src/knowledge-installer.ts +12 -9
- package/packages/core/package.json +1 -1
- package/packages/core/src/catalog/catalog.spec.ts +75 -43
- package/packages/core/src/catalog/facets/architecture.ts +89 -58
- package/packages/core/src/catalog/facets/practices.ts +9 -8
- package/packages/core/src/index.ts +4 -4
- package/packages/core/src/registry.spec.ts +1 -1
- package/packages/core/src/registry.ts +2 -2
- package/packages/core/src/resolver.spec.ts +391 -154
- package/packages/core/src/resolver.ts +16 -54
- package/packages/core/src/types.ts +19 -10
- package/packages/core/src/writers/docset.spec.ts +40 -0
- package/packages/core/src/writers/docset.ts +24 -0
- package/packages/core/src/writers/skills.spec.ts +46 -0
- package/packages/harnesses/package.json +1 -1
- package/packages/harnesses/src/writers/opencode.spec.ts +3 -5
- package/packages/harnesses/src/writers/opencode.ts +3 -4
- package/packages/core/src/writers/knowledge.spec.ts +0 -26
- package/packages/core/src/writers/knowledge.ts +0 -15
package/docs/CLI-design.md
CHANGED
|
@@ -31,7 +31,7 @@ core/src/
|
|
|
31
31
|
writers/ # built-in provision writers
|
|
32
32
|
workflows.ts
|
|
33
33
|
skills.ts
|
|
34
|
-
|
|
34
|
+
docset.ts
|
|
35
35
|
instruction.ts
|
|
36
36
|
agents/ # built-in agent writers
|
|
37
37
|
claude-code.ts # AGENTS.md, .claude/settings.json, skill files
|
|
@@ -91,21 +91,18 @@ read existing config.yaml (if any) for default selections
|
|
|
91
91
|
→ pre-select previous choice as default (if still valid)
|
|
92
92
|
→ warn if previous choice references a stale option
|
|
93
93
|
→ collect new user choices
|
|
94
|
-
→ collect docsets from all selected options
|
|
95
|
-
→ present docset confirmation (opt-out multiselect)
|
|
96
94
|
→ resolve choices + catalog → LogicalConfig
|
|
97
95
|
→ write config.yaml (user choices)
|
|
98
96
|
→ write config.lock.yaml (resolved LogicalConfig snapshot)
|
|
99
97
|
→ run agent writer (generate AGENTS.md, settings.json, etc.)
|
|
100
98
|
→ install skills via @codemcp/skills API
|
|
101
|
-
→
|
|
99
|
+
→ prompt to initialize knowledge sources via @codemcp/knowledge API
|
|
102
100
|
```
|
|
103
101
|
|
|
104
102
|
Resolution expands each selected option's recipe provisions into
|
|
105
|
-
LogicalConfig fragments,
|
|
106
|
-
`
|
|
107
|
-
|
|
108
|
-
merges the custom section, and deduplicates MCP servers by ref.
|
|
103
|
+
LogicalConfig fragments, maps `docset` provisions to `knowledge_sources`,
|
|
104
|
+
adds the `@codemcp/knowledge-server` MCP entry if knowledge sources are
|
|
105
|
+
present, merges the custom section, and deduplicates MCP servers by ref.
|
|
109
106
|
|
|
110
107
|
For **multi-select facets**, each selected option's recipe is resolved
|
|
111
108
|
independently and their LogicalConfig fragments are merged.
|
|
@@ -180,23 +177,6 @@ interface Option {
|
|
|
180
177
|
label: string; // e.g. "CodeMCP Workflows"
|
|
181
178
|
description: string;
|
|
182
179
|
recipe: Provision[]; // multiple provisions per option is common
|
|
183
|
-
docsets?: DocsetDef[]; // recommended documentation for this option
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
// Documentation as a weak entity on Option. Docsets are derived from
|
|
187
|
-
// upstream selections — picking "TanStack" in architecture implies
|
|
188
|
-
// TanStack docs, picking "GitHub Actions CI/CD" in practices implies
|
|
189
|
-
// GH Actions docs. The TUI presents all implied docsets as pre-selected
|
|
190
|
-
// defaults and allows the user to deselect. This is opt-out, not opt-in.
|
|
191
|
-
//
|
|
192
|
-
// The resolver collects docsets from all selected options, deduplicates
|
|
193
|
-
// by id, filters by excluded_docsets from UserConfig, and maps enabled
|
|
194
|
-
// docsets directly to knowledge_sources in LogicalConfig.
|
|
195
|
-
interface DocsetDef {
|
|
196
|
-
id: string; // unique key for dedup, e.g. "tanstack-query-docs"
|
|
197
|
-
label: string; // display name, e.g. "TanStack Query Reference"
|
|
198
|
-
origin: string; // URL, path, or package ref
|
|
199
|
-
description: string; // shown in TUI
|
|
200
180
|
}
|
|
201
181
|
|
|
202
182
|
// A recipe typically contains multiple provisions for different writers.
|
|
@@ -238,6 +218,7 @@ interface KnowledgeSource {
|
|
|
238
218
|
name: string; // e.g. "tanstack"
|
|
239
219
|
origin: string; // URL, path, or package ref
|
|
240
220
|
description: string;
|
|
221
|
+
preset?: "git-repo" | "local-folder" | "archive"; // defaults to "git-repo"
|
|
241
222
|
}
|
|
242
223
|
```
|
|
243
224
|
|
|
@@ -247,7 +228,6 @@ interface KnowledgeSource {
|
|
|
247
228
|
// config.yaml — mostly CLI-managed, agent-agnostic
|
|
248
229
|
interface UserConfig {
|
|
249
230
|
choices: Record<string, string | string[]>; // single-select: string, multi-select: string[]
|
|
250
|
-
excluded_docsets?: string[]; // docset IDs the user opted out of
|
|
251
231
|
custom?: {
|
|
252
232
|
// user-managed section
|
|
253
233
|
mcp_servers?: McpServerEntry[];
|
|
@@ -355,7 +335,7 @@ function createDefaultRegistry(): WriterRegistry {
|
|
|
355
335
|
registerProvisionWriter(registry, instructionWriter);
|
|
356
336
|
registerProvisionWriter(registry, workflowsWriter);
|
|
357
337
|
registerProvisionWriter(registry, skillsWriter);
|
|
358
|
-
registerProvisionWriter(registry,
|
|
338
|
+
registerProvisionWriter(registry, docsetWriter);
|
|
359
339
|
|
|
360
340
|
registerAgentWriter(registry, claudeCodeWriter);
|
|
361
341
|
|
|
@@ -390,10 +370,12 @@ interface SkillsConfig {
|
|
|
390
370
|
skills: SkillDefinition[];
|
|
391
371
|
}
|
|
392
372
|
|
|
393
|
-
interface
|
|
394
|
-
|
|
395
|
-
|
|
373
|
+
interface DocsetConfig {
|
|
374
|
+
id: string;
|
|
375
|
+
label: string;
|
|
376
|
+
origin: string;
|
|
396
377
|
description: string;
|
|
378
|
+
preset?: "git-repo" | "local-folder" | "archive"; // defaults to "git-repo"
|
|
397
379
|
}
|
|
398
380
|
|
|
399
381
|
interface InstructionConfig {
|
|
@@ -474,16 +456,23 @@ Inline skills include a `body` field; external skills reference a `source`.
|
|
|
474
456
|
The actual installation (writing SKILL.md files and calling `@codemcp/skills`
|
|
475
457
|
API) is handled by the agent writer and CLI's `skills-installer`.
|
|
476
458
|
|
|
477
|
-
### `
|
|
459
|
+
### `docset` writer
|
|
478
460
|
|
|
479
461
|
```typescript
|
|
480
|
-
{
|
|
462
|
+
{
|
|
463
|
+
id: "tanstack-query-docs",
|
|
464
|
+
label: "TanStack Query",
|
|
465
|
+
origin: "https://github.com/TanStack/query.git",
|
|
466
|
+
description: "Server state management",
|
|
467
|
+
preset: "git-repo" // optional, defaults to "git-repo"
|
|
468
|
+
}
|
|
481
469
|
```
|
|
482
470
|
|
|
483
|
-
Produces a `KnowledgeSource` entry in LogicalConfig. The
|
|
484
|
-
|
|
485
|
-
`
|
|
486
|
-
|
|
471
|
+
Produces a `KnowledgeSource` entry in LogicalConfig. The `preset` field
|
|
472
|
+
controls how the source is fetched: `"git-repo"` (default) for git
|
|
473
|
+
repositories, `"archive"` for remote `.tar.gz` archives, `"local-folder"`
|
|
474
|
+
for local paths. The actual installation (calling `@codemcp/knowledge` API)
|
|
475
|
+
is handled by the CLI's `knowledge-installer`.
|
|
487
476
|
|
|
488
477
|
### `mcp-server` writer
|
|
489
478
|
|
|
@@ -545,7 +534,7 @@ export const processFacet: Facet = {
|
|
|
545
534
|
]
|
|
546
535
|
};
|
|
547
536
|
|
|
548
|
-
// catalog/facets/architecture.ts — options carry skills +
|
|
537
|
+
// catalog/facets/architecture.ts — options carry skills + docset provisions
|
|
549
538
|
export const architectureFacet: Facet = {
|
|
550
539
|
id: "architecture",
|
|
551
540
|
label: "Architecture",
|
|
@@ -578,20 +567,24 @@ export const architectureFacet: Facet = {
|
|
|
578
567
|
{
|
|
579
568
|
writer: "instruction",
|
|
580
569
|
config: { text: "This project follows TanStack conventions..." }
|
|
581
|
-
}
|
|
582
|
-
],
|
|
583
|
-
docsets: [
|
|
570
|
+
},
|
|
584
571
|
{
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
572
|
+
writer: "docset",
|
|
573
|
+
config: {
|
|
574
|
+
id: "tanstack-router-docs",
|
|
575
|
+
label: "TanStack Router",
|
|
576
|
+
origin: "https://github.com/TanStack/router.git",
|
|
577
|
+
description: "File-based routing, loaders, and search params"
|
|
578
|
+
}
|
|
589
579
|
},
|
|
590
580
|
{
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
581
|
+
writer: "docset",
|
|
582
|
+
config: {
|
|
583
|
+
id: "tanstack-query-docs",
|
|
584
|
+
label: "TanStack Query",
|
|
585
|
+
origin: "https://github.com/TanStack/query.git",
|
|
586
|
+
description: "Server state management, caching, and mutations"
|
|
587
|
+
}
|
|
595
588
|
}
|
|
596
589
|
// ... form, table
|
|
597
590
|
]
|
|
@@ -634,13 +627,10 @@ export const architectureFacet: Facet = {
|
|
|
634
627
|
merge conflicts: the CLI never touches `custom`, and users never touch
|
|
635
628
|
the rest. Agent writers merge both sections when generating output.
|
|
636
629
|
|
|
637
|
-
7. **Docsets are
|
|
638
|
-
sources are always implied by an upstream selection (architecture
|
|
639
|
-
practices).
|
|
640
|
-
|
|
641
|
-
`
|
|
642
|
-
|
|
643
|
-
not opt-in). Config stores `excluded_docsets` (what the user opted out of)
|
|
644
|
-
rather than selected docsets, keeping the common case (accept all
|
|
645
|
-
recommendations) zero-config. When knowledge sources are present, the
|
|
630
|
+
7. **Docsets are `docset` provisions in the recipe, not a separate field on Option.**
|
|
631
|
+
Documentation sources are always implied by an upstream selection (architecture
|
|
632
|
+
or practices). Each option declares docsets as `{ writer: "docset", config: {...} }`
|
|
633
|
+
recipe entries — consistent with how skills are declared. The resolver processes
|
|
634
|
+
`docset` provisions like any other: the `docsetWriter` maps each one to a
|
|
635
|
+
`KnowledgeSource` in LogicalConfig. When knowledge sources are present, the
|
|
646
636
|
resolver automatically adds a `@codemcp/knowledge-server` MCP server entry.
|
package/docs/guide/extensions.md
CHANGED
|
@@ -89,21 +89,14 @@ export default {
|
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
{
|
|
92
|
-
writer: "
|
|
92
|
+
writer: "docset",
|
|
93
93
|
config: {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
id: "sap-abap-cloud-docs",
|
|
95
|
+
label: "SAP ABAP Cloud",
|
|
96
|
+
origin: "https://your-serialized-version-of-abap-docs.git",
|
|
97
|
+
description: "SAP ABAP Cloud development documentation"
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
],
|
|
100
|
-
docsets: [
|
|
101
|
-
{
|
|
102
|
-
id: "sap-abap-cloud-docs",
|
|
103
|
-
label: "SAP ABAP Cloud",
|
|
104
|
-
origin: "https://help.sap.com/docs/abap-cloud",
|
|
105
|
-
description: "SAP ABAP Cloud development documentation"
|
|
106
|
-
}
|
|
107
100
|
]
|
|
108
101
|
}
|
|
109
102
|
]
|
|
@@ -117,8 +110,7 @@ After running `ade setup` and selecting `SAP BTP / ABAP`:
|
|
|
117
110
|
to `.agentskills/skills/<name>/` for agent consumption
|
|
118
111
|
- Knowledge sources appear in `config.lock.yaml` under
|
|
119
112
|
`logical_config.knowledge_sources` and can be initialised with
|
|
120
|
-
`npx @codemcp/knowledge init
|
|
121
|
-
- Docsets appear in the setup wizard's documentation sources step
|
|
113
|
+
`npx @codemcp/knowledge init <id>`
|
|
122
114
|
|
|
123
115
|
## Adding a new facet
|
|
124
116
|
|