@dzhechkov/harness-core 0.3.142 → 0.3.143
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/.dz-manifest.json +15 -15
- package/README.md +2 -1
- package/dist/backlog.d.ts +97 -1
- package/dist/backlog.d.ts.map +1 -1
- package/dist/backlog.js +214 -31
- package/dist/backlog.js.map +1 -1
- package/dist/guard.d.ts +44 -0
- package/dist/guard.d.ts.map +1 -1
- package/dist/guard.js +144 -1
- package/dist/guard.js.map +1 -1
- package/package.json +4 -4
- package/sbom.json +14 -14
- package/src/backlog.ts +282 -27
- package/src/guard.ts +151 -1
package/.dz-manifest.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "README.md",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "1b9db50b623f5737dd95a3b949d9ea85293387a010a09f4204e6a476f5127d57"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "coverage/coverage-final.json",
|
|
@@ -85,19 +85,19 @@
|
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
87
|
"path": "dist/backlog.d.ts",
|
|
88
|
-
"sha256": "
|
|
88
|
+
"sha256": "3f3fbdb7a59c0152d0750291092b6453b0ae1ff6f6f910e99cb5facfd93b6e53"
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
"path": "dist/backlog.d.ts.map",
|
|
92
|
-
"sha256": "
|
|
92
|
+
"sha256": "0c96dddbd4aebe4bf085b641fcfaaa0ad149b5572471449f984364c94f78c7b3"
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
"path": "dist/backlog.js",
|
|
96
|
-
"sha256": "
|
|
96
|
+
"sha256": "9208cce6400957bed310d8c0405a15128315fba59b447962e06e48fca11f6fe6"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"path": "dist/backlog.js.map",
|
|
100
|
-
"sha256": "
|
|
100
|
+
"sha256": "1dfc72d3ba2c896a43504425d4fdeb6b34dccb7d7867bc2f9a792981a57a5c48"
|
|
101
101
|
},
|
|
102
102
|
{
|
|
103
103
|
"path": "dist/benchmark.d.ts",
|
|
@@ -405,19 +405,19 @@
|
|
|
405
405
|
},
|
|
406
406
|
{
|
|
407
407
|
"path": "dist/guard.d.ts",
|
|
408
|
-
"sha256": "
|
|
408
|
+
"sha256": "7a1df1aa511a5d96669e660b99d29ba633393e1a20dc346e1dedfa9aec221260"
|
|
409
409
|
},
|
|
410
410
|
{
|
|
411
411
|
"path": "dist/guard.d.ts.map",
|
|
412
|
-
"sha256": "
|
|
412
|
+
"sha256": "be03334a1746d3261afe69252f119c82f3718e0608957eebf5de311acf9d8a04"
|
|
413
413
|
},
|
|
414
414
|
{
|
|
415
415
|
"path": "dist/guard.js",
|
|
416
|
-
"sha256": "
|
|
416
|
+
"sha256": "dc20d0ea9ff7e1299b52ed3ce03dbd2f8bb13b1b86ee2799a49837f33ec33883"
|
|
417
417
|
},
|
|
418
418
|
{
|
|
419
419
|
"path": "dist/guard.js.map",
|
|
420
|
-
"sha256": "
|
|
420
|
+
"sha256": "1696212693b8cd400ff6d2af843e2901ad0e79679ddd09ea9831306aa75e342a"
|
|
421
421
|
},
|
|
422
422
|
{
|
|
423
423
|
"path": "dist/import-ecc.d.ts",
|
|
@@ -1029,7 +1029,7 @@
|
|
|
1029
1029
|
},
|
|
1030
1030
|
{
|
|
1031
1031
|
"path": "package.json",
|
|
1032
|
-
"sha256": "
|
|
1032
|
+
"sha256": "55ce25bcbdeef7f26e93f1e14db495bf858644a0285b5d0bf3236a69d8d8013c"
|
|
1033
1033
|
},
|
|
1034
1034
|
{
|
|
1035
1035
|
"path": "src/__tests__/golden-baseline.test.ts",
|
|
@@ -1049,7 +1049,7 @@
|
|
|
1049
1049
|
},
|
|
1050
1050
|
{
|
|
1051
1051
|
"path": "src/backlog.ts",
|
|
1052
|
-
"sha256": "
|
|
1052
|
+
"sha256": "7418f3809477f66b524d69f3f438aaaea818451396b360fe509285f52db21767"
|
|
1053
1053
|
},
|
|
1054
1054
|
{
|
|
1055
1055
|
"path": "src/benchmark.ts",
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
},
|
|
1130
1130
|
{
|
|
1131
1131
|
"path": "src/guard.ts",
|
|
1132
|
-
"sha256": "
|
|
1132
|
+
"sha256": "f56d5f5e59e9ddecae339b054b9f888b81b3410c56d3a09eedd7be3c11d3438c"
|
|
1133
1133
|
},
|
|
1134
1134
|
{
|
|
1135
1135
|
"path": "src/import-ecc.ts",
|
|
@@ -1305,7 +1305,7 @@
|
|
|
1305
1305
|
},
|
|
1306
1306
|
{
|
|
1307
1307
|
"path": "test/backlog.test.ts",
|
|
1308
|
-
"sha256": "
|
|
1308
|
+
"sha256": "9b6bf3726a14f774913440ee3053276e88a4dcaf1265ae48d8015bc4985489f1"
|
|
1309
1309
|
},
|
|
1310
1310
|
{
|
|
1311
1311
|
"path": "test/benchmark-s15.test.ts",
|
|
@@ -1425,7 +1425,7 @@
|
|
|
1425
1425
|
},
|
|
1426
1426
|
{
|
|
1427
1427
|
"path": "test/guard.test.ts",
|
|
1428
|
-
"sha256": "
|
|
1428
|
+
"sha256": "49829d24440130cfe403a410b9068a76631c68e9baa2cfc978f5029df2d72f3a"
|
|
1429
1429
|
},
|
|
1430
1430
|
{
|
|
1431
1431
|
"path": "test/harmonize.test.ts",
|
|
@@ -1609,5 +1609,5 @@
|
|
|
1609
1609
|
}
|
|
1610
1610
|
]
|
|
1611
1611
|
},
|
|
1612
|
-
"signature": "
|
|
1612
|
+
"signature": "jw8HFZWuwcRLzgJr47J6p0zqYUFwkZJPqVArPEjlMNp7wZt3jP9dD1XEzGizuP5AlfJzsYsb5iO4MIt+z847AQ=="
|
|
1613
1613
|
}
|
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ and any other consumer.
|
|
|
11
11
|
| `apply` | `applyEmitResult` | Write an adapter `EmitResult` to disk — **additively** |
|
|
12
12
|
| `targets` | `TARGETS`, `TargetName`, `isTargetName` | `--target` name → platform adapter |
|
|
13
13
|
| `sign` (walks) | `listPackFiles`, `listSignablePackFiles` | Shared node_modules/.git exclusions; verify sees MORE than sign (smuggled symlinks still fail) |
|
|
14
|
-
| `guard` | `evaluateGuard`, `resolveRules`, `scanSecrets`, `DEFAULT_RULES` | Declarative HARD/SOFT constraint engine behind `dz guard` (publish/teach/consolidate pre-flight; fail-closed) |
|
|
14
|
+
| `guard` | `evaluateGuard`, `resolveRules`, `scanSecrets`, `DEFAULT_RULES`, `parsePnpmLockImporters` | Declarative HARD/SOFT constraint engine behind `dz guard` (publish/teach/consolidate pre-flight; fail-closed). The SOFT `lockfile-in-sync` rule compares each workspace package's `@dzhechkov/*` dep specs against the specifier `pnpm-lock.yaml` records for that importer — the `ERR_PNPM_OUTDATED_LOCKFILE` CI break, caught at publish. Its lockfile reader (`parsePnpmLockImporters`) is a pure RECOGNISE-OR-REFUSE parser (no YAML dependency): it reads only the `lockfileVersion: 9`+ importer layout and returns `undefined` for a legacy v5/v6 file, a truncated one, or any shape that leaves an importer with zero specifiers — because a half-parse reports every real dependency as "not recorded". The rule FAILS OPEN on that `undefined` (no violation) and is pinned SOFT-only via `SOFT_ONLY_RULES`, so no config can turn a parser that admits uncertainty into a publish blocker |
|
|
15
|
+
| `backlog` | `dedupIdea`, `classifyDedup`, `alignIdea`, `spinRoulette`, `readGoalMapDetailed`, `parseEffort`, `ensureBacklogGitignored`, `harmonizeBacklog` | The Smart Backlog engine behind `dz backlog`: content-addressed idea records in `.dz/backlog/ideas.jsonl`, semantic dedup over the REUSED agentdb vector namespace (`dz-backlog` — no second store), weighted-max GoalMap alignment, and a seeded weighted roulette. Every band/weight decision is a PURE function. `classifyDedup` also reports the top-1 match id alongside the cosine (the calibration surface for the 0.92 duplicate band — observational, it never moves the verdict); `readGoalMapDetailed` returns the entries the defensive reader DROPPED with a reason AND the fields it REPAIRED with their raw values (a weight clamped before validation made the validator's out-of-range branch dead code), so `goals --validate` can never report a vacuous "valid (0 goals)" nor hide a `weight: 7`; `parseEffort` returns a printable note for every clamp; `ensureBacklogGitignored` gitignores the store on first write (raw ideas are private prompt-class content) — atomically, preserving the file's dominant EOL, recognising every plain spelling of an existing rule (`/.dz/`, `.dz/**`, …) via `backlogIgnoreStatus`, and obeying a `!` negation as an explicit user opt-out instead of overriding it |
|
|
15
16
|
| `feature-adr-setup` (P3) | `renderGuardsConfig`, `renderGuardsRunner` | Scaffolds deterministic guard tests into a TARGET project: `guards.config.json` + a zero-dependency `check.mjs` runner (loc-cap, secret-scan, frozen-file sha256 pins, waivers-with-reasons) — `dz feature-adr-setup --guards` |
|
|
16
17
|
| `usage` | `computeUsage`, `TOKEN_WEIGHTS`, `readUsageLimits`, `deriveUsageCalibration` | Read-only Claude usage ESTIMATE behind `dz usage`. Tokens are COST-WEIGHTED input-equivalents (input 1x, cache-write 1.25x / 1h 2x, cache-read 0.1x, output 5x) — a flat sum is 89-99.7% cache-read (MEASURED) and tracks conversation length, not work. Scans subagent transcripts too (`<session>/subagents/*.jsonl`), follows no symlinks, reads only regular files (symlinked FILES and DIRECTORY components alike are skipped), and caps the walk BY RECENCY so a huge history cannot discard current usage. `pct` stays `null` while limits are unconfigured — an unconfigured estimate is never dressed up as a number |
|
|
17
18
|
| `compounding` | `mulberry32`, `bootstrapDelta`, `decidePromotion`, `assembleCompoundingReport` | Pure learning-loop payoff engine behind `dz compounding`: seeded deterministic bootstrap (conservative nearest-rank lower-95), promotion that refuses non-finite/malformed input and anything under 5 samples per arm, and dz-native measurements (pool write-only ratio, guard trajectory by RATE, replay readiness over unique untruncated prompt events). A gate without data says INSUFFICIENT_DATA — never a verdict. Compaction keeps the newest query-bearing rows verbatim and aggregates ONLY the rest (read totals are invariant across compactions) |
|
package/dist/backlog.d.ts
CHANGED
|
@@ -52,10 +52,33 @@ export interface DedupVerdict {
|
|
|
52
52
|
/** Top-1 raw cosine (ADR-002 — never an RRF score). `-1` when there is nothing to compare against. */
|
|
53
53
|
readonly cosine: number;
|
|
54
54
|
readonly matchedId: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* The id of the TOP-1 candidate whatever band it landed in — the ADR-002 CALIBRATION surface (idea
|
|
57
|
+
* ce914ac2). `matchedId` is only set for a DUPLICATE, so a RELATED verdict used to report a cosine with
|
|
58
|
+
* no way to see WHICH idea produced it; a user calibrating the 0.92 band needs the pair, not the number.
|
|
59
|
+
* Purely observational: it never changes the verdict.
|
|
60
|
+
*/
|
|
61
|
+
readonly topMatchId: string | undefined;
|
|
55
62
|
readonly relatedIds: readonly string[];
|
|
56
63
|
/** True when the embedder was unavailable and dedup degraded to exact-text (ADR-002 §degrade). */
|
|
57
64
|
readonly exactTextOnly: boolean;
|
|
58
65
|
}
|
|
66
|
+
/** The result of interpreting a `--effort` argument, with the note the CLI must ECHO when it altered it. */
|
|
67
|
+
export interface EffortParse {
|
|
68
|
+
readonly effort: number;
|
|
69
|
+
/** True when the parsed value was altered (clamped, floored, or rejected) — the CLI prints `note`. */
|
|
70
|
+
readonly adjusted: boolean;
|
|
71
|
+
/** Human line, e.g. `effort 13 → clamped to 5 (scale 1-5)`. Present iff `adjusted`. */
|
|
72
|
+
readonly note?: string;
|
|
73
|
+
}
|
|
74
|
+
export declare const EFFORT_MIN = 1;
|
|
75
|
+
export declare const EFFORT_MAX = 5;
|
|
76
|
+
/**
|
|
77
|
+
* PURE `--effort` interpreter. `dz backlog add --effort 13` used to store 5 and say NOTHING, so the user
|
|
78
|
+
* kept a wrong mental model of the scale (idea 86096d6d). Every alteration now carries a printable note;
|
|
79
|
+
* an in-range integer is returned untouched with `adjusted:false` (no noise on the happy path).
|
|
80
|
+
*/
|
|
81
|
+
export declare function parseEffort(raw: string | undefined, fallback: number): EffortParse;
|
|
59
82
|
export declare const DEFAULT_DUPLICATE_THRESHOLD = 0.92;
|
|
60
83
|
export declare const DEFAULT_RELATEDNESS_FLOOR = 0.35;
|
|
61
84
|
export declare const DEFAULT_ROULETTE_ALPHA = 1.5;
|
|
@@ -96,6 +119,36 @@ export declare function isSafeId(id: unknown): id is string;
|
|
|
96
119
|
export declare function readIdeas(projectRoot: string): IdeaRecord[];
|
|
97
120
|
/** Atomic full rewrite (tmp + rename) so a crash mid-write never truncates the store. */
|
|
98
121
|
export declare function writeIdeas(projectRoot: string, ideas: readonly IdeaRecord[]): void;
|
|
122
|
+
export type GitignoreAction = 'created' | 'appended' | 'already-covered' | 'user-opted-out' | 'skipped';
|
|
123
|
+
export interface GitignoreScaffold {
|
|
124
|
+
readonly action: GitignoreAction;
|
|
125
|
+
readonly path: string;
|
|
126
|
+
/** Set for `skipped` (the I/O reason) and `user-opted-out` (the negation line we obeyed). */
|
|
127
|
+
readonly reason?: string;
|
|
128
|
+
}
|
|
129
|
+
export type BacklogIgnoreStatus = 'covered' | 'negated' | 'uncovered';
|
|
130
|
+
/**
|
|
131
|
+
* PURE .gitignore verdict for the backlog store. Deliberately NOT a full gitignore engine — it
|
|
132
|
+
* recognises the plain-path spellings of the rule (`/.dz/`, `.dz/**`, `.dz/backlog`, …) and refuses to
|
|
133
|
+
* interpret anything else, because a wrong-but-clever matcher either double-appends or silently
|
|
134
|
+
* decides a store is private when it is not.
|
|
135
|
+
*
|
|
136
|
+
* `negated` wins over `covered`: a `!.dz/backlog/` line (anchored or not) is the user saying *"track
|
|
137
|
+
* this on purpose"*. We obey it — appending a rule that overrides the user's explicit opt-out would be
|
|
138
|
+
* this tool deciding it knows better.
|
|
139
|
+
*/
|
|
140
|
+
export declare function backlogIgnoreStatus(gitignoreText: string): BacklogIgnoreStatus;
|
|
141
|
+
/** Back-compat shim: "is it ignored?" — a negation is NOT coverage (the store is tracked on purpose). */
|
|
142
|
+
export declare function backlogIgnoreCovered(gitignoreText: string): boolean;
|
|
143
|
+
/**
|
|
144
|
+
* Ensure the backlog store is gitignored, at the moment the feature FIRST creates it (idea ec4cd60d).
|
|
145
|
+
* Creates a `.gitignore` when there is none; appends the entry (+ its comment) when the project has one
|
|
146
|
+
* that does not cover the store; touches NOTHING when it is already covered OR when the user explicitly
|
|
147
|
+
* negated the rule. The write is ATOMIC and preserves the file's dominant EOL.
|
|
148
|
+
* Never throws — an unwritable .gitignore degrades to `skipped`, and the CALLER must say so out loud
|
|
149
|
+
* (a silently un-ignored store is exactly the privacy leak this function exists to prevent).
|
|
150
|
+
*/
|
|
151
|
+
export declare function ensureBacklogGitignored(projectRoot: string): GitignoreScaffold;
|
|
99
152
|
/** Pre-mutation snapshot (NFR-6) — mirrors `snapshotStore`. A failed snapshot returns `{error}` so
|
|
100
153
|
* the caller ABORTS the mutation (no partial merge). */
|
|
101
154
|
export interface SnapshotResult {
|
|
@@ -139,7 +192,50 @@ export interface DedupDeps {
|
|
|
139
192
|
* blocking capture (NFR-2 / ADR-002 T-002e).
|
|
140
193
|
*/
|
|
141
194
|
export declare function dedupIdea(projectRoot: string, text: string, cfg: BacklogConfig, deps?: DedupDeps): Promise<DedupVerdict>;
|
|
142
|
-
/**
|
|
195
|
+
/** One goal entry the reader REFUSED, with the reason — the anti-vacuous-valid evidence (idea 960c9f26). */
|
|
196
|
+
export interface DroppedGoal {
|
|
197
|
+
/** 0-based index of the entry in the file's `goals` array. */
|
|
198
|
+
readonly index: number;
|
|
199
|
+
/** Machine-stable reason, e.g. `missing "statement"`. */
|
|
200
|
+
readonly reason: string;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* What the defensive read actually SAW. `readGoalMap` throws away the drops (correct for runtime paths —
|
|
204
|
+
* a corrupt compass must never break capture), but `goals --validate` needs them: a goals.json whose every
|
|
205
|
+
* entry was silently dropped previously reported *"valid (0 goal(s))"* — a vacuous pass that hid the user's
|
|
206
|
+
* typo (`text` instead of `statement`). This variant is the validate-facing reader.
|
|
207
|
+
*/
|
|
208
|
+
export interface GoalMapRead {
|
|
209
|
+
readonly goalMap: GoalMap;
|
|
210
|
+
/** Entries present in the file's `goals` array (kept + dropped). */
|
|
211
|
+
readonly present: number;
|
|
212
|
+
readonly dropped: readonly DroppedGoal[];
|
|
213
|
+
/**
|
|
214
|
+
* Fields the reader REPAIRED to keep the runtime safe. The clamp happens BEFORE any validation could
|
|
215
|
+
* see the original, so a `weight: 7` becomes a legal 1 and the validator's out-of-range branch is
|
|
216
|
+
* unreachable — a silent repair reported as "valid". These carry the RAW value so `goals --validate`
|
|
217
|
+
* can warn about what the user actually wrote while the runtime keeps the clamped value.
|
|
218
|
+
*/
|
|
219
|
+
readonly repaired: readonly RepairedGoalField[];
|
|
220
|
+
/** Set when the file exists but could not be parsed / has no `goals` array. */
|
|
221
|
+
readonly parseError?: string;
|
|
222
|
+
}
|
|
223
|
+
/** One field the defensive reader clamped/replaced, with both the raw and the used value. */
|
|
224
|
+
export interface RepairedGoalField {
|
|
225
|
+
readonly index: number;
|
|
226
|
+
readonly id: string;
|
|
227
|
+
readonly field: 'weight';
|
|
228
|
+
readonly raw: unknown;
|
|
229
|
+
readonly used: number;
|
|
230
|
+
/** Human reason, e.g. `weight 7 is out of (0,1]`. */
|
|
231
|
+
readonly reason: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Detailed GoalMap read — never throws, and REPORTS what it dropped (idea 960c9f26). `readGoalMap` is the
|
|
235
|
+
* lossy runtime view of this; both share one parser so they can never disagree about what a goal is.
|
|
236
|
+
*/
|
|
237
|
+
export declare function readGoalMapDetailed(projectRoot: string): GoalMapRead;
|
|
238
|
+
/** Defensive GoalMap reader — never throws; a missing/corrupt file ⇒ empty compass (the runtime path). */
|
|
143
239
|
export declare function readGoalMap(projectRoot: string): GoalMap;
|
|
144
240
|
/** The text embedded for a goal: statement + keywords (same convention across cache + score). */
|
|
145
241
|
export declare function goalEmbedText(goal: Goal): string;
|
package/dist/backlog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backlog.d.ts","sourceRoot":"","sources":["../src/backlog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAgBH,iFA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AAC;QAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;KAAE,EAAE,CAAC;IAC3F,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AASD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,IAAI,CAAA;CAAO,GACxG,OAAO,CAAC,sBAAsB,CAAC,CAoGjC;AAMD;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC,CAoBvI"}
|
package/dist/backlog.js
CHANGED
|
@@ -29,6 +29,29 @@ import { resolveEmbedModel } from './embedding-config.js';
|
|
|
29
29
|
import { mulberry32 } from './compounding.js';
|
|
30
30
|
/** The vector-store namespace that isolates ideas from lessons (ADR-001/005). */
|
|
31
31
|
export const BACKLOG_TASK_TYPE = 'dz-backlog';
|
|
32
|
+
export const EFFORT_MIN = 1;
|
|
33
|
+
export const EFFORT_MAX = 5;
|
|
34
|
+
/**
|
|
35
|
+
* PURE `--effort` interpreter. `dz backlog add --effort 13` used to store 5 and say NOTHING, so the user
|
|
36
|
+
* kept a wrong mental model of the scale (idea 86096d6d). Every alteration now carries a printable note;
|
|
37
|
+
* an in-range integer is returned untouched with `adjusted:false` (no noise on the happy path).
|
|
38
|
+
*/
|
|
39
|
+
export function parseEffort(raw, fallback) {
|
|
40
|
+
if (raw === undefined)
|
|
41
|
+
return { effort: fallback, adjusted: false };
|
|
42
|
+
const v = Number(raw);
|
|
43
|
+
if (!Number.isFinite(v)) {
|
|
44
|
+
return { effort: fallback, adjusted: true, note: `effort ${JSON.stringify(raw)} → not a number, using ${fallback} (scale ${EFFORT_MIN}-${EFFORT_MAX})` };
|
|
45
|
+
}
|
|
46
|
+
if (v < EFFORT_MIN)
|
|
47
|
+
return { effort: EFFORT_MIN, adjusted: true, note: `effort ${raw} → clamped to ${EFFORT_MIN} (scale ${EFFORT_MIN}-${EFFORT_MAX})` };
|
|
48
|
+
if (v > EFFORT_MAX)
|
|
49
|
+
return { effort: EFFORT_MAX, adjusted: true, note: `effort ${raw} → clamped to ${EFFORT_MAX} (scale ${EFFORT_MIN}-${EFFORT_MAX})` };
|
|
50
|
+
const floored = Math.floor(v);
|
|
51
|
+
if (floored !== v)
|
|
52
|
+
return { effort: floored, adjusted: true, note: `effort ${raw} → rounded down to ${floored} (scale ${EFFORT_MIN}-${EFFORT_MAX}, whole numbers)` };
|
|
53
|
+
return { effort: floored, adjusted: false };
|
|
54
|
+
}
|
|
32
55
|
/* ================================================================== */
|
|
33
56
|
/* CONFIG (readBacklogConfig) — defensive, Number.isFinite clamps. */
|
|
34
57
|
/* ================================================================== */
|
|
@@ -189,6 +212,105 @@ export function writeIdeas(projectRoot, ideas) {
|
|
|
189
212
|
writeFileSync(tmp, body);
|
|
190
213
|
renameSync(tmp, path);
|
|
191
214
|
}
|
|
215
|
+
/** The entry + its one-line rationale, written verbatim so the file explains itself. */
|
|
216
|
+
const BACKLOG_IGNORE_ENTRY = '.dz/backlog/';
|
|
217
|
+
const BACKLOG_IGNORE_COMMENT = '# dz backlog — captured ideas are private prompt-class content';
|
|
218
|
+
/**
|
|
219
|
+
* Normalise ONE .gitignore pattern to the bare path it targets, so the equally-valid spellings of the
|
|
220
|
+
* same rule compare equal: a leading `/` (repo-root anchor), a trailing `/**` or `/*` (recursive glob),
|
|
221
|
+
* and a trailing `/` (directory marker) are all decoration around the same path. Returns `undefined`
|
|
222
|
+
* for anything that is not a plain path pattern (a comment, an empty line, or a pattern carrying a
|
|
223
|
+
* wildcard we do NOT interpret) — an uninterpretable pattern must never be read as coverage.
|
|
224
|
+
*/
|
|
225
|
+
function normaliseIgnorePattern(body) {
|
|
226
|
+
let p = body.trim();
|
|
227
|
+
if (p === '' || p.startsWith('#'))
|
|
228
|
+
return undefined;
|
|
229
|
+
if (p.startsWith('/'))
|
|
230
|
+
p = p.slice(1); // repo-root anchor: `/.dz/` ≡ `.dz/`
|
|
231
|
+
p = p.replace(/\/\*\*$/, '').replace(/\/\*$/, ''); // `.dz/**` / `.dz/*` ≡ `.dz`
|
|
232
|
+
p = p.replace(/\/+$/, ''); // trailing directory marker
|
|
233
|
+
if (p === '' || p.includes('*') || p.includes('?') || p.includes('['))
|
|
234
|
+
return undefined; // not a plain path
|
|
235
|
+
return p;
|
|
236
|
+
}
|
|
237
|
+
/** True when the pattern targets the backlog store (directly or via its `.dz` parent). */
|
|
238
|
+
function targetsBacklogStore(pattern) {
|
|
239
|
+
return pattern === '.dz' || pattern === '.dz/backlog';
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* PURE .gitignore verdict for the backlog store. Deliberately NOT a full gitignore engine — it
|
|
243
|
+
* recognises the plain-path spellings of the rule (`/.dz/`, `.dz/**`, `.dz/backlog`, …) and refuses to
|
|
244
|
+
* interpret anything else, because a wrong-but-clever matcher either double-appends or silently
|
|
245
|
+
* decides a store is private when it is not.
|
|
246
|
+
*
|
|
247
|
+
* `negated` wins over `covered`: a `!.dz/backlog/` line (anchored or not) is the user saying *"track
|
|
248
|
+
* this on purpose"*. We obey it — appending a rule that overrides the user's explicit opt-out would be
|
|
249
|
+
* this tool deciding it knows better.
|
|
250
|
+
*/
|
|
251
|
+
export function backlogIgnoreStatus(gitignoreText) {
|
|
252
|
+
let covered = false;
|
|
253
|
+
for (const raw of String(gitignoreText).split('\n')) {
|
|
254
|
+
const line = raw.trim();
|
|
255
|
+
if (line === '' || line.startsWith('#'))
|
|
256
|
+
continue;
|
|
257
|
+
const negated = line.startsWith('!');
|
|
258
|
+
const pattern = normaliseIgnorePattern(negated ? line.slice(1) : line);
|
|
259
|
+
if (pattern === undefined || !targetsBacklogStore(pattern))
|
|
260
|
+
continue;
|
|
261
|
+
if (negated)
|
|
262
|
+
return 'negated'; // explicit user intent — decided, no further scanning
|
|
263
|
+
covered = true;
|
|
264
|
+
}
|
|
265
|
+
return covered ? 'covered' : 'uncovered';
|
|
266
|
+
}
|
|
267
|
+
/** Back-compat shim: "is it ignored?" — a negation is NOT coverage (the store is tracked on purpose). */
|
|
268
|
+
export function backlogIgnoreCovered(gitignoreText) {
|
|
269
|
+
return backlogIgnoreStatus(gitignoreText) === 'covered';
|
|
270
|
+
}
|
|
271
|
+
/** The file's dominant line ending, so an append does not mix CRLF and LF in one file. */
|
|
272
|
+
function dominantEol(text) {
|
|
273
|
+
const crlf = (text.match(/\r\n/g) ?? []).length;
|
|
274
|
+
const lf = (text.match(/\n/g) ?? []).length - crlf;
|
|
275
|
+
return crlf > lf ? '\r\n' : '\n';
|
|
276
|
+
}
|
|
277
|
+
/** Atomic write (tmp + rename in the SAME dir) — the ideas.jsonl discipline: a crash never truncates. */
|
|
278
|
+
function writeFileAtomic(path, body) {
|
|
279
|
+
const tmp = `${path}.tmp-${process.pid}`;
|
|
280
|
+
writeFileSync(tmp, body);
|
|
281
|
+
renameSync(tmp, path);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Ensure the backlog store is gitignored, at the moment the feature FIRST creates it (idea ec4cd60d).
|
|
285
|
+
* Creates a `.gitignore` when there is none; appends the entry (+ its comment) when the project has one
|
|
286
|
+
* that does not cover the store; touches NOTHING when it is already covered OR when the user explicitly
|
|
287
|
+
* negated the rule. The write is ATOMIC and preserves the file's dominant EOL.
|
|
288
|
+
* Never throws — an unwritable .gitignore degrades to `skipped`, and the CALLER must say so out loud
|
|
289
|
+
* (a silently un-ignored store is exactly the privacy leak this function exists to prevent).
|
|
290
|
+
*/
|
|
291
|
+
export function ensureBacklogGitignored(projectRoot) {
|
|
292
|
+
const path = join(projectRoot, '.gitignore');
|
|
293
|
+
try {
|
|
294
|
+
if (!existsSync(path)) {
|
|
295
|
+
writeFileAtomic(path, `${BACKLOG_IGNORE_COMMENT}\n${BACKLOG_IGNORE_ENTRY}\n`);
|
|
296
|
+
return { action: 'created', path };
|
|
297
|
+
}
|
|
298
|
+
const text = readFileSync(path, 'utf-8');
|
|
299
|
+
const status = backlogIgnoreStatus(text);
|
|
300
|
+
if (status === 'covered')
|
|
301
|
+
return { action: 'already-covered', path };
|
|
302
|
+
if (status === 'negated') {
|
|
303
|
+
return { action: 'user-opted-out', path, reason: 'a "!" negation for the backlog store is present — respecting the explicit opt-out and adding nothing' };
|
|
304
|
+
}
|
|
305
|
+
const eol = dominantEol(text);
|
|
306
|
+
const sep = text === '' || text.endsWith('\n') ? '' : eol;
|
|
307
|
+
writeFileAtomic(path, `${text}${sep}${eol}${BACKLOG_IGNORE_COMMENT}${eol}${BACKLOG_IGNORE_ENTRY}${eol}`);
|
|
308
|
+
return { action: 'appended', path };
|
|
309
|
+
}
|
|
310
|
+
catch (err) {
|
|
311
|
+
return { action: 'skipped', path, reason: err instanceof Error ? err.message : String(err) };
|
|
312
|
+
}
|
|
313
|
+
}
|
|
192
314
|
export function snapshotIdeas(projectRoot, dest) {
|
|
193
315
|
try {
|
|
194
316
|
const ideas = readIdeas(projectRoot);
|
|
@@ -215,15 +337,15 @@ export function classifyDedup(candidates, cfg, opts = {}) {
|
|
|
215
337
|
const top = sorted[0];
|
|
216
338
|
const exactTextOnly = opts.exactTextOnly === true;
|
|
217
339
|
if (top === undefined)
|
|
218
|
-
return { action: 'new', cosine: -1, matchedId: undefined, relatedIds: [], exactTextOnly };
|
|
340
|
+
return { action: 'new', cosine: -1, matchedId: undefined, topMatchId: undefined, relatedIds: [], exactTextOnly };
|
|
219
341
|
if (top.cosine >= cfg.duplicateThreshold) {
|
|
220
|
-
return { action: 'duplicate', cosine: top.cosine, matchedId: top.id, relatedIds: [], exactTextOnly };
|
|
342
|
+
return { action: 'duplicate', cosine: top.cosine, matchedId: top.id, topMatchId: top.id, relatedIds: [], exactTextOnly };
|
|
221
343
|
}
|
|
222
344
|
const related = sorted.filter((c) => c.cosine >= cfg.relatednessFloor && c.cosine < cfg.duplicateThreshold);
|
|
223
345
|
if (related.length > 0) {
|
|
224
|
-
return { action: 'related', cosine: top.cosine, matchedId: undefined, relatedIds: related.map((c) => c.id), exactTextOnly };
|
|
346
|
+
return { action: 'related', cosine: top.cosine, matchedId: undefined, topMatchId: top.id, relatedIds: related.map((c) => c.id), exactTextOnly };
|
|
225
347
|
}
|
|
226
|
-
return { action: 'new', cosine: top.cosine, matchedId: undefined, relatedIds: [], exactTextOnly };
|
|
348
|
+
return { action: 'new', cosine: top.cosine, matchedId: undefined, topMatchId: top.id, relatedIds: [], exactTextOnly };
|
|
227
349
|
}
|
|
228
350
|
/**
|
|
229
351
|
* Production dedup: embed+search the `dz-backlog` vectors (RAW COSINE via `searchAgentdbPatterns`,
|
|
@@ -255,41 +377,102 @@ export async function dedupIdea(projectRoot, text, cfg, deps = {}) {
|
|
|
255
377
|
// idempotency, ADR-002 §degrade). Otherwise NEW — the RELATED band needs cosine and is skipped.
|
|
256
378
|
const match = ideas.find((i) => i.text === text);
|
|
257
379
|
if (match !== undefined)
|
|
258
|
-
return { action: 'duplicate', cosine: 1, matchedId: match.id, relatedIds: [], exactTextOnly: true };
|
|
259
|
-
return { action: 'new', cosine: -1, matchedId: undefined, relatedIds: [], exactTextOnly: result.error !== undefined };
|
|
380
|
+
return { action: 'duplicate', cosine: 1, matchedId: match.id, topMatchId: match.id, relatedIds: [], exactTextOnly: true };
|
|
381
|
+
return { action: 'new', cosine: -1, matchedId: undefined, topMatchId: undefined, relatedIds: [], exactTextOnly: result.error !== undefined };
|
|
260
382
|
}
|
|
261
383
|
return classifyDedup(candidates, cfg.dedup);
|
|
262
384
|
}
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
385
|
+
/** Reason an entry cannot become a Goal — `undefined` when it is well-formed. */
|
|
386
|
+
function goalDropReason(o) {
|
|
387
|
+
if (o === null || typeof o !== 'object' || Array.isArray(o))
|
|
388
|
+
return 'not an object';
|
|
389
|
+
const r = o;
|
|
390
|
+
if (typeof r.id !== 'string')
|
|
391
|
+
return 'missing "id"';
|
|
392
|
+
if (typeof r.statement !== 'string')
|
|
393
|
+
return 'missing "statement"';
|
|
394
|
+
return undefined;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Detailed GoalMap read — never throws, and REPORTS what it dropped (idea 960c9f26). `readGoalMap` is the
|
|
398
|
+
* lossy runtime view of this; both share one parser so they can never disagree about what a goal is.
|
|
399
|
+
*/
|
|
400
|
+
export function readGoalMapDetailed(projectRoot) {
|
|
268
401
|
const path = goalsPath(projectRoot);
|
|
269
402
|
if (!existsSync(path))
|
|
270
|
-
return { version: 1, goals: [] };
|
|
403
|
+
return { goalMap: { version: 1, goals: [] }, present: 0, dropped: [], repaired: [] };
|
|
404
|
+
let parsed;
|
|
271
405
|
try {
|
|
272
|
-
|
|
273
|
-
const goals = Array.isArray(parsed.goals)
|
|
274
|
-
? parsed.goals
|
|
275
|
-
.map((g) => {
|
|
276
|
-
const o = g;
|
|
277
|
-
if (typeof o.id !== 'string' || typeof o.statement !== 'string')
|
|
278
|
-
return undefined;
|
|
279
|
-
return {
|
|
280
|
-
id: o.id,
|
|
281
|
-
statement: o.statement,
|
|
282
|
-
weight: clampNum(o.weight, Number.MIN_VALUE, 1, 1),
|
|
283
|
-
keywords: Array.isArray(o.keywords) ? o.keywords.filter((k) => typeof k === 'string') : [],
|
|
284
|
-
};
|
|
285
|
-
})
|
|
286
|
-
.filter((g) => g !== undefined)
|
|
287
|
-
: [];
|
|
288
|
-
return { version: typeof parsed.version === 'number' ? parsed.version : 1, goals };
|
|
406
|
+
parsed = JSON.parse(readFileSync(path, 'utf-8'));
|
|
289
407
|
}
|
|
290
|
-
catch {
|
|
291
|
-
return {
|
|
408
|
+
catch (err) {
|
|
409
|
+
return {
|
|
410
|
+
goalMap: { version: 1, goals: [] },
|
|
411
|
+
present: 0,
|
|
412
|
+
dropped: [],
|
|
413
|
+
repaired: [],
|
|
414
|
+
parseError: `goals.json is not valid JSON: ${err instanceof Error ? err.message : String(err)}`,
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
// Valid JSON that is not an object (null, a number, an array) must not crash the never-throw
|
|
418
|
+
// reader: `parsed.version` on null is a TypeError (Codex re-QE HIGH).
|
|
419
|
+
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
|
420
|
+
return {
|
|
421
|
+
goalMap: { version: 1, goals: [] },
|
|
422
|
+
present: 0,
|
|
423
|
+
dropped: [],
|
|
424
|
+
repaired: [],
|
|
425
|
+
parseError: 'goals.json is valid JSON but not an object',
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
const version = typeof parsed.version === 'number' ? parsed.version : 1;
|
|
429
|
+
if (!Array.isArray(parsed.goals)) {
|
|
430
|
+
return {
|
|
431
|
+
goalMap: { version, goals: [] },
|
|
432
|
+
present: 0,
|
|
433
|
+
dropped: [],
|
|
434
|
+
repaired: [],
|
|
435
|
+
parseError: 'goals.json has no `goals` array',
|
|
436
|
+
};
|
|
292
437
|
}
|
|
438
|
+
const goals = [];
|
|
439
|
+
const dropped = [];
|
|
440
|
+
const repaired = [];
|
|
441
|
+
parsed.goals.forEach((g, index) => {
|
|
442
|
+
const reason = goalDropReason(g);
|
|
443
|
+
if (reason !== undefined) {
|
|
444
|
+
dropped.push({ index, reason });
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
const o = g;
|
|
448
|
+
const id = o.id;
|
|
449
|
+
// The clamp keeps the RUNTIME safe; the raw value is recorded so validation can still see what the
|
|
450
|
+
// user wrote (MED-7: clamping before validating made the validator's out-of-range branch dead code).
|
|
451
|
+
const weight = clampNum(o.weight, Number.MIN_VALUE, 1, 1);
|
|
452
|
+
if (o.weight !== undefined && o.weight !== weight) {
|
|
453
|
+
repaired.push({
|
|
454
|
+
index,
|
|
455
|
+
id,
|
|
456
|
+
field: 'weight',
|
|
457
|
+
raw: o.weight,
|
|
458
|
+
used: weight,
|
|
459
|
+
reason: typeof o.weight === 'number' && Number.isFinite(o.weight)
|
|
460
|
+
? `weight ${o.weight} is out of (0,1]`
|
|
461
|
+
: `weight ${JSON.stringify(o.weight) ?? String(o.weight)} is not a number in (0,1]`,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
goals.push({
|
|
465
|
+
id,
|
|
466
|
+
statement: o.statement,
|
|
467
|
+
weight,
|
|
468
|
+
keywords: Array.isArray(o.keywords) ? o.keywords.filter((k) => typeof k === 'string') : [],
|
|
469
|
+
});
|
|
470
|
+
});
|
|
471
|
+
return { goalMap: { version, goals }, present: parsed.goals.length, dropped, repaired };
|
|
472
|
+
}
|
|
473
|
+
/** Defensive GoalMap reader — never throws; a missing/corrupt file ⇒ empty compass (the runtime path). */
|
|
474
|
+
export function readGoalMap(projectRoot) {
|
|
475
|
+
return readGoalMapDetailed(projectRoot).goalMap;
|
|
293
476
|
}
|
|
294
477
|
/** The text embedded for a goal: statement + keywords (same convention across cache + score). */
|
|
295
478
|
export function goalEmbedText(goal) {
|