@aifabrix/builder 2.54.1 → 2.55.0

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 (210) hide show
  1. package/README.md +8 -0
  2. package/lib/agent-kit/apply-ops.js +82 -0
  3. package/lib/agent-kit/checksums.js +28 -0
  4. package/lib/agent-kit/classify.js +113 -0
  5. package/lib/agent-kit/claude-shim.js +61 -0
  6. package/lib/agent-kit/constants.js +55 -0
  7. package/lib/agent-kit/file-list.js +103 -0
  8. package/lib/agent-kit/host-approve.js +130 -0
  9. package/lib/agent-kit/hosting/github.js +63 -0
  10. package/lib/agent-kit/hosts.js +71 -0
  11. package/lib/agent-kit/init.js +319 -0
  12. package/lib/agent-kit/kit-root.js +17 -0
  13. package/lib/agent-kit/managed-section.js +79 -0
  14. package/lib/agent-kit/package-load.js +45 -0
  15. package/lib/agent-kit/plan-ops.js +69 -0
  16. package/lib/agent-kit/remote-prompts.js +239 -0
  17. package/lib/agent-kit/render-host-markdown.js +40 -0
  18. package/lib/agent-kit/repo-guard.js +47 -0
  19. package/lib/agent-kit/report.js +107 -0
  20. package/lib/agent-kit/run.js +82 -0
  21. package/lib/agent-kit/scm/git.js +122 -0
  22. package/lib/agent-kit/state-file.js +83 -0
  23. package/lib/agent-kit/status.js +50 -0
  24. package/lib/agent-kit/v1-detect.js +81 -0
  25. package/lib/agent-kit/validate-kit.js +87 -0
  26. package/lib/agent-kit/workspace-name.js +40 -0
  27. package/lib/agent-kit/workspace-skeleton.js +103 -0
  28. package/lib/api/role-assistant-test-pack.api.js +86 -0
  29. package/lib/api/work-search.api.js +31 -4
  30. package/lib/api/work.api.js +19 -12
  31. package/lib/app/list-external-systems.js +2 -1
  32. package/lib/app/show-display.js +33 -6
  33. package/lib/app/show.js +25 -2
  34. package/lib/channels/add-channel.js +1 -0
  35. package/lib/channels/approval-guides/claude.js +2 -2
  36. package/lib/channels/channel-add-failure.js +1 -0
  37. package/lib/channels/channel-add-remaining.js +15 -9
  38. package/lib/channels/channel-definition-status.js +115 -0
  39. package/lib/channels/channel-description.js +2 -1
  40. package/lib/channels/channel-install-envelope.js +4 -2
  41. package/lib/channels/channel-integration-generator.js +2 -0
  42. package/lib/channels/channel-runtime-resolver.js +14 -0
  43. package/lib/channels/channel-targets.js +31 -5
  44. package/lib/channels/claude-setup-values.js +4 -1
  45. package/lib/channels/slack-channel-add.js +59 -6
  46. package/lib/channels/slack-mcp-callback.js +51 -0
  47. package/lib/channels/slack-mcp-runtime.js +156 -0
  48. package/lib/channels/slack-provisioning/install-cli.js +14 -2
  49. package/lib/channels/slack-provisioning/with-curl-on-path.js +6 -1
  50. package/lib/cli/index.js +4 -0
  51. package/lib/cli/setup-certification-commands.js +2 -2
  52. package/lib/cli/setup-certification.help.js +3 -1
  53. package/lib/commands/agent-kit-help.js +79 -0
  54. package/lib/commands/agent-kit.js +346 -0
  55. package/lib/commands/channel-add-help.js +5 -5
  56. package/lib/commands/datasource-capability-relate-cli.js +5 -4
  57. package/lib/commands/repair-auth-apply.js +1 -1
  58. package/lib/commands/repair-datasource-key-skip.js +39 -0
  59. package/lib/commands/repair-datasource-keys.js +24 -12
  60. package/lib/commands/repair-rbac.js +16 -10
  61. package/lib/commands/role-assistant-copy-output.js +61 -0
  62. package/lib/commands/role-assistant-copy.js +155 -0
  63. package/lib/commands/role-assistant-test-output.js +8 -9
  64. package/lib/commands/role-assistant-test-result-rows.js +42 -0
  65. package/lib/commands/role-assistant.js +117 -48
  66. package/lib/commands/search.js +143 -0
  67. package/lib/commands/test-trust-external.js +7 -5
  68. package/lib/commands/upload-sidecar-followups.js +4 -1
  69. package/lib/commands/verify-operations-skip-e2e.js +131 -0
  70. package/lib/commands/verify-operations-step-plan.js +6 -33
  71. package/lib/commands/verify-operations-steps.js +3 -1
  72. package/lib/datasource/capability/relate-operations.js +28 -10
  73. package/lib/datasource/capability/run-capability-relate.js +48 -25
  74. package/lib/datasource/datasource-identifier.js +13 -5
  75. package/lib/deployment/deployer-poll-run.js +117 -35
  76. package/lib/external-system/deploy-dataplane-published.js +70 -0
  77. package/lib/external-system/deploy.js +12 -2
  78. package/lib/external-system/download-role-assistant.js +41 -15
  79. package/lib/external-system/download.js +7 -1
  80. package/lib/generator/wizard-datasource-key.js +54 -0
  81. package/lib/generator/wizard.js +55 -54
  82. package/lib/integration-definition/apply-datasource-keys.js +75 -0
  83. package/lib/integration-definition/apply-relationships.js +195 -0
  84. package/lib/integration-definition/apply-static-enterprise.js +229 -0
  85. package/lib/integration-definition/apply-system-file.js +71 -0
  86. package/lib/integration-definition/apply-test-endpoint.js +89 -0
  87. package/lib/integration-definition/apply-viewpoint-defaults.js +157 -0
  88. package/lib/integration-definition/apply.js +78 -59
  89. package/lib/integration-definition/enrich-openapi-operations.js +36 -10
  90. package/lib/integration-definition/enrich-openapi-pick.js +87 -0
  91. package/lib/lifecycle/role-assistant-governance.js +56 -21
  92. package/lib/programmatic/capability-registry.js +1 -0
  93. package/lib/programmatic/index.js +2 -0
  94. package/lib/programmatic/openapi-apply-result-schemas.js +8 -0
  95. package/lib/programmatic/openapi-channel-install-schemas.js +4 -1
  96. package/lib/programmatic/openapi-component-schemas.js +1 -0
  97. package/lib/programmatic/openapi-descriptions.js +9 -3
  98. package/lib/programmatic/openapi-envelope-examples.js +7 -0
  99. package/lib/programmatic/openapi-operation-bindings.js +5 -0
  100. package/lib/programmatic/openapi-request-schemas.js +5 -0
  101. package/lib/programmatic/openapi-schema-descriptions-channel.js +8 -5
  102. package/lib/programmatic/openapi-schema-descriptions-operations.js +19 -0
  103. package/lib/programmatic/openapi-spec.js +1 -0
  104. package/lib/programmatic/request-timeout.js +3 -0
  105. package/lib/programmatic/route-handler-map.js +7 -0
  106. package/lib/programmatic/run-channel-catalog.js +50 -8
  107. package/lib/programmatic/run-channel-install-options.js +5 -1
  108. package/lib/programmatic/run-download.js +41 -0
  109. package/lib/protection/auth-context.js +3 -1
  110. package/lib/protection/protection-display.js +3 -2
  111. package/lib/protection/report-exit.js +50 -0
  112. package/lib/protection/run-commands.js +2 -0
  113. package/lib/role-assistant/package-validate.js +175 -0
  114. package/lib/role-assistant/test-case-assertion-row.js +36 -0
  115. package/lib/role-assistant/test-case-copy-bind.js +77 -0
  116. package/lib/role-assistant/test-case-copy-expected.js +127 -0
  117. package/lib/role-assistant/test-case-copy-from-work.js +90 -0
  118. package/lib/role-assistant/test-case-copy-interactions.js +67 -0
  119. package/lib/role-assistant/test-case-copy.js +119 -0
  120. package/lib/role-assistant/test-case-expected-catalog.js +135 -0
  121. package/lib/role-assistant/test-case-validate.js +88 -0
  122. package/lib/role-assistant/test-cases-bid.js +117 -4
  123. package/lib/role-assistant/test-cases-evaluate.js +137 -30
  124. package/lib/role-assistant/test-cases-honesty.js +155 -6
  125. package/lib/role-assistant/test-cases-lifecycle.js +291 -0
  126. package/lib/role-assistant/test-cases-search-graph.js +122 -0
  127. package/lib/role-assistant/test-cases-search.js +20 -2
  128. package/lib/role-assistant/test-cases.js +34 -168
  129. package/lib/role-assistant/test-pack-map.js +180 -0
  130. package/lib/role-assistant/test-pack-sync.js +187 -0
  131. package/lib/role-assistant/test-runner-debug.js +54 -0
  132. package/lib/role-assistant/test-runner-respond-body.js +36 -0
  133. package/lib/role-assistant/test-runner-search.js +20 -5
  134. package/lib/role-assistant/test-runner-start-payload.js +63 -10
  135. package/lib/role-assistant/test-runner-workhub-answers.js +45 -16
  136. package/lib/role-assistant/test-runner-workhub.js +45 -21
  137. package/lib/role-assistant/test-runner.js +50 -10
  138. package/lib/schema/external-datasource.schema.json +36 -5
  139. package/lib/schema/external-system.schema.json +20 -2
  140. package/lib/schema/role-assistant-test-case.schema.json +408 -0
  141. package/lib/search/dataplane-context.js +23 -0
  142. package/lib/search/search-args.js +211 -0
  143. package/lib/search/search-display.js +238 -0
  144. package/lib/search/search-errors.js +50 -0
  145. package/lib/search/search-prompts.js +119 -0
  146. package/lib/search/search-roles.js +85 -0
  147. package/lib/search/search-run.js +241 -0
  148. package/lib/search/search-skills.js +198 -0
  149. package/lib/utils/authentication-slot-show.js +153 -0
  150. package/lib/utils/credential-display.js +43 -1
  151. package/lib/utils/external-system-readiness-compact-blocks.js +5 -1
  152. package/lib/utils/external-system-readiness-compact-display.js +30 -1
  153. package/lib/utils/external-system-validators.js +2 -1
  154. package/lib/utils/help-builder.js +3 -1
  155. package/lib/utils/schema-loader.js +37 -0
  156. package/lib/validation/validate-external-file.js +5 -1
  157. package/lib/validation/validate.js +3 -2
  158. package/package.json +1 -1
  159. package/templates/agent-kit/adapters/claude/nested.CLAUDE.md +1 -0
  160. package/templates/agent-kit/adapters/claude/root.CLAUDE.md +5 -0
  161. package/templates/agent-kit/adapters/cursor/commands/cust-0-plan.md +5 -0
  162. package/templates/agent-kit/adapters/cursor/commands/cust-1-validate.md +5 -0
  163. package/templates/agent-kit/adapters/cursor/commands/cust-2-build.md +5 -0
  164. package/templates/agent-kit/adapters/cursor/commands/cust-3-push.md +5 -0
  165. package/templates/agent-kit/adapters/cursor/commands/cust-biz-1-validate.md +5 -0
  166. package/templates/agent-kit/adapters/cursor/commands/cust-biz-2-build.md +5 -0
  167. package/templates/agent-kit/adapters/cursor/commands/cust-biz-3-prove.md +5 -0
  168. package/templates/agent-kit/agent-kit.yaml +45 -0
  169. package/templates/agent-kit/instructions/AGENTKIT.md +83 -0
  170. package/templates/agent-kit/instructions/integration.AGENTS.md +25 -0
  171. package/templates/agent-kit/instructions/role-assistant.AGENTS.md +22 -0
  172. package/templates/agent-kit/instructions/root.AGENTS.md +37 -0
  173. package/templates/agent-kit/parity-inventory.yaml +188 -0
  174. package/templates/agent-kit/skills/aifabrix-connected-system/SKILL.md +58 -0
  175. package/templates/agent-kit/skills/aifabrix-connected-system/references/contract-checklist.md +40 -0
  176. package/templates/agent-kit/skills/aifabrix-connected-system/references/delivery-gates.md +54 -0
  177. package/templates/agent-kit/skills/aifabrix-connected-system/references/production-safety.md +35 -0
  178. package/templates/agent-kit/skills/aifabrix-connected-system/scripts/reserved-system-key.js +19 -0
  179. package/templates/agent-kit/skills/aifabrix-plan/SKILL.md +51 -0
  180. package/templates/agent-kit/skills/aifabrix-plan/references/challenge-checklist.md +108 -0
  181. package/templates/agent-kit/skills/aifabrix-plan/references/interaction.md +34 -0
  182. package/templates/agent-kit/skills/aifabrix-plan/references/plan-template.md +182 -0
  183. package/templates/agent-kit/skills/aifabrix-prove/SKILL.md +50 -0
  184. package/templates/agent-kit/skills/aifabrix-prove/references/demo-template.md +65 -0
  185. package/templates/agent-kit/skills/aifabrix-prove/references/evidence-lifecycle.md +68 -0
  186. package/templates/agent-kit/skills/aifabrix-prove/references/learning-template.md +66 -0
  187. package/templates/agent-kit/skills/aifabrix-role-assistant/SKILL.md +42 -0
  188. package/templates/agent-kit/skills/aifabrix-role-assistant/references/package-boundary.md +21 -0
  189. package/templates/agent-kit/skills/shared/hosts.md +78 -0
  190. package/templates/agent-kit/workspace/.cursor/plans/README.md +22 -0
  191. package/templates/agent-kit/workspace/LICENSE.mit +21 -0
  192. package/templates/agent-kit/workspace/README.md +89 -0
  193. package/templates/applications/builder-api/Dockerfile +3 -1
  194. package/templates/applications/dataplane/application.yaml +2 -2
  195. package/templates/applications/dataplane/env.template +1 -1
  196. package/templates/applications/dataplane/rbac.yaml +28 -0
  197. package/templates/applications/keycloak/env.template +3 -3
  198. package/templates/applications/miso-controller/application.yaml +1 -1
  199. package/templates/applications/miso-controller/env.template +8 -9
  200. package/templates/channels/claude/TROUBLESHOOTING.md +3 -0
  201. package/templates/channels/claude/channel.json +1 -1
  202. package/templates/channels/claude/install.template.md.hbs +1 -0
  203. package/templates/channels/claude/integration/claude-system.json +1 -1
  204. package/templates/channels/slack/channel.json +11 -0
  205. package/templates/channels/slack/install.template.md.hbs +9 -0
  206. package/templates/channels/slack/integration/slack-system.json +11 -0
  207. package/templates/channels/slack/manifest.template.json.hbs +6 -3
  208. package/templates/channels/teams-bot/channel.json +1 -0
  209. package/templates/python/docker-compose.hbs +14 -0
  210. package/templates/typescript/docker-compose.hbs +14 -0
@@ -0,0 +1,188 @@
1
+ # Frozen v1 → kit owner map. Not installed into customer repos.
2
+ schemaVersion: "1"
3
+ v1Files:
4
+ - source: commands/cust-0-plan.md
5
+ installedPath: .cursor/commands/cust-0-plan.md
6
+ sha256: a72c24163cafff97decd8382fdce1127e32ce416e05839128048b122de22b409
7
+ owner: aifabrix-plan
8
+ disposition: shim
9
+ - source: commands/cust-1-validate.md
10
+ installedPath: .cursor/commands/cust-1-validate.md
11
+ sha256: 8b84a1ba015516141959c311ac34ed9dd6b6dd66f286e8efc47bf34f5b2bb091
12
+ owner: aifabrix-connected-system
13
+ disposition: shim
14
+ - source: commands/cust-2-build.md
15
+ installedPath: .cursor/commands/cust-2-build.md
16
+ sha256: 7da4843cde98428b8f1c2ac991149d5ece8beccbfe7de7e99ef2cb80c98a42f5
17
+ owner: aifabrix-connected-system
18
+ disposition: shim
19
+ - source: commands/cust-3-push.md
20
+ installedPath: .cursor/commands/cust-3-push.md
21
+ sha256: f6ded45baa8517cb3280d58b92a3fd620707e2fe282726cd1087640ae92ebe30
22
+ owner: aifabrix-connected-system
23
+ disposition: shim
24
+ - source: commands/cust-biz-1-validate.md
25
+ installedPath: .cursor/commands/cust-biz-1-validate.md
26
+ sha256: 16ada9069f2a06d54ff63f52422283060c14de9c5bbb7b9abc6616d4451b1bee
27
+ owner: aifabrix-prove
28
+ disposition: shim
29
+ - source: commands/cust-biz-2-build.md
30
+ installedPath: .cursor/commands/cust-biz-2-build.md
31
+ sha256: 8b32f9b71261791d27ff0d3ae7b054334fc94ecaeb6389a1e2f50956a07b05b7
32
+ owner: aifabrix-prove
33
+ disposition: shim
34
+ - source: commands/cust-biz-3-prove.md
35
+ installedPath: .cursor/commands/cust-biz-3-prove.md
36
+ sha256: 7b7d6b69a74a6292cb2a581ebb68caee8d06c4ccf431ad79c044710ed167a58c
37
+ owner: aifabrix-prove
38
+ disposition: shim
39
+ - source: rules/README.md
40
+ installedPath: .cursor/rules/README.md
41
+ sha256: 17e691f791a5cfd686b89bf3298e55fe3fe1a933dc7f99b95ae6d08f294700d7
42
+ owner: package-manifest
43
+ disposition: obsolete
44
+ - source: rules/aifabrix-builder.mdc
45
+ installedPath: .cursor/rules/aifabrix-builder.mdc
46
+ sha256: 6bb6c2174c44c2489287765a8cc20121d46d8b0e7f7ab96571e2c666f710bf21
47
+ owner: integration/AGENTS.md
48
+ disposition: obsolete
49
+ - source: rules/builder-first-integration-generation.mdc
50
+ installedPath: .cursor/rules/builder-first-integration-generation.mdc
51
+ sha256: e52d3d15ee641affa979430b2cec5284508f4cecaf29e2a011280b95325114d1
52
+ owner: integration/AGENTS.md
53
+ disposition: obsolete
54
+ - source: rules/cip-field-mapping-rules.mdc
55
+ installedPath: .cursor/rules/cip-field-mapping-rules.mdc
56
+ sha256: 2f0039e8518a86902497e20e67d8fc288412105917b3c2f150f513a213180545
57
+ owner: contract-checklist.md
58
+ disposition: obsolete
59
+ - source: rules/credential-security-rules.mdc
60
+ installedPath: .cursor/rules/credential-security-rules.mdc
61
+ sha256: bf8089e23a65a05faf751d00178fb2d0b39308518bb7bea3f97bc8228154f076
62
+ owner: AGENTS.md
63
+ disposition: obsolete
64
+ - source: rules/cust-commands.mdc
65
+ installedPath: .cursor/rules/cust-commands.mdc
66
+ sha256: 7e48f104dd990a7e51d79e1a17463c0b40e98bf29f9ac4de85b49b600a03c693
67
+ owner: aifabrix-connected-system
68
+ disposition: obsolete
69
+ - source: rules/datasource-schema-validation.mdc
70
+ installedPath: .cursor/rules/datasource-schema-validation.mdc
71
+ sha256: eec532089e8416cbfce5859bfbf6eed187c8e6144ead2b0cd17aa36d1bdddd2f
72
+ owner: contract-checklist.md
73
+ disposition: obsolete
74
+ - source: rules/exposed-interface.mdc
75
+ installedPath: .cursor/rules/exposed-interface.mdc
76
+ sha256: 7fd19b564f9f31ab2d6c71b9f2d9f5f327a907909a1149861ccfa0e1cab088a9
77
+ owner: contract-checklist.md
78
+ disposition: obsolete
79
+ - source: rules/foreign-keys-challenge.mdc
80
+ installedPath: .cursor/rules/foreign-keys-challenge.mdc
81
+ sha256: 321ee8c2ebbecaef1132e95a27839978cfb705567a93576780c441f4d7865872
82
+ owner: contract-checklist.md
83
+ disposition: obsolete
84
+ - source: rules/integration-change-documentation.mdc
85
+ installedPath: .cursor/rules/integration-change-documentation.mdc
86
+ sha256: 6864f2aa7e57e4751ea75b4025ff084a6585ae4e7b679b58e5f8ed845bfe2ee3
87
+ owner: integration/AGENTS.md
88
+ disposition: obsolete
89
+ - source: rules/integration-test-lifecycle.mdc
90
+ installedPath: .cursor/rules/integration-test-lifecycle.mdc
91
+ sha256: ea884b9945f9effe8f026c8d713cd365aa6f94265cf8fa1ce5a0a3deff462d35
92
+ owner: delivery-gates.md
93
+ disposition: obsolete
94
+ - source: rules/production-system-safety.mdc
95
+ installedPath: .cursor/rules/production-system-safety.mdc
96
+ sha256: 80fc24104326aa5b0d01556a607b15cd7dac4e59248491ca11dc204b8e6db20e
97
+ owner: production-safety.md
98
+ disposition: obsolete
99
+ - source: rules/project.mdc
100
+ installedPath: .cursor/rules/project.mdc
101
+ sha256: 3f5692a2bd626d68e4b5c05939ee60c2d9e46d9f3dc257b2e042d65e46b22e75
102
+ owner: AGENTS.md
103
+ disposition: obsolete
104
+ - source: rules/rbac-abac-integration-rules.mdc
105
+ installedPath: .cursor/rules/rbac-abac-integration-rules.mdc
106
+ sha256: 2953c47dd148df8d2738e229dbe2784871ff3fabce6d64d08943de73a151177a
107
+ owner: contract-checklist.md
108
+ disposition: obsolete
109
+ - source: rules/role-assistant.mdc
110
+ installedPath: .cursor/rules/role-assistant.mdc
111
+ sha256: cc62ae840cbed94b7b9f50ccd52d94ab290f5c262e5e8158abfbf60db21b4f3f
112
+ owner: role-assistant/AGENTS.md
113
+ disposition: obsolete
114
+ - source: rules/viewpoint-fk-dimensions.mdc
115
+ installedPath: .cursor/rules/viewpoint-fk-dimensions.mdc
116
+ sha256: 76df5f2f29c15faafaed8c7c89f7d407eb2281c57c16b47bf149703a688b1736
117
+ owner: contract-checklist.md
118
+ disposition: obsolete
119
+ - source: skills/aifabrix-business-spec-to-plan/SKILL.md
120
+ installedPath: .cursor/skills/aifabrix-business-spec-to-plan/SKILL.md
121
+ sha256: 0b83e81d0852962dc4802a57857dfe02914165be6ab03c36c3f58f5a47e3ae33
122
+ owner: aifabrix-plan
123
+ disposition: obsolete
124
+ - source: skills/aifabrix-business-spec-to-plan/challenge-checklist.md
125
+ installedPath: .cursor/skills/aifabrix-business-spec-to-plan/challenge-checklist.md
126
+ sha256: 6e6d5b7340bddd9dba63626c718906420186ee490094a2db6681ea82541f9357
127
+ owner: aifabrix-plan/references/challenge-checklist.md
128
+ disposition: moved
129
+ - source: skills/aifabrix-business-spec-to-plan/plan-template.md
130
+ installedPath: .cursor/skills/aifabrix-business-spec-to-plan/plan-template.md
131
+ sha256: 06b46d9d45c0eb297b6e6deeb5b8803a7d79a12b8b77491dc3537e950dd6081c
132
+ owner: aifabrix-plan/references/plan-template.md
133
+ disposition: moved
134
+ - source: skills/aifabrix-foreign-keys-challenge/SKILL.md
135
+ installedPath: .cursor/skills/aifabrix-foreign-keys-challenge/SKILL.md
136
+ sha256: 28c9e2b41a3c89d66bb005e803b3c0655203a8e8a5ccbfe9b19eaaace46ae1a0
137
+ owner: contract-checklist.md
138
+ disposition: obsolete
139
+ - source: skills/aifabrix-identity-rbac/SKILL.md
140
+ installedPath: .cursor/skills/aifabrix-identity-rbac/SKILL.md
141
+ sha256: 2bc31b1a96c3a0a2cf6a9220b07c330e08b4dc0ddc6487eb4bd7c3fffdeabe63
142
+ owner: contract-checklist.md
143
+ disposition: obsolete
144
+ - source: skills/aifabrix-integration-e2e-tester/SKILL.md
145
+ installedPath: .cursor/skills/aifabrix-integration-e2e-tester/SKILL.md
146
+ sha256: 2dcad14746a03a88de869d8856584d8daa799312475467fd2a85ceb3ebd4b0e5
147
+ owner: delivery-gates.md
148
+ disposition: obsolete
149
+ - source: skills/aifabrix-integration-lifecycle/SKILL.md
150
+ installedPath: .cursor/skills/aifabrix-integration-lifecycle/SKILL.md
151
+ sha256: 6d67bdc9bee11d8e9a72b62de2133f9dc0fac80964d98f905d6a189e59bd2d76
152
+ owner: aifabrix-connected-system
153
+ disposition: obsolete
154
+ - source: skills/aifabrix-manifest-validator/SKILL.md
155
+ installedPath: .cursor/skills/aifabrix-manifest-validator/SKILL.md
156
+ sha256: 1dc366fb0efeafa87f643fcb6341021c42a6ce4b5a65ce9ccb4b24bb8f720c91
157
+ owner: aifabrix-connected-system
158
+ disposition: obsolete
159
+ - source: skills/aifabrix-package-format/SKILL.md
160
+ installedPath: .cursor/skills/aifabrix-package-format/SKILL.md
161
+ sha256: 51db0c52ff271cbe9c3f02582a1d629aab10d74a6bf0cc7b0837a936e8399fe2
162
+ owner: aifabrix-connected-system
163
+ disposition: obsolete
164
+ - source: skills/aifabrix-poc-business-case/SKILL.md
165
+ installedPath: .cursor/skills/aifabrix-poc-business-case/SKILL.md
166
+ sha256: b6e949292f6b9d2f1a87560594d23161a734d9cadb09b29efdf56f589ba9ac00
167
+ owner: aifabrix-prove
168
+ disposition: obsolete
169
+ - source: skills/aifabrix-poc-business-case/reference-demo-md.md
170
+ installedPath: .cursor/skills/aifabrix-poc-business-case/reference-demo-md.md
171
+ sha256: 3505779196339a63d4e0813de10695a59c887684e0cf1c14512f1c743c846592
172
+ owner: aifabrix-prove/references/demo-template.md
173
+ disposition: moved
174
+ - source: skills/aifabrix-poc-business-case/reference-evidence-lifecycle.md
175
+ installedPath: .cursor/skills/aifabrix-poc-business-case/reference-evidence-lifecycle.md
176
+ sha256: cfdeadb7417ea307028791c0a126b5ac5d6a7f1a456e05871b8d0d389c0c85a8
177
+ owner: aifabrix-prove/references/evidence-lifecycle.md
178
+ disposition: moved
179
+ - source: skills/aifabrix-poc-business-case/reference-learning-md.md
180
+ installedPath: .cursor/skills/aifabrix-poc-business-case/reference-learning-md.md
181
+ sha256: f89817be3dfcf5c821d565b022a8b8ead7d77b594f2561196f3b52c25999ade6
182
+ owner: aifabrix-prove/references/learning-template.md
183
+ disposition: moved
184
+ - source: skills/aifabrix-role-assistant-lifecycle/SKILL.md
185
+ installedPath: .cursor/skills/aifabrix-role-assistant-lifecycle/SKILL.md
186
+ sha256: 27781f1a5c5d4bb7b2e9551a063e66fceaf8f99a38dc2e6efe20048754a1de3f
187
+ owner: aifabrix-role-assistant
188
+ disposition: obsolete
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: aifabrix-connected-system
3
+ description: >
4
+ Plan, validate, build, or publish a customer Connected System with Builder.
5
+ Preserves READY, BUILT, PASS, and PASS_WITH_SKIPS gates. Use for integration
6
+ packages under integration/. Do not use to change Builder product source or
7
+ to author Role Assistant sidecars.
8
+ ---
9
+
10
+ # aifabrix-connected-system
11
+
12
+ Phases: `plan` | `validate` | `build` | `publish`.
13
+ Resolve phase: explicit argument → plan/package state → safe next → ask once.
14
+
15
+ Stop at the phase gate. Do not run the next phase without `next-yes`
16
+ ([interaction.md](../aifabrix-plan/references/interaction.md)).
17
+
18
+ | Phase | Entry | Success |
19
+ | --- | --- | --- |
20
+ | plan | business specification exists | PLAN_READY via `aifabrix-plan` |
21
+ | validate | plan decisions locked | READY |
22
+ | build | READY | BUILT |
23
+ | publish | package exists and local validate passes | PASS or PASS_WITH_SKIPS |
24
+
25
+ Read current CLI help before composing commands. You own orchestration, not CLI implementation.
26
+ Host runtimes (local vs SSH): [hosts.md](../shared/hosts.md).
27
+
28
+ ## Always
29
+
30
+ ```bash
31
+ aifabrix auth status
32
+ ```
33
+
34
+ Refresh first. User runs `aifabrix login` only if still unauthenticated. Re-run on 401, then retry once.
35
+
36
+ System key: argument → active plan → sole `integration/` folder → ask once. Never invent. Reject `ra-` / `ek-` ([scripts/reserved-system-key.js](scripts/reserved-system-key.js)).
37
+
38
+ ## References
39
+
40
+ - [delivery-gates.md](references/delivery-gates.md) — BID/wizard/repair, upload vs deploy, tests, identity, protection
41
+ - [contract-checklist.md](references/contract-checklist.md) — exposed, FK, viewpoints, RBAC/ABAC
42
+ - [production-safety.md](references/production-safety.md) — designated subject, credential-deferred E2E
43
+
44
+ ## Hard gates
45
+
46
+ - Builder/BID/wizard/repair owns generated package shape
47
+ - Manual EDS delta requires changelog
48
+ - Schema-only `exposed` is not BUILT
49
+ - Unexplained empty FK on business storage is not READY/BUILT
50
+ - Non-catalog role fails
51
+ - Upload without deploy is not published and not PASS
52
+ - No system-level sync of views
53
+ - No publish continuation after an unresolved hard failure
54
+
55
+ ## Trigger examples
56
+
57
+ - Validate and build the Person system integration
58
+ - Publish and certify this Connected System
@@ -0,0 +1,40 @@
1
+ # Connected System contract checklist
2
+
3
+ Use after BID apply / repair and before READY or BUILT.
4
+
5
+ ## Exposed
6
+
7
+ `exposed` must include `filterable`, `readonly`, `required`, `profiles` (`default` plus capability keys), and `schema`.
8
+ Every `filterable` field needs `metadataSchema.properties.<field>.filter: true` (usually `index: true`).
9
+ Schema-only stubs are not BUILT. `labelKey` prefers login identity before display name.
10
+
11
+ ## Foreign keys
12
+
13
+ Challenge every storage and view DS. Empty `foreignKeys` on business facts/children is a defect.
14
+ FK lives on the child only: `fields` = carrier on this DS, `targetDatasource` = parent storage, `targetFields: ["externalId"]`.
15
+ Do not add reverse FKs on the parent. Same-DS `parentId` is a field, not a self-FK.
16
+ Allowed omit (changelog): config, logs, documented in-system root, self-tree.
17
+ Revalidate after BID apply: `relationships` must land on the `from` EDS.
18
+
19
+ ## Viewpoints
20
+
21
+ Partitioned aggregates and current-state person composition (person + current manager + current location/org when those storage DS exist) need FK + `dimensions` (`type: fk`) + usually `abac.applicability: required`.
22
+ SQL must alias the grant column to the catalog dimension key before `GROUP BY`.
23
+ Protection SSOT stays on the storage DS; views inherit. Never bulk-sync a view as storage.
24
+ Do not flatten person+employment+org into one storage DS to avoid a current-state view.
25
+
26
+ ## RBAC / ABAC
27
+
28
+ `roles[].value` = active COM catalog key from `aifabrix role list`. Map groups with `identity role set-groups`.
29
+ Local ABAC filters the physical column named after the dimension key.
30
+ Do not invent dimensions on `entityType: none` orchestration datasources.
31
+
32
+ ## CIP mappings
33
+
34
+ Prefer `fieldMappings`, FK, and composite `primaryKey` for reshape. Minimal prep only for broken export JSON.
35
+ CIP executes certified capability surfaces; it does not decide continuation. COM does not own continuation.
36
+ Capabilities execute; they do not decide.
37
+
38
+ ## Format and changelog
39
+
40
+ `aifabrix convert` is for `integration/` and `builder/` only. Manual EDS edits need `INTEGRATION_CHANGELOG.md`. File generic CLI gaps in `BUILDER_IMPROVEMENT_FINDINGS.md`.
@@ -0,0 +1,54 @@
1
+ # Delivery gates
2
+
3
+ Public docs: https://docs.aifabrix.ai/docs/build-ai-ready-systems-validate-test-cli-workflow
4
+
5
+ ## Create
6
+
7
+ BID preferred:
8
+
9
+ ```bash
10
+ aifabrix integration-definition validate ./integration/<systemKey>/bid.json
11
+ aifabrix integration-definition apply ./integration/<systemKey>/bid.json --dry-run
12
+ aifabrix integration-definition apply ./integration/<systemKey>/bid.json
13
+ ```
14
+
15
+ Live OpenAPI: `aifabrix wizard --config integration/wizard-configs/<system>.yaml`
16
+
17
+ Then `aifabrix repair <systemKey> --rbac --expose` (add `--auth` when credentials exist).
18
+ Match workspace format with `aifabrix convert` on `integration/` only.
19
+
20
+ If `integration/<systemKey>/deploy.js` exists, you may run it as the publish ladder.
21
+
22
+ ## Validate vs publish
23
+
24
+ | Command | Meaning |
25
+ | --- | --- |
26
+ | `aifabrix validate <systemKey>` | Local package |
27
+ | `aifabrix upload <systemKey>` | Draft application. CLI “Published” is not CS publish |
28
+ | `aifabrix deploy <systemKey>` | Controller deploy = publish. Always run after upload |
29
+ | `aifabrix show <systemKey> --online` | Dataplane **published** is truth |
30
+
31
+ ## Tests (separate results)
32
+
33
+ | Layer | Command |
34
+ | --- | --- |
35
+ | Structure | `aifabrix datasource test <datasourceKey>` |
36
+ | Pipeline | `aifabrix datasource test-integration <datasourceKey>` |
37
+ | Live | `aifabrix datasource test-e2e <datasourceKey> --app <systemKey>` |
38
+ | Static seed | `aifabrix datasource load <datasourceKey> --app <systemKey>` |
39
+
40
+ Never mark live E2E pass when it did not run.
41
+
42
+ ## Identity and protection order
43
+
44
+ 1. `aifabrix auth status`
45
+ 2. Catalog roles + fixtures + `identity apply` / `identity sync` / `role set-groups`
46
+ 3. Load partitioned fixtures
47
+ 4. `aifabrix protection upload <sourceStorageDs> --sync` (storage DS, not the view)
48
+ 5. `aifabrix verify-governance --pack ./scenarios/….yaml` with `defaults.limit` ≤ 1000
49
+
50
+ `builder/dataplane/rbac.yaml` is dataplane **app** RBAC, not customer CS roles.
51
+
52
+ ## Missing vendor `kv://`
53
+
54
+ Do not AskQuestion for secrets. Resolve, empty generated Key Vault placeholders, **upload**, print `{dataplaneUrl}/connected-systems/{systemKey}?tab=authentication`, stop.
@@ -0,0 +1,35 @@
1
+ # Production safety
2
+
3
+ Many organizations have only a production vendor system. Assume that by default for live OpenAPI.
4
+
5
+ System-specific limits (subject, partition, credential status, PII) live only in `integration/<systemKey>/README.md`.
6
+
7
+ ## Credential-deferred certify
8
+
9
+ When the vendor secret is not yet in `kv://`:
10
+
11
+ | Layer | Required |
12
+ | --- | --- |
13
+ | Package validate | Yes |
14
+ | Structure test | Yes |
15
+ | Integration / pipeline test | Yes when entityType supports it |
16
+ | AI / Trust / ops | Yes where runnable without vendor secret |
17
+ | Governance packs | Yes when subjects + fixtures exist offline; else skip-with-reason |
18
+ | Live E2E / vendor-auth probe | Skip with reason |
19
+
20
+ Publish may be **PASS_WITH_SKIPS** only for those allowed live/static skips. Never fake an E2E pass.
21
+ Secret present and storage sync fails → FAIL / NEEDS_FIXES, never skipped.
22
+
23
+ ## Mutation blast radius
24
+
25
+ 1. README names exactly one approved test subject (stable identity keys).
26
+ 2. Create / update / delete may target only that subject.
27
+ 3. Never mutate “first list row” or a broader population.
28
+ 4. Prefer read-only E2E until writes and the subject are confirmed.
29
+ 5. Mutating E2E without a designated subject → BLOCKED before the call.
30
+
31
+ ## Agent
32
+
33
+ Read the integration README before live or mutating tests.
34
+ Do not invent a second safe subject without customer approval recorded in that README.
35
+ Missing `kv://`: upload draft first, print the Authentication tab URL, stop.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Reserved Connected System key prefixes.
3
+ * @fileoverview Deterministic reserved-key check for customer delivery skills
4
+ */
5
+
6
+ 'use strict';
7
+
8
+ /**
9
+ * @param {string} key Connected System key
10
+ * @returns {boolean} True when the key uses a reserved ra- or ek- prefix
11
+ */
12
+ function isReservedSystemKey(key) {
13
+ const value = String(key || '')
14
+ .trim()
15
+ .toLowerCase();
16
+ return value.startsWith('ra-') || value.startsWith('ek-');
17
+ }
18
+
19
+ module.exports = { isReservedSystemKey };
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: aifabrix-plan
3
+ description: >
4
+ Turn a customer business specification into a delivery plan with a fixed
5
+ section order. Challenges missing facts; does not invent entities, roles,
6
+ or authority. Use before Connected System validate/build. Do not use for
7
+ Builder product source changes or COM architecture explanations.
8
+ ---
9
+
10
+ # aifabrix-plan
11
+
12
+ Input: business specification and optional `systemKey`.
13
+ Output: one delivery plan from [plan-template.md](references/plan-template.md).
14
+
15
+ Score completeness with [challenge-checklist.md](references/challenge-checklist.md).
16
+ Next-step interaction: [interaction.md](references/interaction.md).
17
+ Host runtimes (local vs SSH): [hosts.md](../shared/hosts.md).
18
+
19
+ ## Sequence
20
+
21
+ ```text
22
+ specification → aifabrix-plan → PLAN_READY | NEEDS_DECISIONS | BLOCKED
23
+ ```
24
+
25
+ Do not start Connected System validate until **PLAN_READY** and the user picks `next-yes`.
26
+
27
+ ## Workflow
28
+
29
+ 1. Collect the spec the user named. Do not mine platform repos as the spec.
30
+ 2. Inventory without adding: purpose, sources, entities, relationships, role labels, operations, Viewpoints, Evidence, identity join. Missing sections → `TBD` plus an Open question.
31
+ 3. Challenge required rows. AskQuestion every MISSING required row. Authority and identity cannot be guessed.
32
+ 4. Write or update `.cursor/plans/{major}.0-{slug}.plan.md` using the template H2 order. Same capability updates in place.
33
+ 5. Report status and path. On PLAN_READY, offer validate — do not run it without `next-yes`.
34
+
35
+ ## Hard stops
36
+
37
+ - Empty spec, reserved `ra-` / `ek-` key, or contradictory identity → **BLOCKED** (no challenge prompts).
38
+ - Unmapped catalog roles → NEEDS_DECISIONS; never invent `*-reader`.
39
+ - “Already connected” is FACT only if `integration/<key>/` exists in this workspace.
40
+ - No implementation before the project plan gate.
41
+
42
+ ```bash
43
+ aifabrix auth status
44
+ aifabrix role list --page-size 1000
45
+ ```
46
+
47
+ If still unauthenticated after refresh, draft the plan; catalog-role rows stay MISSING until the user runs `aifabrix login`.
48
+
49
+ ## Trigger examples
50
+
51
+ - Turn this customer specification into an implementation plan
@@ -0,0 +1,108 @@
1
+ # Challenge checklist (business spec → plan)
2
+
3
+ Mark every row **FACT** | **ASSUMPTION** | **MISSING**.
4
+ Do **not** invent FACT. ASSUMPTION is allowed only when the spec implies it and you name the risk.
5
+
6
+ `PLAN_READY` requires every **Required** row FACT or a **locked decision** in the plan (not a silent guess).
7
+
8
+ ## AskQuestion (mandatory when a row is MISSING)
9
+
10
+ Do **not** only list gaps in chat. For every **Required** row marked MISSING, and every **Challenge if missing** row that says Ask (C1, C2, D-edit, C4), call the **AskQuestion** tool in the same turn as the `/cust-0-plan` report. Batch into **one** AskQuestion (multiple `questions[]`). Do not invent FACT from a skipped prompt.
11
+
12
+ Shared option ids: `challenge-fact` (user will supply via Other), `challenge-assumption` (lock ASSUMPTION + who must confirm), `challenge-open` (leave NEEDS_DECISIONS).
13
+
14
+ ```json
15
+ {
16
+ "title": "Plan challenges",
17
+ "questions": [{
18
+ "id": "challenge-B4",
19
+ "prompt": "B4 Process owner is MISSING.\n\nPLAN_READY needs a named owner or a locked ASSUMPTION with who must confirm.",
20
+ "options": [
21
+ { "id": "challenge-fact", "label": "I will provide the FACT (use Other)" },
22
+ { "id": "challenge-assumption", "label": "Lock as ASSUMPTION (name who must confirm in Other)" },
23
+ { "id": "challenge-open", "label": "Leave open — NEEDS_DECISIONS" }
24
+ ]
25
+ }]
26
+ }
27
+ ```
28
+
29
+ Substitute `challenge-{rowId}` and the row’s **PLAN_READY when** / **If missing** text. For **C1**, options are 2–3 impact models (prefer hours saved) plus `challenge-open` — do not invent a FACT measure. For **C2** / **D-edit**, ask once with the same three shared ids (D-edit default if they pick assumption: enabled while Open).
30
+
31
+ Do **not** AskQuestion challenges on **BLOCKED** (empty spec / reserved key / contradictory identity). Skip rows already FACT or locked.
32
+
33
+ ## Business case (Required)
34
+
35
+ | # | Item | PLAN_READY when |
36
+ | --- | --- | --- |
37
+ | B1 | Purpose | One paragraph: what improves and for whom |
38
+ | B2 | Expected outcome | What “done” looks like (experience + proof), not only “system exists” |
39
+ | B3 | In / out of scope | Explicit out-of-scope (do not grow the spec) |
40
+ | B4 | Process owner | Named owner **or** ASSUMPTION with “who must confirm” |
41
+ | B5 | Business roles | ≥1 role with **can** and **cannot** (authority, not prompts) |
42
+ | B6 | Prove story | How we will show authority change and refusals (demo / VAL / ATTACK) |
43
+
44
+ ## Delivery (Required)
45
+
46
+ | # | Item | PLAN_READY when |
47
+ | --- | --- | --- |
48
+ | D1 | Connected System key(s) | kebab-case; not `ra-` / `ek-`; existing package vs **new** stated |
49
+ | D2 | Authoritative source(s) | Each source: already connected in **this** workspace, to-be-connected, or internal-only |
50
+ | D3 | Entities + identity | Every entity has a stable id; **no name-string PK**; identity join named if “current user → entity” |
51
+ | D4 | Foreign keys | Every business fact/child has joins **on the child (`from`) only**; do **not** add reverse FKs on the parent; self-`parentId` is a field, not a same-DS FK; config/logs/root/self-tree omit only with rationale (skill `aifabrix-foreign-keys-challenge`) |
52
+ | D5 | Catalog roles | Spec role **labels** mapped to COM keys from `aifabrix role list` — never invent `*-reader` |
53
+ | D6 | Operations | List/submit/view/admin from the spec only; no extra authority |
54
+ | D7 | Viewpoints vs raw | Aggregates/results use named Viewpoints; raw rows not exposed through result assistants. Person+employment+org packages include a **current-state person view** (person + current manager + current location/org) unless explicitly out of scope (`viewpoint-fk-dimensions.mdc`) |
55
+ | D8 | Validations | Happy path **and** refusal/attack cases (VAL-* / ATTACK-* or equivalent) |
56
+ | D9 | Evidence | What Evidence must prove (actor, role, rule, success/refusal) |
57
+ | D10 | Historical vs current | Current eligibility from source of record; historical Evidence is **not** cascade-deleted |
58
+
59
+ ## Challenge if missing (may stay ASSUMPTION)
60
+
61
+ | # | Item | If missing |
62
+ | --- | --- | --- |
63
+ | C1 | Success measures | Offer 2–3 models (prefer hours saved / participation); do not invent FACT |
64
+ | C2 | Audience / personas | Ask once |
65
+ | C3 | Language handling | Original = Evidence; derived translation/normalization = Knowledge; never overwrite original |
66
+ | D-edit | Optional update-while-open | Ask; default **ASSUMPTION: enabled while Open** if spec says “if editing is enabled” |
67
+ | C4 | Admin operators | Who Open / Close / Validate / Release — named role, not “the AI” |
68
+ | C5 | Catalog `resourceType` | Confirm at BID apply; do not guess silently |
69
+ | C6 | Designated test subject | Required before mutating live E2E (`production-system-safety.mdc`) — README later |
70
+ | C7 | Credential posture | Secret present vs deferred — README later; do not block plan draft |
71
+ | C8 | Role Assistant packages | `ra-<catalogRole>` only after D5; one RA per catalog role that performs work |
72
+ | C9 | Supported languages | Spec may say “any supported”; list known ones as ASSUMPTION |
73
+ | C10 | Taxonomy predefined vs discovered | Spec default: discovered unless owners lock a list |
74
+ | C11 | Identity uniqueness | Email (or equivalent login identity) is **unique in business fact** — `index` + `filter` + identity join. EDS schema has no `unique` flag; prove uniqueness after **sync** (duplicates = data-quality fail). Do not invent a schema property. |
75
+ | C12 | Live pull / sync | Live OpenAPI with secret stored: E2E **sync** (or `datasource load` for static) must pass. Sync fail with secret present is **FAIL**, not PASS_WITH_SKIPS. |
76
+ | C13 | Governance packs | People/HR CS or any DS with dimensions: `scenarios/` + fixtures **before** claiming push ready. Missing packs = **FAIL** unless README says governance N/A. |
77
+
78
+ ## Must not invent
79
+
80
+ - Extra Business Roles, operations, or “admin backdoors”
81
+ - Extra entities or fields not in the spec
82
+ - Vendor/source fields beyond the **approved** source scope
83
+ - COM catalog role keys that are not on `aifabrix role list`
84
+ - Treating display names as foreign keys
85
+ - Adding FKs on **both** sides of a relationship (parent and child)
86
+ - Enforcing BR-* only in UI or prompt text
87
+ - Publishing results automatically when a process **closes** if the spec requires explicit release
88
+ - Cascade-delete of historical Evidence when source records become inactive
89
+ - Putting tenant ids, secrets, or designated subjects into `.cursor/rules` / skills / commands
90
+
91
+ ## Classification hints
92
+
93
+ | Spec language | Classify as |
94
+ | --- | --- |
95
+ | “already connected” | FACT only if the package exists under `integration/` **in this workspace**; else MISSING (to-be-connected) |
96
+ | Role names like “Employee”, “HR Manager” | Labels — **must** map to catalog keys (D5) |
97
+ | “AI-derived” / themes | Knowledge, versioned, not authoritative fact |
98
+ | Original free text | Evidence — immutable |
99
+ | Aggregate leaderboards / maps | Viewpoints — not storage dumps |
100
+ | Self-nomination / unique / window | Governed business rules (BR-*) |
101
+
102
+ ## Status
103
+
104
+ | Status | Meaning |
105
+ | --- | --- |
106
+ | **PLAN_READY** | Required rows FACT or locked; remaining opens have owner; safe to `/cust-1-validate` |
107
+ | **NEEDS_DECISIONS** | Required MISSING; **still write** the draft plan; do **not** start `/cust-1-validate` |
108
+ | **BLOCKED** | Empty spec, reserved `system-key`, contradictory identity (name as PK with no join), or “invent authority” requested |
@@ -0,0 +1,34 @@
1
+ # Phase and result interaction
2
+
3
+ Use structured questions. Do not start the next phase from chat prose alone.
4
+
5
+ ## After success
6
+
7
+ Offer the next eligible phase. Proceed only on `next-yes`.
8
+
9
+ Shared option ids: `next-yes` · `next-no` · `next-stop`.
10
+
11
+ | Completed | Next offer |
12
+ | --- | --- |
13
+ | aifabrix-plan PLAN_READY | connected-system validate |
14
+ | connected-system READY | connected-system build |
15
+ | connected-system BUILT | connected-system publish |
16
+ | connected-system PASS or PASS_WITH_SKIPS | archive (separate) and/or prove validate |
17
+ | prove READY / BUILT / UPDATED | prove next phase |
18
+ | prove PASS or PASS_WITH_SKIPS | iterate validate/build |
19
+
20
+ Archive is a distinct user decision (`archive-yes` / `archive-no`). Never archive as a side effect of PASS.
21
+
22
+ ## On gaps
23
+
24
+ - NEEDS_DECISIONS: AskQuestion challenge rows. No `cust-next`.
25
+ - BLOCKED / FAIL / NEEDS_FIXES / ABORTED: do not offer the next phase as if success.
26
+
27
+ ## Phase detection (connected-system and prove)
28
+
29
+ 1. Explicit phase from the user
30
+ 2. Active plan and package state
31
+ 3. Safe next eligible phase
32
+ 4. Ask once if ambiguous
33
+
34
+ Never silently run the following phase after success.