@tdk-landscape/tdk-cli-core 1.3.14 → 1.3.22

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 (277) hide show
  1. package/README.md +3 -3
  2. package/Tiltfile +144 -0
  3. package/discovery/AGENTS.md +362 -0
  4. package/discovery/TILT_DISCOVERY.star +424 -0
  5. package/discovery/Tiltfile +58 -0
  6. package/discovery/config.star +258 -0
  7. package/discovery/constants.star +127 -0
  8. package/discovery/deterministic.star +211 -0
  9. package/discovery/discovery_daemon.star +191 -0
  10. package/discovery/discovery_orchestrator.star +460 -0
  11. package/discovery/filtering.star +5 -0
  12. package/discovery/identity-management-backend/service.yaml +26 -0
  13. package/discovery/identity-management-frontend/service.yaml +29 -0
  14. package/discovery/identity-sdk/service.yaml +9 -0
  15. package/discovery/incremental_discovery.star +213 -0
  16. package/discovery/indexing.star +7 -0
  17. package/discovery/json_manifest_scanner.star +51 -0
  18. package/discovery/libraries.star +46 -0
  19. package/discovery/loading.star +23 -0
  20. package/discovery/manifest/constants.star +104 -0
  21. package/discovery/manifest/loading.star +386 -0
  22. package/discovery/manifest/normalize.star +281 -0
  23. package/discovery/manifest/validation.star +108 -0
  24. package/discovery/normalization.star +11 -0
  25. package/discovery/registry.star +544 -0
  26. package/discovery/resource_snapshot.py +382 -0
  27. package/discovery/resource_snapshot.star +143 -0
  28. package/discovery/schemas.star +1 -0
  29. package/discovery/services/platform/cdc/debezium/nats-connector/service.yaml +9 -0
  30. package/discovery/services/platform/cdc/nats-http-bridge/service.yaml +9 -0
  31. package/discovery/services/platform/orchestrator/orchestrator-glue-backend/service.yaml +26 -0
  32. package/discovery/services/platform/synthetic-monitor/service.yaml +9 -0
  33. package/discovery/test_resource_snapshot.py +251 -0
  34. package/discovery/validation.star +78 -0
  35. package/discovery/versioning.star +1 -0
  36. package/dist/commands/config.d.ts.map +1 -1
  37. package/dist/commands/config.js +11 -0
  38. package/dist/commands/config.js.map +1 -1
  39. package/dist/commands/doctor.d.ts.map +1 -1
  40. package/dist/commands/doctor.js +1 -2
  41. package/dist/commands/doctor.js.map +1 -1
  42. package/dist/commands/project.d.ts.map +1 -1
  43. package/dist/commands/project.js +36 -41
  44. package/dist/commands/project.js.map +1 -1
  45. package/dist/commands/resource.d.ts.map +1 -1
  46. package/dist/commands/resource.js +51 -55
  47. package/dist/commands/resource.js.map +1 -1
  48. package/dist/commands/stack.d.ts.map +1 -1
  49. package/dist/commands/stack.js +22 -24
  50. package/dist/commands/stack.js.map +1 -1
  51. package/dist/commands/ui.d.ts.map +1 -1
  52. package/dist/commands/ui.js +1 -2
  53. package/dist/commands/ui.js.map +1 -1
  54. package/dist/commands/up.d.ts.map +1 -1
  55. package/dist/commands/up.js +1 -2
  56. package/dist/commands/up.js.map +1 -1
  57. package/dist/commands/upgrade.d.ts +8 -0
  58. package/dist/commands/upgrade.d.ts.map +1 -1
  59. package/dist/commands/upgrade.js +62 -21
  60. package/dist/commands/upgrade.js.map +1 -1
  61. package/dist/generator/extension-fetch.d.ts +19 -0
  62. package/dist/generator/extension-fetch.d.ts.map +1 -1
  63. package/dist/generator/extension-fetch.js +71 -5
  64. package/dist/generator/extension-fetch.js.map +1 -1
  65. package/dist/generator/template-engine.d.ts +1 -0
  66. package/dist/generator/template-engine.d.ts.map +1 -1
  67. package/dist/generator/template-engine.js +50 -6
  68. package/dist/generator/template-engine.js.map +1 -1
  69. package/dist/utils/command-helpers.d.ts.map +1 -1
  70. package/dist/utils/command-helpers.js +7 -9
  71. package/dist/utils/command-helpers.js.map +1 -1
  72. package/dist/utils/constants.d.ts +1 -0
  73. package/dist/utils/constants.d.ts.map +1 -1
  74. package/dist/utils/constants.js +1 -0
  75. package/dist/utils/constants.js.map +1 -1
  76. package/dist/utils/errors.d.ts +2 -0
  77. package/dist/utils/errors.d.ts.map +1 -1
  78. package/dist/utils/errors.js +6 -1
  79. package/dist/utils/errors.js.map +1 -1
  80. package/dist/utils/paths.js +1 -1
  81. package/dist/utils/paths.js.map +1 -1
  82. package/dist/utils/project-features.d.ts.map +1 -1
  83. package/dist/utils/project-features.js +1 -1
  84. package/dist/utils/project-features.js.map +1 -1
  85. package/dist/utils/resource-features.d.ts.map +1 -1
  86. package/dist/utils/resource-features.js +2 -2
  87. package/dist/utils/resource-features.js.map +1 -1
  88. package/dist/utils/tar.js +4 -4
  89. package/dist/utils/tar.js.map +1 -1
  90. package/dist/utils/validation.d.ts +7 -0
  91. package/dist/utils/validation.d.ts.map +1 -1
  92. package/dist/utils/validation.js +9 -0
  93. package/dist/utils/validation.js.map +1 -1
  94. package/engine/AGENTS.md +705 -0
  95. package/engine/README.md +29 -0
  96. package/engine/REFACTORING_MANIFEST_SYSTEM.md +974 -0
  97. package/engine/Tiltfile +80 -0
  98. package/engine/assets/docker/golden-layers.Dockerfile +221 -0
  99. package/engine/assets/scripts/cleanup-completed-migrator-images.sh +37 -0
  100. package/engine/assets/scripts/cleanup-tilt-images.sh +120 -0
  101. package/engine/assets/scripts/mac-m1-resource-monitor.sh +121 -0
  102. package/engine/config.star +3 -0
  103. package/engine/docs/AUTODISCOVERY_TEST.md +182 -0
  104. package/engine/docs/C4-ARCHITECTURE-operations.md +396 -0
  105. package/engine/docs/C4-ARCHITECTURE-overview.md +284 -0
  106. package/engine/docs/C4-ARCHITECTURE.md +17 -0
  107. package/engine/docs/GOLDEN_IMAGE_INTEGRATION.md +349 -0
  108. package/engine/docs/MANIFEST_DRIVEN_ARCHITECTURE.md +357 -0
  109. package/engine/docs/README.md +284 -0
  110. package/engine/entrypoint.star +97 -0
  111. package/engine/lifecycle/orchestrator.star +260 -0
  112. package/engine/paths.star +717 -0
  113. package/engine/schemas/manifest-schema.json +301 -0
  114. package/engine/schemas/service-schema.json +301 -0
  115. package/engine/scripts/README.md +89 -0
  116. package/engine/scripts/build-and-publish-lib.sh +205 -0
  117. package/engine/scripts/check-lib-publish.sh +85 -0
  118. package/engine/scripts/debug-container.sh +258 -0
  119. package/engine/scripts/generate-manifest.sh +197 -0
  120. package/engine/spec.master +702 -0
  121. package/engine/spec.master.example +341 -0
  122. package/engine/topologies/README.md +34 -0
  123. package/engine/topologies/platform/docker/AGENTS.md +59 -0
  124. package/engine/topologies/platform/docker/auth/auth.star +167 -0
  125. package/engine/topologies/platform/docker/build/golden_image.star +37 -0
  126. package/engine/topologies/platform/docker/build/golden_image_build.star +82 -0
  127. package/engine/topologies/platform/docker/build/golden_image_constants.star +93 -0
  128. package/engine/topologies/platform/docker/build/golden_image_dockerfile.star +291 -0
  129. package/engine/topologies/platform/docker/compose/compose.star +636 -0
  130. package/engine/topologies/platform/docker/compose/compose_helpers.star +52 -0
  131. package/engine/topologies/platform/docker/compose/traefik_standalone.star +53 -0
  132. package/engine/topologies/platform/docker/config/bunignore.star +142 -0
  133. package/engine/topologies/platform/docker/config/dockerignore.star +150 -0
  134. package/engine/topologies/platform/docker/constants.star +170 -0
  135. package/engine/topologies/platform/docker/dockerfile/dockerfile.star +54 -0
  136. package/engine/topologies/platform/docker/generators/golden_docker_generator_v2.star +73 -0
  137. package/engine/topologies/platform/docker/index.star +27 -0
  138. package/engine/topologies/platform/docker/layers/bun_helpers.star +23 -0
  139. package/engine/topologies/platform/docker/layers/infisical/index.star +40 -0
  140. package/engine/topologies/platform/docker/layers/infisical/infisical_docker.star +262 -0
  141. package/engine/topologies/platform/docker/layers/l1_base_layers.star +87 -0
  142. package/engine/topologies/platform/docker/layers/l2_dependency_layers.star +125 -0
  143. package/engine/topologies/platform/docker/layers/l3_builder_layers.star +209 -0
  144. package/engine/topologies/platform/docker/layers/l4_runtime_layers.star +214 -0
  145. package/engine/topologies/platform/docker/layers/prisma/constants.star +135 -0
  146. package/engine/topologies/platform/docker/layers/prisma/db_readiness.star +96 -0
  147. package/engine/topologies/platform/docker/layers/prisma/filesystem_setup.star +109 -0
  148. package/engine/topologies/platform/docker/layers/prisma/migrate_script.star +98 -0
  149. package/engine/topologies/platform/docker/layers/prisma/prisma_build.star +126 -0
  150. package/engine/topologies/platform/docker/layers/prisma/prisma_runtime.star +161 -0
  151. package/engine/topologies/platform/docker/layers/prisma/secret_resolution.star +119 -0
  152. package/engine/topologies/platform/docker/networking/api_path_constants.star +230 -0
  153. package/engine/topologies/platform/docker/networking/sablier_container_cycle.star +27 -0
  154. package/engine/topologies/platform/docker/networking/traefik.star +232 -0
  155. package/engine/topologies/platform/docker/networking/traefik_constants.star +146 -0
  156. package/engine/topologies/platform/docker/networking/traefik_helpers.star +160 -0
  157. package/engine/topologies/platform/docker/secrets/infisical.star +135 -0
  158. package/engine/topologies/platform/net/proxy.star +4 -0
  159. package/engine/topologies/platform/registries/local.star +4 -0
  160. package/engine/topologies/platform/security/secrets.star +239 -0
  161. package/engine/topologies/platform/state/relational.star +4 -0
  162. package/engine/topologies/tilt/common/AGENTS.md +59 -0
  163. package/engine/topologies/tilt/common/utils.star +364 -0
  164. package/engine/topologies/tilt/common/utils_debug.star +69 -0
  165. package/engine/topologies/tilt/common/utils_deterministic.star +168 -0
  166. package/engine/topologies/tilt/common/utils_docker_networks.star +46 -0
  167. package/engine/topologies/tilt/common/utils_env.star +43 -0
  168. package/engine/topologies/tilt/common/utils_output.star +97 -0
  169. package/engine/topologies/tilt/config/AGENTS.md +68 -0
  170. package/engine/topologies/tilt/config/defaults.star +3 -0
  171. package/engine/topologies/tilt/config/feature_flags.star +10 -0
  172. package/engine/topologies/tilt/config/global.star +55 -0
  173. package/engine/topologies/tilt/config/profiles.star +382 -0
  174. package/engine/topologies/tilt/generators/agents_md.star +62 -0
  175. package/engine/topologies/tilt/generators/api_gateway.star +145 -0
  176. package/engine/topologies/tilt/generators/index.star +124 -0
  177. package/engine/topologies/tilt/generators/infisical/README.md +424 -0
  178. package/engine/topologies/tilt/generators/infisical/examples.star +312 -0
  179. package/engine/topologies/tilt/generators/infisical/index.star +57 -0
  180. package/engine/topologies/tilt/generators/infisical/machine_identity.star +420 -0
  181. package/engine/topologies/tilt/generators/infisical/organization.star +534 -0
  182. package/engine/topologies/tilt/generators/infisical/path_manager.star +476 -0
  183. package/engine/topologies/tilt/generators/infisical/secrets_generator.star +420 -0
  184. package/engine/topologies/tilt/generators/nginx_conf.star +143 -0
  185. package/engine/topologies/tilt/generators/npmrc.star +111 -0
  186. package/engine/topologies/tilt/generators/tsconfig.star +23 -0
  187. package/engine/topologies/tilt/generators/typescript/backend_library_tsconfig.star +71 -0
  188. package/engine/topologies/tilt/generators/typescript/backend_tsconfig.star +124 -0
  189. package/engine/topologies/tilt/generators/typescript/common.star +7 -0
  190. package/engine/topologies/tilt/generators/typescript/frontend_library_tsconfig.star +76 -0
  191. package/engine/topologies/tilt/generators/typescript/frontend_tsconfig.star +110 -0
  192. package/engine/topologies/tilt/generators/typescript/include.star +23 -0
  193. package/engine/topologies/tilt/generators/typescript/playwright_config.star +40 -0
  194. package/engine/topologies/tilt/generators/typescript/prisma_config.star +49 -0
  195. package/engine/topologies/tilt/generators/validators.star +853 -0
  196. package/engine/topologies/tilt/generators/vite/backend.star +78 -0
  197. package/engine/topologies/tilt/generators/vite/frontend.star +98 -0
  198. package/engine/topologies/tilt/generators/vite/generators.star +43 -0
  199. package/engine/topologies/tilt/generators/vite/helpers.star +244 -0
  200. package/engine/topologies/tilt/generators/vite/library.star +65 -0
  201. package/engine/topologies/tilt/generators/vite/sdk.star +73 -0
  202. package/engine/topologies/tilt/generators/vite/templates.star +737 -0
  203. package/engine/topologies/tilt/generators/vite_config.star +22 -0
  204. package/engine/topologies/tilt/manifest/AGENTS.md +61 -0
  205. package/engine/topologies/tilt/manifest/README.md +693 -0
  206. package/engine/topologies/tilt/manifest/__init__.star +218 -0
  207. package/engine/topologies/tilt/manifest/constants.star +252 -0
  208. package/engine/topologies/tilt/manifest/errors.star +266 -0
  209. package/engine/topologies/tilt/manifest/integration.star +339 -0
  210. package/engine/topologies/tilt/manifest/json_to_yaml.py +54 -0
  211. package/engine/topologies/tilt/manifest/loader.star +214 -0
  212. package/engine/topologies/tilt/manifest/mapper.star +227 -0
  213. package/engine/topologies/tilt/manifest/parser.star +400 -0
  214. package/engine/topologies/tilt/manifest/schema.star +462 -0
  215. package/engine/topologies/tilt/manifest/tests/test_integration.star +276 -0
  216. package/engine/topologies/tilt/manifest/tests/test_loader_parser.star +397 -0
  217. package/engine/topologies/tilt/manifest/tests/test_manifest.star +316 -0
  218. package/engine/topologies/tilt/manifest/tests/test_validator.star +470 -0
  219. package/engine/topologies/tilt/manifest/validator.star +717 -0
  220. package/engine/topologies/tilt/manifest/yaml_to_json.py +18 -0
  221. package/engine/topologies/tilt/resources/AGENTS.md +71 -0
  222. package/engine/topologies/tilt/resources/conditions.star +3 -0
  223. package/engine/topologies/tilt/resources/databases.star +244 -0
  224. package/engine/topologies/tilt/resources/declaration.star +3 -0
  225. package/engine/topologies/tilt/resources/deps.star +3 -0
  226. package/engine/topologies/tilt/resources/infra-loader.star +437 -0
  227. package/engine/topologies/tilt/resources/libs.star +30 -0
  228. package/engine/topologies/tilt/resources/libs_discovery.star +102 -0
  229. package/engine/topologies/tilt/resources/libs_paths.star +79 -0
  230. package/engine/topologies/tilt/resources/libs_resource_definition.star +151 -0
  231. package/engine/topologies/tilt/resources/libs_setup.star +164 -0
  232. package/engine/topologies/tilt/resources/libs_tsconfig.star +37 -0
  233. package/engine/topologies/tilt/resources/orchestrator/apply.star +77 -0
  234. package/engine/topologies/tilt/resources/orchestrator/apply_compose_resource_registration.star +431 -0
  235. package/engine/topologies/tilt/resources/orchestrator/apply_manifest_orchestration.star +81 -0
  236. package/engine/topologies/tilt/resources/orchestrator/apply_migrator_orchestration.star +148 -0
  237. package/engine/topologies/tilt/resources/orchestrator/apply_resource_validation.star +36 -0
  238. package/engine/topologies/tilt/resources/orchestrator/apply_runtime_flags.star +44 -0
  239. package/engine/topologies/tilt/resources/orchestrator/builders/typescript.star +164 -0
  240. package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/AGENTS.md +75 -0
  241. package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/index.star +21 -0
  242. package/engine/topologies/tilt/resources/orchestrator/generators/dependencies/resolver.star +134 -0
  243. package/engine/topologies/tilt/resources/orchestrator/generators/env.star +258 -0
  244. package/engine/topologies/tilt/resources/orchestrator/generators/frontend.star +169 -0
  245. package/engine/topologies/tilt/resources/orchestrator/generators/manifest_resource.star +524 -0
  246. package/engine/topologies/tilt/resources/orchestrator/helpers.star +33 -0
  247. package/engine/topologies/tilt/resources/orchestrator.star +54 -0
  248. package/engine/topologies/tilt/resources/ordering.star +3 -0
  249. package/engine/topologies/tilt/resources/triggers.star +3 -0
  250. package/engine/topologies/tilt/resources/watchers.star +299 -0
  251. package/engine/where-things-live.star +717 -0
  252. package/ext/Tiltfile +66 -0
  253. package/ext/ide-components/README.md +219 -0
  254. package/ext/ide-components/code_executor/server.py +268 -0
  255. package/ext/ide-components/code_viewer/server.py +206 -0
  256. package/ext/ide-components/config_inspector/server.py +1050 -0
  257. package/ext/ide-components/file_browser/server.py +285 -0
  258. package/ext/ide-components/shared/config_service.py +469 -0
  259. package/ext/ide-components/shared/file_utils.py +298 -0
  260. package/ext/ide-components/shared/http_utils.py +232 -0
  261. package/ext/ide-components/shared/static/styles.css +1334 -0
  262. package/ext/ide-components/shared/syntax_highlighter.py +140 -0
  263. package/ext/ide-components/shared/template_engine.py +123 -0
  264. package/ext/ide-components/shared/templates/base.html +121 -0
  265. package/ext/ide-components/shared/test_config_service.py +326 -0
  266. package/ext/ide-components/shared/tilt_integration.py +158 -0
  267. package/ext/ui-enhancements/cron-status-server.sh +49 -0
  268. package/ext/ui-enhancements/cron-status-tracker.sh +146 -0
  269. package/ext/ui-enhancements/extension.yaml +36 -0
  270. package/ext/ui-enhancements/tiltfile.py +99 -0
  271. package/ext/ui-enhancements/ui/cron-jobs-tab.css +396 -0
  272. package/ext/ui-enhancements/ui/help-panel.css +279 -0
  273. package/ext/ui-enhancements/ui/icons.css +125 -0
  274. package/ext/ui-enhancements/ui/tooltips.css +114 -0
  275. package/package.json +13 -9
  276. package/specs/specs/TILT_SERVICE_DEFAULTS.star +205 -0
  277. package/specs/specs/TILT_TECH_STACK.star +159 -0
@@ -0,0 +1,702 @@
1
+ #!/usr/bin/env starlark
2
+ # Tilt Master Spec File
3
+ # SYSTEM PATHS SPECIFICATION - No Hidden Magic
4
+ # Format: Explicit constants for all system paths
5
+ # Philosophy: Make it obvious (Zig-style explicitness)
6
+
7
+ # =============================================================================
8
+ # 🚀 QUICK START (I Just Want to Add a Service)
9
+ # =============================================================================
10
+
11
+ # 1. Create your service directory:
12
+ # mkdir -p services/product/my-service/backend
13
+ #
14
+ # 2. Create a manifest file:
15
+ # echo '{"appName":"my-service","port":4001}' > services/product/my-service/service.json
16
+ #
17
+ # 3. Run Tilt:
18
+ # tilt up
19
+ #
20
+ # 4. Done! Your service is running. Configs generated at:
21
+ # .tilt/output/configs/my-service/
22
+ #
23
+ # Need to debug? See DEBUG section at the bottom of this file.
24
+
25
+ # =============================================================================
26
+ # 📖 HOW TO USE THIS FILE
27
+ # =============================================================================
28
+
29
+ # In your Tiltfile or topology module, load this spec:
30
+ #
31
+ # load(PROJECT_ROOT + "/.tilt-engine/spec.master", "SPEC", "CONSTANTS", "VALIDATION", "DEBUG")
32
+ #
33
+ # Then use the constants:
34
+ #
35
+ # registry_path = SPEC.DISCOVERY.REGISTRY
36
+ # max_port = VALIDATION.MAX_PORT
37
+ # timeout = CONSTANTS.DEFAULT_TIMEOUT
38
+ #
39
+ # That's it! No magic paths. Everything is explicit.
40
+
41
+ # =============================================================================
42
+ # 📁 WHAT'S IN THIS FILE
43
+ # =============================================================================
44
+
45
+ # SPEC = File paths and directory locations
46
+ # (Where things live - TOPOLOGIES, DISCOVERY, GENERATORS, etc.)
47
+ #
48
+ # CONSTANTS = System values and defaults
49
+ # (Timeouts, intervals, supported features, system info)
50
+ #
51
+ # VALIDATION = Constraints and limits
52
+ # (Port ranges, replica limits, naming rules)
53
+ #
54
+ # DEBUG = Debugging and observability toggles
55
+ # (How to see what's happening when things break)
56
+ #
57
+ # Don't see what you need? Ctrl+F to search this file.
58
+
59
+ # =============================================================================
60
+ # ⚠️ IMPORTANT NOTES
61
+ # =============================================================================
62
+
63
+ # PROJECT_ROOT is automatically set by Tiltfile based on where you run `tilt up`.
64
+ # You don't need to set it. Example:
65
+ # - If you run in /home/dev/beauty-crm, PROJECT_ROOT = "/home/dev/beauty-crm"
66
+ # - All other paths are built from this root.
67
+ #
68
+ # This file is manually maintained to match the directory structure.
69
+ # If you add new topology modules, update this file and increment SYSTEM_VERSION.
70
+
71
+ # =============================================================================
72
+ # 🔧 DEBUGGING CHECKLIST (When Things Break)
73
+ # =============================================================================
74
+
75
+ # Error: "port X outside valid range [1024-65535]"
76
+ # → Check which service has "port": X in its service.json
77
+ # → Enable DEBUG logging to see full validation output
78
+ #
79
+ # Error: "dependency Y not found"
80
+ # → Check SPEC.DISCOVERY.RESOURCE_SEARCH_PATHS (where we look)
81
+ # → Verify service Y exists in one of those paths
82
+ # → Check service Y has a service.json file
83
+ #
84
+ # Error: "cannot load module Z"
85
+ # → Check SPEC for the path - does the file actually exist?
86
+ # → Run `ls -la` on the path to verify
87
+ #
88
+ # Something else broken?
89
+ # → Set DEBUG.DUMP_CONTEXT_ON_GENERATION = True (see DEBUG section)
90
+ # → Re-run tilt up and check the logs
91
+ # → The full context will be printed showing exactly what's happening
92
+
93
+ # =============================================================================
94
+ # 🗓️ FEATURE FLAGS (What's Working vs Planned)
95
+ # =============================================================================
96
+
97
+ # Legend:
98
+ # ✅ = Feature is working and enabled
99
+ # ⏸️ = Feature exists but disabled
100
+ # 🗓️ = Feature planned for future (not implemented yet)
101
+ #
102
+ # ISTIO_INTEGRATION = False (🗓️ ROADMAP - Q2 2026)
103
+ # - We plan to auto-generate Istio service mesh configs
104
+ # - Currently using Traefik for routing (working great!)
105
+ #
106
+ # BAZEL_INTEGRATION = False (🗓️ ROADMAP - when requested)
107
+ # - We plan Bazel integration for hermetic builds
108
+ # - Currently using Docker layer caching (90% of the benefits)
109
+ #
110
+ # Don't panic if you see 🗓️ - it just means "coming soon, not ready yet"
111
+
112
+ # =============================================================================
113
+ # 🗂️ WHERE FILES GO (And Why They Sometimes Disappear)
114
+ # =============================================================================
115
+
116
+ # Generated files live in: .tilt/output/configs/<service-name>/
117
+ #
118
+ # 🫥 They disappear when:
119
+ # - You change service.json (Tilt regenerates them)
120
+ # - You run tilt down (cleanup)
121
+ # - Something broke (check tilt logs)
122
+ #
123
+ # 😌 DON'T PANIC! They're auto-generated.
124
+ # They come back when you run tilt up.
125
+ # The SOURCE is your service.json, not these generated files.
126
+ #
127
+ # To see them again: tilt up
128
+ # To keep them forever: Look at OUTPUT.CONFIGS path (see below)
129
+
130
+ # =============================================================================
131
+ # 😰 MY SERVICE WON'T LAUNCH - CHECKLIST
132
+ # =============================================================================
133
+
134
+ # 1️⃣ Is service.json in the RIGHT PLACE?
135
+ # ✅ Good: services/product/my-service/service.json
136
+ # ❌ Bad: my-service/service.json (wrong folder!)
137
+ # ❌ Bad: service.json (no folder!)
138
+ #
139
+ # 2️⃣ Is the JSON valid?
140
+ # ✅ Test: python3 -m json.tool service.json
141
+ # ❌ If error: Fix the JSON syntax
142
+ #
143
+ # 3️⃣ Did you wait 5 seconds?
144
+ # Tilt scans every 5 seconds for new services
145
+ # Be patient! 🐱
146
+ #
147
+ # 4️⃣ Still not working?
148
+ # Run: tilt doctor
149
+ # Look for 🔴 red errors
150
+ # Ask in Slack with the error message
151
+
152
+ # =============================================================================
153
+ # 🐱 WHAT IS THIS FILE? (In Simple Words)
154
+ # =============================================================================
155
+
156
+ # This is a MAP 🗺️ that shows where all the Tilt files live.
157
+ #
158
+ # Think of it like this:
159
+ # - Your house = Project folder
160
+ # - spec.master = List of rooms and what's in them
161
+ # - You = Cat exploring the house 🐱
162
+ #
163
+ # YOU DON'T NEED TO EDIT THIS FILE.
164
+ # It's for the computer to find things.
165
+ #
166
+ # Just look at it when you need to know where something is.
167
+ # Ctrl+F to search! 🔍
168
+ #
169
+ # Example searches:
170
+ # - "DISCOVERY" → Find where services are discovered
171
+ # - "GENERATOR" → Find what creates config files
172
+ # - "OUTPUT" → Find where files are written
173
+
174
+ # =============================================================================
175
+ # 🗺️ FOLDER STRUCTURE (Visual Guide)
176
+ # =============================================================================
177
+
178
+ # 📁 .tilt (Tilt's home)
179
+ # 📁 topologies (neighborhoods)
180
+ # 📁 platform (Docker stuff)
181
+ # 📁 tilt (Tilt stuff)
182
+ # 📁 discovery 🔍 (find services)
183
+ # 📄 registry.star (the list of all services)
184
+ # 📁 generators 🏭 (make configs)
185
+ # 📄 vite_config.star (makes vite configs)
186
+ # 📄 tsconfig.star (makes tsconfig)
187
+ # 📁 resources (service resources)
188
+ # 📄 spec.master ← YOU ARE HERE (this file!)
189
+ #
190
+ # 📁 services (Your services live here)
191
+ # 📁 product (Product services)
192
+ # 📁 my-service (Your service folder)
193
+ # 📄 service.json (Your service definition)
194
+ # 📁 backend (Backend code)
195
+ # 📁 frontend (Frontend code)
196
+ #
197
+ # 📁 .tilt/output/configs (Generated configs go here)
198
+ # 📁 my-service/
199
+ # 📄 vite.config.ts (auto-generated)
200
+ # 📄 tsconfig.json (auto-generated)
201
+ # 📄 docker-compose.yml (auto-generated)
202
+
203
+ # =============================================================================
204
+ # 🎯 FIND THE RIGHT CONSTANT (Quick Lookup)
205
+ # =============================================================================
206
+
207
+ # If you want to... Use this...
208
+ # ─────────────────────────────────────────────────────────────────
209
+ # Find where services are discovered SPEC.DISCOVERY.REGISTRY
210
+ # Find where configs are generated SPEC.GENERATORS
211
+ # Find where files are written OUTPUT.CONFIGS
212
+ # Find port limits VALIDATION.MAX_PORT
213
+ # Find timeout values CONSTANTS.HEALTH_CHECK_TIMEOUT
214
+ # Turn on debugging DEBUG.DUMP_GENERATED_CONFIGS
215
+ # Check if feature is enabled FEATURES.XXX
216
+ #
217
+ # Still confused? Ctrl+F what you're looking for! 🔍
218
+
219
+ # =============================================================================
220
+ # 😰 SCARY ERRORS EXPLAINED (Don't Panic!)
221
+ # =============================================================================
222
+
223
+ # Error: "port X outside valid range [1024-65535]"
224
+ # → 💚 Don't worry! Just change the port number
225
+ # → Fix: Change "port": X to something between 1024-65535
226
+ # → Check VALIDATION.MIN_PORT and MAX_PORT in this file
227
+ #
228
+ # Error: "dependency Y not found"
229
+ # → 💚 Don't worry! Your service needs another service
230
+ # → Fix: Check "dependencies" list in your service.json
231
+ # → Make sure the other service exists and has service.json
232
+ #
233
+ # Error: "cannot load module Z"
234
+ # → 💚 Don't worry! This might be a Tilt bug
235
+ # → Try: tilt up again
236
+ # → Or: restart Docker Desktop
237
+ # → Check: Does the file path in SPEC actually exist?
238
+ #
239
+ # Error: "cannot load ext://..."
240
+ # → 💚 Don't worry! This is usually a Tilt extension issue
241
+ # → Try: tilt up again
242
+ # → Or: Run `tilt doctor` to check setup
243
+ #
244
+ # 🔴 Red text ≠ Your fault!
245
+ # Most errors are fixable! 😊
246
+
247
+ # =============================================================================
248
+ # ✅ BOSS-READY CHECKLIST (Before Showing Your Work)
249
+ # =============================================================================
250
+
251
+ # Use this if your boss can only review once (sick, busy, etc.)
252
+ #
253
+ # Before showing your work, verify:
254
+ #
255
+ # □ Your service shows up in `tilt up`
256
+ # □ No 🔴 red error messages
257
+ # □ Service status says 🟢 "Running"
258
+ # □ You can open the URL (if there is one)
259
+ # □ Run: tilt doctor (should be mostly green)
260
+ #
261
+ # Quick check command:
262
+ # $ tilt get uiresources | grep your-service-name
263
+ #
264
+ # If you see your service name → Good! 🎉
265
+ # If not → Check the troubleshooting section above
266
+
267
+ # =============================================================================
268
+ # 🎓 AM I DOING THIS RIGHT?
269
+ # =============================================================================
270
+
271
+ # Scenario 1: Adding a new service
272
+ # → You DON'T need to edit spec.master
273
+ # → Just create service.json and run tilt up
274
+ # → ✅ You're doing it right!
275
+ #
276
+ # Scenario 2: Finding where configs are
277
+ # → Open spec.master
278
+ # → Ctrl+F "OUTPUT" or "CONFIGS"
279
+ # → Look at the path
280
+ # → ✅ You're doing it right!
281
+ #
282
+ # Scenario 3: Something is broken
283
+ # → Open spec.master
284
+ # → Look at DEBUG section
285
+ # → Enable DEBUG.DUMP_CONTEXT_ON_GENERATION
286
+ # → Run tilt up again, check logs
287
+ # → ✅ You're doing it right!
288
+ #
289
+ # Most of the time:
290
+ # You DON'T need to edit spec.master.
291
+ # You just LOOK at it to find things.
292
+ # That's using it right! 😊
293
+
294
+ # =============================================================================
295
+ # 🔍 SEARCH THIS FILE
296
+ # =============================================================================
297
+
298
+ # Don't read all 400+ lines! Use Ctrl+F 🔍
299
+ #
300
+ # Suggested searches:
301
+ # - "DISCOVERY" → Where we find services
302
+ # - "GENERATORS" → What creates config files
303
+ # - "OUTPUT" → Where files are written
304
+ # - "DEBUG" → How to troubleshoot
305
+ # - "VALIDATION" → Port/replica limits
306
+ # - "CONSTANTS" → Timeouts, defaults
307
+ #
308
+ # Search for what you need, then close the file!
309
+
310
+ # =============================================================================
311
+ # 📛 FILE ALIASES (Easier Names)
312
+ # =============================================================================
313
+
314
+ # Can't remember "spec.master"? Use these aliases:
315
+ #
316
+ # .tilt/paths.star → Same file, easier name!
317
+ # .tilt/where-things-live.star → Same file, fun name!
318
+ #
319
+ # So you can do:
320
+ # load(PROJECT_ROOT + "/.tilt/paths.star", "SPEC")
321
+ #
322
+ # Instead of:
323
+ # load(PROJECT_ROOT + "/.tilt-engine/spec.master", "SPEC")
324
+ #
325
+ # Both work! Use whichever you remember. 😊
326
+
327
+ # =============================================================================
328
+ # 🗓️ FEATURE FLAGS (What's Working vs Planned)
329
+ # =============================================================================
330
+
331
+ # Project root - automatically set by Tiltfile
332
+ # You don't need to change this. It's based on where you run `tilt up`.
333
+ PROJECT_ROOT = "{PROJECT_ROOT}" # Auto-substituted by Tiltfile at load time
334
+
335
+ # Core system paths
336
+ SPEC = struct(
337
+ # Root directories - EXPLICIT, no discovery magic
338
+ ROOT = PROJECT_ROOT,
339
+ TILT_DIR = PROJECT_ROOT + "/.tilt",
340
+ RESOURCES_DIR = PROJECT_ROOT + "/services",
341
+ SHARED_DIR = PROJECT_ROOT + "/shared",
342
+
343
+ # Topology paths - ALL EXPLICIT
344
+ # NOTE: These paths are relative to TDK CLI installation root (engine/ directory)
345
+ TOPOLOGIES = struct(
346
+ BASE = PROJECT_ROOT + "/engine/topologies",
347
+ PLATFORM = PROJECT_ROOT + "/engine/topologies/platform",
348
+ TILT = PROJECT_ROOT + "/engine/topologies/tilt",
349
+ PRODUCT_GENERATED = PROJECT_ROOT + "/engine/topologies/product_autogenerated_*",
350
+ ),
351
+
352
+ # Discovery paths - EXPLICIT registry locations
353
+ DISCOVERY = struct(
354
+ MANIFEST = PROJECT_ROOT + "/engine/topologies/tilt/discovery/manifest",
355
+ REGISTRY = PROJECT_ROOT + "/engine/topologies/tilt/discovery/registry.star",
356
+ LOADING = PROJECT_ROOT + "/engine/topologies/tilt/discovery/loading.star",
357
+ LIBRARIES = PROJECT_ROOT + "/engine/topologies/tilt/discovery/libraries.star",
358
+ ),
359
+
360
+ # Generator paths - EXPLICIT, no magic imports
361
+ GENERATORS = struct(
362
+ BASE = PROJECT_ROOT + "/engine/topologies/tilt/generators",
363
+ VITE = PROJECT_ROOT + "/engine/topologies/tilt/generators/vite_config.star",
364
+ TSCONFIG = PROJECT_ROOT + "/engine/topologies/tilt/generators/tsconfig.star",
365
+ DOCKERFILE = PROJECT_ROOT + "/engine/topologies/tilt/generators/dockerfile.star",
366
+ NPMRC = PROJECT_ROOT + "/engine/topologies/tilt/generators/npmrc.star",
367
+ MANIFEST_RESOURCE = PROJECT_ROOT + "/engine/topologies/tilt/generators/manifest_resource.star",
368
+ ),
369
+
370
+ # Resource paths - EXPLICIT
371
+ RESOURCES = struct(
372
+ BASE = PROJECT_ROOT + "/engine/topologies/tilt/resources",
373
+ DEPS = PROJECT_ROOT + "/engine/topologies/tilt/resources/deps.star",
374
+ DATABASES = PROJECT_ROOT + "/engine/topologies/tilt/resources/databases.star",
375
+ INFRA = PROJECT_ROOT + "/engine/topologies/tilt/resources/infra.star",
376
+ ORCHESTRATOR = PROJECT_ROOT + "/engine/topologies/tilt/resources/orchestrator.star",
377
+ LIBS = PROJECT_ROOT + "/engine/topologies/tilt/resources/libs.star",
378
+ ),
379
+
380
+ # Platform topology paths - EXPLICIT
381
+ PLATFORM = struct(
382
+ DOCKER = PROJECT_ROOT + "/engine/topologies/platform/docker",
383
+ NET = PROJECT_ROOT + "/engine/topologies/platform/net",
384
+ STATE = PROJECT_ROOT + "/engine/topologies/platform/state",
385
+ SECURITY = PROJECT_ROOT + "/engine/topologies/platform/security",
386
+ REGISTRIES = PROJECT_ROOT + "/engine/topologies/platform/registries",
387
+ OBSERVABILITY = PROJECT_ROOT + "/engine/topologies/platform/observability",
388
+ ),
389
+
390
+ # Configuration paths - EXPLICIT
391
+ CONFIG = struct(
392
+ BASE = PROJECT_ROOT + "/engine/topologies/tilt/config",
393
+ GLOBAL = PROJECT_ROOT + "/engine/topologies/tilt/config/global_config.star",
394
+ PROFILES = PROJECT_ROOT + "/engine/topologies/tilt/config/profiles.star",
395
+ FEATURE_FLAGS = PROJECT_ROOT + "/engine/topologies/tilt/config/feature_flags.star",
396
+ ),
397
+
398
+ # Common utilities - EXPLICIT
399
+ COMMON = struct(
400
+ BASE = PROJECT_ROOT + "/engine/topologies/tilt/common",
401
+ UTILS = PROJECT_ROOT + "/engine/topologies/tilt/common/utils.star",
402
+ CONSTANTS = PROJECT_ROOT + "/engine/topologies/tilt/common/constants.star",
403
+ VALIDATION = PROJECT_ROOT + "/engine/topologies/tilt/common/validation.star",
404
+ ),
405
+ )
406
+
407
+ # =============================================================================
408
+ # SERVICE PATTERNS - Explicit naming conventions
409
+ # =============================================================================
410
+
411
+ RESOURCE_PATTERNS = struct(
412
+ # Manifest file names - EXPLICIT, no guessing
413
+ MANIFEST_FILE = "service.json",
414
+
415
+ # Service structure - EXPLICIT expectations
416
+ BACKEND_DIR = "backend",
417
+ FRONTEND_DIR = "frontend",
418
+ MIGRATOR_DIR = "migrator",
419
+ SHARED_DIR = "shared",
420
+
421
+ # Config files - EXPLICIT
422
+ PACKAGE_JSON = "package.json",
423
+ BUN_LOCK = "bun.lock",
424
+ DOCKERFILE = "Dockerfile",
425
+ DOCKER_COMPOSE = "docker-compose.yml",
426
+
427
+ # Generated files - EXPLICIT outputs
428
+ GENERATED_TSCONFIG = "tsconfig.json",
429
+ GENERATED_VITE_CONFIG = "vite.config.ts",
430
+ GENERATED_VITE_DOCKER = "vite.config.docker.ts",
431
+ GENERATED_NPMRC = ".npmrc",
432
+ GENERATED_BUNFIG = "bunfig.toml",
433
+ )
434
+
435
+ # =============================================================================
436
+ # DISCOVERY PATTERNS - Explicit file discovery rules
437
+ # =============================================================================
438
+
439
+ DISCOVERY = struct(
440
+ # Where to look for service manifests - EXPLICIT paths
441
+ RESOURCE_SEARCH_PATHS = [
442
+ PROJECT_ROOT + "/services/product/*",
443
+ PROJECT_ROOT + "/services/platform/*",
444
+ PROJECT_ROOT + "/services/identity/*",
445
+ ],
446
+
447
+ # Library discovery - EXPLICIT
448
+ LIBRARY_SEARCH_PATHS = [
449
+ PROJECT_ROOT + "/shared/*",
450
+ ],
451
+
452
+ # Manifest patterns - EXPLICIT glob patterns
453
+ MANIFEST_PATTERNS = [
454
+ "**/service.json",
455
+ ],
456
+
457
+ # Exclusion patterns - EXPLICIT (no hidden exclusions)
458
+ EXCLUDE_PATTERNS = [
459
+ "**/node_modules/**",
460
+ "**/.git/**",
461
+ "**/dist/**",
462
+ "**/build/**",
463
+ "**/*.autogenerated.*",
464
+ ],
465
+ )
466
+
467
+ # =============================================================================
468
+ # GENERATOR OUTPUT PATHS - Explicit where files are written
469
+ # =============================================================================
470
+
471
+ OUTPUT = struct(
472
+ # Base output directory - EXPLICIT
473
+ BASE = PROJECT_ROOT + "/.tilt/output",
474
+
475
+ # Generated configs location - EXPLICIT
476
+ CONFIGS = PROJECT_ROOT + "/.tilt/output/configs",
477
+
478
+ # Autogenerated topology files - EXPLICIT
479
+ TOPOLOGIES = PROJECT_ROOT + "/.tilt/topologies/product_autogenerated_*",
480
+
481
+ # Cache location - EXPLICIT
482
+ CACHE = PROJECT_ROOT + "/.tilt/.cache",
483
+
484
+ # Log location - EXPLICIT
485
+ LOGS = PROJECT_ROOT + "/.tilt/logs",
486
+
487
+ # Autogenerated folder name within service directories - EXPLICIT
488
+ # This is where generated configs (Dockerfile, tsconfig, etc.) are placed per-service
489
+ # Teams can customize this in ./spec.master to use custom folder names
490
+ AUTOGENERATED_FOLDER = ".autogenerated", # Changed from "autogenerated" to ".autogenerated"
491
+ )
492
+
493
+ # =============================================================================
494
+ # VALIDATION RULES - Explicit constraints
495
+ # =============================================================================
496
+
497
+ VALIDATION = struct(
498
+ # Port ranges - EXPLICIT
499
+ MIN_PORT = 1024,
500
+ MAX_PORT = 65535,
501
+ RESERVED_PORTS = [3000, 8080, 5432, 6379, 4222], # EXPLICIT: common conflicts
502
+
503
+ # Replica constraints - EXPLICIT
504
+ MIN_REPLICAS = 1,
505
+ MAX_REPLICAS = 100,
506
+ DEFAULT_REPLICAS = 1,
507
+
508
+ # Naming constraints - EXPLICIT regex patterns
509
+ VALID_RESOURCE_NAME_PATTERN = "^[a-z0-9-]+$",
510
+ MAX_RESOURCE_NAME_LENGTH = 63,
511
+
512
+ # Dependency constraints - EXPLICIT
513
+ MAX_DEPENDENCY_DEPTH = 10, # Prevent circular deps
514
+ ALLOWED_DEPENDENCY_TYPES = ["internal", "external", "platform"],
515
+ )
516
+
517
+ # =============================================================================
518
+ # FEATURE FLAGS - Explicit feature toggles
519
+ # =============================================================================
520
+
521
+ # LEGEND:
522
+ # ✅ True = Feature is working and enabled now
523
+ # ⏸️ False = Feature exists but currently disabled
524
+ # 🗓️ False = Feature is on the roadmap (not implemented yet)
525
+ #
526
+ # "🗓️ ROADMAP" means we're planning to build it, but it's not ready.
527
+ # Don't worry - the core features (✅) work great!
528
+
529
+ FEATURES = struct(
530
+ # ✅ Core features - Working today
531
+ AUTO_DISCOVERY = True, # Automatically find new service.json files
532
+ INCREMENTAL_GENERATION = True, # Only regenerate changed configs
533
+ PARALLEL_GENERATION = True, # Generate configs in parallel
534
+
535
+ # 🗓️ Roadmap features - Planned but not built yet
536
+ # These will be added in future versions. Don't wait for them -
537
+ # what's here today works great!
538
+
539
+ ISTIO_INTEGRATION = False,
540
+ # 🗓️ ROADMAP (Target: Q2 2026)
541
+ # Auto-generate Istio service mesh configs
542
+ # Currently using Traefik for routing - works great!
543
+
544
+ BAZEL_INTEGRATION = False,
545
+ # 🗓️ ROADMAP (Target: When requested)
546
+ # Bazel build system for hermetic builds
547
+ # Currently using Docker layer caching (90% of benefits, simpler)
548
+
549
+ CUE_VALIDATION = False,
550
+ # 🗓️ ROADMAP (Target: Future)
551
+ # Type-safe validation using Cue lang
552
+ # Currently using JSON Schema + Starlark validation (works well)
553
+
554
+ # ⏸️ Debug features - Toggle these when troubleshooting
555
+ VERBOSE_LOGGING = False, # Lots of output for debugging
556
+ GENERATION_DEBUG = False, # Step-by-step generation logging
557
+ CONTEXT_INSPECTION = False, # See full context object (see DEBUG section)
558
+ )
559
+
560
+ # =============================================================================
561
+ # CONSTANTS - System-wide constants
562
+ # =============================================================================
563
+
564
+ CONSTANTS = struct(
565
+ # System identity - EXPLICIT
566
+ SYSTEM_NAME = "beauty-crm-tilt-platform",
567
+ SYSTEM_VERSION = "2.0.0",
568
+
569
+ # Runtimes - EXPLICIT supported options
570
+ SUPPORTED_RUNTIMES = ["bun", "node", "deno"],
571
+ DEFAULT_RUNTIME = "bun",
572
+
573
+ # App types - EXPLICIT
574
+ SUPPORTED_APP_TYPES = ["backend", "frontend", "library", "sdk"],
575
+
576
+ # Features - EXPLICIT
577
+ SUPPORTED_FEATURES = [
578
+ "nats",
579
+ "prisma",
580
+ "vite",
581
+ "vite-node",
582
+ "traefik",
583
+ "redis",
584
+ "postgres",
585
+ ],
586
+
587
+ # Timeouts - EXPLICIT (seconds)
588
+ DEFAULT_TIMEOUT = 300,
589
+ HEALTH_CHECK_TIMEOUT = 30,
590
+ GENERATION_TIMEOUT = 60,
591
+
592
+ # Intervals - EXPLICIT (seconds)
593
+ DISCOVERY_SCAN_INTERVAL = 5,
594
+ HEALTH_CHECK_INTERVAL = 10,
595
+ )
596
+
597
+ # =============================================================================
598
+ # 🐛 DEBUGGING - How to Fix Things When They Break
599
+ # =============================================================================
600
+
601
+ # THREE WAYS TO USE DEBUG FLAGS:
602
+ #
603
+ # Method 1: Edit this file (affects all future runs)
604
+ # DEBUG = DEBUG | struct(DUMP_CONTEXT_ON_GENERATION = True)
605
+ # Then run `tilt up`
606
+ #
607
+ # Method 2: Environment variable (one-time, quick)
608
+ # $ TILT_DEBUG_DUMP_CONTEXT=true tilt up
609
+ # (Checks os.environ.get("TILT_DEBUG_DUMP_CONTEXT") at runtime)
610
+ #
611
+ # Method 3: Tilt args (when we implement --debug flags)
612
+ # $ tilt up -- --debug-context
613
+ #
614
+ # WHAT EACH FLAG DOES:
615
+ #
616
+ # DUMP_CONTEXT_ON_GENERATION = True
617
+ # → Prints the entire context object to logs
618
+ # → Shows: resource_name, port, dependencies, paths
619
+ # → Use when: "What values are being used?"
620
+ #
621
+ # DUMP_GENERATED_CONFIGS = True
622
+ # → Writes all generated configs to OUTPUT.CONFIGS
623
+ # → You can open and read them
624
+ # → Use when: "What configs were generated?"
625
+ #
626
+ # LOG_LEVEL = "DEBUG"
627
+ # → Very verbose output showing every step
628
+ # → Use when: "Where is it failing?"
629
+ #
630
+ # ENABLE_DEBUG_ENDPOINTS = True
631
+ # → Opens http://localhost:10350 for live inspection
632
+ # → Use when: "I want to browse the current state"
633
+
634
+ DEBUG = struct(
635
+ # Live debugging endpoint
636
+ ENABLE_DEBUG_ENDPOINTS = False,
637
+ DEBUG_ENDPOINT_PORT = 10350,
638
+
639
+ # What to dump/print during generation
640
+ DUMP_CONTEXT_ON_GENERATION = False, # Print full context to logs
641
+ DUMP_GENERATED_CONFIGS = True, # Write configs to disk for inspection
642
+
643
+ # Logging configuration
644
+ LOG_LEVEL = "INFO", # Options: DEBUG (verbose), INFO (normal), WARN, ERROR
645
+ LOG_FORMAT = "JSON", # Options: JSON (structured), TEXT (readable)
646
+
647
+ # Validation strictness
648
+ STRICT_VALIDATION = True, # Fail on any validation error
649
+ FAIL_ON_WARNING = False, # Also fail on warnings (stricter)
650
+ )
651
+
652
+ # =============================================================================
653
+ # ZIG-STYLE EXPLICITNESS MANIFESTO
654
+ # =============================================================================
655
+
656
+ """
657
+ PHILOSOPHY: No hidden control flow. No hidden allocations. No magic.
658
+
659
+ This spec file makes EVERYTHING explicit:
660
+ 1. ALL paths are constants - no runtime discovery
661
+ 2. ALL patterns are declared - no hidden globbing
662
+ 3. ALL features are toggled - no surprise behavior
663
+ 4. ALL outputs are defined - no mystery files
664
+
665
+ COMPARISON:
666
+
667
+ ❌ BEFORE (Implicit):
668
+ load("./discovery/registry.star", "get_app_resources")
669
+ # Where does this file live? Magic.
670
+ # What does it return? Runtime mystery.
671
+
672
+ ✅ AFTER (Explicit):
673
+ load(SPEC.DISCOVERY.REGISTRY, "get_app_resources")
674
+ # Path is: {PROJECT_ROOT}/.tilt/topologies/tilt/discovery/registry.star
675
+ # Behavior defined in this spec file.
676
+
677
+ USAGE:
678
+ load("{}/.tilt/spec.master".format(PROJECT_ROOT), "SPEC", "CONSTANTS")
679
+
680
+ # Now EVERYTHING is explicit
681
+ registry_path = SPEC.DISCOVERY.REGISTRY
682
+ max_port = VALIDATION.MAX_PORT
683
+ features = CONSTANTS.SUPPORTED_FEATURES
684
+
685
+ This is our answer to the Zig developer's critique:
686
+ "Make it obvious. No hidden state."
687
+ """
688
+
689
+ # =============================================================================
690
+ # EXPORTS - Explicit what's available
691
+ # =============================================================================
692
+
693
+ __all__ = [
694
+ "SPEC",
695
+ "RESOURCE_PATTERNS",
696
+ "DISCOVERY",
697
+ "OUTPUT",
698
+ "VALIDATION",
699
+ "FEATURES",
700
+ "CONSTANTS",
701
+ "DEBUG",
702
+ ]