@tekyzinc/gsd-t 4.18.10 → 4.19.11
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.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,29 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [4.19.11] - 2026-07-07
|
|
6
|
+
|
|
7
|
+
### Fixed — `/gsd-t-stories` diagrams: semantic coloring + fit-to-page
|
|
8
|
+
|
|
9
|
+
The command's flow diagrams were rendering as flat single-color and overflowing the page. Diagram generation now mandates **role-based semantic coloring** (green=action/go, orange=decision, red=destructive, blue-dashed=new/optional, purple=screen, white=terminal, via a `classDef` block) and **fit-to-page** layout (prefer `flowchart LR` for long linear flows, `subgraph` lanes or a part-1/2 split for large ones, explicit render sizing, and a verify-not-clipped-then-re-render step). Same rules mirrored into the bundled format reference. Also reconciled the backlog (removed 14 shipped/superseded items, renumbered survivors 1..46, fixed 4 number collisions).
|
|
10
|
+
|
|
11
|
+
- `commands/gsd-t-stories.md`: Step 4 → 4a (semantic coloring) / 4b (fit-to-page) / 4c (render).
|
|
12
|
+
- `templates/playbooks/tekyz-user-stories-format.md`: coloring + fit rules.
|
|
13
|
+
- `.gsd-t/backlog.md`: 55 headings → 46 contiguous items.
|
|
14
|
+
|
|
15
|
+
## [4.19.10] - 2026-07-07
|
|
16
|
+
|
|
17
|
+
### Added — `/gsd-t-stories`: dev-team handoff user stories in the Tekyz format
|
|
18
|
+
|
|
19
|
+
New standalone command that generates a development-team handoff document in the Tekyz user-stories format from any source — a scan register, a requirements doc, a design contract, or a reverse-engineered codebase. Reverse-engineered from the Tekyz Compass sample PRD: front matter → Application Flow Overview → User Stories grouped under Epics (id, story, workflow, grouped acceptance criteria, per-story flow diagram, mapped test-case table) → Scope Summary. Diagrams are authored as Mermaid but embedded as rendered PNGs (matching the sample's embedded-image flow charts), via `@mermaid-js/mermaid-cli`; output to `share/<Repo>-user-stories.md` (+ optional `.docx` via pandoc).
|
|
20
|
+
|
|
21
|
+
- `commands/gsd-t-stories.md`: the new command (input classification, epic/story decomposition, Mermaid→PNG→embed pipeline, markdown + optional docx output).
|
|
22
|
+
- `templates/playbooks/tekyz-user-stories-format.md`: bundled format reference (the exact structure + wording conventions).
|
|
23
|
+
- `commands/gsd-t-help.md`, `README.md`, `templates/CLAUDE-global.md`: command reference + standalone-list ripple.
|
|
24
|
+
- `test/filesystem.test.js`: command counts 52→53, gsdt 46→47.
|
|
25
|
+
|
|
26
|
+
Distinct from `/gsd-t-prd` (which writes the internal `docs/prd.md`) — this is an external client/dev deliverable. Suite 2631/2631.
|
|
27
|
+
|
|
5
28
|
## [4.18.10] - 2026-07-03
|
|
6
29
|
|
|
7
30
|
### Added — Scan Consolidation Opportunities + type-grouped register; init-scan-setup repo adoption
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# GSD-T: Contract-Driven Development for Claude Code
|
|
2
2
|
|
|
3
|
-
**v4.
|
|
3
|
+
**v4.19.11** - A methodology for reliable, parallelizable development using Claude Code with optional Agent Teams support.
|
|
4
4
|
|
|
5
5
|
**Eliminates context rot** — task-level fresh dispatch (one subagent per task, ~10-20% context each) means compaction never triggers.
|
|
6
6
|
**Compaction-proof debug loops** — `gsd-t headless --debug-loop` runs test-fix-retest cycles as separate `claude -p` sessions. A JSONL debug ledger persists all hypothesis/fix/learning history across fresh sessions. Anti-repetition preamble injection prevents retrying failed hypotheses. Escalation tiers (sonnet → opus → human) and a hard iteration ceiling enforced externally.
|
|
@@ -187,6 +187,7 @@ This will replace changed command files, back up your CLAUDE.md if customized, a
|
|
|
187
187
|
| `/gsd-t-gap-analysis` | Requirements gap analysis — spec vs. existing code | Manual |
|
|
188
188
|
| `/gsd-t-promote-debt` | Convert techdebt items to milestones | Manual |
|
|
189
189
|
| `/gsd-t-estimate` | Turn any work doc (scan, requirements, feature/app spec) into a Tekyz client estimate (Google Sheet: T-Shirt Size + Team Mix) + matching PRD — supervised, with an operator-arbitrated Estimate Red Team | Manual |
|
|
190
|
+
| `/gsd-t-stories` | Generate a dev-team handoff doc in the Tekyz user-stories format (stories + workflows + acceptance criteria + Mermaid flow diagrams + mapped test cases) from any source | Manual |
|
|
190
191
|
| `/gsd-t-populate` | Auto-populate docs from existing codebase | Manual |
|
|
191
192
|
| `/gsd-t-design-decompose` | Decompose design into element/widget/page contracts | Manual |
|
|
192
193
|
|
package/commands/gsd-t-help.md
CHANGED
|
@@ -364,6 +364,12 @@ Use these when user asks for help on a specific command:
|
|
|
364
364
|
- **Updates**: the Tekyz estimate Google Sheet + `share/<Repo>-PRD-*.md` (and, if renumbered, the source doc/docs/scan files) + optional `share/<Repo>-estimate-redteam-notes.md`
|
|
365
365
|
- **Use when**: You need a client-facing paid estimate + PRD (T-shirt sizing, dollar range, sign-off) from a scan OR a requirements/feature/app spec. **SUPERVISED** — judgment phases (sizing, adjustments, PRD, Red Team) pause for your review; **you are the final arbiter** of an Estimate Red Team that challenges the numbers. Rate + sheet template + factors are parameterized (default Tekyz). Encodes the Tekyz playbook (`~/.claude/playbooks/tekyz-estimation-and-prd-playbook.md`)
|
|
366
366
|
|
|
367
|
+
### stories
|
|
368
|
+
- **Summary**: Generate a dev-team handoff document in the Tekyz user-stories format — discrete user stories with workflows, grouped acceptance criteria, per-story flow diagrams (Mermaid rendered to embedded images), and mapped test-case tables — from any source (scan register, requirements doc, design contract, or a reverse-engineered codebase)
|
|
369
|
+
- **Auto-invoked**: No
|
|
370
|
+
- **Updates**: new deliverable `share/<Repo>-user-stories.md` (+ optional `.docx` via pandoc) + `share/media/*.png` (rendered diagrams) + `.gsd-t/user-stories/diagrams/*.mmd`
|
|
371
|
+
- **Use when**: You need to hand a development team discrete, testable user stories in the Tekyz handoff style. Distinct from `/gsd-t-prd` (which writes the INTERNAL `docs/prd.md`) — this is an EXTERNAL client/dev deliverable. Diagrams are authored as Mermaid but embedded as rendered images (needs `@mermaid-js/mermaid-cli`). Format reference: `~/.claude/playbooks/tekyz-user-stories-format.md`
|
|
372
|
+
|
|
367
373
|
### populate
|
|
368
374
|
- **Summary**: Auto-populate all living docs from existing codebase analysis
|
|
369
375
|
- **Auto-invoked**: No
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# GSD-T: Stories — Dev-Handoff User Stories (Tekyz format) from any source
|
|
2
|
+
|
|
3
|
+
You are generating a **development-team handoff document** in the Tekyz user-stories format: discrete user stories with workflows, grouped acceptance criteria, per-story flow diagrams (Mermaid rendered to embedded images), and mapped test cases. Input can be a GSD-T **scan register**, a **requirements doc**, a **design contract**, or an **existing codebase** (reverse-engineered). `$ARGUMENTS` may carry `--input <path>`, `--source <scan|requirements|design|code>`, `--prefix <PREFIX>`, `--phase-filter <MVP|...>`, `--docx`.
|
|
4
|
+
|
|
5
|
+
**Canonical format reference (READ FIRST):** `~/.claude/playbooks/tekyz-user-stories-format.md` if present, else the bundled `templates/playbooks/tekyz-user-stories-format.md` in the GSD-T package. It encodes the exact structure + wording conventions reverse-engineered from the Tekyz sample (`Compass_Sample_PRD_2.docx`). This command FILLS that format from the real input.
|
|
6
|
+
|
|
7
|
+
> **Client/dev-team deliverable — distinct from `/gsd-t-prd`.** `/gsd-t-prd` writes the INTERNAL `docs/prd.md` that feeds the GSD-T pipeline. THIS command emits an EXTERNAL, dev-ready handoff doc in the Tekyz user-story style, saved to `share/`.
|
|
8
|
+
|
|
9
|
+
## Step 0: Inputs + Source Classification
|
|
10
|
+
|
|
11
|
+
1. **Resolve the input** (from `$ARGUMENTS --input`, else auto-detect in priority order): `.gsd-t/techdebt.md` (scan) → `docs/requirements.md` → `.gsd-t/contracts/design-contract.md` / `.gsd-t/contracts/design/` → the codebase itself. If none usable → ask the user what to document.
|
|
12
|
+
2. **Classify the source** so the extraction method matches:
|
|
13
|
+
- **scan register** → stories derive from the functional gaps/features implied by findings (each cluster of related TDs → a story; Reqs cross-ref the TD-N ids).
|
|
14
|
+
- **requirements doc** → each requirement / requirement-group → a story (Reqs cross-ref R-N/FR-N).
|
|
15
|
+
- **design contract** → each screen/widget/flow → a story.
|
|
16
|
+
- **codebase (reverse-engineer)** → walk real features (routes, pages, flows) and reverse-engineer the discrete user stories + test cases from what's built. **Use the code graph** (`gsd-t graph cluster` / `who-imports` / `who-calls`) to find feature clusters and real interaction paths — do NOT grep-guess the architecture.
|
|
17
|
+
3. **Derive the story-id `PREFIX`** from the product name (Compass→`CMPS`, NiceNote→`NN`, Newman Avatar→`NAV`) unless `--prefix` is given. Confirm with the user.
|
|
18
|
+
4. **Confirm scope** — which phases/epics to include — before generating.
|
|
19
|
+
|
|
20
|
+
## Step 1: Application Flow Overview (§1)
|
|
21
|
+
|
|
22
|
+
Produce the numbered end-to-end user journey (1..N major steps, plain language). Then author the **app-flow chart** as a single Mermaid flowchart of the whole journey and render+embed it (Step 4). This is the reader's map before the story detail.
|
|
23
|
+
|
|
24
|
+
## Step 2: Decompose into Epics + Stories (§2)
|
|
25
|
+
|
|
26
|
+
Group functionality into **Epics** (`EP-NN: <name>`), each with a `Phase:`. Under each epic, emit discrete stories. **A story is ONE coherent capability a user exercises** — not a whole feature area, not a single UI control. Right granularity = the sample's (e.g. "Avatar renders full-screen with state indicators" is one story; "Session controls: pause/resume/end" is another).
|
|
27
|
+
|
|
28
|
+
For EACH story, author in EXACTLY this order (per the format reference):
|
|
29
|
+
|
|
30
|
+
1. **`<PREFIX>-NNN — <Story Title>`** (sequential, zero-padded).
|
|
31
|
+
2. **Meta line** — `*Phase: … | Reqs: <source ids> | Test Cases: <N>*`. `Reqs:` cross-references the source (TD-N / R-N / FR-N); `Test Cases:` = row count of this story's table.
|
|
32
|
+
3. **Story:** `*As a <role>, I want <capability>, so that <benefit>.*` (strict template, one sentence.)
|
|
33
|
+
4. **Workflow:** numbered concrete interaction steps (user action → system response), present tense.
|
|
34
|
+
5. **Acceptance Criteria:** bulleted, **grouped by sub-area** with a bold sub-heading per group; include error/edge/recovery groups. Each bullet one testable assertion.
|
|
35
|
+
6. **Flow Diagram:** a per-story Mermaid flowchart of THIS story's workflow → rendered PNG → embedded (Step 4).
|
|
36
|
+
7. **Mapped Test Cases:** table `TC ID | Type | Test Title | Expected Result`. `TC-NNN` sequential across the whole doc; `Type` ∈ {Positive, Negative, Edge}; cover happy-path + failure + boundary; every acceptance-criteria group represented by ≥1 test case.
|
|
37
|
+
|
|
38
|
+
**No confabulation** (`feedback_no_confabulated_examples`): every story, workflow step, and test case must trace to something in the actual input source. If the source is silent on a needed detail, mark it a `[TODO: confirm with client]` — never invent product specifics.
|
|
39
|
+
|
|
40
|
+
## Step 3: Scope Summary (§3)
|
|
41
|
+
|
|
42
|
+
A table mapping every story → phase → epic: `| Story ID | Title | Phase | Epic |`. Gives the team the MVP-vs-later-phase picture at a glance.
|
|
43
|
+
|
|
44
|
+
## Step 4: Diagrams — Mermaid rendered to EMBEDDED images (MANDATORY method)
|
|
45
|
+
|
|
46
|
+
Per the standing directive, diagrams are authored as Mermaid but **embedded as rendered images** (matching the sample's `<img>` flow charts) — NOT left as raw Mermaid text.
|
|
47
|
+
|
|
48
|
+
### 4a. Semantic coloring (MANDATORY — never flat single-color)
|
|
49
|
+
|
|
50
|
+
Every diagram MUST use **intelligent, role-based coloring** — NOT mermaid's default flat purple. Assign each node a `class` by its ROLE and define matching `classDef`s. Standard palette (green=go/success, orange=decision, red=destructive, blue=new/optional, purple=screen/state, grey=terminal):
|
|
51
|
+
|
|
52
|
+
```mermaid
|
|
53
|
+
%% put at the TOP of every flowchart:
|
|
54
|
+
classDef start fill:#fff,stroke:#333,color:#000; %% start/end terminals (ellipse)
|
|
55
|
+
classDef decision fill:#fdebc8,stroke:#e8a33d,color:#7a4f00; %% decisions (diamonds)
|
|
56
|
+
classDef screen fill:#ece9fb,stroke:#8b7fd6,color:#2d2160; %% screens / states
|
|
57
|
+
classDef action fill:#d4f4dd,stroke:#4caf72,color:#0f5132; %% success / go / user actions
|
|
58
|
+
classDef destructive fill:#fde2e2,stroke:#e06666,color:#7a1f1f; %% end / delete / irreversible
|
|
59
|
+
classDef newfeat fill:#e2f0fb,stroke:#5b9bd5,color:#1f4e79,stroke-dasharray:4 3; %% NEW / optional (dashed)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- **Decisions** are diamonds `{...}` classed `decision`; **terminals** (start/end) are stadium/round `([...])` classed `start`; **screens/states** classed `screen`; **success/go paths** classed `action`; **destructive/irreversible** (End, Delete) classed `destructive`; **new/optional** classed `newfeat` (dashed).
|
|
63
|
+
- Label decision-branch edges (`-->|Yes|`, `-->|Returning User|`).
|
|
64
|
+
- Reference the sample styling in `~/.claude/playbooks/tekyz-user-stories-format.md`.
|
|
65
|
+
|
|
66
|
+
### 4b. Fit-to-page (MANDATORY — the whole diagram must fit)
|
|
67
|
+
|
|
68
|
+
A long top-down flow overflows the page (the failure the user flagged). Keep EVERY diagram fully on one page:
|
|
69
|
+
|
|
70
|
+
- **Prefer `flowchart LR`** (left-to-right) for long linear flows — wide pages fit more than tall ones. Use `TD` only for short (≤6-node) flows.
|
|
71
|
+
- For a flow with many nodes, **break into logical lanes with `subgraph`s**, or split into a "part 1 / part 2" pair of diagrams rather than one that runs off-page.
|
|
72
|
+
- Render with an explicit width/scale and padding so nothing is clipped: `mmdc -i <src>.mmd -o share/media/<name>.png --width 1600 --backgroundColor white --scale 2 --padding 20` (a mermaid config `{ "flowchart": { "useMaxWidth": true } }` via `-c` also helps).
|
|
73
|
+
- **After rendering, VERIFY the image isn't clipped** — check the PNG's dimensions are sane and, if a node count is high, that the layout direction kept it on-page. If a diagram still overflows, switch direction (`TD`→`LR`) or split it, and re-render. Do NOT ship a clipped diagram (`feedback_no_silent_degradation`).
|
|
74
|
+
|
|
75
|
+
### 4c. Render pipeline
|
|
76
|
+
|
|
77
|
+
1. Write each diagram's Mermaid source (with the `classDef` block + role classes + fit-appropriate direction) to `.gsd-t/user-stories/diagrams/<name>.mmd` (app-flow = `app-flow`, per-story = `<PREFIX>-NNN-flow`).
|
|
78
|
+
2. Render each to PNG: `mmdc -i <src>.mmd -o share/media/<name>.png --width 1600 --backgroundColor white --scale 2 --padding 20` (Mermaid CLI `@mermaid-js/mermaid-cli`; fall back to `npx @mermaid-js/mermaid-cli …`).
|
|
79
|
+
3. **If `mmdc` is unavailable → HALT** and tell the user to install it (`npm i -g @mermaid-js/mermaid-cli`). Do NOT silently ship raw Mermaid where an embedded image is expected (`feedback_no_silent_degradation`).
|
|
80
|
+
4. Embed each rendered PNG in the markdown at its `Flow Diagram:` / §1 position: ``.
|
|
81
|
+
5. Keep the `.mmd` source (editable, version-controllable) alongside the PNG.
|
|
82
|
+
|
|
83
|
+
## Step 5: Assemble + Deliver
|
|
84
|
+
|
|
85
|
+
1. Assemble front matter (product, "Prepared by Tekyz Inc.", version, source-of-truth note; SAMPLE disclaimer only if illustrative) + §1 + §2 + §3.
|
|
86
|
+
2. **Write the markdown** to `share/<Repo>-user-stories.md`, with rendered diagram PNGs in `share/media/`.
|
|
87
|
+
3. **If `--docx`** (or the user wants Word): convert with `pandoc share/<Repo>-user-stories.md -o share/<Repo>-user-stories.docx` — pandoc embeds the PNGs as real Word images, matching the handoff sample. Report if pandoc is missing (don't fail the markdown).
|
|
88
|
+
4. **Report:** story count, epic count, total test cases, diagram count, and the output paths.
|
|
89
|
+
|
|
90
|
+
## Document Ripple
|
|
91
|
+
|
|
92
|
+
- New deliverable(s): `share/<Repo>-user-stories.md` (+ `.docx` if requested) + `share/media/*.png` + `.gsd-t/user-stories/diagrams/*.mmd`.
|
|
93
|
+
- No living-doc changes (this is an external handoff artifact) — but log a `.gsd-t/progress.md` Decision Log entry noting the deliverable + source.
|
|
94
|
+
|
|
95
|
+
## ▶ Next Up
|
|
96
|
+
|
|
97
|
+
Standalone command — no auto-successor. After generating, hand the `share/<Repo>-user-stories.md` (or `.docx`) to the development team.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekyzinc/gsd-t",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.19.11",
|
|
4
4
|
"description": "GSD-T: Contract-Driven Development for Claude Code — 54 slash commands with headless-by-default workflow spawning, unattended supervisor relay with event stream, graph-powered code analysis, real-time agent dashboard, task telemetry, doc-ripple enforcement, backlog management, impact analysis, test sync, milestone archival, and PRD generation",
|
|
5
5
|
"author": "Tekyz, Inc.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -460,7 +460,7 @@ Add `**Also available:**` with `- /gsd-t-{alt} — {desc}` lines if alternatives
|
|
|
460
460
|
| `setup` | `status` | |
|
|
461
461
|
| `design-decompose` | `design-build` | `partition` (if domains needed first) |
|
|
462
462
|
|
|
463
|
-
Commands with no successor (standalone): `quick`, `debug`, `brainstorm`, `status`, `help`, `resume`, `prompt`, `log`, `health`, `pause`, `estimate`, backlog commands.
|
|
463
|
+
Commands with no successor (standalone): `quick`, `debug`, `brainstorm`, `status`, `help`, `resume`, `prompt`, `log`, `health`, `pause`, `estimate`, `stories`, backlog commands.
|
|
464
464
|
|
|
465
465
|
Skip the hint if auto-advancing (Level 3 mid-wave) — only show when the user needs to manually invoke the next step.
|
|
466
466
|
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Tekyz User-Stories / Dev-Handoff PRD Format
|
|
2
|
+
|
|
3
|
+
> The canonical format for a Tekyz **development-team handoff** document: discrete user
|
|
4
|
+
> stories with workflows, grouped acceptance criteria, per-story flow diagrams, and mapped
|
|
5
|
+
> test cases. Reverse-engineered from `Compass_Sample_PRD_2.docx` (the sample Tekyz uses to
|
|
6
|
+
> illustrate its requirements-documentation process). `/gsd-t-user-stories` emits THIS format.
|
|
7
|
+
>
|
|
8
|
+
> This is a REFERENCE for structure + exact wording conventions — not the content. The
|
|
9
|
+
> command fills it from the actual input source (scan / requirements / design / codebase).
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Document skeleton (in order)
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
FRONT MATTER
|
|
17
|
+
1. Application Flow Overview (numbered end-to-end journey + app-flow chart)
|
|
18
|
+
2. User Stories — Detailed Requirements
|
|
19
|
+
EP-NN: <Epic Name> (epic grouping)
|
|
20
|
+
Phase: <MVP | Phase 1 | ...>
|
|
21
|
+
<PREFIX>-NNN — <Story Title>
|
|
22
|
+
meta line
|
|
23
|
+
Story: (As a … I want … so that …)
|
|
24
|
+
Workflow: (numbered steps)
|
|
25
|
+
Acceptance Criteria: (grouped by sub-area, bulleted)
|
|
26
|
+
Flow Diagram: (rendered Mermaid PNG, embedded as <img>)
|
|
27
|
+
Mapped Test Cases: (table)
|
|
28
|
+
3. <Phase> vs <Phase> Scope Summary (story→phase→epic table)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## FRONT MATTER (verbatim conventions)
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
**<PRODUCT NAME>**
|
|
37
|
+
|
|
38
|
+
<one-line product descriptor>
|
|
39
|
+
|
|
40
|
+
Product Requirements Document
|
|
41
|
+
|
|
42
|
+
**Prepared by Tekyz Inc.**
|
|
43
|
+
|
|
44
|
+
Version <X.Y> — <source-of-truth note, e.g. "Design file v2.x as source of truth">
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If the doc is illustrative/sample, include the italic SAMPLE DOCUMENT disclaimer block.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## §1 — Application Flow Overview
|
|
52
|
+
|
|
53
|
+
A numbered list (1..N) naming each major step of the end-to-end user journey in plain
|
|
54
|
+
language (e.g. "First-Time User Launch: App opens directly into … onboarding"). Follow with:
|
|
55
|
+
- an **app-flow chart** — a single Mermaid flowchart of the whole journey, rendered to PNG
|
|
56
|
+
and embedded (``), matching the sample's companion chart.
|
|
57
|
+
- the italic note that a complete flow chart accompanies the document.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## §2 — User Stories (the core; repeat per story)
|
|
62
|
+
|
|
63
|
+
Group stories under **Epics**: `**EP-01: <Epic Name>**` then `**Phase: <phase>**`.
|
|
64
|
+
|
|
65
|
+
Each story, in EXACTLY this order:
|
|
66
|
+
|
|
67
|
+
**Story ID + title:** `**<PREFIX>-NNN — <Story Title>**`
|
|
68
|
+
- `<PREFIX>` is a per-project story-id prefix (Compass used `CMPS`). Derive from the product
|
|
69
|
+
name (e.g. NiceNote → `NN`, Newman Avatar → `NAV`). Sequential, zero-padded to 3.
|
|
70
|
+
|
|
71
|
+
**Meta line** (italic, pipe-separated):
|
|
72
|
+
`*Phase: <phase> | Reqs: <R-… list> | Test Cases: <N>*`
|
|
73
|
+
- `Reqs:` cross-references source requirement ids (from a scan register's TD-N, a requirements
|
|
74
|
+
doc's R-N/FR-N, or synthesized ids). `Test Cases:` = count of rows in the Mapped Test Cases table.
|
|
75
|
+
|
|
76
|
+
**Story:** one sentence, italic, strict template:
|
|
77
|
+
`*As a <role>, I want <capability>, so that <benefit>.*`
|
|
78
|
+
|
|
79
|
+
**Workflow:** numbered steps (1..N) describing the concrete interaction sequence — what the
|
|
80
|
+
user does and what the system does in response. Present tense, specific.
|
|
81
|
+
|
|
82
|
+
**Acceptance Criteria:** bulleted, **grouped by sub-area** with a bold sub-heading per group
|
|
83
|
+
(e.g. `**Talking State:**`, `**Error and Recovery:**`). Each bullet is a single testable
|
|
84
|
+
assertion (state changed / content shown / constraint met). Include error/edge/recovery groups.
|
|
85
|
+
|
|
86
|
+
**Flow Diagram:** a per-story Mermaid flowchart of THIS story's workflow, rendered to PNG and
|
|
87
|
+
embedded (``) — matching the sample's per-story `<img>`.
|
|
88
|
+
|
|
89
|
+
**Mapped Test Cases:** a markdown table with columns **TC ID | Type | Test Title | Expected Result**.
|
|
90
|
+
- `TC ID`: `TC-NNN` sequential across the whole document.
|
|
91
|
+
- `Type`: one of **Positive | Negative | Edge**.
|
|
92
|
+
- Cover the happy path (Positive), failure modes (Negative), and boundaries (Edge). Every
|
|
93
|
+
acceptance-criteria group should be represented by at least one test case.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## §3 — Scope Summary
|
|
98
|
+
|
|
99
|
+
A table mapping every story to its phase + epic, so a team sees MVP vs later-phase scope at a glance:
|
|
100
|
+
|
|
101
|
+
`| Story ID | Title | Phase | Epic |`
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Diagram pipeline (Mermaid → embedded image)
|
|
106
|
+
|
|
107
|
+
Per the user directive, diagrams are **authored as Mermaid but EMBEDDED as rendered images**
|
|
108
|
+
(like the sample's `<img>` flow charts) — not left as raw Mermaid text.
|
|
109
|
+
|
|
110
|
+
### Semantic coloring (MANDATORY — never flat single-color)
|
|
111
|
+
|
|
112
|
+
Every diagram uses **role-based coloring**, never mermaid's default flat purple. Put a
|
|
113
|
+
`classDef` block at the top of each flowchart and class each node by ROLE:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
classDef start fill:#fff,stroke:#333,color:#000; %% start/end terminal
|
|
117
|
+
classDef decision fill:#fdebc8,stroke:#e8a33d,color:#7a4f00; %% decision diamond
|
|
118
|
+
classDef screen fill:#ece9fb,stroke:#8b7fd6,color:#2d2160; %% screen / state
|
|
119
|
+
classDef action fill:#d4f4dd,stroke:#4caf72,color:#0f5132; %% success / go / action
|
|
120
|
+
classDef destructive fill:#fde2e2,stroke:#e06666,color:#7a1f1f; %% end / delete / irreversible
|
|
121
|
+
classDef newfeat fill:#e2f0fb,stroke:#5b9bd5,color:#1f4e79,stroke-dasharray:4 3; %% NEW / optional (dashed)
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Green = go/success/action · Orange = decision · Red = destructive/irreversible · Blue(dashed)
|
|
125
|
+
= new/optional · Purple = screen/state · White = terminal. Decisions are diamonds `{...}`;
|
|
126
|
+
terminals are round `([...])`; label decision-branch edges (`-->|Yes|`).
|
|
127
|
+
|
|
128
|
+
### Fit-to-page (MANDATORY — the whole diagram must fit)
|
|
129
|
+
|
|
130
|
+
A long top-down flow overflows the page. Keep EVERY diagram fully on one page:
|
|
131
|
+
- Prefer `flowchart LR` (left-to-right) for long linear flows; use `TD` only for ≤6-node flows.
|
|
132
|
+
- For many nodes, break into `subgraph` lanes or split into part-1/part-2 diagrams.
|
|
133
|
+
- Render with explicit sizing so nothing clips, then VERIFY the PNG isn't clipped; if it is,
|
|
134
|
+
switch direction or split and re-render. Never ship a clipped diagram.
|
|
135
|
+
|
|
136
|
+
### Render
|
|
137
|
+
|
|
138
|
+
1. Write each diagram's Mermaid source (classDef block + role classes + fit-appropriate
|
|
139
|
+
direction) to `.gsd-t/user-stories/diagrams/<name>.mmd`.
|
|
140
|
+
2. Render to PNG: `mmdc -i <name>.mmd -o media/<name>.png --width 1600 --backgroundColor white
|
|
141
|
+
--scale 2 --padding 20` (`@mermaid-js/mermaid-cli`; fall back to `npx @mermaid-js/mermaid-cli`).
|
|
142
|
+
If `mmdc` is unavailable, HALT and tell the user to install it — do NOT silently ship raw
|
|
143
|
+
Mermaid where an embedded image is expected (no-silent-degradation).
|
|
144
|
+
3. Embed the PNG in the markdown: ``.
|
|
145
|
+
4. On `.docx` conversion, pandoc embeds these PNGs as real Word images — matching the sample.
|
|
146
|
+
|
|
147
|
+
Keep the `.mmd` source (version-controllable, editable) alongside the rendered PNG.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Output
|
|
152
|
+
|
|
153
|
+
- Markdown deliverable → `share/<Repo>-user-stories.md` (GSD-T share convention), with a
|
|
154
|
+
`media/` dir of rendered diagram PNGs beside it.
|
|
155
|
+
- Optional `.docx` (matching the handoff sample) via `pandoc share/<Repo>-user-stories.md
|
|
156
|
+
-o share/<Repo>-user-stories.docx` — embeds the PNGs as Word images.
|