@rashidee/co2 1.2.5

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 (190) hide show
  1. package/dist/index.js +25449 -0
  2. package/drizzle/0000_remarkable_charles_xavier.sql +210 -0
  3. package/drizzle/0001_wise_wolf_cub.sql +13 -0
  4. package/drizzle/0002_secret_spyke.sql +16 -0
  5. package/drizzle/0003_workspace_config_singleton.sql +16 -0
  6. package/drizzle/0004_terminal_claim_v120.sql +11 -0
  7. package/drizzle/0005_brainstorm_v124.sql +10 -0
  8. package/drizzle/0006_project_v140.sql +6 -0
  9. package/drizzle/0007_prd_wizard_v124.sql +14 -0
  10. package/drizzle/0008_workflow_artifact_v126.sql +24 -0
  11. package/drizzle/0009_project_import_v150.sql +7 -0
  12. package/drizzle/0010_quality_v151.sql +3 -0
  13. package/drizzle/meta/0000_snapshot.json +1335 -0
  14. package/drizzle/meta/0001_snapshot.json +1416 -0
  15. package/drizzle/meta/0002_snapshot.json +1510 -0
  16. package/drizzle/meta/_journal.json +83 -0
  17. package/package.json +41 -0
  18. package/plugin/.claude-plugin/marketplace.json +36 -0
  19. package/plugin/.claude-plugin/plugin.json +22 -0
  20. package/plugin/README.md +625 -0
  21. package/plugin/SKILLS.md +350 -0
  22. package/plugin/co2.svg +5 -0
  23. package/plugin/commands/brainstorm-loop.md +129 -0
  24. package/plugin/skills/conductor-defect/SKILL.md +898 -0
  25. package/plugin/skills/conductor-feature-develop/SKILL.md +1383 -0
  26. package/plugin/skills/conductor-feature-develop/references/implementation-domain-template.md +131 -0
  27. package/plugin/skills/conductor-feature-develop/references/implementation-master-template.md +89 -0
  28. package/plugin/skills/conductor-feature-develop/references/playwright-setup.md +224 -0
  29. package/plugin/skills/conductor-feature-prepare/SKILL.md +604 -0
  30. package/plugin/skills/depgen-k8s/SKILL.md +468 -0
  31. package/plugin/skills/depgen-k8s/references/dockerfile-laravel.md +197 -0
  32. package/plugin/skills/depgen-k8s/references/dockerfile-nodejs.md +163 -0
  33. package/plugin/skills/depgen-k8s/references/dockerfile-spring-boot.md +174 -0
  34. package/plugin/skills/depgen-k8s/references/k8s-patterns.md +869 -0
  35. package/plugin/skills/mockgen-shadcn/SKILL.md +1067 -0
  36. package/plugin/skills/mockgen-shadcn/references/admin-layout-template.md +1467 -0
  37. package/plugin/skills/mockgen-shadcn/references/mockup-hub-template.md +498 -0
  38. package/plugin/skills/mockgen-shadcn/references/mockup-index-template.md +216 -0
  39. package/plugin/skills/mockgen-tailwind/SKILL.md +904 -0
  40. package/plugin/skills/mockgen-tailwind/references/admin-layout-template.md +720 -0
  41. package/plugin/skills/mockgen-tailwind/references/mockup-hub-template.md +498 -0
  42. package/plugin/skills/mockgen-tailwind/references/mockup-index-template.md +190 -0
  43. package/plugin/skills/modelgen-nosql/SKILL.md +617 -0
  44. package/plugin/skills/modelgen-nosql/references/model-extraction-methodology.md +497 -0
  45. package/plugin/skills/modelgen-nosql/references/nosql-design-guide.md +258 -0
  46. package/plugin/skills/modelgen-relational/SKILL.md +707 -0
  47. package/plugin/skills/modelgen-relational/references/model-extraction-methodology.md +499 -0
  48. package/plugin/skills/specgen-flutter-riverpod/SKILL.md +898 -0
  49. package/plugin/skills/specgen-flutter-riverpod/references/component-patterns.md +971 -0
  50. package/plugin/skills/specgen-flutter-riverpod/references/notification-patterns.md +457 -0
  51. package/plugin/skills/specgen-flutter-riverpod/references/routing-patterns.md +362 -0
  52. package/plugin/skills/specgen-flutter-riverpod/references/security-patterns.md +709 -0
  53. package/plugin/skills/specgen-flutter-riverpod/references/spec-template.md +1566 -0
  54. package/plugin/skills/specgen-flutter-riverpod/references/state-patterns.md +518 -0
  55. package/plugin/skills/specgen-flutter-riverpod/references/storage-patterns.md +370 -0
  56. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/SKILL.md +984 -0
  57. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/batch-patterns.md +359 -0
  58. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/messaging-patterns.md +468 -0
  59. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/modulith-patterns.md +461 -0
  60. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/reporting-patterns.md +803 -0
  61. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/security-patterns.md +501 -0
  62. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/spec-template.md +1268 -0
  63. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/web-patterns.md +301 -0
  64. package/plugin/skills/specgen-node-cli-web/SKILL.md +561 -0
  65. package/plugin/skills/specgen-node-cli-web/references/auth-patterns.md +293 -0
  66. package/plugin/skills/specgen-node-cli-web/references/cli-packaging-patterns.md +250 -0
  67. package/plugin/skills/specgen-node-cli-web/references/server-patterns.md +247 -0
  68. package/plugin/skills/specgen-node-cli-web/references/spec-template.md +401 -0
  69. package/plugin/skills/specgen-node-cli-web/references/testing-patterns.md +174 -0
  70. package/plugin/skills/specgen-react-mui/SKILL.md +789 -0
  71. package/plugin/skills/specgen-react-mui/references/component-patterns.md +1077 -0
  72. package/plugin/skills/specgen-react-mui/references/reporting-patterns.md +1998 -0
  73. package/plugin/skills/specgen-react-mui/references/routing-patterns.md +461 -0
  74. package/plugin/skills/specgen-react-mui/references/security-patterns.md +599 -0
  75. package/plugin/skills/specgen-react-mui/references/spec-template.md +1030 -0
  76. package/plugin/skills/specgen-react-mui/references/state-patterns.md +327 -0
  77. package/plugin/skills/specgen-react-tailwind/SKILL.md +859 -0
  78. package/plugin/skills/specgen-react-tailwind/references/component-patterns.md +1212 -0
  79. package/plugin/skills/specgen-react-tailwind/references/reporting-patterns.md +1529 -0
  80. package/plugin/skills/specgen-react-tailwind/references/routing-patterns.md +669 -0
  81. package/plugin/skills/specgen-react-tailwind/references/security-patterns.md +656 -0
  82. package/plugin/skills/specgen-react-tailwind/references/spec-template.md +1237 -0
  83. package/plugin/skills/specgen-react-tailwind/references/state-patterns.md +327 -0
  84. package/plugin/skills/specgen-sdk-java/SKILL.md +933 -0
  85. package/plugin/skills/specgen-sdk-java/references/api-extraction-patterns.md +247 -0
  86. package/plugin/skills/specgen-sdk-java/references/http-client-patterns.md +495 -0
  87. package/plugin/skills/specgen-sdk-java/references/packaging-patterns.md +366 -0
  88. package/plugin/skills/specgen-sdk-java/references/spec-template.md +956 -0
  89. package/plugin/skills/specgen-spring-jpa-jtehtmx/SKILL.md +1284 -0
  90. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/batch-patterns.md +1224 -0
  91. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/jasper-patterns.md +1638 -0
  92. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/messaging-patterns.md +512 -0
  93. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/modulith-patterns.md +354 -0
  94. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/security-patterns.md +551 -0
  95. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/spec-template.md +2502 -0
  96. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/web-patterns.md +503 -0
  97. package/plugin/skills/specgen-spring-jpa-restapi/SKILL.md +990 -0
  98. package/plugin/skills/specgen-spring-jpa-restapi/references/batch-patterns.md +1224 -0
  99. package/plugin/skills/specgen-spring-jpa-restapi/references/messaging-patterns.md +512 -0
  100. package/plugin/skills/specgen-spring-jpa-restapi/references/modulith-patterns.md +279 -0
  101. package/plugin/skills/specgen-spring-jpa-restapi/references/reporting-patterns.md +1536 -0
  102. package/plugin/skills/specgen-spring-jpa-restapi/references/restapi-patterns.md +722 -0
  103. package/plugin/skills/specgen-spring-jpa-restapi/references/security-patterns.md +351 -0
  104. package/plugin/skills/specgen-spring-jpa-restapi/references/spec-template.md +553 -0
  105. package/plugin/skills/specgen-ts-cli/SKILL.md +861 -0
  106. package/plugin/skills/specgen-ts-cli/references/async-patterns.md +1101 -0
  107. package/plugin/skills/specgen-ts-cli/references/command-patterns.md +383 -0
  108. package/plugin/skills/specgen-ts-cli/references/config-patterns.md +430 -0
  109. package/plugin/skills/specgen-ts-cli/references/database-patterns.md +750 -0
  110. package/plugin/skills/specgen-ts-cli/references/packaging-patterns.md +426 -0
  111. package/plugin/skills/specgen-ts-cli/references/spec-template.md +1391 -0
  112. package/plugin/skills/specgen-ts-cli/references/testing-patterns.md +909 -0
  113. package/plugin/skills/testgen-functional/SKILL.md +1381 -0
  114. package/plugin/skills/tracegen-matrix/SKILL.md +243 -0
  115. package/plugin/skills/util-preparek8senv/SKILL.md +422 -0
  116. package/plugin/skills/util-projectinit/SKILL.md +307 -0
  117. package/plugin/skills/util-projectinit/reference/brainstorm-loop.md +129 -0
  118. package/plugin/skills/util-projectinit/reference/brainstorm-protocol.md +144 -0
  119. package/plugin/skills/util-projectinit/reference/brainstorm-setup-guide.md +153 -0
  120. package/plugin/skills/util-projectinit/reference/brainstorm-template-appdev.md +87 -0
  121. package/plugin/skills/util-projectinit/reference/co2-context-generation-guide.md +761 -0
  122. package/plugin/skills/util-projectsync/SKILL.md +501 -0
  123. package/plugin/skills/util-updprd/SKILL.md +324 -0
  124. package/plugin/skills/util-usanalyzer/SKILL.md +307 -0
  125. package/plugin/skills/util-ustagger/SKILL.md +154 -0
  126. package/static/assets/abnfDiagram-VRR7QNED-DvPuwyCV.js +1 -0
  127. package/static/assets/arc-DRKw7sjs.js +1 -0
  128. package/static/assets/architectureDiagram-ZJ3FMSHR-CaNcxUbC.js +36 -0
  129. package/static/assets/blockDiagram-677ZJIJ3-Demd4AOK.js +132 -0
  130. package/static/assets/c4Diagram-LMCZKHZV-PVKUfc2x.js +10 -0
  131. package/static/assets/channel-C2nVbuwv.js +1 -0
  132. package/static/assets/chunk-2Q5K7J3B-CExf8ww_.js +1 -0
  133. package/static/assets/chunk-32BRIVSS-CFPaoONF.js +1 -0
  134. package/static/assets/chunk-5VM5RSS4-DE2esM67.js +15 -0
  135. package/static/assets/chunk-EX3LRPZG-SON_YdDG.js +231 -0
  136. package/static/assets/chunk-JWPE2WC7-Qxah8LNr.js +1 -0
  137. package/static/assets/chunk-MOJQB5TN-BcWGQV3j.js +88 -0
  138. package/static/assets/chunk-RYQCIY6F-DkDj-OR5.js +1 -0
  139. package/static/assets/chunk-V7JOEXUC-BlI1Mrah.js +206 -0
  140. package/static/assets/chunk-VR4S4FIN-Agf__duj.js +1 -0
  141. package/static/assets/chunk-XXDRQBXY-B5CfAh85.js +1 -0
  142. package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +1 -0
  143. package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +1 -0
  144. package/static/assets/cose-bilkent-JH36ORCC-DO0cQkcy.js +1 -0
  145. package/static/assets/cynefin-VYW2F7L2-CfOnsnXc.js +178 -0
  146. package/static/assets/cynefinDiagram-TSTJHNR4-BJ8tULAv.js +62 -0
  147. package/static/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
  148. package/static/assets/dagre-VKFMJZFB-DfjwzHqP.js +4 -0
  149. package/static/assets/defaultLocale-DX6XiGOO.js +1 -0
  150. package/static/assets/diagram-FQU43EPY-CndSOIIM.js +3 -0
  151. package/static/assets/diagram-G47NLZAW-Czf5hN0Z.js +24 -0
  152. package/static/assets/diagram-NH7WQ7WH-COAyojGh.js +24 -0
  153. package/static/assets/diagram-OA4YK3LP-H8PoiN2m.js +30 -0
  154. package/static/assets/diagram-WEI45ONY-DzcaVzjp.js +41 -0
  155. package/static/assets/ebnfDiagram-CCIWWBDH-DPazGYLJ.js +1 -0
  156. package/static/assets/erDiagram-Q63AITRT-Bo-fubgF.js +85 -0
  157. package/static/assets/flowDiagram-23GEKE2U-CSvxUDwh.js +156 -0
  158. package/static/assets/ganttDiagram-NO4QXBWP-DnBveWX6.js +292 -0
  159. package/static/assets/gitGraphDiagram-IHSO6WYX-B3rVL8c-.js +106 -0
  160. package/static/assets/graph-C9eacEi8.js +1 -0
  161. package/static/assets/index-LZSQkLE2.css +41 -0
  162. package/static/assets/index-y7XDSgMG.js +495 -0
  163. package/static/assets/infoDiagram-FWYZ7A6U-CvWV9yy2.js +2 -0
  164. package/static/assets/init-Gi6I4Gst.js +1 -0
  165. package/static/assets/ishikawaDiagram-FXEZZL3T-DF28a1N6.js +70 -0
  166. package/static/assets/journeyDiagram-5HDEW3XC-CB6CugYk.js +139 -0
  167. package/static/assets/kanban-definition-HUTT4EX6-ResSLF6d.js +89 -0
  168. package/static/assets/katex-C5jXJg4s.js +257 -0
  169. package/static/assets/layout-DEXfKzaS.js +1 -0
  170. package/static/assets/linear-CLO--ryk.js +1 -0
  171. package/static/assets/map-Czzmt4hB.js +1 -0
  172. package/static/assets/mindmap-definition-LN4V7U3C-BvW3EbxX.js +96 -0
  173. package/static/assets/ordinal-Cboi1Yqb.js +1 -0
  174. package/static/assets/pegDiagram-2B236MQR-BHCgqrrM.js +1 -0
  175. package/static/assets/pieDiagram-ENE6RG2P-DVmCQ5FA.js +39 -0
  176. package/static/assets/quadrantDiagram-ABIIQ3AL-B3e5KR52.js +7 -0
  177. package/static/assets/railroadDiagram-RFXS5EU6-Csv5ysLc.js +1 -0
  178. package/static/assets/requirementDiagram-TGXJPOKE-DOMVzvnB.js +84 -0
  179. package/static/assets/sankeyDiagram-HTMAVEWB-B1dcTOvy.js +40 -0
  180. package/static/assets/sequenceDiagram-DBY2YBRQ-BY414yeO.js +162 -0
  181. package/static/assets/sizeCapture-X5ZJPWSS-CuJfrfBN.js +1 -0
  182. package/static/assets/stateDiagram-2N3HPSRC-FX4rJkzV.js +1 -0
  183. package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +1 -0
  184. package/static/assets/swimlanes-5IMT3BWC-Sfy58mmv.js +2 -0
  185. package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +8 -0
  186. package/static/assets/timeline-definition-FHXFAJF6-CmV7by8p.js +120 -0
  187. package/static/assets/vennDiagram-L72KCM5P-FqIyFZFt.js +34 -0
  188. package/static/assets/wardleyDiagram-EHGQE667-BZ06O45i.js +78 -0
  189. package/static/assets/xychartDiagram-FW5EYKEG-BOkffR06.js +7 -0
  190. package/static/index.html +24 -0
@@ -0,0 +1,617 @@
1
+ ---
2
+ name: modelgen-nosql
3
+ model: claude-opus-4-8
4
+ effort: xhigh
5
+ description: >
6
+ Extract NoSQL document models from Agile user stories using Domain-Driven Design (DDD) principles.
7
+ Produces Mermaid class diagrams showing document structure (embedded vs referenced), JSON schema
8
+ examples per collection, and detailed model documentation per module. Use this skill whenever the
9
+ user asks to extract a NoSQL module model, NoSQL document model, NoSQL schema, collection design,
10
+ or document structure from user stories. Also trigger when the user provides user stories grouped
11
+ by module and asks for NoSQL data modeling, document-oriented design, or embed-vs-reference analysis.
12
+ Even if the user says "design my NoSQL collections" or "what documents do I need", this skill applies
13
+ if the input contains structured Agile user stories with module groupings. Do NOT use this skill for
14
+ RDBMS or relational schema extraction — use the modelgen-relational skill for that.
15
+ Also trigger when the user says "update the model" or "upgrade the model" to
16
+ incrementally evolve an existing NoSQL document model based on changes in PRD.md.
17
+ Accepts an application name (mandatory), version (mandatory), and optional module argument
18
+ (e.g., `/modelgen-nosql hub_middleware v1.0.3` or `/modelgen-nosql hub_middleware v1.0.3 module:Location Information`).
19
+ ---
20
+
21
+ # NoSQL Model Generator
22
+
23
+ Extract document-oriented NoSQL models from Agile user stories following a systematic DDD methodology.
24
+ This skill is database-agnostic and produces generic document models applicable to MongoDB, Couchbase,
25
+ DynamoDB, Firestore, CosmosDB, or any document-oriented NoSQL store.
26
+
27
+ ## When to Use
28
+
29
+ Trigger this skill when the user asks to:
30
+ - Extract a NoSQL module model or document model
31
+ - Design NoSQL collections or document structures from user stories
32
+ - Perform embed-vs-reference analysis on entities
33
+ - Generate document schemas from requirements
34
+ - Update an existing NoSQL document model based on story changes
35
+ - Upgrade the model to a new version
36
+ - Detect and fix outdated/invalid model elements
37
+
38
+ Do NOT use for RDBMS/relational schema extraction — use the modelgen-relational skill for that.
39
+
40
+ ## Version Gate
41
+
42
+ Before starting any work, resolve the application folder first (see Input Resolution below), then check `CHANGELOG.md` in the application folder (`<app_folder>/CHANGELOG.md`):
43
+
44
+ 1. If `<app_folder>/CHANGELOG.md` does not exist, skip this check (first-ever execution for this application).
45
+ 2. If `<app_folder>/CHANGELOG.md` exists, scan all `## vX.Y.Z` headings and determine the **highest version** using semantic versioning comparison.
46
+ 3. Compare the requested version against the highest version:
47
+ - If requested version **>=** highest version: proceed normally.
48
+ - If requested version **<** highest version: **STOP immediately**. Print: `"Version {requested} is lower than the current application version {highest} recorded in <app_folder>/CHANGELOG.md. Execution rejected."` Do NOT proceed with any work.
49
+
50
+ ## Input Resolution
51
+
52
+ The skill requires mandatory `<application>` and `<version>` arguments, with an optional `module:` argument.
53
+
54
+ ### Argument Syntax
55
+
56
+ | Argument | Required | Description |
57
+ |----------|----------|-------------|
58
+ | `<application>` | Yes | Application name — matched against root-level application folders |
59
+ | `<version>` | Yes | Version label (e.g., `v1.0.3`). Used for version-filtered generation. |
60
+ | `module:<name>` | No | Limit generation to a single module |
61
+
62
+ | Format | Example | Meaning |
63
+ |--------|---------|---------|
64
+ | App + version | `/modelgen-nosql hub_middleware v1.0.3` | All modules, version-filtered |
65
+ | App + version + module | `/modelgen-nosql hub_middleware v1.0.3 module:Location Information` | Single module, version-filtered |
66
+ | Module quoted | `module:"Location Information"` | Quoted form (equivalent) |
67
+ | Module snake_case | `module:location_information` | Converted to title-case for matching |
68
+
69
+ ### Application Folder Resolution
70
+
71
+ 1. List root-level application folders that have a numeric prefix (e.g., `1_hub_middleware`, `2_hc_adapter`)
72
+ 2. Strip the leading `<number>_` prefix from each folder name (e.g., `1_hub_middleware` -> `hub_middleware`)
73
+ 3. Match the provided application name **case-insensitively** against the stripped folder names
74
+ 4. Accept `snake_case`, `kebab-case`, or title-case input (e.g., `hub_middleware`, `hub-middleware`, `Hub Middleware` all match `1_hub_middleware`)
75
+ 5. If no match is found, list all available application names and **stop**
76
+
77
+ ### Auto-Resolved Paths
78
+
79
+ | File | Resolved Path |
80
+ |------|---------------|
81
+ | PRD.md | `<app_folder>/context/PRD.md` |
82
+ | Output directory | `<app_folder>/context/model/` |
83
+
84
+ ### Module Matching Rules
85
+
86
+ 1. Match the specified module name **case-insensitively** against modules in PRD.md
87
+ 2. Convert `snake_case` input to title-case for matching (e.g., `location_information` → `Location Information`)
88
+ 3. If no module matches, **stop and report available module names** before doing any file writes
89
+ 4. Exactly one module must match — partial or ambiguous matches are rejected with suggestions
90
+
91
+ ### Module-Filtered Generation Mode
92
+
93
+ When a `module:` argument is provided, the skill operates in **module-filtered mode**:
94
+
95
+ | Aspect | Full Generation | Module-Filtered |
96
+ |--------|-----------------|-----------------|
97
+ | Per-module files (model.md, document-model.mermaid, schemas.json) for **target module** | Generate | Generate / overwrite |
98
+ | Per-module files for **other modules** | Generate | **SKIP — leave untouched** |
99
+ | Root `MODEL.md` | Generate full file | **Partial update** — only the target module's row in the Modules table, its Table of Contents section, and its Assumptions Summary row are updated. All other module sections remain untouched. |
100
+ | Cross-Module Dependencies in MODEL.md | Generate | Update only rows where source or target is the filtered module |
101
+ | Update History in MODEL.md | Generate | Append new entry scoped to the target module |
102
+
103
+ **Module filter is additive, not destructive:** When `module:` is specified, only the named module's content files are written/overwritten. All other module files remain untouched. If the target module does not exist in PRD.md, stop and report available module names before doing any file writes.
104
+
105
+ **First-time module generation:** If the output directory does not yet contain files for the target module (e.g., generating a new module into an existing model), create the module subdirectory and files normally, then update MODEL.md to include the new module.
106
+
107
+ ### Version Filtering (with or without module)
108
+
109
+ When a version argument is provided (with or without `module:`):
110
+
111
+ 1. Only process user stories from versions **up to and including** the specified version
112
+ 2. Stories from later versions are excluded from extraction
113
+ 3. Version comparison uses the ordering present in PRD.md (versions appear in document order, earlier = lower)
114
+ 4. The generated model reflects the state of the system at the specified version
115
+
116
+ When combined with `module:`, both filters apply: only stories in the target module at or below the target version are processed.
117
+
118
+ ---
119
+
120
+ ## Update Mode
121
+
122
+ This section defines the **incremental update** workflow for evolving an existing NoSQL document
123
+ model when user stories change across versions. Use this mode instead of full regeneration when
124
+ working with a previously generated model.
125
+
126
+ ### Update Mode Triggers
127
+
128
+ Activate update mode when the user says:
129
+ - "update the model"
130
+ - "upgrade the model"
131
+
132
+ The user must provide a **new version identifier** for the update (e.g., "1.1.0", "v2", "Sprint-4").
133
+
134
+ ### Update Mode Input Contract
135
+
136
+ | Element | Description |
137
+ |---------|-------------|
138
+ | **Existing Model Directory** | Path to previously generated output (must contain MODEL.md + module subdirectories with model.md, document-model.mermaid, and schemas.json) |
139
+ | **Updated PRD.md** | The updated user story file with changes (additions, modifications, removals) |
140
+ | **New Version** | Version label for this update (e.g., "1.1.0", "v2") |
141
+
142
+ ### Update Mode Processing Workflow
143
+
144
+ #### Phase U1: Baseline Loading
145
+
146
+ - Read all existing model files (MODEL.md, per-module model.md, document-model.mermaid, schemas.json)
147
+ - Build an inventory of current collections, embedded documents, fields, references, enums with their source story traceability tags
148
+
149
+ #### Phase U2: Change Detection (Diff Analysis)
150
+
151
+ - Parse the updated PRD.md
152
+ - Compare against source story references in existing model files
153
+ - Classify changes into:
154
+ - **ADDED** — New stories not referenced by any existing model element
155
+ - **MODIFIED** — Stories whose text has changed (same tag, different content)
156
+ - **REMOVED** — Stories referenced in the model but no longer present in PRD.md
157
+ - **UNCHANGED** — Stories with no changes
158
+
159
+ #### Phase U3: Staleness & Validity Check
160
+
161
+ For each existing model element (collection, embedded document, field, reference, enum value), check:
162
+ - **Orphaned elements**: Source stories entirely removed → flag for removal
163
+ - **Partially orphaned**: Some source stories removed but others remain → flag for review
164
+ - **Stale fields**: Source story text changed such that the field inference no longer holds → flag for update
165
+ - **Stale references**: Relationship patterns changed → flag for re-evaluation
166
+ - **Stale embed decisions**: Access patterns or cardinality changed → flag embed-vs-reference re-evaluation
167
+ - **Stale enums**: Qualifier terms changed or removed → flag for update
168
+ - **Contradictions**: New stories contradict existing model assumptions → flag
169
+
170
+ Produce a **Staleness Report** table:
171
+
172
+ | Element Type | Element Name | Module | Status | Reason | Affected Stories | Action |
173
+ |---|---|---|---|---|---|---|
174
+ | Collection | orders | Order Mgmt | ORPHANED | All source stories removed | [US-010] | REMOVE |
175
+ | Field | priority | orders | STALE | Source story US-005 modified | [US-005] | UPDATE |
176
+ | Embed Decision | address in orders | Order Mgmt | STALE | Access pattern changed | [US-012] | REVIEW |
177
+
178
+ Status values: `ORPHANED`, `STALE`, `CONTRADICTED`, `VALID`
179
+ Action values: `REMOVE`, `UPDATE`, `REVIEW`, `KEEP`
180
+
181
+ #### Phase U4: Incremental Extraction
182
+
183
+ - For ADDED stories: run the full 8-phase extraction pipeline (existing Phases 1–8)
184
+ - For MODIFIED stories: re-extract affected model elements, compare with existing, merge
185
+ - Re-evaluate embed-vs-reference decisions for any affected collections
186
+ - Apply new version tag to all new/modified elements
187
+
188
+ #### Phase U5: Model Merge
189
+
190
+ - Integrate new/updated elements into existing model
191
+ - Remove ORPHANED elements (after confirmation or auto-removal if clearly orphaned)
192
+ - Update version annotations on modified elements
193
+ - Preserve unchanged elements with their original versions
194
+ - Regenerate index recommendations for affected collections
195
+
196
+ #### Phase U6: Output Regeneration
197
+
198
+ - Regenerate all output files (document-model.mermaid, schemas.json, model.md, MODEL.md) with merged model
199
+ - Add a **Changelog** section to each module's model.md and to the root MODEL.md
200
+
201
+ ---
202
+
203
+ ## Reference Documents
204
+
205
+ Before processing any input, read both reference documents:
206
+
207
+ ```
208
+ Read references/model-extraction-methodology.md
209
+ Read references/nosql-design-guide.md
210
+ ```
211
+
212
+ - **model-extraction-methodology.md** — Defines Phases 1–4 (linguistic analysis, entity
213
+ identification, attribute extraction, relationship detection) and appendices (verb heuristics,
214
+ NFR impact map). Reused from the RDBMS skill.
215
+ - **nosql-design-guide.md** — Defines the document-specific design principles: embed-vs-reference
216
+ decision framework, DDD-to-document classification, access pattern analysis matrix, field
217
+ conventions, NFR adaptations, and all output format conventions with examples.
218
+
219
+ ---
220
+
221
+ ## Input Contract
222
+
223
+ The user MUST provide the following structured input. If any required element is missing,
224
+ ask the user to supply it before proceeding. Do NOT infer modules from story content.
225
+
226
+ ### Required Input
227
+
228
+ | Element | Description |
229
+ |---------|-------------|
230
+ | **Module List** | Explicit list of module names (bounded context candidates) |
231
+ | **User Stories** | Agile-format stories, each tagged with a **module** and a **version**. Format: "As [role], I want to [action] [object] so that [purpose]" |
232
+ | **NFRs per Module** | Non-functional requirements (security, performance, compliance, etc.) |
233
+
234
+ ### Optional Input
235
+
236
+ | Element | Description |
237
+ |---------|-------------|
238
+ | **Module Prefix Overrides** | A 3-character prefix per module to override auto-generation. Format: `Module Name: XXX`. |
239
+ | **External Reference Files** | Supporting documents (Markdown, CSV, Excel, PDF, JSON, text, YAML, XML) for additional context. |
240
+ | **Access Patterns** | Descriptions of how the application reads and writes data. Critical for embed-vs-reference decisions. If not provided, inferred from user stories and flagged as assumptions. |
241
+ | **Constraints** | Technical or business constraints affecting the model |
242
+ | **Glossary** | Domain-specific term definitions (ubiquitous language) |
243
+ | **Existing Data Model** | Current-state model for migration or extension scenarios |
244
+
245
+ ### Input Format Example
246
+
247
+ ```markdown
248
+ ## Module: User Management
249
+
250
+ ### Version: 1.0
251
+
252
+ - US-001: As an HR Admin, I want to create employee records so that new hires are registered.
253
+ - US-002: As an HR Admin, I want to assign departments to employees so that org structure is maintained.
254
+
255
+ ### Version: 1.1
256
+
257
+ - US-005: As an HR Admin, I want to update employee contact info so that records stay current.
258
+ - US-006: As an HR Admin, I want to assign roles to employees so that permissions are controlled.
259
+
260
+ #### NFRs
261
+ - NFR-EM-001: All entities must support soft delete for compliance.
262
+ - NFR-EM-002: Audit trail required for all write operations.
263
+
264
+ #### Access Patterns (optional)
265
+ - AP-001: Employee profile is always read with department name and assigned roles.
266
+ - AP-002: List employees by department with pagination (up to 500 per department).
267
+ ```
268
+
269
+ The version tag is freeform (e.g., `1.0`, `v2`, `Sprint-3`). Preserved exactly as provided.
270
+
271
+ ### Module Prefix Generation Rules
272
+
273
+ Each module gets a 3-character uppercase prefix for collection names in shared-database deployment.
274
+
275
+ **Auto-generation:** Multi-word → first letter of each word ("User Management" → `USM`).
276
+ Single-word → first 3 characters ("Billing" → `BIL`). Collisions resolved by alternate
277
+ letters or numeric suffix.
278
+
279
+ **Scope:** Prefix appears in **collection names in diagrams and JSON schemas** only
280
+ (e.g., `usm_employees`). The `model.md` uses clean PascalCase names.
281
+
282
+ **Override:** User can supply 3-character uppercase overrides per module.
283
+
284
+ ### Input Validation Rules
285
+
286
+ 1. **Requirement tagging is mandatory.** Before processing, scan the input PRD.md file and verify that ALL top-level bullet items under User Story, Functional Requirements, Non Functional Requirement, Constraint, and Reference sections have a tag code (e.g., `[USHM00003]`, `[NFRHM0003]`, `[CONSHM003]`, `[REFHM0003]`). If ANY item is missing a tag, **stop immediately** and invoke the `co2-skills:util-ustagger` skill on the file to tag all untagged items. Only resume model extraction after all items are tagged. These tag codes will be used as the `Source Story` reference throughout the model output.
287
+ 2. **Module-story binding is mandatory.** Stop and ask if stories lack module assignment.
288
+ 3. **Version tag is mandatory.** Stop and ask if stories lack version tags.
289
+ 4. **Story format check.** Flag deviations but attempt to parse.
290
+ 5. **At least one NFR per module.** Prompt for confirmation of defaults if missing.
291
+ 6. **Output directory is auto-resolved.** The output directory is automatically resolved to `<app_folder>/context/model/`. Auto-create if the path doesn't exist.
292
+
293
+ ---
294
+
295
+ ## Processing Workflow
296
+
297
+ When no `module:` argument is provided, process ALL modules in a single pass. When a
298
+ `module:` argument is provided, process ONLY the target module — skip all other modules
299
+ entirely. Each module is independent — do not model cross-module references. Flag
300
+ potential cross-module dependencies in assumptions.
301
+
302
+ ### Version Tracking
303
+
304
+ Process stories in version order. Annotate every model element with the version that
305
+ introduced it. New fields added in later versions carry the later version; the collection
306
+ retains its original version.
307
+
308
+ ### Pre-Processing: External Reference Files
309
+
310
+ If provided, read external files before Phase 1. They supplement — not replace — user stories.
311
+ Every collection must trace to a user story. Reference-only entities go in assumptions.
312
+ Set Source to `REFERENCE` with filename in Source Story when a field comes from a reference file.
313
+ On conflicts, prefer user stories and flag the discrepancy.
314
+
315
+ ### Phase 1: Linguistic Analysis
316
+
317
+ Parse each user story per the methodology reference (Section 3). Extract subjects, verbs,
318
+ direct/indirect objects, purpose clauses, qualifiers. Decompose compound stories.
319
+
320
+ ### Phase 2: Entity Identification → Document Classification
321
+
322
+ Classify extracted nouns using the methodology reference (Section 4.2), then apply the
323
+ **DDD-to-document classification** from the NoSQL design guide. Key principle: aggregate
324
+ roots become collections; entities within aggregates become embedded documents; value objects
325
+ are always embedded; M:N join entities become arrays of references unless data-rich.
326
+
327
+ ### Phase 3: Access Pattern Analysis (NoSQL-Specific)
328
+
329
+ For each collection candidate, run through the **Access Pattern Analysis Matrix** from
330
+ the NoSQL design guide. If the user provided access patterns, use them directly. If not,
331
+ infer from user stories (especially purpose clauses) and flag each inference as an assumption.
332
+
333
+ ### Phase 4: Embed vs Reference Decision
334
+
335
+ Apply the **Embed vs Reference Decision Flowchart** from the NoSQL design guide to every
336
+ relationship. Record each decision with rationale in the Document Design Decisions table.
337
+ Default to embedding; only promote to a separate collection when criteria are met.
338
+
339
+ ### Phase 5: Field Extraction
340
+
341
+ Derive fields from four sources in priority order: explicit mention, operation inference,
342
+ NFR requirements, domain convention. Use **document-specific field conventions** from the
343
+ NoSQL design guide (`_id`, `_audit`, `_version`, `ISODate`, etc.).
344
+
345
+ Source types: `EXPLICIT`, `OPERATION_INFERENCE`, `NFR`, `CONVENTION`, `REFERENCE`, `ASSUMPTION`.
346
+
347
+ ### Phase 6: Cross-Cutting Concerns
348
+
349
+ Map NFRs to document model impact using the **NFR Adaptation** table in the NoSQL design guide.
350
+
351
+ #### Phase 6a: Architecture Principle Integration
352
+
353
+ If PRD.md contains an `# Architecture Principle` section, read it and apply to model decisions:
354
+
355
+ - **Document DB confirmation**: If architecture explicitly confirms "document based database" or "MongoDB", gain higher confidence in embed-vs-reference decisions — favor embedding more aggressively for frequently co-read data.
356
+ - **Consistency model**: If architecture mentions "eventual consistency", flag denormalization assumptions with lower severity in the Assumptions table. Rationale entries in the Document Design Decisions table (Section 4) should reference the architecture principle (e.g., "DENORMALIZE: architecture allows eventual consistency — stale reads acceptable").
357
+ - **Event-driven**: If architecture mentions "event-driven" or "domain events", generate event collection schemas alongside data collections. Add event payload document types and event store collection if applicable.
358
+ - **CQRS hints**: If architecture mentions "CQRS" or "command query separation", consider separate read/write collection patterns and note them in the Collection Catalog.
359
+ - **Monolithic**: If "monolithic" with "modular architecture", model cross-module references as soft references (ObjectId fields without formal FK enforcement) and note this in Cross-Module Dependencies.
360
+
361
+ If the `# Architecture Principle` section is absent, skip this sub-phase and proceed with existing behavior.
362
+
363
+ #### Phase 6b: Process Flow Integration
364
+
365
+ If PRD.md contains a `# High Level Process Flow` section, read it and apply to model decisions:
366
+
367
+ - **Entity lifecycle states**: If a process flow describes status transitions (e.g., "Received → Validated → Enriched → Active"), cross-reference with enum extraction from Phase 2. Ensure all states from flows appear in the corresponding collection's status enum. Add any missing states.
368
+ - **Access patterns from flows**: Process flow steps that describe queries (e.g., "system queries job demands by corridor and status") directly inform the Access Pattern Analysis (Phase 3) and index recommendations (Section 9). Record each flow-derived access pattern.
369
+ - **Intermediate collections**: If a flow describes staging or temporary data (e.g., "incoming message stored before validation"), verify that corresponding staging collections exist. If not, create them.
370
+ - **Domain events from flows**: Each "publishes", "sends", or "triggers" step should be checked against the Domain Events table (Section 10). Add any flow-derived events not already captured.
371
+
372
+ If the `# High Level Process Flow` section is absent, skip this sub-phase.
373
+
374
+ ### Phase 7: Output Generation
375
+
376
+ Produce three deliverables per domain (see Output Specification below).
377
+
378
+ ### Phase 8: Validation
379
+
380
+ Run quality gates as self-review. Fix issues before presenting output.
381
+
382
+ ---
383
+
384
+ ## Changelog Append
385
+
386
+ After all model files are successfully generated, append an entry to `CHANGELOG.md` in the application folder (`<app_folder>/CHANGELOG.md`):
387
+
388
+ 1. Read `<app_folder>/CHANGELOG.md`. If it does not exist, create it with:
389
+ ```markdown
390
+ # Changelog
391
+
392
+ - This file tracks all skill executions by version for this application.
393
+ - The highest version recorded here is the current application version.
394
+ - Skills MUST NOT execute for a version lower than the highest version in this file.
395
+
396
+ ---
397
+ ```
398
+ 2. Search for a `## {version}` heading matching the current version.
399
+ 3. If the section **exists**: append a new row to its table.
400
+ 4. If the section **does not exist**: insert a new section after the `---` below the context header and before any existing `## vX.Y.Z` section (newest-first ordering), with a new table header and the first row.
401
+ 5. Row format: `| {YYYY-MM-DD} | {application_name} | modelgen-nosql | {module or "All"} | Generated NoSQL document models |`
402
+ 6. **Never modify or delete existing rows.**
403
+
404
+ ## Output Specification
405
+
406
+ For each module, produce exactly **three files** in a kebab-case subdirectory, plus one
407
+ **root-level summary file**:
408
+
409
+ ```
410
+ /output-dir/
411
+ ├── MODEL.md # Root summary and table of contents
412
+ └── {module-name}/
413
+ ├── document-model.mermaid # Mermaid class diagram
414
+ ├── schemas.json # JSON schema examples with sample documents
415
+ └── model.md # Full model documentation
416
+ ```
417
+
418
+ ### 1. Document Structure Diagram: `document-model.mermaid`
419
+
420
+ A Mermaid **class diagram** showing collections, embedded documents, and references.
421
+ Follow all conventions from the **Output Format Conventions** section of the NoSQL design guide:
422
+ stereotypes (`<<collection>>`, `<<embedded>>`, `<<enum>>`), composition vs association arrows,
423
+ prefixed collection names, and camelCase fields. Include version and prefix comments at top.
424
+
425
+ ### 2. JSON Schema Examples: `schemas.json`
426
+
427
+ A JSON file with an example document per collection, following the format in the NoSQL design
428
+ guide. Each collection entry includes: `description`, `exampleDocument` (realistic sample data
429
+ showing all fields, embedded documents, arrays), and `indexes` (recommended indexes from
430
+ access patterns). Include `_meta` block with domain, prefix, and versions.
431
+
432
+ ### 3. Model Documentation: `model.md`
433
+
434
+ ```markdown
435
+ # NoSQL Document Model: {Module Name}
436
+
437
+ ## 1. Module Prefix Map
438
+ | Module | Prefix | Auto-Generated | Override |
439
+
440
+ ## 2. Collection Catalog
441
+ | Collection | DDD Type | Bounded Context | Document Type | Key Fields | Source Stories | Version |
442
+ (Document Type: Root Collection, Supporting Collection, Event Collection, Audit Collection)
443
+
444
+ ## 3. Base Document Specification
445
+ (Audit, soft delete, versioning fields common to all documents)
446
+
447
+ ## 4. Document Design Decisions
448
+ | Parent | Child | Decision | Rationale | Access Pattern | Source Story | Version |
449
+ (Decision: EMBED, EMBED_ARRAY, REFERENCE, DENORMALIZE_AND_REFERENCE)
450
+ This is the most critical table — records every embed-vs-reference decision with reasoning.
451
+
452
+ ## 5. Field Detail (one subsection per collection)
453
+ ### 5.x {Collection Name}
454
+ | Field | Type | Nullable | Constraints | Source | Source Story | Version |
455
+ Source values: EXPLICIT, OPERATION_INFERENCE, NFR, CONVENTION, REFERENCE, ASSUMPTION.
456
+ Type values: String, Number, Boolean, ObjectId, ISODate, Object, Array<Type>, enum name.
457
+
458
+ ## 6. Embedded Document Definitions (one subsection per embedded type)
459
+ ### 6.x {Embedded Document Name}
460
+ | Field | Type | Nullable | Description | Source Story | Version |
461
+
462
+ ## 7. Enum Definitions (one subsection per enum)
463
+ ### 7.x {Enum Name}
464
+ | Value | Description | Source Story | Version |
465
+
466
+ ## 8. Reference Catalog
467
+ | Source Collection | Target Collection | Reference Field | Denormalized Fields | Cardinality | Business Rule | Source Story | Version |
468
+
469
+ ## 9. Index Recommendations
470
+ | Collection | Field(s) | Index Type | Rationale | Source Story | Version |
471
+ (Index Type: unique, single, compound, text, ttl)
472
+
473
+ ## 10. Domain Events
474
+ | Event Name | Trigger Story | Aggregate | Payload Fields | Version |
475
+
476
+ ## 11. Bounded Context Summary
477
+ | Context | Collections | Description |
478
+
479
+ ## 12. Assumptions and Ambiguities
480
+ | Story ID | Collection / Field | Assumption Made | Clarification Needed | Version |
481
+
482
+ ## 13. Changelog
483
+
484
+ ### Version {new-version} (from {previous-version})
485
+
486
+ #### Added
487
+ | Element Type | Name | Description | Source Stories |
488
+ |---|---|---|---|
489
+
490
+ #### Modified
491
+ | Element Type | Name | Change Description | Previous | New | Source Stories |
492
+ |---|---|---|---|---|---|
493
+
494
+ #### Removed
495
+ | Element Type | Name | Reason | Former Source Stories |
496
+ |---|---|---|---|
497
+
498
+ #### Flagged for Review
499
+ | Element Type | Name | Issue | Recommendation |
500
+ |---|---|---|---|
501
+ ```
502
+
503
+ ### 4. Root Summary: `MODEL.md`
504
+
505
+ After generating all per-module files, produce a single `MODEL.md` in the **root output directory**.
506
+ This file serves as the entry point and table of contents for the entire model extraction output.
507
+
508
+ #### Document Structure
509
+
510
+ ```markdown
511
+ # NoSQL Document Model Summary
512
+
513
+ > Generated from {total story count} user stories across {module count} modules.
514
+
515
+ ## Modules
516
+
517
+ | # | Module | Prefix | Collections | Embedded Docs | References | Versions | Stories |
518
+ |---|--------|--------|-------------|---------------|------------|----------|---------|
519
+
520
+ (One row per module. Collections = count of root collections. Embedded Docs = count of
521
+ embedded document types. References = count of cross-collection references. Versions =
522
+ comma-separated list of versions included. Stories = count of source stories for that module.)
523
+
524
+ ## Table of Contents
525
+
526
+ ### {Module Name} (`{prefix}`)
527
+
528
+ > {One-line summary: e.g., "Manages employee records, departments, and role assignments."}
529
+
530
+ - **Model Documentation:** [{module-kebab}/model.md](./{module-kebab}/model.md)
531
+ - **Document Structure Diagram:** [{module-kebab}/document-model.mermaid](./{module-kebab}/document-model.mermaid)
532
+ - **JSON Schemas:** [{module-kebab}/schemas.json](./{module-kebab}/schemas.json)
533
+ - **Collections:** {comma-separated collection names in lower_snake_case with prefix}
534
+ - **Key Design Decisions:** {2–3 most significant embed-vs-reference decisions in natural language}
535
+
536
+ (Repeat for each module, in the same order as the Modules table.)
537
+
538
+ ## Cross-Module Dependencies
539
+
540
+ | Source Module | Target Module | Dependency | Noted In |
541
+ |---------------|---------------|------------|----------|
542
+
543
+ (List any cross-module dependencies flagged in assumptions tables. If none, state "No
544
+ cross-module dependencies were identified.")
545
+
546
+ ## Assumptions Summary
547
+
548
+ | Module | Count | Critical |
549
+ |--------|-------|----------|
550
+
551
+ (Count = total assumptions for that module. Critical = count of assumptions marked as
552
+ needing clarification. Links to the respective module's Assumptions and Ambiguities section.)
553
+
554
+ ## Update History
555
+
556
+ | Version | Date | Modules Affected | Added | Modified | Removed | Flagged |
557
+ |---|---|---|---|---|---|---|
558
+ ```
559
+
560
+ ---
561
+
562
+ ## Constraints
563
+
564
+ 1. **No module inference.** Module-to-story mapping must be provided by the user.
565
+ 2. **Modules are independent.** No cross-module references. Flag dependencies in assumptions.
566
+ 3. **Concise output.** Final consolidated output only — no intermediate analysis.
567
+ 4. **Traceability.** Every element must reference its originating user story or NFR.
568
+ 5. **Ambiguity transparency.** Record all assumptions, especially around access patterns
569
+ and embed-vs-reference decisions.
570
+ 6. **Document-first thinking.** Default to embedding. Only promote to a separate collection
571
+ when a clear "reference when" criterion is met, justified in Document Design Decisions.
572
+
573
+ ---
574
+
575
+ ## Quality Gates (Self-Review)
576
+
577
+ Before presenting output, verify:
578
+
579
+ - [ ] Every user story maps to at least one collection or embedded document
580
+ - [ ] Every collection has at least one source user story
581
+ - [ ] Every collection has `_id` and audit fields
582
+ - [ ] Every embed-vs-reference decision is recorded with rationale
583
+ - [ ] Every access pattern (provided or inferred) is addressed
584
+ - [ ] Every state-change verb has a corresponding enum
585
+ - [ ] Every NFR has been analyzed for document model impact
586
+ - [ ] No embedded array is unbounded without justification
587
+ - [ ] No document likely exceeds typical size limits (flag if > 1MB estimated)
588
+ - [ ] Denormalized fields are identified with their source collection
589
+ - [ ] Index recommendations cover all query patterns
590
+ - [ ] Naming is consistent (camelCase fields, lower_snake_case collections with prefix)
591
+ - [ ] Mermaid class diagram is syntactically valid
592
+ - [ ] JSON schema examples are valid JSON with realistic sample data
593
+ - [ ] All ambiguities are recorded with proposed defaults
594
+ - [ ] Root `MODEL.md` is generated with correct links to all module subdirectories
595
+ - [ ] `MODEL.md` module statistics (collection count, embedded doc count, story count) match actual output
596
+
597
+ ### Update Mode Quality Gates
598
+
599
+ When running in update mode, additionally verify:
600
+
601
+ - [ ] All removed stories have their model elements addressed (removed or re-sourced)
602
+ - [ ] All modified stories have their model elements re-evaluated
603
+ - [ ] No orphaned elements remain without explicit KEEP justification
604
+ - [ ] Embed-vs-reference decisions re-evaluated for affected collections
605
+ - [ ] Changelog accurately reflects all changes
606
+ - [ ] Version annotations are correct (new elements get new version, unchanged keep original)
607
+ - [ ] MODEL.md Update History is current
608
+
609
+ ### Module-Filtered Mode Quality Gates
610
+
611
+ When running with a `module:` argument, additionally verify:
612
+
613
+ - [ ] Only the target module's files were written/overwritten
614
+ - [ ] Other module subdirectories were not modified
615
+ - [ ] MODEL.md was partially updated (only target module rows/sections changed)
616
+ - [ ] If target module is new, MODEL.md includes the new module in the Modules table and Table of Contents
617
+ - [ ] Module matching was case-insensitive and unambiguous