@deftai/directive-core 0.70.0 → 0.71.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/branch/evaluate.js +7 -0
- package/dist/doctor/doctor-state.js +2 -2
- package/dist/eval/crud-telemetry.d.ts +59 -0
- package/dist/eval/crud-telemetry.js +307 -0
- package/dist/eval/health.d.ts +52 -0
- package/dist/eval/health.js +240 -0
- package/dist/eval/readback.d.ts +38 -0
- package/dist/eval/readback.js +209 -0
- package/dist/eval/report.d.ts +53 -0
- package/dist/eval/report.js +161 -0
- package/dist/eval/run.d.ts +79 -0
- package/dist/eval/run.js +309 -0
- package/dist/events/attribution-constants.d.ts +13 -0
- package/dist/events/attribution-constants.js +18 -0
- package/dist/events/attribution-ledger.d.ts +43 -0
- package/dist/events/attribution-ledger.js +61 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/init-deposit/gitignore.js +5 -5
- package/dist/layout/resolve.d.ts +2 -2
- package/dist/layout/resolve.js +2 -2
- package/dist/lifecycle/events.js +2 -0
- package/dist/policy/index.d.ts +2 -1
- package/dist/policy/index.js +15 -2
- package/dist/policy/value-feedback.d.ts +56 -0
- package/dist/policy/value-feedback.js +284 -0
- package/dist/preflight-cache/evaluate.js +4 -3
- package/dist/scope/audit-log.js +3 -3
- package/dist/scope/transition.js +16 -5
- package/dist/session/session-start.js +20 -0
- package/dist/slice/record.js +3 -3
- package/dist/triage/actions/candidates-log.d.ts +4 -4
- package/dist/triage/actions/candidates-log.js +4 -7
- package/dist/triage/bootstrap/gitignore.d.ts +7 -3
- package/dist/triage/bootstrap/gitignore.js +67 -37
- package/dist/triage/bootstrap/index.d.ts +1 -1
- package/dist/triage/bootstrap/index.js +4 -3
- package/dist/triage/bulk/index.js +2 -2
- package/dist/triage/cache-path.d.ts +39 -0
- package/dist/triage/cache-path.js +98 -0
- package/dist/triage/help/registry-data.d.ts +48 -15
- package/dist/triage/help/registry-data.js +86 -15
- package/dist/triage/index.d.ts +2 -0
- package/dist/triage/index.js +2 -0
- package/dist/triage/queue/audit.js +2 -2
- package/dist/triage/queue/cache.js +2 -2
- package/dist/triage/reconcile/reconcile.js +4 -3
- package/dist/triage/scope/mutations-core.js +3 -2
- package/dist/triage/subscribe/index.d.ts +1 -1
- package/dist/triage/subscribe/index.js +4 -3
- package/dist/triage/summary/index.d.ts +2 -2
- package/dist/triage/summary/index.js +4 -3
- package/dist/triage/summary/reconcilable.d.ts +1 -1
- package/dist/triage/summary/reconcilable.js +3 -2
- package/dist/triage/welcome/constants.d.ts +2 -2
- package/dist/triage/welcome/constants.js +2 -2
- package/dist/triage/welcome/prior-state.js +3 -2
- package/dist/triage/welcome/summary.js +5 -4
- package/dist/value/adoption-emit.d.ts +14 -0
- package/dist/value/adoption-emit.js +67 -0
- package/dist/value/adoption-registry.d.ts +62 -0
- package/dist/value/adoption-registry.js +214 -0
- package/dist/value/feedback-file.d.ts +67 -0
- package/dist/value/feedback-file.js +353 -0
- package/dist/value/friction-emit.d.ts +10 -0
- package/dist/value/friction-emit.js +24 -0
- package/dist/value/readback.d.ts +86 -0
- package/dist/value/readback.js +503 -0
- package/dist/vbrief-validate/decomposition.js +1 -1
- package/dist/wip-cap/evaluate.js +3 -0
- package/package.json +35 -3
|
@@ -5,7 +5,7 @@ export declare const registryData: {
|
|
|
5
5
|
readonly name: "task triage:summary";
|
|
6
6
|
readonly summary: "One-line state for session-start ritual";
|
|
7
7
|
readonly refs: "(D2 / #1122)";
|
|
8
|
-
readonly description: "Emit the one-line triage state consumed by the session-start ritual. Always exits 0 (status surface, not a gate); appends a JSONL record to vbrief/.
|
|
8
|
+
readonly description: "Emit the one-line triage state consumed by the session-start ritual. Always exits 0 (status surface, not a gate); appends a JSONL record to vbrief/.triage-cache/summary-history.jsonl for observability.";
|
|
9
9
|
readonly usage: "task triage:summary [-- --json] [--no-history]";
|
|
10
10
|
readonly flags: readonly [readonly ["--json", "(off)", "Emit the structured record as JSON instead of the one-liner."], readonly ["--no-history", "(off)", "Suppress the history sidecar append (test-only)."], readonly ["--project-root PATH", "(cwd)", "Project root override (Taskfile threads USER_WORKING_DIR)."]];
|
|
11
11
|
readonly examples: readonly ["task triage:summary", "task triage:summary -- --json | jq"];
|
|
@@ -203,7 +203,7 @@ export declare const registryData: {
|
|
|
203
203
|
readonly name: "task triage:reconcile";
|
|
204
204
|
readonly summary: "Self-heal audit log from on-disk vBRIEFs";
|
|
205
205
|
readonly refs: "(#1468)";
|
|
206
|
-
readonly description: "Idempotent repair verb: derive missing `accept` decisions for proposed/pending/active vBRIEFs that carry an x-vbrief/github-issue reference but have no entry in vbrief/.
|
|
206
|
+
readonly description: "Idempotent repair verb: derive missing `accept` decisions for proposed/pending/active vBRIEFs that carry an x-vbrief/github-issue reference but have no entry in vbrief/.triage-cache/candidates.jsonl. Recovers triage state after the gitignored audit log is reset/lost (#1464) without a full cache re-fetch. Never overrides an existing decision, so a re-run is a no-op.";
|
|
207
207
|
readonly usage: "task triage:reconcile [-- --repo owner/name] [--dry-run] [--json]";
|
|
208
208
|
readonly flags: readonly [readonly ["--repo owner/name", "(ref URI / git remote)", "Fallback repo for refs lacking owner/name."], readonly ["--dry-run", "(off)", "Report what would be restored without writing."], readonly ["--json", "(off)", "Structured JSON output."]];
|
|
209
209
|
readonly examples: readonly ["task triage:reconcile -- --dry-run", "task triage:reconcile -- --repo deftai/directive"];
|
|
@@ -280,7 +280,7 @@ export declare const registryData: {
|
|
|
280
280
|
readonly name: "task triage:subscribe";
|
|
281
281
|
readonly summary: "Add label/milestone/issue to subscription";
|
|
282
282
|
readonly refs: "(D14 / #1133)";
|
|
283
|
-
readonly description: "Subscribe to a label / milestone / issue by appending a rule to plan.policy.triageScope[]. Emits a JSONL audit record to vbrief/.
|
|
283
|
+
readonly description: "Subscribe to a label / milestone / issue by appending a rule to plan.policy.triageScope[]. Emits a JSONL audit record to vbrief/.triage-cache/subscription-history.jsonl.";
|
|
284
284
|
readonly usage: "task triage:subscribe -- (--label=L | --milestone=M | --issue=N)";
|
|
285
285
|
readonly flags: readonly [readonly ["--label L", "(none)", "Subscribe to a label."], readonly ["--milestone M", "(none)", "Subscribe to a milestone."], readonly ["--issue N", "(none)", "Subscribe to a single issue."]];
|
|
286
286
|
readonly examples: readonly ["task triage:subscribe -- --label='area:swarm'", "task triage:subscribe -- --milestone='v0.32.0'"];
|
|
@@ -335,7 +335,7 @@ export declare const registryData: {
|
|
|
335
335
|
readonly name: "task triage:audit-log:rotate";
|
|
336
336
|
readonly summary: "Rotate candidates.jsonl when bounded";
|
|
337
337
|
readonly refs: "(D20, coming)";
|
|
338
|
-
readonly description: "Rotate vbrief/.
|
|
338
|
+
readonly description: "Rotate vbrief/.triage-cache/candidates.jsonl when it exceeds the configured bound. Compacts terminal entries and preserves the open-work tail.";
|
|
339
339
|
readonly usage: "task triage:audit-log:rotate [-- --max-lines N]";
|
|
340
340
|
readonly flags: readonly [readonly ["--max-lines N", "(consumer default)", "Bound at which rotation fires."]];
|
|
341
341
|
readonly examples: readonly ["task triage:audit-log:rotate -- --max-lines 10000"];
|
|
@@ -344,14 +344,47 @@ export declare const registryData: {
|
|
|
344
344
|
};
|
|
345
345
|
readonly "task triage:metrics": {
|
|
346
346
|
readonly name: "task triage:metrics";
|
|
347
|
-
readonly summary: "
|
|
348
|
-
readonly refs: "(
|
|
349
|
-
readonly description: "
|
|
347
|
+
readonly summary: "Attributed-value trend from the events ledger";
|
|
348
|
+
readonly refs: "(#1709)";
|
|
349
|
+
readonly description: "Report value-feedback attribution trends from .deft-cache/events.jsonl: total signal count plus per-class (value, bypass, adoption, friction) and per-event breakdowns over a time window. Alias of the value:show handler. Requires plan.policy.valueFeedback.enabled (default OFF) — exits blocked when disabled; an empty ledger prints a no-signals message. In the maintainer repo, skipped unless DEFT_VALUE_SELF_DOGFOOD=1.";
|
|
350
350
|
readonly usage: "task triage:metrics [-- --window=7d] [--format=text|json]";
|
|
351
|
-
readonly flags: readonly [readonly ["--window WINDOW", "7d", "Time window
|
|
352
|
-
readonly examples: readonly ["task triage:metrics -- --window
|
|
353
|
-
readonly see_also: readonly ["task
|
|
354
|
-
readonly placeholder:
|
|
351
|
+
readonly flags: readonly [readonly ["--window WINDOW", "7d", "Time window (e.g. 7d, 30d, 24h)."], readonly ["--format text|json", "text", "Output shape (json emits the full trend object)."]];
|
|
352
|
+
readonly examples: readonly ["task triage:metrics", "task triage:metrics -- --window=30d --format=json"];
|
|
353
|
+
readonly see_also: readonly ["task policy:show --field=valueFeedback", "task policy:enable-value-feedback -- --confirm", "#1709"];
|
|
354
|
+
readonly placeholder: false;
|
|
355
|
+
};
|
|
356
|
+
readonly "task eval:health": {
|
|
357
|
+
readonly name: "task eval:health";
|
|
358
|
+
readonly summary: "Tier 0 static framework health score";
|
|
359
|
+
readonly refs: "(#1703)";
|
|
360
|
+
readonly description: "Aggregate static self-consistency gates (encoding, links, vBRIEF conformance, AGENTS.md freshness; content-manifest on framework-source trees) into a versioned 0–100 score. Detects contradictory / unsatisfiable gate pairs (#1694). Appends each run to .eval/results/health-history.jsonl. Session start may emit a budgeted [eval] advisory when health degrades.";
|
|
361
|
+
readonly usage: "task eval:health [-- --json] [--no-persist] [--project-root PATH]";
|
|
362
|
+
readonly flags: readonly [readonly ["--json", "(off)", "Emit the structured HealthReport instead of the human summary."], readonly ["--no-persist", "(off)", "Run probes without appending to the health history ledger."], readonly ["--project-root PATH", "(cwd)", "Project root override (Taskfile threads USER_WORKING_DIR)."]];
|
|
363
|
+
readonly examples: readonly ["task eval:health", "task eval:health -- --json"];
|
|
364
|
+
readonly see_also: readonly ["task eval:run", "task eval:report", "#1703"];
|
|
365
|
+
readonly placeholder: false;
|
|
366
|
+
};
|
|
367
|
+
readonly "task eval:run": {
|
|
368
|
+
readonly name: "task eval:run";
|
|
369
|
+
readonly summary: "Tier 2 golden corpus eval for a model";
|
|
370
|
+
readonly refs: "(#1703)";
|
|
371
|
+
readonly description: "Execute the fixed golden corpus with objective graders (CRUD schema/invention, surgical update, health fixture, rotating holdout tasks). Persists results to .eval/results/golden-runs.jsonl for champion–challenger diffs.";
|
|
372
|
+
readonly usage: "task eval:run -- --model MODEL [--seed N] [--directive-version V] [--harness NAME] [--json] [--no-persist]";
|
|
373
|
+
readonly flags: readonly [readonly ["--model MODEL", "(required)", "Model identifier for the run record."], readonly ["--seed N", "(1,2,3)", "Repeatable seed(s); pass multiple --seed flags."], readonly ["--directive-version V", "(engine version)", "Pin the directive version label."], readonly ["--harness NAME", "deterministic-fixture", "Harness label stored on the run record."], readonly ["--json", "(off)", "Emit the GoldenRunRecord JSON."], readonly ["--no-persist", "(off)", "Run without appending to golden-runs.jsonl."], readonly ["--project-root PATH", "(cwd)", "Project root override (Taskfile threads USER_WORKING_DIR)."]];
|
|
374
|
+
readonly examples: readonly ["task eval:run -- --model gpt-5", "task eval:run -- --model claude-sonnet --seed 1 --seed 2 --json"];
|
|
375
|
+
readonly see_also: readonly ["task eval:report", "task eval:health", "#1703"];
|
|
376
|
+
readonly placeholder: false;
|
|
377
|
+
};
|
|
378
|
+
readonly "task eval:report": {
|
|
379
|
+
readonly name: "task eval:report";
|
|
380
|
+
readonly summary: "Tier 2 champion–challenger diff with significance";
|
|
381
|
+
readonly refs: "(#1703)";
|
|
382
|
+
readonly description: "Diff two directive versions' latest golden runs for a model: primary/holdout/overall pass-rate deltas with two-proportion significance and a holdout tripwire when primary gains do not generalize (#1703 Goodhart guard).";
|
|
383
|
+
readonly usage: "task eval:report -- --champion V --challenger V --model MODEL [--json] [--project-root PATH]";
|
|
384
|
+
readonly flags: readonly [readonly ["--champion V", "(required)", "Baseline directive version."], readonly ["--challenger V", "(required)", "Candidate directive version."], readonly ["--model MODEL", "(required)", "Model identifier shared by both runs."], readonly ["--json", "(off)", "Emit the GoldenEvalReport JSON."], readonly ["--project-root PATH", "(cwd)", "Project root override (Taskfile threads USER_WORKING_DIR)."]];
|
|
385
|
+
readonly examples: readonly ["task eval:report -- --champion 0.58.0 --challenger 0.59.0 --model gpt-5"];
|
|
386
|
+
readonly see_also: readonly ["task eval:run", "task eval:health", "#1703"];
|
|
387
|
+
readonly placeholder: false;
|
|
355
388
|
};
|
|
356
389
|
readonly "task scope:promote": {
|
|
357
390
|
readonly name: "task scope:promote";
|
|
@@ -368,7 +401,7 @@ export declare const registryData: {
|
|
|
368
401
|
readonly name: "task scope:demote";
|
|
369
402
|
readonly summary: "pending/ -> proposed/ (set status proposed)";
|
|
370
403
|
readonly refs: "(D1 / #1121)";
|
|
371
|
-
readonly description: "Demote a vBRIEF scope from vbrief/pending/ back to vbrief/proposed/ and append a structured audit entry (including a demote_meta block) to vbrief/.
|
|
404
|
+
readonly description: "Demote a vBRIEF scope from vbrief/pending/ back to vbrief/proposed/ and append a structured audit entry (including a demote_meta block) to vbrief/.triage-cache/scope-lifecycle.jsonl. Supports single-file and --batch (cohort shrink / cap relief) modes.";
|
|
372
405
|
readonly usage: "task scope:demote -- <file> [--reason TEXT] | task scope:demote -- --batch [--older-than-days N]";
|
|
373
406
|
readonly flags: readonly [readonly ["<file>", "(required for single)", "Path to vBRIEF."], readonly ["--batch", "(off)", "Batch mode: demote every pending older than --older-than-days."], readonly ["--older-than-days N", "45", "Batch-mode age threshold."], readonly ["--reason TEXT", "operator-requested", "Free-text reason for single-demote."], readonly ["--actor STR", "operator", "Actor identity recorded in the audit entry."]];
|
|
374
407
|
readonly examples: readonly ["task scope:demote -- vbrief/pending/2026-05-19-foo.vbrief.json", "task scope:demote -- --batch --older-than-days 60"];
|
|
@@ -469,13 +502,13 @@ export declare const registryData: {
|
|
|
469
502
|
readonly refs: "(deft-directive-decompose skill)";
|
|
470
503
|
readonly description: "Validate or apply an approved epic/phase -> story decomposition draft. The draft is a temporary proposal artifact, not a vBRIEF. Writes pending child vBRIEFs and wires references back into the parent epic.";
|
|
471
504
|
readonly usage: "task scope:decompose -- <parent> --draft <draft> [--check] [--date YYYY-MM-DD]";
|
|
472
|
-
readonly flags: readonly [readonly ["<parent>", "(conditional)", "Parent epic/phase vBRIEF path; required with --draft, omit only for --check no-op."], readonly ["--draft PATH", "(required)", "Approved decomposition JSON draft; prefer vbrief/.
|
|
473
|
-
readonly examples: readonly ["task scope:decompose -- vbrief/active/epic.vbrief.json --draft vbrief/.
|
|
505
|
+
readonly flags: readonly [readonly ["<parent>", "(conditional)", "Parent epic/phase vBRIEF path; required with --draft, omit only for --check no-op."], readonly ["--draft PATH", "(required)", "Approved decomposition JSON draft; prefer vbrief/.triage-cache/decompositions/<parent-slug>.json."], readonly ["--check", "(off)", "Validate only; do not write."], readonly ["--date YYYY-MM-DD", "today", "Creation date for generated child filenames."]];
|
|
506
|
+
readonly examples: readonly ["task scope:decompose -- vbrief/active/epic.vbrief.json --draft vbrief/.triage-cache/decompositions/epic.json --check"];
|
|
474
507
|
readonly see_also: readonly ["task scope:promote", "skills/deft-directive-decompose/SKILL.md"];
|
|
475
508
|
readonly placeholder: false;
|
|
476
509
|
};
|
|
477
510
|
};
|
|
478
|
-
readonly categoriesTriage: readonly [readonly ["Session-start", readonly ["task triage:summary", "task verify:cache-fresh"]], readonly ["State verbs (mutate audit log)", readonly ["task triage:accept", "task triage:defer", "task triage:reject", "task triage:needs-ac", "task triage:mark-duplicate", "task triage:reset", "task triage:status", "task triage:history"]], readonly ["Read verbs", readonly ["task triage:queue", "task triage:audit", "task triage:show", "task triage:scope", "task triage:scope-drift", "task triage:classify"]], readonly ["Lifecycle", readonly ["task triage:bootstrap", "task triage:welcome", "task triage:reconcile"]], readonly ["Bulk variants", readonly ["task triage:bulk-accept", "task triage:bulk-reject", "task triage:bulk-defer", "task triage:bulk-needs-ac", "task triage:refresh-active", "task triage:smoketest"]], readonly ["Subscription mutation", readonly ["task triage:subscribe", "task triage:unsubscribe"]], readonly ["Archive / rotation", readonly ["task triage:audit:prune", "task triage:archive-list", "task triage:restore-from-archive", "task triage:audit-log:rotate", "task triage:metrics"]]];
|
|
511
|
+
readonly categoriesTriage: readonly [readonly ["Session-start", readonly ["task triage:summary", "task verify:cache-fresh"]], readonly ["State verbs (mutate audit log)", readonly ["task triage:accept", "task triage:defer", "task triage:reject", "task triage:needs-ac", "task triage:mark-duplicate", "task triage:reset", "task triage:status", "task triage:history"]], readonly ["Read verbs", readonly ["task triage:queue", "task triage:audit", "task triage:show", "task triage:scope", "task triage:scope-drift", "task triage:classify"]], readonly ["Lifecycle", readonly ["task triage:bootstrap", "task triage:welcome", "task triage:reconcile"]], readonly ["Bulk variants", readonly ["task triage:bulk-accept", "task triage:bulk-reject", "task triage:bulk-defer", "task triage:bulk-needs-ac", "task triage:refresh-active", "task triage:smoketest"]], readonly ["Subscription mutation", readonly ["task triage:subscribe", "task triage:unsubscribe"]], readonly ["Archive / rotation", readonly ["task triage:audit:prune", "task triage:archive-list", "task triage:restore-from-archive", "task triage:audit-log:rotate", "task triage:metrics"]], readonly ["Framework eval (#1703)", readonly ["task eval:health", "task eval:run", "task eval:report"]]];
|
|
479
512
|
readonly categoriesScope: readonly [readonly ["Promote / demote", readonly ["task scope:promote", "task scope:demote"]], readonly ["Activate / complete", readonly ["task scope:activate", "task scope:complete", "task scope:fail", "task scope:cancel", "task scope:block", "task scope:unblock"]], readonly ["Reversibility", readonly ["task scope:undo", "task scope:restore"]], readonly ["Decomposition", readonly ["task scope:decompose"]]];
|
|
480
513
|
readonly scriptSubcommandMap: {
|
|
481
514
|
readonly triage_actions: {
|
|
@@ -5,7 +5,7 @@ export const registryData = {
|
|
|
5
5
|
name: "task triage:summary",
|
|
6
6
|
summary: "One-line state for session-start ritual",
|
|
7
7
|
refs: "(D2 / #1122)",
|
|
8
|
-
description: "Emit the one-line triage state consumed by the session-start ritual. Always exits 0 (status surface, not a gate); appends a JSONL record to vbrief/.
|
|
8
|
+
description: "Emit the one-line triage state consumed by the session-start ritual. Always exits 0 (status surface, not a gate); appends a JSONL record to vbrief/.triage-cache/summary-history.jsonl for observability.",
|
|
9
9
|
usage: "task triage:summary [-- --json] [--no-history]",
|
|
10
10
|
flags: [
|
|
11
11
|
["--json", "(off)", "Emit the structured record as JSON instead of the one-liner."],
|
|
@@ -321,7 +321,7 @@ export const registryData = {
|
|
|
321
321
|
name: "task triage:reconcile",
|
|
322
322
|
summary: "Self-heal audit log from on-disk vBRIEFs",
|
|
323
323
|
refs: "(#1468)",
|
|
324
|
-
description: "Idempotent repair verb: derive missing `accept` decisions for proposed/pending/active vBRIEFs that carry an x-vbrief/github-issue reference but have no entry in vbrief/.
|
|
324
|
+
description: "Idempotent repair verb: derive missing `accept` decisions for proposed/pending/active vBRIEFs that carry an x-vbrief/github-issue reference but have no entry in vbrief/.triage-cache/candidates.jsonl. Recovers triage state after the gitignored audit log is reset/lost (#1464) without a full cache re-fetch. Never overrides an existing decision, so a re-run is a no-op.",
|
|
325
325
|
usage: "task triage:reconcile [-- --repo owner/name] [--dry-run] [--json]",
|
|
326
326
|
flags: [
|
|
327
327
|
[
|
|
@@ -435,7 +435,7 @@ export const registryData = {
|
|
|
435
435
|
name: "task triage:subscribe",
|
|
436
436
|
summary: "Add label/milestone/issue to subscription",
|
|
437
437
|
refs: "(D14 / #1133)",
|
|
438
|
-
description: "Subscribe to a label / milestone / issue by appending a rule to plan.policy.triageScope[]. Emits a JSONL audit record to vbrief/.
|
|
438
|
+
description: "Subscribe to a label / milestone / issue by appending a rule to plan.policy.triageScope[]. Emits a JSONL audit record to vbrief/.triage-cache/subscription-history.jsonl.",
|
|
439
439
|
usage: "task triage:subscribe -- (--label=L | --milestone=M | --issue=N)",
|
|
440
440
|
flags: [
|
|
441
441
|
["--label L", "(none)", "Subscribe to a label."],
|
|
@@ -504,7 +504,7 @@ export const registryData = {
|
|
|
504
504
|
name: "task triage:audit-log:rotate",
|
|
505
505
|
summary: "Rotate candidates.jsonl when bounded",
|
|
506
506
|
refs: "(D20, coming)",
|
|
507
|
-
description: "Rotate vbrief/.
|
|
507
|
+
description: "Rotate vbrief/.triage-cache/candidates.jsonl when it exceeds the configured bound. Compacts terminal entries and preserves the open-work tail.",
|
|
508
508
|
usage: "task triage:audit-log:rotate [-- --max-lines N]",
|
|
509
509
|
flags: [["--max-lines N", "(consumer default)", "Bound at which rotation fires."]],
|
|
510
510
|
examples: ["task triage:audit-log:rotate -- --max-lines 10000"],
|
|
@@ -513,17 +513,87 @@ export const registryData = {
|
|
|
513
513
|
},
|
|
514
514
|
"task triage:metrics": {
|
|
515
515
|
name: "task triage:metrics",
|
|
516
|
-
summary: "
|
|
517
|
-
refs: "(
|
|
518
|
-
description: "
|
|
516
|
+
summary: "Attributed-value trend from the events ledger",
|
|
517
|
+
refs: "(#1709)",
|
|
518
|
+
description: "Report value-feedback attribution trends from .deft-cache/events.jsonl: total signal count plus per-class (value, bypass, adoption, friction) and per-event breakdowns over a time window. Alias of the value:show handler. Requires plan.policy.valueFeedback.enabled (default OFF) — exits blocked when disabled; an empty ledger prints a no-signals message. In the maintainer repo, skipped unless DEFT_VALUE_SELF_DOGFOOD=1.",
|
|
519
519
|
usage: "task triage:metrics [-- --window=7d] [--format=text|json]",
|
|
520
520
|
flags: [
|
|
521
|
-
["--window WINDOW", "7d", "Time window
|
|
522
|
-
["--format text|json", "text", "Output shape."],
|
|
521
|
+
["--window WINDOW", "7d", "Time window (e.g. 7d, 30d, 24h)."],
|
|
522
|
+
["--format text|json", "text", "Output shape (json emits the full trend object)."],
|
|
523
523
|
],
|
|
524
|
-
examples: ["task triage:metrics -- --window
|
|
525
|
-
see_also: [
|
|
526
|
-
|
|
524
|
+
examples: ["task triage:metrics", "task triage:metrics -- --window=30d --format=json"],
|
|
525
|
+
see_also: [
|
|
526
|
+
"task policy:show --field=valueFeedback",
|
|
527
|
+
"task policy:enable-value-feedback -- --confirm",
|
|
528
|
+
"#1709",
|
|
529
|
+
],
|
|
530
|
+
placeholder: false,
|
|
531
|
+
},
|
|
532
|
+
"task eval:health": {
|
|
533
|
+
name: "task eval:health",
|
|
534
|
+
summary: "Tier 0 static framework health score",
|
|
535
|
+
refs: "(#1703)",
|
|
536
|
+
description: "Aggregate static self-consistency gates (encoding, links, vBRIEF conformance, AGENTS.md freshness; content-manifest on framework-source trees) into a versioned 0–100 score. Detects contradictory / unsatisfiable gate pairs (#1694). Appends each run to .eval/results/health-history.jsonl. Session start may emit a budgeted [eval] advisory when health degrades.",
|
|
537
|
+
usage: "task eval:health [-- --json] [--no-persist] [--project-root PATH]",
|
|
538
|
+
flags: [
|
|
539
|
+
["--json", "(off)", "Emit the structured HealthReport instead of the human summary."],
|
|
540
|
+
["--no-persist", "(off)", "Run probes without appending to the health history ledger."],
|
|
541
|
+
[
|
|
542
|
+
"--project-root PATH",
|
|
543
|
+
"(cwd)",
|
|
544
|
+
"Project root override (Taskfile threads USER_WORKING_DIR).",
|
|
545
|
+
],
|
|
546
|
+
],
|
|
547
|
+
examples: ["task eval:health", "task eval:health -- --json"],
|
|
548
|
+
see_also: ["task eval:run", "task eval:report", "#1703"],
|
|
549
|
+
placeholder: false,
|
|
550
|
+
},
|
|
551
|
+
"task eval:run": {
|
|
552
|
+
name: "task eval:run",
|
|
553
|
+
summary: "Tier 2 golden corpus eval for a model",
|
|
554
|
+
refs: "(#1703)",
|
|
555
|
+
description: "Execute the fixed golden corpus with objective graders (CRUD schema/invention, surgical update, health fixture, rotating holdout tasks). Persists results to .eval/results/golden-runs.jsonl for champion–challenger diffs.",
|
|
556
|
+
usage: "task eval:run -- --model MODEL [--seed N] [--directive-version V] [--harness NAME] [--json] [--no-persist]",
|
|
557
|
+
flags: [
|
|
558
|
+
["--model MODEL", "(required)", "Model identifier for the run record."],
|
|
559
|
+
["--seed N", "(1,2,3)", "Repeatable seed(s); pass multiple --seed flags."],
|
|
560
|
+
["--directive-version V", "(engine version)", "Pin the directive version label."],
|
|
561
|
+
["--harness NAME", "deterministic-fixture", "Harness label stored on the run record."],
|
|
562
|
+
["--json", "(off)", "Emit the GoldenRunRecord JSON."],
|
|
563
|
+
["--no-persist", "(off)", "Run without appending to golden-runs.jsonl."],
|
|
564
|
+
[
|
|
565
|
+
"--project-root PATH",
|
|
566
|
+
"(cwd)",
|
|
567
|
+
"Project root override (Taskfile threads USER_WORKING_DIR).",
|
|
568
|
+
],
|
|
569
|
+
],
|
|
570
|
+
examples: [
|
|
571
|
+
"task eval:run -- --model gpt-5",
|
|
572
|
+
"task eval:run -- --model claude-sonnet --seed 1 --seed 2 --json",
|
|
573
|
+
],
|
|
574
|
+
see_also: ["task eval:report", "task eval:health", "#1703"],
|
|
575
|
+
placeholder: false,
|
|
576
|
+
},
|
|
577
|
+
"task eval:report": {
|
|
578
|
+
name: "task eval:report",
|
|
579
|
+
summary: "Tier 2 champion–challenger diff with significance",
|
|
580
|
+
refs: "(#1703)",
|
|
581
|
+
description: "Diff two directive versions' latest golden runs for a model: primary/holdout/overall pass-rate deltas with two-proportion significance and a holdout tripwire when primary gains do not generalize (#1703 Goodhart guard).",
|
|
582
|
+
usage: "task eval:report -- --champion V --challenger V --model MODEL [--json] [--project-root PATH]",
|
|
583
|
+
flags: [
|
|
584
|
+
["--champion V", "(required)", "Baseline directive version."],
|
|
585
|
+
["--challenger V", "(required)", "Candidate directive version."],
|
|
586
|
+
["--model MODEL", "(required)", "Model identifier shared by both runs."],
|
|
587
|
+
["--json", "(off)", "Emit the GoldenEvalReport JSON."],
|
|
588
|
+
[
|
|
589
|
+
"--project-root PATH",
|
|
590
|
+
"(cwd)",
|
|
591
|
+
"Project root override (Taskfile threads USER_WORKING_DIR).",
|
|
592
|
+
],
|
|
593
|
+
],
|
|
594
|
+
examples: ["task eval:report -- --champion 0.58.0 --challenger 0.59.0 --model gpt-5"],
|
|
595
|
+
see_also: ["task eval:run", "task eval:health", "#1703"],
|
|
596
|
+
placeholder: false,
|
|
527
597
|
},
|
|
528
598
|
"task scope:promote": {
|
|
529
599
|
name: "task scope:promote",
|
|
@@ -548,7 +618,7 @@ export const registryData = {
|
|
|
548
618
|
name: "task scope:demote",
|
|
549
619
|
summary: "pending/ -> proposed/ (set status proposed)",
|
|
550
620
|
refs: "(D1 / #1121)",
|
|
551
|
-
description: "Demote a vBRIEF scope from vbrief/pending/ back to vbrief/proposed/ and append a structured audit entry (including a demote_meta block) to vbrief/.
|
|
621
|
+
description: "Demote a vBRIEF scope from vbrief/pending/ back to vbrief/proposed/ and append a structured audit entry (including a demote_meta block) to vbrief/.triage-cache/scope-lifecycle.jsonl. Supports single-file and --batch (cohort shrink / cap relief) modes.",
|
|
552
622
|
usage: "task scope:demote -- <file> [--reason TEXT] | task scope:demote -- --batch [--older-than-days N]",
|
|
553
623
|
flags: [
|
|
554
624
|
["<file>", "(required for single)", "Path to vBRIEF."],
|
|
@@ -698,13 +768,13 @@ export const registryData = {
|
|
|
698
768
|
[
|
|
699
769
|
"--draft PATH",
|
|
700
770
|
"(required)",
|
|
701
|
-
"Approved decomposition JSON draft; prefer vbrief/.
|
|
771
|
+
"Approved decomposition JSON draft; prefer vbrief/.triage-cache/decompositions/<parent-slug>.json.",
|
|
702
772
|
],
|
|
703
773
|
["--check", "(off)", "Validate only; do not write."],
|
|
704
774
|
["--date YYYY-MM-DD", "today", "Creation date for generated child filenames."],
|
|
705
775
|
],
|
|
706
776
|
examples: [
|
|
707
|
-
"task scope:decompose -- vbrief/active/epic.vbrief.json --draft vbrief/.
|
|
777
|
+
"task scope:decompose -- vbrief/active/epic.vbrief.json --draft vbrief/.triage-cache/decompositions/epic.json --check",
|
|
708
778
|
],
|
|
709
779
|
see_also: ["task scope:promote", "skills/deft-directive-decompose/SKILL.md"],
|
|
710
780
|
placeholder: false,
|
|
@@ -759,6 +829,7 @@ export const registryData = {
|
|
|
759
829
|
"task triage:metrics",
|
|
760
830
|
],
|
|
761
831
|
],
|
|
832
|
+
["Framework eval (#1703)", ["task eval:health", "task eval:run", "task eval:report"]],
|
|
762
833
|
],
|
|
763
834
|
categoriesScope: [
|
|
764
835
|
["Promote / demote", ["task scope:promote", "task scope:demote"]],
|
package/dist/triage/index.d.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
export * as actions from "./actions/index.js";
|
|
10
10
|
export * as bootstrap from "./bootstrap/index.js";
|
|
11
11
|
export * as bulk from "./bulk/index.js";
|
|
12
|
+
export * as cachePath from "./cache-path.js";
|
|
13
|
+
export * from "./cache-path.js";
|
|
12
14
|
export * as classify from "./classify/index.js";
|
|
13
15
|
export * as help from "./help/index.js";
|
|
14
16
|
export * as queue from "./queue/index.js";
|
package/dist/triage/index.js
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
export * as actions from "./actions/index.js";
|
|
10
10
|
export * as bootstrap from "./bootstrap/index.js";
|
|
11
11
|
export * as bulk from "./bulk/index.js";
|
|
12
|
+
export * as cachePath from "./cache-path.js";
|
|
13
|
+
export * from "./cache-path.js";
|
|
12
14
|
export * as classify from "./classify/index.js";
|
|
13
15
|
export * as help from "./help/index.js";
|
|
14
16
|
export * as queue from "./queue/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "node:fs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveCandidatesLogPath } from "../cache-path.js";
|
|
4
4
|
/** Resolve audit log path; mirrors candidates_log._resolve_path (framework root). */
|
|
5
5
|
export function resolveAuditLogPath(options = {}) {
|
|
6
6
|
if (options.auditLogPath !== null && options.auditLogPath !== undefined) {
|
|
@@ -12,7 +12,7 @@ export function resolveAuditLogPath(options = {}) {
|
|
|
12
12
|
: envRoot.length > 0
|
|
13
13
|
? resolve(envRoot)
|
|
14
14
|
: process.cwd();
|
|
15
|
-
return
|
|
15
|
+
return resolveCandidatesLogPath(root);
|
|
16
16
|
}
|
|
17
17
|
/** Read audit log entries, optionally filtered by repo. */
|
|
18
18
|
export function readAuditEntries(repo, options = {}) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveTriageCachePath } from "../cache-path.js";
|
|
4
4
|
import { extractAuthor, extractMilestone } from "../scope-drift/cache-walker.js";
|
|
5
5
|
import { CACHE_DIR_NAME, CACHE_SOURCE_GITHUB_ISSUE } from "./constants.js";
|
|
6
6
|
import { hasActiveScopeIgnores, isRawIssueScopeIgnored, resolveScopeIgnores, } from "./scope-ignores-filter.js";
|
|
@@ -23,7 +23,7 @@ export function resolveSlicesLogPath(options = {}) {
|
|
|
23
23
|
: envRoot.length > 0
|
|
24
24
|
? resolve(envRoot)
|
|
25
25
|
: process.cwd();
|
|
26
|
-
return
|
|
26
|
+
return resolveTriageCachePath(root, "slices.jsonl");
|
|
27
27
|
}
|
|
28
28
|
/** Read slices.jsonl records. */
|
|
29
29
|
export function loadSliceRecords(options = {}) {
|
|
@@ -2,7 +2,8 @@ import { execFileSync } from "node:child_process";
|
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { appendFileSync, mkdirSync } from "node:fs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
|
-
import {
|
|
5
|
+
import { resolveLifecycleFolder } from "../../layout/resolve.js";
|
|
6
|
+
import { resolveCandidatesLogPath } from "../cache-path.js";
|
|
6
7
|
import { auditKey, existingAuditRefs, scanLifecycleRefs } from "./audit.js";
|
|
7
8
|
import { BACKFILL_FOLDERS, RECONCILE_ACTOR, } from "./types.js";
|
|
8
9
|
const GIT_ORIGIN_RE = /^(?:https?:\/\/(?:[^@/]+@)?github\.com\/|git@github\.com:|ssh:\/\/git@github\.com[:/])([A-Za-z0-9][A-Za-z0-9._-]*)\/([A-Za-z0-9][A-Za-z0-9._-]*?)(?:\.git)?\/?\s*$/;
|
|
@@ -33,7 +34,7 @@ function newDecisionId() {
|
|
|
33
34
|
}
|
|
34
35
|
export function findReconcilable(projectRoot, options = {}) {
|
|
35
36
|
const root = resolve(projectRoot);
|
|
36
|
-
const auditPath = options.auditLogPath ??
|
|
37
|
+
const auditPath = options.auditLogPath ?? resolveCandidatesLogPath(root);
|
|
37
38
|
const existing = existingAuditRefs(auditPath);
|
|
38
39
|
const defaultRepo = options.defaultRepo ?? null;
|
|
39
40
|
const items = [];
|
|
@@ -116,7 +117,7 @@ export function reconcile(projectRoot, options = {}) {
|
|
|
116
117
|
if (defaultRepo === null) {
|
|
117
118
|
defaultRepo = inferRepoFromGit(root);
|
|
118
119
|
}
|
|
119
|
-
const auditPath = options.auditLogPath ??
|
|
120
|
+
const auditPath = options.auditLogPath ?? resolveCandidatesLogPath(root);
|
|
120
121
|
const dryRun = options.dryRun ?? false;
|
|
121
122
|
const result = {
|
|
122
123
|
projectRoot: root,
|
|
@@ -2,9 +2,10 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, writeFileSync, } from "node:fs";
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
5
|
-
import {
|
|
5
|
+
import { resolveProjectDefinitionPath } from "../../layout/resolve.js";
|
|
6
6
|
import { migrateLegacyPolicyKey, PLAN_POLICY_KEY } from "../../policy/plan-extensions.js";
|
|
7
7
|
import { projectDefinitionMutationLock } from "../../vbrief-build/project-definition-io.js";
|
|
8
|
+
import { resolveTriageCachePath } from "../cache-path.js";
|
|
8
9
|
import { SUBSCRIPTION_HISTORY_SCHEMA } from "./constants.js";
|
|
9
10
|
import { pyStrRepr } from "./python-repr.js";
|
|
10
11
|
import { utcIso } from "./time.js";
|
|
@@ -61,7 +62,7 @@ function resolveActor(actor) {
|
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
export function recordSubscriptionChange(projectRoot, options) {
|
|
64
|
-
const historyPath =
|
|
65
|
+
const historyPath = resolveTriageCachePath(projectRoot, "subscription-history.jsonl");
|
|
65
66
|
const record = {
|
|
66
67
|
schema: SUBSCRIPTION_HISTORY_SCHEMA,
|
|
67
68
|
change_id: randomUUID(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SUBSCRIPTION_HISTORY_REL_PATH = "vbrief/.
|
|
1
|
+
export declare const SUBSCRIPTION_HISTORY_REL_PATH = "vbrief/.triage-cache/subscription-history.jsonl";
|
|
2
2
|
export declare const SUBSCRIPTION_HISTORY_SCHEMA = "deft.triage.subscription-change.v1";
|
|
3
3
|
export declare const PROJECT_DEFINITION_REL_PATH = "vbrief/PROJECT-DEFINITION.vbrief.json";
|
|
4
4
|
/** Python ``!r``-style quoting for parity with triage_subscribe.py messages. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
2
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, renameSync, unlinkSync, writeFileSync, } from "node:fs";
|
|
3
3
|
import { basename, join } from "node:path";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveProjectDefinitionPath } from "../../layout/resolve.js";
|
|
5
5
|
import { migrateLegacyPolicyKey, PLAN_POLICY_KEY } from "../../policy/plan-extensions.js";
|
|
6
6
|
import { projectDefinitionMutationLock } from "../../vbrief-build/project-definition-io.js";
|
|
7
|
-
|
|
7
|
+
import { resolveTriageCachePath } from "../cache-path.js";
|
|
8
|
+
export const SUBSCRIPTION_HISTORY_REL_PATH = "vbrief/.triage-cache/subscription-history.jsonl";
|
|
8
9
|
export const SUBSCRIPTION_HISTORY_SCHEMA = "deft.triage.subscription-change.v1";
|
|
9
10
|
export const PROJECT_DEFINITION_REL_PATH = "vbrief/PROJECT-DEFINITION.vbrief.json";
|
|
10
11
|
/** Python ``!r``-style quoting for parity with triage_subscribe.py messages. */
|
|
@@ -90,7 +91,7 @@ function resolveActor(actor) {
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
export function recordSubscriptionChange(projectRoot, options) {
|
|
93
|
-
const historyPath =
|
|
94
|
+
const historyPath = resolveTriageCachePath(projectRoot, "subscription-history.jsonl");
|
|
94
95
|
const record = {
|
|
95
96
|
schema: SUBSCRIPTION_HISTORY_SCHEMA,
|
|
96
97
|
change_id: randomUUID(),
|
|
@@ -4,9 +4,9 @@ export declare const MAX_LINE_CHARS = 120;
|
|
|
4
4
|
export { DEFAULT_WIP_CAP, PROJECT_DEFINITION_REL_PATH };
|
|
5
5
|
export declare const CACHE_DIR_NAME = ".deft-cache";
|
|
6
6
|
export declare const CACHE_SOURCE = "github-issue";
|
|
7
|
-
export declare const CANDIDATES_LOG_REL_PATH = "vbrief/.
|
|
7
|
+
export declare const CANDIDATES_LOG_REL_PATH = "vbrief/.triage-cache/candidates.jsonl";
|
|
8
8
|
export { latestDecisions, readAuditLog } from "../actions/candidates-log.js";
|
|
9
|
-
export declare const SUMMARY_HISTORY_REL_PATH = "vbrief/.
|
|
9
|
+
export declare const SUMMARY_HISTORY_REL_PATH = "vbrief/.triage-cache/summary-history.jsonl";
|
|
10
10
|
export declare const SUMMARY_HISTORY_SCHEMA = "deft.triage.summary.v1";
|
|
11
11
|
/** D2 repeat-suppression window for session-start triage one-liner (#1122 / #1279). */
|
|
12
12
|
export declare const D2_SUPPRESSION_WINDOW_HOURS = 4;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { createHash } from "node:crypto";
|
|
2
2
|
import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
|
|
3
3
|
import { join, resolve as pathResolve } from "node:path";
|
|
4
|
-
import { hasArtifactSuffix,
|
|
4
|
+
import { hasArtifactSuffix, resolveLifecycleFolder, resolveProjectDefinitionPath, } from "../../layout/resolve.js";
|
|
5
5
|
import { readPlanPolicy } from "../../policy/plan-extensions.js";
|
|
6
6
|
import { loadProjectDefinition, PROJECT_DEFINITION_REL_PATH } from "../../policy/resolve.js";
|
|
7
7
|
import { countVbriefWip, DEFAULT_WIP_CAP, resolveWipCap } from "../../policy/wip.js";
|
|
8
8
|
import { AUDIT_LOG_REL_PATH, latestDecisions, readAuditLog } from "../actions/candidates-log.js";
|
|
9
|
+
import { resolveCandidatesLogPath } from "../cache-path.js";
|
|
9
10
|
import { countReconcilable } from "./reconcilable.js";
|
|
10
11
|
import { computeScopeDriftTotal } from "./scope-drift.js";
|
|
11
12
|
// ---------------------------------------------------------------------------
|
|
@@ -17,7 +18,7 @@ export const CACHE_DIR_NAME = ".deft-cache";
|
|
|
17
18
|
export const CACHE_SOURCE = "github-issue";
|
|
18
19
|
export const CANDIDATES_LOG_REL_PATH = AUDIT_LOG_REL_PATH;
|
|
19
20
|
export { latestDecisions, readAuditLog } from "../actions/candidates-log.js";
|
|
20
|
-
export const SUMMARY_HISTORY_REL_PATH = "vbrief/.
|
|
21
|
+
export const SUMMARY_HISTORY_REL_PATH = "vbrief/.triage-cache/summary-history.jsonl";
|
|
21
22
|
export const SUMMARY_HISTORY_SCHEMA = "deft.triage.summary.v1";
|
|
22
23
|
/** D2 repeat-suppression window for session-start triage one-liner (#1122 / #1279). */
|
|
23
24
|
export const D2_SUPPRESSION_WINDOW_HOURS = 4;
|
|
@@ -189,7 +190,7 @@ export function isCachedIssueOpen(cacheRoot, repo, issueNumber) {
|
|
|
189
190
|
export function computeSummary(projectRoot, options = {}) {
|
|
190
191
|
const root = pathResolve(projectRoot);
|
|
191
192
|
const resolvedCacheRoot = options.cacheRoot ?? join(root, CACHE_DIR_NAME);
|
|
192
|
-
const resolvedLogPath = options.auditLogPath ??
|
|
193
|
+
const resolvedLogPath = options.auditLogPath ?? resolveCandidatesLogPath(root);
|
|
193
194
|
const cached = iterCachedIssues(resolvedCacheRoot);
|
|
194
195
|
const repos = [...new Set(cached.map(([repo]) => repo))].sort();
|
|
195
196
|
const wipCap = resolveWipCapInt(root);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Lifecycle folders scanned for reconcilable vBRIEFs (#1468). */
|
|
2
2
|
export declare const BACKFILL_FOLDERS: readonly ["proposed", "pending", "active"];
|
|
3
|
-
export declare const CANDIDATES_LOG_REL_PATH = "vbrief/.
|
|
3
|
+
export declare const CANDIDATES_LOG_REL_PATH = "vbrief/.triage-cache/candidates.jsonl";
|
|
4
4
|
/**
|
|
5
5
|
* Count reconcilable issues (#1468) — mirrors `triage_reconcile.count_reconcilable`.
|
|
6
6
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { referenceTypeMatches } from "@deftai/directive-types";
|
|
4
|
-
import { hasArtifactSuffix,
|
|
4
|
+
import { hasArtifactSuffix, resolveLifecycleRoot } from "../../layout/resolve.js";
|
|
5
5
|
import { AUDIT_LOG_REL_PATH, readAuditLog } from "../actions/candidates-log.js";
|
|
6
|
+
import { resolveCandidatesLogPath } from "../cache-path.js";
|
|
6
7
|
/** Lifecycle folders scanned for reconcilable vBRIEFs (#1468). */
|
|
7
8
|
export const BACKFILL_FOLDERS = ["proposed", "pending", "active"];
|
|
8
9
|
export const CANDIDATES_LOG_REL_PATH = AUDIT_LOG_REL_PATH;
|
|
@@ -63,7 +64,7 @@ function auditKey(repo, issueNumber) {
|
|
|
63
64
|
*/
|
|
64
65
|
export function countReconcilable(projectRoot, options = {}) {
|
|
65
66
|
try {
|
|
66
|
-
const auditPath = options.auditLogPath ??
|
|
67
|
+
const auditPath = options.auditLogPath ?? resolveCandidatesLogPath(projectRoot);
|
|
67
68
|
const existing = existingAuditRefs(auditPath);
|
|
68
69
|
const defaultRepo = options.defaultRepo ?? null;
|
|
69
70
|
const keys = new Set();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export declare const CACHE_DIR_NAME = ".deft-cache";
|
|
2
2
|
export declare const CACHE_SOURCE = "github-issue";
|
|
3
|
-
export declare const CANDIDATES_RELPATH: readonly ["vbrief", ".
|
|
3
|
+
export declare const CANDIDATES_RELPATH: readonly ["vbrief", ".triage-cache", "candidates.jsonl"];
|
|
4
4
|
export declare const WIP_LIFECYCLE_DIRS: readonly ["pending", "active"];
|
|
5
5
|
export declare const AUDIT_LOG_REL_PATH = "meta/policy-changes.log";
|
|
6
6
|
export declare const DEFAULT_WIP_CAP = 20;
|
|
7
7
|
export declare const DEFAULT_RELIEF_AGE_DAYS = 30;
|
|
8
8
|
export declare const TRIAGE_SKILL_PATH = "skills/deft-directive-triage/SKILL.md";
|
|
9
9
|
export declare const WELCOME_AUDIT_TAG = "triage-welcome";
|
|
10
|
-
export declare const SUMMARY_HISTORY_REL_PATH = "vbrief/.
|
|
10
|
+
export declare const SUMMARY_HISTORY_REL_PATH = "vbrief/.triage-cache/summary-history.jsonl";
|
|
11
11
|
export declare const SUMMARY_HISTORY_SCHEMA = "deft.triage.summary.v1";
|
|
12
12
|
export declare const EMPTY_CACHE_LINE = "[triage] cache empty -- run task triage:bootstrap";
|
|
13
13
|
export declare const MAX_LINE_CHARS = 120;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
export const CACHE_DIR_NAME = ".deft-cache";
|
|
2
2
|
export const CACHE_SOURCE = "github-issue";
|
|
3
|
-
export const CANDIDATES_RELPATH = ["vbrief", ".
|
|
3
|
+
export const CANDIDATES_RELPATH = ["vbrief", ".triage-cache", "candidates.jsonl"];
|
|
4
4
|
export const WIP_LIFECYCLE_DIRS = ["pending", "active"];
|
|
5
5
|
export const AUDIT_LOG_REL_PATH = "meta/policy-changes.log";
|
|
6
6
|
export const DEFAULT_WIP_CAP = 20;
|
|
7
7
|
export const DEFAULT_RELIEF_AGE_DAYS = 30;
|
|
8
8
|
export const TRIAGE_SKILL_PATH = "skills/deft-directive-triage/SKILL.md";
|
|
9
9
|
export const WELCOME_AUDIT_TAG = "triage-welcome";
|
|
10
|
-
export const SUMMARY_HISTORY_REL_PATH = "vbrief/.
|
|
10
|
+
export const SUMMARY_HISTORY_REL_PATH = "vbrief/.triage-cache/summary-history.jsonl";
|
|
11
11
|
export const SUMMARY_HISTORY_SCHEMA = "deft.triage.summary.v1";
|
|
12
12
|
export const EMPTY_CACHE_LINE = "[triage] cache empty -- run task triage:bootstrap";
|
|
13
13
|
export const MAX_LINE_CHARS = 120;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import { hasArtifactSuffix, resolveAuditPath,
|
|
3
|
+
import { hasArtifactSuffix, resolveAuditPath, resolveLifecycleRoot, resolveProjectDefinitionPath, } from "../../layout/resolve.js";
|
|
4
4
|
import { readPlanPolicy } from "../../policy/plan-extensions.js";
|
|
5
|
+
import { resolveCandidatesLogPath } from "../cache-path.js";
|
|
5
6
|
import { CACHE_DIR_NAME, CACHE_SOURCE, DEFAULT_WIP_CAP, SUBSCRIPTION_PRESETS, WIP_LIFECYCLE_DIRS, } from "./constants.js";
|
|
6
7
|
function loadProjectDefinition(projectRoot) {
|
|
7
8
|
const path = resolveProjectDefinitionPath(projectRoot);
|
|
@@ -39,7 +40,7 @@ function countCacheEntries(projectRoot) {
|
|
|
39
40
|
return count;
|
|
40
41
|
}
|
|
41
42
|
export function candidatesLogPath(projectRoot) {
|
|
42
|
-
return
|
|
43
|
+
return resolveCandidatesLogPath(projectRoot);
|
|
43
44
|
}
|
|
44
45
|
function countWip(projectRoot) {
|
|
45
46
|
let total = 0;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { appendFileSync, existsSync, mkdirSync, readdirSync, readFileSync } from "node:fs";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
import { hasArtifactSuffix,
|
|
3
|
+
import { hasArtifactSuffix, resolveLifecycleFolder, resolveProjectDefinitionPath, } from "../../layout/resolve.js";
|
|
4
4
|
import { readPlanPolicy } from "../../policy/plan-extensions.js";
|
|
5
|
-
import { countVbriefWip,
|
|
5
|
+
import { countVbriefWip, resolveWipCap } from "../../policy/wip.js";
|
|
6
|
+
import { resolveCandidatesLogPath, resolveTriageCachePath } from "../cache-path.js";
|
|
6
7
|
import { countReconcilable } from "../reconcile/reconcile.js";
|
|
7
8
|
import { computeDrift } from "../scope-drift/compute.js";
|
|
8
9
|
import { shouldSuppressD2Emission } from "../summary/index.js";
|
|
@@ -119,7 +120,7 @@ function utcIso() {
|
|
|
119
120
|
export function computeSummary(projectRoot) {
|
|
120
121
|
const root = resolve(projectRoot);
|
|
121
122
|
const cacheRoot = join(root, CACHE_DIR_NAME);
|
|
122
|
-
const logPath =
|
|
123
|
+
const logPath = resolveCandidatesLogPath(root);
|
|
123
124
|
const cached = iterCachedIssues(cacheRoot);
|
|
124
125
|
const repos = [...new Set(cached.map(([r]) => r))].sort().slice(0, 8);
|
|
125
126
|
const wipCapResult = resolveWipCap(root);
|
|
@@ -293,7 +294,7 @@ export function appendHistory(historyPath, result, line) {
|
|
|
293
294
|
export function emitOneliner(projectRoot, options = {}) {
|
|
294
295
|
const result = computeSummary(projectRoot);
|
|
295
296
|
const line = formatSummary(result);
|
|
296
|
-
const historyPath =
|
|
297
|
+
const historyPath = resolveTriageCachePath(projectRoot, "summary-history.jsonl");
|
|
297
298
|
const applySuppression = options.applyD2Suppression !== false;
|
|
298
299
|
if (applySuppression && shouldSuppressD2Emission(result, historyPath, { now: options.now })) {
|
|
299
300
|
return line;
|