@grant-vine/wunderkind 0.8.0 → 0.9.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/.claude-plugin/plugin.json +1 -1
- package/README.md +78 -26
- package/commands/docs-index.md +44 -0
- package/dist/agents/docs-config.d.ts +6 -0
- package/dist/agents/docs-config.d.ts.map +1 -1
- package/dist/agents/docs-config.js +15 -1
- package/dist/agents/docs-config.js.map +1 -1
- package/dist/agents/docs-index-plan.d.ts +28 -0
- package/dist/agents/docs-index-plan.d.ts.map +1 -0
- package/dist/agents/docs-index-plan.js +118 -0
- package/dist/agents/docs-index-plan.js.map +1 -0
- package/dist/cli/cli-installer.d.ts +9 -1
- package/dist/cli/cli-installer.d.ts.map +1 -1
- package/dist/cli/cli-installer.js +57 -7
- package/dist/cli/cli-installer.js.map +1 -1
- package/dist/cli/config-manager/index.d.ts +16 -1
- package/dist/cli/config-manager/index.d.ts.map +1 -1
- package/dist/cli/config-manager/index.js +399 -176
- package/dist/cli/config-manager/index.js.map +1 -1
- package/dist/cli/doctor.d.ts +4 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +81 -35
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.js +69 -22
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/init.d.ts +0 -4
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +120 -27
- package/dist/cli/init.js.map +1 -1
- package/dist/cli/tui-installer.d.ts.map +1 -1
- package/dist/cli/tui-installer.js +49 -43
- package/dist/cli/tui-installer.js.map +1 -1
- package/dist/cli/types.d.ts +34 -22
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli/uninstall.d.ts +6 -0
- package/dist/cli/uninstall.d.ts.map +1 -0
- package/dist/cli/uninstall.js +64 -0
- package/dist/cli/uninstall.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/package.json +3 -1
- package/schemas/wunderkind.config.schema.json +67 -0
package/README.md
CHANGED
|
@@ -16,8 +16,10 @@ Wunderkind provides a tiered CLI for installation, project setup, and health che
|
|
|
16
16
|
| Command | Purpose | Modifies |
|
|
17
17
|
|---|---|---|
|
|
18
18
|
| `wunderkind install` | Registers the plugin in OpenCode | `opencode.json` (Global or Project) |
|
|
19
|
+
| `wunderkind upgrade` | Upgrade lifecycle entry point for existing installs | None yet (surface only) |
|
|
19
20
|
| `wunderkind init` | Bootstraps a project with soul files | `.wunderkind/`, `AGENTS.md`, `.sisyphus/` |
|
|
20
21
|
| `wunderkind doctor` | Read-only diagnostics | None |
|
|
22
|
+
| `wunderkind uninstall` | Safely removes Wunderkind plugin wiring | OpenCode plugin config (+ global Wunderkind config when applicable) |
|
|
21
23
|
| `wunderkind gitignore` | Adds AI traces to `.gitignore` | `.gitignore` |
|
|
22
24
|
|
|
23
25
|
---
|
|
@@ -55,20 +57,16 @@ The guide contains all flags for non-interactive install so the agent can run a
|
|
|
55
57
|
### Interactive TUI (recommended)
|
|
56
58
|
|
|
57
59
|
```bash
|
|
58
|
-
bunx @grant-vine/wunderkind
|
|
60
|
+
bunx @grant-vine/wunderkind install
|
|
59
61
|
```
|
|
60
62
|
|
|
61
63
|
or
|
|
62
64
|
|
|
63
|
-
```bash
|
|
64
|
-
npx @grant-vine/wunderkind
|
|
65
|
-
```
|
|
66
|
-
|
|
67
65
|
The TUI will guide you through:
|
|
68
66
|
1. Installing oh-my-openagent if it isn't already (runs its own setup flow first).
|
|
69
67
|
2. Selecting the install scope (Global vs Project).
|
|
70
|
-
3. Configuring your
|
|
71
|
-
4.
|
|
68
|
+
3. Configuring your shared baseline context: region, industry, and data-protection regulations.
|
|
69
|
+
4. Optionally initializing the current project immediately.
|
|
72
70
|
|
|
73
71
|
### Non-interactive install
|
|
74
72
|
|
|
@@ -98,6 +96,25 @@ bunx @grant-vine/wunderkind install --no-tui \
|
|
|
98
96
|
--primary-regulation=CCPA
|
|
99
97
|
```
|
|
100
98
|
|
|
99
|
+
> Running `wunderkind` with no subcommand now shows help and exits. Installation must be explicit via `wunderkind install`.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Upgrade
|
|
104
|
+
|
|
105
|
+
Wunderkind exposes an explicit upgrade lifecycle command:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
wunderkind upgrade --scope=global
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Current first-wave upgrade behavior is intentionally narrow:
|
|
112
|
+
- it validates that Wunderkind is already installed in the requested scope
|
|
113
|
+
- it preserves all project-local soul/docs settings
|
|
114
|
+
- it currently behaves as a safe no-op until future baseline override flags are introduced
|
|
115
|
+
|
|
116
|
+
This keeps the lifecycle concept explicit without overloading `install`.
|
|
117
|
+
|
|
101
118
|
---
|
|
102
119
|
|
|
103
120
|
## Init
|
|
@@ -114,9 +131,11 @@ wunderkind init [options]
|
|
|
114
131
|
|---|---|---|
|
|
115
132
|
| `--docs-path <path>` | Relative path for agent docs output | `./docs` |
|
|
116
133
|
| `--docs-history-mode <mode>` | Update style for documentation | `overwrite` |
|
|
117
|
-
| `--
|
|
134
|
+
| `--docs-enabled <yes\|no>` | Enable or disable documentation output | `no` |
|
|
118
135
|
| `--no-tui` | Skip interactive prompts | (false) |
|
|
119
136
|
|
|
137
|
+
Interactive `wunderkind init` is where team culture, org structure, all agent personality customizations, and docs-output settings are set.
|
|
138
|
+
|
|
120
139
|
`wunderkind init` creates the following project "soul files":
|
|
121
140
|
- `.wunderkind/wunderkind.config.jsonc` — Project-specific configuration
|
|
122
141
|
- `AGENTS.md` — Project knowledge base for agents
|
|
@@ -132,6 +151,19 @@ wunderkind init [options]
|
|
|
132
151
|
| `new-dated-file` | Creates a new file with a date suffix |
|
|
133
152
|
| `overwrite-archive` | Overwrites the current file and archives the old one |
|
|
134
153
|
|
|
154
|
+
### JSON Schema
|
|
155
|
+
|
|
156
|
+
Generated Wunderkind config files now include a top-level `$schema` field for editor validation.
|
|
157
|
+
|
|
158
|
+
- Latest schema URL:
|
|
159
|
+
- `https://raw.githubusercontent.com/grant-vine/wunderkind/main/schemas/wunderkind.config.schema.json`
|
|
160
|
+
- Immutable tagged schema URLs should use the same path on a release tag:
|
|
161
|
+
- `https://raw.githubusercontent.com/grant-vine/wunderkind/<tag>/schemas/wunderkind.config.schema.json`
|
|
162
|
+
|
|
163
|
+
The schema is scope-aware:
|
|
164
|
+
- global config validates only baseline fields (`region`, `industry`, `primaryRegulation`, `secondaryRegulation`)
|
|
165
|
+
- project config validates only soul/personality/docs fields
|
|
166
|
+
|
|
135
167
|
---
|
|
136
168
|
|
|
137
169
|
## Doctor
|
|
@@ -152,13 +184,32 @@ wunderkind doctor
|
|
|
152
184
|
|
|
153
185
|
---
|
|
154
186
|
|
|
187
|
+
## Uninstall
|
|
188
|
+
|
|
189
|
+
Safely remove Wunderkind plugin/config wiring:
|
|
190
|
+
|
|
191
|
+
```bash
|
|
192
|
+
wunderkind uninstall
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Optional scope targeting:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
wunderkind uninstall --scope=global
|
|
199
|
+
wunderkind uninstall --scope=project
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
`wunderkind uninstall` removes Wunderkind plugin registration from OpenCode config. On global uninstall it also removes `~/.wunderkind/wunderkind.config.jsonc` (and the parent `~/.wunderkind/` directory if it becomes empty). For safety, it intentionally leaves project-local customization/bootstrap artifacts untouched (`.wunderkind/`, `AGENTS.md`, `.sisyphus/`, docs folders).
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
155
206
|
## Documentation Output
|
|
156
207
|
|
|
157
208
|
When enabled, agents can persist their decisions and strategies to your project's docs folder.
|
|
158
209
|
|
|
159
210
|
1. **Enable** via `wunderkind init --docs-path ./docs`
|
|
160
211
|
2. **Configure** in `.wunderkind/wunderkind.config.jsonc` via `docsEnabled`, `docsPath`, and `docHistoryMode`.
|
|
161
|
-
3. **Index** via `/docs-index`. This is a **prompt
|
|
212
|
+
3. **Index** via `/docs-index`. This is currently a **prompt convention only**, not an executable Wunderkind CLI/runtime command. The current plugin surface can inject system instructions, but it cannot intercept raw user slash commands yet. Treat `/docs-index` as documentation guidance until a future runtime hook makes it executable.
|
|
162
213
|
|
|
163
214
|
---
|
|
164
215
|
|
|
@@ -211,20 +262,23 @@ Agent models are determined by category inheritance configured in `oh-my-opencod
|
|
|
211
262
|
|
|
212
263
|
## Configuration
|
|
213
264
|
|
|
214
|
-
Wunderkind uses a
|
|
265
|
+
Wunderkind uses a split configuration model:
|
|
266
|
+
- global config stores shared market/regulation baseline
|
|
267
|
+
- project config stores soul/personality/docs settings
|
|
215
268
|
|
|
216
269
|
| File | Scope |
|
|
217
270
|
|---|---|
|
|
218
271
|
| `~/.wunderkind/wunderkind.config.jsonc` | Global baseline (applies to all projects) |
|
|
219
|
-
| `.wunderkind/wunderkind.config.jsonc` | Per-project
|
|
272
|
+
| `.wunderkind/wunderkind.config.jsonc` | Per-project soul/personality/docs settings |
|
|
220
273
|
|
|
221
|
-
Edit
|
|
274
|
+
Edit the global file to change region/industry/regulation defaults after install. Edit the project file to change team culture, personalities, or docs-output settings after init.
|
|
222
275
|
|
|
223
276
|
### Configuration Reference
|
|
224
277
|
|
|
225
278
|
```jsonc
|
|
226
|
-
//
|
|
279
|
+
// Global baseline config
|
|
227
280
|
{
|
|
281
|
+
"$schema": "https://raw.githubusercontent.com/grant-vine/wunderkind/main/schemas/wunderkind.config.schema.json",
|
|
228
282
|
// Geographic region — e.g. "South Africa", "United States", "United Kingdom", "Australia"
|
|
229
283
|
"region": "South Africa",
|
|
230
284
|
// Industry vertical — e.g. "SaaS", "FinTech", "eCommerce", "HealthTech"
|
|
@@ -232,38 +286,36 @@ Edit either file directly to change any value after install. The installer pre-f
|
|
|
232
286
|
// Primary data-protection regulation — e.g. "GDPR", "POPIA", "CCPA", "LGPD"
|
|
233
287
|
"primaryRegulation": "POPIA",
|
|
234
288
|
// Optional secondary regulation
|
|
235
|
-
"secondaryRegulation": ""
|
|
289
|
+
"secondaryRegulation": ""
|
|
290
|
+
}
|
|
291
|
+
```
|
|
236
292
|
|
|
293
|
+
```jsonc
|
|
294
|
+
// Project-local soul/docs config
|
|
295
|
+
{
|
|
296
|
+
"$schema": "https://raw.githubusercontent.com/grant-vine/wunderkind/main/schemas/wunderkind.config.schema.json",
|
|
237
297
|
// Team culture baseline — affects all agents' communication style and decision rigour
|
|
238
|
-
// "formal-strict" | "pragmatic-balanced" | "experimental-informal"
|
|
239
298
|
"teamCulture": "pragmatic-balanced",
|
|
240
299
|
// Org structure — "flat" (peers) | "hierarchical" (domain authority applies)
|
|
241
300
|
"orgStructure": "flat",
|
|
242
301
|
|
|
243
302
|
// Agent personalities — controls each agent's default character archetype
|
|
244
|
-
// CISO: "paranoid-enforcer" | "pragmatic-risk-manager" | "educator-collaborator"
|
|
245
303
|
"cisoPersonality": "pragmatic-risk-manager",
|
|
246
|
-
// CTO/Fullstack: "grizzled-sysadmin" | "startup-bro" | "code-archaeologist"
|
|
247
304
|
"ctoPersonality": "code-archaeologist",
|
|
248
|
-
// CMO/Marketing: "data-driven" | "brand-storyteller" | "growth-hacker"
|
|
249
305
|
"cmoPersonality": "data-driven",
|
|
250
|
-
// QA: "rule-enforcer" | "risk-based-pragmatist" | "rubber-duck"
|
|
251
306
|
"qaPersonality": "risk-based-pragmatist",
|
|
252
|
-
// Product: "user-advocate" | "velocity-optimizer" | "outcome-obsessed"
|
|
253
307
|
"productPersonality": "outcome-obsessed",
|
|
254
|
-
// Operations: "on-call-veteran" | "efficiency-maximiser" | "process-purist"
|
|
255
308
|
"opsPersonality": "on-call-veteran",
|
|
256
|
-
// Creative Director: "perfectionist-craftsperson" | "bold-provocateur" | "pragmatic-problem-solver"
|
|
257
309
|
"creativePersonality": "pragmatic-problem-solver",
|
|
258
|
-
// Brand Builder: "community-evangelist" | "pr-spinner" | "authentic-builder"
|
|
259
310
|
"brandPersonality": "authentic-builder",
|
|
311
|
+
"devrelPersonality": "dx-engineer",
|
|
312
|
+
"legalPersonality": "pragmatic-advisor",
|
|
313
|
+
"supportPersonality": "systematic-triage",
|
|
314
|
+
"dataAnalystPersonality": "insight-storyteller",
|
|
260
315
|
|
|
261
316
|
// Documentation Output (Init-only customizations)
|
|
262
|
-
// "true" | "false"
|
|
263
317
|
"docsEnabled": false,
|
|
264
|
-
// Relative path (e.g. "./docs", "./documentation")
|
|
265
318
|
"docsPath": "./docs",
|
|
266
|
-
// "overwrite" | "append-dated" | "new-dated-file" | "overwrite-archive"
|
|
267
319
|
"docHistoryMode": "overwrite"
|
|
268
320
|
}
|
|
269
321
|
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Regenerate Wunderkind-managed project documentation and refresh the docs index
|
|
3
|
+
agent: wunderkind:product-wunderkind
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are coordinating the Wunderkind documentation refresh workflow for this project.
|
|
7
|
+
|
|
8
|
+
## Command
|
|
9
|
+
|
|
10
|
+
This command is invoked as `/wunderkind:docs-index`.
|
|
11
|
+
|
|
12
|
+
## Responsibilities
|
|
13
|
+
|
|
14
|
+
1. Inspect the configured docs directory and existing documentation files.
|
|
15
|
+
2. Use the Wunderkind docs ownership rules and canonical filenames from the local docs-index planning support.
|
|
16
|
+
3. Preflight the docs-index plan and abort early on any collision or invalid target state.
|
|
17
|
+
4. Launch one parallel background task per docs-eligible Wunderkind agent.
|
|
18
|
+
5. Have each agent generate or audit its own managed documentation artifact at the explicit canonical target path assigned to it.
|
|
19
|
+
6. Require each child task to return an explicit structured completion result for its own target file.
|
|
20
|
+
7. Consolidate the completed child results into a refreshed docs index, even if some children timed out or failed.
|
|
21
|
+
8. Only after full success across all planned children, run `init-deep` so the refreshed documentation structure is reflected in agent knowledge.
|
|
22
|
+
|
|
23
|
+
## Constraints
|
|
24
|
+
|
|
25
|
+
- Only docs-eligible Wunderkind agents should participate.
|
|
26
|
+
- One background task per eligible docs agent.
|
|
27
|
+
- Use canonical filenames and normalize non-canonical legacy files.
|
|
28
|
+
- Do not let individual agents invent output paths; use the explicit per-agent target paths from the docs-index plan.
|
|
29
|
+
- If the docs-index plan reports collisions, abort before fan-out.
|
|
30
|
+
- Each child must emit an explicit completion result for its own canonical target.
|
|
31
|
+
- If a critical failure occurs in generation or normalization, do **not** run `init-deep`.
|
|
32
|
+
- Surface partial failures clearly, but still write an index for the successfully completed child outputs.
|
|
33
|
+
|
|
34
|
+
## Notes
|
|
35
|
+
|
|
36
|
+
- This command is namespaced and should be treated as `/wunderkind:docs-index`.
|
|
37
|
+
- Use the configured docs path and history mode from project-local Wunderkind config.
|
|
38
|
+
- The coordinator owns orchestration and the docs index; individual agents own their own document outputs.
|
|
39
|
+
- Full success means all planned canonical files exist after the run and all children explicitly reported `complete`.
|
|
40
|
+
- Partial success means some child docs completed and can be indexed, but `init-deep` must be skipped.
|
|
41
|
+
|
|
42
|
+
<user-request>
|
|
43
|
+
$ARGUMENTS
|
|
44
|
+
</user-request>
|
|
@@ -3,6 +3,12 @@ export interface AgentDocsConfig {
|
|
|
3
3
|
canonicalFilename: string;
|
|
4
4
|
eligible: boolean;
|
|
5
5
|
}
|
|
6
|
+
export declare const DOCS_INDEX_RUNTIME_STATUS: {
|
|
7
|
+
readonly invocation: "/wunderkind:docs-index";
|
|
8
|
+
readonly executable: true;
|
|
9
|
+
readonly reason: "Implemented as a plugin command via commands/docs-index.md and intended to fan out parallel background doc tasks.";
|
|
10
|
+
};
|
|
11
|
+
export declare function getDocsEligibleAgentKeys(): string[];
|
|
6
12
|
export declare const AGENT_DOCS_CONFIG: Record<string, AgentDocsConfig>;
|
|
7
13
|
export declare function buildDocsInstruction(agentKey: string, docsPath: string, docHistoryMode: DocHistoryMode): string;
|
|
8
14
|
//# sourceMappingURL=docs-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-config.d.ts","sourceRoot":"","sources":["../../src/agents/docs-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAiD7D,CAAA;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,cAAc,GAC7B,MAAM,
|
|
1
|
+
{"version":3,"file":"docs-config.d.ts","sourceRoot":"","sources":["../../src/agents/docs-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,MAAM,WAAW,eAAe;IAC9B,iBAAiB,EAAE,MAAM,CAAA;IACzB,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED,eAAO,MAAM,yBAAyB;;;;CAI5B,CAAA;AAEV,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CAInD;AAED,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAiD7D,CAAA;AAED,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,cAAc,GAC7B,MAAM,CAqBR"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export const DOCS_INDEX_RUNTIME_STATUS = {
|
|
2
|
+
invocation: "/wunderkind:docs-index",
|
|
3
|
+
executable: true,
|
|
4
|
+
reason: "Implemented as a plugin command via commands/docs-index.md and intended to fan out parallel background doc tasks.",
|
|
5
|
+
};
|
|
6
|
+
export function getDocsEligibleAgentKeys() {
|
|
7
|
+
return Object.entries(AGENT_DOCS_CONFIG)
|
|
8
|
+
.filter(([, config]) => config.eligible)
|
|
9
|
+
.map(([key]) => key);
|
|
10
|
+
}
|
|
1
11
|
export const AGENT_DOCS_CONFIG = {
|
|
2
12
|
"marketing-wunderkind": {
|
|
3
13
|
canonicalFilename: "marketing-strategy.md",
|
|
@@ -63,6 +73,10 @@ History mode: ${docHistoryMode}
|
|
|
63
73
|
|
|
64
74
|
Use the configured docs path exactly as provided: ${docsPath}
|
|
65
75
|
|
|
66
|
-
After writing,
|
|
76
|
+
After writing, participate in the \`/wunderkind:docs-index\` workflow to refresh the project documentation index.
|
|
77
|
+
|
|
78
|
+
Each eligible docs agent owns its own canonical document output. When your work is complete, return an explicit completion result for your target file so the coordinator can decide whether to write a partial index or a full success index.
|
|
79
|
+
|
|
80
|
+
The namespaced plugin command coordinates one parallel background task per eligible docs agent, writes the index from completed child outputs, and only runs \`init-deep\` after full success.`;
|
|
67
81
|
}
|
|
68
82
|
//# sourceMappingURL=docs-config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-config.js","sourceRoot":"","sources":["../../src/agents/docs-config.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,iBAAiB,GAAoC;IAChE,sBAAsB,EAAE;QACtB,iBAAiB,EAAE,uBAAuB;QAC1C,QAAQ,EAAE,IAAI;KACf;IACD,mBAAmB,EAAE;QACnB,iBAAiB,EAAE,qBAAqB;QACxC,QAAQ,EAAE,IAAI;KACf;IACD,oBAAoB,EAAE;QACpB,iBAAiB,EAAE,sBAAsB;QACzC,QAAQ,EAAE,IAAI;KACf;IACD,sBAAsB,EAAE;QACtB,iBAAiB,EAAE,0BAA0B;QAC7C,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,iBAAiB,EAAE,qBAAqB;QACxC,QAAQ,EAAE,IAAI;KACf;IACD,eAAe,EAAE;QACf,iBAAiB,EAAE,iBAAiB;QACpC,QAAQ,EAAE,IAAI;KACf;IACD,iBAAiB,EAAE;QACjB,iBAAiB,EAAE,iBAAiB;QACpC,QAAQ,E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AC,iBAAiB;;gBAEvE,cAAc;;;;;;oDAMsB,QAAQ;;;;;;+LAMmI,CAAA;AAC/L,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface DocsIndexPlanEntry {
|
|
2
|
+
agentKey: string;
|
|
3
|
+
canonicalFilename: string;
|
|
4
|
+
targetPath: string;
|
|
5
|
+
}
|
|
6
|
+
export type DocsIndexTaskStatus = "complete" | "failed" | "timed_out";
|
|
7
|
+
export interface DocsIndexTaskResult {
|
|
8
|
+
agentKey: string;
|
|
9
|
+
targetPath: string;
|
|
10
|
+
status: DocsIndexTaskStatus;
|
|
11
|
+
notes: string[];
|
|
12
|
+
}
|
|
13
|
+
export interface DocsIndexPlan {
|
|
14
|
+
docsPath: string;
|
|
15
|
+
entries: DocsIndexPlanEntry[];
|
|
16
|
+
}
|
|
17
|
+
export interface DocsIndexAggregation {
|
|
18
|
+
completed: DocsIndexTaskResult[];
|
|
19
|
+
incomplete: DocsIndexTaskResult[];
|
|
20
|
+
canRunInitDeep: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function buildDocsIndexPlan(docsPath: string): DocsIndexPlan;
|
|
23
|
+
export declare function detectDocsIndexCollisions(plan: DocsIndexPlan): string[];
|
|
24
|
+
export declare function hasCompleteDocsIndexOutputs(plan: DocsIndexPlan, existingPaths: string[]): boolean;
|
|
25
|
+
export declare function buildDocsIndexCompletionTag(result: DocsIndexTaskResult): string;
|
|
26
|
+
export declare function parseDocsIndexCompletionTag(output: string): DocsIndexTaskResult | null;
|
|
27
|
+
export declare function aggregateDocsIndexResults(plan: DocsIndexPlan, results: DocsIndexTaskResult[], existingPaths: string[]): DocsIndexAggregation;
|
|
28
|
+
//# sourceMappingURL=docs-index-plan.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-index-plan.d.ts","sourceRoot":"","sources":["../../src/agents/docs-index-plan.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,kBAAkB;IACjC,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.trim();
|
|
4
|
+
if (trimmed === "")
|
|
5
|
+
return "./docs";
|
|
6
|
+
return trimmed.endsWith("/") ? trimmed.slice(0, -1) : trimmed;
|
|
7
|
+
}
|
|
8
|
+
export function buildDocsIndexPlan(docsPath) {
|
|
9
|
+
const normalizedDocsPath = normalizeDocsPath(docsPath);
|
|
10
|
+
const entries = getDocsEligibleAgentKeys().map((agentKey) => {
|
|
11
|
+
const config = AGENT_DOCS_CONFIG[agentKey];
|
|
12
|
+
if (!config) {
|
|
13
|
+
throw new Error(`Unknown docs agent key: ${agentKey}`);
|
|
14
|
+
}
|
|
15
|
+
return {
|
|
16
|
+
agentKey,
|
|
17
|
+
canonicalFilename: config.canonicalFilename,
|
|
18
|
+
targetPath: `${normalizedDocsPath}/${config.canonicalFilename}`,
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
docsPath: normalizedDocsPath,
|
|
23
|
+
entries,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function detectDocsIndexCollisions(plan) {
|
|
27
|
+
const seen = new Map();
|
|
28
|
+
const collisions = [];
|
|
29
|
+
for (const entry of plan.entries) {
|
|
30
|
+
const existing = seen.get(entry.targetPath);
|
|
31
|
+
if (existing) {
|
|
32
|
+
collisions.push(`${existing} <-> ${entry.agentKey} => ${entry.targetPath}`);
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
seen.set(entry.targetPath, entry.agentKey);
|
|
36
|
+
}
|
|
37
|
+
return collisions;
|
|
38
|
+
}
|
|
39
|
+
export function hasCompleteDocsIndexOutputs(plan, existingPaths) {
|
|
40
|
+
const existing = new Set(existingPaths);
|
|
41
|
+
return plan.entries.every((entry) => existing.has(entry.targetPath));
|
|
42
|
+
}
|
|
43
|
+
export function buildDocsIndexCompletionTag(result) {
|
|
44
|
+
const notes = result.notes.join(" | ");
|
|
45
|
+
return [
|
|
46
|
+
"<wunderkind-docs-index-result>",
|
|
47
|
+
`agentKey=${result.agentKey}`,
|
|
48
|
+
`targetPath=${result.targetPath}`,
|
|
49
|
+
`status=${result.status}`,
|
|
50
|
+
`notes=${notes}`,
|
|
51
|
+
"</wunderkind-docs-index-result>",
|
|
52
|
+
].join("\n");
|
|
53
|
+
}
|
|
54
|
+
export function parseDocsIndexCompletionTag(output) {
|
|
55
|
+
const match = output.match(/<wunderkind-docs-index-result>\s*agentKey=(.+)\s*targetPath=(.+)\s*status=(complete|failed|timed_out)\s*notes=(.*)\s*<\/wunderkind-docs-index-result>/s);
|
|
56
|
+
if (!match)
|
|
57
|
+
return null;
|
|
58
|
+
const [, agentKey, targetPath, status, notes] = match;
|
|
59
|
+
if (agentKey === undefined || targetPath === undefined || status === undefined || notes === undefined) {
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
agentKey: agentKey.trim(),
|
|
64
|
+
targetPath: targetPath.trim(),
|
|
65
|
+
status: status.trim(),
|
|
66
|
+
notes: notes.trim() === "" ? [] : notes.split("|").map((item) => item.trim()).filter(Boolean),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export function aggregateDocsIndexResults(plan, results, existingPaths) {
|
|
70
|
+
const existing = new Set(existingPaths);
|
|
71
|
+
const resultsByEntry = new Map();
|
|
72
|
+
for (const result of results) {
|
|
73
|
+
const key = `${result.agentKey}::${result.targetPath}`;
|
|
74
|
+
const current = resultsByEntry.get(key);
|
|
75
|
+
if (current) {
|
|
76
|
+
current.push(result);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
resultsByEntry.set(key, [result]);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const completed = [];
|
|
83
|
+
const incomplete = [];
|
|
84
|
+
for (const entry of plan.entries) {
|
|
85
|
+
const key = `${entry.agentKey}::${entry.targetPath}`;
|
|
86
|
+
const matching = resultsByEntry.get(key) ?? [];
|
|
87
|
+
if (matching.length !== 1) {
|
|
88
|
+
incomplete.push({
|
|
89
|
+
agentKey: entry.agentKey,
|
|
90
|
+
targetPath: entry.targetPath,
|
|
91
|
+
status: "failed",
|
|
92
|
+
notes: [matching.length === 0 ? "missing completion result" : "duplicate completion results"],
|
|
93
|
+
});
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
const [result] = matching;
|
|
97
|
+
if (result === undefined) {
|
|
98
|
+
incomplete.push({
|
|
99
|
+
agentKey: entry.agentKey,
|
|
100
|
+
targetPath: entry.targetPath,
|
|
101
|
+
status: "failed",
|
|
102
|
+
notes: ["missing completion result"],
|
|
103
|
+
});
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
if (result.status === "complete" && existing.has(entry.targetPath)) {
|
|
107
|
+
completed.push(result);
|
|
108
|
+
continue;
|
|
109
|
+
}
|
|
110
|
+
incomplete.push(result);
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
completed,
|
|
114
|
+
incomplete,
|
|
115
|
+
canRunInitDeep: incomplete.length === 0 && completed.length === plan.entries.length,
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
//# sourceMappingURL=docs-index-plan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-index-plan.js","sourceRoot":"","sources":["../../src/agents/docs-index-plan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAA;AA4B9E,SAAS,iBAAiB,CAAC,QAAgB;IACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;IAC/B,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAA;IACnC,OAAO,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAA;AAC/D,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,MAAM,kBAAkB,G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AC9F,CAAC,CAAA;YACF,SAAQ;QACV,CAAC;QAED,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAA;QACzB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,UAAU,CAAC,IAAI,CAAC;gBACd,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,CAAC,2BAA2B,CAAC;aACrC,CAAC,CAAA;YACF,SAAQ;QACV,CAAC;QAED,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;YACnE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;YACtB,SAAQ;QACV,CAAC;QAED,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACzB,CAAC;IAED,OAAO;QACL,SAAS;QACT,UAAU;QACV,cAAc,EAAE,UAAU,CAAC,MAAM,KAAK,CAAC,IAAI,SAAS,CAAC,MAAM,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM;KACpF,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InstallArgs } from "./types.js";
|
|
1
|
+
import type { InstallArgs, InstallScope } from "./types.js";
|
|
2
2
|
export declare const SYMBOLS: {
|
|
3
3
|
check: string;
|
|
4
4
|
cross: string;
|
|
@@ -19,5 +19,13 @@ export declare function validateNonTuiArgs(args: InstallArgs): {
|
|
|
19
19
|
valid: boolean;
|
|
20
20
|
errors: string[];
|
|
21
21
|
};
|
|
22
|
+
export interface UpgradeArgs {
|
|
23
|
+
scope: InstallScope;
|
|
24
|
+
region?: string;
|
|
25
|
+
industry?: string;
|
|
26
|
+
primaryRegulation?: string;
|
|
27
|
+
secondaryRegulation?: string;
|
|
28
|
+
}
|
|
22
29
|
export declare function runCliInstaller(args: InstallArgs): Promise<number>;
|
|
30
|
+
export declare function runCliUpgrade(args: UpgradeArgs): Promise<number>;
|
|
23
31
|
//# sourceMappingURL=cli-installer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-installer.d.ts","sourceRoot":"","sources":["../../src/cli/cli-installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"cli-installer.d.ts","sourceRoot":"","sources":["../../src/cli/cli-installer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAiB,YAAY,EAAE,MAAM,YAAY,CAAA;AAW1E,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAA;AAED,wBAAgB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAKnD;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAE5E;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CA8B9D;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,WAAW,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAM1F;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CA8FxE;AAED,wBAAsB,aAAa,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAqEtE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import color from "picocolors";
|
|
2
|
-
import { addPluginToOpenCodeConfig, detectCurrentConfig, detectLegacyConfig, writeWunderkindConfig } from "./config-manager/index.js";
|
|
2
|
+
import { addPluginToOpenCodeConfig, detectCurrentConfig, detectLegacyConfig, getDefaultGlobalConfig, readGlobalWunderkindConfig, writeWunderkindConfig, } from "./config-manager/index.js";
|
|
3
3
|
import { addAiTracesToGitignore } from "./gitignore-manager.js";
|
|
4
4
|
export const SYMBOLS = {
|
|
5
5
|
check: color.green("[OK]"),
|
|
@@ -82,7 +82,7 @@ export async function runCliInstaller(args) {
|
|
|
82
82
|
printError("Legacy config found at project root wunderkind.config.jsonc — move it to .wunderkind/wunderkind.config.jsonc");
|
|
83
83
|
return 1;
|
|
84
84
|
}
|
|
85
|
-
const isUpdate = detected.
|
|
85
|
+
const isUpdate = args.scope === "project" ? detected.projectInstalled === true : detected.globalInstalled === true;
|
|
86
86
|
printHeader(isUpdate);
|
|
87
87
|
const totalSteps = 3;
|
|
88
88
|
let step = 1;
|
|
@@ -105,11 +105,9 @@ export async function runCliInstaller(args) {
|
|
|
105
105
|
legalPersonality: detected.legalPersonality,
|
|
106
106
|
supportPersonality: detected.supportPersonality,
|
|
107
107
|
dataAnalystPersonality: detected.dataAnalystPersonality,
|
|
108
|
-
docsEnabled:
|
|
109
|
-
docsPath:
|
|
110
|
-
docHistoryMode:
|
|
111
|
-
? args.docHistoryMode
|
|
112
|
-
: "overwrite",
|
|
108
|
+
docsEnabled: detected.docsEnabled,
|
|
109
|
+
docsPath: detected.docsPath,
|
|
110
|
+
docHistoryMode: detected.docHistoryMode,
|
|
113
111
|
};
|
|
114
112
|
printStep(step++, totalSteps, "Adding wunderkind to OpenCode config...");
|
|
115
113
|
const pluginResult = addPluginToOpenCodeConfig(args.scope);
|
|
@@ -146,4 +144,56 @@ export async function runCliInstaller(args) {
|
|
|
146
144
|
console.log();
|
|
147
145
|
return 0;
|
|
148
146
|
}
|
|
147
|
+
export async function runCliUpgrade(args) {
|
|
148
|
+
const detected = detectCurrentConfig();
|
|
149
|
+
if (detectLegacyConfig()) {
|
|
150
|
+
printError("Legacy config found at project root wunderkind.config.jsonc — move it to .wunderkind/wunderkind.config.jsonc");
|
|
151
|
+
return 1;
|
|
152
|
+
}
|
|
153
|
+
const installedInScope = args.scope === "project" ? detected.projectInstalled === true : detected.globalInstalled === true;
|
|
154
|
+
if (!installedInScope) {
|
|
155
|
+
printHeader(false);
|
|
156
|
+
printError(args.scope === "project"
|
|
157
|
+
? "Wunderkind is not installed in the project scope. Did you mean 'wunderkind install --scope=project'?"
|
|
158
|
+
: "Wunderkind is not installed in the global scope. Did you mean 'wunderkind install --scope=global'?");
|
|
159
|
+
return 1;
|
|
160
|
+
}
|
|
161
|
+
printHeader(true);
|
|
162
|
+
const defaults = getDefaultGlobalConfig();
|
|
163
|
+
const persisted = readGlobalWunderkindConfig() ?? {};
|
|
164
|
+
const nextConfig = {
|
|
165
|
+
region: args.region ?? persisted.region ?? defaults.region,
|
|
166
|
+
industry: args.industry ?? persisted.industry ?? defaults.industry,
|
|
167
|
+
primaryRegulation: args.primaryRegulation ?? persisted.primaryRegulation ?? defaults.primaryRegulation,
|
|
168
|
+
secondaryRegulation: args.secondaryRegulation ?? persisted.secondaryRegulation ?? defaults.secondaryRegulation,
|
|
169
|
+
};
|
|
170
|
+
const isNoop = nextConfig.region === (persisted.region ?? defaults.region) &&
|
|
171
|
+
nextConfig.industry === (persisted.industry ?? defaults.industry) &&
|
|
172
|
+
nextConfig.primaryRegulation === (persisted.primaryRegulation ?? defaults.primaryRegulation) &&
|
|
173
|
+
nextConfig.secondaryRegulation === (persisted.secondaryRegulation ?? defaults.secondaryRegulation);
|
|
174
|
+
if (isNoop) {
|
|
175
|
+
printInfo("No changes required. Wunderkind is already up to date for the requested scope.");
|
|
176
|
+
return 0;
|
|
177
|
+
}
|
|
178
|
+
const configResult = writeWunderkindConfig({
|
|
179
|
+
...detected,
|
|
180
|
+
...nextConfig,
|
|
181
|
+
}, "global");
|
|
182
|
+
if (!configResult.success) {
|
|
183
|
+
printError(`Failed: ${configResult.error}`);
|
|
184
|
+
return 1;
|
|
185
|
+
}
|
|
186
|
+
printSuccess(`Global baseline updated ${SYMBOLS.arrow} ${color.dim(configResult.configPath)}`);
|
|
187
|
+
printBox([
|
|
188
|
+
` ${color.bold("Region:")} ${color.cyan(nextConfig.region)}`,
|
|
189
|
+
` ${color.bold("Industry:")} ${color.cyan(nextConfig.industry || color.dim("(not set)"))}`,
|
|
190
|
+
` ${color.bold("Primary regulation:")} ${color.cyan(nextConfig.primaryRegulation)}`,
|
|
191
|
+
nextConfig.secondaryRegulation
|
|
192
|
+
? ` ${color.bold("Secondary:")} ${color.cyan(nextConfig.secondaryRegulation)}`
|
|
193
|
+
: "",
|
|
194
|
+
]
|
|
195
|
+
.filter(Boolean)
|
|
196
|
+
.join("\n"), "Upgrade Complete");
|
|
197
|
+
return 0;
|
|
198
|
+
}
|
|
149
199
|
//# sourceMappingURL=cli-installer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-installer.js","sourceRoot":"","sources":["../../src/cli/cli-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"cli-installer.js","sourceRoot":"","sources":["../../src/cli/cli-installer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAA;AAE9B,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,kB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