projscan 4.13.0 → 4.15.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 (195) hide show
  1. package/README.md +90 -24
  2. package/dist/cli/commands/evidencePack.js +2 -0
  3. package/dist/cli/commands/evidencePack.js.map +1 -1
  4. package/dist/cli/commands/prove.js +253 -23
  5. package/dist/cli/commands/prove.js.map +1 -1
  6. package/dist/cli/commands/startConsole.d.ts +2 -2
  7. package/dist/cli/commands/startConsole.js +2 -260
  8. package/dist/cli/commands/startConsole.js.map +1 -1
  9. package/dist/cli/commands/startConsoleExecution.d.ts +5 -0
  10. package/dist/cli/commands/startConsoleExecution.js +108 -0
  11. package/dist/cli/commands/startConsoleExecution.js.map +1 -0
  12. package/dist/cli/commands/startConsoleMission.d.ts +6 -0
  13. package/dist/cli/commands/startConsoleMission.js +157 -0
  14. package/dist/cli/commands/startConsoleMission.js.map +1 -0
  15. package/dist/cli/commands/startMissionBundle.js +24 -27
  16. package/dist/cli/commands/startMissionBundle.js.map +1 -1
  17. package/dist/core/adoption.d.ts +8 -81
  18. package/dist/core/adoption.js +4 -549
  19. package/dist/core/adoption.js.map +1 -1
  20. package/dist/core/adoptionFirstRunDiagnostics.d.ts +20 -0
  21. package/dist/core/adoptionFirstRunDiagnostics.js +240 -0
  22. package/dist/core/adoptionFirstRunDiagnostics.js.map +1 -0
  23. package/dist/core/adoptionMcpConfig.d.ts +27 -0
  24. package/dist/core/adoptionMcpConfig.js +123 -0
  25. package/dist/core/adoptionMcpConfig.js.map +1 -0
  26. package/dist/core/adoptionMcpDoctor.d.ts +23 -0
  27. package/dist/core/adoptionMcpDoctor.js +87 -0
  28. package/dist/core/adoptionMcpDoctor.js.map +1 -0
  29. package/dist/core/adoptionWorkflowRecipes.d.ts +14 -0
  30. package/dist/core/adoptionWorkflowRecipes.js +110 -0
  31. package/dist/core/adoptionWorkflowRecipes.js.map +1 -0
  32. package/dist/core/bugHunt.js +26 -255
  33. package/dist/core/bugHunt.js.map +1 -1
  34. package/dist/core/bugHuntPreflightFindings.d.ts +2 -1
  35. package/dist/core/bugHuntPreflightFindings.js +20 -0
  36. package/dist/core/bugHuntPreflightFindings.js.map +1 -1
  37. package/dist/core/bugHuntReportAssembly.d.ts +20 -0
  38. package/dist/core/bugHuntReportAssembly.js +179 -0
  39. package/dist/core/bugHuntReportAssembly.js.map +1 -0
  40. package/dist/core/bugHuntSourceFindings.d.ts +3 -0
  41. package/dist/core/bugHuntSourceFindings.js +61 -0
  42. package/dist/core/bugHuntSourceFindings.js.map +1 -0
  43. package/dist/core/dogfood.js +4 -393
  44. package/dist/core/dogfood.js.map +1 -1
  45. package/dist/core/dogfoodMarketValidation.d.ts +5 -0
  46. package/dist/core/dogfoodMarketValidation.js +265 -0
  47. package/dist/core/dogfoodMarketValidation.js.map +1 -0
  48. package/dist/core/dogfoodRepoEvaluation.d.ts +4 -0
  49. package/dist/core/dogfoodRepoEvaluation.js +137 -0
  50. package/dist/core/dogfoodRepoEvaluation.js.map +1 -0
  51. package/dist/core/evidenceComment.js +50 -13
  52. package/dist/core/evidenceComment.js.map +1 -1
  53. package/dist/core/feedback.js +2 -252
  54. package/dist/core/feedback.js.map +1 -1
  55. package/dist/core/feedbackIntakeClassifier.d.ts +2 -0
  56. package/dist/core/feedbackIntakeClassifier.js +255 -0
  57. package/dist/core/feedbackIntakeClassifier.js.map +1 -0
  58. package/dist/core/intentRouterCatalog.js +34 -0
  59. package/dist/core/intentRouterCatalog.js.map +1 -1
  60. package/dist/core/intentRouterKeywordToolGuards.js +2 -46
  61. package/dist/core/intentRouterKeywordToolGuards.js.map +1 -1
  62. package/dist/core/intentRouterKeywordWeights.js +13 -28
  63. package/dist/core/intentRouterKeywordWeights.js.map +1 -1
  64. package/dist/core/intentRouterProductGuardSignals.d.ts +3 -0
  65. package/dist/core/intentRouterProductGuardSignals.js +59 -0
  66. package/dist/core/intentRouterProductGuardSignals.js.map +1 -0
  67. package/dist/core/intentRouterWorkflowKeywordWeights.js +29 -0
  68. package/dist/core/intentRouterWorkflowKeywordWeights.js.map +1 -1
  69. package/dist/core/markdownSafety.d.ts +3 -0
  70. package/dist/core/markdownSafety.js +14 -0
  71. package/dist/core/markdownSafety.js.map +1 -0
  72. package/dist/core/preflight.d.ts +2 -0
  73. package/dist/core/preflight.js.map +1 -1
  74. package/dist/core/preflightChangedFiles.d.ts +2 -0
  75. package/dist/core/preflightChangedFiles.js +1 -1
  76. package/dist/core/preflightChangedFiles.js.map +1 -1
  77. package/dist/core/preflightInputs.d.ts +2 -0
  78. package/dist/core/preflightInputs.js +5 -2
  79. package/dist/core/preflightInputs.js.map +1 -1
  80. package/dist/core/proofLedger.d.ts +6 -1
  81. package/dist/core/proofLedger.js +174 -15
  82. package/dist/core/proofLedger.js.map +1 -1
  83. package/dist/core/proofReplay.d.ts +9 -0
  84. package/dist/core/proofReplay.js +164 -0
  85. package/dist/core/proofReplay.js.map +1 -0
  86. package/dist/core/proofSufficiency.d.ts +19 -0
  87. package/dist/core/proofSufficiency.js +425 -0
  88. package/dist/core/proofSufficiency.js.map +1 -0
  89. package/dist/core/prove.d.ts +8 -0
  90. package/dist/core/prove.js +578 -88
  91. package/dist/core/prove.js.map +1 -1
  92. package/dist/core/qualityScorecard.js +8 -238
  93. package/dist/core/qualityScorecard.js.map +1 -1
  94. package/dist/core/qualityScorecardDimensions.d.ts +14 -0
  95. package/dist/core/qualityScorecardDimensions.js +99 -0
  96. package/dist/core/qualityScorecardDimensions.js.map +1 -0
  97. package/dist/core/qualityScorecardRisks.d.ts +8 -0
  98. package/dist/core/qualityScorecardRisks.js +107 -0
  99. package/dist/core/qualityScorecardRisks.js.map +1 -0
  100. package/dist/core/qualityScorecardSignals.d.ts +20 -0
  101. package/dist/core/qualityScorecardSignals.js +59 -0
  102. package/dist/core/qualityScorecardSignals.js.map +1 -0
  103. package/dist/core/releaseEvidence.d.ts +1 -0
  104. package/dist/core/releaseEvidence.js +15 -40
  105. package/dist/core/releaseEvidence.js.map +1 -1
  106. package/dist/core/releaseEvidenceBaseline.js +4 -1
  107. package/dist/core/releaseEvidenceBaseline.js.map +1 -1
  108. package/dist/core/releaseEvidenceProofReceipt.d.ts +6 -0
  109. package/dist/core/releaseEvidenceProofReceipt.js +140 -0
  110. package/dist/core/releaseEvidenceProofReceipt.js.map +1 -0
  111. package/dist/core/releaseEvidenceVerdict.d.ts +5 -2
  112. package/dist/core/releaseEvidenceVerdict.js +39 -1
  113. package/dist/core/releaseEvidenceVerdict.js.map +1 -1
  114. package/dist/core/repositoryScanner.d.ts +1 -0
  115. package/dist/core/repositoryScanner.js +5 -4
  116. package/dist/core/repositoryScanner.js.map +1 -1
  117. package/dist/core/sessionResources.d.ts +14 -2
  118. package/dist/core/sessionResources.js +3 -3
  119. package/dist/core/sessionResources.js.map +1 -1
  120. package/dist/core/startFixedRouteCriteria.js +4 -0
  121. package/dist/core/startFixedRouteCriteria.js.map +1 -1
  122. package/dist/core/startInputs.d.ts +1 -1
  123. package/dist/core/startIntentTargets.d.ts +1 -1
  124. package/dist/core/startIntentTargets.js +1 -16
  125. package/dist/core/startIntentTargets.js.map +1 -1
  126. package/dist/core/startMissionInputStatusPolicy.d.ts +7 -0
  127. package/dist/core/startMissionInputStatusPolicy.js +74 -0
  128. package/dist/core/startMissionInputStatusPolicy.js.map +1 -0
  129. package/dist/core/startMissionPolicy.d.ts +6 -15
  130. package/dist/core/startMissionPolicy.js +4 -305
  131. package/dist/core/startMissionPolicy.js.map +1 -1
  132. package/dist/core/startMissionProofPolicy.d.ts +6 -0
  133. package/dist/core/startMissionProofPolicy.js +84 -0
  134. package/dist/core/startMissionProofPolicy.js.map +1 -0
  135. package/dist/core/startMissionRiskPolicy.d.ts +4 -0
  136. package/dist/core/startMissionRiskPolicy.js +85 -0
  137. package/dist/core/startMissionRiskPolicy.js.map +1 -0
  138. package/dist/core/startMissionRoutingPolicy.d.ts +6 -0
  139. package/dist/core/startMissionRoutingPolicy.js +67 -0
  140. package/dist/core/startMissionRoutingPolicy.js.map +1 -0
  141. package/dist/core/startMode.d.ts +1 -2
  142. package/dist/core/startMode.js +4 -151
  143. package/dist/core/startMode.js.map +1 -1
  144. package/dist/core/startModeIntentPolicy.d.ts +12 -0
  145. package/dist/core/startModeIntentPolicy.js +41 -0
  146. package/dist/core/startModeIntentPolicy.js.map +1 -0
  147. package/dist/core/startModeRoutingPolicy.d.ts +4 -0
  148. package/dist/core/startModeRoutingPolicy.js +117 -0
  149. package/dist/core/startModeRoutingPolicy.js.map +1 -0
  150. package/dist/core/startRouteActions.js +5 -0
  151. package/dist/core/startRouteActions.js.map +1 -1
  152. package/dist/core/startSearchQueryTargets.d.ts +1 -0
  153. package/dist/core/startSearchQueryTargets.js +17 -0
  154. package/dist/core/startSearchQueryTargets.js.map +1 -0
  155. package/dist/core/workplan.d.ts +3 -2
  156. package/dist/core/workplan.js +11 -585
  157. package/dist/core/workplan.js.map +1 -1
  158. package/dist/core/workplanCoordinationTasks.d.ts +3 -0
  159. package/dist/core/workplanCoordinationTasks.js +82 -0
  160. package/dist/core/workplanCoordinationTasks.js.map +1 -0
  161. package/dist/core/workplanModeTasks.d.ts +2 -0
  162. package/dist/core/workplanModeTasks.js +192 -0
  163. package/dist/core/workplanModeTasks.js.map +1 -0
  164. package/dist/core/workplanPreflightTasks.d.ts +2 -0
  165. package/dist/core/workplanPreflightTasks.js +126 -0
  166. package/dist/core/workplanPreflightTasks.js.map +1 -0
  167. package/dist/core/workplanQualitySignals.d.ts +7 -0
  168. package/dist/core/workplanQualitySignals.js +63 -0
  169. package/dist/core/workplanQualitySignals.js.map +1 -0
  170. package/dist/core/workplanReport.d.ts +4 -0
  171. package/dist/core/workplanReport.js +79 -0
  172. package/dist/core/workplanReport.js.map +1 -0
  173. package/dist/core/workplanRiskOwnership.d.ts +5 -0
  174. package/dist/core/workplanRiskOwnership.js +97 -0
  175. package/dist/core/workplanRiskOwnership.js.map +1 -0
  176. package/dist/core/workplanSuggestedActions.d.ts +2 -0
  177. package/dist/core/workplanSuggestedActions.js +43 -0
  178. package/dist/core/workplanSuggestedActions.js.map +1 -0
  179. package/dist/mcp/tools/prove.js +24 -18
  180. package/dist/mcp/tools/prove.js.map +1 -1
  181. package/dist/projscan-sbom.cdx.json +6 -6
  182. package/dist/tool-manifest.json +3 -3
  183. package/dist/types/config.d.ts +15 -0
  184. package/dist/types/evidencePack.d.ts +21 -0
  185. package/dist/types/proofLedger.d.ts +1 -1
  186. package/dist/types/prove.d.ts +96 -1
  187. package/dist/utils/changedFiles.js +57 -16
  188. package/dist/utils/changedFiles.js.map +1 -1
  189. package/dist/utils/config.js +2 -0
  190. package/dist/utils/config.js.map +1 -1
  191. package/dist/utils/configProofRecipes.d.ts +2 -0
  192. package/dist/utils/configProofRecipes.js +91 -0
  193. package/dist/utils/configProofRecipes.js.map +1 -0
  194. package/docs/GUIDE.md +145 -25
  195. package/package.json +1 -1
@@ -21,6 +21,7 @@ export async function getChangedFiles(rootPath, explicitBaseRef) {
21
21
  uncommittedFiles: [],
22
22
  };
23
23
  }
24
+ const explicit = Boolean(explicitBaseRef);
24
25
  const candidates = explicitBaseRef ? [explicitBaseRef] : [...DEFAULT_BASE_REFS, 'HEAD~1'];
25
26
  let lastError = null;
26
27
  for (const ref of candidates) {
@@ -29,6 +30,21 @@ export async function getChangedFiles(rootPath, explicitBaseRef) {
29
30
  lastError = `ref not found: ${ref}`;
30
31
  continue;
31
32
  }
33
+ const resolvesToHead = await refResolvesToHead(rootPath, ref);
34
+ if (resolvesToHead) {
35
+ const reason = `base ref "${ref}" resolves to HEAD and would hide committed changes`;
36
+ if (explicit) {
37
+ return {
38
+ available: false,
39
+ reason,
40
+ baseRef: null,
41
+ files: [],
42
+ uncommittedFiles: [],
43
+ };
44
+ }
45
+ lastError = reason;
46
+ continue;
47
+ }
32
48
  try {
33
49
  const { files, uncommittedFiles } = await diffNames(rootPath, ref);
34
50
  return { available: true, baseRef: ref, files, uncommittedFiles };
@@ -71,6 +87,24 @@ export async function getChangedFiles(rootPath, explicitBaseRef) {
71
87
  uncommittedFiles: [],
72
88
  };
73
89
  }
90
+ async function refResolvesToHead(rootPath, ref) {
91
+ try {
92
+ const [head, candidate] = await Promise.all([
93
+ resolveRef(rootPath, 'HEAD'),
94
+ resolveRef(rootPath, ref),
95
+ ]);
96
+ return head === candidate;
97
+ }
98
+ catch {
99
+ return false;
100
+ }
101
+ }
102
+ async function resolveRef(rootPath, ref) {
103
+ const { stdout } = await execFileAsync('git', ['rev-parse', '--verify', ref], {
104
+ cwd: rootPath,
105
+ });
106
+ return stdout.trim();
107
+ }
74
108
  async function isGitRepo(rootPath) {
75
109
  try {
76
110
  await execFileAsync('git', ['rev-parse', '--git-dir'], { cwd: rootPath });
@@ -90,7 +124,7 @@ async function refExists(rootPath, ref) {
90
124
  }
91
125
  }
92
126
  async function diffNames(rootPath, baseRef) {
93
- const { stdout } = await execFileAsync('git', ['diff', '--name-only', '--diff-filter=d', `${baseRef}...HEAD`], { cwd: rootPath, maxBuffer: 10 * 1024 * 1024 });
127
+ const { stdout } = await execFileAsync('git', ['diff', '-z', '--name-only', `${baseRef}...HEAD`], { cwd: rootPath, encoding: 'buffer', maxBuffer: 10 * 1024 * 1024 });
94
128
  // Also include uncommitted changes so PR-style runs cover work-in-progress edits.
95
129
  let uncommitted = [];
96
130
  try {
@@ -100,32 +134,39 @@ async function diffNames(rootPath, baseRef) {
100
134
  // ignore
101
135
  }
102
136
  const set = new Set();
103
- for (const raw of stdout.split('\n')) {
104
- const line = raw.trim();
105
- if (line)
106
- set.add(normalizePath(line));
137
+ for (const file of parseNulList(stdout)) {
138
+ if (file)
139
+ set.add(normalizePath(file));
107
140
  }
108
141
  for (const f of uncommitted)
109
142
  set.add(f);
110
143
  return { files: [...set].sort(), uncommittedFiles: uncommitted };
111
144
  }
112
145
  async function statusNames(rootPath) {
113
- const { stdout } = await execFileAsync('git', ['status', '--porcelain', '--untracked-files=all'], { cwd: rootPath, maxBuffer: 10 * 1024 * 1024 });
146
+ const { stdout } = await execFileAsync('git', ['status', '--porcelain=v1', '-z', '--untracked-files=all'], { cwd: rootPath, encoding: 'buffer', maxBuffer: 10 * 1024 * 1024 });
114
147
  const out = new Set();
115
- for (const raw of stdout.split('\n')) {
116
- if (!raw.trim())
148
+ const entries = parseNulList(stdout);
149
+ for (let index = 0; index < entries.length; index += 1) {
150
+ const raw = entries[index];
151
+ if (!raw)
152
+ continue;
153
+ const status = raw.slice(0, 2);
154
+ const file = raw.slice(3);
155
+ if (!file)
117
156
  continue;
118
- // Format: "XY path" or "XY orig -> new" for renames. Keep leading
119
- // status columns intact until after the regex strips them; trimming first
120
- // turns " M file" into "M file" and leaks the status into the path.
121
- const withoutStatus = raw.replace(/^..\s+/, '').trim();
122
- const renamed = withoutStatus.includes(' -> ')
123
- ? withoutStatus.split(' -> ').pop()
124
- : withoutStatus;
125
- out.add(normalizePath(renamed));
157
+ out.add(normalizePath(file));
158
+ if (isRenameOrCopyStatus(status))
159
+ index += 1;
126
160
  }
127
161
  return [...out];
128
162
  }
163
+ function parseNulList(stdout) {
164
+ const value = Buffer.isBuffer(stdout) ? stdout.toString('utf-8') : stdout;
165
+ return value.split('\0').filter((entry) => entry.length > 0);
166
+ }
167
+ function isRenameOrCopyStatus(status) {
168
+ return status.includes('R') || status.includes('C');
169
+ }
129
170
  function normalizePath(p) {
130
171
  return p.split(path.sep).join('/');
131
172
  }
@@ -1 +1 @@
1
- {"version":3,"file":"changedFiles.js","sourceRoot":"","sources":["../../src/utils/changedFiles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,MAAM,iBAAiB,GAAG,CAAC,aAAa,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,CAAC,CA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CAAC,CAAC,MAAM,CAAC;IAC1E,OAAO,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,oBAAoB,CAAC,MAAc;IAC1C,OAAO,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,aAAa,CAAC,CAAS;IAC9B,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACrC,CAAC;AAED,SAAS,gBAAgB,CAAC,GAAY;IACpC,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAClD,MAAM,CAAC,GAAG,GAA4C,CAAC;IACvD,IAAI,CAAC,CAAC,IAAI,KAAK,mCAAmC;QAAE,OAAO,IAAI,CAAC;IAChE,IAAI,OAAO,CAAC,CAAC,OAAO,KAAK,QAAQ,IAAI,4BAA4B,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/F,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { applyBaseRef, applyDisableRules, applyFailOn, applyIgnore, applyMinScore, applySuppress, } from './configBasics.js';
2
2
  import { applyHotspots } from './configHotspots.js';
3
3
  import { applyMonorepo } from './configMonorepo.js';
4
+ import { applyProofRecipes } from './configProofRecipes.js';
4
5
  import { applyReportPolicies } from './configReportPolicies.js';
5
6
  import { applyScan } from './configScan.js';
6
7
  import { applySeverityOverrides } from './configSeverity.js';
@@ -28,6 +29,7 @@ function normalize(input) {
28
29
  applySuppress(obj, out);
29
30
  applySeverityOverrides(obj, out);
30
31
  applyReportPolicies(obj, out);
32
+ applyProofRecipes(obj, out);
31
33
  applyMonorepo(obj, out);
32
34
  applyTaint(obj, out);
33
35
  return out;
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/utils/config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,QAAgB,EAAE,YAAqB;IACtE,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IAC9D,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACjD,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC;AACpE,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,EAAE,CAAC;IACnD,MAAM,GAAG,GAAG,KAAgC,CAAC;IAC7C,MAAM,GAAG,GAAmB,EAAE,CAAC;IAC/B,a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AAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { ProjscanConfig } from '../types/config.js';
2
+ export declare function applyProofRecipes(obj: Record<string, unknown>, out: ProjscanConfig): void;
@@ -0,0 +1,91 @@
1
+ const MAX_RECIPES = 50;
2
+ const MAX_LIST_ITEMS = 50;
3
+ const MAX_STRING_LENGTH = 300;
4
+ const ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$/;
5
+ const REVIEWER_PATTERN = /^[@A-Za-z0-9][A-Za-z0-9._/-]{0,99}$/;
6
+ export function applyProofRecipes(obj, out) {
7
+ if (!Array.isArray(obj.proofRecipes))
8
+ return;
9
+ const seenIds = new Set();
10
+ const recipes = [];
11
+ for (const recipe of obj.proofRecipes.slice(0, MAX_RECIPES)) {
12
+ const normalized = normalizeProofRecipe(recipe);
13
+ if (!normalized || seenIds.has(normalized.id))
14
+ continue;
15
+ seenIds.add(normalized.id);
16
+ recipes.push(normalized);
17
+ }
18
+ if (recipes.length > 0)
19
+ out.proofRecipes = recipes;
20
+ }
21
+ function normalizeProofRecipe(raw) {
22
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
23
+ return null;
24
+ const obj = raw;
25
+ const id = cleanRecipeId(obj.id);
26
+ const matches = cleanPatternList(obj.matches);
27
+ const requiredCommands = cleanCommandList(obj.requiredCommands);
28
+ if (!id || matches.length === 0 || requiredCommands.length === 0)
29
+ return null;
30
+ const recipe = {
31
+ id,
32
+ matches,
33
+ requiredCommands,
34
+ };
35
+ const requiredReviewers = cleanReviewerList(obj.requiredReviewers);
36
+ const forbiddenFiles = cleanPatternList(obj.forbiddenFiles);
37
+ const riskSurface = cleanString(obj.riskSurface);
38
+ const reason = cleanString(obj.reason);
39
+ if (requiredReviewers.length > 0)
40
+ recipe.requiredReviewers = requiredReviewers;
41
+ if (forbiddenFiles.length > 0)
42
+ recipe.forbiddenFiles = forbiddenFiles;
43
+ if (riskSurface)
44
+ recipe.riskSurface = riskSurface;
45
+ if (reason)
46
+ recipe.reason = reason;
47
+ return recipe;
48
+ }
49
+ function cleanCommandList(value) {
50
+ if (!Array.isArray(value))
51
+ return [];
52
+ return unique(value
53
+ .slice(0, MAX_LIST_ITEMS)
54
+ .filter((entry) => typeof entry === 'string' && !entry.includes('\0') && !/[\r\n]/.test(entry))
55
+ .map(cleanString)
56
+ .filter((entry) => Boolean(entry)));
57
+ }
58
+ function cleanPatternList(value) {
59
+ if (!Array.isArray(value))
60
+ return [];
61
+ return unique(value
62
+ .slice(0, MAX_LIST_ITEMS)
63
+ .map(cleanString)
64
+ .filter((entry) => typeof entry === 'string' && !/[`<>]/.test(entry)));
65
+ }
66
+ function cleanReviewerList(value) {
67
+ if (!Array.isArray(value))
68
+ return [];
69
+ return unique(value
70
+ .slice(0, MAX_LIST_ITEMS)
71
+ .map(cleanString)
72
+ .filter((entry) => typeof entry === 'string' && REVIEWER_PATTERN.test(entry)));
73
+ }
74
+ function cleanRecipeId(value) {
75
+ const id = cleanString(value);
76
+ return id && ID_PATTERN.test(id) ? id : undefined;
77
+ }
78
+ function cleanString(value) {
79
+ if (typeof value !== 'string')
80
+ return undefined;
81
+ if (/[\0\r\n\t]/.test(value))
82
+ return undefined;
83
+ const trimmed = value.trim().replace(/\s+/g, ' ');
84
+ if (!trimmed || trimmed.length > MAX_STRING_LENGTH)
85
+ return undefined;
86
+ return trimmed;
87
+ }
88
+ function unique(values) {
89
+ return [...new Set(values)];
90
+ }
91
+ //# sourceMappingURL=configProofRecipes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configProofRecipes.js","sourceRoot":"","sources":["../../src/utils/configProofRecipes.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAG,EAAE,CAAC;AACvB,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAC9B,MAAM,UAAU,GAAG,oCAAoC,CAAC;AACxD,MAAM,gBAAgB,GAAG,qCAAqC,CAAC;AAE/D,M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AS,MAAM,CAAI,MAAW;IAC5B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
package/docs/GUIDE.md CHANGED
@@ -22,7 +22,16 @@ This guide starts with demonstrated workflows before the command reference. For
22
22
  - [ci](#ci)
23
23
  - [diff](#diff)
24
24
  - [fix](#fix)
25
- - [explain](#explain)
25
+ - [explain-issue](#explain-issue)
26
+ - [assess](#assess)
27
+ - [simulate](#simulate)
28
+ - [prove](#prove)
29
+ - [evidence-pack](#evidence-pack)
30
+ - [privacy-check](#privacy-check)
31
+ - [mission-proof](#mission-proof)
32
+ - [trial](#trial)
33
+ - [telemetry](#telemetry)
34
+ - [dogfood](#dogfood)
26
35
  - [diagram](#diagram)
27
36
  - [structure](#structure)
28
37
  - [dependencies](#dependencies)
@@ -32,7 +41,6 @@ This guide starts with demonstrated workflows before the command reference. For
32
41
  - [coverage](#coverage)
33
42
  - [badge](#badge)
34
43
  - [mcp](#mcp)
35
- - [dogfood](#dogfood)
36
44
  - [Health Score](#health-score)
37
45
  - [Output Formats](#output-formats)
38
46
  - [Console](#console-default)
@@ -113,6 +121,7 @@ paths.
113
121
 
114
122
  ```bash
115
123
  projscan start --intent "what files do I need to change for auth?"
124
+ projscan start --intent "is my agent allowed to change billing retry logic?"
116
125
  projscan understand --view change --intent "add auth token refresh" --format json
117
126
  projscan prove --intent "is my agent allowed to change billing retry logic?"
118
127
  projscan preflight --mode before_edit --format json
@@ -121,21 +130,47 @@ projscan preflight --mode before_edit --format json
121
130
  Success criteria: the agent starts with cited files, change-readiness evidence,
122
131
  an executable Proof Contract, and a before-edit gate instead of a free-form plan.
123
132
 
124
- ### Before handing work to an agent
133
+ ### Verified change workflow
125
134
 
126
135
  ```bash
136
+ projscan start --intent "is my agent allowed to change billing retry logic?"
127
137
  projscan prove --intent "is my agent allowed to change billing retry logic?" --save-contract .projscan/proof-contract.json
128
- projscan prove --record-command "npm test -- tests/billing/retry.test.ts" --exit-code 0 --duration-ms 1842 --summary "billing retry tests passed"
138
+ # Make the bounded edit, then run the proof command.
139
+ projscan prove --run -- npm test -- tests/billing/retry.test.ts
129
140
  projscan prove --changed --contract .projscan/proof-contract.json --format markdown
130
141
  ```
131
142
 
143
+ The path is `start -> prove -> run -> changed`. Agent-permission intents route
144
+ from `start` to `prove`. Intent mode writes a contract only when
145
+ `--save-contract` is present. Make the bounded edit after the contract exists
146
+ and before run mode. Run mode executes an explicit local command after the `--`
147
+ delimiter, captures exit code, duration, redacted output, log path, and
148
+ changed-file fingerprint, then appends a `prove-run` row to the local ledger.
149
+ Record mode remains available for imported CI or external evidence when
150
+ projscan did not run the command. Changed mode checks the working tree against
151
+ the contract and local ledger.
152
+
132
153
  Success criteria: the agent gets allowed files, forbidden files, risky contracts,
133
154
  likely tests, proof commands, rollback notes, confidence, and reviewer guidance
134
155
  before editing. After editing, the Proof Receipt shows whether the actual working
135
156
  tree stayed inside scope and classifies changed files as allowed production,
136
157
  expected tests, docs, generated proof artifacts, config/security drift,
137
- forbidden touches, or unexpected production. It also reports whether proof
138
- commands passed and whether that proof is stale after newer edits.
158
+ forbidden touches, or unexpected production. The receipt reports proof command
159
+ state, freshness after newer edits, proof replay status, `proofReplay` timeline
160
+ events, `changedAfterProof`, receipt fingerprint, and sufficiency for the
161
+ changed risk surface.
162
+
163
+ Every prove report includes `verifiedWorkflow`, a compact JSON summary for agents
164
+ and MCP clients. It names the phase, next action, next command, scope status,
165
+ proof status, proof sufficiency status, risk delta direction, reviewer decision,
166
+ and stale/missing/failed proof flags.
167
+
168
+ Team Proof Recipes let the repo encode path-specific proof in `proofRecipes`;
169
+ when a matching recipe is configured, `prove --intent` adds its required
170
+ commands, reviewers, and forbidden files to the Proof Contract. `prove --changed`
171
+ and `projscan evidence-pack --pr-comment` then show missing recipe proof,
172
+ required reviewers, and recipe drift in the Proof Receipt. A recipe does not run proof commands by itself. Use `prove --run -- <command...>` or
173
+ `prove --record-command` to add proof to the local ledger.
139
174
 
140
175
  ### Before handoff or commit
141
176
 
@@ -168,18 +203,25 @@ and does not execute the plan.
168
203
 
169
204
  `projscan prove --intent "<change>"` turns the simulation into an executable
170
205
  Proof Contract for humans, agents, CI, and reviewers. Intent mode is read-only
171
- unless `--save-contract <path>` is supplied. `projscan prove --changed` reads
172
- that contract, checks local git changed-file evidence, and emits a Proof Receipt
173
- with changed-file classes, proof replay status, a reviewer checklist, and a
174
- copyable decision. Use `projscan prove --record-command "<command>" --exit-code
175
- <code> --duration-ms <ms>` to append a local Proof Ledger row before replaying
176
- the receipt. The ledger stores command, exit code, duration, changed-file
177
- fingerprint, redacted summary, and optional log path under `.projscan/`. If no
178
- contract exists, changed mode still reports the working tree, but marks the
179
- result as needing review because there is no contract to enforce. When you pass
180
- `--feedback .projscan-feedback.json`, Trust Memory can lower the confidence
181
- reason when prior reviewers reported missing signals, noisy findings, false
182
- positives, or rejected proof outcomes.
206
+ unless `--save-contract <path>` is supplied. Use `projscan prove --run --
207
+ <command...>` when projscan should execute a local proof command and append the
208
+ result. Use `projscan prove --record-command "<command>" --exit-code <code>
209
+ --duration-ms <ms>` only when importing proof from CI or another runner.
210
+ `projscan prove --changed` reads the contract, checks local git changed-file
211
+ evidence, and emits a Proof Receipt with changed-file classes, proof replay
212
+ status, Proof Sufficiency, a Verified Workflow section, a reviewer checklist,
213
+ and a copyable decision. The contract JSON includes `proofRequirements`; the
214
+ receipt JSON includes `proofReplay` with replay status, timeline events,
215
+ `changedAfterProof`, replay command, and receipt fingerprint. It also includes
216
+ `proofSufficiency` with strong, adequate, weak, missing, stale, or failed proof
217
+ per changed risk surface. The ledger stores command, exit code, duration,
218
+ changed-file fingerprint, redacted summary, source, and log path under `.projscan/`. Local
219
+ `.projscan/` proof artifacts do not count as scope drift. If no contract exists,
220
+ changed mode still reports the working tree, but marks the result as needing
221
+ review because there is no contract to enforce. When you pass `--feedback
222
+ .projscan-feedback.json`, Trust Memory can lower the confidence reason when
223
+ prior reviewers reported missing signals, noisy findings, false positives, or
224
+ rejected proof outcomes.
183
225
 
184
226
  Weekly or before a larger refactor, run the broader assessment and simulator:
185
227
 
@@ -293,7 +335,7 @@ When the agent first opens a repo, or before starting a refactor, the question i
293
335
  - **`projscan_quality_scorecard` / `projscan quality-scorecard`** — dimensioned quality view across health, security, tests, maintainability, coordination, top risks, and verification commands.
294
336
  - **`projscan_assess` / `projscan assess`** — proof-first assessment. Composes quality-scorecard, bug-hunt, and preflight into Proof Cards with local evidence, impact, a safe fix shape, verification commands, feedback or suppression guidance, and risk delta. Proof Cards include evidence strength, confidence reason, ranking reasons, trust memory, evidence gaps, and an AgentLoopKit handoff packet. Use `projscan assess --goal "make this repo safer to ship this week"` for a broad weekly pass, `projscan assess --mode fix-first --format markdown` when you want one or two next actions instead of a long list, `--feedback .projscan-feedback.json` when local reviewer memory should affect ranking, or `--baseline previous-assess.json` to compare against a prior assessment. The command is read-only and does not release, tag, publish, or deploy.
295
337
  - **`projscan_simulate` / `projscan simulate`** — risk delta simulator. Evaluates a proposed change plan before editing and returns likely touched files, affected tests, contract surfaces, rollout steps, proof commands, confidence, projected before/after risk, alternatives, and a recommended option. Use `projscan simulate --plan "split bugHunt.ts into ranking, evidence, and output modules"` before doing a refactor. The command is read-only and does not execute the plan.
296
- - **`projscan_prove` / `projscan prove`** — executable Proof Contracts and Proof Replay. Use `projscan prove --intent "<change>"` before editing to get allowed files, forbidden files, risky contracts, likely tests, proof commands, rollback, confidence, Trust Memory signals, and reviewer guidance. Use `projscan prove --record-command "<command>" --exit-code <code>` to record proof outcomes in the local ledger. Use `projscan prove --changed --contract .projscan/proof-contract.json --format markdown` after editing to produce a Proof Receipt with changed-file classes, scope drift, forbidden touches, proof status, stale proof, failed proof, risk delta, reviewer decision, and commit readiness.
338
+ - **`projscan_prove` / `projscan prove`** — executable Proof Contracts, Verified Workflow JSON, Proof Replay, and Proof Sufficiency. Use `projscan prove --intent "<change>"` before editing to get allowed files, forbidden files, risky contracts, likely tests, proof commands, rollback, confidence, Trust Memory signals, reviewer guidance, and `proofRequirements`. Use `projscan prove --run -- <command...>` to execute a local proof command and record a `prove-run` ledger row. Use `projscan prove --record-command "<command>" --exit-code <code>` for imported proof outcomes from CI or another runner. Use `projscan prove --changed --contract .projscan/proof-contract.json --format markdown` after editing to produce a Proof Receipt with changed-file classes, scope drift, forbidden touches, proof status, `proofReplay`, `changedAfterProof`, receipt fingerprint, `proofSufficiency`, stale proof, failed proof, risk delta, reviewer decision, and commit readiness. MCP can create and replay contracts and record imported proof; only the CLI `prove --run` executes local commands. Read `verifiedWorkflow` when an agent needs the next action without parsing Markdown.
297
339
  - **`projscan_understand` / `projscan understand`** — cited repo-comprehension surface. Returns repo maps, runtime flow maps, contract maps, change-readiness guidance, verification tiers, unknowns, read-first files, and exact next commands.
298
340
  - **`projscan_adoption` / `projscan init team` / `projscan init mcp` / `projscan mcp doctor` / `projscan init policy` / `projscan init github-action` / `projscan recipes` / `projscan first-run` / `projscan telemetry` / `projscan dogfood`** — adoption layer. Returns MCP client config snippets, setup verification, policy starters, PR workflow scaffolding with validated PR comments and block-only enforcement, baseline memory, ownership routing, first-PR onboarding steps, repeatable team-bootstrap and PR-automation recipes, multi-repo dogfood evidence, measured reviewer feedback, default-off telemetry controls, adoption trial reports, and setup diagnostics.
299
341
  - **`projscan_release_train` / `projscan release-train`** — product-line readiness planner. Plans upcoming product lines with version, scope, readiness, and next-action evidence.
@@ -720,6 +762,14 @@ projscan fix -y
720
762
  | Test framework | `vitest.config.ts` + sample test file, adds `test` script to package.json | `vitest` |
721
763
  | EditorConfig | `.editorconfig` (UTF-8, LF, 2-space indent, trim trailing whitespace) | Nothing |
722
764
 
765
+ ### explain-issue
766
+
767
+ ```bash
768
+ projscan explain-issue <issue_id>
769
+ ```
770
+
771
+ Shows the code excerpt, related issues in the same file, similar past fixes from git history, and the structured fix suggestion for one issue id.
772
+
723
773
  ### diagram
724
774
 
725
775
  ```bash
@@ -882,10 +932,62 @@ projscan mcp --watch # 1.3+: also push notifications/file_changed on every ba
882
932
 
883
933
  Runs ProjScan as an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server over stdio. AI coding agents (Claude Code, Cursor, Windsurf, any MCP client) can call ProjScan during a session to ground their suggestions in live project state.
884
934
 
885
- With `--watch`, the server starts an in-process file watcher and emits a JSON-RPC `notifications/file_changed` notification on every debounced batch (paths + post-update graph size + timestamp). The capability is advertised under `experimental.fileChanged` on the `initialize` response so clients can detect support before subscribing. Off by default agents that don't need push updates pay nothing for it.
935
+ With `--watch`, the server starts an in-process file watcher and emits a JSON-RPC `notifications/file_changed` notification on every debounced batch (paths + post-update graph size + timestamp). The capability is advertised under `experimental.fileChanged` on the `initialize` response so clients can detect support before subscribing. Agents that do not need push updates can leave it off.
886
936
 
887
937
  See [MCP Server for AI Agents](#mcp-server-for-ai-agents).
888
938
 
939
+ ### assess
940
+
941
+ ```bash
942
+ projscan assess --goal "make this repo safer to ship this week" --format json
943
+ projscan assess --mode fix-first --format markdown
944
+ ```
945
+
946
+ Runs a proof-first assessment from local quality, bug-hunt, preflight, hotspot, and feedback evidence. Use `--mode fix-first` when you want one or two ranked actions instead of a long report.
947
+
948
+ ### simulate
949
+
950
+ ```bash
951
+ projscan simulate --plan "split bugHunt.ts into ranking, evidence, and output modules" --format json
952
+ ```
953
+
954
+ Predicts likely files, affected tests, contract surfaces, rollout steps, proof commands, and before/after risk for a proposed plan. It is read-only: it does not edit files, run tests, tag, publish, or deploy.
955
+
956
+ ### prove
957
+
958
+ ```bash
959
+ projscan prove --intent "is my agent allowed to change billing retry logic?" --save-contract .projscan/proof-contract.json
960
+ # Make the bounded edit, then run the proof command.
961
+ projscan prove --run -- npm test -- tests/billing/retry.test.ts
962
+ projscan prove --changed --contract .projscan/proof-contract.json --format markdown
963
+ ```
964
+
965
+ Creates a local Proof Contract, records explicit proof command outcomes in the Proof Ledger, and checks the current working tree against the saved contract after the edit. `prove --run` executes only the command after `--` and keeps shell execution disabled. `prove --record-command` imports external proof into the local ledger without running it.
966
+
967
+ ### evidence-pack
968
+
969
+ ```bash
970
+ projscan evidence-pack --pr-comment
971
+ ```
972
+
973
+ Builds a reviewer-facing evidence packet from release-train, bug-hunt, workplan, preflight, and the latest Proof Receipt when available. Use the PR comment output when reviewers need risk, owner, proof, and next-command context in one Markdown block.
974
+
975
+ ### privacy-check
976
+
977
+ ```bash
978
+ projscan privacy-check --format markdown
979
+ ```
980
+
981
+ Shows which paths projscan reads, which files stay ignored, which features can touch the network, and whether telemetry can send anything from the current configuration.
982
+
983
+ ### mission-proof
984
+
985
+ ```bash
986
+ projscan mission-proof --mission .projscan/mission --format markdown
987
+ ```
988
+
989
+ Summarizes saved Mission Control proof logs, pass/fail status, reviewer gate evidence, reruns, and optional manual baseline comparisons.
990
+
889
991
  ### session _(1.4+)_
890
992
 
891
993
  ```bash
@@ -1090,6 +1192,15 @@ ProjScan loads a project-wide config from one of:
1090
1192
  "severityOverrides": {
1091
1193
  "missing-prettier": "info"
1092
1194
  },
1195
+ "proofRecipes": [
1196
+ {
1197
+ "id": "billing-critical",
1198
+ "matches": ["src/billing/**"],
1199
+ "requiredCommands": ["npm test -- tests/billing/retry.test.ts"],
1200
+ "requiredReviewers": ["@platform"],
1201
+ "forbiddenFiles": ["src/auth/**"]
1202
+ }
1203
+ ],
1093
1204
  "reportPolicies": {
1094
1205
  "apiEvidence": {
1095
1206
  "reportScope": ["src/api", "packages/backend"],
@@ -1117,6 +1228,7 @@ ProjScan loads a project-wide config from one of:
1117
1228
  | `disableRules` | string[] | Silence rules by id. Exact match (`missing-prettier`) or wildcard prefix (`large-*`). |
1118
1229
  | `suppress` | `Record<string, string[]>` | Silence a rule only for matching paths/globs, for example `{ "hardcoded-secret": ["src/firebase.ts"] }`. Other rules still run on that file. |
1119
1230
  | `severityOverrides` | `Record<string, 'info' \| 'warning' \| 'error'>` | Remap a rule's severity. Useful for downgrading project-specific false positives without disabling them. |
1231
+ | `proofRecipes` | `{ id: string; matches: string[]; requiredCommands: string[]; requiredReviewers?: string[]; forbiddenFiles?: string[]; riskSurface?: string; reason?: string }[]` | Add Team Proof Recipes to `projscan prove` contracts and receipts when a matching recipe is configured. Recipes without a command are skipped; recipes do not execute commands. |
1120
1232
  | `reportPolicies` | `Record<string, { reportScope?: string[]; redactPaths?: boolean }>` | Named evidence export presets selected with `--report-policy <name>` on `analyze`, `doctor`, and `ci`. |
1121
1233
  | `hotspots.limit` | number (1–100) | Default limit for `projscan hotspots`. |
1122
1234
  | `hotspots.since` | string | Default git history window for `projscan hotspots`. |
@@ -1129,6 +1241,14 @@ Use inline suppressions for a single confirmed false positive:
1129
1241
  const firebaseKey = "AIza..." // projscan-ignore-line hardcoded-secret -- Firebase web keys are public identifiers
1130
1242
  ```
1131
1243
 
1244
+ Use `proofRecipes` when a sensitive path needs team proof. When a matching
1245
+ recipe is configured, `projscan prove` adds its commands, reviewers, and
1246
+ forbidden files to the Proof Contract and Proof Receipt. The recipe does not run proof commands by itself.
1247
+ Recipe IDs and reviewer handles use a conservative identifier shape, duplicate
1248
+ recipe IDs keep the first recipe, and path patterns support exact paths plus
1249
+ `*` and `**` globs. Broad `forbiddenFiles` globs can mark many changed files as
1250
+ drift, so keep them scoped to the smallest risky area.
1251
+
1132
1252
  ### Embedded config in `package.json`
1133
1253
 
1134
1254
  If you prefer to keep everything in `package.json`:
@@ -1234,7 +1354,7 @@ projscan ci --help
1234
1354
 
1235
1355
  ### Languages
1236
1356
 
1237
- ProjScan maps file extensions to language names. Supported languages include TypeScript, JavaScript, Python, Go, Rust, Java, C#, C++, C, Ruby, PHP, Swift, Kotlin, Dart, Lua, Scala, R, Shell, CSS, SCSS/Sass, HTML, JSON, YAML, Markdown, SQL, and more.
1357
+ ProjScan maps file extensions to language names. AST-aware adapters cover TypeScript, JavaScript, Python, Go, Rust, Java, C#, C++, Ruby, PHP, Swift, and Kotlin. File-level detection also covers C, Dart, Lua, Scala, R, Shell, CSS, SCSS/Sass, HTML, JSON, YAML, Markdown, SQL, and related project files.
1238
1358
 
1239
1359
  The **primary language** is the one with the most files.
1240
1360
 
@@ -1368,7 +1488,7 @@ This is heuristic-based and works best with conventional project structures. Pro
1368
1488
 
1369
1489
  ## File Explanation Engine
1370
1490
 
1371
- The `explain` command performs regex-based static analysis. It does not execute your code or make network calls.
1491
+ The `explain-issue` command performs regex-based static analysis around one issue. It does not execute your code or make network calls.
1372
1492
 
1373
1493
  **Import detection** handles:
1374
1494
 
@@ -1445,7 +1565,7 @@ _Structural / agent-native:_
1445
1565
  - `projscan_quality_scorecard` — dimensioned quality view with top risks and verification commands.
1446
1566
  - `projscan_assess` — proof-first assessment with Proof Cards, risk delta, and fix-first guidance.
1447
1567
  - `projscan_simulate` — risk delta simulator for proposed change plans before editing.
1448
- - `projscan_prove` — executable Proof Contracts, local Proof Ledger rows, and replayed Proof Receipts for proposed and completed changes.
1568
+ - `projscan_prove` — Proof Contracts and Proof Receipts for proposed and completed changes. MCP records and replays imported proof; only CLI `prove --run` executes commands.
1449
1569
  - `projscan_adoption` — adoption helper for MCP client snippets, MCP setup doctor, agent workflow recipes, and first-run diagnostics.
1450
1570
  - `projscan_release_train` — product-line readiness plan with scope and next-action evidence.
1451
1571
  - `projscan_evidence_pack` — approval packet with planning, bug-hunt, workplan, preflight, changelog, and website prompt evidence.
@@ -1608,7 +1728,7 @@ ProjScan has three first-class CI integration paths:
1608
1728
 
1609
1729
  ### 1. First-party GitHub Action (recommended)
1610
1730
 
1611
- The easiest path - installs projscan, runs the health gate, uploads SARIF to GitHub Code Scanning.
1731
+ The GitHub Action installs projscan, runs the health gate, and uploads SARIF to GitHub Code Scanning.
1612
1732
 
1613
1733
  ```yaml
1614
1734
  name: ProjScan
@@ -1691,7 +1811,7 @@ projscan diff --format json # Shows new/resolved issues + hotspot movem
1691
1811
 
1692
1812
  ### "No package.json found"
1693
1813
 
1694
- The `dependencies` and `fix` commands require a `package.json` in the current directory. Other commands (`analyze`, `structure`, `diagram`, `explain`) work without one.
1814
+ The `dependencies` and `fix` commands require a `package.json` in the current directory. Other commands (`analyze`, `structure`, `diagram`, `explain-issue`) work without one.
1695
1815
 
1696
1816
  ### Scan is slow
1697
1817
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "projscan",
3
3
  "mcpName": "io.github.abhiyoheswaran1/projscan",
4
- "version": "4.13.0",
4
+ "version": "4.15.0",
5
5
  "description": "Local code intelligence for agent-assisted engineering. Focused daily workflows for repo orientation before edits, proof before handoff or commit, and release-candidate review, with AST-backed evidence through an MCP server and CLI. Runs locally by default.",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",