create-flowdular 0.2.3 → 0.2.5

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 (271) hide show
  1. package/README.md +11 -0
  2. package/agent-template/.agents/skills/agent-tool-design/SKILL.md +203 -0
  3. package/agent-template/.agents/skills/auth-security-review/SKILL.md +90 -0
  4. package/agent-template/.agents/skills/auto-review/SKILL.md +103 -0
  5. package/agent-template/.agents/skills/bug-hunt/SKILL.md +104 -0
  6. package/agent-template/.agents/skills/business-agent-design/SKILL.md +182 -0
  7. package/agent-template/.agents/skills/cli-extension/SKILL.md +108 -0
  8. package/agent-template/.agents/skills/core-extend/SKILL.md +99 -0
  9. package/agent-template/.agents/skills/database-adapter/SKILL.md +198 -0
  10. package/agent-template/.agents/skills/database-adapter/references/first-run-and-matrix.md +105 -0
  11. package/agent-template/.agents/skills/migration-authoring/SKILL.md +161 -0
  12. package/agent-template/.agents/skills/module-new/SKILL.md +171 -0
  13. package/agent-template/.agents/skills/module-update/SKILL.md +91 -0
  14. package/agent-template/.agents/skills/perf-audit/SKILL.md +98 -0
  15. package/agent-template/.agents/skills/release-eject-pr/SKILL.md +107 -0
  16. package/agent-template/.agents/skills/spec-approval/SKILL.md +106 -0
  17. package/agent-template/.agents/skills/test-hardening/SKILL.md +79 -0
  18. package/agent-template/.agents/skills/translations-i18n/SKILL.md +78 -0
  19. package/agent-template/.agents/skills/ux-design/SKILL.md +92 -0
  20. package/agent-template/.agents/skills/variables/SKILL.md +156 -0
  21. package/agent-template/.agents/skills/workflow-development/SKILL.md +192 -0
  22. package/agent-template/.ai/README.md +62 -0
  23. package/agent-template/.ai/agents/README.md +27 -0
  24. package/agent-template/.ai/agents/module-executor.md +36 -0
  25. package/agent-template/.ai/agents/reviewer.md +23 -0
  26. package/agent-template/.ai/agents/sandbox/agentic-engineer.md +31 -0
  27. package/agent-template/.ai/agents/sandbox/backend-engineer.md +36 -0
  28. package/agent-template/.ai/agents/sandbox/business-manager.md +23 -0
  29. package/agent-template/.ai/agents/sandbox/frontend-engineer.md +27 -0
  30. package/agent-template/.ai/agents/sandbox/ux-designer.md +23 -0
  31. package/agent-template/.ai/agents/spec-author.md +29 -0
  32. package/agent-template/.ai/blueprints/add-migration/README.md +5 -0
  33. package/agent-template/.ai/blueprints/add-migration/allowed-paths.yaml +23 -0
  34. package/agent-template/.ai/blueprints/add-migration/blueprint.json +14 -0
  35. package/agent-template/.ai/blueprints/add-migration/examples/invalid/input-destructive.json +6 -0
  36. package/agent-template/.ai/blueprints/add-migration/examples/invalid/plan-unnumbered-file.json +9 -0
  37. package/agent-template/.ai/blueprints/add-migration/examples/valid/input.json +6 -0
  38. package/agent-template/.ai/blueprints/add-migration/examples/valid/plan.json +9 -0
  39. package/agent-template/.ai/blueprints/add-migration/gates.yaml +30 -0
  40. package/agent-template/.ai/blueprints/add-migration/input.schema.json +23 -0
  41. package/agent-template/.ai/blueprints/add-migration/plan.schema.json +54 -0
  42. package/agent-template/.ai/blueprints/add-migration/required-files.yaml +18 -0
  43. package/agent-template/.ai/blueprints/add-migration/spec-requirements.yaml +13 -0
  44. package/agent-template/.ai/blueprints/add-migration/steps.yaml +62 -0
  45. package/agent-template/.ai/blueprints/author-spec/README.md +5 -0
  46. package/agent-template/.ai/blueprints/author-spec/allowed-paths.yaml +7 -0
  47. package/agent-template/.ai/blueprints/author-spec/blueprint.json +14 -0
  48. package/agent-template/.ai/blueprints/author-spec/examples/invalid/input-missing-outcome.json +5 -0
  49. package/agent-template/.ai/blueprints/author-spec/examples/valid/input.json +6 -0
  50. package/agent-template/.ai/blueprints/author-spec/gates.yaml +13 -0
  51. package/agent-template/.ai/blueprints/author-spec/input.schema.json +20 -0
  52. package/agent-template/.ai/blueprints/author-spec/plan.schema.json +14 -0
  53. package/agent-template/.ai/blueprints/author-spec/required-files.yaml +6 -0
  54. package/agent-template/.ai/blueprints/author-spec/spec-requirements.yaml +35 -0
  55. package/agent-template/.ai/blueprints/author-spec/steps.yaml +28 -0
  56. package/agent-template/.ai/blueprints/author-spec/templates/module.yaml +45 -0
  57. package/agent-template/.ai/blueprints/bug-fix/README.md +5 -0
  58. package/agent-template/.ai/blueprints/bug-fix/allowed-paths.yaml +29 -0
  59. package/agent-template/.ai/blueprints/bug-fix/blueprint.json +14 -0
  60. package/agent-template/.ai/blueprints/bug-fix/examples/invalid/input-no-symptom.json +4 -0
  61. package/agent-template/.ai/blueprints/bug-fix/examples/invalid/plan-no-test.json +8 -0
  62. package/agent-template/.ai/blueprints/bug-fix/examples/valid/input.json +6 -0
  63. package/agent-template/.ai/blueprints/bug-fix/examples/valid/plan.json +8 -0
  64. package/agent-template/.ai/blueprints/bug-fix/gates.yaml +30 -0
  65. package/agent-template/.ai/blueprints/bug-fix/input.schema.json +25 -0
  66. package/agent-template/.ai/blueprints/bug-fix/plan.schema.json +53 -0
  67. package/agent-template/.ai/blueprints/bug-fix/required-files.yaml +7 -0
  68. package/agent-template/.ai/blueprints/bug-fix/spec-requirements.yaml +7 -0
  69. package/agent-template/.ai/blueprints/bug-fix/steps.yaml +51 -0
  70. package/agent-template/.ai/blueprints/core-extend/README.md +5 -0
  71. package/agent-template/.ai/blueprints/core-extend/allowed-paths.yaml +49 -0
  72. package/agent-template/.ai/blueprints/core-extend/blueprint.json +14 -0
  73. package/agent-template/.ai/blueprints/core-extend/examples/invalid/input-unknown-package.json +5 -0
  74. package/agent-template/.ai/blueprints/core-extend/examples/invalid/plan-missing-gates.json +7 -0
  75. package/agent-template/.ai/blueprints/core-extend/examples/valid/input.json +6 -0
  76. package/agent-template/.ai/blueprints/core-extend/examples/valid/plan.json +10 -0
  77. package/agent-template/.ai/blueprints/core-extend/gates.yaml +16 -0
  78. package/agent-template/.ai/blueprints/core-extend/input.schema.json +54 -0
  79. package/agent-template/.ai/blueprints/core-extend/plan.schema.json +39 -0
  80. package/agent-template/.ai/blueprints/core-extend/required-files.yaml +36 -0
  81. package/agent-template/.ai/blueprints/core-extend/spec-requirements.yaml +17 -0
  82. package/agent-template/.ai/blueprints/core-extend/steps.yaml +54 -0
  83. package/agent-template/.ai/blueprints/edit-module/README.md +9 -0
  84. package/agent-template/.ai/blueprints/edit-module/allowed-paths.yaml +27 -0
  85. package/agent-template/.ai/blueprints/edit-module/blueprint.json +20 -0
  86. package/agent-template/.ai/blueprints/edit-module/examples/invalid/input-unknown-change.json +5 -0
  87. package/agent-template/.ai/blueprints/edit-module/examples/invalid/plan-touches-platform.json +15 -0
  88. package/agent-template/.ai/blueprints/edit-module/examples/valid/input.json +5 -0
  89. package/agent-template/.ai/blueprints/edit-module/examples/valid/plan.json +25 -0
  90. package/agent-template/.ai/blueprints/edit-module/gates.yaml +30 -0
  91. package/agent-template/.ai/blueprints/edit-module/input.schema.json +31 -0
  92. package/agent-template/.ai/blueprints/edit-module/plan.schema.json +65 -0
  93. package/agent-template/.ai/blueprints/edit-module/required-files.yaml +80 -0
  94. package/agent-template/.ai/blueprints/edit-module/spec-requirements.yaml +15 -0
  95. package/agent-template/.ai/blueprints/edit-module/steps.yaml +115 -0
  96. package/agent-template/.ai/blueprints/new-module/README.md +7 -0
  97. package/agent-template/.ai/blueprints/new-module/allowed-paths.yaml +27 -0
  98. package/agent-template/.ai/blueprints/new-module/blueprint.json +20 -0
  99. package/agent-template/.ai/blueprints/new-module/examples/invalid/input-spec-outside-modules.json +4 -0
  100. package/agent-template/.ai/blueprints/new-module/examples/invalid/plan-unknown-gate.json +8 -0
  101. package/agent-template/.ai/blueprints/new-module/examples/valid/input.json +5 -0
  102. package/agent-template/.ai/blueprints/new-module/examples/valid/plan.json +22 -0
  103. package/agent-template/.ai/blueprints/new-module/gates.yaml +30 -0
  104. package/agent-template/.ai/blueprints/new-module/input.schema.json +21 -0
  105. package/agent-template/.ai/blueprints/new-module/plan.schema.json +58 -0
  106. package/agent-template/.ai/blueprints/new-module/required-files.yaml +73 -0
  107. package/agent-template/.ai/blueprints/new-module/spec-requirements.yaml +30 -0
  108. package/agent-template/.ai/blueprints/new-module/steps.yaml +138 -0
  109. package/agent-template/.ai/blueprints/release/README.md +5 -0
  110. package/agent-template/.ai/blueprints/release/allowed-paths.yaml +19 -0
  111. package/agent-template/.ai/blueprints/release/blueprint.json +14 -0
  112. package/agent-template/.ai/blueprints/release/examples/invalid/input-bad-version.json +4 -0
  113. package/agent-template/.ai/blueprints/release/examples/invalid/plan-bad-branch.json +7 -0
  114. package/agent-template/.ai/blueprints/release/examples/valid/input.json +5 -0
  115. package/agent-template/.ai/blueprints/release/examples/valid/plan.json +20 -0
  116. package/agent-template/.ai/blueprints/release/gates.yaml +20 -0
  117. package/agent-template/.ai/blueprints/release/input.schema.json +24 -0
  118. package/agent-template/.ai/blueprints/release/plan.schema.json +46 -0
  119. package/agent-template/.ai/blueprints/release/required-files.yaml +19 -0
  120. package/agent-template/.ai/blueprints/release/spec-requirements.yaml +8 -0
  121. package/agent-template/.ai/blueprints/release/steps.yaml +47 -0
  122. package/agent-template/.ai/blueprints/security-review/README.md +5 -0
  123. package/agent-template/.ai/blueprints/security-review/allowed-paths.yaml +6 -0
  124. package/agent-template/.ai/blueprints/security-review/blueprint.json +14 -0
  125. package/agent-template/.ai/blueprints/security-review/examples/invalid/input-unknown-kind.json +4 -0
  126. package/agent-template/.ai/blueprints/security-review/examples/invalid/plan-finding-without-scenario.json +14 -0
  127. package/agent-template/.ai/blueprints/security-review/examples/valid/input.json +4 -0
  128. package/agent-template/.ai/blueprints/security-review/examples/valid/plan.json +19 -0
  129. package/agent-template/.ai/blueprints/security-review/gates.yaml +22 -0
  130. package/agent-template/.ai/blueprints/security-review/input.schema.json +20 -0
  131. package/agent-template/.ai/blueprints/security-review/plan.schema.json +65 -0
  132. package/agent-template/.ai/blueprints/security-review/required-files.yaml +6 -0
  133. package/agent-template/.ai/blueprints/security-review/spec-requirements.yaml +9 -0
  134. package/agent-template/.ai/blueprints/security-review/steps.yaml +38 -0
  135. package/agent-template/.ai/examples/README.md +8 -0
  136. package/agent-template/.ai/examples/bad/client-imports-server/README.md +20 -0
  137. package/agent-template/.ai/examples/bad/client-imports-server/api.ts +12 -0
  138. package/agent-template/.ai/examples/bad/missing-acl/README.md +23 -0
  139. package/agent-template/.ai/examples/bad/missing-acl/endpoints.ts +12 -0
  140. package/agent-template/.ai/examples/bad/tenant-from-body/README.md +19 -0
  141. package/agent-template/.ai/examples/bad/tenant-from-body/endpoints.ts +33 -0
  142. package/agent-template/.ai/examples/client-contribution/CustomerListView.tsrx +34 -0
  143. package/agent-template/.ai/examples/client-contribution/README.md +11 -0
  144. package/agent-template/.ai/examples/client-contribution/contribution.tsrx +48 -0
  145. package/agent-template/.ai/examples/client-contribution/index.ts +20 -0
  146. package/agent-template/.ai/examples/client-contribution/permissions.ts +8 -0
  147. package/agent-template/.ai/examples/customer-cli-extension/README.md +14 -0
  148. package/agent-template/.ai/examples/customer-cli-extension/commands.json +17 -0
  149. package/agent-template/.ai/examples/customer-cli-extension/index.ts +36 -0
  150. package/agent-template/.ai/examples/module-create/task-packet.json +11 -0
  151. package/agent-template/.ai/guides/application-development.md +97 -0
  152. package/agent-template/.ai/policies/capabilities.yaml +164 -0
  153. package/agent-template/.ai/policies/model-routing.yaml +72 -0
  154. package/agent-template/.ai/policies/path-ownership.yaml +65 -0
  155. package/agent-template/.ai/policies/task-budgets.yaml +37 -0
  156. package/agent-template/.ai/references/catalog/LICENSE +21 -0
  157. package/agent-template/.ai/references/catalog/migrations/0001_catalog_core.down.sql +2 -0
  158. package/agent-template/.ai/references/catalog/migrations/0001_catalog_core.up.sql +21 -0
  159. package/agent-template/.ai/references/catalog/migrations/0002_catalog_history.down.sql +3 -0
  160. package/agent-template/.ai/references/catalog/migrations/0002_catalog_history.up.sql +20 -0
  161. package/agent-template/.ai/references/catalog/migrations/0003_catalog_history_service_actors.down.sql +3 -0
  162. package/agent-template/.ai/references/catalog/migrations/0003_catalog_history_service_actors.up.sql +36 -0
  163. package/agent-template/.ai/references/catalog/migrations/0004_catalog_idempotency_ledger.down.sql +3 -0
  164. package/agent-template/.ai/references/catalog/migrations/0004_catalog_idempotency_ledger.up.sql +19 -0
  165. package/agent-template/.ai/references/catalog/migrations/README.md +3 -0
  166. package/agent-template/.ai/references/catalog/module.json +27 -0
  167. package/agent-template/.ai/references/catalog/package.json +49 -0
  168. package/agent-template/.ai/references/catalog/spec/module.yaml +86 -0
  169. package/agent-template/.ai/references/catalog/src/acl/permissions.ts +6 -0
  170. package/agent-template/.ai/references/catalog/src/agent/tools.ts +164 -0
  171. package/agent-template/.ai/references/catalog/src/api/endpoints.ts +243 -0
  172. package/agent-template/.ai/references/catalog/src/client/CatalogHistoryDrawer.tsrx +123 -0
  173. package/agent-template/.ai/references/catalog/src/client/CatalogItemForm.tsrx +190 -0
  174. package/agent-template/.ai/references/catalog/src/client/CatalogView.tsrx +473 -0
  175. package/agent-template/.ai/references/catalog/src/client/api.ts +111 -0
  176. package/agent-template/.ai/references/catalog/src/client/contribution.tsrx +61 -0
  177. package/agent-template/.ai/references/catalog/src/client/index.ts +18 -0
  178. package/agent-template/.ai/references/catalog/src/client/navigation-copy.ts +9 -0
  179. package/agent-template/.ai/references/catalog/src/client/state.ts +24 -0
  180. package/agent-template/.ai/references/catalog/src/domain/types.ts +32 -0
  181. package/agent-template/.ai/references/catalog/src/domain/variables.ts +111 -0
  182. package/agent-template/.ai/references/catalog/src/index.ts +31 -0
  183. package/agent-template/.ai/references/catalog/src/platform.ts +35 -0
  184. package/agent-template/.ai/references/catalog/src/server/index.ts +4 -0
  185. package/agent-template/.ai/references/catalog/src/server/runtime.ts +86 -0
  186. package/agent-template/.ai/references/catalog/src/services/catalog-service.ts +306 -0
  187. package/agent-template/.ai/references/catalog/src/services/database-repository.ts +440 -0
  188. package/agent-template/.ai/references/catalog/src/services/index.ts +4 -0
  189. package/agent-template/.ai/references/catalog/src/services/migration.ts +171 -0
  190. package/agent-template/.ai/references/catalog/src/services/repository.ts +36 -0
  191. package/agent-template/.ai/references/catalog/src/services/target-idempotency.ts +59 -0
  192. package/agent-template/.ai/references/catalog/tests/agent-tools.test.ts +277 -0
  193. package/agent-template/.ai/references/catalog/tests/endpoints.test.ts +320 -0
  194. package/agent-template/.ai/references/catalog/tests/idempotency.test.ts +297 -0
  195. package/agent-template/.ai/references/catalog/tests/migrations.test.ts +149 -0
  196. package/agent-template/.ai/references/catalog/tests/module.test.ts +271 -0
  197. package/agent-template/.ai/references/catalog/tests/support/database.ts +76 -0
  198. package/agent-template/.ai/references/catalog/translations/en.json +101 -0
  199. package/agent-template/.ai/references/catalog/translations/pl.json +101 -0
  200. package/agent-template/.ai/references/catalog/tsconfig.json +15 -0
  201. package/agent-template/.ai/references/catalog/vitest.config.ts +16 -0
  202. package/agent-template/.ai/references/catalog.provenance.json +55 -0
  203. package/agent-template/.ai/rules/flowdular.md +86 -0
  204. package/agent-template/.ai/skills/README.md +36 -0
  205. package/agent-template/.ai/skills/agent-tool-design/SKILL.md +209 -0
  206. package/agent-template/.ai/skills/auth-security-review/SKILL.md +96 -0
  207. package/agent-template/.ai/skills/auto-review/SKILL.md +112 -0
  208. package/agent-template/.ai/skills/bug-hunt/SKILL.md +110 -0
  209. package/agent-template/.ai/skills/business-agent-design/SKILL.md +188 -0
  210. package/agent-template/.ai/skills/cli-extension/SKILL.md +114 -0
  211. package/agent-template/.ai/skills/core-extend/SKILL.md +104 -0
  212. package/agent-template/.ai/skills/database-adapter/SKILL.md +204 -0
  213. package/agent-template/.ai/skills/database-adapter/references/first-run-and-matrix.md +105 -0
  214. package/agent-template/.ai/skills/migration-authoring/SKILL.md +167 -0
  215. package/agent-template/.ai/skills/module-new/SKILL.md +180 -0
  216. package/agent-template/.ai/skills/module-update/SKILL.md +100 -0
  217. package/agent-template/.ai/skills/perf-audit/SKILL.md +105 -0
  218. package/agent-template/.ai/skills/release-eject-pr/SKILL.md +113 -0
  219. package/agent-template/.ai/skills/spec-approval/SKILL.md +112 -0
  220. package/agent-template/.ai/skills/test-hardening/SKILL.md +86 -0
  221. package/agent-template/.ai/skills/translations-i18n/SKILL.md +85 -0
  222. package/agent-template/.ai/skills/ux-design/SKILL.md +97 -0
  223. package/agent-template/.ai/skills/variables/SKILL.md +164 -0
  224. package/agent-template/.ai/skills/workflow-development/SKILL.md +199 -0
  225. package/agent-template/.claude/skills/agent-tool-design/SKILL.md +203 -0
  226. package/agent-template/.claude/skills/auth-security-review/SKILL.md +90 -0
  227. package/agent-template/.claude/skills/auto-review/SKILL.md +103 -0
  228. package/agent-template/.claude/skills/bug-hunt/SKILL.md +104 -0
  229. package/agent-template/.claude/skills/business-agent-design/SKILL.md +182 -0
  230. package/agent-template/.claude/skills/cli-extension/SKILL.md +108 -0
  231. package/agent-template/.claude/skills/core-extend/SKILL.md +99 -0
  232. package/agent-template/.claude/skills/database-adapter/SKILL.md +198 -0
  233. package/agent-template/.claude/skills/database-adapter/references/first-run-and-matrix.md +105 -0
  234. package/agent-template/.claude/skills/migration-authoring/SKILL.md +161 -0
  235. package/agent-template/.claude/skills/module-new/SKILL.md +171 -0
  236. package/agent-template/.claude/skills/module-update/SKILL.md +91 -0
  237. package/agent-template/.claude/skills/perf-audit/SKILL.md +98 -0
  238. package/agent-template/.claude/skills/release-eject-pr/SKILL.md +107 -0
  239. package/agent-template/.claude/skills/spec-approval/SKILL.md +106 -0
  240. package/agent-template/.claude/skills/test-hardening/SKILL.md +79 -0
  241. package/agent-template/.claude/skills/translations-i18n/SKILL.md +78 -0
  242. package/agent-template/.claude/skills/ux-design/SKILL.md +92 -0
  243. package/agent-template/.claude/skills/variables/SKILL.md +156 -0
  244. package/agent-template/.claude/skills/workflow-development/SKILL.md +192 -0
  245. package/agent-template/AGENTS.md +77 -0
  246. package/agent-template/CLAUDE.md +77 -0
  247. package/agent-template/docs/adr/0001-development-reload.md +16 -0
  248. package/agent-template/docs/adr/0002-durable-agent-execution.md +21 -0
  249. package/agent-template/docs/adr/0003-module-settings.md +22 -0
  250. package/agent-template/docs/adr/0004-enterprise-access-and-audit.md +36 -0
  251. package/agent-template/docs/adr/0005-sandbox-runtime-and-coding-agents.md +81 -0
  252. package/agent-template/docs/adr/0006-agentic-workflows.md +1702 -0
  253. package/agent-template/docs/adr/0007-module-owned-agents.md +429 -0
  254. package/agent-template/docs/adr/0008-database-adapter-contract.md +90 -0
  255. package/agent-template/docs/agent-contract.md +45 -0
  256. package/agent-template/docs/configuration.md +122 -0
  257. package/agent-template/docs/database-adapters.md +346 -0
  258. package/agent-template/docs/design-system.md +217 -0
  259. package/agent-template/docs/modules.md +146 -0
  260. package/agent-template/platform/scripts/build.mjs +38 -0
  261. package/agent-template/rulesync.jsonc +11 -0
  262. package/dist/bin.js +3 -1
  263. package/package.json +3 -2
  264. package/template/default/.prettierignore +9 -0
  265. package/template/default/README.md +12 -0
  266. package/template/default/flowdular.json +3 -3
  267. package/template/default/modules/example/package.json +1 -1
  268. package/template/default/package.json +6 -2
  269. package/template/default/platform/octane.config.ts +17 -6
  270. package/template/default/platform/package.json +3 -2
  271. package/template/default/platform/scripts/dev.mjs +39 -6
@@ -0,0 +1,51 @@
1
+ schemaVersion: 1
2
+ steps:
3
+ - id: reproduce
4
+ role: backend-engineer
5
+ action: Write the failing test with the gate runner (vitest; route.handler(createContext(new Request(...), {})) or the service on the module's tests/support/database.ts provider).
6
+ inputs:
7
+ - 'symptom'
8
+ - 'reproduction'
9
+ outputs:
10
+ - 'tests/*.test.ts'
11
+ gates:
12
+ - 'tests'
13
+ - id: locate
14
+ role: backend-engineer
15
+ action: Map the symptom to the owning layer with the table in .ai/skills/bug-hunt/SKILL.md; state the root cause as input and state to wrong outcome.
16
+ inputs:
17
+ - 'failing test'
18
+ outputs:
19
+ - 'root cause'
20
+ - id: fix
21
+ role: backend-engineer
22
+ action: Smallest change in the owning file; no second guard in another layer.
23
+ inputs:
24
+ - 'root cause'
25
+ outputs:
26
+ - 'owning file'
27
+ gates:
28
+ - 'typecheck'
29
+ - 'tests'
30
+ - 'format'
31
+ - id: siblings
32
+ role: backend-engineer
33
+ action: grep the same pattern across modules/*/src and either fix or list the siblings.
34
+ inputs:
35
+ - 'pattern'
36
+ outputs:
37
+ - 'siblings list'
38
+ - id: land
39
+ role: orchestrator
40
+ action: 'Sandbox: eject. Direct path: pnpm verify, pull request with the root cause and the regression test name.'
41
+ inputs:
42
+ - 'diff'
43
+ outputs:
44
+ - 'pull request'
45
+ gates:
46
+ - 'spec-schema'
47
+ - 'module-schema'
48
+ - 'dependencies'
49
+ - 'typecheck'
50
+ - 'tests'
51
+ - 'format'
@@ -0,0 +1,5 @@
1
+ # core-extend
2
+
3
+ Change a platform package (`packages/**`, `platform/**`, the schemas in `packages/contracts`, or the auth server contract in `modules/auth/src/server/composition.ts`). This runs at the repository root only; a sandbox session cannot reach these paths and hands off with the exact change needed. Procedure and checklists: `.ai/skills/core-extend/SKILL.md`.
4
+
5
+ Every public surface change names and migrates its consumers in the same change (modules, scaffold, generated composition, reference copies for sandbox sessions, docs, skills). Gates are the repository gates: `pnpm verify` and `pnpm build`. A change to a public boundary gets an ADR in `docs/adr`.
@@ -0,0 +1,49 @@
1
+ schemaVersion: 1
2
+ write:
3
+ - packages/**
4
+ - platform/octane.config.ts
5
+ - platform/src/**
6
+ - platform/scripts/**
7
+ - modules/auth/src/server/composition.ts
8
+ - modules/*/module.json
9
+ - modules/*/spec/module.yaml
10
+ - modules/*/src/platform.ts
11
+ - docs/**
12
+ - .ai/**
13
+ - .agents/skills/**
14
+ - .claude/skills/**
15
+ - AGENTS.md
16
+ - CLAUDE.md
17
+ - rulesync.jsonc
18
+ - package.json
19
+ - pnpm-workspace.yaml
20
+ deny:
21
+ - platform/src/generated/**
22
+ - flowdular.json
23
+ - infra/**
24
+ - .github/**
25
+ - pnpm-lock.yaml (only through pnpm install)
26
+ notes:
27
+ - modules/** beyond the listed files belong to edit-module; a consumer migration touches only the lines the contract change forces
28
+ - AGENTS.md, CLAUDE.md, .agents/skills and .claude/skills are written only by pnpm rules:generate
29
+ # Written only by CLI commands, never by hand. The eject and the direct path
30
+ # both run the commands; the files still travel in the same commit.
31
+ cliOwned:
32
+ - path: flowdular.json
33
+ command: pnpm flowdular module enable <id> --apply
34
+ - path: platform/package.json
35
+ command: pnpm flowdular module enable <id> --apply
36
+ - path: platform/src/generated/modules.server.ts
37
+ command: pnpm flowdular module sync --apply
38
+ - path: platform/src/generated/modules.client.ts
39
+ command: pnpm flowdular module sync --apply
40
+ - path: pnpm-lock.yaml
41
+ command: pnpm install
42
+ - path: AGENTS.md
43
+ command: pnpm rules:generate
44
+ - path: CLAUDE.md
45
+ command: pnpm rules:generate
46
+ - path: .agents/skills
47
+ command: pnpm rules:generate
48
+ - path: .claude/skills
49
+ command: pnpm rules:generate
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "../../../packages/contracts/schemas/blueprint.schema.json",
3
+ "schemaVersion": 1,
4
+ "architecture": "0.2.0",
5
+ "owner": "platform-architecture",
6
+ "status": "approved",
7
+ "id": "core-extend",
8
+ "version": "1.0.0",
9
+ "risk": "workspace-write",
10
+ "agentRoles": ["module-executor"],
11
+ "executorProfiles": ["repo-agent"],
12
+ "requiredReviewers": ["reviewer", "platform-owner"],
13
+ "requiresApprovedSpec": false
14
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "package": "@flowdular/module-catalog",
3
+ "change": "server-contract",
4
+ "brief": "Change a business module through the core blueprint."
5
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "blueprint": "core-extend@1.0.0",
3
+ "package": "@flowdular/sdk/server",
4
+ "consumersMigrated": [],
5
+ "adr": false,
6
+ "gates": []
7
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "package": "@flowdular/sdk/modules/auth",
3
+ "change": "server-contract",
4
+ "brief": "Add an optional agentTools list to PlatformServerComposition.",
5
+ "consumers": ["modules/*/src/platform.ts", "packages/cli/src/module-sync.ts"]
6
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "blueprint": "core-extend@1.0.0",
3
+ "package": "@flowdular/sdk/modules/auth",
4
+ "consumersMigrated": [
5
+ "modules/agents/src/platform.ts",
6
+ "packages/cli/src/module-sync.ts"
7
+ ],
8
+ "adr": true,
9
+ "gates": ["pnpm verify", "pnpm build"]
10
+ }
@@ -0,0 +1,16 @@
1
+ schemaVersion: 1
2
+ # Repository gates. Nothing executes this file; CI runs the same commands
3
+ # (.github/workflows/ci.yml).
4
+ gates:
5
+ - id: verify
6
+ command: pnpm verify
7
+ required: true
8
+ - id: build
9
+ command: pnpm build
10
+ required: true
11
+ - id: platform-typecheck
12
+ command: pnpm --filter @flowdular/platform typecheck
13
+ required: true
14
+ - id: audit
15
+ command: pnpm audit --prod --audit-level high
16
+ required: false
@@ -0,0 +1,54 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["package", "change", "brief"],
6
+ "properties": {
7
+ "package": {
8
+ "type": "string",
9
+ "enum": [
10
+ "@flowdular/sdk/contracts",
11
+ "@flowdular/sdk/kernel",
12
+ "@flowdular/sdk/server",
13
+ "@flowdular/sdk/client",
14
+ "@flowdular/sdk/ui",
15
+ "@flowdular/cli",
16
+ "@flowdular/sdk/cli-protocol",
17
+ "@flowdular/sandbox",
18
+ "@flowdular/coding-agent",
19
+ "@flowdular/sdk/harness",
20
+ "@flowdular/sdk/ai-provider",
21
+ "@flowdular/sdk/dev-console",
22
+ "@flowdular/platform",
23
+ "@flowdular/sdk/modules/auth"
24
+ ]
25
+ },
26
+ "change": {
27
+ "type": "string",
28
+ "enum": [
29
+ "schema",
30
+ "server-contract",
31
+ "client-contract",
32
+ "ui-primitive",
33
+ "cli",
34
+ "sandbox",
35
+ "coding-agent",
36
+ "kernel",
37
+ "composition"
38
+ ]
39
+ },
40
+ "brief": {
41
+ "type": "string",
42
+ "minLength": 8,
43
+ "maxLength": 20000
44
+ },
45
+ "consumers": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "uniqueItems": true
52
+ }
53
+ }
54
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["blueprint", "package", "consumersMigrated", "adr", "gates"],
6
+ "properties": {
7
+ "blueprint": {
8
+ "const": "core-extend@1.0.0"
9
+ },
10
+ "package": {
11
+ "type": "string",
12
+ "pattern": "^@flowdular/[a-z-]+$"
13
+ },
14
+ "consumersMigrated": {
15
+ "type": "array",
16
+ "items": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "uniqueItems": true
21
+ },
22
+ "adr": {
23
+ "type": "boolean"
24
+ },
25
+ "gates": {
26
+ "type": "array",
27
+ "minItems": 1,
28
+ "items": {
29
+ "type": "string",
30
+ "enum": [
31
+ "pnpm verify",
32
+ "pnpm build",
33
+ "pnpm --filter @flowdular/platform typecheck"
34
+ ]
35
+ },
36
+ "uniqueItems": true
37
+ }
38
+ }
39
+ }
@@ -0,0 +1,36 @@
1
+ schemaVersion: 1
2
+ required: []
3
+ byChange:
4
+ schema:
5
+ - packages/contracts/schemas/<name>.schema.json
6
+ - packages/contracts/src/index.ts
7
+ - packages/cli/src/module-scaffold.ts
8
+ - packages/cli/tests/module-scaffold.test.ts
9
+ server-contract:
10
+ - modules/auth/src/server/composition.ts
11
+ - packages/cli/src/module-sync.ts (when the generated composition changes)
12
+ - modules/*/src/platform.ts (when the new member is required)
13
+ client-contract:
14
+ - packages/client/src/contributions.ts
15
+ - packages/client/src/index.ts
16
+ - packages/client/src/ApplicationShell.tsrx
17
+ - modules/*/src/client/index.ts (when ModuleClientContext changes)
18
+ ui-primitive:
19
+ - packages/ui/src/components/<Name>.tsrx
20
+ - packages/ui/src/index.ts
21
+ - packages/ui/src/styles/components.css
22
+ - docs/design-system.md
23
+ cli:
24
+ - packages/cli/src/runner.ts
25
+ - packages/cli/src/capabilities.ts (core capability)
26
+ - packages/cli/tests/*.test.ts
27
+ - .ai/policies/capabilities.yaml
28
+ sandbox:
29
+ - packages/sandbox/src/server/gates.ts (gate ids match .ai/agents/sandbox/*.md)
30
+ - packages/sandbox/src/server/reference.ts (what sessions can read)
31
+ coding-agent:
32
+ - packages/coding-agent/src/roles/contract.ts
33
+ - packages/coding-agent/src/roles/defaults.ts (regenerated from .ai/agents/sandbox, never hand-edited)
34
+ composition:
35
+ - platform/octane.config.ts
36
+ - platform/src/App.tsrx
@@ -0,0 +1,17 @@
1
+ schemaVersion: 1
2
+ # Core changes have no module spec. A public boundary change records an ADR.
3
+ status:
4
+ allowed: []
5
+ adr:
6
+ requiredWhen:
7
+ - a type exported from packages/server, packages/client, packages/contracts, packages/ui or @flowdular/module-auth/server changes shape
8
+ - a JSON schema in packages/contracts/schemas gains or loses a key
9
+ - a gate id, role front matter key, or CLI command group changes
10
+ location: docs/adr/NNNN-<slug>.md
11
+ schemas:
12
+ whenChanged:
13
+ - update packages/contracts/src/index.ts types
14
+ - update packages/cli/src/module-scaffold.ts and its test
15
+ - update every modules/*/module.json or spec/module.yaml affected
16
+ - update .ai/blueprints/*/required-files.yaml and spec-requirements.yaml
17
+ - update .ai/agents/sandbox/business-manager.md when spec keys change
@@ -0,0 +1,54 @@
1
+ schemaVersion: 1
2
+ steps:
3
+ - id: map
4
+ role: module-executor
5
+ action: Read the owning package end to end and list every consumer (grep the export name across modules/, platform/, packages/). Read .ai/skills/core-extend/SKILL.md.
6
+ inputs:
7
+ - 'brief'
8
+ outputs:
9
+ - 'consumer list'
10
+ - id: contract
11
+ role: module-executor
12
+ action: Change the type or schema first, optional members before required ones; write the ADR when a public boundary changes.
13
+ inputs:
14
+ - 'consumer list'
15
+ outputs:
16
+ - 'packages/**'
17
+ - 'docs/adr/NNNN-*.md'
18
+ - id: consumers
19
+ role: module-executor
20
+ action: Migrate every consumer in the same change, including the scaffold, the generated composition generator, reference copies, docs/design-system.md and the skills that describe the surface.
21
+ inputs:
22
+ - 'consumer list'
23
+ outputs:
24
+ - 'modules/*/src/platform.ts'
25
+ - 'packages/cli/src/module-scaffold.ts'
26
+ - 'packages/cli/src/module-sync.ts'
27
+ - '.ai/skills/**'
28
+ - id: regenerate
29
+ role: module-executor
30
+ action: Run pnpm flowdular module sync --apply when the generated composition shape changed. Run pnpm rules:generate when .ai/rules or .ai/skills changed. Never hand-edit generated files.
31
+ inputs:
32
+ - 'packages/cli/src/module-sync.ts'
33
+ outputs:
34
+ - 'platform/src/generated/modules.server.ts'
35
+ - 'platform/src/generated/modules.client.ts'
36
+ - 'AGENTS.md'
37
+ - 'CLAUDE.md'
38
+ - '.agents/skills/**'
39
+ - '.claude/skills/**'
40
+ - id: verify
41
+ role: module-executor
42
+ action: pnpm verify, then pnpm build; pnpm --filter @flowdular/platform typecheck while iterating.
43
+ inputs:
44
+ - 'working tree'
45
+ outputs:
46
+ - 'gate evidence'
47
+ - id: review
48
+ role: reviewer
49
+ action: Dependency direction respected, consumers migrated, dead code not extended, ADR present when required.
50
+ inputs:
51
+ - 'diff'
52
+ - 'gate evidence'
53
+ outputs:
54
+ - 'review report'
@@ -0,0 +1,9 @@
1
+ # edit-module
2
+
3
+ Change an existing module. The sandbox labels these sessions `edit-module@1.0.0` (`packages/sandbox/src/server/routes.ts`) and copies the module into the session with a pristine `base/` copy for the diff; the same blueprint applies when a person or a coding tool follows `.ai/skills/module-update/SKILL.md` at the repository root.
4
+
5
+ `requiresApprovedSpec` is true. The copied specification describes the old module, so `business-manager` takes the first sandbox turn and writes the smallest delta needed for the request: a `specVersion` bump plus changed acceptance scenarios, invariants, permissions or ownership rules. The sandbox then shows that delta to the operator. Approval records a SHA-256 hash of the exact specification after the approval route changes its status to `approved`. An agent-written status line has no authority. Editing the specification or requesting changes clears the gate because its content no longer matches the recorded hash. Only then does the selected implementer start (`packages/sandbox/src/server/spec.ts`, `planning.ts`, `sessions.ts`).
6
+
7
+ Landing: eject runs the gates per module, copies added and changed files, removes the files the session deleted, runs `pnpm install`, `auth sync-scopes`, and a platform typecheck, and stops at the first failed step; `module enable` does not run for an existing module. A session may carry several modules. Direct path: `pnpm verify` and a pull request.
8
+
9
+ When the approved delta adds an agent tool or a module-owned business agent, `agentic-engineer` follows `agent-tool-design` or `business-agent-design`. Business agent definitions live in module source, register through `context.agentDefinitions`, and keep provider, model, and reduced enabled tools in the tenant binding.
@@ -0,0 +1,27 @@
1
+ schemaVersion: 1
2
+ write:
3
+ - modules/{module}/**
4
+ deny:
5
+ - platform/**
6
+ - packages/**
7
+ - infra/**
8
+ - .github/**
9
+ - docs/**
10
+ - specs/**
11
+ - .ai/**
12
+ - flowdular.json
13
+ - pnpm-workspace.yaml
14
+ - modules/!({module})/**
15
+ # Written only by CLI commands, never by hand. The eject and the direct path
16
+ # both run the commands; the files still travel in the same commit.
17
+ cliOwned:
18
+ - path: flowdular.json
19
+ command: pnpm flowdular module enable <id> --apply
20
+ - path: platform/package.json
21
+ command: pnpm flowdular module enable <id> --apply
22
+ - path: platform/src/generated/modules.server.ts
23
+ command: pnpm flowdular module sync --apply
24
+ - path: platform/src/generated/modules.client.ts
25
+ command: pnpm flowdular module sync --apply
26
+ - path: pnpm-lock.yaml
27
+ command: pnpm install
@@ -0,0 +1,20 @@
1
+ {
2
+ "$schema": "../../../packages/contracts/schemas/blueprint.schema.json",
3
+ "schemaVersion": 1,
4
+ "architecture": "0.2.0",
5
+ "owner": "platform-architecture",
6
+ "status": "approved",
7
+ "id": "edit-module",
8
+ "version": "1.0.0",
9
+ "risk": "workspace-write",
10
+ "agentRoles": [
11
+ "backend-engineer",
12
+ "frontend-engineer",
13
+ "ux-designer",
14
+ "business-manager",
15
+ "agentic-engineer"
16
+ ],
17
+ "executorProfiles": ["sandbox-specialist", "repo-agent"],
18
+ "requiredReviewers": ["reviewer"],
19
+ "requiresApprovedSpec": true
20
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "moduleId": "parties.core",
3
+ "change": "rewrite",
4
+ "brief": "Rewrite the module in another framework."
5
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "blueprint": "edit-module@1.0.0",
3
+ "moduleId": "parties.core",
4
+ "change": "endpoint",
5
+ "touchList": ["platform/octane.config.ts"],
6
+ "specVersionBump": "minor",
7
+ "gates": [
8
+ "spec-schema",
9
+ "module-schema",
10
+ "dependencies",
11
+ "typecheck",
12
+ "tests",
13
+ "format"
14
+ ]
15
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "moduleId": "parties.core",
3
+ "change": "column",
4
+ "brief": "Add a vat_id column to parties with a list filter."
5
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "blueprint": "edit-module@1.0.0",
3
+ "moduleId": "parties.core",
4
+ "change": "column",
5
+ "touchList": [
6
+ "modules/parties/src/services/migration.ts",
7
+ "modules/parties/src/services/database-repository.ts",
8
+ "modules/parties/migrations/0002_parties_vat_id.up.sql",
9
+ "modules/parties/migrations/0002_parties_vat_id.down.sql",
10
+ "modules/parties/src/domain/types.ts",
11
+ "modules/parties/src/api/endpoints.ts",
12
+ "modules/parties/src/client/PartyForm.tsrx",
13
+ "modules/parties/tests/module.test.ts",
14
+ "modules/parties/spec/module.yaml"
15
+ ],
16
+ "specVersionBump": "minor",
17
+ "gates": [
18
+ "spec-schema",
19
+ "module-schema",
20
+ "dependencies",
21
+ "typecheck",
22
+ "tests",
23
+ "format"
24
+ ]
25
+ }
@@ -0,0 +1,30 @@
1
+ schemaVersion: 1
2
+ # Ids equal GateId in packages/sandbox/src/server/gates.ts. The sandbox runs the
3
+ # gates a role lists in its front matter after every turn that changed files;
4
+ # from the repository root run the command column yourself. Nothing executes
5
+ # this file; it documents the contract.
6
+ gates:
7
+ - id: spec-schema
8
+ command: pnpm flowdular spec validate --all --json
9
+ sandbox: pnpm flowdular spec validate --all --json --root <session workspace>
10
+ required: true
11
+ - id: module-schema
12
+ command: pnpm flowdular module validate --json
13
+ sandbox: pnpm flowdular module validate --json --root <session workspace>
14
+ required: true
15
+ - id: dependencies
16
+ command: 'grep the imports under src/** and compare with package.json dependencies (no CLI command yet)'
17
+ sandbox: checkDeclaredDependencies(modulePath) in packages/sandbox/src/server/dependencies.ts, run after every turn that changed files, plus a pnpm install when a package.json changed
18
+ required: true
19
+ - id: typecheck
20
+ command: pnpm --filter @flowdular/module-{module} typecheck
21
+ sandbox: node_modules/.bin/tsrx-tsc --noEmit -p tsconfig.json (cwd module)
22
+ required: true
23
+ - id: tests
24
+ command: pnpm --filter @flowdular/module-{module} test
25
+ sandbox: node_modules/.bin/vitest run --passWithNoTests (cwd module; zero tests still pass)
26
+ required: true
27
+ - id: format
28
+ command: pnpm format:check
29
+ sandbox: prettier --check . (cwd module)
30
+ required: true
@@ -0,0 +1,31 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": ["moduleId", "change", "brief"],
6
+ "properties": {
7
+ "moduleId": {
8
+ "type": "string",
9
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
10
+ },
11
+ "change": {
12
+ "type": "string",
13
+ "enum": [
14
+ "endpoint",
15
+ "table",
16
+ "column",
17
+ "screen",
18
+ "widget",
19
+ "permission",
20
+ "setting",
21
+ "cross-module-read",
22
+ "fix"
23
+ ]
24
+ },
25
+ "brief": {
26
+ "type": "string",
27
+ "minLength": 8,
28
+ "maxLength": 20000
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": [
6
+ "blueprint",
7
+ "moduleId",
8
+ "change",
9
+ "touchList",
10
+ "specVersionBump",
11
+ "gates"
12
+ ],
13
+ "properties": {
14
+ "blueprint": {
15
+ "const": "edit-module@1.0.0"
16
+ },
17
+ "moduleId": {
18
+ "type": "string",
19
+ "pattern": "^[a-z][a-z0-9-]*(\\.[a-z][a-z0-9-]*)+$"
20
+ },
21
+ "change": {
22
+ "type": "string",
23
+ "enum": [
24
+ "endpoint",
25
+ "table",
26
+ "column",
27
+ "screen",
28
+ "widget",
29
+ "permission",
30
+ "setting",
31
+ "cross-module-read",
32
+ "fix"
33
+ ]
34
+ },
35
+ "touchList": {
36
+ "type": "array",
37
+ "minItems": 1,
38
+ "items": {
39
+ "type": "string",
40
+ "pattern": "^modules/[a-z0-9-]+/"
41
+ },
42
+ "uniqueItems": true
43
+ },
44
+ "specVersionBump": {
45
+ "type": "string",
46
+ "enum": ["patch", "minor"]
47
+ },
48
+ "gates": {
49
+ "type": "array",
50
+ "minItems": 1,
51
+ "items": {
52
+ "type": "string",
53
+ "enum": [
54
+ "spec-schema",
55
+ "module-schema",
56
+ "dependencies",
57
+ "typecheck",
58
+ "tests",
59
+ "format"
60
+ ]
61
+ },
62
+ "uniqueItems": true
63
+ }
64
+ }
65
+ }