projscan 3.0.6 → 3.0.8

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.
@@ -0,0 +1,209 @@
1
+ # Contributing to projscan
2
+
3
+ Thanks for your interest in contributing! Here's how to get started.
4
+
5
+ ## Development Setup
6
+
7
+ ```bash
8
+ git clone https://github.com/abhiyoheswaran1/projscan.git
9
+ cd projscan
10
+ npm install
11
+ npm run build
12
+ ```
13
+
14
+ ### Running locally
15
+
16
+ ```bash
17
+ # Run the CLI directly from source
18
+ node dist/cli/index.js doctor
19
+
20
+ # Watch mode for development
21
+ npm run dev
22
+ ```
23
+
24
+ ### Running tests
25
+
26
+ ```bash
27
+ npm test # Run all tests
28
+ npm run test:watch # Watch mode
29
+ ```
30
+
31
+ ### Linting and formatting
32
+
33
+ ```bash
34
+ npm run lint # ESLint
35
+ npm run format # Prettier
36
+ ```
37
+
38
+ ## How to Contribute
39
+
40
+ ### Reporting Bugs
41
+
42
+ For security vulnerabilities, do not open a public issue. Follow [SECURITY.md](SECURITY.md).
43
+
44
+ For ordinary bugs, open an [issue](https://github.com/abhiyoheswaran1/projscan/issues/new?template=bug_report.md) with:
45
+ - Steps to reproduce
46
+ - Expected vs actual behavior
47
+ - Node.js version and OS
48
+
49
+ ### Suggesting Features
50
+
51
+ Open an [issue](https://github.com/abhiyoheswaran1/projscan/issues/new?template=feature_request.md) describing:
52
+ - The problem you're trying to solve
53
+ - Your proposed solution
54
+ - Alternative approaches you've considered
55
+
56
+ ### Submitting Pull Requests
57
+
58
+ 1. Fork the repo and create a branch from `main`
59
+ 2. Make your changes
60
+ 3. Add or update tests as needed
61
+ 4. Run `npm test` and `npm run lint` to verify
62
+ 5. Write a clear PR description explaining the change
63
+
64
+ ## Legal requirements for contributions
65
+
66
+ By contributing to projscan, you agree that your contribution will be licensed under the MIT License.
67
+
68
+ You also certify the [Developer Certificate of Origin 1.1](https://developercertificate.org/) for your contribution. In practical terms:
69
+
70
+ - you wrote the contribution, or you have the right to submit it under the project license
71
+ - you are not adding code, docs, images, datasets, or generated output that you cannot license to this project
72
+ - you understand that contributions are public and may be redistributed under the MIT License
73
+
74
+ Maintainers may ask for signed-off commits. Add a sign-off with:
75
+
76
+ ```bash
77
+ git commit --amend --signoff
78
+ ```
79
+
80
+ Do not include secrets, private customer data, proprietary source code, or confidential vulnerability details in issues, pull requests, examples, screenshots, or fixtures.
81
+
82
+ The MIT License covers project code and docs. It does not grant rights to use the projscan or Baseframe Labs names, icons, or wordmarks in a way that implies endorsement. See [TRADEMARKS.md](TRADEMARKS.md).
83
+
84
+ ## Project Structure
85
+
86
+ ```
87
+ src/
88
+ ├── cli/ # Command definitions (Commander.js)
89
+ ├── core/ # Scanners, detectors, issue engine, hotspots, file inspector
90
+ │ └── languages/ # LanguageAdapter + per-language parsers (JS via babel, Python via tree-sitter)
91
+ ├── analyzers/ # Issue checkers (eslint, prettier, test, architecture, deps, security, python*)
92
+ ├── fixes/ # Auto-fix implementations (ESLint, Prettier, Vitest, EditorConfig)
93
+ ├── reporters/ # Output formatters (console, JSON, markdown, SARIF)
94
+ ├── mcp/ # MCP server - tools, prompts, resources for AI agents
95
+ └── utils/ # Shared utilities (config loader, changed-files, baseline, banner, logger)
96
+ ```
97
+
98
+ ### Adding a language
99
+
100
+ As of 0.10, projscan has a `LanguageAdapter` interface (`src/core/languages/LanguageAdapter.ts`). Adding a new language means:
101
+
102
+ 1. Implement the interface in `src/core/languages/<lang>Adapter.ts`. The Python adapter (`pythonAdapter.ts`) is the reference - it wraps a tree-sitter grammar, extracts imports/exports/symbol defs, resolves imports, and detects package roots.
103
+ 2. Register the adapter in `src/core/languages/registry.ts`.
104
+ 3. If the parser needs a grammar binary (e.g. another tree-sitter language), vendor the wasm under `dist/grammars/` via `scripts/copy-wasm.mjs` and add a test in `tests/integration/packSmokeTest.test.ts` that asserts it ships in the tarball.
105
+ 4. Add language-specific analyzers under `src/analyzers/<lang>*.ts` (see `pythonTestCheck.ts`, `pythonLinterCheck.ts` for the pattern) and wire them into `src/core/issueEngine.ts`.
106
+ 5. Add tests mirroring `tests/core/languages/pythonAdapter.*.test.ts` coverage (parse, imports, exports, resolver, package roots).
107
+
108
+ ## Code Style
109
+
110
+ - TypeScript with strict mode
111
+ - ESLint + Prettier for formatting
112
+ - Keep dependencies minimal - avoid adding new runtime dependencies unless necessary
113
+ - Write tests for new analyzers and fixers
114
+
115
+ ## Stable surface
116
+
117
+ The MCP tool inventory, CLI command list, and exit codes documented in `docs/STABILITY.md` are the **public contract**. CI runs `npm run check:stability` which compares the current build against `stability-baseline.json` checked into the repo root.
118
+
119
+ - **Adding** a new MCP tool, optional argument, or CLI command is fine - the guard prints additions but does not fail.
120
+ - **Removing** or **renaming** anything in the stable surface fails the guard. Either restore the surface or, if the change is intentional and warrants a major version bump, regenerate the baseline:
121
+
122
+ ```sh
123
+ npm run build
124
+ node scripts/check-stability.mjs --update
125
+ ```
126
+
127
+ Only run `--update` when you genuinely intend to break the contract (i.e. a major-version release). The friction is the point.
128
+
129
+ ## Areas wanting help
130
+
131
+ Concrete on-ramps for new contributors. Each is scoped to fit a first PR. Pre-drafted starter tasks live under [`.github/seed-issues/`](.github/seed-issues/) — pick one and either claim its corresponding GitHub issue or open one and link the file.
132
+
133
+ - **New language adapters.** The `LanguageAdapter` interface (`src/core/languages/LanguageAdapter.ts`) is the cleanest entry point. Seven languages are wired today (JS, TS, Python, Go, Java, Ruby, Rust). The Python and Rust adapters are good references — Python for the simplest shape, Rust for a recent end-to-end example. Each adapter is ~200 LOC plus walkers (imports, exports, CC, per-fn CC, callSites) and a vendored tree-sitter grammar wasm. Pre-drafted tickets: [PHP](.github/seed-issues/02-add-php-language-adapter.md), [C#](.github/seed-issues/03-add-c-sharp-language-adapter.md). Plus a [step-by-step walkthrough doc](.github/seed-issues/08-doc-walkthrough-language-adapter.md) is itself an open issue.
134
+ - **New analyzers.** Issue checkers live in `src/analyzers/`. Each is a pure function `(rootPath, files) => Promise<Issue[]>`. Existing ones (`testCheck`, `prettierCheck`, `securityCheck`, `dependencyRiskCheck`, `cycleCheck`) are good shape templates. Wire into `src/core/issueEngine.ts`. Tests in `tests/analyzers/`.
135
+ - **New reporters.** Output formatters in `src/reporters/`. Implement the same surface as `consoleReporter.ts` / `markdownReporter.ts` / `jsonReporter.ts` / `htmlReporter.ts`. Pre-drafted tickets: [HTML for `pr-diff`](.github/seed-issues/04-html-reporter-for-pr-diff.md), [HTML for `coverage`](.github/seed-issues/05-html-reporter-for-coverage.md).
136
+ - **MCP tools.** Each tool is a `{name, description, inputSchema, handler}` object exported from `src/mcp/tools/<name>.ts` and registered in `src/mcp/tools.ts`. Mirror an existing one (e.g. `src/mcp/tools/coupling.ts` is a clean shape). Add a `tools/list` assertion to `tests/mcp/server.test.ts`.
137
+ - **Fix-suggest templates.** The rule-driven action-prompt registry in `src/core/fixSuggest.ts` covers ~12 issue families. Each new template is ~25 LOC. Pre-drafted ticket: [eslint-* template](.github/seed-issues/06-eslint-fix-suggest-template.md).
138
+ - **UX polish.** Small, high-leverage CLI ergonomics. Pre-drafted ticket: [impact-symbol disambiguation warning](.github/seed-issues/07-impact-cli-symbol-disambiguation.md).
139
+ - **Documentation.** `docs/GUIDE.md` covers the agent journey + per-command reference; tighter sections still wanted: per-analyzer "what triggers / how to silence" tables, monorepo setup walkthroughs, framework-specific guides.
140
+
141
+ ### First-time contributor walkthrough
142
+
143
+ If you've never landed a PR on this repo before, the smallest possible loop:
144
+
145
+ ```sh
146
+ # 1. Fork on GitHub, then locally:
147
+ git clone git@github.com:<your-username>/projscan.git
148
+ cd projscan
149
+
150
+ # 2. Verify the baseline works (no code changes yet)
151
+ npm install
152
+ npm test # 800+ tests, ~6s
153
+ npm run lint # eslint, no errors expected
154
+ npm run build # tsc + wasm copy + manifest generation
155
+ npm run check:stability # baseline diff; should be clean
156
+
157
+ # 3. Pick a seed issue, mirror the template it points at
158
+ # e.g. .github/seed-issues/06-eslint-fix-suggest-template.md
159
+ # -> open src/core/fixSuggest.ts, find the existing templates,
160
+ # mirror one, write tests, run npm test
161
+
162
+ # 4. Commit + push to your fork
163
+ git checkout -b feat/eslint-fix-template
164
+ git add -A
165
+ git commit -m "Add fix-suggest template for eslint-* rules"
166
+ git push origin feat/eslint-fix-template
167
+
168
+ # 5. Open a PR back to abhiyoheswaran1/projscan:main
169
+ # Reference the seed issue file in the PR description.
170
+ ```
171
+
172
+ CI runs the same checks (`npm test`, `npm run lint`, `npm run check:stability`) on every PR. As long as those pass, a maintainer will review.
173
+
174
+ For larger work (refactors, cross-cutting changes), open an issue first to discuss the approach. We'd rather agree on the shape before you spend a weekend on it.
175
+
176
+ ## Releasing
177
+
178
+ A release is a four-step ritual now that `.github/workflows/release.yml` does the heavy lifting. Steps 1-3 prep and ship the npm, GitHub Release, and MCP Registry surfaces; step 4 is the website surface that lives in the separate website repo.
179
+
180
+ 1. **Bump version + write the CHANGELOG entry** in a PR against `main`:
181
+ - `package.json#version` → new semver (patch for fixes, minor for features, major if anything breaks).
182
+ - `.github/mcp-registry/server.json` — bump BOTH `version` fields (top-level and `packages[0].version`). Description must stay ≤ 100 chars (registry limit).
183
+ - `CHANGELOG.md` — add a `## [X.Y.Z] — YYYY-MM-DD` section at the top in Keep-a-Changelog format. Cover Added / Changed / Removed / Notes; be honest about tradeoffs. The release workflow slices this verbatim into the GitHub Release body.
184
+ - Sweep for "X tools" / "Y languages" counts in `README.md`, `docs/GUIDE.md`, `docs/ROADMAP.md` and update them.
185
+ - **Regenerate the dogfood health badge.** Run `npx projscan badge` against the prepped tree. If the letter or score in the README badge changed, update `README.md` to match. **A drop in letter (e.g., A → B) is a release blocker** — fix the underlying signal before tagging. (The badge is a static `img.shields.io/badge` snapshot, not a live endpoint, so it stays consistent until the next release intentionally moves it.)
186
+ - Run `npm run release:check`. It reports version/changelog drift, dirty worktree state, tag state, and the next release action. When there are no metadata or git blockers, it also runs the build, release gate, tests, lint, stability check, SBOM generation, and packed install smoke.
187
+
188
+ 2. **Merge the PR.** Per the project's PR-and-review rule, every change including release prep goes through review. Wait for CI to pass on the merged `main` commit before tagging.
189
+
190
+ 3. **Tag and push.** Tags are allowed from `main` only. Never tag or publish from a feature, fix, release, or temporary branch. From a clean, current `main` checkout, run:
191
+ ```
192
+ git switch main
193
+ git pull --ff-only origin main
194
+ npm run release:check
195
+ git tag -a vX.Y.Z -m "Release vX.Y.Z"
196
+ git push origin vX.Y.Z
197
+ ```
198
+ The `Release` workflow fires automatically. It validates versions, runs the full build / test / lint / stability gate, slices the CHANGELOG entry, publishes to npm with provenance, creates the GitHub Release with `dist/tool-manifest.json` and the SBOM attached, and republishes the MCP Registry metadata through GitHub OIDC. If anything fails before npm, no GitHub Release is created and no npm publish happens. If anything fails after npm, fix it and use the workflow's `workflow_dispatch` re-run with the same tag; npm, GitHub Release, and MCP Registry steps are idempotent.
199
+
200
+ 4. **Bump the website's expectations** (separate repo). In the personal-website repo, open `tools.astro` (or wherever the EXPECTED block lives) and edit:
201
+ - The hardcoded **manifest URL pin** → swap `releases/download/vX.Y.Z/tool-manifest.json` for the new tag.
202
+ - `EXPECTED.minVersion` → the new version.
203
+ - `EXPECTED.requiredTools` → append any new MCP tool names the release added.
204
+
205
+ The website build refuses to run until all three edits are in. That friction is the feature — it prevents the docs page from drifting out of sync with the published tool surface. The changelog page is regenerated from `CHANGELOG.md` on `main` at build time, so the next site build naturally picks up the new entry.
206
+
207
+ ## License
208
+
209
+ By contributing, you agree that your contributions will be licensed under the MIT License. See [LICENSE](LICENSE), [DISCLAIMER.md](DISCLAIMER.md), and [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md).
package/DISCLAIMER.md ADDED
@@ -0,0 +1,9 @@
1
+ # Disclaimer
2
+
3
+ projscan is provided under the MIT License and ships without warranties. See [LICENSE](LICENSE) for the binding license terms.
4
+
5
+ projscan reports are developer-assistance signals. They are not legal, security, compliance, financial, or professional advice. A human maintainer remains responsible for release decisions, vulnerability handling, dependency review, and production changes.
6
+
7
+ Security, dataflow, supply-chain, and quality findings can be incomplete or wrong. Treat `block`, `caution`, and `proceed` verdicts as review inputs, not guarantees.
8
+
9
+ Local plugins run as local code when enabled. Only run plugins you trust.
package/PRIVACY.md ADDED
@@ -0,0 +1,35 @@
1
+ # projscan Privacy Notice
2
+
3
+ projscan is a local, open-source developer tool. This notice applies to the projscan CLI, MCP server, package contents, generated local artifacts, and repository docs.
4
+
5
+ projscan is part of the Baseframe Labs family of products (https://www.baseframelabs.com). Baseframe Labs is an umbrella brand, not the legal subject of this notice. This notice applies to projscan only.
6
+
7
+ ## Local-first behavior
8
+
9
+ By default, projscan runs on your machine and reads files in the repository where you run it. It does not upload source code, dependency data, scan results, telemetry, or usage analytics to a projscan service.
10
+
11
+ projscan may write local files when you ask it to, such as `.projscan-cache/`, `.projscan-feedback.json`, baselines, handoff files, generated policies, generated GitHub Actions, or reports.
12
+
13
+ ## Commands that can involve network access
14
+
15
+ Some workflows can involve network access because they call external tooling or package managers:
16
+
17
+ - installing projscan with npm or running it through npx contacts the npm registry before projscan starts
18
+ - `projscan audit` shells out to npm audit behavior for the current project
19
+ - commands or modes that explicitly ask for registry checks may contact the configured package registry
20
+ - semantic search can download an optional local embedding model when the optional `@xenova/transformers` peer is installed and the user opts into semantic mode
21
+ - local analyzer or reporter plugins can do anything their code does; only enable plugins you trust
22
+
23
+ ## Environment variables and secrets
24
+
25
+ projscan may pass `process.env` to child processes such as Git or npm so those tools work normally. projscan does not intentionally inspect `.env` values, API keys, session tokens, or private credentials for telemetry or product analytics.
26
+
27
+ Security analyzers may flag committed secret-looking strings in repository files. Those findings stay in local output unless you choose to copy, save, or publish them.
28
+
29
+ ## Feedback artifacts
30
+
31
+ `projscan feedback` creates local JSON evidence about reviewer usefulness, minutes saved, prevented bad edits, false positives, owner clarity, next-command clarity, and repeat PR use. Treat that artifact as team data. Do not commit it if it contains private PR URLs, reviewer handles, or internal notes you do not want public.
32
+
33
+ ## Contact
34
+
35
+ For privacy or security questions about projscan, contact support@baseframelabs.com.
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.0.6/docs/GUIDE.md) · [Roadmap](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.6/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/v3.0.8/docs/GUIDE.md) · [Roadmap](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.8/docs/ROADMAP.md)
13
13
 
14
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/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/v3.0.8/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
 
@@ -19,15 +19,13 @@
19
19
 
20
20
  ## Why?
21
21
 
22
- AI coding agents are becoming the primary interface to code. Today, when you ask your agent *"which files implement auth?"* or *"what breaks if I bump React from 18 to 19?"* - it either guesses from names, or it shells out to grep and reads raw output not built for it.
22
+ AI coding agents are becoming the primary interface to code. When you ask an agent *"which files implement auth?"* or *"what breaks if I bump React from 18 to 19?"*, it needs structured repo context, not raw grep output.
23
23
 
24
- **projscan is the first code-intelligence tool built for agents, not for humans.** Your agent gets a fast, AST-accurate, context-budget-aware view of your codebase through structured MCP tools. It can run a preflight safety gate before edits or merge, including supply-chain IOC evidence, query a stable v3 semantic graph, detect bridge-helper dataflow risks, find symbol definitions, preview upgrades, rank hotspots, diff structural changes between refs, surface coupling/cycle hotspots, get an **intent-grounded** one-call PR review (now with new-taint-flow and bridge-dataflow detection that *blocks* unsafe merges, plus an optional natural-language intent arg that labels each finding expected / unexpected / out-of-scope), request structured fix-action prompts for any open issue and **mechanically apply** the safe ones with rollback, ask "what breaks if I change this?" via transitive blast-radius analysis (across registered sibling repos too), surface source-to-sink taint flows, share a durable session across multiple agent invocations, and learn from how you use it — quieting accumulated noise on this specific repo over time without ever phoning home.
24
+ **projscan is code intelligence built for agents.** MCP clients get a fast, AST-backed, context-budget-aware view of your codebase: semantic graph, dataflow risks, review verdicts, hotspots, ownership, preflight gates, fix prompts, impact analysis, and durable session context. Everything is local and offline.
25
25
 
26
- The stable local plugin platform turns that same pipeline into a team substrate: analyzer plugins add project-specific findings, and reporter plugins render `doctor`, `analyze`, and `ci` in your team's own voice without changing the underlying scan.
26
+ For teams, projscan turns that context into a repeatable PR habit. `projscan init team` creates policy, CI, ownership, and baseline memory. `projscan evidence-pack --pr-comment` gives reviewers a compact verdict with top risks, First Fix, owner routing, baseline trend memory, and exact next commands. `projscan feedback`, `projscan dogfood`, and `projscan trial` measure whether the loop actually saved time, prevented risky edits, and stayed trustworthy across real repos.
27
27
 
28
- The 3.0.6 loop focuses on the first useful team PR and measured repeat use: `projscan init team` creates policy, CI, ownership, and baseline memory; `projscan evidence-pack --pr-comment` posts a compact verdict with trust calibration, top risks, a First Fix, owner routing, baseline trend memory, reviewer feedback prompts, and exact next commands; `projscan dogfood` checks whether that loop is ready across real repos.
29
-
30
- Humans get the same thing through the CLI.
28
+ The local plugin platform lets teams add project-specific findings and render `doctor`, `analyze`, and `ci` in their own voice without changing the scan pipeline. Humans get the same information through the CLI.
31
29
 
32
30
  **Everything is offline-first. Zero network calls. No API keys.**
33
31
 
@@ -35,7 +33,7 @@ Humans get the same thing through the CLI.
35
33
  npx projscan
36
34
  ```
37
35
 
38
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/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/v3.0.8/docs/projscan-reporter-plugin.gif" alt="projscan doctor rendered through a local reporter plugin in a macOS-style terminal window" width="700">
39
37
 
40
38
  Run `projscan doctor` for a focused health check:
41
39
 
@@ -43,7 +41,7 @@ Run `projscan doctor` for a focused health check:
43
41
  npx projscan doctor
44
42
  ```
45
43
 
46
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
44
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20doctor.gif" alt="npx projscan doctor" width="700">
47
45
 
48
46
  ## Install
49
47
 
@@ -78,7 +76,9 @@ projscan quality-scorecard --format json # Dimensioned quality view
78
76
  projscan release-train --format json # Product readiness plan
79
77
  projscan evidence-pack --website-prompt # Approval packet with product evidence
80
78
  projscan evidence-pack --pr-comment # PR comment with trust calibration + First Fix
79
+ projscan feedback init --output .projscan-feedback.json # Create reviewer feedback evidence
81
80
  projscan dogfood --repo ../api --repo ../web --format json # Multi-repo adoption proof loop
81
+ projscan trial --repo ../api --repo ../web --feedback .projscan-feedback.json --format json # Adoption-readiness report
82
82
  projscan regression-plan --level full # Risk-based verification matrix
83
83
  projscan handoff # Concise next-agent handoff
84
84
  projscan handoff --write docs/agent-handoff.md # Persist next-agent handoff artifact
@@ -107,9 +107,9 @@ projscan plugin test .projscan-plugins/policy.projscan-plugin.json
107
107
  PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor --reporter team-radar
108
108
  ```
109
109
 
110
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
110
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20--help.gif" alt="npx projscan --help" width="700">
111
111
 
112
- For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.6/docs/GUIDE.md)**.
112
+ For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.8/docs/GUIDE.md)**.
113
113
 
114
114
  ## Commands
115
115
 
@@ -130,6 +130,8 @@ For a comprehensive walkthrough, see the **[Full Guide](https://github.com/abhiy
130
130
  | `projscan quality-scorecard` | Dimensioned quality view with health, security, tests, maintainability, coordination, and top risks |
131
131
  | `projscan release-train` | Plan upcoming product lines with readiness evidence |
132
132
  | `projscan evidence-pack` | Assemble approval evidence from planning, bug-hunt, workplan, preflight, trust calibration, First Fix, owner routing, and baseline trend memory |
133
+ | `projscan trial` | Produce one adoption-readiness report from onboarding, dogfood, feedback, trust signals, and website proof |
134
+ | `projscan feedback` | Capture measured reviewer feedback: minutes saved, prevented bad edits, false positives, and repeat PR use |
133
135
  | `projscan dogfood` | Evaluate 1+ real repos for PR-comment readiness, repeat-use readiness, MCP readiness, and reviewer feedback prompts |
134
136
  | `projscan regression-plan` | Build a smoke, focused, or full regression matrix from product risk signals |
135
137
  | `projscan handoff` | Concise next-agent handoff from the current workplan |
@@ -171,31 +173,31 @@ projscan --help
171
173
  <details>
172
174
  <summary><strong>projscan structure</strong> - Directory tree with file counts</summary>
173
175
 
174
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
176
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20structure.gif" alt="npx projscan structure" width="700">
175
177
  </details>
176
178
 
177
179
  <details>
178
180
  <summary><strong>projscan diagram</strong> - Architecture visualization</summary>
179
181
 
180
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
182
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20diagram.gif" alt="npx projscan diagram" width="700">
181
183
  </details>
182
184
 
183
185
  <details>
184
186
  <summary><strong>projscan dependencies</strong> - Dependency analysis</summary>
185
187
 
186
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
188
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20dependencies.gif" alt="npx projscan dependencies" width="700">
187
189
  </details>
188
190
 
189
191
  <details>
190
192
  <summary><strong>projscan explain</strong> - File explanation</summary>
191
193
 
192
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20explain.gif" alt="npx projscan explain" width="700">
194
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20explain.gif" alt="npx projscan explain" width="700">
193
195
  </details>
194
196
 
195
197
  <details>
196
198
  <summary><strong>projscan badge</strong> - Health badge generation</summary>
197
199
 
198
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
200
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20badge.gif" alt="npx projscan badge" width="700">
199
201
  </details>
200
202
 
201
203
  ### Output Formats
@@ -217,7 +219,7 @@ Run `projscan help` for the generated command-by-command support matrix.
217
219
 
218
220
  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.
219
221
 
220
- **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.0.6/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.6/docs/PLUGIN-AUTHORING.md), the [Plugin Gallery](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.6/docs/PLUGIN-GALLERY.md), and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.6/docs/plugin.schema.json) as the stable contract.
222
+ **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.0.8/docs/2.0-MIGRATION.md), then use [Plugin Authoring](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.8/docs/PLUGIN-AUTHORING.md), the [Plugin Gallery](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.8/docs/PLUGIN-GALLERY.md), and the [manifest schema](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.8/docs/plugin.schema.json) as the stable contract.
221
223
 
222
224
  ```bash
223
225
  projscan plugin list
@@ -226,9 +228,9 @@ PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor --reporter team-radar
226
228
  PROJSCAN_PLUGINS_PREVIEW=1 projscan ci --reporter team-radar --min-score 80
227
229
  ```
228
230
 
229
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
231
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/projscan-reporter-plugin.gif" alt="projscan local reporter plugin rendering a team health report" width="700">
230
232
 
231
- 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.0.6/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
233
+ 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.0.8/docs/PLUGIN-AUTHORING.md) for manifest shape, `render(context)`, validation, and the trust model.
232
234
 
233
235
  ### Options
234
236
 
@@ -389,7 +391,7 @@ If you read projscan's [Socket report](https://socket.dev/npm/package/projscan),
389
391
  ### Audit it yourself
390
392
 
391
393
  - **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.
392
- - **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.0.6/docs/STABILITY.md).
394
+ - **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.0.8/docs/STABILITY.md).
393
395
  - **Run it offline:** `npm install -g projscan` followed by anything except `audit` and `--mode semantic` works without network.
394
396
  - **Drop privilege further:** in CI, run projscan in a sandbox that disallows network egress; everything except `audit` will pass.
395
397
 
@@ -417,13 +419,17 @@ The `--min-score 90` threshold is deliberately tight: a regression that drops th
417
419
  For adoption proof, run the product against multiple real repos and capture first-PR feedback:
418
420
 
419
421
  ```sh
420
- projscan dogfood --repo ../api --repo ../web --repo ../worker --format json
421
422
  projscan evidence-pack --pr-comment
423
+ projscan feedback init --output .projscan-feedback.json
424
+ projscan feedback add --file .projscan-feedback.json --repo api --pr https://github.com/acme/api/pull/42 --reviewer @alice --useful true --minutes-saved 10 --owner-routing-clear true --next-command-clear true
425
+ projscan feedback summary --file .projscan-feedback.json --format json
426
+ projscan dogfood --repo ../api --repo ../web --repo ../worker --feedback .projscan-feedback.json --format json
427
+ projscan trial --repo ../api --repo ../web --repo ../worker --feedback .projscan-feedback.json --format json
422
428
  ```
423
429
 
424
- The dogfood report checks PR-comment readiness, repeat-use commands, MCP readiness, and the exact feedback questions a reviewer should answer before rollout.
430
+ The dogfood and trial reports check PR-comment readiness, repeat-use commands, MCP readiness, measured minutes saved, prevented bad edits, false positives, owner clarity, next-command clarity, and repeat PR usage before rollout.
425
431
 
426
- The hotspots projscan finds in itself are real signals — the reporters in particular have grown organically across releases and are candidates for a 2.0-era refactor (tracked in `docs/ROADMAP.md` "Under consideration"). We choose to ship the signal honestly rather than tune the score to hide it.
432
+ The hotspots projscan finds in itself are real signals — the reporters in particular have grown organically across releases and remain future refactor candidates in the roadmap. We choose to ship the signal honestly rather than tune the score to hide it.
427
433
 
428
434
  ## CI/CD Integration
429
435
 
@@ -436,7 +442,7 @@ projscan ci --changed-only # Gate only on this PR's diff
436
442
  projscan ci --format sarif > projscan.sarif # SARIF for Code Scanning
437
443
  ```
438
444
 
439
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
445
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20ci%20--min-score%2070.gif" alt="npx projscan ci --min-score 70" width="700">
440
446
 
441
447
  ### GitHub Action (recommended)
442
448
 
@@ -505,7 +511,7 @@ Fields:
505
511
  - `hotspots.limit` / `hotspots.since` - defaults for the `hotspots` command
506
512
  - `monorepo.importPolicy` - cross-package import allow/deny rules in monorepos *(0.14+)*
507
513
 
508
- See [`docs/GUIDE.md` → Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.6/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
514
+ See [`docs/GUIDE.md` → Configuration](https://github.com/abhiyoheswaran1/projscan/blob/v3.0.8/docs/GUIDE.md#configuration-projscanrc) for the full reference (field types, validation behavior, embedding config in `package.json`, monorepo `importPolicy` semantics).
509
515
 
510
516
  ## Tracking Health Over Time
511
517
 
@@ -518,7 +524,7 @@ projscan diff # Compare against baseline
518
524
  projscan diff --format markdown # Markdown diff for PRs
519
525
  ```
520
526
 
521
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
527
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/docs/npx%20projscan%20diff%20--save-baseline.gif" alt="npx projscan diff --save-baseline" width="700">
522
528
 
523
529
  ## Hotspots - Where to Fix First
524
530
 
@@ -607,7 +613,7 @@ Coverage is also automatically joined into `projscan hotspots` when one of those
607
613
 
608
614
  **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.
609
615
 
610
- <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.6/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">
616
+ <img src="https://raw.githubusercontent.com/abhiyoheswaran1/projscan/v3.0.8/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">
611
617
 
612
618
  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.
613
619
 
@@ -804,7 +810,7 @@ Capability is advertised under `experimental.fileChanged` on `initialize` so cli
804
810
  - **`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`.
805
811
  - **`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.
806
812
 
807
- 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.0.6/docs/PLUGIN-AUTHORING.md).
813
+ 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.0.8/docs/PLUGIN-AUTHORING.md).
808
814
 
809
815
  ### Context-window budgeting
810
816
 
@@ -873,11 +879,18 @@ projscan caches parsed ASTs at `.projscan-cache/graph.json` (auto-gitignored). F
873
879
 
874
880
  ## Contributing
875
881
 
876
- Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
882
+ Contributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR. Contributions are accepted under the MIT License and the DCO 1.1 certification described there.
883
+
884
+ ## Legal and Trust
877
885
 
878
- ## License
886
+ - License: [MIT](LICENSE)
887
+ - Disclaimer: [DISCLAIMER.md](DISCLAIMER.md)
888
+ - Security policy: [SECURITY.md](SECURITY.md)
889
+ - Privacy notice: [PRIVACY.md](PRIVACY.md)
890
+ - Trademark and brand policy: [TRADEMARKS.md](TRADEMARKS.md)
891
+ - Third-party notices: [THIRD-PARTY-NOTICES.md](THIRD-PARTY-NOTICES.md)
879
892
 
880
- MIT
893
+ projscan is free and open source. The CLI and MCP server are local-first and do not upload source code, scan results, telemetry, or usage analytics to a projscan service.
881
894
 
882
895
  <p align="center">
883
896
  <a href="https://www.baseframelabs.com" target="_blank" rel="noopener" title="Part of Baseframe Labs">
package/SECURITY.md ADDED
@@ -0,0 +1,42 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Please do not report security vulnerabilities in public GitHub issues.
6
+
7
+ Email vulnerability reports to support@baseframelabs.com with:
8
+
9
+ - affected projscan version
10
+ - operating system and Node.js version
11
+ - steps to reproduce
12
+ - impact you believe the issue has
13
+ - whether the report includes secret material or private repository data
14
+
15
+ We will acknowledge reports as soon as practical and will coordinate a fix, disclosure notes, and release timing based on severity.
16
+
17
+ ## Supported versions
18
+
19
+ Security fixes target the latest published npm version of `projscan`. Older versions may receive guidance, but we do not promise backports unless a maintainer explicitly says so in the advisory.
20
+
21
+ ## Scope
22
+
23
+ In scope:
24
+
25
+ - vulnerabilities in the `projscan` CLI, MCP server, local plugin loader, generated GitHub Action templates, and packaged runtime artifacts
26
+ - cases where projscan unintentionally reads, exposes, uploads, or persists sensitive local data
27
+ - supply-chain or package-integrity issues in the published npm package
28
+
29
+ Out of scope:
30
+
31
+ - vulnerabilities in a user's repository that projscan reports
32
+ - issues caused only by untrusted local plugins enabled through `PROJSCAN_PLUGINS_PREVIEW=1`
33
+ - npm, Git, or operating-system behavior outside projscan's control
34
+ - social engineering, spam, or denial-of-service reports without a concrete projscan defect
35
+
36
+ ## Safe harbor
37
+
38
+ Good-faith testing is welcome when it avoids harm, privacy violations, data destruction, service disruption, and access to systems or data you do not own. Stop testing and contact us if you reach sensitive data.
39
+
40
+ ## Security contact and brand note
41
+
42
+ Baseframe Labs is the umbrella brand for this product family. It is not currently a formed legal entity. Please do not address legal notices to Baseframe Labs with any corporate designator.
@@ -0,0 +1,52 @@
1
+ # Third-Party Notices
2
+
3
+ projscan is licensed under MIT. It also depends on third-party open-source packages that keep their own licenses.
4
+
5
+ This notice summarizes direct runtime dependencies, optional peer dependencies, and bundled grammar artifacts used by the published package. Transitive dependencies keep their package metadata and license files through npm.
6
+
7
+ ## Direct runtime dependencies
8
+
9
+ | Package | License |
10
+ |---|---|
11
+ | `@babel/parser` | MIT |
12
+ | `@babel/types` | MIT |
13
+ | `chalk` | MIT |
14
+ | `commander` | MIT |
15
+ | `fast-glob` | MIT |
16
+ | `ora` | MIT |
17
+ | `tree-sitter-c-sharp` | MIT |
18
+ | `tree-sitter-go` | MIT |
19
+ | `tree-sitter-java` | MIT |
20
+ | `tree-sitter-php` | MIT |
21
+ | `tree-sitter-python` | MIT |
22
+ | `tree-sitter-ruby` | MIT |
23
+ | `tree-sitter-rust` | MIT |
24
+ | `web-tree-sitter` | MIT |
25
+
26
+ ## Optional peer dependency
27
+
28
+ | Package | License | Notes |
29
+ |---|---|---|
30
+ | `@xenova/transformers` | Apache-2.0 | Optional semantic-search peer. Not required for default BM25 search. |
31
+
32
+ ## Bundled grammar artifacts
33
+
34
+ projscan packages Tree-sitter wasm grammars under `dist/grammars/` so scans work offline after install.
35
+
36
+ | Artifact | Source package | License |
37
+ |---|---|---|
38
+ | `web-tree-sitter.wasm` | `web-tree-sitter` | MIT |
39
+ | `tree-sitter-python.wasm` | `tree-sitter-python` | MIT |
40
+ | `tree-sitter-go.wasm` | `tree-sitter-go` | MIT |
41
+ | `tree-sitter-java.wasm` | `tree-sitter-java` | MIT |
42
+ | `tree-sitter-ruby.wasm` | `tree-sitter-ruby` | MIT |
43
+ | `tree-sitter-rust.wasm` | `tree-sitter-rust` | MIT |
44
+ | `tree-sitter-php.wasm` | `tree-sitter-php` | MIT |
45
+ | `tree-sitter-c_sharp.wasm` | `tree-sitter-c-sharp` | MIT |
46
+ | `tree-sitter-kotlin.wasm` | `tree-sitter-kotlin` | MIT |
47
+ | `tree-sitter-swift.wasm` | `tree-sitter-swift` | MIT |
48
+ | `tree-sitter-cpp.wasm` | `tree-sitter-cpp` | MIT |
49
+
50
+ ## Notes for redistributors
51
+
52
+ If you redistribute projscan, keep the projscan MIT license and preserve required third-party license notices for the packages you redistribute.
package/TRADEMARKS.md ADDED
@@ -0,0 +1,29 @@
1
+ # Trademark and Brand Policy
2
+
3
+ The MIT License covers the projscan source code and documentation. It does not grant trademark rights in the projscan name, projscan icon, Baseframe Labs name, Baseframe Labs wordmarks, or related branding.
4
+
5
+ ## Allowed uses
6
+
7
+ You may use the projscan name to:
8
+
9
+ - describe the unmodified projscan project or package
10
+ - link to the official repository or npm package
11
+ - state that your project works with projscan
12
+ - include the unmodified projscan icon in documentation that clearly refers to projscan
13
+
14
+ ## Uses that need permission
15
+
16
+ Please ask before you:
17
+
18
+ - use projscan or Baseframe Labs branding in a product, company, domain, social handle, conference booth, paid course, or merchandise
19
+ - imply endorsement, certification, partnership, or official status
20
+ - use a confusingly similar name or logo for a fork, plugin marketplace, hosted service, or commercial wrapper
21
+ - modify the official icon or wordmarks in a way that makes the source or endorsement unclear
22
+
23
+ ## Forks and plugins
24
+
25
+ Forks and plugins should make their status clear. Use names like "plugin for projscan" or "fork of projscan" instead of names that suggest official ownership.
26
+
27
+ ## Baseframe Labs note
28
+
29
+ Baseframe Labs is an umbrella brand for related products. It is not currently a formed legal entity. Do not use Baseframe Labs with any corporate designator.
@@ -0,0 +1 @@
1
+ export declare function registerFeedback(): void;