@webex/plugin-meetings 3.12.0-next.15 → 3.12.0-next.151

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 (296) hide show
  1. package/.sdd/manifest.json +1312 -0
  2. package/.sdd/templates/.source.json +30 -0
  3. package/.sdd/templates/component-repo/module-docs/module-spec-quality.md +111 -0
  4. package/.sdd/templates/component-repo/module-docs/module-spec.template.md +321 -0
  5. package/.sdd/templates/component-repo/reference-docs/adr/_adr-example.md +59 -0
  6. package/.sdd/templates/component-repo/reference-docs/patterns/_pattern-example.md +49 -0
  7. package/.sdd/templates/component-repo/reference-docs/rules/_rule-example.md +42 -0
  8. package/.sdd/templates/component-repo/standing-docs/AGENTS.template.md +120 -0
  9. package/.sdd/templates/component-repo/standing-docs/ARCHITECTURE.template.md +206 -0
  10. package/.sdd/templates/component-repo/standing-docs/CONTRACTS.template.md +90 -0
  11. package/.sdd/templates/component-repo/standing-docs/DATA_MODEL.template.md +68 -0
  12. package/.sdd/templates/component-repo/standing-docs/GETTING_STARTED.template.md +111 -0
  13. package/.sdd/templates/component-repo/standing-docs/GLOSSARY.template.md +57 -0
  14. package/.sdd/templates/component-repo/standing-docs/REVIEW_CHECKLIST.template.md +69 -0
  15. package/.sdd/templates/component-repo/standing-docs/RULES.template.md +96 -0
  16. package/.sdd/templates/component-repo/standing-docs/SECURITY.template.md +84 -0
  17. package/.sdd/templates/component-repo/standing-docs/SERVICE_STATE.template.md +82 -0
  18. package/.sdd/templates/component-repo/standing-docs/SPEC_INDEX.template.md +94 -0
  19. package/.sdd/templates/component-repo/standing-docs/TEST_INDEX.template.md +64 -0
  20. package/.sdd/templates/component-repo/template-map.json +112 -0
  21. package/AGENTS.md +135 -0
  22. package/ai-docs/ARCHITECTURE.md +207 -0
  23. package/ai-docs/CONTRACTS.md +267 -0
  24. package/ai-docs/DATA_MODEL.md +64 -0
  25. package/ai-docs/GETTING_STARTED.md +73 -0
  26. package/ai-docs/GLOSSARY.md +56 -0
  27. package/ai-docs/REVIEW_CHECKLIST.md +45 -0
  28. package/ai-docs/RULES.md +79 -0
  29. package/ai-docs/SECURITY.md +74 -0
  30. package/ai-docs/SERVICE_STATE.md +59 -0
  31. package/ai-docs/SPEC_INDEX.md +85 -0
  32. package/ai-docs/TEST_INDEX.md +45 -0
  33. package/ai-docs/adr/0001-migrate-existing-docs-into-sdd.md +61 -0
  34. package/ai-docs/patterns/defensive-error-propagation.md +55 -0
  35. package/ai-docs/patterns/event-scope-emission.md +46 -0
  36. package/ai-docs/patterns/source-to-test-path-mirroring.md +45 -0
  37. package/ai-docs/patterns/stateless-plugin-request-classes.md +53 -0
  38. package/ai-docs/patterns/typed-constants-and-enum-values.md +47 -0
  39. package/dist/aiEnableRequest/index.js +15 -2
  40. package/dist/aiEnableRequest/index.js.map +1 -1
  41. package/dist/annotation/index.js +2 -2
  42. package/dist/annotation/index.js.map +1 -1
  43. package/dist/breakouts/breakout.js +8 -3
  44. package/dist/breakouts/breakout.js.map +1 -1
  45. package/dist/breakouts/events.js +29 -14
  46. package/dist/breakouts/events.js.map +1 -1
  47. package/dist/breakouts/index.js +99 -4
  48. package/dist/breakouts/index.js.map +1 -1
  49. package/dist/common/errors/webex-errors.js +49 -5
  50. package/dist/common/errors/webex-errors.js.map +1 -1
  51. package/dist/config.js +2 -2
  52. package/dist/config.js.map +1 -1
  53. package/dist/constants.js +37 -10
  54. package/dist/constants.js.map +1 -1
  55. package/dist/controls-options-manager/index.js +46 -10
  56. package/dist/controls-options-manager/index.js.map +1 -1
  57. package/dist/hashTree/constants.js +4 -1
  58. package/dist/hashTree/constants.js.map +1 -1
  59. package/dist/hashTree/hashTreeParser.js +1096 -391
  60. package/dist/hashTree/hashTreeParser.js.map +1 -1
  61. package/dist/hashTree/utils.js +20 -0
  62. package/dist/hashTree/utils.js.map +1 -1
  63. package/dist/index.js +7 -0
  64. package/dist/index.js.map +1 -1
  65. package/dist/interceptors/dataChannelAuthToken.js +75 -15
  66. package/dist/interceptors/dataChannelAuthToken.js.map +1 -1
  67. package/dist/interceptors/locusRetry.js +23 -8
  68. package/dist/interceptors/locusRetry.js.map +1 -1
  69. package/dist/interpretation/index.js +55 -12
  70. package/dist/interpretation/index.js.map +1 -1
  71. package/dist/interpretation/interpretation.types.js +7 -0
  72. package/dist/interpretation/interpretation.types.js.map +1 -0
  73. package/dist/interpretation/siLanguage.js +1 -1
  74. package/dist/locus-info/controlsUtils.js +4 -1
  75. package/dist/locus-info/controlsUtils.js.map +1 -1
  76. package/dist/locus-info/index.js +615 -176
  77. package/dist/locus-info/index.js.map +1 -1
  78. package/dist/locus-info/infoUtils.js +36 -5
  79. package/dist/locus-info/infoUtils.js.map +1 -1
  80. package/dist/locus-info/types.js +20 -0
  81. package/dist/locus-info/types.js.map +1 -1
  82. package/dist/media/MediaConnectionAwaiter.js +15 -2
  83. package/dist/media/MediaConnectionAwaiter.js.map +1 -1
  84. package/dist/media/index.js +8 -2
  85. package/dist/media/index.js.map +1 -1
  86. package/dist/media/properties.js +4 -5
  87. package/dist/media/properties.js.map +1 -1
  88. package/dist/meeting/in-meeting-actions.js +7 -1
  89. package/dist/meeting/in-meeting-actions.js.map +1 -1
  90. package/dist/meeting/index.js +1684 -835
  91. package/dist/meeting/index.js.map +1 -1
  92. package/dist/meeting/locusMediaRequest.js +229 -82
  93. package/dist/meeting/locusMediaRequest.js.map +1 -1
  94. package/dist/meeting/muteState.js +10 -1
  95. package/dist/meeting/muteState.js.map +1 -1
  96. package/dist/meeting/request.js +5 -2
  97. package/dist/meeting/request.js.map +1 -1
  98. package/dist/meeting/util.js +37 -3
  99. package/dist/meeting/util.js.map +1 -1
  100. package/dist/meeting/voicea-meeting.js +2 -1
  101. package/dist/meeting/voicea-meeting.js.map +1 -1
  102. package/dist/meeting-info/meeting-info-v2.js +9 -3
  103. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  104. package/dist/meetings/index.js +300 -128
  105. package/dist/meetings/index.js.map +1 -1
  106. package/dist/meetings/meetings.types.js +6 -1
  107. package/dist/meetings/meetings.types.js.map +1 -1
  108. package/dist/meetings/request.js +39 -0
  109. package/dist/meetings/request.js.map +1 -1
  110. package/dist/meetings/util.js +116 -18
  111. package/dist/meetings/util.js.map +1 -1
  112. package/dist/member/index.js +10 -0
  113. package/dist/member/index.js.map +1 -1
  114. package/dist/member/types.js.map +1 -1
  115. package/dist/member/util.js +30 -0
  116. package/dist/member/util.js.map +1 -1
  117. package/dist/members/index.js +101 -43
  118. package/dist/members/index.js.map +1 -1
  119. package/dist/members/util.js +8 -1
  120. package/dist/members/util.js.map +1 -1
  121. package/dist/metrics/constants.js +7 -1
  122. package/dist/metrics/constants.js.map +1 -1
  123. package/dist/multistream/codec/constants.js +63 -0
  124. package/dist/multistream/codec/constants.js.map +1 -0
  125. package/dist/multistream/mediaRequestManager.js +62 -15
  126. package/dist/multistream/mediaRequestManager.js.map +1 -1
  127. package/dist/multistream/receiveSlot.js +9 -0
  128. package/dist/multistream/receiveSlot.js.map +1 -1
  129. package/dist/reachability/clusterReachability.js.map +1 -1
  130. package/dist/reachability/index.js +121 -83
  131. package/dist/reachability/index.js.map +1 -1
  132. package/dist/reachability/reachability.types.js +2 -0
  133. package/dist/reachability/reachability.types.js.map +1 -1
  134. package/dist/reachability/util.js +45 -0
  135. package/dist/reachability/util.js.map +1 -1
  136. package/dist/reactions/reactions.type.js.map +1 -1
  137. package/dist/recording-controller/index.js +1 -3
  138. package/dist/recording-controller/index.js.map +1 -1
  139. package/dist/roap/turnDiscovery.js +8 -1
  140. package/dist/roap/turnDiscovery.js.map +1 -1
  141. package/dist/types/common/errors/webex-errors.d.ts +32 -2
  142. package/dist/types/config.d.ts +2 -2
  143. package/dist/types/constants.d.ts +13 -1
  144. package/dist/types/controls-options-manager/index.d.ts +16 -0
  145. package/dist/types/hashTree/constants.d.ts +1 -0
  146. package/dist/types/hashTree/hashTreeParser.d.ts +201 -22
  147. package/dist/types/hashTree/utils.d.ts +7 -0
  148. package/dist/types/index.d.ts +3 -0
  149. package/dist/types/interceptors/locusRetry.d.ts +4 -4
  150. package/dist/types/interpretation/interpretation.types.d.ts +10 -0
  151. package/dist/types/locus-info/index.d.ts +106 -8
  152. package/dist/types/locus-info/infoUtils.d.ts +8 -0
  153. package/dist/types/locus-info/types.d.ts +22 -1
  154. package/dist/types/media/MediaConnectionAwaiter.d.ts +10 -1
  155. package/dist/types/media/properties.d.ts +6 -2
  156. package/dist/types/meeting/in-meeting-actions.d.ts +6 -0
  157. package/dist/types/meeting/index.d.ts +176 -11
  158. package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
  159. package/dist/types/meeting/request.d.ts +1 -0
  160. package/dist/types/meeting/util.d.ts +9 -0
  161. package/dist/types/meeting-info/meeting-info-v2.d.ts +1 -0
  162. package/dist/types/meetings/index.d.ts +40 -19
  163. package/dist/types/meetings/meetings.types.d.ts +15 -0
  164. package/dist/types/meetings/request.d.ts +14 -0
  165. package/dist/types/member/index.d.ts +1 -0
  166. package/dist/types/member/types.d.ts +1 -0
  167. package/dist/types/member/util.d.ts +9 -0
  168. package/dist/types/members/index.d.ts +15 -2
  169. package/dist/types/members/util.d.ts +1 -5
  170. package/dist/types/metrics/constants.d.ts +6 -0
  171. package/dist/types/multistream/codec/constants.d.ts +7 -0
  172. package/dist/types/multistream/mediaRequestManager.d.ts +22 -5
  173. package/dist/types/reachability/clusterReachability.d.ts +3 -3
  174. package/dist/types/reachability/index.d.ts +10 -3
  175. package/dist/types/reachability/reachability.types.d.ts +7 -0
  176. package/dist/types/reachability/util.d.ts +17 -0
  177. package/dist/types/reactions/reactions.type.d.ts +3 -0
  178. package/dist/webinar/index.js +307 -161
  179. package/dist/webinar/index.js.map +1 -1
  180. package/package.json +23 -23
  181. package/src/aiEnableRequest/ai-docs/ai-enable-request-spec.md +223 -0
  182. package/src/aiEnableRequest/index.ts +16 -0
  183. package/src/annotation/ai-docs/annotation-spec.md +236 -0
  184. package/src/annotation/index.ts +6 -4
  185. package/src/breakouts/ai-docs/breakouts-spec.md +324 -0
  186. package/src/breakouts/breakout.ts +3 -1
  187. package/src/breakouts/events.ts +33 -11
  188. package/src/breakouts/index.ts +122 -2
  189. package/src/common/errors/webex-errors.ts +50 -3
  190. package/src/config.ts +2 -2
  191. package/src/constants.ts +21 -3
  192. package/src/controls-options-manager/ai-docs/controls-options-manager-spec.md +243 -0
  193. package/src/controls-options-manager/index.ts +62 -10
  194. package/src/hashTree/ai-docs/hash-tree-spec.md +267 -0
  195. package/src/hashTree/constants.ts +7 -0
  196. package/src/hashTree/hashTreeParser.ts +861 -193
  197. package/src/hashTree/utils.ts +19 -0
  198. package/src/index.ts +6 -0
  199. package/src/interceptors/ai-docs/interceptors-spec.md +247 -0
  200. package/src/interceptors/dataChannelAuthToken.ts +88 -12
  201. package/src/interceptors/locusRetry.ts +25 -4
  202. package/src/interpretation/ai-docs/interpretation-spec.md +256 -0
  203. package/src/interpretation/index.ts +65 -10
  204. package/src/interpretation/interpretation.types.ts +11 -0
  205. package/src/locus-info/ai-docs/locus-info-spec.md +293 -0
  206. package/src/locus-info/controlsUtils.ts +3 -1
  207. package/src/locus-info/index.ts +566 -164
  208. package/src/locus-info/infoUtils.ts +41 -6
  209. package/src/locus-info/types.ts +26 -1
  210. package/src/media/MediaConnectionAwaiter.ts +21 -4
  211. package/src/media/ai-docs/media-spec.md +267 -0
  212. package/src/media/index.ts +10 -1
  213. package/src/media/properties.ts +8 -3
  214. package/src/meeting/ai-docs/meeting-spec.md +401 -0
  215. package/src/meeting/in-meeting-actions.ts +12 -0
  216. package/src/meeting/index.ts +937 -119
  217. package/src/meeting/locusMediaRequest.ts +106 -6
  218. package/src/meeting/muteState.ts +10 -1
  219. package/src/meeting/request.ts +11 -0
  220. package/src/meeting/util.ts +51 -7
  221. package/src/meeting/voicea-meeting.ts +1 -1
  222. package/src/meeting-info/ai-docs/meeting-info-spec.md +261 -0
  223. package/src/meeting-info/meeting-info-v2.ts +10 -4
  224. package/src/meetings/ai-docs/meetings-spec.md +296 -0
  225. package/src/meetings/index.ts +200 -80
  226. package/src/meetings/meetings.types.ts +19 -0
  227. package/src/meetings/request.ts +43 -0
  228. package/src/meetings/util.ts +117 -4
  229. package/src/member/ai-docs/member-spec.md +196 -0
  230. package/src/member/index.ts +10 -0
  231. package/src/member/types.ts +1 -0
  232. package/src/member/util.ts +29 -0
  233. package/src/members/ai-docs/members-spec.md +256 -0
  234. package/src/members/index.ts +70 -7
  235. package/src/members/util.ts +12 -4
  236. package/src/metrics/ai-docs/metrics-spec.md +185 -0
  237. package/src/metrics/constants.ts +6 -0
  238. package/src/multistream/ai-docs/multistream-spec.md +292 -0
  239. package/src/multistream/codec/constants.ts +58 -0
  240. package/src/multistream/mediaRequestManager.ts +119 -28
  241. package/src/multistream/receiveSlot.ts +18 -0
  242. package/src/personal-meeting-room/ai-docs/personal-meeting-room-spec.md +234 -0
  243. package/src/reachability/ai-docs/reachability-spec.md +261 -0
  244. package/src/reachability/clusterReachability.ts +3 -2
  245. package/src/reachability/index.ts +47 -16
  246. package/src/reachability/reachability.types.ts +11 -0
  247. package/src/reachability/util.ts +36 -0
  248. package/src/reactions/ai-docs/reactions-spec.md +198 -0
  249. package/src/reactions/reactions.type.ts +3 -0
  250. package/src/reconnection-manager/ai-docs/reconnection-manager-spec.md +272 -0
  251. package/src/recording-controller/ai-docs/recording-controller-spec.md +223 -0
  252. package/src/recording-controller/index.ts +1 -2
  253. package/src/roap/ai-docs/roap-spec.md +241 -0
  254. package/src/roap/turnDiscovery.ts +9 -1
  255. package/src/webinar/ai-docs/webinar-spec.md +243 -0
  256. package/src/webinar/index.ts +216 -38
  257. package/test/unit/spec/aiEnableRequest/index.ts +86 -0
  258. package/test/unit/spec/annotation/index.ts +3 -3
  259. package/test/unit/spec/breakouts/breakout.ts +9 -3
  260. package/test/unit/spec/breakouts/events.ts +120 -2
  261. package/test/unit/spec/breakouts/index.ts +223 -3
  262. package/test/unit/spec/common/errors/webex-errors.ts +78 -0
  263. package/test/unit/spec/controls-options-manager/index.js +139 -32
  264. package/test/unit/spec/hashTree/hashTreeParser.ts +2451 -184
  265. package/test/unit/spec/hashTree/utils.ts +37 -0
  266. package/test/unit/spec/interceptors/dataChannelAuthToken.ts +196 -0
  267. package/test/unit/spec/interceptors/locusRetry.ts +205 -4
  268. package/test/unit/spec/interpretation/index.ts +119 -4
  269. package/test/unit/spec/locus-info/controlsUtils.js +172 -57
  270. package/test/unit/spec/locus-info/index.js +1014 -58
  271. package/test/unit/spec/locus-info/infoUtils.js +184 -1
  272. package/test/unit/spec/media/MediaConnectionAwaiter.ts +55 -0
  273. package/test/unit/spec/media/index.ts +92 -0
  274. package/test/unit/spec/media/properties.ts +23 -23
  275. package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
  276. package/test/unit/spec/meeting/index.js +2811 -117
  277. package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
  278. package/test/unit/spec/meeting/muteState.js +81 -0
  279. package/test/unit/spec/meeting/request.js +12 -0
  280. package/test/unit/spec/meeting/utils.js +179 -16
  281. package/test/unit/spec/meeting/voicea-meeting.ts +85 -1
  282. package/test/unit/spec/meeting-info/meetinginfov2.js +76 -10
  283. package/test/unit/spec/meetings/index.js +544 -49
  284. package/test/unit/spec/meetings/request.js +141 -0
  285. package/test/unit/spec/meetings/utils.js +402 -51
  286. package/test/unit/spec/member/index.js +7 -0
  287. package/test/unit/spec/member/util.js +89 -0
  288. package/test/unit/spec/members/index.js +216 -0
  289. package/test/unit/spec/members/request.js +37 -1
  290. package/test/unit/spec/members/utils.js +63 -0
  291. package/test/unit/spec/multistream/mediaRequestManager.ts +501 -37
  292. package/test/unit/spec/reachability/index.ts +128 -46
  293. package/test/unit/spec/reachability/util.ts +31 -0
  294. package/test/unit/spec/recording-controller/index.js +9 -8
  295. package/test/unit/spec/roap/turnDiscovery.ts +20 -0
  296. package/test/unit/spec/webinar/index.ts +332 -31
@@ -0,0 +1,120 @@
1
+ <!-- ───────────────────────────────
2
+ Template: AGENTS.md
3
+ Template-ID: agents
4
+ Generates: AGENTS.md
5
+ Description: Agent entry contract — first file every AI agent reads (commands, rules, boundaries, routing).
6
+ Library ver: 0.2.2
7
+ Last updated: 2026-07-22
8
+ ─────────────────────────────── -->
9
+
10
+ # AGENTS.md — <repo name>
11
+
12
+ > You are the agent entry point — read first. Next: router [`SPEC_INDEX.md`](ai-docs/SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ai-docs/ARCHITECTURE.md). Load this + `SPEC_INDEX.md` first; pull module/standing docs on demand. (Multi-repo: a workspace-level `AGENTS.md` may sit above this one.)
13
+ > Context-efficiency: link to canonical docs — don't duplicate them; keep this file under ~200 lines.
14
+
15
+ <!--
16
+ ROOT FILE 1 of 3. The agent entry point — first file every automation agent reads. KEEP UNDER
17
+ ~200 LINES — link to ai-docs/SPEC_INDEX.md and module docs instead of
18
+ duplicating. Fill every <...> from REAL repo evidence — never invent commands, paths, flags.
19
+ Headings are flat; sections preceded by `<!-- Include if: ... -->` are kept only when the condition
20
+ holds. Each section comment gives Capture (what to write) / Avoid (the common mistake) / Example.
21
+ -->
22
+
23
+ > Cross-tool context file. Auto-loaded by AI coding agents. If a module ships its own
24
+ > `AGENTS.md` agent-entry file, that file layers on top of this root file. (A module's
25
+ > high-level design lives in the manifest-routed module spec, source-local as `<module-path>/ai-docs/<module-name>-spec.md` by default, not in an `AGENTS.md`.)
26
+
27
+ ## Repo Overview
28
+ <!-- Capture: what the repo is in 1-3 sentences + an is/is-NOT list. Avoid: marketing prose or omitting the
29
+ is-NOT list (it prevents the most common agent misunderstandings). Example: "A service/library that
30
+ owns <domain capability>. It is NOT <adjacent app/system> and does NOT own <external data>." -->
31
+ **<repo>** is <one-to-three sentences: what it is>.
32
+
33
+ **What it is:**
34
+ - <bullet>
35
+ **What it is NOT:**
36
+ - ❌ <bullet>
37
+
38
+ ## Tech Stack
39
+ <!-- Capture: language+version, framework, build tool, test frameworks (datastores/messaging only if present).
40
+ Avoid: listing libraries the repo doesn't actually use. Example: "TypeScript 5.4, Node 20, Fastify, Vitest." -->
41
+ - <language + version>, <framework>, <build tool>
42
+ - <test frameworks; datastores/messaging only if the repo has them>
43
+
44
+ ## Architecture
45
+ <!-- Capture: ONE high-level diagram in the shape that fits the repo. Avoid: pasting full detail (that lives in
46
+ ARCHITECTURE.md). Example: a service's request→handler→store flow, or a library's consumer→public-API view. -->
47
+ ```
48
+ <one high-level diagram: a running service → layered/flow; a library → consumer→public-API→internal; a UI → component-tree→state>
49
+ ```
50
+ → Full repo architecture & component responsibilities: **[ARCHITECTURE.md](./ai-docs/ARCHITECTURE.md)**
51
+
52
+ ## Module / Package Structure
53
+ <!-- Capture: an abbreviated tree of the key modules, one line each. Avoid: a full file dump. Example:
54
+ "src/<module-a>/ — <capability>; src/<module-b>/ — <capability>; src/<edge>/ — <entry points>." -->
55
+ ```
56
+ <abbreviated source tree of key modules; one line each>
57
+ ```
58
+ → Per-module docs and the spec router: **[ai-docs/SPEC_INDEX.md](./ai-docs/SPEC_INDEX.md)**
59
+
60
+ ## Critical Rules
61
+ <!-- Capture: the 5-10 non-negotiables drawn from THIS repo's real review corrections; the rule LIST is
62
+ universal, the CONTENT is repo-specific. Avoid: a generic best-practice list. Example: "All <domain unit>
63
+ values use <canonical representation> — never convert implicitly." (network API → validation/authz/resilience; library → semver;
64
+ UI → a11y/design-tokens; plus the repo's real error/format/import idioms.) -->
65
+ 1. **Code is the source of truth.** Never invent an API, path, event, flag, or constant — read the real file.
66
+ 2. **Ask before coding.** Present a plan / Spec Summary; wait for confirmation.
67
+ 3. <rule 3 — a real recurring correction from this repo's reviews>
68
+
69
+ ## Essential Commands
70
+ <!-- Capture: the real install/build/test/lint commands, mirrored from the manifest `commands` by role
71
+ (never guessed or copied from another repo). Keep this to the everyday loop; the full command
72
+ surface and test tiers live in `ai-docs/GETTING_STARTED.md` and `ai-docs/TEST_INDEX.md`. Example:
73
+ Install `npm ci` · Test `npm test` · Lint `npm run lint`. -->
74
+ | Role | Command |
75
+ |---|---|
76
+ | Install | `<cmd>` |
77
+ | Build | `<cmd>` |
78
+ | Unit test | `<cmd>` |
79
+ | Lint/format | `<cmd>` |
80
+ → Full command surface, toolchain, and registries: **[GETTING_STARTED.md](./ai-docs/GETTING_STARTED.md)** · test tiers & coverage gate: **[TEST_INDEX.md](./ai-docs/TEST_INDEX.md)**
81
+
82
+ ## Common Gotchas
83
+ <!-- Capture: the latent-bug edges (mine incidents + tribal knowledge), each with the failure it causes.
84
+ Avoid: generic advice. Example: "<domain unit> uses <canonical representation>; passing alternate units silently corrupts results." -->
85
+ 1. <gotcha — specific, with the failure it causes>
86
+
87
+ ## Pre-Commit Checklist
88
+ <!-- Capture: the must-pass checks before commit, including a repo-specific item. Avoid: a generic checklist
89
+ that doesn't reflect this repo's gates. Example: add "[ ] <repo-specific invariant> is preserved". -->
90
+ - [ ] Tests pass; coverage meets the repo bar
91
+ - [ ] Spec/docs updated in the same change (spec-currency)
92
+ - [ ] No hardcoded secrets; inputs validated
93
+ - [ ] <repo-specific item>
94
+
95
+ <!-- Include if: the repo uses prompt-mode overrides like /adhoc or /quick -->
96
+ ## Prompt Overrides (`/adhoc`, `/quick`)
97
+ <!-- Capture: the real bypass modes and what each skips. Avoid: implying correctness rules are ever bypassed.
98
+ Example: "/adhoc skips the process scaffold; validation + security rules still apply." -->
99
+ - `/adhoc` = full bypass (skip process overhead); `/quick` = partial bypass; correctness rules still apply.
100
+
101
+ <!-- Include if: the repo's flows depend on external authenticated sources (ticket tracker / wiki / source host / design docs) -->
102
+ ## External Source Access
103
+ <!-- Capture: each non-secret source/provider map the flows depend on + what to do if access is missing.
104
+ Avoid: storing tokens, guessing data a missing server would have provided, or hardcoding one vendor.
105
+ Example: ticket-tracker down → STOP and ask for configuration or pasted source content. -->
106
+ | Provider class | Source / host pattern | Preferred access | If unavailable |
107
+ |---|---|---|---|
108
+ | ticket-tracker | <host/pattern> | connector / cli / rest | STOP and ask — never guess |
109
+ | wiki/docs | <host/pattern> | connector / cli / rest / public | STOP and ask or request pasted source |
110
+ | source-host | <host/pattern> | connector / cli / rest | STOP and ask |
111
+
112
+ <!-- Include if: the repo runs automated processes that need guaranteed compliance (strict mode) -->
113
+ ## Strict Compliance Mode (automation)
114
+ <!-- Capture: when strict mode applies and how gates behave. Avoid: leaving "strict" undefined. Example:
115
+ "In CI auto-runs: load all required specs upfront; first violation halts; bounded retries." -->
116
+ Load all required specs upfront; verification gates block; stop on first violation. See ai-docs/SPEC_INDEX.md.
117
+
118
+ ---
119
+ **SDD coverage:** this repo's per-module coverage state lives in `.sdd/manifest.json` (mirror in
120
+ `ai-docs/SPEC_INDEX.md`). Use that state to decide whether the spec is authoritative or code must be cross-checked.
@@ -0,0 +1,206 @@
1
+ <!-- ───────────────────────────────
2
+ Template: ARCHITECTURE
3
+ Template-ID: architecture
4
+ Generates: ai-docs/ARCHITECTURE.md
5
+ Description: Repo/component architecture — components, responsibilities, interactions, cross-cutting posture.
6
+ Library ver: 0.2.2
7
+ Last updated: 2026-06-30
8
+ ─────────────────────────────── -->
9
+
10
+ # ARCHITECTURE — <repo name>
11
+
12
+ > Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md). This is the system architecture; per-module detail lives in each manifest-routed module spec, source-local as `<module-path>/ai-docs/<module-name>-spec.md` by default.
13
+ > Context-efficiency: link to canonical docs — don't duplicate them; this loads on demand, not upfront.
14
+
15
+ <!--
16
+ ROOT FILE 2 of 3. Repo/component-level architecture — components, their RESPONSIBILITIES, and how they
17
+ interact. Distinct from a single module's source-local spec at
18
+ <module-path>/ai-docs/<module-name>-spec.md. Diagrams from real code, never from memory.
19
+ Headings are flat; universal sections are always present (name each for what the repo IS); sections
20
+ preceded by `<!-- Include if: ... -->` are kept only when the condition holds. Each section comment gives
21
+ Capture / Avoid / Example.
22
+ -->
23
+
24
+ ## Design Overview
25
+ <!-- Capture: the system's purpose, shape, and the key design choices that explain why it looks like this.
26
+ Avoid: a feature list with no rationale. Example: "Event-driven so intake and processing scale
27
+ independently; `<component>` is the single writer for `<domain object>`." -->
28
+ <2-3 paragraphs>
29
+
30
+ ## Component Inventory & Responsibilities
31
+ <!-- Capture: one row per component with a SINGLE clear responsibility + docs link. Avoid:
32
+ a component that "does everything" or a missing owner. Example: "`<module-a>/` — <single responsibility> —
33
+ <module-a>/ai-docs/<module-a>-spec.md". -->
34
+ | Component | Responsibility (one line) | Docs |
35
+ |---|---|---|
36
+ | `<module>/` | <what it owns> | `<module-path>/ai-docs/<module-name>-spec.md` |
37
+
38
+ ## Component Interaction
39
+ <!-- Capture: a diagram of components + the calls/events/imports between them, plus a narrative of the main
40
+ paths. Avoid: a box-only diagram with no edges. Example: "<edge> → <module-a> → <module-b>; <module-b> emits <DomainEvent>." -->
41
+ ```
42
+ <diagram: components + the calls/events/imports between them. mermaid or puml.>
43
+ ```
44
+ <Narrative: the main paths; entry points; who calls/imports whom.>
45
+
46
+ ## Execution & Flow
47
+ <!--
48
+ Capture: the representative end-to-end flow, grounded in real code (file path); NAME the heading for what
49
+ the repo is — service → "Request / Event Flow"; per-call fn → "Invocation Flow"; library → "Init & Call
50
+ Flow"; batch → "Pipeline / Job Flow"; build tool → "Build / Generation Flow".
51
+ Avoid: a vague heading like "Flow", or describing intended (not actual) flow.
52
+ Example (service): "POST /<resource> → validate → <component>.save → emit <ResourceCreated> → 201."
53
+ -->
54
+ <the representative end-to-end flow for this repo>
55
+
56
+ ## Dependencies
57
+ <!-- Capture: each dependency, how it's used, and its failure/version handling. Avoid: omitting fallback or
58
+ version floor. Example: "<cache/store> | external | idempotency keys | fail-closed, bounded TTL." -->
59
+ | Dependency | Type (internal / external / peer) | How used | Failure / version handling |
60
+ |---|---|---|---|
61
+ | <dep> | <type> | <usage> | <fallback / peer-range / timeout> |
62
+
63
+ <!-- Include if: the repo owns a datastore (persists its own data) [condition-id: repo.owns_datastore] -->
64
+ ### Data & Schema
65
+ <!-- Capture: the datastores, key schemas, cache patterns, migration discipline. Avoid: data owned elsewhere.
66
+ Example: "<datastore> `<entity_table>`, `<event_table>`; migrations expand→migrate→contract." -->
67
+ - <datastores, key schemas, cache patterns, migration discipline>
68
+
69
+ <!-- Include if: the repo holds client-side state (UI store / in-memory session model) [condition-id: repo.holds_client_state] -->
70
+ ### State Model
71
+ <!-- Capture: the state shape (store/slices) and what triggers transitions. Avoid: documenting server data.
72
+ Example: "<flow> slice {step, data}; NEXT_STEP advances; RESET on success." -->
73
+ - <the state shape and what triggers transitions>
74
+
75
+ ## Cross-Cutting Concerns
76
+ <!-- Capture: the security + observability posture every change must respect. Avoid: "TBD" — every repo has
77
+ some posture. Example: "Security: tokens checked at the boundary, secrets from managed storage. Observability: structured logs +
78
+ correlation id; request/error/duration metrics per route." -->
79
+ - **Security:** <authn/authz model, secret/token handling, sensitive-data rules>
80
+ - **Observability:** <logs/metrics/traces + correlation ids for a service; telemetry/error reporting for a client artifact>
81
+
82
+ ## Non-Functional Posture
83
+ <!--
84
+ Capture: the quality/scale expectations, NAMING the heading for what the repo is — service → "Scale & SLOs";
85
+ library → "Footprint & Compatibility"; UI app → "Performance & Accessibility"; CLI → "Performance &
86
+ Footprint"; batch → "Throughput & Cost". Avoid: copying numbers from another system.
87
+ Example (service): "Scale & SLOs — <target throughput>, p99 < <latency bound>, horizontal autoscale."
88
+ -->
89
+ <the non-functional posture in the form that fits this repo>
90
+
91
+ <!-- ===== Conditional extras — keep a section only when its Include-if condition holds ===== -->
92
+
93
+ <!-- Include if: components/services call each other or exchange events (most non-trivial repos) [condition-id: repo.components_interact] -->
94
+ ## Dependency / Interaction Topology
95
+ <!-- Capture: the who-calls-whom call graph AND the event topology, as a first-class view. Avoid: burying it
96
+ in prose. Example: graph edges "<edge>→<module-a> (call)", "<module-b>→<bus> <DomainEvent> (event)". -->
97
+ ```
98
+ <call + event graph: nodes are components/services, edges are calls (sync) and events (async)>
99
+ ```
100
+ | From | To | Kind (call / event) | Purpose |
101
+ |---|---|---|---|
102
+
103
+ <!-- Include if: the repo owns domain data spread across components [condition-id: repo.domain_data_across_components] -->
104
+ ## Object / Data Ownership
105
+ <!-- Capture: each domain object → the single component that may write it. Avoid: two components writing the
106
+ same object. Example: "<DomainObject> → <writer component>; read by <reader component>." -->
107
+ | Domain object | System-of-record (owning component) | Read by |
108
+ |---|---|---|
109
+
110
+ <!-- Include if: the repo caches data [condition-id: repo.caches_data] -->
111
+ ## Caching Catalog
112
+ <!-- Capture: each cache, backend, what it holds, TTL, invalidation. Avoid: a cache with no invalidation rule.
113
+ Example: "<resource-cache> | <cache backend> | <resource by key> | 60s | invalidate on <ResourceChanged>." -->
114
+ | Cache | Backend | What it holds | TTL | Invalidation trigger |
115
+ |---|---|---|---|---|
116
+
117
+ <!-- Include if: the repo has a logging/metrics/audit convention worth standardizing [condition-id: repo.observability_convention] -->
118
+ ## Observability Patterns
119
+ <!-- Capture: the logging format + id propagation, metric naming + key signals, what is audited. Avoid:
120
+ logging secrets/PII (see SECURITY). Example: "JSON logs w/ correlation_id; metrics <prefix>_*; audit on privileged changes." -->
121
+ - **Logging:** <structured format, correlation/request id propagation, what is never logged>
122
+ - **Metrics:** <naming convention, key signals, where dashboards live>
123
+ - **Audit:** <what is audited and where>
124
+
125
+ <!-- Include if: the repo deploys to / depends on infrastructure [condition-id: repo.deploys_to_infra] -->
126
+ ## Infrastructure Matrix
127
+ <!-- Capture: the datastores, messaging, and cloud services actually in use. Avoid: aspirational infra.
128
+ Example: "Datastores: <db>; Messaging: <broker>; Cloud/platform: <service>." -->
129
+ | Category | In use | Notes |
130
+ |---|---|---|
131
+ | Datastores | <db(s)> | |
132
+ | Messaging / streaming | <broker(s)> | |
133
+ | Cloud / platform services | <services> | |
134
+
135
+ <!-- Include if: the repo inherits a shared/base library stack every module uses [condition-id: repo.shared_base_libs] -->
136
+ ## Shared / Base Libraries
137
+ <!-- Capture: the shared libs every module inherits + version floor. Avoid: listing app deps here. Example:
138
+ "<shared-logging> (^3) — structured logger + correlation-id filter." -->
139
+ | Library | What every module inherits from it | Version floor |
140
+ |---|---|---|
141
+
142
+ <!-- Include if: the repo is a monorepo (multiple packages in one tree) [condition-id: repo.is_monorepo] -->
143
+ ## Package Map & Inter-Package Dependencies
144
+ <!-- Capture: workspace globs, package→responsibility (+ public/internal visibility), inter-package graph,
145
+ version-sync rule. Avoid: hidden cyclic deps. Example: "packages/* ; <adapter> depends on <core>; <core> depends on none." -->
146
+ - Workspace tooling and the workspace globs.
147
+ - Package → responsibility table, with a **visibility** column (public / internal) where it applies.
148
+ - Inter-package dependency graph (incl. workspace-internal deps) + the release/version-sync rule.
149
+ - Per-package notes where a package is a different kind than the repo (e.g. a library package next to an app).
150
+
151
+ <!-- Include if: the repo targets multiple platforms (mobile / desktop / embedded / cross-platform) [condition-id: repo.multi_platform] -->
152
+ ## Platform Matrix
153
+ <!-- Capture: per-platform the shared-core vs per-platform split + entry/build. Avoid: assuming one platform's
154
+ build works for all. Example: "iOS | shared core + SwiftUI shell | xcodebuild." -->
155
+ | Platform | Shared core vs per-platform | Entry / build | Notes |
156
+ |---|---|---|---|
157
+ | <platform> | <split> | <build> | |
158
+
159
+ <!-- Include if: the repo is published/consumed as a package (npm/Maven/PyPI/etc.) [condition-id: repo.published_package] -->
160
+ ## Release & Versioning
161
+ <!-- Capture: publish target, semver rules, deprecation policy, changelog obligation. Avoid: breaking changes
162
+ without a major bump. Example: "Published to the internal npm registry; semver; 1 minor deprecation window." -->
163
+ - Publish target; semver rules; deprecation policy; consumer-facing changelog obligation.
164
+
165
+ <!-- Include if: the repo is embedded into a host application (widget / micro-frontend / extension) [condition-id: repo.embedded_in_host] -->
166
+ ## Host Integration & Theming
167
+ <!-- Capture: how a host mounts/embeds it, required providers, pinned theme/peer versions. Avoid: assuming the
168
+ host's framework version. Example: "Mounts as <pay-widget>; needs ThemeProvider; peer react ^18." -->
169
+ - How a host application mounts/embeds this; required host providers; pinned design-token/theme versions;
170
+ peer/host-framework version floors.
171
+
172
+ <!-- Include if: cross-repo dependencies are material (consumed/published artifacts usually qualify; common in topology A) [condition-id: repo.cross_repo_deps_material] -->
173
+ ## Cross-Repo Dependency Graph
174
+ <!-- Capture: the repos this one consumes or is consumed by + what's exchanged. Avoid: an unscoped "see other
175
+ repos". Example: "Consumes shared-contracts (event schemas); consumed by reporting-svc." -->
176
+ - **Internal (same org):** <repos + what's exchanged>
177
+ - **Cross-project:** <repos + contract>
178
+ - **External read-only:** <repos referenced, not modified>
179
+ - **External services:** <APIs/backends called>
180
+
181
+ <!-- Include if: the security architecture warrants its own view (trust boundaries, identity flow) [condition-id: repo.security_arch_warranted] -->
182
+ ## Security Architecture
183
+ <!-- Capture: trust boundaries, token/identity flow, encryption at rest/in transit. Avoid: duplicating
184
+ SECURITY.md — keep this to the architectural view. Example: "mTLS between services; tokens minted at edge." -->
185
+ <trust boundaries, token/identity flow, encryption at rest/in transit>
186
+
187
+ ---
188
+ → Per-module orientation and detailed design live in each manifest-routed module spec, source-local as `<module-path>/ai-docs/<module-name>-spec.md` by default. Routing: `SPEC_INDEX.md`.
189
+
190
+ ## Architecture Reference Links
191
+ <!-- Capture: links to the local decision, pattern, and rule docs that explain or constrain this
192
+ architecture. Avoid: restating those docs here; summarize only why architecture readers should
193
+ consult them. -->
194
+ | Reference | Location | When to read |
195
+ |---|---|---|
196
+ | Architecture decisions | `adr/` | To understand why major design choices were made and what alternatives were rejected |
197
+ | Repo patterns | `patterns/` | To follow established implementation conventions reflected in this architecture |
198
+ | Enforceable rules | `RULES.md` + `rules/` | To understand constraints every architecture-affecting change must obey |
199
+
200
+ ## WS6 References
201
+ <!-- Capture: links to WS6 specs, platform architecture, shared service architecture, or enterprise
202
+ architecture documents when they exist. Avoid: copying WS6 content into this component repo doc;
203
+ link to the authoritative WS6 source and summarize only the local implication. -->
204
+ | WS6 artifact | Relevance to this repo | Link |
205
+ |---|---|---|
206
+ | <WS6 spec / architecture doc> | <why this repo should read it> | <url/path when available> |
@@ -0,0 +1,90 @@
1
+ <!-- ───────────────────────────────
2
+ Template: Contracts Catalog
3
+ Template-ID: contracts
4
+ Generates: ai-docs/CONTRACTS.md
5
+ Description: Standing as-built public-surface catalog (Provides/Requires) + compatibility policy.
6
+ Library ver: 0.2.2
7
+ Last updated: 2026-07-11
8
+ ─────────────────────────────── -->
9
+
10
+ # Contracts Catalog — <repo name>
11
+
12
+ > Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this root contract index; detailed contracts live with owning modules or canonical schema files. Machine source `.sdd/manifest.json`.
13
+ > Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
14
+
15
+ <!--
16
+ STANDING reference doc — the repo's stable public-surface index (the manifest's Provides/Requires promoted
17
+ to a doc). Prevents re-creating an existing endpoint/event or breaking a consumer. Detailed schemas and
18
+ operation-level behavior belong in native schema/API files or module-local specs.
19
+ Keep this file compact: one row per public surface, with owner, compatibility, and a detail link. Headings are flat;
20
+ sections preceded by `<!-- Include if: ... -->` are kept only when the
21
+ condition holds. Each section comment gives Capture / Avoid / Example. Fill from real code (file path).
22
+ -->
23
+
24
+ > Read before adding any public-facing surface — check here first. Machine source of truth: `.sdd/manifest.json`.
25
+ > Schema convention: prefer `.yaml` for OpenAPI/AsyncAPI unless this repo already standardizes on `.yml`; use
26
+ > `.proto`, `.graphql`, JSON Schema, or language-native SDK API outputs when those are the natural source.
27
+ > Do not inline large schemas here.
28
+
29
+ <!-- Include if: the repo exposes a network/HTTP API -->
30
+ ### API Endpoints
31
+ <!-- Capture: each public route — stable id, owner module, method+path, purpose, auth/scope, compatibility,
32
+ schema/detail link, where defined. Avoid: listing internal routes as public or pasting full schemas.
33
+ Example: "billing.invoice.get | billing/ | GET /<resource>/{id} | fetch <resource> |
34
+ scope read:<resource> | stable; additive fields only | openapi.yaml#/paths/... | routes/<resource>.ts." -->
35
+ | Contract ID | Owner module | Method + path | Purpose | Auth / scope | Compatibility / deprecation | Schema / detail link | Defined at |
36
+ |---|---|---|---|---|---|---|---|
37
+
38
+ <!-- Include if: the repo is imported as a library/package -->
39
+ ### Exported API & Types
40
+ <!-- Capture: each public symbol + owner package/module + signature + semver stability + detail link. Avoid:
41
+ documenting non-exported internals or inventing custom YAML for SDK APIs. Example:
42
+ "sdk.client.create | packages/sdk | createClient(opts): Client | stable semver surface |
43
+ api-report.md#createClient | index.ts." -->
44
+ | Contract ID | Owner module/package | Symbol | Signature | Stability / deprecation | Schema / detail link | Defined at |
45
+ |---|---|---|---|---|---|---|
46
+
47
+ <!-- Include if: the repo publishes or consumes events/messages -->
48
+ ### Events
49
+ <!-- Capture: each event — owner module, direction, payload schema link, delivery guarantees, deprecation.
50
+ Avoid: omitting ordering/delivery semantics or pasting large payloads. Example:
51
+ "billing.invoice.created | billing/ | publish | asyncapi.yaml#/channels/... | at-least-once |
52
+ additive fields only | events/<resource>.ts." -->
53
+ | Contract ID | Owner module | Event / topic | Direction (publish/consume) | Payload schema link | Delivery guarantees | Compatibility / deprecation | Defined at |
54
+ |---|---|---|---|---|---|---|---|
55
+
56
+ <!-- Include if: the repo exposes a CLI -->
57
+ ### Commands & Flags
58
+ <!-- Capture: each command, owner module, args/flags, exit codes, compatibility, where defined. Avoid:
59
+ undocumented exit codes. Example: "sync.job | cli/ | sync --since DATE | exit 0 ok / 2 bad-args |
60
+ stable flags | cli/sync.ts." -->
61
+ | Contract ID | Owner module | Command | Args / flags | Exit codes | Compatibility / deprecation | Defined at |
62
+ |---|---|---|---|---|---|---|
63
+
64
+ ## Requires — what this repo depends on
65
+ <!-- Capture: each outward dependency's consumed contract + availability assumption + fallback + version floor.
66
+ Avoid: omitting the fallback. Example: "rates-svc | GET /rates | assume 99.9% | cache last-good | v2." -->
67
+ | Dependency (service / package / datastore) | What is consumed | Schema / detail link | Availability assumption | Fallback on failure | Version floor |
68
+ |---|---|---|---|---|---|
69
+
70
+ ## Compatibility & Deprecation Policy
71
+ <!-- Capture: the rule for changing the above without breaking consumers. Avoid: a breaking change with no
72
+ version bump/window. Example: "No breaking change without a major bump + 1-release deprecation window." -->
73
+ - **Breaking-change rule:** <e.g. no breaking change without a version bump + consumer transition note + deprecation window>
74
+ - **Deprecation:** <how a surface is marked deprecated and for how long>
75
+
76
+ <!-- Include if: a non-trivial interface needs full schema/error detail beyond this catalog -->
77
+ ## Detailed Interface Docs
78
+ <!-- Capture: links to native schema/API files and per-interface docs (schema, error catalog, backward-compat).
79
+ Avoid: inlining huge schemas here. Example: "<Resource API> → openapi.yaml#/paths/... and
80
+ design/contracts/<resource-api>.md." -->
81
+ - Large/critical interfaces link to their canonical schema/API source and, when needed, a
82
+ module-local contract doc.
83
+
84
+ ## Maintenance
85
+ <!-- Capture: the rule that keeps the catalog + manifest in sync. Avoid: updating one and not the other. -->
86
+ - When a public surface is added/changed/removed, update this catalog, the owning module spec summary,
87
+ any canonical schema/API detail source, and `.sdd/manifest.json` in the same change.
88
+ - For incompatible changes, include the consumer transition/deprecation plan in the owning contract detail and
89
+ summarize it in the Compatibility / deprecation column.
90
+ - Cross-reference: domain terms → `GLOSSARY.md`; entities → `DATA_MODEL.md`.
@@ -0,0 +1,68 @@
1
+ <!-- ───────────────────────────────
2
+ Template: Data Model
3
+ Template-ID: data-model
4
+ Generates: ai-docs/DATA_MODEL.md
5
+ Description: Repo-wide entities, system-of-record ownership, relationships, and migration discipline.
6
+ Library ver: 0.2.2
7
+ Last updated: 2026-06-30
8
+ ─────────────────────────────── -->
9
+
10
+ # Data Model — <repo name>
11
+
12
+ > Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this doc; related: `GLOSSARY.md`, `CONTRACTS.md`, `SECURITY.md`.
13
+ > Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
14
+
15
+ <!--
16
+ STANDING reference doc — the repo-wide data model: entities owned, the system-of-record for each, schema/
17
+ relationships, and migration discipline. Only for repos that own persistent data. Headings are flat;
18
+ sections preceded by `<!-- Include if: ... -->` are kept only when the condition holds. Each section
19
+ comment gives Capture / Avoid / Example. Fill from the real schema/migrations (file path).
20
+ -->
21
+
22
+ > Read before changing any persisted shape. Respect ownership and the migration discipline below.
23
+
24
+ ## Entity Catalog
25
+ <!-- Capture: each persisted entity → meaning, the owning module (single writer), its table, where defined.
26
+ Avoid: an entity with two writers, or guessing the store. Example: "<Entity> | <domain meaning> | <module>
27
+ | <table> | db/schema.sql." -->
28
+ | Entity | What it represents | System-of-record (owning module) | Stored in (table/collection) | Defined at |
29
+ |---|---|---|---|---|
30
+ | `<entity>` | <meaning> | `<module>` | `<table>` | `<file path>` |
31
+
32
+ ## Relationships
33
+ <!-- Capture: how entities relate (1:1/1:N/N:M), ideally a diagram. Avoid: implied relationships with no FK/
34
+ join documented. Example: "<EntityA> 1:N <EntityB> (<entity_b>.<entity_a_id>)." -->
35
+ ```
36
+ <ER-style diagram or relationship list>
37
+ ```
38
+
39
+ ## Ownership & Access Rules
40
+ <!-- Capture: who may write vs read each entity + the access path. Avoid: cross-module direct writes that break
41
+ invariants. Example: "<Entity> | write: <owner module> only | read: <reader module> | via <Repository>." -->
42
+ | Entity | May write | May read | Access path (API/repo layer) |
43
+ |---|---|---|---|
44
+
45
+ <!-- Include if: the repo uses caching over its data -->
46
+ ## Caching
47
+ <!-- Capture: each cache over the data — backend, key, TTL, invalidation. Avoid: a cache with no invalidation.
48
+ Example: "<entity-cache> | <cache backend> | <entity>:{id} | 30s | bust on owner write." -->
49
+ | Cached data | Backend | Key | TTL | Invalidation trigger |
50
+ |---|---|---|---|---|
51
+
52
+ ## Migration Discipline
53
+ <!-- Capture: where migrations live, the ordering/expand-contract rule, the never-edit-shipped rule. Avoid:
54
+ destructive in-place migrations. Example: "db/migrations/NNNN_*.sql; expand→migrate→contract; additive first." -->
55
+ - Migrations are the source of truth for schema; <where they live + numbering/ordering rule>.
56
+ - Backward-compatible by default (expand → migrate → contract); <true-up/backfill expectation>.
57
+ - Never edit a shipped migration in place; add a new one.
58
+
59
+ <!-- Include if: some data is sensitive (PII/secret/regulated) -->
60
+ ## Sensitive Data
61
+ <!-- Capture: which entities hold sensitive data + encryption/retention/deletion per `SECURITY.md`. Avoid:
62
+ storing PII unencrypted or with no retention rule. Example: "Customer.email — encrypted; delete 30d after close." -->
63
+ - Classify per `SECURITY.md`; note encryption-at-rest, retention, and deletion obligations per entity.
64
+
65
+ ## Maintenance
66
+ <!-- Capture: the rule that keeps this current. Avoid: schema changes without a doc update. -->
67
+ - New/changed entity or migration → update this doc in the same change.
68
+ - Cross-reference: terms → `GLOSSARY.md`; exposed data contracts → `CONTRACTS.md`.
@@ -0,0 +1,111 @@
1
+ <!-- ───────────────────────────────
2
+ Template: Getting Started
3
+ Template-ID: getting-started
4
+ Generates: ai-docs/GETTING_STARTED.md
5
+ Description: Clone/build/run loop, toolchain, config/secrets, artifact registries, and multi-repo workspace layout.
6
+ Library ver: 0.2.2
7
+ Last updated: 2026-07-22
8
+ ─────────────────────────────── -->
9
+
10
+ # Getting Started — <repo name>
11
+
12
+ > Start here → root [`AGENTS.md`](../AGENTS.md) (agent entry) · router [`SPEC_INDEX.md`](SPEC_INDEX.md) · system [`ARCHITECTURE.md`](ARCHITECTURE.md). Then this doc to get a build/test loop running.
13
+ > Context-efficiency: link to canonical docs — don't duplicate them; load on demand, not upfront.
14
+
15
+ <!--
16
+ STANDING reference doc — zero to a running build/test loop, plus the multi-repo workspace layout. Fill every
17
+ command from the real build config (file path) — never guess. Headings are flat; sections preceded by
18
+ `<!-- Include if: ... -->` are kept only when the condition holds. Each section comment gives Capture /
19
+ Avoid / Example.
20
+ -->
21
+
22
+ ## Prerequisites
23
+
24
+ ### Toolchain
25
+ <!-- Capture: the exact language runtimes and build tools a contributor must install before any command
26
+ runs, one row each, mirrored from the manifest `toolchain` block. Read versions from committed config
27
+ (.nvmrc, .tool-versions, engines, compiler-release, Dockerfile); if a required version is not pinned
28
+ in the repo, capture it via the onboarding questionnaire rather than guessing. Avoid: "install Node"
29
+ with no version, or a version invented from memory. Example: JDK 21 · Maven 3.8+ · Docker. -->
30
+ | Tool | Version | Where it's pinned |
31
+ |---|---|---|
32
+ | `<tool>` | `<version>` | `<source file, or "declared during onboarding">` |
33
+
34
+ ### Access
35
+ <!-- Capture: the accounts/network access needed before anything runs — registries, VPN/egress, secret
36
+ store. Name registries here; the exact hosts and auth variable names live under Configuration & Secrets.
37
+ Avoid: omitting an internal registry or egress requirement the build depends on. Example: "read access
38
+ to the internal Maven registry; outbound egress to the artifact host; VPN for staging." -->
39
+ - <required registries / egress / VPN / accounts — or "none">
40
+
41
+ ## Clone & Install
42
+ <!-- Capture: the real clone + install commands. Avoid: a generic `npm install` if the repo pins `npm ci`.
43
+ Example: "git clone <url> && cd <repo> && pnpm install --frozen-lockfile". -->
44
+ ```bash
45
+ <git clone ...>
46
+ <install command — from the real build config>
47
+ ```
48
+
49
+ ## Build / Run / Test
50
+ <!-- Capture: the core loop copied from the manifest `commands`, one row per command role so a reader
51
+ (or a builder/tester workflow) runs the right command for each job. Avoid: inventing commands or
52
+ collapsing distinct roles (a package build without tests is not the full build). Include only the
53
+ roles the repo actually defines. Example: Install `mvn -N …` · Build `mvn verify` · Unit test
54
+ `mvn -pl '!test' test` · Integration test `mvn -pl test verify` · Coverage `mvn jacoco:check`. -->
55
+ | Role | Command |
56
+ |---|---|
57
+ | Install | `<cmd>` |
58
+ | Build (full, with tests) | `<cmd>` |
59
+ | Package (build without tests) | `<cmd>` |
60
+ | Run (local) | `<cmd>` |
61
+ | Unit test | `<cmd>` |
62
+ | Integration test | `<cmd>` |
63
+ | Coverage check | `<cmd>` |
64
+ | Lint / format | `<cmd>` |
65
+
66
+ ## First-Run Verification
67
+ <!-- Capture: one concrete check that proves the setup works. Avoid: "it should work". Example: "curl
68
+ localhost:8080/health → 200 {\"status\":\"ok\"}." -->
69
+ - <how to confirm it's working>
70
+
71
+ <!-- Include if: the repo needs local config / env vars / secrets to run -->
72
+ ## Configuration & Secrets
73
+ <!-- Capture: required config/env + where secrets come from (never hardcode). Avoid: committing a real .env.
74
+ Example: "Copy .env.example; fill DB_URL; secrets via the secret manager." -->
75
+ - Required config/env: <list>. Obtain secrets from <secret store> — never hardcode (see `SECURITY.md`).
76
+
77
+ <!-- Include if: the build resolves dependencies from an external or authenticated registry -->
78
+ ### Artifact Registries
79
+ <!-- Capture: each external artifact source the build resolves from, mirrored from the manifest
80
+ `registries` block: name, host, the settings file that points the build at it, and the NAMES of the
81
+ auth environment variables. Record names and hosts only — NEVER the credential values (see
82
+ `SECURITY.md`); the values are provided by the environment/pipeline. Avoid: pasting a token, omitting
83
+ the registry host, or dropping the auth variable names a fresh clone needs to authenticate.
84
+ Example: "internal-maven | artifacts.example.com | config/maven/settings.xml | ARTIFACTORY_USER,
85
+ ARTIFACTORY_TOKEN". -->
86
+ | Registry | Host | Settings file | Auth env-var names (values NOT stored) |
87
+ |---|---|---|---|
88
+ | `<name>` | `<host>` | `<settings file>` | `<VAR_NAME_1>, <VAR_NAME_2>` |
89
+
90
+ <!-- Include if: topology A — the product spans multiple repositories -->
91
+ ## Multi-Repo Workspace Layout
92
+ <!-- Capture: how the sibling repos are laid out locally so cross-repo work resolves. Avoid: assuming one clone
93
+ is enough for a multi-repo product.
94
+ Verify against the team's real workspace convention when available. -->
95
+ ```
96
+ <workspace-root>/
97
+ <owner>/<repo-a>/
98
+ <owner>/<repo-b>/
99
+ <shared spec or workspace-level AGENTS.md, if used>
100
+ ```
101
+ - Related repos and what each provides: see `ARCHITECTURE.md` (Cross-Repo Dependency Graph) and the workspace-level `AGENTS.md`.
102
+
103
+ <!-- Include if: the repo has a containerized or scripted dev environment -->
104
+ ## Dev Environment
105
+ <!-- Capture: the devcontainer/compose/make target that brings up dependencies. Avoid: manual multi-step setup
106
+ when a one-command env exists. Example: "make dev brings up <datastore> + the app via docker compose." -->
107
+ - <devcontainer / compose / make target that brings up dependencies>
108
+
109
+ ## Where to Go Next
110
+ - Agent entry: `../AGENTS.md` · System shape: `ARCHITECTURE.md` · Routing: `SPEC_INDEX.md`
111
+ - Conventions: `patterns/` + `rules/` (and `RULES.md`).