@tdk-landscape/tdk-cli-core 1.3.45 → 1.3.48

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 (431) hide show
  1. package/.github/workflows/release-binaries.yml +54 -0
  2. package/.pre-commit-config.yaml +57 -0
  3. package/Makefile +92 -0
  4. package/bun.lock +538 -0
  5. package/cli/AGENTS.md +390 -0
  6. package/cli/DESIGN.md +735 -0
  7. package/cli/biome.json +44 -0
  8. package/cli/dependency-graph.svg +1135 -0
  9. package/cli/knip.json +6 -0
  10. package/cli/package.json +77 -0
  11. package/cli/pnpm-lock.yaml +2305 -0
  12. package/cli/pnpm-workspace.yaml +2 -0
  13. package/cli/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +23 -0
  14. package/cli/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +464 -0
  15. package/cli/shared-platform-engineering/docker-templates/install-deps.sh +152 -0
  16. package/cli/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +12 -0
  17. package/cli/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +56 -0
  18. package/{dist/cli.js → cli/src/cli.ts} +21 -13
  19. package/cli/src/commands/__tests__/always-enabled-infra.test.ts +115 -0
  20. package/cli/src/commands/__tests__/config.test.ts +146 -0
  21. package/cli/src/commands/__tests__/doctor.test.ts +557 -0
  22. package/cli/src/commands/__tests__/error-handling.test.ts +78 -0
  23. package/cli/src/commands/__tests__/phases-model.test.ts +163 -0
  24. package/cli/src/commands/__tests__/project-resource-features-e2e.test.ts +207 -0
  25. package/cli/src/commands/__tests__/project.test.ts +68 -0
  26. package/cli/src/commands/__tests__/resource.test.ts +226 -0
  27. package/cli/src/commands/__tests__/saas-starter-integration.test.ts +196 -0
  28. package/cli/src/commands/__tests__/stack-features-e2e.test.ts +129 -0
  29. package/cli/src/commands/__tests__/upgrade.test.ts +101 -0
  30. package/{dist/commands/completion.js → cli/src/commands/completion.ts} +78 -72
  31. package/cli/src/commands/config.ts +299 -0
  32. package/cli/src/commands/doctor.ts +790 -0
  33. package/cli/src/commands/down.ts +37 -0
  34. package/cli/src/commands/help.ts +150 -0
  35. package/cli/src/commands/networks-design.md +80 -0
  36. package/cli/src/commands/networks.ts +332 -0
  37. package/cli/src/commands/project.ts +439 -0
  38. package/cli/src/commands/projects.ts +82 -0
  39. package/cli/src/commands/resource.ts +652 -0
  40. package/cli/src/commands/resources.ts +95 -0
  41. package/cli/src/commands/stack.ts +128 -0
  42. package/cli/src/commands/stacks.ts +52 -0
  43. package/cli/src/commands/status.ts +88 -0
  44. package/cli/src/commands/ui.tsx +843 -0
  45. package/cli/src/commands/up.ts +150 -0
  46. package/cli/src/commands/upgrade.ts +570 -0
  47. package/{dist/commands/version.js → cli/src/commands/version.ts} +5 -5
  48. package/cli/src/components/Accessible.tsx +21 -0
  49. package/cli/src/components/BaseTooltip.tsx +66 -0
  50. package/cli/src/components/DetailPanel.tsx +146 -0
  51. package/cli/src/components/FileTree.tsx +89 -0
  52. package/cli/src/components/ResourceSelectInput.tsx +30 -0
  53. package/cli/src/components/ResourceTable.tsx +78 -0
  54. package/cli/src/components/TabBar.tsx +53 -0
  55. package/cli/src/components/Tooltip.tsx +11 -0
  56. package/{dist/components/index.js → cli/src/components/index.ts} +0 -1
  57. package/cli/src/config/platform-standards.test.ts +11 -0
  58. package/cli/src/config/platform-standards.ts +196 -0
  59. package/cli/src/generator/__tests__/extension-fetch.test.ts +220 -0
  60. package/cli/src/generator/__tests__/template-engine.test.ts +70 -0
  61. package/cli/src/generator/extension-fetch.ts +279 -0
  62. package/cli/src/generator/template-engine.ts +754 -0
  63. package/cli/src/index.ts +86 -0
  64. package/cli/src/templates.d.ts +4 -0
  65. package/cli/src/types/index.ts +351 -0
  66. package/cli/src/utils/__tests__/cache.test.ts +98 -0
  67. package/cli/src/utils/__tests__/formatting.test.ts +170 -0
  68. package/cli/src/utils/__tests__/paths.test.ts +180 -0
  69. package/cli/src/utils/__tests__/port-assignment.test.ts +121 -0
  70. package/cli/src/utils/__tests__/service-urls.test.ts +174 -0
  71. package/cli/src/utils/__tests__/services.test.ts +531 -0
  72. package/cli/src/utils/__tests__/tilt.test.ts +143 -0
  73. package/cli/src/utils/__tests__/validation.test.ts +148 -0
  74. package/cli/src/utils/cache.ts +76 -0
  75. package/cli/src/utils/command-helpers.ts +54 -0
  76. package/cli/src/utils/constants.ts +126 -0
  77. package/cli/src/utils/discovery-context.ts +49 -0
  78. package/cli/src/utils/docker.ts +20 -0
  79. package/cli/src/utils/doctor-runtime.ts +604 -0
  80. package/cli/src/utils/env-validator.ts +139 -0
  81. package/cli/src/utils/errors.ts +168 -0
  82. package/cli/src/utils/file-helpers.ts +62 -0
  83. package/cli/src/utils/formatting.ts +215 -0
  84. package/cli/src/utils/paths.ts +53 -0
  85. package/cli/src/utils/port-assignment.ts +106 -0
  86. package/cli/src/utils/project-features.ts +118 -0
  87. package/cli/src/utils/project-templates.ts +28 -0
  88. package/cli/src/utils/prompt.ts +123 -0
  89. package/cli/src/utils/resource-features.ts +209 -0
  90. package/cli/src/utils/service-urls.ts +124 -0
  91. package/cli/src/utils/services.ts +363 -0
  92. package/cli/src/utils/stack-features.ts +30 -0
  93. package/cli/src/utils/tar.ts +24 -0
  94. package/cli/src/utils/tilt.ts +113 -0
  95. package/cli/src/utils/validation.ts +67 -0
  96. package/{templates → cli/templates}/Tiltfile.hbs +1 -1
  97. package/cli/tsconfig.json +25 -0
  98. package/cli/tsconfig.typecheck.json +8 -0
  99. package/docs/FEATURES.md +279 -0
  100. package/engine/topologies/platform/docker/dockerfile/dockerfile.star +3 -3
  101. package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +1 -1
  102. package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +0 -3
  103. package/engine/topologies/platform/docker/layers/l3_builder_layers.star +1 -1
  104. package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +1 -1
  105. package/engine/topologies/platform/docker/secrets/infisical.star +19 -47
  106. package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +1 -1
  107. package/install.sh +242 -0
  108. package/knip.json +10 -0
  109. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/.openspec.yaml +2 -0
  110. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/design.md +102 -0
  111. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/proposal.md +31 -0
  112. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-notifications/spec.md +48 -0
  113. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-orchestration/spec.md +63 -0
  114. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/specs/vscode-tdk-troubleshooting/spec.md +56 -0
  115. package/openspec/changes/add-vscode-tdk-troubleshooter-plugin/tasks.md +61 -0
  116. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/.openspec.yaml +2 -0
  117. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/design.md +114 -0
  118. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/proposal.md +32 -0
  119. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/manifest-field-migration/spec.md +20 -0
  120. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/resource-terminology-standard/spec.md +20 -0
  121. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/specs/stack-terminology-standard/spec.md +20 -0
  122. package/openspec/changes/archive/2026-04-28-rename-domain-to-stack-service-to-resource/tasks.md +194 -0
  123. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/.openspec.yaml +2 -0
  124. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/design.md +111 -0
  125. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/proposal.md +33 -0
  126. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/function-naming-alignment/spec.md +12 -0
  127. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/optional-parameter-patterns/spec.md +18 -0
  128. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-documentation/spec.md +16 -0
  129. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-naming-consistency/spec.md +12 -0
  130. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/specs/parameter-ordering-standard/spec.md +12 -0
  131. package/openspec/changes/archive/2026-04-28-star-files-parameter-fixes/tasks.md +194 -0
  132. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/.openspec.yaml +2 -0
  133. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/codebase-audit-report.md +62 -0
  134. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/design.md +84 -0
  135. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/proposal.md +31 -0
  136. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/codebase-audit/spec.md +27 -0
  137. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/dead-code-cleanup/spec.md +27 -0
  138. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/test-gap-fill/spec.md +23 -0
  139. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/specs/todo-resolution/spec.md +27 -0
  140. package/openspec/changes/archive/2026-04-29-scan-repo-gaps-fix/tasks.md +39 -0
  141. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/.openspec.yaml +5 -0
  142. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/design.md +94 -0
  143. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/proposal.md +46 -0
  144. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/ai-slop-cleanup/CLEANUP_REPORT_8.md +174 -0
  145. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/ai-slop-cleanup/CRITICAL_ASSESSMENT_8.md +160 -0
  146. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/circular-deps/CRITICAL_ASSESSMENT_4.md +381 -0
  147. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/dead-code/CRITICAL_ASSESSMENT_3.md +316 -0
  148. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/deduplication/CRITICAL_ASSESSMENT_1.md +290 -0
  149. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/deduplication/IMPLEMENTATION_SUMMARY_1.md +233 -0
  150. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/defensive-cleanup/CRITICAL_ASSESSMENT_6.md +835 -0
  151. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/legacy-cleanup/CRITICAL_ASSESSMENT_7.md +254 -0
  152. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/legacy-cleanup/IMPLEMENTATION_SUMMARY_7.md +187 -0
  153. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/strong-typing/CRITICAL_ASSESSMENT_5.md +269 -0
  154. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/type-consolidation/CRITICAL_ASSESSMENT_2.md +312 -0
  155. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/specs/type-consolidation/IMPLEMENTATION_SUMMARY.md +170 -0
  156. package/openspec/changes/archive/2026-05-04-comprehensive-cleanup-final/tasks.md +137 -0
  157. package/openspec/changes/archive/2026-06-25-landscape-consolidation/.openspec.yaml +2 -0
  158. package/openspec/changes/archive/2026-06-25-landscape-consolidation/design.md +80 -0
  159. package/openspec/changes/archive/2026-06-25-landscape-consolidation/proposal.md +40 -0
  160. package/openspec/changes/archive/2026-06-25-landscape-consolidation/spec.md +52 -0
  161. package/openspec/changes/archive/2026-06-25-landscape-consolidation/tasks.md +51 -0
  162. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/.openspec.yaml +2 -0
  163. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/design.md +43 -0
  164. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/proposal.md +29 -0
  165. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/specs/self-contained-generated-projects/spec.md +67 -0
  166. package/openspec/changes/archive/2026-09-17-fix-generated-stack-boot/tasks.md +27 -0
  167. package/openspec/specs/manifest-field-migration/spec.md +24 -0
  168. package/openspec/specs/resource-terminology-standard/spec.md +24 -0
  169. package/openspec/specs/self-contained-generated-projects/spec.md +67 -0
  170. package/openspec/specs/stack-terminology-standard/spec.md +24 -0
  171. package/package.json +27 -64
  172. package/platform/services/platform/proxy/service.yaml +14 -0
  173. package/scripts/audit-codebase.sh +213 -0
  174. package/scripts/install-git-hooks.sh +14 -0
  175. package/scripts/release-binaries.sh +94 -0
  176. package/scripts/setup-pre-commit.sh +33 -0
  177. package/scripts/stage-npm-engine.sh +36 -0
  178. package/shared-platform-engineering/docker-templates/bun-hoisted-symlink-fix.sh +23 -0
  179. package/shared-platform-engineering/docker-templates/infisical-entrypoint.sh +464 -0
  180. package/shared-platform-engineering/docker-templates/install-deps.sh +152 -0
  181. package/shared-platform-engineering/docker-templates/prisma-bun-client-link-fix.sh +12 -0
  182. package/shared-platform-engineering/docker-templates/prisma-normalize-client.sh +56 -0
  183. package/tests/tilt-engine/__init__.py +5 -0
  184. package/tests/tilt-engine/conftest.py +182 -0
  185. package/tests/tilt-engine/fixtures/appointment-frontend-service.json +11 -0
  186. package/tests/tilt-engine/fixtures/identity-backend-service.json +12 -0
  187. package/tests/tilt-engine/fixtures/invalid-service.json +4 -0
  188. package/tests/tilt-engine/test_agents_md_generator.py +341 -0
  189. package/tests/tilt-engine/test_agents_md_integration.py +378 -0
  190. package/tests/tilt-engine/test_cache_operations.py +181 -0
  191. package/tests/tilt-engine/test_cache_persistence.py +142 -0
  192. package/tests/tilt-engine/test_code_executor.py +152 -0
  193. package/tests/tilt-engine/test_code_viewer.py +127 -0
  194. package/tests/tilt-engine/test_compose_port_anchors.py +310 -0
  195. package/tests/tilt-engine/test_config_inspector.py +162 -0
  196. package/tests/tilt-engine/test_daemon_focus_mode.py +89 -0
  197. package/tests/tilt-engine/test_daemon_polling.py +122 -0
  198. package/tests/tilt-engine/test_daemon_registration.py +115 -0
  199. package/tests/tilt-engine/test_daemon_validation.py +107 -0
  200. package/tests/tilt-engine/test_docker_generator_bugs.py +493 -0
  201. package/tests/tilt-engine/test_docker_prune.py +119 -0
  202. package/tests/tilt-engine/test_dockerignore_path_bug.py +82 -0
  203. package/tests/tilt-engine/test_file_browser.py +193 -0
  204. package/tests/tilt-engine/test_frontend_basepath_manifest.py +27 -0
  205. package/tests/tilt-engine/test_health_dependencies.py +130 -0
  206. package/tests/tilt-engine/test_health_endpoints.py +118 -0
  207. package/tests/tilt-engine/test_health_tilt_ui.py +85 -0
  208. package/tests/tilt-engine/test_safety_aliases.py +84 -0
  209. package/tests/tilt-engine/test_snapshot_diff.py +136 -0
  210. package/tests/tilt-engine/test_snapshot_persistence.py +163 -0
  211. package/tests/tilt-engine/test_snapshot_scanning.py +123 -0
  212. package/tests/tilt-engine/test_standalone_project_boot.py +61 -0
  213. package/tests/tilt-engine/test_standalone_traefik.py +108 -0
  214. package/dist/cli.d.ts +0 -3
  215. package/dist/cli.d.ts.map +0 -1
  216. package/dist/cli.js.map +0 -1
  217. package/dist/commands/completion.d.ts +0 -3
  218. package/dist/commands/completion.d.ts.map +0 -1
  219. package/dist/commands/completion.js.map +0 -1
  220. package/dist/commands/config.d.ts +0 -3
  221. package/dist/commands/config.d.ts.map +0 -1
  222. package/dist/commands/config.js +0 -231
  223. package/dist/commands/config.js.map +0 -1
  224. package/dist/commands/doctor.d.ts +0 -7
  225. package/dist/commands/doctor.d.ts.map +0 -1
  226. package/dist/commands/doctor.js +0 -597
  227. package/dist/commands/doctor.js.map +0 -1
  228. package/dist/commands/down.d.ts +0 -3
  229. package/dist/commands/down.d.ts.map +0 -1
  230. package/dist/commands/down.js +0 -32
  231. package/dist/commands/down.js.map +0 -1
  232. package/dist/commands/help.d.ts +0 -2
  233. package/dist/commands/help.d.ts.map +0 -1
  234. package/dist/commands/help.js +0 -130
  235. package/dist/commands/help.js.map +0 -1
  236. package/dist/commands/networks.d.ts +0 -3
  237. package/dist/commands/networks.d.ts.map +0 -1
  238. package/dist/commands/networks.js +0 -260
  239. package/dist/commands/networks.js.map +0 -1
  240. package/dist/commands/project.d.ts +0 -3
  241. package/dist/commands/project.d.ts.map +0 -1
  242. package/dist/commands/project.js +0 -373
  243. package/dist/commands/project.js.map +0 -1
  244. package/dist/commands/projects.d.ts +0 -3
  245. package/dist/commands/projects.d.ts.map +0 -1
  246. package/dist/commands/projects.js +0 -71
  247. package/dist/commands/projects.js.map +0 -1
  248. package/dist/commands/resource.d.ts +0 -69
  249. package/dist/commands/resource.d.ts.map +0 -1
  250. package/dist/commands/resource.js +0 -579
  251. package/dist/commands/resource.js.map +0 -1
  252. package/dist/commands/resources.d.ts +0 -3
  253. package/dist/commands/resources.d.ts.map +0 -1
  254. package/dist/commands/resources.js +0 -73
  255. package/dist/commands/resources.js.map +0 -1
  256. package/dist/commands/stack.d.ts +0 -3
  257. package/dist/commands/stack.d.ts.map +0 -1
  258. package/dist/commands/stack.js +0 -97
  259. package/dist/commands/stack.js.map +0 -1
  260. package/dist/commands/stacks.d.ts +0 -3
  261. package/dist/commands/stacks.d.ts.map +0 -1
  262. package/dist/commands/stacks.js +0 -43
  263. package/dist/commands/stacks.js.map +0 -1
  264. package/dist/commands/status.d.ts +0 -3
  265. package/dist/commands/status.d.ts.map +0 -1
  266. package/dist/commands/status.js +0 -71
  267. package/dist/commands/status.js.map +0 -1
  268. package/dist/commands/ui.d.ts +0 -3
  269. package/dist/commands/ui.d.ts.map +0 -1
  270. package/dist/commands/ui.js +0 -445
  271. package/dist/commands/ui.js.map +0 -1
  272. package/dist/commands/up.d.ts +0 -3
  273. package/dist/commands/up.d.ts.map +0 -1
  274. package/dist/commands/up.js +0 -110
  275. package/dist/commands/up.js.map +0 -1
  276. package/dist/commands/upgrade.d.ts +0 -11
  277. package/dist/commands/upgrade.d.ts.map +0 -1
  278. package/dist/commands/upgrade.js +0 -496
  279. package/dist/commands/upgrade.js.map +0 -1
  280. package/dist/commands/version.d.ts +0 -3
  281. package/dist/commands/version.d.ts.map +0 -1
  282. package/dist/commands/version.js.map +0 -1
  283. package/dist/components/Accessible.d.ts +0 -8
  284. package/dist/components/Accessible.d.ts.map +0 -1
  285. package/dist/components/Accessible.js +0 -10
  286. package/dist/components/Accessible.js.map +0 -1
  287. package/dist/components/BaseTooltip.d.ts +0 -4
  288. package/dist/components/BaseTooltip.d.ts.map +0 -1
  289. package/dist/components/BaseTooltip.js +0 -28
  290. package/dist/components/BaseTooltip.js.map +0 -1
  291. package/dist/components/DetailPanel.d.ts +0 -4
  292. package/dist/components/DetailPanel.d.ts.map +0 -1
  293. package/dist/components/DetailPanel.js +0 -18
  294. package/dist/components/DetailPanel.js.map +0 -1
  295. package/dist/components/FileTree.d.ts +0 -4
  296. package/dist/components/FileTree.d.ts.map +0 -1
  297. package/dist/components/FileTree.js +0 -47
  298. package/dist/components/FileTree.js.map +0 -1
  299. package/dist/components/ResourceSelectInput.d.ts +0 -4
  300. package/dist/components/ResourceSelectInput.d.ts.map +0 -1
  301. package/dist/components/ResourceSelectInput.js +0 -7
  302. package/dist/components/ResourceSelectInput.js.map +0 -1
  303. package/dist/components/ResourceTable.d.ts +0 -4
  304. package/dist/components/ResourceTable.d.ts.map +0 -1
  305. package/dist/components/ResourceTable.js +0 -18
  306. package/dist/components/ResourceTable.js.map +0 -1
  307. package/dist/components/TabBar.d.ts +0 -4
  308. package/dist/components/TabBar.d.ts.map +0 -1
  309. package/dist/components/TabBar.js +0 -17
  310. package/dist/components/TabBar.js.map +0 -1
  311. package/dist/components/Tooltip.d.ts +0 -12
  312. package/dist/components/Tooltip.d.ts.map +0 -1
  313. package/dist/components/Tooltip.js +0 -12
  314. package/dist/components/Tooltip.js.map +0 -1
  315. package/dist/components/index.d.ts +0 -8
  316. package/dist/components/index.d.ts.map +0 -1
  317. package/dist/components/index.js.map +0 -1
  318. package/dist/config/platform-standards.d.ts +0 -159
  319. package/dist/config/platform-standards.d.ts.map +0 -1
  320. package/dist/config/platform-standards.js +0 -181
  321. package/dist/config/platform-standards.js.map +0 -1
  322. package/dist/generator/extension-fetch.d.ts +0 -25
  323. package/dist/generator/extension-fetch.d.ts.map +0 -1
  324. package/dist/generator/extension-fetch.js +0 -252
  325. package/dist/generator/extension-fetch.js.map +0 -1
  326. package/dist/generator/template-engine.d.ts +0 -61
  327. package/dist/generator/template-engine.d.ts.map +0 -1
  328. package/dist/generator/template-engine.js +0 -557
  329. package/dist/generator/template-engine.js.map +0 -1
  330. package/dist/index.d.ts +0 -11
  331. package/dist/index.d.ts.map +0 -1
  332. package/dist/index.js +0 -11
  333. package/dist/index.js.map +0 -1
  334. package/dist/types/index.d.ts +0 -255
  335. package/dist/types/index.d.ts.map +0 -1
  336. package/dist/types/index.js +0 -17
  337. package/dist/types/index.js.map +0 -1
  338. package/dist/utils/cache.d.ts +0 -19
  339. package/dist/utils/cache.d.ts.map +0 -1
  340. package/dist/utils/cache.js +0 -64
  341. package/dist/utils/cache.js.map +0 -1
  342. package/dist/utils/command-helpers.d.ts +0 -17
  343. package/dist/utils/command-helpers.d.ts.map +0 -1
  344. package/dist/utils/command-helpers.js +0 -41
  345. package/dist/utils/command-helpers.js.map +0 -1
  346. package/dist/utils/constants.d.ts +0 -52
  347. package/dist/utils/constants.d.ts.map +0 -1
  348. package/dist/utils/constants.js +0 -112
  349. package/dist/utils/constants.js.map +0 -1
  350. package/dist/utils/discovery-context.d.ts +0 -4
  351. package/dist/utils/discovery-context.d.ts.map +0 -1
  352. package/dist/utils/discovery-context.js +0 -39
  353. package/dist/utils/discovery-context.js.map +0 -1
  354. package/dist/utils/docker.d.ts +0 -4
  355. package/dist/utils/docker.d.ts.map +0 -1
  356. package/dist/utils/docker.js +0 -19
  357. package/dist/utils/docker.js.map +0 -1
  358. package/dist/utils/doctor-runtime.d.ts +0 -66
  359. package/dist/utils/doctor-runtime.d.ts.map +0 -1
  360. package/dist/utils/doctor-runtime.js +0 -469
  361. package/dist/utils/doctor-runtime.js.map +0 -1
  362. package/dist/utils/env-validator.d.ts +0 -15
  363. package/dist/utils/env-validator.d.ts.map +0 -1
  364. package/dist/utils/env-validator.js +0 -109
  365. package/dist/utils/env-validator.js.map +0 -1
  366. package/dist/utils/errors.d.ts +0 -31
  367. package/dist/utils/errors.d.ts.map +0 -1
  368. package/dist/utils/errors.js +0 -140
  369. package/dist/utils/errors.js.map +0 -1
  370. package/dist/utils/file-helpers.d.ts +0 -14
  371. package/dist/utils/file-helpers.d.ts.map +0 -1
  372. package/dist/utils/file-helpers.js +0 -45
  373. package/dist/utils/file-helpers.js.map +0 -1
  374. package/dist/utils/formatting.d.ts +0 -30
  375. package/dist/utils/formatting.d.ts.map +0 -1
  376. package/dist/utils/formatting.js +0 -164
  377. package/dist/utils/formatting.js.map +0 -1
  378. package/dist/utils/paths.d.ts +0 -3
  379. package/dist/utils/paths.d.ts.map +0 -1
  380. package/dist/utils/paths.js +0 -41
  381. package/dist/utils/paths.js.map +0 -1
  382. package/dist/utils/port-assignment.d.ts +0 -6
  383. package/dist/utils/port-assignment.d.ts.map +0 -1
  384. package/dist/utils/port-assignment.js +0 -81
  385. package/dist/utils/port-assignment.js.map +0 -1
  386. package/dist/utils/project-features.d.ts +0 -23
  387. package/dist/utils/project-features.d.ts.map +0 -1
  388. package/dist/utils/project-features.js +0 -98
  389. package/dist/utils/project-features.js.map +0 -1
  390. package/dist/utils/project-templates.d.ts +0 -7
  391. package/dist/utils/project-templates.d.ts.map +0 -1
  392. package/dist/utils/project-templates.js +0 -24
  393. package/dist/utils/project-templates.js.map +0 -1
  394. package/dist/utils/prompt.d.ts +0 -28
  395. package/dist/utils/prompt.d.ts.map +0 -1
  396. package/dist/utils/prompt.js +0 -79
  397. package/dist/utils/prompt.js.map +0 -1
  398. package/dist/utils/resource-features.d.ts +0 -29
  399. package/dist/utils/resource-features.d.ts.map +0 -1
  400. package/dist/utils/resource-features.js +0 -171
  401. package/dist/utils/resource-features.js.map +0 -1
  402. package/dist/utils/service-urls.d.ts +0 -30
  403. package/dist/utils/service-urls.d.ts.map +0 -1
  404. package/dist/utils/service-urls.js +0 -93
  405. package/dist/utils/service-urls.js.map +0 -1
  406. package/dist/utils/services.d.ts +0 -18
  407. package/dist/utils/services.d.ts.map +0 -1
  408. package/dist/utils/services.js +0 -291
  409. package/dist/utils/services.js.map +0 -1
  410. package/dist/utils/stack-features.d.ts +0 -22
  411. package/dist/utils/stack-features.d.ts.map +0 -1
  412. package/dist/utils/stack-features.js +0 -13
  413. package/dist/utils/stack-features.js.map +0 -1
  414. package/dist/utils/tar.d.ts +0 -7
  415. package/dist/utils/tar.d.ts.map +0 -1
  416. package/dist/utils/tar.js +0 -21
  417. package/dist/utils/tar.js.map +0 -1
  418. package/dist/utils/tilt.d.ts +0 -19
  419. package/dist/utils/tilt.d.ts.map +0 -1
  420. package/dist/utils/tilt.js +0 -78
  421. package/dist/utils/tilt.js.map +0 -1
  422. package/dist/utils/validation.d.ts +0 -16
  423. package/dist/utils/validation.d.ts.map +0 -1
  424. package/dist/utils/validation.js +0 -58
  425. package/dist/utils/validation.js.map +0 -1
  426. /package/{README.md → cli/README.md} +0 -0
  427. /package/{bin → cli/bin}/tdk.js +0 -0
  428. /package/{templates → cli/templates}/.tiltignore.hbs +0 -0
  429. /package/{templates → cli/templates}/TILT_RESOURCE_DEFAULTS.star.hbs +0 -0
  430. /package/{templates → cli/templates}/TILT_TECH_STACK.star.hbs +0 -0
  431. /package/{templates → cli/templates}/spec.master.hbs +0 -0
@@ -0,0 +1,80 @@
1
+ ## Context
2
+
3
+ ### CLI Duplication
4
+ `beauty-crm/cli/` and `tdk-cli/cli/` both contain the `@tdk-landscape/tdk-cli-core` package. The `beauty-crm/cli/package.json` declares `"repository.directory": "cli"` pointing to `tdk-landscape/tdk-cli`, confirming it was originally published from the tdk-cli monorepo workspace. Over time, `tdk-cli/cli/` has evolved (12 src files, generator support, DRY assessment) while `beauty-crm/cli/` has lagged behind (9 src files). Any developer fixing the CLI must choose which copy to edit — and usually picks the wrong one.
5
+
6
+ ### AI Config Sprawl
7
+ The beauty-crm monorepo has accumulated configs for every AI coding assistant that gained popularity:
8
+
9
+ | Assistant | Type | Size |
10
+ |-----------|------|------|
11
+ | `.claude/` | Dir | skills, CLAUDE.md (757 lines) |
12
+ | `.cursor/` | Dir | rules, mcp.json, Dockerfile |
13
+ | `.continue/` | Dir | skills config |
14
+ | `.roo/` | Dir | 7 rulesets, mcp.json |
15
+ | `.serena/` | Dir | memories, prompt templates |
16
+ | `.agents/` | Dir | skills, mempalace |
17
+ | `.augment/` | Dir | agents, skills |
18
+ | `.kiro/` | Dir | agents, skills, settings, specs |
19
+ | `CLAUDE.md` | File | 757 lines (canonical project context) |
20
+ | `.cursorrules` | File | 32 lines (duplicates CLAUDE.md) |
21
+ | `.windsurfrules` | File | 2855 lines (duplicates CLAUDE.md + more) |
22
+ | `.roomodes` | File | 47 lines (mode definitions) |
23
+ | `.augment-guidelines` | File | 457 lines (duplicates CLAUDE.md) |
24
+
25
+ Most contain overlapping project context (tech stack, architecture, conventions) which creates a maintenance tax — every time the tech stack or conventions change, 13+ files need updating. The `.cursorrules` is a 32-line subset of `CLAUDE.md`. The `.windsurfrules` is 2855 lines that includes the full `CLAUDE.md` content plus extra.
26
+
27
+ ## Goals / Non-Goals
28
+
29
+ **Goals:**
30
+ - Remove `beauty-crm/cli/` and replace with a symlink to `tdk-cli/cli/`
31
+ - Update any beauty-crm tooling that references `beauty-crm/cli/` directly
32
+ - Consolidate all AI configs into one canonical location per project
33
+ - Remove duplicate root-level config files (`.cursorrules`, `.windsurfrules`, `.roomodes`, `.augment-guidelines`)
34
+ - Move `.cursor/mcp.json`, `.roo/` mode definitions into a shared format if they add unique value
35
+ - Verify no CI/CD breakage
36
+
37
+ **Non-Goals:**
38
+ - Merging AI assistant-specific features (e.g., Serena memories, Roo rulesets) — keep them in `.claude/skills/` or let each assistant read its own format
39
+ - Renaming the entire root directory structure
40
+ - Changing how `tdk-cli/` is organized internally
41
+ - Adding or removing any AI assistant support — only consolidating configs
42
+
43
+ ## Decisions
44
+
45
+ ### Decision 1: Remove Completely (No Symlink)
46
+ **Path**: `git rm -r beauty-crm/cli/` — deleted from git and disk, no replacement.
47
+ **Rationale**: A symlink breaks `git add pathspec` resolution (git treats symlinked directories as single blobs and cannot traverse them). Since no scripts, workspaces, or CI pipelines reference `beauty-crm/cli/`, there's nothing to break. Removing entirely is the cleanest solution.
48
+ **Alternatives considered**:
49
+ - Symlink to `../tdk-cli/cli/` — Rejected: breaks `git add` and other git operations
50
+ - Keep as-is (do nothing) — Drift will continue to grow
51
+
52
+ ### Decision 2: Canonical AI Config = `.claude/` + `CLAUDE.md`
53
+ **Rationale**: `CLAUDE.md` is the most comprehensive single file (757 lines covering tech stack, architecture, conventions). `.claude/` is the directory format used by Claude Code and Opencode. Other assistants (Cursor, Windsurf, Continue, Roo, Serena) can read symlinked or imported copies.
54
+ **Implementation**: Other root config files get removed. Each assistant's directory gets a README pointing to `CLAUDE.md` as canonical.
55
+
56
+ ### Decision 3: Preserve `.cursor/mcp.json` as Shared MCP Config
57
+ **Rationale**: MCP server configuration is tool-agnostic and useful across assistants. Move it to a shared location or keep as a thin reference.
58
+ **Approach**: Keep `.cursor/mcp.json` but add a comment header pointing to `CLAUDE.md` for context. Alternatively, move to `.opencode/mcp.json` if opencode is the canonical tool.
59
+
60
+ ### Decision 4: Keep `.roo/` Rulesets
61
+ **Rationale**: Roo's role-based rulesets (architect, code, debug, etc.) are unique to Roo's multi-agent workflow and don't duplicate CLAUDE.md content. They add value.
62
+ **Approach**: Leave `.roo/rules/` in place. Only remove root-level `.roomodes` if Roo can find its modes via the directory.
63
+
64
+ ### Decision 5: No Cross-Project AI Config Sync
65
+ **Rationale**: `identity/`, `platform/`, and `tdk-cli/` don't have AI configs. Adding them would be scope creep. Each project should opt in when ready.
66
+ **Approach**: Document in CONTRIBUTING.md that each project manages its own AI configs, and `.claude/` + `CLAUDE.md` is the recommended canonical format.
67
+
68
+ ## Risks / Trade-offs
69
+
70
+ **Risk**: Symlink breaks in CI/CD (Docker, git checkout without submodules)
71
+ - **Mitigation**: Symlinks work with `git clone` and Docker COPY. Test explicitly.
72
+
73
+ **Risk**: Developer has `.cursorrules` or `.windsurfrules` open in muscle memory and is confused when gone
74
+ - **Mitigation**: Leave a one-line comment file: `.cursorrules → see CLAUDE.md`
75
+
76
+ **Risk**: Cursor/Continue/Roo stop working optimally without their config files
77
+ - **Mitigation**: Each assistant can still use its own directory format. We only remove root-level _files_ that duplicate `CLAUDE.md`. The directories (`.cursor/`, `.continue/`, `.roo/`) stay but get trimmed.
78
+
79
+ **Risk**: Some AI assistant relies on `.windsurfrules` being 2855 lines (it contains everything)
80
+ - **Mitigation**: WindSurf can also read `CLAUDE.md` directly. The `CLAUDE.md` is already comprehensive.
@@ -0,0 +1,40 @@
1
+ ## Why
2
+
3
+ The TDK landscape has accumulated two inefficiencies from its extraction from the original `beauty-crm` monorepo:
4
+
5
+ 1. **Duplicated CLI client**: `beauty-crm/cli/` is a vendored copy of `tdk-cli/cli/` (both publish as `@tdk-landscape/tdk-cli-core`). This means every CLI fix must be applied twice, and the two copies have already diverged — `beauty-crm/cli/` has 9 source files while `tdk-cli/cli/` has 12 with additional features. This will only worsen over time.
6
+
7
+ 2. **AI config sprawl**: `beauty-crm/` contains configuration for 8 AI coding assistants (`.claude/`, `.cursor/`, `.continue/`, `.roo/`, `.serena/`, `.agents/`, `.augment/`, `.kiro/`) plus 5 root-level config files (`CLAUDE.md`, `.cursorrules`, `.windsurfrules`, `.roomodes`, `.augment-guidelines`). Most contain duplicate project context. Developers waste time maintaining 13+ config files that say the same thing.
8
+
9
+ Fixing both reduces maintenance burden, clarifies the canonical source of truth, and prevents future drift.
10
+
11
+ ## What Changes
12
+
13
+ ### Workstream A: CLI Duplicate Removal
14
+ - Remove `beauty-crm/cli/` entirely via `git rm`
15
+ - No symlink — symlinks break `git add` pathspec resolution
16
+ - Update any `beauty-crm/` scripts/build pipelines that reference the old path
17
+
18
+ ### Workstream B: AI Config Consolidation
19
+ - Choose one canonical AI assistant config per project (recommend: `.claude/` + `CLAUDE.md`)
20
+ - Remove duplicated root config files (`.cursorrules`, `.windsurfrules`, `.roomodes`, `.augment-guidelines`)
21
+ - Consolidate `beauty-crm/.kiro/`, `beauty-crm/.agents/`, `beauty-crm/.augment/` into `beauty-crm/.claude/` or a shared `.ai-tools/` directory
22
+ - Add `.cursor/mcp.json` as a workspace-level config (not project-specific)
23
+ - Document which AI config is canonical for each project
24
+
25
+ ## Capabilities
26
+
27
+ ### New Capabilities
28
+ - `cli-source-consolidation`: Single source of truth for `@tdk-landscape/tdk-cli-core`
29
+ - `ai-config-consolidation`: Unified AI assistant configuration
30
+
31
+ ### Modified Capabilities
32
+ - Existing specs in `tdk-cli/openspec/specs/` may need minor updates if they reference `beauty-crm/cli/`
33
+
34
+ ## Impact
35
+
36
+ - **Files removed**: beauty-crm/cli/ (~50 files), AI root configs (5 files), AI assistant dirs (5+ dirs)
37
+ - **Files added**: 1 symlink, 1-2 consolidated config files
38
+ - **Dependencies**: CI/CD pipelines that reference beauty-crm/cli/ need updating
39
+ - **Breaking Changes**: Any tooling that directly references `beauty-crm/cli/bin/tdk.js` will need to use `tdk-cli/cli/bin/tdk.js`
40
+ - **Risk Level**: Low-Medium. CLI removal is mechanical and testable. AI config changes are cosmetic but need care not to break developer workflows.
@@ -0,0 +1,52 @@
1
+ # landscape-consolidation Specification
2
+
3
+ ## Purpose
4
+
5
+ The TDK landscape has two sources of maintenance waste: a vendored duplicate of the `@tdk-landscape/tdk-cli-core` package in `beauty-crm/cli/` that has diverged from the canonical `tdk-cli/cli/`, and 13+ AI assistant config entries in `beauty-crm/` with overlapping project context spread across 8 directories and 5 root files. Consolidating both reduces maintenance burden and establishes canonical sources of truth.
6
+
7
+ ## Requirements
8
+
9
+ ### Requirement: Single CLI source of truth
10
+
11
+ All source code and tooling for the `@tdk-landscape/tdk-cli-core` package SHALL originate from `tdk-cli/cli/`. The `beauty-crm/cli/` directory SHALL NOT contain its own copy of CLI source.
12
+
13
+ #### Scenario: Remove duplicate CLI directory
14
+ - **WHEN** inspecting the `beauty-crm/` project root
15
+ - **THEN** there SHALL be no `cli/` directory containing standalone `@tdk-landscape/tdk-cli-core` source
16
+
17
+ #### Scenario: Directory removed completely (no symlink)
18
+ - **WHEN** inspecting the `beauty-crm/` project root
19
+ - **THEN** `beauty-crm/cli/` SHALL NOT exist as a directory or symlink
20
+
21
+ #### Scenario: No broken references after removal
22
+ - **WHEN** searching `beauty-crm/` for direct `beauty-crm/cli/` path references
23
+ - **THEN** no such references SHALL exist in scripts, configs, or documentation
24
+
25
+ ### Requirement: Canonical AI project context
26
+
27
+ All AI assistants operating in `beauty-crm/` SHALL use `CLAUDE.md` as the single canonical source for project context (tech stack, architecture, conventions).
28
+
29
+ #### Scenario: Remove redundant root-level config files
30
+ - **WHEN** listing root-level config files in `beauty-crm/`
31
+ - **THEN** `.cursorrules`, `.windsurfrules`, and `.augment-guidelines` SHALL NOT exist
32
+
33
+ #### Scenario: Assistant directory structure preserved
34
+ - **WHEN** an AI assistant reads its configuration
35
+ - **THEN** its native directory SHALL still exist (`.cursor/`, `.continue/`, `.roo/`, `.serena/`, `.agents/`, `.augment/`, `.kiro/`)
36
+ - **AND** SHALL NOT have been moved or reformatted
37
+
38
+ #### Scenario: Cross-reference from assistant configs
39
+ - **WHEN** an AI assistant initializes
40
+ - **THEN** its config files SHALL contain a comment or README referencing `CLAUDE.md` for project context
41
+
42
+ ### Requirement: No regression in CLI functionality
43
+
44
+ Removing `beauty-crm/cli/` SHALL NOT break any existing functionality that depends on the `@tdk-landscape/tdk-cli-core` package.
45
+
46
+ #### Scenario: No workspace resolution errors after removal
47
+ - **WHEN** running `bun install` in `beauty-crm/`
48
+ - **THEN** it SHALL NOT error due to the removed `cli/` directory
49
+
50
+ #### Scenario: No workspace resolution errors
51
+ - **WHEN** running `bun install` in `beauty-crm/`
52
+ - **THEN** it SHALL NOT error due to the removed `cli/` directory
@@ -0,0 +1,51 @@
1
+ ## 1. CLI Duplicate — Audit & Verify
2
+
3
+ - [x] 1.1 Confirm `beauty-crm/cli/` is not listed in `beauty-crm/package.json` workspaces
4
+ - [x] 1.2 Confirm no CI/CD or scripts reference `beauty-crm/cli/` as a build path
5
+ - [x] 1.3 Verify `beauty-crm/cli/package.json` name is `@tdk-landscape/tdk-cli-core` (not `@beauty-crm/cli`)
6
+ - [x] 1.4 Verify `tdk-cli/cli/` has superset of files vs `beauty-crm/cli/` (72 vs 26 source files)
7
+ - [x] 1.5 Check `beauty-crm/bun.lock` does NOT lock `@tdk-landscape/tdk-cli-core` to a `file:cli` path
8
+ - [x] 1.6 Check `.tilt-engine/` and `Tiltfile` for any references to `beauty-crm/cli/`
9
+
10
+ ## 2. CLI Duplicate — Remove
11
+
12
+ - [x] 2.1 `git rm -r beauty-crm/cli/` (removed from git and disk)
13
+ - [x] 2.2 Verify no stale references: `rg` found zero references
14
+
15
+ ## 3. AI Config — Audit Current State
16
+
17
+ - [x] 3.1 Catalog all AI assistant configs in `beauty-crm/`:
18
+ - Directories: `.claude/`, `.cursor/`, `.continue/`, `.roo/`, `.serena/`, `.agents/`, `.augment/`, `.kiro/`
19
+ - Root files: `CLAUDE.md`, `.cursorrules`, `.windsurfrules`, `.roomodes`, `.augment-guidelines`
20
+ - [x] 3.2 Identify content overlap:
21
+ - `.cursorrules` — 32-line communication style (no project context)
22
+ - `.windsurfrules` — 2855-line superset of CLAUDE.md
23
+ - `.augment-guidelines` — 457-line partially overlapping
24
+ - [x] 3.3 Check `.roo/rules/` — unique workflow instructions (dev_workflow, self_improve, taskmaster)
25
+ - [x] 3.4 Check `.cursor/mcp.json` — unique MCP server configs (task-master-ai, tilt)
26
+
27
+ ## 4. AI Config — Consolidate
28
+
29
+ - [x] 4.1 Remove `.cursorrules` (redundant with `CLAUDE.md`)
30
+ - [x] 4.2 Remove `.windsurfrules` (redundant with `CLAUDE.md`)
31
+ - [x] 4.3 Remove `.augment-guidelines` (redundant with `CLAUDE.md`)
32
+ - [x] 4.4 Keep `.roomodes` (defines Roo's custom mode slugs — not redundant with CLAUDE.md)
33
+ - [x] 4.5 Keep all AI assistant directories in place (each reads from its own native path):
34
+ - `.cursor/`, `.continue/`, `.roo/`, `.serena/`, `.agents/`, `.augment/`, `.kiro/`
35
+ - [x] 4.6 Add comment/README to each assistant config pointing to `CLAUDE.md`:
36
+ - `.cursor/mcp.json` → `_comment` field
37
+ - `.roo/README.md`, `.serena/README.md`, `.agents/README.md`, `.augment/README.md`, `.kiro/README.md`, `.continue/README.md`
38
+
39
+ ## 5. AI Config — Documentation
40
+
41
+ - [x] 5.1 Add banner to `CLAUDE.md` declaring it canonical source of truth
42
+ - [x] 5.2 Keep `.cursor/rules/` in place (native Cursor format)
43
+ - [x] 5.3 Verify `identity/`, `platform/`, `tdk-cli/` don't need AI configs (scope boundary)
44
+
45
+ ## 6. Verification
46
+
47
+ - [x] 6.1 Run `git status` — clean, 44 files changed
48
+ - [x] 6.2 N/A (no symlink — removed directly via `git rm`)
49
+ - [x] 6.3 No broken references found
50
+ - [x] 6.4 CLAUDE.md is valid markdown, loadable by any AI
51
+ - [ ] 6.5 Ask team to test their preferred AI assistant still works after consolidation
@@ -0,0 +1,2 @@
1
+ schema: spec-driven
2
+ created: 2026-09-17
@@ -0,0 +1,43 @@
1
+ # Fix Generated Stack Boot - Design
2
+
3
+ ## Context
4
+
5
+ `tdk project` and `tdk resource` produce output that must run on a fresh machine with Docker + Tilt. Two defects broke this path for every user: (1) the backend source template emitted a literal newline inside a single-quoted `console.log` string, making every generated service uncompilable; (2) the generated Tiltfile pointed at an author-specific absolute path (`/private/var/www/2025/ollamar1/tdk-cli`) and fell back to a private GitHub repo that cannot be cloned, causing `tdk up` to hang in a git retry loop. The fixes below were implemented and verified in an isolated container (fixed binary rebuilt from source, `bun run` + `curl /health` green, `tilt ci` loads the vendored extension and reports a healthy workspace).
6
+
7
+ ## Goals / Non-Goals
8
+
9
+ **Goals:**
10
+ - Generated services compile and serve `/health` on first run.
11
+ - `tdk up` loads its Tiltfile on any machine with zero network or private-repo dependency.
12
+ - Generated output contains no machine-specific paths and fails fast with actionable errors when misconfigured.
13
+ - Extension loading uses a truthful local probe.
14
+
15
+ **Non-Goals:**
16
+ - Rewriting the TDK Tilt extension itself or its orchestration semantics.
17
+ - Making the private `tdk-cli` source repo public.
18
+ - Changing the generated `service.json` manifest shape (tracked separately in manifest-field-migration).
19
+ - Container-to-host DNS routing (traefik `*.beauty-crm.localhost` mapping) is outside this change.
20
+
21
+ ## Decisions
22
+
23
+ ### D1. Do not hardcode or publish; vendor instead
24
+ Vendor the extension into each generated project (`.tdk/.tdk-out/tdk-cli-ext/`) at generation time. Rationale: matches the "releases public, source private" position, works offline, and a vendored project stays reviewable and relocatable. The source is located via, in order: `$TDK_EXTENSION_SOURCE`, an executable-adjacent `tdk-cli` checkout, then a `../tdk-cli` sibling of the project root. Missing source logs a warning; the Tiltfile then fails fast with recovery instructions.
25
+
26
+ ### D2. Escape newlines at the template boundary
27
+ In `cli/src/commands/resource.ts`, `getBackendIndexTemplate` emits `console.log('\n🚀 ...')`. The template is a JS template literal, so `\n` becomes a real newline in the emitted file. The source therefore uses `\\n` so generated files contain the two-character escape sequence and remain valid Bun source.
28
+
29
+ ### D3. Fail fast instead of a private-repo fallback
30
+ The Tiltfile resolution order is: vendored path -> `$TDK_EXTENSION_PATH` -> `fail(...)` with the three recovery options. This eliminates the infinite `git clone` retry against `github.com/tdk-landscape/tdk-cli` (private, 404 to unauthenticated clients).
31
+
32
+ ### D4. Truthful local probe
33
+ The presence probe must produce output: `test -d <path> && echo yes || echo no`. A probe returning `""` (as the first iteration did) silently disables detection and routes every run to the fail-fast branch.
34
+
35
+ ### D5. Vendoring lives in `generateMasterConfigs`
36
+ The copy step runs in `generateMasterConfigs` (alongside writing `Tiltfile`, `spec.master`, etc.) so regeneration repairs a stale or missing vendored extension.
37
+
38
+ ## Risks / Trade-offs
39
+
40
+ - **Project size**: vendoring adds ~2.5 MB of starlark per project. Accepted for offline, private-repo-free bootstrapping; the copied set is limited to `Tiltfile`, `engine/`, `discovery/`, `specs/`, `ext/`.
41
+ - **Stale binary releases**: released `release-dist-*` binaries still contain both bugs. Release artifacts must be rebuilt (proven command: `bun build --compile --target=bun-linux-arm64 --outfile tdk-linux-arm64 cli/src/cli.ts`) and republished before users see the fix.
42
+ - **Probe coupling**: detection depends on `local()` emitting the echo; documented in the template comment so future edits keep the `&& echo yes || echo no` tail.
43
+ - **Sandbox verification ceiling**: full container orchestration (image builds via traefik network, `*.beauty-crm.localhost` DNS) requires a host network; the isolated-container verification covers generation, compilation, Tiltfile loading, service discovery, resource creation, and workspace health.
@@ -0,0 +1,29 @@
1
+ ## Why
2
+
3
+ Generated projects from `tdk project` and `tdk resource` shipped two blockers that broke the quickstart for every user: generated Bun services did not compile (the backend template emits a literal newline inside a `console.log('...')` string, producing `Unterminated string literal`), and `tdk up` could never load its Tiltfile because it hardcoded a machine-specific extension path and fell back to a private GitHub repo that triggers an endless git-clone retry loop. Both were reproduced in an isolated Docker container and verified fixed in source, but the fixes are not yet reflected in released binaries or a tracked spec.
4
+
5
+ ## What Changes
6
+
7
+ - `cli/src/commands/resource.ts`: escape newlines in the generated backend `src/index.ts` so emitted files contain `\n` and compile (`console.log('\n...')`).
8
+ - `cli/templates/Tiltfile.hbs`: resolve the TDK Tilt extension in order - vendored in-project copy (`.tdk/.tdk-out/tdk-cli-ext`) -> `$TDK_EXTENSION_PATH` -> fail fast with actionable instructions. Remove the hardcoded `/private/var/www/2025/ollamar1/tdk-cli` path and the private-repo fallback.
9
+ - `cli/src/generator/template-engine.ts`: vendor the extension (engine/discovery/specs/ext) into `.tdk/.tdk-out/tdk-cli-ext/` during `generateMasterConfigs`, so `tdk up` works offline on any machine without GitHub access. Source is auto-detected via `$TDK_EXTENSION_SOURCE`, executable-adjacent checkout, or a `../tdk-cli` sibling.
10
+ - `cli/templates/Tiltfile.hbs`: fix the local-directory probe to echo its result (`test -d <path> && echo yes || echo no`); the previous probe returned `""`, so the vendored extension was never detected and `tdk up` always failed at the new fail-fast gate.
11
+ - Rebuild release binaries from the fixed source and republish to `tdk-landscape/tdk-cli-releases` (**BREAKING** for existing releases - new generated output shape).
12
+
13
+ ## Capabilities
14
+
15
+ ### New Capabilities
16
+
17
+ - `self-contained-generated-projects`: generated projects must boot without network or private-repo access - extension vendored at generation time, Tiltfile loads it from a local `file://` repo, and generated service sources compile on first `bun run`.
18
+
19
+ ### Modified Capabilities
20
+
21
+ - `manifest-field-migration`: no requirement changes; generated `service.json` shape is unchanged.
22
+
23
+ ## Impact
24
+
25
+ - `cli/src/commands/resource.ts` - backend index template escaping.
26
+ - `cli/templates/Tiltfile.hbs` - extension resolution and probe.
27
+ - `cli/src/generator/template-engine.ts` - vendoring step, `.tdk/.tdk-out/tdk-cli-ext/` output.
28
+ - `release-dist-*` snapshots - must be regenerated from fixed source.
29
+ - Verification: generated services compile and serve `/health` via Bun; `tilt ci` on a generated Tiltfile loads the vendored extension, discovers services, creates resources, and reports a healthy workspace.
@@ -0,0 +1,67 @@
1
+ # Self-Contained Generated Projects
2
+
3
+ ## ADDED Requirements
4
+
5
+ ### Requirement: Generated Services Compile On First Run
6
+
7
+ Generated backend services must always emit valid Bun source code.
8
+
9
+ #### Scenario: Backend template with banner logs
10
+
11
+ - **WHEN** a user runs `tdk resource api --type backend --stack pre-alpha --path services/pre-alpha/api`
12
+ - **THEN** the generated `src/index.ts` contains `console.log('\n🚀 api running ...')` with an escaped `\n`
13
+ - **AND** `bun run src/index.ts` starts the server without a syntax error
14
+
15
+ #### Scenario: Health endpoint serves
16
+
17
+ - **WHEN** the generated service is running
18
+ - **THEN** `GET /health` responds `{"status":"ok","service":"<name>"}`
19
+
20
+ ### Requirement: Extension Vendored Into Generated Projects
21
+
22
+ Every generated project must contain the TDK Tilt extension so `tdk up` works offline.
23
+
24
+ #### Scenario: Project generation
25
+
26
+ - **WHEN** a user runs `tdk project --yes`
27
+ - **THEN** `.tdk/.tdk-out/tdk-cli-ext/` is created containing `Tiltfile`, `engine/`, `discovery/`, `specs/`, and `ext/`
28
+ - **AND** the generation log reports `Vendored TDK extension -> .tdk/.tdk-out/tdk-cli-ext/`
29
+
30
+ #### Scenario: Extension source auto-detection
31
+
32
+ - **WHEN** generating a project
33
+ - **THEN** the extension source is resolved in order: `$TDK_EXTENSION_SOURCE`, an executable-adjacent `tdk-cli` checkout, then a `../tdk-cli` sibling of the project root
34
+
35
+ ### Requirement: Tiltfile Loads Extension Locally
36
+
37
+ The generated Tiltfile must resolve the extension without any GitHub dependency.
38
+
39
+ #### Scenario: Vendored copy present
40
+
41
+ - **WHEN** `.tdk/.tdk-out/tdk-cli-ext/` exists next to the Tiltfile
42
+ - **THEN** the Tiltfile registers `file://<vendored path>` as the extension repo
43
+ - **AND** `load('ext://tdk-cli', ...)` succeeds without cloning
44
+
45
+ #### Scenario: Explicit extension path override
46
+
47
+ - **WHEN** the vendored copy is absent but `$TDK_EXTENSION_PATH` points at a valid tdk-cli checkout
48
+ - **THEN** the Tiltfile uses that path
49
+
50
+ #### Scenario: No extension available
51
+
52
+ - **WHEN** neither the vendored copy nor `$TDK_EXTENSION_PATH` exists
53
+ - **THEN** loading fails fast with a single actionable error listing the three recovery options, with no retry loop
54
+
55
+ ### Requirement: No Machine-Specific Paths In Generated Output
56
+
57
+ Generated Tiltfiles must never contain hardcoded author or machine paths.
58
+
59
+ #### Scenario: Fresh generation on any machine
60
+
61
+ - **WHEN** any user generates a project
62
+ - **THEN** the generated `Tiltfile` has no absolute host-specific paths and no private GitHub repo URL fallback
63
+
64
+ #### Scenario: Local probe is truthful
65
+
66
+ - **WHEN** the Tiltfile probes for the vendored directory
67
+ - **THEN** the probe echoes its outcome (`test -d <path> && echo yes || echo no`) so detection reflects the filesystem
@@ -0,0 +1,27 @@
1
+ ## 1. Compilable Generated Backend Source
2
+
3
+ - [x] 1.1 Update `getBackendIndexTemplate` in `cli/src/commands/resource.ts` so the emitted banner lines use `\\n` (escaped backslash-n): `console.log('\n...')` becomes two characters in generated files
4
+ - [x] 1.2 Generate a backend service with the CLI and assert `src/index.ts` has no raw newline inside the `console.log` string
5
+ - [x] 1.3 Boot the generated service with `bun run src/index.ts` and assert `GET /health` returns `{"status":"ok","service":"<name>"}`
6
+
7
+ ## 2. Extension Vendored Into Generated Projects
8
+
9
+ - [x] 2.1 Add `vendorTdkExtension(projectRoot)` to `cli/src/generator/template-engine.ts`, called from `generateMasterConfigs`, copying `Tiltfile`, `engine/`, `discovery/`, `specs/`, `ext/` into `.tdk/.tdk-out/tdk-cli-ext/`
10
+ - [x] 2.2 Resolve the extension source in order: `$TDK_EXTENSION_SOURCE` -> executable-adjacent `tdk-cli` checkout -> `../tdk-cli` sibling of the project root
11
+ - [x] 2.3 Print a warning (no hard failure) when no extension source is found
12
+ - [x] 2.4 Assert generation reports `Vendored TDK extension -> .tdk/.tdk-out/tdk-cli-ext/` and the directory exists
13
+
14
+ ## 3. Tiltfile Extension Resolution
15
+
16
+ - [x] 3.1 Rewrite `cli/templates/Tiltfile.hbs`: resolve vendored path -> `$TDK_EXTENSION_PATH` -> `fail(...)` with the three recovery options; remove the hardcoded `/private/var/www/2025/ollamar1/tdk-cli` path and the private GitHub fallback
17
+ - [x] 3.2 Use truthful probes: `test -d <path> && echo yes || echo no` in both branches
18
+ - [x] 3.3 Assert a generated Tiltfile contains no absolute host-specific paths and no `github.com/tdk-landscape/tdk-cli` URL
19
+ - [x] 3.4 Run `tilt ci -f .tdk/.tdk-out/Tiltfile` on a generated project and assert the vendored extension loads, services are discovered, and the workspace reports healthy
20
+ - [x] 3.5 Run `tdk up pre-alpha` on a two-service project and assert no git-clone retry loop; Tiltfile loading succeeds
21
+
22
+ ## 4. Release Binaries
23
+
24
+ - [x] 4.1 Rebuild binaries from fixed source: `bun build --compile --target=bun-linux-amd64 --outfile tdk-linux-amd64 cli/src/cli.ts` (repeat for `bun-linux-arm64`, `bun-darwin-amd64`, `bun-darwin-arm64`)
25
+ - [x] 4.2 Verify each rebuilt binary: `--version` matches, `project --yes` vendors the extension, and a generated service compiles and boots
26
+ - [x] 4.3 Update `release-dist-*` snapshots, `checksums.txt`, and the binaries zip
27
+ - [x] 4.4 Publish binaries to `tdk-landscape/tdk-cli-releases` releases with the fixed snapshots
@@ -0,0 +1,24 @@
1
+ # manifest-field-migration Specification
2
+
3
+ ## Purpose
4
+ TBD - created by archiving change rename-domain-to-stack-service-to-resource. Update Purpose after archive.
5
+ ## Requirements
6
+ ### Requirement: Manifest field migration from domain to stack
7
+ All manifest field access patterns SHALL remove fallback support for the deprecated `domain` field.
8
+
9
+ #### Scenario: No domain field fallback
10
+ - **WHEN** code retrieves the stack field from a manifest
11
+ - **THEN** it SHALL NOT use fallback patterns like `manifest.get('stack') or manifest.get('domain')`
12
+
13
+ #### Scenario: Stack field with default only
14
+ - **WHEN** a default value is needed for the stack field
15
+ - **THEN** code SHALL use `manifest.get('stack', default_value)` and NOT check for domain
16
+
17
+ #### Scenario: Domain field references removed
18
+ - **WHEN** searching the codebase for domain field access
19
+ - **THEN** no `manifest.get('domain')` patterns SHALL exist except in legacy parser code
20
+
21
+ #### Scenario: Filtering uses stack field only
22
+ - **WHEN** filtering manifests by logical group
23
+ - **THEN** code SHALL filter by `stack` field only and NOT check `domain` as fallback
24
+
@@ -0,0 +1,24 @@
1
+ # resource-terminology-standard Specification
2
+
3
+ ## Purpose
4
+ TBD - created by archiving change rename-domain-to-stack-service-to-resource. Update Purpose after archive.
5
+ ## Requirements
6
+ ### Requirement: Resource terminology standardization
7
+ All references to deployable units SHALL use the term "resource" instead of "service".
8
+
9
+ #### Scenario: Function parameters use resource terminology
10
+ - **WHEN** a function accepts a deployable unit as a parameter
11
+ - **THEN** the parameter name SHALL be `resource` or `resource_dict` and NOT `service` or `svc`
12
+
13
+ #### Scenario: Docstrings use resource terminology
14
+ - **WHEN** a function docstring describes a deployable unit
15
+ - **THEN** it SHALL use the term "resource" and NOT "service"
16
+
17
+ #### Scenario: Variable names use resource terminology
18
+ - **WHEN** a variable holds a deployable unit
19
+ - **THEN** the variable name SHALL be `resource` and NOT `svc` or `service`
20
+
21
+ #### Scenario: Comments use resource terminology
22
+ - **WHEN** code comments describe deployable units
23
+ - **THEN** they SHALL use the term "resource" and NOT "service"
24
+
@@ -0,0 +1,67 @@
1
+ # Self-Contained Generated Projects
2
+
3
+ ## ADDED Requirements
4
+
5
+ ### Requirement: Generated Services Compile On First Run
6
+
7
+ Generated backend services must always emit valid Bun source code.
8
+
9
+ #### Scenario: Backend template with banner logs
10
+
11
+ - **WHEN** a user runs `tdk resource api --type backend --stack pre-alpha --path services/pre-alpha/api`
12
+ - **THEN** the generated `src/index.ts` contains `console.log('\n🚀 api running ...')` with an escaped `\n`
13
+ - **AND** `bun run src/index.ts` starts the server without a syntax error
14
+
15
+ #### Scenario: Health endpoint serves
16
+
17
+ - **WHEN** the generated service is running
18
+ - **THEN** `GET /health` responds `{"status":"ok","service":"<name>"}`
19
+
20
+ ### Requirement: Extension Vendored Into Generated Projects
21
+
22
+ Every generated project must contain the TDK Tilt extension so `tdk up` works offline.
23
+
24
+ #### Scenario: Project generation
25
+
26
+ - **WHEN** a user runs `tdk project --yes`
27
+ - **THEN** `.tdk/.tdk-out/tdk-cli-ext/` is created containing `Tiltfile`, `engine/`, `discovery/`, `specs/`, and `ext/`
28
+ - **AND** the generation log reports `Vendored TDK extension -> .tdk/.tdk-out/tdk-cli-ext/`
29
+
30
+ #### Scenario: Extension source auto-detection
31
+
32
+ - **WHEN** generating a project
33
+ - **THEN** the extension source is resolved in order: `$TDK_EXTENSION_SOURCE`, an executable-adjacent `tdk-cli` checkout, then a `../tdk-cli` sibling of the project root
34
+
35
+ ### Requirement: Tiltfile Loads Extension Locally
36
+
37
+ The generated Tiltfile must resolve the extension without any GitHub dependency.
38
+
39
+ #### Scenario: Vendored copy present
40
+
41
+ - **WHEN** `.tdk/.tdk-out/tdk-cli-ext/` exists next to the Tiltfile
42
+ - **THEN** the Tiltfile registers `file://<vendored path>` as the extension repo
43
+ - **AND** `load('ext://tdk-cli', ...)` succeeds without cloning
44
+
45
+ #### Scenario: Explicit extension path override
46
+
47
+ - **WHEN** the vendored copy is absent but `$TDK_EXTENSION_PATH` points at a valid tdk-cli checkout
48
+ - **THEN** the Tiltfile uses that path
49
+
50
+ #### Scenario: No extension available
51
+
52
+ - **WHEN** neither the vendored copy nor `$TDK_EXTENSION_PATH` exists
53
+ - **THEN** loading fails fast with a single actionable error listing the three recovery options, with no retry loop
54
+
55
+ ### Requirement: No Machine-Specific Paths In Generated Output
56
+
57
+ Generated Tiltfiles must never contain hardcoded author or machine paths.
58
+
59
+ #### Scenario: Fresh generation on any machine
60
+
61
+ - **WHEN** any user generates a project
62
+ - **THEN** the generated `Tiltfile` has no absolute host-specific paths and no private GitHub repo URL fallback
63
+
64
+ #### Scenario: Local probe is truthful
65
+
66
+ - **WHEN** the Tiltfile probes for the vendored directory
67
+ - **THEN** the probe echoes its outcome (`test -d <path> && echo yes || echo no`) so detection reflects the filesystem
@@ -0,0 +1,24 @@
1
+ # stack-terminology-standard Specification
2
+
3
+ ## Purpose
4
+ TBD - created by archiving change rename-domain-to-stack-service-to-resource. Update Purpose after archive.
5
+ ## Requirements
6
+ ### Requirement: Stack terminology standardization
7
+ All references to logical grouping of resources SHALL use the term "stack" instead of "domain".
8
+
9
+ #### Scenario: Manifest field access uses stack
10
+ - **WHEN** code accesses the grouping field from a manifest
11
+ - **THEN** it SHALL use `manifest.get('stack')` and NOT `manifest.get('domain')`
12
+
13
+ #### Scenario: Cache keys use stack terminology
14
+ - **WHEN** the discovery cache stores configuration for logical groups
15
+ - **THEN** the cache key SHALL be named `stack_configs` and NOT `domain_configs`
16
+
17
+ #### Scenario: Autogenerated files use stack naming
18
+ - **WHEN** autogenerated index files are created for logical groups
19
+ - **THEN** the filenames SHALL contain `stacks` and NOT `domains`
20
+
21
+ #### Scenario: Function names use stack terminology
22
+ - **WHEN** a function generates an index of logical groups
23
+ - **THEN** the function name SHALL include `stacks` and NOT `domains`
24
+