@cubis/foundry 0.3.53 → 0.3.54

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +108 -3
  3. package/bin/cubis.js +5 -10286
  4. package/dist/cli/commands/register.js +87 -0
  5. package/dist/cli/commands/register.js.map +1 -0
  6. package/dist/cli/config/index.js +2 -0
  7. package/dist/cli/config/index.js.map +1 -0
  8. package/dist/cli/constants.js +4 -0
  9. package/dist/cli/constants.js.map +1 -0
  10. package/dist/cli/core.js +9141 -0
  11. package/dist/cli/core.js.map +1 -0
  12. package/dist/cli/index.js +3 -0
  13. package/dist/cli/index.js.map +1 -0
  14. package/dist/cli/init/banner.js +21 -0
  15. package/dist/cli/init/banner.js.map +1 -0
  16. package/dist/cli/init/execute.js +60 -0
  17. package/dist/cli/init/execute.js.map +1 -0
  18. package/dist/cli/init/index.js +5 -0
  19. package/dist/cli/init/index.js.map +1 -0
  20. package/dist/cli/init/prompts.js +122 -0
  21. package/dist/cli/init/prompts.js.map +1 -0
  22. package/dist/cli/init/types.js +2 -0
  23. package/dist/cli/init/types.js.map +1 -0
  24. package/dist/cli/io.js +2 -0
  25. package/dist/cli/io.js.map +1 -0
  26. package/dist/cli/mcp/commands.js +67 -0
  27. package/dist/cli/mcp/commands.js.map +1 -0
  28. package/dist/cli/mcp/index.js +2 -0
  29. package/dist/cli/mcp/index.js.map +1 -0
  30. package/dist/cli/pathing.js +51 -0
  31. package/dist/cli/pathing.js.map +1 -0
  32. package/dist/cli/platforms.js +2 -0
  33. package/dist/cli/platforms.js.map +1 -0
  34. package/dist/cli/rules/commands.js +26 -0
  35. package/dist/cli/rules/commands.js.map +1 -0
  36. package/dist/cli/rules/index.js +2 -0
  37. package/dist/cli/rules/index.js.map +1 -0
  38. package/dist/cli/tech/index.js +2 -0
  39. package/dist/cli/tech/index.js.map +1 -0
  40. package/dist/cli/types.js +2 -0
  41. package/dist/cli/types.js.map +1 -0
  42. package/dist/cli/workflows/commands.js +74 -0
  43. package/dist/cli/workflows/commands.js.map +1 -0
  44. package/dist/cli/workflows/index.js +2 -0
  45. package/dist/cli/workflows/index.js.map +1 -0
  46. package/package.json +17 -6
  47. package/src/cli/commands/register.ts +159 -0
  48. package/src/cli/config/index.ts +1 -0
  49. package/src/cli/constants.ts +3 -0
  50. package/src/cli/core.ts +11283 -0
  51. package/src/cli/index.ts +3 -0
  52. package/src/cli/init/banner.ts +20 -0
  53. package/src/cli/init/execute.ts +83 -0
  54. package/src/cli/init/index.ts +4 -0
  55. package/src/cli/init/prompts.ts +163 -0
  56. package/src/cli/init/types.ts +42 -0
  57. package/src/cli/io.ts +1 -0
  58. package/src/cli/mcp/commands.ts +131 -0
  59. package/src/cli/mcp/index.ts +1 -0
  60. package/src/cli/pathing.ts +50 -0
  61. package/src/cli/platforms.ts +1 -0
  62. package/src/cli/rules/commands.ts +40 -0
  63. package/src/cli/rules/index.ts +1 -0
  64. package/src/cli/tech/index.ts +1 -0
  65. package/src/cli/types.ts +15 -0
  66. package/src/cli/workflows/commands.ts +163 -0
  67. package/src/cli/workflows/index.ts +1 -0
  68. package/tsconfig.cli.json +19 -0
  69. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +18 -40
  70. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +18 -41
  71. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/AGENTS.md +18 -40
  72. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +18 -40
package/CHANGELOG.md CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  All notable changes to this project are documented in this file.
4
4
 
5
+ ## [0.3.54] - 2026-03-05
6
+
7
+ ### Added
8
+
9
+ - Added full cleanup command surfaces:
10
+ - `cbx remove all ...`
11
+ - `cbx workflows remove-all ...`
12
+ - Added cleanup engine for removing CBX-managed generated artifacts across selected scopes/platforms (workflows, wrappers, managed rule blocks/docs, MCP artifacts, runtime entries, and state/config roots).
13
+ - Added optional credential cleanup flag for full cleanup (`--include-credentials`).
14
+ - Added true-PTY init smoke test (`scripts/test-init-tty.exp`) and expanded smoke coverage for scripted init + remove-all command surfaces.
15
+
16
+ ### Changed
17
+
18
+ - Updated README with full cleanup documentation and generated-file ignore recommendations for downstream repositories.
19
+
20
+ ## [0.3.53] - 2026-03-05
21
+
22
+ ### Changed
23
+
24
+ - Migrated CLI runtime source to TypeScript modules under `src/cli` with compiled runtime output in `dist/cli`.
25
+ - Replaced `bin/cubis.js` with a thin runtime loader that executes compiled CLI output.
26
+ - Centralized command registration in modular TS command registrars (`workflows`, `mcp`, `rules`).
27
+ - Added root CLI build pipeline (`tsconfig.cli.json`, `npm run build:cli`, `prepack` build hook).
28
+ - Added interactive `cbx init` guided installer (bundle/platform/skills/MCP/scope flow with sequential per-platform execution).
29
+ - Added `cbx init` welcome branding screen and JSON summary mode.
30
+ - Added Stitch-only and Foundry-only MCP selection support in guided install flow.
31
+ - `cbx rules init` now refreshes generated/legacy `ENGINEERING_RULES.md` templates even without `--overwrite`.
32
+ - Managed engineering block now points to full absolute paths and enforces Decision Log response style.
33
+ - Added maintainers-facing wizard documentation at `docs/cli-init-wizard.md`.
34
+
35
+ ### Removed
36
+
37
+ - Removed legacy alias command tree `cbx skills ...`.
38
+ - Removed root aliases `cbx install` and `cbx platforms`.
39
+ - Removed alias subcommand `cbx workflows init`.
40
+
41
+ ### Notes
42
+
43
+ - Canonical command surfaces are now:
44
+ - `cbx init`
45
+ - `cbx workflows ...`
46
+ - `cbx mcp ...`
47
+ - `cbx rules ...`
48
+ - `cbx agents status`
49
+
5
50
  ## [0.3.34] - 2026-03-02
6
51
 
7
52
  ### Added
package/README.md CHANGED
@@ -21,12 +21,14 @@ Skill install default is profile-based:
21
21
 
22
22
  - [What This CLI Manages](#what-this-cli-manages)
23
23
  - [Install](#install)
24
+ - [Guided Init Wizard (`cbx init`)](#guided-init-wizard-cbx-init)
24
25
  - [Quickstarts](#quickstarts)
25
26
  - [Scope Model (Global vs Project)](#scope-model-global-vs-project)
26
27
  - [Credential Model (`cbx_config.json` only)](#credential-model-cbx_configjson-only)
27
28
  - [Postman and Stitch Setup Flows](#postman-and-stitch-setup-flows)
28
29
  - [MCP Placement Matrix](#mcp-placement-matrix)
29
30
  - [Command Reference](#command-reference)
31
+ - [Full Cleanup (`cbx remove all`)](#full-cleanup-cbx-remove-all)
30
32
  - [Troubleshooting](#troubleshooting)
31
33
  - [Migration Notes](#migration-notes)
32
34
  - [Platform Docs](#platform-docs)
@@ -54,6 +56,54 @@ export STITCH_API_KEY_DEFAULT="<your-stitch-api-key>" # Antigravity StitchMCP on
54
56
  cbx workflows config keys persist-env --service all --scope global
55
57
  ```
56
58
 
59
+ ## Guided Init Wizard (`cbx init`)
60
+
61
+ `cbx init` is the interactive guided installer for first-time setup and multi-platform onboarding.
62
+
63
+ ```bash
64
+ cbx init
65
+ ```
66
+
67
+ Wizard flow:
68
+ - Welcome screen (Cubis Foundry banner + version)
69
+ - Bundle selection
70
+ - Multi-platform selection (`codex`, `antigravity`, `copilot`)
71
+ - Skills profile selection (`core`, `web-backend`, `full`)
72
+ - MCP selection (`Cubis Foundry`, `Postman`, `Stitch`)
73
+ - Separate scope selection for Skills and MCP (`project` or `global`)
74
+ - MCP runtime selection (`cbx mcp serve` local, Docker pull, Docker local build) when Postman/Stitch is enabled
75
+ - Conditional Postman mode/key and Stitch key prompts
76
+ - Final summary + confirmation
77
+
78
+ Non-interactive default mode:
79
+
80
+ ```bash
81
+ cbx init --yes --dry-run --no-banner
82
+ ```
83
+
84
+ Non-interactive scripted selection:
85
+
86
+ ```bash
87
+ cbx init \
88
+ --yes \
89
+ --dry-run \
90
+ --no-banner \
91
+ --bundle agent-environment-setup \
92
+ --platforms codex,antigravity \
93
+ --skill-profile web-backend \
94
+ --skills-scope project \
95
+ --mcps cubis-foundry,postman,stitch \
96
+ --mcp-scope global \
97
+ --postman-mode minimal \
98
+ --mcp-runtime local
99
+ ```
100
+
101
+ `cbx workflows install` remains the canonical explicit/scriptable installer.
102
+ Use `cbx init` when you want step-by-step guided setup.
103
+
104
+ Detailed wizard behavior and platform matrix:
105
+ - `docs/cli-init-wizard.md`
106
+
57
107
  ## Quickstarts
58
108
 
59
109
  ### Codex (recommended baseline)
@@ -188,7 +238,7 @@ cbx workflows config keys persist-env --service all --scope global
188
238
  ```
189
239
 
190
240
  Alias commands are also available:
191
- - `cbx skills config keys ...`
241
+ - None. Use canonical `cbx workflows config keys ...` commands only.
192
242
 
193
243
  ## Postman and Stitch Setup Flows
194
244
 
@@ -290,6 +340,7 @@ Copilot:
290
340
  ```bash
291
341
  cbx workflows install --platform <codex|antigravity|copilot> --bundle agent-environment-setup
292
342
  cbx workflows remove <bundle-or-workflow> --platform <platform>
343
+ cbx workflows remove-all --scope <project|global|all> --platform <platform|all>
293
344
  cbx workflows prune-skills --platform <platform> --scope <project|global> --skill-profile <core|web-backend|full> [--include-mcp] [--dry-run]
294
345
  cbx workflows doctor --platform <platform> --scope <project|global>
295
346
  cbx workflows sync-rules --platform <platform> --scope <project|global>
@@ -462,9 +513,59 @@ cbx rules tech-md --overwrite
462
513
  cbx rules tech-md --overwrite --compact
463
514
  ```
464
515
 
465
- ### Legacy alias
516
+ ### Removed aliases
517
+
518
+ The following aliases were removed:
519
+ - `cbx skills ...`
520
+ - `cbx install`
521
+ - `cbx platforms`
522
+ - `cbx workflows init`
523
+
524
+ Use these canonical replacements:
525
+ - `cbx init` (guided interactive installer)
526
+ - `cbx workflows ...`
527
+ - `cbx workflows install`
528
+ - `cbx workflows platforms`
529
+
530
+ ## Full Cleanup (`cbx remove all`)
531
+
532
+ Use this when you want to remove all CBX-managed generated artifacts in one step.
533
+
534
+ ```bash
535
+ # Preview
536
+ cbx remove all --scope all --platform all --dry-run
537
+
538
+ # Apply
539
+ cbx remove all --scope all --platform all --yes
540
+ ```
541
+
542
+ Equivalent workflow command:
543
+
544
+ ```bash
545
+ cbx workflows remove-all --scope all --platform all --yes
546
+ ```
466
547
 
467
- `cbx skills ...` remains as a compatibility alias for `cbx workflows ...`.
548
+ What it removes (by scope/platform selection):
549
+ - Generated workflows/agents/skills wrappers.
550
+ - Managed rule blocks and generated engineering docs (`AGENTS.md`, `ENGINEERING_RULES.md`, `TECH.md`) where applicable.
551
+ - Managed MCP definition files and runtime target entries.
552
+ - Project/global `.cbx` state/config artifacts created by installer flows.
553
+ - Optional global credentials file (`~/.cbx/credentials.env`) when `--include-credentials` is provided.
554
+
555
+ To keep generated artifacts out of git in app repositories, add these ignore entries:
556
+
557
+ ```gitignore
558
+ .cbx/
559
+ .agent/
560
+ .agents/
561
+ .github/agents/
562
+ .github/skills/
563
+ .github/prompts/
564
+ .github/copilot/
565
+ AGENTS.md
566
+ ENGINEERING_RULES.md
567
+ TECH.md
568
+ ```
468
569
 
469
570
  ## Troubleshooting
470
571
 
@@ -572,6 +673,10 @@ cbx workflows config --scope global --clear-workspace-id
572
673
  - `config --show` now reports stored vs effective auth source.
573
674
  - Install now defaults to indexed top-level all-skill install.
574
675
  - Nested duplicate skill directories are auto-cleaned during install.
676
+ - Legacy aliases were removed (`skills`, root `install/init/platforms`, `workflows init`).
677
+ - CLI runtime migrated to TypeScript source under `src/cli` with compiled output under `dist/cli`.
678
+ - `ENGINEERING_RULES.md` now auto-refreshes generated/legacy templates on `cbx rules init` without requiring `--overwrite`.
679
+ - Managed engineering guardrail block now includes full absolute file paths and a Decision Log response contract.
575
680
 
576
681
  ### Suggested refresh
577
682