@sun-asterisk/sungen 3.0.0-beta.78 → 3.0.0-beta.80

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.
@@ -2,6 +2,7 @@ import { GateResult, DepthResult, BalanceResult, DuplicateResult, TraceResult, C
2
2
  import { IntentProfile } from './intent';
3
3
  import { Provenance } from './provenance';
4
4
  import { SpecCoverageResult } from './spec-coverage';
5
+ import { DownstreamResult, ManualOracleResult } from './quality-gates';
5
6
  export interface AuditReport {
6
7
  screen: string;
7
8
  scenarioCount: number;
@@ -12,6 +13,9 @@ export interface AuditReport {
12
13
  balance: BalanceResult;
13
14
  duplicates: DuplicateResult;
14
15
  trace: TraceResult;
16
+ taxonomyMismatch: boolean;
17
+ downstream: DownstreamResult;
18
+ manualOracle: ManualOracleResult;
15
19
  score: {
16
20
  overall: number;
17
21
  coverage: number;
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/harness/audit.ts"],"names":[],"mappings":"AAWA,OAAO,EAEL,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EACvG,MAAM,WAAW,CAAC;AACnB,OAAO,EAAwC,aAAa,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAiB,UAAU,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAgB,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,cAAc,CAAC;IACzB,OAAO,EAAE,aAAa,CAAC;IACvB,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EA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AAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,kBAAkB,CAAC;IACjC,KAAK,EAAE;QACL,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;QAChB,YAAY,EAAE,MAAM,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,WAAW,CA6G3E"}
@@ -49,6 +49,7 @@ const sensors_1 = require("./sensors");
49
49
  const intent_1 = require("./intent");
50
50
  const provenance_1 = require("./provenance");
51
51
  const spec_coverage_1 = require("./spec-coverage");
52
+ const quality_gates_1 = require("./quality-gates");
52
53
  function runAudit(screenDir, screenName) {
53
54
  const featurePath = path.join(screenDir, 'features', `${screenName}.feature`);
54
55
  const viewpointPath = path.join(screenDir, 'requirements', 'test-viewpoint.md');
@@ -67,6 +68,11 @@ function runAudit(screenDir, screenName) {
67
68
  const balance = (0, sensors_1.coverageBalance)(scenarios);
68
69
  const duplicates = (0, sensors_1.duplicateClusters)(scenarios);
69
70
  const trace = (0, sensors_1.traceability)(scenarios, viewpoints);
71
+ // #1 taxonomy-match: when the project defines a viewpoint taxonomy, scenarios must use it.
72
+ const taxonomyMismatch = viewpoints.length > 0 && trace.withVpCode > 0 && trace.mappedRatio < 0.6;
73
+ // #2 downstream-scope + #4 manual-oracle
74
+ const downstream = (0, quality_gates_1.downstreamScope)((0, quality_gates_1.readText)(specPath), scenarios);
75
+ const manualOracleResult = (0, quality_gates_1.manualOracle)(featureText);
70
76
  // Sub-scores
71
77
  const coverage = gate.coverageRatio;
72
78
  const businessDepth = depth.bcDepthRatio;
@@ -113,13 +119,23 @@ function runAudit(screenDir, screenName) {
113
119
  for (const u of spec.uncoveredMust) {
114
120
  findings.push(`SPEC-UNCOVERED: ${u.id} (MUST) has no covering scenario — "${u.text}" → add a scenario or tag one @spec:${u.id}.`);
115
121
  }
116
- // Gate spans coverage (viewpoint themes), depth (data-correctness), claim-proof,
117
- // AND spec-clause coverage (every MUST clause + every mandated validation trigger).
118
- const gateStatus = gate.gaps.length === 0 && depth.verdict !== 'fail' && claim.verdict !== 'fail' && spec.verdict !== 'fail' ? 'PASS' : 'FAIL';
122
+ if (taxonomyMismatch) {
123
+ findings.push(`VP-TAXONOMY-MISMATCH: only ${(trace.mappedRatio * 100).toFixed(0)}% of scenarios use the viewpoint IDs declared in test-viewpoint.md — scenarios invented a generic VP-<CAT> scheme. Re-tag to the project's viewpoint IDs so the coverage matrix is accurate.`);
124
+ }
125
+ for (const d of downstream.underCovered) {
126
+ findings.push(`DOWNSTREAM-SCOPE-MISSING: "${d.route}" is a navigation target but is covered only by a page-nav assertion — cover its content/guards, or scaffold it (\`sungen add --screen ${d.slug}\`).`);
127
+ }
128
+ for (const m of manualOracleResult.insufficient.slice(0, 8)) {
129
+ findings.push(`MANUAL-STEPS-INSUFFICIENT: "${m}" — a @manual scenario needs setup · action · observable expected · oracle/tool (not just a one-line note).`);
130
+ }
131
+ // Gate spans coverage (viewpoint themes), depth, claim-proof, spec-clause coverage,
132
+ // AND taxonomy-match (scenarios must use the project's viewpoint IDs when defined).
133
+ const gateStatus = gate.gaps.length === 0 && depth.verdict !== 'fail' && claim.verdict !== 'fail' && spec.verdict !== 'fail' && !taxonomyMismatch ? 'PASS' : 'FAIL';
119
134
  return {
120
135
  screen: screenName,
121
136
  scenarioCount: scenarios.length,
122
137
  gate, depth, claim, taxonomy, balance, duplicates, trace, spec,
138
+ taxonomyMismatch, downstream, manualOracle: manualOracleResult,
123
139
  score: {
124
140
  overall: Math.round(overall * 10) / 10,
125
141
  coverage: Math.round(coverage * 100) / 100,
@@ -1 +1 @@
1
- {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/harness/audit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,4BA8FC;AA1ID;;;;;;;GAOG;AACH,2CAA6B;AAC7B,uCAAyB;AACzB,mCAA8F;AAC9F,uCAGmB;AACnB,qCAA+E;AAC/E,6CAAyD;AACzD,mDAAmE;AA2BnE,SAAgB,QAAQ,CAAC,SAAiB,EAAE,UAAkB;IAC5D,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,UAAU,UAAU,CAAC,CAAC;IAC9E,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,mBAAmB,CAAC,CAAC;IAEhF,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IACjE,MAAM,WAAW,GAAG,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE5F,MAAM,SAAS,GAAmB,IAAA,qBAAa,EAAC,WAAW,CAAC,CAAC;IAC7D,MAAM,UAAU,GAAqB,IAAA,8BAAsB,EAAC,aAAa,CAAC,CAAC;IAC3E,MAAM,OAAO,GAAG,IAAA,qBAAW,GAAE,CAAC;IAC9B,MAAM,IAAI,GAAG,IAAA,4BAAY,EAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IAE5D,MAAM,IAAI,GAAG,IAAA,uBAAa,EAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC3D,6EAA6E;IAC7E,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,IAAA,i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tC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,GAAG,GAAG;YAC1C,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,GAAG,CAAC,GAAG,GAAG;YACpD,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,GAAG,CAAC,GAAG,GAAG;YAC7C,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,UAAU,GAAG,GAAG,CAAC,GAAG,GAAG;YAChD,OAAO,EAAE,sFAAsF;SAChG;QACD,UAAU;QACV,QAAQ;QACR,MAAM;QACN,UAAU,EAAE,IAAA,0BAAa,GAAE;KAC5B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { ScenarioInfo } from './parse';
2
+ export interface DownstreamResult {
3
+ downstreamRoutes: string[];
4
+ underCovered: {
5
+ route: string;
6
+ slug: string;
7
+ }[];
8
+ }
9
+ export declare function downstreamScope(specText: string, scenarios: ScenarioInfo[]): DownstreamResult;
10
+ export interface ManualOracleResult {
11
+ manualTotal: number;
12
+ insufficient: string[];
13
+ }
14
+ export declare function manualOracle(featureText: string): ManualOracleResult;
15
+ export declare function readText(p: string): string;
16
+ //# sourceMappingURL=quality-gates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gates.d.ts","sourceRoot":"","sources":["../../src/harness/quality-gates.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,MAAM,WAAW,gBAAgB;IAC/B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACjD;AAiBD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAe7F;AAID,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAMD,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,kBAAkB,CAgBpE;AAGD,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAE1C"}
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.downstreamScope = downstreamScope;
37
+ exports.manualOracle = manualOracle;
38
+ exports.readText = readText;
39
+ /**
40
+ * Quality gates (batch): downstream-scope (#2) + manual-oracle (#4).
41
+ * Generic — read the project's own spec.md / feature text; no project data.
42
+ */
43
+ const fs = __importStar(require("fs"));
44
+ /** Routes the spec hands off to (Navigation Flow / success), other than the screen's own route. */
45
+ function downstreamRoutes(specText) {
46
+ const ownRoute = (specText.match(/\*\*Route\*\*\s*:\s*`?(\/[^\s`]+)/) || [])[1] || '';
47
+ const routes = new Set();
48
+ for (const line of specText.split('\n')) {
49
+ if (!/success|navigat|to \(|→/i.test(line))
50
+ continue;
51
+ for (const m of line.matchAll(/`?(\/[a-z][a-z0-9/_-]+)`?/gi)) {
52
+ const r = m[1];
53
+ if (r !== ownRoute && r.split('/').length > ownRoute.split('/').length - 0)
54
+ routes.add(r);
55
+ }
56
+ }
57
+ // keep only routes that extend beyond the own route (a distinct downstream surface)
58
+ return [...routes].filter((r) => r !== ownRoute && (!ownRoute || r.startsWith(ownRoute + '/') || r.split('/').length >= 3));
59
+ }
60
+ function downstreamScope(specText, scenarios) {
61
+ const routes = downstreamRoutes(specText);
62
+ const underCovered = [];
63
+ for (const route of routes) {
64
+ const slug = (route.split('/').filter(Boolean).pop() || route).toLowerCase();
65
+ const refs = scenarios.filter((s) => s.haystack.includes(slug) || s.haystack.includes(route.toLowerCase()));
66
+ if (!refs.length)
67
+ continue; // not referenced at all — out of this screen's scope entirely
68
+ // Substantively covered only if some scenario OPERATES on the downstream — i.e. it
69
+ // starts there (`is on [<downstream>]`) — not merely navigates to it as a terminal
70
+ // `see [<downstream>] page` assertion. The latter just proves the transition.
71
+ const opensOn = new RegExp(`\\bis on \\[[^\\]]*${slug}`, 'i');
72
+ const contentCovered = refs.some((s) => opensOn.test(s.haystack));
73
+ if (!contentCovered)
74
+ underCovered.push({ route, slug });
75
+ }
76
+ return { downstreamRoutes: routes, underCovered };
77
+ }
78
+ function blocks(featureText) {
79
+ return featureText.split(/\n\s*\n/).filter((b) => /\bScenario:/.test(b));
80
+ }
81
+ function manualOracle(featureText) {
82
+ const insufficient = [];
83
+ let manualTotal = 0;
84
+ for (const b of blocks(featureText)) {
85
+ if (!/@manual\b/.test(b))
86
+ continue;
87
+ manualTotal++;
88
+ const commentLines = b.split('\n').filter((l) => /^\s*#/.test(l));
89
+ const hasOracle = /tester verifies|oracle\s*:|requires|verify that|expected\s*:|steps?\s*:/i.test(b);
90
+ const hasNumberedSteps = /^\s*#?\s*\d+\.\s/m.test(b);
91
+ // sufficient = an oracle/steps marker, OR a substantive comment block (≥3 comment lines)
92
+ if (!(hasOracle || hasNumberedSteps || commentLines.length >= 3)) {
93
+ const name = (b.match(/Scenario:\s*(.+)/) || [])[1] || '(unnamed)';
94
+ insufficient.push(name.trim().slice(0, 80));
95
+ }
96
+ }
97
+ return { manualTotal, insufficient };
98
+ }
99
+ // convenience reader
100
+ function readText(p) {
101
+ return fs.existsSync(p) ? fs.readFileSync(p, 'utf-8') : '';
102
+ }
103
+ //# sourceMappingURL=quality-gates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quality-gates.js","sourceRoot":"","sources":["../../src/harness/quality-gates.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,0CAeC;AAaD,oCAgBC;AAGD,4BAEC;AA9ED;;;GAGG;AACH,uCAAyB;AAUzB,mGAAmG;AACnG,SAAS,gBAAgB,CAAC,QAAgB;IACxC,MAAM,QAAQ,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,mCAAmC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACtF,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACxC,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,SAAS;QACrD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC,EAAE,CAAC;YAC7D,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC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AM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,YAAY,CAAC;CACvB;AA0HD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAcD,wBAAgB,YAAY,CAAC,SAAS,EAAE,YAAY,EAAE,GAAG,cAAc,CAkBtE;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,YAAY,EAAE,EAAE,KAAK,SAAe,GAAG,gBAAgB,CAmC5F"}
@@ -285,6 +285,46 @@ const CLAIM_RULES = [
285
285
  hint: 'assert the absence/hidden state that the title claims, not just an unrelated visible element.',
286
286
  severity: 'fail',
287
287
  },
288
+ {
289
+ claim: 'cleared/emptied',
290
+ title: /\b(cleared|clears|emptied|empties|reset to empty|wiped)\b/,
291
+ proof: /\bis empty\b|with \{\{empty|with ['"]?['"]?\s*$|\bempty\b/,
292
+ need: 'an empty/cleared assertion after the action (e.g. `field with {{empty_value}}` / `is empty`)',
293
+ hint: 'prove the value is actually gone — return to the screen and assert the field is empty, not just that the action ran.',
294
+ severity: 'fail',
295
+ },
296
+ {
297
+ claim: 'restored/preserved',
298
+ title: /\b(restored|preserved|persists?|retained|remembered|kept)\b/,
299
+ proof: /\bremember\b|with \{\{|field with/,
300
+ need: 'the value re-asserted after the transition (capture or `field with {{v}}` after returning)',
301
+ hint: 'prove the value survives — assert the field still holds the typed value after the reload/return, not just that it was typed.',
302
+ severity: 'warn',
303
+ },
304
+ {
305
+ claim: 'independent/separate',
306
+ title: /\b(independent|separate|isolat(ed|es)|per[- ]tab|two tabs|each tab)\b/,
307
+ proof: /\bcontext\b|tab a|tab b|second (tab|context)/,
308
+ need: 'a multi-context proof (tab A vs tab B)',
309
+ hint: 'independence across tabs/contexts is rarely DSL-expressible — mark @manual with a clear setup/action/oracle.',
310
+ severity: 'warn',
311
+ },
312
+ {
313
+ claim: 'sanitized/inert',
314
+ title: /\b(sanitized|sanitised|escaped|inert|not executed|not rendered|stripped)\b/,
315
+ proof: /field with \{\{|payload|inert|toContainText|is hidden/,
316
+ need: 'the payload echoed as inert text (`field with {{payload}}`) + no execution',
317
+ hint: 'prove the payload round-trips as literal text and triggers nothing — assert the field value and the absence of any effect.',
318
+ severity: 'warn',
319
+ },
320
+ {
321
+ claim: 'announces/aria',
322
+ title: /\b(announce[sd]?|aria|screen[- ]reader|programmatically associated)\b/,
323
+ proof: /aria|role|@manual|describedby|is focused/,
324
+ need: 'an aria/role assertion (or @manual with a screen-reader oracle)',
325
+ hint: 'ARIA announcement is usually not DSL-expressible — assert aria attributes if possible, else @manual with an NVDA/VoiceOver oracle.',
326
+ severity: 'warn',
327
+ },
288
328
  ];
289
329
  const TAXONOMY_KNOWN = new Set(['LIST', 'PRODUCT', 'CART', 'FILTER', 'NAV', 'VAL', 'SEC']);
290
330
  const CATEGORY_SIGNALS = [
@@ -1 +1 @@
1
- {"version":3,"file":"sensors.js","sourceRoot":"","sources":["../../src/harness/sensors.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,kCAGC;AAkBD,sCAyCC;AAkCD,wCAwCC;AAGD,sCAKC;AAaD,0CA0BC;AAUD,8CAoBC;AAaD,oCAeC;AAsID,oCAkBC;AAED,gCAmCC;AAndD;;;;;;;GAOG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,+BAA0C;AAG1C,oFAAoF;AACpF,MAAM,sBAAsB,GAAG,CAAC,MAAM,E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IAC5C,MAAM,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACnD,MAAM,SAAS,GAAG,gBAAgB,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,UAAU,CAAC;IAEzE,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,MAAM,CAAC,CAAC;IAC5D,IAAI,OAAO,GAAiB,MAAM,CAAC;IACnC,IAAI,KAAK,GAAG,SAAS,EAAE,CAAC;QACtB,OAAO,GAAG,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;IACrE,CAAC;IAED,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AACpG,CAAC"}
@@ -105,6 +105,9 @@ Auto-detected by `create-test` before invoking this skill:
105
105
  2. Each row / bullet / item = 1 viewpoint → add to `Viewpoint items` in Coverage Map.
106
106
  3. Do NOT pre-classify into buckets before scanning — classify only when
107
107
  writing the scenario.
108
+ 4. **If it declares viewpoint IDs** (e.g. `VP0`, `VP1`…`VP12`, `MS-HP-001`), capture each
109
+ item WITH its ID and **reuse that ID as the scenario code** — do not invent a generic
110
+ `VP-<CAT>` scheme (the harness Taxonomy-match gate FAILs on mismatch).
108
111
  - `qa/context.md` — project-wide context set by the QA lead. Read ONCE before building the Coverage Map; apply to every screen. Extraction rules:
109
112
  - **Roles** → for each role in the table: add to the `@auth:X` tag pool; generate a VP-SEC blocked-access scenario for every role boundary relevant to this screen.
110
113
  - **Testing strategy → Focus areas** → if `security` listed: VP-SEC is mandatory Tier 1 for every free-text input regardless of spec risk level; if `ui` not listed: all VP-UI scenarios move to Tier 2 minimum.
@@ -260,6 +263,26 @@ Security: [S1 – admin only]
260
263
 
261
264
  **Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases. Do not over-invest in subscription while cart/detail/filter correctness are shallow.
262
265
 
266
+ #### Harness gates — satisfy on the FIRST pass (don't make the repair loop fix them)
267
+
268
+ `sungen audit` enforces these. Generate compliant output up front:
269
+
270
+ 1. **Taxonomy-match** (`VP-TAXONOMY-MISMATCH`, gate-FAIL) — when `test-viewpoint.md` declares its own viewpoint IDs (e.g. `VP0`, `VP1`, … `VP12`, `MS-HP-001`, `MS-EH-001`), **reuse those IDs verbatim as the scenario codes**. Do NOT invent a generic `VP-UI / VP-LOGIC / VP-VAL` scheme — that breaks the coverage matrix. Only fall back to `VP-<CATEGORY>-<NNN>` when the viewpoint file declares no IDs.
271
+ 2. **Spec-coverage triggers** (`TRIGGER-UNCOVERED`, gate-FAIL) — the Validation-Rules table lists a **trigger** per constraint (e.g. `blur, submit`). Generate one scenario **per (constraint × trigger)** — a `format` rule validating *on blur AND on submit* needs BOTH a blur scenario (`press Tab`) and a submit scenario (`click [Submit]` / `press Enter`). Never collapse the trigger × input matrix to one representative case.
272
+ 3. **Claim-Proof** (`CLAIM-UNPROVEN`) — a title claiming `all`/`only`/`every`/`single`/`correct`/`same`/`changes`/`hidden`/`cleared`/`restored`/`independent`/`sanitized`/`announces` MUST have the matching assertion (`see all …`, count, `remember`+compare, `is hidden`, return-and-assert-empty, etc.). If the title promises it, the steps must prove it.
273
+ 4. **Downstream-scope** (`DOWNSTREAM-SCOPE-MISSING`) — when the spec's Navigation Flow / success target is **another screen** (e.g. a confirmation/sent page), don't stop at a terminal `see [X] page`. Either cover that screen's content/guards (if its viewpoint items are in scope — they often have their own `MS-*` IDs), or scaffold it (`sungen add --screen <name>`) and note the handoff. Do not silently drop the downstream surface.
274
+ 5. **Manual-oracle** (`MANUAL-STEPS-INSUFFICIENT`) — every `@manual` scenario needs **setup · action · observable expected · oracle/tool**, not a one-line note. Use this comment shape:
275
+ ```gherkin
276
+ @high @manual
277
+ Scenario: VP-… <claim>
278
+ # MANUAL: <why it can't be automated — needs network capture / inbox / screen-reader / multi-tab>
279
+ # Tester verifies:
280
+ # 1. <setup> e.g. seed a registered email; throttle the network
281
+ # 2. <action> e.g. click [Submit] with the request in flight
282
+ # 3. <observable> e.g. only ONE POST is dispatched
283
+ # 4. Oracle: <tool> e.g. DevTools Network panel / mail-catcher / NVDA
284
+ ```
285
+
263
286
  #### Tier 1 guard — minimum before writing scenarios
264
287
 
265
288
  | Spec section | Minimum requirement | Tag |
@@ -376,7 +399,7 @@ Add cleanup tags per the `sungen-gherkin-syntax` Cleanup table. Key rules:
376
399
  **Files:** `qa/screens/<screen>/features/<screen>.feature` + `qa/screens/<screen>/test-data/<screen>.yaml`
377
400
 
378
401
  Use step patterns and element types from `sungen-gherkin-syntax`.
379
- **Naming**: `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
402
+ **Naming**: reuse the **project's `test-viewpoint.md` IDs** when it declares them (e.g. `VP0`, `MS-HP-001`); otherwise `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
380
403
 
381
404
  **Test data** — grouped by section, loaded at runtime:
382
405
 
@@ -105,6 +105,17 @@ Auto-detected by `create-test` before invoking this skill:
105
105
  2. Each row / bullet / item = 1 viewpoint → add to `Viewpoint items` in Coverage Map.
106
106
  3. Do NOT pre-classify into buckets before scanning — classify only when
107
107
  writing the scenario.
108
+ 4. **If it declares viewpoint IDs** (e.g. `VP0`, `VP1`…`VP12`, `MS-HP-001`), capture each
109
+ item WITH its ID and **reuse that ID as the scenario code** — do not invent a generic
110
+ `VP-<CAT>` scheme (the harness Taxonomy-match gate FAILs on mismatch).
111
+ - `qa/context.md` — project-wide context set by the QA lead. Read ONCE before building the Coverage Map; apply to every screen. Extraction rules:
112
+ - **Roles** → for each role in the table: add to the `@auth:X` tag pool; generate a VP-SEC blocked-access scenario for every role boundary relevant to this screen.
113
+ - **Testing strategy → Focus areas** → if `security` listed: VP-SEC is mandatory Tier 1 for every free-text input regardless of spec risk level; if `ui` not listed: all VP-UI scenarios move to Tier 2 minimum.
114
+ - **Testing strategy → Mandatory coverage** → each line is a hard override applied to this screen regardless of spec risk; document in `Context constraints` of the Coverage Map.
115
+ - **Testing strategy → Deprioritize/skip** → record in `Context constraints`; suppress those VP categories from Tier 1 generation.
116
+ - **Global business rules** → add each to the `Business rules` section tagged `[G]` (e.g. `[G1 – soft-delete only]`); treat as `HIGH` risk unless stated otherwise.
117
+ - **Error patterns** → use as fallback only when `spec.md` does not give exact error text; never override spec-specified messages.
118
+ - If `qa/context.md` is absent: proceed without it — no impact on the generation flow.
108
119
 
109
120
  **Single screen focus**: one URL = one screen. Modals on same page = part of this screen.
110
121
  This means: do not test other screens' UI layout or navigation. It does NOT mean skip documenting business outcomes that your screen's actions cause on other surfaces. Those cross-surface outcomes must appear in the Coverage Map and be covered by at least `@manual` scenarios.
@@ -129,6 +140,11 @@ Read `spec.md` fully, then extract into a Coverage Map **before writing any scen
129
140
  **Risk tags:** HIGH = complex business rules, cascading fields, multi-step state changes, auth/integration. LOW = display-only, static labels, read-only fields.
130
141
 
131
142
  ```
143
+ Context constraints: [populated from qa/context.md before writing any scenario]
144
+ roles: [list roles, e.g. admin / manager / staff]
145
+ strategy: [active overrides, e.g. "VP-SEC mandatory T1", "VP-UI → T2 only"]
146
+ global rules: [G1 – ...] → also appear in Business rules below tagged [G]
147
+ → leave empty if qa/context.md is absent or has no entries applicable to this screen
132
148
  User journeys: [J1 – ...], [J2 – ...]
133
149
  Validation rules: [V1 – field → "exact error text"], [V2 – ...]
134
150
  Business rules: [B1 HIGH – ...], [B2 LOW – ...]
@@ -221,7 +237,7 @@ Security: [S1 – admin only]
221
237
  | **auth** | valid-login · invalid-credential · access-control |
222
238
 
223
239
  **Required assertion shapes (use these, not bare visibility):**
224
- - Card info: assert at **card level** (image+name+price together), e.g. `User see all [Product Card] contain {{...}}` — not `see [Section]`.
240
+ - Card info: assert at **card level** (image+name+price together), e.g. `User see all [Product Card] contain {{...}}` — not `see [Section]` (section-level passes even if one card lacks price).
225
241
  - Cross-screen consistency (detail/cart): **capture then compare** —
226
242
  ```gherkin
227
243
  When User remember [Product Name] text as {{selected_product_name}}
@@ -239,13 +255,33 @@ Security: [S1 – admin only]
239
255
  - **If the spec lacks the concrete value** a deep assertion needs (exact message, price, count): still write the deep shape with a `{{var}}` placeholder and leave a `# SPEC-GAP: <field> value not in spec` comment — do **not** downgrade to `see [X] section`. A visible gap is better than a silent shallow pass.
240
256
  - **Blind-Spot Memory:** before finishing, run `sungen blindspot list --prompt` (Bash) and make sure the suite satisfies each recorded pattern (e.g. "for any Add/Create action: check success + resulting data state + duplicate/double-submit"). These are gaps QA hit before — don't repeat them.
241
257
 
242
- **First-pass anti-patterns (exactly what the gate/reviewer reject — avoid them):**
243
- - Title↔steps mismatch (e.g. a "no-result" scenario that clicks a query which returns products).
244
- - Tautology `Then`: `click [Next Slide]` → `see [Carousel] section` (proves nothing).
245
- - Business-critical scenario ending at `see [Added] modal` / `see [Cart] page` with no data assertion.
258
+ **First-pass anti-patterns (these are exactly what the gate/reviewer reject — avoid them):**
259
+ - Title↔steps mismatch: e.g. a "no-result state" scenario that clicks a query which **returns** products. Steps must create the condition the title claims.
260
+ - Tautology `Then`: `click [Next Slide]` → `see [Carousel] section` (always visible, proves nothing). Assert the change (new slide title differs).
261
+ - Business-critical scenario ending at `see [Added] modal` / `see [Cart] page` / `see [Category Products] page` with no data assertion.
246
262
  - Brand filter covered only as navigation (must assert products belong to the brand).
247
263
 
248
- **Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases.
264
+ **Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases. Do not over-invest in subscription while cart/detail/filter correctness are shallow.
265
+
266
+ #### Harness gates — satisfy on the FIRST pass (don't make the repair loop fix them)
267
+
268
+ `sungen audit` enforces these. Generate compliant output up front:
269
+
270
+ 1. **Taxonomy-match** (`VP-TAXONOMY-MISMATCH`, gate-FAIL) — when `test-viewpoint.md` declares its own viewpoint IDs (e.g. `VP0`, `VP1`, … `VP12`, `MS-HP-001`, `MS-EH-001`), **reuse those IDs verbatim as the scenario codes**. Do NOT invent a generic `VP-UI / VP-LOGIC / VP-VAL` scheme — that breaks the coverage matrix. Only fall back to `VP-<CATEGORY>-<NNN>` when the viewpoint file declares no IDs.
271
+ 2. **Spec-coverage triggers** (`TRIGGER-UNCOVERED`, gate-FAIL) — the Validation-Rules table lists a **trigger** per constraint (e.g. `blur, submit`). Generate one scenario **per (constraint × trigger)** — a `format` rule validating *on blur AND on submit* needs BOTH a blur scenario (`press Tab`) and a submit scenario (`click [Submit]` / `press Enter`). Never collapse the trigger × input matrix to one representative case.
272
+ 3. **Claim-Proof** (`CLAIM-UNPROVEN`) — a title claiming `all`/`only`/`every`/`single`/`correct`/`same`/`changes`/`hidden`/`cleared`/`restored`/`independent`/`sanitized`/`announces` MUST have the matching assertion (`see all …`, count, `remember`+compare, `is hidden`, return-and-assert-empty, etc.). If the title promises it, the steps must prove it.
273
+ 4. **Downstream-scope** (`DOWNSTREAM-SCOPE-MISSING`) — when the spec's Navigation Flow / success target is **another screen** (e.g. a confirmation/sent page), don't stop at a terminal `see [X] page`. Either cover that screen's content/guards (if its viewpoint items are in scope — they often have their own `MS-*` IDs), or scaffold it (`sungen add --screen <name>`) and note the handoff. Do not silently drop the downstream surface.
274
+ 5. **Manual-oracle** (`MANUAL-STEPS-INSUFFICIENT`) — every `@manual` scenario needs **setup · action · observable expected · oracle/tool**, not a one-line note. Use this comment shape:
275
+ ```gherkin
276
+ @high @manual
277
+ Scenario: VP-… <claim>
278
+ # MANUAL: <why it can't be automated — needs network capture / inbox / screen-reader / multi-tab>
279
+ # Tester verifies:
280
+ # 1. <setup> e.g. seed a registered email; throttle the network
281
+ # 2. <action> e.g. click [Submit] with the request in flight
282
+ # 3. <observable> e.g. only ONE POST is dispatched
283
+ # 4. Oracle: <tool> e.g. DevTools Network panel / mail-catcher / NVDA
284
+ ```
249
285
 
250
286
  #### Tier 1 guard — minimum before writing scenarios
251
287
 
@@ -363,7 +399,7 @@ Add cleanup tags per the `sungen-gherkin-syntax` Cleanup table. Key rules:
363
399
  **Files:** `qa/screens/<screen>/features/<screen>.feature` + `qa/screens/<screen>/test-data/<screen>.yaml`
364
400
 
365
401
  Use step patterns and element types from `sungen-gherkin-syntax`.
366
- **Naming**: `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
402
+ **Naming**: reuse the **project's `test-viewpoint.md` IDs** when it declares them (e.g. `VP0`, `MS-HP-001`); otherwise `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
367
403
 
368
404
  **Test data** — grouped by section, loaded at runtime:
369
405
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sun-asterisk/sungen",
3
- "version": "3.0.0-beta.78",
3
+ "version": "3.0.0-beta.80",
4
4
  "description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,6 +16,7 @@ import {
16
16
  import { readIntent, projectRootFromScreenDir, IntentProfile } from './intent';
17
17
  import { getProvenance, Provenance } from './provenance';
18
18
  import { specCoverage, SpecCoverageResult } from './spec-coverage';
19
+ import { downstreamScope, manualOracle, readText, DownstreamResult, ManualOracleResult } from './quality-gates';
19
20
 
20
21
  export interface AuditReport {
21
22
  screen: string;
@@ -27,6 +28,9 @@ export interface AuditReport {
27
28
  balance: BalanceResult;
28
29
  duplicates: DuplicateResult;
29
30
  trace: TraceResult;
31
+ taxonomyMismatch: boolean; // #1 — scenarios use IDs not in the project's test-viewpoint.md
32
+ downstream: DownstreamResult; // #2 — downstream screens referenced but under-covered
33
+ manualOracle: ManualOracleResult; // #4 — @manual scenarios lacking setup/action/oracle
30
34
  score: {
31
35
  overall: number; // 0..10, business-weighted
32
36
  coverage: number; // 0..1
@@ -63,6 +67,11 @@ export function runAudit(screenDir: string, screenName: string): AuditReport {
63
67
  const balance = coverageBalance(scenarios);
64
68
  const duplicates = duplicateClusters(scenarios);
65
69
  const trace = traceability(scenarios, viewpoints);
70
+ // #1 taxonomy-match: when the project defines a viewpoint taxonomy, scenarios must use it.
71
+ const taxonomyMismatch = viewpoints.length > 0 && trace.withVpCode > 0 && trace.mappedRatio < 0.6;
72
+ // #2 downstream-scope + #4 manual-oracle
73
+ const downstream = downstreamScope(readText(specPath), scenarios);
74
+ const manualOracleResult = manualOracle(featureText);
66
75
 
67
76
  // Sub-scores
68
77
  const coverage = gate.coverageRatio;
@@ -113,16 +122,26 @@ export function runAudit(screenDir: string, screenName: string): AuditReport {
113
122
  for (const u of spec.uncoveredMust) {
114
123
  findings.push(`SPEC-UNCOVERED: ${u.id} (MUST) has no covering scenario — "${u.text}" → add a scenario or tag one @spec:${u.id}.`);
115
124
  }
125
+ if (taxonomyMismatch) {
126
+ findings.push(`VP-TAXONOMY-MISMATCH: only ${(trace.mappedRatio * 100).toFixed(0)}% of scenarios use the viewpoint IDs declared in test-viewpoint.md — scenarios invented a generic VP-<CAT> scheme. Re-tag to the project's viewpoint IDs so the coverage matrix is accurate.`);
127
+ }
128
+ for (const d of downstream.underCovered) {
129
+ findings.push(`DOWNSTREAM-SCOPE-MISSING: "${d.route}" is a navigation target but is covered only by a page-nav assertion — cover its content/guards, or scaffold it (\`sungen add --screen ${d.slug}\`).`);
130
+ }
131
+ for (const m of manualOracleResult.insufficient.slice(0, 8)) {
132
+ findings.push(`MANUAL-STEPS-INSUFFICIENT: "${m}" — a @manual scenario needs setup · action · observable expected · oracle/tool (not just a one-line note).`);
133
+ }
116
134
 
117
- // Gate spans coverage (viewpoint themes), depth (data-correctness), claim-proof,
118
- // AND spec-clause coverage (every MUST clause + every mandated validation trigger).
135
+ // Gate spans coverage (viewpoint themes), depth, claim-proof, spec-clause coverage,
136
+ // AND taxonomy-match (scenarios must use the project's viewpoint IDs when defined).
119
137
  const gateStatus: 'PASS' | 'FAIL' =
120
- gate.gaps.length === 0 && depth.verdict !== 'fail' && claim.verdict !== 'fail' && spec.verdict !== 'fail' ? 'PASS' : 'FAIL';
138
+ gate.gaps.length === 0 && depth.verdict !== 'fail' && claim.verdict !== 'fail' && spec.verdict !== 'fail' && !taxonomyMismatch ? 'PASS' : 'FAIL';
121
139
 
122
140
  return {
123
141
  screen: screenName,
124
142
  scenarioCount: scenarios.length,
125
143
  gate, depth, claim, taxonomy, balance, duplicates, trace, spec,
144
+ taxonomyMismatch, downstream, manualOracle: manualOracleResult,
126
145
  score: {
127
146
  overall: Math.round(overall * 10) / 10,
128
147
  coverage: Math.round(coverage * 100) / 100,
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Quality gates (batch): downstream-scope (#2) + manual-oracle (#4).
3
+ * Generic — read the project's own spec.md / feature text; no project data.
4
+ */
5
+ import * as fs from 'fs';
6
+ import { ScenarioInfo } from './parse';
7
+
8
+ // ---------- #2 Downstream-scope ----------
9
+
10
+ export interface DownstreamResult {
11
+ downstreamRoutes: string[]; // success/navigation targets ≠ own route
12
+ underCovered: { route: string; slug: string }[]; // referenced only by a bare page-nav
13
+ }
14
+
15
+ /** Routes the spec hands off to (Navigation Flow / success), other than the screen's own route. */
16
+ function downstreamRoutes(specText: string): string[] {
17
+ const ownRoute = (specText.match(/\*\*Route\*\*\s*:\s*`?(\/[^\s`]+)/) || [])[1] || '';
18
+ const routes = new Set<string>();
19
+ for (const line of specText.split('\n')) {
20
+ if (!/success|navigat|to \(|→/i.test(line)) continue;
21
+ for (const m of line.matchAll(/`?(\/[a-z][a-z0-9/_-]+)`?/gi)) {
22
+ const r = m[1];
23
+ if (r !== ownRoute && r.split('/').length > ownRoute.split('/').length - 0) routes.add(r);
24
+ }
25
+ }
26
+ // keep only routes that extend beyond the own route (a distinct downstream surface)
27
+ return [...routes].filter((r) => r !== ownRoute && (!ownRoute || r.startsWith(ownRoute + '/') || r.split('/').length >= 3));
28
+ }
29
+
30
+ export function downstreamScope(specText: string, scenarios: ScenarioInfo[]): DownstreamResult {
31
+ const routes = downstreamRoutes(specText);
32
+ const underCovered: { route: string; slug: string }[] = [];
33
+ for (const route of routes) {
34
+ const slug = (route.split('/').filter(Boolean).pop() || route).toLowerCase();
35
+ const refs = scenarios.filter((s) => s.haystack.includes(slug) || s.haystack.includes(route.toLowerCase()));
36
+ if (!refs.length) continue; // not referenced at all — out of this screen's scope entirely
37
+ // Substantively covered only if some scenario OPERATES on the downstream — i.e. it
38
+ // starts there (`is on [<downstream>]`) — not merely navigates to it as a terminal
39
+ // `see [<downstream>] page` assertion. The latter just proves the transition.
40
+ const opensOn = new RegExp(`\\bis on \\[[^\\]]*${slug}`, 'i');
41
+ const contentCovered = refs.some((s) => opensOn.test(s.haystack));
42
+ if (!contentCovered) underCovered.push({ route, slug });
43
+ }
44
+ return { downstreamRoutes: routes, underCovered };
45
+ }
46
+
47
+ // ---------- #4 Manual-oracle ----------
48
+
49
+ export interface ManualOracleResult {
50
+ manualTotal: number;
51
+ insufficient: string[]; // @manual scenarios lacking setup/action/oracle
52
+ }
53
+
54
+ function blocks(featureText: string): string[] {
55
+ return featureText.split(/\n\s*\n/).filter((b) => /\bScenario:/.test(b));
56
+ }
57
+
58
+ export function manualOracle(featureText: string): ManualOracleResult {
59
+ const insufficient: string[] = [];
60
+ let manualTotal = 0;
61
+ for (const b of blocks(featureText)) {
62
+ if (!/@manual\b/.test(b)) continue;
63
+ manualTotal++;
64
+ const commentLines = b.split('\n').filter((l) => /^\s*#/.test(l));
65
+ const hasOracle = /tester verifies|oracle\s*:|requires|verify that|expected\s*:|steps?\s*:/i.test(b);
66
+ const hasNumberedSteps = /^\s*#?\s*\d+\.\s/m.test(b);
67
+ // sufficient = an oracle/steps marker, OR a substantive comment block (≥3 comment lines)
68
+ if (!(hasOracle || hasNumberedSteps || commentLines.length >= 3)) {
69
+ const name = (b.match(/Scenario:\s*(.+)/) || [])[1] || '(unnamed)';
70
+ insufficient.push(name.trim().slice(0, 80));
71
+ }
72
+ }
73
+ return { manualTotal, insufficient };
74
+ }
75
+
76
+ // convenience reader
77
+ export function readText(p: string): string {
78
+ return fs.existsSync(p) ? fs.readFileSync(p, 'utf-8') : '';
79
+ }
@@ -375,6 +375,46 @@ const CLAIM_RULES: ClaimRule[] = [
375
375
  hint: 'assert the absence/hidden state that the title claims, not just an unrelated visible element.',
376
376
  severity: 'fail',
377
377
  },
378
+ {
379
+ claim: 'cleared/emptied',
380
+ title: /\b(cleared|clears|emptied|empties|reset to empty|wiped)\b/,
381
+ proof: /\bis empty\b|with \{\{empty|with ['"]?['"]?\s*$|\bempty\b/,
382
+ need: 'an empty/cleared assertion after the action (e.g. `field with {{empty_value}}` / `is empty`)',
383
+ hint: 'prove the value is actually gone — return to the screen and assert the field is empty, not just that the action ran.',
384
+ severity: 'fail',
385
+ },
386
+ {
387
+ claim: 'restored/preserved',
388
+ title: /\b(restored|preserved|persists?|retained|remembered|kept)\b/,
389
+ proof: /\bremember\b|with \{\{|field with/,
390
+ need: 'the value re-asserted after the transition (capture or `field with {{v}}` after returning)',
391
+ hint: 'prove the value survives — assert the field still holds the typed value after the reload/return, not just that it was typed.',
392
+ severity: 'warn',
393
+ },
394
+ {
395
+ claim: 'independent/separate',
396
+ title: /\b(independent|separate|isolat(ed|es)|per[- ]tab|two tabs|each tab)\b/,
397
+ proof: /\bcontext\b|tab a|tab b|second (tab|context)/,
398
+ need: 'a multi-context proof (tab A vs tab B)',
399
+ hint: 'independence across tabs/contexts is rarely DSL-expressible — mark @manual with a clear setup/action/oracle.',
400
+ severity: 'warn',
401
+ },
402
+ {
403
+ claim: 'sanitized/inert',
404
+ title: /\b(sanitized|sanitised|escaped|inert|not executed|not rendered|stripped)\b/,
405
+ proof: /field with \{\{|payload|inert|toContainText|is hidden/,
406
+ need: 'the payload echoed as inert text (`field with {{payload}}`) + no execution',
407
+ hint: 'prove the payload round-trips as literal text and triggers nothing — assert the field value and the absence of any effect.',
408
+ severity: 'warn',
409
+ },
410
+ {
411
+ claim: 'announces/aria',
412
+ title: /\b(announce[sd]?|aria|screen[- ]reader|programmatically associated)\b/,
413
+ proof: /aria|role|@manual|describedby|is focused/,
414
+ need: 'an aria/role assertion (or @manual with a screen-reader oracle)',
415
+ hint: 'ARIA announcement is usually not DSL-expressible — assert aria attributes if possible, else @manual with an NVDA/VoiceOver oracle.',
416
+ severity: 'warn',
417
+ },
378
418
  ];
379
419
 
380
420
  // ---------- Viewpoint taxonomy-lint (harness-roadmap §0.5 Q3) ----------
@@ -105,6 +105,9 @@ Auto-detected by `create-test` before invoking this skill:
105
105
  2. Each row / bullet / item = 1 viewpoint → add to `Viewpoint items` in Coverage Map.
106
106
  3. Do NOT pre-classify into buckets before scanning — classify only when
107
107
  writing the scenario.
108
+ 4. **If it declares viewpoint IDs** (e.g. `VP0`, `VP1`…`VP12`, `MS-HP-001`), capture each
109
+ item WITH its ID and **reuse that ID as the scenario code** — do not invent a generic
110
+ `VP-<CAT>` scheme (the harness Taxonomy-match gate FAILs on mismatch).
108
111
  - `qa/context.md` — project-wide context set by the QA lead. Read ONCE before building the Coverage Map; apply to every screen. Extraction rules:
109
112
  - **Roles** → for each role in the table: add to the `@auth:X` tag pool; generate a VP-SEC blocked-access scenario for every role boundary relevant to this screen.
110
113
  - **Testing strategy → Focus areas** → if `security` listed: VP-SEC is mandatory Tier 1 for every free-text input regardless of spec risk level; if `ui` not listed: all VP-UI scenarios move to Tier 2 minimum.
@@ -260,6 +263,26 @@ Security: [S1 – admin only]
260
263
 
261
264
  **Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases. Do not over-invest in subscription while cart/detail/filter correctness are shallow.
262
265
 
266
+ #### Harness gates — satisfy on the FIRST pass (don't make the repair loop fix them)
267
+
268
+ `sungen audit` enforces these. Generate compliant output up front:
269
+
270
+ 1. **Taxonomy-match** (`VP-TAXONOMY-MISMATCH`, gate-FAIL) — when `test-viewpoint.md` declares its own viewpoint IDs (e.g. `VP0`, `VP1`, … `VP12`, `MS-HP-001`, `MS-EH-001`), **reuse those IDs verbatim as the scenario codes**. Do NOT invent a generic `VP-UI / VP-LOGIC / VP-VAL` scheme — that breaks the coverage matrix. Only fall back to `VP-<CATEGORY>-<NNN>` when the viewpoint file declares no IDs.
271
+ 2. **Spec-coverage triggers** (`TRIGGER-UNCOVERED`, gate-FAIL) — the Validation-Rules table lists a **trigger** per constraint (e.g. `blur, submit`). Generate one scenario **per (constraint × trigger)** — a `format` rule validating *on blur AND on submit* needs BOTH a blur scenario (`press Tab`) and a submit scenario (`click [Submit]` / `press Enter`). Never collapse the trigger × input matrix to one representative case.
272
+ 3. **Claim-Proof** (`CLAIM-UNPROVEN`) — a title claiming `all`/`only`/`every`/`single`/`correct`/`same`/`changes`/`hidden`/`cleared`/`restored`/`independent`/`sanitized`/`announces` MUST have the matching assertion (`see all …`, count, `remember`+compare, `is hidden`, return-and-assert-empty, etc.). If the title promises it, the steps must prove it.
273
+ 4. **Downstream-scope** (`DOWNSTREAM-SCOPE-MISSING`) — when the spec's Navigation Flow / success target is **another screen** (e.g. a confirmation/sent page), don't stop at a terminal `see [X] page`. Either cover that screen's content/guards (if its viewpoint items are in scope — they often have their own `MS-*` IDs), or scaffold it (`sungen add --screen <name>`) and note the handoff. Do not silently drop the downstream surface.
274
+ 5. **Manual-oracle** (`MANUAL-STEPS-INSUFFICIENT`) — every `@manual` scenario needs **setup · action · observable expected · oracle/tool**, not a one-line note. Use this comment shape:
275
+ ```gherkin
276
+ @high @manual
277
+ Scenario: VP-… <claim>
278
+ # MANUAL: <why it can't be automated — needs network capture / inbox / screen-reader / multi-tab>
279
+ # Tester verifies:
280
+ # 1. <setup> e.g. seed a registered email; throttle the network
281
+ # 2. <action> e.g. click [Submit] with the request in flight
282
+ # 3. <observable> e.g. only ONE POST is dispatched
283
+ # 4. Oracle: <tool> e.g. DevTools Network panel / mail-catcher / NVDA
284
+ ```
285
+
263
286
  #### Tier 1 guard — minimum before writing scenarios
264
287
 
265
288
  | Spec section | Minimum requirement | Tag |
@@ -376,7 +399,7 @@ Add cleanup tags per the `sungen-gherkin-syntax` Cleanup table. Key rules:
376
399
  **Files:** `qa/screens/<screen>/features/<screen>.feature` + `qa/screens/<screen>/test-data/<screen>.yaml`
377
400
 
378
401
  Use step patterns and element types from `sungen-gherkin-syntax`.
379
- **Naming**: `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
402
+ **Naming**: reuse the **project's `test-viewpoint.md` IDs** when it declares them (e.g. `VP0`, `MS-HP-001`); otherwise `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
380
403
 
381
404
  **Test data** — grouped by section, loaded at runtime:
382
405
 
@@ -105,6 +105,17 @@ Auto-detected by `create-test` before invoking this skill:
105
105
  2. Each row / bullet / item = 1 viewpoint → add to `Viewpoint items` in Coverage Map.
106
106
  3. Do NOT pre-classify into buckets before scanning — classify only when
107
107
  writing the scenario.
108
+ 4. **If it declares viewpoint IDs** (e.g. `VP0`, `VP1`…`VP12`, `MS-HP-001`), capture each
109
+ item WITH its ID and **reuse that ID as the scenario code** — do not invent a generic
110
+ `VP-<CAT>` scheme (the harness Taxonomy-match gate FAILs on mismatch).
111
+ - `qa/context.md` — project-wide context set by the QA lead. Read ONCE before building the Coverage Map; apply to every screen. Extraction rules:
112
+ - **Roles** → for each role in the table: add to the `@auth:X` tag pool; generate a VP-SEC blocked-access scenario for every role boundary relevant to this screen.
113
+ - **Testing strategy → Focus areas** → if `security` listed: VP-SEC is mandatory Tier 1 for every free-text input regardless of spec risk level; if `ui` not listed: all VP-UI scenarios move to Tier 2 minimum.
114
+ - **Testing strategy → Mandatory coverage** → each line is a hard override applied to this screen regardless of spec risk; document in `Context constraints` of the Coverage Map.
115
+ - **Testing strategy → Deprioritize/skip** → record in `Context constraints`; suppress those VP categories from Tier 1 generation.
116
+ - **Global business rules** → add each to the `Business rules` section tagged `[G]` (e.g. `[G1 – soft-delete only]`); treat as `HIGH` risk unless stated otherwise.
117
+ - **Error patterns** → use as fallback only when `spec.md` does not give exact error text; never override spec-specified messages.
118
+ - If `qa/context.md` is absent: proceed without it — no impact on the generation flow.
108
119
 
109
120
  **Single screen focus**: one URL = one screen. Modals on same page = part of this screen.
110
121
  This means: do not test other screens' UI layout or navigation. It does NOT mean skip documenting business outcomes that your screen's actions cause on other surfaces. Those cross-surface outcomes must appear in the Coverage Map and be covered by at least `@manual` scenarios.
@@ -129,6 +140,11 @@ Read `spec.md` fully, then extract into a Coverage Map **before writing any scen
129
140
  **Risk tags:** HIGH = complex business rules, cascading fields, multi-step state changes, auth/integration. LOW = display-only, static labels, read-only fields.
130
141
 
131
142
  ```
143
+ Context constraints: [populated from qa/context.md before writing any scenario]
144
+ roles: [list roles, e.g. admin / manager / staff]
145
+ strategy: [active overrides, e.g. "VP-SEC mandatory T1", "VP-UI → T2 only"]
146
+ global rules: [G1 – ...] → also appear in Business rules below tagged [G]
147
+ → leave empty if qa/context.md is absent or has no entries applicable to this screen
132
148
  User journeys: [J1 – ...], [J2 – ...]
133
149
  Validation rules: [V1 – field → "exact error text"], [V2 – ...]
134
150
  Business rules: [B1 HIGH – ...], [B2 LOW – ...]
@@ -221,7 +237,7 @@ Security: [S1 – admin only]
221
237
  | **auth** | valid-login · invalid-credential · access-control |
222
238
 
223
239
  **Required assertion shapes (use these, not bare visibility):**
224
- - Card info: assert at **card level** (image+name+price together), e.g. `User see all [Product Card] contain {{...}}` — not `see [Section]`.
240
+ - Card info: assert at **card level** (image+name+price together), e.g. `User see all [Product Card] contain {{...}}` — not `see [Section]` (section-level passes even if one card lacks price).
225
241
  - Cross-screen consistency (detail/cart): **capture then compare** —
226
242
  ```gherkin
227
243
  When User remember [Product Name] text as {{selected_product_name}}
@@ -239,13 +255,33 @@ Security: [S1 – admin only]
239
255
  - **If the spec lacks the concrete value** a deep assertion needs (exact message, price, count): still write the deep shape with a `{{var}}` placeholder and leave a `# SPEC-GAP: <field> value not in spec` comment — do **not** downgrade to `see [X] section`. A visible gap is better than a silent shallow pass.
240
256
  - **Blind-Spot Memory:** before finishing, run `sungen blindspot list --prompt` (Bash) and make sure the suite satisfies each recorded pattern (e.g. "for any Add/Create action: check success + resulting data state + duplicate/double-submit"). These are gaps QA hit before — don't repeat them.
241
257
 
242
- **First-pass anti-patterns (exactly what the gate/reviewer reject — avoid them):**
243
- - Title↔steps mismatch (e.g. a "no-result" scenario that clicks a query which returns products).
244
- - Tautology `Then`: `click [Next Slide]` → `see [Carousel] section` (proves nothing).
245
- - Business-critical scenario ending at `see [Added] modal` / `see [Cart] page` with no data assertion.
258
+ **First-pass anti-patterns (these are exactly what the gate/reviewer reject — avoid them):**
259
+ - Title↔steps mismatch: e.g. a "no-result state" scenario that clicks a query which **returns** products. Steps must create the condition the title claims.
260
+ - Tautology `Then`: `click [Next Slide]` → `see [Carousel] section` (always visible, proves nothing). Assert the change (new slide title differs).
261
+ - Business-critical scenario ending at `see [Added] modal` / `see [Cart] page` / `see [Category Products] page` with no data assertion.
246
262
  - Brand filter covered only as navigation (must assert products belong to the brand).
247
263
 
248
- **Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases.
264
+ **Balance:** cover all the above (deep) BEFORE expanding subscription / UI-presence / extra validation edge cases. Do not over-invest in subscription while cart/detail/filter correctness are shallow.
265
+
266
+ #### Harness gates — satisfy on the FIRST pass (don't make the repair loop fix them)
267
+
268
+ `sungen audit` enforces these. Generate compliant output up front:
269
+
270
+ 1. **Taxonomy-match** (`VP-TAXONOMY-MISMATCH`, gate-FAIL) — when `test-viewpoint.md` declares its own viewpoint IDs (e.g. `VP0`, `VP1`, … `VP12`, `MS-HP-001`, `MS-EH-001`), **reuse those IDs verbatim as the scenario codes**. Do NOT invent a generic `VP-UI / VP-LOGIC / VP-VAL` scheme — that breaks the coverage matrix. Only fall back to `VP-<CATEGORY>-<NNN>` when the viewpoint file declares no IDs.
271
+ 2. **Spec-coverage triggers** (`TRIGGER-UNCOVERED`, gate-FAIL) — the Validation-Rules table lists a **trigger** per constraint (e.g. `blur, submit`). Generate one scenario **per (constraint × trigger)** — a `format` rule validating *on blur AND on submit* needs BOTH a blur scenario (`press Tab`) and a submit scenario (`click [Submit]` / `press Enter`). Never collapse the trigger × input matrix to one representative case.
272
+ 3. **Claim-Proof** (`CLAIM-UNPROVEN`) — a title claiming `all`/`only`/`every`/`single`/`correct`/`same`/`changes`/`hidden`/`cleared`/`restored`/`independent`/`sanitized`/`announces` MUST have the matching assertion (`see all …`, count, `remember`+compare, `is hidden`, return-and-assert-empty, etc.). If the title promises it, the steps must prove it.
273
+ 4. **Downstream-scope** (`DOWNSTREAM-SCOPE-MISSING`) — when the spec's Navigation Flow / success target is **another screen** (e.g. a confirmation/sent page), don't stop at a terminal `see [X] page`. Either cover that screen's content/guards (if its viewpoint items are in scope — they often have their own `MS-*` IDs), or scaffold it (`sungen add --screen <name>`) and note the handoff. Do not silently drop the downstream surface.
274
+ 5. **Manual-oracle** (`MANUAL-STEPS-INSUFFICIENT`) — every `@manual` scenario needs **setup · action · observable expected · oracle/tool**, not a one-line note. Use this comment shape:
275
+ ```gherkin
276
+ @high @manual
277
+ Scenario: VP-… <claim>
278
+ # MANUAL: <why it can't be automated — needs network capture / inbox / screen-reader / multi-tab>
279
+ # Tester verifies:
280
+ # 1. <setup> e.g. seed a registered email; throttle the network
281
+ # 2. <action> e.g. click [Submit] with the request in flight
282
+ # 3. <observable> e.g. only ONE POST is dispatched
283
+ # 4. Oracle: <tool> e.g. DevTools Network panel / mail-catcher / NVDA
284
+ ```
249
285
 
250
286
  #### Tier 1 guard — minimum before writing scenarios
251
287
 
@@ -363,7 +399,7 @@ Add cleanup tags per the `sungen-gherkin-syntax` Cleanup table. Key rules:
363
399
  **Files:** `qa/screens/<screen>/features/<screen>.feature` + `qa/screens/<screen>/test-data/<screen>.yaml`
364
400
 
365
401
  Use step patterns and element types from `sungen-gherkin-syntax`.
366
- **Naming**: `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
402
+ **Naming**: reuse the **project's `test-viewpoint.md` IDs** when it declares them (e.g. `VP0`, `MS-HP-001`); otherwise `VP-<CATEGORY>-<NNN>`. Scenario name must use the **same element type** as the steps.
367
403
 
368
404
  **Test data** — grouped by section, loaded at runtime:
369
405