@cubis/foundry 0.3.25 → 0.3.26
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/CHANGELOG.md +7 -0
- package/README.md +36 -4
- package/bin/cubis.js +40 -4
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.3.26] - 2026-02-26
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- Fixed MCP install merge behavior for existing JSONC config files (comments/trailing commas), so existing MCP entries are preserved instead of being reset.
|
|
10
|
+
- Fixed Postman MCP patching to parse and merge JSONC for platform config targets (for example `.vscode/mcp.json`).
|
|
11
|
+
|
|
5
12
|
## [0.3.25] - 2026-02-26
|
|
6
13
|
|
|
7
14
|
### Added
|
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@ Workflow-first installer for AI agent environments, with Codex callable-skill wr
|
|
|
5
5
|
Repository layout note: reusable workflow/skill/power assets are stored under `Ai Agent Workflow/`.
|
|
6
6
|
|
|
7
7
|
Primary support in this release:
|
|
8
|
+
|
|
8
9
|
- Antigravity
|
|
9
10
|
- Codex
|
|
10
11
|
- Copilot (VS Code Chat + Copilot CLI)
|
|
@@ -22,6 +23,7 @@ cbx --help
|
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
Compatibility binaries are still shipped for migration:
|
|
26
|
+
|
|
25
27
|
- `cubiskill`
|
|
26
28
|
- `cubis`
|
|
27
29
|
|
|
@@ -36,11 +38,11 @@ export POSTMAN_API_KEY="<your-postman-api-key>"
|
|
|
36
38
|
export STITCH_API_KEY="<your-stitch-api-key>" # Antigravity StitchMCP only
|
|
37
39
|
|
|
38
40
|
# 3) Install workflow bundle for your platform
|
|
39
|
-
cbx workflows install --platform codex --bundle agent-environment-setup --postman
|
|
41
|
+
cbx workflows install --platform codex --bundle agent-environment-setup --postman
|
|
40
42
|
|
|
41
43
|
# 4) Optional: install for other platforms too
|
|
42
|
-
cbx workflows install --platform antigravity --bundle agent-environment-setup --postman
|
|
43
|
-
cbx workflows install --platform copilot --bundle agent-environment-setup --postman
|
|
44
|
+
cbx workflows install --platform antigravity --bundle agent-environment-setup --postman
|
|
45
|
+
cbx workflows install --platform copilot --bundle agent-environment-setup --postman
|
|
44
46
|
```
|
|
45
47
|
|
|
46
48
|
## Command Model
|
|
@@ -69,6 +71,7 @@ cbx workflows install --platform copilot --postman
|
|
|
69
71
|
```
|
|
70
72
|
|
|
71
73
|
Install bootstrap behavior:
|
|
74
|
+
|
|
72
75
|
- `cbx workflows install` now also bootstraps `ENGINEERING_RULES.md` and `TECH.md` (creates when missing; keeps existing files unless explicitly regenerated).
|
|
73
76
|
- When install scope is `global` (default), skills/powers install to global paths, while workflows + agents stay in workspace (`project`) paths.
|
|
74
77
|
- Rule sync + engineering artifacts (`AGENTS.md`/`GEMINI.md`/Copilot instructions, `ENGINEERING_RULES.md`, `TECH.md`) are maintained in workspace (`project`) scope.
|
|
@@ -79,6 +82,7 @@ Install bootstrap behavior:
|
|
|
79
82
|
- Use `cbx rules init --platform <platform> --overwrite` to force-regenerate both files.
|
|
80
83
|
|
|
81
84
|
Postman + Antigravity Stitch setup behavior:
|
|
85
|
+
|
|
82
86
|
- `cbx_config.json` is generated in workspace root (project MCP scope) or `~/.cbx/cbx_config.json` (global MCP scope).
|
|
83
87
|
- Managed MCP definition files are generated under `.cbx/mcp/<platform>/postman.json` (workspace scope) or `~/.cbx/mcp/<platform>/postman.json` (global scope).
|
|
84
88
|
- Env-first auth is supported: when `POSTMAN_API_KEY` is set, generated settings keep `apiKey: null` and MCP config uses `Bearer ${POSTMAN_API_KEY}`.
|
|
@@ -115,6 +119,7 @@ cbx workflows install --platform codex --bundle agent-environment-setup --postma
|
|
|
115
119
|
```
|
|
116
120
|
|
|
117
121
|
Important:
|
|
122
|
+
|
|
118
123
|
- If `cbx_config.json` already exists and you want to change the saved workspace, use `--overwrite` (or edit config manually), because existing config is preserved by default.
|
|
119
124
|
- If install output shows `Config file: skipped (...)`, your newly selected workspace is not persisted. Use `--overwrite` or edit with the config command below.
|
|
120
125
|
|
|
@@ -135,6 +140,7 @@ cbx workflows config --scope global --clear-workspace-id
|
|
|
135
140
|
```
|
|
136
141
|
|
|
137
142
|
Platform runtime MCP placement:
|
|
143
|
+
|
|
138
144
|
- Codex:
|
|
139
145
|
- Global MCP scope: `~/.codex/config.toml` via `codex mcp add`.
|
|
140
146
|
- Workspace MCP scope: `.vscode/mcp.json`.
|
|
@@ -146,6 +152,7 @@ Platform runtime MCP placement:
|
|
|
146
152
|
- Global MCP scope: `~/.copilot/mcp-config.json`.
|
|
147
153
|
|
|
148
154
|
API key docs:
|
|
155
|
+
|
|
149
156
|
- Google Stitch MCP setup docs: [stitch.withgoogle.com/docs/mcp/setup](https://stitch.withgoogle.com/docs/mcp/setup)
|
|
150
157
|
- Google Stitch settings (create API key): [stitch.withgoogle.com/settings](https://stitch.withgoogle.com/settings)
|
|
151
158
|
- Google Cloud API key guidance: [Authenticate to Google and Google Cloud MCP servers](https://docs.cloud.google.com/mcp/authenticate-mcp)
|
|
@@ -164,12 +171,14 @@ cbx rules init --platform codex --dry-run
|
|
|
164
171
|
```
|
|
165
172
|
|
|
166
173
|
What `cbx rules init` does:
|
|
174
|
+
|
|
167
175
|
- Creates `ENGINEERING_RULES.md` next to the active platform rule file.
|
|
168
176
|
- Appends/patches one managed engineering block in that rule file.
|
|
169
177
|
- Generates `TECH.md` at workspace root by scanning the current codebase.
|
|
170
178
|
- Preserves user content outside managed markers.
|
|
171
179
|
|
|
172
180
|
`TECH.md` scanner coverage (deterministic, no AI calls):
|
|
181
|
+
|
|
173
182
|
- Language/file signals from workspace scan.
|
|
174
183
|
- JS/TS package signals from `package.json` (including nested/monorepo package files).
|
|
175
184
|
- Flutter/Dart package signals from `pubspec.yaml`.
|
|
@@ -190,6 +199,7 @@ Ai Agent Workflow/workflows/
|
|
|
190
199
|
```
|
|
191
200
|
|
|
192
201
|
First bundled profile:
|
|
202
|
+
|
|
193
203
|
- `agent-environment-setup`
|
|
194
204
|
|
|
195
205
|
Bundle manifest:
|
|
@@ -199,6 +209,7 @@ Ai Agent Workflow/workflows/agent-environment-setup/manifest.json
|
|
|
199
209
|
```
|
|
200
210
|
|
|
201
211
|
Bundle contains platform-specific:
|
|
212
|
+
|
|
202
213
|
- workflow templates (`workflows/*.md`)
|
|
203
214
|
- specialist agent templates (`agents/*.md`)
|
|
204
215
|
- mapped reusable skills copied from `Ai Agent Workflow/skills/<id>/`
|
|
@@ -208,13 +219,14 @@ Bundle contains platform-specific:
|
|
|
208
219
|
## Installed Capability Set (v1)
|
|
209
220
|
|
|
210
221
|
Database capability stack:
|
|
222
|
+
|
|
211
223
|
- `database-skills` (engine hub)
|
|
212
224
|
- `database-design` (schema/migration design)
|
|
213
225
|
- `database-optimizer` (query/index/tuning triage)
|
|
214
226
|
- `drift-flutter` (Flutter local persistence)
|
|
215
227
|
|
|
216
|
-
|
|
217
228
|
Core workflows:
|
|
229
|
+
|
|
218
230
|
- `/brainstorm`
|
|
219
231
|
- `/plan`
|
|
220
232
|
- `/create`
|
|
@@ -229,6 +241,7 @@ Core workflows:
|
|
|
229
241
|
- `/qa`
|
|
230
242
|
|
|
231
243
|
Routing behavior:
|
|
244
|
+
|
|
232
245
|
- Antigravity/Copilot: workflow + agent markdown can be routed by platform conventions.
|
|
233
246
|
- Codex: use generated callable wrapper skills (`$workflow-*`, `$agent-*`).
|
|
234
247
|
- Example for backend intent in Codex: `$workflow-backend` or `$agent-backend-specialist`.
|
|
@@ -240,6 +253,7 @@ Codex does not currently execute custom workflow slash commands or custom `@agen
|
|
|
240
253
|
Codex skill invocation syntax is `$skill-name` (not `@agent-name`).
|
|
241
254
|
|
|
242
255
|
`cbx` handles this by generating callable Codex skills:
|
|
256
|
+
|
|
243
257
|
- Workflow wrappers: `$workflow-<name>` (for example `$workflow-review`, `$workflow-plan`)
|
|
244
258
|
- Agent wrappers: `$agent-<name>` (for example `$agent-backend-specialist`)
|
|
245
259
|
|
|
@@ -251,6 +265,7 @@ Do not rely on custom `/workflow` execution or custom `@agent` invocation in Cod
|
|
|
251
265
|
### Antigravity
|
|
252
266
|
|
|
253
267
|
Project scope:
|
|
268
|
+
|
|
254
269
|
- Workflows: `.agent/workflows`
|
|
255
270
|
- Agents: `.agent/agents`
|
|
256
271
|
- Skills: `.agent/skills`
|
|
@@ -258,6 +273,7 @@ Project scope:
|
|
|
258
273
|
- Terminal integration (optional): `.agent/terminal-integration`
|
|
259
274
|
|
|
260
275
|
Global scope:
|
|
276
|
+
|
|
261
277
|
- Skills: `~/.gemini/antigravity/skills`
|
|
262
278
|
- Rules: `~/.gemini/GEMINI.md`
|
|
263
279
|
- Workflows/agents/terminal-integration: default install keeps these in workspace (`.agent/...`) paths.
|
|
@@ -265,10 +281,12 @@ Global scope:
|
|
|
265
281
|
### Antigravity Terminal Integration (Optional)
|
|
266
282
|
|
|
267
283
|
Install-time options:
|
|
284
|
+
|
|
268
285
|
- `--terminal-integration`
|
|
269
286
|
- `--terminal-verifier <codex|gemini>`
|
|
270
287
|
|
|
271
288
|
Behavior:
|
|
289
|
+
|
|
272
290
|
- Interactive installs prompt whether to enable terminal verification integration.
|
|
273
291
|
- If enabled, cbx writes managed scripts/config under `.agent/terminal-integration`.
|
|
274
292
|
- cbx also writes a managed terminal verification block into Antigravity rule files so post-task verification commands are explicit.
|
|
@@ -277,6 +295,7 @@ Behavior:
|
|
|
277
295
|
### Codex
|
|
278
296
|
|
|
279
297
|
Project scope:
|
|
298
|
+
|
|
280
299
|
- Workflow templates (reference docs): `.agents/workflows`
|
|
281
300
|
- Skills: `.agents/skills`
|
|
282
301
|
- Rules: `AGENTS.md`
|
|
@@ -287,17 +306,20 @@ Project scope:
|
|
|
287
306
|
- Example usage: `$workflow-plan`, `$agent-backend-specialist`
|
|
288
307
|
|
|
289
308
|
Global scope:
|
|
309
|
+
|
|
290
310
|
- Skills: `~/.agents/skills`
|
|
291
311
|
- Rules: `~/.codex/AGENTS.md`
|
|
292
312
|
- Workflow templates (reference docs): default install keeps these in workspace `.agents/workflows`
|
|
293
313
|
- Agents: not installed for Codex runtime
|
|
294
314
|
|
|
295
315
|
Legacy compatibility note:
|
|
316
|
+
|
|
296
317
|
- `.codex/skills` is treated as legacy and flagged by `doctor` with migration guidance.
|
|
297
318
|
|
|
298
319
|
### Copilot
|
|
299
320
|
|
|
300
321
|
Project scope:
|
|
322
|
+
|
|
301
323
|
- Workflows: `.github/copilot/workflows`
|
|
302
324
|
- Agents: `.github/agents`
|
|
303
325
|
- Skills: `.github/skills`
|
|
@@ -305,6 +327,7 @@ Project scope:
|
|
|
305
327
|
- Skill schema note: `cbx` normalizes Copilot skill frontmatter by removing unsupported top-level keys like `displayName` and `keywords` during install.
|
|
306
328
|
|
|
307
329
|
Global scope:
|
|
330
|
+
|
|
308
331
|
- Skills: `~/.copilot/skills`
|
|
309
332
|
- Rules: `~/.copilot/copilot-instructions.md`
|
|
310
333
|
- Workflows/agents: default install keeps these in workspace (`.github/...`) paths.
|
|
@@ -317,11 +340,14 @@ Markers:
|
|
|
317
340
|
|
|
318
341
|
```md
|
|
319
342
|
<!-- cbx:workflows:auto:start platform=<platform-id> version=1 -->
|
|
343
|
+
|
|
320
344
|
...
|
|
345
|
+
|
|
321
346
|
<!-- cbx:workflows:auto:end -->
|
|
322
347
|
```
|
|
323
348
|
|
|
324
349
|
Behavior:
|
|
350
|
+
|
|
325
351
|
- Preserves user content outside markers.
|
|
326
352
|
- Replaces first valid managed block in place.
|
|
327
353
|
- Appends a managed block if missing.
|
|
@@ -331,6 +357,7 @@ Behavior:
|
|
|
331
357
|
## Scope and Detection
|
|
332
358
|
|
|
333
359
|
Default scope:
|
|
360
|
+
|
|
334
361
|
- Install/init commands:
|
|
335
362
|
- `cbx workflows install`
|
|
336
363
|
- `cbx workflows init`
|
|
@@ -343,15 +370,18 @@ Default scope:
|
|
|
343
370
|
- Other workflow/rules commands default to `project`.
|
|
344
371
|
|
|
345
372
|
Optional:
|
|
373
|
+
|
|
346
374
|
- `--scope global`
|
|
347
375
|
- `--scope project`
|
|
348
376
|
|
|
349
377
|
Platform auto-detection:
|
|
378
|
+
|
|
350
379
|
- Uses repo markers for Antigravity/Codex/Copilot.
|
|
351
380
|
- Prompts when ambiguous.
|
|
352
381
|
- Remembers last selected platform in local state.
|
|
353
382
|
|
|
354
383
|
State files:
|
|
384
|
+
|
|
355
385
|
- Project: `.cbx/workflows-state.json`
|
|
356
386
|
- Global: `~/.cbx/state.json`
|
|
357
387
|
|
|
@@ -367,6 +397,7 @@ cbx workflows sync-rules --platform codex --dry-run
|
|
|
367
397
|
```
|
|
368
398
|
|
|
369
399
|
Dry-run behavior:
|
|
400
|
+
|
|
370
401
|
- prints planned file changes
|
|
371
402
|
- prints planned managed-block action (`would-create`/`would-patch`)
|
|
372
403
|
- does not write files
|
|
@@ -406,6 +437,7 @@ cbx workflows remove agent-environment-setup --platform antigravity --yes
|
|
|
406
437
|
## Doctor Checks
|
|
407
438
|
|
|
408
439
|
`cbx workflows doctor` validates:
|
|
440
|
+
|
|
409
441
|
- workflow/agent/skill path existence
|
|
410
442
|
- active rule file status
|
|
411
443
|
- managed block health
|
package/bin/cubis.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
+
import { parse as parseJsonc } from "jsonc-parser";
|
|
5
6
|
import { existsSync } from "node:fs";
|
|
6
7
|
import {
|
|
7
8
|
cp,
|
|
@@ -2497,11 +2498,44 @@ function parseStoredStitchConfig(raw) {
|
|
|
2497
2498
|
};
|
|
2498
2499
|
}
|
|
2499
2500
|
|
|
2501
|
+
function parseJsonLenient(raw) {
|
|
2502
|
+
try {
|
|
2503
|
+
return {
|
|
2504
|
+
ok: true,
|
|
2505
|
+
value: JSON.parse(raw),
|
|
2506
|
+
mode: "json"
|
|
2507
|
+
};
|
|
2508
|
+
} catch (jsonError) {
|
|
2509
|
+
const errors = [];
|
|
2510
|
+
const value = parseJsonc(raw, errors, {
|
|
2511
|
+
allowTrailingComma: true,
|
|
2512
|
+
disallowComments: false,
|
|
2513
|
+
allowEmptyContent: false
|
|
2514
|
+
});
|
|
2515
|
+
if (errors.length === 0) {
|
|
2516
|
+
return {
|
|
2517
|
+
ok: true,
|
|
2518
|
+
value,
|
|
2519
|
+
mode: "jsonc"
|
|
2520
|
+
};
|
|
2521
|
+
}
|
|
2522
|
+
return {
|
|
2523
|
+
ok: false,
|
|
2524
|
+
value: null,
|
|
2525
|
+
error: jsonError
|
|
2526
|
+
};
|
|
2527
|
+
}
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2500
2530
|
async function readJsonFileIfExists(filePath) {
|
|
2501
2531
|
if (!(await pathExists(filePath))) return { exists: false, value: null };
|
|
2502
2532
|
try {
|
|
2503
2533
|
const raw = await readFile(filePath, "utf8");
|
|
2504
|
-
|
|
2534
|
+
const parsed = parseJsonLenient(raw);
|
|
2535
|
+
if (!parsed.ok) {
|
|
2536
|
+
return { exists: true, value: null, error: parsed.error };
|
|
2537
|
+
}
|
|
2538
|
+
return { exists: true, value: parsed.value };
|
|
2505
2539
|
} catch (error) {
|
|
2506
2540
|
return { exists: true, value: null, error };
|
|
2507
2541
|
}
|
|
@@ -2515,9 +2549,11 @@ async function upsertJsonObjectFile({ targetPath, updater, dryRun = false }) {
|
|
|
2515
2549
|
if (exists) {
|
|
2516
2550
|
try {
|
|
2517
2551
|
const raw = await readFile(targetPath, "utf8");
|
|
2518
|
-
const decoded =
|
|
2519
|
-
if (decoded
|
|
2520
|
-
parsed
|
|
2552
|
+
const decoded = parseJsonLenient(raw);
|
|
2553
|
+
if (!decoded.ok) {
|
|
2554
|
+
warnings.push(`Existing JSON at ${targetPath} could not be parsed. Resetting structure.`);
|
|
2555
|
+
} else if (decoded.value && typeof decoded.value === "object" && !Array.isArray(decoded.value)) {
|
|
2556
|
+
parsed = decoded.value;
|
|
2521
2557
|
} else {
|
|
2522
2558
|
warnings.push(`Existing JSON at ${targetPath} was not an object. Resetting structure.`);
|
|
2523
2559
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubis/foundry",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.26",
|
|
4
4
|
"description": "Cubis Foundry CLI for workflow-first AI agent environments",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@inquirer/prompts": "^7.8.6",
|
|
49
|
-
"commander": "^14.0.1"
|
|
49
|
+
"commander": "^14.0.1",
|
|
50
|
+
"jsonc-parser": "^3.3.1"
|
|
50
51
|
}
|
|
51
52
|
}
|