@cubis/foundry 0.3.82 → 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 (633) hide show
  1. package/README.md +25 -9
  2. package/dist/cli/core.js +631 -476
  3. package/dist/cli/core.js.map +1 -1
  4. package/package.json +1 -1
  5. package/src/cli/core.ts +714 -609
  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/{workflows/architecture.md → generated-skills/architecture/SKILL.md} +44 -25
  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/{copilot/workflows/create.md → claude/generated-skills/create/SKILL.md} +13 -6
  130. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/database.md → 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} +13 -6
  134. package/workflows/workflows/agent-environment-setup/platforms/claude/{workflows/migrate.md → generated-skills/migrate/SKILL.md} +16 -17
  135. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/mobile.md → claude/generated-skills/mobile/SKILL.md} +17 -10
  136. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/onboard.md → claude/generated-skills/onboard/SKILL.md} +14 -14
  137. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/orchestrate.md → claude/generated-skills/orchestrate/SKILL.md} +13 -6
  138. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/plan.md → claude/generated-skills/plan/SKILL.md} +12 -16
  139. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/refactor.md → claude/generated-skills/refactor/SKILL.md} +16 -9
  140. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/release.md → claude/generated-skills/release/SKILL.md} +18 -11
  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} +11 -14
  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/{copilot/workflows/vercel.md → claude/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/{copilot/workflows/architecture.md → codex/generated-skills/architecture/SKILL.md} +44 -25
  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/{claude/workflows/create.md → codex/generated-skills/create/SKILL.md} +13 -6
  242. package/workflows/workflows/agent-environment-setup/platforms/{copilot/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} +13 -6
  246. package/workflows/workflows/agent-environment-setup/platforms/{copilot/workflows/migrate.md → codex/generated-skills/migrate/SKILL.md} +16 -17
  247. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/mobile.md → codex/generated-skills/mobile/SKILL.md} +17 -10
  248. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/onboard.md → codex/generated-skills/onboard/SKILL.md} +14 -14
  249. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/orchestrate.md → codex/generated-skills/orchestrate/SKILL.md} +13 -6
  250. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/plan.md → codex/generated-skills/plan/SKILL.md} +12 -16
  251. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/refactor.md → codex/generated-skills/refactor/SKILL.md} +16 -9
  252. package/workflows/workflows/agent-environment-setup/platforms/{claude/workflows/release.md → codex/generated-skills/release/SKILL.md} +18 -11
  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} +11 -14
  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/{claude/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/{antigravity/workflows/implement-track.md → copilot/prompts/implement-track.prompt.md} +21 -12
  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} +21 -12
  341. package/workflows/workflows/agent-environment-setup/platforms/{antigravity/workflows/plan.md → copilot/prompts/plan.prompt.md} +21 -23
  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/{codex/workflows/spec.md → copilot/prompts/spec.prompt.md} +21 -22
  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 +33 -11
  539. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/accessibility.md +0 -77
  540. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/architecture.md +0 -107
  541. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/backend.md +0 -86
  542. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/create.md +0 -68
  543. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/database.md +0 -67
  544. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/debug.md +0 -63
  545. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/devops.md +0 -78
  546. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/migrate.md +0 -78
  547. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/mobile.md +0 -71
  548. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/onboard.md +0 -72
  549. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/refactor.md +0 -67
  550. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/release.md +0 -70
  551. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/review.md +0 -66
  552. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/security.md +0 -69
  553. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/spec.md +0 -81
  554. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/test.md +0 -66
  555. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/vercel.md +0 -76
  556. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +0 -81
  557. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +0 -77
  558. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +0 -74
  559. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +0 -72
  560. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +0 -69
  561. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +0 -58
  562. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +0 -89
  563. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +0 -42
  564. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +0 -71
  565. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +0 -81
  566. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +0 -62
  567. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +0 -61
  568. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +0 -68
  569. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +0 -94
  570. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +0 -42
  571. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/sre-engineer.md +0 -88
  572. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +0 -80
  573. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/validator.md +0 -77
  574. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +0 -49
  575. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/accessibility.md +0 -77
  576. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/architecture.md +0 -107
  577. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/backend.md +0 -86
  578. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/create.md +0 -68
  579. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/database.md +0 -67
  580. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/debug.md +0 -63
  581. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/devops.md +0 -78
  582. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/implement-track.md +0 -71
  583. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/migrate.md +0 -78
  584. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/mobile.md +0 -71
  585. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/onboard.md +0 -72
  586. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/orchestrate.md +0 -73
  587. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/plan.md +0 -90
  588. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/refactor.md +0 -67
  589. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/release.md +0 -70
  590. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/review.md +0 -66
  591. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/security.md +0 -69
  592. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/test.md +0 -66
  593. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/vercel.md +0 -76
  594. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-accessibility.prompt.md +0 -18
  595. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-architecture.prompt.md +0 -18
  596. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-backend.prompt.md +0 -18
  597. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-create.prompt.md +0 -18
  598. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-database.prompt.md +0 -18
  599. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-debug.prompt.md +0 -18
  600. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-devops.prompt.md +0 -18
  601. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-implement-track.prompt.md +0 -18
  602. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-migrate.prompt.md +0 -18
  603. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-mobile.prompt.md +0 -18
  604. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-onboard.prompt.md +0 -18
  605. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-orchestrate.prompt.md +0 -18
  606. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-plan.prompt.md +0 -18
  607. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-refactor.prompt.md +0 -18
  608. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-release.prompt.md +0 -18
  609. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-review.prompt.md +0 -18
  610. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-security.prompt.md +0 -18
  611. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-spec.prompt.md +0 -18
  612. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-test.prompt.md +0 -18
  613. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-vercel.prompt.md +0 -18
  614. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/accessibility.md +0 -77
  615. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/architecture.md +0 -107
  616. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/backend.md +0 -86
  617. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/create.md +0 -68
  618. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/database.md +0 -67
  619. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/debug.md +0 -63
  620. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/devops.md +0 -78
  621. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/implement-track.md +0 -71
  622. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/migrate.md +0 -78
  623. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/mobile.md +0 -71
  624. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/onboard.md +0 -72
  625. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/orchestrate.md +0 -73
  626. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/plan.md +0 -90
  627. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/refactor.md +0 -67
  628. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/release.md +0 -70
  629. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/review.md +0 -66
  630. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/security.md +0 -69
  631. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/spec.md +0 -81
  632. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/test.md +0 -66
  633. 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.";
@@ -1137,7 +1146,7 @@ function buildEngineeringArchitectureSection(snapshot) {
1137
1146
  ...profile.testingStrategy.map((rule) => ` - ${rule}`),
1138
1147
  "- Doc refresh policy:",
1139
1148
  " - Update these managed sections when architecture, scale, boundaries, design-system rules, or testing strategy changes.",
1140
- ` - 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.`,
1141
1150
  "<!-- cbx:architecture:rules:end -->",
1142
1151
  "",
1143
1152
  ].join("\n");
@@ -1251,7 +1260,7 @@ function buildRoadmapFoundationSection(snapshot, specRoots = []) {
1251
1260
  "- Use this section for medium-term scaling themes, major migrations, or cross-team architecture investments.",
1252
1261
  "",
1253
1262
  "### Backbone Maintenance",
1254
- `- 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.`,
1255
1264
  "- Link major roadmap themes back to specs and ADRs instead of burying them in chat-only planning.",
1256
1265
  "<!-- cbx:roadmap:foundation:end -->",
1257
1266
  "",
@@ -1335,15 +1344,17 @@ function buildEngineeringRulesTemplate() {
1335
1344
  "- skill-name, workflow-name, or agent-name",
1336
1345
  "- or: none",
1337
1346
  "",
1338
- "## 9) Keep TECH.md Fresh",
1347
+ "## 9) Keep Foundation Docs Fresh",
1339
1348
  "",
1340
- "- `TECH.md` is generated from current codebase reality.",
1341
- "- 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.",
1342
1353
  "",
1343
1354
  "<!-- cbx:architecture:rules:start version=1 profile=bootstrap -->",
1344
1355
  "## 10) Architecture Contract (auto-managed)",
1345
1356
  "",
1346
- "- 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.",
1347
1358
  "- Design-system source of truth: bootstrap placeholder.",
1348
1359
  "- Dependency direction rules:",
1349
1360
  " - Replace this placeholder with the managed architecture block when architecture generation runs.",
@@ -1395,7 +1406,7 @@ function buildProductBuildSkeleton() {
1395
1406
  "This file is managed by `cbx build architecture`.",
1396
1407
  "",
1397
1408
  "<!-- cbx:product:foundation:start version=1 profile=uninitialized -->",
1398
- "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>`.",
1399
1410
  "<!-- cbx:product:foundation:end -->",
1400
1411
  "",
1401
1412
  ].join("\n");
@@ -1407,7 +1418,7 @@ function buildArchitectureBuildSkeleton() {
1407
1418
  "This file is managed by `cbx build architecture`.",
1408
1419
  "",
1409
1420
  "<!-- cbx:architecture:doc:start version=1 profile=uninitialized -->",
1410
- "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>`.",
1411
1422
  "<!-- cbx:architecture:doc:end -->",
1412
1423
  "",
1413
1424
  ].join("\n");
@@ -1419,11 +1430,35 @@ function buildTechBuildSkeleton() {
1419
1430
  "This file is managed by `cbx build architecture`.",
1420
1431
  "",
1421
1432
  "<!-- cbx:architecture:tech:start version=1 snapshot=uninitialized -->",
1422
- "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>`.",
1423
1434
  "<!-- cbx:architecture:tech:end -->",
1424
1435
  "",
1425
1436
  ].join("\n");
1426
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
+ }
1427
1462
  function buildAdrReadme() {
1428
1463
  return [
1429
1464
  "# Architecture Decision Records",
@@ -1474,7 +1509,8 @@ function buildAdrTemplate() {
1474
1509
  "",
1475
1510
  ].join("\n");
1476
1511
  }
1477
- 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));
1478
1514
  const productRef = toPosixPath(path.resolve(productFilePath));
1479
1515
  const architectureRef = toPosixPath(path.resolve(architectureFilePath));
1480
1516
  const engineeringRef = toPosixPath(path.resolve(engineeringRulesFilePath));
@@ -1483,16 +1519,19 @@ function buildEngineeringRulesManagedBlock({ platform, productFilePath, architec
1483
1519
  const ruleRef = toPosixPath(path.resolve(ruleFilePath));
1484
1520
  const supportsAtImport = platform === "claude" || platform === "gemini";
1485
1521
  const ruleFileDir = path.dirname(path.resolve(ruleFilePath));
1522
+ const relMemory = toPosixPath(path.relative(ruleFileDir, path.resolve(memoryFilePath)));
1486
1523
  const relProduct = toPosixPath(path.relative(ruleFileDir, path.resolve(productFilePath)));
1487
1524
  const relArchitecture = toPosixPath(path.relative(ruleFileDir, path.resolve(architectureFilePath)));
1488
1525
  const relTech = toPosixPath(path.relative(ruleFileDir, path.resolve(techMdFilePath)));
1489
1526
  const importLines = supportsAtImport
1490
1527
  ? [
1491
1528
  "",
1492
- "Foundation docs (auto-imported into context):",
1493
- `@${relProduct}`,
1494
- `@${relArchitecture}`,
1495
- `@${relTech}`,
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}`,
1496
1535
  ]
1497
1536
  : [];
1498
1537
  return [
@@ -1500,6 +1539,7 @@ function buildEngineeringRulesManagedBlock({ platform, productFilePath, architec
1500
1539
  "## Engineering Guardrails (auto-managed)",
1501
1540
  "Apply these before planning, coding, review, and release:",
1502
1541
  "",
1542
+ `- Shared memory index: \`${memoryRef}\``,
1503
1543
  `- Product backbone: \`${productRef}\``,
1504
1544
  `- Accepted architecture: \`${architectureRef}\``,
1505
1545
  `- Required baseline: \`${engineeringRef}\``,
@@ -1513,11 +1553,12 @@ function buildEngineeringRulesManagedBlock({ platform, productFilePath, architec
1513
1553
  "2. Keep architecture simple (KISS) and avoid speculative work (YAGNI).",
1514
1554
  "3. Apply SOLID pragmatically to reduce change risk, not add ceremony.",
1515
1555
  "4. Use clear naming with focused responsibilities and explicit boundaries.",
1516
- `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. Check ${FOUNDATION_DOCS_DIR}/PRODUCT.md for domain glossary and ${FOUNDATION_DOCS_DIR}/TECH.md for build/validation commands.`,
1517
- "6. Require validation evidence (lint/types/tests) before merge.",
1518
- "7. Use Decision Log response style.",
1519
- "8. Every Decision Log must include a `Skills Used` section listing skill, workflow, or agent names.",
1520
- "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.",
1521
1562
  "",
1522
1563
  "<!-- cbx:engineering:auto:end -->",
1523
1564
  ].join("\n");
@@ -1604,9 +1645,10 @@ async function upsertEngineeringRulesFile({ targetPath, template, overwrite = fa
1604
1645
  filePath: targetPath,
1605
1646
  };
1606
1647
  }
1607
- 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, }) {
1608
1649
  const block = buildEngineeringRulesManagedBlock({
1609
1650
  platform,
1651
+ memoryFilePath,
1610
1652
  productFilePath,
1611
1653
  architectureFilePath,
1612
1654
  engineeringRulesFilePath,
@@ -1820,6 +1862,12 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1820
1862
  const productPath = path.join(foundationRoot, "PRODUCT.md");
1821
1863
  const architectureDocPath = path.join(foundationRoot, "ARCHITECTURE.md");
1822
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");
1823
1871
  const adrDir = path.join(workspaceRoot, FOUNDATION_ADR_DIR);
1824
1872
  const adrReadmePath = path.join(adrDir, "README.md");
1825
1873
  const adrTemplatePath = path.join(adrDir, "0000-template.md");
@@ -1828,7 +1876,7 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1828
1876
  initialContent: `${buildProductBuildSkeleton()}\n`,
1829
1877
  block: [
1830
1878
  "<!-- cbx:product:foundation:start version=1 profile=uninitialized -->",
1831
- "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>`.",
1832
1880
  "<!-- cbx:product:foundation:end -->",
1833
1881
  "",
1834
1882
  ].join("\n"),
@@ -1841,7 +1889,7 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1841
1889
  initialContent: `${buildArchitectureBuildSkeleton()}\n`,
1842
1890
  block: [
1843
1891
  "<!-- cbx:architecture:doc:start version=1 profile=uninitialized -->",
1844
- "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>`.",
1845
1893
  "<!-- cbx:architecture:doc:end -->",
1846
1894
  "",
1847
1895
  ].join("\n"),
@@ -1854,7 +1902,7 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1854
1902
  initialContent: `${buildTechBuildSkeleton()}\n`,
1855
1903
  block: [
1856
1904
  "<!-- cbx:architecture:tech:start version=1 snapshot=uninitialized -->",
1857
- "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>`.",
1858
1906
  "<!-- cbx:architecture:tech:end -->",
1859
1907
  "",
1860
1908
  ].join("\n"),
@@ -1862,6 +1910,71 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1862
1910
  endPattern: TECH_ARCHITECTURE_BLOCK_END_RE,
1863
1911
  dryRun,
1864
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
+ });
1865
1978
  const adrReadmeResult = await writeTextFile({
1866
1979
  targetPath: adrReadmePath,
1867
1980
  content: `${buildAdrReadme()}\n`,
@@ -1878,11 +1991,21 @@ async function ensureArchitectureBuildScaffold({ workspaceRoot, dryRun = false,
1878
1991
  productPath,
1879
1992
  architectureDocPath,
1880
1993
  techMdPath,
1994
+ memoryPath,
1995
+ domainMemoryPath,
1996
+ runtimeMemoryPath,
1997
+ integrationsMemoryPath,
1998
+ debuggingMemoryPath,
1881
1999
  adrReadmePath,
1882
2000
  adrTemplatePath,
1883
2001
  productResult,
1884
2002
  architectureDocResult,
1885
2003
  techResult,
2004
+ memoryResult,
2005
+ domainMemoryResult,
2006
+ runtimeMemoryResult,
2007
+ integrationsMemoryResult,
2008
+ debuggingMemoryResult,
1886
2009
  adrReadmeResult,
1887
2010
  adrTemplateResult,
1888
2011
  };
@@ -3232,9 +3355,9 @@ async function resolveProfilePaths(profileId, scope, cwd = process.cwd()) {
3232
3355
  workflowsDir: await resolvePreferredDir(workflowDirs),
3233
3356
  agentsDir: await resolvePreferredDir(agentDirs),
3234
3357
  skillsDir: await resolvePreferredDir(skillDirs),
3235
- commandsDir: commandDirs[0] ? expandPath(commandDirs[0], cwd) : null,
3236
- promptsDir: promptDirs[0] ? expandPath(promptDirs[0], cwd) : null,
3237
- hooksDir: hookDirs[0] ? expandPath(hookDirs[0], cwd) : null,
3358
+ commandsDir: await resolvePreferredDir(commandDirs),
3359
+ promptsDir: await resolvePreferredDir(promptDirs),
3360
+ hooksDir: await resolvePreferredDir(hookDirs),
3238
3361
  ruleFilesByPriority: cfg.ruleFilesByPriority.map((filePath) => expandPath(filePath, cwd)),
3239
3362
  };
3240
3363
  }
@@ -3764,36 +3887,9 @@ function normalizeMarkdownId(fileName) {
3764
3887
  .replace(/-+/g, "-")
3765
3888
  .replace(/^-|-$/g, "");
3766
3889
  }
3767
- function yamlSingleQuoted(value) {
3768
- return `'${String(value || "").replace(/'/g, "''")}'`;
3769
- }
3770
3890
  function escapeRegExp(value) {
3771
3891
  return String(value).replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3772
3892
  }
3773
- function rewriteCodexWorkflowAgentReferences(sourceBody, agentIds) {
3774
- if (!sourceBody || !Array.isArray(agentIds) || agentIds.length === 0)
3775
- return normalizeCodexWrapperMentions(sourceBody);
3776
- let rewritten = sourceBody;
3777
- const sortedAgentIds = unique(agentIds.filter(Boolean)).sort((a, b) => b.length - a.length);
3778
- for (const agentId of sortedAgentIds) {
3779
- const agentPattern = new RegExp(`(^|[^A-Za-z0-9_-])@${escapeRegExp(agentId)}(?=$|[^A-Za-z0-9_-])`, "g");
3780
- rewritten = rewritten.replace(agentPattern, (_match, prefix) => `${prefix}$${CODEX_AGENT_SKILL_PREFIX}${agentId}`);
3781
- }
3782
- return normalizeCodexWrapperMentions(rewritten);
3783
- }
3784
- function rewriteCodexAgentSkillReferences(sourceBody) {
3785
- if (!sourceBody)
3786
- return sourceBody;
3787
- // Agent source files live under platforms/*/agents, but wrapper skills live
3788
- // under .agents/skills/agent-*. Rebase ../skills/<id> links accordingly.
3789
- const rebased = sourceBody.replace(/\(\.\.\/skills\//g, "(../");
3790
- return normalizeCodexWrapperMentions(rebased);
3791
- }
3792
- function normalizeCodexWrapperMentions(sourceBody) {
3793
- if (!sourceBody)
3794
- return sourceBody;
3795
- return sourceBody.replace(/`\$(workflow|agent)-([A-Za-z0-9_-]+|\*)`/g, (_match, kind, id) => `$${kind}-${id}`);
3796
- }
3797
3893
  async function parseWorkflowMetadata(filePath) {
3798
3894
  const raw = await readFile(filePath, "utf8");
3799
3895
  const { frontmatter, body } = extractFrontmatter(raw);
@@ -3832,175 +3928,6 @@ async function parseAgentMetadata(filePath) {
3832
3928
  body: body.trim(),
3833
3929
  };
3834
3930
  }
3835
- function buildCodexWorkflowWrapperSkillMarkdown(wrapperSkillId, workflow) {
3836
- const description = `Callable Codex wrapper for ${workflow.command}: ${workflow.description}`;
3837
- const sourceBody = workflow.body?.trim() || "No source workflow content found.";
3838
- return [
3839
- "---",
3840
- `name: ${wrapperSkillId}`,
3841
- `description: ${yamlSingleQuoted(description)}`,
3842
- "metadata:",
3843
- " source: cubis-foundry",
3844
- " wrapper: workflow",
3845
- " platform: codex",
3846
- ` workflow-id: ${yamlSingleQuoted(workflow.id)}`,
3847
- ` workflow-command: ${yamlSingleQuoted(workflow.command)}`,
3848
- "---",
3849
- "",
3850
- `# Workflow Compatibility Alias: ${workflow.command}`,
3851
- "",
3852
- `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}.`,
3853
- "",
3854
- "## Invocation Contract",
3855
- "1. Resolve the workflow route first; do not use this alias as a substitute for skill discovery.",
3856
- "2. Follow the sequence and guardrails in the source instructions below.",
3857
- "3. Produce actionable output and call out assumptions before edits.",
3858
- "",
3859
- "## Source Workflow Instructions",
3860
- "",
3861
- sourceBody,
3862
- "",
3863
- ].join("\n");
3864
- }
3865
- function buildCodexAgentWrapperSkillMarkdown(wrapperSkillId, agent) {
3866
- const description = `Callable Codex wrapper for @${agent.id}: ${agent.description}`;
3867
- const sourceBody = agent.body?.trim() || "No source agent content found.";
3868
- const relatedSkillsLine = agent.skills.length > 0
3869
- ? `Related skills from source agent: ${agent.skills.join(", ")}`
3870
- : "Related skills from source agent: (none listed)";
3871
- return [
3872
- "---",
3873
- `name: ${wrapperSkillId}`,
3874
- `description: ${yamlSingleQuoted(description)}`,
3875
- "metadata:",
3876
- " source: cubis-foundry",
3877
- " wrapper: agent",
3878
- " platform: codex",
3879
- ` agent-id: ${yamlSingleQuoted(agent.id)}`,
3880
- "---",
3881
- "",
3882
- `# Agent Compatibility Alias: @${agent.id}`,
3883
- "",
3884
- `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}.`,
3885
- "",
3886
- "## Invocation Contract",
3887
- "1. Resolve the agent route first; do not use this alias as a substitute for skill discovery.",
3888
- "2. Adopt the role and constraints defined in the source agent content.",
3889
- "3. Apply domain heuristics and escalation rules before coding.",
3890
- "4. Ask clarifying questions when requirements are ambiguous.",
3891
- "",
3892
- `- Source agent name: ${agent.name}`,
3893
- `- Source agent description: ${agent.description}`,
3894
- `- ${relatedSkillsLine}`,
3895
- "",
3896
- "## Source Agent Instructions",
3897
- "",
3898
- sourceBody,
3899
- "",
3900
- ].join("\n");
3901
- }
3902
- async function writeGeneratedSkillArtifact({ destinationDir, content, overwrite, dryRun = false, }) {
3903
- const exists = await pathExists(destinationDir);
3904
- if (exists && !overwrite) {
3905
- return { action: dryRun ? "would-skip" : "skipped", path: destinationDir };
3906
- }
3907
- if (!dryRun && exists && overwrite) {
3908
- await rm(destinationDir, { recursive: true, force: true });
3909
- }
3910
- if (!dryRun) {
3911
- await mkdir(destinationDir, { recursive: true });
3912
- await writeFile(path.join(destinationDir, "SKILL.md"), content, "utf8");
3913
- }
3914
- if (dryRun) {
3915
- return {
3916
- action: exists ? "would-replace" : "would-install",
3917
- path: destinationDir,
3918
- };
3919
- }
3920
- return { action: exists ? "replaced" : "installed", path: destinationDir };
3921
- }
3922
- function buildCodexWrapperSkillIds(platformSpec) {
3923
- const workflowIds = (platformSpec.workflows || []).map((fileName) => {
3924
- const id = normalizeMarkdownId(path.basename(fileName));
3925
- return `${CODEX_WORKFLOW_SKILL_PREFIX}${id}`;
3926
- });
3927
- const agentIds = (platformSpec.agents || []).map((fileName) => {
3928
- const id = normalizeMarkdownId(path.basename(fileName));
3929
- return `${CODEX_AGENT_SKILL_PREFIX}${id}`;
3930
- });
3931
- return unique([...workflowIds, ...agentIds]);
3932
- }
3933
- async function generateCodexWrapperSkills({ platformRoot, platformSpec, skillsDir, overwrite, dryRun = false, }) {
3934
- const installed = [];
3935
- const skipped = [];
3936
- const artifacts = [];
3937
- const generated = [];
3938
- const codexAgentIds = (platformSpec.agents || []).map((fileName) => normalizeMarkdownId(path.basename(fileName)));
3939
- for (const workflowFile of platformSpec.workflows || []) {
3940
- const source = path.join(platformRoot, "workflows", workflowFile);
3941
- if (!(await pathExists(source))) {
3942
- throw new Error(`Missing workflow source file for wrapper generation: ${source}`);
3943
- }
3944
- const metadata = await parseWorkflowMetadata(source);
3945
- const raw = await readFile(source, "utf8");
3946
- const sourceBody = extractFrontmatter(raw).body.trim();
3947
- const rewrittenBody = rewriteCodexWorkflowAgentReferences(sourceBody, codexAgentIds);
3948
- const wrapperSkillId = `${CODEX_WORKFLOW_SKILL_PREFIX}${metadata.id}`;
3949
- const destinationDir = path.join(skillsDir, wrapperSkillId);
3950
- const content = buildCodexWorkflowWrapperSkillMarkdown(wrapperSkillId, {
3951
- ...metadata,
3952
- body: rewrittenBody,
3953
- });
3954
- const result = await writeGeneratedSkillArtifact({
3955
- destinationDir,
3956
- content,
3957
- overwrite,
3958
- dryRun,
3959
- });
3960
- artifacts.push(destinationDir);
3961
- generated.push({
3962
- kind: "workflow",
3963
- id: metadata.id,
3964
- skillId: wrapperSkillId,
3965
- });
3966
- if (result.action === "skipped" || result.action === "would-skip")
3967
- skipped.push(destinationDir);
3968
- else
3969
- installed.push(destinationDir);
3970
- }
3971
- for (const agentFile of platformSpec.agents || []) {
3972
- const source = path.join(platformRoot, "agents", agentFile);
3973
- if (!(await pathExists(source))) {
3974
- throw new Error(`Missing agent source file for wrapper generation: ${source}`);
3975
- }
3976
- const metadata = await parseAgentMetadata(source);
3977
- const rewrittenBody = rewriteCodexAgentSkillReferences(metadata.body);
3978
- const wrapperSkillId = `${CODEX_AGENT_SKILL_PREFIX}${metadata.id}`;
3979
- const destinationDir = path.join(skillsDir, wrapperSkillId);
3980
- const content = buildCodexAgentWrapperSkillMarkdown(wrapperSkillId, {
3981
- ...metadata,
3982
- body: rewrittenBody,
3983
- });
3984
- const result = await writeGeneratedSkillArtifact({
3985
- destinationDir,
3986
- content,
3987
- overwrite,
3988
- dryRun,
3989
- });
3990
- artifacts.push(destinationDir);
3991
- generated.push({ kind: "agent", id: metadata.id, skillId: wrapperSkillId });
3992
- if (result.action === "skipped" || result.action === "would-skip")
3993
- skipped.push(destinationDir);
3994
- else
3995
- installed.push(destinationDir);
3996
- }
3997
- return {
3998
- installed,
3999
- skipped,
4000
- artifacts,
4001
- generated,
4002
- };
4003
- }
4004
3931
  async function resolvePlatformAgentSkillDependencies({ platformRoot, platformSpec, }) {
4005
3932
  const dependencyIds = [];
4006
3933
  for (const agentFile of platformSpec.agents || []) {
@@ -4013,15 +3940,41 @@ async function resolvePlatformAgentSkillDependencies({ platformRoot, platformSpe
4013
3940
  return unique(dependencyIds.filter(Boolean));
4014
3941
  }
4015
3942
  async function collectInstalledWorkflows(profileId, scope, cwd = process.cwd()) {
4016
- // Global install mode keeps workflows/agents in workspace paths.
4017
- // 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
+ }
4018
3972
  const profilePaths = await resolveArtifactProfilePaths(profileId, scope, cwd);
4019
- if (!(await pathExists(profilePaths.workflowsDir)))
3973
+ if (!profilePaths.workflowsDir || !(await pathExists(profilePaths.workflowsDir)))
4020
3974
  return [];
4021
3975
  const entries = await readdir(profilePaths.workflowsDir, {
4022
3976
  withFileTypes: true,
4023
3977
  });
4024
- const workflows = [];
4025
3978
  for (const entry of entries) {
4026
3979
  if (!entry.isFile() ||
4027
3980
  !entry.name.endsWith(".md") ||
@@ -4065,7 +4018,8 @@ function buildManagedWorkflowBlock(platformId, workflows) {
4065
4018
  lines.push("Prefer direct route identifiers first:");
4066
4019
  lines.push("- Workflows: `/workflow-name`");
4067
4020
  lines.push("- Agents: `@agent-name`");
4068
- 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`");
4069
4023
  lines.push("");
4070
4024
  if (workflows.length === 0) {
4071
4025
  lines.push("- No installed workflows found yet.");
@@ -4081,44 +4035,41 @@ function buildManagedWorkflowBlock(platformId, workflows) {
4081
4035
  lines.push("Selection policy:");
4082
4036
  lines.push("1. If the user names `/workflow` or `@agent`, use that route directly.");
4083
4037
  lines.push("2. Else map intent to one primary workflow.");
4084
- lines.push("3. Treat `$workflow-*` / `$agent-*` as compatibility aliases only.");
4038
+ lines.push("3. Load supporting skills only after route selection.");
4085
4039
  lines.push("");
4086
4040
  lines.push("<!-- cbx:workflows:auto:end -->");
4087
4041
  return lines.join("\n");
4088
4042
  }
4089
4043
  if (platformId === "copilot") {
4090
4044
  lines.push("Prefer native Copilot route surfaces first:");
4091
- lines.push("- Workflow prompts: `.github/prompts/workflow-*.prompt.md`");
4092
- 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`");
4093
4048
  lines.push("- Agents: `@agent-name`");
4094
4049
  lines.push("- Workspace-first MCP: `.vscode/mcp.json`");
4095
- lines.push("- Do not use `$workflow-*` / `$agent-*` as the primary route surface here; those are Codex compatibility aliases.");
4096
- lines.push("- `.github/skills` is installed by default, but route through workflows and agents before loading skills.");
4097
4050
  lines.push("");
4098
4051
  }
4099
4052
  else if (platformId === "antigravity") {
4100
4053
  lines.push("Prefer native Antigravity route surfaces first:");
4101
4054
  lines.push("- Commands: `.gemini/commands/*.toml`");
4102
- lines.push("- Workflow files: `.agent/workflows/*.md`");
4103
- lines.push("- Agents: `@agent-name`");
4104
- 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.");
4105
4058
  lines.push("");
4106
4059
  }
4107
4060
  else if (platformId === "claude") {
4108
4061
  lines.push("Prefer native Claude Code route surfaces first:");
4109
4062
  lines.push("- Rules: `.claude/rules/*.md`");
4110
- lines.push("- Workflow files: `.claude/workflows/*.md`");
4063
+ lines.push("- Skills: `.claude/skills/<skill>/SKILL.md`");
4064
+ lines.push("- Agents: `.claude/agents/*.md`");
4111
4065
  lines.push("- Memory: `CLAUDE.md`");
4112
- lines.push("- Do not use `$workflow-*` / `$agent-*` as the primary route surface here; those are Codex compatibility aliases.");
4113
4066
  lines.push("");
4114
4067
  }
4115
4068
  else if (platformId === "gemini") {
4116
4069
  lines.push("Prefer native Gemini route surfaces first:");
4117
4070
  lines.push("- Commands: `.gemini/commands/*.toml`");
4118
- lines.push("- Workflow files: `.gemini/workflows/*.md`");
4119
4071
  lines.push("- Rules: `.gemini/GEMINI.md`");
4120
- lines.push("- Specialists are inline postures here, not standalone agent files.");
4121
- 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.");
4122
4073
  lines.push("");
4123
4074
  }
4124
4075
  lines.push("Use the following workflows proactively when task intent matches:");
@@ -4143,24 +4094,24 @@ function buildManagedWorkflowBlock(platformId, workflows) {
4143
4094
  lines.push("");
4144
4095
  lines.push("Selection policy:");
4145
4096
  if (platformId === "copilot") {
4146
- lines.push("1. Match explicit workflow prompt, workflow, or `@agent` first.");
4147
- lines.push("2. Else match user intent to one primary workflow and reuse the matching prompt file when available.");
4148
- 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.");
4149
4100
  }
4150
4101
  else if (platformId === "antigravity") {
4151
- lines.push("1. Match explicit Gemini command, workflow, or `@agent` first.");
4152
- lines.push("2. Else match user intent to one primary workflow and use the matching command file when available.");
4153
- 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.");
4154
4105
  }
4155
4106
  else if (platformId === "claude") {
4156
- lines.push("1. Match explicit workflow or scoped rule first.");
4107
+ lines.push("1. Match explicit workflow skill or `@agent` first.");
4157
4108
  lines.push("2. Else match user intent to one primary workflow.");
4158
- 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.");
4159
4110
  }
4160
4111
  else if (platformId === "gemini") {
4161
- lines.push("1. Match explicit Gemini command or workflow first.");
4162
- lines.push("2. Else match user intent to one primary workflow and use the matching command file when available.");
4163
- 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.");
4164
4115
  }
4165
4116
  else {
4166
4117
  lines.push("1. Match explicit slash command first.");
@@ -4328,7 +4279,19 @@ async function syncRulesForPlatform({ platform, scope, cwd = process.cwd(), dryR
4328
4279
  const ruleFilePath = await resolveRuleFilePath(platform, scope, cwd);
4329
4280
  if (!ruleFilePath)
4330
4281
  throw new Error(`No rule file configured for platform '${platform}'.`);
4331
- 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
+ }
4332
4295
  const patchResult = await upsertManagedRuleBlock(ruleFilePath, platform, workflows, dryRun);
4333
4296
  const workspaceRuleSync = await syncWorkspaceRuleForGlobalScope({
4334
4297
  platform,
@@ -6297,27 +6260,57 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6297
6260
  throw new Error(`Bundle '${bundleId}' does not define platform '${platform}'.`);
6298
6261
  }
6299
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
+ : [];
6300
6289
  if (!dryRun) {
6301
- await mkdir(profilePaths.workflowsDir, { recursive: true });
6302
- 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))) {
6303
6299
  await mkdir(profilePaths.skillsDir, { recursive: true });
6304
6300
  }
6305
- 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
+ }
6306
6305
  await mkdir(profilePaths.agentsDir, { recursive: true });
6307
6306
  }
6308
- if (profilePaths.commandsDir &&
6309
- Array.isArray(platformSpec.commands) &&
6310
- platformSpec.commands.length > 0) {
6307
+ if (profilePaths.commandsDir && commandFiles.length > 0) {
6311
6308
  await mkdir(profilePaths.commandsDir, { recursive: true });
6312
6309
  }
6313
- if (profilePaths.promptsDir &&
6314
- Array.isArray(platformSpec.prompts) &&
6315
- platformSpec.prompts.length > 0) {
6310
+ if (profilePaths.promptsDir && promptFiles.length > 0) {
6316
6311
  await mkdir(profilePaths.promptsDir, { recursive: true });
6317
6312
  }
6318
- if (profilePaths.hooksDir &&
6319
- Array.isArray(platformSpec.hooks) &&
6320
- platformSpec.hooks.some((entry) => typeof entry?.file === "string")) {
6313
+ if (profilePaths.hooksDir && hookFiles.length > 0) {
6321
6314
  await mkdir(profilePaths.hooksDir, { recursive: true });
6322
6315
  }
6323
6316
  }
@@ -6335,10 +6328,9 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6335
6328
  };
6336
6329
  // Bind useSymlinks into copyArtifact so every call site inherits it
6337
6330
  const copyArt = (args) => copyArtifact({ ...args, useSymlinks });
6338
- const workflowFiles = Array.isArray(platformSpec.workflows)
6339
- ? platformSpec.workflows
6340
- : [];
6341
6331
  for (const workflowFile of workflowFiles) {
6332
+ if (!profilePaths.workflowsDir)
6333
+ continue;
6342
6334
  const source = path.join(platformRoot, "workflows", workflowFile);
6343
6335
  const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
6344
6336
  if (!(await pathExists(source))) {
@@ -6356,12 +6348,9 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6356
6348
  else
6357
6349
  installed.push(destination);
6358
6350
  }
6359
- const agentFiles = platformInstallsCustomAgents(platform)
6360
- ? Array.isArray(platformSpec.agents)
6361
- ? platformSpec.agents
6362
- : []
6363
- : [];
6364
6351
  for (const agentFile of agentFiles) {
6352
+ if (!profilePaths.agentsDir)
6353
+ continue;
6365
6354
  const source = path.join(platformRoot, "agents", agentFile);
6366
6355
  const destination = path.join(profilePaths.agentsDir, path.basename(agentFile));
6367
6356
  if (!(await pathExists(source))) {
@@ -6379,9 +6368,6 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6379
6368
  else
6380
6369
  installed.push(destination);
6381
6370
  }
6382
- const commandFiles = Array.isArray(platformSpec.commands)
6383
- ? platformSpec.commands
6384
- : [];
6385
6371
  for (const commandFile of commandFiles) {
6386
6372
  if (!profilePaths.commandsDir)
6387
6373
  continue;
@@ -6402,9 +6388,6 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6402
6388
  else
6403
6389
  installed.push(destination);
6404
6390
  }
6405
- const promptFiles = Array.isArray(platformSpec.prompts)
6406
- ? platformSpec.prompts
6407
- : [];
6408
6391
  for (const promptFile of promptFiles) {
6409
6392
  if (!profilePaths.promptsDir)
6410
6393
  continue;
@@ -6425,15 +6408,6 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6425
6408
  else
6426
6409
  installed.push(destination);
6427
6410
  }
6428
- const hookFiles = Array.isArray(platformSpec.hooks)
6429
- ? platformSpec.hooks
6430
- .map((entry) => typeof entry === "string"
6431
- ? entry
6432
- : typeof entry?.file === "string"
6433
- ? entry.file
6434
- : null)
6435
- .filter(Boolean)
6436
- : [];
6437
6411
  for (const hookFile of hookFiles) {
6438
6412
  if (!profilePaths.hooksDir)
6439
6413
  continue;
@@ -6454,7 +6428,7 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6454
6428
  else
6455
6429
  installed.push(destination);
6456
6430
  }
6457
- if (shouldInstallPlatformSkills) {
6431
+ if (shouldInstallPlatformSkills && profilePaths.skillsDir) {
6458
6432
  const agentSkillDependencies = await resolvePlatformAgentSkillDependencies({
6459
6433
  platformRoot,
6460
6434
  platformSpec,
@@ -6500,20 +6474,24 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6500
6474
  else
6501
6475
  installed.push(skillsIndexDest);
6502
6476
  }
6503
- }
6504
- let generatedWrapperSkills = [];
6505
- if (platform === "codex") {
6506
- const wrapperResult = await generateCodexWrapperSkills({
6507
- platformRoot,
6508
- platformSpec,
6509
- skillsDir: profilePaths.skillsDir,
6510
- overwrite,
6511
- dryRun,
6512
- });
6513
- installed.push(...wrapperResult.installed);
6514
- skipped.push(...wrapperResult.skipped);
6515
- artifacts.skills.push(...wrapperResult.artifacts);
6516
- 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
+ }
6517
6495
  }
6518
6496
  let terminalIntegration = null;
6519
6497
  if (platform === "antigravity" && terminalVerifierSelection?.enabled) {
@@ -6524,11 +6502,13 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6524
6502
  });
6525
6503
  installed.push(...terminalIntegration.installedPaths);
6526
6504
  }
6527
- const duplicateSkillCleanup = await cleanupNestedDuplicateSkills({
6528
- skillsRootDir: profilePaths.skillsDir,
6529
- installedSkillDirs: artifacts.skills,
6530
- dryRun,
6531
- });
6505
+ const duplicateSkillCleanup = profilePaths.skillsDir
6506
+ ? await cleanupNestedDuplicateSkills({
6507
+ skillsRootDir: profilePaths.skillsDir,
6508
+ installedSkillDirs: artifacts.skills,
6509
+ dryRun,
6510
+ })
6511
+ : [];
6532
6512
  const sanitizedSkills = await sanitizeInstalledSkillsForPlatform({
6533
6513
  platform,
6534
6514
  skillDirs: artifacts.skills,
@@ -6545,49 +6525,11 @@ async function installBundleArtifacts({ bundleId, manifest, platform, scope, ove
6545
6525
  skipped,
6546
6526
  artifacts,
6547
6527
  terminalIntegration,
6548
- generatedWrapperSkills,
6549
6528
  duplicateSkillCleanup,
6550
6529
  sanitizedSkills,
6551
6530
  sanitizedAgents,
6552
6531
  };
6553
6532
  }
6554
- async function installCodexProjectWorkflowTemplates({ bundleId, manifest, overwrite, dryRun = false, cwd = process.cwd(), }) {
6555
- const platform = "codex";
6556
- const platformSpec = manifest.platforms?.[platform];
6557
- if (!platformSpec)
6558
- return { installed: [], skipped: [] };
6559
- const workflowFiles = Array.isArray(platformSpec.workflows)
6560
- ? platformSpec.workflows
6561
- : [];
6562
- if (workflowFiles.length === 0)
6563
- return { installed: [], skipped: [] };
6564
- const profilePaths = await resolveProfilePaths(platform, "project", cwd);
6565
- if (!dryRun) {
6566
- await mkdir(profilePaths.workflowsDir, { recursive: true });
6567
- }
6568
- const bundleRoot = path.join(agentAssetsRoot(), "workflows", bundleId);
6569
- const platformRoot = path.join(bundleRoot, "platforms", platform);
6570
- const installed = [];
6571
- const skipped = [];
6572
- for (const workflowFile of workflowFiles) {
6573
- const source = path.join(platformRoot, "workflows", workflowFile);
6574
- const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
6575
- if (!(await pathExists(source))) {
6576
- throw new Error(`Missing workflow source file: ${source}`);
6577
- }
6578
- const result = await copyArtifact({
6579
- source,
6580
- destination,
6581
- overwrite,
6582
- dryRun,
6583
- });
6584
- if (result.action === "skipped" || result.action === "would-skip")
6585
- skipped.push(destination);
6586
- else
6587
- installed.push(destination);
6588
- }
6589
- return { installed, skipped };
6590
- }
6591
6533
  async function seedRuleFileFromTemplateIfMissing({ bundleId, manifest, platform, scope, overwrite = false, dryRun = false, cwd = process.cwd(), }) {
6592
6534
  const platformSpec = manifest.platforms?.[platform];
6593
6535
  if (!platformSpec || !platformSpec.rulesTemplate)
@@ -6621,6 +6563,8 @@ function commandToFilename(command) {
6621
6563
  return `${normalized}.md`;
6622
6564
  }
6623
6565
  async function findWorkflowFileByTarget(workflowsDir, target) {
6566
+ if (!workflowsDir)
6567
+ return null;
6624
6568
  const direct = target.endsWith(".md") ? target : `${target}.md`;
6625
6569
  const directPath = path.join(workflowsDir, direct);
6626
6570
  if (await pathExists(directPath))
@@ -6654,12 +6598,19 @@ async function removeBundleArtifacts({ bundleId, manifest, platform, scope, prof
6654
6598
  if (!platformSpec)
6655
6599
  throw new Error(`Bundle '${bundleId}' does not define platform '${platform}'.`);
6656
6600
  const removed = [];
6601
+ const generatedSkillDirs = Array.isArray(platformSpec.generatedSkills)
6602
+ ? platformSpec.generatedSkills
6603
+ : [];
6657
6604
  for (const workflowFile of platformSpec.workflows || []) {
6605
+ if (!profilePaths.workflowsDir)
6606
+ continue;
6658
6607
  const destination = path.join(profilePaths.workflowsDir, path.basename(workflowFile));
6659
6608
  if (await safeRemove(destination, dryRun))
6660
6609
  removed.push(destination);
6661
6610
  }
6662
6611
  for (const agentFile of platformSpec.agents || []) {
6612
+ if (!profilePaths.agentsDir)
6613
+ continue;
6663
6614
  const destination = path.join(profilePaths.agentsDir, path.basename(agentFile));
6664
6615
  if (await safeRemove(destination, dryRun))
6665
6616
  removed.push(destination);
@@ -6697,48 +6648,50 @@ async function removeBundleArtifacts({ bundleId, manifest, platform, scope, prof
6697
6648
  extraSkillIds: [],
6698
6649
  });
6699
6650
  for (const skillId of skillIds) {
6651
+ if (!profilePaths.skillsDir)
6652
+ continue;
6700
6653
  const destination = path.join(profilePaths.skillsDir, skillId);
6701
6654
  if (await safeRemove(destination, dryRun))
6702
6655
  removed.push(destination);
6703
6656
  }
6704
- if (platform === "codex") {
6705
- const wrapperSkillIds = buildCodexWrapperSkillIds(platformSpec);
6706
- for (const skillId of wrapperSkillIds) {
6707
- const destination = path.join(profilePaths.skillsDir, skillId);
6708
- if (await safeRemove(destination, dryRun))
6709
- removed.push(destination);
6710
- }
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);
6711
6663
  }
6712
6664
  return { removed, profilePaths };
6713
6665
  }
6714
6666
  function printPlatforms() {
6667
+ const formatPathList = (paths, disabledLabel = "(not used)") => Array.isArray(paths) && paths.length > 0 ? paths.join(" | ") : disabledLabel;
6715
6668
  console.log("Workflow platforms:");
6716
6669
  for (const profileId of PLATFORM_IDS) {
6717
6670
  const profile = WORKFLOW_PROFILES[profileId];
6718
6671
  const agentsEnabled = platformInstallsCustomAgents(profileId);
6719
6672
  console.log(`- ${profile.id} (${profile.label})`);
6720
- console.log(` project workflows: ${profile.project.workflowDirs[0]}`);
6721
- console.log(` project agents: ${agentsEnabled ? profile.project.agentDirs[0] : "(disabled for this platform)"}`);
6722
- 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)}`);
6723
6676
  if (Array.isArray(profile.project.commandDirs) &&
6724
6677
  profile.project.commandDirs.length > 0) {
6725
- console.log(` project commands: ${profile.project.commandDirs[0]}`);
6678
+ console.log(` project commands: ${formatPathList(profile.project.commandDirs)}`);
6726
6679
  }
6727
6680
  if (Array.isArray(profile.project.promptDirs) &&
6728
6681
  profile.project.promptDirs.length > 0) {
6729
- console.log(` project prompts: ${profile.project.promptDirs[0]}`);
6682
+ console.log(` project prompts: ${formatPathList(profile.project.promptDirs)}`);
6730
6683
  }
6731
6684
  console.log(` project rules: ${profile.project.ruleFilesByPriority.join(" | ")}`);
6732
- console.log(` global workflows: ${profile.global.workflowDirs[0]}`);
6733
- console.log(` global agents: ${agentsEnabled ? profile.global.agentDirs[0] : "(disabled for this platform)"}`);
6734
- 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)}`);
6735
6688
  if (Array.isArray(profile.global.commandDirs) &&
6736
6689
  profile.global.commandDirs.length > 0) {
6737
- console.log(` global commands: ${profile.global.commandDirs[0]}`);
6690
+ console.log(` global commands: ${formatPathList(profile.global.commandDirs)}`);
6738
6691
  }
6739
6692
  if (Array.isArray(profile.global.promptDirs) &&
6740
6693
  profile.global.promptDirs.length > 0) {
6741
- console.log(` global prompts: ${profile.global.promptDirs[0]}`);
6694
+ console.log(` global prompts: ${formatPathList(profile.global.promptDirs)}`);
6742
6695
  }
6743
6696
  console.log(` global rules: ${profile.global.ruleFilesByPriority.join(" | ")}`);
6744
6697
  console.log(" default install: workflows/agents/commands/prompts/skills/MCP -> project");
@@ -6765,7 +6718,7 @@ function printRuleSyncResult(result) {
6765
6718
  }
6766
6719
  }
6767
6720
  }
6768
- 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, }) {
6769
6722
  console.log(`\nPlatform: ${platform}`);
6770
6723
  console.log(`Scope: ${scope}`);
6771
6724
  console.log(`Bundle: ${bundleId}`);
@@ -6786,12 +6739,6 @@ function printInstallSummary({ platform, scope, bundleId, installed, skipped, ge
6786
6739
  if (installed.length === 0 && skipped.length === 0) {
6787
6740
  console.log("\nNo changes made.");
6788
6741
  }
6789
- if (generatedWrapperSkills.length > 0) {
6790
- const workflowCount = generatedWrapperSkills.filter((item) => item.kind === "workflow").length;
6791
- const agentCount = generatedWrapperSkills.filter((item) => item.kind === "agent").length;
6792
- console.log(`\nCodex callable wrapper skills: ${generatedWrapperSkills.length} (workflow=${workflowCount}, agent=${agentCount})`);
6793
- console.log("These remain compatibility aliases. Prefer direct /workflow and @agent routing in Codex when available.");
6794
- }
6795
6742
  if (terminalIntegration) {
6796
6743
  console.log("\nAntigravity terminal verification integration:");
6797
6744
  console.log(`- Provider: ${terminalIntegration.provider}`);
@@ -7055,10 +7002,15 @@ async function createDoctorReport({ platform, scope, cwd = process.cwd() }) {
7055
7002
  if (await pathExists(gitignorePath)) {
7056
7003
  const gitignore = await readFile(gitignorePath, "utf8");
7057
7004
  const lines = gitignore.split(/\r?\n/).map((line) => line.trim());
7058
- 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/");
7059
7011
  if (hasAgentIgnore) {
7060
- warnings.push(".agent/ is ignored in .gitignore; this can hide team workflow/rule updates.");
7061
- 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.");
7062
7014
  }
7063
7015
  }
7064
7016
  }
@@ -7349,10 +7301,10 @@ async function upsertTerminalVerificationForInstall({ scope, cwd, terminalIntegr
7349
7301
  };
7350
7302
  }
7351
7303
  async function cleanupAntigravityTerminalIntegration({ scope, cwd, dryRun = false, }) {
7352
- const profilePaths = await resolveArtifactProfilePaths("antigravity", scope, cwd);
7304
+ const profilePaths = await resolveArtifactProfilePaths("antigravity", "project", cwd);
7353
7305
  const integrationDir = getAntigravityTerminalIntegrationDir(profilePaths);
7354
7306
  const dirRemoved = await safeRemove(integrationDir, dryRun);
7355
- const primaryRuleFile = await resolveRuleFilePath("antigravity", scope, cwd);
7307
+ const primaryRuleFile = await resolveRuleFilePath("antigravity", "project", cwd);
7356
7308
  const primaryRule = primaryRuleFile
7357
7309
  ? await removeTerminalVerificationBlock(primaryRuleFile, dryRun)
7358
7310
  : { action: "missing-rule-file", filePath: null };
@@ -7437,21 +7389,6 @@ async function performWorkflowInstall(options, { postmanSelectionOverride = null
7437
7389
  dryRun,
7438
7390
  cwd,
7439
7391
  });
7440
- if (platform === "codex" && scope === "global") {
7441
- const codexProjectPaths = await resolveProfilePaths("codex", "project", cwd);
7442
- if (path.resolve(artifactProfilePaths.workflowsDir) !==
7443
- path.resolve(codexProjectPaths.workflowsDir)) {
7444
- const codexProjectWorkflows = await installCodexProjectWorkflowTemplates({
7445
- bundleId,
7446
- manifest,
7447
- overwrite: Boolean(options.overwrite),
7448
- dryRun,
7449
- cwd,
7450
- });
7451
- installResult.installed.push(...codexProjectWorkflows.installed);
7452
- installResult.skipped.push(...codexProjectWorkflows.skipped);
7453
- }
7454
- }
7455
7392
  await seedRuleFileFromTemplateIfMissing({
7456
7393
  bundleId,
7457
7394
  manifest,
@@ -7526,7 +7463,6 @@ async function runWorkflowInstall(options) {
7526
7463
  bundleId: result.bundleId,
7527
7464
  installed: result.installResult.installed,
7528
7465
  skipped: result.installResult.skipped,
7529
- generatedWrapperSkills: result.installResult.generatedWrapperSkills,
7530
7466
  duplicateSkillCleanup: result.installResult.duplicateSkillCleanup,
7531
7467
  sanitizedSkills: result.installResult.sanitizedSkills,
7532
7468
  sanitizedAgents: result.installResult.sanitizedAgents,
@@ -7743,6 +7679,9 @@ async function runWorkflowRemove(target, options) {
7743
7679
  }
7744
7680
  }
7745
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
+ }
7746
7685
  const workflowFile = await findWorkflowFileByTarget(artifactProfilePaths.workflowsDir, target);
7747
7686
  if (!workflowFile) {
7748
7687
  throw new Error(`Could not find workflow or bundle '${target}' in platform '${platform}'.`);
@@ -7761,21 +7700,22 @@ async function runWorkflowRemove(target, options) {
7761
7700
  removed.push(workflowFile);
7762
7701
  }
7763
7702
  }
7764
- const syncResult = await syncRulesForPlatform({
7765
- platform,
7766
- scope: ruleScope,
7767
- dryRun,
7768
- cwd,
7769
- });
7770
7703
  if (!dryRun && removedType === "bundle") {
7704
+ const ruleFilePath = await resolveRuleFilePath(platform, ruleScope, cwd);
7771
7705
  await recordBundleRemovalState({
7772
- scope,
7706
+ scope: ruleScope,
7773
7707
  platform,
7774
7708
  bundleId: target,
7775
- ruleFilePath: syncResult.filePath,
7709
+ ruleFilePath,
7776
7710
  cwd,
7777
7711
  });
7778
7712
  }
7713
+ const syncResult = await syncRulesForPlatform({
7714
+ platform,
7715
+ scope: ruleScope,
7716
+ dryRun,
7717
+ cwd,
7718
+ });
7779
7719
  printRemoveSummary({
7780
7720
  platform,
7781
7721
  scope,
@@ -8118,13 +8058,13 @@ async function runWorkflowRemoveAll(options) {
8118
8058
  const agentFiles = (platformSpec.agents || []).map((entry) => path.basename(entry));
8119
8059
  const commandFiles = (platformSpec.commands || []).map((entry) => path.basename(entry));
8120
8060
  const promptFiles = (platformSpec.prompts || []).map((entry) => path.basename(entry));
8061
+ const generatedSkillIds = (platformSpec.generatedSkills || []).map((entry) => path.basename(entry));
8121
8062
  const skillIds = await resolveInstallSkillIds({
8122
8063
  platformSpec,
8123
8064
  extraSkillIds: [],
8124
8065
  });
8125
- const wrapperSkillIds = platform === "codex" ? buildCodexWrapperSkillIds(platformSpec) : [];
8126
8066
  const bundleSkillIds = [
8127
- ...new Set([...skillIds, ...wrapperSkillIds]),
8067
+ ...new Set([...skillIds, ...generatedSkillIds]),
8128
8068
  ];
8129
8069
  for (const workflowsDir of alternateWorkflowsDirs) {
8130
8070
  for (const workflowFile of workflowFiles) {
@@ -10402,7 +10342,7 @@ function printInstallEngineeringSummary({ engineeringResults, techResult }) {
10402
10342
  function printInstallDocumentationNotice() {
10403
10343
  console.log("\nProject backbone docs:");
10404
10344
  console.log("- Install only wires the rule references and workflow assets.");
10405
- 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.`);
10406
10346
  }
10407
10347
  async function upsertEngineeringArtifacts({ platform, scope, overwrite = false, skipTech = false, dryRun = false, cwd = process.cwd(), }) {
10408
10348
  const ruleFilePath = await resolveRuleFilePath(platform, scope, cwd);
@@ -10431,6 +10371,7 @@ async function upsertEngineeringArtifacts({ platform, scope, overwrite = false,
10431
10371
  const blockResult = await upsertEngineeringRulesBlock({
10432
10372
  ruleFilePath: target.ruleFilePath,
10433
10373
  platform,
10374
+ memoryFilePath: path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md"),
10434
10375
  productFilePath: scaffold.productPath,
10435
10376
  architectureFilePath: scaffold.architectureDocPath,
10436
10377
  engineeringRulesFilePath: scaffold.engineeringRulesPath,
@@ -10529,7 +10470,7 @@ async function runRulesTechMd(options) {
10529
10470
  function normalizeArchitectureBuildPlatform(value) {
10530
10471
  const normalized = normalizePlatform(value);
10531
10472
  if (!normalized || !ARCHITECTURE_BUILD_PLATFORMS.has(normalized)) {
10532
- 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.");
10533
10474
  }
10534
10475
  return normalized;
10535
10476
  }
@@ -10653,9 +10594,14 @@ async function resolveArchitectureSkillPathHints(platform, cwd, skillIds) {
10653
10594
  .map((filePath) => toPosixPath(path.relative(findWorkspaceRoot(cwd), filePath)));
10654
10595
  }
10655
10596
  function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots, inspectionAnchors, researchMode, coreSkills, conditionalSkills, skillPathHints, }) {
10597
+ const memoryPath = `${FOUNDATION_DOCS_DIR}/MEMORY.md`;
10656
10598
  const productPath = `${FOUNDATION_DOCS_DIR}/PRODUCT.md`;
10657
10599
  const architecturePath = `${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md`;
10658
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`;
10659
10605
  const adrReadmePath = `${FOUNDATION_ADR_DIR}/README.md`;
10660
10606
  const adrTemplatePath = `${FOUNDATION_ADR_DIR}/0000-template.md`;
10661
10607
  const architectureSignals = snapshot.architectureByApp
@@ -10665,6 +10611,7 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10665
10611
  return `${label}: ${item.architectureSignals.join(", ")}`;
10666
10612
  });
10667
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.",
10668
10615
  codex: "You can read, write, and execute shell commands. Use `codex exec` mode.",
10669
10616
  claude: "You can read, write files, and run bash commands. Use non-interactive mode.",
10670
10617
  gemini: "You can read, write files, and run commands within your sandbox. Follow Gemini CLI conventions.",
@@ -10675,7 +10622,7 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10675
10622
  platformCapabilities[platform] || "",
10676
10623
  "",
10677
10624
  "Objective:",
10678
- `- 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}.`,
10679
10626
  "- The content should be primarily AI-authored from repository inspection, not copied from placeholder scaffolding.",
10680
10627
  "- Preserve manual content outside the managed `cbx:*` markers.",
10681
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.",
@@ -10706,6 +10653,17 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10706
10653
  : "none detected"}`,
10707
10654
  `- Inspection anchors: ${inspectionAnchors.length > 0 ? inspectionAnchors.join(", ") : "no concrete anchors detected; inspect the repo root, main source trees, and manifest files manually"}`,
10708
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
+ "",
10709
10667
  "Markdown formatting rules (apply to all generated docs):",
10710
10668
  "- Start each file with a single `# Title` heading. Never use more than one H1 per file.",
10711
10669
  "- Use `## Heading` for major sections, `### Heading` for subsections. Never skip heading levels (e.g., do not jump from `##` to `####`).",
@@ -10728,11 +10686,20 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10728
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.",
10729
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.",
10730
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.",
10731
- `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.`,
10732
- `5. Replace or update only the content between the existing managed markers in ${productPath}, ${architecturePath}, and ${techPath}. Do not append a second marker block.`,
10733
- "",
10734
- `6. In ${productPath}, write a concrete product foundation:`,
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:`,
10735
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.",
10736
10703
  " - Primary users/operators with their key goals.",
10737
10704
  " - Main journeys as numbered sequences an agent can follow to understand the happy path.",
10738
10705
  " - Business capabilities that matter, linked to repo paths that implement them.",
@@ -10740,8 +10707,9 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10740
10707
  " - What future contributors must preserve (invariants, contracts, compatibility guarantees).",
10741
10708
  " - A domain glossary defining project-specific terms, abbreviations, and bounded-context language so AI agents use consistent vocabulary.",
10742
10709
  "",
10743
- `7. In ${architecturePath}, write a lean but detailed architecture backbone in a pragmatic arc42/C4 style:`,
10710
+ `8. In ${architecturePath}, write a lean but detailed architecture backbone in a pragmatic arc42/C4 style:`,
10744
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.",
10745
10713
  " - System purpose, constraints, and architectural drivers.",
10746
10714
  " - Bounded contexts with ownership boundaries mapped to directories.",
10747
10715
  " - Major building blocks as a table or Mermaid C4 diagram with responsibilities.",
@@ -10755,8 +10723,9 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10755
10723
  " - Testing/debugging strategy with concrete test commands and coverage tooling.",
10756
10724
  " - A dedicated folder-structure guide listing every important directory, what it owns, and contributor rules.",
10757
10725
  "",
10758
- `8. In ${techPath}, write the developer-facing technical map that an AI agent can use to start working immediately:`,
10726
+ `9. In ${techPath}, write the developer-facing technical map that an AI agent can use to start working immediately:`,
10759
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.",
10760
10729
  " - Repository layout: directory tree with one-line purpose per directory.",
10761
10730
  " - Entrypoints: the exact files that bootstrap each app/service/CLI.",
10762
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.",
@@ -10771,43 +10740,82 @@ function buildArchitecturePrompt({ platform, workspaceRoot, snapshot, specRoots,
10771
10740
  " - Change hotspots: files/directories that change most often or have the most coupling, so agents know where to look first.",
10772
10741
  " - Practical editing notes: conventions for naming, imports, test file placement, and PR hygiene.",
10773
10742
  "",
10774
- `9. ${techPath} should complement ${architecturePath}; do not repeat the same structure prose unless it helps a developer act faster.`,
10775
- "",
10776
- `10. 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\`.`,
10777
- `11. 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\`.`,
10778
- `12. 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\`.`,
10779
- "",
10780
- "13. Every major claim should be grounded in repository evidence. Mention concrete repo paths in the docs when a structural claim would otherwise be ambiguous.",
10781
- "14. Avoid placeholder filler, generic checklists, and duplicated content across files. Each doc should have a clear job.",
10782
- "15. Do not create ROADMAP.md, ENGINEERING_RULES.md, or other extra docs unless the prompt explicitly asks for them.",
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.",
10783
10781
  researchMode === "never"
10784
- ? "16. Stay repo-only. Do not use outside research."
10785
- : "16. 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.",
10786
10784
  researchMode === "always"
10787
- ? `17. Include an external research evidence subsection in ${techPath} with clearly labeled primary and secondary evidence.`
10788
- : "17. Include external research notes only if they materially informed the architecture update.",
10789
- `18. 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.`,
10790
- `19. Ensure ${adrReadmePath} and ${adrTemplatePath} exist as ADR entrypoints, but keep them lean.`,
10791
- "20. 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.",
10792
- "21. 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.",
10793
- "22. 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.",
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.",
10794
10792
  "",
10795
10793
  "Platform context-loading awareness (these docs will be @imported into agent rule files):",
10796
10794
  "- Claude loads CLAUDE.md at session start via @file imports; each imported doc should be concise and self-contained.",
10797
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.",
10798
10797
  "- Codex concatenates AGENTS.md files root-to-CWD with a default 32 KiB combined limit; keep total foundation doc prose lean.",
10799
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
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.",
10801
10802
  "- Front-load the most actionable information (commands, paths, constraints) in each doc; put supplementary detail later.",
10802
10803
  "",
10803
10804
  "Return one JSON object on the last line with this shape:",
10804
- `{"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":[]}`,
10805
10806
  "",
10806
10807
  "Do not emit placeholder TODOs in the managed sections.",
10807
10808
  ].join("\n");
10808
10809
  }
10809
10810
  let architectureExecFileCaptureOverride = null;
10810
10811
  let architectureSpawnCaptureOverride = null;
10812
+ const WINDOWS_COMMAND_EXTENSION_PREFERENCE = [
10813
+ ".exe",
10814
+ ".cmd",
10815
+ ".bat",
10816
+ ".com",
10817
+ "",
10818
+ ];
10811
10819
  export function __setArchitectureCommandCaptureForTests(overrides = {}) {
10812
10820
  architectureExecFileCaptureOverride =
10813
10821
  overrides.execFileCapture || architectureExecFileCaptureOverride;
@@ -10818,12 +10826,86 @@ export function __resetArchitectureCommandCaptureForTests() {
10818
10826
  architectureExecFileCaptureOverride = null;
10819
10827
  architectureSpawnCaptureOverride = null;
10820
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
+ }
10821
10903
  async function execFileCapture(command, args, options = {}) {
10822
10904
  if (architectureExecFileCaptureOverride) {
10823
10905
  return await architectureExecFileCaptureOverride(command, args, options);
10824
10906
  }
10825
10907
  const resolvedCommand = process.platform === "win32"
10826
- ? await resolveWindowsCommand(command)
10908
+ ? await resolveWindowsCommand(command, options.env)
10827
10909
  : command;
10828
10910
  if (process.platform === "win32" &&
10829
10911
  /\.(cmd|bat)$/i.test(resolvedCommand)) {
@@ -10855,28 +10937,36 @@ async function execFileCapture(command, args, options = {}) {
10855
10937
  };
10856
10938
  }
10857
10939
  }
10858
- async function resolveWindowsCommand(command) {
10940
+ async function resolveWindowsCommand(command, env = process.env) {
10859
10941
  if (process.platform !== "win32")
10860
10942
  return command;
10861
10943
  if (path.isAbsolute(command) || /[\\/]/.test(command))
10862
10944
  return command;
10945
+ const pathCandidate = scanWindowsPathForCommand(command, env);
10863
10946
  try {
10864
10947
  const result = await execFile("where.exe", [command], {
10865
10948
  windowsHide: true,
10866
10949
  maxBuffer: 1024 * 1024,
10867
10950
  });
10868
- const resolved = String(result.stdout || "")
10951
+ const candidates = String(result.stdout || "")
10869
10952
  .split(/\r?\n/)
10870
10953
  .map((line) => line.trim())
10871
- .find(Boolean);
10954
+ .filter(Boolean);
10955
+ const resolved = pickWindowsCommandCandidate(command, candidates);
10872
10956
  if (resolved)
10873
10957
  return resolved;
10874
10958
  }
10875
10959
  catch (error) {
10876
10960
  if (error?.code === "ENOENT") {
10961
+ if (pathCandidate)
10962
+ return pathCandidate;
10877
10963
  throw new Error(`Required CLI '${command}' is not installed or not on PATH.`);
10878
10964
  }
10965
+ if (pathCandidate)
10966
+ return pathCandidate;
10879
10967
  }
10968
+ if (pathCandidate)
10969
+ return pathCandidate;
10880
10970
  const missingError = new Error(`Required CLI '${command}' is not installed or not on PATH.`);
10881
10971
  missingError.code = "ENOENT";
10882
10972
  throw missingError;
@@ -10887,7 +10977,7 @@ async function spawnCapture(command, args, options = {}) {
10887
10977
  }
10888
10978
  const { cwd, env, streamOutput = false, useShell } = options;
10889
10979
  const resolvedCommand = process.platform === "win32"
10890
- ? await resolveWindowsCommand(command)
10980
+ ? await resolveWindowsCommand(command, env)
10891
10981
  : command;
10892
10982
  const shell = typeof useShell === "boolean"
10893
10983
  ? useShell
@@ -10933,7 +11023,7 @@ async function spawnCapture(command, args, options = {}) {
10933
11023
  function explainArchitectureBuildFailure(platform, execution) {
10934
11024
  const combined = String(`${execution.stderr || ""}\n${execution.stdout || ""}`.trim());
10935
11025
  const notes = [];
10936
- if (platform === "gemini") {
11026
+ if (platform === "gemini" || platform === "antigravity") {
10937
11027
  if (combined.includes("Error during discovery for MCP server") ||
10938
11028
  combined.includes("[MCP error]")) {
10939
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.");
@@ -10995,7 +11085,7 @@ async function probeArchitectureAdapter(platform, cwd) {
10995
11085
  },
10996
11086
  };
10997
11087
  }
10998
- if (platform === "gemini") {
11088
+ if (platform === "gemini" || platform === "antigravity") {
10999
11089
  const help = await execFileCapture("gemini", ["--help"], { cwd });
11000
11090
  const helpText = `${help.stdout}\n${help.stderr}`.trim();
11001
11091
  const promptFlag = helpText.includes("--prompt")
@@ -11132,6 +11222,11 @@ async function collapseDuplicateTaggedBlocks({ targetPath, startPattern, endPatt
11132
11222
  return { changed: true };
11133
11223
  }
11134
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
+ });
11135
11230
  await collapseDuplicateTaggedBlocks({
11136
11231
  targetPath: scaffold.productPath,
11137
11232
  startPattern: PRODUCT_FOUNDATION_BLOCK_START_RE,
@@ -11147,18 +11242,51 @@ async function normalizeArchitectureBuildOutputs(scaffold) {
11147
11242
  startPattern: TECH_ARCHITECTURE_BLOCK_START_RE,
11148
11243
  endPattern: TECH_ARCHITECTURE_BLOCK_END_RE,
11149
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
+ }
11150
11257
  }
11151
11258
  async function readArchitectureDriftStatus(workspaceRoot, snapshot) {
11259
+ const memoryPath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md");
11152
11260
  const productPath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "PRODUCT.md");
11153
11261
  const architecturePath = path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "ARCHITECTURE.md");
11154
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");
11155
11267
  const adrReadmePath = path.join(workspaceRoot, FOUNDATION_ADR_DIR, "README.md");
11156
11268
  const metadataPath = path.join(workspaceRoot, ".cbx", ARCHITECTURE_BUILD_METADATA_FILENAME);
11269
+ const memoryExists = await pathExists(memoryPath);
11157
11270
  const productExists = await pathExists(productPath);
11158
11271
  const architectureExists = await pathExists(architecturePath);
11159
11272
  const techExists = await pathExists(techPath);
11273
+ const topicPaths = [
11274
+ domainMemoryPath,
11275
+ runtimeMemoryPath,
11276
+ integrationsMemoryPath,
11277
+ debuggingMemoryPath,
11278
+ ];
11160
11279
  const adrReadmeExists = await pathExists(adrReadmePath);
11161
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
+ }
11162
11290
  let actualProductHash = null;
11163
11291
  let actualArchitectureHash = null;
11164
11292
  let actualTechHash = null;
@@ -11195,6 +11323,18 @@ async function readArchitectureDriftStatus(workspaceRoot, snapshot) {
11195
11323
  if (!adrReadmeExists) {
11196
11324
  findings.push(`${FOUNDATION_ADR_DIR}/README.md is missing.`);
11197
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
+ }
11198
11338
  const metadata = await readJsonFileIfExists(metadataPath);
11199
11339
  if (!metadata.exists) {
11200
11340
  findings.push("Architecture build metadata is missing.");
@@ -11202,6 +11342,7 @@ async function readArchitectureDriftStatus(workspaceRoot, snapshot) {
11202
11342
  return {
11203
11343
  stale: findings.length > 0,
11204
11344
  findings,
11345
+ memoryPath,
11205
11346
  productPath,
11206
11347
  architecturePath,
11207
11348
  techPath,
@@ -11233,7 +11374,7 @@ async function runBuildArchitecture(options) {
11233
11374
  console.log(`Platform: ${platform}`);
11234
11375
  console.log(`Workspace: ${toPosixPath(workspaceRoot)}`);
11235
11376
  console.log(`Status: ${drift.stale ? "stale" : "fresh"}`);
11236
- 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`);
11237
11378
  if (drift.findings.length > 0) {
11238
11379
  console.log("Findings:");
11239
11380
  for (const finding of drift.findings) {
@@ -11246,9 +11387,14 @@ async function runBuildArchitecture(options) {
11246
11387
  return;
11247
11388
  }
11248
11389
  const managedFilePaths = [
11390
+ path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md"),
11249
11391
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "PRODUCT.md"),
11250
11392
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "ARCHITECTURE.md"),
11251
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"),
11252
11398
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "README.md"),
11253
11399
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "0000-template.md"),
11254
11400
  ];
@@ -11276,9 +11422,14 @@ async function runBuildArchitecture(options) {
11276
11422
  const adapter = await probeArchitectureAdapter(platform, workspaceRoot);
11277
11423
  const args = adapter.buildInvocation(prompt);
11278
11424
  const managedTargets = [
11425
+ path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "MEMORY.md"),
11279
11426
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "PRODUCT.md"),
11280
11427
  path.join(workspaceRoot, FOUNDATION_DOCS_DIR, "ARCHITECTURE.md"),
11281
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"),
11282
11433
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "README.md"),
11283
11434
  path.join(workspaceRoot, FOUNDATION_ADR_DIR, "0000-template.md"),
11284
11435
  ].map((filePath) => toPosixPath(filePath));
@@ -11338,9 +11489,14 @@ async function runBuildArchitecture(options) {
11338
11489
  platform,
11339
11490
  researchMode,
11340
11491
  managedDocs: [
11492
+ `${FOUNDATION_DOCS_DIR}/MEMORY.md`,
11341
11493
  `${FOUNDATION_DOCS_DIR}/PRODUCT.md`,
11342
11494
  `${FOUNDATION_DOCS_DIR}/ARCHITECTURE.md`,
11343
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`,
11344
11500
  `${FOUNDATION_ADR_DIR}/README.md`,
11345
11501
  `${FOUNDATION_ADR_DIR}/0000-template.md`,
11346
11502
  ],
@@ -11365,7 +11521,7 @@ async function runBuildArchitecture(options) {
11365
11521
  console.log(`Platform: ${platform}`);
11366
11522
  console.log(`Adapter: ${adapter.binary}`);
11367
11523
  console.log(`Workspace: ${toPosixPath(workspaceRoot)}`);
11368
- 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`);
11369
11525
  console.log(`ADR scaffold: ${FOUNDATION_ADR_DIR}/README.md, ${FOUNDATION_ADR_DIR}/0000-template.md`);
11370
11526
  console.log(`Skill bundle: ${skillBundle.join(", ")}`);
11371
11527
  console.log(`Files written: ${(result.filesWritten || []).join(", ") || "(none reported)"}`);
@@ -11572,7 +11728,6 @@ async function runInitWizard(options) {
11572
11728
  bundleId: installOutcome.bundleId,
11573
11729
  installed: installOutcome.installResult.installed,
11574
11730
  skipped: installOutcome.installResult.skipped,
11575
- generatedWrapperSkills: installOutcome.installResult.generatedWrapperSkills,
11576
11731
  duplicateSkillCleanup: installOutcome.installResult.duplicateSkillCleanup,
11577
11732
  sanitizedSkills: installOutcome.installResult.sanitizedSkills,
11578
11733
  sanitizedAgents: installOutcome.installResult.sanitizedAgents,