eai-cli 0.0.0-bootstrap.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (690) hide show
  1. package/LICENSE +183 -0
  2. package/NOTICE +4 -0
  3. package/README.md +14 -0
  4. package/dist/commands/agent.d.ts +3 -0
  5. package/dist/commands/agent.d.ts.map +1 -0
  6. package/dist/commands/agent.js +69 -0
  7. package/dist/commands/agent.js.map +1 -0
  8. package/dist/commands/blocks.d.ts +3 -0
  9. package/dist/commands/blocks.d.ts.map +1 -0
  10. package/dist/commands/blocks.js +249 -0
  11. package/dist/commands/blocks.js.map +1 -0
  12. package/dist/commands/chat.d.ts +6 -0
  13. package/dist/commands/chat.d.ts.map +1 -0
  14. package/dist/commands/chat.js +105 -0
  15. package/dist/commands/chat.js.map +1 -0
  16. package/dist/commands/deploy.d.ts +36 -0
  17. package/dist/commands/deploy.d.ts.map +1 -0
  18. package/dist/commands/deploy.js +712 -0
  19. package/dist/commands/deploy.js.map +1 -0
  20. package/dist/commands/dev.d.ts +15 -0
  21. package/dist/commands/dev.d.ts.map +1 -0
  22. package/dist/commands/dev.js +133 -0
  23. package/dist/commands/dev.js.map +1 -0
  24. package/dist/commands/docs.d.ts +6 -0
  25. package/dist/commands/docs.d.ts.map +1 -0
  26. package/dist/commands/docs.js +118 -0
  27. package/dist/commands/docs.js.map +1 -0
  28. package/dist/commands/env.d.ts +10 -0
  29. package/dist/commands/env.d.ts.map +1 -0
  30. package/dist/commands/env.js +200 -0
  31. package/dist/commands/env.js.map +1 -0
  32. package/dist/commands/errors.d.ts +3 -0
  33. package/dist/commands/errors.d.ts.map +1 -0
  34. package/dist/commands/errors.js +72 -0
  35. package/dist/commands/errors.js.map +1 -0
  36. package/dist/commands/gofer.d.ts +3 -0
  37. package/dist/commands/gofer.d.ts.map +1 -0
  38. package/dist/commands/gofer.js +134 -0
  39. package/dist/commands/gofer.js.map +1 -0
  40. package/dist/commands/init.d.ts +14 -0
  41. package/dist/commands/init.d.ts.map +1 -0
  42. package/dist/commands/init.js +1437 -0
  43. package/dist/commands/init.js.map +1 -0
  44. package/dist/commands/login.d.ts +7 -0
  45. package/dist/commands/login.d.ts.map +1 -0
  46. package/dist/commands/login.js +117 -0
  47. package/dist/commands/login.js.map +1 -0
  48. package/dist/commands/provision.d.ts +6 -0
  49. package/dist/commands/provision.d.ts.map +1 -0
  50. package/dist/commands/provision.js +855 -0
  51. package/dist/commands/provision.js.map +1 -0
  52. package/dist/commands/publicapi.d.ts +6 -0
  53. package/dist/commands/publicapi.d.ts.map +1 -0
  54. package/dist/commands/publicapi.js +184 -0
  55. package/dist/commands/publicapi.js.map +1 -0
  56. package/dist/commands/resources.d.ts +38 -0
  57. package/dist/commands/resources.d.ts.map +1 -0
  58. package/dist/commands/resources.js +1010 -0
  59. package/dist/commands/resources.js.map +1 -0
  60. package/dist/commands/runtime.d.ts +3 -0
  61. package/dist/commands/runtime.d.ts.map +1 -0
  62. package/dist/commands/runtime.js +78 -0
  63. package/dist/commands/runtime.js.map +1 -0
  64. package/dist/commands/template.d.ts +3 -0
  65. package/dist/commands/template.d.ts.map +1 -0
  66. package/dist/commands/template.js +365 -0
  67. package/dist/commands/template.js.map +1 -0
  68. package/dist/commands/tenant.d.ts +45 -0
  69. package/dist/commands/tenant.d.ts.map +1 -0
  70. package/dist/commands/tenant.js +1036 -0
  71. package/dist/commands/tenant.js.map +1 -0
  72. package/dist/commands/types.d.ts +130 -0
  73. package/dist/commands/types.d.ts.map +1 -0
  74. package/dist/commands/types.js +1636 -0
  75. package/dist/commands/types.js.map +1 -0
  76. package/dist/commands/update.d.ts +13 -0
  77. package/dist/commands/update.d.ts.map +1 -0
  78. package/dist/commands/update.js +163 -0
  79. package/dist/commands/update.js.map +1 -0
  80. package/dist/commands/user.d.ts +6 -0
  81. package/dist/commands/user.d.ts.map +1 -0
  82. package/dist/commands/user.js +359 -0
  83. package/dist/commands/user.js.map +1 -0
  84. package/dist/commands/verify.d.ts +40 -0
  85. package/dist/commands/verify.d.ts.map +1 -0
  86. package/dist/commands/verify.js +1442 -0
  87. package/dist/commands/verify.js.map +1 -0
  88. package/dist/commands/vertical.d.ts +24 -0
  89. package/dist/commands/vertical.d.ts.map +1 -0
  90. package/dist/commands/vertical.js +301 -0
  91. package/dist/commands/vertical.js.map +1 -0
  92. package/dist/commands/whoami.d.ts +6 -0
  93. package/dist/commands/whoami.d.ts.map +1 -0
  94. package/dist/commands/whoami.js +73 -0
  95. package/dist/commands/whoami.js.map +1 -0
  96. package/dist/commands/workflow.d.ts +6 -0
  97. package/dist/commands/workflow.d.ts.map +1 -0
  98. package/dist/commands/workflow.js +400 -0
  99. package/dist/commands/workflow.js.map +1 -0
  100. package/dist/index.d.ts +10 -0
  101. package/dist/index.d.ts.map +1 -0
  102. package/dist/index.js +272 -0
  103. package/dist/index.js.map +1 -0
  104. package/dist/lib/agent-guide.d.ts +24 -0
  105. package/dist/lib/agent-guide.d.ts.map +1 -0
  106. package/dist/lib/agent-guide.js +155 -0
  107. package/dist/lib/agent-guide.js.map +1 -0
  108. package/dist/lib/api.d.ts +338 -0
  109. package/dist/lib/api.d.ts.map +1 -0
  110. package/dist/lib/api.js +991 -0
  111. package/dist/lib/api.js.map +1 -0
  112. package/dist/lib/auth.d.ts +65 -0
  113. package/dist/lib/auth.d.ts.map +1 -0
  114. package/dist/lib/auth.js +592 -0
  115. package/dist/lib/auth.js.map +1 -0
  116. package/dist/lib/azure-cli.d.ts +6 -0
  117. package/dist/lib/azure-cli.d.ts.map +1 -0
  118. package/dist/lib/azure-cli.js +13 -0
  119. package/dist/lib/azure-cli.js.map +1 -0
  120. package/dist/lib/block-catalog-normalize.d.ts +47 -0
  121. package/dist/lib/block-catalog-normalize.d.ts.map +1 -0
  122. package/dist/lib/block-catalog-normalize.js +355 -0
  123. package/dist/lib/block-catalog-normalize.js.map +1 -0
  124. package/dist/lib/block-catalog-types.d.ts +111 -0
  125. package/dist/lib/block-catalog-types.d.ts.map +1 -0
  126. package/dist/lib/block-catalog-types.js +41 -0
  127. package/dist/lib/block-catalog-types.js.map +1 -0
  128. package/dist/lib/block-catalog-utils.d.ts +7 -0
  129. package/dist/lib/block-catalog-utils.d.ts.map +1 -0
  130. package/dist/lib/block-catalog-utils.js +47 -0
  131. package/dist/lib/block-catalog-utils.js.map +1 -0
  132. package/dist/lib/block-catalog-validation.d.ts +5 -0
  133. package/dist/lib/block-catalog-validation.d.ts.map +1 -0
  134. package/dist/lib/block-catalog-validation.js +112 -0
  135. package/dist/lib/block-catalog-validation.js.map +1 -0
  136. package/dist/lib/block-catalog.d.ts +3 -0
  137. package/dist/lib/block-catalog.d.ts.map +1 -0
  138. package/dist/lib/block-catalog.js +284 -0
  139. package/dist/lib/block-catalog.js.map +1 -0
  140. package/dist/lib/cloud-env.d.ts +25 -0
  141. package/dist/lib/cloud-env.d.ts.map +1 -0
  142. package/dist/lib/cloud-env.js +79 -0
  143. package/dist/lib/cloud-env.js.map +1 -0
  144. package/dist/lib/config.d.ts +116 -0
  145. package/dist/lib/config.d.ts.map +1 -0
  146. package/dist/lib/config.js +195 -0
  147. package/dist/lib/config.js.map +1 -0
  148. package/dist/lib/context.d.ts +43 -0
  149. package/dist/lib/context.d.ts.map +1 -0
  150. package/dist/lib/context.js +68 -0
  151. package/dist/lib/context.js.map +1 -0
  152. package/dist/lib/error-codes.d.ts +56 -0
  153. package/dist/lib/error-codes.d.ts.map +1 -0
  154. package/dist/lib/error-codes.js +211 -0
  155. package/dist/lib/error-codes.js.map +1 -0
  156. package/dist/lib/error-guidance/catalog.d.ts +648 -0
  157. package/dist/lib/error-guidance/catalog.d.ts.map +1 -0
  158. package/dist/lib/error-guidance/catalog.js +940 -0
  159. package/dist/lib/error-guidance/catalog.js.map +1 -0
  160. package/dist/lib/error-guidance/match.d.ts +3 -0
  161. package/dist/lib/error-guidance/match.d.ts.map +1 -0
  162. package/dist/lib/error-guidance/match.js +46 -0
  163. package/dist/lib/error-guidance/match.js.map +1 -0
  164. package/dist/lib/error-guidance/render.d.ts +5 -0
  165. package/dist/lib/error-guidance/render.d.ts.map +1 -0
  166. package/dist/lib/error-guidance/render.js +92 -0
  167. package/dist/lib/error-guidance/render.js.map +1 -0
  168. package/dist/lib/error-guidance/types.d.ts +76 -0
  169. package/dist/lib/error-guidance/types.d.ts.map +1 -0
  170. package/dist/lib/error-guidance/types.js +2 -0
  171. package/dist/lib/error-guidance/types.js.map +1 -0
  172. package/dist/lib/error-guidance/validate.d.ts +3 -0
  173. package/dist/lib/error-guidance/validate.d.ts.map +1 -0
  174. package/dist/lib/error-guidance/validate.js +59 -0
  175. package/dist/lib/error-guidance/validate.js.map +1 -0
  176. package/dist/lib/gofer-installer.d.ts +32 -0
  177. package/dist/lib/gofer-installer.d.ts.map +1 -0
  178. package/dist/lib/gofer-installer.js +589 -0
  179. package/dist/lib/gofer-installer.js.map +1 -0
  180. package/dist/lib/gofer-refresh.d.ts +46 -0
  181. package/dist/lib/gofer-refresh.d.ts.map +1 -0
  182. package/dist/lib/gofer-refresh.js +536 -0
  183. package/dist/lib/gofer-refresh.js.map +1 -0
  184. package/dist/lib/next-route-exports.d.ts +6 -0
  185. package/dist/lib/next-route-exports.d.ts.map +1 -0
  186. package/dist/lib/next-route-exports.js +127 -0
  187. package/dist/lib/next-route-exports.js.map +1 -0
  188. package/dist/lib/npm.d.ts +2 -0
  189. package/dist/lib/npm.d.ts.map +1 -0
  190. package/dist/lib/npm.js +4 -0
  191. package/dist/lib/npm.js.map +1 -0
  192. package/dist/lib/object-type-defaults.d.ts +4 -0
  193. package/dist/lib/object-type-defaults.d.ts.map +1 -0
  194. package/dist/lib/object-type-defaults.js +72 -0
  195. package/dist/lib/object-type-defaults.js.map +1 -0
  196. package/dist/lib/output.d.ts +35 -0
  197. package/dist/lib/output.d.ts.map +1 -0
  198. package/dist/lib/output.js +166 -0
  199. package/dist/lib/output.js.map +1 -0
  200. package/dist/lib/profile.d.ts +52 -0
  201. package/dist/lib/profile.d.ts.map +1 -0
  202. package/dist/lib/profile.js +116 -0
  203. package/dist/lib/profile.js.map +1 -0
  204. package/dist/lib/project-manifest.d.ts +42 -0
  205. package/dist/lib/project-manifest.d.ts.map +1 -0
  206. package/dist/lib/project-manifest.js +191 -0
  207. package/dist/lib/project-manifest.js.map +1 -0
  208. package/dist/lib/resourceapi-bundle.d.ts +33 -0
  209. package/dist/lib/resourceapi-bundle.d.ts.map +1 -0
  210. package/dist/lib/resourceapi-bundle.js +79 -0
  211. package/dist/lib/resourceapi-bundle.js.map +1 -0
  212. package/dist/lib/runtime-contract.d.ts +84 -0
  213. package/dist/lib/runtime-contract.d.ts.map +1 -0
  214. package/dist/lib/runtime-contract.js +318 -0
  215. package/dist/lib/runtime-contract.js.map +1 -0
  216. package/dist/lib/schema-builder.d.ts +28 -0
  217. package/dist/lib/schema-builder.d.ts.map +1 -0
  218. package/dist/lib/schema-builder.js +69 -0
  219. package/dist/lib/schema-builder.js.map +1 -0
  220. package/dist/lib/tenant-context.d.ts +127 -0
  221. package/dist/lib/tenant-context.d.ts.map +1 -0
  222. package/dist/lib/tenant-context.js +573 -0
  223. package/dist/lib/tenant-context.js.map +1 -0
  224. package/dist/lib/update-check.d.ts +52 -0
  225. package/dist/lib/update-check.d.ts.map +1 -0
  226. package/dist/lib/update-check.js +271 -0
  227. package/dist/lib/update-check.js.map +1 -0
  228. package/dist/lib/update-maintenance.d.ts +15 -0
  229. package/dist/lib/update-maintenance.d.ts.map +1 -0
  230. package/dist/lib/update-maintenance.js +187 -0
  231. package/dist/lib/update-maintenance.js.map +1 -0
  232. package/dist/lib/utils.d.ts +23 -0
  233. package/dist/lib/utils.d.ts.map +1 -0
  234. package/dist/lib/utils.js +48 -0
  235. package/dist/lib/utils.js.map +1 -0
  236. package/dist/lib/workflow-provisioning.d.ts +54 -0
  237. package/dist/lib/workflow-provisioning.d.ts.map +1 -0
  238. package/dist/lib/workflow-provisioning.js +281 -0
  239. package/dist/lib/workflow-provisioning.js.map +1 -0
  240. package/package.json +51 -0
  241. package/resources/gofer/.gofer-version +7 -0
  242. package/resources/gofer/agents-skills/0_gofer_start/SKILL.md +1287 -0
  243. package/resources/gofer/agents-skills/0a_problem_validation/SKILL.md +429 -0
  244. package/resources/gofer/agents-skills/10_gofer_cloud/SKILL.md +635 -0
  245. package/resources/gofer/agents-skills/1_gofer_research/SKILL.md +1159 -0
  246. package/resources/gofer/agents-skills/2_gofer_specify/SKILL.md +860 -0
  247. package/resources/gofer/agents-skills/3_gofer_plan/SKILL.md +886 -0
  248. package/resources/gofer/agents-skills/4_gofer_tasks/SKILL.md +748 -0
  249. package/resources/gofer/agents-skills/5_gofer_implement/SKILL.md +924 -0
  250. package/resources/gofer/agents-skills/6_gofer_validate/SKILL.md +2269 -0
  251. package/resources/gofer/agents-skills/7_gofer_save/SKILL.md +423 -0
  252. package/resources/gofer/agents-skills/7a_stakeholder_comms/SKILL.md +508 -0
  253. package/resources/gofer/agents-skills/8_gofer_branding/SKILL.md +315 -0
  254. package/resources/gofer/agents-skills/9_gofer_tests/SKILL.md +558 -0
  255. package/resources/gofer/agents-skills/gofer_bootstrap_workspace/SKILL.md +148 -0
  256. package/resources/gofer/agents-skills/gofer_check_workspace/SKILL.md +119 -0
  257. package/resources/gofer/agents-skills/gofer_constitution/SKILL.md +612 -0
  258. package/resources/gofer/agents-skills/gofer_diagnose/SKILL.md +114 -0
  259. package/resources/gofer/agents-skills/gofer_eai_first_run/SKILL.md +397 -0
  260. package/resources/gofer/agents-skills/gofer_hydrate/SKILL.md +561 -0
  261. package/resources/gofer/agents-skills/gofer_personality/SKILL.md +44 -0
  262. package/resources/gofer/agents-skills/gofer_plan/SKILL.md +40 -0
  263. package/resources/gofer/agents-skills/gofer_side/SKILL.md +45 -0
  264. package/resources/gofer/agents-skills/gofer_spec_summary/SKILL.md +112 -0
  265. package/resources/gofer/agents-skills/gofer_tdd/SKILL.md +112 -0
  266. package/resources/gofer/agents-skills/gofer_vocabulary/SKILL.md +112 -0
  267. package/resources/gofer/agents-skills/gofer_zoom_out/SKILL.md +112 -0
  268. package/resources/gofer/bash-scripts/check-context-health.sh +365 -0
  269. package/resources/gofer/bash-scripts/check-persona-pack.sh +81 -0
  270. package/resources/gofer/bash-scripts/check-prerequisites.sh +168 -0
  271. package/resources/gofer/bash-scripts/common.sh +192 -0
  272. package/resources/gofer/bash-scripts/create-new-feature.sh +260 -0
  273. package/resources/gofer/bash-scripts/install-optional-tools.sh +270 -0
  274. package/resources/gofer/bash-scripts/log-stage.sh +224 -0
  275. package/resources/gofer/bash-scripts/mark-task-complete.sh +74 -0
  276. package/resources/gofer/bash-scripts/pipeline-state.sh +306 -0
  277. package/resources/gofer/bash-scripts/read-failed-approaches.sh +114 -0
  278. package/resources/gofer/bash-scripts/read-session-memories.sh +96 -0
  279. package/resources/gofer/bash-scripts/save-checkpoint.sh +407 -0
  280. package/resources/gofer/bash-scripts/setup-plan.sh +62 -0
  281. package/resources/gofer/bash-scripts/sync-implementation-status.sh +47 -0
  282. package/resources/gofer/bash-scripts/update-agent-context.sh +772 -0
  283. package/resources/gofer/bash-scripts/validate-artifact.sh +335 -0
  284. package/resources/gofer/bash-scripts/verify-task.sh +384 -0
  285. package/resources/gofer/bash-scripts/write-failed-approach.sh +110 -0
  286. package/resources/gofer/bash-scripts/write-periodic-checkpoint.sh +128 -0
  287. package/resources/gofer/bash-scripts/write-session-memory.sh +118 -0
  288. package/resources/gofer/claude-agents/assumption-tracker.md +168 -0
  289. package/resources/gofer/claude-agents/business-metrics-analyzer.md +169 -0
  290. package/resources/gofer/claude-agents/business-problem-validator.md +168 -0
  291. package/resources/gofer/claude-agents/codebase-analyzer.md +124 -0
  292. package/resources/gofer/claude-agents/codebase-locator.md +95 -0
  293. package/resources/gofer/claude-agents/codebase-pattern-finder.md +180 -0
  294. package/resources/gofer/claude-agents/comms-writer.md +158 -0
  295. package/resources/gofer/claude-agents/engineer-review.md +169 -0
  296. package/resources/gofer/claude-agents/implement-bug-triangulator.md +94 -0
  297. package/resources/gofer/claude-agents/implement-code-review-council.md +89 -0
  298. package/resources/gofer/claude-agents/implement-doc-writer.md +89 -0
  299. package/resources/gofer/claude-agents/implement-error-hardener.md +84 -0
  300. package/resources/gofer/claude-agents/implement-performance-explorer.md +95 -0
  301. package/resources/gofer/claude-agents/implement-test-diversifier.md +82 -0
  302. package/resources/gofer/claude-agents/implement-variant-generator.md +80 -0
  303. package/resources/gofer/claude-agents/multi-perspective-judge.md +114 -0
  304. package/resources/gofer/claude-agents/plan-api-comparator.md +90 -0
  305. package/resources/gofer/claude-agents/plan-architecture-diverger.md +100 -0
  306. package/resources/gofer/claude-agents/plan-data-model-stress-tester.md +95 -0
  307. package/resources/gofer/claude-agents/plan-migration-path-finder.md +95 -0
  308. package/resources/gofer/claude-agents/plan-refactor-rewrite-advisor.md +97 -0
  309. package/resources/gofer/claude-agents/research-dependency-evaluator.md +106 -0
  310. package/resources/gofer/claude-agents/research-horizon-scanner.md +100 -0
  311. package/resources/gofer/claude-agents/research-market-scanner.md +137 -0
  312. package/resources/gofer/claude-agents/research-perspective-multiplier.md +102 -0
  313. package/resources/gofer/claude-agents/scope-creep-detector.md +152 -0
  314. package/resources/gofer/claude-agents/specify-ambiguity-detector.md +95 -0
  315. package/resources/gofer/claude-agents/specify-journey-stress-tester.md +92 -0
  316. package/resources/gofer/claude-agents/tasks-cross-cutting-scanner.md +91 -0
  317. package/resources/gofer/claude-agents/tasks-rollback-planner.md +89 -0
  318. package/resources/gofer/claude-agents/validate-security-red-team.md +102 -0
  319. package/resources/gofer/claude-agents/validation-correctness.md +103 -0
  320. package/resources/gofer/claude-agents/validation-integration.md +129 -0
  321. package/resources/gofer/claude-agents/validation-performance.md +120 -0
  322. package/resources/gofer/claude-agents/validation-security.md +115 -0
  323. package/resources/gofer/claude-agents/validation-standards.md +151 -0
  324. package/resources/gofer/claude-agents/validation-test-quality.md +146 -0
  325. package/resources/gofer/claude-agents/visual-bounded-context-writer.md +40 -0
  326. package/resources/gofer/claude-agents/visual-c4-writer.md +45 -0
  327. package/resources/gofer/claude-agents/visual-erd-writer.md +34 -0
  328. package/resources/gofer/claude-agents/visual-heatmap-writer.md +63 -0
  329. package/resources/gofer/claude-agents/visual-risk-writer.md +64 -0
  330. package/resources/gofer/claude-commands/0_gofer_start.md +1282 -0
  331. package/resources/gofer/claude-commands/0a_problem_validation.md +424 -0
  332. package/resources/gofer/claude-commands/10_gofer_cloud.md +630 -0
  333. package/resources/gofer/claude-commands/1_gofer_research.md +1154 -0
  334. package/resources/gofer/claude-commands/2_gofer_specify.md +855 -0
  335. package/resources/gofer/claude-commands/3_gofer_plan.md +881 -0
  336. package/resources/gofer/claude-commands/4_gofer_tasks.md +743 -0
  337. package/resources/gofer/claude-commands/5_gofer_implement.md +919 -0
  338. package/resources/gofer/claude-commands/6_gofer_validate.md +2264 -0
  339. package/resources/gofer/claude-commands/7_gofer_save.md +418 -0
  340. package/resources/gofer/claude-commands/7a_stakeholder_comms.md +503 -0
  341. package/resources/gofer/claude-commands/8_gofer_branding.md +310 -0
  342. package/resources/gofer/claude-commands/9_gofer_tests.md +553 -0
  343. package/resources/gofer/claude-commands/gofer_bootstrap_workspace.md +143 -0
  344. package/resources/gofer/claude-commands/gofer_check_workspace.md +114 -0
  345. package/resources/gofer/claude-commands/gofer_constitution.md +607 -0
  346. package/resources/gofer/claude-commands/gofer_diagnose.md +109 -0
  347. package/resources/gofer/claude-commands/gofer_eai_first_run.md +392 -0
  348. package/resources/gofer/claude-commands/gofer_hydrate.md +556 -0
  349. package/resources/gofer/claude-commands/gofer_personality.md +39 -0
  350. package/resources/gofer/claude-commands/gofer_plan.md +35 -0
  351. package/resources/gofer/claude-commands/gofer_side.md +40 -0
  352. package/resources/gofer/claude-commands/gofer_spec_summary.md +107 -0
  353. package/resources/gofer/claude-commands/gofer_tdd.md +107 -0
  354. package/resources/gofer/claude-commands/gofer_vocabulary.md +107 -0
  355. package/resources/gofer/claude-commands/gofer_zoom_out.md +107 -0
  356. package/resources/gofer/claude-skills/eai-gofer/SKILL.md +56 -0
  357. package/resources/gofer/commands/.gitkeep +0 -0
  358. package/resources/gofer/commands/0_gofer_start.md +1299 -0
  359. package/resources/gofer/commands/0a_problem_validation.md +405 -0
  360. package/resources/gofer/commands/10_gofer_cloud.md +611 -0
  361. package/resources/gofer/commands/1_gofer_research.md +1135 -0
  362. package/resources/gofer/commands/2_gofer_specify.md +836 -0
  363. package/resources/gofer/commands/3_gofer_plan.md +862 -0
  364. package/resources/gofer/commands/4_gofer_tasks.md +724 -0
  365. package/resources/gofer/commands/5_gofer_implement.md +900 -0
  366. package/resources/gofer/commands/6_gofer_validate.md +2245 -0
  367. package/resources/gofer/commands/7_gofer_save.md +399 -0
  368. package/resources/gofer/commands/7a_stakeholder_comms.md +484 -0
  369. package/resources/gofer/commands/8_gofer_branding.md +291 -0
  370. package/resources/gofer/commands/9_gofer_tests.md +534 -0
  371. package/resources/gofer/commands/gofer_bootstrap_workspace.md +159 -0
  372. package/resources/gofer/commands/gofer_check_workspace.md +130 -0
  373. package/resources/gofer/commands/gofer_constitution.md +588 -0
  374. package/resources/gofer/commands/gofer_diagnose.md +89 -0
  375. package/resources/gofer/commands/gofer_eai_first_run.md +392 -0
  376. package/resources/gofer/commands/gofer_hydrate.md +537 -0
  377. package/resources/gofer/commands/gofer_personality.md +61 -0
  378. package/resources/gofer/commands/gofer_plan.md +51 -0
  379. package/resources/gofer/commands/gofer_side.md +56 -0
  380. package/resources/gofer/commands/gofer_spec_summary.md +87 -0
  381. package/resources/gofer/commands/gofer_tdd.md +87 -0
  382. package/resources/gofer/commands/gofer_vocabulary.md +87 -0
  383. package/resources/gofer/commands/gofer_zoom_out.md +87 -0
  384. package/resources/gofer/copilot-instructions/gofer-cost.instructions.md +13 -0
  385. package/resources/gofer/copilot-instructions/language-server.instructions.md +49 -0
  386. package/resources/gofer/copilot-instructions/typescript.instructions.md +47 -0
  387. package/resources/gofer/copilot-instructions/vscode-extension.instructions.md +46 -0
  388. package/resources/gofer/copilot-prompts/0_gofer_start.prompt.md +1308 -0
  389. package/resources/gofer/copilot-prompts/0a_problem_validation.prompt.md +429 -0
  390. package/resources/gofer/copilot-prompts/10_gofer_cloud.prompt.md +644 -0
  391. package/resources/gofer/copilot-prompts/1_gofer_research.prompt.md +1177 -0
  392. package/resources/gofer/copilot-prompts/2_gofer_specify.prompt.md +878 -0
  393. package/resources/gofer/copilot-prompts/3_gofer_plan.prompt.md +904 -0
  394. package/resources/gofer/copilot-prompts/4_gofer_tasks.prompt.md +766 -0
  395. package/resources/gofer/copilot-prompts/5_gofer_implement.prompt.md +942 -0
  396. package/resources/gofer/copilot-prompts/6_gofer_validate.prompt.md +2277 -0
  397. package/resources/gofer/copilot-prompts/7_gofer_save.prompt.md +433 -0
  398. package/resources/gofer/copilot-prompts/7a_stakeholder_comms.prompt.md +516 -0
  399. package/resources/gofer/copilot-prompts/8_gofer_branding.prompt.md +323 -0
  400. package/resources/gofer/copilot-prompts/9_gofer_tests.prompt.md +566 -0
  401. package/resources/gofer/copilot-prompts/gofer_bootstrap_workspace.prompt.md +161 -0
  402. package/resources/gofer/copilot-prompts/gofer_check_workspace.prompt.md +132 -0
  403. package/resources/gofer/copilot-prompts/gofer_constitution.prompt.md +621 -0
  404. package/resources/gofer/copilot-prompts/gofer_diagnose.prompt.md +127 -0
  405. package/resources/gofer/copilot-prompts/gofer_eai_first_run.prompt.md +410 -0
  406. package/resources/gofer/copilot-prompts/gofer_hydrate.prompt.md +571 -0
  407. package/resources/gofer/copilot-prompts/gofer_personality.prompt.md +57 -0
  408. package/resources/gofer/copilot-prompts/gofer_plan.prompt.md +53 -0
  409. package/resources/gofer/copilot-prompts/gofer_side.prompt.md +58 -0
  410. package/resources/gofer/copilot-prompts/gofer_spec_summary.prompt.md +125 -0
  411. package/resources/gofer/copilot-prompts/gofer_tdd.prompt.md +125 -0
  412. package/resources/gofer/copilot-prompts/gofer_vocabulary.prompt.md +125 -0
  413. package/resources/gofer/copilot-prompts/gofer_zoom_out.prompt.md +125 -0
  414. package/resources/gofer/gemini/agents/assumption-tracker.md +171 -0
  415. package/resources/gofer/gemini/agents/business-metrics-analyzer.md +172 -0
  416. package/resources/gofer/gemini/agents/business-problem-validator.md +171 -0
  417. package/resources/gofer/gemini/agents/codebase-analyzer.md +127 -0
  418. package/resources/gofer/gemini/agents/codebase-locator.md +98 -0
  419. package/resources/gofer/gemini/agents/codebase-pattern-finder.md +183 -0
  420. package/resources/gofer/gemini/agents/comms-writer.md +161 -0
  421. package/resources/gofer/gemini/agents/engineer-review.md +172 -0
  422. package/resources/gofer/gemini/agents/implement-bug-triangulator.md +97 -0
  423. package/resources/gofer/gemini/agents/implement-code-review-council.md +92 -0
  424. package/resources/gofer/gemini/agents/implement-doc-writer.md +92 -0
  425. package/resources/gofer/gemini/agents/implement-error-hardener.md +87 -0
  426. package/resources/gofer/gemini/agents/implement-performance-explorer.md +98 -0
  427. package/resources/gofer/gemini/agents/implement-test-diversifier.md +85 -0
  428. package/resources/gofer/gemini/agents/implement-variant-generator.md +83 -0
  429. package/resources/gofer/gemini/agents/multi-perspective-judge.md +117 -0
  430. package/resources/gofer/gemini/agents/plan-api-comparator.md +93 -0
  431. package/resources/gofer/gemini/agents/plan-architecture-diverger.md +103 -0
  432. package/resources/gofer/gemini/agents/plan-data-model-stress-tester.md +98 -0
  433. package/resources/gofer/gemini/agents/plan-migration-path-finder.md +98 -0
  434. package/resources/gofer/gemini/agents/plan-refactor-rewrite-advisor.md +100 -0
  435. package/resources/gofer/gemini/agents/research-dependency-evaluator.md +109 -0
  436. package/resources/gofer/gemini/agents/research-horizon-scanner.md +103 -0
  437. package/resources/gofer/gemini/agents/research-market-scanner.md +140 -0
  438. package/resources/gofer/gemini/agents/research-perspective-multiplier.md +105 -0
  439. package/resources/gofer/gemini/agents/scope-creep-detector.md +155 -0
  440. package/resources/gofer/gemini/agents/specify-ambiguity-detector.md +98 -0
  441. package/resources/gofer/gemini/agents/specify-journey-stress-tester.md +95 -0
  442. package/resources/gofer/gemini/agents/tasks-cross-cutting-scanner.md +94 -0
  443. package/resources/gofer/gemini/agents/tasks-rollback-planner.md +92 -0
  444. package/resources/gofer/gemini/agents/validate-security-red-team.md +105 -0
  445. package/resources/gofer/gemini/agents/validation-correctness.md +106 -0
  446. package/resources/gofer/gemini/agents/validation-integration.md +132 -0
  447. package/resources/gofer/gemini/agents/validation-performance.md +123 -0
  448. package/resources/gofer/gemini/agents/validation-security.md +118 -0
  449. package/resources/gofer/gemini/agents/validation-standards.md +154 -0
  450. package/resources/gofer/gemini/agents/validation-test-quality.md +149 -0
  451. package/resources/gofer/gemini/agents/visual-bounded-context-writer.md +40 -0
  452. package/resources/gofer/gemini/agents/visual-c4-writer.md +44 -0
  453. package/resources/gofer/gemini/agents/visual-erd-writer.md +36 -0
  454. package/resources/gofer/gemini/agents/visual-heatmap-writer.md +63 -0
  455. package/resources/gofer/gemini/agents/visual-risk-writer.md +64 -0
  456. package/resources/gofer/gemini/commands/gofer/.gitkeep +0 -0
  457. package/resources/gofer/gemini/commands/gofer/0_gofer_start.md +1282 -0
  458. package/resources/gofer/gemini/commands/gofer/0_gofer_start.toml +2 -0
  459. package/resources/gofer/gemini/commands/gofer/0a_problem_validation.md +424 -0
  460. package/resources/gofer/gemini/commands/gofer/0a_problem_validation.toml +2 -0
  461. package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.md +630 -0
  462. package/resources/gofer/gemini/commands/gofer/10_gofer_cloud.toml +2 -0
  463. package/resources/gofer/gemini/commands/gofer/1_gofer_research.md +1154 -0
  464. package/resources/gofer/gemini/commands/gofer/1_gofer_research.toml +2 -0
  465. package/resources/gofer/gemini/commands/gofer/2_gofer_specify.md +855 -0
  466. package/resources/gofer/gemini/commands/gofer/2_gofer_specify.toml +2 -0
  467. package/resources/gofer/gemini/commands/gofer/3_gofer_plan.md +881 -0
  468. package/resources/gofer/gemini/commands/gofer/3_gofer_plan.toml +2 -0
  469. package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.md +743 -0
  470. package/resources/gofer/gemini/commands/gofer/4_gofer_tasks.toml +2 -0
  471. package/resources/gofer/gemini/commands/gofer/5_gofer_implement.md +919 -0
  472. package/resources/gofer/gemini/commands/gofer/5_gofer_implement.toml +2 -0
  473. package/resources/gofer/gemini/commands/gofer/6_gofer_validate.md +2264 -0
  474. package/resources/gofer/gemini/commands/gofer/6_gofer_validate.toml +2 -0
  475. package/resources/gofer/gemini/commands/gofer/7_gofer_save.md +418 -0
  476. package/resources/gofer/gemini/commands/gofer/7_gofer_save.toml +2 -0
  477. package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.md +503 -0
  478. package/resources/gofer/gemini/commands/gofer/7a_stakeholder_comms.toml +2 -0
  479. package/resources/gofer/gemini/commands/gofer/8_gofer_branding.md +310 -0
  480. package/resources/gofer/gemini/commands/gofer/8_gofer_branding.toml +2 -0
  481. package/resources/gofer/gemini/commands/gofer/9_gofer_tests.md +553 -0
  482. package/resources/gofer/gemini/commands/gofer/9_gofer_tests.toml +2 -0
  483. package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.md +143 -0
  484. package/resources/gofer/gemini/commands/gofer/gofer_bootstrap_workspace.toml +2 -0
  485. package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.md +114 -0
  486. package/resources/gofer/gemini/commands/gofer/gofer_check_workspace.toml +2 -0
  487. package/resources/gofer/gemini/commands/gofer/gofer_constitution.md +607 -0
  488. package/resources/gofer/gemini/commands/gofer/gofer_constitution.toml +2 -0
  489. package/resources/gofer/gemini/commands/gofer/gofer_diagnose.md +109 -0
  490. package/resources/gofer/gemini/commands/gofer/gofer_diagnose.toml +2 -0
  491. package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.md +392 -0
  492. package/resources/gofer/gemini/commands/gofer/gofer_eai_first_run.toml +2 -0
  493. package/resources/gofer/gemini/commands/gofer/gofer_hydrate.md +556 -0
  494. package/resources/gofer/gemini/commands/gofer/gofer_hydrate.toml +2 -0
  495. package/resources/gofer/gemini/commands/gofer/gofer_personality.md +39 -0
  496. package/resources/gofer/gemini/commands/gofer/gofer_personality.toml +2 -0
  497. package/resources/gofer/gemini/commands/gofer/gofer_plan.md +35 -0
  498. package/resources/gofer/gemini/commands/gofer/gofer_plan.toml +2 -0
  499. package/resources/gofer/gemini/commands/gofer/gofer_side.md +40 -0
  500. package/resources/gofer/gemini/commands/gofer/gofer_side.toml +2 -0
  501. package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.md +107 -0
  502. package/resources/gofer/gemini/commands/gofer/gofer_spec_summary.toml +2 -0
  503. package/resources/gofer/gemini/commands/gofer/gofer_tdd.md +107 -0
  504. package/resources/gofer/gemini/commands/gofer/gofer_tdd.toml +2 -0
  505. package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.md +107 -0
  506. package/resources/gofer/gemini/commands/gofer/gofer_vocabulary.toml +2 -0
  507. package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.md +107 -0
  508. package/resources/gofer/gemini/commands/gofer/gofer_zoom_out.toml +2 -0
  509. package/resources/gofer/gemini/commands/gofer/manifest.json +32 -0
  510. package/resources/gofer/gemini/extension.json +16 -0
  511. package/resources/gofer/github-agents/gofer-business.agent.md +20 -0
  512. package/resources/gofer/github-agents/gofer-implement.agent.md +15 -0
  513. package/resources/gofer/github-agents/gofer-plan.agent.md +15 -0
  514. package/resources/gofer/github-agents/gofer-research.agent.md +15 -0
  515. package/resources/gofer/github-agents/gofer-validate.agent.md +10 -0
  516. package/resources/gofer/github-skills/eai-gofer/SKILL.md +56 -0
  517. package/resources/gofer/hook-scripts/agent-stop.mjs +655 -0
  518. package/resources/gofer/hook-scripts/log-stage-launch-time.mjs +77 -0
  519. package/resources/gofer/hook-scripts/post-tool-use.mjs +333 -0
  520. package/resources/gofer/hook-scripts/queued-input.mjs +188 -0
  521. package/resources/gofer/hook-scripts/session-lifecycle.mjs +93 -0
  522. package/resources/gofer/hook-scripts/user-prompt-submit.mjs +228 -0
  523. package/resources/gofer/instruction-templates/base/agents-base.md +37 -0
  524. package/resources/gofer/instruction-templates/base/claude-base.md +7 -0
  525. package/resources/gofer/instruction-templates/base/copilot-base.md +26 -0
  526. package/resources/gofer/instruction-templates/gofer/gofer-claude.md +5 -0
  527. package/resources/gofer/instruction-templates/gofer/gofer-copilot.md +9 -0
  528. package/resources/gofer/instruction-templates/languages/generic.md +7 -0
  529. package/resources/gofer/instruction-templates/languages/go.md +8 -0
  530. package/resources/gofer/instruction-templates/languages/java.md +8 -0
  531. package/resources/gofer/instruction-templates/languages/python.md +9 -0
  532. package/resources/gofer/instruction-templates/languages/rust.md +9 -0
  533. package/resources/gofer/instruction-templates/languages/typescript.md +19 -0
  534. package/resources/gofer/instruction-templates/workflow/principles.md +52 -0
  535. package/resources/gofer/memory/constitution.md +391 -0
  536. package/resources/gofer/memory/context-profiles.yaml +74 -0
  537. package/resources/gofer/memory/decisions/000-use-adr-for-decisions.md +67 -0
  538. package/resources/gofer/memory/decisions/001-di-framework.md +190 -0
  539. package/resources/gofer/memory/decisions/002-module-extraction.md +305 -0
  540. package/resources/gofer/memory/decisions/003-error-handling.md +368 -0
  541. package/resources/gofer/memory/decisions/004-cache-eviction.md +436 -0
  542. package/resources/gofer/memory/decisions/005-constants-management.md +520 -0
  543. package/resources/gofer/memory/decisions/README.md +129 -0
  544. package/resources/gofer/memory/diagrams/di-container.mmd +321 -0
  545. package/resources/gofer/memory/diagrams/extension-activation.mmd +184 -0
  546. package/resources/gofer/memory/diagrams/module-dependencies.mmd +264 -0
  547. package/resources/gofer/memory/gofer-model-policy.yaml +97 -0
  548. package/resources/gofer/memory/lessons.md +46 -0
  549. package/resources/gofer/node-scripts/canonical-descriptions.mjs +86 -0
  550. package/resources/gofer/node-scripts/check-version-alignment.mjs +131 -0
  551. package/resources/gofer/node-scripts/codex-doctor.mjs +425 -0
  552. package/resources/gofer/node-scripts/generate-commands.mjs +1366 -0
  553. package/resources/gofer/node-scripts/generate-issues.js +563 -0
  554. package/resources/gofer/node-scripts/gofer-closed-loop-audit.mjs +893 -0
  555. package/resources/gofer/node-scripts/gofer-loop-audit.mjs +541 -0
  556. package/resources/gofer/node-scripts/gofer-performance-report.mjs +306 -0
  557. package/resources/gofer/node-scripts/gofer-workspace-bootstrap.mjs +56 -0
  558. package/resources/gofer/node-scripts/gofer-workspace-check.mjs +56 -0
  559. package/resources/gofer/node-scripts/lib/ai-leverage-tagger.mjs +103 -0
  560. package/resources/gofer/node-scripts/lib/assemble-stakeholder-pack.mjs +114 -0
  561. package/resources/gofer/node-scripts/lib/marp-deck.mjs +87 -0
  562. package/resources/gofer/node-scripts/lib/mermaid-tabular-fallback.mjs +264 -0
  563. package/resources/gofer/node-scripts/lib/render-visual.mjs +54 -0
  564. package/resources/gofer/node-scripts/lib/validate-aliases.mjs +85 -0
  565. package/resources/gofer/node-scripts/lib/visual-counts.mjs +44 -0
  566. package/resources/gofer/node-scripts/lib/visual-pass-pipeline.mjs +134 -0
  567. package/resources/gofer/node-scripts/mermaid-export.mjs +72 -0
  568. package/resources/gofer/node-scripts/package-agent-plugin.mjs +940 -0
  569. package/resources/gofer/node-scripts/parse-stage-command.mjs +211 -0
  570. package/resources/gofer/node-scripts/schemas/.gitkeep +0 -0
  571. package/resources/gofer/node-scripts/schemas/stage-command.schema.json +72 -0
  572. package/resources/gofer/node-scripts/sync-extension-resources.mjs +110 -0
  573. package/resources/gofer/node-scripts/workspace-bootstrap-lib.mjs +1166 -0
  574. package/resources/gofer/powershell-scripts/install-optional-tools.ps1 +214 -0
  575. package/resources/gofer/references/platform/README.md +17 -0
  576. package/resources/gofer/references/platform/deployment-repo.md +9 -0
  577. package/resources/gofer/references/platform/eai-app-template.md +45 -0
  578. package/resources/gofer/references/platform/eai-config-driven-ui.md +156 -0
  579. package/resources/gofer/references/platform/eai-error-catalog.yaml +197 -0
  580. package/resources/gofer/references/platform/eai-repo-contract.md +134 -0
  581. package/resources/gofer/references/platform/eai-service-patterns.md +56 -0
  582. package/resources/gofer/references/platform/eai.md +85 -0
  583. package/resources/gofer/references/platform/vertical-template.md +49 -0
  584. package/resources/gofer/specify-commands/.gitkeep +0 -0
  585. package/resources/gofer/specify-commands/0_gofer_start.md +1299 -0
  586. package/resources/gofer/specify-commands/0a_problem_validation.md +405 -0
  587. package/resources/gofer/specify-commands/10_gofer_cloud.md +611 -0
  588. package/resources/gofer/specify-commands/1_gofer_research.md +1135 -0
  589. package/resources/gofer/specify-commands/2_gofer_specify.md +836 -0
  590. package/resources/gofer/specify-commands/3_gofer_plan.md +862 -0
  591. package/resources/gofer/specify-commands/4_gofer_tasks.md +724 -0
  592. package/resources/gofer/specify-commands/5_gofer_implement.md +900 -0
  593. package/resources/gofer/specify-commands/6_gofer_validate.md +2245 -0
  594. package/resources/gofer/specify-commands/7_gofer_save.md +399 -0
  595. package/resources/gofer/specify-commands/7a_stakeholder_comms.md +484 -0
  596. package/resources/gofer/specify-commands/8_gofer_branding.md +291 -0
  597. package/resources/gofer/specify-commands/9_gofer_tests.md +534 -0
  598. package/resources/gofer/specify-commands/gofer_bootstrap_workspace.md +159 -0
  599. package/resources/gofer/specify-commands/gofer_check_workspace.md +130 -0
  600. package/resources/gofer/specify-commands/gofer_constitution.md +588 -0
  601. package/resources/gofer/specify-commands/gofer_diagnose.md +89 -0
  602. package/resources/gofer/specify-commands/gofer_eai_first_run.md +392 -0
  603. package/resources/gofer/specify-commands/gofer_hydrate.md +537 -0
  604. package/resources/gofer/specify-commands/gofer_personality.md +61 -0
  605. package/resources/gofer/specify-commands/gofer_plan.md +51 -0
  606. package/resources/gofer/specify-commands/gofer_side.md +56 -0
  607. package/resources/gofer/specify-commands/gofer_spec_summary.md +87 -0
  608. package/resources/gofer/specify-commands/gofer_tdd.md +87 -0
  609. package/resources/gofer/specify-commands/gofer_vocabulary.md +87 -0
  610. package/resources/gofer/specify-commands/gofer_zoom_out.md +87 -0
  611. package/resources/gofer/system-skills/0_gofer_start/SKILL.md +1287 -0
  612. package/resources/gofer/system-skills/0a_problem_validation/SKILL.md +429 -0
  613. package/resources/gofer/system-skills/10_gofer_cloud/SKILL.md +635 -0
  614. package/resources/gofer/system-skills/1_gofer_research/SKILL.md +1159 -0
  615. package/resources/gofer/system-skills/2_gofer_specify/SKILL.md +860 -0
  616. package/resources/gofer/system-skills/3_gofer_plan/SKILL.md +886 -0
  617. package/resources/gofer/system-skills/4_gofer_tasks/SKILL.md +748 -0
  618. package/resources/gofer/system-skills/5_gofer_implement/SKILL.md +924 -0
  619. package/resources/gofer/system-skills/6_gofer_validate/SKILL.md +2269 -0
  620. package/resources/gofer/system-skills/7_gofer_save/SKILL.md +423 -0
  621. package/resources/gofer/system-skills/7a_stakeholder_comms/SKILL.md +508 -0
  622. package/resources/gofer/system-skills/8_gofer_branding/SKILL.md +315 -0
  623. package/resources/gofer/system-skills/9_gofer_tests/SKILL.md +558 -0
  624. package/resources/gofer/system-skills/gofer_bootstrap_workspace/SKILL.md +148 -0
  625. package/resources/gofer/system-skills/gofer_check_workspace/SKILL.md +119 -0
  626. package/resources/gofer/system-skills/gofer_constitution/SKILL.md +612 -0
  627. package/resources/gofer/system-skills/gofer_diagnose/SKILL.md +114 -0
  628. package/resources/gofer/system-skills/gofer_eai_first_run/SKILL.md +397 -0
  629. package/resources/gofer/system-skills/gofer_hydrate/SKILL.md +561 -0
  630. package/resources/gofer/system-skills/gofer_personality/SKILL.md +44 -0
  631. package/resources/gofer/system-skills/gofer_plan/SKILL.md +40 -0
  632. package/resources/gofer/system-skills/gofer_side/SKILL.md +45 -0
  633. package/resources/gofer/system-skills/gofer_spec_summary/SKILL.md +112 -0
  634. package/resources/gofer/system-skills/gofer_tdd/SKILL.md +112 -0
  635. package/resources/gofer/system-skills/gofer_vocabulary/SKILL.md +112 -0
  636. package/resources/gofer/system-skills/gofer_zoom_out/SKILL.md +112 -0
  637. package/resources/gofer/templates/agent-file-template.md +28 -0
  638. package/resources/gofer/templates/assumptions-template.md +94 -0
  639. package/resources/gofer/templates/audit-history-template.md +35 -0
  640. package/resources/gofer/templates/brand/brand-profile-template.json +45 -0
  641. package/resources/gofer/templates/brand/document-style-template.md +50 -0
  642. package/resources/gofer/templates/brand/marp-theme-template.css +58 -0
  643. package/resources/gofer/templates/brownfield-analysis.md +44 -0
  644. package/resources/gofer/templates/business-metrics-template.md +120 -0
  645. package/resources/gofer/templates/business-owner-summary-template.md +83 -0
  646. package/resources/gofer/templates/checklist-template.md +40 -0
  647. package/resources/gofer/templates/ciso-security-summary-template.md +70 -0
  648. package/resources/gofer/templates/context-bundle-template.md +76 -0
  649. package/resources/gofer/templates/contract-pack-template.md +109 -0
  650. package/resources/gofer/templates/cto-architecture-summary-template.md +83 -0
  651. package/resources/gofer/templates/discovery-template.md +92 -0
  652. package/resources/gofer/templates/eai-preflight-template.md +144 -0
  653. package/resources/gofer/templates/goal-ledger-template.json +69 -0
  654. package/resources/gofer/templates/gofer-model-policy.yaml +97 -0
  655. package/resources/gofer/templates/issues-template.md +106 -0
  656. package/resources/gofer/templates/journey/base-journey.md +95 -0
  657. package/resources/gofer/templates/journey/industry-variants.yaml +277 -0
  658. package/resources/gofer/templates/loop-contract-template.json +68 -0
  659. package/resources/gofer/templates/plan-template.md +215 -0
  660. package/resources/gofer/templates/problem-brief-template.md +85 -0
  661. package/resources/gofer/templates/proposal-review-template.md +79 -0
  662. package/resources/gofer/templates/research-template.md +222 -0
  663. package/resources/gofer/templates/reuse-scan-template.md +43 -0
  664. package/resources/gofer/templates/sequence-diagrams/option-spectrum.yaml +178 -0
  665. package/resources/gofer/templates/service-fit-matrix-template.md +29 -0
  666. package/resources/gofer/templates/session-handoff-template.md +172 -0
  667. package/resources/gofer/templates/spec-summary-template.md +118 -0
  668. package/resources/gofer/templates/spec-template.md +196 -0
  669. package/resources/gofer/templates/stakeholder-comms-template.md +330 -0
  670. package/resources/gofer/templates/stakeholder-review-index-template.md +54 -0
  671. package/resources/gofer/templates/tasks-template.md +323 -0
  672. package/resources/gofer/templates/ui-approval-template.md +32 -0
  673. package/resources/gofer/templates/ui-preview-brief-template.md +65 -0
  674. package/resources/gofer/templates/ui-review-log-template.md +11 -0
  675. package/resources/gofer/templates/visuals/.gitkeep +0 -0
  676. package/resources/gofer/templates/visuals/bounded-context-map.md +19 -0
  677. package/resources/gofer/templates/visuals/bounded-context-template.md +47 -0
  678. package/resources/gofer/templates/visuals/c4-container-template.md +38 -0
  679. package/resources/gofer/templates/visuals/c4-container.md +20 -0
  680. package/resources/gofer/templates/visuals/c4-context-template.md +46 -0
  681. package/resources/gofer/templates/visuals/capability-heatmap-template.md +54 -0
  682. package/resources/gofer/templates/visuals/data-model-erd-template.md +41 -0
  683. package/resources/gofer/templates/visuals/erd.md +19 -0
  684. package/resources/gofer/templates/visuals/impact-canvas.md +40 -0
  685. package/resources/gofer/templates/visuals/risk-heatmap-template.md +51 -0
  686. package/resources/gofer/templates/visuals/roi-projection.md +17 -0
  687. package/resources/gofer/templates/visuals/value-stream-asis.md +16 -0
  688. package/resources/gofer/templates/visuals/value-stream-tobe.md +18 -0
  689. package/resources/gofer/templates/working-backwards-prfaq-template.md +165 -0
  690. package/resources/linked-sources.json +25 -0
@@ -0,0 +1,127 @@
1
+ import { readdir, readFile } from "node:fs/promises";
2
+ import { join, relative } from "node:path";
3
+ import ts from "typescript";
4
+ const ROUTE_FILE_NAME = "route.ts";
5
+ const ALLOWED_ROUTE_EXPORTS = new Set([
6
+ "GET",
7
+ "POST",
8
+ "PUT",
9
+ "PATCH",
10
+ "DELETE",
11
+ "HEAD",
12
+ "OPTIONS",
13
+ "dynamic",
14
+ "dynamicParams",
15
+ "revalidate",
16
+ "fetchCache",
17
+ "runtime",
18
+ "preferredRegion",
19
+ "maxDuration",
20
+ ]);
21
+ async function walkRouteFiles(root) {
22
+ const files = [];
23
+ const entries = await readdir(root, { withFileTypes: true });
24
+ for (const entry of entries) {
25
+ const absolutePath = join(root, entry.name);
26
+ if (entry.isDirectory()) {
27
+ files.push(...(await walkRouteFiles(absolutePath)));
28
+ continue;
29
+ }
30
+ if (entry.isFile() && entry.name === ROUTE_FILE_NAME) {
31
+ files.push(absolutePath);
32
+ }
33
+ }
34
+ return files;
35
+ }
36
+ function hasExportModifier(node) {
37
+ if (!ts.canHaveModifiers(node)) {
38
+ return false;
39
+ }
40
+ return (ts.getModifiers(node)?.some((modifier) => modifier.kind === ts.SyntaxKind.ExportKeyword) ?? false);
41
+ }
42
+ function collectBindingNames(name, names = []) {
43
+ if (ts.isIdentifier(name)) {
44
+ names.push(name.text);
45
+ return names;
46
+ }
47
+ if (ts.isObjectBindingPattern(name) || ts.isArrayBindingPattern(name)) {
48
+ for (const element of name.elements) {
49
+ if (ts.isBindingElement(element)) {
50
+ collectBindingNames(element.name, names);
51
+ }
52
+ }
53
+ }
54
+ return names;
55
+ }
56
+ function collectNamedExports(exportClause) {
57
+ if (!exportClause || !ts.isNamedExports(exportClause)) {
58
+ return [];
59
+ }
60
+ return exportClause.elements.map((element) => element.name.text);
61
+ }
62
+ function collectInvalidExports(sourceFile) {
63
+ const invalid = [];
64
+ for (const statement of sourceFile.statements) {
65
+ if (ts.isFunctionDeclaration(statement) && hasExportModifier(statement)) {
66
+ const exportName = statement.name?.text ?? "(anonymous)";
67
+ if (!ALLOWED_ROUTE_EXPORTS.has(exportName)) {
68
+ invalid.push(exportName);
69
+ }
70
+ continue;
71
+ }
72
+ if (ts.isVariableStatement(statement) && hasExportModifier(statement)) {
73
+ for (const declaration of statement.declarationList.declarations) {
74
+ for (const exportName of collectBindingNames(declaration.name)) {
75
+ if (!ALLOWED_ROUTE_EXPORTS.has(exportName)) {
76
+ invalid.push(exportName);
77
+ }
78
+ }
79
+ }
80
+ continue;
81
+ }
82
+ if (ts.isExportDeclaration(statement)) {
83
+ for (const exportName of collectNamedExports(statement.exportClause)) {
84
+ if (!ALLOWED_ROUTE_EXPORTS.has(exportName)) {
85
+ invalid.push(exportName);
86
+ }
87
+ }
88
+ continue;
89
+ }
90
+ if ((ts.isInterfaceDeclaration(statement) ||
91
+ ts.isTypeAliasDeclaration(statement) ||
92
+ ts.isClassDeclaration(statement) ||
93
+ ts.isEnumDeclaration(statement)) &&
94
+ hasExportModifier(statement)) {
95
+ invalid.push(statement.name?.text ?? "(anonymous)");
96
+ continue;
97
+ }
98
+ if (hasExportModifier(statement)) {
99
+ invalid.push(statement.getText(sourceFile).split("\n", 1)[0]?.trim() ||
100
+ "(unsupported export)");
101
+ }
102
+ }
103
+ return [...new Set(invalid)].sort((left, right) => left.localeCompare(right));
104
+ }
105
+ export async function scanAppRouterRouteExports(projectRoot) {
106
+ const appRoot = join(projectRoot, "src", "app");
107
+ try {
108
+ const routeFiles = await walkRouteFiles(appRoot);
109
+ const violations = [];
110
+ for (const routeFile of routeFiles) {
111
+ const contents = await readFile(routeFile, "utf8");
112
+ const sourceFile = ts.createSourceFile(routeFile, contents, ts.ScriptTarget.Latest, true, ts.ScriptKind.TS);
113
+ const invalidExports = collectInvalidExports(sourceFile);
114
+ if (invalidExports.length > 0) {
115
+ violations.push({
116
+ routeFile: relative(projectRoot, routeFile).replace(/\\/g, "/"),
117
+ invalidExports,
118
+ });
119
+ }
120
+ }
121
+ return violations.sort((left, right) => left.routeFile.localeCompare(right.routeFile));
122
+ }
123
+ catch {
124
+ return [];
125
+ }
126
+ }
127
+ //# sourceMappingURL=next-route-exports.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-route-exports.js","sourceRoot":"","sources":["../../src/lib/next-route-exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,MAAM,YAAY,CAAC;AAE5B,MAAM,eAAe,GAAG,UAAU,CAAC;AAEnC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,KAAK;IACL,MAAM;IACN,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,SAAS;IACT,eAAe;IACf,YAAY;IAC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,0 +1,2 @@
1
+ export declare function getNpmExecutable(platform?: NodeJS.Platform): string;
2
+ //# sourceMappingURL=npm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm.d.ts","sourceRoot":"","sources":["../../src/lib/npm.ts"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,QAAQ,GAAE,MAAM,CAAC,QAA2B,GAAG,MAAM,CAErF"}
@@ -0,0 +1,4 @@
1
+ export function getNpmExecutable(platform = process.platform) {
2
+ return platform === 'win32' ? 'npm.cmd' : 'npm';
3
+ }
4
+ //# sourceMappingURL=npm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm.js","sourceRoot":"","sources":["../../src/lib/npm.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,gBAAgB,CAAC,WAA4B,OAAO,CAAC,QAAQ;IAC3E,OAAO,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AAClD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { ObjectTypeDefinition, ObjectTypeProperty } from './config.js';
2
+ export declare function validateObjectTypePropertyDefaultValue(property: ObjectTypeProperty): string[];
3
+ export declare function validateObjectTypeDefaultValues(type: ObjectTypeDefinition): string[];
4
+ //# sourceMappingURL=object-type-defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-type-defaults.d.ts","sourceRoot":"","sources":["../../src/lib/object-type-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AA8B5E,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,kBAAkB,GAAG,MAAM,EAAE,CA+C7F;AAED,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAEpF"}
@@ -0,0 +1,72 @@
1
+ const STRING_DEFAULT_PROPERTY_TYPES = new Set(['text', 'date', 'file', 'relationship']);
2
+ function hasDefaultValue(property) {
3
+ return Object.prototype.hasOwnProperty.call(property, 'defaultValue')
4
+ && property.defaultValue !== undefined;
5
+ }
6
+ function describeValueType(value) {
7
+ if (value === null)
8
+ return 'null';
9
+ if (Array.isArray(value))
10
+ return 'array';
11
+ return typeof value;
12
+ }
13
+ function isFiniteNumber(value) {
14
+ return typeof value === 'number' && Number.isFinite(value);
15
+ }
16
+ function isJsonValue(value) {
17
+ if (value === null)
18
+ return true;
19
+ if (typeof value === 'string' || typeof value === 'boolean')
20
+ return true;
21
+ if (isFiniteNumber(value))
22
+ return true;
23
+ if (Array.isArray(value))
24
+ return value.every(isJsonValue);
25
+ if (typeof value === 'object') {
26
+ return Object.values(value).every(isJsonValue);
27
+ }
28
+ return false;
29
+ }
30
+ export function validateObjectTypePropertyDefaultValue(property) {
31
+ if (!hasDefaultValue(property) || property.defaultValue === null) {
32
+ return [];
33
+ }
34
+ const defaultValue = property.defaultValue;
35
+ if (STRING_DEFAULT_PROPERTY_TYPES.has(property.type)) {
36
+ return typeof defaultValue === 'string'
37
+ ? []
38
+ : [`property "${property.name}" defaultValue must be a string for ${property.type} properties; got ${describeValueType(defaultValue)}`];
39
+ }
40
+ if (property.type === 'select') {
41
+ if (typeof defaultValue !== 'string') {
42
+ return [`property "${property.name}" defaultValue must be a string for select properties; got ${describeValueType(defaultValue)}`];
43
+ }
44
+ const optionValues = property.options?.map((option) => option.value) ?? [];
45
+ if (optionValues.length === 0) {
46
+ return [`property "${property.name}" defaultValue cannot be validated because the select property has no options`];
47
+ }
48
+ return optionValues.includes(defaultValue)
49
+ ? []
50
+ : [`property "${property.name}" defaultValue "${defaultValue}" must match one of the select option values: ${optionValues.join(', ')}`];
51
+ }
52
+ if (property.type === 'number') {
53
+ return isFiniteNumber(defaultValue)
54
+ ? []
55
+ : [`property "${property.name}" defaultValue must be a finite number; got ${describeValueType(defaultValue)}`];
56
+ }
57
+ if (property.type === 'boolean') {
58
+ return typeof defaultValue === 'boolean'
59
+ ? []
60
+ : [`property "${property.name}" defaultValue must be a boolean; got ${describeValueType(defaultValue)}`];
61
+ }
62
+ if (property.type === 'json') {
63
+ return isJsonValue(defaultValue)
64
+ ? []
65
+ : [`property "${property.name}" defaultValue must be JSON serializable; got ${describeValueType(defaultValue)}`];
66
+ }
67
+ return [];
68
+ }
69
+ export function validateObjectTypeDefaultValues(type) {
70
+ return type.properties.flatMap(validateObjectTypePropertyDefaultValue);
71
+ }
72
+ //# sourceMappingURL=object-type-defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"object-type-defaults.js","sourceRoot":"","sources":["../../src/lib/object-type-defaults.ts"],"names":[],"mappings":"AAEA,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;AAExF,SAAS,eAAe,CAAC,QAA4B;IACnD,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,CAAC;WAChE,QAAQ,CAAC,YAAY,KAAK,SAAS,CAAC;AAC3C,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAc;IACvC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAC;IAClC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC;IACzC,OAAO,OAAO,KAAK,CAAC;AACtB,CAAC;AAED,SAAS,cAAc,CAAC,KAAc;IACpC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzE,IAAI,cAAc,CAAC,KAAK,CAAC;QAAE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AQ,CAAC,IAAI,+EAA+E,CAAC,CAAC;QACrH,CAAC;QAED,OAAO,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC;YACxC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,aAAa,QAAQ,CAAC,IAAI,mBAAmB,YAAY,iDAAiD,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5I,CAAC;IAED,IAAI,QAAQ,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,cAAc,CAAC,YAAY,CAAC;YACjC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,aAAa,QAAQ,CAAC,IAAI,+CAA+C,iBAAiB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACnH,CAAC;IAED,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,OAAO,YAAY,KAAK,SAAS;YACtC,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,aAAa,QAAQ,CAAC,IAAI,yCAAyC,iBAAiB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC7G,CAAC;IAED,IAAI,QAAQ,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAC,YAAY,CAAC;YAC9B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,CAAC,aAAa,QAAQ,CAAC,IAAI,iDAAiD,iBAAiB,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IACrH,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,+BAA+B,CAAC,IAA0B;IACxE,OAAO,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,sCAAsC,CAAC,CAAC;AACzE,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Shared output utilities — consistent formatting across all CLI commands.
3
+ */
4
+ export declare function setSimpleMode(enabled: boolean): void;
5
+ export declare function isSimpleMode(): boolean;
6
+ export declare function redactSensitiveText(msg: string): string;
7
+ /**
8
+ * Recursively redact secrets from an arbitrary JSON-like value: string leaves
9
+ * pass through redactSensitiveText, and values under sensitive keys are masked.
10
+ * Used to harden diagnostics from upstream services before they are emitted.
11
+ */
12
+ export declare function redactSensitiveDeep<T>(value: T): T;
13
+ export declare const symbols: {
14
+ readonly success: string;
15
+ readonly error: string;
16
+ readonly warning: string;
17
+ readonly info: string;
18
+ readonly pending: string;
19
+ readonly updated: string;
20
+ readonly unchanged: string;
21
+ readonly added: string;
22
+ readonly removed: string;
23
+ readonly changed: string;
24
+ };
25
+ export declare function success(msg: string): void;
26
+ export declare function error(msg: string): void;
27
+ export declare function warn(msg: string): void;
28
+ export declare function info(msg: string): void;
29
+ export declare function heading(msg: string): void;
30
+ export declare function dim(msg: string): void;
31
+ export declare function table(rows: Array<[string, string]>): void;
32
+ export declare function blank(): void;
33
+ export declare function json(data: unknown): void;
34
+ export declare function formatOutput(data: unknown, format: 'text' | 'json' | 'yaml'): void;
35
+ //# sourceMappingURL=output.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../src/lib/output.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuBH,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAEpD;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC;AAaD,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAMvD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAelD;AAaD,eAAO,MAAM,OAAO;;;;;;;;;;;CAWV,CAAC;AAEX,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOzC;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOvC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOtC;AAED,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOtC;AAED,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOzC;AAED,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAOrC;AAED,wBAAgB,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI,CAWzD;AAED,wBAAgB,KAAK,IAAI,IAAI,CAE5B;AAED,wBAAgB,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAExC;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAQlF"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Shared output utilities — consistent formatting across all CLI commands.
3
+ */
4
+ import chalk from 'chalk';
5
+ // TTY and color detection
6
+ function shouldUseColor() {
7
+ // Check NO_COLOR environment variable
8
+ if (process.env.NO_COLOR) {
9
+ return false;
10
+ }
11
+ // Check FORCE_COLOR environment variable
12
+ if (process.env.FORCE_COLOR) {
13
+ return true;
14
+ }
15
+ // Check if stdout is a TTY
16
+ return process.stdout.isTTY ?? false;
17
+ }
18
+ // Simple mode detection (will be set by global flag)
19
+ let simpleMode = false;
20
+ export function setSimpleMode(enabled) {
21
+ simpleMode = enabled;
22
+ }
23
+ export function isSimpleMode() {
24
+ return simpleMode;
25
+ }
26
+ const useColor = shouldUseColor();
27
+ const SENSITIVE_ASSIGNMENT_PATTERN = /((?:["']?[\w.-]*(?:token|secret|password|passwd|pwd|api[_-]?key|cookie|credential|client[_-]?secret|access[_-]?token|refresh[_-]?token|id[_-]?token)[\w.-]*["']?\s*[:=]\s*["']?))([^"',\s}]+)/gi;
28
+ const SENSITIVE_KEY_PATTERN = /(?:token|secret|password|passwd|pwd|api[_-]?key|authorization|cookie|credential|client[_-]?secret|access[_-]?token|refresh[_-]?token|id[_-]?token)/i;
29
+ const AUTH_HEADER_PATTERN = /\b(Bearer|Basic)\s+[A-Za-z0-9._~+/=-]{8,}/gi;
30
+ const JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g;
31
+ // Strips userinfo credentials from connection URIs, e.g. mongodb://user:pass@host.
32
+ const URI_CREDENTIAL_PATTERN = /\b([a-z][a-z0-9+.-]*:\/\/)[^:@\s/]+:[^@\s/]+@/gi;
33
+ export function redactSensitiveText(msg) {
34
+ return msg
35
+ .replace(AUTH_HEADER_PATTERN, '$1 [redacted]')
36
+ .replace(JWT_PATTERN, '[redacted-jwt]')
37
+ .replace(URI_CREDENTIAL_PATTERN, '$1[redacted]@')
38
+ .replace(SENSITIVE_ASSIGNMENT_PATTERN, '$1[redacted]');
39
+ }
40
+ /**
41
+ * Recursively redact secrets from an arbitrary JSON-like value: string leaves
42
+ * pass through redactSensitiveText, and values under sensitive keys are masked.
43
+ * Used to harden diagnostics from upstream services before they are emitted.
44
+ */
45
+ export function redactSensitiveDeep(value) {
46
+ if (typeof value === 'string') {
47
+ return redactSensitiveText(value);
48
+ }
49
+ if (Array.isArray(value)) {
50
+ return value.map((item) => redactSensitiveDeep(item));
51
+ }
52
+ if (value && typeof value === 'object') {
53
+ const out = {};
54
+ for (const [key, item] of Object.entries(value)) {
55
+ out[key] = SENSITIVE_KEY_PATTERN.test(key) ? '[redacted]' : redactSensitiveDeep(item);
56
+ }
57
+ return out;
58
+ }
59
+ return value;
60
+ }
61
+ function redactingJsonReplacer(key, value) {
62
+ if (key && SENSITIVE_KEY_PATTERN.test(key)) {
63
+ return '[redacted]';
64
+ }
65
+ if (typeof value === 'string') {
66
+ return redactSensitiveText(value);
67
+ }
68
+ return value;
69
+ }
70
+ export const symbols = {
71
+ success: useColor ? chalk.green('✓') : '✓',
72
+ error: useColor ? chalk.red('✗') : '✗',
73
+ warning: useColor ? chalk.yellow('⚠') : '⚠',
74
+ info: useColor ? chalk.blue('→') : '→',
75
+ pending: useColor ? chalk.gray('○') : '○',
76
+ updated: useColor ? chalk.cyan('↻') : '↻',
77
+ unchanged: useColor ? chalk.gray('=') : '=',
78
+ added: useColor ? chalk.green('+') : '+',
79
+ removed: useColor ? chalk.red('-') : '-',
80
+ changed: useColor ? chalk.yellow('~') : '~',
81
+ };
82
+ export function success(msg) {
83
+ const safeMsg = redactSensitiveText(msg);
84
+ if (simpleMode) {
85
+ console.log(`SUCCESS: ${safeMsg}`);
86
+ }
87
+ else {
88
+ console.log(`${symbols.success} ${safeMsg}`);
89
+ }
90
+ }
91
+ export function error(msg) {
92
+ const safeMsg = redactSensitiveText(msg);
93
+ if (simpleMode) {
94
+ console.error(`ERROR: ${safeMsg}`);
95
+ }
96
+ else {
97
+ console.error(`${symbols.error} ${safeMsg}`);
98
+ }
99
+ }
100
+ export function warn(msg) {
101
+ const safeMsg = redactSensitiveText(msg);
102
+ if (simpleMode) {
103
+ console.warn(`WARNING: ${safeMsg}`);
104
+ }
105
+ else {
106
+ console.warn(`${symbols.warning} ${safeMsg}`);
107
+ }
108
+ }
109
+ export function info(msg) {
110
+ const safeMsg = redactSensitiveText(msg);
111
+ if (simpleMode) {
112
+ console.log(`-> ${safeMsg}`);
113
+ }
114
+ else {
115
+ console.log(`${symbols.info} ${chalk.dim(safeMsg)}`);
116
+ }
117
+ }
118
+ export function heading(msg) {
119
+ const safeMsg = redactSensitiveText(msg);
120
+ if (useColor && !simpleMode) {
121
+ console.log(chalk.bold(safeMsg));
122
+ }
123
+ else {
124
+ console.log(safeMsg);
125
+ }
126
+ }
127
+ export function dim(msg) {
128
+ const safeMsg = redactSensitiveText(msg);
129
+ if (useColor && !simpleMode) {
130
+ console.log(chalk.dim(safeMsg));
131
+ }
132
+ else {
133
+ console.log(safeMsg);
134
+ }
135
+ }
136
+ export function table(rows) {
137
+ const maxLabel = Math.max(...rows.map(([label]) => label.length));
138
+ for (const [label, value] of rows) {
139
+ const paddedLabel = redactSensitiveText(label.padEnd(maxLabel));
140
+ const safeValue = redactSensitiveText(value);
141
+ if (useColor && !simpleMode) {
142
+ console.log(` ${chalk.dim(paddedLabel)} ${safeValue}`);
143
+ }
144
+ else {
145
+ console.log(` ${paddedLabel} ${safeValue}`);
146
+ }
147
+ }
148
+ }
149
+ export function blank() {
150
+ console.log('');
151
+ }
152
+ export function json(data) {
153
+ process.stdout.write(`${JSON.stringify(data, redactingJsonReplacer, 2)}\n`);
154
+ }
155
+ export function formatOutput(data, format) {
156
+ if (format === 'json') {
157
+ json(data);
158
+ }
159
+ else if (format === 'yaml') {
160
+ throw new Error('YAML format not yet supported. Use --format json or --format text');
161
+ }
162
+ else {
163
+ throw new Error('formatOutput with text format should not be called - caller handles text formatting');
164
+ }
165
+ }
166
+ //# sourceMappingURL=output.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"output.js","sourceRoot":"","sources":["../../src/lib/output.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,0BAA0B;AAC1B,SAAS,cAAc;IACrB,sCAAsC;IACtC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IACzC,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,2BAA2B;IAC3B,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,IAAI,KAAK,CAAC;AACvC,CAAC;AAED,qDAAqD;AACrD,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,UAAU,GAAG,OAAO,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,QAAQ,G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SAAS,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;QAC7C,IAAI,QAAQ,IAAI,CAAC,UAAU,EAAE,CAAC;YAC5B,OAAO,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC;QAC3D,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,KAAK,WAAW,KAAK,SAAS,EAAE,CAAC,CAAC;QAChD,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,UAAU,KAAK;IACnB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,IAAa;IAChC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;AAC9E,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,MAAgC;IAC1E,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,CAAC;SAAM,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QAC7B,MAAM,IAAI,KAAK,CAAC,mEAAmE,CAAC,CAAC;IACvF,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,qFAAqF,CAAC,CAAC;IACzG,CAAC;AACH,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Profile management for private environment switching.
3
+ *
4
+ * Default profile ("default") uses public production behavior. Named profiles
5
+ * are intentionally undocumented in public docs and are only for private
6
+ * organization-managed setups.
7
+ *
8
+ * Module-level state pattern (same as setSimpleMode in output.ts)
9
+ * avoids threading profile through 20+ command action handlers.
10
+ */
11
+ export interface ProfileConfig {
12
+ readonly publicApiUrl: string;
13
+ readonly authTenantName: string;
14
+ readonly authTenantId: string;
15
+ readonly authClientId: string;
16
+ readonly authScope?: string;
17
+ }
18
+ export declare function setActiveProfile(name: string): void;
19
+ export declare function getActiveProfile(): string;
20
+ export declare function getConfigFilePath(): string;
21
+ /**
22
+ * Token file path for a given profile.
23
+ *
24
+ * "default" → ~/.eai/tokens.json (unchanged from legacy behavior)
25
+ * other → ~/.eai/tokens/{name}.json
26
+ */
27
+ export declare function getProfileTokensFile(name: string): string;
28
+ /**
29
+ * Load config for a named profile from the local CLI profile settings file.
30
+ *
31
+ * Returns null for the "default" profile (no config needed).
32
+ * Throws if the config file or requested profile is missing.
33
+ */
34
+ export declare function loadProfileConfig(name: string): Promise<ProfileConfig | null>;
35
+ /**
36
+ * Save or update a local profile.
37
+ * Creates the file and directory if they don't exist.
38
+ */
39
+ export declare function saveProfileConfig(name: string, config: ProfileConfig): Promise<void>;
40
+ /** Default OAuth scope when none is configured. */
41
+ export declare const DEFAULT_AUTH_SCOPE = "openid profile email offline_access";
42
+ /** Public production CIAM tenant name for the default profile. */
43
+ export declare const DEFAULT_PROD_AUTH_TENANT_NAME = "enterpriseaiplatform";
44
+ /** Public production CIAM tenant ID for the default profile. */
45
+ export declare const DEFAULT_PROD_AUTH_TENANT_ID = "f3035369-5c1a-45f7-8ca5-5cb0ad291d26";
46
+ /** Public production CLI client ID for the default profile. */
47
+ export declare const DEFAULT_PROD_AUTH_CLIENT_ID = "d704bde5-fe36-44ff-9a26-221d53772dd0";
48
+ /** Production PublicAPI delegated scope required for default-profile API calls. */
49
+ export declare const PROD_PUBLIC_API_SCOPE = "api://833fc5ab-f1c9-4c60-b344-64e366f241cc/access_token";
50
+ /** Default-profile OAuth scope for production CIAM login. */
51
+ export declare const DEFAULT_PROD_AUTH_SCOPE = "openid profile email offline_access api://833fc5ab-f1c9-4c60-b344-64e366f241cc/access_token";
52
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/lib/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAUD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEnD;AAED,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAQD,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD;AAID;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAgCnF;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAyB1F;AAED,mDAAmD;AACnD,eAAO,MAAM,kBAAkB,wCAAwC,CAAC;AAExE,kEAAkE;AAClE,eAAO,MAAM,6BAA6B,yBAAyB,CAAC;AAEpE,gEAAgE;AAChE,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAElF,+DAA+D;AAC/D,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAElF,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,4DAA4D,CAAC;AAE/F,6DAA6D;AAC7D,eAAO,MAAM,uBAAuB,gGAAmD,CAAC"}
@@ -0,0 +1,116 @@
1
+ /**
2
+ * Profile management for private environment switching.
3
+ *
4
+ * Default profile ("default") uses public production behavior. Named profiles
5
+ * are intentionally undocumented in public docs and are only for private
6
+ * organization-managed setups.
7
+ *
8
+ * Module-level state pattern (same as setSimpleMode in output.ts)
9
+ * avoids threading profile through 20+ command action handlers.
10
+ */
11
+ import { readFile, writeFile, mkdir } from 'node:fs/promises';
12
+ import { join } from 'node:path';
13
+ import { homedir } from 'node:os';
14
+ // ── Module-level state ───────────────────────────────────────────────────────
15
+ let _activeProfileName = 'default';
16
+ export function setActiveProfile(name) {
17
+ _activeProfileName = name;
18
+ }
19
+ export function getActiveProfile() {
20
+ return _activeProfileName;
21
+ }
22
+ // ── Paths ────────────────────────────────────────────────────────────────────
23
+ function getEaiDir() {
24
+ return join(homedir(), '.eai');
25
+ }
26
+ export function getConfigFilePath() {
27
+ return join(getEaiDir(), 'config.json');
28
+ }
29
+ /**
30
+ * Token file path for a given profile.
31
+ *
32
+ * "default" → ~/.eai/tokens.json (unchanged from legacy behavior)
33
+ * other → ~/.eai/tokens/{name}.json
34
+ */
35
+ export function getProfileTokensFile(name) {
36
+ if (name === 'default') {
37
+ return join(getEaiDir(), 'tokens.json');
38
+ }
39
+ return join(getEaiDir(), 'tokens', `${name}.json`);
40
+ }
41
+ // ── Config loading ───────────────────────────────────────────────────────────
42
+ /**
43
+ * Load config for a named profile from the local CLI profile settings file.
44
+ *
45
+ * Returns null for the "default" profile (no config needed).
46
+ * Throws if the config file or requested profile is missing.
47
+ */
48
+ export async function loadProfileConfig(name) {
49
+ if (name === 'default')
50
+ return null;
51
+ const configPath = getConfigFilePath();
52
+ let raw;
53
+ try {
54
+ raw = await readFile(configPath, 'utf-8');
55
+ }
56
+ catch {
57
+ throw new Error(`Profile "${name}" requires local profile settings but they are not configured.`);
58
+ }
59
+ let file;
60
+ try {
61
+ file = JSON.parse(raw);
62
+ }
63
+ catch {
64
+ throw new Error('Local profile settings contain invalid JSON.');
65
+ }
66
+ const config = file.profiles?.[name];
67
+ if (!config) {
68
+ const available = Object.keys(file.profiles ?? {});
69
+ throw new Error(`Profile "${name}" is not configured locally.\n` +
70
+ (available.length > 0
71
+ ? `Available profiles: ${available.join(', ')}`
72
+ : `No profiles are configured.`));
73
+ }
74
+ return config;
75
+ }
76
+ /**
77
+ * Save or update a local profile.
78
+ * Creates the file and directory if they don't exist.
79
+ */
80
+ export async function saveProfileConfig(name, config) {
81
+ const dir = getEaiDir();
82
+ await mkdir(dir, { recursive: true });
83
+ const configPath = getConfigFilePath();
84
+ let file = { profiles: {} };
85
+ try {
86
+ const raw = await readFile(configPath, 'utf-8');
87
+ file = JSON.parse(raw);
88
+ }
89
+ catch {
90
+ // File doesn't exist or is invalid — start fresh
91
+ }
92
+ file = {
93
+ ...file,
94
+ profiles: {
95
+ ...file.profiles,
96
+ [name]: config,
97
+ },
98
+ };
99
+ await writeFile(configPath, JSON.stringify(file, null, 2) + '\n', {
100
+ encoding: 'utf-8',
101
+ mode: 0o600,
102
+ });
103
+ }
104
+ /** Default OAuth scope when none is configured. */
105
+ export const DEFAULT_AUTH_SCOPE = 'openid profile email offline_access';
106
+ /** Public production CIAM tenant name for the default profile. */
107
+ export const DEFAULT_PROD_AUTH_TENANT_NAME = 'enterpriseaiplatform';
108
+ /** Public production CIAM tenant ID for the default profile. */
109
+ export const DEFAULT_PROD_AUTH_TENANT_ID = 'f3035369-5c1a-45f7-8ca5-5cb0ad291d26';
110
+ /** Public production CLI client ID for the default profile. */
111
+ export const DEFAULT_PROD_AUTH_CLIENT_ID = 'd704bde5-fe36-44ff-9a26-221d53772dd0';
112
+ /** Production PublicAPI delegated scope required for default-profile API calls. */
113
+ export const PROD_PUBLIC_API_SCOPE = 'api://833fc5ab-f1c9-4c60-b344-64e366f241cc/access_token';
114
+ /** Default-profile OAuth scope for production CIAM login. */
115
+ export const DEFAULT_PROD_AUTH_SCOPE = `${DEFAULT_AUTH_SCOPE} ${PROD_PUBLIC_API_SCOPE}`;
116
+ //# sourceMappingURL=profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/lib/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,QAAQ,EAAE,S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