projscan 4.1.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +192 -26
- package/dist/cli/commands/missionProof.d.ts +1 -0
- package/dist/cli/commands/missionProof.js +60 -0
- package/dist/cli/commands/missionProof.js.map +1 -0
- package/dist/cli/commands/start.js +1040 -2
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/missionOutcome.d.ts +2 -0
- package/dist/core/missionOutcome.js +219 -0
- package/dist/core/missionOutcome.js.map +1 -0
- package/dist/core/missionProof.d.ts +6 -0
- package/dist/core/missionProof.js +123 -0
- package/dist/core/missionProof.js.map +1 -0
- package/dist/core/start.d.ts +1 -0
- package/dist/core/start.js +1051 -9
- package/dist/core/start.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools/start.js +5 -0
- package/dist/mcp/tools/start.js.map +1 -1
- package/dist/projscan-sbom.cdx.json +6 -6
- package/dist/tool-manifest.json +6 -2
- package/dist/types.d.ts +283 -0
- package/dist/utils/formatSupport.d.ts +1 -0
- package/dist/utils/formatSupport.js +1 -0
- package/dist/utils/formatSupport.js.map +1 -1
- package/docs/GUIDE.md +3 -1
- package/docs/demos/projscan-4-1-demo.html +95 -82
- package/docs/projscan-mission-control.png +0 -0
- package/docs/projscan-proof-router.png +0 -0
- package/package.json +2 -2
- package/scripts/capture-readme-assets.mjs +1 -1
package/README.md
CHANGED
|
@@ -33,17 +33,16 @@ 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/v4.
|
|
36
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.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
|
-
## What's New in 4.
|
|
38
|
+
## What's New in 4.3.0
|
|
39
39
|
|
|
40
|
-
4.
|
|
40
|
+
4.3.0 closes the Mission Control loop. Agents can save a mission, run proof, resume from the saved proof state, and report whether the work is ready for a version review without uploading source.
|
|
41
41
|
|
|
42
|
-
- **Mission
|
|
43
|
-
- **
|
|
44
|
-
- **
|
|
45
|
-
- **
|
|
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.
|
|
42
|
+
- **Mission outcome resume.** `projscan start --mission <dir>` reads a saved Mission Control bundle, includes the latest proof status from `proof-logs/summary.json`, and adds a resume prompt that starts from real pass/fail evidence.
|
|
43
|
+
- **Proof-to-review summary.** The start report now includes `missionControl.outcome`: what changed, what remains, failed command details, reviewer decisions, reruns, and a version-candidate recommendation.
|
|
44
|
+
- **Local adoption proof.** `projscan mission-proof --mission <dir> --format json` summarizes one or more mission bundles, then compares them with an optional manual baseline to estimate reruns avoided, failed gates caught, and developer time saved.
|
|
45
|
+
- **Clear public language count.** projscan now describes language support as 11 AST adapters covering 12 named languages, matching README, website prompt, and MCP Registry copy.
|
|
47
46
|
|
|
48
47
|
<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
48
|
|
|
@@ -53,13 +52,159 @@ Regenerate the README screenshots with Playwright:
|
|
|
53
52
|
npm run docs:screenshots
|
|
54
53
|
```
|
|
55
54
|
|
|
55
|
+
## Mission Execution Plan + Copyable Handoffs
|
|
56
|
+
|
|
57
|
+
`projscan start --intent "<goal>"` gives agents an execution plan with ordered phases, ready commands, blocked inputs, follow-ups, proof, and done criteria. The cursor points to the next useful step and includes MCP `tool` / `args` when projscan can call it directly.
|
|
58
|
+
|
|
59
|
+
Projscan also returns a Markdown runbook, a task card, a review gate, and a resume object. A resumed agent gets the current command, the MCP tool call, placeholder bindings, follow-up templates, the ordered checklist, and the remaining proof queue without walking the full plan. MCP and JSON clients can read `missionControl.taskCard.markdown`, the same Markdown printed by `--task-card` and written to `task-card.md`. They can also read `missionControl.reviewGate.markdown` to know when to stop, report proof, and wait for approval before starting another slice, release, publish, or deploy. `missionControl.reviewGate.worktree` adds the current worktree evidence summary and visible changed files, so review handoffs keep the state projscan computed for the start report. `missionControl.reviewGate.proof` carries the remaining proof queue with commands, MCP calls, and structured proof items for review-only handoffs. `missionControl.reviewGate.doneWhen` mirrors the mission success criteria, so review-only handoffs show the approval target beside proof and worktree evidence. `missionControl.reviewGate.policy` lists the actions blocked until explicit reviewer approval: another slice, release, publish, deploy, push, merge, and version bump. `--review-gate-json` and saved `review-gate.json` expose the full review packet without requiring callers to parse the full handoff. `--review-policy` and saved `review-policy.json` expose only the approval boundary. `missionControl.reviewGate.decisions` gives the reviewer the allowed next choices and copyable reply text: approve another slice, request changes, or review a version candidate without publishing; the same menu appears in default console output, saved bundle README files, task cards, handoff prompts, and runbook Markdown. `--review-replies` and saved `review-replies.txt` print only those reply lines when a reviewer wants the smallest approval surface. The complete handoff object carries the same gate at `missionControl.handoff.reviewGate`, so `--handoff-json` and saved `handoff.json` include the stop boundary.
|
|
60
|
+
|
|
61
|
+
Use the index when you want the menu, or call one shortcut directly:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
projscan start --shortcuts --intent "<goal>" # Show the shortcut menu
|
|
65
|
+
projscan start --shortcuts-json --intent "<goal>" # Shortcut menu as JSON
|
|
66
|
+
projscan start --next-command --intent "<goal>" # Current shell command
|
|
67
|
+
projscan start --next-tool-call --intent "<goal>" # Current MCP call as compact JSON
|
|
68
|
+
projscan start --ready-tool-calls --intent "<goal>" # Current + proof MCP calls
|
|
69
|
+
projscan start --proof-commands --intent "<goal>" # Remaining proof commands
|
|
70
|
+
projscan start --checklist --intent "<goal>" # Ordered resume task card
|
|
71
|
+
projscan start --resume-json --intent "<goal>" # Structured resume object
|
|
72
|
+
projscan start --handoff-json --intent "<goal>" # Complete handoff object
|
|
73
|
+
projscan start --mission-script --intent "<goal>" # Shell script: current step + proof
|
|
74
|
+
projscan start --save-mission .projscan/mission --intent "<goal>" # Write bundle + quickstart
|
|
75
|
+
projscan start --task-card --intent "<goal>" # Paste-ready Markdown task card
|
|
76
|
+
projscan start --review-gate --intent "<goal>" # Stop-and-review gate
|
|
77
|
+
projscan start --review-gate-json --intent "<goal>" # Review gate JSON
|
|
78
|
+
projscan start --review-policy --intent "<goal>" # Review policy JSON
|
|
79
|
+
projscan start --review-replies --intent "<goal>" # Copy-only reviewer replies
|
|
80
|
+
projscan start --runbook --intent "<goal>" # Markdown mission runbook
|
|
81
|
+
projscan start --handoff-prompt --intent "<goal>" # One-line handoff prompt
|
|
82
|
+
projscan start --mission .projscan/mission # Resume from saved proof state
|
|
83
|
+
projscan mission-proof --mission .projscan/mission --format json # Local proof summary
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Saved mission bundles include `README.md`, `next-command.txt`, `next-tool-call.json`, `handoff-prompt.txt`, `resume-prompt.txt`, `task-card.md`, `review-gate.md`, `review-gate.json`, `review-policy.json`, `review-replies.txt`, the Markdown runbook, structured handoff/resume JSON, `ready-tool-calls.json`, `shortcuts.json`, `mission.sh`, `status.sh`, `review.sh`, `proof-logs/README.md`, `proof-logs/status.jsonl`, `proof-logs/run-report.md`, `proof-logs/summary.json`, proof commands, and a manifest. The saved bundle README starts with quick commands for `./mission.sh`, `./status.sh`, and `./review.sh`; `manifest.json` exposes the same quick commands under `quickCommands` for agents and JSON clients. Running saved `mission.sh` writes current and proof command output under `proof-logs/`, appends exit codes to `status.jsonl`, refreshes `run-report.md` for review, and writes the latest run state plus next action to `summary.json` for agents. Run `./status.sh` from the bundle to print the latest mission state and next action; it exits `0` for passed, `1` for failed, and `2` for not-run or running states. Run `./review.sh` from the bundle to print the status, review gate, run report, evidence command checklist, and reviewer replies in one terminal view.
|
|
87
|
+
|
|
88
|
+
When work resumes, point start at the saved bundle:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
projscan start --mission .projscan/mission
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`projscan start` reads `proof-logs/summary.json`, `proof-logs/status.jsonl`, and local review decision files. The report tells the next agent what changed, what remains, which command failed if proof did not pass, and whether the bundle is ready for a version-candidate review. For a local measurement report, run:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
projscan mission-proof --mission .projscan/mission --baseline manual-runs.json --format json
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The baseline file is optional. When present, it can list manual runs with minutes spent, reruns, failed gates, and reviewer approvals; projscan compares that local baseline with Mission Control proof without uploading source.
|
|
101
|
+
|
|
102
|
+
Default console output shows the same sections inline: `Run Cursor`, `Resume Checklist`, `Handoff Prompt`, `Ready Proof`, and `Proof Queue`. The proof views use the resume-aware remaining queue, so projscan does not repeat the current cursor command as proof.
|
|
103
|
+
|
|
104
|
+
Console output shows the same model for humans:
|
|
105
|
+
|
|
106
|
+
```text
|
|
107
|
+
Execution Plan
|
|
108
|
+
Run 1 ready step, resolve 2 input(s), then gather 4 proof command(s).
|
|
109
|
+
- [ready] Next Action
|
|
110
|
+
- Find exact target for impact analysis: projscan search "auth token loader" --format json
|
|
111
|
+
- [blocked] Resolve Inputs
|
|
112
|
+
- symbol: Replace <symbol-from-search> with an exported symbol returned by the search step.
|
|
113
|
+
- [pending] Follow Up
|
|
114
|
+
- If search returns an exported symbol: projscan impact --symbol <symbol-from-search> --format json
|
|
115
|
+
blocked by: input-1
|
|
116
|
+
Run Cursor
|
|
117
|
+
next: ready-1 in Ready Commands
|
|
118
|
+
command: projscan search "auth token loader" --format json
|
|
119
|
+
MCP call: projscan_search {"query":"auth token loader"}
|
|
120
|
+
unlocks: input-1, input-2
|
|
121
|
+
Resume Checklist
|
|
122
|
+
- [ready] run_current ready-1: projscan search "auth token loader" --format json (MCP: projscan_search {"query":"auth token loader"})
|
|
123
|
+
- [blocked] resolve_input input-1: <symbol-from-search> -> Replace <symbol-from-search> with an exported symbol returned by the search step.
|
|
124
|
+
- [blocked] run_follow_up follow-up-1: projscan impact --symbol <symbol-from-search> --format json (MCP: projscan_impact {"symbol":"<symbol-from-search>"})
|
|
125
|
+
- [ready] run_proof proof-2: projscan preflight --mode before_edit --format json (MCP: projscan_preflight {"mode":"before_edit"})
|
|
126
|
+
Handoff Prompt
|
|
127
|
+
Resume: Resume at ready-1 in ready_now: run `projscan search "auth token loader" --format json`. This can unlock input-1 (symbol), input-2 (file). Done when: An exact symbol or file path is selected from search results before impact analysis continues.
|
|
128
|
+
Ready Proof
|
|
129
|
+
Ready-to-run proof commands; placeholder follow-ups are excluded until Needs Input is resolved.
|
|
130
|
+
- projscan preflight --mode before_edit --format json
|
|
131
|
+
- projscan understand --view verify --format json
|
|
132
|
+
Proof Queue
|
|
133
|
+
- proof-2: projscan preflight --mode before_edit --format json (MCP: projscan_preflight {"mode":"before_edit"})
|
|
134
|
+
- proof-3: projscan understand --view verify --format json (MCP: projscan_understand {"view":"verify"})
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Runbook handoff example:
|
|
138
|
+
|
|
139
|
+
```text
|
|
140
|
+
Agent Runbook
|
|
141
|
+
# Mission Runbook
|
|
142
|
+
Intent: what breaks if I rename the auth token loader
|
|
143
|
+
Status: needs_attention
|
|
144
|
+
Current phase: ready_now
|
|
145
|
+
|
|
146
|
+
## Current Cursor
|
|
147
|
+
- Step: ready-1 in ready_now
|
|
148
|
+
- Command: `projscan search "auth token loader" --format json`
|
|
149
|
+
- MCP call: projscan_search {"query":"auth token loader"}
|
|
150
|
+
- Unlocks: input-1, input-2
|
|
151
|
+
|
|
152
|
+
## Resume
|
|
153
|
+
Run now:
|
|
154
|
+
```sh
|
|
155
|
+
projscan search "auth token loader" --format json
|
|
156
|
+
```
|
|
157
|
+
MCP call: projscan_search {"query":"auth token loader"}
|
|
158
|
+
After running, resolve:
|
|
159
|
+
- input-1 (symbol): Replace <symbol-from-search> with an exported symbol returned by the search step.
|
|
160
|
+
- input-2 (file): Replace <file-from-search> with a file path returned by the search step.
|
|
161
|
+
Template inputs:
|
|
162
|
+
- <symbol-from-search> -> input-1 (symbol): Replace <symbol-from-search> with an exported symbol returned by the search step.
|
|
163
|
+
- <file-from-search> -> input-2 (file): Replace <file-from-search> with a file path returned by the search step.
|
|
164
|
+
Resume checklist:
|
|
165
|
+
- [ready] run_current ready-1: projscan search "auth token loader" --format json (MCP: projscan_search {"query":"auth token loader"})
|
|
166
|
+
- [blocked] resolve_input input-1: <symbol-from-search> -> Replace <symbol-from-search> with an exported symbol returned by the search step.
|
|
167
|
+
- [ready] run_proof proof-2: projscan preflight --mode before_edit --format json (MCP: projscan_preflight {"mode":"before_edit"})
|
|
168
|
+
- [pending] confirm_done criterion-1: An exact symbol or file path is selected from search results before impact analysis continues.
|
|
169
|
+
Proof queue:
|
|
170
|
+
- proof-2: `projscan preflight --mode before_edit --format json` (MCP: projscan_preflight {"mode":"before_edit"})
|
|
171
|
+
- proof-3: `projscan understand --view verify --format json` (MCP: projscan_understand {"view":"verify"})
|
|
172
|
+
Remaining proof:
|
|
173
|
+
- `projscan preflight --mode before_edit --format json`
|
|
174
|
+
- `projscan understand --view verify --format json`
|
|
175
|
+
MCP proof calls:
|
|
176
|
+
- proof-2: projscan_preflight {"mode":"before_edit"}
|
|
177
|
+
- proof-3: projscan_understand {"view":"verify"}
|
|
178
|
+
Then use:
|
|
179
|
+
- follow-up-1 (If search returns an exported symbol): projscan impact --symbol <symbol-from-search> --format json
|
|
180
|
+
- follow-up-2 (If search returns a file path): projscan impact <file-from-search> --format json
|
|
181
|
+
Prompt: Resume at ready-1 in ready_now: run `projscan search "auth token loader" --format json`. This can unlock input-1 (symbol), input-2 (file).
|
|
182
|
+
|
|
183
|
+
## Handoff Prompt
|
|
184
|
+
Resume: Resume at ready-1 in ready_now: run `projscan search "auth token loader" --format json`. This can unlock input-1 (symbol), input-2 (file). Done when: An exact symbol or file path is selected from search results before impact analysis continues. Needs input: symbol=<symbol-from-search>, file=<file-from-search>. Ready proof: Ready-to-run proof commands; placeholder follow-ups are excluded until Needs Input is resolved. projscan preflight --mode before_edit --format json && projscan understand --view verify --format json.
|
|
185
|
+
|
|
186
|
+
## Review Gate
|
|
187
|
+
- [ ] Complete this task card and remaining proof.
|
|
188
|
+
- [ ] Capture `git status --short`.
|
|
189
|
+
- [ ] Capture `git diff --stat`.
|
|
190
|
+
- [ ] Stop and ask for approval before starting another slice, release, publish, or deploy.
|
|
191
|
+
|
|
192
|
+
Review the completed mission, proof output, and working-tree summary before approving another slice, release, publish, or deploy.
|
|
193
|
+
|
|
194
|
+
## Ready Commands
|
|
195
|
+
- `projscan search "auth token loader" --format json`
|
|
196
|
+
|
|
197
|
+
## Blocked Inputs
|
|
198
|
+
- symbol: Replace <symbol-from-search> with an exported symbol returned by the search step.
|
|
199
|
+
```
|
|
200
|
+
|
|
56
201
|
Run `projscan doctor` for a focused health check:
|
|
57
202
|
|
|
58
203
|
```bash
|
|
59
204
|
npx projscan doctor
|
|
60
205
|
```
|
|
61
206
|
|
|
62
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
207
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
|
|
63
208
|
|
|
64
209
|
## Install
|
|
65
210
|
|
|
@@ -392,9 +537,9 @@ npm run test:trust-smoke
|
|
|
392
537
|
|
|
393
538
|
The full command catalog is below. Most users should start with the five-command path above instead of scanning the catalog.
|
|
394
539
|
|
|
395
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
540
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
|
|
396
541
|
|
|
397
|
-
For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v4.
|
|
542
|
+
For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v4.3.0/docs/GUIDE.md)**.
|
|
398
543
|
|
|
399
544
|
## Repo Understanding
|
|
400
545
|
|
|
@@ -416,7 +561,8 @@ The report includes file/symbol-backed `claims`, `readFirst` files, entrypoints,
|
|
|
416
561
|
|---------|-------------|
|
|
417
562
|
| `projscan analyze` | Full analysis - languages, frameworks, dependencies, issues |
|
|
418
563
|
| `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 |
|
|
564
|
+
| `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, phased execution plan, ready actions, done criteria, and proof commands |
|
|
565
|
+
| `projscan mission-proof` | Summarize saved Mission Control proof, reviewer decisions, reruns, failed gates, and optional manual-baseline comparison |
|
|
420
566
|
| `projscan first-run` | First-run setup diagnostics plus the shared `firstTenMinutes` command path |
|
|
421
567
|
| `projscan init mcp` | Ready-to-paste MCP client configs for popular agent clients |
|
|
422
568
|
| `projscan mcp doctor` | Verify MCP setup and print paste-ready client config with checks |
|
|
@@ -475,25 +621,25 @@ projscan --help
|
|
|
475
621
|
<details>
|
|
476
622
|
<summary><strong>projscan structure</strong> - Directory tree with file counts</summary>
|
|
477
623
|
|
|
478
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
624
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
|
|
479
625
|
</details>
|
|
480
626
|
|
|
481
627
|
<details>
|
|
482
628
|
<summary><strong>projscan diagram</strong> - Architecture visualization</summary>
|
|
483
629
|
|
|
484
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
630
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
|
|
485
631
|
</details>
|
|
486
632
|
|
|
487
633
|
<details>
|
|
488
634
|
<summary><strong>projscan dependencies</strong> - Dependency analysis</summary>
|
|
489
635
|
|
|
490
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
636
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
|
|
491
637
|
</details>
|
|
492
638
|
|
|
493
639
|
<details>
|
|
494
640
|
<summary><strong>projscan badge</strong> - Health badge generation</summary>
|
|
495
641
|
|
|
496
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
642
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
|
|
497
643
|
</details>
|
|
498
644
|
|
|
499
645
|
### Output Formats
|
|
@@ -515,7 +661,7 @@ Run `projscan help` for the generated command-by-command support matrix.
|
|
|
515
661
|
|
|
516
662
|
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.
|
|
517
663
|
|
|
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.
|
|
664
|
+
**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.3.0/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v4.3.0/docs/PLUGIN-AUTHORING.md), the [Plugin Gallery](https://github.com/abhiyoheswaran1/projscan/blob/v4.3.0/docs/PLUGIN-GALLERY.md), and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v4.3.0/docs/plugin.schema.json) as the stable contract.
|
|
519
665
|
|
|
520
666
|
```bash
|
|
521
667
|
projscan plugin list
|
|
@@ -526,9 +672,9 @@ PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor --reporter team-radar
|
|
|
526
672
|
PROJSCAN_PLUGINS_PREVIEW=1 projscan ci --reporter team-radar --min-score 80
|
|
527
673
|
```
|
|
528
674
|
|
|
529
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
675
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
|
|
530
676
|
|
|
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.
|
|
677
|
+
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.3.0/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
|
|
532
678
|
|
|
533
679
|
### Options
|
|
534
680
|
|
|
@@ -539,6 +685,26 @@ Reporter plugins are intentionally CLI-only. MCP tools keep returning structured
|
|
|
539
685
|
| `--include-ignored` | Explicitly include files hidden by Git ignore rules |
|
|
540
686
|
| `--scan-env-values` | Explicitly read `.env*` contents during secret checks |
|
|
541
687
|
| `--offline` | Block projscan network-capable features for this run |
|
|
688
|
+
| `--shortcuts` | Print the Mission Control shortcut command index (`start`) |
|
|
689
|
+
| `--shortcuts-json` | Print the Mission Control shortcut command index as JSON (`start`) |
|
|
690
|
+
| `--handoff-prompt` | Print only the concise Mission Control handoff prompt (`start`) |
|
|
691
|
+
| `--next-command` | Print only the current Mission Control cursor command (`start`) |
|
|
692
|
+
| `--next-tool-call` | Print only the current Mission Control cursor MCP tool call as JSON (`start`) |
|
|
693
|
+
| `--ready-tool-calls` | Print the current cursor and remaining MCP-callable proof queue as JSON (`start`) |
|
|
694
|
+
| `--proof-commands` | Print only ready Mission Control proof commands (`start`) |
|
|
695
|
+
| `--checklist` | Print only the Mission Control resume checklist (`start`) |
|
|
696
|
+
| `--resume-json` | Print only the Mission Control resume object as JSON (`start`) |
|
|
697
|
+
| `--handoff-json` | Print only the Mission Control handoff object as JSON (`start`) |
|
|
698
|
+
| `--mission-script` | Print the Mission Control shell script (`start`) |
|
|
699
|
+
| `--save-mission <dir>` | Write the Mission Control bundle to a directory (`start`) |
|
|
700
|
+
| `--mission <dir>` | Read a saved Mission Control bundle and include proof outcome in `start`; repeatable mission selector for `mission-proof` |
|
|
701
|
+
| `--baseline <path>` | Compare `mission-proof` with a local manual-run baseline JSON file |
|
|
702
|
+
| `--task-card` | Print only the Mission Control Markdown task card (`start`) |
|
|
703
|
+
| `--review-gate` | Print only the Mission Control stop-and-review gate (`start`) |
|
|
704
|
+
| `--review-gate-json` | Print only the Mission Control review gate as JSON (`start`) |
|
|
705
|
+
| `--review-policy` | Print only the Mission Control review policy as JSON (`start`) |
|
|
706
|
+
| `--review-replies` | Print only copyable Mission Control reviewer replies (`start`) |
|
|
707
|
+
| `--runbook` | Print only the Mission Control Markdown runbook (`start`) |
|
|
542
708
|
| `--changed-only` | Scope to files changed vs base ref (ci/analyze/doctor) |
|
|
543
709
|
| `--base-ref <ref>` | Git base ref for `--changed-only` (default: origin/main) |
|
|
544
710
|
| `--reporter <name>` | Render `doctor`, `analyze`, or `ci` with a local reporter plugin |
|
|
@@ -571,7 +737,7 @@ This outputs a [shields.io](https://shields.io) badge URL and markdown snippet y
|
|
|
571
737
|
|
|
572
738
|
## What It Detects
|
|
573
739
|
|
|
574
|
-
**Languages**: TypeScript, JavaScript, Python, Go, Java, Ruby, Rust, PHP, C#, Kotlin, Swift, and C
|
|
740
|
+
**Languages**: 11 AST adapters covering 12 named languages: TypeScript, JavaScript, Python, Go, Java, Ruby, Rust, PHP, C#, Kotlin, Swift, and C++. projscan also provides file-level detection for C, Dart, Lua, Scala, R, Shell, CSS, HTML, SQL, and more.
|
|
575
741
|
|
|
576
742
|
**Frameworks**: React, Next.js, Vue, Nuxt, Svelte, Angular, Express, Fastify, NestJS, Vite, Tailwind CSS, Prisma, and more
|
|
577
743
|
|
|
@@ -695,7 +861,7 @@ If you read projscan's [Socket report](https://socket.dev/npm/package/projscan),
|
|
|
695
861
|
### Audit it yourself
|
|
696
862
|
|
|
697
863
|
- **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.
|
|
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.
|
|
864
|
+
- **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.3.0/docs/STABILITY.md).
|
|
699
865
|
- **Run it offline:** `npm install -g projscan` followed by anything except `audit` and `--mode semantic` works without network.
|
|
700
866
|
- **Drop privilege further:** in CI, run projscan in a sandbox that disallows network egress; everything except `audit` will pass.
|
|
701
867
|
|
|
@@ -746,7 +912,7 @@ projscan ci --changed-only # Gate only on this PR's diff
|
|
|
746
912
|
projscan ci --format sarif > projscan.sarif # SARIF for Code Scanning
|
|
747
913
|
```
|
|
748
914
|
|
|
749
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
915
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
|
|
750
916
|
|
|
751
917
|
### GitHub Action (recommended)
|
|
752
918
|
|
|
@@ -823,7 +989,7 @@ Fields:
|
|
|
823
989
|
- `hotspots.limit` / `hotspots.since` - defaults for the `hotspots` command
|
|
824
990
|
- `monorepo.importPolicy` - cross-package import allow/deny rules in monorepos *(0.14+)*
|
|
825
991
|
|
|
826
|
-
See [`docs/GUIDE.md` -> Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v4.
|
|
992
|
+
See [`docs/GUIDE.md` -> Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v4.3.0/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
|
|
827
993
|
|
|
828
994
|
## Tracking Health Over Time
|
|
829
995
|
|
|
@@ -836,7 +1002,7 @@ projscan diff # Compare against baseline
|
|
|
836
1002
|
projscan diff --format markdown # Markdown diff for PRs
|
|
837
1003
|
```
|
|
838
1004
|
|
|
839
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
1005
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.0/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
|
|
840
1006
|
|
|
841
1007
|
## Hotspots - Where to Fix First
|
|
842
1008
|
|
|
@@ -925,7 +1091,7 @@ Coverage is also automatically joined into `projscan hotspots` when one of those
|
|
|
925
1091
|
|
|
926
1092
|
**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.
|
|
927
1093
|
|
|
928
|
-
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.
|
|
1094
|
+
<img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v4.3.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">
|
|
929
1095
|
|
|
930
1096
|
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.
|
|
931
1097
|
|
|
@@ -1135,7 +1301,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
|
|
|
1135
1301
|
- **`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`.
|
|
1136
1302
|
- **`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.
|
|
1137
1303
|
|
|
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.
|
|
1304
|
+
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.3.0/docs/PLUGIN-AUTHORING.md).
|
|
1139
1305
|
|
|
1140
1306
|
### Context-window budgeting
|
|
1141
1307
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function registerMissionProof(): void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { assertFormatSupported, getRootPath, maybeCompactBanner, program, setupLogLevel, } from '../_shared.js';
|
|
3
|
+
import { computeMissionProofReport } from '../../core/missionProof.js';
|
|
4
|
+
export function registerMissionProof() {
|
|
5
|
+
program
|
|
6
|
+
.command('mission-proof')
|
|
7
|
+
.description('Summarize local Mission Control proof and compare it with optional manual baseline runs')
|
|
8
|
+
.option('--mission <dir>', 'Mission Control bundle directory, repeatable (default: .projscan/mission)', collectMission, [])
|
|
9
|
+
.option('--baseline <path>', 'JSON file with manual runs to compare against Mission Control proof')
|
|
10
|
+
.action(async (cmdOpts) => {
|
|
11
|
+
setupLogLevel();
|
|
12
|
+
maybeCompactBanner();
|
|
13
|
+
const format = assertFormatSupported('mission-proof');
|
|
14
|
+
try {
|
|
15
|
+
const report = await computeMissionProofReport(getRootPath(), {
|
|
16
|
+
missions: cmdOpts.mission,
|
|
17
|
+
baselineFile: typeof cmdOpts.baseline === 'string' ? cmdOpts.baseline : undefined,
|
|
18
|
+
});
|
|
19
|
+
if (format === 'json') {
|
|
20
|
+
console.log(JSON.stringify(report, null, 2));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
printMissionProof(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 collectMission(value, previous) {
|
|
32
|
+
return [...previous, value];
|
|
33
|
+
}
|
|
34
|
+
function printMissionProof(report) {
|
|
35
|
+
const totals = report.missionControl.totals;
|
|
36
|
+
const color = totals.failed > 0 || totals.unavailable > 0 ? chalk.yellow : chalk.green;
|
|
37
|
+
console.log(color(`Mission proof: ${totals.missions} mission bundle(s)`));
|
|
38
|
+
console.log(report.summary);
|
|
39
|
+
console.log(`Passed: ${totals.passed}; failed: ${totals.failed}; running: ${totals.running}; not run: ${totals.notRun}`);
|
|
40
|
+
console.log(`Reruns: ${totals.reruns}; failed gates: ${totals.failedGates}; reviewer approvals: ${totals.reviewerApprovals}`);
|
|
41
|
+
if (report.comparison) {
|
|
42
|
+
console.log('');
|
|
43
|
+
console.log(chalk.bold('Compared With Baseline'));
|
|
44
|
+
console.log(`Completion delta: ${report.comparison.completionRateDelta}`);
|
|
45
|
+
console.log(`Reruns avoided: ${report.comparison.rerunsAvoided}`);
|
|
46
|
+
console.log(`Failed gates avoided: ${report.comparison.failedGatesAvoided}`);
|
|
47
|
+
console.log(`Minutes saved: ${report.comparison.minutesSaved}`);
|
|
48
|
+
}
|
|
49
|
+
console.log('');
|
|
50
|
+
console.log(chalk.bold('Risk Avoided'));
|
|
51
|
+
for (const item of report.riskAvoided)
|
|
52
|
+
console.log('- ' + item);
|
|
53
|
+
console.log('');
|
|
54
|
+
console.log(chalk.bold('Next Actions'));
|
|
55
|
+
for (const action of report.nextActions) {
|
|
56
|
+
if (action.command)
|
|
57
|
+
console.log('- ' + action.command);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=missionProof.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missionProof.js","sourceRoot":"","sources":["../../../src/cli/commands/missionProof.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,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