@deftai/directive 0.117.0 → 0.118.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.
@@ -10,7 +10,7 @@ export interface DispatchIo {
10
10
  writeErr: (text: string) => void;
11
11
  }
12
12
  /** CLI modules in packages/cli/src (excluding parity harnesses and bin/index). */
13
- export declare const CLI_MODULE_VERBS: readonly ["agents-refresh", "cache", "check", "capacity-backfill", "capacity-show", "codebase-default-extractor", "codebase-map", "codebase-map-fresh", "codebase-projection-registry", "codebase-provider", "doctor", "install-upgrade", "install-uninstall", "migrate-preflight", "migrate-xbrief", "migrate-category-b", "framework-check-updates", "hook-dispatch", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "coverage-hotspots", "policy", "authz", "escalation-cli", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "pr-finish-loop", "directive-finish-loop", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "scope-lifecycle", "scope-record-approved-scope", "scm-sync-default", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "occupancy-steal", "occupancy-release", "occupancy-heartbeat", "occupancy-grant", "plan-sequence", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "triage-strip-withdrawn", "triage-evaluate", "triage-help", "triage-queue", "triage-reconcile", "triage-refresh", "triage-scope", "triage-scope-drift", "triage-smoketest", "triage-subscribe", "triage-summary", "triage-welcome", "ts-check-lane", "vbrief-activate", "vbrief-build", "vbrief-preflight", "vbrief-reconcile", "vbrief-validate", "vbrief-validation", "xbrief-create", "xbrief-verify", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "verify-scope-provenance", "verify-consumer-check-contract", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-biome-config", "verify-bridge-drift", "verify-capacity", "verify-contained-writes", "verify-telemetry-coverage", "verify-content-manifest", "verify-deposit-closure", "verify-consumer-hard-stops", "verify-closing-keywords", "verify-skill-external-fetch-gate", "verify-semantic-single-source", "verify-contract-drift", "verify-cursor-tier1", "verify-openclaw-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-plan-sequence", "verify-stubs", "verify-xbrief-drift", "verify-spec-prd-fresh", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "verify-subagent-steer", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-pr-closeout-attestable", "verify-lifecycle-visible", "verify-completed-tracked", "verify-completed-write-guard", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "eval-health", "eval-run", "eval-report", "eval-triggers"];
13
+ export declare const CLI_MODULE_VERBS: readonly ["agents-refresh", "cache", "check", "capacity-backfill", "capacity-show", "codebase-default-extractor", "codebase-map", "codebase-map-fresh", "codebase-projection-registry", "codebase-provider", "doctor", "install-upgrade", "install-uninstall", "migrate-preflight", "migrate-xbrief", "migrate-category-b", "framework-check-updates", "hook-dispatch", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "coverage-hotspots", "policy", "authz", "escalation-cli", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "pr-finish-loop", "directive-finish-loop", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "scope-lifecycle", "scope-record-approved-scope", "scm-sync-default", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "occupancy-steal", "occupancy-release", "occupancy-heartbeat", "occupancy-grant", "plan-sequence", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "triage-strip-withdrawn", "triage-evaluate", "triage-help", "triage-queue", "triage-reconcile", "triage-refresh", "triage-scope", "triage-scope-drift", "triage-smoketest", "triage-subscribe", "triage-summary", "triage-welcome", "ts-check-lane", "vbrief-activate", "vbrief-build", "vbrief-preflight", "vbrief-reconcile", "vbrief-validate", "vbrief-validation", "xbrief-create", "xbrief-verify", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "verify-scope-provenance", "verify-consumer-check-contract", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-biome-config", "verify-bridge-drift", "verify-capacity", "verify-contained-writes", "verify-telemetry-coverage", "verify-content-manifest", "verify-deposit-closure", "verify-consumer-hard-stops", "verify-closing-keywords", "verify-skill-external-fetch-gate", "verify-semantic-single-source", "verify-contract-drift", "verify-cursor-tier1", "verify-openclaw-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-plan-sequence", "verify-stubs", "verify-xbrief-drift", "verify-spec-prd-fresh", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "verify-subagent-steer", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-pr-closeout-attestable", "verify-lifecycle-visible", "verify-completed-tracked", "verify-completed-write-guard", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-agents-md-advisory", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "verify-evaluator-surface", "verify-consumer-test-lane", "eval-health", "eval-run", "eval-report", "eval-triggers"];
14
14
  /** Core-only CLI entrypoints without a packages/cli wrapper. */
15
15
  export declare const CORE_MODULE_VERBS: readonly ["scm", "scm-readiness", "github-auth-modes", "github-body", "issue-emit", "issue-ingest", "issue-sync-from-xbrief", "reconcile-issues", "swarm-launch", "swarm-complete-cohort", "swarm-finalize-cohort", "swarm-pre-dispatch", "swarm-readiness", "swarm-routing-verify", "swarm-routing-set", "swarm-verify-review-clean", "swarm-worktrees", "framework-commands", "pack-render", "packs-slice", "prd-render", "export-spec", "project-render", "roadmap-render", "rule-map", "spec-render", "spec-validate", "code-structure-validate", "pack-migrate-skills", "pack-migrate-rules", "pack-migrate-strategies", "pack-migrate-patterns", "pack-migrate-swarm-spec", "policy-set", "setup-ghx", "scope-undo", "scope-demote", "scope-decompose", "changelog-resolve-unreleased", "architecture-preflight-sor", "feedback-file", "value-readback", "product-signal", "freshness-report", "decision-write", "decision-list", "docs-impact"];
16
16
  /** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
package/dist/dispatch.js CHANGED
@@ -161,6 +161,8 @@ export const CLI_MODULE_VERBS = [
161
161
  "verify-agents-md-advisory",
162
162
  "verify-eval-health-relocation",
163
163
  "verify-eval-triggers-relocation",
164
+ "verify-evaluator-surface",
165
+ "verify-consumer-test-lane",
164
166
  "eval-health",
165
167
  "eval-run",
166
168
  "eval-report",
@@ -310,6 +312,8 @@ export const VERB_ALIASES = {
310
312
  "verify:agents-md-advisory": "verify-agents-md-advisory",
311
313
  "verify:eval-health-relocation": "verify-eval-health-relocation",
312
314
  "verify:eval-triggers-relocation": "verify-eval-triggers-relocation",
315
+ "verify:evaluator-surface": "verify-evaluator-surface",
316
+ "verify:consumer-test-lane": "verify-consumer-test-lane",
313
317
  "verify:hooks-installed": "verify-hooks-installed",
314
318
  "verify:no-task-runtime": "verify-no-task-runtime",
315
319
  "vbrief:validate": "vbrief-validate",
@@ -14,6 +14,7 @@ export function printUpdateHelp(io) {
14
14
  " --json Machine-readable summary on stdout\n" +
15
15
  " --yes, --non-interactive Run without prompts\n" +
16
16
  " --dry-run, --plan Classify and print the refresh plan without writing\n" +
17
+ " --allow-dirty-no-stage Apply on a dirty tree without automatic git add\n" +
17
18
  " -h, --help Show this help\n");
18
19
  }
19
20
  export function printInitHelp(io) {
@@ -1,22 +1,31 @@
1
- import { parseUpdateArgv, runRefreshDepositCli } from "@deftai/directive-core/init-deposit";
1
+ import { parseUpdateArgv, runRefreshDepositCli, UnknownUpdateFlagError, } from "@deftai/directive-core/init-deposit";
2
2
  import { CANONICAL_UPDATE_ARGV, UPDATE_DRY_RUN_FLAGS } from "./constants.js";
3
3
  import { argvWantsHelp, printUpdateHelp } from "./help.js";
4
4
  /** True when the user argv asked for a classify-only dry-run (`--dry-run`/`--plan`). */
5
5
  export function isUpdateDryRun(argv) {
6
6
  const flags = UPDATE_DRY_RUN_FLAGS;
7
- return argv.some((arg) => flags.includes(arg));
7
+ return argv.some((arg) => flags.includes(arg) || arg === "/dry-run" || arg === "/plan");
8
8
  }
9
9
  export function runUpdate(argv, io) {
10
10
  if (argvWantsHelp(argv)) {
11
11
  printUpdateHelp(io);
12
12
  return Promise.resolve(0);
13
13
  }
14
- const args = parseUpdateArgv(CANONICAL_UPDATE_ARGV, argv);
15
- return runRefreshDepositCli({
16
- ...args,
17
- dryRun: isUpdateDryRun(argv),
18
- writeOut: io.writeOut,
19
- writeErr: io.writeErr,
20
- });
14
+ try {
15
+ const args = parseUpdateArgv(CANONICAL_UPDATE_ARGV, argv);
16
+ return runRefreshDepositCli({
17
+ ...args,
18
+ dryRun: isUpdateDryRun(argv),
19
+ writeOut: io.writeOut,
20
+ writeErr: io.writeErr,
21
+ });
22
+ }
23
+ catch (cause) {
24
+ if (cause instanceof UnknownUpdateFlagError) {
25
+ io.writeErr(`directive update: ${cause.message}\n`);
26
+ return Promise.resolve(2);
27
+ }
28
+ throw cause;
29
+ }
21
30
  }
22
31
  //# sourceMappingURL=update.js.map
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve } from "node:path";
3
3
  import { grantOccupancyMembership, OCCUPANCY_JOIN_PROTOCOLS, revokeOccupancyMembership, } from "@deftai/directive-core/session";
4
+ import { occupancyUnrecognizedArgument } from "./occupancy-unrecognized.js";
4
5
  const VALUE_FLAGS = [
5
6
  "--project-root",
6
7
  "--session-id",
@@ -36,7 +37,7 @@ export function parseArgs(argv) {
36
37
  return {
37
38
  ...parsed,
38
39
  revoke: argv.includes("--revoke"),
39
- error: `unrecognized argument: ${arg}`,
40
+ error: occupancyUnrecognizedArgument(arg),
40
41
  };
41
42
  }
42
43
  const read = readValue(argv, i, flag);
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve } from "node:path";
3
3
  import { heartbeatOccupancy } from "@deftai/directive-core/session";
4
+ import { occupancyUnrecognizedArgument } from "./occupancy-unrecognized.js";
4
5
  export function parseArgs(argv) {
5
6
  const parsed = { projectRoot: "." };
6
7
  for (let i = 0; i < argv.length; i += 1) {
@@ -40,7 +41,7 @@ export function parseArgs(argv) {
40
41
  parsed.sessionId = sessionId;
41
42
  }
42
43
  else {
43
- return { ...parsed, error: `unrecognized argument: ${arg}` };
44
+ return { ...parsed, error: occupancyUnrecognizedArgument(arg) };
44
45
  }
45
46
  }
46
47
  return parsed;
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve } from "node:path";
3
3
  import { releaseOccupancy } from "@deftai/directive-core/session";
4
+ import { occupancyUnrecognizedArgument } from "./occupancy-unrecognized.js";
4
5
  export function parseArgs(argv) {
5
6
  const parsed = { projectRoot: "." };
6
7
  for (let i = 0; i < argv.length; i += 1) {
@@ -40,7 +41,7 @@ export function parseArgs(argv) {
40
41
  parsed.sessionId = sessionId;
41
42
  }
42
43
  else {
43
- return { ...parsed, error: `unrecognized argument: ${arg}` };
44
+ return { ...parsed, error: occupancyUnrecognizedArgument(arg) };
44
45
  }
45
46
  }
46
47
  return parsed;
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve } from "node:path";
3
3
  import { stealOccupancy } from "@deftai/directive-core/session";
4
+ import { occupancyUnrecognizedArgument } from "./occupancy-unrecognized.js";
4
5
  export function parseArgs(argv) {
5
6
  const parsed = { projectRoot: ".", confirm: false, occupant: null };
6
7
  for (let i = 0; i < argv.length; i += 1) {
@@ -58,7 +59,7 @@ export function parseArgs(argv) {
58
59
  parsed.sessionId = sessionId;
59
60
  }
60
61
  else {
61
- return { ...parsed, error: `unrecognized argument: ${arg}` };
62
+ return { ...parsed, error: occupancyUnrecognizedArgument(arg) };
62
63
  }
63
64
  }
64
65
  return parsed;
@@ -0,0 +1,3 @@
1
+ /** Occupancy-namespace parse: unknown flags name the help surface (#4411). */
2
+ export declare function occupancyUnrecognizedArgument(arg: string | undefined): string;
3
+ //# sourceMappingURL=occupancy-unrecognized.d.ts.map
@@ -0,0 +1,5 @@
1
+ /** Occupancy-namespace parse: unknown flags name the help surface (#4411). */
2
+ export function occupancyUnrecognizedArgument(arg) {
3
+ return `unrecognized argument: ${arg}. See \`deft help\` or \`deft commands\`.`;
4
+ }
5
+ //# sourceMappingURL=occupancy-unrecognized.js.map
@@ -30,7 +30,7 @@ export function runPrdRenderCli(argv) {
30
30
  const parsedArgs = parsePrdArgv(remaining);
31
31
  prdRenderMain({
32
32
  ...parsedArgs,
33
- projectRoot: parsedArgs.spec === undefined ? projectRoot : undefined,
33
+ projectRoot: projectRoot ?? parsedArgs.projectRoot,
34
34
  });
35
35
  return 0;
36
36
  }
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ interface ParsedArgs {
3
+ projectRoot: string;
4
+ quiet: boolean;
5
+ error?: string;
6
+ }
7
+ /** Parse verify-consumer-test-lane CLI args. */
8
+ export declare function parseArgs(argv: string[]): ParsedArgs;
9
+ /** Run the gate and return the process exit code. */
10
+ export declare function run(argv: string[]): Promise<number>;
11
+ export {};
12
+ //# sourceMappingURL=verify-consumer-test-lane.d.ts.map
@@ -0,0 +1,57 @@
1
+ #!/usr/bin/env node
2
+ import { resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { evaluate } from "@deftai/directive-core/consumer-test-lane";
5
+ /** Parse verify-consumer-test-lane CLI args. */
6
+ export function parseArgs(argv) {
7
+ const parsed = {
8
+ projectRoot: ".",
9
+ quiet: false,
10
+ };
11
+ for (let i = 0; i < argv.length; i += 1) {
12
+ const arg = argv[i];
13
+ if (arg === "--quiet") {
14
+ parsed.quiet = true;
15
+ }
16
+ else if (arg === "--project-root") {
17
+ const value = argv[i + 1];
18
+ if (value === undefined) {
19
+ return { ...parsed, error: "argument --project-root: expected one argument" };
20
+ }
21
+ parsed.projectRoot = value;
22
+ i += 1;
23
+ }
24
+ else if (arg?.startsWith("--project-root=")) {
25
+ parsed.projectRoot = arg.slice("--project-root=".length);
26
+ }
27
+ else {
28
+ return { ...parsed, error: `unrecognized argument: ${arg}` };
29
+ }
30
+ }
31
+ return parsed;
32
+ }
33
+ /** Run the gate and return the process exit code. */
34
+ export async function run(argv) {
35
+ const args = parseArgs(argv);
36
+ if (args.error !== undefined) {
37
+ process.stderr.write(`verify_consumer_test_lane: ${args.error}\n`);
38
+ return 2;
39
+ }
40
+ const result = await evaluate({
41
+ projectRoot: resolve(args.projectRoot),
42
+ quiet: args.quiet,
43
+ });
44
+ if (result.message.length > 0) {
45
+ if (result.stream === "stdout") {
46
+ process.stdout.write(`${result.message}\n`);
47
+ }
48
+ else if (result.stream === "stderr") {
49
+ process.stderr.write(`${result.message}\n`);
50
+ }
51
+ }
52
+ return result.code;
53
+ }
54
+ if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
55
+ void run(process.argv.slice(2)).then((code) => process.exit(code));
56
+ }
57
+ //# sourceMappingURL=verify-consumer-test-lane.js.map
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ interface ParsedArgs {
3
+ projectRoot: string;
4
+ baseRef?: string;
5
+ staged: boolean;
6
+ quiet: boolean;
7
+ paths: string[];
8
+ error?: string;
9
+ }
10
+ /** Parse verify-evaluator-surface CLI args. */
11
+ export declare function parseArgs(argv: string[]): ParsedArgs;
12
+ /** Run the gate and return the process exit code. */
13
+ export declare function run(argv: string[]): number;
14
+ export {};
15
+ //# sourceMappingURL=verify-evaluator-surface.d.ts.map
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+ import { resolve } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { evaluate } from "@deftai/directive-core/evaluator-surface";
5
+ /** Parse verify-evaluator-surface CLI args. */
6
+ export function parseArgs(argv) {
7
+ const parsed = {
8
+ projectRoot: ".",
9
+ staged: false,
10
+ quiet: false,
11
+ paths: [],
12
+ };
13
+ for (let i = 0; i < argv.length; i += 1) {
14
+ const arg = argv[i];
15
+ if (arg === "--quiet") {
16
+ parsed.quiet = true;
17
+ }
18
+ else if (arg === "--staged") {
19
+ parsed.staged = true;
20
+ }
21
+ else if (arg === "--project-root") {
22
+ const value = argv[i + 1];
23
+ if (value === undefined) {
24
+ return { ...parsed, error: "argument --project-root: expected one argument" };
25
+ }
26
+ parsed.projectRoot = value;
27
+ i += 1;
28
+ }
29
+ else if (arg?.startsWith("--project-root=")) {
30
+ parsed.projectRoot = arg.slice("--project-root=".length);
31
+ }
32
+ else if (arg === "--base-ref") {
33
+ const value = argv[i + 1];
34
+ if (value === undefined) {
35
+ return { ...parsed, error: "argument --base-ref: expected one argument" };
36
+ }
37
+ parsed.baseRef = value;
38
+ i += 1;
39
+ }
40
+ else if (arg?.startsWith("--base-ref=")) {
41
+ parsed.baseRef = arg.slice("--base-ref=".length);
42
+ }
43
+ else if (arg === "--path") {
44
+ const value = argv[i + 1];
45
+ if (value === undefined) {
46
+ return { ...parsed, error: "argument --path: expected one argument" };
47
+ }
48
+ parsed.paths.push(value);
49
+ i += 1;
50
+ }
51
+ else if (arg?.startsWith("--path=")) {
52
+ parsed.paths.push(arg.slice("--path=".length));
53
+ }
54
+ else {
55
+ return { ...parsed, error: `unrecognized argument: ${arg}` };
56
+ }
57
+ }
58
+ return parsed;
59
+ }
60
+ /** Run the gate and return the process exit code. */
61
+ export function run(argv) {
62
+ const args = parseArgs(argv);
63
+ if (args.error !== undefined) {
64
+ process.stderr.write(`verify_evaluator_surface: ${args.error}\n`);
65
+ return 2;
66
+ }
67
+ const result = evaluate({
68
+ projectRoot: resolve(args.projectRoot),
69
+ baseRef: args.baseRef,
70
+ staged: args.staged,
71
+ quiet: args.quiet,
72
+ paths: args.paths.length > 0 ? args.paths : undefined,
73
+ });
74
+ if (result.message.length > 0) {
75
+ if (result.stream === "stdout") {
76
+ process.stdout.write(`${result.message}\n`);
77
+ }
78
+ else if (result.stream === "stderr") {
79
+ process.stderr.write(`${result.message}\n`);
80
+ }
81
+ }
82
+ return result.code;
83
+ }
84
+ if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
85
+ process.exit(run(process.argv.slice(2)));
86
+ }
87
+ //# sourceMappingURL=verify-evaluator-surface.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive",
3
- "version": "0.117.0",
3
+ "version": "0.118.0",
4
4
  "description": "Directive CLI — npm install path for the Deft Directive framework.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://deftai.github.io/directive/",
@@ -34,8 +34,8 @@
34
34
  "provenance": true
35
35
  },
36
36
  "dependencies": {
37
- "@deftai/directive-core": "^0.117.0",
38
- "@deftai/directive-content": "^0.117.0"
37
+ "@deftai/directive-core": "^0.118.0",
38
+ "@deftai/directive-content": "^0.118.0"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -b"