@cubis/foundry 0.3.77 → 0.3.78

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 (206) hide show
  1. package/dist/cli/build/commands.js +19 -0
  2. package/dist/cli/build/commands.js.map +1 -0
  3. package/dist/cli/commands/register.js +4 -0
  4. package/dist/cli/commands/register.js.map +1 -1
  5. package/dist/cli/core.js +787 -25
  6. package/dist/cli/core.js.map +1 -1
  7. package/package.json +4 -3
  8. package/src/cli/build/commands.ts +39 -0
  9. package/src/cli/commands/register.ts +6 -0
  10. package/src/cli/core.ts +960 -28
  11. package/workflows/skills/generated/skill-audit.json +11 -2
  12. package/workflows/skills/generated/skill-catalog.json +38 -4
  13. package/workflows/skills/skills_index.json +34 -0
  14. package/workflows/skills/spec-driven-delivery/SKILL.md +63 -0
  15. package/workflows/workflows/agent-environment-setup/generated/route-manifest.json +117 -4
  16. package/workflows/workflows/agent-environment-setup/manifest.json +21 -0
  17. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/accessibility.toml +10 -5
  18. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/architecture.toml +19 -0
  19. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/backend.toml +10 -5
  20. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/create.toml +10 -5
  21. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/database.toml +10 -5
  22. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/debug.toml +10 -5
  23. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/devops.toml +10 -5
  24. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/implement-track.toml +10 -5
  25. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/migrate.toml +10 -5
  26. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/mobile.toml +10 -5
  27. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/onboard.toml +10 -5
  28. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/orchestrate.toml +10 -5
  29. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/plan.toml +10 -5
  30. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/refactor.toml +10 -5
  31. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/release.toml +10 -5
  32. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/review.toml +10 -5
  33. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/security.toml +10 -5
  34. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/spec.toml +19 -0
  35. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/test.toml +10 -5
  36. package/workflows/workflows/agent-environment-setup/platforms/antigravity/commands/vercel.toml +10 -5
  37. package/workflows/workflows/agent-environment-setup/platforms/antigravity/rules/GEMINI.md +3 -1
  38. package/workflows/workflows/agent-environment-setup/platforms/antigravity/skills/spec-driven-delivery/SKILL.md +65 -0
  39. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/architecture.md +82 -0
  40. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/backend.md +3 -0
  41. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/create.md +4 -1
  42. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/database.md +3 -0
  43. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/implement-track.md +7 -1
  44. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/migrate.md +4 -1
  45. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/mobile.md +3 -0
  46. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/onboard.md +1 -0
  47. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/orchestrate.md +6 -1
  48. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/plan.md +12 -2
  49. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/refactor.md +3 -0
  50. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/release.md +3 -0
  51. package/workflows/workflows/agent-environment-setup/platforms/antigravity/workflows/spec.md +81 -0
  52. package/workflows/workflows/agent-environment-setup/platforms/claude/rules/CLAUDE.md +3 -1
  53. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/skills_index.json +34 -0
  54. package/workflows/workflows/agent-environment-setup/platforms/claude/skills/spec-driven-delivery/SKILL.md +66 -0
  55. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/architecture.md +80 -0
  56. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/backend.md +3 -0
  57. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/create.md +4 -1
  58. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/database.md +3 -0
  59. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/implement-track.md +7 -1
  60. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/migrate.md +4 -1
  61. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/mobile.md +3 -0
  62. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/onboard.md +1 -0
  63. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/orchestrate.md +6 -1
  64. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/plan.md +12 -2
  65. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/refactor.md +3 -0
  66. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/release.md +3 -0
  67. package/workflows/workflows/agent-environment-setup/platforms/claude/workflows/spec.md +79 -0
  68. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/backend-specialist.md +1 -1
  69. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/code-archaeologist.md +1 -1
  70. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/database-architect.md +1 -1
  71. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/debugger.md +1 -1
  72. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/devops-engineer.md +1 -1
  73. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/documentation-writer.md +1 -1
  74. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/frontend-specialist.md +1 -1
  75. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/game-developer.md +1 -1
  76. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/mobile-developer.md +1 -1
  77. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/orchestrator.md +1 -1
  78. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/penetration-tester.md +1 -1
  79. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/performance-optimizer.md +1 -1
  80. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/product-manager.md +1 -1
  81. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/project-planner.md +1 -1
  82. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/qa-automation-engineer.md +1 -1
  83. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/researcher.md +1 -1
  84. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/security-auditor.md +1 -1
  85. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/seo-specialist.md +1 -1
  86. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/sre-engineer.md +1 -1
  87. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/test-engineer.md +1 -1
  88. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/validator.md +1 -1
  89. package/workflows/workflows/agent-environment-setup/platforms/codex/agents/vercel-expert.md +1 -1
  90. package/workflows/workflows/agent-environment-setup/platforms/codex/rules/AGENTS.md +3 -1
  91. package/workflows/workflows/agent-environment-setup/platforms/codex/skills/spec-driven-delivery/SKILL.md +65 -0
  92. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/accessibility.md +1 -1
  93. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/architecture.md +82 -0
  94. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/backend.md +4 -1
  95. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/create.md +5 -2
  96. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/database.md +4 -1
  97. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/debug.md +1 -1
  98. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/devops.md +1 -1
  99. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/implement-track.md +8 -2
  100. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/migrate.md +5 -2
  101. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/mobile.md +4 -1
  102. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/onboard.md +2 -1
  103. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/orchestrate.md +7 -2
  104. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/plan.md +13 -3
  105. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/refactor.md +4 -1
  106. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/release.md +4 -1
  107. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/review.md +1 -1
  108. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/security.md +1 -1
  109. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/spec.md +81 -0
  110. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/test.md +1 -1
  111. package/workflows/workflows/agent-environment-setup/platforms/codex/workflows/vercel.md +1 -1
  112. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-accessibility.prompt.md +9 -4
  113. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-architecture.prompt.md +18 -0
  114. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-backend.prompt.md +9 -4
  115. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-create.prompt.md +9 -4
  116. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-database.prompt.md +9 -4
  117. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-debug.prompt.md +9 -4
  118. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-devops.prompt.md +9 -4
  119. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-implement-track.prompt.md +9 -4
  120. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-migrate.prompt.md +9 -4
  121. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-mobile.prompt.md +9 -4
  122. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-onboard.prompt.md +9 -4
  123. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-orchestrate.prompt.md +9 -4
  124. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-plan.prompt.md +9 -4
  125. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-refactor.prompt.md +9 -4
  126. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-release.prompt.md +9 -4
  127. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-review.prompt.md +9 -4
  128. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-security.prompt.md +9 -4
  129. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-spec.prompt.md +18 -0
  130. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-test.prompt.md +9 -4
  131. package/workflows/workflows/agent-environment-setup/platforms/copilot/prompts/workflow-vercel.prompt.md +9 -4
  132. package/workflows/workflows/agent-environment-setup/platforms/copilot/rules/copilot-instructions.md +3 -1
  133. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/skills_index.json +34 -0
  134. package/workflows/workflows/agent-environment-setup/platforms/copilot/skills/spec-driven-delivery/SKILL.md +70 -0
  135. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/architecture.md +80 -0
  136. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/backend.md +3 -0
  137. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/create.md +4 -1
  138. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/database.md +3 -0
  139. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/implement-track.md +7 -1
  140. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/migrate.md +4 -1
  141. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/mobile.md +3 -0
  142. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/onboard.md +1 -0
  143. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/orchestrate.md +6 -1
  144. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/plan.md +12 -2
  145. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/refactor.md +3 -0
  146. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/release.md +3 -0
  147. package/workflows/workflows/agent-environment-setup/platforms/copilot/workflows/spec.md +79 -0
  148. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/accessibility.toml +10 -5
  149. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/architecture.toml +19 -0
  150. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/backend.toml +10 -5
  151. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/create.toml +10 -5
  152. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/database.toml +10 -5
  153. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/debug.toml +10 -5
  154. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/devops.toml +10 -5
  155. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/implement-track.toml +10 -5
  156. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/migrate.toml +10 -5
  157. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/mobile.toml +10 -5
  158. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/onboard.toml +10 -5
  159. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/orchestrate.toml +10 -5
  160. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/plan.toml +10 -5
  161. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/refactor.toml +10 -5
  162. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/release.toml +10 -5
  163. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/review.toml +10 -5
  164. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/security.toml +10 -5
  165. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/spec.toml +19 -0
  166. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/test.toml +10 -5
  167. package/workflows/workflows/agent-environment-setup/platforms/gemini/commands/vercel.toml +10 -5
  168. package/workflows/workflows/agent-environment-setup/platforms/gemini/rules/GEMINI.md +3 -1
  169. package/workflows/workflows/agent-environment-setup/platforms/gemini/skills/spec-driven-delivery/SKILL.md +65 -0
  170. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/architecture.md +82 -0
  171. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/backend.md +3 -0
  172. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/create.md +4 -1
  173. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/database.md +3 -0
  174. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/implement-track.md +7 -1
  175. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/migrate.md +4 -1
  176. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/mobile.md +3 -0
  177. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/onboard.md +1 -0
  178. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/orchestrate.md +6 -1
  179. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/plan.md +12 -2
  180. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/refactor.md +3 -0
  181. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/release.md +3 -0
  182. package/workflows/workflows/agent-environment-setup/platforms/gemini/workflows/spec.md +81 -0
  183. package/workflows/workflows/agent-environment-setup/shared/agents/backend-specialist.md +5 -5
  184. package/workflows/workflows/agent-environment-setup/shared/agents/database-architect.md +3 -3
  185. package/workflows/workflows/agent-environment-setup/shared/agents/orchestrator.md +8 -8
  186. package/workflows/workflows/agent-environment-setup/shared/agents/penetration-tester.md +3 -3
  187. package/workflows/workflows/agent-environment-setup/shared/agents/product-manager.md +6 -6
  188. package/workflows/workflows/agent-environment-setup/shared/agents/project-planner.md +8 -8
  189. package/workflows/workflows/agent-environment-setup/shared/agents/researcher.md +8 -8
  190. package/workflows/workflows/agent-environment-setup/shared/agents/security-auditor.md +2 -2
  191. package/workflows/workflows/agent-environment-setup/shared/rules/STEERING.md +13 -0
  192. package/workflows/workflows/agent-environment-setup/shared/rules/overrides/codex.md +3 -3
  193. package/workflows/workflows/agent-environment-setup/shared/workflows/architecture.md +80 -0
  194. package/workflows/workflows/agent-environment-setup/shared/workflows/backend.md +8 -5
  195. package/workflows/workflows/agent-environment-setup/shared/workflows/create.md +5 -2
  196. package/workflows/workflows/agent-environment-setup/shared/workflows/database.md +6 -3
  197. package/workflows/workflows/agent-environment-setup/shared/workflows/implement-track.md +12 -6
  198. package/workflows/workflows/agent-environment-setup/shared/workflows/migrate.md +7 -4
  199. package/workflows/workflows/agent-environment-setup/shared/workflows/mobile.md +3 -0
  200. package/workflows/workflows/agent-environment-setup/shared/workflows/onboard.md +6 -5
  201. package/workflows/workflows/agent-environment-setup/shared/workflows/orchestrate.md +10 -5
  202. package/workflows/workflows/agent-environment-setup/shared/workflows/plan.md +17 -7
  203. package/workflows/workflows/agent-environment-setup/shared/workflows/refactor.md +5 -2
  204. package/workflows/workflows/agent-environment-setup/shared/workflows/release.md +3 -0
  205. package/workflows/workflows/agent-environment-setup/shared/workflows/security.md +2 -2
  206. package/workflows/workflows/agent-environment-setup/shared/workflows/spec.md +79 -0
@@ -0,0 +1,81 @@
1
+ ---
2
+ command: "/spec"
3
+ description: "Create or refresh a Git-tracked spec pack for non-trivial work, including acceptance criteria, traceability, architecture impact, and next-route handoff."
4
+ triggers:
5
+ [
6
+ "spec",
7
+ "sdd",
8
+ "source of truth",
9
+ "traceability",
10
+ "acceptance criteria",
11
+ "openspec",
12
+ "requirements",
13
+ "architecture impact",
14
+ ]
15
+ ---
16
+
17
+ # Spec Workflow
18
+
19
+ ## When to use
20
+
21
+ Use this for non-trivial work that needs durable planning in Git before implementation: medium or large features, multi-step changes, cross-session work, migrations, risky refactors, or any request that needs explicit acceptance and traceability.
22
+
23
+ ## Routing
24
+
25
+ - Primary coordinator: `the project-planner posture`
26
+ - Traceability and requirements support: `the researcher posture`
27
+ - Cross-domain coordination: `the orchestrator posture`
28
+ - Documentation and structure support: `the documentation-writer posture`
29
+
30
+ ## Skill Routing
31
+
32
+ - Primary skills: `spec-driven-delivery`, `sadd`
33
+ - Supporting skills (optional): `system-design`, `architecture-doc`, `deep-research`, `api-design`, `database-design`, `tech-doc`
34
+ - Start with `spec-driven-delivery` for the pack structure and handoff contract. Add `sadd` when mining requirements into testable assertions, `system-design` or `architecture-doc` when the spec changes structure, and `deep-research` only when repo-local evidence is insufficient.
35
+
36
+ ## Workflow steps
37
+
38
+ 1. Determine whether the task is non-trivial enough to justify a spec pack.
39
+ 2. Find an existing `docs/specs/<spec-id>/` pack or create a new stable `spec_id`.
40
+ 3. Write or refresh the spec pack with brief, acceptance, tasks, traceability, and handoff files.
41
+ 4. Record `architecture_impact`, `doc_impact`, and any required updates to `ENGINEERING_RULES.md` or `TECH.md`.
42
+ 5. Identify the next execution route and hand off without replanning the same work.
43
+
44
+ ## Context notes
45
+
46
+ - Read `ENGINEERING_RULES.md` first and `TECH.md` next when they exist because they define the accepted architecture contract and current state.
47
+ - Prefer repo evidence first; escalate to `deep-research` only when freshness, public comparison, or explicit research requests require it.
48
+ - Keep spec packs lean. Trivial one-step tasks should stay on the lightweight path with no new spec directory.
49
+
50
+ ## Verification
51
+
52
+ - `spec_id` and `spec_root` are stable and explicit.
53
+ - Acceptance criteria are testable and traceable.
54
+ - Task dependencies form a valid execution order.
55
+ - `architecture_impact`, `doc_impact`, and `traceability_status` are present.
56
+
57
+ ## Output Contract
58
+
59
+ ```yaml
60
+ SPEC_WORKFLOW_RESULT:
61
+ primary_agent: project-planner
62
+ supporting_agents: [researcher?, orchestrator?, documentation-writer?]
63
+ primary_skills: [spec-driven-delivery, sadd]
64
+ supporting_skills: [system-design?, architecture-doc?, deep-research?, api-design?, database-design?, tech-doc?]
65
+ spec_id: <string>
66
+ spec_root: docs/specs/<spec-id>
67
+ architecture_impact:
68
+ summary: <string>
69
+ affects_structure: true | false
70
+ affects_design_system: true | false
71
+ affects_testing_strategy: true | false
72
+ doc_impact: none | tech | rules | both
73
+ traceability_status: complete | partial | blocked
74
+ documents:
75
+ created: [<path>] | []
76
+ updated: [<path>] | []
77
+ next_route: </create | /implement-track | /orchestrate | /architecture | direct>
78
+ gaps: [<string>] | []
79
+ ```
80
+
81
+ > **Gemini note:** Commands route into workflow files under `.gemini/workflows/`. Specialists are inline postures coordinated through GEMINI.md guidance, not separate agent artifacts.
@@ -4,7 +4,7 @@ description: Backend specialist for API contracts, service logic, schema-aware b
4
4
  tools: Read, Grep, Glob, Bash, Edit, Write
5
5
  model: inherit
6
6
  maxTurns: 25
7
- skills: api-designer, api-patterns, architecture-designer, auth-architect, database-skills, database-design, database-optimizer, drizzle-expert, firebase, microservices-architect, nodejs-best-practices, nestjs-expert, fastapi-expert, graphql-architect, stripe-best-practices, serverless-patterns, i18n-localization, typescript-pro, javascript-pro, python-pro, golang-pro, java-pro, csharp-pro, kotlin-pro, rust-pro, php-pro, ruby-pro
7
+ skills: api-design, api-patterns, system-design, auth-architect, database-design, database-design, database-optimizer, drizzle-expert, firebase, microservices-architect, nodejs-best-practices, nestjs-expert, fastapi-expert, graphql-architect, stripe-best-practices, serverless-patterns, i18n-localization, typescript-pro, javascript-pro, python-pro, golang-pro, java-pro, csharp-pro, kotlin-pro, rust-pro, php-pro, ruby-pro
8
8
  handoffs:
9
9
  - agent: "test-engineer"
10
10
  title: "Test Backend"
@@ -20,10 +20,10 @@ Build backend systems that stay correct under production pressure.
20
20
 
21
21
  - Do not call `skill_search` for any skill in the pre-declared list when the task clearly falls into that domain.
22
22
  - Load one primary skill first based on the dominant concern:
23
- - `api-designer` for API contract shape, versioning, or endpoint design
23
+ - `api-design` for API contract shape, versioning, or endpoint design
24
24
  - `api-patterns` for REST/RPC conventions and HTTP semantics
25
25
  - `auth-architect` for authentication, authorization, session, RBAC, or SSO flows
26
- - `database-skills` for schema design, query optimization, or migration planning
26
+ - `database-design` for schema design, query optimization, or migration planning
27
27
  - `nestjs-expert` for NestJS-specific module, provider, or decorator patterns
28
28
  - `fastapi-expert` for FastAPI route, dependency injection, or Pydantic model patterns
29
29
  - `graphql-architect` for GraphQL schema, resolver, or subscription design
@@ -40,10 +40,10 @@ Load on demand. Do not preload all references.
40
40
 
41
41
  | File | Load when |
42
42
  | ------------------------- | ---------------------------------------------------------------------------- |
43
- | `api-designer` | Designing new API contracts, versioning, or endpoint shape. |
43
+ | `api-design` | Designing new API contracts, versioning, or endpoint shape. |
44
44
  | `api-patterns` | REST/RPC conventions, HTTP status codes, or pagination patterns. |
45
45
  | `auth-architect` | Auth flows, token management, session design, or access control. |
46
- | `database-skills` | Schema design, query optimization, or migration strategy. |
46
+ | `database-design` | Schema design, query optimization, or migration strategy. |
47
47
  | `nestjs-expert` | NestJS modules, providers, guards, interceptors, or decorators. |
48
48
  | `fastapi-expert` | FastAPI routes, middleware, Pydantic models, or async patterns. |
49
49
  | `graphql-architect` | GraphQL schema design, resolvers, or subscription patterns. |
@@ -4,7 +4,7 @@ description: Expert database architect for schema design, query optimization, mi
4
4
  tools: Read, Grep, Glob, Bash, Edit, Write
5
5
  model: inherit
6
6
  maxTurns: 25
7
- skills: architecture-designer, database-skills, database-design, database-optimizer, drizzle-expert, postgres, mysql, sqlite, mongodb, redis, supabase, firebase, vitess, neki, typescript-pro, javascript-pro, python-pro, golang-pro, java-pro, php-pro, ruby-pro
7
+ skills: system-design, database-design, database-design, database-optimizer, drizzle-expert, postgres, mysql, sqlite, mongodb, redis, supabase, firebase, vitess, neki, typescript-pro, javascript-pro, python-pro, golang-pro, java-pro, php-pro, ruby-pro
8
8
  handoffs:
9
9
  - agent: "backend-specialist"
10
10
  title: "Implement Schema Changes"
@@ -22,7 +22,7 @@ Design and operate data systems that stay correct, performant, and evolvable und
22
22
  - Load one primary skill first based on the dominant concern:
23
23
  - `database-design` for schema normalization, entity modeling, or relationship design
24
24
  - `database-optimizer` for query performance, index strategy, or execution plan analysis
25
- - `database-skills` for cross-cutting database operations and migration patterns
25
+ - `database-design` for cross-cutting database operations and migration patterns
26
26
  - `drizzle-expert` for Drizzle ORM schema, queries, or TypeScript-first database access
27
27
  - `postgres` / `mysql` / `sqlite` / `mongodb` / `redis` for engine-specific patterns
28
28
  - `supabase` / `firebase` / `vitess` / `neki` for platform-specific database behavior
@@ -37,7 +37,7 @@ Load on demand. Do not preload all references.
37
37
  | -------------------- | --------------------------------------------------------------------------- |
38
38
  | `database-design` | Schema normalization, entity relationships, or data modeling decisions. |
39
39
  | `database-optimizer` | Query performance, index strategy, or EXPLAIN analysis. |
40
- | `database-skills` | Cross-cutting operations, migration patterns, or general database guidance. |
40
+ | `database-design` | Cross-cutting operations, migration patterns, or general database guidance. |
41
41
  | `drizzle-expert` | Drizzle ORM schema definitions, queries, or migrations. |
42
42
  | `postgres` | PostgreSQL-specific features, extensions, or tuning. |
43
43
  | `mysql` | MySQL-specific features, replication, or optimization. |
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Bash, Write, Edit
5
5
  model: inherit
6
6
  maxTurns: 30
7
7
  memory: project
8
- skills: architecture-designer, api-designer, database-skills, deep-research, mcp-builder, openai-docs, prompt-engineer, skill-creator, typescript-pro, javascript-pro, python-pro
8
+ skills: system-design, api-design, database-design, deep-research, mcp-server-builder, openai-docs, prompt-engineering, skill-creator, typescript-pro, javascript-pro, python-pro
9
9
  handoffs:
10
10
  - agent: "validator"
11
11
  title: "Validate Results"
@@ -31,8 +31,8 @@ Your only permitted actions:
31
31
 
32
32
  ## Skill Loading Contract
33
33
 
34
- - Do not call `skill_search` for `architecture-designer`, `api-designer`, `database-skills`, `deep-research`, `mcp-builder`, `openai-docs`, `prompt-engineer`, or `skill-creator` when the task is clearly multi-stream coordination, planning, architecture design, contract design, research, or skill package work.
35
- - Use `architecture-designer` when the coordination problem is really a design tradeoff problem, `api-designer` when integration contracts are the coordination bottleneck, `database-skills` when the shared dependency is a data-model or migration concern, `deep-research` when the coordination risk is stale or conflicting external information, `mcp-builder` for MCP-specific streams, `openai-docs` for OpenAI-doc verification streams, `prompt-engineer` for instruction-quality streams, and `skill-creator` when the coordinated changes are in skills, mirrors, routing, or packaging.
34
+ - Do not call `skill_search` for `system-design`, `api-design`, `database-design`, `deep-research`, `mcp-server-builder`, `openai-docs`, `prompt-engineering`, or `skill-creator` when the task is clearly multi-stream coordination, planning, architecture design, contract design, research, or skill package work.
35
+ - Use `system-design` when the coordination problem is really a design tradeoff problem, `api-design` when integration contracts are the coordination bottleneck, `database-design` when the shared dependency is a data-model or migration concern, `deep-research` when the coordination risk is stale or conflicting external information, `mcp-server-builder` for MCP-specific streams, `openai-docs` for OpenAI-doc verification streams, `prompt-engineering` for instruction-quality streams, and `skill-creator` when the coordinated changes are in skills, mirrors, routing, or packaging.
36
36
  - Prefer platform-native delegation features when available, but keep the orchestration contract stable even when execution stays in a single track.
37
37
  - Use `skill_validate` before `skill_get`, and use `skill_get_reference` only for the specific sidecar file needed by the current coordination step.
38
38
 
@@ -42,13 +42,13 @@ Load on demand. Do not preload all references.
42
42
 
43
43
  | File | Load when |
44
44
  | ----------------------- | --------------------------------------------------------------------------------------------------------- |
45
- | `architecture-designer` | Coordination depends on resolving system design or interface tradeoffs first. |
46
- | `api-designer` | The critical shared dependency is an API contract or integration boundary. |
47
- | `database-skills` | The coordination risk centers on schema, migration, data ownership, or engine choice. |
45
+ | `system-design` | Coordination depends on resolving system design or interface tradeoffs first. |
46
+ | `api-design` | The critical shared dependency is an API contract or integration boundary. |
47
+ | `database-design` | The coordination risk centers on schema, migration, data ownership, or engine choice. |
48
48
  | `deep-research` | External sources, latest information, or public-repo comparisons are blocking confident execution. |
49
- | `mcp-builder` | One stream is MCP server design, tool shape, or transport selection. |
49
+ | `mcp-server-builder` | One stream is MCP server design, tool shape, or transport selection. |
50
50
  | `openai-docs` | One stream needs current OpenAI docs or version-specific behavior verification. |
51
- | `prompt-engineer` | One stream is repairing prompts, agent rules, or instruction quality. |
51
+ | `prompt-engineering` | One stream is repairing prompts, agent rules, or instruction quality. |
52
52
  | `skill-creator` | The coordinated work includes creating, repairing, or adapting skill packages across generated platforms. |
53
53
 
54
54
  ## When to Use
@@ -22,7 +22,7 @@ triggers:
22
22
  tools: Read, Grep, Glob, Bash
23
23
  model: inherit
24
24
  maxTurns: 25
25
- skills: security-engineer, vulnerability-scanner, auth-architect, api-designer, typescript-pro, javascript-pro, python-pro, golang-pro, rust-pro
25
+ skills: security-engineer, vulnerability-scanner, auth-architect, api-design, typescript-pro, javascript-pro, python-pro, golang-pro, rust-pro
26
26
  handoffs:
27
27
  - agent: "security-auditor"
28
28
  title: "Review Findings"
@@ -39,7 +39,7 @@ Map attack surfaces, validate exploitability, and provide actionable remediation
39
39
  - `security-engineer` for OWASP methodology, threat modeling, and secure architecture review
40
40
  - `vulnerability-scanner` for dependency scanning, SAST/DAST tooling, and CVE assessment
41
41
  - `auth-architect` for authentication bypass, privilege escalation, or session hijacking analysis
42
- - `api-designer` for API security review, input validation gaps, or rate limiting assessment
42
+ - `api-design` for API security review, input validation gaps, or rate limiting assessment
43
43
  - Use `skill_validate` before `skill_get`, and use `skill_get_reference` only for the specific sidecar file needed.
44
44
 
45
45
  ## Skill References
@@ -49,7 +49,7 @@ Map attack surfaces, validate exploitability, and provide actionable remediation
49
49
  | `security-engineer` | OWASP methodology, threat modeling, or secure architecture review. |
50
50
  | `vulnerability-scanner` | Dependency scanning, SAST/DAST analysis, or CVE assessment. |
51
51
  | `auth-architect` | Auth bypass, privilege escalation, or session hijacking analysis. |
52
- | `api-designer` | API security gaps, input validation, or rate limiting review. |
52
+ | `api-design` | API security gaps, input validation, or rate limiting review. |
53
53
 
54
54
  ## Operating Stance
55
55
 
@@ -19,7 +19,7 @@ triggers:
19
19
  tools: Read, Grep, Glob, Bash
20
20
  model: inherit
21
21
  maxTurns: 25
22
- skills: architecture-designer, api-designer, skill-creator, typescript-pro, javascript-pro
22
+ skills: system-design, api-design, skill-creator, typescript-pro, javascript-pro
23
23
  ---
24
24
 
25
25
  # Product Manager
@@ -28,9 +28,9 @@ Turn ambiguous requests into clear, testable feature definitions with prioritize
28
28
 
29
29
  ## Skill Loading Contract
30
30
 
31
- - Do not call `skill_search` for `architecture-designer` or `api-designer` when the task is clearly product definition, requirements, or feature scoping.
32
- - Load `architecture-designer` when the product decision has system design implications.
33
- - Load `api-designer` when the feature definition needs API contract clarity.
31
+ - Do not call `skill_search` for `system-design` or `api-design` when the task is clearly product definition, requirements, or feature scoping.
32
+ - Load `system-design` when the product decision has system design implications.
33
+ - Load `api-design` when the feature definition needs API contract clarity.
34
34
  - Load `skill-creator` only when defining requirements for skill packages.
35
35
  - Use `skill_validate` before `skill_get`, and use `skill_get_reference` only for the specific sidecar file needed.
36
36
 
@@ -38,8 +38,8 @@ Turn ambiguous requests into clear, testable feature definitions with prioritize
38
38
 
39
39
  | File | Load when |
40
40
  | ----------------------- | ------------------------------------------------------------------- |
41
- | `architecture-designer` | Product decision has system design or architecture implications. |
42
- | `api-designer` | Feature needs API contract definition or integration specification. |
41
+ | `system-design` | Product decision has system design or architecture implications. |
42
+ | `api-design` | Feature needs API contract definition or integration specification. |
43
43
  | `skill-creator` | Defining requirements for skill packages. |
44
44
 
45
45
  ## Operating Stance
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Bash, Edit, Write
5
5
  model: inherit
6
6
  maxTurns: 30
7
7
  memory: project
8
- skills: architecture-designer, api-designer, database-skills, deep-research, mcp-builder, openai-docs, prompt-engineer, skill-creator, typescript-pro, javascript-pro, python-pro
8
+ skills: system-design, api-design, database-design, deep-research, mcp-server-builder, openai-docs, prompt-engineering, skill-creator, typescript-pro, javascript-pro, python-pro
9
9
  handoffs:
10
10
  - agent: "orchestrator"
11
11
  title: "Start Implementation"
@@ -21,9 +21,9 @@ Decompose complex requests into implementable plans with clear ownership, depend
21
21
  ## Skill Loading Contract
22
22
 
23
23
  - Do not call `skill_search` for any skill in the pre-declared list when the task is clearly project planning, architecture design, or task decomposition.
24
- - Load `architecture-designer` for system design tradeoffs in the plan.
25
- - Load `api-designer` when the plan involves API contract decisions.
26
- - Load `database-skills` when the plan involves data modeling or migration.
24
+ - Load `system-design` for system design tradeoffs in the plan.
25
+ - Load `api-design` when the plan involves API contract decisions.
26
+ - Load `database-design` when the plan involves data modeling or migration.
27
27
  - Load `deep-research` when planning requires fresh external information, public comparison, or evidence beyond the repo.
28
28
  - Use `skill_validate` before `skill_get`, and use `skill_get_reference` only for the specific sidecar file needed.
29
29
 
@@ -31,11 +31,11 @@ Decompose complex requests into implementable plans with clear ownership, depend
31
31
 
32
32
  | File | Load when |
33
33
  | ----------------------- | ------------------------------------------------------------------ |
34
- | `architecture-designer` | Plan involves system design tradeoffs or component boundaries. |
35
- | `api-designer` | Plan involves API contract decisions or integration points. |
36
- | `database-skills` | Plan involves data modeling, schema design, or migration strategy. |
34
+ | `system-design` | Plan involves system design tradeoffs or component boundaries. |
35
+ | `api-design` | Plan involves API contract decisions or integration points. |
36
+ | `database-design` | Plan involves data modeling, schema design, or migration strategy. |
37
37
  | `deep-research` | Planning requires external research or approach comparison. |
38
- | `mcp-builder` | Plan involves MCP server or tool implementation. |
38
+ | `mcp-server-builder` | Plan involves MCP server or tool implementation. |
39
39
  | `skill-creator` | Plan involves skill package creation or modification. |
40
40
 
41
41
  ## Operating Stance
@@ -18,7 +18,7 @@ tools: Read, Grep, Glob, Bash
18
18
  model: inherit
19
19
  maxTurns: 30
20
20
  memory: project
21
- skills: deep-research, architecture-designer, database-skills, openai-docs, prompt-engineer
21
+ skills: deep-research, system-design, database-design, openai-docs, prompt-engineering
22
22
  handoffs:
23
23
  - agent: "project-planner"
24
24
  title: "Plan Implementation"
@@ -30,12 +30,12 @@ Investigate thoroughly, synthesize findings, and deliver structured knowledge be
30
30
 
31
31
  ## Skill Loading Contract
32
32
 
33
- - Do not call `skill_search` for `deep-research`, `architecture-designer`, `database-skills`, `openai-docs`, or `prompt-engineer` when the task is clearly research work.
33
+ - Do not call `skill_search` for `deep-research`, `system-design`, `database-design`, `openai-docs`, or `prompt-engineering` when the task is clearly research work.
34
34
  - Load `deep-research` first for all research tasks — it defines the source ladder, evidence labeling, and research output contract.
35
- - Add `architecture-designer` when research involves system design patterns or tradeoffs.
36
- - Add `database-skills` when research involves data storage options or migration approaches.
35
+ - Add `system-design` when research involves system design patterns or tradeoffs.
36
+ - Add `database-design` when research involves data storage options or migration approaches.
37
37
  - Add `openai-docs` when research involves OpenAI API or model behavior verification.
38
- - Add `prompt-engineer` when research involves prompt design or instruction optimization.
38
+ - Add `prompt-engineering` when research involves prompt design or instruction optimization.
39
39
  - Use `skill_validate` before `skill_get`, and use `skill_get_reference` only for the specific sidecar file needed.
40
40
 
41
41
  ## Skill References
@@ -43,10 +43,10 @@ Investigate thoroughly, synthesize findings, and deliver structured knowledge be
43
43
  | File | Load when |
44
44
  | ----------------------- | --------------------------------------------------------------------- |
45
45
  | `deep-research` | All research tasks — defines the core research methodology. |
46
- | `architecture-designer` | Research involves system design patterns or architectural tradeoffs. |
47
- | `database-skills` | Research involves data storage, database comparison, or migration. |
46
+ | `system-design` | Research involves system design patterns or architectural tradeoffs. |
47
+ | `database-design` | Research involves data storage, database comparison, or migration. |
48
48
  | `openai-docs` | Research involves OpenAI API, model behavior, or version differences. |
49
- | `prompt-engineer` | Research involves prompt design or instruction optimization. |
49
+ | `prompt-engineering` | Research involves prompt design or instruction optimization. |
50
50
 
51
51
  ## Operating Stance
52
52
 
@@ -30,7 +30,7 @@ triggers:
30
30
  tools: Read, Grep, Glob, Bash, Edit, Write
31
31
  model: inherit
32
32
  maxTurns: 25
33
- skills: security-engineer, auth-architect, vulnerability-scanner, static-analysis, api-designer, graphql-architect, nodejs-best-practices, nestjs-expert, fastapi-expert, typescript-pro, javascript-pro, python-pro, golang-pro, rust-pro
33
+ skills: security-engineer, auth-architect, vulnerability-scanner, static-analysis, api-design, graphql-architect, nodejs-best-practices, nestjs-expert, fastapi-expert, typescript-pro, javascript-pro, python-pro, golang-pro, rust-pro
34
34
  handoffs:
35
35
  - agent: "penetration-tester"
36
36
  title: "Run Exploit Simulation"
@@ -61,7 +61,7 @@ Review code and architecture for exploitability with evidence-first triage and a
61
61
  | `auth-architect` | Auth flow review, token management, session design, or access control audit. |
62
62
  | `vulnerability-scanner` | Dependency scanning, SAST/DAST results, or CVE triage. |
63
63
  | `static-analysis` | Automated code analysis, linting for security rules, or code quality tools. |
64
- | `api-designer` | API security review — rate limiting, input validation, auth headers. |
64
+ | `api-design` | API security review — rate limiting, input validation, auth headers. |
65
65
  | `graphql-architect` | GraphQL-specific security — depth limiting, introspection, authorization. |
66
66
 
67
67
  ## Exploitability-First Triage
@@ -21,6 +21,10 @@ Follow this decision tree for EVERY user request:
21
21
  │ └─ Run skill_validate on that exact ID.
22
22
  │ ├─ Valid? → Load it and proceed. Stop.
23
23
  │ └─ Invalid/unavailable? → Fall through. Do not guess.
24
+ ├─ Is it non-trivial work with requirements, traceability, or spec language?
25
+ │ └─ Prefer /spec unless the user already chose another valid route. Stop.
26
+ ├─ Is it architecture, design-system, ADR, or structure-governance work?
27
+ │ └─ Prefer /architecture unless the user already chose another valid route. Stop.
24
28
  ├─ Is it multi-step work in ONE domain?
25
29
  │ └─ Pick the best-fit workflow. Load it. Stop.
26
30
  ├─ Is it cross-domain work spanning 2+ specialties?
@@ -33,6 +37,7 @@ Follow this decision tree for EVERY user request:
33
37
 
34
38
  > **Rule:** Inspect the repo and task locally BEFORE choosing a route or loading any skill.
35
39
  > **Rule:** If the user already chose the route, do not re-route it unless the named workflow, agent, or skill is invalid.
40
+ > **Rule:** For non-trivial work, read `ENGINEERING_RULES.md` first and `TECH.md` next when they exist before planning or implementing.
36
41
 
37
42
  ---
38
43
 
@@ -48,6 +53,8 @@ Follow this decision tree for EVERY user request:
48
53
  | **skill_search** | Fuzzy discovery tool | Domain unclear, no skill ID known yet | One narrow search AFTER route_resolve | "what skill covers Prisma?" |
49
54
  | **route_resolve** | Intent → route mapper | Free-text request doesn't match any known route | MCP tool call with task description | "I need to optimize my database" |
50
55
  | **Orchestrator** | Multi-specialist coordinator | Work genuinely spans 2+ domains | `/orchestrate` or `@orchestrator` | "build full-stack feature with auth" |
56
+ | **Spec workflow** | Git-tracked spec pack | Non-trivial work needs durable scope, acceptance, and traceability | `/spec` | "turn this feature into an implementation spec" |
57
+ | **Architecture workflow** | Architecture and design-system memory | Need to refresh structure, flows, ADRs, or design-system rules | `/architecture` | "update the clean architecture contract" |
51
58
 
52
59
  ---
53
60
 
@@ -65,6 +72,7 @@ Skills are **supporting context** unless the user explicitly named the exact ski
65
72
  8. Load reference files one at a time with `skill_get_reference` — only when a specific reference is needed.
66
73
  9. Do not auto-prime every specialist. Only load what `primarySkills` recommends or the task clearly needs.
67
74
  10. Never pass workflow IDs or agent IDs to skill tools.
75
+ 11. For `/architecture` and strict subprocess architecture generation, treat the skill bundle as already resolved. Attach the named skills directly instead of discovering them lazily.
68
76
 
69
77
  ---
70
78
 
@@ -89,6 +97,8 @@ Research output contract:
89
97
  - **Gaps / unknowns** — what could not be verified.
90
98
  - **Recommended next route** — workflow, agent, or skill to use after research.
91
99
 
100
+ When the research result shows a change to project structure, boundaries, design system, or testing strategy, surface `doc_impact` and recommend `/architecture` or a managed-doc refresh before or after implementation.
101
+
92
102
  ---
93
103
 
94
104
  ## 4) Specialists
@@ -154,7 +164,9 @@ Use the best specialist first:
154
164
 
155
165
  | Intent Pattern | Workflow | Primary Agent |
156
166
  | --------------------------------------- | ------------------ | ---------------------- |
167
+ | Build a spec pack with traceability | `/spec` | `@project-planner` |
157
168
  | Plan a feature, design, or architecture | `/plan` | `@project-planner` |
169
+ | Refresh architecture or design-system docs | `/architecture` | `@project-planner` |
158
170
  | Implement a feature with quality gates | `/create` | varies by domain |
159
171
  | Debug a complex issue | `/debug` | `@debugger` |
160
172
  | Write or verify tests | `/test` | `@test-engineer` |
@@ -183,6 +195,7 @@ Use the best specialist first:
183
195
  4. State what was NOT validated.
184
196
  5. Use web search only when information may be stale, public comparison matters, or the user explicitly asks.
185
197
  6. Prefer official docs first. Treat Reddit/community sources as secondary evidence and label them that way.
198
+ 7. If the task changes project structure, scaling assumptions, or design-system rules, update or flag `ENGINEERING_RULES.md` and `TECH.md`.
186
199
 
187
200
  ---
188
201
 
@@ -16,8 +16,8 @@
16
16
  ## Sandbox Constraints
17
17
 
18
18
  - Codex runs in an isolated sandbox — no persistent external network access by default.
19
- - All specialist references are **postures within the current session** Codex does not spawn isolated subagents.
20
- - `@specialist` means: adopt that specialist's domain, reasoning style, and scope constraints internally.
19
+ - Prefer native Codex delegation when the host exposes it cleanly. If native delegation is unavailable, treat specialist references as in-session postures.
20
+ - `@specialist` means: use the platform's native delegation surface when available, otherwise adopt that specialist's domain, reasoning style, and scope constraints inline.
21
21
  - Prefer local file inspection over external fetches. Default to repo-grounded reasoning.
22
22
  - Foundry MCP tools (`skill_get`, `skill_search`, `skill_validate`, `route_resolve`) are available when the MCP server is connected. After `route_resolve`, load the returned `primarySkillHint` or `primarySkills[0]` via `skill_validate` → `skill_get` before executing non-trivial tasks.
23
23
 
@@ -25,5 +25,5 @@
25
25
 
26
26
  - Codex supports three autonomy levels: `suggest` (propose only), `auto-edit` (edit with confirmation), `full-auto` (autonomous execution).
27
27
  - Codex operates in a sandboxed environment — destructive operations are inherently limited.
28
- - Orchestration in Codex is sequential (no parallel subagent spawning) adopt specialist postures one at a time.
28
+ - Orchestration in Codex is capability-based: use native delegation when available, otherwise coordinate specialist postures sequentially.
29
29
  - Keep workflow instructions self-contained since network access for external docs may be restricted.
@@ -0,0 +1,80 @@
1
+ ---
2
+ command: "/architecture"
3
+ description: "Refresh the project architecture contract and current-state map in ENGINEERING_RULES.md and TECH.md with explicit structure, design-system, testing, and flow guidance."
4
+ triggers:
5
+ [
6
+ "architecture",
7
+ "design system",
8
+ "adr",
9
+ "clean architecture",
10
+ "system map",
11
+ "app structure",
12
+ "technical governance",
13
+ "flow diagram",
14
+ ]
15
+ ---
16
+
17
+ # Architecture Workflow
18
+
19
+ ## When to use
20
+
21
+ Use this when the task is to declare, refresh, or validate the project architecture contract and current-state map, especially after structure changes, scale changes, design-system changes, migrations, or major feature additions.
22
+
23
+ ## Routing
24
+
25
+ - Primary coordinator: `@project-planner`
26
+ - Documentation support: `@documentation-writer`
27
+ - Research support: `@researcher`
28
+ - Domain validation: `@backend-specialist`, `@frontend-specialist`, `@database-architect`
29
+
30
+ ## Skill Routing
31
+
32
+ - Primary skills: `architecture-doc`, `system-design`, `tech-doc`, `frontend-design`
33
+ - Supporting skills (optional): `api-design`, `database-design`, `sadd`, `deep-research`
34
+ - Load the four primary skills directly for this workflow. Add `api-design` or `database-design` when service or data boundaries are central, `sadd` when tying the architecture update to an active spec pack, and `deep-research` only when outside evidence is required.
35
+
36
+ ## Workflow steps
37
+
38
+ 1. Inspect the repo first and read `ENGINEERING_RULES.md` followed by `TECH.md` if they exist.
39
+ 2. Determine the current architecture style, module boundaries, design-system source of truth, and testing strategy from the codebase.
40
+ 3. Update only the managed architecture sections in `ENGINEERING_RULES.md` and `TECH.md`.
41
+ 4. Add or refresh Mermaid diagrams and flow narratives inside `TECH.md` when they clarify system behavior.
42
+ 5. Record whether the update was driven by a broader spec and whether future implementation must follow newly declared rules.
43
+
44
+ ## Context notes
45
+
46
+ - This workflow is route-fixed and skill-fixed: do not start with `route_resolve` or `skill_search`.
47
+ - `ENGINEERING_RULES.md` is normative. `TECH.md` is descriptive. Keep them aligned but not redundant.
48
+ - Preserve manual content outside the managed architecture sections.
49
+ - Mark non-applicable sections explicitly instead of silently omitting them.
50
+
51
+ ## Verification
52
+
53
+ - Managed architecture sections exist in both target docs.
54
+ - Architecture style, dependency rules, and design-system guidance are explicit.
55
+ - `TECH.md` includes flow text and at least one Mermaid diagram when the repo has meaningful flow complexity.
56
+ - The update records `doc_impact` and whether future feature work must refresh the docs again.
57
+
58
+ ## Output Contract
59
+
60
+ ```yaml
61
+ ARCHITECTURE_WORKFLOW_RESULT:
62
+ primary_agent: project-planner
63
+ supporting_agents: [documentation-writer?, researcher?, backend-specialist?, frontend-specialist?, database-architect?]
64
+ primary_skills: [architecture-doc, system-design, tech-doc, frontend-design]
65
+ supporting_skills: [api-design?, database-design?, sadd?, deep-research?]
66
+ managed_targets:
67
+ rules_doc: ENGINEERING_RULES.md
68
+ tech_doc: TECH.md
69
+ files_updated: [ENGINEERING_RULES.md, TECH.md]
70
+ architecture_contract:
71
+ style: <string>
72
+ dependency_rules: [<string>]
73
+ design_system_source: <string>
74
+ technical_snapshot:
75
+ topology: [<string>]
76
+ flows: [<string>]
77
+ diagrams: [<string>] | []
78
+ doc_impact: rules | tech | both
79
+ next_actions: [<string>] | []
80
+ ```
@@ -36,12 +36,13 @@ Use this for backend architecture, API design, service implementation, or Postma
36
36
 
37
37
  - This workflow file, active platform rules, and selected agents or skills guide execution.
38
38
  - Attach API specifications, schema diagrams, Postman collections, and relevant service code.
39
+ - Read `ENGINEERING_RULES.md` and `TECH.md` before changing service boundaries or shared backend structure.
39
40
 
40
41
  ## Skill Routing
41
42
 
42
- - Primary skills: `api-designer`, `api-patterns`, `nodejs-best-practices`
43
- - Supporting skills (optional): `auth-architect`, `database-skills`, `database-design`, `nestjs-expert`, `fastapi-expert`, `graphql-architect`, `microservices-architect`, `drizzle-expert`, `firebase`, `stripe-best-practices`, `serverless-patterns`, `i18n-localization`, `typescript-pro`, `javascript-pro`, `python-pro`, `golang-pro`
44
- - Start with `api-designer` for API contract work and `nodejs-best-practices` for Node.js services. Add framework-specific skill when applicable.
43
+ - Primary skills: `api-design`, `api-patterns`, `nodejs-best-practices`
44
+ - Supporting skills (optional): `auth-architect`, `database-design`, `database-design`, `nestjs-expert`, `fastapi-expert`, `graphql-architect`, `microservices-architect`, `drizzle-expert`, `firebase`, `stripe-best-practices`, `serverless-patterns`, `i18n-localization`, `typescript-pro`, `javascript-pro`, `python-pro`, `golang-pro`
45
+ - Start with `api-design` for API contract work and `nodejs-best-practices` for Node.js services. Add framework-specific skill when applicable.
45
46
 
46
47
  ## Workflow steps
47
48
 
@@ -50,6 +51,7 @@ Use this for backend architecture, API design, service implementation, or Postma
50
51
  3. Implement backend logic with proper error handling and validation.
51
52
  4. Write integration tests covering happy path and error cases.
52
53
  5. Review for security, performance, and reliability.
54
+ 6. Set `doc_impact` if the change alters service boundaries, shared contracts, or operational shape.
53
55
 
54
56
  ## Verification
55
57
 
@@ -65,8 +67,8 @@ Use this for backend architecture, API design, service implementation, or Postma
65
67
  BACKEND_WORKFLOW_RESULT:
66
68
  primary_agent: backend-specialist
67
69
  supporting_agents: [database-architect?, security-auditor?, test-engineer?]
68
- primary_skills: [api-designer, api-patterns, nodejs-best-practices]
69
- supporting_skills: [auth-architect?, database-skills?, <framework-skill>?]
70
+ primary_skills: [api-design, api-patterns, nodejs-best-practices]
71
+ supporting_skills: [auth-architect?, database-design?, <framework-skill>?]
70
72
  api_changes:
71
73
  endpoints_created: [<string>] | []
72
74
  endpoints_modified: [<string>] | []
@@ -74,6 +76,7 @@ BACKEND_WORKFLOW_RESULT:
74
76
  implementation:
75
77
  files_changed: [<path>]
76
78
  tests_added: [<path>]
79
+ doc_impact: none | tech | rules | both
77
80
  verification:
78
81
  checks_run: [<command-or-test>]
79
82
  evidence: [<string>]
@@ -22,11 +22,12 @@ Use this for net-new implementation after design is stable.
22
22
 
23
23
  - This workflow file, active platform rules, and selected agents or skills guide execution.
24
24
  - Attach logs, screenshots, failing output, and relevant paths when context is incomplete.
25
+ - Read `ENGINEERING_RULES.md` first and `TECH.md` next for non-trivial work so new code follows the declared architecture and design-system rules.
25
26
 
26
27
  ## Skill Routing
27
28
 
28
29
  - Primary skills: `typescript-pro`, `javascript-pro`, `python-pro`, `golang-pro`, `java-pro`, `csharp-pro`, `kotlin-pro`, `rust-pro`, `php-pro`, `ruby-pro`, `c-pro`, `cpp-pro`, `dart-pro`, `swift-pro`
29
- - Supporting skills (optional): `api-designer`, `api-patterns`, `nodejs-best-practices`, `nestjs-expert`, `fastapi-expert`, `graphql-architect`, `drizzle-expert`, `firebase`, `mcp-builder`, `stitch`, `react-expert`, `react-best-practices`, `nextjs-developer`, `tailwind-patterns`, `frontend-design`, `design-system-builder`, `web-perf`, `skill-creator`, `stripe-best-practices`, `serverless-patterns`, `i18n-localization`
30
+ - Supporting skills (optional): `api-design`, `api-patterns`, `nodejs-best-practices`, `nestjs-expert`, `fastapi-expert`, `graphql-architect`, `drizzle-expert`, `firebase`, `mcp-server-builder`, `stitch`, `react-expert`, `react-best-practices`, `nextjs-developer`, `tailwind-patterns`, `frontend-design`, `design-system-builder`, `web-perf`, `skill-creator`, `stripe-best-practices`, `serverless-patterns`, `i18n-localization`
30
31
  - Pick one primary language skill from repo signals or touched files. Add the narrowest specialist only when the feature is clearly backend or frontend framework-specific.
31
32
  - If the request references Stitch screens, artifacts, design-to-code, or UI sync, add `stitch` first and route the implementation through the frontend or mobile specialist based on the destination surface.
32
33
 
@@ -35,7 +36,8 @@ Use this for net-new implementation after design is stable.
35
36
  1. Confirm target files and contracts.
36
37
  2. Implement smallest coherent increment.
37
38
  3. Validate behavior with focused tests.
38
- 4. Capture remaining gaps and follow-ups.
39
+ 4. Capture `doc_impact` when the feature changes architecture, boundaries, scale, or design-system rules.
40
+ 5. Capture remaining gaps and follow-ups.
39
41
 
40
42
  ## Verification
41
43
 
@@ -55,6 +57,7 @@ CREATE_WORKFLOW_RESULT:
55
57
  summary: <string>
56
58
  changed_artifacts: [<path-or-artifact>]
57
59
  behavioral_impact: [<string>]
60
+ doc_impact: none | tech | rules | both
58
61
  verification:
59
62
  checks_run: [<command-or-test>]
60
63
  evidence: [<string>]
@@ -20,12 +20,13 @@ Use this for schema design, query optimization, migration planning, or database
20
20
 
21
21
  - This workflow file, active platform rules, and selected agents or skills guide execution.
22
22
  - Attach existing schema, migration history, query patterns, and performance requirements.
23
+ - Read `ENGINEERING_RULES.md` and `TECH.md` before changing data ownership, persistence boundaries, or shared schema conventions.
23
24
 
24
25
  ## Skill Routing
25
26
 
26
- - Primary skills: `database-design`, `database-optimizer`, `database-skills`
27
+ - Primary skills: `database-design`, `database-optimizer`, `database-design`
27
28
  - Supporting skills (optional): `drizzle-expert`, `postgres`, `mysql`, `sqlite`, `mongodb`, `redis`, `supabase`, `firebase`, `vitess`, `typescript-pro`, `javascript-pro`, `python-pro`
28
- - Start with `database-design` for schema work, `database-optimizer` for performance, or `database-skills` for general database operations. Add engine-specific skill when applicable.
29
+ - Start with `database-design` for schema work, `database-optimizer` for performance, or `database-design` for general database operations. Add engine-specific skill when applicable.
29
30
 
30
31
  ## Workflow steps
31
32
 
@@ -34,6 +35,7 @@ Use this for schema design, query optimization, migration planning, or database
34
35
  3. Plan migration with rollback strategy.
35
36
  4. Optimize queries and indexes for known access patterns.
36
37
  5. Validate data integrity constraints.
38
+ 6. Set `doc_impact` if the change alters data boundaries, core entities, or persistence patterns that future work should follow.
37
39
 
38
40
  ## Verification
39
41
 
@@ -48,7 +50,7 @@ Use this for schema design, query optimization, migration planning, or database
48
50
  DATABASE_WORKFLOW_RESULT:
49
51
  primary_agent: database-architect
50
52
  supporting_agents: [backend-specialist?, test-engineer?]
51
- primary_skills: [database-design, database-optimizer, database-skills]
53
+ primary_skills: [database-design, database-optimizer, database-design]
52
54
  supporting_skills: [<engine-specific-skill>?, drizzle-expert?]
53
55
  schema_changes:
54
56
  tables_affected: [<string>]
@@ -57,6 +59,7 @@ DATABASE_WORKFLOW_RESULT:
57
59
  query_optimization:
58
60
  queries_reviewed: <number>
59
61
  indexes_recommended: [<string>] | []
62
+ doc_impact: none | tech | rules | both
60
63
  integrity_checks: [<string>]
61
64
  follow_up_items: [<string>] | []
62
65
  ```