@deftai/directive 0.62.0 → 0.63.0

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 (97) hide show
  1. package/dist/{branch-parity.d.ts → branch-fixtures.d.ts} +1 -3
  2. package/dist/{branch-parity.js → branch-fixtures.js} +3 -110
  3. package/dist/dispatch.d.ts +1 -1
  4. package/dist/dispatch.js +0 -1
  5. package/dist/orchestration-cli/coverage-map.js +1 -1
  6. package/dist/{policy-parity.d.ts → policy-fixtures.d.ts} +1 -3
  7. package/dist/{policy-parity.js → policy-fixtures.js} +4 -100
  8. package/dist/{release-e2e-parity.d.ts → release-e2e-fixtures.d.ts} +1 -3
  9. package/dist/release-e2e-fixtures.js +38 -0
  10. package/dist/{story-ready-parity.d.ts → story-ready-fixtures.d.ts} +1 -3
  11. package/dist/{story-ready-parity.js → story-ready-fixtures.js} +4 -121
  12. package/dist/{triage-aux-a-parity.d.ts → triage-aux-a-fixtures.d.ts} +1 -3
  13. package/dist/{triage-aux-a-parity.js → triage-aux-a-fixtures.js} +3 -73
  14. package/dist/{triage-aux-b-parity.d.ts → triage-aux-b-fixtures.d.ts} +1 -3
  15. package/dist/triage-aux-b-fixtures.js +167 -0
  16. package/dist/{triage-bootstrap-parity.d.ts → triage-bootstrap-fixtures.d.ts} +1 -3
  17. package/dist/{triage-bootstrap-parity.js → triage-bootstrap-fixtures.js} +4 -91
  18. package/dist/{triage-classify-parity.d.ts → triage-classify-fixtures.d.ts} +1 -3
  19. package/dist/{triage-classify-parity.js → triage-classify-fixtures.js} +4 -94
  20. package/dist/{triage-queue-parity.d.ts → triage-queue-fixtures.d.ts} +1 -3
  21. package/dist/{triage-queue-parity.js → triage-queue-fixtures.js} +4 -86
  22. package/dist/{triage-scope-parity.d.ts → triage-scope-fixtures.d.ts} +1 -3
  23. package/dist/{triage-scope-parity.js → triage-scope-fixtures.js} +4 -91
  24. package/dist/{vbrief-preflight-parity.d.ts → vbrief-preflight-fixtures.d.ts} +1 -3
  25. package/dist/vbrief-preflight-fixtures.js +79 -0
  26. package/dist/{wip-cap-parity.d.ts → wip-cap-fixtures.d.ts} +1 -3
  27. package/dist/{wip-cap-parity.js → wip-cap-fixtures.js} +4 -91
  28. package/package.json +4 -15
  29. package/dist/cache-parity.d.ts +0 -36
  30. package/dist/cache-parity.js +0 -165
  31. package/dist/codebase-parity.d.ts +0 -31
  32. package/dist/codebase-parity.js +0 -303
  33. package/dist/doc-cli-parity.d.ts +0 -29
  34. package/dist/doc-cli-parity.js +0 -159
  35. package/dist/doctor-parity.d.ts +0 -42
  36. package/dist/doctor-parity.js +0 -157
  37. package/dist/intake-parity.d.ts +0 -30
  38. package/dist/intake-parity.js +0 -203
  39. package/dist/lifecycle-packs-parity.d.ts +0 -30
  40. package/dist/lifecycle-packs-parity.js +0 -377
  41. package/dist/orchestration-parity.d.ts +0 -38
  42. package/dist/orchestration-parity.js +0 -364
  43. package/dist/parity.d.ts +0 -36
  44. package/dist/parity.js +0 -176
  45. package/dist/platform-parity.d.ts +0 -26
  46. package/dist/platform-parity.js +0 -309
  47. package/dist/pr-closing-keywords-parity.d.ts +0 -45
  48. package/dist/pr-closing-keywords-parity.js +0 -259
  49. package/dist/pr-merge-readiness-parity.d.ts +0 -44
  50. package/dist/pr-merge-readiness-parity.js +0 -296
  51. package/dist/pr-monitor-parity.d.ts +0 -44
  52. package/dist/pr-monitor-parity.js +0 -283
  53. package/dist/pr-protected-issues-parity.d.ts +0 -41
  54. package/dist/pr-protected-issues-parity.js +0 -220
  55. package/dist/pr-wait-mergeable-parity.d.ts +0 -45
  56. package/dist/pr-wait-mergeable-parity.js +0 -340
  57. package/dist/release-e2e-parity.js +0 -114
  58. package/dist/release-parity.d.ts +0 -40
  59. package/dist/release-parity.js +0 -226
  60. package/dist/release-publish-parity.d.ts +0 -36
  61. package/dist/release-publish-parity.js +0 -138
  62. package/dist/release-rollback-parity.d.ts +0 -37
  63. package/dist/release-rollback-parity.js +0 -161
  64. package/dist/render-parity.d.ts +0 -36
  65. package/dist/render-parity.js +0 -385
  66. package/dist/scm-parity.d.ts +0 -39
  67. package/dist/scm-parity.js +0 -181
  68. package/dist/scope-lifecycle-parity.d.ts +0 -35
  69. package/dist/scope-lifecycle-parity.js +0 -177
  70. package/dist/session-parity.d.ts +0 -39
  71. package/dist/session-parity.js +0 -262
  72. package/dist/slice-parity.d.ts +0 -36
  73. package/dist/slice-parity.js +0 -304
  74. package/dist/swarm-parity.d.ts +0 -28
  75. package/dist/swarm-parity.js +0 -327
  76. package/dist/triage-actions-parity.d.ts +0 -36
  77. package/dist/triage-actions-parity.js +0 -357
  78. package/dist/triage-aux-b-parity.js +0 -308
  79. package/dist/triage-summary-parity.d.ts +0 -50
  80. package/dist/triage-summary-parity.js +0 -306
  81. package/dist/validate-content-parity.d.ts +0 -33
  82. package/dist/validate-content-parity.js +0 -356
  83. package/dist/vbrief-activate-parity.d.ts +0 -39
  84. package/dist/vbrief-activate-parity.js +0 -216
  85. package/dist/vbrief-build-parity.d.ts +0 -28
  86. package/dist/vbrief-build-parity.js +0 -399
  87. package/dist/vbrief-preflight-parity.js +0 -163
  88. package/dist/vbrief-reconcile-parity.d.ts +0 -23
  89. package/dist/vbrief-reconcile-parity.js +0 -609
  90. package/dist/vbrief-validate-parity.d.ts +0 -27
  91. package/dist/vbrief-validate-parity.js +0 -122
  92. package/dist/vbrief-validation-parity.d.ts +0 -28
  93. package/dist/vbrief-validation-parity.js +0 -645
  94. package/dist/verify-env-parity.d.ts +0 -28
  95. package/dist/verify-env-parity.js +0 -272
  96. package/dist/verify-source-parity.d.ts +0 -26
  97. package/dist/verify-source-parity.js +0 -178
@@ -1,122 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Golden-output parity harness (#1782 s3): runs BOTH the Python oracles
4
- * (scripts/vbrief_validate.py + scripts/verify_vbrief_conformance.py) and
5
- * the ported TS vbrief-validate CLI over the repository vbrief/ tree, then
6
- * diffs exit codes and byte-identical stdout/stderr (cache-off).
7
- *
8
- * Exit codes: 0 parity / 1 divergence / 2 harness setup error.
9
- */
10
- import { spawnSync } from "node:child_process";
11
- import { dirname, join, resolve } from "node:path";
12
- import { fileURLToPath } from "node:url";
13
- function runCapture(cmd, args, cwd, env) {
14
- const result = spawnSync(cmd, args, {
15
- cwd,
16
- encoding: "utf8",
17
- env: { ...process.env, ...env },
18
- stdio: ["ignore", "pipe", "pipe"],
19
- });
20
- return {
21
- status: result.status ?? 2,
22
- stdout: typeof result.stdout === "string" ? result.stdout : "",
23
- stderr: typeof result.stderr === "string" ? result.stderr : "",
24
- };
25
- }
26
- function resolveDeftRoot() {
27
- if (process.env.DEFT_ROOT !== undefined && process.env.DEFT_ROOT.length > 0) {
28
- return resolve(process.env.DEFT_ROOT);
29
- }
30
- return resolve(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
31
- }
32
- function normaliseHarnessNoise(text) {
33
- return text
34
- .split("\n")
35
- .filter((line) => !line.startsWith("Using CPython") &&
36
- !line.startsWith("Creating virtual environment") &&
37
- !line.startsWith("Installed "))
38
- .join("\n");
39
- }
40
- export function diffGate(python, ts) {
41
- const pythonStdout = normaliseHarnessNoise(python.stdout);
42
- const tsStdout = normaliseHarnessNoise(ts.stdout);
43
- const pythonStderr = normaliseHarnessNoise(python.stderr);
44
- const tsStderr = normaliseHarnessNoise(ts.stderr);
45
- return {
46
- name: python.name,
47
- exitMismatch: python.exitCode !== ts.exitCode,
48
- stdoutMismatch: pythonStdout !== tsStdout,
49
- stderrMismatch: pythonStderr !== tsStderr,
50
- pythonExit: python.exitCode,
51
- tsExit: ts.exitCode,
52
- pythonStdout,
53
- tsStdout,
54
- pythonStderr,
55
- tsStderr,
56
- };
57
- }
58
- export function runParity(deftRoot = resolveDeftRoot()) {
59
- const envBase = {
60
- DEFT_CACHE_DISABLE: "1",
61
- PYTHONUTF8: "1",
62
- DEFT_ROOT: deftRoot,
63
- };
64
- const vbriefDir = join(deftRoot, "vbrief");
65
- const validatePy = runCapture("uv", ["run", "python", "scripts/vbrief_validate.py", "--vbrief-dir", vbriefDir], deftRoot, envBase);
66
- const validateTs = runCapture("node", [join(deftRoot, "packages", "cli", "dist", "vbrief-validate.js"), "--vbrief-dir", vbriefDir], deftRoot, envBase);
67
- const conformancePy = runCapture("uv", ["run", "python", "scripts/verify_vbrief_conformance.py", "--all", "--project-root", deftRoot], deftRoot, envBase);
68
- const conformanceTs = runCapture("node", [
69
- join(deftRoot, "packages", "cli", "dist", "vbrief-validate.js"),
70
- "conformance",
71
- "--all",
72
- "--project-root",
73
- deftRoot,
74
- ], deftRoot, envBase);
75
- const gates = [
76
- diffGate({ name: "vbrief_validate", ...validatePy, exitCode: validatePy.status }, { name: "vbrief_validate", ...validateTs, exitCode: validateTs.status }),
77
- diffGate({ name: "verify_vbrief_conformance", ...conformancePy, exitCode: conformancePy.status }, { name: "verify_vbrief_conformance", ...conformanceTs, exitCode: conformanceTs.status }),
78
- ];
79
- const ok = gates.every((g) => !g.exitMismatch && !g.stdoutMismatch && !g.stderrMismatch);
80
- return { ok, gates };
81
- }
82
- export function renderReport(result) {
83
- if (result.ok) {
84
- return "vbrief_validate parity: CLEAN -- Python and TS agree on validate + conformance over vbrief/.";
85
- }
86
- const lines = ["vbrief_validate parity: DIVERGENCE"];
87
- for (const g of result.gates) {
88
- if (g.exitMismatch || g.stdoutMismatch || g.stderrMismatch) {
89
- lines.push(` gate: ${g.name}`);
90
- if (g.exitMismatch) {
91
- lines.push(` exit mismatch: python=${g.pythonExit} ts=${g.tsExit}`);
92
- }
93
- if (g.stdoutMismatch) {
94
- lines.push(` stdout mismatch (python ${g.pythonStdout.length} vs ts ${g.tsStdout.length} bytes)`);
95
- lines.push(g.pythonStdout.slice(0, 400));
96
- lines.push("---");
97
- lines.push(g.tsStdout.slice(0, 400));
98
- }
99
- if (g.stderrMismatch) {
100
- lines.push(` stderr mismatch (python ${g.pythonStderr.length} vs ts ${g.tsStderr.length} bytes)`);
101
- }
102
- }
103
- }
104
- return lines.join("\n");
105
- }
106
- if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
107
- try {
108
- const result = runParity();
109
- if (result.ok) {
110
- process.stdout.write(`${renderReport(result)}\n`);
111
- process.exit(0);
112
- }
113
- process.stderr.write(`${renderReport(result)}\n`);
114
- process.exit(1);
115
- }
116
- catch (err) {
117
- const msg = String(err).replace(/\r?\n/g, " ");
118
- process.stderr.write(`vbrief_validate parity: harness error -- ${msg}\n`);
119
- process.exit(2);
120
- }
121
- }
122
- //# sourceMappingURL=vbrief-validate-parity.js.map
@@ -1,28 +0,0 @@
1
- #!/usr/bin/env node
2
- export interface ScenarioResult {
3
- readonly name: string;
4
- readonly exitCode: number;
5
- readonly stdout: string;
6
- readonly stderr: string;
7
- }
8
- export interface ParityResult {
9
- readonly ok: boolean;
10
- readonly scenarios: Array<{
11
- readonly name: string;
12
- readonly exitMismatch: boolean;
13
- readonly pythonExit: number;
14
- readonly tsExit: number;
15
- readonly outputMismatch: boolean;
16
- readonly pythonOutput: string;
17
- readonly tsOutput: string;
18
- }>;
19
- }
20
- export declare function diffParity(python: ScenarioResult, ts: ScenarioResult): {
21
- exitMismatch: boolean;
22
- outputMismatch: boolean;
23
- pythonOutput: string;
24
- tsOutput: string;
25
- };
26
- export declare function runParity(): ParityResult;
27
- export declare function renderReport(result: ParityResult): string;
28
- //# sourceMappingURL=vbrief-validation-parity.d.ts.map