project-librarian 0.2.1 → 0.4.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/README.ko.md +261 -93
- package/README.md +190 -76
- package/SKILL.md +16 -10
- package/dist/args.js +25 -2
- package/dist/code-index-file-policy.js +105 -2
- package/dist/code-index.js +338 -70
- package/dist/hooks.js +78 -0
- package/dist/init-project-wiki.js +265 -167
- package/dist/install-skill.js +2 -9
- package/dist/mcp-server.js +709 -0
- package/dist/migration.js +875 -60
- package/dist/modes.js +262 -62
- package/dist/retrieval-eval.js +68 -0
- package/dist/taxonomy.js +193 -0
- package/dist/templates.js +214 -36
- package/dist/wiki-concepts.js +49 -0
- package/dist/wiki-files.js +120 -27
- package/dist/wiki-graph.js +166 -0
- package/dist/wiki-visualizer.js +558 -0
- package/package.json +5 -4
- package/README.ja.md +0 -215
- package/README.zh.md +0 -215
package/README.md
CHANGED
|
@@ -5,11 +5,43 @@
|
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://nodejs.org/api/sqlite.html)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**Give every AI coding agent the same durable memory of your project.** Project Librarian keeps a compact, repo-local planning wiki — plus an optional code-evidence index — that Codex, Claude Code, Cursor, and Gemini CLI read at session start, so they stop rediscovering your codebase from scratch every time.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Languages: [English](README.md) | [한국어](README.ko.md)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
Most users should ask their coding agent to run Project Librarian rather than run lifecycle commands by hand.
|
|
15
|
+
|
|
16
|
+
Install the reusable skill files once, or ask an agent with shell access to do it:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx project-librarian install-skill --scope user --agents all
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Then ask Codex, Claude Code, Cursor, or Gemini CLI from the target repository:
|
|
23
|
+
|
|
24
|
+
- "Use Project Librarian to set up this repository's planning wiki and run diagnostics."
|
|
25
|
+
- "Use Project Librarian to migrate the existing docs/wiki content."
|
|
26
|
+
- "Search the Project Librarian wiki for authentication decisions."
|
|
27
|
+
|
|
28
|
+
The installed skill tells the agent to resolve the local runner and execute the right command from the project root. Prefer a project-local install only when you want that runner stored inside the target repository's agent setup:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx project-librarian install-skill --scope project --agents all
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`install-skill` only copies the reusable runner and skill files. The agent-run lifecycle command is what creates or updates `AGENTS.md`, agent hooks, `wiki/`, git hook files, diagnostics, and optional code-evidence support.
|
|
35
|
+
|
|
36
|
+
## Highlights
|
|
37
|
+
|
|
38
|
+
- **Small first read.** Session-start hooks inject only `wiki/startup.md` and `wiki/index.md`; agents route to deeper pages on demand instead of grepping the whole repo cold.
|
|
39
|
+
- **One setup, four agents.** Codex, Claude Code, Cursor, and Gemini CLI share the same wiki-first contract, hooks, and rules.
|
|
40
|
+
- **Structured wiki writing.** New project content is classified through `wiki/meta/document-taxonomy.md` before it is written or consolidated, so PRDs, policies, UX, data, APIs, QA, release, and operations notes do not collapse into one catch-all page.
|
|
41
|
+
- **Inspectable wiki graph.** `--wiki-visualize` writes a self-contained HTML graph under `.project-wiki/`, showing page types, router depth, backlinks, and decision references without adding to startup context.
|
|
42
|
+
- **Measured, not hand-wavy.** Every performance claim comes from hermetic Codex benchmarks — and the cases where it costs *more* are shown right next to the wins.
|
|
43
|
+
- **Optional code evidence.** A regenerable SQLite index plus answer-shaped MCP tools answer impact, ownership, and workspace-graph questions, with zero extra runtime dependencies.
|
|
44
|
+
- **Safe to re-run.** Bootstrap is idempotent and preservation-first; diagnostics flag broken routes, unreachable pages, and stale truth before they mislead an agent.
|
|
13
45
|
|
|
14
46
|
## Why It Exists
|
|
15
47
|
|
|
@@ -21,30 +53,71 @@ Project Librarian gives agents two local sources of truth:
|
|
|
21
53
|
| --- | --- |
|
|
22
54
|
| `wiki/startup.md` + `wiki/index.md` | A compact session-start summary and router, so only the relevant planning pages are read. |
|
|
23
55
|
| `wiki/canonical/` and `wiki/decisions/` | Current project facts, constraints, risks, package contracts, CLI behavior, and durable decisions. |
|
|
56
|
+
| `wiki/meta/document-taxonomy.md` | A service-lifecycle classification map that tells agents where PRD, policy, UX, data, engineering, QA, release, and operations truth should live. |
|
|
24
57
|
| `.codex/`, `.claude/`, `.cursor/`, and `.gemini/` hooks | Automatic startup context for Codex, Claude Code, Cursor, and Gemini CLI without loading the full wiki. |
|
|
25
58
|
| `GEMINI.md` and `.cursor/rules/` | Gemini CLI and Cursor instruction files that route agents to the same compact wiki-first contract. |
|
|
26
59
|
| `.project-wiki/code-evidence.sqlite` | Regenerable code evidence for files, symbols, imports, routes, ownership, workspace graph, reports, and impact checks. |
|
|
60
|
+
| `.project-wiki/wiki-graph.html` | Optional static wiki graph visualizer with derived concept types, router reachability, links, backlinks, and decision references. |
|
|
27
61
|
| Diagnostics and migration modes | Link checks, quality checks, migration inboxes, stale-signal reports, and issue drafts when the workflow exposes a problem. |
|
|
28
62
|
|
|
29
63
|
The core idea is not "write more docs." It is "keep the first agent read small, then give it reliable routes to deeper project truth and code evidence."
|
|
30
64
|
|
|
65
|
+
The taxonomy is a routing aid, not a mandate to create every possible document. It is strongest for service and product development. Library, infrastructure, research, or other non-service projects can use only the relevant slices and leave the rest as intentionally unused categories instead of forcing artificial pages.
|
|
66
|
+
|
|
31
67
|
## Benchmark Results
|
|
32
68
|
|
|
33
|
-
|
|
69
|
+
These numbers are maintainer release evidence, not a blanket promise. Every value is real Codex JSONL usage and local wall-clock time (ChatGPT/Codex auth, `gpt-5.5`), measured hermetically — isolated Codex home, allowlist-only environment, clean tree, post-run fixture validation — with 3 measured runs plus 1 warmup per scenario against an `organic` control that has no Project Librarian.
|
|
70
|
+
|
|
71
|
+
In the tables below, **"less" / "more"** compares cost-weighted tokens against that control, and **"faster" / "slower"** compares wall-clock time. (Cost-weighted = uncached input + 0.1 × cached input + output + reasoning output; cached resends are discounted, and raw merged totals would unfairly penalize any tool that adds a turn.) The wiki-routing track and the code-graph track are measured and reported separately — a win on one never backs a claim about the other. Generated benchmark reports under `benchmarks/reports/llm/` are ignored by default; maintainers should commit deliberate release baselines only when they are meant to support a public claim. Reproduce a release candidate with:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm run benchmark:release:preview
|
|
75
|
+
npm run benchmark:release -- --allow-codex-run
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Wiki track (planning-doc routing)
|
|
79
|
+
|
|
80
|
+
Cost-weighted tokens, Project Librarian vs control:
|
|
81
|
+
|
|
82
|
+
| Scale | decision_lookup | aggregation | multi_session (2nd session) |
|
|
83
|
+
| --- | --- | --- | --- |
|
|
84
|
+
| Small | 43.8% less | 144.5% more | 5.4% more |
|
|
85
|
+
| Medium | 53.4% less | 4.4% less | 68.5% less |
|
|
86
|
+
| Large | 71.6% less* | 12.8% less | 66.0% less |
|
|
87
|
+
|
|
88
|
+
Latest synthetic wiki-track release candidate: 2026-06-16, `gpt-5.5`, 42 scenarios, 3 measured runs plus 1 warmup each. The overall claim gate **failed**: 41/42 scenarios passed correctness, but `decision_lookup` at large scale on the no-Project-Librarian control had only 2/3 correct measured runs. The failed control run selected `2026-05-04` from a dated history file instead of the expected latest benchmark-evidence decision `2026-06-10` from the decision log. Treat this table as diagnostic evidence, not a public release claim, until a clean release run passes the claim gate. Published boundaries remain visible: small `aggregation` is much more expensive with the wiki, small `multi_session` is slightly more expensive, and `aggregation` stays slower at every scale even when token cost drops.
|
|
89
|
+
|
|
90
|
+
### Code-graph track (code evidence index, real repositories)
|
|
91
|
+
|
|
92
|
+
Measured on two SHA-pinned open-source repositories with hand-authored answer keys and the answer-shaped MCP tools injected into the hermetic Codex home. The claim gate passed with 30/30 runs correct after two evaluator false positives were fixed and the report was re-scored from raw JSONL; recompute-from-raw is the standing audit policy. Cost-weighted tokens, Project Librarian vs control:
|
|
93
|
+
|
|
94
|
+
| Question | excalidraw (~1.2k files) | backstage (~11.8k files) |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| impact_trace | 117% more | **27.7% less** |
|
|
97
|
+
| workspace_graph | 106% more | 2.6% less |
|
|
98
|
+
| ownership_lookup | — | 99% more |
|
|
99
|
+
|
|
100
|
+
The claim is a scale crossover, and the losses are published next to the win: on the 11.8k-file repository the tool wins the expensive traversal question (impact_trace 27.7% fewer cost-weighted tokens, 24.5% fewer scan bytes) and breaks even on the workspace graph, but everything loses on the small repository and cheap lookups (CODEOWNERS ownership) lose at every measured scale. In short, the code-evidence index pays off only on genuinely large repositories for expensive-traversal questions — exactly what the CLI's scale-aware gates encode: below ~5k indexable files, `--code-index` asks for explicit acknowledgement and bootstrap skips MCP auto-registration, citing these measurements.
|
|
101
|
+
|
|
102
|
+
### What the benchmark names mean
|
|
103
|
+
|
|
104
|
+
Repositories under test:
|
|
34
105
|
|
|
35
|
-
|
|
106
|
+
- **excalidraw** — a real open-source whiteboard/diagramming app (~1.2k files); the small-repo data point.
|
|
107
|
+
- **backstage** — Spotify's open-source developer-portal platform (~11.8k files); the large-repo data point.
|
|
36
108
|
|
|
37
|
-
|
|
38
|
-
| --- | ---: | ---: | ---: |
|
|
39
|
-
| Small | 102,655 total tokens; 101,226 input; 37.15s; 9 command invocations | 176,104 total tokens; 173,733 input; 61.04s; 15 command invocations | +71.55% tokens; +64.33% time; +66.67% commands |
|
|
40
|
-
| Medium | 79,340 total tokens; 78,348 input; 44.28s; 5 command invocations | 165,840 total tokens; 163,856 input; 48.48s; 10 command invocations | +109.02% tokens; +9.5% time; +100% commands |
|
|
41
|
-
| Large | 197,097 total tokens; 195,278 input; 45.87s; 10 command invocations | 183,959 total tokens; 181,897 input; 49.42s; 13 command invocations | -6.67% tokens; +7.72% time; +30% commands |
|
|
109
|
+
Question types (task families):
|
|
42
110
|
|
|
43
|
-
|
|
111
|
+
- **decision_lookup** — find the latest project decision and its date from the wiki.
|
|
112
|
+
- **aggregation** — answer a question whose facts are scattered across several pages and must be synthesized.
|
|
113
|
+
- **multi_session** — a second session on the same project, measuring whether the durable wiki helps the next session, not just the first.
|
|
114
|
+
- **impact_trace** — "if this module changes, what else is affected?": trace the full set of direct and indirect importers.
|
|
115
|
+
- **ownership_lookup** — "who owns this file?": resolve the owner by CODEOWNERS last-match precedence.
|
|
116
|
+
- **workspace_graph** — "what does this package depend on across the monorepo?": the workspace/package dependency graph.
|
|
44
117
|
|
|
45
|
-
## Install
|
|
118
|
+
## Install Details
|
|
46
119
|
|
|
47
|
-
Use `npx` only for initial skill installation:
|
|
120
|
+
Use this section when you need to choose an install scope or target agent. Use `npx` only for initial skill installation:
|
|
48
121
|
|
|
49
122
|
```bash
|
|
50
123
|
npx project-librarian install-skill --scope user --agents all
|
|
@@ -68,11 +141,11 @@ npx project-librarian install-skill --scope project --agents all
|
|
|
68
141
|
| Install only Gemini CLI | `npx project-librarian install-skill --agents gemini` |
|
|
69
142
|
| Preview install output | `npx project-librarian install-skill --scope project --agents all --dry-run` |
|
|
70
143
|
|
|
71
|
-
`--agents` also accepts comma-separated values such as `codex,claude,cursor,gemini`. `all` targets every supported agent
|
|
144
|
+
`--agents` also accepts comma-separated values such as `codex,claude,cursor,gemini`. `all` targets every supported agent. `--scope` accepts `user` or `project`.
|
|
72
145
|
|
|
73
|
-
##
|
|
146
|
+
## Runner Paths
|
|
74
147
|
|
|
75
|
-
After installation, agents should run the installed local copy with `node`, not `npx`. This avoids network access and unpinned package execution in restricted agent environments.
|
|
148
|
+
These paths are mainly for agents and automation. After installation, agents should run the installed local copy with `node`, not `npx`. This avoids network access and unpinned package execution in restricted agent environments.
|
|
76
149
|
|
|
77
150
|
| Installation | Runner |
|
|
78
151
|
| --- | --- |
|
|
@@ -85,52 +158,44 @@ After installation, agents should run the installed local copy with `node`, not
|
|
|
85
158
|
| User-scoped Cursor skill | `node ~/.cursor/skills/project-librarian/dist/init-project-wiki.js` |
|
|
86
159
|
| User-scoped Gemini skill | `node ~/.gemini/skills/project-librarian/dist/init-project-wiki.js` |
|
|
87
160
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
| Build
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
| Use optional Tree-sitter backend | `$PROJECT_LIBRARIAN --code-index --code-parser tree-sitter` |
|
|
127
|
-
| Show cache status | `$PROJECT_LIBRARIAN --code-status` |
|
|
128
|
-
| List indexed files | `$PROJECT_LIBRARIAN --code-files` |
|
|
129
|
-
| Print architecture and ownership report | `$PROJECT_LIBRARIAN --code-report` |
|
|
130
|
-
| Print one report section | `$PROJECT_LIBRARIAN --code-report --code-report-section routes` |
|
|
131
|
-
| Inspect impact evidence | `$PROJECT_LIBRARIAN --code-impact healthHandler` |
|
|
132
|
-
| Search indexed symbols | `$PROJECT_LIBRARIAN --code-search-symbol Auth` |
|
|
133
|
-
| Run conservative read-only SQL | `$PROJECT_LIBRARIAN --code-query "select path from files order by path"` |
|
|
161
|
+
## Common Agent Requests
|
|
162
|
+
|
|
163
|
+
Ask your agent for the outcome you want; the skill maps the request to the local runner internally.
|
|
164
|
+
|
|
165
|
+
Wiki setup and maintenance:
|
|
166
|
+
|
|
167
|
+
| Goal | Ask The Agent | Internal Action |
|
|
168
|
+
| --- | --- | --- |
|
|
169
|
+
| Create or update the wiki | "Use Project Librarian to set up or update this repository's planning wiki." | `[init]` |
|
|
170
|
+
| Update existing setup without migration | "Update this repository's Project Librarian setup without migrating the wiki." | `update` |
|
|
171
|
+
| Migrate existing docs/wiki content | "Use Project Librarian to migrate the existing docs/wiki content." | `--migrate` |
|
|
172
|
+
| Validate generated setup | "Run Project Librarian validation." | `--lint` |
|
|
173
|
+
| Check links and document quality | "Run Project Librarian diagnostics." | `--doctor` |
|
|
174
|
+
| Refresh generated routing before diagnostics | "Refresh Project Librarian routing and then run diagnostics." | `--doctor --fix` |
|
|
175
|
+
| Search project wiki content | "Search the Project Librarian wiki for authentication decisions." | `--query "authentication decisions"` |
|
|
176
|
+
| Show backlinks and decision citations for a page | "Show Project Librarian wiki impact for decisions/release-policy." | `--wiki-impact "decisions/release-policy"` |
|
|
177
|
+
| Generate a wiki graph visualizer | "Generate the Project Librarian wiki graph visualizer." | `--wiki-visualize` |
|
|
178
|
+
| Capture a candidate note | "Capture this as a Project Librarian candidate note: <details>." | `--capture-inbox --title "Candidate" --content "Details"` |
|
|
179
|
+
| Report stale or unresolved wiki pages | "Check Project Librarian for stale or unresolved pages." | `--prune-check` |
|
|
180
|
+
| Install hook files without changing git config | "Set up Project Librarian hook files without changing git config." | `--no-git-config` |
|
|
181
|
+
|
|
182
|
+
Code evidence:
|
|
183
|
+
|
|
184
|
+
| Goal | Ask The Agent | Internal Action |
|
|
185
|
+
| --- | --- | --- |
|
|
186
|
+
| Build the default evidence cache | "Build Project Librarian code evidence for `src`." | `--code-index --code-scope src` |
|
|
187
|
+
| Build multiple scopes | "Build Project Librarian code evidence for `src` and `packages/api`." | `--code-index --code-scope src --code-scope packages/api` |
|
|
188
|
+
| Require incremental update | "Update the Project Librarian code evidence index incrementally." | `--code-index --incremental` |
|
|
189
|
+
| Force a full rebuild | "Fully rebuild the Project Librarian code evidence index." | `--code-index --code-index-full` |
|
|
190
|
+
| Use optional Tree-sitter backend | "Build Project Librarian code evidence with the Tree-sitter parser." | `--code-index --code-parser tree-sitter` |
|
|
191
|
+
| Show cache status | "Show Project Librarian code evidence status." | `--code-status` |
|
|
192
|
+
| List indexed files | "List files in the Project Librarian code evidence index." | `--code-files` |
|
|
193
|
+
| Print architecture and ownership report | "Show the Project Librarian code report." | `--code-report` |
|
|
194
|
+
| Print one report section | "Show the routes section of the Project Librarian code report." | `--code-report --code-report-section routes` |
|
|
195
|
+
| Inspect impact evidence | "Show Project Librarian impact evidence for `healthHandler`." | `--code-impact healthHandler` |
|
|
196
|
+
| Build a context pack | "Build a Project Librarian context pack for `healthHandler`." | `--code-context-pack healthHandler` |
|
|
197
|
+
| Search indexed symbols | "Search Project Librarian code evidence for symbol `Auth`." | `--code-search-symbol Auth` |
|
|
198
|
+
| Run conservative read-only SQL | "Run a read-only Project Librarian code evidence query for file paths." | `--code-query "select path from files order by path"` |
|
|
134
199
|
|
|
135
200
|
Only one code evidence mode can run at a time. `--incremental`, `--code-index-full`, and `--code-parser` are valid only with `--code-index`.
|
|
136
201
|
|
|
@@ -169,21 +234,64 @@ Wiki directories:
|
|
|
169
234
|
- `wiki/sources/`
|
|
170
235
|
- `wiki/migration/`
|
|
171
236
|
|
|
237
|
+
Seed wiki pages and routers:
|
|
238
|
+
|
|
239
|
+
- `wiki/startup.md`
|
|
240
|
+
- `wiki/index.md`
|
|
241
|
+
- `wiki/meta/document-taxonomy.md`
|
|
242
|
+
|
|
243
|
+
Empty project pages such as `canonical/project-brief.md`, `canonical/open-questions.md`, `canonical/assumptions.md`, `canonical/risks.md`, and ADR templates are not created until there is real content to store. The router can discover them later with `--refresh-index`. During migration, form-only legacy templates are recorded as skipped in `wiki/migration/inventory.md` instead of becoming review rows or new wiki pages.
|
|
244
|
+
|
|
245
|
+
MCP server registration (preservation-first merge into `mcpServers`):
|
|
246
|
+
|
|
247
|
+
- `.mcp.json` (Claude Code)
|
|
248
|
+
- `.cursor/mcp.json` (Cursor)
|
|
249
|
+
- `.gemini/settings.json` `mcpServers` (Gemini CLI)
|
|
250
|
+
|
|
172
251
|
Disposable code evidence cache:
|
|
173
252
|
|
|
174
253
|
- `.project-wiki/code-evidence.sqlite`
|
|
175
254
|
|
|
255
|
+
## Code Evidence MCP Server
|
|
256
|
+
|
|
257
|
+
`project-librarian mcp` runs a hand-rolled stdio MCP server (JSON-RPC 2.0 over newline-delimited JSON, no extra runtime dependencies) that serves the existing `.project-wiki` code-evidence index read-only. It exposes answer-shaped tools — `code_context_pack`, `code_impact`, `code_ownership` (CODEOWNERS last-match precedence), `code_workspace_graph`, `code_search`, and `code_status` — whose responses lead with a one-line answer, follow with compact path/symbol/signature evidence, cap each reply, and prepend a warning when `code_status` reports the index is stale.
|
|
258
|
+
|
|
259
|
+
The server also exposes fixed resources — `project-librarian://wiki/startup`, `project-librarian://wiki/index`, and `project-librarian://code/status` — plus prompt templates for wiki taxonomy updates, code impact traces, and retrieval quality reviews. Resource reads come from a fixed URI registry rather than arbitrary filesystem paths.
|
|
260
|
+
|
|
261
|
+
Bootstrap registers the server for Claude Code (`.mcp.json`), Cursor (`.cursor/mcp.json`), and Gemini CLI (`mcpServers` in `.gemini/settings.json`), preserving any existing servers and keys and reporting `exists` on a re-run. When the repository contains a local runner the registration uses `node <runner> mcp`; otherwise it uses the installed `project-librarian mcp` binary.
|
|
262
|
+
|
|
263
|
+
Codex registers MCP servers at the user level only (`codex mcp add`), so bootstrap does not write a project-level Codex MCP config. To use the server with Codex, run it once per machine:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
codex mcp add project-librarian -- node .codex/skills/project-librarian/dist/init-project-wiki.js mcp
|
|
267
|
+
```
|
|
268
|
+
|
|
176
269
|
## How It Works
|
|
177
270
|
|
|
178
271
|
1. Bootstrap creates a preservation-first wiki structure and marker-bounded agent instruction sections.
|
|
179
272
|
2. Session-start hooks inject only `wiki/startup.md` and `wiki/index.md`, with character budgets.
|
|
180
|
-
3.
|
|
181
|
-
4.
|
|
182
|
-
5.
|
|
183
|
-
6. `--
|
|
184
|
-
7.
|
|
273
|
+
3. Bootstrap avoids empty form-only project pages; focused canonical, decision, source, and meta pages are created when content actually exists.
|
|
274
|
+
4. Detailed planning truth stays in canonical, decision, source, and meta pages that agents read on demand.
|
|
275
|
+
5. New project-planning content is classified through `wiki/meta/document-taxonomy.md` before it is written or consolidated, keeping upstream/downstream document relationships visible.
|
|
276
|
+
6. `--refresh-index` routes newly discovered wiki pages; large route sets are split into `wiki/indexes/auto-*.md` scoped routers.
|
|
277
|
+
7. `--code-index` creates a disposable SQLite evidence cache under `.project-wiki/`.
|
|
278
|
+
8. `--code-report`, `--code-impact`, `--code-context-pack`, `--code-search-symbol`, and `--code-query` expose code-backed evidence for planning updates.
|
|
279
|
+
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.
|
|
280
|
+
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.
|
|
281
|
+
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.
|
|
282
|
+
12. Diagnostics report broken links, duplicate routes, orphan pages, stale pages, missing TL;DRs, evidence gaps, and migration policy violations.
|
|
283
|
+
|
|
284
|
+
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/`:
|
|
185
285
|
|
|
186
|
-
|
|
286
|
+
- `inventory.md` records migratable legacy markdown files, file-level classification, and form-only/template files skipped from semantic migration.
|
|
287
|
+
- `unit-map.md` records each heading, paragraph, list item, table row, and code block with its suggested taxonomy area and target page.
|
|
288
|
+
- `split-plan.md` groups those units by suggested new wiki target, so one legacy page that mixes API specs, features, UX, QA, policy, or operations can be rewritten into separate files.
|
|
289
|
+
- `coverage.md` is the editable status ledger for each unit: pending, adopted, merged, superseded, rejected, resolved, or needs-human-review.
|
|
290
|
+
- `verification.md` and `review.md` summarize coverage and semantic completion after `--review-migration`.
|
|
291
|
+
|
|
292
|
+
`--migration-lint` validates that `coverage.md`, `unit-map.md`, and `split-plan.md` still account for the current migration batch, including duplicate/stale unit IDs, invalid storage/confidence/status values, split count drift, target drift, and old coverage-table schemas. When a legacy page has units that point to multiple targets, `--review-migration` will not let a file-level inbox status complete every unit; unit-level coverage must be resolved instead.
|
|
293
|
+
|
|
294
|
+
Retained or copied legacy content is acceptable when it fits the new wiki policy and structure; the new wiki must not depend on citing `wiki_legacy*`.
|
|
187
295
|
|
|
188
296
|
## Language Support Matrix
|
|
189
297
|
|
|
@@ -208,39 +316,45 @@ Recognized but inventory-only extensions include `.rb`, `.vue`, and `.css`. Conf
|
|
|
208
316
|
|
|
209
317
|
## CLI Reference
|
|
210
318
|
|
|
211
|
-
Use the local runner for
|
|
319
|
+
Use the resolved local runner for automation or direct CLI execution:
|
|
212
320
|
|
|
213
321
|
```bash
|
|
214
|
-
|
|
215
|
-
|
|
322
|
+
node .codex/skills/project-librarian/dist/init-project-wiki.js [init|update] [options]
|
|
323
|
+
node .codex/skills/project-librarian/dist/init-project-wiki.js install-skill [--scope user|project] [--agents codex|claude|cursor|gemini|all]
|
|
216
324
|
```
|
|
217
325
|
|
|
326
|
+
`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.
|
|
327
|
+
|
|
218
328
|
Important options:
|
|
219
329
|
|
|
220
330
|
| Option | Purpose |
|
|
221
331
|
| --- | --- |
|
|
222
|
-
| `--migrate`, `--adopt-existing` | Preserve an existing wiki as `wiki_legacy
|
|
332
|
+
| `--migrate`, `--adopt-existing` | Preserve an existing wiki as `wiki_legacy*`, create migration inboxes, and generate unit-map/split-plan/coverage review files. |
|
|
223
333
|
| `--lint` | Validate generated setup without editing files. |
|
|
224
|
-
| `--link-check` | Report broken wiki links, duplicate routes, and
|
|
334
|
+
| `--link-check` | Report broken wiki links, duplicate routes, orphan pages, and pages the startup router cannot reach within the depth budget. |
|
|
225
335
|
| `--quality-check` | Report stale, conflicting, and low-quality wiki document signals. |
|
|
226
336
|
| `--doctor` | Run lint, link-check, and quality-check together. |
|
|
227
337
|
| `--doctor --fix` | Safely refresh generated index routing before diagnostics. |
|
|
228
|
-
| `--migration-lint` | Validate migration review scaffolding separately from normal lint. |
|
|
338
|
+
| `--migration-lint` | Validate migration coverage, unit-map, split-plan, and review scaffolding separately from normal lint. |
|
|
229
339
|
| `--migration-quality-check` | Report migration policy/structure signals separately from normal quality-check. |
|
|
230
340
|
| `--migration-doctor` | Run migration-lint and migration-quality-check together. |
|
|
231
|
-
| `--query <terms>` | Search wiki paths, metadata, titles, and bodies. |
|
|
341
|
+
| `--query <terms>` | Search wiki paths, metadata, titles, and bodies; answer-first output with per-page TL;DR lines under a hard size cap. |
|
|
342
|
+
| `--wiki-impact <page-or-term>` | Show wiki backlinks, `decision_ref` citations, outgoing links, and router depth for matching pages. |
|
|
343
|
+
| `--wiki-visualize` | Write a self-contained static wiki graph visualizer to `.project-wiki/wiki-graph.html`. |
|
|
344
|
+
| `--wiki-visualize-out <path>` | With `--wiki-visualize`, write to a custom repository-relative path under `.project-wiki/`. |
|
|
232
345
|
| `--refresh-index` | Update generated auto-discovered wiki routing. |
|
|
233
346
|
| `--capture-inbox --title <title> --content <content>` | Append a candidate note to the wiki inbox. |
|
|
234
347
|
| `--issue-draft --issue-title <title>` | Print a read-only GitHub issue body draft for problems or side effects. |
|
|
235
348
|
| `--issue-create --issue-title <title>` | Create a GitHub issue through `gh` after explicit user approval. |
|
|
236
349
|
| `--glossary-init` | Create and route the optional glossary page. |
|
|
237
350
|
| `--prune-check` | Report active pages with stale or unresolved lifecycle signals. |
|
|
238
|
-
| `--review-migration`, `--semantic-migrate` | Sync migration inbox statuses into migration review files. |
|
|
351
|
+
| `--review-migration`, `--semantic-migrate` | Sync migration coverage and inbox statuses into migration review files. |
|
|
239
352
|
| `--no-git-config` | Install hook files without changing `git core.hooksPath`. |
|
|
240
353
|
| `--code-index` | Build the disposable code evidence index. |
|
|
241
354
|
| `--code-report` | Print architecture and ownership summaries from the evidence index. |
|
|
242
355
|
| `--code-report-section <section>` | Print one section: `coverage`, `ownership`, `languages`, `parsers`, `workspaces`, `workspace-graph`, `routes`, `hotspots`, `configs`, or `edges`. |
|
|
243
356
|
| `--code-impact <term>` | Show file, symbol, route, import, edge, and owner impact evidence. |
|
|
357
|
+
| `--code-context-pack <term>` | Print a budgeted first-pass context pack with structural file, symbol, route, import, edge, and ownership evidence. |
|
|
244
358
|
| `--code-search-symbol <term>` | Search indexed symbols. |
|
|
245
359
|
| `--code-query <sql>` | Run conservative read-only SQL over the evidence index. |
|
|
246
360
|
|
package/SKILL.md
CHANGED
|
@@ -57,6 +57,7 @@ $PROJECT_LIBRARIAN
|
|
|
57
57
|
Use the command variants as follows:
|
|
58
58
|
|
|
59
59
|
- New project wiki or normal update: `$PROJECT_LIBRARIAN`.
|
|
60
|
+
- Explicit existing-project update without migration: `$PROJECT_LIBRARIAN update` (rejects `--migrate` and `--adopt-existing`).
|
|
60
61
|
- Existing wiki/docs need migration: `$PROJECT_LIBRARIAN --migrate`.
|
|
61
62
|
- Install hook files without changing git config: `$PROJECT_LIBRARIAN --no-git-config`.
|
|
62
63
|
|
|
@@ -121,7 +122,7 @@ $PROJECT_LIBRARIAN --lint
|
|
|
121
122
|
|
|
122
123
|
Use `--query`, `--prune-check`, `--issue-draft`, `--link-check`, `--quality-check`, `--doctor`, `--migration-lint`, `--migration-quality-check`, and `--migration-doctor` for read-only inspection/output through the resolved runner. Use `--doctor --fix` when safe generated routing refresh is intended. Use `--refresh-index`, `--capture-inbox`, `--glossary-init`, and `--migrate` only when updating wiki files is intended.
|
|
123
124
|
|
|
124
|
-
Use `--review-migration` or `--semantic-migrate` after migration inbox rows are processed. It syncs inbox statuses into `wiki/migration/review.md` and `wiki/migration/verification.md`.
|
|
125
|
+
Use `--review-migration` or `--semantic-migrate` after migration coverage or compatible inbox rows are processed. It syncs unit coverage and safe file-level inbox statuses into `wiki/migration/review.md` and `wiki/migration/verification.md`.
|
|
125
126
|
|
|
126
127
|
## Code-Informed Canonicalization
|
|
127
128
|
|
|
@@ -200,8 +201,8 @@ Execution contract:
|
|
|
200
201
|
- Code structure, entrypoints, module relationships, execution flows, read-on-demand routes, and evidence paths belong under `wiki/meta/` with descriptive project-specific filenames chosen by the LLM.
|
|
201
202
|
- Code-backed current project behavior, features, policies, constraints, terminology, domain rules, and operational facts belong under `wiki/canonical/`.
|
|
202
203
|
- Important design rationale or tradeoffs inferred from code may belong under `wiki/decisions/` when they meet the decision policy.
|
|
203
|
-
- Unclear, conflicting, or low-confidence interpretations belong in `wiki/inbox/` or
|
|
204
|
-
4. Do not use fixed canonical filenames
|
|
204
|
+
- Unclear, conflicting, or low-confidence interpretations belong in `wiki/inbox/` or a focused canonical questions page created for the topic, not directly in canonical truth.
|
|
205
|
+
4. Do not use fixed canonical filenames. Choose or create files from topic boundaries, expected read frequency, and token budget.
|
|
205
206
|
5. Split large subjects into focused documents when a single file would force agents to read unrelated content.
|
|
206
207
|
6. Cite concrete evidence with repository-relative paths and distinguish code-proven facts from inference.
|
|
207
208
|
7. Update `wiki/startup.md` and `wiki/index.md` only with compact routing hints, not large code summaries.
|
|
@@ -226,11 +227,11 @@ It installs:
|
|
|
226
227
|
- `.gemini/hooks/wiki-session-start.js` compact startup context injector for Gemini CLI.
|
|
227
228
|
- `wiki/startup.md` compact session-start context.
|
|
228
229
|
- `wiki/index.md` router with read/update/token-budget hints.
|
|
229
|
-
- `wiki/canonical/` project-current-truth
|
|
230
|
+
- `wiki/canonical/` directory for project-current-truth documents, created only when real content exists.
|
|
230
231
|
- Optional `wiki/canonical/glossary.md` project terminology contract when `--glossary-init` is used.
|
|
231
|
-
- `wiki/decisions/` project-decision
|
|
232
|
+
- `wiki/decisions/` project-decision directory and lightweight decision ledgers.
|
|
232
233
|
- `wiki/meta/` wiki operating rules, project decision policy, and wiki-operations Decision Pack.
|
|
233
|
-
- `wiki/sources/` source summary
|
|
234
|
+
- `wiki/sources/` source summary documents.
|
|
234
235
|
|
|
235
236
|
The Codex, Claude Code, Cursor, and Gemini CLI startup hooks inject only `wiki/startup.md` and `wiki/index.md`. Codex uses `.codex/hooks.json` plus `.codex/hooks/wiki-session-start.js`; Claude Code uses `.claude/settings.json` plus `.claude/hooks/wiki-session-start.js`; Cursor uses `.cursor/hooks.json` plus `.cursor/hooks/wiki-session-start.js`; Gemini CLI uses `.gemini/settings.json` plus `.gemini/hooks/wiki-session-start.js`. `CLAUDE.md` and `GEMINI.md` import `AGENTS.md`, and `.cursor/rules/project-librarian.mdc` references `AGENTS.md`, so Claude Code, Gemini CLI, and Cursor share the same compact wiki-first instruction contract without duplicating the rules. `AGENTS.md` should stay compact and project-wide; `wiki/AGENTS.md` should carry detailed wiki editing rules. `wiki/startup.md` should route detailed canonical and decision files as Read On Demand, not Always Read First, so detailed files are read only when the current question needs them.
|
|
236
237
|
|
|
@@ -277,7 +278,7 @@ It appends these trailers when they are missing:
|
|
|
277
278
|
|
|
278
279
|
Do not hand-write wiki trailers unless the hook is unavailable or the generated value needs correction.
|
|
279
280
|
|
|
280
|
-
`--lint` verifies the
|
|
281
|
+
`--lint` verifies common wiki files plus the agent surfaces that are present in the project. If any file for a surface exists, lint requires the rest of that surface's files and settings; uninstalled Cursor or Gemini surfaces are not hard requirements. It also checks git hook files, executable bits, trailer phrases, and `core.hooksPath` when the project is a git repository. If `--no-git-config` was used, an unset or different `core.hooksPath` is expected until the project owner configures it manually.
|
|
281
282
|
|
|
282
283
|
## Glossary Mode
|
|
283
284
|
|
|
@@ -316,7 +317,8 @@ Migration mode is a reset-and-restructure flow:
|
|
|
316
317
|
- If `./wiki_legacy` already exists, preserves both by using a timestamped `wiki_legacy_...` directory for the current wiki.
|
|
317
318
|
- Creates a fresh `./wiki` using the current standard rules.
|
|
318
319
|
- Scans markdown files under the legacy wiki directory.
|
|
319
|
-
-
|
|
320
|
+
- Skips form-only/template legacy files as non-semantic input; `inventory.md` records the skipped source and reason instead of creating review rows or new wiki pages.
|
|
321
|
+
- Writes `wiki/migration/inventory.md`, `wiki/migration/unit-map.md`, `wiki/migration/split-plan.md`, `wiki/migration/coverage.md`, `wiki/migration/plan.md`, `wiki/migration/review.md`, and `wiki/migration/verification.md`.
|
|
320
322
|
- Writes rewrite inboxes:
|
|
321
323
|
- `wiki/canonical/migration-inbox.md`
|
|
322
324
|
- `wiki/decisions/migration-inbox.md`
|
|
@@ -325,7 +327,11 @@ Migration mode is a reset-and-restructure flow:
|
|
|
325
327
|
|
|
326
328
|
After migration mode, inspect inboxes and fold legacy content into canonical docs, Decision Packs, ADRs, source summaries, or meta docs. Minimize information loss while converting useful legacy meaning to the current wiki structure and rules. Legacy files, sections, blocks, and wording may be retained when review confirms each retained unit belongs in the new topic shape and remains current project truth. Do not link to or cite `wiki_legacy*` from the new wiki; cite current-project evidence when possible, and keep ambiguous material in the migration inbox or mark it `needs-human-review`.
|
|
327
329
|
|
|
328
|
-
`wiki/migration/coverage.md` is the unit-level coverage ledger. It accounts for legacy headings, paragraphs, list items, table rows, and code blocks with stable unit IDs. Every unit should end as `adopted`, `merged`, `superseded`, `rejected`, `resolved`, or `needs-human-review`; `pending` means the unit is still open. `adopted` and `merged` rows require a new-wiki target under `wiki/canonical/`, `wiki/decisions/`, `wiki/sources/`, or `wiki/meta/`. Deleting
|
|
330
|
+
`wiki/migration/coverage.md` is the unit-level coverage ledger. It accounts for extracted legacy headings, paragraphs, list items, table rows, and code blocks with stable unit IDs. Form-only/template files are excluded before unit extraction and are listed in `inventory.md` instead. Every extracted unit should end as `adopted`, `merged`, `superseded`, `rejected`, `resolved`, or `needs-human-review`; `pending` means the unit is still open. `adopted` and `merged` rows require a new-wiki target under `wiki/canonical/`, `wiki/decisions/`, `wiki/sources/`, or `wiki/meta/`. Deleting an extracted unit row is treated as possible information loss and `--migration-lint` reports it as `migration-unaccounted-unit`.
|
|
331
|
+
|
|
332
|
+
`wiki/migration/unit-map.md` is the generated per-unit classification ledger. `wiki/migration/split-plan.md` groups units by suggested new target file. `--migration-lint` validates these files alongside `coverage.md`: stale or duplicate units, invalid storage/confidence/status values, split count drift, target drift, and old coverage schemas are reported separately from normal lint.
|
|
333
|
+
|
|
334
|
+
When one legacy file maps to multiple target pages, file-level migration inbox status is not enough to close every unit. In that case, update `wiki/migration/coverage.md` unit rows directly; `--review-migration` records that the file-level inbox row was ignored for the mixed-target source. File-level inbox fallback remains available only when all units from the legacy source point to the same target, preserving older migration workflows without masking mixed-page splits.
|
|
329
335
|
|
|
330
336
|
Inbox rows use these statuses:
|
|
331
337
|
|
|
@@ -341,7 +347,7 @@ Run semantic review sync after LLM or human processing:
|
|
|
341
347
|
$PROJECT_LIBRARIAN --review-migration
|
|
342
348
|
```
|
|
343
349
|
|
|
344
|
-
`wiki/migration/verification.md` verifies
|
|
350
|
+
`wiki/migration/verification.md` verifies current-batch unit coverage: every extracted legacy meaning unit should be mapped to a new-wiki target and remain accounted for. Semantic migration is complete only after unit coverage or safe inbox rows are marked adopted/rejected/resolved and `needs-human-review` is 0.
|
|
345
351
|
|
|
346
352
|
Human review is not required for every inbox item. LLM may process ordinary rows and close them as adopted/rejected/resolved. Human review is reserved for `needs-human-review`.
|
|
347
353
|
|
package/dist/args.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.codeIndexOutput = exports.codeSearchSymbol = exports.codeReportSection = exports.codeQuerySql = exports.codeImpactTarget = exports.codeContextPackTarget = exports.wikiVisualizeOutput = exports.wikiVisualizeMode = exports.wikiImpactTarget = exports.wikiImpactMode = exports.queryTerm = exports.codeSearchSymbolMode = exports.codeQueryMode = exports.codeImpactMode = exports.codeParserMode = exports.codeContextPackMode = exports.codeFilesMode = exports.codeStatusMode = exports.codeReportMode = exports.codeIndexFullMode = exports.codeIndexIncrementalMode = exports.codeIndexMode = exports.acknowledgeSmallRepoMode = exports.noGitConfigMode = exports.reviewMigrationMode = exports.pruneCheckMode = exports.captureInboxMode = exports.refreshIndexMode = exports.issueDraftMode = exports.issueCreateMode = exports.glossaryMode = exports.fixMode = exports.doctorMode = exports.qualityCheckMode = exports.linkCheckMode = exports.migrationQualityCheckMode = exports.migrationLintMode = exports.migrationDoctorMode = exports.lintMode = exports.migrateMode = exports.missingValueOptions = exports.unexpectedValueOptions = exports.unknownOptions = exports.args = exports.commandArgs = exports.command = exports.unknownCommand = exports.helpMode = exports.parsedArgs = exports.rawArgs = void 0;
|
|
4
|
+
exports.issueDraftTitle = exports.issueBodyFile = exports.captureCategory = exports.captureContent = exports.captureTitle = exports.codeIndexScopes = exports.codeParser = void 0;
|
|
4
5
|
exports.parseArgs = parseArgs;
|
|
5
6
|
exports.argValue = argValue;
|
|
6
7
|
exports.argValues = argValues;
|
|
7
8
|
exports.rawArgs = process.argv.slice(2);
|
|
8
|
-
const knownCommands = new Set(["init", "install-skill"]);
|
|
9
|
+
const knownCommands = new Set(["init", "update", "install-skill", "mcp"]);
|
|
9
10
|
const flagsWithoutValues = new Set([
|
|
11
|
+
"--acknowledge-small-repo",
|
|
10
12
|
"--adopt-existing",
|
|
11
13
|
"--capture-inbox",
|
|
12
14
|
"--code-evidence-files",
|
|
@@ -41,11 +43,15 @@ const flagsWithoutValues = new Set([
|
|
|
41
43
|
"--refresh-index",
|
|
42
44
|
"--review-migration",
|
|
43
45
|
"--semantic-migrate",
|
|
46
|
+
"--wiki-graph-html",
|
|
47
|
+
"--wiki-visualize",
|
|
44
48
|
]);
|
|
45
49
|
const flagsWithValues = new Set([
|
|
46
50
|
"--agents",
|
|
47
51
|
"--category",
|
|
52
|
+
"--code-evidence-context-pack",
|
|
48
53
|
"--code-evidence-impact",
|
|
54
|
+
"--code-context-pack",
|
|
49
55
|
"--code-evidence-out",
|
|
50
56
|
"--code-evidence-parser",
|
|
51
57
|
"--code-evidence-query",
|
|
@@ -65,6 +71,8 @@ const flagsWithValues = new Set([
|
|
|
65
71
|
"--query",
|
|
66
72
|
"--scope",
|
|
67
73
|
"--title",
|
|
74
|
+
"--wiki-impact",
|
|
75
|
+
"--wiki-visualize-out",
|
|
68
76
|
]);
|
|
69
77
|
const knownFlags = new Set([...flagsWithoutValues, ...flagsWithValues, "--help", "-h"]);
|
|
70
78
|
function flagName(arg) {
|
|
@@ -127,14 +135,18 @@ function parseArgs(argv) {
|
|
|
127
135
|
const argValue = (name) => argValueFrom(commandArgs, name);
|
|
128
136
|
const argValues = (name) => argValuesFrom(commandArgs, name);
|
|
129
137
|
const codeImpactTarget = argValue("--code-impact") || argValue("--code-evidence-impact");
|
|
138
|
+
const codeContextPackTarget = argValue("--code-context-pack") || argValue("--code-evidence-context-pack");
|
|
130
139
|
const codeQuerySql = argValue("--code-query") || argValue("--code-evidence-query");
|
|
131
140
|
const codeSearchSymbol = argValue("--code-search-symbol") || argValue("--code-evidence-symbol");
|
|
132
141
|
return {
|
|
142
|
+
acknowledgeSmallRepoMode: args.has("--acknowledge-small-repo"),
|
|
133
143
|
args,
|
|
134
144
|
captureCategory: argValue("--category") || "project-candidate",
|
|
135
145
|
captureContent: argValue("--content"),
|
|
136
146
|
captureInboxMode: args.has("--capture-inbox"),
|
|
137
147
|
captureTitle: argValue("--title"),
|
|
148
|
+
codeContextPackMode: hasFlag("--code-context-pack") || hasFlag("--code-evidence-context-pack"),
|
|
149
|
+
codeContextPackTarget,
|
|
138
150
|
codeFilesMode: args.has("--code-files") || args.has("--code-evidence-files"),
|
|
139
151
|
codeImpactMode: hasFlag("--code-impact") || hasFlag("--code-evidence-impact"),
|
|
140
152
|
codeImpactTarget,
|
|
@@ -185,6 +197,10 @@ function parseArgs(argv) {
|
|
|
185
197
|
.filter((arg) => arg.startsWith("-"))
|
|
186
198
|
.map(flagName)
|
|
187
199
|
.filter((arg) => !knownFlags.has(arg)))),
|
|
200
|
+
wikiImpactMode: hasFlag("--wiki-impact"),
|
|
201
|
+
wikiImpactTarget: argValue("--wiki-impact"),
|
|
202
|
+
wikiVisualizeMode: hasFlag("--wiki-visualize") || hasFlag("--wiki-graph-html"),
|
|
203
|
+
wikiVisualizeOutput: argValue("--wiki-visualize-out"),
|
|
188
204
|
};
|
|
189
205
|
}
|
|
190
206
|
exports.parsedArgs = parseArgs(exports.rawArgs);
|
|
@@ -213,12 +229,14 @@ exports.captureInboxMode = exports.parsedArgs.captureInboxMode;
|
|
|
213
229
|
exports.pruneCheckMode = exports.parsedArgs.pruneCheckMode;
|
|
214
230
|
exports.reviewMigrationMode = exports.parsedArgs.reviewMigrationMode;
|
|
215
231
|
exports.noGitConfigMode = exports.parsedArgs.noGitConfigMode;
|
|
232
|
+
exports.acknowledgeSmallRepoMode = exports.parsedArgs.acknowledgeSmallRepoMode;
|
|
216
233
|
exports.codeIndexMode = exports.parsedArgs.codeIndexMode;
|
|
217
234
|
exports.codeIndexIncrementalMode = exports.parsedArgs.codeIndexIncrementalMode;
|
|
218
235
|
exports.codeIndexFullMode = exports.parsedArgs.codeIndexFullMode;
|
|
219
236
|
exports.codeReportMode = exports.parsedArgs.codeReportMode;
|
|
220
237
|
exports.codeStatusMode = exports.parsedArgs.codeStatusMode;
|
|
221
238
|
exports.codeFilesMode = exports.parsedArgs.codeFilesMode;
|
|
239
|
+
exports.codeContextPackMode = exports.parsedArgs.codeContextPackMode;
|
|
222
240
|
exports.codeParserMode = exports.parsedArgs.codeParserMode;
|
|
223
241
|
exports.codeImpactMode = exports.parsedArgs.codeImpactMode;
|
|
224
242
|
exports.codeQueryMode = exports.parsedArgs.codeQueryMode;
|
|
@@ -230,6 +248,11 @@ function argValues(name) {
|
|
|
230
248
|
return argValuesFrom(exports.commandArgs, name);
|
|
231
249
|
}
|
|
232
250
|
exports.queryTerm = exports.parsedArgs.queryTerm;
|
|
251
|
+
exports.wikiImpactMode = exports.parsedArgs.wikiImpactMode;
|
|
252
|
+
exports.wikiImpactTarget = exports.parsedArgs.wikiImpactTarget;
|
|
253
|
+
exports.wikiVisualizeMode = exports.parsedArgs.wikiVisualizeMode;
|
|
254
|
+
exports.wikiVisualizeOutput = exports.parsedArgs.wikiVisualizeOutput;
|
|
255
|
+
exports.codeContextPackTarget = exports.parsedArgs.codeContextPackTarget;
|
|
233
256
|
exports.codeImpactTarget = exports.parsedArgs.codeImpactTarget;
|
|
234
257
|
exports.codeQuerySql = exports.parsedArgs.codeQuerySql;
|
|
235
258
|
exports.codeReportSection = exports.parsedArgs.codeReportSection;
|