@sun-asterisk/sungen 3.2.24-beta.1 → 3.2.24-beta.3

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.
Files changed (90) hide show
  1. package/dist/cli/commands/audit.d.ts.map +1 -1
  2. package/dist/cli/commands/audit.js +22 -16
  3. package/dist/cli/commands/audit.js.map +1 -1
  4. package/dist/cli/commands/capability.d.ts.map +1 -1
  5. package/dist/cli/commands/capability.js +11 -12
  6. package/dist/cli/commands/capability.js.map +1 -1
  7. package/dist/cli/commands/challenge.d.ts.map +1 -1
  8. package/dist/cli/commands/challenge.js +2 -10
  9. package/dist/cli/commands/challenge.js.map +1 -1
  10. package/dist/cli/commands/depth-lint.d.ts.map +1 -1
  11. package/dist/cli/commands/depth-lint.js +2 -12
  12. package/dist/cli/commands/depth-lint.js.map +1 -1
  13. package/dist/cli/commands/gate.d.ts.map +1 -1
  14. package/dist/cli/commands/gate.js +2 -47
  15. package/dist/cli/commands/gate.js.map +1 -1
  16. package/dist/cli/commands/journey.d.ts.map +1 -1
  17. package/dist/cli/commands/journey.js +2 -12
  18. package/dist/cli/commands/journey.js.map +1 -1
  19. package/dist/cli/commands/manifest.d.ts.map +1 -1
  20. package/dist/cli/commands/manifest.js +2 -10
  21. package/dist/cli/commands/manifest.js.map +1 -1
  22. package/dist/cli/commands/next.d.ts +14 -0
  23. package/dist/cli/commands/next.d.ts.map +1 -0
  24. package/dist/cli/commands/next.js +130 -0
  25. package/dist/cli/commands/next.js.map +1 -0
  26. package/dist/cli/index.js +34 -0
  27. package/dist/cli/index.js.map +1 -1
  28. package/dist/cli/resolve-unit.d.ts +22 -0
  29. package/dist/cli/resolve-unit.d.ts.map +1 -0
  30. package/dist/cli/resolve-unit.js +101 -0
  31. package/dist/cli/resolve-unit.js.map +1 -0
  32. package/dist/exporters/feature-parser.d.ts +4 -3
  33. package/dist/exporters/feature-parser.d.ts.map +1 -1
  34. package/dist/exporters/feature-parser.js +10 -4
  35. package/dist/exporters/feature-parser.js.map +1 -1
  36. package/dist/harness/audit.d.ts +9 -1
  37. package/dist/harness/audit.d.ts.map +1 -1
  38. package/dist/harness/audit.js +92 -6
  39. package/dist/harness/audit.js.map +1 -1
  40. package/dist/harness/capability-plan.d.ts +12 -1
  41. package/dist/harness/capability-plan.d.ts.map +1 -1
  42. package/dist/harness/capability-plan.js +16 -2
  43. package/dist/harness/capability-plan.js.map +1 -1
  44. package/dist/harness/capability.d.ts +12 -0
  45. package/dist/harness/capability.d.ts.map +1 -1
  46. package/dist/harness/capability.js +16 -0
  47. package/dist/harness/capability.js.map +1 -1
  48. package/dist/harness/catalog/drivers.yaml +5 -0
  49. package/dist/harness/flow-contract.d.ts +75 -0
  50. package/dist/harness/flow-contract.d.ts.map +1 -1
  51. package/dist/harness/flow-contract.js +122 -1
  52. package/dist/harness/flow-contract.js.map +1 -1
  53. package/dist/harness/next-step.d.ts +40 -0
  54. package/dist/harness/next-step.d.ts.map +1 -0
  55. package/dist/harness/next-step.js +242 -0
  56. package/dist/harness/next-step.js.map +1 -0
  57. package/dist/harness/spec-coverage.d.ts +20 -0
  58. package/dist/harness/spec-coverage.d.ts.map +1 -1
  59. package/dist/harness/spec-coverage.js +35 -0
  60. package/dist/harness/spec-coverage.js.map +1 -1
  61. package/dist/harness/viewpoint-ledger.d.ts +4 -0
  62. package/dist/harness/viewpoint-ledger.d.ts.map +1 -1
  63. package/dist/harness/viewpoint-ledger.js +42 -0
  64. package/dist/harness/viewpoint-ledger.js.map +1 -1
  65. package/dist/orchestrator/templates/ai-src/commands/create-test.md +27 -8
  66. package/dist/orchestrator/templates/ai-src/commands/run-test.md +6 -0
  67. package/dist/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +36 -0
  68. package/package.json +3 -3
  69. package/src/cli/commands/audit.ts +22 -14
  70. package/src/cli/commands/capability.ts +11 -10
  71. package/src/cli/commands/challenge.ts +2 -8
  72. package/src/cli/commands/depth-lint.ts +2 -10
  73. package/src/cli/commands/gate.ts +2 -10
  74. package/src/cli/commands/journey.ts +2 -10
  75. package/src/cli/commands/manifest.ts +2 -8
  76. package/src/cli/commands/next.ts +96 -0
  77. package/src/cli/index.ts +31 -0
  78. package/src/cli/resolve-unit.ts +72 -0
  79. package/src/exporters/feature-parser.ts +10 -4
  80. package/src/harness/audit.ts +95 -11
  81. package/src/harness/capability-plan.ts +23 -3
  82. package/src/harness/capability.ts +22 -0
  83. package/src/harness/catalog/drivers.yaml +5 -0
  84. package/src/harness/flow-contract.ts +158 -1
  85. package/src/harness/next-step.ts +237 -0
  86. package/src/harness/spec-coverage.ts +38 -0
  87. package/src/harness/viewpoint-ledger.ts +42 -0
  88. package/src/orchestrator/templates/ai-src/commands/create-test.md +27 -8
  89. package/src/orchestrator/templates/ai-src/commands/run-test.md +6 -0
  90. package/src/orchestrator/templates/ai-src/skills/sungen-tc-generation/SKILL.md +36 -0
@@ -46,5 +46,25 @@ export declare function parseSpecClauses(specPath: string): {
46
46
  */
47
47
  export declare function citedIds(featureText: string): Set<string>;
48
48
  export declare function specCoverage(specPath: string, scenarios: ScenarioInfo[], featureText: string): SpecCoverageResult;
49
+ /**
50
+ * A flow's requirement list that is a HAND RESTATEMENT of the screen specs it traverses.
51
+ *
52
+ * A flow spec typically cites its requirements as belonging elsewhere — "ST_AUTH_002 FR-001",
53
+ * "restated here in flow terms". That restatement is lossy by construction, and nothing checked
54
+ * it: on a real run the flow spec restated two of the screens' FRs, `specFR` read **2/2 = 100%**,
55
+ * and the guard clause the flow most needed (a double-submit rule in one of those screen specs)
56
+ * had never entered the system at all. The axis was certifying complete coverage of a
57
+ * hand-truncated universe — a worse failure than a missing scenario, because the number said the
58
+ * opposite.
59
+ *
60
+ * So: name the source documents the flow says its requirements come from, and say plainly which
61
+ * of them the project does not hold. Whether the restatement is complete is then a question
62
+ * someone can answer, instead of one nothing was asking.
63
+ */
64
+ export declare function restatedRequirementSources(specText: string, availableUnits: string[]): {
65
+ restated: boolean;
66
+ sources: string[];
67
+ missing: string[];
68
+ };
49
69
  export {};
50
70
  //# sourceMappingURL=spec-coverage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-coverage.d.ts","sourceRoot":"","sources":["../../src/harness/spec-coverage.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEjD,MAAM,WAAW,UAAU;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE;AAExH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC9C;;;qEAGiE;IACjE,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CACnC;AAED,UAAU,QAAQ;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,QAAQ,CAAA;CAAE;AACnE,UAAU,MAAM;IAAG,UAAU,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE;AA+BzE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAyDzF;A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zE,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAAE,GAAG,EAAE,QAAQ,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAyDzF;AAOD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAkBzD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,kBAAkB,CAgDjH;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG;IACtF,QAAQ,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAC;CACzD,CAmBA"}
@@ -36,6 +36,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.parseSpecClauses = parseSpecClauses;
37
37
  exports.citedIds = citedIds;
38
38
  exports.specCoverage = specCoverage;
39
+ exports.restatedRequirementSources = restatedRequirementSources;
39
40
  /**
40
41
  * Spec-clause coverage (harness G2) — the spec-layer faithfulness check.
41
42
  *
@@ -220,4 +221,38 @@ function specCoverage(specPath, scenarios, featureText) {
220
221
  const verdict = uncoveredMust.length > 0 || triggerGaps.length > 0 ? 'fail' : 'pass';
221
222
  return { hasSpec: true, frTotal: frs.length, frCovered, uncoveredMust, inferredOnly, triggerGaps, verdict };
222
223
  }
224
+ /**
225
+ * A flow's requirement list that is a HAND RESTATEMENT of the screen specs it traverses.
226
+ *
227
+ * A flow spec typically cites its requirements as belonging elsewhere — "ST_AUTH_002 FR-001",
228
+ * "restated here in flow terms". That restatement is lossy by construction, and nothing checked
229
+ * it: on a real run the flow spec restated two of the screens' FRs, `specFR` read **2/2 = 100%**,
230
+ * and the guard clause the flow most needed (a double-submit rule in one of those screen specs)
231
+ * had never entered the system at all. The axis was certifying complete coverage of a
232
+ * hand-truncated universe — a worse failure than a missing scenario, because the number said the
233
+ * opposite.
234
+ *
235
+ * So: name the source documents the flow says its requirements come from, and say plainly which
236
+ * of them the project does not hold. Whether the restatement is complete is then a question
237
+ * someone can answer, instead of one nothing was asking.
238
+ */
239
+ function restatedRequirementSources(specText, availableUnits) {
240
+ // "these ... originate in the SCREEN specs", "restated here", "per ST_AUTH_002 FR-001".
241
+ const restated = /\brestate[sd]?\b|\boriginate[sd]? in\b|\bderived from the (?:screen|per-screen) spec/i.test(specText);
242
+ // External document ids carrying their own requirement number: `ST_AUTH_002 FR-001`,
243
+ // `SCR-1-SYS-0001.FR-3`. Two+ segments and an uppercase head, so a bare `FR-001` (the flow's
244
+ // own) never matches.
245
+ // A citation may name SEVERAL documents at once — "ST_AUTH_002/ST_AUTH_004 FR-001" — so match
246
+ // the whole slash/comma-joined run and split it. Capturing only the token adjacent to the
247
+ // requirement number silently dropped every sibling.
248
+ const DOC = '[A-Z][A-Z0-9]*(?:[_-][A-Z0-9]+)+';
249
+ const cite = new RegExp(`\\b((?:${DOC})(?:\\s*[/,]\\s*(?:${DOC}))*)[\\s.]+(?:FR|NFR|BR)-\\d+`, 'g');
250
+ const sources = [...new Set([...specText.matchAll(cite)].flatMap((m) => m[1].split(/\s*[/,]\s*/)).map((x) => x.trim()).filter(Boolean))];
251
+ if (!restated && sources.length === 0)
252
+ return { restated: false, sources: [], missing: [] };
253
+ const norm = (x) => x.toLowerCase().replace(/[^a-z0-9]/g, '');
254
+ const have = availableUnits.map(norm);
255
+ const missing = sources.filter((src) => !have.some((u) => u.includes(norm(src)) || norm(src).includes(u)));
256
+ return { restated, sources, missing };
257
+ }
223
258
  //# sourceMappingURL=spec-coverage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-coverage.js","sourceRoot":"","sources":["../../src/harness/spec-coverage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;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AE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;IAC5F,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;IAC9E,MAAM,IAAI,GAAG,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3G,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACxC,CAAC"}
@@ -20,4 +20,8 @@ export declare function parseViewpointItems(viewpointPath: string): {
20
20
  text: string;
21
21
  }[];
22
22
  export declare function viewpointLedger(viewpointPath: string, scenarios: ScenarioInfo[], featureText: string): LedgerResult;
23
+ export declare function browserGestureSubstitutions(viewpointPath: string, scenarios: ScenarioInfo[]): Array<{
24
+ gesture: string;
25
+ item: string;
26
+ }>;
23
27
  //# sourceMappingURL=viewpoint-ledger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewpoint-ledger.d.ts","sourceRoot":"","sources":["../../src/harness/viewpoint-ledger.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGvC,MAAM,WAAW,UAAU;IAAG,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE;AAE3E,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,OAAO,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,O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AuBD,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAC/C,KAAK,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAiB1C"}
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.parseViewpointItems = parseViewpointItems;
37
37
  exports.viewpointLedger = viewpointLedger;
38
+ exports.browserGestureSubstitutions = browserGestureSubstitutions;
38
39
  /**
39
40
  * Viewpoint Atomic Coverage Ledger (harness #2).
40
41
  *
@@ -132,4 +133,45 @@ function viewpointLedger(viewpointPath, scenarios, featureText) {
132
133
  }
133
134
  return { hasViewpoint: true, total: items.length, covered, ratio: items.length ? covered / items.length : 1, missing };
134
135
  }
136
+ /**
137
+ * A viewpoint item that names a BROWSER-LEVEL gesture, met by an in-app control instead.
138
+ *
139
+ * "Browser back button from Basic Info Confirmation to Basic Info — values must be restored"
140
+ * was answered with `User click [Confirmation:Back] button`. Those are different mechanisms: an
141
+ * app button runs the screen's own re-hydrate logic, browser history does not, and a defect
142
+ * that only appears on history navigation lives exactly in the gap. The ledger counted the item
143
+ * covered because the words matched, so the substitution was invisible (#595).
144
+ *
145
+ * The language has no reload/back step at all (#593), so the honest outcome is a `@manual`
146
+ * deferral naming the gesture — not a silent swap.
147
+ */
148
+ const BROWSER_GESTURES = [
149
+ { gesture: 'browser back', re: /\bbrowser(?:'s)?[ -]?(?:back|history)\b|\bhistory[ -]back\b/i,
150
+ appSubstitute: /\bclick \[[^\]]*back[^\]]*\]/i },
151
+ { gesture: 'browser reload/refresh', re: /\b(?:page |browser )?(?:reload|refresh)(?:ing|ed|es)?\b/i,
152
+ appSubstitute: /\bis on \[[^\]]+\] page\b/i },
153
+ { gesture: 'closing and reopening the tab', re: /\bclos(?:e|ing) (?:and reopen\w*\s*)?the tab\b|\breopen\w* the tab\b/i,
154
+ appSubstitute: /\bis on \[[^\]]+\] page\b/i },
155
+ ];
156
+ function browserGestureSubstitutions(viewpointPath, scenarios) {
157
+ const out = [];
158
+ // Judged PER SCENARIO, not over the whole file: a @manual scenario elsewhere that merely
159
+ // mentions the gesture in passing (explaining a tooling limit) silenced the check for an
160
+ // item that an automated scenario had quietly substituted.
161
+ const deferred = scenarios.filter((s) => s.manual).map((s) => s.haystack);
162
+ const automated = scenarios.filter((s) => !s.manual).map((s) => s.haystack);
163
+ for (const item of parseViewpointItems(viewpointPath)) {
164
+ for (const g of BROWSER_GESTURES) {
165
+ if (!g.re.test(item.text))
166
+ continue;
167
+ // A @manual scenario whose own subject IS the gesture is the honest answer.
168
+ if (deferred.some((h) => g.re.test(h)))
169
+ break;
170
+ if (automated.some((h) => g.appSubstitute.test(h)))
171
+ out.push({ gesture: g.gesture, item: item.text });
172
+ break;
173
+ }
174
+ }
175
+ return out;
176
+ }
135
177
  //# sourceMappingURL=viewpoint-ledger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewpoint-ledger.js","sourceRoot":"","sources":["../../src/harness/viewpoint-ledger.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,kDA8BC;AAED,0CAsBC;AA/FD;;;;;;;;;GASG;AACH,uCAAyB;AAEzB,2CAA2C;AAY3C,MAAM,KAAK,GAAG,wDAAwD,CAAC,CAAC,uCAAuC;AAE/G;;;;;GAKG;AACH,2FAA2F;AAC3F,uFAAuF;AACvF,MAAM,gBAAgB,GAAG,kEAAkE,CAAC;AAC5F;yFACyF;AACzF,MAAM,YAAY,GAAG,8EAA8E,CAAC;AACpG,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,QAA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AAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAC5E,KAAK,MAAM,IAAI,IAAI,mBAAmB,CAAC,aAAa,CAAC,EAAE,CAAC;QACtD,KAAK,MAAM,CAAC,IAAI,gBAAgB,EAAE,CAAC;YACjC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;gBAAE,SAAS;YACpC,4EAA4E;YAC5E,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAAE,MAAM;YAC9C,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAAE,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YACtG,MAAM;QACR,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -9,12 +9,20 @@ codex-trigger: "Run when the user asks to CREATE, generate, write, or author tes
9
9
  ---
10
10
  ## ⛔ HARD RULE — the run's LAST action is the next-step hand-back
11
11
 
12
- A create-test run is NOT finished when the files are written or the audit prints. The final
13
- action of EVERY run — success, partial, or aborted — is the next-step hand-back
14
- ({{#cap parallel-subagents}}an `AskUserQuestion` offering the next actions{{/cap}}{{^cap parallel-subagents}}a numbered list of next-action choices{{/cap}};
15
- see "Finish always hand the next step back" at the end of this file). Ending with a prose
16
- summary and no choices is a broken run: the operator is left guessing. This holds no matter
17
- how long the generation/repair loop ran.
12
+ A run is NOT finished when its files are written or its output prints. The final action of EVERY
13
+ run — success, partial, or aborted — is the next-step hand-back.
14
+
15
+ **Ask `sungen next <unit>` rather than deciding from memory.** It derives the answer from what the
16
+ project actually holds (artifacts on disk, the audit report, the accepted viewpoint baseline, the
17
+ compiled spec, the run results), so the hand-back stays correct even when the run ended somewhere
18
+ unexpected — a failed install, a driver that turned out not to support this unit kind, an aborted
19
+ repair loop. Every `sungen` command also prints `Next: sungen next …` as its own last line.
20
+
21
+ This matters most exactly where it used to break. A run that ended on a command with no footer of
22
+ its own — `sungen capability add`, a dead-end install — left the session with nothing to follow and
23
+ it stopped mid-workflow. If a step turns out to be impossible, that is still a hand-back: say what
24
+ blocked it, run `sungen next <unit>`, and offer what remains. Ending with a prose summary and no
25
+ choices is a broken run.
18
26
 
19
27
  ---
20
28
  {{#cap parallel-subagents}}
@@ -42,8 +50,19 @@ plus **both** postconditions: `successGuarantee` (true when the goal is reached)
42
50
  `minimalGuarantee` (what must still hold when the journey FAILS). Exception flows assert against
43
51
  the second one; with no `minimalGuarantee` they can only prove "an error appeared"
44
52
  (`FLOW-GUARANTEE-MISSING`). Then declare `phases:` — `[BF, AF, EF]` for a use-case decomposition
45
- (the first phase is the Basic Flow) and enumerate flows with the step × risk matrix in the
46
- `sungen-tc-generation` skill.
53
+ (the first phase is the Basic Flow). Then enumerate the use case's flows with the step × risk
54
+ matrix in the `sungen-tc-generation` skill and **write them into the contract's `flows:`
55
+ inventory**, each with a `status:` (`covered` / `deferred` / `pending-clarification` /
56
+ `out-of-scope`) and a `reason:` for anything but `covered`. Without the inventory, coverage can
57
+ only be measured per phase — and a phase counts as covered as soon as ONE scenario carries it, so
58
+ a fifteen-flow use case scores 100% on three scenarios (`FLOW-INVENTORY-MISSING`, and the top mark
59
+ is withheld).
60
+
61
+ A risk the specs do NOT settle is `pending-clarification` with the question written down — never a
62
+ scenario asserting invented behaviour, and never a silent omission. If the flow's requirements are
63
+ restated from screen specs the project does not hold, say so: the audit reports
64
+ `SPEC-RESTATED-UNVERIFIED` because `specFR 100%` over a hand-copied list certifies the copy, not
65
+ the source.
47
66
 
48
67
  ---
49
68
 
@@ -27,6 +27,12 @@ inside the run, not reasons to stop and hand the work back.
27
27
  install command as the hand-back.
28
28
  - Ending this run follows the same law as create-test: the LAST action is the next-step
29
29
  hand-back (the AskUserQuestion in "After showing results"), no matter how the run went.
30
+ **Ask `sungen next <unit>` rather than deciding from memory** — it derives the answer from what
31
+ the project now holds, so the hand-back stays correct even when the run ended somewhere
32
+ unexpected (a failed install, a driver that does not support this unit kind, an aborted repair
33
+ loop). Every `sungen` command also prints `Next: sungen next …` as its own last line. A step
34
+ that turns out to be impossible is still a hand-back: say what blocked it, run
35
+ `sungen next <unit>`, and offer what remains.
30
36
 
31
37
  ---
32
38
 
@@ -690,6 +690,42 @@ core, AF→behaviour, EF→validation/security) and traces them to the viewpoint
690
690
  `FL-EF` priority rows. Declare `phases: [BF, AF, EF]` in the contract; the FIRST phase is the
691
691
  Basic Flow and is the one that must reach `outcome`.
692
692
 
693
+ **Declare the flow INVENTORY, not just the phases.** `phases: [BF, AF, EF]` says which
694
+ vocabulary the suite uses; it cannot say how many flows the use case has — a phase counts as
695
+ covered the moment ONE scenario carries it, so a fifteen-flow use case with three scenarios
696
+ reported full phase coverage while a reviewer counting flows read it as a third done. List every
697
+ flow in the contract, and give each one a status:
698
+
699
+ ```yaml
700
+ flows:
701
+ - id: BF
702
+ outcome: "The successGuarantee — verified, recorded, signed in"
703
+ status: covered
704
+ - id: AF02
705
+ branchFrom: "BF step 4, before submitting"
706
+ outcome: "Re-enters BF at step 4 with the buffer restored"
707
+ status: covered
708
+ - id: EF08
709
+ branchFrom: "BF step 1, the control tapped twice"
710
+ outcome: "One request, one record"
711
+ status: pending-clarification # the spec is silent — ASK, never assume a guard
712
+ reason: "The guard lives in ST_AUTH_001's spec, which this project does not hold."
713
+ ```
714
+
715
+ Four statuses, and **silence is not one of them**: `covered` · `deferred` · `pending-clarification`
716
+ (the behaviour is not agreed yet, so no scenario can be right) · `out-of-scope` (another suite owns
717
+ it). Anything but `covered` needs a `reason:` — a deferral nobody can audit is the same as a
718
+ missing flow. `sungen audit` then measures `flowCoverage` per DECLARED FLOW and reports
719
+ `FLOW-UNCOVERED` (declared, nobody wrote it), `FLOW-UNDECLARED` (a scenario claiming a flow id the
720
+ inventory never declares), `FLOW-STATUS-UNREASONED` and `FLOW-INVENTORY-MISSING`.
721
+
722
+ **One flow, one id — a viewpoint is not a flow.** Several scenarios may prove one flow: give them
723
+ the same flow id and different sequence numbers (`VP-VAL-EF01-001`, `VP-VAL-EF01-002`), never a
724
+ fresh flow id per assertion. Two shapes the audit reports as `FLOW-PHASE-MISFILED`: an `EF` that
725
+ reaches the outcome with nothing failing (that is a success-path postcondition, so it belongs to
726
+ the BF), and an `AF` with no branch point (it walks the basic path asserting extra content — also
727
+ the BF's). Both inflate the flow count while adding no branch coverage.
728
+
693
729
  **Declare once, then declare only the differences.** Actor · Trigger · Goal · Precondition ·
694
730
  `successGuarantee` · `minimalGuarantee` are use-case-level: they live in `flow-contract.yaml`
695
731
  and are never repeated per flow. Each flow in `test-viewpoint.md` then states only three things:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sun-asterisk/sungen",
3
- "version": "3.2.24-beta.1",
3
+ "version": "3.2.24-beta.3",
4
4
  "description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -39,8 +39,8 @@
39
39
  "@babel/types": "^7.28.5",
40
40
  "@cucumber/gherkin": "^37.0.0",
41
41
  "@cucumber/messages": "^31.0.0",
42
- "@sungen/driver-data-factory": "3.2.24-beta.1",
43
- "@sungen/driver-ui": "3.2.24-beta.1",
42
+ "@sungen/driver-data-factory": "3.2.24-beta.3",
43
+ "@sungen/driver-ui": "3.2.24-beta.3",
44
44
  "chalk": "^5.6.2",
45
45
  "commander": "^14.0.2",
46
46
  "dotenv": "^17.2.3",
@@ -4,17 +4,8 @@ import * as fs from 'fs';
4
4
  import { runAudit, AuditReport, catalogIdFromScreenDir } from '../../harness/audit';
5
5
  import { reportSlug } from '../../harness/unit-paths';
6
6
  import { acceptViewpointBaseline } from '../../harness/viewpoint-baseline';
7
+ import { findUnitDir } from '../resolve-unit';
7
8
 
8
- function findScreenDir(name: string): string | null {
9
- // `name` may be a bare screen/flow/area, or an api unit id (`api/<area>`, `api/flows/<flow>`).
10
- const candidates = [
11
- path.join(process.cwd(), 'qa', 'screens', name),
12
- path.join(process.cwd(), 'qa', 'flows', name),
13
- path.join(process.cwd(), 'qa', 'api', name), // qa/api/<area> or qa/api/flows/<flow>
14
- ];
15
- for (const c of candidates) if (fs.existsSync(c)) return c;
16
- return null;
17
- }
18
9
 
19
10
  function bar(ratio: number, width = 20): string {
20
11
  const n = Math.round(ratio * width);
@@ -39,7 +30,9 @@ function render(r: AuditReport): void {
39
30
  const width = Math.max(...r.score.axes.map((a) => a.key.length));
40
31
  for (const a of r.score.axes) {
41
32
  const label = a.key.padEnd(width);
42
- if (!a.applicable) { L(` ${label} ${' '.repeat(20)} n/a no evidence`); continue; }
33
+ // Two different n/a: this unit supplied nothing, vs this axis does not apply to this KIND
34
+ // of unit. Only the first is something an author can act on.
35
+ if (!a.applicable) { L(` ${label} ${' '.repeat(20)} n/a — ${a.byDesign ? 'not applicable to a contract flow' : 'no evidence'}`); continue; }
43
36
  L(` ${label} ${bar(a.value)} ${(a.value * 100).toFixed(0)}%${verdictOf[a.key] ?? ''}`);
44
37
  }
45
38
  L(` (${r.score.formula})`);
@@ -52,7 +45,15 @@ function render(r: AuditReport): void {
52
45
  const fq = r.flowQuality;
53
46
  L(` ①F Flow contract — goal: ${fq.contract!.goal}`);
54
47
  L(` outcome [${fq.contract!.outcome.screen}]: ${fq.outcomeProven ? '✓ proven (automated data assertion)' : fq.outcomeManualOnly ? '⚠ manual-only' : '✗ UNPROVEN'}`);
55
- L(` phases: ${fq.phases.map((p) => `${p.phase}=${p.covered ? (p.automated ? '✓' : 'manual') : '✗'}`).join(' ')} → flowCoverage ${(fq.phaseRatio * 100).toFixed(0)}%`);
48
+ L(` phases: ${fq.phases.map((p) => `${p.phase}=${p.covered ? (p.automated ? '✓' : 'manual') : '✗'}`).join(' ')} → phase coverage ${(fq.phaseRatio * 100).toFixed(0)}%`);
49
+ // The inventory, when declared, is the coverage that counts — phase coverage is only
50
+ // "each of BF/AF/EF appears at least once" and printing it as `flowCoverage` next to a 89%
51
+ // axis read as a contradiction.
52
+ const inv = r.flowInventory;
53
+ if (inv) {
54
+ L(` flows: ${inv.covered.length}/${inv.covered.length + inv.uncovered.length} declared covered → flowCoverage ${(inv.ratio * 100).toFixed(0)}%`
55
+ + (inv.accounted.length ? ` (${inv.accounted.map((f) => `${f.id}=${f.status}`).join(', ')})` : ''));
56
+ }
56
57
  L(` handoffs asserted: ${fq.handoffs.asserted}/${fq.handoffs.total}${fq.offGoal.length ? ` ⚠ off-goal scenarios: ${fq.offGoal.length} (${fq.offGoalCategories.join(', ')})` : ''}`);
57
58
  L('');
58
59
  }
@@ -103,7 +104,14 @@ function render(r: AuditReport): void {
103
104
  if (na.length) L(` not scored (no evidence in this unit): ${na.join(', ')}`);
104
105
  L(` weakest: ${r.calibration.weakest.axis} ${(r.calibration.weakest.value * 100).toFixed(0)}%${r.calibration.inflated ? ' ⚠ SCORE-INFLATED-BY-BREADTH' : ''}`);
105
106
  if (r.calibration.cappedAt !== undefined) {
106
- L(` ⚠ score held at ${r.calibration.cappedAt.toFixed(1)} by the weakest axis fix it to lift the number`);
107
+ // Only blame the weakest axis when it IS weak. A cap for missing evidence printed
108
+ // "held by the weakest axis — fix it" next to "weakest: flowCoverage 100%", which sent
109
+ // authors hunting for a defect in a maxed-out axis (#595). The SCORE-CAPPED finding
110
+ // carries the real reason; say which kind of cap this is.
111
+ const weak = r.calibration.weakest.value < 0.7;
112
+ L(weak
113
+ ? ` ⚠ score held at ${r.calibration.cappedAt.toFixed(1)} by the weakest axis — fix it to lift the number`
114
+ : ` ⚠ score held at ${r.calibration.cappedAt.toFixed(1)} — no axis is weak; see the SCORE-CAPPED finding for what evidence is missing`);
107
115
  }
108
116
  L('');
109
117
  }
@@ -126,7 +134,7 @@ export function registerAuditCommand(program: Command): void {
126
134
  try {
127
135
  const name = options.screen || options.api || options.area;
128
136
  if (!name) throw new Error('Provide --screen <name> (or --api <area>)');
129
- const dir = findScreenDir(name);
137
+ const dir = findUnitDir(name);
130
138
  if (!dir) throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
131
139
 
132
140
  const report = runAudit(dir, name);
@@ -9,6 +9,7 @@ import {
9
9
  import { buildPlan, MANUAL_REASONS } from '../../harness/capability-plan';
10
10
  import { adapterRegistry } from '../../generators/test-generator/adapters';
11
11
  import { emitMobileRuntime, installMobileDriver } from '../../orchestrator/mobile-runtime-scaffolder';
12
+ import { findUnitDir, resolveUnit } from '../resolve-unit';
12
13
 
13
14
  /** The running CLI's (core) version — opt-in drivers install in lockstep with it (not `@latest`). */
14
15
  function coreVersion(): string {
@@ -97,13 +98,6 @@ function verifyCapabilityDriver(pkg: string, cwd: string): void {
97
98
  }
98
99
  }
99
100
 
100
- function findScreenDir(name: string): string | null {
101
- const s = path.join(process.cwd(), 'qa', 'screens', name);
102
- if (fs.existsSync(s)) return s;
103
- const f = path.join(process.cwd(), 'qa', 'flows', name);
104
- if (fs.existsSync(f)) return f;
105
- return null;
106
- }
107
101
 
108
102
  export function registerCapabilityCommand(program: Command): void {
109
103
  const cap = program
@@ -143,9 +137,10 @@ export function registerCapabilityCommand(program: Command): void {
143
137
  .option('--json', 'Output the raw plan JSON')
144
138
  .action((o: { screen: string; json?: boolean }) => {
145
139
  try {
146
- const dir = findScreenDir(o.screen);
147
- if (!dir) throw new Error(`Screen/flow not found: qa/screens/${o.screen} or qa/flows/${o.screen}`);
148
- const plan = buildPlan(dir, o.screen);
140
+ const resolved = resolveUnit(o.screen);
141
+ if (!resolved) throw new Error(`Screen/flow not found: qa/screens/${o.screen} or qa/flows/${o.screen}`);
142
+ // The catalog unit id carries the unit KIND, which gates which drivers can serve it.
143
+ const plan = buildPlan(resolved.dir, o.screen, resolved.unitId);
149
144
 
150
145
  const outDir = path.join(process.cwd(), '.sungen', 'reports');
151
146
  fs.mkdirSync(outDir, { recursive: true });
@@ -170,6 +165,12 @@ export function registerCapabilityCommand(program: Command): void {
170
165
  L(` • ${r.count} @manual:${r.reason} → enable \`${r.driver}\` (${r.pkg}) → would unblock ${r.count}`);
171
166
  }
172
167
  }
168
+ if (plan.unavailable.length) {
169
+ L(' Cannot help here (driver does not support this unit kind — do NOT install):');
170
+ for (const r of plan.unavailable) {
171
+ L(` • ${r.count} @manual:${r.reason} → \`${r.driver}\` has no ${r.unitKind} support; automate the behaviour on the owning SCREEN unit instead`);
172
+ }
173
+ }
173
174
  if (plan.keep.length) {
174
175
  L(` Keep manual (judgment floor — do NOT automate): ${plan.keep.map((k) => `${k.code}×${k.count} (${MANUAL_REASONS[k.code].label})`).join(', ')}`);
175
176
  }
@@ -2,14 +2,8 @@ import { Command } from 'commander';
2
2
  import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import { buildChallenge, renderChallengeMarkdown } from '../../harness/challenge';
5
+ import { findUnitDir } from '../resolve-unit';
5
6
 
6
- function findScreenDir(name: string): string | null {
7
- const screen = path.join(process.cwd(), 'qa', 'screens', name);
8
- if (fs.existsSync(screen)) return screen;
9
- const flow = path.join(process.cwd(), 'qa', 'flows', name);
10
- if (fs.existsSync(flow)) return flow;
11
- return null;
12
- }
13
7
 
14
8
  export function registerChallengeCommand(program: Command): void {
15
9
  program
@@ -19,7 +13,7 @@ export function registerChallengeCommand(program: Command): void {
19
13
  .option('--json', 'Output the raw JSON report')
20
14
  .action((o) => {
21
15
  try {
22
- const dir = findScreenDir(o.screen);
16
+ const dir = findUnitDir(o.screen);
23
17
  if (!dir) throw new Error(`Screen/flow not found: qa/screens/${o.screen} or qa/flows/${o.screen}`);
24
18
  const report = buildChallenge(dir, o.screen);
25
19
 
@@ -3,16 +3,8 @@ import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import { runDepthLint, renderDepthLint } from '../../harness/depth-lint';
5
5
  import { reportSlug } from '../../harness/unit-paths';
6
+ import { findUnitDir } from '../resolve-unit';
6
7
 
7
- function findScreenDir(name: string): string | null {
8
- const candidates = [
9
- path.join(process.cwd(), 'qa', 'screens', name),
10
- path.join(process.cwd(), 'qa', 'flows', name),
11
- path.join(process.cwd(), 'qa', 'api', name),
12
- ];
13
- for (const c of candidates) if (fs.existsSync(c)) return c;
14
- return null;
15
- }
16
8
 
17
9
  export function registerDepthLintCommand(program: Command): void {
18
10
  program
@@ -24,7 +16,7 @@ export function registerDepthLintCommand(program: Command): void {
24
16
  try {
25
17
  const name = options.screen;
26
18
  if (!name) throw new Error('Provide --screen <name>');
27
- const dir = findScreenDir(name);
19
+ const dir = findUnitDir(name);
28
20
  if (!dir) throw new Error(`Not found: qa/screens/${name} or qa/flows/${name}`);
29
21
 
30
22
  const report = runDepthLint(dir, name);
@@ -2,16 +2,8 @@ import { Command } from 'commander';
2
2
  import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import { runGate, renderGate, GatePhase } from '../../harness/journey';
5
+ import { findUnitDir } from '../resolve-unit';
5
6
 
6
- function findScreenDir(name: string): string | null {
7
- const candidates = [
8
- path.join(process.cwd(), 'qa', 'screens', name),
9
- path.join(process.cwd(), 'qa', 'flows', name),
10
- path.join(process.cwd(), 'qa', 'api', name),
11
- ];
12
- for (const c of candidates) if (fs.existsSync(c)) return c;
13
- return null;
14
- }
15
7
 
16
8
  const PHASES: GatePhase[] = ['create', 'run', 'deliver'];
17
9
 
@@ -28,7 +20,7 @@ export function registerGateCommand(program: Command): void {
28
20
  if (!name) throw new Error('Provide --screen <name>');
29
21
  const phase = options.phase as GatePhase;
30
22
  if (!PHASES.includes(phase)) throw new Error(`Provide --phase <${PHASES.join('|')}>`);
31
- if (!findScreenDir(name)) throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
23
+ if (!findUnitDir(name)) throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
32
24
 
33
25
  const verdict = runGate(process.cwd(), name, phase);
34
26
  if (options.json) console.log(JSON.stringify(verdict, null, 2));
@@ -3,16 +3,8 @@ import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import { runJourney, waive, signoff, renderJourneyBoard, rollupJourney, renderRollupBoard } from '../../harness/journey';
5
5
  import { reportSlug } from '../../harness/unit-paths';
6
+ import { findUnitDir } from '../resolve-unit';
6
7
 
7
- function findScreenDir(name: string): string | null {
8
- const candidates = [
9
- path.join(process.cwd(), 'qa', 'screens', name),
10
- path.join(process.cwd(), 'qa', 'flows', name),
11
- path.join(process.cwd(), 'qa', 'api', name),
12
- ];
13
- for (const c of candidates) if (fs.existsSync(c)) return c;
14
- return null;
15
- }
16
8
 
17
9
  export function registerJourneyCommand(program: Command): void {
18
10
  program
@@ -41,7 +33,7 @@ export function registerJourneyCommand(program: Command): void {
41
33
 
42
34
  const name = options.screen;
43
35
  if (!name) throw new Error('Provide --screen <name> (or --all for the roll-up)');
44
- if (!findScreenDir(name)) throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
36
+ if (!findUnitDir(name)) throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
45
37
 
46
38
  const report = options.waive
47
39
  ? waive(process.cwd(), name, options.waive, options.reason || '')
@@ -2,14 +2,8 @@ import { Command } from 'commander';
2
2
  import * as path from 'path';
3
3
  import * as fs from 'fs';
4
4
  import { buildManifest, diffManifest, loadManifest, saveManifest } from '../../harness/manifest';
5
+ import { findUnitDir } from '../resolve-unit';
5
6
 
6
- function findScreenDir(name: string): string | null {
7
- for (const p of ['screens', 'flows', 'api']) {
8
- const d = path.join(process.cwd(), 'qa', p, name);
9
- if (fs.existsSync(d)) return d;
10
- }
11
- return null;
12
- }
13
7
 
14
8
  export function registerManifestCommand(program: Command): void {
15
9
  program
@@ -24,7 +18,7 @@ export function registerManifestCommand(program: Command): void {
24
18
  try {
25
19
  const name = options.screen || options.api || options.area;
26
20
  if (!name) throw new Error('Provide --screen <name> (or --api <area>)');
27
- const dir = findScreenDir(name);
21
+ const dir = findUnitDir(name);
28
22
  if (!dir) throw new Error(`Not found: qa/screens|flows|api/${name}`);
29
23
 
30
24
  if (options.diff) {