@sun-asterisk/sungen 3.2.16-beta.1 → 3.2.16-beta.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/dist/cli/commands/audit.d.ts.map +1 -1
- package/dist/cli/commands/audit.js +6 -0
- package/dist/cli/commands/audit.js.map +1 -1
- package/dist/cli/commands/delivery.d.ts.map +1 -1
- package/dist/cli/commands/delivery.js +67 -20
- package/dist/cli/commands/delivery.js.map +1 -1
- package/dist/exporters/feature-parser.d.ts +16 -1
- package/dist/exporters/feature-parser.d.ts.map +1 -1
- package/dist/exporters/feature-parser.js +21 -2
- package/dist/exporters/feature-parser.js.map +1 -1
- package/dist/exporters/matrix/build.d.ts +27 -2
- package/dist/exporters/matrix/build.d.ts.map +1 -1
- package/dist/exporters/matrix/build.js +277 -47
- package/dist/exporters/matrix/build.js.map +1 -1
- package/dist/exporters/matrix/export.d.ts +7 -4
- package/dist/exporters/matrix/export.d.ts.map +1 -1
- package/dist/exporters/matrix/export.js +22 -6
- package/dist/exporters/matrix/export.js.map +1 -1
- package/dist/exporters/matrix/gates.d.ts.map +1 -1
- package/dist/exporters/matrix/gates.js +112 -3
- package/dist/exporters/matrix/gates.js.map +1 -1
- package/dist/exporters/matrix/map-loader.d.ts.map +1 -1
- package/dist/exporters/matrix/map-loader.js +20 -0
- package/dist/exporters/matrix/map-loader.js.map +1 -1
- package/dist/exporters/matrix/render-csv.d.ts +3 -2
- package/dist/exporters/matrix/render-csv.d.ts.map +1 -1
- package/dist/exporters/matrix/render-csv.js +53 -30
- package/dist/exporters/matrix/render-csv.js.map +1 -1
- package/dist/exporters/matrix/render-xlsx.d.ts +32 -8
- package/dist/exporters/matrix/render-xlsx.d.ts.map +1 -1
- package/dist/exporters/matrix/render-xlsx.js +215 -83
- package/dist/exporters/matrix/render-xlsx.js.map +1 -1
- package/dist/exporters/matrix/types.d.ts +53 -7
- package/dist/exporters/matrix/types.d.ts.map +1 -1
- package/dist/exporters/matrix/types.js +2 -2
- package/dist/exporters/matrix/types.js.map +1 -1
- package/dist/exporters/matrix/wording.d.ts +61 -0
- package/dist/exporters/matrix/wording.d.ts.map +1 -0
- package/dist/exporters/matrix/wording.js +221 -0
- package/dist/exporters/matrix/wording.js.map +1 -0
- package/dist/exporters/scenario-merger.d.ts.map +1 -1
- package/dist/exporters/scenario-merger.js +2 -1
- package/dist/exporters/scenario-merger.js.map +1 -1
- package/dist/exporters/spec-parser.d.ts.map +1 -1
- package/dist/exporters/spec-parser.js +2 -1
- package/dist/exporters/spec-parser.js.map +1 -1
- package/dist/harness/audit.d.ts +6 -0
- package/dist/harness/audit.d.ts.map +1 -1
- package/dist/harness/audit.js +80 -15
- package/dist/harness/audit.js.map +1 -1
- package/dist/harness/blindspot.d.ts.map +1 -1
- package/dist/harness/blindspot.js +2 -1
- package/dist/harness/blindspot.js.map +1 -1
- package/dist/harness/capability-plan.d.ts.map +1 -1
- package/dist/harness/capability-plan.js +3 -2
- package/dist/harness/capability-plan.js.map +1 -1
- package/dist/harness/feedback.d.ts.map +1 -1
- package/dist/harness/feedback.js +3 -2
- package/dist/harness/feedback.js.map +1 -1
- package/dist/harness/flow-check.d.ts.map +1 -1
- package/dist/harness/flow-check.js +2 -1
- package/dist/harness/flow-check.js.map +1 -1
- package/dist/harness/flow-plan.d.ts.map +1 -1
- package/dist/harness/flow-plan.js +3 -2
- package/dist/harness/flow-plan.js.map +1 -1
- package/dist/harness/intent.d.ts.map +1 -1
- package/dist/harness/intent.js +2 -1
- package/dist/harness/intent.js.map +1 -1
- package/dist/harness/journey.d.ts.map +1 -1
- package/dist/harness/journey.js +3 -2
- package/dist/harness/journey.js.map +1 -1
- package/dist/harness/ledger.d.ts.map +1 -1
- package/dist/harness/ledger.js +3 -2
- package/dist/harness/ledger.js.map +1 -1
- package/dist/harness/manifest.d.ts.map +1 -1
- package/dist/harness/manifest.js +4 -3
- package/dist/harness/manifest.js.map +1 -1
- package/dist/harness/parse.d.ts.map +1 -1
- package/dist/harness/parse.js +16 -3
- package/dist/harness/parse.js.map +1 -1
- package/dist/harness/quality-gates.d.ts.map +1 -1
- package/dist/harness/quality-gates.js +2 -1
- package/dist/harness/quality-gates.js.map +1 -1
- package/dist/harness/read-text.d.ts +22 -0
- package/dist/harness/read-text.d.ts.map +1 -0
- package/dist/harness/read-text.js +64 -0
- package/dist/harness/read-text.js.map +1 -0
- package/dist/harness/script-check.d.ts.map +1 -1
- package/dist/harness/script-check.js +3 -2
- package/dist/harness/script-check.js.map +1 -1
- package/dist/harness/sensors.d.ts +13 -1
- package/dist/harness/sensors.d.ts.map +1 -1
- package/dist/harness/sensors.js +63 -20
- package/dist/harness/sensors.js.map +1 -1
- package/dist/harness/spec-coverage.d.ts +5 -0
- package/dist/harness/spec-coverage.d.ts.map +1 -1
- package/dist/harness/spec-coverage.js +17 -7
- package/dist/harness/spec-coverage.js.map +1 -1
- package/dist/harness/trace.d.ts.map +1 -1
- package/dist/harness/trace.js +4 -3
- package/dist/harness/trace.js.map +1 -1
- package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
- package/dist/harness/viewpoint-ledger.js +2 -1
- package/dist/harness/viewpoint-ledger.js.map +1 -1
- package/dist/orchestrator/templates/ai-src/commands/create-test.md +9 -0
- package/dist/orchestrator/templates/ai-src/commands/delivery.md +103 -18
- package/dist/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +77 -11
- package/dist/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +1 -0
- package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +22 -0
- package/package.json +4 -4
- package/src/cli/commands/audit.ts +5 -0
- package/src/cli/commands/delivery.ts +68 -22
- package/src/exporters/feature-parser.ts +21 -2
- package/src/exporters/matrix/build.ts +281 -43
- package/src/exporters/matrix/export.ts +31 -6
- package/src/exporters/matrix/gates.ts +119 -3
- package/src/exporters/matrix/map-loader.ts +22 -1
- package/src/exporters/matrix/render-csv.ts +53 -30
- package/src/exporters/matrix/render-xlsx.ts +216 -85
- package/src/exporters/matrix/types.ts +58 -8
- package/src/exporters/matrix/wording.ts +221 -0
- package/src/exporters/scenario-merger.ts +2 -1
- package/src/exporters/spec-parser.ts +2 -1
- package/src/harness/audit.ts +84 -16
- package/src/harness/blindspot.ts +2 -1
- package/src/harness/capability-plan.ts +3 -2
- package/src/harness/feedback.ts +3 -2
- package/src/harness/flow-check.ts +2 -1
- package/src/harness/flow-plan.ts +3 -2
- package/src/harness/intent.ts +2 -1
- package/src/harness/journey.ts +3 -2
- package/src/harness/ledger.ts +3 -2
- package/src/harness/manifest.ts +4 -3
- package/src/harness/parse.ts +17 -3
- package/src/harness/quality-gates.ts +2 -1
- package/src/harness/read-text.ts +28 -0
- package/src/harness/script-check.ts +3 -2
- package/src/harness/sensors.ts +55 -8
- package/src/harness/spec-coverage.ts +22 -7
- package/src/harness/trace.ts +4 -3
- package/src/harness/viewpoint-ledger.ts +2 -1
- package/src/orchestrator/templates/ai-src/commands/create-test.md +9 -0
- package/src/orchestrator/templates/ai-src/commands/delivery.md +103 -18
- package/src/orchestrator/templates/ai-src/skills/sungen-delivery/SKILL.md +77 -11
- package/src/orchestrator/templates/ai-src/skills/sungen-gherkin-syntax/SKILL.md +1 -0
- package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +22 -0
|
@@ -29,19 +29,85 @@ fingerprints). Schema + grouping rules live in the delivery command instructions
|
|
|
29
29
|
spec is `docs/spec/delivery-coverage-matrix-spec.md`.
|
|
30
30
|
|
|
31
31
|
**Gates** (CLI `--check`): A source (VP-ids unique, oracle present, Background setup-only) ·
|
|
32
|
-
B mapping (every scenario in exactly one group XOR one disposition) · C aggregation (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`
|
|
42
|
-
|
|
32
|
+
B mapping (every scenario in exactly one group XOR one disposition) · C aggregation (test layer
|
|
33
|
+
recomputed and equal within a group — **execution mode and priority are coverage dimensions, not
|
|
34
|
+
splits**: mixed items show `Auto n · Manual m` and take the highest variant priority; heuristic
|
|
35
|
+
oracle-shape/precondition mismatches are review-level, silenced once approved and unchanged) ·
|
|
36
|
+
D executability (precondition · condition+
|
|
37
|
+
data · trigger · oracle all renderable; every `{{var}}` resolves; **no template token may survive
|
|
38
|
+
into a rendered cell** — test-data cross-references are resolved for display) · E drift
|
|
39
|
+
(scenario fingerprint mismatch → back to review; the map's OWN reviewed
|
|
40
|
+
wording/grouping is fingerprinted as `__map__` too, so post-approval edits re-open review) · G review state (proposed groups block the official
|
|
41
|
+
render; `--preview` renders a DRAFT watermark) · K category class (a `VP-SEC-*` variant outside
|
|
42
|
+
`category: security`, or `VP-NFR-*` outside `nfr` → warning: the Coverage grid's column would render
|
|
43
|
+
empty and report a false gap) · R requirement coverage (spec FR/TR/NFR ids with no trace and no
|
|
44
|
+
`requirements:` status → warning; **and a `status: covered` override that no variant traces to** →
|
|
45
|
+
warning: tag the proving scenario `@spec:<id>` instead of asserting it in prose) · W wording lint (map intent/oracle containing
|
|
46
|
+
tokens, `[Selector]` refs, DSL phrasing, or generator labels → warning).
|
|
47
|
+
|
|
48
|
+
**Wording normalization (deterministic, after semantic normalization):** DSL steps render as
|
|
49
|
+
controlled manual-test English without changing meaning — actions in the imperative (`User fill
|
|
50
|
+
[Email] field with X` → `Enter X in the Email field.`), expected results as observable assertions
|
|
51
|
+
(`User see [Jobs] page` → `The Jobs page is displayed.`), preconditions as states (`The user is
|
|
52
|
+
signed out.`). Manual `# Tester verifies:` labels become structured fields: `Setup:` →
|
|
53
|
+
Precondition, `Action:` → Action, `Observable:` → Expected Result, `Oracle:` → a separate
|
|
54
|
+
`Verification method:` line. Sequence-sensitive flows keep event order: actions numbered with
|
|
55
|
+
mid-flow assertions inline as `Verify: …`; only the final Then block is the Expected Result.
|
|
56
|
+
Empty test values render as `(empty)`.
|
|
57
|
+
|
|
58
|
+
**Output format**: **XLSX only by default** (one artifact). `--format csv` writes the flat CSV
|
|
59
|
+
instead; `--format both` writes both.
|
|
60
|
+
|
|
61
|
+
**Scope decides strictness**: a **named** unit that is not ready aborts with exit 1 (pass
|
|
62
|
+
`--continue-on-missing` to tolerate it); a **no-argument sweep** exports every ready unit, lists
|
|
63
|
+
every unit it did not export with the reason, and exits 0 as long as it wrote something — a
|
|
64
|
+
scaffolded unit never blocks the ready ones.
|
|
65
|
+
|
|
66
|
+
**Workbook**: `Testcases` sheet — parent rows + outline-level-1 variant sub-rows for **every**
|
|
67
|
+
item (single-variant included: the sub-row carries the source VP-id, resolved data, and the
|
|
68
|
+
result/evidence entry). Sub-rows are **delta-only**: knowledge common to the whole item
|
|
69
|
+
(precondition, trigger) is written ONCE on the parent; a child repeats only what distinguishes it
|
|
70
|
+
(condition/data, precondition delta, trigger when it differs) plus its own precise oracle and
|
|
71
|
+
execution fields. The parent never carries placeholder text — when triggers differ the cell is
|
|
72
|
+
simply empty and the sub-rows carry them.
|
|
73
|
+
|
|
74
|
+
Parent preconditions are the **intersection** of the variants' and the parent's Action holds the
|
|
75
|
+
**shared leading steps**; each variant renders only its remaining steps, numbered to continue the
|
|
76
|
+
parent's list — so a shared prefix is written once, not repeated on every child. The parent's
|
|
77
|
+
Coverage cell is the map's short `dimensions:` digest (or the variant refs when none is declared),
|
|
78
|
+
never a concatenation of variant titles.
|
|
79
|
+
|
|
80
|
+
Variant Result cells hold exactly one of `Passed`/`Failed`/`Blocked`/`Pending`/`N/A` (dropdown) —
|
|
81
|
+
that vocabulary is the contract: the parent Result and the summary band are **live Excel formulas**
|
|
82
|
+
counting those words, so a parent label is always a composed `n/m Passed …` string (`All N/A` when
|
|
83
|
+
every variant is N/A) and never a bare state word. **`N/A` leaves the denominator.** Evidence and
|
|
84
|
+
Defect ID are separate columns; ID + Target frozen; ISO dates; landscape print with repeated
|
|
85
|
+
header rows.
|
|
86
|
+
|
|
87
|
+
`Coverage` sheet — requirement coverage table (every FR/TR/NFR id with an explicit status),
|
|
88
|
+
target × category grid with explicit `—` gaps, dispositions, manifest. CSV mirrors the same model
|
|
89
|
+
flat with a `Level` column (`item`/`variant`) + a requirement-coverage appendix.
|
|
43
90
|
`delivery_item_count` ≠ progress — variants are the execution metric.
|
|
44
91
|
|
|
92
|
+
**Id schemes**: the `VP-<CAT>-<NNN>` convention is a suggestion, not a requirement — a project's own
|
|
93
|
+
scheme (`SEC-123`, `PER-345`, `MS-HP-001`) is addressed the same way, and the category segment
|
|
94
|
+
(`SEC`, `PER`) still drives Gate K. Requirement ids come from the spec's own bolded declarations
|
|
95
|
+
(`- **REQ-12**: …`), so a project that does not use FR/TR/NFR still gets its coverage table.
|
|
96
|
+
|
|
97
|
+
**Runtime-captured values**: a scenario may produce its own values — `User remember [X] text as
|
|
98
|
+
{{v}}` (compared later) or a capability binding (`@query:`/`@api:`/`@dataFactory:`). These never
|
|
99
|
+
exist in test-data, so Gate D does not ask for them: the capture step renders as an instruction
|
|
100
|
+
(`Note the X text for later (as "v")`) and later references read `the captured v`.
|
|
101
|
+
|
|
102
|
+
**Data fidelity**: invisible test data is made visible, never normalized — `''` → `(empty)`,
|
|
103
|
+
whitespace-only → `(5 spaces)`, padded → `" value "` quoted verbatim. A trim/collapse here would
|
|
104
|
+
silently break the whitespace tests it describes.
|
|
105
|
+
|
|
106
|
+
**Authoring guidance the matrix rewards** (create-test side): payload/provider matrices (SQLi
|
|
107
|
+
payload lists, OAuth provider sets) belong in `@cases` datasets so each case is an atomic,
|
|
108
|
+
independently-reportable variant; keep dataset `case:` labels short and stable (`CHK-EMAIL-I1`),
|
|
109
|
+
with descriptions in other columns — the label is part of the variant's identity.
|
|
110
|
+
|
|
45
111
|
---
|
|
46
112
|
|
|
47
113
|
## Legacy mode (--legacy / --full)
|
|
@@ -288,6 +288,7 @@ Options: `nth` `exact` `scope` `match` `variant` `frame` `contenteditable` `colu
|
|
|
288
288
|
|
|
289
289
|
| Tag | Effect |
|
|
290
290
|
|---|---|
|
|
291
|
+
| `@spec:<id>` | **Traceability**: this scenario proves requirement `<id>` from `requirements/spec.md` (`@spec:FR-003`). Repeatable — a scenario may prove several. Read by `sungen audit` (requirement coverage) and by delivery (the Coverage sheet's requirement table). Without it the link is only inferred from wording and cannot survive an edit. |
|
|
291
292
|
| `@manual` | Skip in generation |
|
|
292
293
|
| `@auth:role` | Use auth storage state for role |
|
|
293
294
|
| `@no-auth` | Disable inherited auth |
|
|
@@ -4,6 +4,28 @@ description: 'Use when create-test needs to translate spec.md/Figma/UI into .fea
|
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
## Traceability — tag the requirement each scenario proves
|
|
9
|
+
|
|
10
|
+
Every requirement id in `requirements/spec.md` (`FR-`/`TR-`/`NFR-`) must be reachable from a
|
|
11
|
+
scenario, and the link must be **written down, not inferred**:
|
|
12
|
+
|
|
13
|
+
```gherkin
|
|
14
|
+
@high @spec:FR-003
|
|
15
|
+
Scenario: VP-VAL-002 An email in an invalid format shows the format error
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- Put `@spec:<id>` on the scenario that actually proves the requirement; repeat the tag when one
|
|
19
|
+
scenario proves several (`@spec:FR-003 @spec:FR-004`).
|
|
20
|
+
- One requirement may be proved by several scenarios — tag each of them.
|
|
21
|
+
- A requirement you deliberately do not cover here (performance budget, i18n suite, server-side
|
|
22
|
+
concern) needs no tag; record it later in the delivery map's `requirements:` section with a
|
|
23
|
+
status and reason.
|
|
24
|
+
- Why it matters: `sungen audit` also counts a requirement as covered when its keywords merely
|
|
25
|
+
resemble a scenario title, and reports `SPEC-TRACE-IMPLICIT` for those. Delivery's requirement
|
|
26
|
+
table follows **only** the explicit tag — an untagged requirement reads as an uncovered gap in
|
|
27
|
+
the customer-facing coverage sheet even when a scenario does prove it.
|
|
28
|
+
|
|
7
29
|
## ⚠️ Gotchas — read before generating
|
|
8
30
|
|
|
9
31
|
- **Field-level test-data follows the Data Factory standard — don't hand-invent values.** When the unit has input fields, the field values (valid / boundary / invalid + error codes) come from the **`sungen-data-factory`** catalog via a field-map + `sungen data gen` (create-test step 5.3), not free-form guessing. Weave the standardized boundary/invalid sets into `@cases` with `CHK-*` trace. This skill still owns scenario structure, viewpoints, and non-field oracles.
|