@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
@@ -8,128 +8,124 @@ patterns in `eai-app-template/docs/platform/eai-service-patterns.md`.
8
8
 
9
9
  - App browser code calls the local BFF at `/api/eai/...`.
10
10
  - App streaming calls use `/api/eai/stream/...`.
11
+ - Workspace app data-plane access is user-delegated access through the BFF. Do
12
+ not add app-only `client_credentials` access for ordinary ResourceAPI reads,
13
+ writes, files, or search.
11
14
  - The CLI may call PublicAPI directly because `eai login` provides the user
12
15
  token.
13
16
  - Prefer named template SDK hooks and named `eai` commands before custom calls.
14
17
  - Use `eai publicapi` only for authorized PublicAPI V4 routes that do not yet
15
18
  have a named SDK or CLI command.
16
19
  - Do not generate direct downstream database, blob, search, or platform secrets.
20
+ - Keep PascalCase Object Type model names separate from the exact stored `slug`.
21
+ Use lowercase kebab-case slugs in runtime paths and links; never re-derive or
22
+ rename a historical stored slug.
17
23
 
18
24
  ## Service Selection Matrix
19
25
 
20
- | Need | App Pattern | CLI Pattern | Notes |
21
- | -------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
22
- | Frontend composition | `src/eai.config` layout slots plus `src/eai.blocks.tsx` registry | `eai gofer refresh` installs this reference pack | Keep config data-only; callbacks belong in overrides. |
23
- | Data model | Object Types in `src/eai.config/object-types.ts` | `eai types validate`, `eai types seed`, `eai types diff` | Object Types define ResourceAPI contracts. |
24
- | Structured resources | `useResources(type)` / `client.resources` | `eai resources list/get/create/update/delete/query` | Default for workspace business data. |
25
- | Resource actions | `client.resources.executeAction(type, id, action)` | named resources command if available; otherwise `eai publicapi post /v4/data/resources/...` | Actions enforce object-type rules. |
26
- | Resource search | local helper around `/v4/data/resources/{tenantId}/search` if SDK support is absent | `eai resources storage doctor --format json`, then `eai resources search "query" --fulltext`; use `--hybrid` or `--vector` only when doctor reports those modes ready | The stable route parameter is `{tenantId}`; its value is the EAI workspace ID. V4 passive ResourceAPI search is a projection over canonical data. Fulltext can be usable before semantic search modes are ready. |
27
- | Resource files | local helper around resource file routes | `eai resources file upload/get/delete` | Use when the file is attached to a typed ResourceAPI object property. |
28
- | Documents | One `useDocuments().upload(file, context)` OR `classify([file], context)` | One `eai docs upload` OR `eai docs classify`, with authorized context | Queued ResourceAPI upload; follow the document lifecycle rules below. |
29
- | Chat | `useChat(workflowId, stage).send/stream` | `eai chat send`, `eai chat stream` | Use v4 chat shape with `message`, `conversation_id`, and `params`. |
30
- | Advanced PublicAPI | BFF/server helper | `eai publicapi <method> /v4/...` | Use only when named SDK/CLI support is missing. |
26
+ | Need | App Pattern | CLI Pattern | Notes |
27
+ | --------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | Frontend composition | `src/eai.config` layout slots plus `src/eai.blocks.tsx` registry | `eai gofer refresh` installs this reference pack | Keep config data-only; callbacks belong in overrides. |
29
+ | Data model | Object Types in `src/eai.config/object-types.ts` | `eai app provision`, `eai types validate --tenant-key <key> --tenant-id <tenant-id>`, `eai types seed`, `eai types diff` | Object Types define ResourceAPI contracts and must use app-owned storage bindings. |
30
+ | Structured resources | `useResources(type)` / `client.resources` | `eai resources list/get/create/update/delete/query` | Default for workspace business data. For workspace-scoped calls, treat the workspace ID in the path as canonical and have the app BFF forward both `tenant` and `X-Tenant-Id` headers with that ID server-authoritatively. |
31
+ | Resource actions | `client.resources.executeAction(type, id, action)` | named resources command if available; otherwise `eai publicapi post /v4/data/resources/...` | Actions enforce object-type rules. |
32
+ | Resource search | local helper around `/v4/data/resources/{tenant}/search` if SDK support is absent | `eai resources storage doctor --format json`, then `eai resources search "query" --fulltext`; use `--hybrid` or `--vector` only when doctor reports those modes ready | V4 passive ResourceAPI search is a projection over canonical data. Fulltext can be usable before semantic search modes are ready. |
33
+ | Resource files | local helper around resource file routes | `eai resources file upload/get/delete` | Use when the file is attached to a typed ResourceAPI object property. |
34
+ | Documents | `useDocuments().upload(file, context)`, `useDocuments().classify([file], context)`, or `useDocuments().ragIndex(...)` | `eai docs upload`, `eai docs classify`, or `eai docs index` with authorised context | Use the queued ResourceAPI document lifecycle below; index only a persisted document where the configured lifecycle supports it. |
35
+ | Content understanding | Document and media extraction behind the app BFF | `eai docs classify` with authorised context; use other commands only when advertised | Classification needs a configured app/workflow and persisted result readback before it is considered complete. |
36
+ | Chat | `useChat(workflowId, stage).send/stream` | `eai chat send`, `eai chat stream` | Use v4 chat shape with `message`, `conversation_id`, and `params`. |
37
+ | AI services | Template AI hooks and workflow-backed assistant steps | `eai agent guide --format json`, advertised `eai ai` or workflow commands | Prefer platform AI services for app behavior. Avoid direct provider keys in app code unless EAI documents that integration. |
38
+ | Workflows | Workflow-backed tasks that can continue across user sessions | `eai workflow readiness --format json` and advertised workflow commands | Use for multi-step business processes, approvals, background work, and auditable state changes. |
39
+ | Goals and targets | Goal/target records tied to resources and workflow outcomes | `eai workflow readiness --format json`, `eai resources schema --format json`, and advertised goal/target commands | Use when the app must track business outcomes, service levels, operating targets, or completion evidence. |
40
+ | Advanced PublicAPI | BFF/server helper | `eai publicapi <method> /v4/...` | Use only when named SDK/CLI support is missing. |
41
+
42
+ ## Workspace-Scoped Resource Diagnostics
43
+
44
+ - For `/v4/data/resources/{tenantId}/...` requests, compare the same call in
45
+ four header modes before concluding the workspace is unprovisioned: workspace
46
+ ID only, `tenant` only, `X-Tenant-Id` only, and both headers.
47
+ - If the same workspace-scoped endpoint flips between `200` and `503` based on
48
+ headers, suspect a workspace-context contract mismatch before an install or
49
+ schema failure.
50
+ - Inspect the app BFF or proxy code before escalating to a platform-only fault.
51
+ The default app-template proxy should forward both workspace-context headers
52
+ server-authoritatively for workspace-scoped PublicAPI calls.
53
+ - Treat `/v4/platform/tenants/{tenantId}/resource-metadata` and its
54
+ `publishedObjectTypes` as operational state, not descriptive metadata only.
55
+ Empty or stale published types can block `/storage` readiness even when the
56
+ workspace and app exist.
57
+ - Use `eai resources storage doctor --tenant-id <tenant-id> --format json`
58
+ alongside direct `/storage` checks so install, schema, and projection issues
59
+ are evaluated from the workspace's public contract.
60
+
61
+ If work must continue after the user leaves the page, have the signed-in user
62
+ request a platform workflow/job and pass workspace, app, user, and purpose
63
+ context into that workflow. Do not give the workspace app a broad service
64
+ identity for normal data-plane access.
31
65
 
32
66
  ## Document Lifecycle Rules
33
67
 
34
- The #3453 standalone lifecycle is a candidate, not deployed capability or live
35
- acceptance evidence. Before generating or enabling an upload, verify the
36
- installed CLI/SDK supports the context contract and the target runtime supports
37
- the configured lifecycle. Provision the business document/analysis schemas and
38
- Admin Portal lifecycle binding first. Storage readiness and classifier
39
- readiness are separate checks; a published classifier alone is not enough.
40
-
41
- - Use one `POST /v4/data/documents/upload` for durable upload and queued
42
- classification, with `storage_target=resourceapi`. Browser callers use the
43
- local BFF `/api/eai/v4/data/documents/upload`; tokens stay server-side.
44
- - For standalone documents, send both `verticalKey` and `workflowKey`. PublicAPI
45
- validates the authorised app/workflow and resolves optional
46
- `config.documentLifecycle` on the existing classifier-target
47
- `vertical-product-config` binding, never from the upload body.
48
- - Allowed binding values are `planning-assist-v1`, `planning-assess-v1`, and
49
- `business-document-v1`. Omission preserves existing behaviour and does not
50
- erase a saved selection on reassociation. Unsupported values fail validation.
51
- Missing planning fields do not imply business mode.
52
- - Preserve working DAISY/Assess requests, planning/case relationships, rules,
53
- stored records and in-flight jobs. Retain real authorised
54
- `planning_application_id`, `business_request_id` and applicable
55
- `assess_case_id` context (SDK: `planningApplicationId`, `businessRequestId`,
56
- `assessCaseId`). Never fabricate a planning application, business request,
57
- case or form submission for a standalone document. Optional real parents
58
- must be supported by the selected lifecycle and authorised.
59
- - Call `classify([file], context)` for `processing_mode=classification`, OR
60
- `upload(file, context)` for full requested processing. Do not upload and then
61
- classify the same bytes again. The SDK supplies `storage_target=resourceapi`.
62
- Do not generate context-free legacy file classification or a fallback to it.
63
- - Do not send lifecycle mappings, target collections, permissions, provider
64
- credentials or worker pins from the client. Missing schema, storage,
65
- service, app/workflow or classifier readiness must fail before upload-side
66
- writes, not fall back to legacy storage or an unscoped classifier.
67
- - Retain the returned job/document IDs. Poll
68
- `GET /v4/data/documents/jobs/{job_id}` with authorised context and read back
69
- saved requested stages and provenance. Acknowledgement and provider success
70
- are not completed classification, extraction, rule validation or persistence.
71
- A polling timeout is incomplete; never re-upload automatically.
72
- - Indexing is an optional derived stage only where supported and requested.
73
- Use authorised lifecycle file retrieval and cleanup. Invalidate stale work
74
- and clean only owned outputs according to retention, never shared parents.
75
- - Direct `POST /v4/data/documents/classify-by-url` is analysis, not a durable
76
- queued upload/save/readback/cleanup replacement. New workflow-selected URL
77
- callers also supply the app/workflow pair. Preserve established unscoped
78
- DAISY/Assess classifier behaviour without making it a new business-app default.
79
-
80
- Candidate example after provisioning and version checks, submitted once:
81
-
82
- ```tsx
83
- const { classify } = useDocuments(tenantId);
84
- const response = await classify([file], {
85
- verticalKey: appKey,
86
- workflowKey,
87
- });
88
- if (!response.ok) throw new Error("Document submission failed.");
89
- const accepted = await response.json();
90
- ```
91
-
92
- Retain the returned IDs and implement bounded status polling plus saved-result
93
- readback before reporting success. The equivalent CLI submission is:
94
-
95
- ```bash
96
- eai docs classify ./document.pdf --tenant-id <tenant-id> \
97
- --storage-target resourceapi --vertical-key <app-key> --workflow-key <workflow-key>
98
- ```
99
-
100
- An authorised administrator selects the binding with
101
- `eai classifier target <classifier-key> --app <app-key> --workflow <workflow-key>
102
- --document-lifecycle business-document-v1` after schema/storage and published
103
- classifier readiness checks. Verify this syntax with the installed command's
104
- `--help`. `--document-lifecycle` is a target-administration option, not an upload
105
- option.
106
-
107
- Scope is document-use migration, not all v3 retirement. Existing-record
108
- read/download/delete/status, old queued callbacks, reference files and real
109
- form attachments remain compatibility obligations. Replacement, client and
110
- tenant-setup proof must precede enforcement against approved new legacy
111
- admissions. Track package/plugin/docs publication and installed adoption
112
- separately from local source or generator checks; do not claim live acceptance.
113
-
68
+ - Durable uploads and queued classification use
69
+ `POST /v4/data/documents/upload`. Browser callers use the app BFF at
70
+ `/api/eai/v4/data/documents/upload`.
71
+ - Use `storage_target=resourceapi`. For a standalone business document, provide
72
+ both `verticalKey` and `workflowKey`; PublicAPI authorises that scope and
73
+ resolves the published classifier binding. Do not send a classifier, storage
74
+ mapping, provider credential, or lifecycle mapping from the client.
75
+ - Use `classify([file], context)` for classification-only processing, or
76
+ `upload(file, context)` for the full requested lifecycle. Do not fall back to
77
+ the retired context-free `/v4/data/documents/classify` route.
78
+ - Retain the accepted document and job identifiers. Poll the authorised job
79
+ endpoint, read back the persisted result, and clean only the outputs the
80
+ caller created according to the workspace retention policy.
81
+ - `POST /v4/data/documents/classify-by-url` is direct analysis, not a durable
82
+ upload, stored-result, or cleanup replacement. Existing DAISY and Assess
83
+ planning/case context remains a compatibility obligation; do not fabricate it
84
+ for a standalone business document.
114
85
 
115
86
  ## Storage Backend Rules
116
87
 
117
- Keep Object Type identifiers in their correct layer. Configuration/model
118
- `name` is PascalCase; the exact stored `slug` is the lowercase
119
- kebab-case identifier used by relationship targets, runtime `target_type`,
120
- resource commands, paths, and governed v4 fields. Resolve same-manifest model
121
- name shorthand through the declared slug before publication. Never normalize
122
- or rename a historical stored slug.
123
-
124
- - `postgresql`: canonical structured resource storage.
125
- - `documentdb`: document-model persistence when the data genuinely needs it.
126
- - `blob`: large files or file-like resources behind API-mediated access.
88
+ Workspace app Object Types must use app-owned storage bindings. For PostgreSQL
89
+ types, use the `tenant-postgres` alias and table names that include the
90
+ tenant/app prefix validated by
91
+ `eai types validate --tenant-key <key> --tenant-id <tenant-id>`. Do not invent
92
+ storage aliases or generic table names; derive them from `eai app provision`,
93
+ `.eai/storage-bindings.json`, and the local Object Type helper.
94
+
95
+ - `postgresql`: default for relational, transactional, reporting, workflow
96
+ state, audit, and structured workspace business data.
97
+ - `documentdb`: document-model persistence for flexible JSON documents, nested
98
+ records, high-change schemas, and user-authored document state.
99
+ - `blob`: large files, binary content, exports, and file-like resources behind
100
+ API-mediated access.
127
101
  - `search`: derived full-text/vector/hybrid projection, not the sole system of
128
102
  record for runtime writes. On the v4 passive ResourceAPI interface, treat
129
103
  full-text readiness separately from hybrid/vector readiness; semantic modes
130
104
  require `eai resources storage doctor` to report `capabilities.search.hybrid`
131
- or `capabilities.search.vector`. Do not apply this fallback rule to legacy
132
- v1/v3 or active ResourceAPI behavior.
105
+ or `capabilities.search.vector`. Apply this fallback only to the published
106
+ passive ResourceAPI search contract.
107
+ - `content understanding`: use the EAI document and content services before
108
+ custom extraction code when the app must classify, extract, summarize, or
109
+ prepare evidence from documents or media.
110
+ - `workflows`: use the EAI workflow layer for approvals, long-running work,
111
+ service goals, operating targets, and cross-user process state.
112
+ - `AI services`: use platform AI hooks and workflow-backed agents first. Do not
113
+ add direct provider keys, ad hoc LLM clients, or non-EAI AI services unless
114
+ the platform lacks the capability and the exception is approved.
115
+
116
+ ## Business Decision Rules
117
+
118
+ When Gofer plans an EAI app, it should make the normal platform choice on behalf
119
+ of the business user.
120
+
121
+ 1. Use the simplest EAI Platform service that satisfies the requirement.
122
+ 2. Record the choice and reason in `service-fit-matrix.md`.
123
+ 3. Ask the user only when the choice affects cost, security, compliance,
124
+ deployment, data residency, external systems, or material business scope.
125
+ 4. If a capability appears missing, run live CLI discovery before recommending a
126
+ non-EAI service.
127
+ 5. If EAI does not expose the capability, use Azure second.
128
+ 6. Use any other platform only with explicit exception evidence.
133
129
 
134
130
  Document RAG indexing is a documents service pattern (`eai docs index` or
135
131
  `useDocuments().ragIndex(...)`), not a reason to create a search-only Object
@@ -137,8 +133,9 @@ Type.
137
133
 
138
134
  Do not create standalone PublicAPI v4 blob-upload flows. If a user asks to
139
135
  upload a file, first decide whether the file is a document workflow input or a
140
- ResourceAPI file property. Ask which workspace, workflow/stage, document purpose,
141
- Object Type, resource ID, and file property are involved before writing code.
136
+ ResourceAPI file property. Ask which workspace, workflow/stage, document
137
+ purpose, Object Type, resource ID, and file property are involved before writing
138
+ code.
142
139
 
143
140
  ## Config-Driven UI Rules
144
141
 
@@ -4,12 +4,25 @@ Use this fallback when external CLI documentation is unavailable.
4
4
 
5
5
  ## Version Pinning Rule
6
6
 
7
+ For authentication, use `.specify/references/platform/eai-auth-access.md`.
8
+ Confirm workspace-only access (the default) or explicitly approved wider app
9
+ access. Confirm client SSO separately; sign-in never replaces authorization.
10
+
7
11
  - Detect the installed CLI version.
8
12
  - Record the `major.minor` version in generated plan and task artifacts.
9
13
  - Avoid pinning implementation guidance to patch-specific behavior.
10
14
 
11
15
  ## Command Guidance Contract
12
16
 
17
+ - Do not invent, guess, or complete EAI CLI commands from memory.
18
+ - Before suggesting or running an `eai ...` command, verify the exact command
19
+ and flags from the installed CLI.
20
+ - Start with `eai --describe`.
21
+ - For a specific command, run `eai <command> --help` or the CLI-described
22
+ equivalent before using subcommands, flags, or examples.
23
+ - If the command is not listed or help fails, do not run it. Say the installed
24
+ EAI CLI does not expose that command, then choose a safe listed command or ask
25
+ the user to update EAI CLI.
13
26
  - Use live CLI discovery before assuming syntax:
14
27
  - `eai update --check`
15
28
  - `eai --describe`
@@ -22,6 +35,9 @@ Use this fallback when external CLI documentation is unavailable.
22
35
  - `eai workflow readiness --format json` when advertised
23
36
  - `eai provision entra` when identity callback or Entra registration setup is
24
37
  in scope
38
+ - Before architecture or storage decisions, read
39
+ `.specify/references/platform/eai-service-patterns.md` and record the service
40
+ choice in `.specify/specs/{feature}/service-fit-matrix.md`.
25
41
  - When any `eai` command fails, run
26
42
  `eai errors explain <code-or-reason> --format json` when advertised and use
27
43
  its public-safe reasons and next commands before guessing remediation.
@@ -49,9 +65,29 @@ Unless the live CLI advertises a different dependency order:
49
65
  4. Confirm or create/select the app
50
66
  5. Provision app resources
51
67
  6. Run object-type validation and publish
52
- 7. Verify schema, storage, and workflow readiness
68
+ 7. Verify schema, storage, workflow, goals, targets, and platform AI readiness
53
69
  8. Start preview or dev runtime
54
70
 
71
+ ## Platform Service Selection
72
+
73
+ For EAI app delivery, Gofer should choose the normal platform service without
74
+ making the business user learn the platform internals.
75
+
76
+ - Use PostgreSQL for relational, transactional, reporting, workflow state, and
77
+ structured workspace business data.
78
+ - Use DocumentDB for flexible JSON documents, nested records, and high-change
79
+ document models.
80
+ - Use Blob Storage for files, media, exports, and large binary content.
81
+ - Use AI Search as a derived search projection over a source of record.
82
+ - Use content understanding and document services for extraction,
83
+ classification, summarization, and Retrieval-Augmented Generation.
84
+ - Use workflows, goals, and targets for business processes, approvals,
85
+ service-level tracking, and operating outcomes.
86
+ - Use platform AI services before direct provider SDKs or provider keys.
87
+
88
+ Ask for user input only when the choice changes cost, security, compliance,
89
+ deployment, data residency, external systems, or material business scope.
90
+
55
91
  Do not treat provisioning, object-type publish, schema/storage health, workflow
56
92
  readiness, and preview as interchangeable states.
57
93
 
@@ -67,8 +103,8 @@ For workspace member or admin changes, use EAI CLI membership commands first. If
67
103
  `eai user invite` fails with `EXTERNAL_SERVICE_ERROR`, a 5xx status, or the
68
104
  `user_invite_external_service_existing_member` reason, check whether the person
69
105
  already exists with
70
- `eai user list --workspace <workspace-id> --search <email> --format json`. If a direct
71
- member exists and the user approves the role change, use
106
+ `eai user list --workspace <workspace-id> --search <email> --format json`. If a
107
+ direct member exists and the user approves the role change, use
72
108
  `eai user role set --workspace <workspace-id> --member-id <member-id> --role tenant-admin --format json`,
73
109
  verify the read-back, then tell the affected app user to sign out and sign back
74
110
  in because Auth.js session or JWT role data may be cached. Do not use direct
@@ -77,10 +113,10 @@ operator-only block.
77
113
 
78
114
  If a browser sign-in flow reports `AADSTS50011` or a Microsoft Entra redirect
79
115
  URI mismatch, do not start with manual Azure Portal edits. Confirm the EAI login
80
- and workspace, confirm the callback URI from the failing authorize request in the
81
- active session, then run the advertised
116
+ and identity-provider tenant, confirm the callback URI from the failing
117
+ authorize request in the active session, then run the advertised
82
118
  `eai provision entra --force --redirect-uri <confirmed-callback-uri>` path and
83
119
  retry sign-in. Record only a redacted callback route in Gofer artifacts. Use
84
- `--debug` only with explicit user approval, and redact private hostnames, private
85
- workspace/platform tenant IDs, Entra/CIAM authority tenant IDs, client IDs,
86
- tokens, and raw debug output before writing artifacts.
120
+ `--debug` only with explicit user approval, and redact private hostnames,
121
+ private workspace/platform tenant IDs, Entra/CIAM authority tenant IDs, client
122
+ IDs, tokens, and raw debug output before writing artifacts.
@@ -1,7 +1,7 @@
1
1
  # Vertical Template Reference
2
2
 
3
- Use `https://github.com/eai-support/eai-app-template` as the canonical public app
4
- template for EnterpriseAI app-delivery work.
3
+ Use `https://github.com/eai-support/eai-app-template` as the canonical public
4
+ app template for EnterpriseAI app-delivery work.
5
5
 
6
6
  This file is the preferred alias for the legacy `eai-app-template.md` fallback
7
7
  reference. Both names are kept so older EnterpriseAI consumers and newer public
@@ -23,10 +23,11 @@ Gofer terminology resolve to the same guidance.
23
23
 
24
24
  1. Browser code calls the local app BFF at `/api/eai/...`.
25
25
  2. Browser streaming uses `/api/eai/stream/...`.
26
- 3. The BFF or server helpers attach auth, workspace, and correlation headers.
26
+ 3. The BFF or server helpers attach auth, tenant, and correlation headers.
27
27
  4. The frontend never receives direct downstream database, blob, search, or
28
28
  PublicAPI credentials.
29
- 5. Use PublicAPI V4 surfaces for direct platform calls.
29
+ 5. Use the published PublicAPI route family through the template SDK, named
30
+ `eai` commands, or an approved server-side helper.
30
31
 
31
32
  ## Implementation Contract
32
33
 
@@ -39,11 +40,11 @@ Gofer terminology resolve to the same guidance.
39
40
  - Use the CLI for setup and verification:
40
41
  - `eai login`
41
42
  - `eai workspace select <workspace-slug>`
42
- - `eai types validate`
43
- - `eai types seed --tenant-key <key> --tenant-id <workspace-id>`
44
- - `eai types diff --tenant-key <key> --tenant-id <workspace-id>`
45
- - `eai resources schema --tenant-id <workspace-id>`
46
- - `eai verify calls --tenant-id <workspace-id> --resource-type <type>`
43
+ - `eai types validate --tenant-key <key> --tenant-id <tenant-id>`
44
+ - `eai types seed --tenant-key <key> --tenant-id <tenant-id>`
45
+ - `eai types diff --tenant-key <key> --tenant-id <tenant-id>`
46
+ - `eai resources schema --tenant-id <tenant-id>`
47
+ - `eai verify calls --tenant-id <tenant-id> --resource-type <type>`
47
48
 
48
49
  Do not describe retired templates as canonical scaffolds. The surviving public
49
50
  scaffold is the EAI App Template.
@@ -0,0 +1,152 @@
1
+ # Keep The Agreed Outcome
2
+
3
+ Gofer must stay on the user's priority, not merely complete available tasks.
4
+ These rules extend the existing pipeline, not replace it.
5
+
6
+ ## Before Work And After Resume
7
+
8
+ Record material changes to the goal, priority, scope or permission in the
9
+ private feature decisions.md before acting. Resolve what a short instruction
10
+ such as "do it" refers to. Do not copy secrets or every routine chat message.
11
+ Update spec.md, plan.md, tasks.md and traceability when affected. Do not invent
12
+ approval where approval is required.
13
+
14
+ ## Goal-Led Autonomy
15
+
16
+ The stated goal authorizes Gofer to make ordinary delivery decisions. Gofer
17
+ must choose the next safe task, design, investigation, repair, test, and
18
+ reversible repository change without asking the user to manage the process.
19
+ Record each material Gofer decision with its identifier, chosen path, reason,
20
+ scope, and business effect. Tell the user what changed in concise progress
21
+ updates. A recorded Gofer decision is sufficient for independent work that the
22
+ priority plan proves is safe.
23
+
24
+ Ask the user only when Gofer cannot safely own the decision:
25
+
26
+ - The goal, success measure, or target environment is unclear or changes.
27
+ - The action causes irreversible loss, external spending, legal commitment,
28
+ production/public exposure, or a security/access change.
29
+ - Required authority, credentials, an account action, or a host permission is
30
+ missing.
31
+ - A safe in-scope diagnosis and repair cannot remove a blocker within the
32
+ retry limit.
33
+ - The proposed action conflicts with an explicit user constraint.
34
+
35
+ Do not ask for ordinary technology choices, task order, safe repair choices,
36
+ or evidence collection. Do not present several technical options when one
37
+ safe option best advances the goal. Use the chosen option, record why, and
38
+ continue.
39
+
40
+ Create priority-plan.json from the template by the tasks stage. Include every
41
+ task ID, its prerequisites and an explicit allowedEditScope. Paths are relative
42
+ to the repo: exact files or directories ending in `/`, not wildcards. Include
43
+ feature evidence paths where the task writes them. Empty scope means read-only.
44
+ Record `lastInstruction` in decisions.md. Keep this plan under the existing
45
+ delivery checkpoint so an unnoticed direction change fails the freshness check.
46
+
47
+ Before a task, run:
48
+
49
+ ```sh
50
+ node .specify/scripts/node/gofer-priority-check.mjs --feature-dir <feature-dir> --task T001
51
+ ```
52
+
53
+ Supply `--workspace <repo-root>` and `--changed-file <repo-relative-path>` for
54
+ every intended edit and again for the actual diff. The helper is read-only. It
55
+ does not intercept host tools; the agent must inspect the full diff, including
56
+ untracked files and other repos. The checker resolves existing parents of
57
+ proposed files and rejects symlinks that escape the approved scope. Recheck
58
+ immediately before an edit; the host still controls the actual write. It rejects
59
+ non-regular files and oversized records (4 MiB documents, 64 MiB per evidence
60
+ file, 128 MiB total unique evidence per review). Aliases reuse the same raw-file
61
+ hash. Keep focused evidence in the feature; do not weaken required checks to
62
+ reduce the record size. Task graphs are bounded at 20,000 tasks and 100,000
63
+ dependencies. Split larger work into reviewed features.
64
+
65
+ Follow `nextTask`. It resolves the first open priority task and its unfinished
66
+ prerequisites. Independent parallel work requires `parallelFor`, a reason and
67
+ a recorded decision ID. The decision can be a Gofer decision when the work is
68
+ within the goal, declared scopes, limits, and safety rules. A blocked priority
69
+ never authorizes unrelated chores. Changing scope requires updating the plan and
70
+ user understanding, not bypassing the check. Preserve all release/security gates
71
+ even for unrelated failures.
72
+
73
+ On resume, read the saved direction, goal, tasks and evidence before acting.
74
+ Say: "We are proving sign-in works. I will first check the failed login." Do not
75
+ dump internal IDs in routine progress updates.
76
+
77
+ ## Before Asking For Help
78
+
79
+ Use the existing blocker controller and retry budget. For a technical blocker,
80
+ the `ask` event needs `verification`, a relative path in its private state
81
+ folder. The JSON diagnosis must include:
82
+
83
+ - `blockerId`, `kind: "diagnosis"`, `checkedAt` (UTC, within 24 hours),
84
+ `source`.
85
+ - `classification`: product, tooling, credential, environment or self-caused.
86
+ - `command` and `observed`: the safe check actually performed and its result.
87
+ - `evidence` and `sha256`: the private output file and its raw-file SHA-256.
88
+ - `selfCauseChecked: true` and `selfCauseCheck`: verify syntax, route order,
89
+ environment and existing configuration against current evidence.
90
+ - `authorizedRepairAvailable: false` and `authorityCheck`: explain why the agent
91
+ cannot safely repair it within the approved scope and existing access.
92
+ - `alternativeCheck` or `noSafeAlternativeReason`. Logs or current help may be
93
+ enough. Never replay a destructive action merely to reproduce a failure.
94
+
95
+ If an authorized repair is available, use the existing bounded recovery instead.
96
+ An expired token needs an actual session check, not an invented tenant. Having
97
+ an admin role does not authorize every change. Real business choices use the
98
+ `decision` category and need no fabricated technical failure. Evidence hashes
99
+ protect saved records from change; they do not certify that a claim is true.
100
+
101
+ ## Prove The Current Outcome
102
+
103
+ Place the first meaningful user/runtime proof immediately after its minimum
104
+ prerequisites. The scope can be local MVP, non-app research or a deployed
105
+ feature. Do not require future authentication, a cloud deployment, or tenant
106
+ setup for work that does not yet need it. Later release checks remain mandatory.
107
+
108
+ The plan names the outcome, requirements, target environment/revision and
109
+ receipt. Before completion, run the helper with `--finish`. A receipt must
110
+ contain:
111
+
112
+ - `result: "pass"`, `outcomeId`, `planHash` and `specHash` (SHA-256 of raw
113
+ files).
114
+ - `target` matching the agreed environment and exact code/document revision.
115
+ - `requirements` and nonempty `checks`, each with `command`, `result: "pass"`,
116
+ relative `evidence` path and its raw-file `sha256`.
117
+
118
+ Traceability must name the receipt for each outcome requirement. Verify the
119
+ deployed revision independently before recording it. Rerun affected checks after
120
+ any code, direction or target change; a renamed or copied file is not new proof.
121
+ The helper checks recorded integrity, not the live environment or user consent.
122
+
123
+ Missing or failed proof means **outcome unverified**, even when other tests
124
+ pass. Keep those test results visible; do not erase them or claim the whole
125
+ feature passed. Existing task evidence checks still apply to every completed
126
+ task.
127
+
128
+ New loop contracts require this plan at stages 4-6. Earlier stages do not
129
+ require the final result. Legacy contracts retain their checks with an explicit
130
+ coverage limitation until reviewed and migrated. Conversation-only work needs no
131
+ plan.
132
+
133
+ Final closed-loop validation also uses
134
+ `gofer-closed-loop-audit.mjs --completion`. Without that flag, the audit checks
135
+ plan structure and drift only; it does not prove completion. The explicit
136
+ completion check requires the plan even for an older feature. Migrate it first
137
+ rather than silently accepting missing evidence.
138
+
139
+ ## Release And Recovery
140
+
141
+ After this version records diagnostic proofs, do not downgrade to an older
142
+ blocker reader. Older readers reject the new proof type. Keep the current record
143
+ readers and completion argument when preparing a corrective release. User-facing
144
+ policy and new defaults can be reverted in that release without deleting
145
+ evidence or resetting retry budgets. Pause blocked work until the compatible fix
146
+ passes its tests. A package downgrade is not a supported recovery.
147
+
148
+ Merging release preparation updates the GitHub Pages feed. That is already a
149
+ rollout boundary, even before the Marketplace finishes. If a publishing step
150
+ fails, repair that same version's publication. Do not announce a complete
151
+ release until every required channel serves the checked version and helper
152
+ files.