@adhd/backlog 0.0.2 → 0.1.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/CHANGELOG.md CHANGED
@@ -1 +1,54 @@
1
+ ## 0.0.3 (2026-07-25)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - **apigen,backlog:** killable serve, configurable namespace, flaky test + log spam
7
+
8
+ - **backlog:** match archived-item exclusion between render and its verify
9
+
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - pseudosky
14
+
15
+ ## 0.0.2 (2026-07-24)
16
+
17
+
18
+ ### 🚀 Features
19
+
20
+ - **backlog:** add CLI entrypoint + bin (live apigen cli-output mount)
21
+
22
+ - **backlog:** add migration.phase signal + migrationStatus op (MIGRATION.md §4.4)
23
+
24
+ - **backlog:** Phase 1/2 apigen import + CI parity gate + durable migration.phase admin write
25
+
26
+ - **backlog:** author backlog-usage skill + install-skill CLI (MIGRATION.md sec 4.2/4.3)
27
+
28
+ - **backlog:** add `serve` CLI command so .mcp.json has a real entry to spawn (MIGRATION.md sec 4.5)
29
+
30
+ - **backlog:** rootLevel projection filter so new tool items reach root
31
+
32
+
33
+ ### 🩹 Fixes
34
+
35
+ - **backlog:** close Phase-3 migration gate — CI Node floor, content-hash collision verified, FTS content immutability, bounded busy-retry; plus import provenance/silent-drop fixes
36
+
37
+ - **backlog:** runBacklogCli no longer eagerly opens the store for --help/no-args (DEBT-BACKLOG-CLI-EAGER-STORE-OPEN-001)
38
+
39
+ - **backlog:** concurrent createItem id-collision + FTS sanitizer gap (MIGRATION.md sec 3.3 scale test)
40
+
41
+ - **backlog:** implement real transition/claim audit-log (DEBT-BACKLOG-AUDIT-TRAIL-PARTIAL-001)
42
+
43
+ - **backlog:** importFromMarkdown upserts on re-import instead of insert-only
44
+
45
+ - **backlog:** sourcepath-ownership gate for importFromMarkdown (DEBT-BACKLOG-IMPORT-SCOPE-CROSSFILE-001)
46
+
47
+ - **backlog:** re-import backfills ownership + resurrects superseded ids
48
+
49
+
50
+ ### ❤️ Thank You
51
+
52
+ - pseudosky
53
+
1
54
  ## Unreleased
@@ -8,33 +8,22 @@ import { Scope } from '@adhd/environment-base-spec';
8
8
  * `project()`'s `cli.path = [namespace, ...path].map(toKebab)` —
9
9
  * `@adhd/apigen-engine-naming`'s `naming.ts`).
10
10
  *
11
- * NOT simply `['backlog']`. `extract()` (`@adhd/apigen-core-client`'s
12
- * `extract.ts`) unconditionally builds every operation's `path` as
13
- * `[fileSegment, exportSegment]`, where `fileSegment` is derived from the
14
- * EXTRACTED SOURCE FILE's own name (`normalizeFileName('client.d.ts')` →
15
- * `'client-d'` — strips one extension, then folds remaining `.`/`_` to `-`).
16
- * `server.ts`'s `extractClientOperations()` always points extraction at the
17
- * built `client.d.ts` (see that file's DEVIATION doc comment), so EVERY
18
- * `client.ts` export's real `cli.path` is
19
- * `['backlog', 'client-d', '<kebab-export-name>']` — confirmed empirically
20
- * (not assumed) by inspecting a real built `pkg`/`operations` pair; see
21
- * `cli.spec.ts`'s "command-prefix derivation" suite. The HTTP
22
- * (`apigen-plugin-api-fastify`) and MCP (`apigen-plugin-mcp`) transports
23
- * both route by bare `fnName` and never consult `project(op)` at all, so
24
- * this `client-d` segment is INVISIBLE on those two transports — it is
25
- * cli-output-specific, and would leak into every command a user types
26
- * (`backlog client-d get-item …`) if this file naively hardcoded a
27
- * single-segment `'backlog'` prefix instead of deriving the REAL prefix from
28
- * the live `operations` list.
11
+ * Currently simply `['backlog']`: `server.ts`'s `extractClientOperations()`
12
+ * calls `extract({ …, dropFileSegment: true })`, so every `client.ts`
13
+ * export's `path` is just `[exportSegment]` (no `client.d.ts`-derived
14
+ * `'client-d'` segment — see that call site's doc comment for why it's safe
15
+ * to drop here: one source file, no cross-file names to disambiguate), and
16
+ * `project(op).cli.path` is `['backlog', '<kebab-export-name>']`.
29
17
  *
30
- * Since every `client.ts` export shares the same namespace + same source
31
- * file, every operation's `cli.path` differs ONLY in its final (export)
32
- * segment — so the shared prefix is simply "everything but the last
33
- * segment" of any one operation's projected `cli.path`. Computed fresh from
34
- * `operations` on every call (never cached as a literal), so a future change
35
- * to the extraction source file name, or to `apigen-core-client`'s file-
36
- * segment derivation, can never silently desync this from the real command
37
- * table the way a hardcoded constant would.
18
+ * This is still derived from the live `operations` list rather than
19
+ * hardcoded, on purpose: since every `client.ts` export shares the same
20
+ * namespace + same source, every operation's `cli.path` differs ONLY in its
21
+ * final (export) segment, so the shared prefix is simply "everything but the
22
+ * last segment" of any one operation's projected `cli.path`. Computed fresh
23
+ * on every call (never cached as a literal) so a future change to the
24
+ * extraction call site (e.g. re-enabling the file segment, or adding a
25
+ * second source file) can never silently desync this from the real command
26
+ * table the way a hardcoded `['backlog']` constant would.
38
27
  */
39
28
  export declare function resolveCommandPrefix(operations: readonly Operation[]): string[];
40
29
  /**
@@ -43,7 +32,7 @@ export declare function resolveCommandPrefix(operations: readonly Operation[]):
43
32
  * user-typed argv, so `backlog get-item --repo … --human-id …` (what a
44
33
  * consumer actually types — the bin's own name is never part of `argv`)
45
34
  * resolves against the cli-output plugin's command table, which is keyed by
46
- * the FULL internal path (`['backlog', 'client-d', 'get-item']`).
35
+ * the FULL internal path (`['backlog', 'get-item']`).
47
36
  *
48
37
  * Idempotent / defensive:
49
38
  * - Empty argv is returned unchanged — `run()` treats `argv.length === 0`
@@ -77,7 +77,16 @@ export declare function setPriority(ctx: BacklogCtx, repo: string, humanId: stri
77
77
  /** MEMBER_OF edge to a plan node (auto-created if the plan slug hasn't been seen before). */
78
78
  export declare function attachToPlan(ctx: BacklogCtx, repo: string, humanId: string, planSlug: string): Promise<void>;
79
79
  export declare function importFromMarkdown(ctx: BacklogCtx, input: ImportMarkdownInput): Promise<ImportResult>;
80
- /** Excludes archived items (SPEC.md §5.4 archiveResolved) — see markdown.ts's renderItemsToMarkdown doc comment. */
80
+ /**
81
+ * Excludes archived items (SPEC.md §5.4 archiveResolved) — see markdown.ts's
82
+ * renderItemsToMarkdown doc comment. Archival exclusion goes through
83
+ * `BacklogFilter.excludeArchived` (query.ts's `applyExcludeArchivedFilter`)
84
+ * rather than a private scan here, so a caller comparing this output
85
+ * against `listItems`/`queryItemNodes` for the SAME filter (e.g.
86
+ * `render-projections.mjs`'s round-trip verify) can reproduce this exact
87
+ * item set by passing `{ ...filter, excludeArchived: true }` themselves —
88
+ * see BUG-BACKLOG-RENDER-VERIFY-ARCHIVED-MISMATCH-001.
89
+ */
81
90
  export declare function renderToMarkdown(ctx: BacklogCtx, filter?: BacklogFilter): Promise<string>;
82
91
  export declare function exportJson(ctx: BacklogCtx, filter?: BacklogFilter): Promise<BacklogItem[]>;
83
92
  /** Bi-temporal history + supersession chain. */