@adhd/backlog 0.1.3 → 0.1.4
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/cli.d.ts +80 -2
- package/client.d.ts +17 -0
- package/index.d.ts +2 -2
- package/index.js +112 -106
- package/index.mjs +14976 -14192
- package/package.json +13 -12
- package/store/crud.d.ts +33 -0
package/package.json
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhd/backlog",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"bin": {
|
|
5
5
|
"backlog": "index.js"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@adhd/
|
|
9
|
-
"
|
|
8
|
+
"@adhd/apigen-core-client": "^0.3.0",
|
|
9
|
+
"@adhd/apigen-engine-naming": "^0.2.2",
|
|
10
|
+
"@adhd/apigen-plugin-api-fastify": "^0.2.3",
|
|
11
|
+
"@adhd/apigen-plugin-batch": "^0.2.2",
|
|
12
|
+
"@adhd/apigen-plugin-cli-output": "^0.2.3",
|
|
13
|
+
"@adhd/apigen-plugin-ir-cache": "^0.1.0",
|
|
14
|
+
"@adhd/apigen-plugin-mcp": "^0.2.3",
|
|
15
|
+
"@adhd/apigen-plugin-openapi": "^0.2.2",
|
|
10
16
|
"@adhd/environment": "^0.1.3",
|
|
11
17
|
"@adhd/environment-base-spec": "^0.1.0",
|
|
12
|
-
"@adhd/
|
|
13
|
-
"
|
|
14
|
-
"@adhd/apigen-plugin-openapi": "^0.2.1",
|
|
15
|
-
"@adhd/apigen-plugin-mcp": "^0.2.2",
|
|
16
|
-
"@adhd/apigen-plugin-batch": "^0.2.1",
|
|
17
|
-
"@adhd/apigen-plugin-cli-output": "^0.2.2",
|
|
18
|
-
"@adhd/apigen-engine-naming": "^0.2.1",
|
|
19
|
-
"yaml": "1.10.3",
|
|
18
|
+
"@adhd/sox-graph-store": "^0.3.0",
|
|
19
|
+
"better-sqlite3": "^12.10.0",
|
|
20
20
|
"pino": "10.3.1",
|
|
21
|
-
"pino-pretty": "13.1.3"
|
|
21
|
+
"pino-pretty": "13.1.3",
|
|
22
|
+
"yaml": "1.10.3"
|
|
22
23
|
},
|
|
23
24
|
"assets": [
|
|
24
25
|
"skill"
|
package/store/crud.d.ts
CHANGED
|
@@ -1,6 +1,39 @@
|
|
|
1
1
|
import { GraphBacklogStore } from './graph-backlog-store.js';
|
|
2
2
|
import { BacklogItem, CreateItemInput, CreateItemResult, UpdateItemInput } from '../model.js';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Minimum fraction of the NEW item's meaningful title tokens that must also
|
|
6
|
+
* appear in a CANDIDATE's title for the candidate to count as a duplicate
|
|
7
|
+
* (BUG-BACKLOG-DEDUPE-FTS-WEAK-MATCH-001). Exported so callers/tests can
|
|
8
|
+
* tune it without touching this file's internals.
|
|
9
|
+
*
|
|
10
|
+
* Why title-to-title overlap instead of the FTS hit's bm25 `score`:
|
|
11
|
+
* `store.graph.searchNodes()` (`@adhd/sox-graph-store`) DOES return a
|
|
12
|
+
* per-hit `score` (`-fts_node.rank`, i.e. a positive, higher-is-better bm25
|
|
13
|
+
* score) — but bm25 is corpus- and document-length-relative, not an absolute
|
|
14
|
+
* similarity measure, and empirically it does NOT discriminate this bug's
|
|
15
|
+
* failure mode: a live probe reproducing the exact reported case (a short
|
|
16
|
+
* generic new title vs. a long, verbose, unrelated document that happens to
|
|
17
|
+
* repeat a couple of the new title's common words many times) scored
|
|
18
|
+
* `~0.0000109`, while a genuine short-title-vs-short-title near-duplicate
|
|
19
|
+
* scored `~0.0000113` — the SAME order of magnitude, with no clean
|
|
20
|
+
* separating threshold between them. A long document's sheer token count
|
|
21
|
+
* inflates its bm25 term-frequency component enough to rival a real
|
|
22
|
+
* duplicate's score. Title-to-title token overlap has no such document-
|
|
23
|
+
* length confound: a new item's title can only ever match against a
|
|
24
|
+
* candidate's (typically similarly short) title, so incidental repetition
|
|
25
|
+
* buried in a long candidate BODY can no longer count toward "looks like a
|
|
26
|
+
* duplicate" at all.
|
|
27
|
+
*
|
|
28
|
+
* 0.5 (at least half the new title's meaningful tokens must recur in the
|
|
29
|
+
* candidate's title) was chosen because DESIGN.md §2.4's own worked example
|
|
30
|
+
* ("same bug, different words") is a near-total title rewrite that still
|
|
31
|
+
* shares most of its content words ("database connection pool leaks under
|
|
32
|
+
* load" -> "the database connection pool leaks under load" is 6/6); dropping
|
|
33
|
+
* to a small minority match (e.g. 1-2 shared generic words out of 5) is
|
|
34
|
+
* exactly the false-positive shape this bug reports and must NOT pass.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TITLE_OVERLAP_MIN_FRACTION = 0.5;
|
|
4
37
|
declare function dedupeScan(store: GraphBacklogStore, repo: string, input: CreateItemInput): BacklogItem[];
|
|
5
38
|
export declare function createItemNode(store: GraphBacklogStore, input: CreateItemInput): CreateItemResult;
|
|
6
39
|
export declare function getItemNode(store: GraphBacklogStore, repo: string, humanId: string): BacklogItem | null;
|