@cubis/foundry 0.3.81 → 0.3.83

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 (645) hide show
  1. package/README.md +25 -9
  2. package/dist/cli/core.js +828 -496
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +996 -666
  6. package/workflows/skills/_schema/platform-notes/antigravity.md +8 -5
  7. package/workflows/skills/_schema/platform-notes/claude.md +7 -0
  8. package/workflows/skills/_schema/platform-notes/codex.md +9 -2
  9. package/workflows/skills/_schema/platform-notes/copilot.md +7 -3
  10. package/workflows/skills/_schema/platform-notes/gemini.md +8 -4
  11. package/workflows/workflows/agent-environment-setup/generated/route-manifest.json +339 -231
  12. package/workflows/workflows/agent-environment-setup/manifest.json +142 -250
  13. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/accessibility.toml +69 -4
  14. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-backend-specialist.toml +86 -0
  15. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-code-archaeologist.toml +67 -0
  16. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-database-architect.toml +79 -0
  17. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-debugger.toml +76 -0
  18. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-devops-engineer.toml +74 -0
  19. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-documentation-writer.toml +65 -0
  20. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-frontend-specialist.toml +76 -0
  21. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-game-developer.toml +52 -0
  22. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-mobile-developer.toml +76 -0
  23. package/workflows/workflows/agent-environment-setup/platforms/{codex/agents/orchestrator.md → antigravity/commands/agent-orchestrator.toml} +26 -23
  24. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-penetration-tester.toml +70 -0
  25. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-performance-optimizer.toml +69 -0
  26. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-product-manager.toml +56 -0
  27. package/workflows/workflows/agent-environment-setup/platforms/{codex/agents/project-planner.md → antigravity/commands/agent-project-planner.toml} +19 -16
  28. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-qa-automation-engineer.toml +63 -0
  29. package/workflows/workflows/agent-environment-setup/platforms/{codex/agents/researcher.md → antigravity/commands/agent-researcher.toml} +22 -29
  30. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-security-auditor.toml +73 -0
  31. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-seo-specialist.toml +52 -0
  32. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-sre-engineer.toml +74 -0
  33. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-test-engineer.toml +71 -0
  34. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-validator.toml +76 -0
  35. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/agent-vercel-expert.toml +59 -0
  36. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/architecture.toml +120 -5
  37. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/backend.toml +71 -4
  38. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/create.toml +68 -4
  39. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/database.toml +67 -4
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/debug.toml +63 -4
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/devops.toml +64 -4
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/implement-track.toml +71 -4
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/migrate.toml +70 -4
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/mobile.toml +71 -4
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/onboard.toml +65 -4
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/orchestrate.toml +73 -4
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/plan.toml +79 -4
  48. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/refactor.toml +67 -4
  49. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/release.toml +70 -4
  50. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/review.toml +66 -4
  51. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/security.toml +69 -4
  52. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/spec.toml +71 -4
  53. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/test.toml +66 -4
  54. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/vercel.toml +67 -4
  55. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +12 -14
  56. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/api-design/SKILL.md +8 -5
  57. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/architecture-doc/SKILL.md +8 -5
  58. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/ci-cd-pipeline/SKILL.md +8 -5
  59. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/code-review/SKILL.md +8 -5
  60. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/csharp-best-practices/SKILL.md +8 -5
  61. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/database-design/SKILL.md +8 -5
  62. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/deep-research/SKILL.md +8 -5
  63. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/django-drf/SKILL.md +8 -5
  64. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/docker-compose-dev/SKILL.md +8 -5
  65. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/drizzle-orm/SKILL.md +8 -5
  66. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/electron-qa/SKILL.md +8 -5
  67. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/expo-app/SKILL.md +8 -5
  68. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/express-nodejs/SKILL.md +8 -5
  69. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/fastapi/SKILL.md +8 -5
  70. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/frontend-design/SKILL.md +8 -5
  71. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/gin-golang/SKILL.md +8 -5
  72. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/git-workflow/SKILL.md +8 -5
  73. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/go-fiber/SKILL.md +8 -5
  74. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/golang-best-practices/SKILL.md +8 -5
  75. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/google-workspace/SKILL.md +8 -5
  76. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/huggingface-ml/SKILL.md +8 -5
  77. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/integration-testing/SKILL.md +8 -5
  78. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/java-best-practices/SKILL.md +8 -5
  79. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/javascript-best-practices/SKILL.md +8 -5
  80. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/kaizen-iteration/SKILL.md +8 -5
  81. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/kotlin-best-practices/SKILL.md +8 -5
  82. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/kubernetes-deploy/SKILL.md +8 -5
  83. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/laravel/SKILL.md +8 -5
  84. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/llm-eval/SKILL.md +8 -5
  85. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/mcp-server-builder/SKILL.md +8 -5
  86. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/microservices-design/SKILL.md +8 -5
  87. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/nestjs/SKILL.md +8 -5
  88. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/nextjs/SKILL.md +8 -5
  89. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/observability/SKILL.md +8 -5
  90. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/owasp-security-review/SKILL.md +8 -5
  91. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/pentest-skill/SKILL.md +8 -5
  92. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/performance-testing/SKILL.md +8 -5
  93. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/php-best-practices/SKILL.md +8 -5
  94. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/playwright-interactive/SKILL.md +8 -5
  95. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/playwright-persistent-browser/SKILL.md +8 -5
  96. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/prisma/SKILL.md +8 -5
  97. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/prompt-engineering/SKILL.md +8 -5
  98. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/python-best-practices/SKILL.md +8 -5
  99. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/rag-patterns/SKILL.md +8 -5
  100. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/react/SKILL.md +8 -5
  101. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/react-native/SKILL.md +8 -5
  102. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/react-native-callstack/SKILL.md +8 -5
  103. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/receiving-code-review/SKILL.md +8 -5
  104. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/remix/SKILL.md +8 -5
  105. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/requesting-code-review/SKILL.md +8 -5
  106. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/rust-best-practices/SKILL.md +8 -5
  107. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/sadd/SKILL.md +8 -5
  108. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/sanitize-pii/SKILL.md +8 -5
  109. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/secret-management/SKILL.md +8 -5
  110. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/skill-creator/SKILL.md +8 -5
  111. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/spec-driven-delivery/SKILL.md +8 -5
  112. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/spring-boot/SKILL.md +8 -5
  113. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/sqlalchemy/SKILL.md +8 -5
  114. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stitch/SKILL.md +8 -5
  115. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/stripe-integration/SKILL.md +8 -5
  116. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/svelte-sveltekit/SKILL.md +8 -5
  117. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/swift-best-practices/SKILL.md +8 -5
  118. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/system-design/SKILL.md +8 -5
  119. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/systematic-debugging/SKILL.md +8 -5
  120. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/t3-stack/SKILL.md +8 -5
  121. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/tech-doc/SKILL.md +8 -5
  122. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/typescript-best-practices/SKILL.md +8 -5
  123. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/unit-testing/SKILL.md +8 -5
  124. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/vibesec/SKILL.md +8 -5
  125. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/vuejs/SKILL.md +8 -5
  126. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/accessibility.md → generated-skills/accessibility/SKILL.md} +16 -17
  127. package/workflows/workflows/agent-environment-setup/platforms/claude/generated-skills/architecture/SKILL.md +124 -0
  128. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/backend.md → claude/generated-skills/backend/SKILL.md} +16 -24
  129. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/create.md → generated-skills/create/SKILL.md} +13 -6
  130. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/database.md → claude/generated-skills/database/SKILL.md} +16 -9
  131. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/debug.md → claude/generated-skills/debug/SKILL.md} +16 -9
  132. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/devops.md → claude/generated-skills/devops/SKILL.md} +20 -27
  133. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/implement-track.md → claude/generated-skills/implement-track/SKILL.md} +14 -7
  134. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/migrate.md → generated-skills/migrate/SKILL.md} +17 -18
  135. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/mobile.md → claude/generated-skills/mobile/SKILL.md} +18 -11
  136. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/onboard.md → claude/generated-skills/onboard/SKILL.md} +15 -15
  137. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/orchestrate.md → claude/generated-skills/orchestrate/SKILL.md} +14 -7
  138. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/plan.md → claude/generated-skills/plan/SKILL.md} +13 -17
  139. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/refactor.md → claude/generated-skills/refactor/SKILL.md} +17 -10
  140. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/release.md → claude/generated-skills/release/SKILL.md} +19 -12
  141. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/review.md → generated-skills/review/SKILL.md} +16 -9
  142. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/security.md → generated-skills/security/SKILL.md} +16 -9
  143. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/spec.md → generated-skills/spec/SKILL.md} +12 -15
  144. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/test.md → generated-skills/test/SKILL.md} +16 -9
  145. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/vercel.md → generated-skills/vercel/SKILL.md} +18 -20
  146. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/api-design/SKILL.md +7 -0
  147. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/architecture-doc/SKILL.md +7 -0
  148. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/ci-cd-pipeline/SKILL.md +7 -0
  149. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/code-review/SKILL.md +7 -0
  150. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/csharp-best-practices/SKILL.md +7 -0
  151. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/database-design/SKILL.md +7 -0
  152. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/deep-research/SKILL.md +7 -0
  153. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/django-drf/SKILL.md +7 -0
  154. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/docker-compose-dev/SKILL.md +7 -0
  155. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/drizzle-orm/SKILL.md +7 -0
  156. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/electron-qa/SKILL.md +7 -0
  157. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/expo-app/SKILL.md +7 -0
  158. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/express-nodejs/SKILL.md +7 -0
  159. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/fastapi/SKILL.md +7 -0
  160. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/frontend-design/SKILL.md +7 -0
  161. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/gin-golang/SKILL.md +7 -0
  162. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/git-workflow/SKILL.md +7 -0
  163. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/go-fiber/SKILL.md +7 -0
  164. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/golang-best-practices/SKILL.md +7 -0
  165. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/google-workspace/SKILL.md +7 -0
  166. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/huggingface-ml/SKILL.md +7 -0
  167. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/integration-testing/SKILL.md +7 -0
  168. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/java-best-practices/SKILL.md +7 -0
  169. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/javascript-best-practices/SKILL.md +7 -0
  170. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/kaizen-iteration/SKILL.md +7 -0
  171. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/kotlin-best-practices/SKILL.md +7 -0
  172. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/kubernetes-deploy/SKILL.md +7 -0
  173. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/laravel/SKILL.md +7 -0
  174. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/llm-eval/SKILL.md +7 -0
  175. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/mcp-server-builder/SKILL.md +7 -0
  176. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/microservices-design/SKILL.md +7 -0
  177. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/nestjs/SKILL.md +7 -0
  178. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/nextjs/SKILL.md +7 -0
  179. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/observability/SKILL.md +7 -0
  180. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/owasp-security-review/SKILL.md +7 -0
  181. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/pentest-skill/SKILL.md +7 -0
  182. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/performance-testing/SKILL.md +7 -0
  183. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/php-best-practices/SKILL.md +7 -0
  184. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-interactive/SKILL.md +7 -0
  185. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/playwright-persistent-browser/SKILL.md +7 -0
  186. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/prisma/SKILL.md +7 -0
  187. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/prompt-engineering/SKILL.md +7 -0
  188. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/python-best-practices/SKILL.md +7 -0
  189. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/rag-patterns/SKILL.md +7 -0
  190. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/react/SKILL.md +7 -0
  191. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/react-native/SKILL.md +7 -0
  192. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/react-native-callstack/SKILL.md +7 -0
  193. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/receiving-code-review/SKILL.md +7 -0
  194. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/remix/SKILL.md +7 -0
  195. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/requesting-code-review/SKILL.md +7 -0
  196. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/rust-best-practices/SKILL.md +7 -0
  197. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/sadd/SKILL.md +7 -0
  198. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/sanitize-pii/SKILL.md +7 -0
  199. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/secret-management/SKILL.md +7 -0
  200. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skill-creator/SKILL.md +7 -0
  201. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/spec-driven-delivery/SKILL.md +7 -0
  202. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/spring-boot/SKILL.md +7 -0
  203. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/sqlalchemy/SKILL.md +7 -0
  204. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stitch/SKILL.md +7 -0
  205. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/stripe-integration/SKILL.md +7 -0
  206. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/svelte-sveltekit/SKILL.md +7 -0
  207. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/swift-best-practices/SKILL.md +7 -0
  208. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/system-design/SKILL.md +7 -0
  209. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/systematic-debugging/SKILL.md +7 -0
  210. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/t3-stack/SKILL.md +7 -0
  211. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/tech-doc/SKILL.md +7 -0
  212. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/typescript-best-practices/SKILL.md +7 -0
  213. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/unit-testing/SKILL.md +7 -0
  214. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/vibesec/SKILL.md +7 -0
  215. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/vuejs/SKILL.md +7 -0
  216. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/backend-specialist.md → codex/agents/backend-specialist.toml} +4 -16
  217. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/code-archaeologist.md → codex/agents/code-archaeologist.toml} +4 -31
  218. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/database-architect.md → codex/agents/database-architect.toml} +4 -16
  219. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/debugger.md → codex/agents/debugger.toml} +4 -17
  220. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/devops-engineer.md → codex/agents/devops-engineer.toml} +4 -16
  221. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/documentation-writer.md → codex/agents/documentation-writer.toml} +4 -14
  222. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/frontend-specialist.md → codex/agents/frontend-specialist.toml} +4 -34
  223. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/game-developer.md → codex/agents/game-developer.toml} +4 -11
  224. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/mobile-developer.md → codex/agents/mobile-developer.toml} +4 -16
  225. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/orchestrator.md → codex/agents/orchestrator.toml} +4 -18
  226. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/penetration-tester.md → codex/agents/penetration-tester.toml} +4 -32
  227. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/performance-optimizer.md → codex/agents/performance-optimizer.toml} +4 -14
  228. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/product-manager.md → codex/agents/product-manager.toml} +4 -26
  229. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/project-planner.md → codex/agents/project-planner.toml} +4 -18
  230. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/qa-automation-engineer.md → codex/agents/qa-automation-engineer.toml} +4 -26
  231. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/researcher.md → codex/agents/researcher.toml} +4 -28
  232. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/security-auditor.md → codex/agents/security-auditor.toml} +4 -42
  233. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/seo-specialist.md → codex/agents/seo-specialist.toml} +4 -11
  234. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/sre-engineer.md → codex/agents/sre-engineer.toml} +4 -35
  235. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/test-engineer.md → codex/agents/test-engineer.toml} +4 -30
  236. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/validator.md → codex/agents/validator.toml} +4 -22
  237. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/agents/vercel-expert.md → codex/agents/vercel-expert.toml} +4 -11
  238. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/accessibility.md → codex/generated-skills/accessibility/SKILL.md} +16 -17
  239. package/workflows/workflows/agent-environment-setup/platforms/codex/generated-skills/architecture/SKILL.md +124 -0
  240. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/backend.md → codex/generated-skills/backend/SKILL.md} +16 -24
  241. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/create.md → codex/generated-skills/create/SKILL.md} +13 -6
  242. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/database.md → codex/generated-skills/database/SKILL.md} +16 -9
  243. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/debug.md → codex/generated-skills/debug/SKILL.md} +16 -9
  244. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/devops.md → codex/generated-skills/devops/SKILL.md} +20 -27
  245. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/implement-track.md → codex/generated-skills/implement-track/SKILL.md} +14 -7
  246. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/migrate.md → codex/generated-skills/migrate/SKILL.md} +17 -18
  247. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/mobile.md → codex/generated-skills/mobile/SKILL.md} +18 -11
  248. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/onboard.md → codex/generated-skills/onboard/SKILL.md} +15 -15
  249. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/orchestrate.md → codex/generated-skills/orchestrate/SKILL.md} +14 -7
  250. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/plan.md → codex/generated-skills/plan/SKILL.md} +13 -17
  251. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/refactor.md → codex/generated-skills/refactor/SKILL.md} +17 -10
  252. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/release.md → codex/generated-skills/release/SKILL.md} +19 -12
  253. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/review.md → codex/generated-skills/review/SKILL.md} +16 -9
  254. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/security.md → codex/generated-skills/security/SKILL.md} +16 -9
  255. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/spec.md → codex/generated-skills/spec/SKILL.md} +12 -15
  256. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/test.md → codex/generated-skills/test/SKILL.md} +16 -9
  257. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/vercel.md → codex/generated-skills/vercel/SKILL.md} +18 -20
  258. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +19 -19
  259. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/api-design/SKILL.md +9 -2
  260. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/architecture-doc/SKILL.md +9 -2
  261. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/ci-cd-pipeline/SKILL.md +9 -2
  262. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/code-review/SKILL.md +9 -2
  263. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/csharp-best-practices/SKILL.md +9 -2
  264. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/database-design/SKILL.md +9 -2
  265. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/deep-research/SKILL.md +9 -2
  266. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/django-drf/SKILL.md +9 -2
  267. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/docker-compose-dev/SKILL.md +9 -2
  268. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/drizzle-orm/SKILL.md +9 -2
  269. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/electron-qa/SKILL.md +9 -2
  270. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/expo-app/SKILL.md +9 -2
  271. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/express-nodejs/SKILL.md +9 -2
  272. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/fastapi/SKILL.md +9 -2
  273. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/frontend-design/SKILL.md +9 -2
  274. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/gin-golang/SKILL.md +9 -2
  275. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/git-workflow/SKILL.md +9 -2
  276. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/go-fiber/SKILL.md +9 -2
  277. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/golang-best-practices/SKILL.md +9 -2
  278. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/google-workspace/SKILL.md +9 -2
  279. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/huggingface-ml/SKILL.md +9 -2
  280. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/integration-testing/SKILL.md +9 -2
  281. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/java-best-practices/SKILL.md +9 -2
  282. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/javascript-best-practices/SKILL.md +9 -2
  283. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/kaizen-iteration/SKILL.md +9 -2
  284. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/kotlin-best-practices/SKILL.md +9 -2
  285. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/kubernetes-deploy/SKILL.md +9 -2
  286. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/laravel/SKILL.md +9 -2
  287. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/llm-eval/SKILL.md +9 -2
  288. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/mcp-server-builder/SKILL.md +9 -2
  289. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/microservices-design/SKILL.md +9 -2
  290. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/nestjs/SKILL.md +9 -2
  291. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/nextjs/SKILL.md +9 -2
  292. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/observability/SKILL.md +9 -2
  293. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/owasp-security-review/SKILL.md +9 -2
  294. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/pentest-skill/SKILL.md +9 -2
  295. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/performance-testing/SKILL.md +9 -2
  296. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/php-best-practices/SKILL.md +9 -2
  297. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/playwright-interactive/SKILL.md +9 -2
  298. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/playwright-persistent-browser/SKILL.md +9 -2
  299. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/prisma/SKILL.md +9 -2
  300. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/prompt-engineering/SKILL.md +9 -2
  301. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/python-best-practices/SKILL.md +9 -2
  302. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/rag-patterns/SKILL.md +9 -2
  303. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/react/SKILL.md +9 -2
  304. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/react-native/SKILL.md +9 -2
  305. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/react-native-callstack/SKILL.md +9 -2
  306. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/receiving-code-review/SKILL.md +9 -2
  307. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/remix/SKILL.md +9 -2
  308. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/requesting-code-review/SKILL.md +9 -2
  309. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/rust-best-practices/SKILL.md +9 -2
  310. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/sadd/SKILL.md +9 -2
  311. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/sanitize-pii/SKILL.md +9 -2
  312. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/secret-management/SKILL.md +9 -2
  313. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/skill-creator/SKILL.md +9 -2
  314. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/spec-driven-delivery/SKILL.md +9 -2
  315. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/spring-boot/SKILL.md +9 -2
  316. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/sqlalchemy/SKILL.md +9 -2
  317. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stitch/SKILL.md +9 -2
  318. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/stripe-integration/SKILL.md +9 -2
  319. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/svelte-sveltekit/SKILL.md +9 -2
  320. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/swift-best-practices/SKILL.md +9 -2
  321. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/system-design/SKILL.md +9 -2
  322. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/systematic-debugging/SKILL.md +9 -2
  323. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/t3-stack/SKILL.md +9 -2
  324. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/tech-doc/SKILL.md +9 -2
  325. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/typescript-best-practices/SKILL.md +9 -2
  326. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/unit-testing/SKILL.md +9 -2
  327. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/vibesec/SKILL.md +9 -2
  328. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/vuejs/SKILL.md +9 -2
  329. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/accessibility.prompt.md +78 -0
  330. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/architecture.prompt.md +128 -0
  331. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/backend.prompt.md +80 -0
  332. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/create.prompt.md +77 -0
  333. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/database.prompt.md +76 -0
  334. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/debug.prompt.md +72 -0
  335. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/devops.prompt.md +73 -0
  336. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/implement-track.prompt.md +80 -0
  337. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/migrate.prompt.md +79 -0
  338. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/mobile.prompt.md +80 -0
  339. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/onboard.prompt.md +74 -0
  340. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/workflows/orchestrate.md → copilot/prompts/orchestrate.prompt.md} +22 -13
  341. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/workflows/plan.md → copilot/prompts/plan.prompt.md} +22 -24
  342. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/refactor.prompt.md +76 -0
  343. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/release.prompt.md +79 -0
  344. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/review.prompt.md +75 -0
  345. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/security.prompt.md +78 -0
  346. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/workflows/spec.md → copilot/prompts/spec.prompt.md} +22 -23
  347. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/test.prompt.md +75 -0
  348. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/vercel.prompt.md +76 -0
  349. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +0 -1
  350. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/api-design/SKILL.md +7 -3
  351. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/architecture-doc/SKILL.md +7 -3
  352. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/ci-cd-pipeline/SKILL.md +7 -3
  353. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/code-review/SKILL.md +7 -3
  354. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/csharp-best-practices/SKILL.md +7 -3
  355. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/database-design/SKILL.md +7 -3
  356. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/deep-research/SKILL.md +7 -3
  357. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/django-drf/SKILL.md +7 -3
  358. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/docker-compose-dev/SKILL.md +7 -3
  359. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/drizzle-orm/SKILL.md +7 -3
  360. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/electron-qa/SKILL.md +7 -3
  361. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/expo-app/SKILL.md +7 -3
  362. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/express-nodejs/SKILL.md +7 -3
  363. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/fastapi/SKILL.md +7 -3
  364. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/frontend-design/SKILL.md +7 -3
  365. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/gin-golang/SKILL.md +7 -3
  366. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/git-workflow/SKILL.md +7 -3
  367. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/go-fiber/SKILL.md +7 -3
  368. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/golang-best-practices/SKILL.md +7 -3
  369. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/google-workspace/SKILL.md +7 -3
  370. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/huggingface-ml/SKILL.md +7 -3
  371. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/integration-testing/SKILL.md +7 -3
  372. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/java-best-practices/SKILL.md +7 -3
  373. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/javascript-best-practices/SKILL.md +7 -3
  374. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/kaizen-iteration/SKILL.md +7 -3
  375. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/kotlin-best-practices/SKILL.md +7 -3
  376. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/kubernetes-deploy/SKILL.md +7 -3
  377. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/laravel/SKILL.md +7 -3
  378. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/llm-eval/SKILL.md +7 -3
  379. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/mcp-server-builder/SKILL.md +7 -3
  380. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/microservices-design/SKILL.md +7 -3
  381. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/nestjs/SKILL.md +7 -3
  382. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/nextjs/SKILL.md +7 -3
  383. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/observability/SKILL.md +7 -3
  384. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/owasp-security-review/SKILL.md +7 -3
  385. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/pentest-skill/SKILL.md +7 -3
  386. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/performance-testing/SKILL.md +7 -3
  387. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/php-best-practices/SKILL.md +7 -3
  388. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-interactive/SKILL.md +7 -3
  389. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/playwright-persistent-browser/SKILL.md +7 -3
  390. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/prisma/SKILL.md +7 -3
  391. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/prompt-engineering/SKILL.md +7 -3
  392. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/python-best-practices/SKILL.md +7 -3
  393. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/rag-patterns/SKILL.md +7 -3
  394. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react/SKILL.md +7 -3
  395. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-native/SKILL.md +7 -3
  396. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/react-native-callstack/SKILL.md +7 -3
  397. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/receiving-code-review/SKILL.md +7 -3
  398. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/remix/SKILL.md +7 -3
  399. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/requesting-code-review/SKILL.md +7 -3
  400. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/rust-best-practices/SKILL.md +7 -3
  401. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/sadd/SKILL.md +7 -3
  402. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/sanitize-pii/SKILL.md +7 -3
  403. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/secret-management/SKILL.md +7 -3
  404. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skill-creator/SKILL.md +7 -3
  405. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/spec-driven-delivery/SKILL.md +7 -3
  406. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/spring-boot/SKILL.md +7 -3
  407. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/sqlalchemy/SKILL.md +7 -3
  408. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stitch/SKILL.md +7 -3
  409. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/stripe-integration/SKILL.md +7 -3
  410. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/svelte-sveltekit/SKILL.md +7 -3
  411. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/swift-best-practices/SKILL.md +7 -3
  412. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/system-design/SKILL.md +7 -3
  413. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/systematic-debugging/SKILL.md +7 -3
  414. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/t3-stack/SKILL.md +7 -3
  415. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/tech-doc/SKILL.md +7 -3
  416. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/typescript-best-practices/SKILL.md +7 -3
  417. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/unit-testing/SKILL.md +7 -3
  418. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/vibesec/SKILL.md +7 -3
  419. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/vuejs/SKILL.md +7 -3
  420. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/accessibility.toml +69 -4
  421. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-backend-specialist.toml +86 -0
  422. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-code-archaeologist.toml +67 -0
  423. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-database-architect.toml +79 -0
  424. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-debugger.toml +76 -0
  425. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-devops-engineer.toml +74 -0
  426. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-documentation-writer.toml +65 -0
  427. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-frontend-specialist.toml +76 -0
  428. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-game-developer.toml +52 -0
  429. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-mobile-developer.toml +76 -0
  430. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-orchestrator.toml +194 -0
  431. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-penetration-tester.toml +70 -0
  432. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-performance-optimizer.toml +69 -0
  433. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-product-manager.toml +56 -0
  434. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-project-planner.toml +72 -0
  435. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-qa-automation-engineer.toml +63 -0
  436. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-researcher.toml +73 -0
  437. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-security-auditor.toml +73 -0
  438. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-seo-specialist.toml +52 -0
  439. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-sre-engineer.toml +74 -0
  440. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-test-engineer.toml +71 -0
  441. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-validator.toml +76 -0
  442. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/agent-vercel-expert.toml +59 -0
  443. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/architecture.toml +120 -5
  444. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/backend.toml +71 -4
  445. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/create.toml +68 -4
  446. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/database.toml +67 -4
  447. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/debug.toml +63 -4
  448. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/devops.toml +64 -4
  449. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/implement-track.toml +71 -4
  450. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/migrate.toml +70 -4
  451. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/mobile.toml +71 -4
  452. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/onboard.toml +65 -4
  453. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/orchestrate.toml +73 -4
  454. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/plan.toml +79 -4
  455. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/refactor.toml +67 -4
  456. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/release.toml +70 -4
  457. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/review.toml +66 -4
  458. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/security.toml +69 -4
  459. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/spec.toml +71 -4
  460. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/test.toml +66 -4
  461. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/vercel.toml +67 -4
  462. package/workflows/workflows/agent-environment-setup/platforms/gemini/rules/GEMINI.md +17 -17
  463. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/api-design/SKILL.md +8 -4
  464. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/architecture-doc/SKILL.md +8 -4
  465. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/ci-cd-pipeline/SKILL.md +8 -4
  466. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/code-review/SKILL.md +8 -4
  467. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/csharp-best-practices/SKILL.md +8 -4
  468. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/database-design/SKILL.md +8 -4
  469. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/deep-research/SKILL.md +8 -4
  470. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/django-drf/SKILL.md +8 -4
  471. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/docker-compose-dev/SKILL.md +8 -4
  472. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/drizzle-orm/SKILL.md +8 -4
  473. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/electron-qa/SKILL.md +8 -4
  474. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/expo-app/SKILL.md +8 -4
  475. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/express-nodejs/SKILL.md +8 -4
  476. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/fastapi/SKILL.md +8 -4
  477. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/frontend-design/SKILL.md +8 -4
  478. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/gin-golang/SKILL.md +8 -4
  479. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/git-workflow/SKILL.md +8 -4
  480. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/go-fiber/SKILL.md +8 -4
  481. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/golang-best-practices/SKILL.md +8 -4
  482. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/google-workspace/SKILL.md +8 -4
  483. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/huggingface-ml/SKILL.md +8 -4
  484. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/integration-testing/SKILL.md +8 -4
  485. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/java-best-practices/SKILL.md +8 -4
  486. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/javascript-best-practices/SKILL.md +8 -4
  487. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/kaizen-iteration/SKILL.md +8 -4
  488. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/kotlin-best-practices/SKILL.md +8 -4
  489. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/kubernetes-deploy/SKILL.md +8 -4
  490. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/laravel/SKILL.md +8 -4
  491. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/llm-eval/SKILL.md +8 -4
  492. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/mcp-server-builder/SKILL.md +8 -4
  493. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/microservices-design/SKILL.md +8 -4
  494. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/nestjs/SKILL.md +8 -4
  495. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/nextjs/SKILL.md +8 -4
  496. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/observability/SKILL.md +8 -4
  497. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/owasp-security-review/SKILL.md +8 -4
  498. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/pentest-skill/SKILL.md +8 -4
  499. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/performance-testing/SKILL.md +8 -4
  500. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/php-best-practices/SKILL.md +8 -4
  501. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/playwright-interactive/SKILL.md +8 -4
  502. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/playwright-persistent-browser/SKILL.md +8 -4
  503. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/prisma/SKILL.md +8 -4
  504. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/prompt-engineering/SKILL.md +8 -4
  505. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/python-best-practices/SKILL.md +8 -4
  506. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/rag-patterns/SKILL.md +8 -4
  507. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/react/SKILL.md +8 -4
  508. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/react-native/SKILL.md +8 -4
  509. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/react-native-callstack/SKILL.md +8 -4
  510. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/receiving-code-review/SKILL.md +8 -4
  511. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/remix/SKILL.md +8 -4
  512. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/requesting-code-review/SKILL.md +8 -4
  513. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/rust-best-practices/SKILL.md +8 -4
  514. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/sadd/SKILL.md +8 -4
  515. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/sanitize-pii/SKILL.md +8 -4
  516. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/secret-management/SKILL.md +8 -4
  517. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/skill-creator/SKILL.md +8 -4
  518. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/spec-driven-delivery/SKILL.md +8 -4
  519. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/spring-boot/SKILL.md +8 -4
  520. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/sqlalchemy/SKILL.md +8 -4
  521. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stitch/SKILL.md +8 -4
  522. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/stripe-integration/SKILL.md +8 -4
  523. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/svelte-sveltekit/SKILL.md +8 -4
  524. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/swift-best-practices/SKILL.md +8 -4
  525. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/system-design/SKILL.md +8 -4
  526. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/systematic-debugging/SKILL.md +8 -4
  527. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/t3-stack/SKILL.md +8 -4
  528. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/tech-doc/SKILL.md +8 -4
  529. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/typescript-best-practices/SKILL.md +8 -4
  530. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/unit-testing/SKILL.md +8 -4
  531. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/vibesec/SKILL.md +8 -4
  532. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/vuejs/SKILL.md +8 -4
  533. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +1 -1
  534. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/antigravity.md +4 -5
  535. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +7 -6
  536. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/copilot.md +1 -2
  537. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/gemini.md +1 -3
  538. package/workflows/workflows/agent-environment-setup/shared/workflows/architecture.md +49 -10
  539. package/workflows/workflows/agent-environment-setup/shared/workflows/implement-track.md +1 -1
  540. package/workflows/workflows/agent-environment-setup/shared/workflows/migrate.md +1 -1
  541. package/workflows/workflows/agent-environment-setup/shared/workflows/mobile.md +1 -1
  542. package/workflows/workflows/agent-environment-setup/shared/workflows/onboard.md +1 -1
  543. package/workflows/workflows/agent-environment-setup/shared/workflows/orchestrate.md +1 -1
  544. package/workflows/workflows/agent-environment-setup/shared/workflows/plan.md +1 -1
  545. package/workflows/workflows/agent-environment-setup/shared/workflows/refactor.md +1 -1
  546. package/workflows/workflows/agent-environment-setup/shared/workflows/release.md +1 -1
  547. package/workflows/workflows/agent-environment-setup/shared/workflows/spec.md +1 -1
  548. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/accessibility.md +0 -77
  549. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/architecture.md +0 -90
  550. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/backend.md +0 -86
  551. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/create.md +0 -68
  552. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/database.md +0 -67
  553. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/debug.md +0 -63
  554. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/devops.md +0 -78
  555. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/implement-track.md +0 -71
  556. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/migrate.md +0 -78
  557. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/mobile.md +0 -71
  558. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/onboard.md +0 -72
  559. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/refactor.md +0 -67
  560. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/release.md +0 -70
  561. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/review.md +0 -66
  562. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/security.md +0 -69
  563. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/test.md +0 -66
  564. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/vercel.md +0 -76
  565. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/architecture.md +0 -88
  566. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +0 -81
  567. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +0 -77
  568. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +0 -74
  569. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +0 -72
  570. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +0 -69
  571. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +0 -58
  572. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +0 -89
  573. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +0 -42
  574. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +0 -71
  575. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +0 -81
  576. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +0 -62
  577. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +0 -61
  578. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +0 -68
  579. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +0 -94
  580. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +0 -42
  581. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/sre-engineer.md +0 -88
  582. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +0 -80
  583. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/validator.md +0 -77
  584. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +0 -49
  585. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/accessibility.md +0 -77
  586. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/architecture.md +0 -90
  587. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/backend.md +0 -86
  588. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/create.md +0 -68
  589. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/database.md +0 -67
  590. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/debug.md +0 -63
  591. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/devops.md +0 -78
  592. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/implement-track.md +0 -71
  593. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/migrate.md +0 -78
  594. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/mobile.md +0 -71
  595. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/onboard.md +0 -72
  596. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/orchestrate.md +0 -73
  597. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/plan.md +0 -90
  598. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/refactor.md +0 -67
  599. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/release.md +0 -70
  600. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/review.md +0 -66
  601. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/security.md +0 -69
  602. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/spec.md +0 -81
  603. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/test.md +0 -66
  604. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/vercel.md +0 -76
  605. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-accessibility.prompt.md +0 -18
  606. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-architecture.prompt.md +0 -18
  607. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-backend.prompt.md +0 -18
  608. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-create.prompt.md +0 -18
  609. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-database.prompt.md +0 -18
  610. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-debug.prompt.md +0 -18
  611. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-devops.prompt.md +0 -18
  612. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-implement-track.prompt.md +0 -18
  613. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-migrate.prompt.md +0 -18
  614. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-mobile.prompt.md +0 -18
  615. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-onboard.prompt.md +0 -18
  616. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-orchestrate.prompt.md +0 -18
  617. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-plan.prompt.md +0 -18
  618. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-refactor.prompt.md +0 -18
  619. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-release.prompt.md +0 -18
  620. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-review.prompt.md +0 -18
  621. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-security.prompt.md +0 -18
  622. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-spec.prompt.md +0 -18
  623. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-test.prompt.md +0 -18
  624. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-vercel.prompt.md +0 -18
  625. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/architecture.md +0 -88
  626. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/accessibility.md +0 -77
  627. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/architecture.md +0 -90
  628. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/backend.md +0 -86
  629. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/create.md +0 -68
  630. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/database.md +0 -67
  631. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/debug.md +0 -63
  632. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/devops.md +0 -78
  633. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/implement-track.md +0 -71
  634. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/migrate.md +0 -78
  635. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/mobile.md +0 -71
  636. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/onboard.md +0 -72
  637. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/orchestrate.md +0 -73
  638. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/plan.md +0 -90
  639. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/refactor.md +0 -67
  640. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/release.md +0 -70
  641. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/review.md +0 -66
  642. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/security.md +0 -69
  643. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/spec.md +0 -81
  644. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/test.md +0 -66
  645. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/vercel.md +0 -76
package/dist/cli/core.js CHANGED
@@ -33,10 +33,15 @@ const ARCHITECTURE_DOC_BLOCK_START_RE = /<!--\s*cbx:architecture:doc:start[^>]*-
33
33
  const ARCHITECTURE_DOC_BLOCK_END_RE = /<!--\s*cbx:architecture:doc:end\s*-->/g;
34
34
  const TECH_ARCHITECTURE_BLOCK_START_RE = /<!--\s*cbx:architecture:tech:start[^>]*-->/g;
35
35
  const TECH_ARCHITECTURE_BLOCK_END_RE = /<!--\s*cbx:architecture:tech:end\s*-->/g;
36
+ const MEMORY_FOUNDATION_BLOCK_START_RE = /<!--\s*cbx:memory:index:start[^>]*-->/g;
37
+ const MEMORY_FOUNDATION_BLOCK_END_RE = /<!--\s*cbx:memory:index:end\s*-->/g;
38
+ const MEMORY_TOPIC_BLOCK_START_RE = /<!--\s*cbx:memory:topic:start[^>]*-->/g;
39
+ const MEMORY_TOPIC_BLOCK_END_RE = /<!--\s*cbx:memory:topic:end\s*-->/g;
36
40
  const ROADMAP_FOUNDATION_BLOCK_START_RE = /<!--\s*cbx:roadmap:foundation:start[^>]*-->/g;
37
41
  const ROADMAP_FOUNDATION_BLOCK_END_RE = /<!--\s*cbx:roadmap:foundation:end\s*-->/g;
38
42
  const FOUNDATION_DOCS_DIR = path.join("docs", "foundation");
39
43
  const FOUNDATION_ADR_DIR = path.join(FOUNDATION_DOCS_DIR, "adr");
44
+ const FOUNDATION_MEMORY_DIR = path.join(FOUNDATION_DOCS_DIR, "memory");
40
45
  const COPILOT_ALLOWED_SKILL_FRONTMATTER_KEYS = new Set([
41
46
  "compatibility",
42
47
  "description",
@@ -60,57 +65,59 @@ const WORKFLOW_PROFILES = {
60
65
  antigravity: {
61
66
  id: "antigravity",
62
67
  label: "Antigravity",
63
- installsCustomAgents: true,
68
+ installsCustomAgents: false,
64
69
  project: {
65
- workflowDirs: [".agent/workflows"],
66
- agentDirs: [".agent/agents"],
67
- skillDirs: [".agent/skills"],
70
+ workflowDirs: [],
71
+ agentDirs: [],
72
+ skillDirs: [".agents/skills"],
68
73
  commandDirs: [".gemini/commands"],
69
- ruleFilesByPriority: [".agent/rules/GEMINI.md"],
74
+ ruleFilesByPriority: [".agents/rules/GEMINI.md"],
70
75
  },
71
76
  global: {
72
- workflowDirs: [
73
- "~/.gemini/antigravity/workflows",
74
- "~/.gemini/antigravity/global_workflows",
75
- ],
76
- agentDirs: [
77
- "~/.gemini/antigravity/agents",
78
- "~/.gemini/antigravity/global_agents",
79
- ],
77
+ workflowDirs: [],
78
+ agentDirs: [],
80
79
  skillDirs: [
81
80
  "~/.gemini/antigravity/skills",
82
- "~/.gemini/antigravity/global_skills",
83
81
  ],
84
82
  commandDirs: ["~/.gemini/commands"],
85
83
  ruleFilesByPriority: ["~/.gemini/GEMINI.md"],
86
84
  },
87
- detectorPaths: [".agent", ".agent/workflows", ".agent/rules/GEMINI.md"],
88
- legacyDetectorPaths: [],
85
+ detectorPaths: [
86
+ ".agents/skills",
87
+ ".agents/rules/GEMINI.md",
88
+ ".gemini/commands",
89
+ ],
90
+ legacyDetectorPaths: [
91
+ ".agent",
92
+ ".agent/workflows",
93
+ ".agent/agents",
94
+ ".agent/skills",
95
+ ".agent/rules/GEMINI.md",
96
+ ],
89
97
  ruleHintName: "GEMINI.md",
90
98
  },
91
99
  codex: {
92
100
  id: "codex",
93
101
  label: "Codex",
94
- installsCustomAgents: false,
102
+ installsCustomAgents: true,
95
103
  project: {
96
- workflowDirs: [".agents/workflows"],
97
- agentDirs: [".agents/agents"],
104
+ workflowDirs: [],
105
+ agentDirs: [".codex/agents"],
98
106
  skillDirs: [".agents/skills"],
99
107
  ruleFilesByPriority: ["AGENTS.md"],
100
108
  },
101
109
  global: {
102
- workflowDirs: ["~/.agents/workflows"],
103
- agentDirs: ["~/.agents/agents"],
110
+ workflowDirs: [],
111
+ agentDirs: ["~/.codex/agents"],
104
112
  skillDirs: ["~/.agents/skills"],
105
113
  ruleFilesByPriority: ["~/.codex/AGENTS.md"],
106
114
  },
107
115
  detectorPaths: [
108
- ".agents",
109
- ".agents/workflows",
116
+ ".codex/agents",
110
117
  ".agents/skills",
111
118
  "AGENTS.md",
112
119
  ],
113
- legacyDetectorPaths: [".codex/skills"],
120
+ legacyDetectorPaths: [".agents/workflows", ".agents/agents", ".codex/skills"],
114
121
  ruleHintName: "AGENTS.md",
115
122
  },
116
123
  copilot: {
@@ -118,14 +125,14 @@ const WORKFLOW_PROFILES = {
118
125
  label: "GitHub Copilot",
119
126
  installsCustomAgents: true,
120
127
  project: {
121
- workflowDirs: [".github/copilot/workflows"],
128
+ workflowDirs: [],
122
129
  agentDirs: [".github/agents"],
123
130
  skillDirs: [".github/skills"],
124
131
  promptDirs: [".github/prompts"],
125
132
  ruleFilesByPriority: [".github/copilot-instructions.md"],
126
133
  },
127
134
  global: {
128
- workflowDirs: ["~/.copilot/workflows"],
135
+ workflowDirs: [],
129
136
  agentDirs: ["~/.copilot/agents"],
130
137
  skillDirs: ["~/.copilot/skills"],
131
138
  promptDirs: ["~/.copilot/prompts"],
@@ -147,14 +154,14 @@ const WORKFLOW_PROFILES = {
147
154
  label: "Claude Code",
148
155
  installsCustomAgents: true,
149
156
  project: {
150
- workflowDirs: [".claude/workflows"],
157
+ workflowDirs: [],
151
158
  agentDirs: [".claude/agents"],
152
159
  skillDirs: [".claude/skills"],
153
160
  hookDirs: [".claude/hooks"],
154
161
  ruleFilesByPriority: ["CLAUDE.md"],
155
162
  },
156
163
  global: {
157
- workflowDirs: ["~/.claude/workflows"],
164
+ workflowDirs: [],
158
165
  agentDirs: ["~/.claude/agents"],
159
166
  skillDirs: ["~/.claude/skills"],
160
167
  hookDirs: ["~/.claude/hooks"],
@@ -167,7 +174,7 @@ const WORKFLOW_PROFILES = {
167
174
  ".claude/rules",
168
175
  ".claude/settings.json",
169
176
  ],
170
- legacyDetectorPaths: [],
177
+ legacyDetectorPaths: [".claude/workflows"],
171
178
  ruleHintName: "CLAUDE.md",
172
179
  },
173
180
  gemini: {
@@ -175,31 +182,28 @@ const WORKFLOW_PROFILES = {
175
182
  label: "Gemini CLI",
176
183
  installsCustomAgents: false,
177
184
  project: {
178
- workflowDirs: [".gemini/workflows"],
179
- skillDirs: [".gemini/skills"],
185
+ workflowDirs: [],
186
+ skillDirs: [],
180
187
  commandDirs: [".gemini/commands"],
181
188
  ruleFilesByPriority: [".gemini/GEMINI.md", "GEMINI.md"],
182
189
  },
183
190
  global: {
184
- workflowDirs: ["~/.gemini/workflows"],
185
- skillDirs: ["~/.gemini/skills"],
191
+ workflowDirs: [],
192
+ skillDirs: [],
186
193
  commandDirs: ["~/.gemini/commands"],
187
194
  ruleFilesByPriority: ["~/.gemini/GEMINI.md"],
188
195
  },
189
196
  detectorPaths: [
190
197
  ".gemini",
191
- ".gemini/workflows",
192
198
  ".gemini/commands",
193
199
  ".gemini/GEMINI.md",
194
200
  "GEMINI.md",
195
201
  ],
196
- legacyDetectorPaths: [],
202
+ legacyDetectorPaths: [".gemini/workflows", ".gemini/skills"],
197
203
  ruleHintName: "GEMINI.md",
198
204
  },
199
205
  };
200
206
  const PLATFORM_IDS = Object.keys(WORKFLOW_PROFILES);
201
- const CODEX_WORKFLOW_SKILL_PREFIX = "workflow-";
202
- const CODEX_AGENT_SKILL_PREFIX = "agent-";
203
207
  const TERMINAL_VERIFIER_PROVIDERS = ["codex", "gemini"];
204
208
  const DEFAULT_TERMINAL_VERIFIER = "codex";
205
209
  const POSTMAN_API_KEY_ENV_VAR = "POSTMAN_API_KEY_DEFAULT";
@@ -235,6 +239,7 @@ const RESERVED_CREDENTIAL_PROFILE_NAMES = new Set(["all"]);
235
239
  const CREDENTIAL_SERVICES = new Set(["postman", "stitch"]);
236
240
  const MCP_RUNTIMES = new Set(["docker", "local"]);
237
241
  const ARCHITECTURE_BUILD_PLATFORMS = new Set([
242
+ "antigravity",
238
243
  "codex",
239
244
  "claude",
240
245
  "gemini",
@@ -729,7 +734,11 @@ function toPosixPath(value) {
729
734
  return value.split(path.sep).join("/");
730
735
  }
731
736
  function getAntigravityTerminalIntegrationDir(profilePaths) {
732
- return path.join(path.dirname(profilePaths.workflowsDir), "terminal-integration");
737
+ const baseDir = profilePaths.rulesDir ||
738
+ profilePaths.skillsDir ||
739
+ profilePaths.commandsDir ||
740
+ profilePaths.rootDir;
741
+ return path.join(path.dirname(baseDir), "terminal-integration");
733
742
  }
734
743
  function buildTerminalVerifierDefaultPrompt() {
735
744
  return "Review the latest completed Antigravity task. Focus on bugs, regressions, security risks, and missing tests.";
@@ -911,7 +920,8 @@ function inferArchitectureContractProfile(snapshot) {
911
920
  snapshot.topDirs.includes("app")
912
921
  ? "App-level UI patterns should be centralized and reused across screens."
913
922
  : null,
914
- ]) || "No dedicated design-system directory detected; infer shared UI rules from current components and screens.";
923
+ ]) ||
924
+ "No dedicated design-system directory detected; infer shared UI rules from current components and screens.";
915
925
  const testingStrategy = [];
916
926
  if (snapshot.keyScripts.some((script) => script.name === "lint")) {
917
927
  testingStrategy.push("Linting is part of the baseline quality gate.");
@@ -976,7 +986,8 @@ function inferProductFoundationProfile(snapshot, specRoots = []) {
976
986
  snapshot.topDirs.includes("web")) {
977
987
  userPersonas.push("Browser users and internal operators using web-facing flows");
978
988
  }
979
- if (snapshot.frameworks.includes("NestJS") || snapshot.topDirs.includes("api")) {
989
+ if (snapshot.frameworks.includes("NestJS") ||
990
+ snapshot.topDirs.includes("api")) {
980
991
  userPersonas.push("Internal services, operators, or partner systems consuming API boundaries");
981
992
  }
982
993
  if (userPersonas.length === 0) {
@@ -1083,12 +1094,16 @@ function buildArchitectureDocSection(snapshot, specRoots = []) {
1083
1094
  "### Bounded Contexts and Module Boundaries",
1084
1095
  ...(profile.moduleBoundaries.length > 0
1085
1096
  ? profile.moduleBoundaries.map((item) => `- ${item}`)
1086
- : ["- No strong top-level module boundaries were detected automatically."]),
1097
+ : [
1098
+ "- No strong top-level module boundaries were detected automatically.",
1099
+ ]),
1087
1100
  "",
1088
1101
  "### Architecture Signals by Surface",
1089
1102
  ...(profile.architectureSignals.length > 0
1090
1103
  ? profile.architectureSignals.map((item) => `- ${item}`)
1091
- : ["- No app-level architecture signals were inferred from the repo scan."]),
1104
+ : [
1105
+ "- No app-level architecture signals were inferred from the repo scan.",
1106
+ ]),
1092
1107
  "",
1093
1108
  "### Decision Areas to Preserve",
1094
1109
  ...profile.decisionAreas.map((item) => `- ${item}`),
@@ -1124,12 +1139,14 @@ function buildEngineeringArchitectureSection(snapshot) {
1124
1139
  "- Module and package boundaries to preserve:",
1125
1140
  ...(profile.moduleBoundaries.length > 0
1126
1141
  ? profile.moduleBoundaries.map((rule) => ` - ${rule}`)
1127
- : [" - No strong module boundary was detected automatically; keep new boundaries explicit in specs and ADRs."]),
1142
+ : [
1143
+ " - No strong module boundary was detected automatically; keep new boundaries explicit in specs and ADRs.",
1144
+ ]),
1128
1145
  "- Testability expectations:",
1129
1146
  ...profile.testingStrategy.map((rule) => ` - ${rule}`),
1130
1147
  "- Doc refresh policy:",
1131
1148
  " - Update these managed sections when architecture, scale, boundaries, design-system rules, or testing strategy changes.",
1132
- ` - For non-trivial work, read ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ENGINEERING_RULES.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, and ${FOUNDATION_DOCS_DIR}/TECH.md in that order when they exist.`,
1149
+ ` - For non-trivial work, read ${FOUNDATION_DOCS_DIR}/MEMORY.md first. Then load ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ENGINEERING_RULES.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, ${FOUNDATION_MEMORY_DIR}/*, and ADRs only when the active task needs that deeper context.`,
1133
1150
  "<!-- cbx:architecture:rules:end -->",
1134
1151
  "",
1135
1152
  ].join("\n");
@@ -1185,7 +1202,9 @@ function buildTechArchitectureSection(snapshot) {
1185
1202
  "### Module / App Topology",
1186
1203
  ...(profile.moduleBoundaries.length > 0
1187
1204
  ? profile.moduleBoundaries.map((item) => `- ${item}`)
1188
- : ["- No significant top-level module boundaries detected automatically."]),
1205
+ : [
1206
+ "- No significant top-level module boundaries detected automatically.",
1207
+ ]),
1189
1208
  "",
1190
1209
  "### Flow Narratives",
1191
1210
  "- Describe the primary request, data, and background-job flows here when architecture generation runs.",
@@ -1241,7 +1260,7 @@ function buildRoadmapFoundationSection(snapshot, specRoots = []) {
1241
1260
  "- Use this section for medium-term scaling themes, major migrations, or cross-team architecture investments.",
1242
1261
  "",
1243
1262
  "### Backbone Maintenance",
1244
- `- Keep ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ENGINEERING_RULES.md, and ${FOUNDATION_DOCS_DIR}/TECH.md aligned when direction or structure changes.`,
1263
+ `- Keep ${FOUNDATION_DOCS_DIR}/MEMORY.md, ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ENGINEERING_RULES.md, and ${FOUNDATION_DOCS_DIR}/TECH.md aligned when direction or structure changes.`,
1245
1264
  "- Link major roadmap themes back to specs and ADRs instead of burying them in chat-only planning.",
1246
1265
  "<!-- cbx:roadmap:foundation:end -->",
1247
1266
  "",
@@ -1325,15 +1344,17 @@ function buildEngineeringRulesTemplate() {
1325
1344
  "- skill-name, workflow-name, or agent-name",
1326
1345
  "- or: none",
1327
1346
  "",
1328
- "## 9) Keep TECH.md Fresh",
1347
+ "## 9) Keep Foundation Docs Fresh",
1329
1348
  "",
1330
- "- `TECH.md` is generated from current codebase reality.",
1331
- "- Re-run `cbx rules tech-md --overwrite` after major stack or architecture changes.",
1349
+ "- `docs/foundation/MEMORY.md` is the AI entrypoint for non-trivial work.",
1350
+ "- Read `docs/foundation/MEMORY.md` first, then load deeper foundation docs only when the active task needs them.",
1351
+ "- Re-run `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>` after major product, architecture, runtime, or tooling changes.",
1352
+ "- Re-run `cbx rules tech-md --overwrite` only when you specifically need the legacy root-level `TECH.md` snapshot refreshed.",
1332
1353
  "",
1333
1354
  "<!-- cbx:architecture:rules:start version=1 profile=bootstrap -->",
1334
1355
  "## 10) Architecture Contract (auto-managed)",
1335
1356
  "",
1336
- "- Declared style: bootstrap placeholder. Re-run `cbx build architecture --platform <codex|claude|gemini|copilot>` to refresh this contract from the repo.",
1357
+ "- Declared style: bootstrap placeholder. Re-run `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>` to refresh this contract from the repo.",
1337
1358
  "- Design-system source of truth: bootstrap placeholder.",
1338
1359
  "- Dependency direction rules:",
1339
1360
  " - Replace this placeholder with the managed architecture block when architecture generation runs.",
@@ -1385,7 +1406,7 @@ function buildProductBuildSkeleton() {
1385
1406
  "This file is managed by `cbx build architecture`.",
1386
1407
  "",
1387
1408
  "<!-- cbx:product:foundation:start version=1 profile=uninitialized -->",
1388
- "Replace this managed section by running `cbx build architecture --platform <codex|claude|gemini|copilot>`.",
1409
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1389
1410
  "<!-- cbx:product:foundation:end -->",
1390
1411
  "",
1391
1412
  ].join("\n");
@@ -1397,7 +1418,7 @@ function buildArchitectureBuildSkeleton() {
1397
1418
  "This file is managed by `cbx build architecture`.",
1398
1419
  "",
1399
1420
  "<!-- cbx:architecture:doc:start version=1 profile=uninitialized -->",
1400
- "Replace this managed section by running `cbx build architecture --platform <codex|claude|gemini|copilot>`.",
1421
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1401
1422
  "<!-- cbx:architecture:doc:end -->",
1402
1423
  "",
1403
1424
  ].join("\n");
@@ -1409,11 +1430,35 @@ function buildTechBuildSkeleton() {
1409
1430
  "This file is managed by `cbx build architecture`.",
1410
1431
  "",
1411
1432
  "<!-- cbx:architecture:tech:start version=1 snapshot=uninitialized -->",
1412
- "Replace this managed section by running `cbx build architecture --platform <codex|claude|gemini|copilot>`.",
1433
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1413
1434
  "<!-- cbx:architecture:tech:end -->",
1414
1435
  "",
1415
1436
  ].join("\n");
1416
1437
  }
1438
+ function buildMemoryBuildSkeleton() {
1439
+ return [
1440
+ "# Memory",
1441
+ "",
1442
+ "This file is managed by `cbx build architecture` as the durable AI entrypoint for the project.",
1443
+ "",
1444
+ "<!-- cbx:memory:index:start version=1 profile=uninitialized -->",
1445
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1446
+ "<!-- cbx:memory:index:end -->",
1447
+ "",
1448
+ ].join("\n");
1449
+ }
1450
+ function buildMemoryTopicSkeleton(title, topicId) {
1451
+ return [
1452
+ `# ${title}`,
1453
+ "",
1454
+ "This file is managed by `cbx build architecture`.",
1455
+ "",
1456
+ `<!-- cbx:memory:topic:start version=1 topic=${topicId} profile=uninitialized -->`,
1457
+ "Replace this managed section by running `cbx build architecture`.",
1458
+ "<!-- cbx:memory:topic:end -->",
1459
+ "",
1460
+ ].join("\n");
1461
+ }
1417
1462
  function buildAdrReadme() {
1418
1463
  return [
1419
1464
  "# Architecture Decision Records",
@@ -1464,35 +1509,56 @@ function buildAdrTemplate() {
1464
1509
  "",
1465
1510
  ].join("\n");
1466
1511
  }
1467
- function buildEngineeringRulesManagedBlock({ platform, productFilePath, architectureFilePath, engineeringRulesFilePath, techMdFilePath, roadmapFilePath, ruleFilePath, }) {
1512
+ function buildEngineeringRulesManagedBlock({ platform, memoryFilePath, productFilePath, architectureFilePath, engineeringRulesFilePath, techMdFilePath, roadmapFilePath, ruleFilePath, }) {
1513
+ const memoryRef = toPosixPath(path.resolve(memoryFilePath));
1468
1514
  const productRef = toPosixPath(path.resolve(productFilePath));
1469
1515
  const architectureRef = toPosixPath(path.resolve(architectureFilePath));
1470
1516
  const engineeringRef = toPosixPath(path.resolve(engineeringRulesFilePath));
1471
1517
  const techRef = toPosixPath(path.resolve(techMdFilePath));
1472
1518
  const roadmapRef = toPosixPath(path.resolve(roadmapFilePath));
1473
1519
  const ruleRef = toPosixPath(path.resolve(ruleFilePath));
1520
+ const supportsAtImport = platform === "claude" || platform === "gemini";
1521
+ const ruleFileDir = path.dirname(path.resolve(ruleFilePath));
1522
+ const relMemory = toPosixPath(path.relative(ruleFileDir, path.resolve(memoryFilePath)));
1523
+ const relProduct = toPosixPath(path.relative(ruleFileDir, path.resolve(productFilePath)));
1524
+ const relArchitecture = toPosixPath(path.relative(ruleFileDir, path.resolve(architectureFilePath)));
1525
+ const relTech = toPosixPath(path.relative(ruleFileDir, path.resolve(techMdFilePath)));
1526
+ const importLines = supportsAtImport
1527
+ ? [
1528
+ "",
1529
+ "Foundation memory index (auto-imported into context):",
1530
+ `@${relMemory}`,
1531
+ "Load deeper docs from MEMORY.md only when needed:",
1532
+ `- ${relProduct}`,
1533
+ `- ${relArchitecture}`,
1534
+ `- ${relTech}`,
1535
+ ]
1536
+ : [];
1474
1537
  return [
1475
1538
  `<!-- cbx:engineering:auto:start platform=${platform} version=1 -->`,
1476
1539
  "## Engineering Guardrails (auto-managed)",
1477
1540
  "Apply these before planning, coding, review, and release:",
1478
1541
  "",
1542
+ `- Shared memory index: \`${memoryRef}\``,
1479
1543
  `- Product backbone: \`${productRef}\``,
1480
1544
  `- Accepted architecture: \`${architectureRef}\``,
1481
1545
  `- Required baseline: \`${engineeringRef}\``,
1482
1546
  `- Project tech map: \`${techRef}\``,
1483
1547
  `- Delivery roadmap: \`${roadmapRef}\``,
1484
1548
  `- Active platform rule file: \`${ruleRef}\``,
1549
+ ...importLines,
1485
1550
  "",
1486
1551
  "Hard policy:",
1487
1552
  "1. Start from product outcomes and ship the smallest valuable slice.",
1488
1553
  "2. Keep architecture simple (KISS) and avoid speculative work (YAGNI).",
1489
1554
  "3. Apply SOLID pragmatically to reduce change risk, not add ceremony.",
1490
1555
  "4. Use clear naming with focused responsibilities and explicit boundaries.",
1491
- `5. For non-trivial work, read ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ENGINEERING_RULES.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, and ${FOUNDATION_DOCS_DIR}/TECH.md in that order when they exist before planning or implementation.`,
1492
- "6. Require validation evidence (lint/types/tests) before merge.",
1493
- "7. Use Decision Log response style.",
1494
- "8. Every Decision Log must include a `Skills Used` section listing skill, workflow, or agent names.",
1495
- "9. If no skill loaded, `Skills Used: none` is mandatory.",
1556
+ `5. For non-trivial work, read ${FOUNDATION_DOCS_DIR}/MEMORY.md first. Then load ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, ${FOUNDATION_MEMORY_DIR}/*, and ADRs only when the active task needs that deeper context. Check ${FOUNDATION_DOCS_DIR}/PRODUCT.md for domain glossary and ${FOUNDATION_DOCS_DIR}/TECH.md for build/validation commands.`,
1557
+ "6. Use MEMORY.md's load map and consumer notes to decide which deeper docs the active workflow, agent, or skill should consult.",
1558
+ "7. Require validation evidence (lint/types/tests) before merge.",
1559
+ "8. Use Decision Log response style.",
1560
+ "9. Every Decision Log must include a `Skills Used` section listing skill, workflow, or agent names.",
1561
+ "10. If no skill loaded, `Skills Used: none` is mandatory.",
1496
1562
  "",
1497
1563
  "<!-- cbx:engineering:auto:end -->",
1498
1564
  ].join("\n");
@@ -1579,9 +1645,10 @@ async function upsertEngineeringRulesFile({ targetPath, template, overwrite = fa
1579
1645
  filePath: targetPath,
1580
1646
  };
1581
1647
  }
1582
- async function upsertEngineeringRulesBlock({ ruleFilePath, platform, productFilePath, architectureFilePath, engineeringRulesFilePath, techMdFilePath, roadmapFilePath, dryRun = false, }) {
1648
+ async function upsertEngineeringRulesBlock({ ruleFilePath, platform, memoryFilePath, productFilePath, architectureFilePath, engineeringRulesFilePath, techMdFilePath, roadmapFilePath, dryRun = false, }) {
1583
1649
  const block = buildEngineeringRulesManagedBlock({
1584
1650
  platform,
1651
+ memoryFilePath,
1585
1652
  productFilePath,
1586
1653
  architectureFilePath,
1587
1654
  engineeringRulesFilePath,
@@ -1795,6 +1862,12 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1795
1862
  const productPath = path.join(foundationRoot, "PRODUCT.md");
1796
1863
  const architectureDocPath = path.join(foundationRoot, "ARCHITECTURE.md");
1797
1864
  const techMdPath = path.join(foundationRoot, "TECH.md");
1865
+ const memoryPath = path.join(foundationRoot, "MEMORY.md");
1866
+ const memoryDir = path.join(workspaceRoot, FOUNDATION_MEMORY_DIR);
1867
+ const domainMemoryPath = path.join(memoryDir, "domain.md");
1868
+ const runtimeMemoryPath = path.join(memoryDir, "runtime.md");
1869
+ const integrationsMemoryPath = path.join(memoryDir, "integrations.md");
1870
+ const debuggingMemoryPath = path.join(memoryDir, "debugging.md");
1798
1871
  const adrDir = path.join(workspaceRoot, FOUNDATION_ADR_DIR);
1799
1872
  const adrReadmePath = path.join(adrDir, "README.md");
1800
1873
  const adrTemplatePath = path.join(adrDir, "0000-template.md");
@@ -1803,7 +1876,7 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1803
1876
  initialContent: `${buildProductBuildSkeleton()}\n`,
1804
1877
  block: [
1805
1878
  "<!-- cbx:product:foundation:start version=1 profile=uninitialized -->",
1806
- "Replace this managed section by running `cbx build architecture --platform <codex|claude|gemini|copilot>`.",
1879
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1807
1880
  "<!-- cbx:product:foundation:end -->",
1808
1881
  "",
1809
1882
  ].join("\n"),
@@ -1816,7 +1889,7 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1816
1889
  initialContent: `${buildArchitectureBuildSkeleton()}\n`,
1817
1890
  block: [
1818
1891
  "<!-- cbx:architecture:doc:start version=1 profile=uninitialized -->",
1819
- "Replace this managed section by running `cbx build architecture --platform <codex|claude|gemini|copilot>`.",
1892
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1820
1893
  "<!-- cbx:architecture:doc:end -->",
1821
1894
  "",
1822
1895
  ].join("\n"),
@@ -1829,7 +1902,7 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1829
1902
  initialContent: `${buildTechBuildSkeleton()}\n`,
1830
1903
  block: [
1831
1904
  "<!-- cbx:architecture:tech:start version=1 snapshot=uninitialized -->",
1832
- "Replace this managed section by running `cbx build architecture --platform <codex|claude|gemini|copilot>`.",
1905
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1833
1906
  "<!-- cbx:architecture:tech:end -->",
1834
1907
  "",
1835
1908
  ].join("\n"),
@@ -1837,6 +1910,71 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1837
1910
  endPattern: TECH_ARCHITECTURE_BLOCK_END_RE,
1838
1911
  dryRun,
1839
1912
  });
1913
+ const memoryResult = await upsertTaggedSectionInFile({
1914
+ targetPath: memoryPath,
1915
+ initialContent: `${buildMemoryBuildSkeleton()}\n`,
1916
+ block: [
1917
+ "<!-- cbx:memory:index:start version=1 profile=uninitialized -->",
1918
+ "Replace this managed section by running `cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>`.",
1919
+ "<!-- cbx:memory:index:end -->",
1920
+ "",
1921
+ ].join("\n"),
1922
+ startPattern: MEMORY_FOUNDATION_BLOCK_START_RE,
1923
+ endPattern: MEMORY_FOUNDATION_BLOCK_END_RE,
1924
+ dryRun,
1925
+ });
1926
+ const domainMemoryResult = await upsertTaggedSectionInFile({
1927
+ targetPath: domainMemoryPath,
1928
+ initialContent: `${buildMemoryTopicSkeleton("Domain Memory", "domain")}\n`,
1929
+ block: [
1930
+ "<!-- cbx:memory:topic:start version=1 topic=domain profile=uninitialized -->",
1931
+ "Replace this managed section by running `cbx build architecture`.",
1932
+ "<!-- cbx:memory:topic:end -->",
1933
+ "",
1934
+ ].join("\n"),
1935
+ startPattern: MEMORY_TOPIC_BLOCK_START_RE,
1936
+ endPattern: MEMORY_TOPIC_BLOCK_END_RE,
1937
+ dryRun,
1938
+ });
1939
+ const runtimeMemoryResult = await upsertTaggedSectionInFile({
1940
+ targetPath: runtimeMemoryPath,
1941
+ initialContent: `${buildMemoryTopicSkeleton("Runtime Memory", "runtime")}\n`,
1942
+ block: [
1943
+ "<!-- cbx:memory:topic:start version=1 topic=runtime profile=uninitialized -->",
1944
+ "Replace this managed section by running `cbx build architecture`.",
1945
+ "<!-- cbx:memory:topic:end -->",
1946
+ "",
1947
+ ].join("\n"),
1948
+ startPattern: MEMORY_TOPIC_BLOCK_START_RE,
1949
+ endPattern: MEMORY_TOPIC_BLOCK_END_RE,
1950
+ dryRun,
1951
+ });
1952
+ const integrationsMemoryResult = await upsertTaggedSectionInFile({
1953
+ targetPath: integrationsMemoryPath,
1954
+ initialContent: `${buildMemoryTopicSkeleton("Integrations Memory", "integrations")}\n`,
1955
+ block: [
1956
+ "<!-- cbx:memory:topic:start version=1 topic=integrations profile=uninitialized -->",
1957
+ "Replace this managed section by running `cbx build architecture`.",
1958
+ "<!-- cbx:memory:topic:end -->",
1959
+ "",
1960
+ ].join("\n"),
1961
+ startPattern: MEMORY_TOPIC_BLOCK_START_RE,
1962
+ endPattern: MEMORY_TOPIC_BLOCK_END_RE,
1963
+ dryRun,
1964
+ });
1965
+ const debuggingMemoryResult = await upsertTaggedSectionInFile({
1966
+ targetPath: debuggingMemoryPath,
1967
+ initialContent: `${buildMemoryTopicSkeleton("Debugging Memory", "debugging")}\n`,
1968
+ block: [
1969
+ "<!-- cbx:memory:topic:start version=1 topic=debugging profile=uninitialized -->",
1970
+ "Replace this managed section by running `cbx build architecture`.",
1971
+ "<!-- cbx:memory:topic:end -->",
1972
+ "",
1973
+ ].join("\n"),
1974
+ startPattern: MEMORY_TOPIC_BLOCK_START_RE,
1975
+ endPattern: MEMORY_TOPIC_BLOCK_END_RE,
1976
+ dryRun,
1977
+ });
1840
1978
  const adrReadmeResult = await writeTextFile({
1841
1979
  targetPath: adrReadmePath,
1842
1980
  content: `${buildAdrReadme()}\n`,
@@ -1853,11 +1991,21 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1853
1991
  productPath,
1854
1992
  architectureDocPath,
1855
1993
  techMdPath,
1994
+ memoryPath,
1995
+ domainMemoryPath,
1996
+ runtimeMemoryPath,
1997
+ integrationsMemoryPath,
1998
+ debuggingMemoryPath,
1856
1999
  adrReadmePath,
1857
2000
  adrTemplatePath,
1858
2001
  productResult,
1859
2002
  architectureDocResult,
1860
2003
  techResult,
2004
+ memoryResult,
2005
+ domainMemoryResult,
2006
+ runtimeMemoryResult,
2007
+ integrationsMemoryResult,
2008
+ debuggingMemoryResult,
1861
2009
  adrReadmeResult,
1862
2010
  adrTemplateResult,
1863
2011
  };
@@ -3053,7 +3201,7 @@ function targetStateKey(platform, scope) {
3053
3201
  }
3054
3202
  function getStateFilePath(scope, cwd = process.cwd()) {
3055
3203
  if (scope === "global")
3056
- return path.join(os.homedir(), ".cbx", "state.json");
3204
+ return path.join(resolveManagedHomeDir(), ".cbx", "state.json");
3057
3205
  return path.join(cwd, ".cbx", "workflows-state.json");
3058
3206
  }
3059
3207
  async function pathExists(targetPath) {
@@ -3207,9 +3355,9 @@ async function resolveProfilePaths(profileId, scope, cwd = process.cwd()) {
3207
3355
  workflowsDir: await resolvePreferredDir(workflowDirs),
3208
3356
  agentsDir: await resolvePreferredDir(agentDirs),
3209
3357
  skillsDir: await resolvePreferredDir(skillDirs),
3210
- commandsDir: commandDirs[0] ? expandPath(commandDirs[0], cwd) : null,
3211
- promptsDir: promptDirs[0] ? expandPath(promptDirs[0], cwd) : null,
3212
- hooksDir: hookDirs[0] ? expandPath(hookDirs[0], cwd) : null,
3358
+ commandsDir: await resolvePreferredDir(commandDirs),
3359
+ promptsDir: await resolvePreferredDir(promptDirs),
3360
+ hooksDir: await resolvePreferredDir(hookDirs),
3213
3361
  ruleFilesByPriority: cfg.ruleFilesByPriority.map((filePath) => expandPath(filePath, cwd)),
3214
3362
  };
3215
3363
  }
@@ -3739,36 +3887,9 @@ function normalizeMarkdownId(fileName) {
3739
3887
  .replace(/-+/g, "-")
3740
3888
  .replace(/^-|-$/g, "");
3741
3889
  }
3742
- function yamlSingleQuoted(value) {
3743
- return `'${String(value || "").replace(/'/g, "''")}'`;
3744
- }
3745
3890
  function escapeRegExp(value) {
3746
3891
  return String(value).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3747
3892
  }
3748
- function rewriteCodexWorkflowAgentReferences(sourceBody, agentIds) {
3749
- if (!sourceBody || !Array.isArray(agentIds) || agentIds.length === 0)
3750
- return normalizeCodexWrapperMentions(sourceBody);
3751
- let rewritten = sourceBody;
3752
- const sortedAgentIds = unique(agentIds.filter(Boolean)).sort((a, b) => b.length - a.length);
3753
- for (const agentId of sortedAgentIds) {
3754
- const agentPattern = new RegExp(`(^|[^A-Za-z0-9_-])@${escapeRegExp(agentId)}(?=$|[^A-Za-z0-9_-])`, "g");
3755
- rewritten = rewritten.replace(agentPattern, (_match, prefix) => `${prefix}$${CODEX_AGENT_SKILL_PREFIX}${agentId}`);
3756
- }
3757
- return normalizeCodexWrapperMentions(rewritten);
3758
- }
3759
- function rewriteCodexAgentSkillReferences(sourceBody) {
3760
- if (!sourceBody)
3761
- return sourceBody;
3762
- // Agent source files live under platforms/*/agents, but wrapper skills live
3763
- // under .agents/skills/agent-*. Rebase ../skills/<id> links accordingly.
3764
- const rebased = sourceBody.replace(/\(\.\.\/skills\//g, "(../");
3765
- return normalizeCodexWrapperMentions(rebased);
3766
- }
3767
- function normalizeCodexWrapperMentions(sourceBody) {
3768
- if (!sourceBody)
3769
- return sourceBody;
3770
- return sourceBody.replace(/`\$(workflow|agent)-([A-Za-z0-9_-]+|\*)`/g, (_match, kind, id) => `$${kind}-${id}`);
3771
- }
3772
3893
  async function parseWorkflowMetadata(filePath) {
3773
3894
  const raw = await readFile(filePath, "utf8");
3774
3895
  const { frontmatter, body } = extractFrontmatter(raw);
@@ -3807,175 +3928,6 @@ async function parseAgentMetadata(filePath) {
3807
3928
  body: body.trim(),
3808
3929
  };
3809
3930
  }
3810
- function buildCodexWorkflowWrapperSkillMarkdown(wrapperSkillId, workflow) {
3811
- const description = `Callable Codex wrapper for ${workflow.command}: ${workflow.description}`;
3812
- const sourceBody = workflow.body?.trim() || "No source workflow content found.";
3813
- return [
3814
- "---",
3815
- `name: ${wrapperSkillId}`,
3816
- `description: ${yamlSingleQuoted(description)}`,
3817
- "metadata:",
3818
- " source: cubis-foundry",
3819
- " wrapper: workflow",
3820
- " platform: codex",
3821
- ` workflow-id: ${yamlSingleQuoted(workflow.id)}`,
3822
- ` workflow-command: ${yamlSingleQuoted(workflow.command)}`,
3823
- "---",
3824
- "",
3825
- `# Workflow Compatibility Alias: ${workflow.command}`,
3826
- "",
3827
- `Compatibility alias for \`${workflow.command}\` in Codex. Prefer the direct workflow route first and use this wrapper only when older installs or prompts mention $${wrapperSkillId}.`,
3828
- "",
3829
- "## Invocation Contract",
3830
- "1. Resolve the workflow route first; do not use this alias as a substitute for skill discovery.",
3831
- "2. Follow the sequence and guardrails in the source instructions below.",
3832
- "3. Produce actionable output and call out assumptions before edits.",
3833
- "",
3834
- "## Source Workflow Instructions",
3835
- "",
3836
- sourceBody,
3837
- "",
3838
- ].join("\n");
3839
- }
3840
- function buildCodexAgentWrapperSkillMarkdown(wrapperSkillId, agent) {
3841
- const description = `Callable Codex wrapper for @${agent.id}: ${agent.description}`;
3842
- const sourceBody = agent.body?.trim() || "No source agent content found.";
3843
- const relatedSkillsLine = agent.skills.length > 0
3844
- ? `Related skills from source agent: ${agent.skills.join(", ")}`
3845
- : "Related skills from source agent: (none listed)";
3846
- return [
3847
- "---",
3848
- `name: ${wrapperSkillId}`,
3849
- `description: ${yamlSingleQuoted(description)}`,
3850
- "metadata:",
3851
- " source: cubis-foundry",
3852
- " wrapper: agent",
3853
- " platform: codex",
3854
- ` agent-id: ${yamlSingleQuoted(agent.id)}`,
3855
- "---",
3856
- "",
3857
- `# Agent Compatibility Alias: @${agent.id}`,
3858
- "",
3859
- `Compatibility alias for @${agent.id} in Codex. Prefer the direct @agent route first and use this wrapper only when older installs or prompts mention $${wrapperSkillId}.`,
3860
- "",
3861
- "## Invocation Contract",
3862
- "1. Resolve the agent route first; do not use this alias as a substitute for skill discovery.",
3863
- "2. Adopt the role and constraints defined in the source agent content.",
3864
- "3. Apply domain heuristics and escalation rules before coding.",
3865
- "4. Ask clarifying questions when requirements are ambiguous.",
3866
- "",
3867
- `- Source agent name: ${agent.name}`,
3868
- `- Source agent description: ${agent.description}`,
3869
- `- ${relatedSkillsLine}`,
3870
- "",
3871
- "## Source Agent Instructions",
3872
- "",
3873
- sourceBody,
3874
- "",
3875
- ].join("\n");
3876
- }
3877
- async function writeGeneratedSkillArtifact({ destinationDir, content, overwrite, dryRun = false, }) {
3878
- const exists = await pathExists(destinationDir);
3879
- if (exists && !overwrite) {
3880
- return { action: dryRun ? "would-skip" : "skipped", path: destinationDir };
3881
- }
3882
- if (!dryRun && exists && overwrite) {
3883
- await rm(destinationDir, { recursive: true, force: true });
3884
- }
3885
- if (!dryRun) {
3886
- await mkdir(destinationDir, { recursive: true });
3887
- await writeFile(path.join(destinationDir, "SKILL.md"), content, "utf8");
3888
- }
3889
- if (dryRun) {
3890
- return {
3891
- action: exists ? "would-replace" : "would-install",
3892
- path: destinationDir,
3893
- };
3894
- }
3895
- return { action: exists ? "replaced" : "installed", path: destinationDir };
3896
- }
3897
- function buildCodexWrapperSkillIds(platformSpec) {
3898
- const workflowIds = (platformSpec.workflows || []).map((fileName) => {
3899
- const id = normalizeMarkdownId(path.basename(fileName));
3900
- return `${CODEX_WORKFLOW_SKILL_PREFIX}${id}`;
3901
- });
3902
- const agentIds = (platformSpec.agents || []).map((fileName) => {
3903
- const id = normalizeMarkdownId(path.basename(fileName));
3904
- return `${CODEX_AGENT_SKILL_PREFIX}${id}`;
3905
- });
3906
- return unique([...workflowIds, ...agentIds]);
3907
- }
3908
- async function generateCodexWrapperSkills({ platformRoot, platformSpec, skillsDir, overwrite, dryRun = false, }) {
3909
- const installed = [];
3910
- const skipped = [];
3911
- const artifacts = [];
3912
- const generated = [];
3913
- const codexAgentIds = (platformSpec.agents || []).map((fileName) => normalizeMarkdownId(path.basename(fileName)));
3914
- for (const workflowFile of platformSpec.workflows || []) {
3915
- const source = path.join(platformRoot, "workflows", workflowFile);
3916
- if (!(await pathExists(source))) {
3917
- throw new Error(`Missing workflow source file for wrapper generation: ${source}`);
3918
- }
3919
- const metadata = await parseWorkflowMetadata(source);
3920
- const raw = await readFile(source, "utf8");
3921
- const sourceBody = extractFrontmatter(raw).body.trim();
3922
- const rewrittenBody = rewriteCodexWorkflowAgentReferences(sourceBody, codexAgentIds);
3923
- const wrapperSkillId = `${CODEX_WORKFLOW_SKILL_PREFIX}${metadata.id}`;
3924
- const destinationDir = path.join(skillsDir, wrapperSkillId);
3925
- const content = buildCodexWorkflowWrapperSkillMarkdown(wrapperSkillId, {
3926
- ...metadata,
3927
- body: rewrittenBody,
3928
- });
3929
- const result = await writeGeneratedSkillArtifact({
3930
- destinationDir,
3931
- content,
3932
- overwrite,
3933
- dryRun,
3934
- });
3935
- artifacts.push(destinationDir);
3936
- generated.push({
3937
- kind: "workflow",
3938
- id: metadata.id,
3939
- skillId: wrapperSkillId,
3940
- });
3941
- if (result.action === "skipped" || result.action === "would-skip")
3942
- skipped.push(destinationDir);
3943
- else
3944
- installed.push(destinationDir);
3945
- }
3946
- for (const agentFile of platformSpec.agents || []) {
3947
- const source = path.join(platformRoot, "agents", agentFile);
3948
- if (!(await pathExists(source))) {
3949
- throw new Error(`Missing agent source file for wrapper generation: ${source}`);
3950
- }
3951
- const metadata = await parseAgentMetadata(source);
3952
- const rewrittenBody = rewriteCodexAgentSkillReferences(metadata.body);
3953
- const wrapperSkillId = `${CODEX_AGENT_SKILL_PREFIX}${metadata.id}`;
3954
- const destinationDir = path.join(skillsDir, wrapperSkillId);
3955
- const content = buildCodexAgentWrapperSkillMarkdown(wrapperSkillId, {
3956
- ...metadata,
3957
- body: rewrittenBody,
3958
- });
3959
- const result = await writeGeneratedSkillArtifact({
3960
- destinationDir,
3961
- content,
3962
- overwrite,
3963
- dryRun,
3964
- });
3965
- artifacts.push(destinationDir);
3966
- generated.push({ kind: "agent", id: metadata.id, skillId: wrapperSkillId });
3967
- if (result.action === "skipped" || result.action === "would-skip")
3968
- skipped.push(destinationDir);
3969
- else
3970
- installed.push(destinationDir);
3971
- }
3972
- return {
3973
- installed,
3974
- skipped,
3975
- artifacts,
3976
- generated,
3977
- };
3978
- }
3979
3931
  async function resolvePlatformAgentSkillDependencies({ platformRoot, platformSpec, }) {
3980
3932
  const dependencyIds = [];
3981
3933
  for (const agentFile of platformSpec.agents || []) {
@@ -3988,15 +3940,41 @@ async function resolvePlatformAgentSkillDependencies({ platformRoot, platformSpe
3988
3940
  return unique(dependencyIds.filter(Boolean));
3989
3941
  }
3990
3942
  async function collectInstalledWorkflows(profileId, scope, cwd = process.cwd()) {
3991
- // Global install mode keeps workflows/agents in workspace paths.
3992
- // Index using artifact-aware paths so sync-rules reflects installed workflows.
3943
+ const workflows = [];
3944
+ const state = await readState(scope, cwd);
3945
+ const key = targetStateKey(profileId, scope);
3946
+ const bundleEntries = Object.entries(state.targets?.[key]?.bundles || {});
3947
+ const seen = new Set();
3948
+ for (const [bundleId] of bundleEntries) {
3949
+ const sharedWorkflowsDir = path.join(agentAssetsRoot(), "workflows", bundleId, "shared", "workflows");
3950
+ if (!(await pathExists(sharedWorkflowsDir)))
3951
+ continue;
3952
+ const entries = await readdir(sharedWorkflowsDir, {
3953
+ withFileTypes: true,
3954
+ });
3955
+ for (const entry of entries) {
3956
+ if (!entry.isFile() ||
3957
+ !entry.name.endsWith(".md") ||
3958
+ entry.name.startsWith(".")) {
3959
+ continue;
3960
+ }
3961
+ const filePath = path.join(sharedWorkflowsDir, entry.name);
3962
+ const metadata = await parseWorkflowMetadata(filePath);
3963
+ if (seen.has(metadata.id))
3964
+ continue;
3965
+ seen.add(metadata.id);
3966
+ workflows.push(metadata);
3967
+ }
3968
+ }
3969
+ if (workflows.length > 0) {
3970
+ return workflows.sort((a, b) => a.command.localeCompare(b.command));
3971
+ }
3993
3972
  const profilePaths = await resolveArtifactProfilePaths(profileId, scope, cwd);
3994
- if (!(await pathExists(profilePaths.workflowsDir)))
3973
+ if (!profilePaths.workflowsDir || !(await pathExists(profilePaths.workflowsDir)))
3995
3974
  return [];
3996
3975
  const entries = await readdir(profilePaths.workflowsDir, {
3997
3976
  withFileTypes: true,
3998
3977
  });
3999
- const workflows = [];
4000
3978
  for (const entry of entries) {
4001
3979
  if (!entry.isFile() ||
4002
3980
  !entry.name.endsWith(".md") ||
@@ -4040,7 +4018,8 @@ function buildManagedWorkflowBlock(platformId, workflows) {
4040
4018
  lines.push("Prefer direct route identifiers first:");
4041
4019
  lines.push("- Workflows: `/workflow-name`");
4042
4020
  lines.push("- Agents: `@agent-name`");
4043
- lines.push("- Compatibility aliases remain available: `$workflow-*`, `$agent-*`");
4021
+ lines.push("- Native agents: `.codex/agents/*.toml`");
4022
+ lines.push("- Native workflow skills: `.agents/skills/<workflow-id>/SKILL.md`");
4044
4023
  lines.push("");
4045
4024
  if (workflows.length === 0) {
4046
4025
  lines.push("- No installed workflows found yet.");
@@ -4056,44 +4035,41 @@ function buildManagedWorkflowBlock(platformId, workflows) {
4056
4035
  lines.push("Selection policy:");
4057
4036
  lines.push("1. If the user names `/workflow` or `@agent`, use that route directly.");
4058
4037
  lines.push("2. Else map intent to one primary workflow.");
4059
- lines.push("3. Treat `$workflow-*` / `$agent-*` as compatibility aliases only.");
4038
+ lines.push("3. Load supporting skills only after route selection.");
4060
4039
  lines.push("");
4061
4040
  lines.push("<!-- cbx:workflows:auto:end -->");
4062
4041
  return lines.join("\n");
4063
4042
  }
4064
4043
  if (platformId === "copilot") {
4065
4044
  lines.push("Prefer native Copilot route surfaces first:");
4066
- lines.push("- Workflow prompts: `.github/prompts/workflow-*.prompt.md`");
4067
- lines.push("- Workflow files: `.github/copilot/workflows/*.md`");
4045
+ lines.push("- Workflow prompts: `.github/prompts/*.prompt.md`");
4046
+ lines.push("- Agents: `.github/agents/*.md`");
4047
+ lines.push("- Skills: `.github/skills/<skill>/SKILL.md`");
4068
4048
  lines.push("- Agents: `@agent-name`");
4069
4049
  lines.push("- Workspace-first MCP: `.vscode/mcp.json`");
4070
- lines.push("- Do not use `$workflow-*` / `$agent-*` as the primary route surface here; those are Codex compatibility aliases.");
4071
- lines.push("- `.github/skills` is installed by default, but route through workflows and agents before loading skills.");
4072
4050
  lines.push("");
4073
4051
  }
4074
4052
  else if (platformId === "antigravity") {
4075
4053
  lines.push("Prefer native Antigravity route surfaces first:");
4076
4054
  lines.push("- Commands: `.gemini/commands/*.toml`");
4077
- lines.push("- Workflow files: `.agent/workflows/*.md`");
4078
- lines.push("- Agents: `@agent-name`");
4079
- lines.push("- Do not use `$workflow-*` / `$agent-*` as the primary route surface here; those are Codex compatibility aliases.");
4055
+ lines.push("- Rules: `.agents/rules/GEMINI.md`");
4056
+ lines.push("- Skills: `.agents/skills/<skill>/SKILL.md`");
4057
+ lines.push("- Agent routes compile to native command/rule flows here.");
4080
4058
  lines.push("");
4081
4059
  }
4082
4060
  else if (platformId === "claude") {
4083
4061
  lines.push("Prefer native Claude Code route surfaces first:");
4084
4062
  lines.push("- Rules: `.claude/rules/*.md`");
4085
- lines.push("- Workflow files: `.claude/workflows/*.md`");
4063
+ lines.push("- Skills: `.claude/skills/<skill>/SKILL.md`");
4064
+ lines.push("- Agents: `.claude/agents/*.md`");
4086
4065
  lines.push("- Memory: `CLAUDE.md`");
4087
- lines.push("- Do not use `$workflow-*` / `$agent-*` as the primary route surface here; those are Codex compatibility aliases.");
4088
4066
  lines.push("");
4089
4067
  }
4090
4068
  else if (platformId === "gemini") {
4091
4069
  lines.push("Prefer native Gemini route surfaces first:");
4092
4070
  lines.push("- Commands: `.gemini/commands/*.toml`");
4093
- lines.push("- Workflow files: `.gemini/workflows/*.md`");
4094
4071
  lines.push("- Rules: `.gemini/GEMINI.md`");
4095
- lines.push("- Specialists are inline postures here, not standalone agent files.");
4096
- lines.push("- Do not use `$workflow-*` / `$agent-*` as the primary route surface here; those are Codex compatibility aliases.");
4072
+ lines.push("- Route specialists through commands and rule guidance.");
4097
4073
  lines.push("");
4098
4074
  }
4099
4075
  lines.push("Use the following workflows proactively when task intent matches:");
@@ -4118,24 +4094,24 @@ function buildManagedWorkflowBlock(platformId, workflows) {
4118
4094
  lines.push("");
4119
4095
  lines.push("Selection policy:");
4120
4096
  if (platformId === "copilot") {
4121
- lines.push("1. Match explicit workflow prompt, workflow, or `@agent` first.");
4122
- lines.push("2. Else match user intent to one primary workflow and reuse the matching prompt file when available.");
4123
- lines.push("3. Treat `$workflow-*` / `$agent-*` as Codex compatibility aliases, not as the primary route surface here.");
4097
+ lines.push("1. Match explicit workflow prompt or `@agent` first.");
4098
+ lines.push("2. Else match user intent to one primary workflow and reuse the matching prompt file.");
4099
+ lines.push("3. Use skill_search only when the best workflow or agent route is unclear.");
4124
4100
  }
4125
4101
  else if (platformId === "antigravity") {
4126
- lines.push("1. Match explicit Gemini command, workflow, or `@agent` first.");
4127
- lines.push("2. Else match user intent to one primary workflow and use the matching command file when available.");
4128
- lines.push("3. Treat `$workflow-*` / `$agent-*` as Codex compatibility aliases, not as the primary route surface here.");
4102
+ lines.push("1. Match explicit Gemini command first.");
4103
+ lines.push("2. Else match user intent to one primary workflow and use the matching command file.");
4104
+ lines.push("3. Use skill_search only when workflow intent is unclear.");
4129
4105
  }
4130
4106
  else if (platformId === "claude") {
4131
- lines.push("1. Match explicit workflow or scoped rule first.");
4107
+ lines.push("1. Match explicit workflow skill or `@agent` first.");
4132
4108
  lines.push("2. Else match user intent to one primary workflow.");
4133
- lines.push("3. Treat `$workflow-*` / `$agent-*` as Codex compatibility aliases, not as the primary route surface here.");
4109
+ lines.push("3. Use skill_search only when workflow intent is unclear.");
4134
4110
  }
4135
4111
  else if (platformId === "gemini") {
4136
- lines.push("1. Match explicit Gemini command or workflow first.");
4137
- lines.push("2. Else match user intent to one primary workflow and use the matching command file when available.");
4138
- lines.push("3. Treat specialists as inline postures defined by GEMINI.md, not separate agent files.");
4112
+ lines.push("1. Match explicit Gemini command first.");
4113
+ lines.push("2. Else match user intent to one primary workflow and use the matching command file.");
4114
+ lines.push("3. Keep specialists inside the command plan; there are no standalone agent files.");
4139
4115
  }
4140
4116
  else {
4141
4117
  lines.push("1. Match explicit slash command first.");
@@ -4303,7 +4279,19 @@ async function syncRulesForPlatform({ platform, scope, cwd = process.cwd(), dryR
4303
4279
  const ruleFilePath = await resolveRuleFilePath(platform, scope, cwd);
4304
4280
  if (!ruleFilePath)
4305
4281
  throw new Error(`No rule file configured for platform '${platform}'.`);
4306
- const workflows = await collectInstalledWorkflows(platform, scope, cwd);
4282
+ let workflows = await collectInstalledWorkflows(platform, scope, cwd);
4283
+ if (scope === "global") {
4284
+ const workspaceRuleFile = await resolveWorkspaceRuleFileForGlobalScope(platform, cwd);
4285
+ const profile = WORKFLOW_PROFILES[platform];
4286
+ const globalRuleFile = profile
4287
+ ? expandPath(profile.global.ruleFilesByPriority[0], cwd)
4288
+ : null;
4289
+ if (workspaceRuleFile &&
4290
+ globalRuleFile &&
4291
+ path.resolve(workspaceRuleFile) !== path.resolve(globalRuleFile)) {
4292
+ workflows = await collectInstalledWorkflows(platform, "project", cwd);
4293
+ }
4294
+ }
4307
4295
  const patchResult = await upsertManagedRuleBlock(ruleFilePath, platform, workflows, dryRun);
4308
4296
  const workspaceRuleSync = await syncWorkspaceRuleForGlobalScope({
4309
4297
  platform,
@@ -4433,14 +4421,14 @@ async function writeGeneratedArtifact({ destination, content, dryRun = false, })
4433
4421
  }
4434
4422
  function resolveLegacyPostmanConfigPath({ scope, cwd = process.cwd() }) {
4435
4423
  if (scope === "global") {
4436
- return path.join(os.homedir(), ".cbx", LEGACY_POSTMAN_CONFIG_FILENAME);
4424
+ return path.join(resolveManagedHomeDir(), ".cbx", LEGACY_POSTMAN_CONFIG_FILENAME);
4437
4425
  }
4438
4426
  const workspaceRoot = findWorkspaceRoot(cwd);
4439
4427
  return path.join(workspaceRoot, LEGACY_POSTMAN_CONFIG_FILENAME);
4440
4428
  }
4441
4429
  function resolveCbxConfigPath({ scope, cwd = process.cwd() }) {
4442
4430
  if (scope === "global") {
4443
- return path.join(os.homedir(), ".cbx", CBX_CONFIG_FILENAME);
4431
+ return path.join(resolveManagedHomeDir(), ".cbx", CBX_CONFIG_FILENAME);
4444
4432
  }
4445
4433
  const workspaceRoot = findWorkspaceRoot(cwd);
4446
4434
  return path.join(workspaceRoot, CBX_CONFIG_FILENAME);
@@ -4456,13 +4444,19 @@ async function assertNoLegacyOnlyPostmanConfig({ scope, cwd = process.cwd() }) {
4456
4444
  }
4457
4445
  function resolveMcpRootPath({ scope, cwd = process.cwd() }) {
4458
4446
  if (scope === "global") {
4459
- return path.join(os.homedir(), ".cbx", "mcp");
4447
+ return path.join(resolveManagedHomeDir(), ".cbx", "mcp");
4460
4448
  }
4461
4449
  const workspaceRoot = findWorkspaceRoot(cwd);
4462
4450
  return path.join(workspaceRoot, ".cbx", "mcp");
4463
4451
  }
4452
+ function resolveManagedHomeDir() {
4453
+ const override = String(process.env.HOME ||
4454
+ process.env.USERPROFILE ||
4455
+ "").trim();
4456
+ return override || os.homedir();
4457
+ }
4464
4458
  function resolveManagedCredentialsEnvPath() {
4465
- return path.join(os.homedir(), ".cbx", CBX_CREDENTIALS_ENV_FILENAME);
4459
+ return path.join(resolveManagedHomeDir(), ".cbx", CBX_CREDENTIALS_ENV_FILENAME);
4466
4460
  }
4467
4461
  function parseShellEnvValue(rawValue) {
4468
4462
  const value = String(rawValue || "").trim();
@@ -5887,7 +5881,9 @@ async function configurePostmanInstallArtifacts({ platform, scope, profilePaths,
5887
5881
  })
5888
5882
  : null;
5889
5883
  const credentialEnvVarNames = [];
5890
- if (persistCredentials && shouldInstallPostman && effectiveApiKeySource === "env") {
5884
+ if (persistCredentials &&
5885
+ shouldInstallPostman &&
5886
+ effectiveApiKeySource === "env") {
5891
5887
  credentialEnvVarNames.push(effectiveApiKeyEnvVar || POSTMAN_API_KEY_ENV_VAR);
5892
5888
  }
5893
5889
  if (persistCredentials &&
@@ -6264,27 +6260,57 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6264
6260
  throw new Error(`Bundle '${bundleId}' does not define platform '${platform}'.`);
6265
6261
  }
6266
6262
  const shouldInstallPlatformSkills = true;
6263
+ const workflowFiles = Array.isArray(platformSpec.workflows)
6264
+ ? platformSpec.workflows
6265
+ : [];
6266
+ const generatedSkillDirs = Array.isArray(platformSpec.generatedSkills)
6267
+ ? platformSpec.generatedSkills
6268
+ : [];
6269
+ const agentFiles = platformInstallsCustomAgents(platform)
6270
+ ? Array.isArray(platformSpec.agents)
6271
+ ? platformSpec.agents
6272
+ : []
6273
+ : [];
6274
+ const commandFiles = Array.isArray(platformSpec.commands)
6275
+ ? platformSpec.commands
6276
+ : [];
6277
+ const promptFiles = Array.isArray(platformSpec.prompts)
6278
+ ? platformSpec.prompts
6279
+ : [];
6280
+ const hookFiles = Array.isArray(platformSpec.hooks)
6281
+ ? platformSpec.hooks
6282
+ .map((entry) => typeof entry === "string"
6283
+ ? entry
6284
+ : typeof entry?.file === "string"
6285
+ ? entry.file
6286
+ : null)
6287
+ .filter(Boolean)
6288
+ : [];
6267
6289
  if (!dryRun) {
6268
- await mkdir(profilePaths.workflowsDir, { recursive: true });
6269
- if (shouldInstallPlatformSkills) {
6290
+ if (workflowFiles.length > 0) {
6291
+ if (!profilePaths.workflowsDir) {
6292
+ throw new Error(`Platform '${platform}' does not define a workflow install directory.`);
6293
+ }
6294
+ await mkdir(profilePaths.workflowsDir, { recursive: true });
6295
+ }
6296
+ if (shouldInstallPlatformSkills &&
6297
+ profilePaths.skillsDir &&
6298
+ (generatedSkillDirs.length > 0 || Array.isArray(platformSpec.skills))) {
6270
6299
  await mkdir(profilePaths.skillsDir, { recursive: true });
6271
6300
  }
6272
- if (platformInstallsCustomAgents(platform)) {
6301
+ if (agentFiles.length > 0) {
6302
+ if (!profilePaths.agentsDir) {
6303
+ throw new Error(`Platform '${platform}' does not define an agent install directory.`);
6304
+ }
6273
6305
  await mkdir(profilePaths.agentsDir, { recursive: true });
6274
6306
  }
6275
- if (profilePaths.commandsDir &&
6276
- Array.isArray(platformSpec.commands) &&
6277
- platformSpec.commands.length > 0) {
6307
+ if (profilePaths.commandsDir && commandFiles.length > 0) {
6278
6308
  await mkdir(profilePaths.commandsDir, { recursive: true });
6279
6309
  }
6280
- if (profilePaths.promptsDir &&
6281
- Array.isArray(platformSpec.prompts) &&
6282
- platformSpec.prompts.length > 0) {
6310
+ if (profilePaths.promptsDir && promptFiles.length > 0) {
6283
6311
  await mkdir(profilePaths.promptsDir, { recursive: true });
6284
6312
  }
6285
- if (profilePaths.hooksDir &&
6286
- Array.isArray(platformSpec.hooks) &&
6287
- platformSpec.hooks.some((entry) => typeof entry?.file === "string")) {
6313
+ if (profilePaths.hooksDir && hookFiles.length > 0) {
6288
6314
  await mkdir(profilePaths.hooksDir, { recursive: true });
6289
6315
  }
6290
6316
  }
@@ -6302,10 +6328,9 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6302
6328
  };
6303
6329
  // Bind useSymlinks into copyArtifact so every call site inherits it
6304
6330
  const copyArt = (args) => copyArtifact({ ...args, useSymlinks });
6305
- const workflowFiles = Array.isArray(platformSpec.workflows)
6306
- ? platformSpec.workflows
6307
- : [];
6308
6331
  for (const workflowFile of workflowFiles) {
6332
+ if (!profilePaths.workflowsDir)
6333
+ continue;
6309
6334
  const source = path.join(platformRoot, "workflows", workflowFile);
6310
6335
  const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
6311
6336
  if (!(await pathExists(source))) {
@@ -6323,12 +6348,9 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6323
6348
  else
6324
6349
  installed.push(destination);
6325
6350
  }
6326
- const agentFiles = platformInstallsCustomAgents(platform)
6327
- ? Array.isArray(platformSpec.agents)
6328
- ? platformSpec.agents
6329
- : []
6330
- : [];
6331
6351
  for (const agentFile of agentFiles) {
6352
+ if (!profilePaths.agentsDir)
6353
+ continue;
6332
6354
  const source = path.join(platformRoot, "agents", agentFile);
6333
6355
  const destination = path.join(profilePaths.agentsDir, path.basename(agentFile));
6334
6356
  if (!(await pathExists(source))) {
@@ -6346,9 +6368,6 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6346
6368
  else
6347
6369
  installed.push(destination);
6348
6370
  }
6349
- const commandFiles = Array.isArray(platformSpec.commands)
6350
- ? platformSpec.commands
6351
- : [];
6352
6371
  for (const commandFile of commandFiles) {
6353
6372
  if (!profilePaths.commandsDir)
6354
6373
  continue;
@@ -6369,9 +6388,6 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6369
6388
  else
6370
6389
  installed.push(destination);
6371
6390
  }
6372
- const promptFiles = Array.isArray(platformSpec.prompts)
6373
- ? platformSpec.prompts
6374
- : [];
6375
6391
  for (const promptFile of promptFiles) {
6376
6392
  if (!profilePaths.promptsDir)
6377
6393
  continue;
@@ -6392,15 +6408,6 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6392
6408
  else
6393
6409
  installed.push(destination);
6394
6410
  }
6395
- const hookFiles = Array.isArray(platformSpec.hooks)
6396
- ? platformSpec.hooks
6397
- .map((entry) => typeof entry === "string"
6398
- ? entry
6399
- : typeof entry?.file === "string"
6400
- ? entry.file
6401
- : null)
6402
- .filter(Boolean)
6403
- : [];
6404
6411
  for (const hookFile of hookFiles) {
6405
6412
  if (!profilePaths.hooksDir)
6406
6413
  continue;
@@ -6421,7 +6428,7 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6421
6428
  else
6422
6429
  installed.push(destination);
6423
6430
  }
6424
- if (shouldInstallPlatformSkills) {
6431
+ if (shouldInstallPlatformSkills && profilePaths.skillsDir) {
6425
6432
  const agentSkillDependencies = await resolvePlatformAgentSkillDependencies({
6426
6433
  platformRoot,
6427
6434
  platformSpec,
@@ -6467,20 +6474,24 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6467
6474
  else
6468
6475
  installed.push(skillsIndexDest);
6469
6476
  }
6470
- }
6471
- let generatedWrapperSkills = [];
6472
- if (platform === "codex") {
6473
- const wrapperResult = await generateCodexWrapperSkills({
6474
- platformRoot,
6475
- platformSpec,
6476
- skillsDir: profilePaths.skillsDir,
6477
- overwrite,
6478
- dryRun,
6479
- });
6480
- installed.push(...wrapperResult.installed);
6481
- skipped.push(...wrapperResult.skipped);
6482
- artifacts.skills.push(...wrapperResult.artifacts);
6483
- generatedWrapperSkills = wrapperResult.generated;
6477
+ for (const generatedSkillDir of generatedSkillDirs) {
6478
+ const source = path.join(platformRoot, "generated-skills", generatedSkillDir);
6479
+ const destination = path.join(profilePaths.skillsDir, path.basename(generatedSkillDir));
6480
+ if (!(await pathExists(source))) {
6481
+ throw new Error(`Missing generated skill source directory: ${source}`);
6482
+ }
6483
+ const result = await copyArt({
6484
+ source,
6485
+ destination,
6486
+ overwrite,
6487
+ dryRun,
6488
+ });
6489
+ artifacts.skills.push(destination);
6490
+ if (result.action === "skipped" || result.action === "would-skip")
6491
+ skipped.push(destination);
6492
+ else
6493
+ installed.push(destination);
6494
+ }
6484
6495
  }
6485
6496
  let terminalIntegration = null;
6486
6497
  if (platform === "antigravity" && terminalVerifierSelection?.enabled) {
@@ -6491,11 +6502,13 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6491
6502
  });
6492
6503
  installed.push(...terminalIntegration.installedPaths);
6493
6504
  }
6494
- const duplicateSkillCleanup = await cleanupNestedDuplicateSkills({
6495
- skillsRootDir: profilePaths.skillsDir,
6496
- installedSkillDirs: artifacts.skills,
6497
- dryRun,
6498
- });
6505
+ const duplicateSkillCleanup = profilePaths.skillsDir
6506
+ ? await cleanupNestedDuplicateSkills({
6507
+ skillsRootDir: profilePaths.skillsDir,
6508
+ installedSkillDirs: artifacts.skills,
6509
+ dryRun,
6510
+ })
6511
+ : [];
6499
6512
  const sanitizedSkills = await sanitizeInstalledSkillsForPlatform({
6500
6513
  platform,
6501
6514
  skillDirs: artifacts.skills,
@@ -6512,49 +6525,11 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6512
6525
  skipped,
6513
6526
  artifacts,
6514
6527
  terminalIntegration,
6515
- generatedWrapperSkills,
6516
6528
  duplicateSkillCleanup,
6517
6529
  sanitizedSkills,
6518
6530
  sanitizedAgents,
6519
6531
  };
6520
6532
  }
6521
- async function installCodexProjectWorkflowTemplates({ bundleId, manifest, overwrite, dryRun = false, cwd = process.cwd(), }) {
6522
- const platform = "codex";
6523
- const platformSpec = manifest.platforms?.[platform];
6524
- if (!platformSpec)
6525
- return { installed: [], skipped: [] };
6526
- const workflowFiles = Array.isArray(platformSpec.workflows)
6527
- ? platformSpec.workflows
6528
- : [];
6529
- if (workflowFiles.length === 0)
6530
- return { installed: [], skipped: [] };
6531
- const profilePaths = await resolveProfilePaths(platform, "project", cwd);
6532
- if (!dryRun) {
6533
- await mkdir(profilePaths.workflowsDir, { recursive: true });
6534
- }
6535
- const bundleRoot = path.join(agentAssetsRoot(), "workflows", bundleId);
6536
- const platformRoot = path.join(bundleRoot, "platforms", platform);
6537
- const installed = [];
6538
- const skipped = [];
6539
- for (const workflowFile of workflowFiles) {
6540
- const source = path.join(platformRoot, "workflows", workflowFile);
6541
- const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
6542
- if (!(await pathExists(source))) {
6543
- throw new Error(`Missing workflow source file: ${source}`);
6544
- }
6545
- const result = await copyArtifact({
6546
- source,
6547
- destination,
6548
- overwrite,
6549
- dryRun,
6550
- });
6551
- if (result.action === "skipped" || result.action === "would-skip")
6552
- skipped.push(destination);
6553
- else
6554
- installed.push(destination);
6555
- }
6556
- return { installed, skipped };
6557
- }
6558
6533
  async function seedRuleFileFromTemplateIfMissing({ bundleId, manifest, platform, scope, overwrite = false, dryRun = false, cwd = process.cwd(), }) {
6559
6534
  const platformSpec = manifest.platforms?.[platform];
6560
6535
  if (!platformSpec || !platformSpec.rulesTemplate)
@@ -6588,6 +6563,8 @@ function commandToFilename(command) {
6588
6563
  return `${normalized}.md`;
6589
6564
  }
6590
6565
  async function findWorkflowFileByTarget(workflowsDir, target) {
6566
+ if (!workflowsDir)
6567
+ return null;
6591
6568
  const direct = target.endsWith(".md") ? target : `${target}.md`;
6592
6569
  const directPath = path.join(workflowsDir, direct);
6593
6570
  if (await pathExists(directPath))
@@ -6621,12 +6598,19 @@ async function removeBundleArtifacts({ bundleId, manifest, platform, scope, prof
6621
6598
  if (!platformSpec)
6622
6599
  throw new Error(`Bundle '${bundleId}' does not define platform '${platform}'.`);
6623
6600
  const removed = [];
6601
+ const generatedSkillDirs = Array.isArray(platformSpec.generatedSkills)
6602
+ ? platformSpec.generatedSkills
6603
+ : [];
6624
6604
  for (const workflowFile of platformSpec.workflows || []) {
6605
+ if (!profilePaths.workflowsDir)
6606
+ continue;
6625
6607
  const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
6626
6608
  if (await safeRemove(destination, dryRun))
6627
6609
  removed.push(destination);
6628
6610
  }
6629
6611
  for (const agentFile of platformSpec.agents || []) {
6612
+ if (!profilePaths.agentsDir)
6613
+ continue;
6630
6614
  const destination = path.join(profilePaths.agentsDir, path.basename(agentFile));
6631
6615
  if (await safeRemove(destination, dryRun))
6632
6616
  removed.push(destination);
@@ -6664,48 +6648,50 @@ async function removeBundleArtifacts({ bundleId, manifest, platform, scope, prof
6664
6648
  extraSkillIds: [],
6665
6649
  });
6666
6650
  for (const skillId of skillIds) {
6651
+ if (!profilePaths.skillsDir)
6652
+ continue;
6667
6653
  const destination = path.join(profilePaths.skillsDir, skillId);
6668
6654
  if (await safeRemove(destination, dryRun))
6669
6655
  removed.push(destination);
6670
6656
  }
6671
- if (platform === "codex") {
6672
- const wrapperSkillIds = buildCodexWrapperSkillIds(platformSpec);
6673
- for (const skillId of wrapperSkillIds) {
6674
- const destination = path.join(profilePaths.skillsDir, skillId);
6675
- if (await safeRemove(destination, dryRun))
6676
- removed.push(destination);
6677
- }
6657
+ for (const generatedSkillDir of generatedSkillDirs) {
6658
+ if (!profilePaths.skillsDir)
6659
+ continue;
6660
+ const destination = path.join(profilePaths.skillsDir, path.basename(generatedSkillDir));
6661
+ if (await safeRemove(destination, dryRun))
6662
+ removed.push(destination);
6678
6663
  }
6679
6664
  return { removed, profilePaths };
6680
6665
  }
6681
6666
  function printPlatforms() {
6667
+ const formatPathList = (paths, disabledLabel = "(not used)") => Array.isArray(paths) && paths.length > 0 ? paths.join(" | ") : disabledLabel;
6682
6668
  console.log("Workflow platforms:");
6683
6669
  for (const profileId of PLATFORM_IDS) {
6684
6670
  const profile = WORKFLOW_PROFILES[profileId];
6685
6671
  const agentsEnabled = platformInstallsCustomAgents(profileId);
6686
6672
  console.log(`- ${profile.id} (${profile.label})`);
6687
- console.log(` project workflows: ${profile.project.workflowDirs[0]}`);
6688
- console.log(` project agents: ${agentsEnabled ? profile.project.agentDirs[0] : "(disabled for this platform)"}`);
6689
- console.log(` project skills: ${profile.project.skillDirs[0]}`);
6673
+ console.log(` project workflows: ${formatPathList(profile.project.workflowDirs)}`);
6674
+ console.log(` project agents: ${agentsEnabled ? formatPathList(profile.project.agentDirs, "(not used)") : "(disabled for this platform)"}`);
6675
+ console.log(` project skills: ${formatPathList(profile.project.skillDirs)}`);
6690
6676
  if (Array.isArray(profile.project.commandDirs) &&
6691
6677
  profile.project.commandDirs.length > 0) {
6692
- console.log(` project commands: ${profile.project.commandDirs[0]}`);
6678
+ console.log(` project commands: ${formatPathList(profile.project.commandDirs)}`);
6693
6679
  }
6694
6680
  if (Array.isArray(profile.project.promptDirs) &&
6695
6681
  profile.project.promptDirs.length > 0) {
6696
- console.log(` project prompts: ${profile.project.promptDirs[0]}`);
6682
+ console.log(` project prompts: ${formatPathList(profile.project.promptDirs)}`);
6697
6683
  }
6698
6684
  console.log(` project rules: ${profile.project.ruleFilesByPriority.join(" | ")}`);
6699
- console.log(` global workflows: ${profile.global.workflowDirs[0]}`);
6700
- console.log(` global agents: ${agentsEnabled ? profile.global.agentDirs[0] : "(disabled for this platform)"}`);
6701
- console.log(` global skills: ${profile.global.skillDirs[0]}`);
6685
+ console.log(` global workflows: ${formatPathList(profile.global.workflowDirs)}`);
6686
+ console.log(` global agents: ${agentsEnabled ? formatPathList(profile.global.agentDirs, "(not used)") : "(disabled for this platform)"}`);
6687
+ console.log(` global skills: ${formatPathList(profile.global.skillDirs)}`);
6702
6688
  if (Array.isArray(profile.global.commandDirs) &&
6703
6689
  profile.global.commandDirs.length > 0) {
6704
- console.log(` global commands: ${profile.global.commandDirs[0]}`);
6690
+ console.log(` global commands: ${formatPathList(profile.global.commandDirs)}`);
6705
6691
  }
6706
6692
  if (Array.isArray(profile.global.promptDirs) &&
6707
6693
  profile.global.promptDirs.length > 0) {
6708
- console.log(` global prompts: ${profile.global.promptDirs[0]}`);
6694
+ console.log(` global prompts: ${formatPathList(profile.global.promptDirs)}`);
6709
6695
  }
6710
6696
  console.log(` global rules: ${profile.global.ruleFilesByPriority.join(" | ")}`);
6711
6697
  console.log(" default install: workflows/agents/commands/prompts/skills/MCP -> project");
@@ -6732,7 +6718,7 @@ function printRuleSyncResult(result) {
6732
6718
  }
6733
6719
  }
6734
6720
  }
6735
- function printInstallSummary({ platform, scope, bundleId, installed, skipped, generatedWrapperSkills = [], duplicateSkillCleanup = [], sanitizedSkills = [], sanitizedAgents = [], terminalIntegration = null, terminalIntegrationRules = null, warnings = [], dryRun = false, }) {
6721
+ function printInstallSummary({ platform, scope, bundleId, installed, skipped, duplicateSkillCleanup = [], sanitizedSkills = [], sanitizedAgents = [], terminalIntegration = null, terminalIntegrationRules = null, warnings = [], dryRun = false, }) {
6736
6722
  console.log(`\nPlatform: ${platform}`);
6737
6723
  console.log(`Scope: ${scope}`);
6738
6724
  console.log(`Bundle: ${bundleId}`);
@@ -6753,12 +6739,6 @@ function printInstallSummary({ platform, scope, bundleId, installed, skipped, ge
6753
6739
  if (installed.length === 0 && skipped.length === 0) {
6754
6740
  console.log("\nNo changes made.");
6755
6741
  }
6756
- if (generatedWrapperSkills.length > 0) {
6757
- const workflowCount = generatedWrapperSkills.filter((item) => item.kind === "workflow").length;
6758
- const agentCount = generatedWrapperSkills.filter((item) => item.kind === "agent").length;
6759
- console.log(`\nCodex callable wrapper skills: ${generatedWrapperSkills.length} (workflow=${workflowCount}, agent=${agentCount})`);
6760
- console.log("These remain compatibility aliases. Prefer direct /workflow and @agent routing in Codex when available.");
6761
- }
6762
6742
  if (terminalIntegration) {
6763
6743
  console.log("\nAntigravity terminal verification integration:");
6764
6744
  console.log(`- Provider: ${terminalIntegration.provider}`);
@@ -6842,7 +6822,8 @@ function printPostmanSetupSummary({ postmanSetup }) {
6842
6822
  for (const ignoreResult of postmanSetup.gitIgnoreResults || []) {
6843
6823
  console.log(`- .gitignore (${ignoreResult.filePath}): ${ignoreResult.action}`);
6844
6824
  }
6845
- for (const cleanupResult of postmanSetup.legacyDefinitionCleanupResults || []) {
6825
+ for (const cleanupResult of postmanSetup.legacyDefinitionCleanupResults ||
6826
+ []) {
6846
6827
  console.log(`- Legacy direct MCP cleanup (${cleanupResult.path}): ${cleanupResult.action}`);
6847
6828
  }
6848
6829
  if (postmanSetup.mcpRuntimeResult) {
@@ -7021,10 +7002,15 @@ async function createDoctorReport({ platform, scope, cwd = process.cwd() }) {
7021
7002
  if (await pathExists(gitignorePath)) {
7022
7003
  const gitignore = await readFile(gitignorePath, "utf8");
7023
7004
  const lines = gitignore.split(/\r?\n/).map((line) => line.trim());
7024
- const hasAgentIgnore = lines.some((line) => line === ".agent" || line === ".agent/" || line === "/.agent/");
7005
+ const hasAgentIgnore = lines.some((line) => line === ".agent" ||
7006
+ line === ".agent/" ||
7007
+ line === "/.agent/" ||
7008
+ line === ".agents" ||
7009
+ line === ".agents/" ||
7010
+ line === "/.agents/");
7025
7011
  if (hasAgentIgnore) {
7026
- warnings.push(".agent/ is ignored in .gitignore; this can hide team workflow/rule updates.");
7027
- recommendations.push("Prefer tracking .agent/ in git. For local-only excludes, use '.git/info/exclude' instead of .gitignore.");
7012
+ warnings.push(".agents/ or legacy .agent/ is ignored in .gitignore; this can hide team workflow/rule updates.");
7013
+ recommendations.push("Prefer tracking .agents/ in git. For local-only excludes, use '.git/info/exclude' instead of .gitignore.");
7028
7014
  }
7029
7015
  }
7030
7016
  }
@@ -7315,10 +7301,10 @@ async function upsertTerminalVerificationForInstall({ scope, cwd, terminalIntegr
7315
7301
  };
7316
7302
  }
7317
7303
  async function cleanupAntigravityTerminalIntegration({ scope, cwd, dryRun = false, }) {
7318
- const profilePaths = await resolveArtifactProfilePaths("antigravity", scope, cwd);
7304
+ const profilePaths = await resolveArtifactProfilePaths("antigravity", "project", cwd);
7319
7305
  const integrationDir = getAntigravityTerminalIntegrationDir(profilePaths);
7320
7306
  const dirRemoved = await safeRemove(integrationDir, dryRun);
7321
- const primaryRuleFile = await resolveRuleFilePath("antigravity", scope, cwd);
7307
+ const primaryRuleFile = await resolveRuleFilePath("antigravity", "project", cwd);
7322
7308
  const primaryRule = primaryRuleFile
7323
7309
  ? await removeTerminalVerificationBlock(primaryRuleFile, dryRun)
7324
7310
  : { action: "missing-rule-file", filePath: null };
@@ -7403,21 +7389,6 @@ async function performWorkflowInstall(options, { postmanSelectionOverride = null
7403
7389
  dryRun,
7404
7390
  cwd,
7405
7391
  });
7406
- if (platform === "codex" && scope === "global") {
7407
- const codexProjectPaths = await resolveProfilePaths("codex", "project", cwd);
7408
- if (path.resolve(artifactProfilePaths.workflowsDir) !==
7409
- path.resolve(codexProjectPaths.workflowsDir)) {
7410
- const codexProjectWorkflows = await installCodexProjectWorkflowTemplates({
7411
- bundleId,
7412
- manifest,
7413
- overwrite: Boolean(options.overwrite),
7414
- dryRun,
7415
- cwd,
7416
- });
7417
- installResult.installed.push(...codexProjectWorkflows.installed);
7418
- installResult.skipped.push(...codexProjectWorkflows.skipped);
7419
- }
7420
- }
7421
7392
  await seedRuleFileFromTemplateIfMissing({
7422
7393
  bundleId,
7423
7394
  manifest,
@@ -7492,7 +7463,6 @@ async function runWorkflowInstall(options) {
7492
7463
  bundleId: result.bundleId,
7493
7464
  installed: result.installResult.installed,
7494
7465
  skipped: result.installResult.skipped,
7495
- generatedWrapperSkills: result.installResult.generatedWrapperSkills,
7496
7466
  duplicateSkillCleanup: result.installResult.duplicateSkillCleanup,
7497
7467
  sanitizedSkills: result.installResult.sanitizedSkills,
7498
7468
  sanitizedAgents: result.installResult.sanitizedAgents,
@@ -7709,6 +7679,9 @@ async function runWorkflowRemove(target, options) {
7709
7679
  }
7710
7680
  }
7711
7681
  else {
7682
+ if (!artifactProfilePaths.workflowsDir) {
7683
+ throw new Error(`Platform '${platform}' does not install standalone workflow files. Remove the bundle instead, or remove the native command/prompt/skill artifact directly.`);
7684
+ }
7712
7685
  const workflowFile = await findWorkflowFileByTarget(artifactProfilePaths.workflowsDir, target);
7713
7686
  if (!workflowFile) {
7714
7687
  throw new Error(`Could not find workflow or bundle '${target}' in platform '${platform}'.`);
@@ -7727,21 +7700,22 @@ async function runWorkflowRemove(target, options) {
7727
7700
  removed.push(workflowFile);
7728
7701
  }
7729
7702
  }
7730
- const syncResult = await syncRulesForPlatform({
7731
- platform,
7732
- scope: ruleScope,
7733
- dryRun,
7734
- cwd,
7735
- });
7736
7703
  if (!dryRun && removedType === "bundle") {
7704
+ const ruleFilePath = await resolveRuleFilePath(platform, ruleScope, cwd);
7737
7705
  await recordBundleRemovalState({
7738
- scope,
7706
+ scope: ruleScope,
7739
7707
  platform,
7740
7708
  bundleId: target,
7741
- ruleFilePath: syncResult.filePath,
7709
+ ruleFilePath,
7742
7710
  cwd,
7743
7711
  });
7744
7712
  }
7713
+ const syncResult = await syncRulesForPlatform({
7714
+ platform,
7715
+ scope: ruleScope,
7716
+ dryRun,
7717
+ cwd,
7718
+ });
7745
7719
  printRemoveSummary({
7746
7720
  platform,
7747
7721
  scope,
@@ -8084,13 +8058,13 @@ async function runWorkflowRemoveAll(options) {
8084
8058
  const agentFiles = (platformSpec.agents || []).map((entry) => path.basename(entry));
8085
8059
  const commandFiles = (platformSpec.commands || []).map((entry) => path.basename(entry));
8086
8060
  const promptFiles = (platformSpec.prompts || []).map((entry) => path.basename(entry));
8061
+ const generatedSkillIds = (platformSpec.generatedSkills || []).map((entry) => path.basename(entry));
8087
8062
  const skillIds = await resolveInstallSkillIds({
8088
8063
  platformSpec,
8089
8064
  extraSkillIds: [],
8090
8065
  });
8091
- const wrapperSkillIds = platform === "codex" ? buildCodexWrapperSkillIds(platformSpec) : [];
8092
8066
  const bundleSkillIds = [
8093
- ...new Set([...skillIds, ...wrapperSkillIds]),
8067
+ ...new Set([...skillIds, ...generatedSkillIds]),
8094
8068
  ];
8095
8069
  for (const workflowsDir of alternateWorkflowsDirs) {
8096
8070
  for (const workflowFile of workflowFiles) {
@@ -8835,7 +8809,7 @@ async function runWorkflowConfigKeysList(options) {
8835
8809
  scope,
8836
8810
  cwd,
8837
8811
  });
8838
- console.log(`Config file: ${configPath}`);
8812
+ console.log(`Config file: ${toPosixPath(configPath)}`);
8839
8813
  if (!existing.exists) {
8840
8814
  console.log("Status: missing");
8841
8815
  return;
@@ -9094,13 +9068,14 @@ async function runWorkflowConfigKeysMigrateInline(options) {
9094
9068
  }
9095
9069
  console.log(`Legacy direct MCP cleanup actions: ${cleanupResults.length}`);
9096
9070
  for (const cleanup of cleanupResults) {
9097
- console.log(`- ${cleanup.action} ${cleanup.path}`);
9071
+ console.log(`- ${cleanup.action} ${toPosixPath(cleanup.path)}`);
9098
9072
  }
9099
9073
  if (secureArtifacts?.mcpRuntimeResult) {
9100
- console.log(`Secure platform MCP target: ${secureArtifacts.mcpRuntimeResult.action} (${secureArtifacts.mcpRuntimeResult.path || "n/a"})`);
9074
+ console.log(`Secure platform MCP target: ${secureArtifacts.mcpRuntimeResult.action} (${secureArtifacts.mcpRuntimeResult.path ? toPosixPath(secureArtifacts.mcpRuntimeResult.path) : "n/a"})`);
9101
9075
  }
9102
- for (const cleanup of secureArtifacts?.legacyDefinitionCleanupResults || []) {
9103
- console.log(`- ${cleanup.action} ${cleanup.path}`);
9076
+ for (const cleanup of secureArtifacts?.legacyDefinitionCleanupResults ||
9077
+ []) {
9078
+ console.log(`- ${cleanup.action} ${toPosixPath(cleanup.path)}`);
9104
9079
  }
9105
9080
  for (const warning of secureArtifacts?.warnings || []) {
9106
9081
  console.log(`Warning: ${warning}`);
@@ -9126,13 +9101,16 @@ async function runWorkflowConfigKeysDoctor(options) {
9126
9101
  scope,
9127
9102
  cwd,
9128
9103
  });
9129
- console.log(`Config file: ${configPath}`);
9104
+ console.log(`Config file: ${toPosixPath(configPath)}`);
9130
9105
  if (!existing.exists) {
9131
9106
  console.log("Status: missing");
9132
9107
  return;
9133
9108
  }
9134
9109
  const configFindings = collectInlineCredentialFindings(existingValue);
9135
- const artifactFindings = await collectCredentialLeakFindings({ scope, cwd });
9110
+ const artifactFindings = await collectCredentialLeakFindings({
9111
+ scope,
9112
+ cwd,
9113
+ });
9136
9114
  const migrationPreview = migrateInlineCredentialsInConfig(existingValue);
9137
9115
  console.log(`Inline key findings: ${configFindings.length}`);
9138
9116
  for (const finding of configFindings) {
@@ -9140,7 +9118,7 @@ async function runWorkflowConfigKeysDoctor(options) {
9140
9118
  }
9141
9119
  console.log(`Credential leak findings: ${artifactFindings.length}`);
9142
9120
  for (const finding of artifactFindings) {
9143
- console.log(`- ${finding.filePath} [${finding.matches.join(", ")}]`);
9121
+ console.log(`- ${toPosixPath(finding.filePath)} [${finding.matches.join(", ")}]`);
9144
9122
  }
9145
9123
  if (migrationPreview.requiredEnvVars.length > 0) {
9146
9124
  console.log("Expected env vars:");
@@ -9928,7 +9906,7 @@ async function runMcpServe(options) {
9928
9906
  }
9929
9907
  function resolveCbxRootPath({ scope, cwd = process.cwd() }) {
9930
9908
  if (scope === "global") {
9931
- return path.join(os.homedir(), ".cbx");
9909
+ return path.join(resolveManagedHomeDir(), ".cbx");
9932
9910
  }
9933
9911
  const workspaceRoot = findWorkspaceRoot(cwd);
9934
9912
  return path.join(workspaceRoot, ".cbx");
@@ -10364,7 +10342,7 @@ function printInstallEngineeringSummary({ engineeringResults, techResult }) {
10364
10342
  function printInstallDocumentationNotice() {
10365
10343
  console.log("\nProject backbone docs:");
10366
10344
  console.log("- Install only wires the rule references and workflow assets.");
10367
- console.log(`- Use \`cbx rules init\` to scaffold ENGINEERING_RULES.md and TECH.md, or \`cbx build architecture --platform <codex|claude|gemini|copilot>\` to generate ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, and ADR scaffolds.`);
10345
+ console.log(`- Use \`cbx rules init\` to scaffold ENGINEERING_RULES.md and TECH.md, or \`cbx build architecture --platform <antigravity|codex|claude|gemini|copilot>\` to generate ${FOUNDATION_DOCS_DIR}/MEMORY.md, ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, topic memory docs, and ADR scaffolds.`);
10368
10346
  }
10369
10347
  async function upsertEngineeringArtifacts({ platform, scope, overwrite = false, skipTech = false, dryRun = false, cwd = process.cwd(), }) {
10370
10348
  const ruleFilePath = await resolveRuleFilePath(platform, scope, cwd);
@@ -10393,6 +10371,7 @@ async function upsertEngineeringArtifacts({ platform, scope, overwrite = false,
10393
10371
  const blockResult = await upsertEngineeringRulesBlock({
10394
10372
  ruleFilePath: target.ruleFilePath,
10395
10373
  platform,
10374
+ memoryFilePath: path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md"),
10396
10375
  productFilePath: scaffold.productPath,
10397
10376
  architectureFilePath: scaffold.architectureDocPath,
10398
10377
  engineeringRulesFilePath: scaffold.engineeringRulesPath,
@@ -10491,7 +10470,7 @@ async function runRulesTechMd(options) {
10491
10470
  function normalizeArchitectureBuildPlatform(value) {
10492
10471
  const normalized = normalizePlatform(value);
10493
10472
  if (!normalized || !ARCHITECTURE_BUILD_PLATFORMS.has(normalized)) {
10494
- throw new Error("Architecture build platform must be one of: codex, claude, gemini, copilot.");
10473
+ throw new Error("Architecture build platform must be one of: antigravity, codex, claude, gemini, copilot.");
10495
10474
  }
10496
10475
  return normalized;
10497
10476
  }
@@ -10615,9 +10594,14 @@ async function resolveArchitectureSkillPathHints(platform, cwd, skillIds) {
10615
10594
  .map((filePath) => toPosixPath(path.relative(findWorkspaceRoot(cwd), filePath)));
10616
10595
  }
10617
10596
  function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots, inspectionAnchors, researchMode, coreSkills, conditionalSkills, skillPathHints, }) {
10597
+ const memoryPath = `${FOUNDATION_DOCS_DIR}/MEMORY.md`;
10618
10598
  const productPath = `${FOUNDATION_DOCS_DIR}/PRODUCT.md`;
10619
10599
  const architecturePath = `${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md`;
10620
10600
  const techPath = `${FOUNDATION_DOCS_DIR}/TECH.md`;
10601
+ const domainMemoryPath = `${FOUNDATION_MEMORY_DIR}/domain.md`;
10602
+ const runtimeMemoryPath = `${FOUNDATION_MEMORY_DIR}/runtime.md`;
10603
+ const integrationsMemoryPath = `${FOUNDATION_MEMORY_DIR}/integrations.md`;
10604
+ const debuggingMemoryPath = `${FOUNDATION_MEMORY_DIR}/debugging.md`;
10621
10605
  const adrReadmePath = `${FOUNDATION_ADR_DIR}/README.md`;
10622
10606
  const adrTemplatePath = `${FOUNDATION_ADR_DIR}/0000-template.md`;
10623
10607
  const architectureSignals = snapshot.architectureByApp
@@ -10626,13 +10610,22 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10626
10610
  const label = item.rootPath === "." ? "repo root" : item.rootPath;
10627
10611
  return `${label}: ${item.architectureSignals.join(", ")}`;
10628
10612
  });
10613
+ const platformCapabilities = {
10614
+ antigravity: "You are generating repo-shared foundation docs for Antigravity. Use the Gemini-family CLI surface available in this environment and optimize the docs for `.agents/rules/GEMINI.md` plus command-driven workflows.",
10615
+ codex: "You can read, write, and execute shell commands. Use `codex exec` mode.",
10616
+ claude: "You can read, write files, and run bash commands. Use non-interactive mode.",
10617
+ gemini: "You can read, write files, and run commands within your sandbox. Follow Gemini CLI conventions.",
10618
+ copilot: "You can read, write files, and use terminal commands. Follow Copilot agent conventions.",
10619
+ };
10629
10620
  return [
10630
10621
  `You are running inside ${platform}.`,
10622
+ platformCapabilities[platform] || "",
10631
10623
  "",
10632
10624
  "Objective:",
10633
- `- Inspect the repository at ${toPosixPath(workspaceRoot)} and author or refresh the core foundation docs in ${productPath}, ${architecturePath}, ${techPath}, ${adrReadmePath}, and ${adrTemplatePath}.`,
10625
+ `- Inspect the repository at ${toPosixPath(workspaceRoot)} and author or refresh the core foundation docs in ${memoryPath}, ${productPath}, ${architecturePath}, ${techPath}, ${domainMemoryPath}, ${runtimeMemoryPath}, ${integrationsMemoryPath}, ${debuggingMemoryPath}, ${adrReadmePath}, and ${adrTemplatePath}.`,
10634
10626
  "- The content should be primarily AI-authored from repository inspection, not copied from placeholder scaffolding.",
10635
10627
  "- Preserve manual content outside the managed `cbx:*` markers.",
10628
+ "- The output docs must be immediately useful to any AI agent (Copilot, Claude, Gemini, Codex) inspecting this repo for the first time, reducing search and exploration time.",
10636
10629
  "",
10637
10630
  "Required skill bundle:",
10638
10631
  `- Load these exact skill IDs first: ${coreSkills.map((skillId) => `\`${skillId}\``).join(", ")}`,
@@ -10652,44 +10645,277 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10652
10645
  ? `- Architecture signals: ${architectureSignals.join(" | ")}`
10653
10646
  : "- Architecture signals: none confidently inferred from the repo scan",
10654
10647
  `- Entry points: ${snapshot.entryPoints.length > 0 ? snapshot.entryPoints.slice(0, 8).join(" | ") : "none detected"}`,
10655
- `- Key scripts: ${snapshot.keyScripts.length > 0 ? snapshot.keyScripts.slice(0, 8).map((item) => `${item.name}=${item.command}`).join(" | ") : "none detected"}`,
10648
+ `- Key scripts: ${snapshot.keyScripts.length > 0
10649
+ ? snapshot.keyScripts
10650
+ .slice(0, 8)
10651
+ .map((item) => `${item.name}=${item.command}`)
10652
+ .join(" | ")
10653
+ : "none detected"}`,
10656
10654
  `- Inspection anchors: ${inspectionAnchors.length > 0 ? inspectionAnchors.join(", ") : "no concrete anchors detected; inspect the repo root, main source trees, and manifest files manually"}`,
10657
10655
  "",
10656
+ "Foundation doc usage contract:",
10657
+ `- ${memoryPath} is the durable AI entrypoint and first-stop index. Keep it concise, keep it under roughly 120 lines when possible, and route readers to deeper docs instead of duplicating every deep detail.`,
10658
+ `- ${productPath} is for planning, scoping, specs, product intent, business rules, and domain vocabulary.`,
10659
+ `- ${architecturePath} is for structure, boundaries, dependency rules, ADR-worthy decisions, refactors, and design-system governance.`,
10660
+ `- ${techPath} is for build, test, run, debug, CI/CD, tooling, runtime operations, and exact commands.`,
10661
+ `- ${domainMemoryPath}, ${runtimeMemoryPath}, ${integrationsMemoryPath}, and ${debuggingMemoryPath} are load-on-demand drill-down docs for their named topics.`,
10662
+ `- ${adrReadmePath} and ${adrTemplatePath} exist for durable architecture decisions; they are not a replacement for the backbone docs.`,
10663
+ "- `.cbx/architecture-build.json` is build metadata for automation and drift checks, not a primary context document for agents.",
10664
+ "- These docs are downstream inputs to `ENGINEERING_RULES.md` and platform rule files such as `AGENTS.md`, `CLAUDE.md`, `.agents/rules/GEMINI.md`, `.gemini/GEMINI.md`, and `.github/copilot-instructions.md`.",
10665
+ "- Each doc should make it easy for future rules, workflows, agents, and skills to decide whether they need to open it.",
10666
+ "",
10667
+ "Markdown formatting rules (apply to all generated docs):",
10668
+ "- Start each file with a single `# Title` heading. Never use more than one H1 per file.",
10669
+ "- Use `## Heading` for major sections, `### Heading` for subsections. Never skip heading levels (e.g., do not jump from `##` to `####`).",
10670
+ "- Separate headings from surrounding content with exactly one blank line above and below.",
10671
+ "- Use fenced code blocks with triple backticks and a language identifier (```bash, ```typescript, ```json, ```yaml, ```mermaid) for all code, commands, and diagrams. Never use indented code blocks.",
10672
+ "- Use `-` for unordered lists. Use `1.` for ordered lists. Indent nested lists by 2 spaces.",
10673
+ "- Use `inline code` backticks for file paths, command names, env vars, config keys, and identifiers.",
10674
+ "- Use Mermaid fenced blocks (```mermaid) for diagrams. Validate that diagram syntax is correct: `graph TD`, `sequenceDiagram`, `flowchart LR`, or `C4Context` style. Every node and edge must be syntactically valid.",
10675
+ "- Tables must have a header row, a separator row with dashes and pipes, and aligned columns. Example:",
10676
+ " ```",
10677
+ " | Column A | Column B |",
10678
+ " | -------- | -------- |",
10679
+ " | value | value |",
10680
+ " ```",
10681
+ "- Use `> blockquote` only for callouts or important notes, prefixed with **Note:** or **Warning:**.",
10682
+ "- Relative links to other repo files should use repo-relative paths: `[ARCHITECTURE.md](docs/foundation/ARCHITECTURE.md)`.",
10683
+ "- End every file with a single trailing newline. No trailing whitespace on lines.",
10684
+ "",
10658
10685
  "Execution contract:",
10659
10686
  "1. Inspect the repository first before writing any backbone doc content. Derive structure, product surfaces, runtime boundaries, and technical constraints from the actual codebase.",
10660
10687
  "2. Complete a real inspection pass before drafting. At minimum, inspect the concrete anchors listed above, plus any adjacent directories needed to understand the main execution paths, data boundaries, and integration surfaces.",
10661
10688
  "3. Do not infer architecture from filenames alone when you can open representative files. Read enough source to validate the main app boundaries, runtime flows, and persistence/integration patterns.",
10662
- `4. Then read ${productPath}, ${architecturePath}, and ${techPath} in that order when they exist so you can preserve useful manual context and update existing managed sections cleanly.`,
10663
- `5. Replace or update only the content between the existing managed markers in ${productPath}, ${architecturePath}, and ${techPath}. Do not append a second marker block.`,
10664
- `6. In ${productPath}, write a concrete product foundation: product purpose, primary users/operators, main journeys, business capabilities, operational constraints, and what future contributors must preserve.`,
10665
- `7. In ${architecturePath}, write a lean but detailed architecture backbone in a pragmatic arc42/C4 style: system purpose and constraints, explicit architecture classification, bounded contexts, major building blocks, dependency rules, data and integration boundaries, runtime flows, deployment/operability notes, testing/debugging strategy, and only the diagram levels that add real value.`,
10666
- `8. ${architecturePath} must include a dedicated folder-structure guide that lists the important apps/packages/directories, what each owns, and how contributors should treat those boundaries when editing code.`,
10667
- `9. In ${techPath}, write the developer-facing technical map: stack, repo layout, key commands, entrypoints, data stores, external services, environment/config surfaces, MCP/tooling footprint, and change hotspots future agents should inspect before editing code.`,
10668
- `10. ${techPath} should complement ${architecturePath}; do not repeat the same structure prose unless it helps a developer act faster.`,
10669
- `11. Use exact required headings in ${productPath}: \`## Product Scope\`, \`## Product Purpose\`, \`## Primary Users And Operators\`, \`## Main Journeys\`, \`## Business Capabilities That Matter\`, \`## Operational Constraints\`, \`## Preservation Rules For Future Contributors\`.`,
10670
- `12. Use exact required headings in ${architecturePath}: \`## Architecture Type\`, \`## System Purpose\`, \`## Constraints And Architectural Drivers\`, \`## Repository Structure Guide\`, \`## Bounded Contexts\`, \`## Major Building Blocks\`, \`## Dependency Rules\`, \`## Data Boundaries\`, \`## Integration Boundaries\`, \`## Runtime Flows\`, \`## Deployment And Operability\`, \`## Testing And Debugging Strategy\`, \`## Architectural Guidance\`.`,
10671
- `13. Use exact required headings in ${techPath}: \`## Stack Snapshot\`, \`## Repository Layout\`, \`## Entrypoints\`, \`## Key Commands\`, \`## Runtime Data Stores\`, \`## External Services And Integration Surfaces\`, \`## Environment And Config Surfaces\`, \`## Generated Artifacts To Respect\`, \`## Change Hotspots\`, \`## Practical Editing Notes\`.`,
10672
- "14. Every major claim should be grounded in repository evidence. Mention concrete repo paths in the docs when a structural claim would otherwise be ambiguous.",
10673
- "15. Avoid placeholder filler, generic checklists, and duplicated content across files. Each doc should have a clear job.",
10674
- "16. Do not create ROADMAP.md, ENGINEERING_RULES.md, or other extra docs unless the prompt explicitly asks for them.",
10689
+ `4. Then read ${memoryPath}, ${productPath}, ${architecturePath}, ${techPath}, ${domainMemoryPath}, ${runtimeMemoryPath}, ${integrationsMemoryPath}, and ${debuggingMemoryPath} in that order when they exist so you can preserve useful manual context and update existing managed sections cleanly.`,
10690
+ `5. Replace or update only the content between the existing managed markers in ${memoryPath}, ${productPath}, ${architecturePath}, ${techPath}, ${domainMemoryPath}, ${runtimeMemoryPath}, ${integrationsMemoryPath}, and ${debuggingMemoryPath}. Do not append a second marker block.`,
10691
+ "",
10692
+ `6. In ${memoryPath}, write the durable AI memory index:`,
10693
+ " - A terse project summary that a fresh agent can absorb in under a minute.",
10694
+ " - A task-based map telling rules, workflows, agents, and skills when to load PRODUCT, ARCHITECTURE, TECH, each topic memory doc, and ADRs.",
10695
+ " - Durable facts and invariants that are expensive to rediscover.",
10696
+ " - Active watchpoints: areas likely to break, drift, or require re-validation after changes.",
10697
+ " - Keep MEMORY.md as an index, not a dump: no long command catalogs, no repeated architecture prose, no copied API contracts, and no verbose troubleshooting playbooks when those belong in deeper docs.",
10698
+ " - If a section needs more than a short paragraph or 5-7 bullets, move the detail into PRODUCT, ARCHITECTURE, TECH, a topic memory doc, or an ADR and link to it from MEMORY.md.",
10699
+ "",
10700
+ `7. In ${productPath}, write a concrete product foundation:`,
10701
+ " - Product purpose with a one-sentence elevator pitch an AI agent can use as context.",
10702
+ " - A short consumer note explaining that PRODUCT is the doc for planning, scoping, specs, UX, and domain-language questions.",
10703
+ " - Primary users/operators with their key goals.",
10704
+ " - Main journeys as numbered sequences an agent can follow to understand the happy path.",
10705
+ " - Business capabilities that matter, linked to repo paths that implement them.",
10706
+ " - Operational constraints and SLA/uptime expectations if evident.",
10707
+ " - What future contributors must preserve (invariants, contracts, compatibility guarantees).",
10708
+ " - A domain glossary defining project-specific terms, abbreviations, and bounded-context language so AI agents use consistent vocabulary.",
10709
+ "",
10710
+ `8. In ${architecturePath}, write a lean but detailed architecture backbone in a pragmatic arc42/C4 style:`,
10711
+ " - Architecture classification (monolith, modular monolith, microservices, serverless, hybrid) with evidence.",
10712
+ " - A short consumer note explaining that ARCHITECTURE is the doc for refactors, boundary decisions, ADR work, and design-system governance.",
10713
+ " - System purpose, constraints, and architectural drivers.",
10714
+ " - Bounded contexts with ownership boundaries mapped to directories.",
10715
+ " - Major building blocks as a table or Mermaid C4 diagram with responsibilities.",
10716
+ " - Dependency rules: what can import what, forbidden coupling, and layering policy.",
10717
+ " - Data and integration boundaries with protocol/format details.",
10718
+ " - Runtime flows as Mermaid sequence diagrams for the top 2-3 critical paths.",
10719
+ " - Crosscutting concerns: logging, auth, error handling, i18n patterns with repo-path evidence.",
10720
+ " - Quality requirements derived from the codebase (performance budgets, test coverage, accessibility).",
10721
+ " - Known risks and tech debt visible in the codebase (TODOs, deprecated deps, missing tests).",
10722
+ " - Deployment/operability notes.",
10723
+ " - Testing/debugging strategy with concrete test commands and coverage tooling.",
10724
+ " - A dedicated folder-structure guide listing every important directory, what it owns, and contributor rules.",
10725
+ "",
10726
+ `9. In ${techPath}, write the developer-facing technical map that an AI agent can use to start working immediately:`,
10727
+ " - Stack snapshot as a table (runtime, language, framework, version if discoverable).",
10728
+ " - A short consumer note explaining that TECH is the doc for build, run, test, debug, CI/CD, and tooling execution.",
10729
+ " - Repository layout: directory tree with one-line purpose per directory.",
10730
+ " - Entrypoints: the exact files that bootstrap each app/service/CLI.",
10731
+ " - Key commands: the exact shell commands for bootstrap, build, test, lint, format, run, and deploy. Validate that these commands actually exist in the project manifests. Document required order and preconditions.",
10732
+ " - Build and validation: the validated sequence of commands to go from clean clone to passing CI locally, including environment prerequisites (Node version, Python version, Docker, etc.).",
10733
+ " - CI/CD pipeline: describe the CI/CD workflow files, their triggers, and what checks must pass before merge.",
10734
+ " - Runtime data stores and migration commands.",
10735
+ " - External services and integration surfaces with protocol details.",
10736
+ " - Environment and config surfaces: list every env var the app reads, its purpose, default value if any, and whether it is required or optional.",
10737
+ " - MCP/tooling footprint if present.",
10738
+ " - Generated artifacts: files that are auto-generated and must not be hand-edited.",
10739
+ " - Error patterns and debugging: common error messages, their causes, and resolution steps discovered during inspection.",
10740
+ " - Change hotspots: files/directories that change most often or have the most coupling, so agents know where to look first.",
10741
+ " - Practical editing notes: conventions for naming, imports, test file placement, and PR hygiene.",
10742
+ "",
10743
+ `10. In ${domainMemoryPath}, write the domain memory topic doc:`,
10744
+ " - Core entities, bounded contexts, business terminology, and invariants.",
10745
+ " - A short consumer note explaining that this topic doc is for domain modeling and product-language alignment.",
10746
+ " - Which files or modules embody each important concept.",
10747
+ " - Ambiguous terminology or overloaded names that agents should avoid misusing.",
10748
+ "",
10749
+ `11. In ${runtimeMemoryPath}, write the runtime memory topic doc:`,
10750
+ " - Runtime topology, entrypoints, queues/jobs, background workers, schedules, and deployment-time assumptions.",
10751
+ " - A short consumer note explaining that this topic doc is for request flow, process lifecycle, workers, and deployment reasoning.",
10752
+ " - The shortest path to understand request flow and process lifecycle.",
10753
+ "",
10754
+ `12. In ${integrationsMemoryPath}, write the integrations memory topic doc:`,
10755
+ " - External services, APIs, auth boundaries, data contracts, webhook/event flows, and migration-sensitive integration notes.",
10756
+ " - A short consumer note explaining that this topic doc is for external-service, API, auth-boundary, and contract-sensitive work.",
10757
+ "",
10758
+ `13. In ${debuggingMemoryPath}, write the debugging memory topic doc:`,
10759
+ " - Common failures, hot logs, exact investigation commands, smoke checks, and repo-specific diagnostic shortcuts.",
10760
+ " - A short consumer note explaining that this topic doc is for triage, incident response, and debugging workflows.",
10761
+ "",
10762
+ "Consumer guidance contract:",
10763
+ "- Near the top of each foundation doc, include a short 'when to consult this doc' cue so future rules, workflows, agents, and skills can decide quickly whether they need that document.",
10764
+ "- In MEMORY.md, name the likely downstream consumers of each deeper doc using concrete route families such as planning/spec, architecture/refactor, build/test/debug, runtime/integration, and ADR work.",
10765
+ "- Keep MEMORY.md lean enough to be imported frequently. Prefer short bullets, compact tables only when necessary, and links outward instead of repeated explanations.",
10766
+ "",
10767
+ `14. ${techPath} should complement ${architecturePath}; do not repeat the same structure prose unless it helps a developer act faster.`,
10768
+ "",
10769
+ `15. Use exact required headings in ${memoryPath}: \`## Project Summary\`, \`## Load These Docs By Task\`, \`## Durable Facts\`, \`## Active Watchpoints\`.`,
10770
+ `16. Use exact required headings in ${productPath}: \`## Product Scope\`, \`## Product Purpose\`, \`## Primary Users And Operators\`, \`## Main Journeys\`, \`## Business Capabilities That Matter\`, \`## Operational Constraints\`, \`## Preservation Rules For Future Contributors\`, \`## Domain Glossary\`.`,
10771
+ `17. Use exact required headings in ${architecturePath}: \`## Architecture Type\`, \`## System Purpose\`, \`## Constraints And Architectural Drivers\`, \`## Repository Structure Guide\`, \`## Bounded Contexts\`, \`## Major Building Blocks\`, \`## Dependency Rules\`, \`## Data Boundaries\`, \`## Integration Boundaries\`, \`## Runtime Flows\`, \`## Crosscutting Concerns\`, \`## Quality Requirements\`, \`## Risks And Tech Debt\`, \`## Deployment And Operability\`, \`## Testing And Debugging Strategy\`, \`## Architectural Guidance\`.`,
10772
+ `18. Use exact required headings in ${techPath}: \`## Stack Snapshot\`, \`## Repository Layout\`, \`## Entrypoints\`, \`## Key Commands\`, \`## Build And Validation\`, \`## CI CD Pipeline\`, \`## Runtime Data Stores\`, \`## External Services And Integration Surfaces\`, \`## Environment And Config Surfaces\`, \`## Generated Artifacts To Respect\`, \`## Error Patterns And Debugging\`, \`## Change Hotspots\`, \`## Practical Editing Notes\`.`,
10773
+ `19. Use exact required headings in ${domainMemoryPath}: \`## Core Concepts\`, \`## Bounded Context Vocabulary\`, \`## Invariants To Preserve\`, \`## File Ownership Map\`.`,
10774
+ `20. Use exact required headings in ${runtimeMemoryPath}: \`## Runtime Topology\`, \`## Entrypoint Paths\`, \`## Background Work\`, \`## Deployment Assumptions\`.`,
10775
+ `21. Use exact required headings in ${integrationsMemoryPath}: \`## External Services\`, \`## Contracts And Schemas\`, \`## Auth And Trust Boundaries\`, \`## Change Risks\`.`,
10776
+ `22. Use exact required headings in ${debuggingMemoryPath}: \`## Fast Triage Paths\`, \`## Logs And Signals\`, \`## Known Failure Modes\`, \`## Verification Shortcuts\`.`,
10777
+ "",
10778
+ "23. Every major claim should be grounded in repository evidence. Mention concrete repo paths in the docs when a structural claim would otherwise be ambiguous.",
10779
+ "24. Avoid placeholder filler, generic checklists, and duplicated content across files. Each doc should have a clear job.",
10780
+ "25. Do not create ROADMAP.md, ENGINEERING_RULES.md, or other extra docs unless the prompt explicitly asks for them.",
10675
10781
  researchMode === "never"
10676
- ? "17. Stay repo-only. Do not use outside research."
10677
- : "17. Use repo evidence first. Use official docs when needed. Treat Reddit or community sources only as labeled secondary evidence.",
10782
+ ? "26. Stay repo-only. Do not use outside research."
10783
+ : "26. Use repo evidence first. Use official docs when needed. Treat Reddit or community sources only as labeled secondary evidence.",
10678
10784
  researchMode === "always"
10679
- ? `18. Include an external research evidence subsection in ${techPath} with clearly labeled primary and secondary evidence.`
10680
- : "18. Include external research notes only if they materially informed the architecture update.",
10681
- `19. If the project clearly follows Clean Architecture, feature-first modules, DDD, modular monolith, or another stable structure, make that explicit in ${architecturePath} with evidence from the repo.`,
10682
- `20. Ensure ${adrReadmePath} and ${adrTemplatePath} exist as ADR entrypoints, but keep them lean.`,
10785
+ ? `27. Include an external research evidence subsection in ${techPath} with clearly labeled primary and secondary evidence.`
10786
+ : "27. Include external research notes only if they materially informed the architecture update.",
10787
+ `28. If the project clearly follows Clean Architecture, feature-first modules, DDD, modular monolith, or another stable structure, make that explicit in ${architecturePath} with evidence from the repo.`,
10788
+ `29. Ensure ${adrReadmePath} and ${adrTemplatePath} exist as ADR entrypoints, but keep them lean.`,
10789
+ "30. In all docs, when referencing other foundation docs, use relative markdown links: `[ARCHITECTURE.md](docs/foundation/ARCHITECTURE.md)`. This lets AI agents and humans navigate between docs.",
10790
+ "31. Validate all Mermaid diagram syntax before writing. Each diagram must render without errors. Use simple node IDs (alphanumeric, no special characters) and quote labels containing spaces.",
10791
+ "32. For each key command documented, note the expected exit code (0 for success) and any common failure modes. This helps AI agents validate their own changes.",
10792
+ "",
10793
+ "Platform context-loading awareness (these docs will be @imported into agent rule files):",
10794
+ "- Claude loads CLAUDE.md at session start via @file imports; each imported doc should be concise and self-contained.",
10795
+ "- Gemini loads GEMINI.md hierarchically with JIT context; structure docs with clear H2 headings so sections are independently useful.",
10796
+ "- Antigravity benefits from the same hierarchical structure because `.agents/rules/GEMINI.md` should point to a small durable memory index, not dump every deep reference by default.",
10797
+ "- Codex concatenates AGENTS.md files root-to-CWD with a default 32 KiB combined limit; keep total foundation doc prose lean.",
10798
+ "- Copilot loads copilot-instructions.md automatically; headings and inline code markers aid discoverability.",
10799
+ "- `ENGINEERING_RULES.md` and platform rule files should treat MEMORY.md as the first-stop shared memory index and load deeper docs only on demand.",
10800
+ "- Target each individual foundation doc under 300 lines so it stays effective when imported into any platform's context window.",
10801
+ "- Treat MEMORY.md as the tightest budget document in the set. It should remain substantially shorter than PRODUCT.md, ARCHITECTURE.md, or TECH.md.",
10802
+ "- Front-load the most actionable information (commands, paths, constraints) in each doc; put supplementary detail later.",
10683
10803
  "",
10684
10804
  "Return one JSON object on the last line with this shape:",
10685
- `{"files_written":["${productPath}","${architecturePath}","${techPath}","${adrReadmePath}","${adrTemplatePath}"],"research_used":false,"gaps":[],"next_actions":[]}`,
10805
+ `{"files_written":["${memoryPath}","${productPath}","${architecturePath}","${techPath}","${domainMemoryPath}","${runtimeMemoryPath}","${integrationsMemoryPath}","${debuggingMemoryPath}","${adrReadmePath}","${adrTemplatePath}"],"research_used":false,"gaps":[],"next_actions":[]}`,
10686
10806
  "",
10687
10807
  "Do not emit placeholder TODOs in the managed sections.",
10688
10808
  ].join("\n");
10689
10809
  }
10810
+ let architectureExecFileCaptureOverride = null;
10811
+ let architectureSpawnCaptureOverride = null;
10812
+ const WINDOWS_COMMAND_EXTENSION_PREFERENCE = [
10813
+ ".exe",
10814
+ ".cmd",
10815
+ ".bat",
10816
+ ".com",
10817
+ "",
10818
+ ];
10819
+ export function __setArchitectureCommandCaptureForTests(overrides = {}) {
10820
+ architectureExecFileCaptureOverride =
10821
+ overrides.execFileCapture || architectureExecFileCaptureOverride;
10822
+ architectureSpawnCaptureOverride =
10823
+ overrides.spawnCapture || architectureSpawnCaptureOverride;
10824
+ }
10825
+ export function __resetArchitectureCommandCaptureForTests() {
10826
+ architectureExecFileCaptureOverride = null;
10827
+ architectureSpawnCaptureOverride = null;
10828
+ }
10829
+ function getEnvValueCaseInsensitive(env, key) {
10830
+ if (!env)
10831
+ return "";
10832
+ const match = Object.keys(env).find((candidate) => candidate.toLowerCase() === key.toLowerCase());
10833
+ return match ? String(env[match] || "") : "";
10834
+ }
10835
+ function rankWindowsCommandCandidate(command, candidate) {
10836
+ const requestedBase = path.parse(command).name.toLowerCase();
10837
+ const parsedCandidate = path.parse(candidate);
10838
+ if (parsedCandidate.name.toLowerCase() !== requestedBase)
10839
+ return -1;
10840
+ const ext = parsedCandidate.ext.toLowerCase();
10841
+ const rank = WINDOWS_COMMAND_EXTENSION_PREFERENCE.indexOf(ext);
10842
+ if (rank !== -1) {
10843
+ return WINDOWS_COMMAND_EXTENSION_PREFERENCE.length - rank;
10844
+ }
10845
+ return 0;
10846
+ }
10847
+ function pickWindowsCommandCandidate(command, candidates) {
10848
+ const normalized = (candidates || [])
10849
+ .map((candidate) => String(candidate || "").trim())
10850
+ .filter(Boolean);
10851
+ if (normalized.length === 0)
10852
+ return null;
10853
+ const ranked = normalized
10854
+ .map((candidate) => ({
10855
+ candidate,
10856
+ score: rankWindowsCommandCandidate(command, candidate),
10857
+ }))
10858
+ .sort((left, right) => right.score - left.score);
10859
+ return ranked[0]?.candidate || normalized[0];
10860
+ }
10861
+ function scanWindowsPathForCommand(command, env = process.env) {
10862
+ const pathValue = getEnvValueCaseInsensitive(env, "PATH");
10863
+ if (!pathValue)
10864
+ return null;
10865
+ const pathEntries = pathValue
10866
+ .split(path.delimiter)
10867
+ .map((entry) => entry.trim())
10868
+ .filter(Boolean);
10869
+ const requestedExt = path.extname(command).toLowerCase();
10870
+ const pathExts = getEnvValueCaseInsensitive(env, "PATHEXT")
10871
+ .split(";")
10872
+ .map((ext) => ext.trim().toLowerCase())
10873
+ .filter(Boolean)
10874
+ .map((ext) => (ext.startsWith(".") ? ext : `.${ext}`));
10875
+ const suffixes = requestedExt
10876
+ ? [""]
10877
+ : Array.from(new Set([
10878
+ ...WINDOWS_COMMAND_EXTENSION_PREFERENCE,
10879
+ ...pathExts,
10880
+ ]));
10881
+ const candidates = [];
10882
+ for (const entry of pathEntries) {
10883
+ const basePath = path.join(entry, command);
10884
+ if (requestedExt && existsSync(basePath)) {
10885
+ candidates.push(basePath);
10886
+ continue;
10887
+ }
10888
+ for (const suffix of suffixes) {
10889
+ const candidate = suffix ? `${basePath}${suffix}` : basePath;
10890
+ if (existsSync(candidate)) {
10891
+ candidates.push(candidate);
10892
+ }
10893
+ }
10894
+ }
10895
+ return pickWindowsCommandCandidate(command, candidates);
10896
+ }
10897
+ export function __pickWindowsCommandCandidateForTests(command, candidates) {
10898
+ return pickWindowsCommandCandidate(command, candidates);
10899
+ }
10900
+ export function __scanWindowsPathForCommandForTests(command, env) {
10901
+ return scanWindowsPathForCommand(command, env);
10902
+ }
10690
10903
  async function execFileCapture(command, args, options = {}) {
10904
+ if (architectureExecFileCaptureOverride) {
10905
+ return await architectureExecFileCaptureOverride(command, args, options);
10906
+ }
10907
+ const resolvedCommand = process.platform === "win32"
10908
+ ? await resolveWindowsCommand(command, options.env)
10909
+ : command;
10910
+ if (process.platform === "win32" &&
10911
+ /\.(cmd|bat)$/i.test(resolvedCommand)) {
10912
+ return await spawnCapture(resolvedCommand, args, {
10913
+ ...options,
10914
+ useShell: true,
10915
+ });
10916
+ }
10691
10917
  try {
10692
- const result = await execFile(command, args, {
10918
+ const result = await execFile(resolvedCommand, args, {
10693
10919
  ...options,
10694
10920
  maxBuffer: 8 * 1024 * 1024,
10695
10921
  });
@@ -10711,14 +10937,58 @@ async function execFileCapture(command, args, options = {}) {
10711
10937
  };
10712
10938
  }
10713
10939
  }
10940
+ async function resolveWindowsCommand(command, env = process.env) {
10941
+ if (process.platform !== "win32")
10942
+ return command;
10943
+ if (path.isAbsolute(command) || /[\\/]/.test(command))
10944
+ return command;
10945
+ const pathCandidate = scanWindowsPathForCommand(command, env);
10946
+ try {
10947
+ const result = await execFile("where.exe", [command], {
10948
+ windowsHide: true,
10949
+ maxBuffer: 1024 * 1024,
10950
+ });
10951
+ const candidates = String(result.stdout || "")
10952
+ .split(/\r?\n/)
10953
+ .map((line) => line.trim())
10954
+ .filter(Boolean);
10955
+ const resolved = pickWindowsCommandCandidate(command, candidates);
10956
+ if (resolved)
10957
+ return resolved;
10958
+ }
10959
+ catch (error) {
10960
+ if (error?.code === "ENOENT") {
10961
+ if (pathCandidate)
10962
+ return pathCandidate;
10963
+ throw new Error(`Required CLI '${command}' is not installed or not on PATH.`);
10964
+ }
10965
+ if (pathCandidate)
10966
+ return pathCandidate;
10967
+ }
10968
+ if (pathCandidate)
10969
+ return pathCandidate;
10970
+ const missingError = new Error(`Required CLI '${command}' is not installed or not on PATH.`);
10971
+ missingError.code = "ENOENT";
10972
+ throw missingError;
10973
+ }
10714
10974
  async function spawnCapture(command, args, options = {}) {
10715
- const { cwd, env, streamOutput = false } = options;
10975
+ if (architectureSpawnCaptureOverride) {
10976
+ return await architectureSpawnCaptureOverride(command, args, options);
10977
+ }
10978
+ const { cwd, env, streamOutput = false, useShell } = options;
10979
+ const resolvedCommand = process.platform === "win32"
10980
+ ? await resolveWindowsCommand(command, env)
10981
+ : command;
10982
+ const shell = typeof useShell === "boolean"
10983
+ ? useShell
10984
+ : process.platform === "win32" && /\.(cmd|bat)$/i.test(resolvedCommand);
10716
10985
  return await new Promise((resolve, reject) => {
10717
10986
  let stdout = "";
10718
10987
  let stderr = "";
10719
- const child = spawn(command, args, {
10988
+ const child = spawn(resolvedCommand, args, {
10720
10989
  cwd,
10721
10990
  env,
10991
+ shell,
10722
10992
  stdio: ["ignore", "pipe", "pipe"],
10723
10993
  });
10724
10994
  child.stdout.on("data", (chunk) => {
@@ -10753,7 +11023,7 @@ async function spawnCapture(command, args, options = {}) {
10753
11023
  function explainArchitectureBuildFailure(platform, execution) {
10754
11024
  const combined = String(`${execution.stderr || ""}\n${execution.stdout || ""}`.trim());
10755
11025
  const notes = [];
10756
- if (platform === "gemini") {
11026
+ if (platform === "gemini" || platform === "antigravity") {
10757
11027
  if (combined.includes("Error during discovery for MCP server") ||
10758
11028
  combined.includes("[MCP error]")) {
10759
11029
  notes.push("Gemini CLI is failing while loading MCP servers from your Gemini settings. Start the required MCP runtime(s) first or disable the broken server entries in `.gemini/settings.json` before retrying.");
@@ -10815,7 +11085,7 @@ async function probeArchitectureAdapter(platform, cwd) {
10815
11085
  },
10816
11086
  };
10817
11087
  }
10818
- if (platform === "gemini") {
11088
+ if (platform === "gemini" || platform === "antigravity") {
10819
11089
  const help = await execFileCapture("gemini", ["--help"], { cwd });
10820
11090
  const helpText = `${help.stdout}\n${help.stderr}`.trim();
10821
11091
  const promptFlag = helpText.includes("--prompt")
@@ -10952,6 +11222,11 @@ async function collapseDuplicateTaggedBlocks({ targetPath, startPattern, endPatt
10952
11222
  return { changed: true };
10953
11223
  }
10954
11224
  async function normalizeArchitectureBuildOutputs(scaffold) {
11225
+ await collapseDuplicateTaggedBlocks({
11226
+ targetPath: scaffold.memoryPath,
11227
+ startPattern: MEMORY_FOUNDATION_BLOCK_START_RE,
11228
+ endPattern: MEMORY_FOUNDATION_BLOCK_END_RE,
11229
+ });
10955
11230
  await collapseDuplicateTaggedBlocks({
10956
11231
  targetPath: scaffold.productPath,
10957
11232
  startPattern: PRODUCT_FOUNDATION_BLOCK_START_RE,
@@ -10967,18 +11242,51 @@ async function normalizeArchitectureBuildOutputs(scaffold) {
10967
11242
  startPattern: TECH_ARCHITECTURE_BLOCK_START_RE,
10968
11243
  endPattern: TECH_ARCHITECTURE_BLOCK_END_RE,
10969
11244
  });
11245
+ for (const targetPath of [
11246
+ scaffold.domainMemoryPath,
11247
+ scaffold.runtimeMemoryPath,
11248
+ scaffold.integrationsMemoryPath,
11249
+ scaffold.debuggingMemoryPath,
11250
+ ]) {
11251
+ await collapseDuplicateTaggedBlocks({
11252
+ targetPath,
11253
+ startPattern: MEMORY_TOPIC_BLOCK_START_RE,
11254
+ endPattern: MEMORY_TOPIC_BLOCK_END_RE,
11255
+ });
11256
+ }
10970
11257
  }
10971
11258
  async function readArchitectureDriftStatus(workspaceRoot, snapshot) {
11259
+ const memoryPath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md");
10972
11260
  const productPath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "PRODUCT.md");
10973
11261
  const architecturePath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "ARCHITECTURE.md");
10974
11262
  const techPath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "TECH.md");
11263
+ const domainMemoryPath = path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "domain.md");
11264
+ const runtimeMemoryPath = path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "runtime.md");
11265
+ const integrationsMemoryPath = path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "integrations.md");
11266
+ const debuggingMemoryPath = path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "debugging.md");
10975
11267
  const adrReadmePath = path.join(workspaceRoot, FOUNDATION_ADR_DIR, "README.md");
10976
11268
  const metadataPath = path.join(workspaceRoot, ".cbx", ARCHITECTURE_BUILD_METADATA_FILENAME);
11269
+ const memoryExists = await pathExists(memoryPath);
10977
11270
  const productExists = await pathExists(productPath);
10978
11271
  const architectureExists = await pathExists(architecturePath);
10979
11272
  const techExists = await pathExists(techPath);
11273
+ const topicPaths = [
11274
+ domainMemoryPath,
11275
+ runtimeMemoryPath,
11276
+ integrationsMemoryPath,
11277
+ debuggingMemoryPath,
11278
+ ];
10980
11279
  const adrReadmeExists = await pathExists(adrReadmePath);
10981
11280
  const findings = [];
11281
+ if (!memoryExists) {
11282
+ findings.push(`${FOUNDATION_DOCS_DIR}/MEMORY.md is missing.`);
11283
+ }
11284
+ else {
11285
+ const content = await readFile(memoryPath, "utf8");
11286
+ if (!extractTaggedMarkerAttribute(content, MEMORY_FOUNDATION_BLOCK_START_RE, "profile")) {
11287
+ findings.push(`${FOUNDATION_DOCS_DIR}/MEMORY.md is missing the managed memory block.`);
11288
+ }
11289
+ }
10982
11290
  let actualProductHash = null;
10983
11291
  let actualArchitectureHash = null;
10984
11292
  let actualTechHash = null;
@@ -11015,6 +11323,18 @@ async function readArchitectureDriftStatus(workspaceRoot, snapshot) {
11015
11323
  if (!adrReadmeExists) {
11016
11324
  findings.push(`${FOUNDATION_ADR_DIR}/README.md is missing.`);
11017
11325
  }
11326
+ for (const topicPath of topicPaths) {
11327
+ const exists = await pathExists(topicPath);
11328
+ const relativePath = toPosixPath(path.relative(workspaceRoot, topicPath));
11329
+ if (!exists) {
11330
+ findings.push(`${relativePath} is missing.`);
11331
+ continue;
11332
+ }
11333
+ const content = await readFile(topicPath, "utf8");
11334
+ if (!extractTaggedMarkerAttribute(content, MEMORY_TOPIC_BLOCK_START_RE, "profile")) {
11335
+ findings.push(`${relativePath} is missing the managed memory topic block.`);
11336
+ }
11337
+ }
11018
11338
  const metadata = await readJsonFileIfExists(metadataPath);
11019
11339
  if (!metadata.exists) {
11020
11340
  findings.push("Architecture build metadata is missing.");
@@ -11022,6 +11342,7 @@ async function readArchitectureDriftStatus(workspaceRoot, snapshot) {
11022
11342
  return {
11023
11343
  stale: findings.length > 0,
11024
11344
  findings,
11345
+ memoryPath,
11025
11346
  productPath,
11026
11347
  architecturePath,
11027
11348
  techPath,
@@ -11053,7 +11374,7 @@ async function runBuildArchitecture(options) {
11053
11374
  console.log(`Platform: ${platform}`);
11054
11375
  console.log(`Workspace: ${toPosixPath(workspaceRoot)}`);
11055
11376
  console.log(`Status: ${drift.stale ? "stale" : "fresh"}`);
11056
- console.log(`Backbone docs: ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, ${FOUNDATION_ADR_DIR}/README.md`);
11377
+ console.log(`Backbone docs: ${FOUNDATION_DOCS_DIR}/MEMORY.md, ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, ${FOUNDATION_MEMORY_DIR}/*.md, ${FOUNDATION_ADR_DIR}/README.md`);
11057
11378
  if (drift.findings.length > 0) {
11058
11379
  console.log("Findings:");
11059
11380
  for (const finding of drift.findings) {
@@ -11066,9 +11387,14 @@ async function runBuildArchitecture(options) {
11066
11387
  return;
11067
11388
  }
11068
11389
  const managedFilePaths = [
11390
+ path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md"),
11069
11391
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "PRODUCT.md"),
11070
11392
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "ARCHITECTURE.md"),
11071
11393
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "TECH.md"),
11394
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "domain.md"),
11395
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "runtime.md"),
11396
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "integrations.md"),
11397
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "debugging.md"),
11072
11398
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "README.md"),
11073
11399
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "0000-template.md"),
11074
11400
  ];
@@ -11096,9 +11422,14 @@ async function runBuildArchitecture(options) {
11096
11422
  const adapter = await probeArchitectureAdapter(platform, workspaceRoot);
11097
11423
  const args = adapter.buildInvocation(prompt);
11098
11424
  const managedTargets = [
11425
+ path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md"),
11099
11426
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "PRODUCT.md"),
11100
11427
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "ARCHITECTURE.md"),
11101
11428
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "TECH.md"),
11429
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "domain.md"),
11430
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "runtime.md"),
11431
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "integrations.md"),
11432
+ path.join(workspaceRoot, FOUNDATION_MEMORY_DIR, "debugging.md"),
11102
11433
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "README.md"),
11103
11434
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "0000-template.md"),
11104
11435
  ].map((filePath) => toPosixPath(filePath));
@@ -11147,8 +11478,10 @@ async function runBuildArchitecture(options) {
11147
11478
  const changedFiles = managedFilePaths
11148
11479
  .filter((filePath) => filesBefore[filePath] !== filesAfter[filePath])
11149
11480
  .map((filePath) => toPosixPath(path.relative(workspaceRoot, filePath)));
11150
- const techContent = filesAfter[scaffold.techMdPath] ?? (await readFile(scaffold.techMdPath, "utf8"));
11151
- const productContent = filesAfter[scaffold.productPath] ?? (await readFile(scaffold.productPath, "utf8"));
11481
+ const techContent = filesAfter[scaffold.techMdPath] ??
11482
+ (await readFile(scaffold.techMdPath, "utf8"));
11483
+ const productContent = filesAfter[scaffold.productPath] ??
11484
+ (await readFile(scaffold.productPath, "utf8"));
11152
11485
  const architectureContent = filesAfter[scaffold.architectureDocPath] ??
11153
11486
  (await readFile(scaffold.architectureDocPath, "utf8"));
11154
11487
  const metadataPath = path.join(workspaceRoot, ".cbx", ARCHITECTURE_BUILD_METADATA_FILENAME);
@@ -11156,9 +11489,14 @@ async function runBuildArchitecture(options) {
11156
11489
  platform,
11157
11490
  researchMode,
11158
11491
  managedDocs: [
11492
+ `${FOUNDATION_DOCS_DIR}/MEMORY.md`,
11159
11493
  `${FOUNDATION_DOCS_DIR}/PRODUCT.md`,
11160
11494
  `${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md`,
11161
11495
  `${FOUNDATION_DOCS_DIR}/TECH.md`,
11496
+ `${FOUNDATION_MEMORY_DIR}/domain.md`,
11497
+ `${FOUNDATION_MEMORY_DIR}/runtime.md`,
11498
+ `${FOUNDATION_MEMORY_DIR}/integrations.md`,
11499
+ `${FOUNDATION_MEMORY_DIR}/debugging.md`,
11162
11500
  `${FOUNDATION_ADR_DIR}/README.md`,
11163
11501
  `${FOUNDATION_ADR_DIR}/0000-template.md`,
11164
11502
  ],
@@ -11183,7 +11521,7 @@ async function runBuildArchitecture(options) {
11183
11521
  console.log(`Platform: ${platform}`);
11184
11522
  console.log(`Adapter: ${adapter.binary}`);
11185
11523
  console.log(`Workspace: ${toPosixPath(workspaceRoot)}`);
11186
- console.log(`Managed docs: ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md`);
11524
+ console.log(`Managed docs: ${FOUNDATION_DOCS_DIR}/MEMORY.md, ${FOUNDATION_DOCS_DIR}/PRODUCT.md, ${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md, ${FOUNDATION_DOCS_DIR}/TECH.md, ${FOUNDATION_MEMORY_DIR}/*.md`);
11187
11525
  console.log(`ADR scaffold: ${FOUNDATION_ADR_DIR}/README.md, ${FOUNDATION_ADR_DIR}/0000-template.md`);
11188
11526
  console.log(`Skill bundle: ${skillBundle.join(", ")}`);
11189
11527
  console.log(`Files written: ${(result.filesWritten || []).join(", ") || "(none reported)"}`);
@@ -11219,12 +11557,7 @@ function normalizeInitPlatforms(value) {
11219
11557
  return normalized;
11220
11558
  }
11221
11559
  function normalizeInitMcpSelections(value) {
11222
- const allowed = new Set([
11223
- "cubis-foundry",
11224
- "postman",
11225
- "stitch",
11226
- "playwright",
11227
- ]);
11560
+ const allowed = new Set(["cubis-foundry", "postman", "stitch", "playwright"]);
11228
11561
  const items = Array.isArray(value) ? value : parseCsvOption(value);
11229
11562
  const normalized = [];
11230
11563
  for (const item of items) {
@@ -11395,7 +11728,6 @@ async function runInitWizard(options) {
11395
11728
  bundleId: installOutcome.bundleId,
11396
11729
  installed: installOutcome.installResult.installed,
11397
11730
  skipped: installOutcome.installResult.skipped,
11398
- generatedWrapperSkills: installOutcome.installResult.generatedWrapperSkills,
11399
11731
  duplicateSkillCleanup: installOutcome.installResult.duplicateSkillCleanup,
11400
11732
  sanitizedSkills: installOutcome.installResult.sanitizedSkills,
11401
11733
  sanitizedAgents: installOutcome.installResult.sanitizedAgents,