projscan 3.8.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/README.md +337 -38
  2. package/dist/cli/commands/route.js +1 -0
  3. package/dist/cli/commands/route.js.map +1 -1
  4. package/dist/cli/commands/semanticGraph.js +27 -0
  5. package/dist/cli/commands/semanticGraph.js.map +1 -1
  6. package/dist/cli/commands/start.js +74 -1
  7. package/dist/cli/commands/start.js.map +1 -1
  8. package/dist/cli/index.js +0 -2
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/core/dependencyAnalyzer.js +172 -0
  11. package/dist/core/dependencyAnalyzer.js.map +1 -1
  12. package/dist/core/fixSuggest.js +5 -5
  13. package/dist/core/fixSuggest.js.map +1 -1
  14. package/dist/core/graphQuery.d.ts +23 -0
  15. package/dist/core/graphQuery.js +48 -0
  16. package/dist/core/graphQuery.js.map +1 -0
  17. package/dist/core/intentRouter.d.ts +8 -1
  18. package/dist/core/intentRouter.js +2186 -22
  19. package/dist/core/intentRouter.js.map +1 -1
  20. package/dist/core/issueEngine.js +6 -7
  21. package/dist/core/issueEngine.js.map +1 -1
  22. package/dist/core/onboarding.d.ts +2 -2
  23. package/dist/core/onboarding.js +29 -5
  24. package/dist/core/onboarding.js.map +1 -1
  25. package/dist/core/start.d.ts +1 -0
  26. package/dist/core/start.js +2010 -10
  27. package/dist/core/start.js.map +1 -1
  28. package/dist/mcp/server.d.ts +1 -1
  29. package/dist/mcp/server.js +14 -5
  30. package/dist/mcp/server.js.map +1 -1
  31. package/dist/mcp/tools/costSummary.js +0 -2
  32. package/dist/mcp/tools/costSummary.js.map +1 -1
  33. package/dist/mcp/tools/semanticGraph.js +28 -3
  34. package/dist/mcp/tools/semanticGraph.js.map +1 -1
  35. package/dist/mcp/tools/start.js +6 -1
  36. package/dist/mcp/tools/start.js.map +1 -1
  37. package/dist/mcp/tools.js +0 -4
  38. package/dist/mcp/tools.js.map +1 -1
  39. package/dist/projscan-sbom.cdx.json +6 -6
  40. package/dist/reporters/consoleReporter.js +19 -0
  41. package/dist/reporters/consoleReporter.js.map +1 -1
  42. package/dist/reporters/markdownReporter.js +19 -0
  43. package/dist/reporters/markdownReporter.js.map +1 -1
  44. package/dist/tool-manifest.json +41 -60
  45. package/dist/types.d.ts +83 -0
  46. package/docs/GUIDE.md +1565 -0
  47. package/docs/ROADMAP.md +219 -0
  48. package/docs/demos/projscan-4-1-demo.html +648 -0
  49. package/docs/projscan-mission-control.png +0 -0
  50. package/docs/projscan-proof-router.png +0 -0
  51. package/package.json +8 -1
  52. package/scripts/capture-readme-assets.mjs +60 -0
  53. package/dist/cli/commands/explain.d.ts +0 -1
  54. package/dist/cli/commands/explain.js +0 -48
  55. package/dist/cli/commands/explain.js.map +0 -1
  56. package/dist/mcp/tools/explain.d.ts +0 -2
  57. package/dist/mcp/tools/explain.js +0 -34
  58. package/dist/mcp/tools/explain.js.map +0 -1
  59. package/dist/mcp/tools/graph.d.ts +0 -2
  60. package/dist/mcp/tools/graph.js +0 -79
  61. package/dist/mcp/tools/graph.js.map +0 -1
package/README.md CHANGED
@@ -9,9 +9,9 @@
9
9
 
10
10
  **Agent-first code intelligence.** An MCP server that lets AI coding agents (Claude Code, Codex, Cursor, Gemini, Windsurf, Cline, Continue, Zed — any MCP-aware client) query your codebase — with a CLI for humans and a local plugin layer for team-specific policy and reporting.
11
11
 
12
- [AI Agent Quick Start](#ai-agent-integration-mcp) · [CLI Quick Start](#quick-start) · [Commands](#commands) · [Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/GUIDE.md) · [Roadmap](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/ROADMAP.md)
12
+ [AI Agent Quick Start](#ai-agent-integration-mcp) · [CLI Quick Start](#quick-start) · [Commands](#commands) · [Full Guide](docs/GUIDE.md) · [Roadmap](docs/ROADMAP.md)
13
13
 
14
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/projscan-reporter-plugin.png" alt="projscan reporter plugin running in a macOS-style terminal window with a team health summary" width="700">
14
+ <img src="docs/projscan-mission-control.png" alt="projscan Mission Control routing a developer intent into ready actions, done criteria, and proof commands" width="760">
15
15
 
16
16
  </div>
17
17
 
@@ -33,7 +33,25 @@ The local plugin platform lets teams add project-specific findings and render `d
33
33
  npx projscan
34
34
  ```
35
35
 
36
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/projscan-reporter-plugin.gif" alt="projscan doctor rendered through a local reporter plugin in a macOS-style terminal window" width="700">
36
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/projscan-reporter-plugin.gif" alt="projscan doctor rendered through a local reporter plugin in a macOS-style terminal window" width="700">
37
+
38
+ ## What's New in 4.1.0
39
+
40
+ 4.1.0 turns projscan into a stronger developer Mission Control layer: tell it the work you are trying to do, and it routes you to the right local proof.
41
+
42
+ - **Mission Control for real developer goals.** `projscan start --intent "<goal>"` now maps plain-language work to inferred mode, route confidence, ready actions, alternatives, done criteria, proof commands, and a compact handoff prompt.
43
+ - **Much broader intent coverage.** Privacy, repo orientation, local setup, change planning, public contracts, file impact, package importers, ownership, PR evidence, release readiness, coordination, and session handoff questions now route to specific commands instead of generic next steps.
44
+ - **Proof-first verification.** "Which tests should I run?" and "what proves this works?" route to targeted verification proof, while failing/flaky/build questions still route to focused regression planning.
45
+ - **Richer repo and dependency intelligence.** Setup discovery now finds npm scripts, lint/typecheck, e2e, Storybook, Docker Compose, migrations, seed/reset commands, license summaries, package sizes, copyleft risk, and package importer lookups.
46
+ - **More reliable agent plumbing.** Project Memory recording and MCP close handling now await their async writes/teardown so session context is less likely to race with agent shutdown.
47
+
48
+ <img src="docs/projscan-proof-router.png" alt="projscan intent router and proof workflow showing impact routing, setup discovery, dependency intelligence, and stable-surface guardrails" width="760">
49
+
50
+ Regenerate the README screenshots with Playwright:
51
+
52
+ ```bash
53
+ npm run docs:screenshots
54
+ ```
37
55
 
38
56
  Run `projscan doctor` for a focused health check:
39
57
 
@@ -41,7 +59,7 @@ Run `projscan doctor` for a focused health check:
41
59
  npx projscan doctor
42
60
  ```
43
61
 
44
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
62
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
45
63
 
46
64
  ## Install
47
65
 
@@ -62,6 +80,286 @@ Run this path first inside a repository:
62
80
  ```bash
63
81
  projscan privacy-check # Show exactly what can be read, written, or contacted
64
82
  projscan start # First-60-seconds workflow orientation
83
+ projscan start --intent "what can projscan read?" # Routes to local privacy/trust boundary
84
+ projscan start --intent "does projscan read .env values?" # Routes to .env content policy check
85
+ projscan start --intent "is it safe to commit this change?" # Mission Control: inferred mode + ready actions + done criteria + proof
86
+ projscan start --intent "is my branch ready to merge?" # Routes to before-merge preflight readiness
87
+ projscan start --intent "rebase went wrong" # Routes to before-merge preflight recovery
88
+ projscan start --intent "resolve merge conflicts" # Routes to before-merge preflight recovery
89
+ projscan start --intent "what is blocking this PR?" # Routes to before-commit preflight blockers
90
+ projscan start --intent "summarize this repo" # Routes to cited repo map + orientation summary
91
+ projscan start --intent "what files should I read first?" # Routes to cited repo map + read-first files
92
+ projscan start --intent "where do I start in this codebase?" # Routes to cited repo map + read-first files
93
+ projscan start --intent "give me a tour of the repo" # Routes to cited repo map + entrypoints
94
+ projscan start --intent "explain the architecture" # Routes to cited repo map + boundaries
95
+ projscan start --intent "show me the main entrypoints" # Routes to cited repo map + entrypoints
96
+ projscan start --intent "how do I run this project?" # Routes to cited repo map + entrypoints
97
+ projscan start --intent "what command starts the dev server?" # Routes to cited repo map + entrypoints
98
+ projscan start --intent "what npm scripts exist?" # Routes to package/config contract discovery
99
+ projscan start --intent "which script runs e2e tests?" # Routes to package/config contract discovery
100
+ projscan start --intent "what command runs lint?" # Routes to package/config contract discovery
101
+ projscan start --intent "how do I run typecheck?" # Routes to package/config contract discovery
102
+ projscan start --intent "how do I seed the database?" # Routes to package/config contract discovery
103
+ projscan start --intent "what command runs migrations?" # Routes to package/config contract discovery
104
+ projscan start --intent "where should I put this new feature?" # Routes to change-readiness map
105
+ projscan start --intent "implement OAuth login" # Routes to change-readiness map
106
+ projscan start --intent "add billing webhook support" # Routes to change-readiness map
107
+ projscan start --intent "build a settings page" # Routes to change-readiness map
108
+ projscan start --intent "where should I add a new endpoint?" # Routes to change-readiness map
109
+ projscan start --intent "what files do I need to change for auth?" # Routes to change-readiness map
110
+ projscan start --intent "what docs should I update for this change?" # Routes to change-readiness map
111
+ projscan start --intent "where should I add this database migration?" # Routes to change-readiness map
112
+ projscan start --intent "which migrations exist?" # Routes to focused code search
113
+ projscan start --intent "show me generated files" # Routes to focused code search
114
+ projscan start --intent "can I drop this column?" # Routes to impact target search
115
+ projscan start --intent "what are the public contracts?" # Routes to public exports/config contracts
116
+ projscan start --intent "how do I safely deprecate this API?" # Routes to public exports/config contracts
117
+ projscan start --intent "what will this API change break?" # Routes to impact target search
118
+ projscan start --intent "what env vars does this repo need?" # Routes to config contract discovery
119
+ projscan start --intent "environment variables missing" # Routes to config contract discovery
120
+ projscan start --intent "where is NEXT_PUBLIC_API_URL used?" # Routes to focused code search
121
+ projscan start --intent "which env var controls auth?" # Routes to focused code search
122
+ projscan start --intent "where is \"Invalid token\" thrown?" # Routes to focused code search
123
+ projscan start --intent "find error message \"Payment failed\"" # Routes to focused code search
124
+ projscan start --intent "where is eslint config?" # Routes to focused code search
125
+ projscan start --intent "which config file defines aliases?" # Routes to focused code search
126
+ projscan start --intent "where is tsconfig path aliases configured?" # Routes to focused code search
127
+ projscan start --intent "where is Vitest config?" # Routes to focused code search
128
+ projscan start --intent "find Babel config" # Routes to focused code search
129
+ projscan start --intent "where is package manager configured?" # Routes to focused code search
130
+ projscan start --intent "where is pnpm workspace file?" # Routes to focused code search
131
+ projscan start --intent "what is risky in this repo?" # Routes to quality dimensions + top risks
132
+ projscan start --intent "what files are risky to touch?" # Routes to hotspot files
133
+ projscan start --intent "which files are too complex?" # Routes to hotspot files
134
+ projscan start --intent "what file should I refactor first?" # Routes to hotspot files
135
+ projscan start --intent "what tech debt should I pay down?" # Routes to hotspot files
136
+ projscan start --intent "what code should I simplify?" # Routes to hotspot files
137
+ projscan start --intent "find performance bottlenecks" # Routes to hotspot files
138
+ projscan start --intent "where are the slow files?" # Routes to hotspot files
139
+ projscan start --intent "find dead code" # Routes to doctor cleanup issues
140
+ projscan start --intent "find dead code and unused exports I can delete" # Routes to doctor cleanup issues
141
+ projscan start --intent "what can I safely delete?" # Routes to doctor cleanup discovery
142
+ projscan start --intent "what can I remove safely?" # Routes to doctor cleanup discovery
143
+ projscan start --intent "port 3000 already in use" # Routes to focused regression planning
144
+ projscan start --intent "peer dependency conflict after npm install" # Routes to focused regression planning
145
+ projscan start --intent "where is runAudit used?" # Routes to symbol impact/caller analysis
146
+ projscan start --intent "what code handles billing?" # Routes to focused code search
147
+ projscan start --intent "which file contains checkout logic?" # Routes to focused code search
148
+ projscan start --intent "find the Stripe webhook handler" # Routes to focused code search
149
+ projscan start --intent "find the handler for POST /api/users" # Routes to focused code search
150
+ projscan start --intent "where is the /checkout route handled?" # Routes to focused code search
151
+ projscan start --intent "where is /settings page rendered?" # Routes to focused code search
152
+ projscan start --intent "which page renders /billing?" # Routes to focused code search
153
+ projscan start --intent "where is route segment for dashboard?" # Routes to focused code search
154
+ projscan start --intent "where is not-found page handled?" # Routes to focused code search
155
+ projscan start --intent "which feature flags exist?" # Routes to focused code search
156
+ projscan start --intent "what background jobs exist?" # Routes to focused code search
157
+ projscan start --intent "find the email queue processor" # Routes to focused code search
158
+ projscan start --intent "where are metrics emitted?" # Routes to focused code search
159
+ projscan start --intent "where do we initialize Sentry?" # Routes to focused code search
160
+ projscan start --intent "what logs should I check for checkout?" # Routes to focused code search
161
+ projscan start --intent "find the dashboard for payments" # Routes to focused code search
162
+ projscan start --intent "where is seed data defined?" # Routes to focused code search
163
+ projscan start --intent "find fixtures for checkout" # Routes to focused code search
164
+ projscan start --intent "which mocks are used for payments?" # Routes to focused code search
165
+ projscan start --intent "where are Storybook stories for Button?" # Routes to focused code search
166
+ projscan start --intent "where are permissions checked for checkout?" # Routes to focused code search
167
+ projscan start --intent "which role can access admin?" # Routes to focused code search
168
+ projscan start --intent "what routes require login?" # Routes to focused code search
169
+ projscan start --intent "where is rate limiting configured?" # Routes to focused code search
170
+ projscan start --intent "where is cache invalidated for products?" # Routes to focused code search
171
+ projscan start --intent "find retry logic for payments" # Routes to focused code search
172
+ projscan start --intent "what sets request timeout?" # Routes to focused code search
173
+ projscan start --intent "find idempotency key handling" # Routes to focused code search
174
+ projscan start --intent "where is webhook signature verified?" # Routes to focused code search
175
+ projscan start --intent "where is input validation for signup?" # Routes to focused code search
176
+ projscan start --intent "which schema validates checkout?" # Routes to focused code search
177
+ projscan start --intent "where are request params parsed?" # Routes to focused code search
178
+ projscan start --intent "where is database transaction started?" # Routes to focused code search
179
+ projscan start --intent "where do we lock the order row?" # Routes to focused code search
180
+ projscan start --intent "what validates email uniqueness?" # Routes to focused code search
181
+ projscan start --intent "where is Prisma model for User?" # Routes to focused code search
182
+ projscan start --intent "find Drizzle schema for invoices" # Routes to focused code search
183
+ projscan start --intent "where is SQL query for invoices?" # Routes to focused code search
184
+ projscan start --intent "which repository saves orders?" # Routes to focused code search
185
+ projscan start --intent "find DAO for payments" # Routes to focused code search
186
+ projscan start --intent "where is loading state for dashboard?" # Routes to focused code search
187
+ projscan start --intent "where is error boundary for settings?" # Routes to focused code search
188
+ projscan start --intent "find command palette actions" # Routes to focused code search
189
+ projscan start --intent "where are i18n translations for checkout?" # Routes to focused code search
190
+ projscan start --intent "where are design tokens defined?" # Routes to focused code search
191
+ projscan start --intent "where is Tailwind theme configured?" # Routes to focused code search
192
+ projscan start --intent "where is global CSS imported?" # Routes to focused code search
193
+ projscan start --intent "which CSS module styles Button?" # Routes to focused code search
194
+ projscan start --intent "where is dark mode configured?" # Routes to focused code search
195
+ projscan start --intent "what breakpoints are defined?" # Routes to focused code search
196
+ projscan start --intent "where is sidebar nav item for billing?" # Routes to focused code search
197
+ projscan start --intent "which breadcrumb renders settings?" # Routes to focused code search
198
+ projscan start --intent "where is page title set for checkout?" # Routes to focused code search
199
+ projscan start --intent "where is Next.js layout for dashboard?" # Routes to focused code search
200
+ projscan start --intent "where is auth state stored?" # Routes to focused code search
201
+ projscan start --intent "find Redux slice for cart" # Routes to focused code search
202
+ projscan start --intent "where is Zustand store for user settings?" # Routes to focused code search
203
+ projscan start --intent "which context provider supplies theme?" # Routes to focused code search
204
+ projscan start --intent "which hook fetches invoices?" # Routes to focused code search
205
+ projscan start --intent "where is React Query mutation for checkout?" # Routes to focused code search
206
+ projscan start --intent "where do we call Stripe?" # Routes to focused code search
207
+ projscan start --intent "which code sends email through SendGrid?" # Routes to focused code search
208
+ projscan start --intent "where is S3 upload implemented?" # Routes to focused code search
209
+ projscan start --intent "find GitHub API client" # Routes to focused code search
210
+ projscan start --intent "where is GraphQL query for invoices?" # Routes to focused code search
211
+ projscan start --intent "where is websocket connection opened?" # Routes to focused code search
212
+ projscan start --intent "where is OpenAPI spec defined?" # Routes to focused code search
213
+ projscan start --intent "where is Swagger docs configured?" # Routes to focused code search
214
+ projscan start --intent "where is tRPC router for billing?" # Routes to focused code search
215
+ projscan start --intent "which GraphQL resolver handles invoices?" # Routes to focused code search
216
+ projscan start --intent "which protobuf defines user service?" # Routes to focused code search
217
+ projscan start --intent "where is gRPC client for payments?" # Routes to focused code search
218
+ projscan start --intent "where is the Dockerfile?" # Routes to focused code search
219
+ projscan start --intent "where is docker compose for local dev?" # Routes to focused code search
220
+ projscan start --intent "where are Kubernetes manifests?" # Routes to focused code search
221
+ projscan start --intent "find Helm chart for payments" # Routes to focused code search
222
+ projscan start --intent "where is Terraform module for S3?" # Routes to focused code search
223
+ projscan start --intent "which GitHub workflow deploys staging?" # Routes to focused code search
224
+ projscan start --intent "where is Vercel config?" # Routes to focused code search
225
+ projscan start --intent "where is password reset handled?" # Routes to focused code search
226
+ projscan start --intent "where is team invite flow?" # Routes to focused code search
227
+ projscan start --intent "where is onboarding flow implemented?" # Routes to focused code search
228
+ projscan start --intent "find CSV export for users" # Routes to focused code search
229
+ projscan start --intent "what creates audit log entries?" # Routes to focused code search
230
+ projscan start --intent "where is refund handling for payments?" # Routes to focused code search
231
+ projscan start --intent "where is subscription renewal handled?" # Routes to focused code search
232
+ projscan start --intent "where is welcome email template?" # Routes to focused code search
233
+ projscan start --intent "find password reset email copy" # Routes to focused code search
234
+ projscan start --intent "where is push notification copy for invites?" # Routes to focused code search
235
+ projscan start --intent "where is SMS verification template?" # Routes to focused code search
236
+ projscan start --intent "which template sends receipt email?" # Routes to focused code search
237
+ projscan start --intent "where is invoice PDF generated?" # Routes to focused code search
238
+ projscan start --intent "find documentation for auth" # Routes to focused docs search
239
+ projscan start --intent "what depends on src/core/start.ts?" # Routes to file impact/dependency analysis
240
+ projscan start --intent "can I delete src/core/start.ts?" # Routes to file impact/dependency analysis
241
+ projscan start --intent "revert src/core/start.ts safely" # Routes to file impact/dependency analysis
242
+ projscan start --intent "how do I revert this change safely?" # Routes to impact target search
243
+ projscan start --intent "what dependencies does this repo use?" # Routes to dependency inventory
244
+ projscan start --intent "why is the bundle so large?" # Routes to dependency size inventory
245
+ projscan start --intent "find package bloat" # Routes to dependency size inventory
246
+ projscan start --intent "what licenses do our dependencies use?" # Routes to dependency license inventory
247
+ projscan start --intent "who uses lodash?" # Routes to package importer graph query
248
+ projscan start --intent "why do we depend on lodash?" # Routes to package importer graph query
249
+ projscan start --intent "third party notices" # Routes to dependency license inventory
250
+ projscan start --intent "open source compliance check" # Routes to dependency license inventory
251
+ projscan start --intent "what workspaces are in this repo?" # Routes to monorepo workspace map
252
+ projscan start --intent "which workspace owns auth?" # Routes to monorepo workspace map
253
+ projscan start --intent "where should I put this in the monorepo?" # Routes to monorepo workspace map
254
+ projscan start --intent "does lodash have a CVE?" # Routes to scoped npm audit
255
+ projscan start --intent "what CVEs affect this repo?" # Routes to npm audit
256
+ projscan start --intent "find vulnerable packages" # Routes to npm audit
257
+ projscan start --intent "who owns auth?" # Routes to focused ownership search
258
+ projscan start --intent "which team owns payments?" # Routes to focused ownership search
259
+ projscan start --intent "who should I ask about auth?" # Routes to focused ownership search
260
+ projscan start --intent "what should I read before changing src/core/start.ts?" # Routes to exact-file orientation
261
+ projscan start --intent "explain src/core/start.ts" # Routes to per-file purpose/risk/ownership inspection
262
+ projscan start --intent "who owns src/core/start.ts?" # Routes to file ownership/risk context
263
+ projscan start --intent "who should review src/core/start.ts?" # Routes to file ownership/reviewer context
264
+ projscan start --intent "who last touched src/core/start.ts?" # Routes to file ownership/history context
265
+ projscan start --intent "why is src/core/start.ts risky?" # Routes to exact-file risk context
266
+ projscan start --intent "who imports src/core/start.ts?" # Routes to a targeted semantic graph query
267
+ projscan start --intent "where are the tests for src/core/start.ts?" # Routes to focused test-file search
268
+ projscan start --intent "where are tests for auth?" # Routes to focused test-topic search
269
+ projscan start --intent "which tests cover auth?" # Routes to focused existing-test search
270
+ projscan start --intent "locate specs for checkout" # Routes to focused test-topic search
271
+ projscan start --intent "which tests should I run for src/core/start.ts?" # Routes to verification proof planning
272
+ projscan start --intent "what should I test before pushing?" # Routes to verification proof planning
273
+ projscan start --intent "is src/core/start.ts covered by tests?" # Routes to file coverage/risk context
274
+ projscan start --intent "what tests should I add for src/core/start.ts?" # Routes to file test-design context
275
+ projscan start --intent "what changed in this PR?" # Routes to structural PR diff
276
+ projscan start --intent "is this PR too large?" # Routes to structural PR diff
277
+ projscan start --intent "what did I change since main?" # Routes to structural branch diff
278
+ projscan start --intent "is my branch stale?" # Routes to structural branch diff
279
+ projscan start --intent "compare my branch with main" # Routes to structural branch diff
280
+ projscan start --intent "write a commit message for these changes" # Routes to structural diff evidence
281
+ projscan start --intent "summarize my changes for a commit" # Routes to structural diff evidence
282
+ projscan start --intent "how risky is this PR?" # Routes to structural PR review
283
+ projscan start --intent "what are the risks in my PR?" # Routes to structural PR review
284
+ projscan start --intent "what are the top risks before merge?" # Routes to before-merge preflight readiness
285
+ projscan start --intent "am I ready to open a PR?" # Routes to PR-readiness evidence pack
286
+ projscan start --intent "who should review this PR?" # Routes to owner-routing evidence pack
287
+ projscan start --intent "who owns the changed files?" # Routes to changed-file owner routing
288
+ projscan start --intent "write a PR comment for reviewers" # Routes to approval-ready evidence pack
289
+ projscan start --intent "write a PR description" # Routes to approval-ready evidence pack
290
+ projscan start --intent "what should my PR say?" # Routes to approval-ready evidence pack
291
+ projscan start --intent "make a PR checklist" # Routes to approval-ready evidence pack
292
+ projscan start --intent "what should I tell my team about this change?" # Routes to approval-ready evidence pack
293
+ projscan start --intent "what should I fix first?" # Routes to bug-hunt prioritization
294
+ projscan start --intent "what is the fastest safe fix?" # Routes to bug-hunt prioritization before generic safety
295
+ projscan start --intent "find a quick win" # Routes to bug-hunt prioritization
296
+ projscan start --intent "what can I do in five minutes?" # Routes to bug-hunt prioritization
297
+ projscan start --intent "pick an easy task for me" # Routes to bug-hunt prioritization
298
+ projscan start --intent "what should an intern work on?" # Routes to bug-hunt prioritization
299
+ projscan start --intent "what is a low risk improvement?" # Routes to bug-hunt prioritization
300
+ projscan start --intent "pick a small safe task" # Routes to bug-hunt prioritization
301
+ projscan start --intent "what should I do next?" # Routes to an ordered before-edit workplan
302
+ projscan start --intent "explain issue missing-test-framework" # Routes to deep issue context
303
+ projscan start --intent "fix issue missing-test-framework" # Routes to a concrete fix suggestion
304
+ projscan start --intent "is user input reaching SQL sinks?" # Routes to hardening dataflow analysis
305
+ projscan start --intent "does this endpoint expose secrets?" # Routes to hardening dataflow analysis
306
+ projscan start --intent "where is PII handled?" # Routes to hardening dataflow analysis
307
+ projscan start --intent "GDPR compliance check" # Routes to hardening dataflow analysis
308
+ projscan start --intent "where do we store access tokens?" # Routes to hardening dataflow analysis
309
+ projscan start --intent "is this change secure?" # Routes to structural PR review
310
+ projscan start --intent "check this PR for security issues" # Routes to structural PR review
311
+ projscan start --intent "what are the scariest untested files?" # Routes to coverage × hotspot test targets
312
+ projscan start --intent "which files have no tests?" # Routes to coverage × hotspot test targets
313
+ projscan start --intent "what breaks if I bump chalk to 6?" # Routes to offline package upgrade impact
314
+ projscan start --intent "what breaks if I update react?" # Routes to offline package upgrade impact
315
+ projscan start --intent "can I remove lodash?" # Routes to offline package removal impact
316
+ projscan start --intent "is lodash safe to remove?" # Routes to offline package removal impact
317
+ projscan start --intent "CI is failing after this PR" # Routes to a focused regression plan
318
+ projscan start --intent "CI is flaky" # Routes to a focused regression plan
319
+ projscan start --intent "production is down" # Routes to a focused regression plan
320
+ projscan start --intent "why is the login endpoint returning 500?" # Routes to a focused regression plan
321
+ projscan start --intent "why did CI fail?" # Routes to a focused regression plan
322
+ projscan start --intent "why is GitHub Actions failing?" # Routes to a focused regression plan
323
+ projscan start --intent "which GitHub Actions job failed?" # Routes to a focused regression plan
324
+ projscan start --intent "why is CI slow?" # Routes to a focused regression plan
325
+ projscan start --intent "why did the build fail?" # Routes to a focused regression plan
326
+ projscan start --intent "what is making builds slow?" # Routes to a focused regression plan
327
+ projscan start --intent "lint is failing" # Routes to a focused regression plan
328
+ projscan start --intent "typecheck is failing" # Routes to a focused regression plan
329
+ projscan start --intent "npm install is failing" # Routes to a focused regression plan
330
+ projscan start --intent "debug this stack trace" # Routes to a focused regression plan
331
+ projscan start --intent "where is this stack trace from?" # Routes to a focused regression plan
332
+ projscan start --intent "database connection refused locally" # Routes to a focused regression plan
333
+ projscan start --intent "what command reproduces the flake?" # Routes to a focused regression plan
334
+ projscan start --intent "quarantine flaky test" # Routes to a focused regression plan
335
+ projscan start --intent "what tests should I run for my changes?" # Routes to verification proof planning
336
+ projscan start --intent "how can I speed up tests?" # Routes to a focused regression plan
337
+ projscan start --intent "what commands prove this works?" # Routes to focused proof commands
338
+ projscan start --intent "what commands benchmark this repo?" # Routes to focused proof commands
339
+ projscan start --intent "give me proof commands" # Routes to focused proof commands
340
+ projscan start --intent "what commands should I run before pushing?" # Routes to focused pre-push proof
341
+ projscan start --intent "what smoke checks should I run before commit?" # Routes to a smoke regression plan
342
+ projscan start --intent "what full regression should I run before merge?" # Routes to a full regression plan
343
+ projscan start --intent "what should I check before release?" # Routes to release readiness
344
+ projscan start --intent "can I deploy this?" # Routes to release readiness
345
+ projscan start --intent "what changed since last release?" # Routes to release readiness
346
+ projscan start --intent "write a release note for this change" # Routes to release readiness and changelog evidence
347
+ projscan start --intent "draft changelog entry" # Routes to release readiness and changelog evidence
348
+ projscan start --intent "show coordination status for parallel agents" # Routes to one-call swarm readiness
349
+ projscan start --intent "who else is working on this?" # Routes to one-call swarm readiness
350
+ projscan start --intent "am I going to collide with another agent?" # Routes to one-call swarm readiness
351
+ projscan start --intent "what worktrees are active?" # Routes to one-call swarm readiness
352
+ projscan start --intent "what should merge first?" # Routes to merge-risk ordering
353
+ projscan start --intent "show me overlapping changes" # Routes to collision detection
354
+ projscan start --intent "show active claims" # Routes to advisory claim listing
355
+ projscan start --intent "claim src/core/start.ts for me" # Routes to active-claim review + file claim action
356
+ projscan start --intent "where did I leave off?" # Routes to touched-file session context
357
+ projscan start --intent "what changed while I was away?" # Routes to touched-file session context
358
+ projscan start --intent "what changed while I was offline?" # Routes to touched-file session context
359
+ projscan start --intent "what changed while I was asleep?" # Routes to touched-file session context
360
+ projscan start --intent "what did the last agent touch?" # Routes to remembered touched-file session context
361
+ projscan start --intent "what did the last agent do?" # Routes to remembered touched-file session context
362
+ projscan start --intent "give the next agent a handoff" # Routes to a compact agent brief
65
363
  projscan understand --view map # Cited repo map, flows, contracts, change readiness, and verification proof
66
364
  projscan preflight --format json # Proceed/caution/block safety gate
67
365
  projscan evidence-pack --pr-comment # Reviewer-ready PR evidence
@@ -94,9 +392,9 @@ npm run test:trust-smoke
94
392
 
95
393
  The full command catalog is below. Most users should start with the five-command path above instead of scanning the catalog.
96
394
 
97
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
395
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
98
396
 
99
- For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/GUIDE.md)**.
397
+ For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/GUIDE.md)**.
100
398
 
101
399
  ## Repo Understanding
102
400
 
@@ -117,7 +415,8 @@ The report includes file/symbol-backed `claims`, `readFirst` files, entrypoints,
117
415
  | Command | Description |
118
416
  |---------|-------------|
119
417
  | `projscan analyze` | Full analysis - languages, frameworks, dependencies, issues |
120
- | `projscan start` | First-60-seconds workflow orientation with setup diagnostics, top risks, and next commands |
418
+ | `projscan route` | Map a plain-language goal to the best projscan tool with weighted confidence and matched keywords |
419
+ | `projscan start` | First-60-seconds workflow orientation with setup diagnostics, Mission Control, top risks, and next commands. Add `--intent "<goal>"` to route a plain-language goal to route confidence, ready actions, done criteria, and proof commands |
121
420
  | `projscan first-run` | First-run setup diagnostics plus the shared `firstTenMinutes` command path |
122
421
  | `projscan init mcp` | Ready-to-paste MCP client configs for popular agent clients |
123
422
  | `projscan mcp doctor` | Verify MCP setup and print paste-ready client config with checks |
@@ -142,17 +441,16 @@ The report includes file/symbol-backed `claims`, `readFirst` files, entrypoints,
142
441
  | `projscan doctor` | Health check - missing tooling, architecture smells, security and supply-chain risks |
143
442
  | `projscan preflight` | Agent safety gate - `proceed`, `caution`, or `block` with health, change, plugin, and supply-chain evidence |
144
443
  | `projscan hotspots` | Rank files by risk - churn × complexity × issues × ownership |
145
- | `projscan semantic-graph` | Stable v3 graph contract - files, functions, packages, symbols, imports, exports, definitions, and calls |
444
+ | `projscan semantic-graph` | Stable v3 graph contract, plus targeted `--query importers/imports/exports/...` lookups |
146
445
  | `projscan dataflow` | Focused direct, propagated, and bridge source-to-sink dataflow risks |
147
446
  | `projscan search <query>` | **BM25-ranked search** - content + symbols + path, with excerpts |
148
447
  | `projscan file <path>` | Drill into a file - purpose, risk, ownership, related issues |
149
448
  | `projscan fix` | Auto-fix issues (ESLint, Prettier, Vitest, .editorconfig) |
150
449
  | `projscan ci` | CI health gate - SARIF output, `--changed-only` PR-diff mode, exits 1 if score below threshold |
151
450
  | `projscan diff` | Compare current health **and hotspot trends** against a baseline |
152
- | `projscan explain <file>` | Explain a file's purpose, imports, exports, and issues |
153
451
  | `projscan diagram` | ASCII architecture diagram of your project |
154
452
  | `projscan structure` | Directory tree with file counts |
155
- | `projscan dependencies` | Dependency analysis - counts, risks, recommendations |
453
+ | `projscan dependencies` | Dependency analysis - counts, license summary, risks, recommendations |
156
454
  | `projscan outdated` | Declared-vs-installed drift check (offline) |
157
455
  | `projscan audit` | `npm audit`-powered vulnerability report - SARIF-ready for Code Scanning |
158
456
  | `projscan upgrade <pkg>` | Preview upgrade impact - local CHANGELOG + importer list, offline |
@@ -177,31 +475,25 @@ projscan --help
177
475
  <details>
178
476
  <summary><strong>projscan structure</strong> - Directory tree with file counts</summary>
179
477
 
180
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
478
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
181
479
  </details>
182
480
 
183
481
  <details>
184
482
  <summary><strong>projscan diagram</strong> - Architecture visualization</summary>
185
483
 
186
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
484
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
187
485
  </details>
188
486
 
189
487
  <details>
190
488
  <summary><strong>projscan dependencies</strong> - Dependency analysis</summary>
191
489
 
192
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
193
- </details>
194
-
195
- <details>
196
- <summary><strong>projscan explain</strong> - File explanation</summary>
197
-
198
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20explain.gif" alt="npx projscan explain" width="700">
490
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
199
491
  </details>
200
492
 
201
493
  <details>
202
494
  <summary><strong>projscan badge</strong> - Health badge generation</summary>
203
495
 
204
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
496
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
205
497
  </details>
206
498
 
207
499
  ### Output Formats
@@ -223,7 +515,7 @@ Run `projscan help` for the generated command-by-command support matrix.
223
515
 
224
516
  projscan can load local plugins from `.projscan-plugins/` when `PROJSCAN_PLUGINS_PREVIEW=1` is set. The environment flag is kept for explicit local-code opt-in. Analyzer plugins emit normal projscan issues; reporter plugins render supported CLI commands with team-specific output.
225
517
 
226
- **2.0 upgrade notes:** migrating from 1.x or authoring plugins? Start with the [2.0 Migration Guide](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/PLUGIN-AUTHORING.md), the [Plugin Gallery](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/PLUGIN-GALLERY.md), and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/plugin.schema.json) as the stable contract.
518
+ **2.0 upgrade notes:** migrating from 1.x or authoring plugins? Start with the [2.0 Migration Guide](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/PLUGIN-AUTHORING.md), the [Plugin Gallery](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/PLUGIN-GALLERY.md), and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/plugin.schema.json) as the stable contract.
227
519
 
228
520
  ```bash
229
521
  projscan plugin list
@@ -234,9 +526,9 @@ PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor --reporter team-radar
234
526
  PROJSCAN_PLUGINS_PREVIEW=1 projscan ci --reporter team-radar --min-score 80
235
527
  ```
236
528
 
237
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
529
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
238
530
 
239
- Reporter plugins are intentionally CLI-only. MCP tools keep returning structured JSON-compatible payloads so agents can reason over stable data, while humans can get a polished local report for their team. Custom presentation, team-branded summaries, and white-label reports belong in reporter plugins rather than new core HTML theming flags. See [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
531
+ Reporter plugins are intentionally CLI-only. MCP tools keep returning structured JSON-compatible payloads so agents can reason over stable data, while humans can get a polished local report for their team. Custom presentation, team-branded summaries, and white-label reports belong in reporter plugins rather than new core HTML theming flags. See [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
240
532
 
241
533
  ### Options
242
534
 
@@ -291,7 +583,7 @@ Python repos now get the same treatment JS/TS has had since 0.6:
291
583
  - **Python-aware analyzers.** Missing pytest / ruff / black config. Deprecated packages (nose, simplejson, pycrypto). Unused `pyproject.toml` / `requirements.txt` deps. Missing lockfile.
292
584
  - **Code search.** BM25 and semantic modes work on `.py` files out of the box.
293
585
  - **Hotspots + dead code.** Same scoring as JS/TS, with `__init__.py` and pytest test-file conventions understood.
294
- - **MCP tools work unchanged.** `projscan_graph`, `projscan_search`, `projscan_doctor`, `projscan_hotspots`, etc. all accept Python projects. Agents can ask "which files import `pkg.core`?" and get an answer in milliseconds.
586
+ - **MCP tools work unchanged.** `projscan_semantic_graph`, `projscan_search`, `projscan_doctor`, `projscan_hotspots`, etc. all accept Python projects. Agents can ask "which files import `pkg.core`?" and get an answer in milliseconds.
295
587
 
296
588
  `projscan_upgrade` remains Node-only for now - a Python equivalent (reading pip / poetry metadata) is on the roadmap.
297
589
 
@@ -308,6 +600,8 @@ Go flows through the same pipeline as JS/TS and Python:
308
600
 
309
601
  `projscan coupling` (CLI + MCP tool) reports per-file fan-in / fan-out / instability (Bob Martin's I = Ce / (Ca + Ce)) and detects circular imports via Tarjan SCC. Cross-package edges are flagged when running on a monorepo.
310
602
 
603
+ Plain-language Mission Control intents such as `projscan start --intent "show circular dependencies"` route straight to `projscan coupling --cycles-only --format json`; broader boundary questions such as `projscan start --intent "what modules are tightly coupled"` route to the full coupling report.
604
+
311
605
  ### PR-aware structural diff (0.11)
312
606
 
313
607
  `projscan pr-diff` returns the structural diff between two refs: exports added/removed/renamed, imports added/removed, call sites added/removed, ΔCC, Δfan-in. Spins up a temporary git worktree at the base ref to build a clean second graph. Renames are detected via similarity scoring (max of normalized Levenshtein and shared-affix fraction, threshold 0.5).
@@ -401,7 +695,7 @@ If you read projscan's [Socket report](https://socket.dev/npm/package/projscan),
401
695
  ### Audit it yourself
402
696
 
403
697
  - **Source is open** at [github.com/abhiyoheswaran1/projscan](https://github.com/abhiyoheswaran1/projscan). The npm tarball matches the `dist/` produced by `npm run build` at the matching tag.
404
- - **Public API surface is locked** by `scripts/check-stability.mjs`, which runs in CI on every PR and fails on any rename or removal of an MCP tool, CLI command, or exit code. See [`docs/STABILITY.md`](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/STABILITY.md).
698
+ - **Public API surface is locked** by `scripts/check-stability.mjs`, which runs in CI on every PR and fails on any rename or removal of an MCP tool, CLI command, or exit code. See [`docs/STABILITY.md`](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/STABILITY.md).
405
699
  - **Run it offline:** `npm install -g projscan` followed by anything except `audit` and `--mode semantic` works without network.
406
700
  - **Drop privilege further:** in CI, run projscan in a sandbox that disallows network egress; everything except `audit` will pass.
407
701
 
@@ -452,7 +746,7 @@ projscan ci --changed-only # Gate only on this PR's diff
452
746
  projscan ci --format sarif > projscan.sarif # SARIF for Code Scanning
453
747
  ```
454
748
 
455
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
749
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
456
750
 
457
751
  ### GitHub Action (recommended)
458
752
 
@@ -529,7 +823,7 @@ Fields:
529
823
  - `hotspots.limit` / `hotspots.since` - defaults for the `hotspots` command
530
824
  - `monorepo.importPolicy` - cross-package import allow/deny rules in monorepos *(0.14+)*
531
825
 
532
- See [`docs/GUIDE.md` Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
826
+ See [`docs/GUIDE.md` -> Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
533
827
 
534
828
  ## Tracking Health Over Time
535
829
 
@@ -542,7 +836,7 @@ projscan diff # Compare against baseline
542
836
  projscan diff --format markdown # Markdown diff for PRs
543
837
  ```
544
838
 
545
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
839
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
546
840
 
547
841
  ## Hotspots - Where to Fix First
548
842
 
@@ -631,7 +925,7 @@ Coverage is also automatically joined into `projscan hotspots` when one of those
631
925
 
632
926
  **This is the primary way to use projscan.** `projscan mcp` starts an [MCP](https://modelcontextprotocol.io) server over stdio so AI coding agents can query your codebase with real structural accuracy - not regex, not grep.
633
927
 
634
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.8.0/docs/projscan-agent-demo.gif" alt="projscan answering two agent questions: what breaks if I rename buildCodeGraph (impact analysis with definitions, direct callers, transitive reach), and where should I fix first (ranked hotspots with cyclomatic complexity)" width="700">
928
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.1.0/docs/projscan-agent-demo.gif" alt="projscan answering two agent questions: what breaks if I rename buildCodeGraph (impact analysis with definitions, direct callers, transitive reach), and where should I fix first (ranked hotspots with cyclomatic complexity)" width="700">
635
929
 
636
930
  Two questions an agent asks; structural answers in milliseconds. *"What breaks if I rename `buildCodeGraph`?"* → 31 direct callers, 97 files reachable. *"Where should I fix first?"* → ranked hotspots with AST cyclomatic complexity, churn, and ownership signals.
637
931
 
@@ -653,7 +947,7 @@ command = "npx"
653
947
  args = ["-y", "projscan", "mcp"]
654
948
  ```
655
949
 
656
- Restart `codex` and the tool surface (`projscan_graph`, `projscan_review`, …) appears alongside Codex's built-ins.
950
+ Restart `codex` and the tool surface (`projscan_semantic_graph`, `projscan_review`, …) appears alongside Codex's built-ins.
657
951
 
658
952
  ### Gemini CLI (Google)
659
953
 
@@ -758,13 +1052,20 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
758
1052
 
759
1053
  ### What agents can ask
760
1054
 
761
- - *"Who imports `src/auth/jwt.ts`?"* → `projscan_graph { file, direction: "importers" }`
1055
+ - *"Who imports `src/auth/jwt.ts`?"* → `projscan_semantic_graph { query: { direction: "importers", file: "src/auth/jwt.ts" } }` or `projscan semantic-graph --query importers --file src/auth/jwt.ts --format json`
1056
+ - *"Which files import `chalk`?"* or *"Which files import package `chalk`?"* → `projscan_semantic_graph { query: { direction: "package_importers", symbol: "chalk" } }` or `projscan semantic-graph --query package_importers --symbol chalk --format json`
762
1057
  - *"Give me the whole agent-safe graph contract."* → `projscan_semantic_graph`
763
1058
  - *"Did this wrapper connect a source reader to a dangerous sink?"* → `projscan_dataflow`
764
- - *"Where is `runAudit` defined?"* → `projscan_search { query: "runAudit", scope: "symbols" }`
1059
+ - *"Explain issue `missing-test-framework`."* → `projscan_explain_issue { issue_id: "missing-test-framework" }`
1060
+ - *"Where is `runAudit` defined?"* → `projscan_semantic_graph { query: { direction: "symbol_defs", symbol: "runAudit" } }` or `projscan semantic-graph --query symbol_defs --symbol runAudit --format json`
765
1061
  - *"Which files implement auth?"* → `projscan_search { query: "auth", scope: "content" }`
1062
+ - *"Who should I ask about auth?"* → `projscan_search { query: "auth" }`
1063
+ - *"Which tests cover auth?"* → `projscan_search { query: "tests for auth" }`
766
1064
  - *"What are the scariest untested files?"* → `projscan_coverage`
1065
+ - *"Which files have no tests?"* → `projscan_coverage`
767
1066
  - *"What breaks if I bump chalk to 6?"* → `projscan_upgrade { package: "chalk" }`
1067
+ - *"Show circular dependencies."* → `projscan_coupling { direction: "cycles_only" }` or `projscan coupling --cycles-only --format json`
1068
+ - *"What modules are tightly coupled?"* → `projscan_coupling` or `projscan coupling --format json`
768
1069
  - *"Where should I refactor first?"* → `projscan_hotspots`
769
1070
  - *"What should my agent do first in this repo?"* → `projscan_start { mode: "before_edit" }`
770
1071
  - *"How do I understand the repo before editing?"* → `projscan_understand { view: "map" }`
@@ -777,13 +1078,12 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
777
1078
  - *"How do I plan the next six product lines?"* → `projscan_release_train`
778
1079
  - *"How do I wire projscan into this MCP client?"* → `projscan_adoption { action: "mcp_config", client: "codex" }`
779
1080
 
780
- ### The 47 MCP tools
1081
+ ### The 45 MCP tools
781
1082
 
782
1083
  **Structural (0.6.0 / 0.11 / 0.13 / 0.14 / 0.15 - agent-native):**
783
1084
  - **`projscan_start`** *(3.0.4)* - first-60-seconds repo orientation. Composes setup diagnostics, `firstTenMinutes`, workflow recipes, workplan, quality scorecard, top risks, adoption gaps, next commands, and optional handoff payload.
784
1085
  - **`projscan_understand`** *(3.4)* - cited repo-comprehension report with `map`, `flow`, `contracts`, `change`, and `verify` views, read-first files, unknowns, change readiness, verification tiers, and exact next commands.
785
- - **`projscan_graph`** - query the AST-based code graph. Directions: `imports`, `exports`, `importers`, `symbol_defs`, `package_importers`. Millisecond responses on a warm cache.
786
- - **`projscan_semantic_graph`** *(3.0)* - stable v3 semantic graph contract with file, function, package, and symbol nodes plus `defines`, `imports`, `imports_package`, `exports`, and `calls` edges.
1086
+ - **`projscan_semantic_graph`** *(3.0; query mode 4.0)* - the code graph, two ways. With no `query`: the stable v3 semantic graph contract (file, function, package, and symbol nodes plus `defines`, `imports`, `imports_package`, `exports`, and `calls` edges). With `query: { direction, file?, symbol? }`: one cheap targeted lookup — `imports`, `exports`, `importers`, `symbol_defs`, `package_importers` with millisecond responses on a warm cache. (Subsumes the former `projscan_graph`, removed in 4.0.)
787
1087
  - **`projscan_dataflow`** *(3.0)* - focused direct, propagated, and bridge source-to-sink dataflow risks. Next.js and Express request sources are framework-aware, DB/write sinks are receiver-sensitive, and defaults suppress test-file paths, broad readFile/writeFile noise, JavaScript RegExp.exec false positives, and generated-code anxiety; opt into broader scans with `include_tests` / `include_broad_file_io` / `include_generated` or the matching CLI flags.
788
1088
  - **`projscan_search`** - fast search across `symbols` (exported names), `files` (path substring), or `content` (source substring with line + excerpt). Sub-file mode (`sub_file: true`) embeds per-function for sharper semantic results *(0.15)*.
789
1089
  - **`projscan_coupling`** *(0.11)* - per-file fan-in / fan-out / instability + circular-import cycles (Tarjan SCC). Filter by `direction: cycles_only | high_fan_in | high_fan_out`.
@@ -811,8 +1111,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
811
1111
  - `projscan_analyze` - full project report
812
1112
  - `projscan_doctor` - health score + issues (now includes `cycle-detected-N` for circular imports as of 0.13)
813
1113
  - `projscan_hotspots` - risk-ranked files (churn × **AST cyclomatic complexity** × issues × ownership × coverage; falls back to LOC for non-AST languages). Pass `view: "functions"` *(0.13)* for top-N risky individual functions.
814
- - `projscan_file` - per-file risk + ownership + related issues + CC + fan-in/fan-out + per-function CC table *(0.13)*
815
- - `projscan_explain` - per-file purpose, imports, exports, smells
1114
+ - `projscan_file` - per-file purpose, imports, exports, smells + risk + ownership + related issues + CC + fan-in/fan-out + per-function CC table *(0.13)*
816
1115
  - `projscan_structure` - directory tree
817
1116
  - `projscan_coverage` - scariest untested files (coverage × hotspots)
818
1117
 
@@ -836,7 +1135,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
836
1135
  - **`projscan_apply_fix`** *(1.6)* - mechanically execute the safe fix templates. Default is dry-run; pass `confirm: true` to write. Atomic writes, per-apply rollback record at `.projscan-cache/rollbacks/<id>.json`. Reverse with `action: "rollback", rollback_id: ...`. Six templates supported at this release: `unused-dependency-*`, `missing-test-framework`, `missing-eslint`, `missing-prettier`, `missing-editorconfig`, `missing-readme`.
837
1136
  - **`projscan_taint`** *(1.6)* - source-to-sink reachability over the per-function call graph. Built-in defaults cover common JS / Python sources (`process.env`, `req.body`, etc.) and sinks (`exec`, `eval`, `db.query`, etc.). Project-specific names go in `.projscanrc.json` `taint`. `projscan_review` automatically diffs taint flows between base and head and **blocks any PR that introduces a new flow**. In 3.0.2, review surfaces hardened `newDataflowRisks`, compact `graphEvidence`, and graph-readiness gates for safer handoff.
838
1137
 
839
- Analyzer plugins can optionally read graph/dataflow context through `check(rootPath, files, context)` while staying on manifest schema v1. The packaged `graph-context` example shows `context.getSemanticGraph()` and `context.getDataflow()` in a real analyzer. For analyzer and reporter plugin authoring, manifest validation, `--reporter <name>`, and the trust model, see [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v3.8.0/docs/PLUGIN-AUTHORING.md).
1138
+ Analyzer plugins can optionally read graph/dataflow context through `check(rootPath, files, context)` while staying on manifest schema v1. The packaged `graph-context` example shows `context.getSemanticGraph()` and `context.getDataflow()` in a real analyzer. For analyzer and reporter plugin authoring, manifest validation, `--reporter <name>`, and the trust model, see [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v4.1.0/docs/PLUGIN-AUTHORING.md).
840
1139
 
841
1140
  ### Context-window budgeting
842
1141
 
@@ -45,6 +45,7 @@ export function registerRoute() {
45
45
  result.matches.slice(0, 3).forEach((m, i) => {
46
46
  console.log('');
47
47
  console.log(` ${i + 1}. ${chalk.bold(m.tool)} ${chalk.dim(`(${m.category})`)}`);
48
+ console.log(` ${chalk.dim(`confidence: ${m.confidence}; matched: ${m.matchedKeywords.join(', ') || 'none'}`)}`);
48
49
  console.log(` ${m.why}`);
49
50
  console.log(` ${chalk.cyan(m.example)}`);
50
51
  });
@@ -1 +1 @@
1
- {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../src/cli/commands/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;;GAGG;AACH,MAAM,UAAU,aA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