projscan 2.2.0 → 2.9.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 (99) hide show
  1. package/README.md +59 -21
  2. package/dist/cli/commands/agentBrief.d.ts +1 -0
  3. package/dist/cli/commands/agentBrief.js +68 -0
  4. package/dist/cli/commands/agentBrief.js.map +1 -0
  5. package/dist/cli/commands/bugHunt.d.ts +1 -0
  6. package/dist/cli/commands/bugHunt.js +59 -0
  7. package/dist/cli/commands/bugHunt.js.map +1 -0
  8. package/dist/cli/commands/evidencePack.d.ts +1 -0
  9. package/dist/cli/commands/evidencePack.js +70 -0
  10. package/dist/cli/commands/evidencePack.js.map +1 -0
  11. package/dist/cli/commands/init.js +46 -1
  12. package/dist/cli/commands/init.js.map +1 -1
  13. package/dist/cli/commands/preflight.js +16 -0
  14. package/dist/cli/commands/preflight.js.map +1 -1
  15. package/dist/cli/commands/qualityScorecard.d.ts +1 -0
  16. package/dist/cli/commands/qualityScorecard.js +61 -0
  17. package/dist/cli/commands/qualityScorecard.js.map +1 -0
  18. package/dist/cli/commands/recipes.d.ts +2 -0
  19. package/dist/cli/commands/recipes.js +94 -0
  20. package/dist/cli/commands/recipes.js.map +1 -0
  21. package/dist/cli/commands/regressionPlan.d.ts +1 -0
  22. package/dist/cli/commands/regressionPlan.js +77 -0
  23. package/dist/cli/commands/regressionPlan.js.map +1 -0
  24. package/dist/cli/commands/releaseTrain.d.ts +1 -0
  25. package/dist/cli/commands/releaseTrain.js +58 -0
  26. package/dist/cli/commands/releaseTrain.js.map +1 -0
  27. package/dist/cli/commands/workplan.d.ts +1 -0
  28. package/dist/cli/commands/workplan.js +136 -0
  29. package/dist/cli/commands/workplan.js.map +1 -0
  30. package/dist/cli/index.js +17 -0
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/core/adoption.d.ts +57 -0
  33. package/dist/core/adoption.js +392 -0
  34. package/dist/core/adoption.js.map +1 -0
  35. package/dist/core/agentBrief.d.ts +6 -0
  36. package/dist/core/agentBrief.js +192 -0
  37. package/dist/core/agentBrief.js.map +1 -0
  38. package/dist/core/bugHunt.d.ts +6 -0
  39. package/dist/core/bugHunt.js +278 -0
  40. package/dist/core/bugHunt.js.map +1 -0
  41. package/dist/core/qualityScorecard.d.ts +6 -0
  42. package/dist/core/qualityScorecard.js +220 -0
  43. package/dist/core/qualityScorecard.js.map +1 -0
  44. package/dist/core/regressionPlan.d.ts +7 -0
  45. package/dist/core/regressionPlan.js +226 -0
  46. package/dist/core/regressionPlan.js.map +1 -0
  47. package/dist/core/releaseEvidence.d.ts +7 -0
  48. package/dist/core/releaseEvidence.js +174 -0
  49. package/dist/core/releaseEvidence.js.map +1 -0
  50. package/dist/core/releaseTrain.d.ts +5 -0
  51. package/dist/core/releaseTrain.js +348 -0
  52. package/dist/core/releaseTrain.js.map +1 -0
  53. package/dist/core/workplan.d.ts +12 -0
  54. package/dist/core/workplan.js +440 -0
  55. package/dist/core/workplan.js.map +1 -0
  56. package/dist/index.d.ts +10 -1
  57. package/dist/index.js +8 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/mcp/tools/adoption.d.ts +2 -0
  60. package/dist/mcp/tools/adoption.js +35 -0
  61. package/dist/mcp/tools/adoption.js.map +1 -0
  62. package/dist/mcp/tools/agentBrief.d.ts +2 -0
  63. package/dist/mcp/tools/agentBrief.js +39 -0
  64. package/dist/mcp/tools/agentBrief.js.map +1 -0
  65. package/dist/mcp/tools/bugHunt.d.ts +2 -0
  66. package/dist/mcp/tools/bugHunt.js +31 -0
  67. package/dist/mcp/tools/bugHunt.js.map +1 -0
  68. package/dist/mcp/tools/evidencePack.d.ts +2 -0
  69. package/dist/mcp/tools/evidencePack.js +39 -0
  70. package/dist/mcp/tools/evidencePack.js.map +1 -0
  71. package/dist/mcp/tools/qualityScorecard.d.ts +2 -0
  72. package/dist/mcp/tools/qualityScorecard.js +26 -0
  73. package/dist/mcp/tools/qualityScorecard.js.map +1 -0
  74. package/dist/mcp/tools/regressionPlan.d.ts +2 -0
  75. package/dist/mcp/tools/regressionPlan.js +47 -0
  76. package/dist/mcp/tools/regressionPlan.js.map +1 -0
  77. package/dist/mcp/tools/releaseTrain.d.ts +2 -0
  78. package/dist/mcp/tools/releaseTrain.js +27 -0
  79. package/dist/mcp/tools/releaseTrain.js.map +1 -0
  80. package/dist/mcp/tools/workplan.d.ts +2 -0
  81. package/dist/mcp/tools/workplan.js +70 -0
  82. package/dist/mcp/tools/workplan.js.map +1 -0
  83. package/dist/mcp/tools.js +16 -0
  84. package/dist/mcp/tools.js.map +1 -1
  85. package/dist/projscan-sbom.cdx.json +6 -6
  86. package/dist/reporters/consoleReporter.js +4 -0
  87. package/dist/reporters/consoleReporter.js.map +1 -1
  88. package/dist/tool-manifest.json +222 -3
  89. package/dist/types.d.ts +240 -0
  90. package/dist/utils/formatSupport.d.ts +11 -0
  91. package/dist/utils/formatSupport.js +11 -0
  92. package/dist/utils/formatSupport.js.map +1 -1
  93. package/docs/PLUGIN-AUTHORING.md +4 -0
  94. package/docs/PLUGIN-GALLERY.md +61 -0
  95. package/docs/examples/plugins/release-readiness.mjs +26 -0
  96. package/docs/examples/plugins/release-readiness.projscan-plugin.json +8 -0
  97. package/docs/examples/plugins/security-radar.mjs +50 -0
  98. package/docs/examples/plugins/security-radar.projscan-plugin.json +8 -0
  99. package/package.json +5 -4
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/v2.2.0/docs/GUIDE.md) · [Roadmap](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/ROADMAP.md)
12
+ [AI Agent Quick Start](#ai-agent-integration-mcp) · [CLI Quick Start](#quick-start) · [Commands](#commands) · [Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/GUIDE.md) · [Roadmap](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/ROADMAP.md)
13
13
 
14
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.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="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/projscan-reporter-plugin.png" alt="projscan reporter plugin running in a macOS-style terminal window with a team health summary" width="700">
15
15
 
16
16
  </div>
17
17
 
@@ -33,7 +33,7 @@ Humans get the same thing through the CLI.
33
33
  npx projscan
34
34
  ```
35
35
 
36
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.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/v2.9.0/docs/projscan-reporter-plugin.gif" alt="projscan doctor rendered through a local reporter plugin in a macOS-style terminal window" width="700">
37
37
 
38
38
  Run `projscan doctor` for a focused health check:
39
39
 
@@ -41,7 +41,7 @@ Run `projscan doctor` for a focused health check:
41
41
  npx projscan doctor
42
42
  ```
43
43
 
44
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
44
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
45
45
 
46
46
  ## Install
47
47
 
@@ -61,6 +61,17 @@ Run inside any repository:
61
61
 
62
62
  ```bash
63
63
  projscan # Full project analysis
64
+ projscan first-run # First-run setup diagnostics for CLI + MCP
65
+ projscan init mcp --client all # Ready-to-paste MCP client configs
66
+ projscan recipes # Agent workflow recipes
67
+ projscan workplan --mode bug_hunt # Prioritized agent execution plan
68
+ projscan bug-hunt --format json # Bug-hunt fix queue with verification commands
69
+ projscan agent-brief --intent bug_hunt # Compact next-agent context packet
70
+ projscan quality-scorecard --format json # Dimensioned quality view
71
+ projscan release-train --format json # Product readiness plan
72
+ projscan evidence-pack --website-prompt # Approval packet with product evidence
73
+ projscan regression-plan --level full # Risk-based verification matrix
74
+ projscan handoff # Concise next-agent handoff
64
75
  projscan preflight --format json # Agent safety gate with supply-chain evidence
65
76
  projscan doctor # Health check, including security and supply-chain risks
66
77
  projscan hotspots # Rank files by risk (churn × complexity × issues × ownership)
@@ -84,15 +95,26 @@ projscan plugin test .projscan-plugins/policy.projscan-plugin.json
84
95
  PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor --reporter team-radar
85
96
  ```
86
97
 
87
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
98
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
88
99
 
89
- For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/GUIDE.md)**.
100
+ For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/GUIDE.md)**.
90
101
 
91
102
  ## Commands
92
103
 
93
104
  | Command | Description |
94
105
  |---------|-------------|
95
106
  | `projscan analyze` | Full analysis - languages, frameworks, dependencies, issues |
107
+ | `projscan first-run` | First-run setup diagnostics for Node, Git, config, plugins, and MCP startup |
108
+ | `projscan init mcp` | Ready-to-paste MCP client configs for popular agent clients |
109
+ | `projscan recipes` | Agent workflow recipes for before edit, bug hunt, approval, handoff, and pre-merge |
110
+ | `projscan workplan` | Agent execution plan - prioritized tasks with evidence, tools, verification, and handoff text |
111
+ | `projscan bug-hunt` | Prioritized bug-hunt fix queue from doctor, preflight, hotspot, and session evidence |
112
+ | `projscan agent-brief` | Compact next-agent context packet with focus items, guardrails, repo context, and next actions |
113
+ | `projscan quality-scorecard` | Dimensioned quality view with health, security, tests, maintainability, coordination, and top risks |
114
+ | `projscan release-train` | Plan upcoming product lines with readiness evidence |
115
+ | `projscan evidence-pack` | Assemble approval evidence from planning, bug-hunt, workplan, and preflight signals |
116
+ | `projscan regression-plan` | Build a smoke, focused, or full regression matrix from product risk signals |
117
+ | `projscan handoff` | Concise next-agent handoff from the current workplan |
96
118
  | `projscan doctor` | Health check - missing tooling, architecture smells, security and supply-chain risks |
97
119
  | `projscan preflight` | Agent safety gate - `proceed`, `caution`, or `block` with health, change, plugin, and supply-chain evidence |
98
120
  | `projscan hotspots` | Rank files by risk - churn × complexity × issues × ownership |
@@ -129,31 +151,31 @@ projscan --help
129
151
  <details>
130
152
  <summary><strong>projscan structure</strong> - Directory tree with file counts</summary>
131
153
 
132
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
154
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
133
155
  </details>
134
156
 
135
157
  <details>
136
158
  <summary><strong>projscan diagram</strong> - Architecture visualization</summary>
137
159
 
138
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
160
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
139
161
  </details>
140
162
 
141
163
  <details>
142
164
  <summary><strong>projscan dependencies</strong> - Dependency analysis</summary>
143
165
 
144
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
166
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
145
167
  </details>
146
168
 
147
169
  <details>
148
170
  <summary><strong>projscan explain</strong> - File explanation</summary>
149
171
 
150
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20explain.gif" alt="npx projscan explain" width="700">
172
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20explain.gif" alt="npx projscan explain" width="700">
151
173
  </details>
152
174
 
153
175
  <details>
154
176
  <summary><strong>projscan badge</strong> - Health badge generation</summary>
155
177
 
156
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
178
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
157
179
  </details>
158
180
 
159
181
  ### Output Formats
@@ -175,7 +197,7 @@ Run `projscan help` for the generated command-by-command support matrix.
175
197
 
176
198
  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.
177
199
 
178
- **2.0 upgrade notes:** migrating from 1.x or authoring plugins? Start with the [2.0 Migration Guide](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/PLUGIN-AUTHORING.md) and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/plugin.schema.json) as the stable contract.
200
+ **2.0 upgrade notes:** migrating from 1.x or authoring plugins? Start with the [2.0 Migration Guide](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/PLUGIN-AUTHORING.md), the [Plugin Gallery](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/PLUGIN-GALLERY.md), and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/plugin.schema.json) as the stable contract.
179
201
 
180
202
  ```bash
181
203
  projscan plugin list
@@ -184,9 +206,9 @@ PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor --reporter team-radar
184
206
  PROJSCAN_PLUGINS_PREVIEW=1 projscan ci --reporter team-radar --min-score 80
185
207
  ```
186
208
 
187
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
209
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
188
210
 
189
- 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/v2.2.0/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
211
+ 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/v2.9.0/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
190
212
 
191
213
  ### Options
192
214
 
@@ -347,7 +369,7 @@ If you read projscan's [Socket report](https://socket.dev/npm/package/projscan),
347
369
  ### Audit it yourself
348
370
 
349
371
  - **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.
350
- - **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/v2.2.0/docs/STABILITY.md).
372
+ - **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/v2.9.0/docs/STABILITY.md).
351
373
  - **Run it offline:** `npm install -g projscan` followed by anything except `audit` and `--mode semantic` works without network.
352
374
  - **Drop privilege further:** in CI, run projscan in a sandbox that disallows network egress; everything except `audit` will pass.
353
375
 
@@ -385,7 +407,7 @@ projscan ci --changed-only # Gate only on this PR's diff
385
407
  projscan ci --format sarif > projscan.sarif # SARIF for Code Scanning
386
408
  ```
387
409
 
388
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
410
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
389
411
 
390
412
  ### GitHub Action (recommended)
391
413
 
@@ -454,7 +476,7 @@ Fields:
454
476
  - `hotspots.limit` / `hotspots.since` - defaults for the `hotspots` command
455
477
  - `monorepo.importPolicy` - cross-package import allow/deny rules in monorepos *(0.14+)*
456
478
 
457
- See [`docs/GUIDE.md` → Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
479
+ See [`docs/GUIDE.md` → Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
458
480
 
459
481
  ## Tracking Health Over Time
460
482
 
@@ -467,7 +489,7 @@ projscan diff # Compare against baseline
467
489
  projscan diff --format markdown # Markdown diff for PRs
468
490
  ```
469
491
 
470
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.0/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
492
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.0/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
471
493
 
472
494
  ## Hotspots - Where to Fix First
473
495
 
@@ -556,7 +578,7 @@ Coverage is also automatically joined into `projscan hotspots` when one of those
556
578
 
557
579
  **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.
558
580
 
559
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.2.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">
581
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v2.9.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">
560
582
 
561
583
  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.
562
584
 
@@ -689,8 +711,16 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
689
711
  - *"What are the scariest untested files?"* → `projscan_coverage`
690
712
  - *"What breaks if I bump chalk to 6?"* → `projscan_upgrade { package: "chalk" }`
691
713
  - *"Where should I refactor first?"* → `projscan_hotspots`
714
+ - *"What should my agent do next?"* → `projscan_workplan { mode: "bug_hunt" }`
715
+ - *"Give the next agent a compact brief."* → `projscan_agent_brief { intent: "bug_hunt" }`
716
+ - *"Show the product quality picture."* → `projscan_quality_scorecard`
717
+ - *"What should I fix before a big release?"* → `projscan_bug_hunt`
718
+ - *"What evidence do I need before approval?"* → `projscan_evidence_pack { website_prompt: true }`
719
+ - *"Which checks prove this bigger product update?"* → `projscan_regression_plan { level: "full" }`
720
+ - *"How do I plan the next six product lines?"* → `projscan_release_train`
721
+ - *"How do I wire projscan into this MCP client?"* → `projscan_adoption { action: "mcp_config", client: "codex" }`
692
722
 
693
- ### The 28 MCP tools
723
+ ### The 37 MCP tools
694
724
 
695
725
  **Structural (0.6.0 / 0.11 / 0.13 / 0.14 / 0.15 - agent-native):**
696
726
  - **`projscan_graph`** - query the AST-based code graph. Directions: `imports`, `exports`, `importers`, `symbol_defs`, `package_importers`. Millisecond responses on a warm cache.
@@ -698,6 +728,14 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
698
728
  - **`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`.
699
729
  - **`projscan_pr_diff`** *(0.11)* - structural diff between two git refs. Returns added/removed/modified files with explicit lists of exports, imports, and call sites that changed, plus ΔCC and Δfan-in.
700
730
  - **`projscan_review`** *(0.13)* - one-call PR review. Composes `pr_diff` + per-changed-file risk + new/expanded import cycles + risky function additions + dependency changes + a verdict (`ok` / `review` / `block`).
731
+ - **`projscan_workplan`** *(2.3)* - agent mission-control plan. Composes preflight, review, session, hotspot, plugin, and supply-chain evidence into prioritized tasks with verification commands and handoff text.
732
+ - **`projscan_bug_hunt`** *(2.3)* - ranked bug-hunt queue. Composes doctor issues, preflight, hotspots, and session coordination into fix targets with verification commands.
733
+ - **`projscan_release_train`** *(2.3)* - product-line readiness planner. Reads version, scope, readiness evidence, and next actions.
734
+ - **`projscan_evidence_pack`** *(2.3)* - approval packet. Composes planning, bug-hunt, workplan, preflight, changelog, and optional website prompt evidence.
735
+ - **`projscan_regression_plan`** *(2.3)* - smoke/focused/full regression matrix. Turns bug-hunt, preflight, and product risk into deduplicated verification commands.
736
+ - **`projscan_agent_brief`** *(2.3)* - compact next-agent context packet with focus items, repo context, guardrails, and suggested next actions.
737
+ - **`projscan_quality_scorecard`** *(2.3)* - dimensioned quality view across health, security, tests, maintainability, coordination, top risks, and verification commands.
738
+ - **`projscan_adoption`** *(2.9)* - adoption helper for MCP config snippets, workflow recipes, and first-run diagnostics.
701
739
  - **`projscan_fix_suggest`** *(0.14)* - structured action prompt for any open issue: headline, why it matters, where, one-paragraph instruction, optional suggested test. Closes the diagnose → fix loop.
702
740
  - **`projscan_explain_issue`** *(0.14)* - deep dive on one issue: code excerpt, related issues in the same file, similar past commits via `git log --grep`, plus the structured FixSuggestion.
703
741
  - **`projscan_impact`** *(0.15)* - transitive blast-radius for a file or symbol. BFS over reverse imports + symbol callsites. Use BEFORE renaming or deleting to see what breaks.
@@ -731,7 +769,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
731
769
  - **`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`.
732
770
  - **`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**.
733
771
 
734
- For analyzer and reporter plugin authoring, manifest validation, `--reporter <name>`, and the trust model, see [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v2.2.0/docs/PLUGIN-AUTHORING.md).
772
+ For analyzer and reporter plugin authoring, manifest validation, `--reporter <name>`, and the trust model, see [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v2.9.0/docs/PLUGIN-AUTHORING.md).
735
773
 
736
774
  ### Context-window budgeting
737
775
 
@@ -0,0 +1 @@
1
+ export declare function registerAgentBrief(): void;
@@ -0,0 +1,68 @@
1
+ import chalk from 'chalk';
2
+ import { assertFormatSupported, getRootPath, maybeCompactBanner, program, setupLogLevel, } from '../_shared.js';
3
+ import { computeAgentBrief } from '../../core/agentBrief.js';
4
+ const INTENTS = ['next_agent', 'bug_hunt', 'release', 'refactor', 'hardening'];
5
+ export function registerAgentBrief() {
6
+ program
7
+ .command('agent-brief')
8
+ .description('Create a compact next-agent context packet with focus items and guardrails')
9
+ .option('--intent <intent>', 'next_agent, bug_hunt, release, refactor, or hardening', 'next_agent')
10
+ .option('--max-items <count>', 'maximum focus items to return', parsePositiveInt)
11
+ .action(async (cmdOpts) => {
12
+ setupLogLevel();
13
+ maybeCompactBanner();
14
+ const format = assertFormatSupported('agent-brief');
15
+ const intent = parseIntent(cmdOpts.intent);
16
+ try {
17
+ const report = await computeAgentBrief(getRootPath(), {
18
+ intent,
19
+ maxItems: cmdOpts.maxItems,
20
+ });
21
+ if (format === 'json') {
22
+ console.log(JSON.stringify(report, null, 2));
23
+ return;
24
+ }
25
+ printAgentBrief(report);
26
+ }
27
+ catch (err) {
28
+ console.error(chalk.red(err instanceof Error ? err.message : String(err)));
29
+ process.exit(1);
30
+ }
31
+ });
32
+ }
33
+ function printAgentBrief(report) {
34
+ console.log(chalk.bold(`Agent Brief: ${report.intent}`));
35
+ console.log(report.summary);
36
+ console.log('');
37
+ console.log(chalk.bold('Focus'));
38
+ for (const item of report.focus) {
39
+ printFocusItem(item);
40
+ }
41
+ console.log('');
42
+ console.log(chalk.bold('Guardrails'));
43
+ for (const guardrail of report.guardrails) {
44
+ console.log(`- ${guardrail.label}: ${guardrail.command}`);
45
+ }
46
+ }
47
+ function printFocusItem(item) {
48
+ const files = item.files.length > 0 ? ` (${item.files.join(', ')})` : '';
49
+ console.log(`- ${chalk.bold(`[${item.priority}] ${item.title}`)}${files}`);
50
+ console.log(` ${item.why}`);
51
+ console.log(` run: ${item.commands.join(' && ')}`);
52
+ }
53
+ function parseIntent(value) {
54
+ if (typeof value === 'string' && INTENTS.includes(value)) {
55
+ return value;
56
+ }
57
+ console.error(chalk.red(`Unsupported --intent ${String(value)}.`));
58
+ console.error(chalk.dim('Supported intents: next_agent, bug_hunt, release, refactor, hardening'));
59
+ process.exit(1);
60
+ }
61
+ function parsePositiveInt(value) {
62
+ const parsed = Number.parseInt(value, 10);
63
+ if (!Number.isFinite(parsed) || parsed <= 0) {
64
+ throw new Error('value must be a positive integer');
65
+ }
66
+ return parsed;
67
+ }
68
+ //# sourceMappingURL=agentBrief.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentBrief.js","sourceRoot":"","sources":["../../../src/cli/commands/agentBrief.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,MAAM,OAAO,GAAgC,CAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;AAE5G,MAAM,UAAU,kBAAkB;IAChC,OAAO;SACJ,OAAO,CAAC,aAAa,CAAC;SACtB,WAAW,CAAC,4EAA4E,CAAC;SACzF,MAAM,CAAC,mBAAmB,EAAE,uDAAuD,EAAE,YAAY,CAAC;SAClG,MAAM,CAAC,qBAAqB,EAAE,+BAA+B,EAAE,gBAAgB,CAAC;SAChF,MAAM,CAAC,KAAK,E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AAC,uEAAuE,CAAC,CAAC,CAAC;IAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa;IACrC,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC1C,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function registerBugHunt(): void;
@@ -0,0 +1,59 @@
1
+ import chalk from 'chalk';
2
+ import { assertFormatSupported, getRootPath, maybeCompactBanner, program, setupLogLevel, } from '../_shared.js';
3
+ import { computeBugHunt } from '../../core/bugHunt.js';
4
+ export function registerBugHunt() {
5
+ program
6
+ .command('bug-hunt')
7
+ .description('Prioritize a bug-hunt fix queue from repo health, hotspots, preflight, and session evidence')
8
+ .option('--max-findings <count>', 'maximum number of findings to return', parsePositiveInt)
9
+ .option('--since <when>', 'git history window for hotspot evidence')
10
+ .action(async (cmdOpts) => {
11
+ setupLogLevel();
12
+ maybeCompactBanner();
13
+ const format = assertFormatSupported('bug-hunt');
14
+ try {
15
+ const report = await computeBugHunt(getRootPath(), {
16
+ maxFindings: cmdOpts.maxFindings,
17
+ since: cmdOpts.since,
18
+ });
19
+ if (format === 'json') {
20
+ console.log(JSON.stringify(report, null, 2));
21
+ return;
22
+ }
23
+ printBugHunt(report);
24
+ }
25
+ catch (err) {
26
+ console.error(chalk.red(err instanceof Error ? err.message : String(err)));
27
+ process.exit(1);
28
+ }
29
+ });
30
+ }
31
+ function printBugHunt(report) {
32
+ const color = report.verdict === 'block' ? chalk.red : report.verdict === 'fix' ? chalk.yellow : chalk.green;
33
+ console.log(color(`Bug Hunt: ${report.verdict}`));
34
+ console.log(report.summary);
35
+ console.log('');
36
+ console.log(chalk.bold('Fix Queue'));
37
+ for (const finding of report.fixQueue) {
38
+ printFinding(finding);
39
+ }
40
+ console.log('');
41
+ console.log(chalk.bold('Verify'));
42
+ for (const entry of report.verificationMatrix) {
43
+ console.log(`- ${entry.command}`);
44
+ }
45
+ }
46
+ function printFinding(finding) {
47
+ const files = finding.files.length > 0 ? ` (${finding.files.join(', ')})` : '';
48
+ console.log(`- ${chalk.bold(`[${finding.priority}] ${finding.title}`)}${files}`);
49
+ console.log(` ${finding.why}`);
50
+ console.log(` verify: ${finding.verification.commands.join(' && ')}`);
51
+ }
52
+ function parsePositiveInt(value) {
53
+ const parsed = Number.parseInt(value, 10);
54
+ if (!Number.isFinite(parsed) || parsed <= 0) {
55
+ throw new Error('value must be a positive integer');
56
+ }
57
+ return parsed;
58
+ }
59
+ //# sourceMappingURL=bugHunt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bugHunt.js","sourceRoot":"","sources":["../../../src/cli/commands/bugHunt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,MAAM,UAAU,eAAe;IAC7B,OAAO;SACJ,OAAO,CAAC,UAAU,CAAC;SACnB,WAAW,CAAC,6FAA6F,CAAC;SAC1G,MAAM,CAAC,wBAAwB,EAAE,sCAAsC,EAAE,gBAAgB,CAAC;SAC1F,MAAM,CAAC,gBAAgB,EAAE,yCAAyC,CAAC;SACnE,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,aAAa,EAAE,CAAC;QAChB,kBAAkB,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,qBAAqB,CAAC,UAAU,CAAC,CAAC;QAEjD,IAAI,CAAC;YACH,MAAM,M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idencePack(): void;
@@ -0,0 +1,70 @@
1
+ import chalk from 'chalk';
2
+ import { assertFormatSupported, getRootPath, maybeCompactBanner, program, setupLogLevel, } from '../_shared.js';
3
+ import { computeEvidencePack } from '../../core/releaseEvidence.js';
4
+ export function registerEvidencePack() {
5
+ program
6
+ .command('evidence-pack')
7
+ .description('Assemble approval evidence from product planning, bug-hunt, workplan, and preflight signals')
8
+ .option('--line <line>', 'product line to include, repeatable (default: next six minor lines)', collectLine, [])
9
+ .option('--website-prompt', 'include website-update prompt text')
10
+ .option('--max-findings <count>', 'maximum bug-hunt findings to include', parsePositiveInt)
11
+ .action(async (cmdOpts) => {
12
+ setupLogLevel();
13
+ maybeCompactBanner();
14
+ const format = assertFormatSupported('evidence-pack');
15
+ try {
16
+ const report = await computeEvidencePack(getRootPath(), {
17
+ lines: cmdOpts.line,
18
+ includeWebsitePrompt: cmdOpts.websitePrompt === true,
19
+ maxFindings: cmdOpts.maxFindings,
20
+ });
21
+ if (format === 'json') {
22
+ console.log(JSON.stringify(report, null, 2));
23
+ return;
24
+ }
25
+ printEvidencePack(report);
26
+ }
27
+ catch (err) {
28
+ console.error(chalk.red(err instanceof Error ? err.message : String(err)));
29
+ process.exit(1);
30
+ }
31
+ });
32
+ }
33
+ function collectLine(value, previous) {
34
+ return [...previous, value];
35
+ }
36
+ function printEvidencePack(report) {
37
+ const color = report.verdict === 'blocked'
38
+ ? chalk.red
39
+ : report.verdict === 'caution'
40
+ ? chalk.yellow
41
+ : chalk.green;
42
+ console.log(color(`Evidence Pack: ${report.verdict}`));
43
+ console.log(report.summary);
44
+ console.log(`Version: ${report.currentVersion ?? 'unknown'}`);
45
+ console.log(`Product lines: ${report.train.lines.join(', ')}`);
46
+ console.log('');
47
+ console.log(chalk.bold('Artifacts'));
48
+ for (const artifact of report.artifacts) {
49
+ printArtifact(artifact);
50
+ }
51
+ console.log('');
52
+ console.log(chalk.bold('Approval'));
53
+ console.log(`- ${report.approval.recommendation}`);
54
+ for (const reason of report.approval.blockingReasons.slice(0, 5)) {
55
+ console.log(`- blocker: ${reason}`);
56
+ }
57
+ }
58
+ function printArtifact(artifact) {
59
+ console.log(`- ${chalk.bold(`[${artifact.status}] ${artifact.title}`)}`);
60
+ console.log(` ${artifact.summary}`);
61
+ console.log(` verify: ${artifact.commands.join(' && ')}`);
62
+ }
63
+ function parsePositiveInt(value) {
64
+ const parsed = Number.parseInt(value, 10);
65
+ if (!Number.isFinite(parsed) || parsed <= 0) {
66
+ throw new Error('value must be a positive integer');
67
+ }
68
+ return parsed;
69
+ }
70
+ //# sourceMappingURL=evidencePack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidencePack.js","sourceRoot":"","sources":["../../../src/cli/commands/evidencePack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,aAAa,GACd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGpE,MAAM,UAAU,oBAAoB;IAClC,OAAO;SACJ,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,6FAA6F,CAAC;SAC1G,MAAM,CAAC,eAAe,EAAE,qEAAqE,EAAE,WAAW,EAAE,EAAE,CAAC;SAC/G,MAAM,CAAC,kBAAkB,EAAE,oCAAoC,CAAC;SAChE,MAAM,CAAC,wBAAwB,EAAE,sCAAsC,EAAE,gBAAgB,CAAC;SAC1F,MAAM,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QACxB,aAAa,EAAE,CAAC;QAChB,kBAAkB,EAAE,CAAC;QACrB,MAAM,MAAM,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;QAEtD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,WAAW,EAAE,EAAE;gBACtD,KAAK,EAAE,OAAO,CAAC,IAAI;gBACnB,oBAAoB,EAA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AAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,IAAI,CAAC,EAAE,CAAC;QAC5C,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -2,13 +2,14 @@ import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import chalk from 'chalk';
4
4
  import { program, getRootPath, setupLogLevel, maybeCompactBanner, assertFormatSupported } from '../_shared.js';
5
+ import { getMcpConfigGuide, isMcpClientId, MCP_CLIENT_IDS } from '../../core/adoption.js';
5
6
  /**
6
7
  * `projscan init` (1.6+) — scaffold `.projscanrc.json` for new
7
8
  * adopters. Idempotent: if the config already exists, prints a diff
8
9
  * against the suggested defaults instead of overwriting.
9
10
  */
10
11
  export function registerInit() {
11
- program
12
+ const init = program
12
13
  .command('init')
13
14
  .description('Scaffold .projscanrc.json with sensible defaults (1.6+)')
14
15
  .option('--force', 'overwrite an existing .projscanrc.json (default: refuse)')
@@ -25,6 +26,27 @@ export function registerInit() {
25
26
  process.exit(1);
26
27
  }
27
28
  });
29
+ init
30
+ .command('mcp')
31
+ .description('Print ready-to-paste MCP client config snippets')
32
+ .option('--client <client>', `client: ${MCP_CLIENT_IDS.join(', ')}`, 'all')
33
+ .action(async (opts) => {
34
+ setupLogLevel();
35
+ maybeCompactBanner();
36
+ const format = assertFormatSupported('init mcp');
37
+ const client = opts.client ?? 'all';
38
+ if (!isMcpClientId(client)) {
39
+ console.error(chalk.red(`Unsupported --client ${client}.`));
40
+ console.error(chalk.dim(`Supported clients: ${MCP_CLIENT_IDS.join(', ')}`));
41
+ process.exit(1);
42
+ }
43
+ const guide = getMcpConfigGuide(client);
44
+ if (format === 'json') {
45
+ console.log(JSON.stringify(guide, null, 2));
46
+ return;
47
+ }
48
+ printMcpGuide(guide);
49
+ });
28
50
  }
29
51
  const DEFAULT_CONFIG = {
30
52
  minScore: 70,
@@ -68,4 +90,27 @@ function prefixIndent(text, indent) {
68
90
  .map((l) => indent + l)
69
91
  .join('\n');
70
92
  }
93
+ function printMcpGuide(guide) {
94
+ console.log('');
95
+ console.log(chalk.bold('MCP Client Config'));
96
+ console.log(chalk.dim('────────────────────────────────────────'));
97
+ console.log(` install: ${chalk.cyan(guide.install.command)}`);
98
+ console.log(` server : ${chalk.cyan(guide.install.mcpServerCommand)}`);
99
+ console.log('');
100
+ if (guide.client === 'all') {
101
+ for (const config of guide.configs)
102
+ printSingleGuide(config);
103
+ return;
104
+ }
105
+ printSingleGuide(guide);
106
+ }
107
+ function printSingleGuide(guide) {
108
+ console.log(chalk.bold(` ${guide.displayName}`));
109
+ console.log(chalk.dim(` ${guide.whereToPaste}`));
110
+ console.log(prefixIndent(guide.configText, ' '));
111
+ if (guide.notes.length > 0) {
112
+ console.log(chalk.dim(` note: ${guide.notes.join(' ')}`));
113
+ }
114
+ console.log('');
115
+ }
71
116
  //# sourceMappingURL=init.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE/G;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO;SACJ,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,yDAAyD,CAAC;SACtE,MAAM,CAAC,SAAS,EAAE,0DAA0D,CAAC;SAC7E,MAAM,CAAC,KAAK,EAAE,IAAyB,EAAE,EAAE;QAC1C,aAAa,EAAE,CAAC;QAChB,kBAAkB,EAAE,CAAC;QACrB,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC9B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;QAC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CAAC,CAAC,CAAC;IAClD,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,IAAI,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;AAClB,CAAC"}
@@ -61,6 +61,20 @@ function printConsoleReport(report) {
61
61
  : chalk.green;
62
62
  console.log(color(`Preflight: ${report.verdict}`));
63
63
  console.log(report.summary);
64
+ if (report.requiredChecks.length > 0) {
65
+ console.log('');
66
+ console.log(chalk.bold('Required checks'));
67
+ for (const check of report.requiredChecks) {
68
+ const statusColor = check.status === 'fail'
69
+ ? chalk.red
70
+ : check.status === 'warn'
71
+ ? chalk.yellow
72
+ : check.status === 'pass'
73
+ ? chalk.green
74
+ : chalk.dim;
75
+ console.log(`- ${check.name}: ${statusColor(check.status)} ${chalk.dim(check.reason)}`);
76
+ }
77
+ }
64
78
  if (report.reasons.length > 0) {
65
79
  console.log('');
66
80
  console.log(chalk.bold('Reasons'));
@@ -76,5 +90,7 @@ function printConsoleReport(report) {
76
90
  console.log(`- ${action.command ?? action.tool ?? action.label}`);
77
91
  }
78
92
  }
93
+ console.log('');
94
+ console.log(chalk.dim('For agent workflows, run `projscan workplan --mode before_edit --format json` or `projscan recipes`.'));
79
95
  }
80
96
  //# sourceMappingURL=preflight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"preflight.js","sourceRoot":"","sources":["../../../src/cli/commands/preflight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,kBAAkB,EAClB,OAAO,EACP,a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