project-librarian 0.5.9 โ†’ 0.6.1

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.
@@ -6,6 +6,7 @@ exports.buildWikiGraph = buildWikiGraph;
6
6
  exports.wikiRouterDepths = wikiRouterDepths;
7
7
  exports.wikiQueryGraphEvidence = wikiQueryGraphEvidence;
8
8
  exports.wikiImpactAnswer = wikiImpactAnswer;
9
+ exports.wikiNeighborhoodAnswer = wikiNeighborhoodAnswer;
9
10
  const wiki_files_1 = require("./wiki-files");
10
11
  const workspace_1 = require("./workspace");
11
12
  // Router reachability budget. The benchmark fixture A1 assert guarantees
@@ -163,3 +164,125 @@ function wikiImpactAnswer(pages, term, graph = buildWikiGraph(pages)) {
163
164
  }
164
165
  return finalizeWikiAnswer(lines.join("\n"));
165
166
  }
167
+ const neighborhoodReadCap = 5;
168
+ function pageClassPriority(file, scope) {
169
+ if (file.startsWith("wiki/decisions/") || /decision/.test(scope))
170
+ return 90;
171
+ if (file.startsWith("wiki/sources/") || /source/.test(scope))
172
+ return 80;
173
+ if (file.startsWith("wiki/canonical/") || /canonical/.test(scope))
174
+ return 70;
175
+ if (file.startsWith("wiki/plans/") || /plan/.test(scope))
176
+ return 50;
177
+ if (file.startsWith("wiki/roadmaps/") || /roadmap/.test(scope))
178
+ return 40;
179
+ if (file.startsWith("wiki/meta/") || /wiki-meta/.test(scope))
180
+ return 30;
181
+ return 10;
182
+ }
183
+ function neighborhoodReasonRank(reason) {
184
+ if (reason === "exact page match")
185
+ return 1000;
186
+ if (reason === "title/path match")
187
+ return 900;
188
+ if (reason === "decision_ref target")
189
+ return 800;
190
+ if (reason === "decision_ref citation")
191
+ return 760;
192
+ if (reason === "outgoing link target")
193
+ return 700;
194
+ if (reason === "incoming link source")
195
+ return 650;
196
+ return 0;
197
+ }
198
+ function isGeneratedScopedRouter(file) {
199
+ return /^wiki\/indexes\/auto-[a-z0-9-]+(?:-\d+)?\.md$/.test(file);
200
+ }
201
+ function isRouterOnlySurface(file) {
202
+ return file === exports.wikiRouterRoot || file === "wiki/index.md" || isGeneratedScopedRouter(file);
203
+ }
204
+ function addNeighborhoodCandidate(candidates, file, reason, bestFile, graph) {
205
+ if (!graph.files.has(file) || (file !== bestFile && isRouterOnlySurface(file)))
206
+ return;
207
+ const existing = candidates.get(file);
208
+ if (!existing || neighborhoodReasonRank(reason) > neighborhoodReasonRank(existing.reason)) {
209
+ candidates.set(file, { file, reason });
210
+ }
211
+ }
212
+ function wikiNeighborhoodAnswer(pages, term, graph = buildWikiGraph(pages)) {
213
+ const depths = wikiRouterDepths(graph);
214
+ const textByFile = new Map(pages.map((page) => [page.file, page.text]));
215
+ const lowered = term.toLowerCase();
216
+ const exactTarget = (0, wiki_files_1.normalizeWikiLinkTarget)("wiki/index.md", term.replace(/^\[\[|\]\]$/g, ""));
217
+ const matches = pages
218
+ .map((page) => ({ file: page.file, title: (0, wiki_files_1.wikiTitleForFile)(page.file, page.text), text: page.text }))
219
+ .filter((page) => page.file === exactTarget || page.file.toLowerCase().includes(lowered) || page.title.toLowerCase().includes(lowered))
220
+ .sort((a, b) => {
221
+ const exactDelta = Number(b.file === exactTarget) - Number(a.file === exactTarget);
222
+ if (exactDelta !== 0)
223
+ return exactDelta;
224
+ const titleDelta = Number(b.title.toLowerCase().includes(lowered)) - Number(a.title.toLowerCase().includes(lowered));
225
+ if (titleDelta !== 0)
226
+ return titleDelta;
227
+ const aScope = (0, workspace_1.metadataValue)(a.text, "scope");
228
+ const bScope = (0, workspace_1.metadataValue)(b.text, "scope");
229
+ return pageClassPriority(b.file, bScope) - pageClassPriority(a.file, aScope) || a.file.localeCompare(b.file);
230
+ });
231
+ if (matches.length === 0)
232
+ return `Wiki neighborhood "${term}": no matching wiki pages.`;
233
+ const best = matches[0];
234
+ const candidates = new Map();
235
+ addNeighborhoodCandidate(candidates, best.file, best.file === exactTarget ? "exact page match" : "title/path match", best.file, graph);
236
+ const outgoingRef = graph.outgoingDecisionRef.get(best.file);
237
+ if (outgoingRef)
238
+ addNeighborhoodCandidate(candidates, outgoingRef, "decision_ref target", best.file, graph);
239
+ for (const source of graph.incomingDecisionRefs.get(best.file) ?? [])
240
+ addNeighborhoodCandidate(candidates, source, "decision_ref citation", best.file, graph);
241
+ for (const link of graph.outgoingLinks.get(best.file) ?? [])
242
+ addNeighborhoodCandidate(candidates, link.normalizedTarget, "outgoing link target", best.file, graph);
243
+ for (const link of graph.incomingLinks.get(best.file) ?? [])
244
+ addNeighborhoodCandidate(candidates, link.file, "incoming link source", best.file, graph);
245
+ const sorted = Array.from(candidates.values()).sort((a, b) => {
246
+ const reasonDelta = neighborhoodReasonRank(b.reason) - neighborhoodReasonRank(a.reason);
247
+ if (reasonDelta !== 0)
248
+ return reasonDelta;
249
+ const aText = textByFile.get(a.file) ?? "";
250
+ const bText = textByFile.get(b.file) ?? "";
251
+ const classDelta = pageClassPriority(b.file, (0, workspace_1.metadataValue)(bText, "scope")) - pageClassPriority(a.file, (0, workspace_1.metadataValue)(aText, "scope"));
252
+ if (classDelta !== 0)
253
+ return classDelta;
254
+ const aDepth = depths.get(a.file) ?? Number.POSITIVE_INFINITY;
255
+ const bDepth = depths.get(b.file) ?? Number.POSITIVE_INFINITY;
256
+ return aDepth - bDepth || a.file.localeCompare(b.file);
257
+ }).slice(0, neighborhoodReadCap);
258
+ const lines = [
259
+ `Wiki neighborhood "${term}": best match ${best.file} โ€” ${best.title}; read ${sorted.length} nearby page${sorted.length === 1 ? "" : "s"}.`,
260
+ "",
261
+ "Read order:",
262
+ ];
263
+ sorted.forEach((candidate, index) => {
264
+ const text = textByFile.get(candidate.file) ?? "";
265
+ const depth = depths.get(candidate.file);
266
+ const status = (0, workspace_1.metadataValue)(text, "status") || "unknown";
267
+ const scope = (0, workspace_1.metadataValue)(text, "scope") || "unknown-scope";
268
+ lines.push(`${index + 1}. ${candidate.file} โ€” ${candidate.reason}; ${depth === undefined ? "router unreachable" : `router depth ${depth}`}; ${status} ${scope}`);
269
+ });
270
+ const incoming = uniqueSorted((graph.incomingLinks.get(best.file) ?? [])
271
+ .map((link) => link.file)
272
+ .filter((source) => source !== best.file && graph.files.has(source)));
273
+ const outgoing = uniqueSorted((graph.outgoingLinks.get(best.file) ?? [])
274
+ .map((link) => link.normalizedTarget)
275
+ .filter((target) => target !== best.file && graph.files.has(target)));
276
+ const incomingRefs = uniqueSorted((graph.incomingDecisionRefs.get(best.file) ?? [])
277
+ .filter((source) => source !== best.file && graph.files.has(source)));
278
+ const reviewTrigger = (0, workspace_1.metadataValue)(best.text, "review_trigger");
279
+ lines.push("");
280
+ lines.push("Why:");
281
+ lines.push(`- incoming links: ${sampled(incoming, impactListCap)}`);
282
+ lines.push(`- outgoing links: ${sampled(outgoing, impactListCap)}`);
283
+ lines.push(`- decision_ref: ${outgoingRef && graph.files.has(outgoingRef) ? outgoingRef : "none"}`);
284
+ lines.push(`- decision_ref citations: ${sampled(incomingRefs, impactListCap)}`);
285
+ if (reviewTrigger)
286
+ lines.push(`- review_trigger: ${reviewTrigger}`);
287
+ return finalizeWikiAnswer(lines.join("\n"));
288
+ }
@@ -9,7 +9,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
9
9
 
10
10
  `install-skill` remains a compatibility alias for `install`.
11
11
 
12
- `update` is the explicit existing-project update command. It rejects `--migrate` and `--adopt-existing`; use top-level `--migrate` when legacy docs or wiki content should be preserved into `wiki_legacy*` and reviewed. When project-scoped Project Librarian skill installs already exist for the selected agent surfaces, `update` copies the current package's reusable skill files and required local-runner runtime dependencies into those project skill directories before refreshing the managed setup.
12
+ `update` is the explicit existing-project update command. It rejects `--migrate` and `--adopt-existing`; use top-level `--migrate` when legacy docs or wiki content should be preserved into `wiki_legacy*` and reviewed. When project-scoped Project Librarian skill installs already exist for the selected agent surfaces, `update` copies the current package's reusable skill files and required local-runner runtime dependencies into those project skill directories before refreshing the managed setup. An existing shared `.agents/skills/project-librarian/` install is synchronized independently without selecting agent-specific setup surfaces.
13
13
 
14
14
  ### Important Options
15
15
 
@@ -19,7 +19,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
19
19
  | `update --agents <list>` | Refresh an existing setup and existing project-scoped skill copies; selected surfaces can be `codex`, `claude`, `cursor`, `gemini`, or `all`. |
20
20
  | `--migrate`, `--adopt-existing` | Preserve an existing wiki as `wiki_legacy*`, create migration inboxes, and generate unit-map/split-plan/coverage review files. |
21
21
  | `--lint` | Validate generated setup without editing files. |
22
- | `--link-check` | Report broken wiki links, duplicate routes, orphan pages, and pages the startup router cannot reach within the depth budget. |
22
+ | `--link-check` | Report broken wiki links, duplicate routes, orphan pages, router reachability, and warning-only topology signals. |
23
23
  | `--quality-check` | Report stale, conflicting, and low-quality wiki document signals. |
24
24
  | `--doctor` | Run lint, link-check, and quality-check together. |
25
25
  | `--doctor --fix` | Safely refresh generated index routing before diagnostics. `--fix` is only a modifier for `--doctor`. |
@@ -28,8 +28,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
28
28
  | `--migration-doctor` | Run migration-lint and migration-quality-check together. |
29
29
  | `--query <terms>` | Search wiki paths, metadata, titles, and bodies; answer-first output with per-page TL;DR lines under a hard size cap. |
30
30
  | `--wiki-impact <page-or-term>` | Show wiki backlinks, `decision_ref` citations, outgoing links, and router depth for matching pages. |
31
- | `--wiki-visualize` | Write a self-contained static wiki graph visualizer to `.project-wiki/wiki-graph.html`. |
32
- | `--wiki-visualize-out <path>` | With `--wiki-visualize`, write to a custom repository-relative path under `.project-wiki/`. |
31
+ | `--wiki-neighborhood <page-or-term>` | Show a bounded read order for nearby wiki pages using links, `decision_ref`, metadata, page class, and router depth. |
33
32
  | `--refresh-index` | Update generated auto-discovered wiki routing. |
34
33
  | `--capture-inbox --title <title> --content <content> --category <category>` | Append a candidate note to the wiki inbox; category defaults to `project-candidate`. |
35
34
  | `--handoff-save --goal <goal> --state <state> --next <action>` | Save generated local session handoff state under `.project-wiki/session/`. Repeat `--next`, `--decision`, `--blocked`, `--open-question`, `--verification`, `--last-success-command`, and `--last-failure-command` as needed. |
@@ -59,3 +58,14 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
59
58
  | `--code-context-pack <term>` | Print a budgeted first-pass context pack with structural file, symbol, route, import, edge, and ownership evidence. |
60
59
  | `--code-search-symbol <term>` | Search indexed symbols. |
61
60
  | `--code-query <sql>` | Run conservative read-only SQL over the evidence index. |
61
+
62
+ ### Topology Warnings
63
+
64
+ `--link-check` keeps topology findings warning-only so they can guide cleanup without blocking bootstrap, update, or release flows.
65
+
66
+ | Code | Meaning |
67
+ | --- | --- |
68
+ | `hub-overload` | A hand-maintained router or meta page links to too many wiki pages and should be split or scoped. |
69
+ | `weak-authority-route` | An active canonical page with decision or evidence authority signals is reachable only through generated auto-index routing. |
70
+ | `missing-evidence-link` | An active canonical page makes a source-backed claim without a source link or `decision_ref`. |
71
+ | `stale-fanout` | A heavily linked active page has a broad review trigger that is too weak for topology-sensitive edits. |
@@ -9,7 +9,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
9
9
 
10
10
  `install-skill`์€ `install`์˜ ํ˜ธํ™˜์„ฑ ๋ณ„์นญ์œผ๋กœ ๊ณ„์† ์ง€์›๋ฉ๋‹ˆ๋‹ค.
11
11
 
12
- `update`๋Š” ๊ธฐ์กด ํ”„๋กœ์ ํŠธ ๊ฐฑ์‹ ์„ ๋ช…์‹œํ•˜๋Š” ๋ช…๋ น์ž…๋‹ˆ๋‹ค. `--migrate`์™€ `--adopt-existing`๋ฅผ ๊ฑฐ๋ถ€ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ๋ฌธ์„œ๋‚˜ ์œ„ํ‚ค ๋‚ด์šฉ์„ `wiki_legacy*`๋กœ ๋ณด์กดํ•˜๊ณ  ๊ฒ€ํ† ํ•ด์•ผ ํ•œ๋‹ค๋ฉด top-level `--migrate`๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์„ ํƒ๋œ ์—์ด์ „ํŠธ ํ‘œ๋ฉด์— ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Project Librarian ์Šคํ‚ฌ ์„ค์น˜๊ฐ€ ์ด๋ฏธ ์žˆ์œผ๋ฉด `update`๋Š” ํ˜„์žฌ ํŒจํ‚ค์ง€์˜ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์Šคํ‚ฌ ํŒŒ์ผ๊ณผ ๋กœ์ปฌ ์‹คํ–‰๊ธฐ์— ํ•„์š”ํ•œ ํ•„์ˆ˜ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์„ ํ•ด๋‹น ํ”„๋กœ์ ํŠธ ์Šคํ‚ฌ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ๋ณต์‚ฌํ•œ ๋’ค ๊ด€๋ฆฌ ์„ค์ •์„ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค.
12
+ `update`๋Š” ๊ธฐ์กด ํ”„๋กœ์ ํŠธ ๊ฐฑ์‹ ์„ ๋ช…์‹œํ•˜๋Š” ๋ช…๋ น์ž…๋‹ˆ๋‹ค. `--migrate`์™€ `--adopt-existing`๋ฅผ ๊ฑฐ๋ถ€ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ๋ฌธ์„œ๋‚˜ ์œ„ํ‚ค ๋‚ด์šฉ์„ `wiki_legacy*`๋กœ ๋ณด์กดํ•˜๊ณ  ๊ฒ€ํ† ํ•ด์•ผ ํ•œ๋‹ค๋ฉด top-level `--migrate`๋ฅผ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. ์„ ํƒ๋œ ์—์ด์ „ํŠธ ํ‘œ๋ฉด์— ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Project Librarian ์Šคํ‚ฌ ์„ค์น˜๊ฐ€ ์ด๋ฏธ ์žˆ์œผ๋ฉด `update`๋Š” ํ˜„์žฌ ํŒจํ‚ค์ง€์˜ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์Šคํ‚ฌ ํŒŒ์ผ๊ณผ ๋กœ์ปฌ ์‹คํ–‰๊ธฐ์— ํ•„์š”ํ•œ ํ•„์ˆ˜ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์„ ํ•ด๋‹น ํ”„๋กœ์ ํŠธ ์Šคํ‚ฌ ๋””๋ ‰ํ„ฐ๋ฆฌ์— ๋ณต์‚ฌํ•œ ๋’ค ๊ด€๋ฆฌ ์„ค์ •์„ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ๊ณต์œ  `.agents/skills/project-librarian/` ์„ค์น˜๋Š” ์—์ด์ „ํŠธ๋ณ„ ์„ค์ • ํ‘œ๋ฉด์„ ์„ ํƒํ•˜์ง€ ์•Š๊ณ  ๋ณ„๋„๋กœ ๋™๊ธฐํ™”ํ•ฉ๋‹ˆ๋‹ค.
13
13
 
14
14
  ### ์ฃผ์š” ์˜ต์…˜
15
15
 
@@ -19,7 +19,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
19
19
  | `update --agents <list>` | ๊ธฐ์กด ์„ค์ •๊ณผ ๊ธฐ์กด ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ ์Šคํ‚ฌ ๋ณต์‚ฌ๋ณธ์„ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค. ํ‘œ๋ฉด์€ `codex`, `claude`, `cursor`, `gemini`, `all` ์ค‘ ํ•˜๋‚˜์ž…๋‹ˆ๋‹ค. |
20
20
  | `--migrate`, `--adopt-existing` | ๊ธฐ์กด ์œ„ํ‚ค๋ฅผ `wiki_legacy*`๋กœ ๋ณด์กดํ•˜๊ณ  migration inbox, unit-map, split-plan, coverage ๊ฒ€ํ†  ํŒŒ์ผ์„ ๋งŒ๋“ญ๋‹ˆ๋‹ค. |
21
21
  | `--lint` | ํŒŒ์ผ์„ ์ˆ˜์ •ํ•˜์ง€ ์•Š๊ณ  ์ƒ์„ฑ๋œ ์„ค์ •์„ ๊ฒ€์ฆํ•ฉ๋‹ˆ๋‹ค. |
22
- | `--link-check` | ๊นจ์ง„ ์œ„ํ‚ค ๋งํฌ, ์ค‘๋ณต route, orphan page, ์‹œ์ž‘ ๋ผ์šฐํ„ฐ depth ์˜ˆ์‚ฐ ์•ˆ์—์„œ ๋‹ฟ์ง€ ์•Š๋Š” ํŽ˜์ด์ง€๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. |
22
+ | `--link-check` | ๊นจ์ง„ ์œ„ํ‚ค ๋งํฌ, ์ค‘๋ณต route, orphan page, router reachability, warning-only topology ์‹ ํ˜ธ๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. |
23
23
  | `--quality-check` | ์˜ค๋ž˜๋˜์—ˆ๊ฑฐ๋‚˜ ์ถฉ๋Œํ•˜๊ฑฐ๋‚˜ ํ’ˆ์งˆ์ด ๋‚ฎ์€ ์œ„ํ‚ค ๋ฌธ์„œ ์‹ ํ˜ธ๋ฅผ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค. |
24
24
  | `--doctor` | lint, link-check, quality-check๋ฅผ ํ•จ๊ป˜ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. |
25
25
  | `--doctor --fix` | ์ง„๋‹จ ์ „์— ์ƒ์„ฑ๋œ index routing์„ ์•ˆ์ „ํ•˜๊ฒŒ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค. `--fix`๋Š” `--doctor`์˜ modifier์ž…๋‹ˆ๋‹ค. |
@@ -28,8 +28,7 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
28
28
  | `--migration-doctor` | migration-lint์™€ migration-quality-check๋ฅผ ํ•จ๊ป˜ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. |
29
29
  | `--query <terms>` | ์œ„ํ‚ค ๊ฒฝ๋กœ, ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ, ์ œ๋ชฉ, ๋ณธ๋ฌธ์„ ๊ฒ€์ƒ‰ํ•˜๊ณ  ํฌ๊ธฐ ์ œํ•œ์ด ์žˆ๋Š” answer-first ์ถœ๋ ฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค. |
30
30
  | `--wiki-impact <page-or-term>` | ์ผ์น˜ํ•˜๋Š” ํŽ˜์ด์ง€์˜ backlinks, `decision_ref` ์ธ์šฉ, outgoing link, router depth๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. |
31
- | `--wiki-visualize` | `.project-wiki/wiki-graph.html`์— ๋…๋ฆฝ ์‹คํ–‰ํ˜• ์ •์  ์œ„ํ‚ค ๊ทธ๋ž˜ํ”„๋ฅผ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. |
32
- | `--wiki-visualize-out <path>` | `--wiki-visualize`์™€ ํ•จ๊ป˜ ์‚ฌ์šฉํ•ด `.project-wiki/` ์•„๋ž˜ ์‚ฌ์šฉ์ž ์ง€์ • ์ €์žฅ์†Œ ์ƒ๋Œ€ ๊ฒฝ๋กœ์— ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค. |
31
+ | `--wiki-neighborhood <page-or-term>` | link, `decision_ref`, metadata, page class, router depth๋ฅผ ์‚ฌ์šฉํ•ด ๊ฐ€๊นŒ์šด ์œ„ํ‚ค ํŽ˜์ด์ง€์˜ ์ œํ•œ๋œ ์ฝ๊ธฐ ์ˆœ์„œ๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. |
33
32
  | `--refresh-index` | ์ž๋™ ๋ฐœ๊ฒฌ๋œ ์œ„ํ‚ค routing์„ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค. |
34
33
  | `--capture-inbox --title <title> --content <content> --category <category>` | ํ›„๋ณด ๋ฉ”๋ชจ๋ฅผ ์œ„ํ‚ค inbox์— ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค. category ๊ธฐ๋ณธ๊ฐ’์€ `project-candidate`์ž…๋‹ˆ๋‹ค. |
35
34
  | `--handoff-save --goal <goal> --state <state> --next <action>` | `.project-wiki/session/` ์•„๋ž˜์— ์ƒ์„ฑํ˜• ๋กœ์ปฌ ์„ธ์…˜ ํ•ธ๋“œ์˜คํ”„๋ฅผ ์ €์žฅํ•ฉ๋‹ˆ๋‹ค. ํ•„์š”ํ•˜๋ฉด `--next`, `--decision`, `--blocked`, `--open-question`, `--verification`, `--last-success-command`, `--last-failure-command`๋ฅผ ๋ฐ˜๋ณตํ•ฉ๋‹ˆ๋‹ค. |
@@ -59,3 +58,14 @@ node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope
59
58
  | `--code-context-pack <term>` | ๊ตฌ์กฐ ํŒŒ์ผ, ์‹ฌ๋ณผ, route, import, edge, ์†Œ์œ ๊ถŒ ๊ทผ๊ฑฐ๋ฅผ ๋‹ด์€ ์˜ˆ์‚ฐ ์ œํ•œ first-pass context pack์„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค. |
60
59
  | `--code-search-symbol <term>` | ์ธ๋ฑ์‹ฑ๋œ ์‹ฌ๋ณผ์„ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค. |
61
60
  | `--code-query <sql>` | ๊ทผ๊ฑฐ ์ธ๋ฑ์Šค์—์„œ ๋ณด์ˆ˜์  ์ฝ๊ธฐ ์ „์šฉ SQL์„ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. |
61
+
62
+ ### Topology Warnings
63
+
64
+ `--link-check`์˜ topology finding์€ warning-only์ž…๋‹ˆ๋‹ค. ๊ทธ๋ž˜์„œ bootstrap, update, release ํ๋ฆ„์„ ๋ง‰์ง€ ์•Š์œผ๋ฉด์„œ ์ •๋ฆฌ ๋ฐฉํ–ฅ์„ ์•Œ๋ ค์ค๋‹ˆ๋‹ค.
65
+
66
+ | ์ฝ”๋“œ | ์˜๋ฏธ |
67
+ | --- | --- |
68
+ | `hub-overload` | ์‚ฌ๋žŒ์ด ๊ด€๋ฆฌํ•˜๋Š” router ๋˜๋Š” meta ํŽ˜์ด์ง€๊ฐ€ ๋„ˆ๋ฌด ๋งŽ์€ ์œ„ํ‚ค ํŽ˜์ด์ง€๋ฅผ ๋งํฌํ•˜๋ฏ€๋กœ ๋ถ„๋ฆฌํ•˜๊ฑฐ๋‚˜ ๋ฒ”์œ„๋ฅผ ์ขํ˜€์•ผ ํ•ฉ๋‹ˆ๋‹ค. |
69
+ | `weak-authority-route` | decision ๋˜๋Š” evidence ๊ถŒ์œ„ ์‹ ํ˜ธ๊ฐ€ ์žˆ๋Š” active canonical page๊ฐ€ generated auto-index routing์œผ๋กœ๋งŒ ๋„๋‹ฌ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. |
70
+ | `missing-evidence-link` | active canonical page๊ฐ€ source-backed claim์„ ํ•˜์ง€๋งŒ source link ๋˜๋Š” `decision_ref`๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. |
71
+ | `stale-fanout` | ๋งŽ์ด ๋งํฌ๋œ active page๊ฐ€ topology-sensitive edit์— ๋น„ํ•ด ๋„ˆ๋ฌด ๋„“์€ review trigger๋ฅผ ๊ฐ–๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. |
package/docs/ko/usage.md CHANGED
@@ -34,7 +34,7 @@ npx project-librarian@latest install --scope project --agents all
34
34
 
35
35
  ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ์—†๋Š” ๊ธฐ์กด ์„ค์ • ๊ฐฑ์‹ ์€ ์ €์žฅ์†Œ์— ์ด๋ฏธ ์žˆ๋Š” ์—์ด์ „ํŠธ ํ‘œ๋ฉด๋งŒ ๋ณด์กดํ•ด์„œ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ Codex์™€ Claude ํŒŒ์ผ๋งŒ ์žˆ๋˜ ์ €์žฅ์†Œ๋Š” ์ผ๋ฐ˜ ๊ฐฑ์‹ ๋งŒ์œผ๋กœ Cursor๋‚˜ Gemini ํŒŒ์ผ์ด ์ƒˆ๋กœ ์ƒ๊ธฐ์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์ƒˆ ํ‘œ๋ฉด์„ ์˜๋„์ ์œผ๋กœ ์ถ”๊ฐ€ํ•˜๋ ค๋ฉด `project-librarian update --agents cursor` ๋˜๋Š” `project-librarian update --agents all`์ฒ˜๋Ÿผ ๋ช…์‹œํ•ฉ๋‹ˆ๋‹ค. ๋ชฉ๋ก์— ์—†๋Š” ํ‘œ๋ฉด์„ ์‚ญ์ œํ•˜์ง€๋Š” ์•Š์Šต๋‹ˆ๋‹ค.
36
36
 
37
- `project-librarian update`๋Š” ์„ ํƒ๋œ ํ‘œ๋ฉด์— ์ด๋ฏธ ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Project Librarian ์Šคํ‚ฌ ์„ค์น˜๊ฐ€ ์žˆ์œผ๋ฉด ํ˜„์žฌ ์‹คํ–‰ ์ค‘์ธ ํŒจํ‚ค์ง€์˜ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์Šคํ‚ฌ ํŒŒ์ผ๊ณผ ํ”„๋กœ์ ํŠธ ๋กœ์ปฌ ์‹คํ–‰๊ธฐ์— ํ•„์š”ํ•œ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์„ ๊ทธ ํ”„๋กœ์ ํŠธ ์Šคํ‚ฌ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ๋™๊ธฐํ™”ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ ์ƒˆ ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ ์Šคํ‚ฌ ์„ค์น˜๋ฅผ ๋งŒ๋“ค์ง€๋Š” ์•Š๊ณ , ์‚ฌ์šฉ์ž ๋ฒ”์œ„ ์Šคํ‚ฌ ์„ค์น˜๋„ ๊ฐฑ์‹ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž ๋ฒ”์œ„ ์Šคํ‚ฌ์€ `install --scope user`๋กœ ๋ช…์‹œ์ ์œผ๋กœ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค.
37
+ `project-librarian update`๋Š” ์„ ํƒ๋œ ํ‘œ๋ฉด์— ์ด๋ฏธ ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Project Librarian ์Šคํ‚ฌ ์„ค์น˜๊ฐ€ ์žˆ์œผ๋ฉด ํ˜„์žฌ ์‹คํ–‰ ์ค‘์ธ ํŒจํ‚ค์ง€์˜ ์žฌ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ์Šคํ‚ฌ ํŒŒ์ผ๊ณผ ํ”„๋กœ์ ํŠธ ๋กœ์ปฌ ์‹คํ–‰๊ธฐ์— ํ•„์š”ํ•œ ๋Ÿฐํƒ€์ž„ ์˜์กด์„ฑ์„ ๊ทธ ํ”„๋กœ์ ํŠธ ์Šคํ‚ฌ ๋””๋ ‰ํ„ฐ๋ฆฌ๋กœ ๋™๊ธฐํ™”ํ•ฉ๋‹ˆ๋‹ค. ๊ธฐ์กด ๊ณต์œ  `.agents/skills/project-librarian/` ์„ค์น˜๋Š” ๋ณ„๋„๋กœ ๋™๊ธฐํ™”ํ•˜๋ฉฐ Codex, Claude, Cursor, Gemini ์„ค์ • ํ‘œ๋ฉด์„ ์•”๋ฌต์ ์œผ๋กœ ์ถ”๊ฐ€ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ธฐ๋ณธ์ ์œผ๋กœ ์ƒˆ ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ ์Šคํ‚ฌ ์„ค์น˜๋ฅผ ๋งŒ๋“ค์ง€๋Š” ์•Š๊ณ , ์‚ฌ์šฉ์ž ๋ฒ”์œ„ ์Šคํ‚ฌ ์„ค์น˜๋„ ๊ฐฑ์‹ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ์‚ฌ์šฉ์ž ๋ฒ”์œ„ ์Šคํ‚ฌ์€ `install --scope user`๋กœ ๋ช…์‹œ์ ์œผ๋กœ ๊ฐฑ์‹ ํ•ฉ๋‹ˆ๋‹ค.
38
38
 
39
39
  ## ์‹คํ–‰ ๊ฒฝ๋กœ
40
40
 
@@ -42,6 +42,7 @@ npx project-librarian@latest install --scope project --agents all
42
42
 
43
43
  | ์„ค์น˜ ์œ„์น˜ | ์‹คํ–‰ ๊ฒฝ๋กœ |
44
44
  | --- | --- |
45
+ | ๊ณต์œ  ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ ์Šคํ‚ฌ | `node .agents/skills/project-librarian/dist/init-project-wiki.js` |
45
46
  | ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Codex ์Šคํ‚ฌ | `node .codex/skills/project-librarian/dist/init-project-wiki.js` |
46
47
  | ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Claude ์Šคํ‚ฌ | `node .claude/skills/project-librarian/dist/init-project-wiki.js` |
47
48
  | ํ”„๋กœ์ ํŠธ ๋ฒ”์œ„ Cursor ์Šคํ‚ฌ | `node .cursor/skills/project-librarian/dist/init-project-wiki.js` |
@@ -69,7 +70,7 @@ npx project-librarian@latest install --scope project --agents all
69
70
  | ์ง„๋‹จ ์ „ ๋ผ์šฐํŒ… ๊ฐฑ์‹  | "Project Librarian ๋ผ์šฐํŒ…์„ ๊ฐฑ์‹ ํ•œ ๋’ค ์ง„๋‹จ์„ ์‹คํ–‰ํ•ด์ค˜." | `--doctor --fix` |
70
71
  | ์œ„ํ‚ค ๋‚ด์šฉ ๊ฒ€์ƒ‰ | "Project Librarian ์œ„ํ‚ค์—์„œ authentication decisions๋ฅผ ์ฐพ์•„์ค˜." | `--query "authentication decisions"` |
71
72
  | ํŽ˜์ด์ง€ ์˜ํ–ฅ๋„ ํ™•์ธ | "decisions/release-policy์˜ Project Librarian ์œ„ํ‚ค ์˜ํ–ฅ๋„๋ฅผ ๋ณด์—ฌ์ค˜." | `--wiki-impact "decisions/release-policy"` |
72
- | ์œ„ํ‚ค ๊ทธ๋ž˜ํ”„ ์ƒ์„ฑ | "Project Librarian ์œ„ํ‚ค ๊ทธ๋ž˜ํ”„ ์‹œ๊ฐํ™”๋ฅผ ์ƒ์„ฑํ•ด์ค˜." | `--wiki-visualize` |
73
+ | ๊ฐ€๊นŒ์šด ์œ„ํ‚ค ๋งฅ๋ฝ ์ฐพ๊ธฐ | "canonical/project-brief์˜ Project Librarian wiki neighborhood๋ฅผ ๋ณด์—ฌ์ค˜." | `--wiki-neighborhood "canonical/project-brief"` |
73
74
  | ํ›„๋ณด ๋ฉ”๋ชจ ์ €์žฅ | "์ด ๋‚ด์šฉ์„ Project Librarian ํ›„๋ณด ๋ฉ”๋ชจ๋กœ ์ €์žฅํ•ด์ค˜: <๋‚ด์šฉ>." | `--capture-inbox --title "Candidate" --content "Details"` |
74
75
  | ์„ธ์…˜ ํ•ธ๋“œ์˜คํ”„ ์ €์žฅ | "ํ˜„์žฌ ์ž‘์—…์„ Project Librarian ์„ธ์…˜ ํ•ธ๋“œ์˜คํ”„๋กœ ์ €์žฅํ•ด์ค˜." | `--handoff-save --goal "..." --state "..." --next "..."` |
75
76
  | ํ•ธ๋“œ์˜คํ”„ ๋ณด๊ธฐ | "๋งˆ์ง€๋ง‰ Project Librarian ์„ธ์…˜ ํ•ธ๋“œ์˜คํ”„๋ฅผ ๋ณด์—ฌ์ค˜." | `--handoff-show` |
@@ -160,9 +161,7 @@ MCP ์„œ๋ฒ„ ๋“ฑ๋ก์€ Claude Code(`.mcp.json`), Cursor(`.cursor/mcp.json`), Gemin
160
161
  6. `--refresh-index`๋Š” ์ƒˆ๋กœ ๋ฐœ๊ฒฌํ•œ ์œ„ํ‚ค ํŽ˜์ด์ง€๋ฅผ ๋ผ์šฐํŒ…ํ•ฉ๋‹ˆ๋‹ค. route๊ฐ€ ๋งŽ์œผ๋ฉด `wiki/indexes/auto-*.md` ๋ฒ”์œ„๋ณ„ ๋ผ์šฐํ„ฐ๋กœ ๋‚˜๋ˆ•๋‹ˆ๋‹ค.
161
162
  7. `--code-index`๋Š” `.project-wiki/` ์•„๋ž˜ ํ๊ธฐ ๊ฐ€๋Šฅํ•œ SQLite ๊ทผ๊ฑฐ ์บ์‹œ๋ฅผ ๋งŒ๋“ญ๋‹ˆ๋‹ค.
162
163
  8. `--code-report`, `--code-impact`, `--code-context-pack`, `--code-search-symbol`, `--code-query`๋Š” ๊ณ„ํš ์—…๋ฐ์ดํŠธ์— ์“ธ ์ฝ”๋“œ ๊ธฐ๋ฐ˜ ๊ทผ๊ฑฐ๋ฅผ ๋…ธ์ถœํ•ฉ๋‹ˆ๋‹ค.
163
- 9. ์ฝ๊ธฐ ์ „์šฉ ์œ„ํ‚ค ์†Œ๋น„์ž๋Š” ๊ฒฝ๋กœ์™€ frontmatter์—์„œ ์‚ฌ์šฉ์ž-facing page type์„ ํŒŒ์ƒํ•˜๋Š” concept read model์„ ๊ณต์œ ํ•ฉ๋‹ˆ๋‹ค.
164
- 10. ์œ„ํ‚ค ์ƒ์‚ฐ์ž๋Š” canonical markdown/YAML ์Šคํ‚ค๋งˆ๋ฅผ ๊ณ„์† ์“ฐ๊ณ , ์ง„๋‹จ/MCP/์‹œ๊ฐํ™” ๊ฐ™์€ ์ฝ๊ธฐ ์ „์šฉ ์†Œ๋น„์ž๋Š” ํŒŒ์ƒ projection์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.
165
- 11. `--wiki-visualize`๋Š” ๋ฐ์ดํ„ฐ๋ฒ ์ด์Šค๋‚˜ ์„œ๋ฒ„ ์—†์ด `.project-wiki/` ์•„๋ž˜ ์ •์  ๊ทธ๋ž˜ํ”„ ์‚ฐ์ถœ๋ฌผ์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
166
- 12. ์ง„๋‹จ์€ ๊นจ์ง„ ๋งํฌ, ์ค‘๋ณต route, orphan page, stale page, TL;DR ๋ˆ„๋ฝ, ๊ทผ๊ฑฐ ๊ณต๋ฐฑ, ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ์ •์ฑ… ์œ„๋ฐ˜์„ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค.
164
+ 9. ์œ„ํ‚ค ์ƒ์‚ฐ์ž๋Š” canonical markdown/YAML ์Šคํ‚ค๋งˆ๋ฅผ ๊ณ„์† ์“ฐ๊ณ , ์ง„๋‹จ/MCP ๊ฐ™์€ ์ฝ๊ธฐ ์ „์šฉ ์†Œ๋น„์ž๋Š” ์›๋ณธ ๋ฌธ์„œ๋ฅผ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š๊ณ  ๊ฒ€์‚ฌํ•ฉ๋‹ˆ๋‹ค.
165
+ 10. ์ง„๋‹จ์€ ๊นจ์ง„ ๋งํฌ, ์ค‘๋ณต route, orphan page, topology warning, stale page, TL;DR ๋ˆ„๋ฝ, ๊ทผ๊ฑฐ ๊ณต๋ฐฑ, ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜ ์ •์ฑ… ์œ„๋ฐ˜์„ ๋ณด๊ณ ํ•ฉ๋‹ˆ๋‹ค.
167
166
 
168
167
  ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜์€ ๊ฒ€ํ†  ์šฐ์„ ์ž…๋‹ˆ๋‹ค. `--migrate`๋Š” ๊ธฐ์กด `wiki/`๋ฅผ `wiki_legacy*`๋กœ ๋ณด์กดํ•˜๊ณ , ์–‘์‹ ์ „์šฉ ํŒŒ์ผ์€ ๊ฑด๋„ˆ๋›ฐ๋ฉฐ, ์—ฌ๋Ÿฌ ์„ฑ๊ฒฉ์ด ์„ž์ธ ๊ธฐ์กด ํŽ˜์ด์ง€๋ฅผ ์˜๋ฏธ ๋‹จ์œ„๋กœ ๋‚˜๋ˆ•๋‹ˆ๋‹ค. ์ดํ›„ ๊ฐ ๋‹จ์œ„๋ฅผ ๋ถ„๋ฅ˜ํ•ด `wiki/migration/` ์•„๋ž˜ ๊ฒ€ํ†  ํŒŒ์ผ์„ ์ž‘์„ฑํ•ฉ๋‹ˆ๋‹ค.
package/docs/usage.md CHANGED
@@ -32,7 +32,7 @@ npx project-librarian@latest install --scope project --agents all
32
32
 
33
33
  The project setup/update runner also accepts `--agents`. Fresh setup defaults to all supported agent surfaces only when no project-scoped Project Librarian skill install is present. If the repository already has project-scoped skills such as `.codex/skills/project-librarian/` and `.claude/skills/project-librarian/`, the first setup uses that installed agent set by default. Existing non-migration updates preserve the agent surfaces already present in the repository, so a repo that has only Codex and Claude files will not gain Cursor or Gemini files on a plain update. Use `project-librarian update --agents cursor` or `project-librarian update --agents all` when you intentionally want to add newly supported surfaces; unlisted surfaces are not deleted.
34
34
 
35
- `project-librarian update` also syncs any project-scoped Project Librarian skill installs that already exist for the selected surfaces from the currently running package, including the runtime dependencies needed by the project-local runner. This means `npx project-librarian@latest update` can refresh the repository's managed setup, hooks, wiki meta files, and existing project-scoped skill copies without migration. It does not create new project-scoped skill installs by default and does not update user-scoped skill installs; use `install --scope user` for that.
35
+ `project-librarian update` also syncs any project-scoped Project Librarian skill installs that already exist for the selected surfaces from the currently running package, including the runtime dependencies needed by the project-local runner. An existing shared `.agents/skills/project-librarian/` install is synchronized independently and does not imply Codex, Claude, Cursor, or Gemini setup surfaces. This means `npx project-librarian@latest update` can refresh the repository's managed setup, hooks, wiki meta files, and existing project-scoped skill copies without migration. It does not create new project-scoped skill installs by default and does not update user-scoped skill installs; use `install --scope user` for that.
36
36
 
37
37
  ## Runner Paths
38
38
 
@@ -40,6 +40,7 @@ These paths are mainly for agents and automation. After installation, agents sho
40
40
 
41
41
  | Installation | Runner |
42
42
  | --- | --- |
43
+ | Shared project-scoped skill | `node .agents/skills/project-librarian/dist/init-project-wiki.js` |
43
44
  | Project-scoped Codex skill | `node .codex/skills/project-librarian/dist/init-project-wiki.js` |
44
45
  | Project-scoped Claude skill | `node .claude/skills/project-librarian/dist/init-project-wiki.js` |
45
46
  | Project-scoped Cursor skill | `node .cursor/skills/project-librarian/dist/init-project-wiki.js` |
@@ -67,7 +68,7 @@ Wiki setup and maintenance:
67
68
  | Refresh generated routing before diagnostics | "Refresh Project Librarian routing and then run diagnostics." | `--doctor --fix` |
68
69
  | Search project wiki content | "Search the Project Librarian wiki for authentication decisions." | `--query "authentication decisions"` |
69
70
  | Show backlinks and decision citations for a page | "Show Project Librarian wiki impact for decisions/release-policy." | `--wiki-impact "decisions/release-policy"` |
70
- | Generate a wiki graph visualizer | "Generate the Project Librarian wiki graph visualizer." | `--wiki-visualize` |
71
+ | Find nearby wiki context | "Show Project Librarian wiki neighborhood for canonical/project-brief." | `--wiki-neighborhood "canonical/project-brief"` |
71
72
  | Capture a candidate note | "Capture this as a Project Librarian candidate note: <details>." | `--capture-inbox --title "Candidate" --content "Details"` |
72
73
  | Save a session handoff | "Save a Project Librarian session handoff for the current work." | `--handoff-save --goal "..." --state "..." --next "..."` |
73
74
  | Resume from a handoff | "Show the last Project Librarian session handoff." | `--handoff-show` |
@@ -158,10 +159,8 @@ MCP server registration is a preservation-first merge into `mcpServers` for Clau
158
159
  6. `--refresh-index` routes newly discovered wiki pages; large route sets are split into `wiki/indexes/auto-*.md` scoped routers.
159
160
  7. `--code-index` creates a disposable SQLite evidence cache under `.project-wiki/`.
160
161
  8. `--code-report`, `--code-impact`, `--code-context-pack`, `--code-search-symbol`, and `--code-query` expose code-backed evidence for planning updates.
161
- 9. Read-only wiki consumers share a concept read model that derives user-facing page types from paths and frontmatter without rewriting the canonical wiki schema.
162
- 10. Wiki producers keep writing the canonical markdown/YAML schema, while read-only consumers such as diagnostics, MCP, and the visualizer use derived projections instead of mutating source documents.
163
- 11. `--wiki-visualize` writes a static graph artifact to `.project-wiki/`, reusing the wiki graph and concept read model instead of introducing a database or server.
164
- 12. Diagnostics report broken links, duplicate routes, orphan pages, stale pages, missing TL;DRs, evidence gaps, and migration policy violations.
162
+ 9. Wiki producers keep writing the canonical markdown/YAML schema, while read-only consumers such as diagnostics and MCP inspect source documents without mutating them.
163
+ 10. Diagnostics report broken links, duplicate routes, orphan pages, topology warnings, stale pages, missing TL;DRs, evidence gaps, and migration policy violations.
165
164
 
166
165
  Migration is intentionally review-first. `--migrate` preserves an existing `wiki/` as `wiki_legacy*`, skips form-only/template legacy files, splits mixed legacy pages into meaning units, classifies each unit through the document taxonomy, and writes review files under `wiki/migration/`:
167
166
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-librarian",
3
- "version": "0.5.9",
3
+ "version": "0.6.1",
4
4
  "description": "Create and maintain compact project context for humans and LLM coding agents.",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -97,6 +97,6 @@
97
97
  "@sengac/tree-sitter-typescript": "^0.25.15"
98
98
  },
99
99
  "devDependencies": {
100
- "@types/node": "^22.20.0"
100
+ "@types/node": "^26.1.0"
101
101
  }
102
102
  }
@@ -1,49 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.conceptIdForFile = conceptIdForFile;
4
- exports.wikiConceptType = wikiConceptType;
5
- exports.conceptFromPage = conceptFromPage;
6
- exports.readWikiConcepts = readWikiConcepts;
7
- const wiki_files_1 = require("./wiki-files");
8
- const workspace_1 = require("./workspace");
9
- function conceptIdForFile(file) {
10
- return file.replace(/^wiki\//, "").replace(/\.(md|mdx)$/i, "");
11
- }
12
- function wikiConceptType(file, scope) {
13
- if (scope === "startup-router" || file === "wiki/startup.md")
14
- return "Startup Router";
15
- if (scope === "wiki-router" || file === "wiki/index.md" || /^wiki\/indexes\//.test(file))
16
- return "Wiki Router";
17
- if (scope === "project-canonical" || /^wiki\/canonical\//.test(file))
18
- return "Project Canonical Concept";
19
- if (scope === "project-decisions" || /^wiki\/decisions\//.test(file))
20
- return "Project Decision";
21
- if (scope === "source-summary" || /^wiki\/sources\//.test(file))
22
- return "Source Summary";
23
- if (scope === "wiki-meta" || /^wiki\/meta\//.test(file))
24
- return "Wiki Operations Concept";
25
- if (/^migration-/.test(scope) || /^wiki\/migration\//.test(file))
26
- return "Migration Ledger";
27
- if (scope === "inbox" || /^wiki\/inbox\//.test(file))
28
- return "Project Candidate";
29
- return "Wiki Concept";
30
- }
31
- function conceptFromPage(file, text) {
32
- const scope = (0, workspace_1.metadataValue)(text, "scope") || "-";
33
- const tldr = (0, wiki_files_1.firstTldrBullet)(text);
34
- return {
35
- budget: (0, workspace_1.metadataValue)(text, "read_budget") || "-",
36
- conceptId: conceptIdForFile(file),
37
- description: tldr || (0, wiki_files_1.compactSummary)(text),
38
- file,
39
- reviewTrigger: (0, workspace_1.metadataValue)(text, "review_trigger"),
40
- scope,
41
- status: (0, workspace_1.metadataValue)(text, "status") || "-",
42
- timestamp: (0, workspace_1.metadataValue)(text, "updated"),
43
- title: (0, wiki_files_1.wikiTitleForFile)(file, text),
44
- type: wikiConceptType(file, scope),
45
- };
46
- }
47
- function readWikiConcepts(files = (0, wiki_files_1.wikiMarkdownFiles)()) {
48
- return files.map((file) => conceptFromPage(file, (0, workspace_1.read)(file)));
49
- }