@deftai/directive 0.119.7 → 0.119.8

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
+ /** Reads `@deftai/directive` version from the installed CLI package.json adjacent to dist/ or src/. */
2
+ export declare function readCliPackageVersion(): string;
3
+ //# sourceMappingURL=cli-package-version.d.ts.map
@@ -0,0 +1,23 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const FALLBACK_VERSION = "0.0.0";
5
+ function parsePackageVersion(raw) {
6
+ const parsed = JSON.parse(raw);
7
+ if (parsed === null || typeof parsed !== "object") {
8
+ return FALLBACK_VERSION;
9
+ }
10
+ const version = parsed.version;
11
+ return typeof version === "string" && version.length > 0 ? version : FALLBACK_VERSION;
12
+ }
13
+ /** Reads `@deftai/directive` version from the installed CLI package.json adjacent to dist/ or src/. */
14
+ export function readCliPackageVersion() {
15
+ try {
16
+ const pkgPath = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
17
+ return parsePackageVersion(readFileSync(pkgPath, "utf8"));
18
+ }
19
+ catch {
20
+ return FALLBACK_VERSION;
21
+ }
22
+ }
23
+ //# sourceMappingURL=cli-package-version.js.map
@@ -12,7 +12,7 @@ export interface DispatchIo {
12
12
  /** CLI modules in packages/cli/src (excluding parity harnesses and bin/index). */
13
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", "release-wait-npm", "scope-lifecycle", "scope-record-approved-scope", "scope-record-observable-scope", "scope-record-intent-constraint", "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-observable-scope", "verify-intent-constraint", "verify-consumer-test-lane", "eval-health", "eval-run", "eval-report", "eval-triggers"];
14
14
  /** Core-only CLI entrypoints without a packages/cli wrapper. */
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"];
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", "project-write-narratives", "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). */
17
17
  export declare const TRIAGE_ACTION_ALIAS_SUBCOMMANDS: Readonly<Record<string, string>>;
18
18
  /** Colon aliases for policy subcommands (mirrors cli-router SUBCOMMAND_ROUTES). */
package/dist/dispatch.js CHANGED
@@ -14,6 +14,7 @@ import { appendAuditLog, disclosureLine, migrateLegacyPolicyKey, PLAN_POLICY_KEY
14
14
  import { defaultWhich } from "@deftai/directive-core/scm";
15
15
  import { KNOWN_SUBAGENT_BACKEND_IDS, probeSubagentBackends, resolveSwarmSubagentBackend, } from "@deftai/directive-core/swarm";
16
16
  import { withProjectDefinitionMutation, } from "@deftai/directive-core/vbrief-build";
17
+ import { identityBanner } from "./identity-banner.js";
17
18
  const HANDLER_KEYS = [
18
19
  "run",
19
20
  "main",
@@ -198,6 +199,7 @@ export const CORE_MODULE_VERBS = [
198
199
  "prd-render",
199
200
  "export-spec",
200
201
  "project-render",
202
+ "project-write-narratives",
201
203
  "roadmap-render",
202
204
  "rule-map",
203
205
  "spec-render",
@@ -413,6 +415,7 @@ export const VERB_ALIASES = {
413
415
  "spec:render": "spec-render",
414
416
  "prd:render": "prd-render",
415
417
  "project:render": "project-render",
418
+ "project:write-narratives": "project-write-narratives",
416
419
  "docs:rule-map": "rule-map",
417
420
  "project:export-spec": "export-spec",
418
421
  "pr:watch": "pr-watch",
@@ -2497,6 +2500,10 @@ async function loadCoreModuleHandler(verb, io) {
2497
2500
  const { runProjectRenderCli } = await import("./render-cli/project-render-cli.js");
2498
2501
  return (argv) => runProjectRenderCli(argv);
2499
2502
  }
2503
+ case "project-write-narratives": {
2504
+ const { writePhase2NarrativesMain } = await import("@deftai/directive-core/dist/render/phase2-narratives-cli.js");
2505
+ return (argv) => writePhase2NarrativesMain(argv);
2506
+ }
2500
2507
  case "rule-map": {
2501
2508
  const { runRuleMapCli } = await import("./render-cli/rule-map-cli.js");
2502
2509
  return (argv) => runRuleMapCli(argv);
@@ -2770,6 +2777,10 @@ const CURATED_HELP_GROUPS = [
2770
2777
  title: "Project artifacts",
2771
2778
  commands: [
2772
2779
  { name: "project:render", summary: "Render PROJECT-DEFINITION projection" },
2780
+ {
2781
+ name: "project:write-narratives",
2782
+ summary: "Store Phase 2 narratives in PROJECT-DEFINITION without policy keys",
2783
+ },
2773
2784
  { name: "spec:render", summary: "Render specification projection" },
2774
2785
  ],
2775
2786
  },
@@ -2824,7 +2835,6 @@ async function invokeHandler(handler, argv) {
2824
2835
  const code = await handler(argv);
2825
2836
  return typeof code === "number" ? code : 0;
2826
2837
  }
2827
- const CLI_PACKAGE = "@deftai/directive";
2828
2838
  const PLAN_SEQUENCE_VERBS = "set|current|clear|advance";
2829
2839
  /**
2830
2840
  * Unknown-colon-verb remediation (#3439 / #2652).
@@ -2843,8 +2853,7 @@ export function unknownColonVerbHint(verb) {
2843
2853
  `Hyphen stem: ${hyphen}.\n`);
2844
2854
  }
2845
2855
  function versionBanner() {
2846
- const info = engineInfo();
2847
- return `${CLI_PACKAGE} (engine: ${info.name}@${info.version})\n`;
2856
+ return `${identityBanner()}\n`;
2848
2857
  }
2849
2858
  /** Dispatch argv to a registered verb; returns the handler exit code. */
2850
2859
  export async function dispatch(argv, io = defaultIo()) {
@@ -0,0 +1,13 @@
1
+ export declare const CLI_PACKAGE: "@deftai/directive";
2
+ export interface IdentityBannerParts {
3
+ readonly cliVersion: string;
4
+ readonly engineName: string;
5
+ readonly engineVersion: string;
6
+ }
7
+ /**
8
+ * Display-both identity line. Engine semver is first so parseVersionFromOutput
9
+ * in active-cli.ts and classify.ts still treat --version as the engine.
10
+ */
11
+ export declare function formatIdentityBanner(parts: IdentityBannerParts): string;
12
+ export declare function identityBanner(): string;
13
+ //# sourceMappingURL=identity-banner.d.ts.map
@@ -0,0 +1,19 @@
1
+ import { engineInfo } from "@deftai/directive-core";
2
+ import { readCliPackageVersion } from "./cli-package-version.js";
3
+ export const CLI_PACKAGE = "@deftai/directive";
4
+ /**
5
+ * Display-both identity line. Engine semver is first so parseVersionFromOutput
6
+ * in active-cli.ts and classify.ts still treat --version as the engine.
7
+ */
8
+ export function formatIdentityBanner(parts) {
9
+ return `${CLI_PACKAGE} (engine: ${parts.engineName}@${parts.engineVersion}; package: ${CLI_PACKAGE}@${parts.cliVersion})`;
10
+ }
11
+ export function identityBanner() {
12
+ const info = engineInfo();
13
+ return formatIdentityBanner({
14
+ cliVersion: readCliPackageVersion(),
15
+ engineName: info.name,
16
+ engineVersion: info.version,
17
+ });
18
+ }
19
+ //# sourceMappingURL=identity-banner.js.map
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * (cli → core → types), proving the project-reference graph builds and
6
6
  * resolves end-to-end. Real commands land in later migration waves.
7
7
  */
8
- export declare const CLI_PACKAGE: "@deftai/directive";
9
- /** Renders the engine banner string, sourcing core engine metadata. */
8
+ export { CLI_PACKAGE } from "./identity-banner.js";
9
+ /** Renders CLI package and engine identity. First semver is the engine (#4766). */
10
10
  export declare function banner(): string;
11
11
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { engineInfo } from "@deftai/directive-core";
1
+ import { identityBanner } from "./identity-banner.js";
2
2
  /**
3
3
  * `@deftai/directive` — entrypoint for the deft directive TypeScript engine.
4
4
  *
@@ -6,10 +6,9 @@ import { engineInfo } from "@deftai/directive-core";
6
6
  * (cli → core → types), proving the project-reference graph builds and
7
7
  * resolves end-to-end. Real commands land in later migration waves.
8
8
  */
9
- export const CLI_PACKAGE = "@deftai/directive";
10
- /** Renders the engine banner string, sourcing core engine metadata. */
9
+ export { CLI_PACKAGE } from "./identity-banner.js";
10
+ /** Renders CLI package and engine identity. First semver is the engine (#4766). */
11
11
  export function banner() {
12
- const info = engineInfo();
13
- return `${CLI_PACKAGE} (engine: ${info.name}@${info.version})`;
12
+ return identityBanner();
14
13
  }
15
14
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deftai/directive",
3
- "version": "0.119.7",
3
+ "version": "0.119.8",
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.119.7",
38
- "@deftai/directive-content": "^0.119.7"
37
+ "@deftai/directive-core": "^0.119.8",
38
+ "@deftai/directive-content": "^0.119.8"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -b"