@anselmdk/feature-spec-md 0.3.1 → 0.5.0-rc.1
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/README.md +170 -39
- package/SPEC_FORMAT.md +38 -78
- package/dist/cli.js +98 -81
- package/dist/cli.js.map +1 -1
- package/dist/featureSpecs.d.ts +1 -1
- package/dist/featureSpecs.d.ts.map +1 -1
- package/dist/featureSpecs.js +57 -10
- package/dist/featureSpecs.js.map +1 -1
- package/dist/githubActionDiffReport.d.ts +4 -0
- package/dist/githubActionDiffReport.d.ts.map +1 -0
- package/dist/githubActionDiffReport.js +209 -0
- package/dist/githubActionDiffReport.js.map +1 -0
- package/dist/githubActionFtp.d.ts +25 -0
- package/dist/githubActionFtp.d.ts.map +1 -0
- package/dist/githubActionFtp.js +210 -0
- package/dist/githubActionFtp.js.map +1 -0
- package/dist/githubActionOutput.d.ts +3 -0
- package/dist/githubActionOutput.d.ts.map +1 -0
- package/dist/githubActionOutput.js +33 -0
- package/dist/githubActionOutput.js.map +1 -0
- package/dist/githubActionReport.d.ts +2 -1
- package/dist/githubActionReport.d.ts.map +1 -1
- package/dist/githubActionReport.js +15 -182
- package/dist/githubActionReport.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/reportTemplate.d.ts +3 -0
- package/dist/reportTemplate.d.ts.map +1 -1
- package/dist/reportTemplate.js +86 -29
- package/dist/reportTemplate.js.map +1 -1
- package/dist/screenshots.d.ts +3 -1
- package/dist/screenshots.d.ts.map +1 -1
- package/dist/screenshots.js +23 -0
- package/dist/screenshots.js.map +1 -1
- package/dist/types.d.ts +11 -1
- package/dist/types.d.ts.map +1 -1
- package/docs/evidence-policy.md +63 -0
- package/docs/spec-driven-flow.md +67 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# feature-spec-md
|
|
2
2
|
|
|
3
|
-
Markdown specs for AI-assisted, testable spec
|
|
3
|
+
Markdown specs for AI-assisted, testable spec-driven development.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
`feature-spec-md` helps you describe a product in Markdown, ask an AI to turn those specs into executable tests, and then prove which parts of the specification are covered by those tests. It is intentionally small: your specs stay as plain Markdown, your tests stay in your normal test runner, and the tool connects the two through stable spec IDs.
|
|
6
6
|
|
|
7
7
|
```txt
|
|
8
8
|
model + features + stack + design
|
|
@@ -10,9 +10,34 @@ model + features + stack + design
|
|
|
10
10
|
-> validation, coverage, screenshots, and reports
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
## What the tool does
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
The shortest version is: `feature-spec-md` turns Markdown specifications into a testable contract.
|
|
16
|
+
|
|
17
|
+
It gives you:
|
|
18
|
+
|
|
19
|
+
- **Spec document formats** for domain models, product features, technical stack notes, and UI/design direction.
|
|
20
|
+
- **Stable IDs** for model items, rules, and scenarios, so tests can reference exactly what they implement.
|
|
21
|
+
- **Validation** that checks frontmatter, headings, IDs, cross-document references, and test coverage expectations.
|
|
22
|
+
- **Coverage reporting** that shows which model items, rules, and scenarios are implemented by tests.
|
|
23
|
+
- **Scenario evidence policy** so specs can declare whether behavior should be tested by unit, integration, Playwright, manual, or no executable tests.
|
|
24
|
+
- **HTML reports** that are useful for reviews, CI artifacts, or published build reports.
|
|
25
|
+
- **Screenshot evidence** for scenarios when using the Playwright helper.
|
|
26
|
+
- **A library API** for projects that want to parse specs, check coverage, collect screenshots, or render reports from their own tooling.
|
|
27
|
+
|
|
28
|
+
The specs are meant to be written with an AI before implementation. The tests are meant to be written with an AI from those specs. `feature-spec-md` then checks that the Markdown stays structured and that executable tests still cover the model items, rules, and scenarios the specs define.
|
|
29
|
+
|
|
30
|
+
## Demo project
|
|
31
|
+
|
|
32
|
+
A complete demo app is available in [`anselmdk/feature-spec-md-demo`](https://github.com/anselmdk/feature-spec-md-demo). It shows a small support-ticket desk built from model, feature, stack, and design specs, with unit tests, Playwright tests, generated coverage, and a published report.
|
|
33
|
+
|
|
34
|
+
Demo reports, including scenario screenshots, are available here:
|
|
35
|
+
|
|
36
|
+
<https://feature-spec-md.anselm.dk/demo/>
|
|
37
|
+
|
|
38
|
+
Use the demo repository when you want to see the expected project shape, script names, screenshot manifest flow, and report output in a real app.
|
|
39
|
+
|
|
40
|
+
## What you write
|
|
16
41
|
|
|
17
42
|
Use four ordinary Markdown document types:
|
|
18
43
|
|
|
@@ -23,9 +48,42 @@ Use four ordinary Markdown document types:
|
|
|
23
48
|
*.design.md product, UI, and interaction direction
|
|
24
49
|
```
|
|
25
50
|
|
|
26
|
-
Each document has frontmatter, a short `## Purpose`, and stable IDs.
|
|
51
|
+
Each document has frontmatter, a short `## Purpose`, and stable IDs.
|
|
52
|
+
|
|
53
|
+
### Model specs
|
|
54
|
+
|
|
55
|
+
Model specs define the shared vocabulary that features can refer to. Use them for domain concepts, states, entities, and important business terms.
|
|
56
|
+
|
|
57
|
+
```md
|
|
58
|
+
### ACCOUNT-M001: Registered person
|
|
59
|
+
|
|
60
|
+
A person who has completed registration and can request sign-in links.
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Feature specs
|
|
64
|
+
|
|
65
|
+
Feature specs describe user-facing behavior with rules and scenarios. Rules and scenarios get stable IDs that tests can reference.
|
|
27
66
|
|
|
28
67
|
```md
|
|
68
|
+
---
|
|
69
|
+
id: ACCOUNT-ACCESS
|
|
70
|
+
title: Account access
|
|
71
|
+
test: playwright
|
|
72
|
+
screenshots: required
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
# Account access
|
|
76
|
+
|
|
77
|
+
## Purpose
|
|
78
|
+
|
|
79
|
+
Allow registered people to access their account securely.
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
- ACCOUNT-ACCESS-R001: Sign-in links MUST expire.
|
|
84
|
+
|
|
85
|
+
## Scenarios
|
|
86
|
+
|
|
29
87
|
### ACCOUNT-ACCESS-S001: Registered person signs in
|
|
30
88
|
|
|
31
89
|
Given a registered person is on the sign-in page
|
|
@@ -33,13 +91,46 @@ When they request and open a valid sign-in link
|
|
|
33
91
|
Then they are signed in
|
|
34
92
|
```
|
|
35
93
|
|
|
94
|
+
Feature specs can declare the expected test and evidence policy:
|
|
95
|
+
|
|
96
|
+
```txt
|
|
97
|
+
test: unit | integration | playwright | manual | skip
|
|
98
|
+
screenshots: required | optional | skip
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
If `screenshots` is omitted, Playwright scenarios default to `required`; non-Playwright scenarios default to `skip`. Scenario-level overrides can be written directly below a scenario heading:
|
|
102
|
+
|
|
103
|
+
```md
|
|
104
|
+
### ACCOUNT-ACCESS-S002: Link expiry is calculated
|
|
105
|
+
Test: unit
|
|
106
|
+
Screenshots: skip
|
|
107
|
+
|
|
108
|
+
Given a sign-in link was created 31 minutes ago
|
|
109
|
+
When expiry is calculated
|
|
110
|
+
Then the link is expired
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
See [SPEC_FORMAT.md](SPEC_FORMAT.md) and [docs/evidence-policy.md](docs/evidence-policy.md) for the exact format.
|
|
114
|
+
|
|
115
|
+
### Stack specs
|
|
116
|
+
|
|
117
|
+
Stack specs document technical decisions that shape the implementation: framework, storage, test runner, deployment constraints, external services, or architecture decisions.
|
|
118
|
+
|
|
119
|
+
### Design specs
|
|
120
|
+
|
|
121
|
+
Design specs capture product, UI, and interaction direction: layout priorities, states, accessibility expectations, empty states, or copy tone.
|
|
122
|
+
|
|
123
|
+
## How tests connect to specs
|
|
124
|
+
|
|
125
|
+
Tests reference spec IDs in titles, tags, annotations, comments, or metadata. The tool scans test files and matches those references back to the Markdown documents.
|
|
126
|
+
|
|
36
127
|
```ts
|
|
37
128
|
test("ACCOUNT-ACCESS-S001 registered person signs in", async ({ page }) => {
|
|
38
129
|
// Covers ACCOUNT-ACCESS-R001 and ACCOUNT-M001.
|
|
39
130
|
});
|
|
40
131
|
```
|
|
41
132
|
|
|
42
|
-
|
|
133
|
+
This keeps the test runner independent from `feature-spec-md`. You can use Playwright, Vitest, Node test, or another runner as long as the source files contain the relevant IDs.
|
|
43
134
|
|
|
44
135
|
## Install
|
|
45
136
|
|
|
@@ -59,19 +150,22 @@ npx feature-spec-md init --kind design --dir specs
|
|
|
59
150
|
## Workflow
|
|
60
151
|
|
|
61
152
|
1. Ask an AI to draft or update `*.model.md`, `*.feature.md`, `*.stack.md`, and `*.design.md` files.
|
|
62
|
-
2.
|
|
63
|
-
3.
|
|
64
|
-
4.
|
|
65
|
-
5. Run `npx feature-spec-md
|
|
153
|
+
2. Declare each feature/scenario test evidence policy where the default is not right.
|
|
154
|
+
3. Run `npx feature-spec-md check` until the spec set is valid.
|
|
155
|
+
4. Ask an AI to write executable tests from the specs, preserving the relevant `-M001`, `-R001`, and `-S001` IDs in the test source.
|
|
156
|
+
5. Run `npx feature-spec-md coverage` to see which scenarios, rules, and model items have tests.
|
|
157
|
+
6. Run `npx feature-spec-md report` to generate an HTML implementation report for review or CI artifacts.
|
|
158
|
+
7. Use `npx feature-spec-md github-report` in GitHub Actions when the report should be linked from the job summary or published.
|
|
66
159
|
|
|
67
|
-
The longer flow, including AI prompts and CI setup, is in [docs/spec-driven-flow.md](docs/spec-driven-flow.md).
|
|
160
|
+
The longer flow, including AI prompts and CI setup, is in [docs/spec-driven-flow.md](docs/spec-driven-flow.md). The demo repository also shows the flow in practice: <https://github.com/anselmdk/feature-spec-md-demo>.
|
|
68
161
|
|
|
69
|
-
## CLI
|
|
162
|
+
## CLI tools
|
|
70
163
|
|
|
71
164
|
```bash
|
|
72
165
|
npx feature-spec-md check
|
|
73
166
|
npx feature-spec-md coverage --fail-on-missing
|
|
74
167
|
npx feature-spec-md report --out test-results/feature-spec-report/index.html
|
|
168
|
+
npx feature-spec-md github-report --report-dir test-results/spec-report
|
|
75
169
|
```
|
|
76
170
|
|
|
77
171
|
By default the CLI scans:
|
|
@@ -92,20 +186,57 @@ npx feature-spec-md check \
|
|
|
92
186
|
--tests "e2e/**/*.spec.ts"
|
|
93
187
|
```
|
|
94
188
|
|
|
95
|
-
|
|
189
|
+
### `check`
|
|
190
|
+
|
|
191
|
+
Validates the spec set and, by default, requires scenario coverage when tests are scanned.
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
npx feature-spec-md check
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
`check` validates spec structure, references between documents, and test coverage. Use `--require-scenario-coverage=false` while drafting. Use `--require-rule-coverage` and `--require-model-coverage` when rules and model items must also fail validation if they have no test references.
|
|
198
|
+
|
|
199
|
+
### `coverage`
|
|
200
|
+
|
|
201
|
+
Prints a terminal implementation report showing covered and missing model items, rules, and scenarios.
|
|
202
|
+
|
|
203
|
+
```bash
|
|
204
|
+
npx feature-spec-md coverage --fail-on-missing
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Use `--fail-on-missing` when missing model item, rule, or scenario coverage should fail CI.
|
|
208
|
+
|
|
209
|
+
### `report`
|
|
96
210
|
|
|
97
|
-
|
|
211
|
+
Writes an HTML report for local review, CI artifacts, or publishing.
|
|
98
212
|
|
|
99
|
-
|
|
213
|
+
```bash
|
|
214
|
+
npx feature-spec-md report \
|
|
215
|
+
--tests "tests/**/*.ts" \
|
|
216
|
+
--out test-results/spec-report/index.html
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
The report can include screenshot evidence from Playwright or another test runner by passing one or more screenshot manifest files:
|
|
100
220
|
|
|
101
221
|
```bash
|
|
102
222
|
npx feature-spec-md report \
|
|
103
223
|
--screenshots "test-results/spec-report/screenshots-*.json"
|
|
104
224
|
```
|
|
105
225
|
|
|
106
|
-
|
|
226
|
+
When CI should fail for missing declared screenshot evidence, add `--enforce-evidence`:
|
|
107
227
|
|
|
108
|
-
|
|
228
|
+
```bash
|
|
229
|
+
npx feature-spec-md report \
|
|
230
|
+
--screenshots "test-results/spec-report/screenshots-*.json" \
|
|
231
|
+
--enforce-evidence \
|
|
232
|
+
--out test-results/spec-report/index.html
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
This gate only fails for scenarios whose resolved screenshot policy is `required`.
|
|
236
|
+
|
|
237
|
+
### `github-report`
|
|
238
|
+
|
|
239
|
+
Writes a GitHub Actions job summary and prepares the generated report for either artifact upload or FTP publishing.
|
|
109
240
|
|
|
110
241
|
```bash
|
|
111
242
|
npx feature-spec-md github-report \
|
|
@@ -113,17 +244,17 @@ npx feature-spec-md github-report \
|
|
|
113
244
|
--publish ftp
|
|
114
245
|
```
|
|
115
246
|
|
|
116
|
-
|
|
247
|
+
## Playwright screenshot evidence
|
|
117
248
|
|
|
118
|
-
|
|
119
|
-
https://github.com/anselmdk/feature-spec-md/settings/secrets/actions
|
|
120
|
-
```
|
|
249
|
+
The package exports a Playwright helper from `@anselmdk/feature-spec-md/playwright`. It maps scenario step text back to the spec line, wraps the implementation in a Playwright `test.step`, captures a screenshot after the step, attaches it to the test, and writes a screenshot manifest such as `test-results/spec-report/screenshots-0.json`.
|
|
121
250
|
|
|
122
|
-
|
|
251
|
+
That manifest can then be passed to `feature-spec-md report` with `--screenshots "test-results/spec-report/screenshots-*.json"` so the HTML report can show scenario evidence next to the relevant spec step. With `--enforce-evidence`, missing screenshots fail only for scenarios declared as `screenshots: required`.
|
|
123
252
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
253
|
+
## GitHub Actions report publishing
|
|
254
|
+
|
|
255
|
+
`feature-spec-md github-report` writes the GitHub Actions job summary and can either prepare outputs for a GitHub artifact upload or publish the generated report to FTP.
|
|
256
|
+
|
|
257
|
+
For FTP publishing, configure repository secrets in GitHub under **Settings → Secrets and variables → Actions → Repository secrets**.
|
|
127
258
|
|
|
128
259
|
Required secrets or environment variables:
|
|
129
260
|
|
|
@@ -155,20 +286,6 @@ Example GitHub Actions step:
|
|
|
155
286
|
FEATURE_SPEC_REPORT_BASE_URL: ${{ secrets.FEATURE_SPEC_REPORT_BASE_URL }}
|
|
156
287
|
```
|
|
157
288
|
|
|
158
|
-
With `FEATURE_SPEC_REPORT_BASE_URL=http://feature-spec-md.anselm.dk/` and GitHub Actions build number `42`, the report is uploaded to a build-numbered directory and linked as:
|
|
159
|
-
|
|
160
|
-
```txt
|
|
161
|
-
http://feature-spec-md.anselm.dk/42/
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
The build index is created or updated at:
|
|
165
|
-
|
|
166
|
-
```txt
|
|
167
|
-
http://feature-spec-md.anselm.dk/
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
FTP reports are uploaded into a build-numbered directory using `GITHUB_RUN_NUMBER`, and an `index.html` file is created or updated at the public base URL so all uploaded builds can be browsed. When FTP publishing is used, the command emits `upload-github-artifact=false` and links the GitHub Actions job summary directly to the hosted report URL.
|
|
171
|
-
|
|
172
289
|
## Library API
|
|
173
290
|
|
|
174
291
|
Most integrations can use the top-level document API:
|
|
@@ -176,14 +293,28 @@ Most integrations can use the top-level document API:
|
|
|
176
293
|
```ts
|
|
177
294
|
import {
|
|
178
295
|
checkSpecDocuments,
|
|
296
|
+
collectSpecScreenshots,
|
|
179
297
|
parseSpecDocument,
|
|
180
298
|
renderHtmlReport,
|
|
299
|
+
validateScenarioScreenshots,
|
|
181
300
|
validateSpecDocument,
|
|
182
301
|
} from "@anselmdk/feature-spec-md";
|
|
183
302
|
```
|
|
184
303
|
|
|
304
|
+
Useful exports include:
|
|
305
|
+
|
|
306
|
+
- `parseSpecDocument` and kind-specific parsers for reading Markdown specs.
|
|
307
|
+
- `validateSpecDocument` and `validateSpecGraph` for checking one document or a connected spec set.
|
|
308
|
+
- `checkSpecDocuments` for loading specs and tests, validating documents, and computing coverage in one call.
|
|
309
|
+
- `buildSpecCoverageSummary` and `collectSpecTestReferences` for custom coverage workflows.
|
|
310
|
+
- `collectSpecScreenshots` and `validateScenarioScreenshots` for loading and enforcing screenshot evidence.
|
|
311
|
+
- `renderHtmlReport` for generating the same report UI from your own integration.
|
|
312
|
+
- `writeTextFile` for small report-writing integrations.
|
|
313
|
+
|
|
185
314
|
Feature-only helpers such as `parseFeatureSpec` and `checkFeatureSpecs` remain available for compatibility.
|
|
186
315
|
|
|
316
|
+
The package also exports `@anselmdk/feature-spec-md/specDocuments` and `@anselmdk/feature-spec-md/playwright` for more focused imports.
|
|
317
|
+
|
|
187
318
|
## Development
|
|
188
319
|
|
|
189
320
|
```bash
|
package/SPEC_FORMAT.md
CHANGED
|
@@ -20,15 +20,6 @@ A spec set can contain four document types:
|
|
|
20
20
|
- `*.stack.md` defines technical platform choices and their rationale.
|
|
21
21
|
- `*.design.md` defines product, UI, layout, visual, and interaction direction.
|
|
22
22
|
|
|
23
|
-
The short version:
|
|
24
|
-
|
|
25
|
-
```txt
|
|
26
|
-
model tells tests what things mean
|
|
27
|
-
features tell tests what behavior must work
|
|
28
|
-
stack tells implementation what tools and constraints to use
|
|
29
|
-
design tells implementation what experience to create
|
|
30
|
-
```
|
|
31
|
-
|
|
32
23
|
## Frontmatter
|
|
33
24
|
|
|
34
25
|
Every file starts with YAML-like frontmatter:
|
|
@@ -53,6 +44,8 @@ Optional fields:
|
|
|
53
44
|
- `owner`
|
|
54
45
|
- `model`: a single referenced model id, for feature and design files
|
|
55
46
|
- `models`: comma-separated referenced model ids, for feature and design files
|
|
47
|
+
- `test`: default scenario test type for feature files
|
|
48
|
+
- `screenshots`: default screenshot evidence policy for feature files
|
|
56
49
|
|
|
57
50
|
IDs use uppercase words separated by hyphens. IDs are the contract between specs, tests, reports, and implementation work.
|
|
58
51
|
|
|
@@ -128,115 +121,81 @@ When they create a card with the title "Write release notes"
|
|
|
128
121
|
Then the card "Write release notes" is visible in the To do column
|
|
129
122
|
```
|
|
130
123
|
|
|
131
|
-
Allowed step keywords
|
|
132
|
-
|
|
133
|
-
- `Given`
|
|
134
|
-
- `When`
|
|
135
|
-
- `Then`
|
|
136
|
-
- `And`
|
|
137
|
-
- `But`
|
|
124
|
+
Allowed step keywords are `Given`, `When`, `Then`, `And`, and `But`.
|
|
138
125
|
|
|
139
126
|
Rules state durable product truths. Scenarios show concrete examples that executable tests can implement.
|
|
140
127
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
Stack files use the `.stack.md` suffix.
|
|
128
|
+
### Scenario Test And Evidence Policy
|
|
144
129
|
|
|
145
|
-
|
|
130
|
+
Feature specs can declare how scenarios are expected to be tested and whether screenshot evidence is required.
|
|
146
131
|
|
|
147
|
-
|
|
132
|
+
Feature-level frontmatter sets defaults for all scenarios in a feature:
|
|
148
133
|
|
|
149
134
|
```md
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
135
|
+
---
|
|
136
|
+
id: KANBAN-CARD-AUTHORING
|
|
137
|
+
title: Card authoring
|
|
138
|
+
test: playwright
|
|
139
|
+
screenshots: required
|
|
140
|
+
---
|
|
155
141
|
```
|
|
156
142
|
|
|
157
|
-
|
|
143
|
+
Scenario-level overrides go directly below a scenario heading:
|
|
158
144
|
|
|
159
145
|
```md
|
|
160
|
-
|
|
146
|
+
### KANBAN-CARD-AUTHORING-S002: Card title is normalized
|
|
147
|
+
Test: unit
|
|
148
|
+
Screenshots: skip
|
|
161
149
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
150
|
+
Given the raw card title contains leading whitespace
|
|
151
|
+
When the title is normalized
|
|
152
|
+
Then the stored title has no leading whitespace
|
|
165
153
|
```
|
|
166
154
|
|
|
167
|
-
|
|
155
|
+
Supported `test` values are `unit`, `integration`, `playwright`, `manual`, and `skip`.
|
|
168
156
|
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
id: KANBAN-STACK
|
|
172
|
-
title: Kanban tech stack
|
|
173
|
-
status: draft
|
|
174
|
-
---
|
|
157
|
+
Supported `screenshots` values are `required`, `optional`, and `skip`. `screenshots: none` is accepted as an alias for `screenshots: skip`.
|
|
175
158
|
|
|
176
|
-
|
|
159
|
+
Defaults:
|
|
177
160
|
|
|
178
|
-
|
|
161
|
+
- If `test` is omitted, scenarios default to `unit`.
|
|
162
|
+
- If `screenshots` is omitted and `test` resolves to `playwright`, screenshots default to `required`.
|
|
163
|
+
- If `screenshots` is omitted and `test` resolves to `unit`, `integration`, `manual`, or `skip`, screenshots default to `skip`.
|
|
179
164
|
|
|
180
|
-
|
|
165
|
+
See [Scenario Test And Evidence Policy](docs/evidence-policy.md) for details and CI examples.
|
|
181
166
|
|
|
182
|
-
## Stack
|
|
183
|
-
|
|
184
|
-
| Area | Choice |
|
|
185
|
-
| -------- | ---------- |
|
|
186
|
-
| Frontend | React |
|
|
187
|
-
| Language | TypeScript |
|
|
188
|
-
| Testing | Playwright |
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
## Design Files
|
|
192
|
-
|
|
193
|
-
Design files use the `.design.md` suffix.
|
|
167
|
+
## Stack Files
|
|
194
168
|
|
|
195
|
-
|
|
169
|
+
Stack files use the `.stack.md` suffix and define technical platform choices and the reasoning behind them.
|
|
196
170
|
|
|
197
171
|
Required sections:
|
|
198
172
|
|
|
199
173
|
```md
|
|
200
|
-
# Kanban
|
|
174
|
+
# Kanban tech stack
|
|
201
175
|
|
|
202
176
|
## Purpose
|
|
203
177
|
|
|
204
|
-
##
|
|
178
|
+
## Stack
|
|
205
179
|
```
|
|
206
180
|
|
|
207
|
-
Optional sections
|
|
208
|
-
|
|
209
|
-
```md
|
|
210
|
-
## Principles
|
|
211
|
-
|
|
212
|
-
## Layout
|
|
181
|
+
Optional sections are `## Context`, `## Rationale`, and `## Consequences`.
|
|
213
182
|
|
|
214
|
-
##
|
|
183
|
+
## Design Files
|
|
215
184
|
|
|
216
|
-
|
|
217
|
-
```
|
|
185
|
+
Design files use the `.design.md` suffix and define product, UI, layout, visual, and interaction direction.
|
|
218
186
|
|
|
219
|
-
|
|
187
|
+
Required sections:
|
|
220
188
|
|
|
221
189
|
```md
|
|
222
|
-
---
|
|
223
|
-
id: KANBAN-DESIGN
|
|
224
|
-
title: Kanban board design
|
|
225
|
-
status: draft
|
|
226
|
-
model: KANBAN
|
|
227
|
-
---
|
|
228
|
-
|
|
229
190
|
# Kanban board design
|
|
230
191
|
|
|
231
192
|
## Purpose
|
|
232
193
|
|
|
233
|
-
Define the visual and interaction design direction for the Kanban board.
|
|
234
|
-
|
|
235
194
|
## Design
|
|
236
|
-
|
|
237
|
-
The board should feel lightweight, immediate, and calm.
|
|
238
195
|
```
|
|
239
196
|
|
|
197
|
+
Optional sections are `## Principles`, `## Layout`, `## Interaction`, and `## Visual style`.
|
|
198
|
+
|
|
240
199
|
## Splitting Guidance
|
|
241
200
|
|
|
242
201
|
Split model files by coherent domain vocabulary, ownership, or lifecycle.
|
|
@@ -251,7 +210,7 @@ Keep each document small enough for an AI to read, revise, and use as test-writi
|
|
|
251
210
|
|
|
252
211
|
## Test Coverage Convention
|
|
253
212
|
|
|
254
|
-
Spec files do not
|
|
213
|
+
Spec files declare expected test and evidence policy, but they do not map scenarios to concrete test files.
|
|
255
214
|
|
|
256
215
|
Tests reference model item, rule, and scenario IDs in test titles, tags, annotations, comments, or metadata.
|
|
257
216
|
|
|
@@ -261,6 +220,7 @@ Generated tooling can answer:
|
|
|
261
220
|
- Which scenarios have tests?
|
|
262
221
|
- Which rules have executable coverage?
|
|
263
222
|
- Which tests reference deleted or unknown spec IDs?
|
|
223
|
+
- Which scenarios are expected to have screenshot evidence?
|
|
264
224
|
- Which visible flows have screenshots, traces, or other evidence?
|
|
265
225
|
|
|
266
226
|
Example:
|