@sun-asterisk/sungen 3.2.2-beta.7 → 3.2.2-beta.9

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.
@@ -0,0 +1,3 @@
1
+ import { Command } from 'commander';
2
+ export declare function registerGateCommand(program: Command): void;
3
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/gate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiBpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0B1D"}
@@ -0,0 +1,83 @@
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.registerGateCommand = registerGateCommand;
37
+ const path = __importStar(require("path"));
38
+ const fs = __importStar(require("fs"));
39
+ const journey_1 = require("../../harness/journey");
40
+ function findScreenDir(name) {
41
+ const candidates = [
42
+ path.join(process.cwd(), 'qa', 'screens', name),
43
+ path.join(process.cwd(), 'qa', 'flows', name),
44
+ path.join(process.cwd(), 'qa', 'api', name),
45
+ ];
46
+ for (const c of candidates)
47
+ if (fs.existsSync(c))
48
+ return c;
49
+ return null;
50
+ }
51
+ const PHASES = ['create', 'run', 'deliver'];
52
+ function registerGateCommand(program) {
53
+ program
54
+ .command('gate')
55
+ .description('Inter-phase HALT gate (#381): a phase boundary passes only when its required obligations are satisfied or explicitly waived. Exit 2 = HALT (no silent bad output crosses the boundary).')
56
+ .option('-s, --screen <name>', 'Screen / flow / api unit name')
57
+ .option('-p, --phase <phase>', `Phase boundary: ${PHASES.join(' | ')}`)
58
+ .option('--json', 'Output the raw verdict')
59
+ .action((options) => {
60
+ try {
61
+ const name = options.screen;
62
+ if (!name)
63
+ throw new Error('Provide --screen <name>');
64
+ const phase = options.phase;
65
+ if (!PHASES.includes(phase))
66
+ throw new Error(`Provide --phase <${PHASES.join('|')}>`);
67
+ if (!findScreenDir(name))
68
+ throw new Error(`Not found: qa/screens/${name}, qa/flows/${name}, or qa/api/${name}`);
69
+ const verdict = (0, journey_1.runGate)(process.cwd(), name, phase);
70
+ if (options.json)
71
+ console.log(JSON.stringify(verdict, null, 2));
72
+ else
73
+ console.log((0, journey_1.renderGate)(verdict));
74
+ // Exit 2 on HALT — usable in CI / the orchestration loop to block the next phase.
75
+ process.exit(verdict.status === 'halt' ? 2 : 0);
76
+ }
77
+ catch (error) {
78
+ console.error('Error:', error instanceof Error ? error.message : error);
79
+ process.exit(1);
80
+ }
81
+ });
82
+ }
83
+ //# sourceMappingURL=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C,yBAAyB,CAAC,CAAC;YACtD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAkB,CAAC;YACzC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACtF,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;gBAAE,MAAM,IAAI,KAAK,CAAC,yBAAyB,IAAI,cAAc,IAAI,eAAe,IAAI,EAAE,CAAC,CAAC;YAEhH,MAAM,OAAO,GAAG,IAAA,iBAAO,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;YACpD,IAAI,OAAO,CAAC,IAAI;gBAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;;gBAC3D,OAAO,CAAC,GAAG,CAAC,IAAA,oBAAU,EAAC,OAAO,CAAC,CAAC,CAAC;YAEtC,kFAAkF;YAClF,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YACxE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
package/dist/cli/index.js CHANGED
@@ -18,6 +18,7 @@ const dashboard_1 = require("./commands/dashboard");
18
18
  const audit_1 = require("./commands/audit");
19
19
  const depth_lint_1 = require("./commands/depth-lint");
20
20
  const journey_1 = require("./commands/journey");
21
+ const gate_1 = require("./commands/gate");
21
22
  const ingest_1 = require("./commands/ingest");
22
23
  const eval_1 = require("./commands/eval");
23
24
  const manifest_1 = require("./commands/manifest");
@@ -57,6 +58,7 @@ async function main() {
57
58
  (0, audit_1.registerAuditCommand)(program);
58
59
  (0, depth_lint_1.registerDepthLintCommand)(program);
59
60
  (0, journey_1.registerJourneyCommand)(program);
61
+ (0, gate_1.registerGateCommand)(program);
60
62
  (0, manifest_1.registerManifestCommand)(program);
61
63
  (0, ledger_1.registerLedgerCommand)(program);
62
64
  (0, feedback_1.registerFeedbackCommand)(program);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;AACA;;;GAGG;;AAEH,yCAAoC;AACpC,0CAAsD;AACtD,wCAAoD;AACpD,kDAA8D;AAC9D,kDAA8D;AAC9D,8CAA0D;AAC1D,kDAA8D;AAC9D,4CAAwD;AACxD,kDAA6D;AAC7D,oDAAgE;AAChE,4CAAwD;AACxD,sDAAiE;AACjE,gDAA4D;AAC5D,8CAA0D;AAC1D,0CAAsD;AACtD,kDAA8D;AAC9D,8CAA0D;AAC1D,kDAA8D;AAC9D,0DAAqE;AACrE,4CAAwD;AACxD,oDAAgE;AAChE,oDAAgE;AAChE,sDAAkE;AAClE,sDAAiE;AACjE,gDAA4D;AAC5D,8CAA0D;AAC1D,uDAA8D;AAC9D,uDAA2E;AAE3E,wFAAwF;AACxF,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,oBAAoB,CAAwB,CAAC;AAEzE,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;IAE9B,OAAO;SACJ,IAAI,CAAC,QAAQ,CAAC;SACd,WAAW,CAAC,oEAAoE,CAAC;SACjF,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpB,iBAAiB;IACjB,OAAO;SACJ,MAAM,CAAC,eAAe,EAAE,wBAAwB,CAAC,CAAC;IAErD,o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E7B,6FAA6F;IAC7F,iFAAiF;IACjF,IAAA,0CAA+B,GAAE,CAAC;IAClC,KAAK,MAAM,GAAG,IAAI,6BAAkB,CAAC,GAAG,EAAE,EAAE,CAAC;QAC3C,KAAK,MAAM,eAAe,IAAI,GAAG,CAAC,WAAW,IAAI,EAAE;YAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAChF,CAAC;IAED,MAAM,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -31,4 +31,22 @@ export declare function runJourney(projectRoot: string, unit: string): JourneyRe
31
31
  */
32
32
  export declare function waive(projectRoot: string, unit: string, obId: string, reason: string): JourneyReport;
33
33
  export declare function renderJourneyBoard(r: JourneyReport): string;
34
+ export type GatePhase = 'create' | 'run' | 'deliver';
35
+ export interface GateVerdict {
36
+ unit: string;
37
+ phase: GatePhase;
38
+ status: 'pass' | 'halt';
39
+ required: string[];
40
+ blockers: {
41
+ id: string;
42
+ title: string;
43
+ detail: string;
44
+ }[];
45
+ waivedCredit: {
46
+ id: string;
47
+ title: string;
48
+ }[];
49
+ }
50
+ export declare function runGate(projectRoot: string, unit: string, phase: GatePhase): GateVerdict;
51
+ export declare function renderGate(v: GateVerdict): string;
34
52
  //# sourceMappingURL=journey.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey.d.ts","sourceRoot":"","sources":["../../src/harness/journey.ts"],"names":[],"mappings":"AAmBA,MAAM,MAAM,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEzE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,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ineProperty(exports, "__esModule", { value: true });
36
36
  exports.runJourney = runJourney;
37
37
  exports.waive = waive;
38
38
  exports.renderJourneyBoard = renderJourneyBoard;
39
+ exports.runGate = runGate;
40
+ exports.renderGate = renderGate;
39
41
  /**
40
42
  * Journey board (epic #381, story S1) — the durable, read-only "you are here" view.
41
43
  *
@@ -248,4 +250,38 @@ function renderJourneyBoard(r) {
248
250
  L.push('');
249
251
  return L.join('\n');
250
252
  }
253
+ const PHASE_REQUIRED = {
254
+ // post-create (design quality): spec + coverage + depth + traceability must hold.
255
+ create: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace'],
256
+ // post-run: the design gates + automation coverage.
257
+ run: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace', 'OB-automation'],
258
+ // pre-delivery: everything automated (human sign-off is the separate S5 gate).
259
+ deliver: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace', 'OB-automation'],
260
+ };
261
+ function runGate(projectRoot, unit, phase) {
262
+ const r = runJourney(projectRoot, unit);
263
+ const required = PHASE_REQUIRED[phase];
264
+ const reqObs = r.obligations.filter((o) => required.includes(o.id));
265
+ const blockers = reqObs
266
+ .filter((o) => o.status !== 'satisfied' && o.status !== 'waived')
267
+ .map((o) => ({ id: o.id, title: o.title, detail: o.detail }));
268
+ const waivedCredit = reqObs.filter((o) => o.status === 'waived').map((o) => ({ id: o.id, title: o.title }));
269
+ return { unit, phase, status: blockers.length ? 'halt' : 'pass', required, blockers, waivedCredit };
270
+ }
271
+ function renderGate(v) {
272
+ const L = [];
273
+ L.push('');
274
+ L.push(`━━━ Gate: ${v.unit} @ phase "${v.phase}" → ${v.status === 'pass' ? '✅ PASS' : '⛔ HALT'} ━━━`);
275
+ if (v.blockers.length) {
276
+ L.push(' Blocking obligations (must be satisfied or explicitly waived):');
277
+ for (const b of v.blockers)
278
+ L.push(` • ${b.id} ${b.title} — ${b.detail}`);
279
+ L.push(' → Self-correct (repair / run-test), or `sungen journey --screen ' + v.unit + ' --waive <OB> --reason "..."` if accepted.');
280
+ }
281
+ else {
282
+ L.push(' All required obligations satisfied' + (v.waivedCredit.length ? ` (${v.waivedCredit.length} accepted via waiver)` : '') + '.');
283
+ }
284
+ L.push('');
285
+ return L.join('\n');
286
+ }
251
287
  //# sourceMappingURL=journey.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey.js","sourceRoot":"","sources":["../../src/harness/journey.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwKA,gCAqBC;AAMD,sBAeC;AAID,gDAkBC;AAxOD;;;;;;;;;;;;;GAaG;AACH,uCAAyB;AACzB,2CAA6B;AAC7B,+CAAiC;AACjC,6CAA0C;AAwB1C,SAAS,QAAQ,CAAC,CAAS;IACzB,IAAI,CAAC;QAAC,OAAO,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC;QAAC,OAAO,IAAI,CAAC;IAAC,CAAC;AAC1G,CAAC;AAED,SAAS,gBAAgB,CAAC,CAAS;IACjC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3D,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YAAE,SAAS;QAC3B,IAAI,CAAC;YAAC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAAC,IAAI,CAAC,CAAC,IAAI;gBAAE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CA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AAC;AAED,SAAgB,UAAU,CAAC,CAAc;IACvC,MAAM,CAAC,GAAa,EAAE,CAAC;IACvB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACX,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,IAAI,aAAa,CAAC,CAAC,KAAK,OAAO,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC;IACtG,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;QACtB,CAAC,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;QAC3E,KAAK,MAAM,CAAC,IAAI,CAAC,CAAC,QAAQ;YAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;QAC5E,CAAC,CAAC,IAAI,CAAC,oEAAoE,GAAG,CAAC,CAAC,IAAI,GAAG,4CAA4C,CAAC,CAAC;IACvI,CAAC;SAAM,CAAC;QACN,CAAC,CAAC,IAAI,CAAC,sCAAsC,GAAG,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,MAAM,uBAAuB,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,CAAC;IAC1I,CAAC;IACD,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACX,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtB,CAAC"}
@@ -105,6 +105,7 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
105
105
  - **BALANCE** → stop expanding secondary viewpoints; add business-core scenarios first.
106
106
  - **TRACE** → align `VP-` ids with the viewpoint-overview.
107
107
  - Stop when the gate PASSes and findings clear, **or** the budget is exhausted → report residual gaps honestly (never fake a pass).
108
+ - **Phase gate (boundary — do NOT skip).** Run `sungen gate --screen <name> --phase create` (Bash, exit 2 = HALT). It is the deterministic create-boundary: every required obligation (spec · coverage · depth · trace) must be **satisfied or explicitly waived**. On **HALT**, you have not cleared the phase — keep repairing the blocking obligation(s) within budget; if a blocker is a genuinely-accepted gap (e.g. cross-screen depth owned by a flow), record it with `sungen journey --screen <name> --waive <OB> --reason "..."` (reason mandatory). **Do not converge (step 6) past a HALT** without a fix or a reasoned waiver — no bad output crosses the boundary.
108
109
 
109
110
  5.6. **Record (reuse + observability).** Build the manifest and report usage:
110
111
  - `sungen manifest --screen <name>` — fingerprints for next-run change detection. On a **re-run**, start the whole command by `sungen manifest --screen <name> --diff` and only regenerate scenarios whose spec section changed (keep/regenerate/retire).
@@ -104,6 +104,7 @@ If the unit is **api-first**, skip every selector/capture phase (an API test has
104
104
  9. **Integrity check & trace (always run after the final run).**
105
105
  - `sungen script-check --screen <name>` — verify the generated spec is a **1:1** of the Gherkin (every non-@manual scenario ↔ one `test()`, no drift). If it reports **DRIFT** (spec hand-edited or stale), re-run `sungen generate --screen <name>` so the spec matches the feature, then re-run — **never hand-edit the generated spec** (auto-fix must edit `selectors.yaml`, not the `.spec.ts`).
106
106
  - `sungen ledger record --screen <name> --step run --ms <elapsed>` (record this run), then `sungen trace --screen <name>` — show the process map + bottlenecks + **HUMAN-LOOP FOCUS** (the @manual scenarios the QA must verify) to the user.
107
+ - **Phase gate (boundary — do NOT skip).** `sungen gate --screen <name> --phase run` (exit 2 = HALT): the run-boundary obligations (incl. automation) must be **satisfied or explicitly waived**. On **HALT**, classify per `sungen-error-mapping` § Source of truth (#387): a **selector-resolution** failure → fix `selectors.yaml` + re-run; an **assertion-vs-spec** failure → **report it as a candidate bug / leave it FAIL** (never weaken the assertion or edit the expected to pass); a genuinely-accepted gap → `sungen journey --screen <name> --waive <OB> --reason "..."`. Do **not** declare the run "done" past a HALT without a fix, a reported bug, or a reasoned waiver.
107
108
  10. **Capability-pending offer (consent-gated).** If `sungen audit --screen <name>` reports `AUTOMATION-READY-PENDING` (or the run shows `@requires:<cap>` tests skipped "requires …"), these are **automation-ready** scenarios waiting on an opt-in driver. Use `AskUserQuestion` to offer: *"N scenario(s) are automation-ready — enable `<cap>` to run them? (`sungen capability add <cap>`)"*. **Only on the user's yes** run `sungen capability add <cap>` then re-run those specs; on no, leave them skipped (they are NOT failures and NOT manual). **Never auto-install.**
108
109
 
109
110
  ## Playwright command guidelines
@@ -68,6 +68,7 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
68
68
  > **No parallel fan-out here.** Copilot has no sub-agents, so generation is sequential (the Claude Code variant fans out one `sungen-generator` per viewpoint group and merges). Same output, no speedup.
69
69
  5.4. **Depth self-check (deterministic — BEFORE the audit).** Run `sungen depth-lint --screen ${input:name}`. It splits every shallow business-critical scenario into **DEEPEN IN PLACE** (add a real value assertion — the printed `template` is a theme-keyed hint, apply judgment to the actual claim; never fake one onto a visibility/behavior scenario) and **CROSS-SCREEN** (route to a flow / tag `@manual:Mx` + reason — removes it from the depth denominator honestly). Act on both, re-run until `deepen` is empty (or only honest over-counts remain), THEN gate. Lifts first-pass `businessDepth` mechanically instead of via 2–3 repair rounds.
70
70
  5.5. **Quality gate & repair (harness — always run).** Per `sungen-harness-audit`: run `sungen audit --screen ${input:name}` (structural), THEN do an **independent semantic review inline** using the `sungen-reviewer` criteria (does each scenario's steps PROVE its title/viewpoint? observable Thens? business-critical assertion depth?). Merge both sets of issues; if gate FAILs / findings exist, repair (budget 3) and re-audit — GATE missing theme → generate it (cross-screen → **automate it in the flow** via `/sungen:add-flow`, NOT a full `@manual` screen duplicate — `sungen audit` flags an automatable `@manual` as `MANUAL-AUTOMATABLE`; reserve `@manual:Mx` for true judgment/missing-capability); DEPTH → add data assertions; BALANCE → add business-core first; TRACE → align VP ids. Never fake a pass.
71
+ 5.5b. **Phase gate (boundary — do NOT skip).** Run `sungen gate --screen ${input:name} --phase create` (exit 2 = HALT): every required obligation (spec · coverage · depth · trace) must be **satisfied or explicitly waived**. On **HALT**, keep repairing within budget; a genuinely-accepted gap → `sungen journey --screen ${input:name} --waive <OB> --reason "..."` (reason mandatory). Do **not** converge (step 6) past a HALT without a fix or a reasoned waiver.
71
72
  5.6. **Record.** `sungen manifest --screen ${input:name}`. Ledger **each phase** (not just repair) — pick one `runId` at the start and pass it so `trace`/`ledger report` show THIS run, not a mix: `sungen ledger record --screen ${input:name} --run <runId> --step <discovery|viewpoint|gherkin|audit|repair:N> --ms <elapsed>`. On re-run, start with `sungen manifest --screen ${input:name} --diff` and only regenerate changed sections.
72
73
  6. **Converge — show the trace.** Run `sungen trace --screen ${input:name}` and present: process map (phases + repair rounds), bottlenecks, **HUMAN-LOOP FOCUS** (@manual to verify), audit score + gate + residual gaps. Then offer next steps based on which tier was just generated:
73
74
 
@@ -95,6 +95,7 @@ If the unit is **api-first**, skip every selector/capture phase (an API test has
95
95
  7. **Phase 3 — Full Run**: Run all tests. Fix only **new** failures (elements unique to `@normal`/`@low`). Max 1 attempt. Don't loop on low-priority failures.
96
96
  8. **Phase 4 — Regression**: One final full run. Report results. No more fix loops.
97
97
  9. **Integrity & trace (always run after the final run).** `sungen script-check --screen <name>` — verify the spec is a **1:1** of the Gherkin; if **DRIFT**, re-run `sungen generate --screen <name>` (never hand-edit the `.spec.ts` — auto-fix edits `selectors.yaml`). Then `sungen ledger record --screen <name> --step run --ms <elapsed>` and `sungen trace --screen <name>` to show the process map + bottlenecks + **HUMAN-LOOP FOCUS**.
98
+ 9b. **Phase gate (boundary — do NOT skip).** `sungen gate --screen <name> --phase run` (exit 2 = HALT): run-boundary obligations (incl. automation) must be **satisfied or explicitly waived**. On HALT, classify per `sungen-error-mapping` § Source of truth (#387): selector-resolution failure → fix `selectors.yaml` + re-run; assertion-vs-spec failure → **report as a candidate bug / leave it FAIL** (never weaken to pass); accepted gap → `sungen journey --screen <name> --waive <OB> --reason "..."`. Don't declare "done" past a HALT without a fix, a reported bug, or a reasoned waiver.
98
99
  10. **Capability-pending offer (consent-gated).** If `sungen audit` reports `AUTOMATION-READY-PENDING` (or `@requires:<cap>` tests are skipped "requires …"), offer: *"N scenario(s) are automation-ready — enable `<cap>` to run them? (`sungen capability add <cap>`)"*. Only on the user's yes, run `sungen capability add <cap>` + re-run; on no, leave skipped (not failures, not manual). **Never auto-install.**
99
100
 
100
101
  ## Playwright command guidelines
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sun-asterisk/sungen",
3
- "version": "3.2.2-beta.7",
3
+ "version": "3.2.2-beta.9",
4
4
  "description": "Deterministic E2E Test Compiler - Gherkin + Selectors → Playwright tests",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -33,7 +33,7 @@
33
33
  "node": ">=18.0.0"
34
34
  },
35
35
  "dependencies": {
36
- "@sungen/driver-ui": "3.2.2-beta.7",
36
+ "@sungen/driver-ui": "3.2.2-beta.9",
37
37
  "@anthropic-ai/sdk": "^0.71.0",
38
38
  "@babel/parser": "^7.28.5",
39
39
  "@babel/traverse": "^7.28.5",
@@ -0,0 +1,44 @@
1
+ import { Command } from 'commander';
2
+ import * as path from 'path';
3
+ import * as fs from 'fs';
4
+ import { runGate, renderGate, GatePhase } from '../../harness/journey';
5
+
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
+
16
+ const PHASES: GatePhase[] = ['create', 'run', 'deliver'];
17
+
18
+ export function registerGateCommand(program: Command): void {
19
+ program
20
+ .command('gate')
21
+ .description('Inter-phase HALT gate (#381): a phase boundary passes only when its required obligations are satisfied or explicitly waived. Exit 2 = HALT (no silent bad output crosses the boundary).')
22
+ .option('-s, --screen <name>', 'Screen / flow / api unit name')
23
+ .option('-p, --phase <phase>', `Phase boundary: ${PHASES.join(' | ')}`)
24
+ .option('--json', 'Output the raw verdict')
25
+ .action((options) => {
26
+ try {
27
+ const name = options.screen;
28
+ if (!name) throw new Error('Provide --screen <name>');
29
+ const phase = options.phase as GatePhase;
30
+ 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}`);
32
+
33
+ const verdict = runGate(process.cwd(), name, phase);
34
+ if (options.json) console.log(JSON.stringify(verdict, null, 2));
35
+ else console.log(renderGate(verdict));
36
+
37
+ // Exit 2 on HALT — usable in CI / the orchestration loop to block the next phase.
38
+ process.exit(verdict.status === 'halt' ? 2 : 0);
39
+ } catch (error) {
40
+ console.error('Error:', error instanceof Error ? error.message : error);
41
+ process.exit(1);
42
+ }
43
+ });
44
+ }
package/src/cli/index.ts CHANGED
@@ -17,6 +17,7 @@ import { registerDashboardCommand } from './commands/dashboard';
17
17
  import { registerAuditCommand } from './commands/audit';
18
18
  import { registerDepthLintCommand } from './commands/depth-lint';
19
19
  import { registerJourneyCommand } from './commands/journey';
20
+ import { registerGateCommand } from './commands/gate';
20
21
  import { registerIngestCommand } from './commands/ingest';
21
22
  import { registerEvalCommand } from './commands/eval';
22
23
  import { registerManifestCommand } from './commands/manifest';
@@ -61,6 +62,7 @@ async function main() {
61
62
  registerAuditCommand(program);
62
63
  registerDepthLintCommand(program);
63
64
  registerJourneyCommand(program);
65
+ registerGateCommand(program);
64
66
  registerManifestCommand(program);
65
67
  registerLedgerCommand(program);
66
68
  registerFeedbackCommand(program);
@@ -231,3 +231,56 @@ export function renderJourneyBoard(r: JourneyReport): string {
231
231
  L.push('');
232
232
  return L.join('\n');
233
233
  }
234
+
235
+ // ---------------- S3: inter-phase gate — obligations as HALT predicates (#398) ----------------
236
+ //
237
+ // A phase boundary is a deterministic gate: before the next phase may run, this phase's required
238
+ // obligations must each be `satisfied` OR `waived` (S2 — an explicit, reasoned human acceptance).
239
+ // A required obligation still `needs-work`/`pending` is a BLOCKER → HALT (no silent bad output
240
+ // crosses the boundary, §9). Reuses runJourney → obligations already reflect waivers/reconcile.
241
+
242
+ export type GatePhase = 'create' | 'run' | 'deliver';
243
+
244
+ export interface GateVerdict {
245
+ unit: string;
246
+ phase: GatePhase;
247
+ status: 'pass' | 'halt';
248
+ required: string[];
249
+ blockers: { id: string; title: string; detail: string }[];
250
+ waivedCredit: { id: string; title: string }[]; // required obligations accepted via an explicit waiver
251
+ }
252
+
253
+ const PHASE_REQUIRED: Record<GatePhase, string[]> = {
254
+ // post-create (design quality): spec + coverage + depth + traceability must hold.
255
+ create: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace'],
256
+ // post-run: the design gates + automation coverage.
257
+ run: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace', 'OB-automation'],
258
+ // pre-delivery: everything automated (human sign-off is the separate S5 gate).
259
+ deliver: ['OB-spec', 'OB-coverage', 'OB-depth', 'OB-trace', 'OB-automation'],
260
+ };
261
+
262
+ export function runGate(projectRoot: string, unit: string, phase: GatePhase): GateVerdict {
263
+ const r = runJourney(projectRoot, unit);
264
+ const required = PHASE_REQUIRED[phase];
265
+ const reqObs = r.obligations.filter((o) => required.includes(o.id));
266
+ const blockers = reqObs
267
+ .filter((o) => o.status !== 'satisfied' && o.status !== 'waived')
268
+ .map((o) => ({ id: o.id, title: o.title, detail: o.detail }));
269
+ const waivedCredit = reqObs.filter((o) => o.status === 'waived').map((o) => ({ id: o.id, title: o.title }));
270
+ return { unit, phase, status: blockers.length ? 'halt' : 'pass', required, blockers, waivedCredit };
271
+ }
272
+
273
+ export function renderGate(v: GateVerdict): string {
274
+ const L: string[] = [];
275
+ L.push('');
276
+ L.push(`━━━ Gate: ${v.unit} @ phase "${v.phase}" → ${v.status === 'pass' ? '✅ PASS' : '⛔ HALT'} ━━━`);
277
+ if (v.blockers.length) {
278
+ L.push(' Blocking obligations (must be satisfied or explicitly waived):');
279
+ for (const b of v.blockers) L.push(` • ${b.id} ${b.title} — ${b.detail}`);
280
+ L.push(' → Self-correct (repair / run-test), or `sungen journey --screen ' + v.unit + ' --waive <OB> --reason "..."` if accepted.');
281
+ } else {
282
+ L.push(' All required obligations satisfied' + (v.waivedCredit.length ? ` (${v.waivedCredit.length} accepted via waiver)` : '') + '.');
283
+ }
284
+ L.push('');
285
+ return L.join('\n');
286
+ }
@@ -105,6 +105,7 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
105
105
  - **BALANCE** → stop expanding secondary viewpoints; add business-core scenarios first.
106
106
  - **TRACE** → align `VP-` ids with the viewpoint-overview.
107
107
  - Stop when the gate PASSes and findings clear, **or** the budget is exhausted → report residual gaps honestly (never fake a pass).
108
+ - **Phase gate (boundary — do NOT skip).** Run `sungen gate --screen <name> --phase create` (Bash, exit 2 = HALT). It is the deterministic create-boundary: every required obligation (spec · coverage · depth · trace) must be **satisfied or explicitly waived**. On **HALT**, you have not cleared the phase — keep repairing the blocking obligation(s) within budget; if a blocker is a genuinely-accepted gap (e.g. cross-screen depth owned by a flow), record it with `sungen journey --screen <name> --waive <OB> --reason "..."` (reason mandatory). **Do not converge (step 6) past a HALT** without a fix or a reasoned waiver — no bad output crosses the boundary.
108
109
 
109
110
  5.6. **Record (reuse + observability).** Build the manifest and report usage:
110
111
  - `sungen manifest --screen <name>` — fingerprints for next-run change detection. On a **re-run**, start the whole command by `sungen manifest --screen <name> --diff` and only regenerate scenarios whose spec section changed (keep/regenerate/retire).
@@ -104,6 +104,7 @@ If the unit is **api-first**, skip every selector/capture phase (an API test has
104
104
  9. **Integrity check & trace (always run after the final run).**
105
105
  - `sungen script-check --screen <name>` — verify the generated spec is a **1:1** of the Gherkin (every non-@manual scenario ↔ one `test()`, no drift). If it reports **DRIFT** (spec hand-edited or stale), re-run `sungen generate --screen <name>` so the spec matches the feature, then re-run — **never hand-edit the generated spec** (auto-fix must edit `selectors.yaml`, not the `.spec.ts`).
106
106
  - `sungen ledger record --screen <name> --step run --ms <elapsed>` (record this run), then `sungen trace --screen <name>` — show the process map + bottlenecks + **HUMAN-LOOP FOCUS** (the @manual scenarios the QA must verify) to the user.
107
+ - **Phase gate (boundary — do NOT skip).** `sungen gate --screen <name> --phase run` (exit 2 = HALT): the run-boundary obligations (incl. automation) must be **satisfied or explicitly waived**. On **HALT**, classify per `sungen-error-mapping` § Source of truth (#387): a **selector-resolution** failure → fix `selectors.yaml` + re-run; an **assertion-vs-spec** failure → **report it as a candidate bug / leave it FAIL** (never weaken the assertion or edit the expected to pass); a genuinely-accepted gap → `sungen journey --screen <name> --waive <OB> --reason "..."`. Do **not** declare the run "done" past a HALT without a fix, a reported bug, or a reasoned waiver.
107
108
  10. **Capability-pending offer (consent-gated).** If `sungen audit --screen <name>` reports `AUTOMATION-READY-PENDING` (or the run shows `@requires:<cap>` tests skipped "requires …"), these are **automation-ready** scenarios waiting on an opt-in driver. Use `AskUserQuestion` to offer: *"N scenario(s) are automation-ready — enable `<cap>` to run them? (`sungen capability add <cap>`)"*. **Only on the user's yes** run `sungen capability add <cap>` then re-run those specs; on no, leave them skipped (they are NOT failures and NOT manual). **Never auto-install.**
108
109
 
109
110
  ## Playwright command guidelines
@@ -68,6 +68,7 @@ If the unit is **api-first** (`qa/api/<name>/` or `qa/api/flows/<name>/`), the d
68
68
  > **No parallel fan-out here.** Copilot has no sub-agents, so generation is sequential (the Claude Code variant fans out one `sungen-generator` per viewpoint group and merges). Same output, no speedup.
69
69
  5.4. **Depth self-check (deterministic — BEFORE the audit).** Run `sungen depth-lint --screen ${input:name}`. It splits every shallow business-critical scenario into **DEEPEN IN PLACE** (add a real value assertion — the printed `template` is a theme-keyed hint, apply judgment to the actual claim; never fake one onto a visibility/behavior scenario) and **CROSS-SCREEN** (route to a flow / tag `@manual:Mx` + reason — removes it from the depth denominator honestly). Act on both, re-run until `deepen` is empty (or only honest over-counts remain), THEN gate. Lifts first-pass `businessDepth` mechanically instead of via 2–3 repair rounds.
70
70
  5.5. **Quality gate & repair (harness — always run).** Per `sungen-harness-audit`: run `sungen audit --screen ${input:name}` (structural), THEN do an **independent semantic review inline** using the `sungen-reviewer` criteria (does each scenario's steps PROVE its title/viewpoint? observable Thens? business-critical assertion depth?). Merge both sets of issues; if gate FAILs / findings exist, repair (budget 3) and re-audit — GATE missing theme → generate it (cross-screen → **automate it in the flow** via `/sungen:add-flow`, NOT a full `@manual` screen duplicate — `sungen audit` flags an automatable `@manual` as `MANUAL-AUTOMATABLE`; reserve `@manual:Mx` for true judgment/missing-capability); DEPTH → add data assertions; BALANCE → add business-core first; TRACE → align VP ids. Never fake a pass.
71
+ 5.5b. **Phase gate (boundary — do NOT skip).** Run `sungen gate --screen ${input:name} --phase create` (exit 2 = HALT): every required obligation (spec · coverage · depth · trace) must be **satisfied or explicitly waived**. On **HALT**, keep repairing within budget; a genuinely-accepted gap → `sungen journey --screen ${input:name} --waive <OB> --reason "..."` (reason mandatory). Do **not** converge (step 6) past a HALT without a fix or a reasoned waiver.
71
72
  5.6. **Record.** `sungen manifest --screen ${input:name}`. Ledger **each phase** (not just repair) — pick one `runId` at the start and pass it so `trace`/`ledger report` show THIS run, not a mix: `sungen ledger record --screen ${input:name} --run <runId> --step <discovery|viewpoint|gherkin|audit|repair:N> --ms <elapsed>`. On re-run, start with `sungen manifest --screen ${input:name} --diff` and only regenerate changed sections.
72
73
  6. **Converge — show the trace.** Run `sungen trace --screen ${input:name}` and present: process map (phases + repair rounds), bottlenecks, **HUMAN-LOOP FOCUS** (@manual to verify), audit score + gate + residual gaps. Then offer next steps based on which tier was just generated:
73
74
 
@@ -95,6 +95,7 @@ If the unit is **api-first**, skip every selector/capture phase (an API test has
95
95
  7. **Phase 3 — Full Run**: Run all tests. Fix only **new** failures (elements unique to `@normal`/`@low`). Max 1 attempt. Don't loop on low-priority failures.
96
96
  8. **Phase 4 — Regression**: One final full run. Report results. No more fix loops.
97
97
  9. **Integrity & trace (always run after the final run).** `sungen script-check --screen <name>` — verify the spec is a **1:1** of the Gherkin; if **DRIFT**, re-run `sungen generate --screen <name>` (never hand-edit the `.spec.ts` — auto-fix edits `selectors.yaml`). Then `sungen ledger record --screen <name> --step run --ms <elapsed>` and `sungen trace --screen <name>` to show the process map + bottlenecks + **HUMAN-LOOP FOCUS**.
98
+ 9b. **Phase gate (boundary — do NOT skip).** `sungen gate --screen <name> --phase run` (exit 2 = HALT): run-boundary obligations (incl. automation) must be **satisfied or explicitly waived**. On HALT, classify per `sungen-error-mapping` § Source of truth (#387): selector-resolution failure → fix `selectors.yaml` + re-run; assertion-vs-spec failure → **report as a candidate bug / leave it FAIL** (never weaken to pass); accepted gap → `sungen journey --screen <name> --waive <OB> --reason "..."`. Don't declare "done" past a HALT without a fix, a reported bug, or a reasoned waiver.
98
99
  10. **Capability-pending offer (consent-gated).** If `sungen audit` reports `AUTOMATION-READY-PENDING` (or `@requires:<cap>` tests are skipped "requires …"), offer: *"N scenario(s) are automation-ready — enable `<cap>` to run them? (`sungen capability add <cap>`)"*. Only on the user's yes, run `sungen capability add <cap>` + re-run; on no, leave skipped (not failures, not manual). **Never auto-install.**
99
100
 
100
101
  ## Playwright command guidelines