@enterpriseai/cli 3.19.0 → 3.19.2

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 (364) hide show
  1. package/package.json +3 -3
  2. package/resources/deploy/eai-app-template/producer-pin.json +5 -5
  3. package/resources/deploy/eai-app-template/tests/source-unknown-deployment-evidence.test.mjs +2141 -1
  4. package/resources/gofer/.gofer-version +4 -357
  5. package/resources/gofer/agents-skills/eai/SKILL.md +365 -0
  6. package/resources/gofer/agents-skills/eai-update/SKILL.md +56 -0
  7. package/resources/gofer/agents-skills/gofer-documentation/SKILL.md +93 -0
  8. package/resources/gofer/bash-scripts/create-new-feature.sh +3 -1
  9. package/resources/gofer/bash-scripts/sync-implementation-status.sh +4 -3
  10. package/resources/gofer/bash-scripts/update-agent-context.sh +7 -8
  11. package/resources/gofer/bash-scripts/validate-artifact.sh +10 -6
  12. package/resources/gofer/bash-scripts/verify-object-type-routing-workspace.sh +184 -0
  13. package/resources/gofer/claude-commands/eai-update.md +46 -0
  14. package/resources/gofer/claude-commands/eai.md +355 -0
  15. package/resources/gofer/claude-skills/eai/SKILL.md +365 -0
  16. package/resources/gofer/claude-skills/eai-update/SKILL.md +56 -0
  17. package/resources/gofer/claude-skills/gofer-documentation/SKILL.md +93 -0
  18. package/resources/gofer/commands/0_gofer_start.md +440 -99
  19. package/resources/gofer/commands/0a_problem_validation.md +187 -27
  20. package/resources/gofer/commands/10_gofer_cloud.md +183 -23
  21. package/resources/gofer/commands/1_gofer_research.md +239 -30
  22. package/resources/gofer/commands/2_gofer_specify.md +239 -35
  23. package/resources/gofer/commands/3_gofer_plan.md +259 -43
  24. package/resources/gofer/commands/4_gofer_tasks.md +401 -81
  25. package/resources/gofer/commands/5_gofer_implement.md +375 -84
  26. package/resources/gofer/commands/6_gofer_validate.md +284 -53
  27. package/resources/gofer/commands/7_gofer_save.md +187 -26
  28. package/resources/gofer/commands/7a_stakeholder_comms.md +183 -23
  29. package/resources/gofer/commands/8_gofer_branding.md +183 -23
  30. package/resources/gofer/commands/9_gofer_tests.md +212 -23
  31. package/resources/gofer/commands/gofer_bootstrap_workspace.md +121 -8
  32. package/resources/gofer/commands/gofer_check_workspace.md +123 -8
  33. package/resources/gofer/commands/gofer_constitution.md +183 -23
  34. package/resources/gofer/commands/gofer_diagnose.md +183 -23
  35. package/resources/gofer/commands/gofer_eai_first_run.md +254 -25
  36. package/resources/gofer/commands/gofer_hydrate.md +183 -23
  37. package/resources/gofer/commands/gofer_personality.md +117 -6
  38. package/resources/gofer/commands/gofer_plan.md +117 -6
  39. package/resources/gofer/commands/gofer_side.md +117 -6
  40. package/resources/gofer/commands/gofer_spec_summary.md +183 -23
  41. package/resources/gofer/commands/gofer_tdd.md +183 -23
  42. package/resources/gofer/commands/gofer_vocabulary.md +185 -25
  43. package/resources/gofer/commands/gofer_zoom_out.md +183 -23
  44. package/resources/gofer/config/typesafe-learning-review.json +16 -0
  45. package/resources/gofer/config/typesafe-semantic-review.json +9 -0
  46. package/resources/gofer/copilot-instructions/gofer-cost.instructions.md +15 -6
  47. package/resources/gofer/copilot-instructions/typescript.instructions.md +1 -1
  48. package/resources/gofer/copilot-prompts/eai-update.prompt.md +58 -0
  49. package/resources/gofer/copilot-prompts/eai.prompt.md +367 -0
  50. package/resources/gofer/gemini/commands/gofer/eai-update.md +22 -0
  51. package/resources/gofer/gemini/commands/gofer/eai-update.toml +2 -0
  52. package/resources/gofer/gemini/commands/gofer/eai.md +357 -0
  53. package/resources/gofer/gemini/commands/gofer/eai.toml +2 -0
  54. package/resources/gofer/gemini/commands/gofer/manifest.json +3 -27
  55. package/resources/gofer/gemini/extension.json +4 -4
  56. package/resources/gofer/github-agents/eai.agent.md +83 -0
  57. package/resources/gofer/github-agents/gofer-business.agent.md +73 -4
  58. package/resources/gofer/github-agents/gofer-implement.agent.md +71 -2
  59. package/resources/gofer/github-agents/gofer-plan.agent.md +72 -2
  60. package/resources/gofer/github-agents/gofer-research.agent.md +72 -2
  61. package/resources/gofer/github-agents/gofer-validate.agent.md +72 -2
  62. package/resources/gofer/github-skills/eai/SKILL.md +365 -0
  63. package/resources/gofer/github-skills/eai-update/SKILL.md +56 -0
  64. package/resources/gofer/github-skills/gofer-documentation/SKILL.md +93 -0
  65. package/resources/gofer/grok-skills/eai/SKILL.md +267 -14
  66. package/resources/gofer/grok-skills/eai-update/SKILL.md +56 -0
  67. package/resources/gofer/hook-scripts/user-prompt-submit.mjs +58 -13
  68. package/resources/gofer/instruction-templates/base/agents-base.md +8 -4
  69. package/resources/gofer/instruction-templates/gofer/gofer-claude.md +7 -5
  70. package/resources/gofer/instruction-templates/gofer/gofer-copilot.md +10 -8
  71. package/resources/gofer/memory/constitution.md +9 -7
  72. package/resources/gofer/memory/gofer-model-policy.yaml +23 -1
  73. package/resources/gofer/memory/lessons.md +0 -31
  74. package/resources/gofer/node-scripts/canonical-descriptions.mjs +1 -1
  75. package/resources/gofer/node-scripts/check-version-alignment.mjs +4 -7
  76. package/resources/gofer/node-scripts/delivery-lineage-corpus.mjs +156 -0
  77. package/resources/gofer/node-scripts/generate-commands.mjs +1073 -265
  78. package/resources/gofer/node-scripts/gofer-acceptance-check.mjs +143 -0
  79. package/resources/gofer/node-scripts/gofer-agent-catalog.mjs +271 -0
  80. package/resources/gofer/node-scripts/gofer-benchmark-executor.mjs +123 -0
  81. package/resources/gofer/node-scripts/gofer-benchmark-sign.mjs +62 -0
  82. package/resources/gofer/node-scripts/gofer-benchmark-signer.mjs +89 -0
  83. package/resources/gofer/node-scripts/gofer-benchmark.mjs +76 -0
  84. package/resources/gofer/node-scripts/gofer-blocker-control.mjs +274 -0
  85. package/resources/gofer/node-scripts/gofer-claude-adapter.mjs +154 -0
  86. package/resources/gofer/node-scripts/gofer-closed-loop-audit.mjs +19 -2
  87. package/resources/gofer/node-scripts/gofer-delivery-check.mjs +121 -0
  88. package/resources/gofer/node-scripts/gofer-encrypted-key.mjs +58 -0
  89. package/resources/gofer/node-scripts/gofer-execution-metrics.mjs +477 -0
  90. package/resources/gofer/node-scripts/gofer-execution-recovery.mjs +334 -0
  91. package/resources/gofer/node-scripts/gofer-grok-adapter.mjs +184 -0
  92. package/resources/gofer/node-scripts/gofer-heldout-corpus.mjs +73 -0
  93. package/resources/gofer/node-scripts/gofer-heldout-snapshot.mjs +286 -0
  94. package/resources/gofer/node-scripts/gofer-heldout-verifier.mjs +211 -0
  95. package/resources/gofer/node-scripts/gofer-host-capability.mjs +335 -0
  96. package/resources/gofer/node-scripts/gofer-independent-reviewer.mjs +130 -0
  97. package/resources/gofer/node-scripts/gofer-live-routing.mjs +109 -0
  98. package/resources/gofer/node-scripts/gofer-local-capability-issuer.mjs +71 -0
  99. package/resources/gofer/node-scripts/gofer-local-isolation.mjs +175 -0
  100. package/resources/gofer/node-scripts/gofer-local-settings-cleanup.mjs +388 -0
  101. package/resources/gofer/node-scripts/gofer-loop-audit.mjs +54 -3
  102. package/resources/gofer/node-scripts/gofer-native-adapter.mjs +567 -0
  103. package/resources/gofer/node-scripts/gofer-native-benchmark-dispatch.mjs +145 -0
  104. package/resources/gofer/node-scripts/gofer-native-runtime.mjs +169 -0
  105. package/resources/gofer/node-scripts/gofer-pre-edit-check.mjs +204 -0
  106. package/resources/gofer/node-scripts/gofer-priority-check.mjs +214 -0
  107. package/resources/gofer/node-scripts/gofer-response-check.mjs +56 -0
  108. package/resources/gofer/node-scripts/gofer-reviewed-learning.mjs +1232 -0
  109. package/resources/gofer/node-scripts/gofer-run-verified-task.mjs +330 -0
  110. package/resources/gofer/node-scripts/gofer-runtime-ledger.mjs +289 -0
  111. package/resources/gofer/node-scripts/gofer-semantic-drift.mjs +584 -0
  112. package/resources/gofer/node-scripts/gofer-surface-update.mjs +1178 -0
  113. package/resources/gofer/node-scripts/gofer-trust-bootstrap.mjs +77 -0
  114. package/resources/gofer/node-scripts/gofer-trusted-benchmark.mjs +102 -0
  115. package/resources/gofer/node-scripts/gofer-trusted-evaluator.mjs +274 -0
  116. package/resources/gofer/node-scripts/gofer-tty-prompt.mjs +34 -0
  117. package/resources/gofer/node-scripts/gofer-typesafe-credentials.mjs +435 -0
  118. package/resources/gofer/node-scripts/gofer-ui-preview.mjs +1212 -0
  119. package/resources/gofer/node-scripts/gofer-verified-execution.mjs +484 -0
  120. package/resources/gofer/node-scripts/gofer-verifier-key-ceremony.mjs +101 -0
  121. package/resources/gofer/node-scripts/gofer-worktree-layout.mjs +32 -0
  122. package/resources/gofer/node-scripts/object-type-routing-phase-bundle.mjs +360 -0
  123. package/resources/gofer/node-scripts/package-agent-plugin.mjs +574 -82
  124. package/resources/gofer/node-scripts/parse-stage-command.mjs +1 -1
  125. package/resources/gofer/node-scripts/render-delivery-lineage.mjs +178 -0
  126. package/resources/gofer/node-scripts/sync-extension-resources.mjs +78 -2
  127. package/resources/gofer/node-scripts/validate-object-type-identifiers.mjs +767 -0
  128. package/resources/gofer/node-scripts/validate-object-type-routing-workspace.mjs +1325 -0
  129. package/resources/gofer/node-scripts/validate-v4-resource-contract.d.mts +44 -0
  130. package/resources/gofer/node-scripts/validate-v4-resource-contract.mjs +957 -0
  131. package/resources/gofer/node-scripts/workspace-bootstrap-lib.mjs +685 -116
  132. package/resources/gofer/references/agent-catalog.json +126 -0
  133. package/resources/gofer/references/blocker-mediation.md +156 -0
  134. package/resources/gofer/references/business-updates-and-goal-checks.md +109 -0
  135. package/resources/gofer/references/delivery-lineage.md +48 -0
  136. package/resources/gofer/references/mvp-capability-validation.md +102 -0
  137. package/resources/gofer/references/platform/README.md +1 -1
  138. package/resources/gofer/references/platform/eai-app-template.md +15 -13
  139. package/resources/gofer/references/platform/eai-auth-access.md +104 -0
  140. package/resources/gofer/references/platform/eai-config-driven-ui.md +5 -5
  141. package/resources/gofer/references/platform/eai-error-catalog.yaml +77 -19
  142. package/resources/gofer/references/platform/eai-repo-contract.md +61 -23
  143. package/resources/gofer/references/platform/eai-service-patterns.md +102 -105
  144. package/resources/gofer/references/platform/eai.md +44 -8
  145. package/resources/gofer/references/platform/vertical-template.md +10 -9
  146. package/resources/gofer/references/priority-outcome-protection.md +152 -0
  147. package/resources/gofer/references/verified-agent-execution.md +179 -0
  148. package/resources/gofer/schemas/gofer-learning-trace-v1.json +70 -0
  149. package/resources/gofer/specify-commands/0_gofer_start.md +440 -99
  150. package/resources/gofer/specify-commands/0a_problem_validation.md +187 -27
  151. package/resources/gofer/specify-commands/10_gofer_cloud.md +183 -23
  152. package/resources/gofer/specify-commands/1_gofer_research.md +239 -30
  153. package/resources/gofer/specify-commands/2_gofer_specify.md +239 -35
  154. package/resources/gofer/specify-commands/3_gofer_plan.md +259 -43
  155. package/resources/gofer/specify-commands/4_gofer_tasks.md +401 -81
  156. package/resources/gofer/specify-commands/5_gofer_implement.md +375 -84
  157. package/resources/gofer/specify-commands/6_gofer_validate.md +284 -53
  158. package/resources/gofer/specify-commands/7_gofer_save.md +187 -26
  159. package/resources/gofer/specify-commands/7a_stakeholder_comms.md +183 -23
  160. package/resources/gofer/specify-commands/8_gofer_branding.md +183 -23
  161. package/resources/gofer/specify-commands/9_gofer_tests.md +212 -23
  162. package/resources/gofer/specify-commands/gofer_bootstrap_workspace.md +121 -8
  163. package/resources/gofer/specify-commands/gofer_check_workspace.md +123 -8
  164. package/resources/gofer/specify-commands/gofer_constitution.md +183 -23
  165. package/resources/gofer/specify-commands/gofer_diagnose.md +183 -23
  166. package/resources/gofer/specify-commands/gofer_eai_first_run.md +254 -25
  167. package/resources/gofer/specify-commands/gofer_hydrate.md +183 -23
  168. package/resources/gofer/specify-commands/gofer_personality.md +117 -6
  169. package/resources/gofer/specify-commands/gofer_plan.md +117 -6
  170. package/resources/gofer/specify-commands/gofer_side.md +117 -6
  171. package/resources/gofer/specify-commands/gofer_spec_summary.md +183 -23
  172. package/resources/gofer/specify-commands/gofer_tdd.md +183 -23
  173. package/resources/gofer/specify-commands/gofer_vocabulary.md +185 -25
  174. package/resources/gofer/specify-commands/gofer_zoom_out.md +183 -23
  175. package/resources/gofer/specify-config/object-type-routing.json +24 -0
  176. package/resources/gofer/specify-config/typesafe-learning-review.json +16 -0
  177. package/resources/gofer/specify-config/typesafe-semantic-review.json +9 -0
  178. package/resources/gofer/system-skills/eai/SKILL.md +365 -0
  179. package/resources/gofer/system-skills/eai-update/SKILL.md +56 -0
  180. package/resources/gofer/system-skills/gofer-documentation/SKILL.md +93 -0
  181. package/resources/gofer/templates/build-map-template.md +64 -0
  182. package/resources/gofer/templates/business-scenarios-template.json +14 -0
  183. package/resources/gofer/templates/ciso-security-summary-template.md +3 -3
  184. package/resources/gofer/templates/context-bundle-template.md +4 -3
  185. package/resources/gofer/templates/contract-pack-template.md +8 -8
  186. package/resources/gofer/templates/cto-architecture-summary-template.md +3 -3
  187. package/resources/gofer/templates/delivery-lineage-template.json +8 -0
  188. package/resources/gofer/templates/eai-preflight-template.md +109 -68
  189. package/resources/gofer/templates/goal-ledger-template.json +1 -1
  190. package/resources/gofer/templates/gofer-model-policy.yaml +28 -6
  191. package/resources/gofer/templates/loop-contract-template.json +3 -1
  192. package/resources/gofer/templates/plan-template.md +8 -7
  193. package/resources/gofer/templates/priority-plan-template.json +29 -0
  194. package/resources/gofer/templates/proposal-review-template.md +6 -3
  195. package/resources/gofer/templates/release-capability-ledger-template.md +24 -0
  196. package/resources/gofer/templates/research-template.md +7 -6
  197. package/resources/gofer/templates/spec-summary-template.md +1 -1
  198. package/resources/gofer/templates/spec-template.md +45 -6
  199. package/resources/gofer/templates/tasks-template.md +12 -3
  200. package/resources/gofer/templates/ui-preview-brief-template.md +55 -5
  201. package/resources/gofer/templates/ui-review-log-template.md +21 -3
  202. package/resources/gofer/templates/ui-show-and-tell-template.md +46 -0
  203. package/resources/gofer/templates/visuals/capability-heatmap-template.md +2 -2
  204. package/resources/gofer/templates/working-backwards-prfaq-template.md +9 -8
  205. package/resources/linked-sources.json +4 -4
  206. package/resources/gofer/agents-skills/0_gofer_start/SKILL.md +0 -1287
  207. package/resources/gofer/agents-skills/0a_problem_validation/SKILL.md +0 -429
  208. package/resources/gofer/agents-skills/10_gofer_cloud/SKILL.md +0 -635
  209. package/resources/gofer/agents-skills/1_gofer_research/SKILL.md +0 -1159
  210. package/resources/gofer/agents-skills/2_gofer_specify/SKILL.md +0 -860
  211. package/resources/gofer/agents-skills/3_gofer_plan/SKILL.md +0 -899
  212. package/resources/gofer/agents-skills/4_gofer_tasks/SKILL.md +0 -760
  213. package/resources/gofer/agents-skills/5_gofer_implement/SKILL.md +0 -944
  214. package/resources/gofer/agents-skills/6_gofer_validate/SKILL.md +0 -2302
  215. package/resources/gofer/agents-skills/7_gofer_save/SKILL.md +0 -423
  216. package/resources/gofer/agents-skills/7a_stakeholder_comms/SKILL.md +0 -508
  217. package/resources/gofer/agents-skills/8_gofer_branding/SKILL.md +0 -315
  218. package/resources/gofer/agents-skills/9_gofer_tests/SKILL.md +0 -558
  219. package/resources/gofer/agents-skills/gofer_bootstrap_workspace/SKILL.md +0 -148
  220. package/resources/gofer/agents-skills/gofer_check_workspace/SKILL.md +0 -119
  221. package/resources/gofer/agents-skills/gofer_constitution/SKILL.md +0 -612
  222. package/resources/gofer/agents-skills/gofer_diagnose/SKILL.md +0 -114
  223. package/resources/gofer/agents-skills/gofer_eai_first_run/SKILL.md +0 -397
  224. package/resources/gofer/agents-skills/gofer_hydrate/SKILL.md +0 -561
  225. package/resources/gofer/agents-skills/gofer_personality/SKILL.md +0 -44
  226. package/resources/gofer/agents-skills/gofer_plan/SKILL.md +0 -40
  227. package/resources/gofer/agents-skills/gofer_side/SKILL.md +0 -45
  228. package/resources/gofer/agents-skills/gofer_spec_summary/SKILL.md +0 -112
  229. package/resources/gofer/agents-skills/gofer_tdd/SKILL.md +0 -112
  230. package/resources/gofer/agents-skills/gofer_vocabulary/SKILL.md +0 -112
  231. package/resources/gofer/agents-skills/gofer_zoom_out/SKILL.md +0 -112
  232. package/resources/gofer/claude-commands/0_gofer_start.md +0 -1282
  233. package/resources/gofer/claude-commands/0a_problem_validation.md +0 -424
  234. package/resources/gofer/claude-commands/10_gofer_cloud.md +0 -630
  235. package/resources/gofer/claude-commands/1_gofer_research.md +0 -1154
  236. package/resources/gofer/claude-commands/2_gofer_specify.md +0 -855
  237. package/resources/gofer/claude-commands/3_gofer_plan.md +0 -894
  238. package/resources/gofer/claude-commands/4_gofer_tasks.md +0 -755
  239. package/resources/gofer/claude-commands/5_gofer_implement.md +0 -939
  240. package/resources/gofer/claude-commands/6_gofer_validate.md +0 -2297
  241. package/resources/gofer/claude-commands/7_gofer_save.md +0 -418
  242. package/resources/gofer/claude-commands/7a_stakeholder_comms.md +0 -503
  243. package/resources/gofer/claude-commands/8_gofer_branding.md +0 -310
  244. package/resources/gofer/claude-commands/9_gofer_tests.md +0 -553
  245. package/resources/gofer/claude-commands/gofer_bootstrap_workspace.md +0 -143
  246. package/resources/gofer/claude-commands/gofer_check_workspace.md +0 -114
  247. package/resources/gofer/claude-commands/gofer_constitution.md +0 -607
  248. package/resources/gofer/claude-commands/gofer_diagnose.md +0 -109
  249. package/resources/gofer/claude-commands/gofer_eai_first_run.md +0 -392
  250. package/resources/gofer/claude-commands/gofer_hydrate.md +0 -556
  251. package/resources/gofer/claude-commands/gofer_personality.md +0 -39
  252. package/resources/gofer/claude-commands/gofer_plan.md +0 -35
  253. package/resources/gofer/claude-commands/gofer_side.md +0 -40
  254. package/resources/gofer/claude-commands/gofer_spec_summary.md +0 -107
  255. package/resources/gofer/claude-commands/gofer_tdd.md +0 -107
  256. package/resources/gofer/claude-commands/gofer_vocabulary.md +0 -107
  257. package/resources/gofer/claude-commands/gofer_zoom_out.md +0 -107
  258. package/resources/gofer/claude-skills/eai-gofer/SKILL.md +0 -56
  259. package/resources/gofer/copilot-prompts/0_gofer_start.prompt.md +0 -1308
  260. package/resources/gofer/copilot-prompts/0a_problem_validation.prompt.md +0 -429
  261. package/resources/gofer/copilot-prompts/10_gofer_cloud.prompt.md +0 -644
  262. package/resources/gofer/copilot-prompts/1_gofer_research.prompt.md +0 -1177
  263. package/resources/gofer/copilot-prompts/2_gofer_specify.prompt.md +0 -878
  264. package/resources/gofer/copilot-prompts/3_gofer_plan.prompt.md +0 -917
  265. package/resources/gofer/copilot-prompts/4_gofer_tasks.prompt.md +0 -778
  266. package/resources/gofer/copilot-prompts/5_gofer_implement.prompt.md +0 -962
  267. package/resources/gofer/copilot-prompts/6_gofer_validate.prompt.md +0 -2310
  268. package/resources/gofer/copilot-prompts/7_gofer_save.prompt.md +0 -433
  269. package/resources/gofer/copilot-prompts/7a_stakeholder_comms.prompt.md +0 -516
  270. package/resources/gofer/copilot-prompts/8_gofer_branding.prompt.md +0 -323
  271. package/resources/gofer/copilot-prompts/9_gofer_tests.prompt.md +0 -566
  272. package/resources/gofer/copilot-prompts/gofer_bootstrap_workspace.prompt.md +0 -161
  273. package/resources/gofer/copilot-prompts/gofer_check_workspace.prompt.md +0 -132
  274. package/resources/gofer/copilot-prompts/gofer_constitution.prompt.md +0 -621
  275. package/resources/gofer/copilot-prompts/gofer_diagnose.prompt.md +0 -127
  276. package/resources/gofer/copilot-prompts/gofer_eai_first_run.prompt.md +0 -410
  277. package/resources/gofer/copilot-prompts/gofer_hydrate.prompt.md +0 -571
  278. package/resources/gofer/copilot-prompts/gofer_personality.prompt.md +0 -57
  279. package/resources/gofer/copilot-prompts/gofer_plan.prompt.md +0 -53
  280. package/resources/gofer/copilot-prompts/gofer_side.prompt.md +0 -58
  281. package/resources/gofer/copilot-prompts/gofer_spec_summary.prompt.md +0 -125
  282. package/resources/gofer/copilot-prompts/gofer_tdd.prompt.md +0 -125
  283. package/resources/gofer/copilot-prompts/gofer_vocabulary.prompt.md +0 -125
  284. package/resources/gofer/copilot-prompts/gofer_zoom_out.prompt.md +0 -125
  285. package/resources/gofer/gemini/commands/gofer/0_gofer_start.md +0 -1282
  286. package/resources/gofer/gemini/commands/gofer/0_gofer_start.toml +0 -2
  287. package/resources/gofer/gemini/commands/gofer/0a_problem_validation.md +0 -424
  288. package/resources/gofer/gemini/commands/gofer/0a_problem_validation.toml +0 -2
  289. package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.md +0 -630
  290. package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.toml +0 -2
  291. package/resources/gofer/gemini/commands/gofer/1_gofer_research.md +0 -1154
  292. package/resources/gofer/gemini/commands/gofer/1_gofer_research.toml +0 -2
  293. package/resources/gofer/gemini/commands/gofer/2_gofer_specify.md +0 -855
  294. package/resources/gofer/gemini/commands/gofer/2_gofer_specify.toml +0 -2
  295. package/resources/gofer/gemini/commands/gofer/3_gofer_plan.md +0 -894
  296. package/resources/gofer/gemini/commands/gofer/3_gofer_plan.toml +0 -2
  297. package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.md +0 -755
  298. package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.toml +0 -2
  299. package/resources/gofer/gemini/commands/gofer/5_gofer_implement.md +0 -939
  300. package/resources/gofer/gemini/commands/gofer/5_gofer_implement.toml +0 -2
  301. package/resources/gofer/gemini/commands/gofer/6_gofer_validate.md +0 -2297
  302. package/resources/gofer/gemini/commands/gofer/6_gofer_validate.toml +0 -2
  303. package/resources/gofer/gemini/commands/gofer/7_gofer_save.md +0 -418
  304. package/resources/gofer/gemini/commands/gofer/7_gofer_save.toml +0 -2
  305. package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.md +0 -503
  306. package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.toml +0 -2
  307. package/resources/gofer/gemini/commands/gofer/8_gofer_branding.md +0 -310
  308. package/resources/gofer/gemini/commands/gofer/8_gofer_branding.toml +0 -2
  309. package/resources/gofer/gemini/commands/gofer/9_gofer_tests.md +0 -553
  310. package/resources/gofer/gemini/commands/gofer/9_gofer_tests.toml +0 -2
  311. package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.md +0 -143
  312. package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.toml +0 -2
  313. package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.md +0 -114
  314. package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.toml +0 -2
  315. package/resources/gofer/gemini/commands/gofer/gofer_constitution.md +0 -607
  316. package/resources/gofer/gemini/commands/gofer/gofer_constitution.toml +0 -2
  317. package/resources/gofer/gemini/commands/gofer/gofer_diagnose.md +0 -109
  318. package/resources/gofer/gemini/commands/gofer/gofer_diagnose.toml +0 -2
  319. package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.md +0 -392
  320. package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.toml +0 -2
  321. package/resources/gofer/gemini/commands/gofer/gofer_hydrate.md +0 -556
  322. package/resources/gofer/gemini/commands/gofer/gofer_hydrate.toml +0 -2
  323. package/resources/gofer/gemini/commands/gofer/gofer_personality.md +0 -39
  324. package/resources/gofer/gemini/commands/gofer/gofer_personality.toml +0 -2
  325. package/resources/gofer/gemini/commands/gofer/gofer_plan.md +0 -35
  326. package/resources/gofer/gemini/commands/gofer/gofer_plan.toml +0 -2
  327. package/resources/gofer/gemini/commands/gofer/gofer_side.md +0 -40
  328. package/resources/gofer/gemini/commands/gofer/gofer_side.toml +0 -2
  329. package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.md +0 -107
  330. package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.toml +0 -2
  331. package/resources/gofer/gemini/commands/gofer/gofer_tdd.md +0 -107
  332. package/resources/gofer/gemini/commands/gofer/gofer_tdd.toml +0 -2
  333. package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.md +0 -107
  334. package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.toml +0 -2
  335. package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.md +0 -107
  336. package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.toml +0 -2
  337. package/resources/gofer/github-skills/eai-gofer/SKILL.md +0 -56
  338. package/resources/gofer/system-skills/0_gofer_start/SKILL.md +0 -1287
  339. package/resources/gofer/system-skills/0a_problem_validation/SKILL.md +0 -429
  340. package/resources/gofer/system-skills/10_gofer_cloud/SKILL.md +0 -635
  341. package/resources/gofer/system-skills/1_gofer_research/SKILL.md +0 -1159
  342. package/resources/gofer/system-skills/2_gofer_specify/SKILL.md +0 -860
  343. package/resources/gofer/system-skills/3_gofer_plan/SKILL.md +0 -899
  344. package/resources/gofer/system-skills/4_gofer_tasks/SKILL.md +0 -760
  345. package/resources/gofer/system-skills/5_gofer_implement/SKILL.md +0 -944
  346. package/resources/gofer/system-skills/6_gofer_validate/SKILL.md +0 -2302
  347. package/resources/gofer/system-skills/7_gofer_save/SKILL.md +0 -423
  348. package/resources/gofer/system-skills/7a_stakeholder_comms/SKILL.md +0 -508
  349. package/resources/gofer/system-skills/8_gofer_branding/SKILL.md +0 -315
  350. package/resources/gofer/system-skills/9_gofer_tests/SKILL.md +0 -558
  351. package/resources/gofer/system-skills/gofer_bootstrap_workspace/SKILL.md +0 -148
  352. package/resources/gofer/system-skills/gofer_check_workspace/SKILL.md +0 -119
  353. package/resources/gofer/system-skills/gofer_constitution/SKILL.md +0 -612
  354. package/resources/gofer/system-skills/gofer_diagnose/SKILL.md +0 -114
  355. package/resources/gofer/system-skills/gofer_eai_first_run/SKILL.md +0 -397
  356. package/resources/gofer/system-skills/gofer_hydrate/SKILL.md +0 -561
  357. package/resources/gofer/system-skills/gofer_personality/SKILL.md +0 -44
  358. package/resources/gofer/system-skills/gofer_plan/SKILL.md +0 -40
  359. package/resources/gofer/system-skills/gofer_side/SKILL.md +0 -45
  360. package/resources/gofer/system-skills/gofer_spec_summary/SKILL.md +0 -112
  361. package/resources/gofer/system-skills/gofer_tdd/SKILL.md +0 -112
  362. package/resources/gofer/system-skills/gofer_vocabulary/SKILL.md +0 -112
  363. package/resources/gofer/system-skills/gofer_zoom_out/SKILL.md +0 -112
  364. package/resources/gofer/templates/ui-approval-template.md +0 -32
@@ -0,0 +1,104 @@
1
+ # App Access And Client Sign-In
2
+
3
+ ## Business Decision
4
+
5
+ Sign-in confirms who a person is. It does not grant workspace access. An EAI
6
+ workspace is the app's access boundary. It is separate from the shared CIAM
7
+ sign-in directory.
8
+
9
+ When authentication enters scope, ask:
10
+
11
+ > Who should be able to use this app: only members of its EAI workspace
12
+ > (recommended), or any authenticated EAI user?
13
+
14
+ Default to `workspace-only`. Wait for the answer before changing auth code. Do
15
+ not treat silence as approval. Continue unrelated approved work if possible.
16
+ Keep stricter existing restrictions. Do not silently change an existing app's
17
+ access policy. Ask again when the owner changes this decision.
18
+
19
+ | Choice | App access | Data access |
20
+ | ------------------------ | ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
21
+ | `workspace-only` | Verified members of the configured workspace who meet app permissions. | Only the resources permitted by their roles. |
22
+ | `platform-authenticated` | Valid EAI users may enter the explicitly approved app experience. | Workspace data still needs explicit authorization. No automatic membership or admin role. |
23
+
24
+ The wider option needs an approved onboarding and data-isolation design. Do not
25
+ use an app credential to give a visitor the owner's workspace access.
26
+
27
+ Record the choice, rationale, confirmation, target workspace reference, app
28
+ permissions, and tests in `spec.md`. Keep real tenant IDs and secrets out of
29
+ public artifacts. Update plan, tasks, traceability, and validation on changes.
30
+
31
+ ## Server-Side Enforcement
32
+
33
+ Verify identity and permissions on protected pages, server actions, and APIs.
34
+ Resolve membership from the approved platform contract using the authenticated
35
+ user and the configured app workspace. Do not trust a client-supplied tenant ID.
36
+ Apply the platform's verified membership semantics, including inherited access
37
+ only when the contract permits it. Do not assume direct membership is the only
38
+ valid form of membership.
39
+
40
+ A session, shared CIAM `tid`, matching email domain, hidden button, or selected
41
+ CLI workspace access is not app authorization. The CLI operator is not the
42
+ runtime user. Unknown, unavailable, revoked, or expired authorization must fail
43
+ closed. Define bounded cache expiry and revocation handling. Never keep access
44
+ forever because an earlier session was valid.
45
+
46
+ ## Separate Sign-In Decision
47
+
48
+ Ask whether users should use normal EAI sign-in or their company sign-in through
49
+ EAI. This does not change the app's workspace access policy. For client SSO,
50
+ prefer federation through EAI's identity layer so platform sessions, API
51
+ audiences, workspace membership, and permission checks remain intact. Do not
52
+ point the app directly at a client issuer and assume EAI APIs accept it.
53
+
54
+ Discover the installed CLI with `eai --describe` and exact command help. Never
55
+ invent an `eai sso` command. Check the deployed platform contract and tenant
56
+ entitlement before offering a configuration action. Provider capability, backend
57
+ source, a setup menu, and successful end-to-end sign-in are different levels of
58
+ evidence.
59
+
60
+ ## Workspace Admin SSO Setup
61
+
62
+ 1. Confirm the EAI workspace, app, current access decision, and SSO entitlement.
63
+ 2. Identify the client's identity administrator and approved provider.
64
+ 3. Verify the supported EAI setup route. If no supported CLI or admin screen
65
+ exists, request platform support. Do not bypass it with guessed endpoints.
66
+ 4. Have the client administrator prepare the federation registration, issuer,
67
+ callback settings, and required claims. Transfer secrets only through an
68
+ approved protected channel, never chat, specs, source, or logs.
69
+ 5. Have an authorized EAI operator configure the provider and associate the
70
+ intended user flow and apps. The platform role ID `tenant-admin` grants
71
+ workspace admin access. That role does not grant administration of the shared
72
+ Entra directory. Protect other workspaces' flows.
73
+ 6. Plan existing-account continuity and preserve memberships and roles. Never
74
+ link identities by email alone. Keep a tested emergency admin sign-in path.
75
+ 7. Test a pilot user, a denied user, session creation, and a protected EAI API
76
+ call before rollout. Test rollback and document who owns credential renewal.
77
+
78
+ Adding SSO is not proof that existing CIAM users have migrated. Do not remove
79
+ their original sign-in method until identity continuity and recovery pass.
80
+
81
+ Microsoft documents Entra workforce sign-in through custom OIDC federation. It
82
+ requires client registration, provider configuration, user-flow association, and
83
+ sign-in testing. This vendor support does not prove the deployed EAI setup
84
+ supports that path. Recheck EAI if it reports an older restriction.
85
+ [Microsoft setup guide](https://learn.microsoft.com/en-us/entra/external-id/customers/how-to-entra-id-federation-customers).
86
+
87
+ ## Required Evidence
88
+
89
+ Apply these checks when authentication is implemented or required. Do not add
90
+ auth requirements to non-app work or an auth-free local MVP.
91
+
92
+ - An authorized workspace member completes the first protected journey.
93
+ - An authenticated non-member cannot access protected workspace content.
94
+ - Anonymous users cannot access protected content.
95
+ - A forged workspace selection cannot change the authorization boundary.
96
+ - A revoked member loses access within the documented revocation bound.
97
+ - An unavailable membership service does not grant access.
98
+ - The wider mode, when approved, still denies unauthorized workspace data.
99
+ - A federated pilot retains the correct EAI identity, memberships, and roles.
100
+ - Changing the sign-in provider does not widen the approved access policy.
101
+
102
+ Record browser and API evidence against acceptance criteria. If tests cannot
103
+ run, mark the affected outcome unverified. Instructions and passing source tests
104
+ do not prove that a customer's app or SSO configuration is secure.
@@ -7,8 +7,8 @@ an app based on `https://github.com/eai-support/eai-app-template`.
7
7
 
8
8
  | File | Purpose |
9
9
  | --------------------------- | ------------------------------------------------------------------------------- |
10
- | `src/eai.config/default.ts` | Default workspace config, store slices, API paths, storage keys, and layout slots. |
11
- | `src/eai.config/index.ts` | Workspace key to config registry. |
10
+ | `src/eai.config/default.ts` | Default tenant config, store slices, API paths, storage keys, and layout slots. |
11
+ | `src/eai.config/index.ts` | Tenant key to config registry. |
12
12
  | `src/eai.blocks.tsx` | Component registry and app-local block extension point. |
13
13
  | `src/app/providers.tsx` | Auth/session providers and EAI config runtime. |
14
14
  | `src/hooks/useResources.ts` | ResourceAPI-backed business data. |
@@ -48,7 +48,7 @@ Rules:
48
48
 
49
49
  - `component` must match a registered component name.
50
50
  - Lower `priority` renders first.
51
- - `props` are static, workspace configurable values.
51
+ - `props` are static, tenant-configurable values.
52
52
  - `storeBindings` support dot notation on both `prop` and `storePath`.
53
53
  - `showWhen` supports `equals`, `notEquals`, `exists`, and compound `and`/`or`.
54
54
 
@@ -95,7 +95,7 @@ store: {
95
95
  }
96
96
  ```
97
97
 
98
- Persist only workspace-safe UI or workflow state. Never place access tokens,
98
+ Persist only tenant-safe UI or workflow state. Never place access tokens,
99
99
  platform credentials, database connection details, blob credentials, search
100
100
  credentials, or model provider credentials in config or store state.
101
101
 
@@ -130,7 +130,7 @@ The config-driven UI should pair with the service matrix:
130
130
 
131
131
  | UI Need | Service Pattern |
132
132
  | ----------------------------------------------------- | ---------------------------------------------------------- |
133
- | Workspace business records | `useResources('<ObjectType>')` |
133
+ | Tenant business records | `useResources('<ObjectType>')` |
134
134
  | File upload, document classification, or RAG indexing | `useDocuments()` |
135
135
  | AI chat or workflow interaction | `useChat(workflowId, stage)` |
136
136
  | Browser streaming | `/api/eai/stream/...` through the app BFF |
@@ -41,13 +41,11 @@ catalog:
41
41
  - errorId: EAI_TENANT_ACCESS_REQUIRED
42
42
  match:
43
43
  containsAny:
44
- - 'no workspace'
45
44
  - 'no tenant'
46
- - 'workspace required'
47
- - 'workspace required'
48
- - 'insufficient workspace role'
49
- meaning: The user lacks the workspace context needed for app delivery.
50
- likelyCause: No membership, wrong workspace, or insufficient role.
45
+ - 'tenant required'
46
+ - 'insufficient tenant role'
47
+ meaning: The user lacks the workspace access needed for app delivery.
48
+ likelyCause: No membership, the wrong workspace, or an insufficient role.
51
49
  recovery:
52
50
  - 'eai workspace list --format json'
53
51
  - 'eai workspace select <workspace-slug>'
@@ -61,7 +59,7 @@ catalog:
61
59
  - 'Invite failed'
62
60
  - 'eai user invite'
63
61
  - '502'
64
- meaning: A workspace member invite or role assignment reached an external service failure, and the target person may already exist as a direct workspace member with the wrong role.
62
+ meaning: A workspace member invite or role assignment reached an external service failure, and the target person may already have direct workspace membership with the wrong role.
65
63
  likelyCause: The invite/add path failed after, or despite, an existing workspace member record. Retrying the same invite may not change the member role.
66
64
  recovery:
67
65
  - 'Run eai errors explain user_invite_external_service_existing_member --format json when advertised'
@@ -73,6 +71,24 @@ catalog:
73
71
  - 'Tell the affected app user to sign out and sign back in because Auth.js session or JWT role data may be cached'
74
72
  - 'Do not edit databases or cloud portals directly unless EAI guidance reports an operator-only block'
75
73
  nextGate: tenant_member_role_verified
74
+ - errorId: EAI_APP_TOKEN_TENANT_CONTEXT_REQUIRED
75
+ match:
76
+ containsAny:
77
+ - 'app_token_tenant_context_required'
78
+ - 'MISSING_TENANT'
79
+ - 'Tenant context required for app tokens'
80
+ meaning: A platform automation app-token user lookup reached EAI but did not carry the required workspace context.
81
+ likelyCause: The caller used a root platform user or membership route such as /v4/platform/users/by-email or /v4/platform/users/{oid}/memberships instead of the tenant-scoped /v4/platform/tenants/{tenantId}/... route family, or the target environment has not deployed the matching PublicAPI/AdminAPI tenant-scoped routing hardening.
82
+ recovery:
83
+ - 'Run eai errors explain app_token_tenant_context_required --format json when advertised'
84
+ - 'eai whoami'
85
+ - 'eai workspace list --format json'
86
+ - 'Do not start by changing workspace members, role definitions, Entra configuration, databases, or cloud portals'
87
+ - 'Retry user lookup through /v4/platform/tenants/<tenant-id>/users/by-email?email=<email>'
88
+ - 'Retry membership lookup through /v4/platform/tenants/<tenant-id>/users/<oid>/memberships'
89
+ - 'Keep workspace member and role-definition reads on /v4/platform/tenants/<tenant-id>/members and /v4/platform/tenants/<tenant-id>/role-definitions'
90
+ - 'If workspace-scoped routes still return MISSING_TENANT, capture redacted route shape, HTTP status, server code, CLI version, active workspace slug, and deployed PublicAPI/AdminAPI versions for platform support'
91
+ nextGate: tenant_scoped_platform_route_verified
76
92
  - errorId: EAI_ENTRA_REDIRECT_URI_MISMATCH
77
93
  match:
78
94
  containsAny:
@@ -150,9 +166,23 @@ catalog:
150
166
  meaning: Object types cannot be published until app resources are provisioned.
151
167
  likelyCause: '`eai types seed` ran before `eai app provision` completed.'
152
168
  recovery:
153
- - 'eai app provision <key> --tenant-id <workspace-id> --select --format json'
154
- - 'eai types validate'
155
- - 'eai types seed --tenant-key <key> --tenant-id <workspace-id> --format json'
169
+ - 'eai app provision <key> --tenant-id <tenant-id> --select --format json'
170
+ - 'eai types validate --tenant-key <key> --tenant-id <tenant-id>'
171
+ - 'eai types seed --tenant-key <key> --tenant-id <tenant-id> --format json'
172
+ nextGate: types_publish_ready
173
+ - errorId: EAI_APP_MANIFEST_VALIDATION_FAILED
174
+ match:
175
+ containsAny:
176
+ - 'app_manifest_validation_failed'
177
+ - 'app manifest save failed for both supported request shapes'
178
+ meaning: The maintained CLI could not match the deployed app-manifest request contract.
179
+ likelyCause: The installed CLI is old, or another manifest field fails after request-shape negotiation.
180
+ recovery:
181
+ - 'eai update --check'
182
+ - 'If eai update --check reports upgrade_required, obtain approval and run eai update'
183
+ - 'eai types validate --tenant-key <key> --tenant-id <tenant-id>'
184
+ - 'eai types seed --tenant-key <key> --tenant-id <tenant-id> --dry-run --format json'
185
+ - 'eai types seed --tenant-key <key> --tenant-id <tenant-id> --format json'
156
186
  nextGate: types_publish_ready
157
187
  - errorId: EAI_RESOURCE_NOT_READY
158
188
  match:
@@ -164,11 +194,39 @@ catalog:
164
194
  meaning: Backing resources or preview surfaces are not ready yet.
165
195
  likelyCause: Provisioning completed partially or downstream services are still unhealthy.
166
196
  recovery:
167
- - 'eai resources storage status --tenant-id <workspace-id> --format json'
168
- - 'eai resources storage doctor --tenant-id <workspace-id> --format json'
169
- - 'eai verify storage --tenant-id <workspace-id>'
170
- - 'eai resources schema --tenant-id <workspace-id> --format json'
197
+ - 'eai resources storage status --tenant-id <tenant-id> --format json'
198
+ - 'eai resources storage doctor --tenant-id <tenant-id> --format json'
199
+ - 'eai verify storage --tenant-id <tenant-id>'
200
+ - 'eai resources schema --tenant-id <tenant-id> --format json'
171
201
  nextGate: schema_storage_ready
202
+ - errorId: EAI_RESOURCEAPI_TENANT_CONTEXT_MISSING
203
+ match:
204
+ containsAny:
205
+ - 'RESOURCEAPI_TENANT_CONTEXT_MISSING'
206
+ - 'missing_tenant_context'
207
+ meaning: PublicAPI could not resolve tenant context for a tenant-scoped ResourceAPI request.
208
+ likelyCause: The app or caller omitted the effective tenant headers, or the BFF stripped tenant context before forwarding the request.
209
+ recovery:
210
+ - 'Retry the same /v4/data/resources/<tenant-id>/... request in four modes: path tenant only, tenant header only, X-Tenant-Id only, and both headers'
211
+ - 'Inspect the app BFF or proxy and confirm it forwards both tenant and X-Tenant-Id server-authoritatively for tenant-scoped calls'
212
+ - 'Use eai publicapi get /v4/platform/tenants/<tenant-id>/resource-metadata to confirm the tenant-level public contract'
213
+ - 'Use eai resources storage doctor --tenant-id <tenant-id> --format json after workspace context is fixed'
214
+ nextGate: tenant_context_resolved
215
+ - errorId: EAI_RESOURCEAPI_INSTALL_UNAVAILABLE
216
+ match:
217
+ containsAny:
218
+ - 'RESOURCEAPI_INSTALL_UNAVAILABLE'
219
+ - 'install_registry_no_match'
220
+ - 'RESOURCEAPI_INSTALL_REGISTRY_NO_MATCH'
221
+ meaning: PublicAPI could not resolve a usable ResourceAPI install for the tenant-scoped request.
222
+ likelyCause: Either workspace context was inconsistent across path and headers, or the workspace metadata/schema projection is incomplete for this app.
223
+ recovery:
224
+ - 'Compare /v4/platform/tenants/<tenant-id>/resource-metadata with /v4/data/resources/<tenant-id>/storage before concluding the workspace is unprovisioned'
225
+ - 'If the same /storage request flips between 200 and 503 by header mode, treat it as a workspace-context contract mismatch first'
226
+ - 'Check publishedObjectTypes in tenant resource metadata and treat it as operational state'
227
+ - 'Run eai resources storage doctor --tenant-id <tenant-id> --format json'
228
+ - 'Inspect the app BFF or proxy before escalating to a platform-only fault'
229
+ nextGate: storage_contract_verified
172
230
  - errorId: EAI_RESOURCE_SEARCH_EMBEDDING_REQUIRED
173
231
  match:
174
232
  containsAny:
@@ -179,19 +237,19 @@ catalog:
179
237
  meaning: Full-text resource search can be available on the v4 passive ResourceAPI surface while hybrid or vector search is not ready yet.
180
238
  likelyCause: The app or agent used the default hybrid v4 passive ResourceAPI search path before storage doctor reported semantic search readiness.
181
239
  recovery:
182
- - 'eai resources storage doctor --tenant-id <workspace-id> --format json'
183
- - 'If capabilities.search.fulltext is true, retry with eai resources search "<query>" --fulltext --tenant-id <workspace-id>'
240
+ - 'eai resources storage doctor --tenant-id <tenant-id> --format json'
241
+ - 'If capabilities.search.fulltext is true, retry with eai resources search "<query>" --fulltext --tenant-id <tenant-id>'
184
242
  - 'Use --hybrid or --vector only after capabilities.search.hybrid or capabilities.search.vector is true'
185
243
  - 'If semantic search is required for the scenario, record a platform capability gap in service-fit-matrix.md'
186
- - 'Do not apply this fallback to legacy v1/v3 or active ResourceAPI behavior'
244
+ - 'Apply this fallback only to the published passive ResourceAPI search contract'
187
245
  nextGate: resource_search_mode_selected
188
246
  - errorId: EAI_WORKFLOW_NOT_READY
189
247
  match:
190
248
  containsAny:
191
249
  - 'workflow readiness failed'
192
250
  - 'workflow unavailable'
193
- meaning: Required workflow support is not yet ready for this repo or workspace.
194
- likelyCause: Workflow dependencies, package profile, or workspace features are missing.
251
+ meaning: Required workflow support is not yet ready for this repo or tenant.
252
+ likelyCause: Workflow dependencies, package profile, or tenant features are missing.
195
253
  recovery:
196
254
  - 'eai workflow readiness --format json'
197
255
  - 'eai --describe'
@@ -31,20 +31,40 @@ Before app-delivery research, planning, implementation, or validation:
31
31
 
32
32
  1. Read `.specify/specs/{feature}/eai-preflight.md` when it exists.
33
33
  2. Read `.specify/references/platform/eai-error-catalog.yaml`.
34
- 3. If CLI, login, workspace, template, or Gofer readiness is missing or stale, run
35
- `/gofer:eai-first-run`.
36
- 4. Use current CLI discovery instead of memory:
34
+ 3. Read `.specify/references/platform/eai-service-patterns.md` before choosing
35
+ storage, workflow, content, search, AI, or integration services.
36
+ 4. If CLI, login, workspace, template, or Gofer readiness is missing or stale,
37
+ run `/gofer:eai-first-run`.
38
+ 5. Use current CLI discovery instead of memory:
37
39
  - `eai update --check`
38
40
  - `eai --describe`
39
41
  - `eai agent guide --format json` when advertised
40
42
  - `eai whoami`
41
43
  - `eai workspace list --format json`
42
44
  - `eai provision entra` when advertised and identity setup is in scope
43
- 5. When the repo is an EAI project, check drift before further build work:
45
+ 6. Do not invent, guess, or complete EAI CLI commands from memory. Before
46
+ suggesting or running an `eai ...` command, verify the exact command and
47
+ flags from `eai --describe` and command-specific `--help`. If the installed
48
+ CLI does not list it, do not run it.
49
+ 7. When the repo is an EAI project, check drift before further build work:
44
50
  - `eai template check --format json`
45
51
  - `eai gofer refresh --check --format json`
46
52
  - `eai workflow readiness --format json` when advertised by the CLI
47
53
 
54
+ ## Workspace Data Access Rule
55
+
56
+ Keep PascalCase Object Type model names separate from the exact stored `slug`.
57
+ Use lowercase kebab-case slugs in runtime paths and links; never re-derive or
58
+ rename a historical stored slug.
59
+
60
+ Workspace apps access EAI data as the signed-in user. Browser code calls the
61
+ local BFF at `/api/eai/...`; the BFF forwards to PublicAPI with the user's
62
+ session token. Do not add app-only `client_credentials` helpers,
63
+ `EAI_SERVICE_*`, or `OBO_*` credentials for normal ResourceAPI reads, writes,
64
+ files, or search. If work must continue after the user leaves the page,
65
+ create/request a platform workflow/job from the signed-in user flow and pass
66
+ workspace, app, user, and purpose context into it.
67
+
48
68
  ## Stack Policy
49
69
 
50
70
  For application delivery:
@@ -56,6 +76,29 @@ For application delivery:
56
76
  Do not silently replace an unavailable EAI capability with a non-EAI primary
57
77
  runtime, database, or hosting stack.
58
78
 
79
+ ## Platform Service Choice Rule
80
+
81
+ For normal app work, make the best EAI Platform service choice for the business
82
+ user and record it in `service-fit-matrix.md`.
83
+
84
+ - Use PostgreSQL for relational, transactional, reporting, workflow state,
85
+ audit, and structured workspace business data.
86
+ - Use DocumentDB for flexible JSON documents, nested records, high-change
87
+ schemas, and user-authored document state.
88
+ - Use Blob Storage for large files, binary content, exports, and file-like
89
+ resources behind API-mediated access.
90
+ - Use AI Search as a derived full-text, vector, or hybrid search projection, not
91
+ as the source of record.
92
+ - Use EAI content understanding and document services for classification,
93
+ extraction, summarization, and Retrieval-Augmented Generation.
94
+ - Use EAI workflows, goals, and targets for approvals, long-running work,
95
+ service goals, operating targets, and auditable process state.
96
+ - Use platform AI services and workflow-backed agents before direct provider
97
+ SDKs or provider keys.
98
+
99
+ Ask the user only when the choice affects cost, security, compliance,
100
+ deployment, data residency, external systems, or material business scope.
101
+
59
102
  ## Ordered App-Delivery Gates
60
103
 
61
104
  Unless the live CLI advertises a different authoritative dependency, preserve
@@ -68,9 +111,9 @@ this gate order:
68
111
  5. `eai app provision`
69
112
  6. `eai provision entra` when required
70
113
  7. `eai env pull` when required
71
- 8. `eai types validate`
72
- 9. `eai types diff`
73
- 10. `eai types seed`
114
+ 8. `eai types validate --tenant-key <key> --tenant-id <tenant-id>`
115
+ 9. `eai types seed`
116
+ 10. `eai types diff`
74
117
  11. `eai resources schema`
75
118
  12. Storage diagnostics and verification
76
119
  13. Workflow readiness and resource-call verification
@@ -84,12 +127,6 @@ Treat these as separate gates:
84
127
  - workflow readiness
85
128
  - preview readiness
86
129
 
87
- For Object Types, keep the PascalCase configuration/model `name` distinct from
88
- the exact lowercase kebab-case stored `slug`. Emitted relationship targets,
89
- runtime `target_type`, resource commands, paths, and governed v4 fields use the
90
- stored slug. Historical stored slugs are authoritative and must not be
91
- re-derived during validation or repair.
92
-
93
130
  ## Error Recovery Rule
94
131
 
95
132
  When an EAI CLI or platform command fails:
@@ -110,22 +147,23 @@ When an EAI CLI or platform command fails:
110
147
  6. Do not invent a new order or mark the repo ready when a prior gate is still
111
148
  blocked.
112
149
 
113
- For workspace member or admin changes, prefer `eai user invite`, `eai user list`,
114
- `eai user roles`, and `eai user role set` over direct database edits or cloud
115
- portal changes. If `eai user invite` fails with `EXTERNAL_SERVICE_ERROR`, a 5xx
116
- status, or the `user_invite_external_service_existing_member` reason, check for
117
- an existing direct member with
118
- `eai user list --workspace <workspace-id> --search <email> --format json`. If a direct
119
- member exists and the user approves, update the role with
150
+ For workspace member or admin changes, prefer `eai user invite`,
151
+ `eai user list`, `eai user roles`, and `eai user role set` over direct database
152
+ edits or cloud portal changes. If `eai user invite` fails with
153
+ `EXTERNAL_SERVICE_ERROR`, a 5xx status, or the
154
+ `user_invite_external_service_existing_member` reason, check for an existing
155
+ direct member with
156
+ `eai user list --workspace <workspace-id> --search <email> --format json`. If a
157
+ direct member exists and the user approves, update the role with
120
158
  `eai user role set --workspace <workspace-id> --member-id <member-id> --role tenant-admin --format json`,
121
159
  verify the read-back, and tell the affected app user to sign out and sign back
122
160
  in because Auth.js session or JWT role data may be cached.
123
161
 
124
162
  For Entra browser sign-in failures, treat `AADSTS50011`, redirect URI mismatch
125
163
  messages, and `/api/auth/callback/microsoft-entra-id` callback errors as EAI
126
- identity provisioning problems first. Confirm login and workspace with `eai whoami`
127
- and `eai workspace list --format json`, select the correct workspace if needed, then
128
- run the advertised equivalent of
164
+ identity provisioning problems first. Confirm login and workspace with
165
+ `eai whoami` and `eai workspace list --format json`, select the correct
166
+ workspace if needed, then run the advertised equivalent of
129
167
  `eai provision entra --force --redirect-uri <confirmed-callback-uri>`. Record
130
168
  only a redacted callback route in Gofer artifacts. Use `--debug` only with
131
169
  explicit user approval, and redact private hostnames, private workspace/platform