projscan 4.14.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 (186) hide show
  1. package/README.md +71 -21
  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 +172 -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/intentRouterKeywordToolGuards.js +1 -55
  59. package/dist/core/intentRouterKeywordToolGuards.js.map +1 -1
  60. package/dist/core/intentRouterKeywordWeights.js +13 -28
  61. package/dist/core/intentRouterKeywordWeights.js.map +1 -1
  62. package/dist/core/intentRouterProductGuardSignals.d.ts +3 -0
  63. package/dist/core/intentRouterProductGuardSignals.js +59 -0
  64. package/dist/core/intentRouterProductGuardSignals.js.map +1 -0
  65. package/dist/core/markdownSafety.d.ts +3 -0
  66. package/dist/core/markdownSafety.js +14 -0
  67. package/dist/core/markdownSafety.js.map +1 -0
  68. package/dist/core/preflight.d.ts +2 -0
  69. package/dist/core/preflight.js.map +1 -1
  70. package/dist/core/preflightChangedFiles.d.ts +2 -0
  71. package/dist/core/preflightChangedFiles.js +1 -1
  72. package/dist/core/preflightChangedFiles.js.map +1 -1
  73. package/dist/core/preflightInputs.d.ts +2 -0
  74. package/dist/core/preflightInputs.js +5 -2
  75. package/dist/core/preflightInputs.js.map +1 -1
  76. package/dist/core/proofLedger.d.ts +5 -1
  77. package/dist/core/proofLedger.js +161 -12
  78. package/dist/core/proofLedger.js.map +1 -1
  79. package/dist/core/proofReplay.d.ts +9 -0
  80. package/dist/core/proofReplay.js +164 -0
  81. package/dist/core/proofReplay.js.map +1 -0
  82. package/dist/core/proofSufficiency.d.ts +19 -0
  83. package/dist/core/proofSufficiency.js +425 -0
  84. package/dist/core/proofSufficiency.js.map +1 -0
  85. package/dist/core/prove.d.ts +6 -0
  86. package/dist/core/prove.js +277 -87
  87. package/dist/core/prove.js.map +1 -1
  88. package/dist/core/qualityScorecard.js +8 -238
  89. package/dist/core/qualityScorecard.js.map +1 -1
  90. package/dist/core/qualityScorecardDimensions.d.ts +14 -0
  91. package/dist/core/qualityScorecardDimensions.js +99 -0
  92. package/dist/core/qualityScorecardDimensions.js.map +1 -0
  93. package/dist/core/qualityScorecardRisks.d.ts +8 -0
  94. package/dist/core/qualityScorecardRisks.js +107 -0
  95. package/dist/core/qualityScorecardRisks.js.map +1 -0
  96. package/dist/core/qualityScorecardSignals.d.ts +20 -0
  97. package/dist/core/qualityScorecardSignals.js +59 -0
  98. package/dist/core/qualityScorecardSignals.js.map +1 -0
  99. package/dist/core/releaseEvidence.d.ts +1 -0
  100. package/dist/core/releaseEvidence.js +15 -40
  101. package/dist/core/releaseEvidence.js.map +1 -1
  102. package/dist/core/releaseEvidenceBaseline.js +4 -1
  103. package/dist/core/releaseEvidenceBaseline.js.map +1 -1
  104. package/dist/core/releaseEvidenceProofReceipt.d.ts +6 -0
  105. package/dist/core/releaseEvidenceProofReceipt.js +140 -0
  106. package/dist/core/releaseEvidenceProofReceipt.js.map +1 -0
  107. package/dist/core/releaseEvidenceVerdict.d.ts +5 -2
  108. package/dist/core/releaseEvidenceVerdict.js +39 -1
  109. package/dist/core/releaseEvidenceVerdict.js.map +1 -1
  110. package/dist/core/repositoryScanner.d.ts +1 -0
  111. package/dist/core/repositoryScanner.js +5 -4
  112. package/dist/core/repositoryScanner.js.map +1 -1
  113. package/dist/core/sessionResources.d.ts +14 -2
  114. package/dist/core/sessionResources.js +3 -3
  115. package/dist/core/sessionResources.js.map +1 -1
  116. package/dist/core/startInputs.d.ts +1 -1
  117. package/dist/core/startIntentTargets.d.ts +1 -1
  118. package/dist/core/startIntentTargets.js +1 -16
  119. package/dist/core/startIntentTargets.js.map +1 -1
  120. package/dist/core/startMissionInputStatusPolicy.d.ts +7 -0
  121. package/dist/core/startMissionInputStatusPolicy.js +74 -0
  122. package/dist/core/startMissionInputStatusPolicy.js.map +1 -0
  123. package/dist/core/startMissionPolicy.d.ts +6 -15
  124. package/dist/core/startMissionPolicy.js +4 -305
  125. package/dist/core/startMissionPolicy.js.map +1 -1
  126. package/dist/core/startMissionProofPolicy.d.ts +6 -0
  127. package/dist/core/startMissionProofPolicy.js +84 -0
  128. package/dist/core/startMissionProofPolicy.js.map +1 -0
  129. package/dist/core/startMissionRiskPolicy.d.ts +4 -0
  130. package/dist/core/startMissionRiskPolicy.js +85 -0
  131. package/dist/core/startMissionRiskPolicy.js.map +1 -0
  132. package/dist/core/startMissionRoutingPolicy.d.ts +6 -0
  133. package/dist/core/startMissionRoutingPolicy.js +67 -0
  134. package/dist/core/startMissionRoutingPolicy.js.map +1 -0
  135. package/dist/core/startMode.d.ts +1 -2
  136. package/dist/core/startMode.js +4 -151
  137. package/dist/core/startMode.js.map +1 -1
  138. package/dist/core/startModeIntentPolicy.d.ts +12 -0
  139. package/dist/core/startModeIntentPolicy.js +41 -0
  140. package/dist/core/startModeIntentPolicy.js.map +1 -0
  141. package/dist/core/startModeRoutingPolicy.d.ts +4 -0
  142. package/dist/core/startModeRoutingPolicy.js +117 -0
  143. package/dist/core/startModeRoutingPolicy.js.map +1 -0
  144. package/dist/core/startSearchQueryTargets.d.ts +1 -0
  145. package/dist/core/startSearchQueryTargets.js +17 -0
  146. package/dist/core/startSearchQueryTargets.js.map +1 -0
  147. package/dist/core/workplan.d.ts +3 -2
  148. package/dist/core/workplan.js +11 -585
  149. package/dist/core/workplan.js.map +1 -1
  150. package/dist/core/workplanCoordinationTasks.d.ts +3 -0
  151. package/dist/core/workplanCoordinationTasks.js +82 -0
  152. package/dist/core/workplanCoordinationTasks.js.map +1 -0
  153. package/dist/core/workplanModeTasks.d.ts +2 -0
  154. package/dist/core/workplanModeTasks.js +192 -0
  155. package/dist/core/workplanModeTasks.js.map +1 -0
  156. package/dist/core/workplanPreflightTasks.d.ts +2 -0
  157. package/dist/core/workplanPreflightTasks.js +126 -0
  158. package/dist/core/workplanPreflightTasks.js.map +1 -0
  159. package/dist/core/workplanQualitySignals.d.ts +7 -0
  160. package/dist/core/workplanQualitySignals.js +63 -0
  161. package/dist/core/workplanQualitySignals.js.map +1 -0
  162. package/dist/core/workplanReport.d.ts +4 -0
  163. package/dist/core/workplanReport.js +79 -0
  164. package/dist/core/workplanReport.js.map +1 -0
  165. package/dist/core/workplanRiskOwnership.d.ts +5 -0
  166. package/dist/core/workplanRiskOwnership.js +97 -0
  167. package/dist/core/workplanRiskOwnership.js.map +1 -0
  168. package/dist/core/workplanSuggestedActions.d.ts +2 -0
  169. package/dist/core/workplanSuggestedActions.js +43 -0
  170. package/dist/core/workplanSuggestedActions.js.map +1 -0
  171. package/dist/mcp/tools/prove.js +23 -17
  172. package/dist/mcp/tools/prove.js.map +1 -1
  173. package/dist/projscan-sbom.cdx.json +6 -6
  174. package/dist/tool-manifest.json +2 -2
  175. package/dist/types/config.d.ts +15 -0
  176. package/dist/types/evidencePack.d.ts +21 -0
  177. package/dist/types/prove.d.ts +79 -0
  178. package/dist/utils/changedFiles.js +57 -16
  179. package/dist/utils/changedFiles.js.map +1 -1
  180. package/dist/utils/config.js +2 -0
  181. package/dist/utils/config.js.map +1 -1
  182. package/dist/utils/configProofRecipes.d.ts +2 -0
  183. package/dist/utils/configProofRecipes.js +91 -0
  184. package/dist/utils/configProofRecipes.js.map +1 -0
  185. package/docs/GUIDE.md +120 -19
  186. 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,CAAC;AAU7E;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,QAAgB,EAChB,eAAwB;IAExB,MAAM,MAAM,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,CAAC;IACzC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO;YACL,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,sBAAsB;YAC9B,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,EAAE;YACT,gBAAgB,EAAE,EAAE;S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C;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,OAA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AC,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,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtB,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACvB,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACtB,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5B,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB,sBAAsB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjC,mBAAmB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC9B,iBAAiB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAC5B,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACxB,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACrB,OAAO,GAAG,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,MAAM,UAAU,iBAAiB,CAAC,GAA4B,EAAE,GAAmB;IACjF,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;QAAE,OAAO;IAC7C,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAClC,MAAM,OAAO,GAAwB,EAAE,CAAC;IACxC,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC;QAC5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AAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACrC,OAAO,MAAM,CACX,KAAK;SACF,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC;SACxB,GAAG,CAAC,WAAW,CAAC;SAChB,MAAM,CAAC,CAAC,KAAK,EAAmB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CACjG,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,MAAM,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,EAAE,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACpD,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClD,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,iBAAiB;QAAE,OAAO,SAAS,CAAC;IACrE,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,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)
@@ -127,14 +135,16 @@ an executable Proof Contract, and a before-edit gate instead of a free-form plan
127
135
  ```bash
128
136
  projscan start --intent "is my agent allowed to change billing retry logic?"
129
137
  projscan prove --intent "is my agent allowed to change billing retry logic?" --save-contract .projscan/proof-contract.json
138
+ # Make the bounded edit, then run the proof command.
130
139
  projscan prove --run -- npm test -- tests/billing/retry.test.ts
131
140
  projscan prove --changed --contract .projscan/proof-contract.json --format markdown
132
141
  ```
133
142
 
134
143
  The path is `start -> prove -> run -> changed`. Agent-permission intents route
135
144
  from `start` to `prove`. Intent mode writes a contract only when
136
- `--save-contract` is present. Run mode executes an explicit local command after
137
- the `--` delimiter, captures exit code, duration, redacted output, log path, and
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
138
148
  changed-file fingerprint, then appends a `prove-run` row to the local ledger.
139
149
  Record mode remains available for imported CI or external evidence when
140
150
  projscan did not run the command. Changed mode checks the working tree against
@@ -145,13 +155,22 @@ likely tests, proof commands, rollback notes, confidence, and reviewer guidance
145
155
  before editing. After editing, the Proof Receipt shows whether the actual working
146
156
  tree stayed inside scope and classifies changed files as allowed production,
147
157
  expected tests, docs, generated proof artifacts, config/security drift,
148
- forbidden touches, or unexpected production. It also reports whether proof
149
- 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.
150
162
 
151
163
  Every prove report includes `verifiedWorkflow`, a compact JSON summary for agents
152
164
  and MCP clients. It names the phase, next action, next command, scope status,
153
- proof status, risk delta direction, reviewer decision, and stale/missing/failed
154
- proof flags.
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.
155
174
 
156
175
  ### Before handoff or commit
157
176
 
@@ -187,12 +206,16 @@ Proof Contract for humans, agents, CI, and reviewers. Intent mode is read-only
187
206
  unless `--save-contract <path>` is supplied. Use `projscan prove --run --
188
207
  <command...>` when projscan should execute a local proof command and append the
189
208
  result. Use `projscan prove --record-command "<command>" --exit-code <code>
190
- --duration-ms <ms>` only when importing proof from CI or another trusted runner.
209
+ --duration-ms <ms>` only when importing proof from CI or another runner.
191
210
  `projscan prove --changed` reads the contract, checks local git changed-file
192
211
  evidence, and emits a Proof Receipt with changed-file classes, proof replay
193
- status, a Verified Workflow section, a reviewer checklist, and a copyable
194
- decision. The ledger stores command, exit code, duration, changed-file
195
- fingerprint, redacted summary, source, and log path under `.projscan/`. Local
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
196
219
  `.projscan/` proof artifacts do not count as scope drift. If no contract exists,
197
220
  changed mode still reports the working tree, but marks the result as needing
198
221
  review because there is no contract to enforce. When you pass `--feedback
@@ -312,7 +335,7 @@ When the agent first opens a repo, or before starting a refactor, the question i
312
335
  - **`projscan_quality_scorecard` / `projscan quality-scorecard`** — dimensioned quality view across health, security, tests, maintainability, coordination, top risks, and verification commands.
313
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.
314
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.
315
- - **`projscan_prove` / `projscan prove`** — executable Proof Contracts, Verified Workflow JSON, 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 --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, stale proof, failed proof, risk delta, reviewer decision, and commit readiness. Read `verifiedWorkflow` when an agent needs the next action without parsing Markdown.
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.
316
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.
317
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.
318
341
  - **`projscan_release_train` / `projscan release-train`** — product-line readiness planner. Plans upcoming product lines with version, scope, readiness, and next-action evidence.
@@ -739,6 +762,14 @@ projscan fix -y
739
762
  | Test framework | `vitest.config.ts` + sample test file, adds `test` script to package.json | `vitest` |
740
763
  | EditorConfig | `.editorconfig` (UTF-8, LF, 2-space indent, trim trailing whitespace) | Nothing |
741
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
+
742
773
  ### diagram
743
774
 
744
775
  ```bash
@@ -901,10 +932,62 @@ projscan mcp --watch # 1.3+: also push notifications/file_changed on every ba
901
932
 
902
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.
903
934
 
904
- 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.
905
936
 
906
937
  See [MCP Server for AI Agents](#mcp-server-for-ai-agents).
907
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
+
908
991
  ### session _(1.4+)_
909
992
 
910
993
  ```bash
@@ -1109,6 +1192,15 @@ ProjScan loads a project-wide config from one of:
1109
1192
  "severityOverrides": {
1110
1193
  "missing-prettier": "info"
1111
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
+ ],
1112
1204
  "reportPolicies": {
1113
1205
  "apiEvidence": {
1114
1206
  "reportScope": ["src/api", "packages/backend"],
@@ -1136,6 +1228,7 @@ ProjScan loads a project-wide config from one of:
1136
1228
  | `disableRules` | string[] | Silence rules by id. Exact match (`missing-prettier`) or wildcard prefix (`large-*`). |
1137
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. |
1138
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. |
1139
1232
  | `reportPolicies` | `Record<string, { reportScope?: string[]; redactPaths?: boolean }>` | Named evidence export presets selected with `--report-policy <name>` on `analyze`, `doctor`, and `ci`. |
1140
1233
  | `hotspots.limit` | number (1–100) | Default limit for `projscan hotspots`. |
1141
1234
  | `hotspots.since` | string | Default git history window for `projscan hotspots`. |
@@ -1148,6 +1241,14 @@ Use inline suppressions for a single confirmed false positive:
1148
1241
  const firebaseKey = "AIza..." // projscan-ignore-line hardcoded-secret -- Firebase web keys are public identifiers
1149
1242
  ```
1150
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
+
1151
1252
  ### Embedded config in `package.json`
1152
1253
 
1153
1254
  If you prefer to keep everything in `package.json`:
@@ -1253,7 +1354,7 @@ projscan ci --help
1253
1354
 
1254
1355
  ### Languages
1255
1356
 
1256
- 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.
1257
1358
 
1258
1359
  The **primary language** is the one with the most files.
1259
1360
 
@@ -1387,7 +1488,7 @@ This is heuristic-based and works best with conventional project structures. Pro
1387
1488
 
1388
1489
  ## File Explanation Engine
1389
1490
 
1390
- 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.
1391
1492
 
1392
1493
  **Import detection** handles:
1393
1494
 
@@ -1464,7 +1565,7 @@ _Structural / agent-native:_
1464
1565
  - `projscan_quality_scorecard` — dimensioned quality view with top risks and verification commands.
1465
1566
  - `projscan_assess` — proof-first assessment with Proof Cards, risk delta, and fix-first guidance.
1466
1567
  - `projscan_simulate` — risk delta simulator for proposed change plans before editing.
1467
- - `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.
1468
1569
  - `projscan_adoption` — adoption helper for MCP client snippets, MCP setup doctor, agent workflow recipes, and first-run diagnostics.
1469
1570
  - `projscan_release_train` — product-line readiness plan with scope and next-action evidence.
1470
1571
  - `projscan_evidence_pack` — approval packet with planning, bug-hunt, workplan, preflight, changelog, and website prompt evidence.
@@ -1627,7 +1728,7 @@ ProjScan has three first-class CI integration paths:
1627
1728
 
1628
1729
  ### 1. First-party GitHub Action (recommended)
1629
1730
 
1630
- 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.
1631
1732
 
1632
1733
  ```yaml
1633
1734
  name: ProjScan
@@ -1710,7 +1811,7 @@ projscan diff --format json # Shows new/resolved issues + hotspot movem
1710
1811
 
1711
1812
  ### "No package.json found"
1712
1813
 
1713
- 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.
1714
1815
 
1715
1816
  ### Scan is slow
1716
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.14.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",