project-librarian 0.5.4 → 0.5.6
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/CONTRIBUTING.md +36 -0
- package/README.ko.md +57 -360
- package/README.md +56 -359
- package/dist/args.js +6 -1
- package/dist/code-index/extractors/light-languages.js +285 -0
- package/dist/code-index/extractors/registry.js +12 -0
- package/dist/code-index/extractors/shared.js +18 -1
- package/dist/code-index/extractors/typescript.js +30 -16
- package/dist/code-index/modes.js +136 -32
- package/dist/code-index/native-helper-matrix.js +99 -0
- package/dist/code-index/native-helper.js +292 -0
- package/dist/code-index/ownership.js +8 -6
- package/dist/code-index/schema.js +72 -13
- package/dist/code-index/search.js +1 -1
- package/dist/code-index-db.js +20 -12
- package/dist/code-index-file-policy.js +17 -11
- package/dist/code-index.js +365 -13
- package/dist/hooks.js +5 -5
- package/dist/init-project-wiki.js +7 -1
- package/dist/install-skill.js +99 -6
- package/dist/mcp-server.js +4 -4
- package/dist/migration.js +27 -2
- package/dist/native/darwin-arm64/project-librarian-indexer +0 -0
- package/dist/native/darwin-x64/project-librarian-indexer +0 -0
- package/dist/native/linux-arm64/project-librarian-indexer +0 -0
- package/dist/native/linux-arm64-musl/project-librarian-indexer +0 -0
- package/dist/native/linux-x64/project-librarian-indexer +0 -0
- package/dist/native/linux-x64-musl/project-librarian-indexer +0 -0
- package/dist/native/project-librarian-indexer-manifest.json +70 -0
- package/dist/native/win32-arm64/project-librarian-indexer.exe +0 -0
- package/dist/native/win32-x64/project-librarian-indexer.exe +0 -0
- package/dist/templates.js +4 -3
- package/dist/workspace.js +137 -10
- package/docs/README.md +11 -0
- package/docs/benchmarks.md +64 -0
- package/docs/cli-reference.md +60 -0
- package/docs/code-evidence.md +87 -0
- package/docs/ko/README.md +13 -0
- package/docs/ko/benchmarks.md +64 -0
- package/docs/ko/cli-reference.md +60 -0
- package/docs/ko/code-evidence.md +87 -0
- package/docs/ko/maintainer.md +76 -0
- package/docs/ko/usage.md +167 -0
- package/docs/maintainer.md +76 -0
- package/docs/usage.md +175 -0
- package/package.json +13 -2
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://nodejs.org/api/sqlite.html)
|
|
7
7
|
|
|
8
|
-
**Give every AI coding agent the same durable memory of your project.** Project Librarian keeps a compact, repo-local planning wiki
|
|
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 can read at session start.
|
|
9
9
|
|
|
10
10
|
Languages: [English](README.md) | [한국어](README.ko.md)
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ Languages: [English](README.md) | [한국어](README.ko.md)
|
|
|
13
13
|
|
|
14
14
|
Most users should ask their coding agent to run Project Librarian rather than run lifecycle commands by hand.
|
|
15
15
|
|
|
16
|
-
Install the reusable skill files once
|
|
16
|
+
Install the reusable skill files once:
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
19
|
npx project-librarian@latest install --scope user --agents all
|
|
@@ -25,23 +25,23 @@ Then ask Codex, Claude Code, Cursor, or Gemini CLI from the target repository:
|
|
|
25
25
|
- "Use Project Librarian to migrate the existing docs/wiki content."
|
|
26
26
|
- "Search the Project Librarian wiki for authentication decisions."
|
|
27
27
|
|
|
28
|
-
The installed skill
|
|
28
|
+
The installed skill resolves the local runner and executes the right command from the project root. Use a project-local install only when you want the runner stored inside that repository's agent setup:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
npx project-librarian@latest install --scope project --agents all
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
`install` copies
|
|
34
|
+
`install` copies reusable runner and skill files only. The agent-run lifecycle command creates or updates `AGENTS.md`, agent hooks, `wiki/`, git hook files, diagnostics, and optional code-evidence support. `install-skill` remains a compatibility alias.
|
|
35
35
|
|
|
36
36
|
## Update
|
|
37
37
|
|
|
38
|
-
To refresh an existing
|
|
38
|
+
To refresh an existing setup without migrating the wiki, run:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
41
|
npx project-librarian@latest update
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
That updates managed setup files, agent hooks, wiki operating/meta files, and existing project-scoped
|
|
44
|
+
That updates managed setup files, agent hooks, wiki operating/meta files, and existing project-scoped skill copies. It preserves the current `wiki/` and rejects migration flags, so it will not rename the wiki to `wiki_legacy*`.
|
|
45
45
|
|
|
46
46
|
Use `--agents` when you intentionally want to add or refresh a specific project surface:
|
|
47
47
|
|
|
@@ -56,108 +56,92 @@ User-scoped skill installs are global agent tooling and are not changed by a pro
|
|
|
56
56
|
npx project-librarian@latest install --scope user --agents all
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
## Highlights
|
|
60
|
-
|
|
61
|
-
- **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.
|
|
62
|
-
- **One setup, four agents.** Codex, Claude Code, Cursor, and Gemini CLI share the same wiki-first contract, hooks, and rules.
|
|
63
|
-
- **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.
|
|
64
|
-
- **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.
|
|
65
|
-
- **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.
|
|
66
|
-
- **Local session handoff.** `--handoff-save` writes generated resume notes under `.project-wiki/session/`; startup hooks only point to it, so rolling execution memory does not become canonical wiki truth.
|
|
67
|
-
- **Optional code evidence.** A regenerable SQLite index plus answer-shaped MCP tools answer impact, ownership, and workspace-graph questions, with zero extra runtime dependencies.
|
|
68
|
-
- **Safe to re-run.** Bootstrap is idempotent and preservation-first; diagnostics flag broken routes, unreachable pages, and stale truth before they mislead an agent.
|
|
69
|
-
|
|
70
59
|
## Why It Exists
|
|
71
60
|
|
|
72
61
|
LLM coding agents waste context and tool calls when every session starts by rediscovering the project: reading old chats, scanning markdown, grepping source, and guessing which files matter.
|
|
73
62
|
|
|
74
|
-
Project Librarian gives agents
|
|
63
|
+
Project Librarian gives agents a small first read and reliable routes to deeper truth:
|
|
75
64
|
|
|
76
65
|
| Surface | What It Gives The Agent |
|
|
77
66
|
| --- | --- |
|
|
78
|
-
| `wiki/startup.md` + `wiki/index.md` | A compact session-start summary and router, so only
|
|
79
|
-
| `wiki/canonical/`, `wiki/roadmaps/`, `wiki/plans/`,
|
|
80
|
-
|
|
|
81
|
-
| `.
|
|
82
|
-
|
|
|
83
|
-
| `.project-wiki/code-evidence.sqlite` | Regenerable code evidence for files, symbols, imports, routes, ownership, workspace graph, reports, and impact checks. |
|
|
84
|
-
| `.project-wiki/session/last-handoff.md` | Optional generated local handoff for the last session's goal, state, blockers, next actions, decisions, commands, and verification. It is reference data, not project truth. |
|
|
85
|
-
| `.project-wiki/wiki-graph.html` | Optional static wiki graph visualizer with derived concept types, router reachability, links, backlinks, and decision references. |
|
|
86
|
-
| Diagnostics and migration modes | Link checks, quality checks, migration inboxes, stale-signal reports, and issue drafts when the workflow exposes a problem. |
|
|
67
|
+
| `wiki/startup.md` + `wiki/index.md` | A compact session-start summary and router, so only relevant planning pages are read. |
|
|
68
|
+
| `wiki/canonical/`, `wiki/roadmaps/`, `wiki/plans/`, `wiki/decisions/` | Current truth, future scope, execution plans, and durable rationale stay separated. |
|
|
69
|
+
| Agent hooks and rules | Codex, Claude Code, Cursor, and Gemini CLI start from the same wiki-first contract. |
|
|
70
|
+
| `.project-wiki/code-evidence.sqlite` | Optional, regenerable code evidence for impact, ownership, routes, symbols, imports, and workspace graph questions. |
|
|
71
|
+
| Diagnostics and migration modes | Link checks, quality checks, migration review files, stale-signal reports, and issue drafts. |
|
|
87
72
|
|
|
88
73
|
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."
|
|
89
74
|
|
|
90
|
-
|
|
75
|
+
## Highlights
|
|
91
76
|
|
|
92
|
-
|
|
77
|
+
- **Small first read.** Startup hooks inject only `wiki/startup.md` and `wiki/index.md`; agents route to deeper pages on demand.
|
|
78
|
+
- **One setup, four agents.** Codex, Claude Code, Cursor, and Gemini CLI share the same repo-local memory contract.
|
|
79
|
+
- **Structured wiki writing.** New project content is classified 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.
|
|
80
|
+
- **Inspectable wiki graph.** `--wiki-visualize` writes a static HTML graph under `.project-wiki/` without adding to startup context.
|
|
81
|
+
- **Measured claims.** Benchmark wins and losses are published together, with claim boundaries attached.
|
|
82
|
+
- **Local session handoff.** `--handoff-save` stores generated resume notes under `.project-wiki/session/` without turning execution memory into canonical project truth.
|
|
83
|
+
- **Optional code evidence.** A SQLite index plus answer-shaped MCP tools answer expensive traversal questions on large repositories without adding an MCP SDK dependency.
|
|
84
|
+
- **Safe to re-run.** Bootstrap is idempotent and preservation-first.
|
|
93
85
|
|
|
94
|
-
|
|
86
|
+
## Common Requests
|
|
95
87
|
|
|
96
|
-
|
|
88
|
+
Ask your agent for the outcome you want; the installed skill maps the request to the local runner.
|
|
97
89
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
90
|
+
| Goal | Ask The Agent |
|
|
91
|
+
| --- | --- |
|
|
92
|
+
| Create or update the wiki | "Use Project Librarian to set up or update this repository's planning wiki." |
|
|
93
|
+
| Update without migration | "Update this repository's Project Librarian setup without migrating the wiki." |
|
|
94
|
+
| Migrate existing docs/wiki content | "Use Project Librarian to migrate the existing docs/wiki content." |
|
|
95
|
+
| Run diagnostics | "Run Project Librarian diagnostics." |
|
|
96
|
+
| Search project memory | "Search the Project Librarian wiki for authentication decisions." |
|
|
97
|
+
| Build code evidence | "Build Project Librarian code evidence for `src`." |
|
|
98
|
+
| Inspect code impact | "Show Project Librarian impact evidence for `healthHandler`." |
|
|
99
|
+
| Save a handoff | "Save a Project Librarian session handoff for the current work." |
|
|
102
100
|
|
|
103
|
-
|
|
101
|
+
See [Usage](docs/usage.md) for install scopes, runner paths, generated files, migration behavior, and the full agent-request table.
|
|
104
102
|
|
|
105
|
-
|
|
103
|
+
## Benchmarks
|
|
106
104
|
|
|
107
|
-
|
|
105
|
+
These numbers are maintainer release evidence, not a blanket promise. Every value is real Codex JSONL usage and local wall-clock time, measured hermetically against an `organic` control with no Project Librarian. The wiki-routing track and the code-graph track are measured separately; a win on one never backs a claim about the other.
|
|
108
106
|
|
|
109
|
-
|
|
107
|
+
Wiki track, cost-weighted tokens vs control:
|
|
108
|
+
|
|
109
|
+
| Scale | decision_lookup | aggregation | multi_session |
|
|
110
110
|
| --- | --- | --- | --- |
|
|
111
111
|
| Small | 14.4% less | 81.0% more | 22.0% less |
|
|
112
112
|
| Medium | 52.0% less | 19.0% less | 54.1% less |
|
|
113
113
|
| Large | 71.1% less | 29.0% less | 71.8% less |
|
|
114
114
|
|
|
115
|
-
Latest synthetic wiki-track release candidate: 2026-06-19, `gpt-5.5`, 42 scenarios, 3 measured runs plus 1 warmup each. The overall claim gate **passed
|
|
116
|
-
|
|
117
|
-
### Code-graph track (code evidence index, real repositories)
|
|
115
|
+
Latest synthetic wiki-routing track release candidate: 2026-06-19, `gpt-5.5`, 42 scenarios, 3 measured runs plus 1 warmup each. The overall claim gate **passed**. This is bounded to the synthetic wiki-routing track and listed task families; it is not a claim about code-graph behavior, real repositories, every agent surface, or every question shape.
|
|
118
116
|
|
|
119
|
-
|
|
117
|
+
Code-graph track, cost-weighted tokens vs control:
|
|
120
118
|
|
|
121
119
|
| Question | excalidraw (~1.2k files) | backstage (~11.8k files) |
|
|
122
120
|
| --- | --- | --- |
|
|
123
121
|
| impact_trace | 117% more | **27.7% less** |
|
|
124
122
|
| workspace_graph | 106% more | 2.6% less |
|
|
125
|
-
| ownership_lookup |
|
|
126
|
-
|
|
127
|
-
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.
|
|
123
|
+
| ownership_lookup | - | 99% more |
|
|
128
124
|
|
|
129
|
-
|
|
125
|
+
The code-evidence index pays off only on genuinely large repositories for expensive traversal questions. Below ~5k indexable files, `--code-index` halts unless `--acknowledge-small-repo` is passed, and bootstrap skips MCP auto-registration unless an existing `.project-wiki` SQLite index shows the user already opted in.
|
|
130
126
|
|
|
131
|
-
|
|
127
|
+
Before citing `--code-report`, `--code-impact`, `--code-context-pack`, or MCP tool output as current code-structure evidence, run `project-librarian --code-status` or MCP `code_status` and require `stale_files: 0`. Stale reports are pointers for rebuild, not authoritative project truth.
|
|
132
128
|
|
|
133
|
-
|
|
134
|
-
- **backstage** — Spotify's open-source developer-portal platform (~11.8k files); the large-repo data point.
|
|
129
|
+
See [Benchmark Evidence](docs/benchmarks.md) for methodology, task-family definitions, reproduction commands, and the published losses.
|
|
135
130
|
|
|
136
|
-
|
|
131
|
+
## Documentation
|
|
137
132
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
133
|
+
| Document | Use It For |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| [Usage](docs/usage.md) | Install scopes, runner paths, generated files, migration, and common agent requests. |
|
|
136
|
+
| [Code Evidence](docs/code-evidence.md) | MCP server behavior, freshness contract, scale gate, language support, and native helper policy. |
|
|
137
|
+
| [CLI Reference](docs/cli-reference.md) | Complete command and option reference. |
|
|
138
|
+
| [Benchmark Evidence](docs/benchmarks.md) | Public benchmark claims, limits, and maintainer benchmark commands. |
|
|
139
|
+
| [Maintainer Guide](docs/maintainer.md) | Development, release readiness, trusted publishing, and benchmark operations. |
|
|
140
|
+
| [Contributing](CONTRIBUTING.md) | Local contribution workflow and verification expectations. |
|
|
141
|
+
| [Security Policy](SECURITY.md) | Supported versions, private reporting, and supply-chain boundary. |
|
|
144
142
|
|
|
145
143
|
## Install Details
|
|
146
144
|
|
|
147
|
-
Use this section when you need to choose an install scope or target agent. Use `npx` for initial skill installation or for an explicit registry-version project update:
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
npx project-librarian@latest install --scope user --agents all
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Install into the current repository instead:
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
npx project-librarian@latest install --scope project --agents all
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
`install` copies reusable skill files only. It does not create or update `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`, `wiki/`, `.cursor/rules/`, `.cursor/hooks.json`, `.gemini/settings.json`, `.codex/hooks.json`, or `.claude/settings.json`. `install-skill` remains supported as a compatibility alias.
|
|
160
|
-
|
|
161
145
|
| Situation | Command |
|
|
162
146
|
| --- | --- |
|
|
163
147
|
| Install globally for all supported agents | `npx project-librarian@latest install --scope user --agents all` |
|
|
@@ -168,294 +152,7 @@ npx project-librarian@latest install --scope project --agents all
|
|
|
168
152
|
| Install only Gemini CLI | `npx project-librarian@latest install --agents gemini` |
|
|
169
153
|
| Preview install output | `npx project-librarian@latest install --scope project --agents all --dry-run` |
|
|
170
154
|
|
|
171
|
-
`--agents` also accepts comma-separated values such as `codex,claude,cursor,gemini`. `all` targets every supported agent. `--scope` accepts `user` or `project`.
|
|
172
|
-
|
|
173
|
-
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.
|
|
174
|
-
|
|
175
|
-
`project-librarian update` also syncs any project-scoped Project Librarian skill installs that already exist for the selected surfaces from the currently running package. 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.
|
|
176
|
-
|
|
177
|
-
## Runner Paths
|
|
178
|
-
|
|
179
|
-
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.
|
|
180
|
-
|
|
181
|
-
| Installation | Runner |
|
|
182
|
-
| --- | --- |
|
|
183
|
-
| Project-scoped Codex skill | `node .codex/skills/project-librarian/dist/init-project-wiki.js` |
|
|
184
|
-
| Project-scoped Claude skill | `node .claude/skills/project-librarian/dist/init-project-wiki.js` |
|
|
185
|
-
| Project-scoped Cursor skill | `node .cursor/skills/project-librarian/dist/init-project-wiki.js` |
|
|
186
|
-
| Project-scoped Gemini skill | `node .gemini/skills/project-librarian/dist/init-project-wiki.js` |
|
|
187
|
-
| User-scoped Codex skill | `node ~/.codex/skills/project-librarian/dist/init-project-wiki.js` |
|
|
188
|
-
| User-scoped Claude skill | `node ~/.claude/skills/project-librarian/dist/init-project-wiki.js` |
|
|
189
|
-
| User-scoped Cursor skill | `node ~/.cursor/skills/project-librarian/dist/init-project-wiki.js` |
|
|
190
|
-
| User-scoped Gemini skill | `node ~/.gemini/skills/project-librarian/dist/init-project-wiki.js` |
|
|
191
|
-
|
|
192
|
-
## Common Agent Requests
|
|
193
|
-
|
|
194
|
-
Ask your agent for the outcome you want; the skill maps the request to the local runner internally.
|
|
195
|
-
|
|
196
|
-
Wiki setup and maintenance:
|
|
197
|
-
|
|
198
|
-
| Goal | Ask The Agent | Internal Action |
|
|
199
|
-
| --- | --- | --- |
|
|
200
|
-
| Create or update the wiki | "Use Project Librarian to set up or update this repository's planning wiki." | `[init]` |
|
|
201
|
-
| Update existing setup without migration | "Update this repository's Project Librarian setup without migrating the wiki." | `update` |
|
|
202
|
-
| Update from the npm latest package without migration | "Run the latest Project Librarian update for this repository without migrating the wiki." | `npx project-librarian@latest update` |
|
|
203
|
-
| Add a specific agent surface to an existing setup | "Add the Cursor Project Librarian surface without migrating the wiki." | `update --agents cursor` |
|
|
204
|
-
| Migrate existing docs/wiki content | "Use Project Librarian to migrate the existing docs/wiki content." | `--migrate` |
|
|
205
|
-
| Validate generated setup | "Run Project Librarian validation." | `--lint` |
|
|
206
|
-
| Check links and document quality | "Run Project Librarian diagnostics." | `--doctor` |
|
|
207
|
-
| Refresh generated routing before diagnostics | "Refresh Project Librarian routing and then run diagnostics." | `--doctor --fix` |
|
|
208
|
-
| Search project wiki content | "Search the Project Librarian wiki for authentication decisions." | `--query "authentication decisions"` |
|
|
209
|
-
| Show backlinks and decision citations for a page | "Show Project Librarian wiki impact for decisions/release-policy." | `--wiki-impact "decisions/release-policy"` |
|
|
210
|
-
| Generate a wiki graph visualizer | "Generate the Project Librarian wiki graph visualizer." | `--wiki-visualize` |
|
|
211
|
-
| Capture a candidate note | "Capture this as a Project Librarian candidate note: <details>." | `--capture-inbox --title "Candidate" --content "Details"` |
|
|
212
|
-
| Save a session handoff | "Save a Project Librarian session handoff for the current work." | `--handoff-save --goal "..." --state "..." --next "..."` |
|
|
213
|
-
| Resume from a handoff | "Show the last Project Librarian session handoff." | `--handoff-show` |
|
|
214
|
-
| Promote handoff candidates | "Promote the last Project Librarian handoff to the wiki inbox." | `--handoff-promote-inbox` |
|
|
215
|
-
| Opt in to full handoff injection | "Enable the Project Librarian full handoff injection experiment." | `--handoff-injection-enable` |
|
|
216
|
-
| Report stale or unresolved wiki pages | "Check Project Librarian for stale or unresolved pages." | `--prune-check` |
|
|
217
|
-
| Report only higher-signal stale or unresolved wiki pages | "Check Project Librarian for strict stale or unresolved pages." | `--prune-check --prune-check-strict` |
|
|
218
|
-
| Install hook files without changing git config | "Set up Project Librarian hook files without changing git config." | `--no-git-config` |
|
|
219
|
-
|
|
220
|
-
Code evidence:
|
|
221
|
-
|
|
222
|
-
| Goal | Ask The Agent | Internal Action |
|
|
223
|
-
| --- | --- | --- |
|
|
224
|
-
| Build the default evidence cache | "Build Project Librarian code evidence for `src`." | `--code-index --code-scope src` |
|
|
225
|
-
| Build multiple scopes | "Build Project Librarian code evidence for `src` and `packages/api`." | `--code-index --code-scope src --code-scope packages/api` |
|
|
226
|
-
| Require incremental update | "Update the Project Librarian code evidence index incrementally." | `--code-index --incremental` |
|
|
227
|
-
| Force a full rebuild | "Fully rebuild the Project Librarian code evidence index." | `--code-index --code-index-full` |
|
|
228
|
-
| Use optional Tree-sitter backend | "Build Project Librarian code evidence with the Tree-sitter parser." | `--code-index --code-parser tree-sitter` |
|
|
229
|
-
| Inspect cache compatibility | "Inspect Project Librarian code evidence cache health." | `--code-index-health` |
|
|
230
|
-
| Show cache status | "Show Project Librarian code evidence status." | `--code-status` |
|
|
231
|
-
| List indexed files | "List files in the Project Librarian code evidence index." | `--code-files` |
|
|
232
|
-
| Print architecture and ownership report | "Show the Project Librarian code report." | `--code-report` |
|
|
233
|
-
| Print one report section | "Show the routes section of the Project Librarian code report." | `--code-report --code-report-section routes` |
|
|
234
|
-
| Inspect impact evidence | "Show Project Librarian impact evidence for `healthHandler`." | `--code-impact healthHandler` |
|
|
235
|
-
| Build a context pack | "Build a Project Librarian context pack for `healthHandler`." | `--code-context-pack healthHandler` |
|
|
236
|
-
| Search indexed symbols | "Search Project Librarian code evidence for symbol `Auth`." | `--code-search-symbol Auth` |
|
|
237
|
-
| 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"` |
|
|
238
|
-
|
|
239
|
-
Only one code evidence mode can run at a time. `--incremental`, `--code-index-full`, and `--code-parser` are valid only with `--code-index`.
|
|
240
|
-
|
|
241
|
-
## What Gets Installed
|
|
242
|
-
|
|
243
|
-
Fresh setup installs the supported agent surfaces below unless you pass `--agents` or the repository already has project-scoped Project Librarian skills for a narrower agent set. Existing non-migration updates preserve the detected surface set by default and update only those selected surfaces plus the common wiki/git-hook files.
|
|
244
|
-
|
|
245
|
-
Project instruction files:
|
|
246
|
-
|
|
247
|
-
- `AGENTS.md`
|
|
248
|
-
- `CLAUDE.md`
|
|
249
|
-
- `GEMINI.md`
|
|
250
|
-
- `wiki/AGENTS.md`
|
|
251
|
-
- `.cursor/rules/project-librarian.mdc`
|
|
252
|
-
|
|
253
|
-
Startup hooks:
|
|
254
|
-
|
|
255
|
-
- `.codex/hooks.json`
|
|
256
|
-
- `.codex/hooks/wiki-session-start.js`
|
|
257
|
-
- `.claude/settings.json`
|
|
258
|
-
- `.claude/hooks/wiki-session-start.js`
|
|
259
|
-
- `.cursor/hooks.json`
|
|
260
|
-
- `.cursor/hooks/wiki-session-start.js`
|
|
261
|
-
- `.gemini/settings.json`
|
|
262
|
-
- `.gemini/hooks/wiki-session-start.js`
|
|
263
|
-
|
|
264
|
-
Git hook files:
|
|
265
|
-
|
|
266
|
-
- `.githooks/prepare-commit-msg`
|
|
267
|
-
- `.githooks/wiki-commit-trailers.js`
|
|
268
|
-
|
|
269
|
-
Wiki directories:
|
|
270
|
-
|
|
271
|
-
- `wiki/canonical/`
|
|
272
|
-
- `wiki/roadmaps/`
|
|
273
|
-
- `wiki/plans/`
|
|
274
|
-
- `wiki/decisions/`
|
|
275
|
-
- `wiki/inbox/`
|
|
276
|
-
- `wiki/meta/`
|
|
277
|
-
- `wiki/sources/`
|
|
278
|
-
- `wiki/migration/`
|
|
279
|
-
|
|
280
|
-
Seed wiki pages and routers:
|
|
281
|
-
|
|
282
|
-
- `wiki/startup.md`
|
|
283
|
-
- `wiki/index.md`
|
|
284
|
-
- `wiki/meta/document-taxonomy.md`
|
|
285
|
-
|
|
286
|
-
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.
|
|
287
|
-
|
|
288
|
-
MCP server registration (preservation-first merge into `mcpServers`):
|
|
289
|
-
|
|
290
|
-
- `.mcp.json` (Claude Code)
|
|
291
|
-
- `.cursor/mcp.json` (Cursor)
|
|
292
|
-
- `.gemini/settings.json` `mcpServers` (Gemini CLI)
|
|
293
|
-
|
|
294
|
-
Disposable code evidence cache:
|
|
295
|
-
|
|
296
|
-
- `.project-wiki/code-evidence.sqlite`
|
|
297
|
-
|
|
298
|
-
## Code Evidence MCP Server
|
|
299
|
-
|
|
300
|
-
`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.
|
|
301
|
-
|
|
302
|
-
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, maintenance improvement reviews, and retrieval quality reviews. Resource reads come from a fixed URI registry rather than arbitrary filesystem paths.
|
|
303
|
-
|
|
304
|
-
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.
|
|
305
|
-
|
|
306
|
-
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:
|
|
307
|
-
|
|
308
|
-
```bash
|
|
309
|
-
codex mcp add project-librarian -- node .codex/skills/project-librarian/dist/init-project-wiki.js mcp
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
## How It Works
|
|
313
|
-
|
|
314
|
-
1. Bootstrap creates a preservation-first wiki structure and marker-bounded agent instruction sections.
|
|
315
|
-
2. Session-start hooks inject only `wiki/startup.md` and `wiki/index.md`, with character budgets.
|
|
316
|
-
3. Bootstrap avoids empty form-only project pages; focused canonical, decision, source, and meta pages are created when content actually exists.
|
|
317
|
-
4. Detailed planning truth stays in canonical, decision, source, and meta pages that agents read on demand.
|
|
318
|
-
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.
|
|
319
|
-
6. `--refresh-index` routes newly discovered wiki pages; large route sets are split into `wiki/indexes/auto-*.md` scoped routers.
|
|
320
|
-
7. `--code-index` creates a disposable SQLite evidence cache under `.project-wiki/`.
|
|
321
|
-
8. `--code-report`, `--code-impact`, `--code-context-pack`, `--code-search-symbol`, and `--code-query` expose code-backed evidence for planning updates.
|
|
322
|
-
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.
|
|
323
|
-
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.
|
|
324
|
-
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.
|
|
325
|
-
12. Diagnostics report broken links, duplicate routes, orphan pages, stale pages, missing TL;DRs, evidence gaps, and migration policy violations.
|
|
326
|
-
|
|
327
|
-
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/`:
|
|
328
|
-
|
|
329
|
-
- `inventory.md` records migratable legacy markdown files, file-level classification, and form-only/template files skipped from semantic migration.
|
|
330
|
-
- `unit-map.md` records each heading, paragraph, list item, table row, and code block with its suggested taxonomy area and target page.
|
|
331
|
-
- `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.
|
|
332
|
-
- `coverage.md` is the editable status ledger for each unit: pending, adopted, merged, superseded, rejected, resolved, or needs-human-review.
|
|
333
|
-
- `verification.md` and `review.md` summarize coverage and semantic completion after `--review-migration`.
|
|
334
|
-
|
|
335
|
-
`--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.
|
|
336
|
-
|
|
337
|
-
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*`.
|
|
338
|
-
|
|
339
|
-
## Language Support Matrix
|
|
340
|
-
|
|
341
|
-
The matrix lists languages with implemented symbol/import extraction. Other recognized extensions are inventory-only. Default mode uses `typescript-ast`, `python-light`, `go-light`, config extraction, and inventory rows. `--code-parser tree-sitter` switches supported source files to `tree-sitter-*` profiles.
|
|
342
|
-
|
|
343
|
-
| Language | Extensions | Default extraction | Tree-sitter extraction | Indexed evidence |
|
|
344
|
-
| --- | --- | --- | --- | --- |
|
|
345
|
-
| TypeScript | `.ts`, `.tsx`, `.cts`, `.mts` | `typescript-ast` | `tree-sitter-typescript`, `tree-sitter-tsx` | functions, classes, methods, variables, interfaces, types, enums, imports, exports, calls, common HTTP routes |
|
|
346
|
-
| JavaScript | `.js`, `.jsx`, `.cjs`, `.mjs` | `typescript-ast` | `tree-sitter-javascript` | functions, classes, methods, variables, imports, exports, `require()` calls, calls, common HTTP routes |
|
|
347
|
-
| Python | `.py` | `python-light` | `tree-sitter-python` | functions, classes, `import`, `from ... import` |
|
|
348
|
-
| Go | `.go` | `go-light` | `tree-sitter-go` | functions, methods, types, consts, vars, single imports, import blocks |
|
|
349
|
-
| Rust | `.rs` | inventory-only | `tree-sitter-rust` | functions, structs, enums, traits, impls, `use` imports |
|
|
350
|
-
| Java | `.java` | inventory-only | `tree-sitter-java` | classes, interfaces, enums, methods, imports |
|
|
351
|
-
| PHP | `.php` | inventory-only | `tree-sitter-php` | functions, classes, interfaces, traits, methods, namespace uses |
|
|
352
|
-
| Kotlin | `.kt`, `.kts` | inventory-only | `tree-sitter-kotlin` | functions, classes, objects, imports |
|
|
353
|
-
| Swift | `.swift` | inventory-only | `tree-sitter-swift` | functions, classes, structs, protocols, enums, imports |
|
|
354
|
-
| C | `.c`, `.h` | inventory-only | `tree-sitter-c` | functions, structs, enums, includes |
|
|
355
|
-
| C++ | `.cc`, `.cpp`, `.cxx`, `.hpp`, `.hh`, `.hxx` | inventory-only | `tree-sitter-cpp` | functions, classes/structs, namespaces, enums, includes/usings |
|
|
356
|
-
| C# | `.cs` | inventory-only | `tree-sitter-csharp` | classes, interfaces, structs, enums, methods, usings |
|
|
357
|
-
|
|
358
|
-
Recognized but inventory-only extensions include `.rb`, `.vue`, and `.css`. Config files (`.json`, `.yaml`, `.yml`, `.toml`, `.env.example`, `package.json`, `tsconfig.json`, `Dockerfile`, and `Makefile`) are indexed as configuration or inventory evidence.
|
|
359
|
-
|
|
360
|
-
## CLI Reference
|
|
361
|
-
|
|
362
|
-
Use the resolved local runner for automation or direct CLI execution:
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
node .codex/skills/project-librarian/dist/init-project-wiki.js [init|update] [options]
|
|
366
|
-
node .codex/skills/project-librarian/dist/init-project-wiki.js install [--scope user|project] [--agents codex|claude|cursor|gemini|all]
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
`install-skill` remains a compatibility alias for `install`.
|
|
370
|
-
|
|
371
|
-
`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 into those project skill directories before refreshing the managed setup.
|
|
372
|
-
|
|
373
|
-
Important options:
|
|
374
|
-
|
|
375
|
-
| Option | Purpose |
|
|
376
|
-
| --- | --- |
|
|
377
|
-
| `--migrate`, `--adopt-existing` | Preserve an existing wiki as `wiki_legacy*`, create migration inboxes, and generate unit-map/split-plan/coverage review files. |
|
|
378
|
-
| `--lint` | Validate generated setup without editing files. |
|
|
379
|
-
| `--link-check` | Report broken wiki links, duplicate routes, orphan pages, and pages the startup router cannot reach within the depth budget. |
|
|
380
|
-
| `--quality-check` | Report stale, conflicting, and low-quality wiki document signals. |
|
|
381
|
-
| `--doctor` | Run lint, link-check, and quality-check together. |
|
|
382
|
-
| `--doctor --fix` | Safely refresh generated index routing before diagnostics. |
|
|
383
|
-
| `--migration-lint` | Validate migration coverage, unit-map, split-plan, and review scaffolding separately from normal lint. |
|
|
384
|
-
| `--migration-quality-check` | Report migration policy/structure signals separately from normal quality-check. |
|
|
385
|
-
| `--migration-doctor` | Run migration-lint and migration-quality-check together. |
|
|
386
|
-
| `--query <terms>` | Search wiki paths, metadata, titles, and bodies; answer-first output with per-page TL;DR lines under a hard size cap. |
|
|
387
|
-
| `--wiki-impact <page-or-term>` | Show wiki backlinks, `decision_ref` citations, outgoing links, and router depth for matching pages. |
|
|
388
|
-
| `--wiki-visualize` | Write a self-contained static wiki graph visualizer to `.project-wiki/wiki-graph.html`. |
|
|
389
|
-
| `--wiki-visualize-out <path>` | With `--wiki-visualize`, write to a custom repository-relative path under `.project-wiki/`. |
|
|
390
|
-
| `--refresh-index` | Update generated auto-discovered wiki routing. |
|
|
391
|
-
| `--capture-inbox --title <title> --content <content>` | Append a candidate note to the wiki inbox. |
|
|
392
|
-
| `--handoff-save --goal <goal> --state <state> --next <action>` | Save generated local session handoff state under `.project-wiki/session/`. Repeat `--next`, `--decision`, `--blocked`, `--open-question`, and `--verification` as needed. |
|
|
393
|
-
| `--handoff-show`, `--handoff-status`, `--handoff-clear` | Print, inspect, or remove generated session handoff state. Startup hooks mention the handoff when it exists but do not inject the full file by default. |
|
|
394
|
-
| `--handoff-promote-inbox` | Append selected generated handoff facts to `wiki/inbox/project-candidates.md` as a pending candidate. It does not write canonical, plan, or decision pages. |
|
|
395
|
-
| `--handoff-injection-enable`, `--handoff-injection-disable`, `--handoff-injection-status` | Opt in, opt out, or inspect the capped full handoff injection experiment. Default startup behavior remains pointer-only. |
|
|
396
|
-
| `--issue-draft --issue-title <title>` | Print a read-only GitHub issue body draft for problems or side effects. |
|
|
397
|
-
| `--issue-create --issue-title <title>` | Create a GitHub issue through `gh` after explicit user approval. |
|
|
398
|
-
| `--glossary-init` | Create and route the optional glossary page. |
|
|
399
|
-
| `--prune-check` | Report active pages with stale or unresolved lifecycle signals. |
|
|
400
|
-
| `--prune-check --prune-check-strict` | Omit pages selected only because their `updated` date is older than today. |
|
|
401
|
-
| `--review-migration`, `--semantic-migrate` | Sync migration coverage and inbox statuses into migration review files. |
|
|
402
|
-
| `--no-git-config` | Install hook files without changing `git core.hooksPath`. |
|
|
403
|
-
| `--code-index` | Build the disposable code evidence index. |
|
|
404
|
-
| `--code-index-health` | Inspect code evidence cache compatibility and print rebuild guidance without writing. |
|
|
405
|
-
| `--code-report` | Print architecture and ownership summaries from the evidence index. |
|
|
406
|
-
| `--code-report-section <section>` | Print one section: `coverage`, `ownership`, `languages`, `parsers`, `workspaces`, `workspace-graph`, `routes`, `hotspots`, `configs`, or `edges`. |
|
|
407
|
-
| `--code-impact <term>` | Show file, symbol, route, import, edge, and owner impact evidence. |
|
|
408
|
-
| `--code-context-pack <term>` | Print a budgeted first-pass context pack with structural file, symbol, route, import, edge, and ownership evidence. |
|
|
409
|
-
| `--code-search-symbol <term>` | Search indexed symbols. |
|
|
410
|
-
| `--code-query <sql>` | Run conservative read-only SQL over the evidence index. |
|
|
411
|
-
|
|
412
|
-
## Development
|
|
413
|
-
|
|
414
|
-
The source is TypeScript. The committed `dist/` directory is the compiled JavaScript used by the npm binary and installed skill copies.
|
|
415
|
-
|
|
416
|
-
```bash
|
|
417
|
-
npm install
|
|
418
|
-
npm run typecheck
|
|
419
|
-
npm run build
|
|
420
|
-
npm run check:dist
|
|
421
|
-
npm test
|
|
422
|
-
npm run test:coverage
|
|
423
|
-
npm run benchmark:llm:raw-audit
|
|
424
|
-
npm run benchmark:llm:delta-analysis
|
|
425
|
-
npm run benchmark:claim-ledger
|
|
426
|
-
npm run release:check
|
|
427
|
-
npm pack --dry-run
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
When editing TypeScript under `src/`, rebuild before committing so `dist/` stays current. `npm run check:dist` verifies that the checked-in generated files still match the latest build output.
|
|
431
|
-
|
|
432
|
-
`npm run test:coverage` uses Node's native test coverage with conservative line, branch, and function thresholds so coverage is a regression gate, not only a report.
|
|
433
|
-
|
|
434
|
-
`npm run release:check` is a local-only maintainer gate: it runs tests, native Node coverage, benchmark parser smoke, the real-corpus offline demo, benchmark release preview, benchmark claim-ledger classification, raw hygiene audit, package dry-run inspection, dist executable/parity checks, and README benchmark-claim boundary checks. It never publishes, never deletes raw benchmark artifacts, and never launches a measured Codex benchmark.
|
|
435
|
-
|
|
436
|
-
Treat a green `release:check` as a reproducible release-readiness bundle, not a runtime guarantee: it proves those local gates on the current checkout, including that the package dry run stays inside the expected publish boundary (`agents/`, `dist/`, `LICENSE`, `README.md`, `README.ko.md`, and `SKILL.md`) and excludes source files, tests, repo-local wiki/workflow state, raw benchmark output, and local caches.
|
|
437
|
-
|
|
438
|
-
Publishing is handled by `.github/workflows/publish.yml` after a GitHub Release is published. The workflow targets the protected `npm-publish` GitHub Environment, uses npm trusted publishing through GitHub OIDC (`id-token: write`) and `npm publish --access public`, and generates npm provenance automatically; it must not use `NODE_AUTH_TOKEN` or npm token secrets, and release-critical first-party GitHub Actions are pinned to full commit SHAs. `release:check` verifies this workflow contract locally.
|
|
439
|
-
|
|
440
|
-
Trusted publishing and npm provenance prove the package was published through that GitHub OIDC workflow. They do not prove benchmark correctness, code-evidence freshness in an end-user repository, or a security audit; those remain separate evidence tracks.
|
|
441
|
-
|
|
442
|
-
Maintainer benchmark commands live in [benchmarks/README.md](benchmarks/README.md). They are for release evidence and public claim validation, not normal end-user setup.
|
|
443
|
-
|
|
444
|
-
For code-evidence runtime/storage checks, `npm run perf:code-efficiency` generates 3k/10k/50k fixtures and writes `benchmarks/reports/code-performance-efficiency/current.json` plus `.md`. Command timings include CLI startup and freshness checks; the `query_groups` section reports direct DB timings for representative file/symbol/route/import/edge queries. The report also measures checked-in `mixed-monorepo`, `web-service`, `python-cli`, and `docs-heavy` corpora separately from synthetic scale fixtures.
|
|
445
|
-
|
|
446
|
-
Measured LLM benchmark runs automatically prune stale prior raw run directories and isolated Codex homes older than 1 day, then prune the current run's homes even on claimable-run failure; raw JSONL, stderr, reports, and manifests remain for runs inside the retention window. Old ignored raw output can still be audited with the dry-run-first helper before deleting retained isolated Codex homes:
|
|
447
|
-
|
|
448
|
-
```bash
|
|
449
|
-
npm run benchmark:llm:raw-audit -- --older-than-days 14
|
|
450
|
-
npm run benchmark:llm:prune-raw -- --older-than-days 14
|
|
451
|
-
npm run benchmark:llm:prune-raw -- --older-than-days 14 --execute
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
`npm run benchmark:llm:delta-analysis` reads the checked-in measured LLM report and ranks cost-weighted regressions without launching Codex. Add `-- --include-traces` to include representative raw JSONL command traces and classify broad-search/router-read drivers. It is the first diagnostic stop for weak cells such as small-scale aggregation before adding new benchmark claims.
|
|
455
|
-
|
|
456
|
-
Measured LLM runs default to `--scenario-order run-major-balanced`: each measured run index executes all selected scenarios, reversing the order on alternating repetitions so with/without pairs are not grouped by condition across repeated runs. Use `--scenario-order scenario-major` only when reproducing older scenario-grouped diagnostics.
|
|
457
|
-
|
|
458
|
-
`npm run typecheck:ts7` is an opt-in TypeScript 7 RC compatibility probe. It uses `npx` and is intentionally outside `test`, `release:check`, and CI gates until the compiler API and this project's TypeScript extractor have a measured parity record.
|
|
155
|
+
`--agents` also accepts comma-separated values such as `codex,claude,cursor,gemini`. `all` targets every supported agent. `--scope` accepts `user` or `project`. Direct CLI and automation details are in [CLI Reference](docs/cli-reference.md).
|
|
459
156
|
|
|
460
157
|
## Inspiration
|
|
461
158
|
|
package/dist/args.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.codeIndexMode = exports.acknowledgeSmallRepoMode = exports.noGitConfigMode = exports.reviewMigrationMode = exports.pruneCheckStrictMode = exports.pruneCheckMode = exports.captureInboxMode = exports.refreshIndexMode = exports.issueDraftMode = exports.issueCreateMode = exports.handoffVerification = exports.handoffStatusMode = exports.handoffState = exports.handoffShowMode = exports.handoffSaveMode = exports.handoffPromoteInboxMode = exports.handoffInjectionStatusMode = exports.handoffInjectionEnableMode = exports.handoffInjectionDisableMode = exports.handoffOpenQuestions = exports.handoffNextActions = exports.handoffLastSuccessCommand = exports.handoffLastFailureCommand = exports.handoffInputMode = exports.handoffGoal = exports.handoffDecisions = exports.handoffClearMode = exports.handoffBlocked = exports.glossaryMode = exports.fixMode = exports.doctorMode = exports.qualityCheckMode = exports.linkCheckMode = exports.migrationQualityCheckMode = exports.migrationLintMode = exports.migrationDoctorMode = exports.lintMode = exports.migrateMode = exports.invalidAgentTargets = exports.missingValueOptions = exports.unexpectedValueOptions = exports.unknownOptions = exports.args = exports.commandArgs = exports.command = exports.unknownCommand = exports.helpMode = exports.agentTargets = exports.parsedArgs = exports.rawArgs = void 0;
|
|
4
|
-
exports.issueDraftTitle = exports.issueBodyFile = exports.captureCategory = exports.captureContent = exports.captureTitle = exports.codeIndexScopes = exports.codeParser = 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.codeIndexHealthMode = exports.codeIndexFullMode = exports.codeIndexIncrementalMode = void 0;
|
|
4
|
+
exports.issueDraftTitle = exports.issueBodyFile = exports.captureCategory = exports.captureContent = exports.captureTitle = exports.codeIndexScopes = exports.codeParser = 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.codeIndexHealthMode = exports.codeIndexFullMode = exports.codeIndexIncrementalMode = exports.codeIndexEngineMode = exports.codeIndexEngine = void 0;
|
|
5
5
|
exports.parseArgs = parseArgs;
|
|
6
6
|
exports.argValue = argValue;
|
|
7
7
|
exports.argValues = argValues;
|
|
@@ -18,6 +18,7 @@ const flagDefinitions = [
|
|
|
18
18
|
{ name: "--code-files", value: "none", aliases: ["--code-evidence-files"] },
|
|
19
19
|
{ name: "--code-impact", value: "value", aliases: ["--code-evidence-impact"] },
|
|
20
20
|
{ name: "--code-index", value: "none", aliases: ["--code-evidence-index"] },
|
|
21
|
+
{ name: "--code-index-engine", value: "value", aliases: ["--code-evidence-index-engine"] },
|
|
21
22
|
{ name: "--code-index-full", value: "none", aliases: ["--code-evidence-index-full"] },
|
|
22
23
|
{ name: "--code-index-health", value: "none" },
|
|
23
24
|
{ name: "--code-index-incremental", value: "none", aliases: ["--incremental", "--code-incremental", "--code-evidence-index-incremental"] },
|
|
@@ -179,6 +180,8 @@ function parseArgs(argv) {
|
|
|
179
180
|
codeFilesMode: hasAnyFlag("--code-files"),
|
|
180
181
|
codeImpactMode: hasAnyFlag("--code-impact"),
|
|
181
182
|
codeImpactTarget,
|
|
183
|
+
codeIndexEngine: argValueFromAny("--code-index-engine") || "auto",
|
|
184
|
+
codeIndexEngineMode: hasAnyFlag("--code-index-engine"),
|
|
182
185
|
codeIndexFullMode: hasAnyFlag("--code-index-full"),
|
|
183
186
|
codeIndexHealthMode: args.has("--code-index-health"),
|
|
184
187
|
codeIndexIncrementalMode: hasAnyFlag("--code-index-incremental"),
|
|
@@ -302,6 +305,8 @@ exports.reviewMigrationMode = exports.parsedArgs.reviewMigrationMode;
|
|
|
302
305
|
exports.noGitConfigMode = exports.parsedArgs.noGitConfigMode;
|
|
303
306
|
exports.acknowledgeSmallRepoMode = exports.parsedArgs.acknowledgeSmallRepoMode;
|
|
304
307
|
exports.codeIndexMode = exports.parsedArgs.codeIndexMode;
|
|
308
|
+
exports.codeIndexEngine = exports.parsedArgs.codeIndexEngine;
|
|
309
|
+
exports.codeIndexEngineMode = exports.parsedArgs.codeIndexEngineMode;
|
|
305
310
|
exports.codeIndexIncrementalMode = exports.parsedArgs.codeIndexIncrementalMode;
|
|
306
311
|
exports.codeIndexFullMode = exports.parsedArgs.codeIndexFullMode;
|
|
307
312
|
exports.codeIndexHealthMode = exports.parsedArgs.codeIndexHealthMode;
|