@deftai/directive-core 0.94.0 → 0.96.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/authz/classify.js +485 -0
- package/dist/cache/archive.d.ts +134 -0
- package/dist/cache/archive.js +630 -0
- package/dist/cache/index.d.ts +1 -0
- package/dist/cache/index.js +1 -0
- package/dist/cache/main.js +298 -1
- package/dist/content-contracts/skills/helpers.d.ts +1 -1
- package/dist/content-contracts/skills/helpers.js +1 -0
- package/dist/doctor/main.js +41 -9
- package/dist/doctor/types.d.ts +2 -2
- package/dist/freshness/bind.d.ts +67 -0
- package/dist/freshness/bind.js +201 -0
- package/dist/freshness/cli.d.ts +30 -0
- package/dist/freshness/cli.js +180 -0
- package/dist/freshness/compare.d.ts +14 -0
- package/dist/freshness/compare.js +134 -0
- package/dist/freshness/generation.d.ts +44 -0
- package/dist/freshness/generation.js +172 -0
- package/dist/freshness/index.d.ts +13 -0
- package/dist/freshness/index.js +13 -0
- package/dist/freshness/report.d.ts +43 -0
- package/dist/freshness/report.js +139 -0
- package/dist/freshness/types.d.ts +70 -0
- package/dist/freshness/types.js +30 -0
- package/dist/handoff-evidence/index.d.ts +8 -0
- package/dist/handoff-evidence/index.js +7 -0
- package/dist/handoff-evidence/validate.d.ts +105 -0
- package/dist/handoff-evidence/validate.js +423 -0
- package/dist/hooks/dispatcher.d.ts +3 -0
- package/dist/hooks/dispatcher.js +12 -3
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/init-deposit/agent-hooks.d.ts +1 -1
- package/dist/init-deposit/agent-hooks.js +5 -2
- package/dist/init-deposit/hygiene.d.ts +1 -1
- package/dist/init-deposit/hygiene.js +16 -4
- package/dist/init-deposit/init-deposit.d.ts +7 -1
- package/dist/init-deposit/init-deposit.js +24 -4
- package/dist/init-deposit/refresh.d.ts +9 -1
- package/dist/init-deposit/refresh.js +48 -5
- package/dist/init-deposit/scaffold.js +6 -5
- package/dist/parent-turn-shape/evaluate.d.ts +84 -0
- package/dist/parent-turn-shape/evaluate.js +353 -0
- package/dist/parent-turn-shape/index.d.ts +8 -0
- package/dist/parent-turn-shape/index.js +8 -0
- package/dist/policy/index.d.ts +3 -0
- package/dist/policy/index.js +35 -0
- package/dist/release-e2e/greenfield-python-free-smoke.js +7 -3
- package/dist/review-monitor/constants.js +3 -2
- package/dist/review-monitor/tier-detection.d.ts +7 -3
- package/dist/review-monitor/tier-detection.js +18 -1
- package/dist/review-monitor/verify.js +18 -0
- package/dist/scope/index.d.ts +2 -0
- package/dist/scope/index.js +2 -0
- package/dist/scope/main.d.ts +10 -0
- package/dist/scope/main.js +109 -24
- package/dist/scope/promote-from-issue.d.ts +49 -0
- package/dist/scope/promote-from-issue.js +367 -0
- package/dist/scope/promote-path.d.ts +39 -0
- package/dist/scope/promote-path.js +105 -0
- package/dist/session/ritual-entrypoint.d.ts +6 -2
- package/dist/session/ritual-entrypoint.js +15 -2
- package/dist/session/session-ready.js +31 -14
- package/dist/session/session-start.d.ts +2 -1
- package/dist/session/session-start.js +66 -3
- package/dist/session/verify-session-ritual.d.ts +4 -2
- package/dist/session/verify-session-ritual.js +11 -11
- package/dist/slash/product-set.js +4 -1
- package/dist/swarm/routing.d.ts +4 -2
- package/dist/swarm/routing.js +26 -4
- package/dist/swarm/verify-review-clean.d.ts +4 -3
- package/dist/swarm/verify-review-clean.js +28 -73
- package/dist/triage/actions/index.js +62 -2
- package/dist/triage/actions/types.d.ts +8 -1
- package/dist/triage/author-filter.d.ts +51 -0
- package/dist/triage/author-filter.js +152 -0
- package/dist/triage/classify/index.d.ts +9 -0
- package/dist/triage/classify/index.js +34 -2
- package/dist/triage/classify/label-mirror.d.ts +206 -0
- package/dist/triage/classify/label-mirror.js +914 -0
- package/dist/triage/help/registry-data.d.ts +49 -38
- package/dist/triage/help/registry-data.js +134 -39
- package/dist/triage/index.d.ts +1 -0
- package/dist/triage/index.js +1 -0
- package/dist/triage/queue/index.d.ts +1 -0
- package/dist/triage/queue/index.js +1 -0
- package/dist/triage/queue/render.d.ts +2 -0
- package/dist/triage/queue/render.js +6 -0
- package/dist/triage/queue/show.d.ts +1 -1
- package/dist/triage/queue/show.js +4 -2
- package/dist/vbrief-validate/project-definition.js +1 -1
- package/dist/verify-env/agent-hook-readiness.d.ts +42 -0
- package/dist/verify-env/agent-hook-readiness.js +150 -0
- package/dist/verify-env/agent-hooks-live-probe.d.ts +16 -4
- package/dist/verify-env/agent-hooks-live-probe.js +120 -107
- package/dist/verify-env/agent-hooks.js +11 -3
- package/dist/verify-env/index.d.ts +1 -0
- package/dist/verify-env/index.js +1 -0
- package/package.json +11 -3
|
@@ -114,12 +114,12 @@ export declare const registryData: {
|
|
|
114
114
|
readonly "task triage:queue": {
|
|
115
115
|
readonly name: "task triage:queue";
|
|
116
116
|
readonly summary: "Ranked candidate list";
|
|
117
|
-
readonly refs: "(D11 / #1128)";
|
|
118
|
-
readonly description: "Print the ranked triage queue from the local cache. Groups (display order): [ORPHAN] -> [RESUME] -> [URGENT] -> untriaged -> other -> [BLOCKED]. Within-group default = updated_at desc; consumer plan.policy.triageRankingLabels[] re-orders within-group by matched-label declared order. Items whose linked vBRIEF is blocked (status:blocked / unresolved depends_on) are demoted into [BLOCKED] unless --include-blocked is passed (#1286).";
|
|
119
|
-
readonly usage: "task triage:queue [-- --limit=N] [--include-blocked] [--repo=owner/name]";
|
|
120
|
-
readonly flags: readonly [readonly ["--limit N", "10", "Max rows to print."], readonly ["--include-blocked", "(off)", "Re-surface blocked items into their natural group (#1286)."], readonly ["--repo owner/name", "(git remote)", "Explicit repo override."]];
|
|
121
|
-
readonly examples: readonly ["task triage:queue", "task triage:queue -- --limit=20
|
|
122
|
-
readonly see_also: readonly ["task triage:show", "task triage:audit", "#1119 / D11"];
|
|
117
|
+
readonly refs: "(D11 / #1128, #3129 / #1318 Layer 1)";
|
|
118
|
+
readonly description: "Print the ranked triage queue from the local cache. Groups (display order): [ORPHAN] -> [RESUME] -> [URGENT] -> untriaged -> other -> [BLOCKED]. Within-group default = updated_at desc; consumer plan.policy.triageRankingLabels[] re-orders within-group by matched-label declared order. Items whose linked vBRIEF is blocked (status:blocked / unresolved depends_on) are demoted into [BLOCKED] unless --include-blocked is passed (#1286). Optional --author LOGIN filters to cache author.login (exact; @me resolves to authenticated login; comma allow-list; missing author counted as unknown and disclosed in the header) (#3129 / #1318 Layer 1).";
|
|
119
|
+
readonly usage: "task triage:queue [-- --limit=N] [--include-blocked] [--repo=owner/name] [--author LOGIN|@me] [--author-mine]";
|
|
120
|
+
readonly flags: readonly [readonly ["--limit N", "10", "Max rows to print."], readonly ["--include-blocked", "(off)", "Re-surface blocked items into their natural group (#1286)."], readonly ["--repo owner/name", "(git remote)", "Explicit repo override."], readonly ["--author LOGIN|@me", "(none)", "Only issues whose cache author.login matches (exact; @me = gh user; comma allow-list) (#3129)."], readonly ["--author-mine", "(off)", "Alias for --author @me (#1318 / #3129)."]];
|
|
121
|
+
readonly examples: readonly ["task triage:queue", "task triage:queue -- --limit=20", "task triage:queue -- --author @me", "task triage:queue -- --author alice,bob --limit=20"];
|
|
122
|
+
readonly see_also: readonly ["task triage:show", "task triage:audit", "task triage:classify", "#1119 / D11", "#3129"];
|
|
123
123
|
readonly placeholder: false;
|
|
124
124
|
};
|
|
125
125
|
readonly "task triage:audit": {
|
|
@@ -168,13 +168,13 @@ export declare const registryData: {
|
|
|
168
168
|
};
|
|
169
169
|
readonly "task triage:classify": {
|
|
170
170
|
readonly name: "task triage:classify";
|
|
171
|
-
readonly summary: "Inspect / validate auto-classification
|
|
172
|
-
readonly refs: "(D10 / #1129)";
|
|
173
|
-
readonly description: "Inspect or validate the auto-classification rule set. --list renders effective rules (framework universal first, consumer overrides next). --validate exits non-zero on a malformed plan.policy.triageAutoClassify.";
|
|
174
|
-
readonly usage: "task triage:classify -- [--list | --validate]";
|
|
175
|
-
readonly flags: readonly [readonly ["--list", "(default)", "Print effective rules + hold markers."], readonly ["--validate", "(off)", "Validate plan.policy.triageAutoClassify."]];
|
|
176
|
-
readonly examples: readonly ["task triage:classify -- --list", "task triage:classify -- --validate"];
|
|
177
|
-
readonly see_also: readonly ["task triage:bootstrap", "task triage:queue", "#1119 / D10"];
|
|
171
|
+
readonly summary: "Inspect / validate auto-classification; bootstrap mass-triage label mirror";
|
|
172
|
+
readonly refs: "(D10 / #1129, #1423 Wave 1–2 / #3125, #3129)";
|
|
173
|
+
readonly description: "Inspect or validate the auto-classification rule set. --list renders effective rules (framework universal first, consumer overrides next). --validate exits non-zero on a malformed plan.policy.triageAutoClassify or triageLabelMirror. --mirror is the bootstrap mass-triage entrypoint (#3125): classifies the github-issue cache and mirrors outcomes as SCM labels. Open-only by default (opt-in --include-closed); optional --author LOGIN scopes plan/apply to matching author.login (AND with open-only; #3129); dry-run digest shows totals + by state/rule/action + samples and surfaces the author filter; --apply batches writes with rate-limit delay. Never calls triage:accept / never writes proposed/ xBRIEFs.";
|
|
174
|
+
readonly usage: "task triage:classify -- [--list | --validate | --mirror [--apply] [--include-closed] [--author LOGIN|@me] [--repo owner/name] [--batch-size N] [--delay-ms N] [--sample-limit N] [--json] [--allow-cross-repo]]";
|
|
175
|
+
readonly flags: readonly [readonly ["--list", "(default)", "Print effective rules + hold markers."], readonly ["--validate", "(off)", "Validate plan.policy.triageAutoClassify + triageLabelMirror."], readonly ["--mirror", "(off)", "Bootstrap mass-triage label mirror: classify cache → planned/applied labels (dry-run default, open-only)."], readonly ["--apply", "(off)", "With --mirror: write labels via SCM (batched; requires github SCM boundary)."], readonly ["--include-closed", "(off)", "With --mirror: include closed issues (default open-only avoids archive mass-stamp)."], readonly ["--author LOGIN|@me", "(none)", "With --mirror: only plan/apply issues whose cache author.login matches (exact; @me; comma allow-list) (#3129)."], readonly ["--author-mine", "(off)", "With --mirror: alias for --author @me (#3129)."], readonly ["--repo owner/name", "(all cached)", "Limit mirror to one repo."], readonly ["--batch-size N", "10", "With --mirror --apply: writes per batch before delay."], readonly ["--delay-ms N", "1000", "With --mirror --apply: ms sleep between batches (rate-limit)."], readonly ["--sample-limit N", "15", "With --mirror: max samples in human digest."], readonly ["--json", "(off)", "With --mirror: structured JSON outcome including digest aggregates."], readonly ["--allow-cross-repo", "(off)", "With --mirror --apply: allow non-project repos (#2601)."]];
|
|
176
|
+
readonly examples: readonly ["task triage:classify -- --list", "task triage:classify -- --validate", "task triage:classify -- --mirror", "task triage:classify -- --mirror --author @me --repo owner/name", "task triage:classify -- --mirror --repo owner/name --json", "task triage:classify -- --mirror --apply --repo owner/name --batch-size 10 --delay-ms 1000", "task triage:classify -- --mirror --include-closed --repo owner/name"];
|
|
177
|
+
readonly see_also: readonly ["task triage:bootstrap", "task triage:queue", "task vbrief:reconcile:labels", "#1119 / D10", "#1423", "#3125", "#3129"];
|
|
178
178
|
readonly placeholder: false;
|
|
179
179
|
};
|
|
180
180
|
readonly "task triage:bootstrap": {
|
|
@@ -298,37 +298,48 @@ export declare const registryData: {
|
|
|
298
298
|
readonly see_also: readonly ["task triage:subscribe", "task triage:scope", "#1119 / D14"];
|
|
299
299
|
readonly placeholder: false;
|
|
300
300
|
};
|
|
301
|
-
readonly "task triage:
|
|
302
|
-
readonly name: "task triage:
|
|
303
|
-
readonly summary: "
|
|
304
|
-
readonly refs: "(
|
|
305
|
-
readonly description: "Move closed-
|
|
306
|
-
readonly usage: "task triage:
|
|
307
|
-
readonly flags: readonly [readonly ["--dry-run", "(off)", "
|
|
308
|
-
readonly examples: readonly ["task triage:
|
|
309
|
-
readonly see_also: readonly ["task triage:archive-list", "task triage:restore-from-archive", "
|
|
310
|
-
readonly placeholder:
|
|
301
|
+
readonly "task triage:cache-archive": {
|
|
302
|
+
readonly name: "task triage:cache-archive";
|
|
303
|
+
readonly summary: "Reversible archive of closed github-issue cache entries";
|
|
304
|
+
readonly refs: "(#1137)";
|
|
305
|
+
readonly description: "Move closed-and-aged live `.deft-cache/github-issue/` entries under `.deft-cache/archived/github-issue/...` with archive-meta.json. Operator-only; never auto on check/session/sync. Distinct from task cache:prune (TTL hard-delete). Skips issues referenced in xbrief/{proposed,pending,active}. Alias: cache:archive-closed.";
|
|
306
|
+
readonly usage: "task triage:cache-archive -- [--dry-run] [--older-than-days 30] [--repo owner/name] [--json] [--terminal-decision-only]";
|
|
307
|
+
readonly flags: readonly [readonly ["--dry-run", "(off)", "Report eligible entries without moving."], readonly ["--older-than-days N", "30", "Minimum age of closed_at (or fetched_at/mtime fallback)."], readonly ["--repo owner/name", "(all)", "Limit to one repo."], readonly ["--json", "(off)", "Structured summary."], readonly ["--terminal-decision-only", "(off)", "Only archive when latest candidates decision is reject or mark-duplicate."]];
|
|
308
|
+
readonly examples: readonly ["task triage:cache-archive -- --dry-run", "task triage:cache-archive -- --older-than-days 30 --repo deftai/directive"];
|
|
309
|
+
readonly see_also: readonly ["task triage:archive-list", "task triage:restore-from-archive", "task cache:prune", "#1137"];
|
|
310
|
+
readonly placeholder: false;
|
|
311
311
|
};
|
|
312
312
|
readonly "task triage:archive-list": {
|
|
313
313
|
readonly name: "task triage:archive-list";
|
|
314
|
-
readonly summary: "List archived entries";
|
|
315
|
-
readonly refs: "(
|
|
316
|
-
readonly description: "
|
|
317
|
-
readonly usage: "task triage:archive-list [-- --
|
|
318
|
-
readonly flags: readonly [readonly ["--
|
|
319
|
-
readonly examples: readonly ["task triage:archive-list"];
|
|
320
|
-
readonly see_also: readonly ["task triage:
|
|
321
|
-
readonly placeholder:
|
|
314
|
+
readonly summary: "List archived github-issue cache entries";
|
|
315
|
+
readonly refs: "(#1137)";
|
|
316
|
+
readonly description: "List `.deft-cache/archived/github-issue/...` entries newest archived_at first. Alias: cache:archive-list.";
|
|
317
|
+
readonly usage: "task triage:archive-list -- [--repo owner/name] [--format=json] [--since ISO] [--limit N]";
|
|
318
|
+
readonly flags: readonly [readonly ["--repo owner/name", "(all)", "Limit to one repo."], readonly ["--format=json", "text", "JSON listing."], readonly ["--since ISO", "(none)", "Only entries archived at/after this timestamp."], readonly ["--limit N", "(none)", "Cap result count."]];
|
|
319
|
+
readonly examples: readonly ["task triage:archive-list -- --format=json"];
|
|
320
|
+
readonly see_also: readonly ["task triage:cache-archive", "task triage:restore-from-archive", "#1137"];
|
|
321
|
+
readonly placeholder: false;
|
|
322
322
|
};
|
|
323
323
|
readonly "task triage:restore-from-archive": {
|
|
324
324
|
readonly name: "task triage:restore-from-archive";
|
|
325
|
-
readonly summary: "Restore archived entry to live cache";
|
|
326
|
-
readonly refs: "(
|
|
327
|
-
readonly description: "Move an archived entry back to the live
|
|
328
|
-
readonly usage: "task triage:restore-from-archive --
|
|
329
|
-
readonly flags: readonly [readonly ["
|
|
330
|
-
readonly examples: readonly ["task triage:restore-from-archive --
|
|
331
|
-
readonly see_also: readonly ["task triage:archive
|
|
325
|
+
readonly summary: "Restore archived issue entry to live cache";
|
|
326
|
+
readonly refs: "(#1137)";
|
|
327
|
+
readonly description: "Move an archived github-issue entry back to the live key path. Idempotent if already live with matching content; refuse live conflict unless --force. Alias: cache:restore-from-archive.";
|
|
328
|
+
readonly usage: "task triage:restore-from-archive -- --issue N --repo owner/name [--force]";
|
|
329
|
+
readonly flags: readonly [readonly ["--issue N", "(required unless --key)", "Issue number."], readonly ["--repo owner/name", "(required with --issue)", "Upstream repo."], readonly ["--key owner/repo/N", "(alt)", "Full cache key."], readonly ["--force", "(off)", "Replace live path when content differs."]];
|
|
330
|
+
readonly examples: readonly ["task triage:restore-from-archive -- --issue 1234 --repo deftai/directive"];
|
|
331
|
+
readonly see_also: readonly ["task triage:cache-archive", "task triage:show", "#1137"];
|
|
332
|
+
readonly placeholder: false;
|
|
333
|
+
};
|
|
334
|
+
readonly "task triage:audit:prune": {
|
|
335
|
+
readonly name: "task triage:audit:prune";
|
|
336
|
+
readonly summary: "Legacy name — use triage:cache-archive";
|
|
337
|
+
readonly refs: "(#1137 supersedes D19 name)";
|
|
338
|
+
readonly description: "Historical D19 placeholder name. Implemented surface is task triage:cache-archive (reversible closed github-issue cache archive). Do not confuse with task cache:prune (TTL hard-delete).";
|
|
339
|
+
readonly usage: "task triage:cache-archive -- [--dry-run] [--older-than-days N]";
|
|
340
|
+
readonly flags: readonly [readonly ["--dry-run", "(off)", "Preview eligible entries without writing."], readonly ["--older-than-days N", "30", "Age threshold."]];
|
|
341
|
+
readonly examples: readonly ["task triage:cache-archive -- --dry-run"];
|
|
342
|
+
readonly see_also: readonly ["task triage:cache-archive", "task triage:archive-list", "#1137"];
|
|
332
343
|
readonly placeholder: true;
|
|
333
344
|
};
|
|
334
345
|
readonly "task triage:audit-log:rotate": {
|
|
@@ -170,9 +170,9 @@ export const registryData = {
|
|
|
170
170
|
"task triage:queue": {
|
|
171
171
|
name: "task triage:queue",
|
|
172
172
|
summary: "Ranked candidate list",
|
|
173
|
-
refs: "(D11 / #1128)",
|
|
174
|
-
description: "Print the ranked triage queue from the local cache. Groups (display order): [ORPHAN] -> [RESUME] -> [URGENT] -> untriaged -> other -> [BLOCKED]. Within-group default = updated_at desc; consumer plan.policy.triageRankingLabels[] re-orders within-group by matched-label declared order. Items whose linked vBRIEF is blocked (status:blocked / unresolved depends_on) are demoted into [BLOCKED] unless --include-blocked is passed (#1286).",
|
|
175
|
-
usage: "task triage:queue [-- --limit=N] [--include-blocked] [--repo=owner/name]",
|
|
173
|
+
refs: "(D11 / #1128, #3129 / #1318 Layer 1)",
|
|
174
|
+
description: "Print the ranked triage queue from the local cache. Groups (display order): [ORPHAN] -> [RESUME] -> [URGENT] -> untriaged -> other -> [BLOCKED]. Within-group default = updated_at desc; consumer plan.policy.triageRankingLabels[] re-orders within-group by matched-label declared order. Items whose linked vBRIEF is blocked (status:blocked / unresolved depends_on) are demoted into [BLOCKED] unless --include-blocked is passed (#1286). Optional --author LOGIN filters to cache author.login (exact; @me resolves to authenticated login; comma allow-list; missing author counted as unknown and disclosed in the header) (#3129 / #1318 Layer 1).",
|
|
175
|
+
usage: "task triage:queue [-- --limit=N] [--include-blocked] [--repo=owner/name] [--author LOGIN|@me] [--author-mine]",
|
|
176
176
|
flags: [
|
|
177
177
|
["--limit N", "10", "Max rows to print."],
|
|
178
178
|
[
|
|
@@ -181,13 +181,26 @@ export const registryData = {
|
|
|
181
181
|
"Re-surface blocked items into their natural group (#1286).",
|
|
182
182
|
],
|
|
183
183
|
["--repo owner/name", "(git remote)", "Explicit repo override."],
|
|
184
|
+
[
|
|
185
|
+
"--author LOGIN|@me",
|
|
186
|
+
"(none)",
|
|
187
|
+
"Only issues whose cache author.login matches (exact; @me = gh user; comma allow-list) (#3129).",
|
|
188
|
+
],
|
|
189
|
+
["--author-mine", "(off)", "Alias for --author @me (#1318 / #3129)."],
|
|
184
190
|
],
|
|
185
191
|
examples: [
|
|
186
192
|
"task triage:queue",
|
|
187
|
-
"task triage:queue -- --limit=20
|
|
188
|
-
"task triage:queue -- --
|
|
193
|
+
"task triage:queue -- --limit=20",
|
|
194
|
+
"task triage:queue -- --author @me",
|
|
195
|
+
"task triage:queue -- --author alice,bob --limit=20",
|
|
196
|
+
],
|
|
197
|
+
see_also: [
|
|
198
|
+
"task triage:show",
|
|
199
|
+
"task triage:audit",
|
|
200
|
+
"task triage:classify",
|
|
201
|
+
"#1119 / D11",
|
|
202
|
+
"#3129",
|
|
189
203
|
],
|
|
190
|
-
see_also: ["task triage:show", "task triage:audit", "#1119 / D11"],
|
|
191
204
|
placeholder: false,
|
|
192
205
|
},
|
|
193
206
|
"task triage:audit": {
|
|
@@ -264,16 +277,59 @@ export const registryData = {
|
|
|
264
277
|
},
|
|
265
278
|
"task triage:classify": {
|
|
266
279
|
name: "task triage:classify",
|
|
267
|
-
summary: "Inspect / validate auto-classification
|
|
268
|
-
refs: "(D10 / #1129)",
|
|
269
|
-
description: "Inspect or validate the auto-classification rule set. --list renders effective rules (framework universal first, consumer overrides next). --validate exits non-zero on a malformed plan.policy.triageAutoClassify.",
|
|
270
|
-
usage: "task triage:classify -- [--list | --validate]",
|
|
280
|
+
summary: "Inspect / validate auto-classification; bootstrap mass-triage label mirror",
|
|
281
|
+
refs: "(D10 / #1129, #1423 Wave 1–2 / #3125, #3129)",
|
|
282
|
+
description: "Inspect or validate the auto-classification rule set. --list renders effective rules (framework universal first, consumer overrides next). --validate exits non-zero on a malformed plan.policy.triageAutoClassify or triageLabelMirror. --mirror is the bootstrap mass-triage entrypoint (#3125): classifies the github-issue cache and mirrors outcomes as SCM labels. Open-only by default (opt-in --include-closed); optional --author LOGIN scopes plan/apply to matching author.login (AND with open-only; #3129); dry-run digest shows totals + by state/rule/action + samples and surfaces the author filter; --apply batches writes with rate-limit delay. Never calls triage:accept / never writes proposed/ xBRIEFs.",
|
|
283
|
+
usage: "task triage:classify -- [--list | --validate | --mirror [--apply] [--include-closed] [--author LOGIN|@me] [--repo owner/name] [--batch-size N] [--delay-ms N] [--sample-limit N] [--json] [--allow-cross-repo]]",
|
|
271
284
|
flags: [
|
|
272
285
|
["--list", "(default)", "Print effective rules + hold markers."],
|
|
273
|
-
["--validate", "(off)", "Validate plan.policy.triageAutoClassify."],
|
|
286
|
+
["--validate", "(off)", "Validate plan.policy.triageAutoClassify + triageLabelMirror."],
|
|
287
|
+
[
|
|
288
|
+
"--mirror",
|
|
289
|
+
"(off)",
|
|
290
|
+
"Bootstrap mass-triage label mirror: classify cache → planned/applied labels (dry-run default, open-only).",
|
|
291
|
+
],
|
|
292
|
+
[
|
|
293
|
+
"--apply",
|
|
294
|
+
"(off)",
|
|
295
|
+
"With --mirror: write labels via SCM (batched; requires github SCM boundary).",
|
|
296
|
+
],
|
|
297
|
+
[
|
|
298
|
+
"--include-closed",
|
|
299
|
+
"(off)",
|
|
300
|
+
"With --mirror: include closed issues (default open-only avoids archive mass-stamp).",
|
|
301
|
+
],
|
|
302
|
+
[
|
|
303
|
+
"--author LOGIN|@me",
|
|
304
|
+
"(none)",
|
|
305
|
+
"With --mirror: only plan/apply issues whose cache author.login matches (exact; @me; comma allow-list) (#3129).",
|
|
306
|
+
],
|
|
307
|
+
["--author-mine", "(off)", "With --mirror: alias for --author @me (#3129)."],
|
|
308
|
+
["--repo owner/name", "(all cached)", "Limit mirror to one repo."],
|
|
309
|
+
["--batch-size N", "10", "With --mirror --apply: writes per batch before delay."],
|
|
310
|
+
["--delay-ms N", "1000", "With --mirror --apply: ms sleep between batches (rate-limit)."],
|
|
311
|
+
["--sample-limit N", "15", "With --mirror: max samples in human digest."],
|
|
312
|
+
["--json", "(off)", "With --mirror: structured JSON outcome including digest aggregates."],
|
|
313
|
+
["--allow-cross-repo", "(off)", "With --mirror --apply: allow non-project repos (#2601)."],
|
|
314
|
+
],
|
|
315
|
+
examples: [
|
|
316
|
+
"task triage:classify -- --list",
|
|
317
|
+
"task triage:classify -- --validate",
|
|
318
|
+
"task triage:classify -- --mirror",
|
|
319
|
+
"task triage:classify -- --mirror --author @me --repo owner/name",
|
|
320
|
+
"task triage:classify -- --mirror --repo owner/name --json",
|
|
321
|
+
"task triage:classify -- --mirror --apply --repo owner/name --batch-size 10 --delay-ms 1000",
|
|
322
|
+
"task triage:classify -- --mirror --include-closed --repo owner/name",
|
|
323
|
+
],
|
|
324
|
+
see_also: [
|
|
325
|
+
"task triage:bootstrap",
|
|
326
|
+
"task triage:queue",
|
|
327
|
+
"task vbrief:reconcile:labels",
|
|
328
|
+
"#1119 / D10",
|
|
329
|
+
"#1423",
|
|
330
|
+
"#3125",
|
|
331
|
+
"#3129",
|
|
274
332
|
],
|
|
275
|
-
examples: ["task triage:classify -- --list", "task triage:classify -- --validate"],
|
|
276
|
-
see_also: ["task triage:bootstrap", "task triage:queue", "#1119 / D10"],
|
|
277
333
|
placeholder: false,
|
|
278
334
|
},
|
|
279
335
|
"task triage:bootstrap": {
|
|
@@ -473,40 +529,79 @@ export const registryData = {
|
|
|
473
529
|
see_also: ["task triage:subscribe", "task triage:scope", "#1119 / D14"],
|
|
474
530
|
placeholder: false,
|
|
475
531
|
},
|
|
476
|
-
"task triage:
|
|
477
|
-
name: "task triage:
|
|
478
|
-
summary: "
|
|
479
|
-
refs: "(
|
|
480
|
-
description: "Move closed-
|
|
481
|
-
usage: "task triage:
|
|
532
|
+
"task triage:cache-archive": {
|
|
533
|
+
name: "task triage:cache-archive",
|
|
534
|
+
summary: "Reversible archive of closed github-issue cache entries",
|
|
535
|
+
refs: "(#1137)",
|
|
536
|
+
description: "Move closed-and-aged live `.deft-cache/github-issue/` entries under `.deft-cache/archived/github-issue/...` with archive-meta.json. Operator-only; never auto on check/session/sync. Distinct from task cache:prune (TTL hard-delete). Skips issues referenced in xbrief/{proposed,pending,active}. Alias: cache:archive-closed.",
|
|
537
|
+
usage: "task triage:cache-archive -- [--dry-run] [--older-than-days 30] [--repo owner/name] [--json] [--terminal-decision-only]",
|
|
482
538
|
flags: [
|
|
483
|
-
["--dry-run", "(off)", "
|
|
484
|
-
["--older-than-days N", "30", "
|
|
539
|
+
["--dry-run", "(off)", "Report eligible entries without moving."],
|
|
540
|
+
["--older-than-days N", "30", "Minimum age of closed_at (or fetched_at/mtime fallback)."],
|
|
541
|
+
["--repo owner/name", "(all)", "Limit to one repo."],
|
|
542
|
+
["--json", "(off)", "Structured summary."],
|
|
543
|
+
[
|
|
544
|
+
"--terminal-decision-only",
|
|
545
|
+
"(off)",
|
|
546
|
+
"Only archive when latest candidates decision is reject or mark-duplicate.",
|
|
547
|
+
],
|
|
485
548
|
],
|
|
486
|
-
examples: [
|
|
487
|
-
|
|
488
|
-
|
|
549
|
+
examples: [
|
|
550
|
+
"task triage:cache-archive -- --dry-run",
|
|
551
|
+
"task triage:cache-archive -- --older-than-days 30 --repo deftai/directive",
|
|
552
|
+
],
|
|
553
|
+
see_also: [
|
|
554
|
+
"task triage:archive-list",
|
|
555
|
+
"task triage:restore-from-archive",
|
|
556
|
+
"task cache:prune",
|
|
557
|
+
"#1137",
|
|
558
|
+
],
|
|
559
|
+
placeholder: false,
|
|
489
560
|
},
|
|
490
561
|
"task triage:archive-list": {
|
|
491
562
|
name: "task triage:archive-list",
|
|
492
|
-
summary: "List archived entries",
|
|
493
|
-
refs: "(
|
|
494
|
-
description: "
|
|
495
|
-
usage: "task triage:archive-list [-- --
|
|
496
|
-
flags: [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
563
|
+
summary: "List archived github-issue cache entries",
|
|
564
|
+
refs: "(#1137)",
|
|
565
|
+
description: "List `.deft-cache/archived/github-issue/...` entries newest archived_at first. Alias: cache:archive-list.",
|
|
566
|
+
usage: "task triage:archive-list -- [--repo owner/name] [--format=json] [--since ISO] [--limit N]",
|
|
567
|
+
flags: [
|
|
568
|
+
["--repo owner/name", "(all)", "Limit to one repo."],
|
|
569
|
+
["--format=json", "text", "JSON listing."],
|
|
570
|
+
["--since ISO", "(none)", "Only entries archived at/after this timestamp."],
|
|
571
|
+
["--limit N", "(none)", "Cap result count."],
|
|
572
|
+
],
|
|
573
|
+
examples: ["task triage:archive-list -- --format=json"],
|
|
574
|
+
see_also: ["task triage:cache-archive", "task triage:restore-from-archive", "#1137"],
|
|
575
|
+
placeholder: false,
|
|
500
576
|
},
|
|
501
577
|
"task triage:restore-from-archive": {
|
|
502
578
|
name: "task triage:restore-from-archive",
|
|
503
|
-
summary: "Restore archived entry to live cache",
|
|
504
|
-
refs: "(
|
|
505
|
-
description: "Move an archived entry back to the live
|
|
506
|
-
usage: "task triage:restore-from-archive --
|
|
507
|
-
flags: [
|
|
508
|
-
|
|
509
|
-
|
|
579
|
+
summary: "Restore archived issue entry to live cache",
|
|
580
|
+
refs: "(#1137)",
|
|
581
|
+
description: "Move an archived github-issue entry back to the live key path. Idempotent if already live with matching content; refuse live conflict unless --force. Alias: cache:restore-from-archive.",
|
|
582
|
+
usage: "task triage:restore-from-archive -- --issue N --repo owner/name [--force]",
|
|
583
|
+
flags: [
|
|
584
|
+
["--issue N", "(required unless --key)", "Issue number."],
|
|
585
|
+
["--repo owner/name", "(required with --issue)", "Upstream repo."],
|
|
586
|
+
["--key owner/repo/N", "(alt)", "Full cache key."],
|
|
587
|
+
["--force", "(off)", "Replace live path when content differs."],
|
|
588
|
+
],
|
|
589
|
+
examples: ["task triage:restore-from-archive -- --issue 1234 --repo deftai/directive"],
|
|
590
|
+
see_also: ["task triage:cache-archive", "task triage:show", "#1137"],
|
|
591
|
+
placeholder: false,
|
|
592
|
+
},
|
|
593
|
+
"task triage:audit:prune": {
|
|
594
|
+
name: "task triage:audit:prune",
|
|
595
|
+
summary: "Legacy name — use triage:cache-archive",
|
|
596
|
+
refs: "(#1137 supersedes D19 name)",
|
|
597
|
+
description: "Historical D19 placeholder name. Implemented surface is task triage:cache-archive (reversible closed github-issue cache archive). Do not confuse with task cache:prune (TTL hard-delete).",
|
|
598
|
+
usage: "task triage:cache-archive -- [--dry-run] [--older-than-days N]",
|
|
599
|
+
flags: [
|
|
600
|
+
["--dry-run", "(off)", "Preview eligible entries without writing."],
|
|
601
|
+
["--older-than-days N", "30", "Age threshold."],
|
|
602
|
+
],
|
|
603
|
+
examples: ["task triage:cache-archive -- --dry-run"],
|
|
604
|
+
see_also: ["task triage:cache-archive", "task triage:archive-list", "#1137"],
|
|
510
605
|
placeholder: true,
|
|
511
606
|
},
|
|
512
607
|
"task triage:audit-log:rotate": {
|
package/dist/triage/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* ...) without colliding.
|
|
8
8
|
*/
|
|
9
9
|
export * as actions from "./actions/index.js";
|
|
10
|
+
export * as authorFilter from "./author-filter.js";
|
|
10
11
|
export * as bootstrap from "./bootstrap/index.js";
|
|
11
12
|
export * as bulk from "./bulk/index.js";
|
|
12
13
|
export * as cachePath from "./cache-path.js";
|
package/dist/triage/index.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* ...) without colliding.
|
|
8
8
|
*/
|
|
9
9
|
export * as actions from "./actions/index.js";
|
|
10
|
+
export * as authorFilter from "./author-filter.js";
|
|
10
11
|
export * as bootstrap from "./bootstrap/index.js";
|
|
11
12
|
export * as bulk from "./bulk/index.js";
|
|
12
13
|
export * as cachePath from "./cache-path.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { type AuthorFilter, type AuthorFilterResolveResult, type AuthorPartitionResult, authorLoginFromRawIssue, defaultResolveAuthenticatedLogin, formatAuthorFilterLine, matchesAuthorFilter, normalizeAuthorLogin, parseAuthorTokens, partitionByAuthorFilter, type ResolveAuthenticatedLogin, resolveAuthorFilter, } from "../author-filter.js";
|
|
1
2
|
export * from "./audit.js";
|
|
2
3
|
export * from "./build-queue.js";
|
|
3
4
|
export * from "./cache.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { authorLoginFromRawIssue, defaultResolveAuthenticatedLogin, formatAuthorFilterLine, matchesAuthorFilter, normalizeAuthorLogin, parseAuthorTokens, partitionByAuthorFilter, resolveAuthorFilter, } from "../author-filter.js";
|
|
1
2
|
export * from "./audit.js";
|
|
2
3
|
export * from "./build-queue.js";
|
|
3
4
|
export * from "./cache.js";
|
|
@@ -5,5 +5,7 @@ export declare function renderQueue(options: {
|
|
|
5
5
|
readonly repo: string;
|
|
6
6
|
readonly limit?: number | null;
|
|
7
7
|
readonly rankingLabels?: readonly string[];
|
|
8
|
+
/** Active author filter disclosure line (#3129 / #1318 Layer 1). */
|
|
9
|
+
readonly authorFilterLine?: string | null;
|
|
8
10
|
}): string;
|
|
9
11
|
//# sourceMappingURL=render.d.ts.map
|
|
@@ -16,6 +16,12 @@ export function renderQueue(options) {
|
|
|
16
16
|
else {
|
|
17
17
|
lines.push(" consumer ranking labels: <empty> (framework default; within-group = updated_at desc)");
|
|
18
18
|
}
|
|
19
|
+
if (options.authorFilterLine !== null && options.authorFilterLine !== undefined) {
|
|
20
|
+
const line = options.authorFilterLine.trim();
|
|
21
|
+
if (line.length > 0) {
|
|
22
|
+
lines.push(` ${line}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
if (options.limit !== null && options.limit !== undefined) {
|
|
20
26
|
lines.push(` limit: ${options.limit}`);
|
|
21
27
|
}
|
|
@@ -58,7 +58,7 @@ export declare function extractBodySummary(body: string, maxLines?: number): str
|
|
|
58
58
|
* Looks for AC / Acceptance headings and checkbox / bullet lists under them.
|
|
59
59
|
*/
|
|
60
60
|
export declare function extractAcceptanceCriteria(body: string): readonly string[];
|
|
61
|
-
/** Operator-facing pasteable brief backbone for Phase 3 decisions (#2890). */
|
|
61
|
+
/** Operator-facing pasteable brief backbone for Phase 3 decisions (#2890 / #3116). */
|
|
62
62
|
export declare function renderOperatorBrief(options: {
|
|
63
63
|
readonly issue: CachedIssueDetail | null;
|
|
64
64
|
readonly repo: string;
|
|
@@ -245,7 +245,7 @@ export function extractAcceptanceCriteria(body) {
|
|
|
245
245
|
}
|
|
246
246
|
return bullets.slice(0, 12);
|
|
247
247
|
}
|
|
248
|
-
/** Operator-facing pasteable brief backbone for Phase 3 decisions (#2890). */
|
|
248
|
+
/** Operator-facing pasteable brief backbone for Phase 3 decisions (#2890 / #3116). */
|
|
249
249
|
export function renderOperatorBrief(options) {
|
|
250
250
|
const lines = [];
|
|
251
251
|
lines.push(`triage:show --format=operator -- ${options.repo}#${options.number}`);
|
|
@@ -258,9 +258,11 @@ export function renderOperatorBrief(options) {
|
|
|
258
258
|
const issue = options.issue;
|
|
259
259
|
const link = issue.htmlUrl ?? resolveIssueHtmlUrl(options.repo, options.number);
|
|
260
260
|
const labels = issue.labels.length > 0 ? issue.labels.map(oneLine).join(", ") : "<none>";
|
|
261
|
+
// URL-first lead line (#3116): canonical issue URL before title/body fields.
|
|
262
|
+
lines.push(oneLine(link));
|
|
261
263
|
lines.push(`#${options.number} ${oneLine(issue.title)}`);
|
|
262
|
-
lines.push(`link: ${oneLine(link)}`);
|
|
263
264
|
lines.push(`labels: ${labels}`);
|
|
265
|
+
lines.push("validity: (agent-owned — still-open | partial | likely-shipped | needs-re-scope + evidence)");
|
|
264
266
|
lines.push("");
|
|
265
267
|
lines.push("summary:");
|
|
266
268
|
for (const line of extractBodySummary(issue.body).split("\n")) {
|
|
@@ -78,7 +78,7 @@ export function validateProjectDefinition(filepath, data, vbriefDir) {
|
|
|
78
78
|
}
|
|
79
79
|
const uriRaw = ref.uri;
|
|
80
80
|
const uri = typeof uriRaw === "string" ? uriRaw : "";
|
|
81
|
-
if (uri
|
|
81
|
+
if (uri.startsWith("file://")) {
|
|
82
82
|
const refPath = uri.replace("file://", "");
|
|
83
83
|
const fullPath = resolve(vbriefDir, refPath);
|
|
84
84
|
if (!isRelativeTo(fullPath, resolvedRoot)) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { HookHost } from "../hooks/dispatcher.js";
|
|
2
|
+
import type { AgentHookInspection } from "../init-deposit/agent-hooks.js";
|
|
3
|
+
import type { HostHooksPolicy } from "../policy/host-hooks.js";
|
|
4
|
+
import { type AgentHookHealthResult } from "./agent-hooks.js";
|
|
5
|
+
import { type AgentHookLiveProbeResult, type AgentHookLiveProbeSeams } from "./agent-hooks-live-probe.js";
|
|
6
|
+
import type { OutputStream } from "./verify-hooks-installed.js";
|
|
7
|
+
export type AgentHookReadinessRegistration = "registered" | "disabled" | "missing" | "drifted" | "not-applicable";
|
|
8
|
+
export type AgentHookReadinessFunctionality = "functional" | "non-functional" | "unavailable" | "not-run" | "disabled" | "not-applicable";
|
|
9
|
+
export type AgentHookReadinessTrust = "manual-review-required" | "not-applicable" | "disabled";
|
|
10
|
+
export type AgentHookReadinessInterception = "not-directly-verified" | "not-applicable" | "disabled";
|
|
11
|
+
export type AgentHookReadinessLiveStatus = "functional" | "non-functional" | "unavailable" | "not-run" | "disabled" | "skipped";
|
|
12
|
+
export interface AgentHookReadinessHostResult {
|
|
13
|
+
readonly host: HookHost;
|
|
14
|
+
readonly registration: AgentHookReadinessRegistration;
|
|
15
|
+
readonly functionality: AgentHookReadinessFunctionality;
|
|
16
|
+
readonly trust: AgentHookReadinessTrust;
|
|
17
|
+
readonly interception: AgentHookReadinessInterception;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentHookReadinessResult {
|
|
20
|
+
readonly code: 0 | 1 | 2;
|
|
21
|
+
readonly message: string;
|
|
22
|
+
readonly stream: OutputStream;
|
|
23
|
+
readonly skipped: boolean;
|
|
24
|
+
readonly liveStatus: AgentHookReadinessLiveStatus;
|
|
25
|
+
readonly hosts: readonly AgentHookReadinessHostResult[];
|
|
26
|
+
readonly registrations: readonly AgentHookInspection[];
|
|
27
|
+
readonly liveProbe: AgentHookLiveProbeResult | null;
|
|
28
|
+
}
|
|
29
|
+
export interface AgentHookReadinessOptions {
|
|
30
|
+
readonly hostHooksPolicy?: HostHooksPolicy;
|
|
31
|
+
readonly consumerContext?: (projectRoot: string) => boolean;
|
|
32
|
+
readonly evaluateStructural?: (projectRoot: string, policy: HostHooksPolicy) => AgentHookHealthResult;
|
|
33
|
+
readonly probeLive?: (projectRoot: string, seams?: AgentHookLiveProbeSeams) => AgentHookLiveProbeResult;
|
|
34
|
+
readonly liveProbeSeams?: Omit<AgentHookLiveProbeSeams, "hosts">;
|
|
35
|
+
}
|
|
36
|
+
/** Stable CLI JSON projection; keep the four readiness dimensions orthogonal. */
|
|
37
|
+
export declare function agentHookReadinessJson(result: AgentHookReadinessResult): Record<string, unknown>;
|
|
38
|
+
/** Preserve fail-closed readiness semantics when an unexpected evaluator dependency throws. */
|
|
39
|
+
export declare function evaluateAgentHookReadinessSafely(projectRoot: string, evaluate?: (projectRoot: string) => AgentHookReadinessResult): AgentHookReadinessResult;
|
|
40
|
+
/** Fail-closed consumer readiness: structural registration first, installed-shim live probe second. */
|
|
41
|
+
export declare function evaluateAgentHookReadiness(projectRoot: string, options?: AgentHookReadinessOptions): AgentHookReadinessResult;
|
|
42
|
+
//# sourceMappingURL=agent-hook-readiness.d.ts.map
|