@tekyzinc/gsd-t 4.19.13 → 4.20.10

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.
@@ -92,9 +92,30 @@ embedded (`![Flow Diagram](media/<PREFIX>-NNN-flow.png)`) — matching the sampl
92
92
  - Cover the happy path (Positive), failure modes (Negative), and boundaries (Edge). Every
93
93
  acceptance-criteria group should be represented by at least one test case.
94
94
 
95
+ ### Pagination (MANDATORY — hard rule)
96
+
97
+ - Each Epic (`EP-NN`) starts a NEW PAGE (page-break before the epic heading).
98
+ - The FIRST story of that epic flows on the SAME page as the epic heading.
99
+ - Each SUBSEQUENT story in the same epic starts a NEW PAGE.
100
+ - Every story ENDS with its Mapped Test Cases table → one story per page (or epic-head + first story).
101
+ Enforce in `.docx` with page-break-before on epic headings + every non-first story heading.
102
+
103
+ ### Diagram carries its own in-image title (MANDATORY)
104
+
105
+ Each per-story diagram has a TITLE BANNER inside the rendered image (story id bold + title, dark-purple
106
+ on light-purple `screen`-class fill) — matching the sample. So there is NO external `Flow Diagram:`
107
+ label and NO footer label; the diagram is self-titled. The §1 app-flow chart gets a matching banner
108
+ with the product name. Because the image is self-titled, it may use the FULL page box (no label-reserve).
109
+
110
+ ### Mapped Test Cases coloring (MANDATORY)
111
+
112
+ Header row = white bold on purple fill (all 4 cols). `Type` cell tinted by value: Positive→green,
113
+ Negative→peach, Edge→blue (only the Type cell). Keep the plain-markdown table as editable source;
114
+ apply cell shading in the delivered `.docx` (raw-HTML table or pandoc post-process).
115
+
95
116
  ### Heading placement + no orphans (MANDATORY)
96
117
 
97
- - Every section label sits ABOVE its content, never below. `Flow Diagram:` precedes its image;
118
+ - Every non-diagram section label sits ABOVE its content, never below.
98
119
  `Mapped Test Cases:` precedes its table; `Workflow:` precedes its steps. A label below the
99
120
  block it introduces is a defect.
100
121
  - A heading must NOT be orphaned at a page bottom with its content on the next page — it stays
@@ -139,21 +160,18 @@ terminals are round `([...])`; label decision-branch edges (`-->|Yes|`).
139
160
  Compare aspect ratios FIRST, then clamp only the constraining dimension (standard "contain" fit —
140
161
  no clipping, no distortion). Page = visible content box, default US Letter portrait ≈ 6.5in × 9in (W×H).
141
162
 
142
- **RESERVE LABEL SPACE:** each diagram's `Flow Diagram:` label sits above it on the same page. If the
143
- image is set to FULL page height, no room is left for the label and keep-with-next pushes the image to
144
- the next page (the Newman bug). So use `avail_height = page_height − label_reserve` (label_reserve
145
- 0.5in) as the height constraint, NOT full page_height. `avail_width = page_width`;
146
- `page_AR = avail_width / avail_height`.
163
+ **FULL page box** the diagram is self-titled (in-image banner, no external label), so it uses the
164
+ full page: `avail_width = page_width`, `avail_height = page_height` (no label-reserve). `page_AR =
165
+ avail_width / avail_height`. *(A label-reserve was needed only when an external `Flow Diagram:` label
166
+ sat above the image the in-image title removed that need.)*
147
167
 
148
168
  1. Render to PNG, then MEASURE its pixels `img_w × img_h` (`sips -g pixelWidth -g pixelHeight`);
149
169
  `img_AR = img_w / img_h`.
150
- 2. Compare shapes against the label-reserved box:
170
+ 2. Compare shapes:
151
171
  - `img_AR > page_AR` (wider) → **set width = avail_width (= page_width)** (height scales, fits).
152
- - `img_AR < page_AR` (taller) → **set height = avail_height (= page_height 0.5in, NOT full page)**
153
- (width scales) — this leaves room for the label above.
172
+ - `img_AR < page_AR` (taller) → **set height = avail_height (= page_height)** (width scales, fits).
154
173
  - equal → set width = avail_width.
155
- 3. Embed with ONLY the clamped side set (`<img … width>` OR `height`, never both). Label + image fit
156
- on one page.
174
+ 3. Embed with ONLY the clamped side set (`<img … width>` OR `height`, never both).
157
175
 
158
176
  Direction (`LR` for long flows, `TD` for short) is chosen to bring `img_AR` closer to `page_AR`
159
177
  BEFORE clamping (maximizes final on-page size) — but the ratio clamp is what guarantees the fit.
@@ -167,7 +185,8 @@ Never ship a diagram larger than the page.
167
185
  --scale 2 --padding 20` (`@mermaid-js/mermaid-cli`; fall back to `npx @mermaid-js/mermaid-cli`).
168
186
  If `mmdc` is unavailable, HALT and tell the user to install it — do NOT silently ship raw
169
187
  Mermaid where an embedded image is expected (no-silent-degradation).
170
- 3. Embed the PNG in the markdown: `![Flow Diagram](media/<name>.png)`.
188
+ 3. Embed the PNG with an `<img>` at the clamped dimension, NO external label (title is in-image):
189
+ `<img src="media/<name>.png" width="…" />` or `height="…"`.
171
190
  4. On `.docx` conversion, pandoc embeds these PNGs as real Word images — matching the sample.
172
191
 
173
192
  Keep the `.mmd` source (version-controllable, editable) alongside the rendered PNG.