@codemcp/ade 0.5.0 → 0.6.1
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 +24 -0
- package/.beads/last-touched +1 -1
- package/.vibe/beads-state-ade-fix-zod-7eypxn.json +34 -0
- package/.vibe/beads-state-ade-main-iazal7.json +29 -0
- package/.vibe/beads-state-ade-partially-skilled-ywlqhb.json +24 -0
- package/.vibe/development-plan-extensibility.md +169 -0
- package/.vibe/development-plan-fix-zod.md +72 -0
- package/.vibe/development-plan-partially-skilled.md +44 -0
- package/ade.extensions.mjs +66 -0
- package/docs/adr/0002-extension-file-type-safety.md +97 -0
- package/docs/guide/extensions.md +187 -0
- package/package.json +3 -2
- package/packages/cli/dist/index.js +33333 -12021
- package/packages/cli/package.json +4 -2
- package/packages/cli/src/commands/extensions.integration.spec.ts +122 -0
- package/packages/cli/src/commands/install.spec.ts +21 -1
- package/packages/cli/src/commands/install.ts +10 -5
- package/packages/cli/src/commands/setup.ts +8 -4
- package/packages/cli/src/extensions.spec.ts +128 -0
- package/packages/cli/src/extensions.ts +71 -0
- package/packages/cli/src/index.ts +10 -5
- package/packages/cli/tsup.config.ts +7 -1
- package/packages/core/package.json +3 -2
- package/packages/core/src/catalog/facets/process.ts +174 -0
- package/packages/core/src/catalog/index.ts +38 -1
- package/packages/core/src/extensions.spec.ts +169 -0
- package/packages/core/src/index.ts +3 -1
- package/packages/core/src/types.ts +71 -0
- package/packages/harnesses/package.json +1 -1
- package/packages/harnesses/src/index.spec.ts +48 -1
- package/packages/harnesses/src/index.ts +10 -0
- package/pnpm-workspace.yaml +2 -0
- /package/docs/{adrs → adr}/0001-tui-framework-selection.md +0 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Extending ADE
|
|
2
|
+
|
|
3
|
+
ADE is designed to be forked and extended without modifying upstream source
|
|
4
|
+
files. Drop an `ade.extensions.mjs` (or `.ts` / `.js`) into your project root
|
|
5
|
+
and ADE picks it up automatically on every `ade setup` or `ade install` run.
|
|
6
|
+
|
|
7
|
+
## How it works
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
your-project/
|
|
11
|
+
ade.extensions.mjs ← ADE reads this from process.cwd()
|
|
12
|
+
config.yaml
|
|
13
|
+
config.lock.yaml
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`npx @codemcp/ade setup` resolves `projectRoot` to `process.cwd()` — the
|
|
17
|
+
directory you run the command from — so the extensions file is always loaded
|
|
18
|
+
from your project, never from the installed CLI package.
|
|
19
|
+
|
|
20
|
+
## The extension file
|
|
21
|
+
|
|
22
|
+
Export a default object conforming to `AdeExtensions`:
|
|
23
|
+
|
|
24
|
+
```js
|
|
25
|
+
// ade.extensions.mjs
|
|
26
|
+
/** @type {import('@codemcp/ade-core').AdeExtensions} */
|
|
27
|
+
export default {
|
|
28
|
+
// Add options to an existing facet
|
|
29
|
+
facetContributions: {
|
|
30
|
+
architecture: [
|
|
31
|
+
/* Option[] */
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// Add entirely new facets
|
|
36
|
+
facets: [
|
|
37
|
+
/* Facet[] */
|
|
38
|
+
],
|
|
39
|
+
|
|
40
|
+
// Add custom provision writers
|
|
41
|
+
provisionWriters: [
|
|
42
|
+
/* ProvisionWriterDef[] */
|
|
43
|
+
],
|
|
44
|
+
|
|
45
|
+
// Add custom harness writers
|
|
46
|
+
harnessWriters: [
|
|
47
|
+
/* HarnessWriter[] */
|
|
48
|
+
]
|
|
49
|
+
};
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
All fields are optional — include only what you need.
|
|
53
|
+
|
|
54
|
+
For TypeScript with full IDE type-checking, name the file
|
|
55
|
+
`ade.extensions.ts` instead (requires `jiti`, which is bundled with the CLI).
|
|
56
|
+
|
|
57
|
+
## Adding an architecture option
|
|
58
|
+
|
|
59
|
+
The most common case: contributing a new option to the built-in `architecture`
|
|
60
|
+
facet so it appears in the setup wizard alongside TanStack, Node.js, etc.
|
|
61
|
+
|
|
62
|
+
```js
|
|
63
|
+
// ade.extensions.mjs
|
|
64
|
+
/** @type {import('@codemcp/ade-core').AdeExtensions} */
|
|
65
|
+
export default {
|
|
66
|
+
facetContributions: {
|
|
67
|
+
architecture: [
|
|
68
|
+
{
|
|
69
|
+
id: "sap-abap",
|
|
70
|
+
label: "SAP BTP / ABAP",
|
|
71
|
+
description: "SAP BTP ABAP Cloud development",
|
|
72
|
+
recipe: [
|
|
73
|
+
{
|
|
74
|
+
writer: "skills",
|
|
75
|
+
config: {
|
|
76
|
+
skills: [
|
|
77
|
+
// Inline skill — body is written to .ade/skills/<name>/SKILL.md
|
|
78
|
+
{
|
|
79
|
+
name: "sap-abap-code",
|
|
80
|
+
description: "SAP ABAP coding guidelines",
|
|
81
|
+
body: "# SAP ABAP Code\n\nUse ABAP Cloud APIs only. ..."
|
|
82
|
+
},
|
|
83
|
+
// External skill — fetched from a skills server at install time
|
|
84
|
+
{
|
|
85
|
+
name: "sap-abap-architecture",
|
|
86
|
+
source: "your-org/ade-sap/skills/sap-abap-architecture"
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
writer: "knowledge",
|
|
93
|
+
config: {
|
|
94
|
+
name: "sap-abap-docs",
|
|
95
|
+
origin: "https://help.sap.com/docs/abap-cloud",
|
|
96
|
+
description: "SAP ABAP Cloud documentation"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
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
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
After running `ade setup` and selecting `SAP BTP / ABAP`:
|
|
115
|
+
|
|
116
|
+
- Inline skills are staged to `.ade/skills/<name>/SKILL.md` and installed
|
|
117
|
+
to `.agentskills/skills/<name>/` for agent consumption
|
|
118
|
+
- Knowledge sources appear in `config.lock.yaml` under
|
|
119
|
+
`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
|
|
122
|
+
|
|
123
|
+
## Adding a new facet
|
|
124
|
+
|
|
125
|
+
```js
|
|
126
|
+
export default {
|
|
127
|
+
facets: [
|
|
128
|
+
{
|
|
129
|
+
id: "deployment",
|
|
130
|
+
label: "Deployment",
|
|
131
|
+
description: "Target deployment platform",
|
|
132
|
+
required: false,
|
|
133
|
+
options: [
|
|
134
|
+
{
|
|
135
|
+
id: "cf",
|
|
136
|
+
label: "Cloud Foundry",
|
|
137
|
+
description: "SAP BTP Cloud Foundry environment",
|
|
138
|
+
recipe: [{ writer: "skills", config: { skills: [...] } }]
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
};
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
New facets are appended after the built-in facets in the wizard. To express
|
|
147
|
+
that a facet depends on another (for conditional option filtering), set
|
|
148
|
+
`dependsOn: ["architecture"]` and implement `available()` on individual options.
|
|
149
|
+
|
|
150
|
+
## Adding a harness writer
|
|
151
|
+
|
|
152
|
+
```js
|
|
153
|
+
export default {
|
|
154
|
+
harnessWriters: [
|
|
155
|
+
{
|
|
156
|
+
id: "my-internal-ide",
|
|
157
|
+
label: "Internal IDE",
|
|
158
|
+
description: "Our internal coding assistant",
|
|
159
|
+
async install(logicalConfig, projectRoot) {
|
|
160
|
+
// write whatever config files your IDE expects
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
};
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The harness appears in the setup wizard's "which agents should receive config?"
|
|
168
|
+
multi-select, after the built-in harnesses.
|
|
169
|
+
|
|
170
|
+
## Validation
|
|
171
|
+
|
|
172
|
+
The extensions file is validated with Zod when loaded. If the shape is wrong
|
|
173
|
+
you get a descriptive error at setup time, not a silent no-op:
|
|
174
|
+
|
|
175
|
+
```
|
|
176
|
+
Error: Invalid ade.extensions file at /your-project/ade.extensions.mjs:
|
|
177
|
+
facetContributions: Expected object, received string
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## What stays upstream-compatible
|
|
181
|
+
|
|
182
|
+
| Upstream file | Status |
|
|
183
|
+
| ------------------------------------ | ------------------------------------------------ |
|
|
184
|
+
| `packages/core/src/catalog/index.ts` | ✅ Never touch — use `facetContributions` |
|
|
185
|
+
| `packages/harnesses/src/index.ts` | ✅ Never touch — use `harnessWriters` |
|
|
186
|
+
| `packages/cli/src/index.ts` | ✅ Never touch — extensions loaded automatically |
|
|
187
|
+
| `ade.extensions.mjs` (your file) | 🔧 Yours to own |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemcp/ade",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "ADE CLI — Agentic Development Environment setup and configuration tool",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -46,7 +46,8 @@
|
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"vitepress": "1.6.2",
|
|
48
48
|
"vitepress-plugin-mermaid": "2.0.17",
|
|
49
|
-
"vitest": "^3.2.4"
|
|
49
|
+
"vitest": "^3.2.4",
|
|
50
|
+
"zod": "4.3.6"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
53
|
"yaml": "^2.8.2"
|