@deftai/directive 0.63.0 → 0.65.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.
- package/dist/dispatch.d.ts +3 -1
- package/dist/dispatch.js +23 -3
- package/dist/triage-queue.js +3 -0
- package/dist/verify-source-cli/verify-contract-drift.d.ts +11 -0
- package/dist/verify-source-cli/verify-contract-drift.js +47 -0
- package/dist/verify-source-cli/verify-cursor-tier1.d.ts +12 -0
- package/dist/verify-source-cli/verify-cursor-tier1.js +51 -0
- package/package.json +3 -3
package/dist/dispatch.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ 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", "framework-check-updates", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "policy", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "scope-lifecycle", "session-start", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "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", "verify-branch", "verify-encoding", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-bridge-drift", "verify-capacity", "verify-content-manifest", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-stubs", "rule-ownership-lint", "verify-story-ready", "verify-tools", "verify-wip-cap"];
|
|
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", "framework-check-updates", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "policy", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "scope-lifecycle", "session-start", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "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", "verify-branch", "verify-encoding", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-bridge-drift", "verify-capacity", "verify-content-manifest", "verify-contract-drift", "verify-cursor-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-stubs", "rule-ownership-lint", "verify-story-ready", "verify-tools", "verify-wip-cap"];
|
|
14
14
|
/** Core-only CLI entrypoints without a packages/cli wrapper. */
|
|
15
15
|
export declare const CORE_MODULE_VERBS: readonly ["scm", "github-auth-modes", "github-body", "issue-emit", "issue-ingest", "reconcile-issues", "swarm-launch", "swarm-complete-cohort", "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", "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"];
|
|
16
|
+
/** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
|
|
17
|
+
export declare const TRIAGE_ACTION_ALIAS_SUBCOMMANDS: Readonly<Record<string, string>>;
|
|
16
18
|
/** Task-style aliases (framework_commands / Taskfile names). */
|
|
17
19
|
export declare const VERB_ALIASES: Readonly<Record<string, string>>;
|
|
18
20
|
/** Pinned ghx version — keep in lockstep with .github/workflows/ci.yml env.GHX_VERSION. */
|
package/dist/dispatch.js
CHANGED
|
@@ -92,6 +92,8 @@ export const CLI_MODULE_VERBS = [
|
|
|
92
92
|
"verify-bridge-drift",
|
|
93
93
|
"verify-capacity",
|
|
94
94
|
"verify-content-manifest",
|
|
95
|
+
"verify-contract-drift",
|
|
96
|
+
"verify-cursor-tier1",
|
|
95
97
|
"verify-go-freeze",
|
|
96
98
|
"verify-scm-boundary",
|
|
97
99
|
"verify-session-ritual",
|
|
@@ -139,6 +141,18 @@ export const CORE_MODULE_VERBS = [
|
|
|
139
141
|
"changelog-resolve-unreleased",
|
|
140
142
|
"architecture-preflight-sor",
|
|
141
143
|
];
|
|
144
|
+
/** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
|
|
145
|
+
export const TRIAGE_ACTION_ALIAS_SUBCOMMANDS = {
|
|
146
|
+
"triage:accept": "accept",
|
|
147
|
+
"triage:reject": "reject",
|
|
148
|
+
"triage:defer": "defer",
|
|
149
|
+
"triage:needs-ac": "needs-ac",
|
|
150
|
+
"triage:mark-duplicate": "mark-duplicate",
|
|
151
|
+
"triage:status": "status",
|
|
152
|
+
"triage:reset": "reset",
|
|
153
|
+
"triage:history": "history",
|
|
154
|
+
};
|
|
155
|
+
const TRIAGE_ACTION_COLON_ALIASES = Object.fromEntries(Object.keys(TRIAGE_ACTION_ALIAS_SUBCOMMANDS).map((alias) => [alias, "triage-actions"]));
|
|
142
156
|
/** Task-style aliases (framework_commands / Taskfile names). */
|
|
143
157
|
export const VERB_ALIASES = {
|
|
144
158
|
"verify:encoding": "verify-encoding",
|
|
@@ -160,6 +174,8 @@ export const VERB_ALIASES = {
|
|
|
160
174
|
"verify:rule-ownership": "rule-ownership-lint",
|
|
161
175
|
"rule:ownership-lint": "rule-ownership-lint",
|
|
162
176
|
"verify:content-manifest": "verify-content-manifest",
|
|
177
|
+
"verify:contract-drift": "verify-contract-drift",
|
|
178
|
+
"verify:cursor-tier1": "verify-cursor-tier1",
|
|
163
179
|
"verify:go-freeze": "verify-go-freeze",
|
|
164
180
|
"verify:bridge-drift": "verify-bridge-drift",
|
|
165
181
|
"verify:scm-boundary": "verify-scm-boundary",
|
|
@@ -174,8 +190,7 @@ export const VERB_ALIASES = {
|
|
|
174
190
|
"triage:summary": "triage-summary",
|
|
175
191
|
"triage:queue": "triage-queue",
|
|
176
192
|
"triage:scope": "triage-scope",
|
|
177
|
-
|
|
178
|
-
"triage:status": "triage-actions",
|
|
193
|
+
...TRIAGE_ACTION_COLON_ALIASES,
|
|
179
194
|
"agents:refresh": "agents-refresh",
|
|
180
195
|
"migrate:preflight": "migrate-preflight",
|
|
181
196
|
"framework:check-updates": "framework-check-updates",
|
|
@@ -198,6 +213,8 @@ const SUBDIR_CLI_STEMS = {
|
|
|
198
213
|
"verify-stubs": "verify-source-cli/verify-stubs",
|
|
199
214
|
"rule-ownership-lint": "verify-source-cli/rule-ownership-lint",
|
|
200
215
|
"verify-content-manifest": "verify-source-cli/verify-content-manifest",
|
|
216
|
+
"verify-contract-drift": "verify-source-cli/verify-contract-drift",
|
|
217
|
+
"verify-cursor-tier1": "verify-source-cli/verify-cursor-tier1",
|
|
201
218
|
"verify-scm-boundary": "verify-source-cli/verify-scm-boundary",
|
|
202
219
|
"verify-go-freeze": "gates-cli/verify-go-freeze",
|
|
203
220
|
"verify-bridge-drift": "gates-cli/verify-bridge-drift",
|
|
@@ -2107,9 +2124,12 @@ export async function dispatch(argv, io = defaultIo()) {
|
|
|
2107
2124
|
}
|
|
2108
2125
|
try {
|
|
2109
2126
|
const handler = await loadHandler(canonical, io);
|
|
2127
|
+
const triageSubcommand = verb !== undefined ? TRIAGE_ACTION_ALIAS_SUBCOMMANDS[verb] : undefined;
|
|
2110
2128
|
const handlerArgv = canonical === "framework-commands" && verb !== undefined && verb !== canonical
|
|
2111
2129
|
? [verb, ...rest]
|
|
2112
|
-
:
|
|
2130
|
+
: triageSubcommand !== undefined && canonical === "triage-actions"
|
|
2131
|
+
? [triageSubcommand, ...rest]
|
|
2132
|
+
: rest;
|
|
2113
2133
|
return await invokeHandler(handler, handlerArgv);
|
|
2114
2134
|
}
|
|
2115
2135
|
catch (err) {
|
package/dist/triage-queue.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { dirname, resolve } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
4
|
import { activeReferencedIssueNumbers, buildQueue, collectOrphanIssueNumbers, DEFAULT_QUEUE_LIMIT, loadCachedIssues, loadSliceRecords, readAuditEntries, renderQueue, resolveRankingLabels, resolveRepo, } from "@deftai/directive-core/dist/triage/queue/index.js";
|
|
5
|
+
import { resolveScopeIgnores } from "@deftai/directive-core/dist/triage/scope-drift/index.js";
|
|
5
6
|
/** Parse triage-queue CLI args for the queue subcommand. */
|
|
6
7
|
export function parseArgs(argv) {
|
|
7
8
|
const parsed = {
|
|
@@ -150,6 +151,7 @@ export function run(argv) {
|
|
|
150
151
|
});
|
|
151
152
|
const orphanNumbers = collectOrphanIssueNumbers(sliceRecords, issuesByNumber);
|
|
152
153
|
const limit = args.limit === 0 ? null : Math.max(0, args.limit);
|
|
154
|
+
const scopeIgnores = resolveScopeIgnores(projectRoot);
|
|
153
155
|
const items = buildQueue(issuesForQueue, auditEntries, {
|
|
154
156
|
repo,
|
|
155
157
|
queue: {
|
|
@@ -158,6 +160,7 @@ export function run(argv) {
|
|
|
158
160
|
orphanIssueNumbers: orphanNumbers,
|
|
159
161
|
includeBlocked: args.includeBlocked,
|
|
160
162
|
limit,
|
|
163
|
+
scopeIgnores,
|
|
161
164
|
},
|
|
162
165
|
});
|
|
163
166
|
process.stdout.write(`${renderQueue({
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
interface ParsedArgs {
|
|
3
|
+
projectRoot: string | null;
|
|
4
|
+
error?: string;
|
|
5
|
+
}
|
|
6
|
+
/** Parse verify-contract-drift CLI args (#1799). */
|
|
7
|
+
export declare function parseArgs(argv: string[]): ParsedArgs;
|
|
8
|
+
/** Run the gate and return the process exit code. */
|
|
9
|
+
export declare function run(argv: string[]): number;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=verify-contract-drift.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { evaluateContractDrift } from "@deftai/directive-core/verify-source";
|
|
5
|
+
/** Parse verify-contract-drift CLI args (#1799). */
|
|
6
|
+
export function parseArgs(argv) {
|
|
7
|
+
const parsed = { projectRoot: null };
|
|
8
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
9
|
+
const arg = argv[i];
|
|
10
|
+
if (arg === "--project-root") {
|
|
11
|
+
const value = argv[i + 1];
|
|
12
|
+
if (value === undefined) {
|
|
13
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
14
|
+
}
|
|
15
|
+
parsed.projectRoot = value;
|
|
16
|
+
i += 1;
|
|
17
|
+
}
|
|
18
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
19
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return parsed;
|
|
26
|
+
}
|
|
27
|
+
/** Run the gate and return the process exit code. */
|
|
28
|
+
export function run(argv) {
|
|
29
|
+
const args = parseArgs(argv);
|
|
30
|
+
if (args.error !== undefined) {
|
|
31
|
+
process.stderr.write(`verify_contract_drift: ${args.error}\n`);
|
|
32
|
+
return 2;
|
|
33
|
+
}
|
|
34
|
+
const root = resolve(args.projectRoot ?? ".");
|
|
35
|
+
const result = evaluateContractDrift(root);
|
|
36
|
+
if (result.stream === "stdout") {
|
|
37
|
+
process.stdout.write(`${result.message}\n`);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
process.stderr.write(`${result.message}\n`);
|
|
41
|
+
}
|
|
42
|
+
return result.code;
|
|
43
|
+
}
|
|
44
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
45
|
+
process.exit(run(process.argv.slice(2)));
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=verify-contract-drift.js.map
|
|
@@ -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-cursor-tier1 CLI args (#1877). */
|
|
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[]): number;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=verify-cursor-tier1.d.ts.map
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { evaluateCursorTier1 } from "@deftai/directive-core/verify-source";
|
|
5
|
+
/** Parse verify-cursor-tier1 CLI args (#1877). */
|
|
6
|
+
export function parseArgs(argv) {
|
|
7
|
+
const parsed = { projectRoot: ".", quiet: false };
|
|
8
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
9
|
+
const arg = argv[i];
|
|
10
|
+
if (arg === "--quiet") {
|
|
11
|
+
parsed.quiet = true;
|
|
12
|
+
}
|
|
13
|
+
else if (arg === "--project-root") {
|
|
14
|
+
const value = argv[i + 1];
|
|
15
|
+
if (value === undefined) {
|
|
16
|
+
return { ...parsed, error: "argument --project-root: expected one argument" };
|
|
17
|
+
}
|
|
18
|
+
parsed.projectRoot = value;
|
|
19
|
+
i += 1;
|
|
20
|
+
}
|
|
21
|
+
else if (arg?.startsWith("--project-root=")) {
|
|
22
|
+
parsed.projectRoot = arg.slice("--project-root=".length);
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return { ...parsed, error: `unrecognized argument: ${arg}` };
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return parsed;
|
|
29
|
+
}
|
|
30
|
+
/** Run the gate and return the process exit code. */
|
|
31
|
+
export function run(argv) {
|
|
32
|
+
const args = parseArgs(argv);
|
|
33
|
+
if (args.error !== undefined) {
|
|
34
|
+
process.stderr.write(`verify_cursor_tier1: ${args.error}\n`);
|
|
35
|
+
return 2;
|
|
36
|
+
}
|
|
37
|
+
const result = evaluateCursorTier1(resolve(args.projectRoot), { quiet: args.quiet });
|
|
38
|
+
if (result.code === 0) {
|
|
39
|
+
if (!args.quiet && result.message.length > 0) {
|
|
40
|
+
process.stdout.write(`${result.message}\n`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
process.stderr.write(`${result.message}\n`);
|
|
45
|
+
}
|
|
46
|
+
return result.code;
|
|
47
|
+
}
|
|
48
|
+
if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
|
|
49
|
+
process.exit(run(process.argv.slice(2)));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=verify-cursor-tier1.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deftai/directive",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.65.0",
|
|
4
4
|
"description": "Directive CLI — npm install path for the Deft Directive framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"provenance": true
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@deftai/directive-core": "^0.
|
|
35
|
-
"@deftai/directive-content": "^0.
|
|
34
|
+
"@deftai/directive-core": "^0.65.0",
|
|
35
|
+
"@deftai/directive-content": "^0.65.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsc -b"
|