@deftai/directive 0.110.0 → 0.111.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", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-l4-owner", "verify-subagent-alive", "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", "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"];
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"];
16
16
  /** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
package/dist/dispatch.js CHANGED
@@ -8,6 +8,7 @@ import { existsSync, mkdirSync, mkdtempSync, readdirSync, readFileSync, readSync
8
8
  import { homedir, tmpdir } from "node:os";
9
9
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
10
10
  import { engineInfo, userConfig } from "@deftai/directive-core";
11
+ import { interceptHelp } from "@deftai/directive-core/dist/triage/help/index.js";
11
12
  import { parseInitArgv, runInitDepositCli } from "@deftai/directive-core/init-deposit";
12
13
  import { appendAuditLog, disclosureLine, migrateLegacyPolicyKey, PLAN_POLICY_KEY, POLICY_AUDIT_NOOP_STDOUT, policyColonInvocation, policySetInvocation, projectDefinitionPath, resolvePolicy, resolveWipCap, setPolicy, stampChangedToken, } from "@deftai/directive-core/policy";
13
14
  import { defaultWhich } from "@deftai/directive-core/scm";
@@ -138,6 +139,7 @@ export const CLI_MODULE_VERBS = [
138
139
  "verify-plan-sequence",
139
140
  "verify-stubs",
140
141
  "verify-xbrief-drift",
142
+ "verify-spec-prd-fresh",
141
143
  "rule-ownership-lint",
142
144
  "verify-story-ready",
143
145
  "verify-review-monitor",
@@ -350,6 +352,7 @@ export const VERB_ALIASES = {
350
352
  "verify:bridge-drift": "verify-bridge-drift",
351
353
  "verify:scm-boundary": "verify-scm-boundary",
352
354
  "verify:xbrief-drift": "verify-xbrief-drift",
355
+ "verify:spec-prd-fresh": "verify-spec-prd-fresh",
353
356
  "verify:capacity": "verify-capacity",
354
357
  "verify:session-ritual": "verify-session-ritual",
355
358
  "verify:plan-sequence": "verify-plan-sequence",
@@ -432,6 +435,7 @@ const SUBDIR_CLI_STEMS = {
432
435
  "verify-openclaw-tier1": "verify-source-cli/verify-openclaw-tier1",
433
436
  "verify-scm-boundary": "verify-source-cli/verify-scm-boundary",
434
437
  "verify-xbrief-drift": "verify-source-cli/verify-xbrief-drift",
438
+ "verify-spec-prd-fresh": "verify-source-cli/verify-spec-prd-fresh",
435
439
  "verify-go-freeze": "gates-cli/verify-go-freeze",
436
440
  "verify-bridge-drift": "gates-cli/verify-bridge-drift",
437
441
  "validate-links": "content-validate-cli/validate-links",
@@ -556,12 +560,20 @@ function parseCodeStructureArgs(argv) {
556
560
  const paths = [];
557
561
  let json = false;
558
562
  let strict = false;
563
+ let enforce = false;
559
564
  for (let i = 0; i < argv.length; i += 1) {
560
565
  const arg = argv[i];
561
566
  if (arg === "--project-root") {
562
567
  const v = argv[i + 1];
563
568
  if (v === undefined)
564
- return { projectRoot, paths, json, strict, error: "missing --project-root value" };
569
+ return {
570
+ projectRoot,
571
+ paths,
572
+ json,
573
+ strict,
574
+ enforce,
575
+ error: "missing --project-root value",
576
+ };
565
577
  projectRoot = v;
566
578
  i += 1;
567
579
  }
@@ -571,7 +583,7 @@ function parseCodeStructureArgs(argv) {
571
583
  else if (arg === "--path") {
572
584
  const v = argv[i + 1];
573
585
  if (v === undefined)
574
- return { projectRoot, paths, json, strict, error: "missing --path value" };
586
+ return { projectRoot, paths, json, strict, enforce, error: "missing --path value" };
575
587
  paths.push(v);
576
588
  i += 1;
577
589
  }
@@ -584,11 +596,24 @@ function parseCodeStructureArgs(argv) {
584
596
  else if (arg === "--strict") {
585
597
  strict = true;
586
598
  }
599
+ else if (arg === "--enforce") {
600
+ enforce = true;
601
+ }
602
+ else if (arg !== undefined && !arg.startsWith("-")) {
603
+ paths.push(arg);
604
+ }
587
605
  else {
588
- return { projectRoot, paths, json, strict, error: `unrecognized argument: ${arg}` };
606
+ return {
607
+ projectRoot,
608
+ paths,
609
+ json,
610
+ strict,
611
+ enforce,
612
+ error: `unrecognized argument: ${arg}`,
613
+ };
589
614
  }
590
615
  }
591
- return { projectRoot, paths, json, strict };
616
+ return { projectRoot, paths, json, strict, enforce };
592
617
  }
593
618
  // ===========================================================================
594
619
  // Native pack-migrate handlers (#2022 Phase 1).
@@ -2474,6 +2499,7 @@ async function loadCoreModuleHandler(verb, io) {
2474
2499
  paths: parsed.paths.length > 0 ? parsed.paths : undefined,
2475
2500
  json: parsed.json,
2476
2501
  strict: parsed.strict,
2502
+ enforce: parsed.enforce,
2477
2503
  });
2478
2504
  if (result.stdout)
2479
2505
  io.writeOut(result.stdout);
@@ -2819,7 +2845,6 @@ export async function dispatch(argv, io = defaultIo()) {
2819
2845
  return 1;
2820
2846
  }
2821
2847
  try {
2822
- const handler = await loadHandler(canonical, io);
2823
2848
  const triageSubcommand = verb !== undefined ? TRIAGE_ACTION_ALIAS_SUBCOMMANDS[verb] : undefined;
2824
2849
  const policySubcommand = verb !== undefined ? POLICY_ACTION_ALIAS_SUBCOMMANDS[verb] : undefined;
2825
2850
  const authzSubcommand = verb !== undefined ? AUTHZ_ACTION_ALIAS_SUBCOMMANDS[verb] : undefined;
@@ -2849,6 +2874,13 @@ export async function dispatch(argv, io = defaultIo()) {
2849
2874
  : vbriefValidateSubcommand !== undefined
2850
2875
  ? [vbriefValidateSubcommand, ...rest]
2851
2876
  : rest;
2877
+ const helpRc = interceptHelp(canonical.replaceAll("-", "_"), handlerArgv, {
2878
+ write: io.writeOut,
2879
+ });
2880
+ if (helpRc !== null) {
2881
+ return helpRc;
2882
+ }
2883
+ const handler = await loadHandler(canonical, io);
2852
2884
  return await invokeHandler(handler, handlerArgv);
2853
2885
  }
2854
2886
  catch (err) {
@@ -39,6 +39,9 @@ export function parseArgs(argv) {
39
39
  const dialInputs = {};
40
40
  for (let i = 0; i < argv.length; i += 1) {
41
41
  const arg = argv[i];
42
+ if (arg === "--") {
43
+ continue;
44
+ }
42
45
  if (arg === "--json") {
43
46
  parsed.emitJson = true;
44
47
  }
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export declare function run(argv: string[]): number;
3
+ //# sourceMappingURL=verify-spec-prd-fresh.d.ts.map
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from "node:url";
3
+ import { runSpecPrdFreshCli } from "@deftai/directive-core/verify-source";
4
+ export function run(argv) {
5
+ const result = runSpecPrdFreshCli(argv);
6
+ if (result.stdout.length > 0)
7
+ process.stdout.write(result.stdout);
8
+ if (result.stderr.length > 0)
9
+ process.stderr.write(result.stderr);
10
+ return result.exitCode;
11
+ }
12
+ if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
13
+ process.exit(run(process.argv.slice(2)));
14
+ }
15
+ //# sourceMappingURL=verify-spec-prd-fresh.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive",
3
- "version": "0.110.0",
3
+ "version": "0.111.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.110.0",
38
- "@deftai/directive-content": "^0.110.0"
37
+ "@deftai/directive-core": "^0.111.0",
38
+ "@deftai/directive-content": "^0.111.0"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -b"