projscan 2.2.0 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +59 -21
  2. package/dist/cli/commands/agentBrief.d.ts +1 -0
  3. package/dist/cli/commands/agentBrief.js +68 -0
  4. package/dist/cli/commands/agentBrief.js.map +1 -0
  5. package/dist/cli/commands/bugHunt.d.ts +1 -0
  6. package/dist/cli/commands/bugHunt.js +59 -0
  7. package/dist/cli/commands/bugHunt.js.map +1 -0
  8. package/dist/cli/commands/evidencePack.d.ts +1 -0
  9. package/dist/cli/commands/evidencePack.js +70 -0
  10. package/dist/cli/commands/evidencePack.js.map +1 -0
  11. package/dist/cli/commands/init.js +46 -1
  12. package/dist/cli/commands/init.js.map +1 -1
  13. package/dist/cli/commands/preflight.js +16 -0
  14. package/dist/cli/commands/preflight.js.map +1 -1
  15. package/dist/cli/commands/qualityScorecard.d.ts +1 -0
  16. package/dist/cli/commands/qualityScorecard.js +61 -0
  17. package/dist/cli/commands/qualityScorecard.js.map +1 -0
  18. package/dist/cli/commands/recipes.d.ts +2 -0
  19. package/dist/cli/commands/recipes.js +94 -0
  20. package/dist/cli/commands/recipes.js.map +1 -0
  21. package/dist/cli/commands/regressionPlan.d.ts +1 -0
  22. package/dist/cli/commands/regressionPlan.js +77 -0
  23. package/dist/cli/commands/regressionPlan.js.map +1 -0
  24. package/dist/cli/commands/releaseTrain.d.ts +1 -0
  25. package/dist/cli/commands/releaseTrain.js +58 -0
  26. package/dist/cli/commands/releaseTrain.js.map +1 -0
  27. package/dist/cli/commands/workplan.d.ts +1 -0
  28. package/dist/cli/commands/workplan.js +136 -0
  29. package/dist/cli/commands/workplan.js.map +1 -0
  30. package/dist/cli/index.js +17 -0
  31. package/dist/cli/index.js.map +1 -1
  32. package/dist/core/adoption.d.ts +57 -0
  33. package/dist/core/adoption.js +392 -0
  34. package/dist/core/adoption.js.map +1 -0
  35. package/dist/core/agentBrief.d.ts +6 -0
  36. package/dist/core/agentBrief.js +192 -0
  37. package/dist/core/agentBrief.js.map +1 -0
  38. package/dist/core/bugHunt.d.ts +6 -0
  39. package/dist/core/bugHunt.js +278 -0
  40. package/dist/core/bugHunt.js.map +1 -0
  41. package/dist/core/qualityScorecard.d.ts +6 -0
  42. package/dist/core/qualityScorecard.js +220 -0
  43. package/dist/core/qualityScorecard.js.map +1 -0
  44. package/dist/core/regressionPlan.d.ts +7 -0
  45. package/dist/core/regressionPlan.js +226 -0
  46. package/dist/core/regressionPlan.js.map +1 -0
  47. package/dist/core/releaseEvidence.d.ts +7 -0
  48. package/dist/core/releaseEvidence.js +174 -0
  49. package/dist/core/releaseEvidence.js.map +1 -0
  50. package/dist/core/releaseTrain.d.ts +5 -0
  51. package/dist/core/releaseTrain.js +348 -0
  52. package/dist/core/releaseTrain.js.map +1 -0
  53. package/dist/core/workplan.d.ts +12 -0
  54. package/dist/core/workplan.js +440 -0
  55. package/dist/core/workplan.js.map +1 -0
  56. package/dist/index.d.ts +10 -1
  57. package/dist/index.js +8 -0
  58. package/dist/index.js.map +1 -1
  59. package/dist/mcp/tools/adoption.d.ts +2 -0
  60. package/dist/mcp/tools/adoption.js +35 -0
  61. package/dist/mcp/tools/adoption.js.map +1 -0
  62. package/dist/mcp/tools/agentBrief.d.ts +2 -0
  63. package/dist/mcp/tools/agentBrief.js +39 -0
  64. package/dist/mcp/tools/agentBrief.js.map +1 -0
  65. package/dist/mcp/tools/bugHunt.d.ts +2 -0
  66. package/dist/mcp/tools/bugHunt.js +31 -0
  67. package/dist/mcp/tools/bugHunt.js.map +1 -0
  68. package/dist/mcp/tools/evidencePack.d.ts +2 -0
  69. package/dist/mcp/tools/evidencePack.js +39 -0
  70. package/dist/mcp/tools/evidencePack.js.map +1 -0
  71. package/dist/mcp/tools/qualityScorecard.d.ts +2 -0
  72. package/dist/mcp/tools/qualityScorecard.js +26 -0
  73. package/dist/mcp/tools/qualityScorecard.js.map +1 -0
  74. package/dist/mcp/tools/regressionPlan.d.ts +2 -0
  75. package/dist/mcp/tools/regressionPlan.js +47 -0
  76. package/dist/mcp/tools/regressionPlan.js.map +1 -0
  77. package/dist/mcp/tools/releaseTrain.d.ts +2 -0
  78. package/dist/mcp/tools/releaseTrain.js +27 -0
  79. package/dist/mcp/tools/releaseTrain.js.map +1 -0
  80. package/dist/mcp/tools/workplan.d.ts +2 -0
  81. package/dist/mcp/tools/workplan.js +70 -0
  82. package/dist/mcp/tools/workplan.js.map +1 -0
  83. package/dist/mcp/tools.js +16 -0
  84. package/dist/mcp/tools.js.map +1 -1
  85. package/dist/projscan-sbom.cdx.json +6 -6
  86. package/dist/reporters/consoleReporter.js +4 -0
  87. package/dist/reporters/consoleReporter.js.map +1 -1
  88. package/dist/tool-manifest.json +222 -3
  89. package/dist/types.d.ts +240 -0
  90. package/dist/utils/formatSupport.d.ts +11 -0
  91. package/dist/utils/formatSupport.js +11 -0
  92. package/dist/utils/formatSupport.js.map +1 -1
  93. package/docs/PLUGIN-AUTHORING.md +4 -0
  94. package/docs/PLUGIN-GALLERY.md +61 -0
  95. package/docs/examples/plugins/release-readiness.mjs +26 -0
  96. package/docs/examples/plugins/release-readiness.projscan-plugin.json +8 -0
  97. package/docs/examples/plugins/security-radar.mjs +50 -0
  98. package/docs/examples/plugins/security-radar.projscan-plugin.json +8 -0
  99. package/package.json +5 -4
@@ -0,0 +1,31 @@
1
+ import { computeBugHunt } from '../../core/bugHunt.js';
2
+ export const bugHuntTool = {
3
+ name: 'projscan_bug_hunt',
4
+ description: 'Run an agent-ready bug hunt. Combines doctor issues, preflight verdict, hotspots, and session coordination into a prioritized fix queue with verification commands.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ max_findings: {
9
+ type: 'number',
10
+ description: 'Maximum number of fix-queue findings to return. Default: 10, max: 25.',
11
+ },
12
+ since: {
13
+ type: 'string',
14
+ description: 'Git history window for hotspot evidence. Examples: "6 months ago", "2024-01-01".',
15
+ },
16
+ max_tokens: {
17
+ type: 'number',
18
+ description: 'Cap the response to roughly this many tokens.',
19
+ },
20
+ },
21
+ },
22
+ handler: async (args, rootPath) => ({
23
+ bugHunt: await computeBugHunt(rootPath, {
24
+ maxFindings: typeof args.max_findings === 'number' && Number.isFinite(args.max_findings)
25
+ ? args.max_findings
26
+ : undefined,
27
+ since: typeof args.since === 'string' ? args.since : undefined,
28
+ }),
29
+ }),
30
+ };
31
+ //# sourceMappingURL=bugHunt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bugHunt.js","sourceRoot":"","sources":["../../../src/mcp/tools/bugHunt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD,MAAM,CAAC,MAAM,WAAW,GAAY;IAClC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,qKAAqK;IACvK,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uEAAuE;aACrF;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAkF;aAChG;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClC,OAAO,EAAE,MAAM,cAAc,CAAC,QAAQ,EAAE;YACtC,WAAW,EACT,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;gBACzE,CAAC,CAAC,IAAI,CAAC,YAAY;gBACnB,CAAC,CAAC,SAAS;YACf,KAAK,EAAE,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;SAC/D,CAAC;KACH,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpTool } from './_shared.js';
2
+ export declare const evidencePackTool: McpTool;
@@ -0,0 +1,39 @@
1
+ import { computeEvidencePack } from '../../core/releaseEvidence.js';
2
+ export const evidencePackTool = {
3
+ name: 'projscan_evidence_pack',
4
+ description: 'Assemble one approval packet from product planning, bug-hunt, workplan, and preflight evidence.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ lines: {
9
+ type: 'array',
10
+ items: { type: 'string' },
11
+ description: 'Product lines to include. Default: next six minor lines.',
12
+ },
13
+ website_prompt: {
14
+ type: 'boolean',
15
+ description: 'Include website-update prompt text in the response.',
16
+ },
17
+ max_findings: {
18
+ type: 'number',
19
+ description: 'Maximum bug-hunt findings to include. Default: 10, max: 25.',
20
+ },
21
+ max_tokens: {
22
+ type: 'number',
23
+ description: 'Cap the response to roughly this many tokens.',
24
+ },
25
+ },
26
+ },
27
+ handler: async (args, rootPath) => ({
28
+ evidencePack: await computeEvidencePack(rootPath, {
29
+ lines: Array.isArray(args.lines)
30
+ ? args.lines.filter((line) => typeof line === 'string')
31
+ : undefined,
32
+ includeWebsitePrompt: args.website_prompt === true,
33
+ maxFindings: typeof args.max_findings === 'number' && Number.isFinite(args.max_findings)
34
+ ? args.max_findings
35
+ : undefined,
36
+ }),
37
+ }),
38
+ };
39
+ //# sourceMappingURL=evidencePack.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evidencePack.js","sourceRoot":"","sources":["../../../src/mcp/tools/evidencePack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGpE,MAAM,CAAC,MAAM,gBAAgB,GAAY;IACvC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,iGAAiG;IACnG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,0DAA0D;aACxE;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,qDAAqD;aACnE;YACD,YAAY,EAAE;gBACZ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;aAC3E;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClC,YAAY,EAAE,MAAM,mBAAmB,CAAC,QAAQ,EAAE;YAChD,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC;gBACvE,CAAC,CAAC,SAAS;YACb,oBAAoB,EAAE,IAAI,CAAC,cAAc,KAAK,IAAI;YAClD,WAAW,EACT,OAAO,IAAI,CAAC,YAAY,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC;gBACzE,CAAC,CAAC,IAAI,CAAC,YAAY;gBACnB,CAAC,CAAC,SAAS;SAChB,CAAC;KACH,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpTool } from './_shared.js';
2
+ export declare const qualityScorecardTool: McpTool;
@@ -0,0 +1,26 @@
1
+ import { computeQualityScorecard } from '../../core/qualityScorecard.js';
2
+ export const qualityScorecardTool = {
3
+ name: 'projscan_quality_scorecard',
4
+ description: 'Summarize quality dimensions, top risks, verification commands, and suggested next actions for agents and reviewers.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ max_risks: {
9
+ type: 'number',
10
+ description: 'Maximum top risks to return. Default: 8, max: 25.',
11
+ },
12
+ max_tokens: {
13
+ type: 'number',
14
+ description: 'Cap the response to roughly this many tokens.',
15
+ },
16
+ },
17
+ },
18
+ handler: async (args, rootPath) => ({
19
+ qualityScorecard: await computeQualityScorecard(rootPath, {
20
+ maxRisks: typeof args.max_risks === 'number' && Number.isFinite(args.max_risks)
21
+ ? args.max_risks
22
+ : undefined,
23
+ }),
24
+ }),
25
+ };
26
+ //# sourceMappingURL=qualityScorecard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qualityScorecard.js","sourceRoot":"","sources":["../../../src/mcp/tools/qualityScorecard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,MAAM,CAAC,MAAM,oBAAoB,GAAY;IAC3C,IAAI,EAAE,4BAA4B;IAClC,WAAW,EACT,sHAAsH;IACxH,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClC,gBAAgB,EAAE,MAAM,uBAAuB,CAAC,QAAQ,EAAE;YACxD,QAAQ,EACN,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;gBACnE,CAAC,CAAC,IAAI,CAAC,SAAS;gBAChB,CAAC,CAAC,SAAS;SAChB,CAAC;KACH,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpTool } from './_shared.js';
2
+ export declare const regressionPlanTool: McpTool;
@@ -0,0 +1,47 @@
1
+ import { computeRegressionPlan } from '../../core/regressionPlan.js';
2
+ const LEVELS = ['smoke', 'focused', 'full'];
3
+ export const regressionPlanTool = {
4
+ name: 'projscan_regression_plan',
5
+ description: 'Build a smoke, focused, or full regression matrix from bug-hunt, preflight, and product risk signals.',
6
+ inputSchema: {
7
+ type: 'object',
8
+ properties: {
9
+ level: {
10
+ type: 'string',
11
+ enum: LEVELS,
12
+ description: 'Regression depth. Default: focused.',
13
+ },
14
+ lines: {
15
+ type: 'array',
16
+ items: { type: 'string' },
17
+ description: 'Product lines to include. Default: next six minor lines.',
18
+ },
19
+ max_targets: {
20
+ type: 'number',
21
+ description: 'Maximum regression targets to include. Default: 8, max: 25.',
22
+ },
23
+ max_tokens: {
24
+ type: 'number',
25
+ description: 'Cap the response to roughly this many tokens.',
26
+ },
27
+ },
28
+ },
29
+ handler: async (args, rootPath) => ({
30
+ regressionPlan: await computeRegressionPlan(rootPath, {
31
+ level: readLevel(args.level),
32
+ lines: Array.isArray(args.lines)
33
+ ? args.lines.filter((line) => typeof line === 'string')
34
+ : undefined,
35
+ maxTargets: typeof args.max_targets === 'number' && Number.isFinite(args.max_targets)
36
+ ? args.max_targets
37
+ : undefined,
38
+ }),
39
+ }),
40
+ };
41
+ function readLevel(value) {
42
+ if (typeof value === 'string' && LEVELS.includes(value)) {
43
+ return value;
44
+ }
45
+ return undefined;
46
+ }
47
+ //# sourceMappingURL=regressionPlan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"regressionPlan.js","sourceRoot":"","sources":["../../../src/mcp/tools/regressionPlan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAIrE,MAAM,MAAM,GAAmC,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAE5E,MAAM,CAAC,MAAM,kBAAkB,GAAY;IACzC,IAAI,EAAE,0BAA0B;IAChC,WAAW,EACT,uGAAuG;IACzG,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,K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TrainTool: McpTool;
@@ -0,0 +1,27 @@
1
+ import { computeReleaseTrain } from '../../core/releaseTrain.js';
2
+ export const releaseTrainTool = {
3
+ name: 'projscan_release_train',
4
+ description: 'Plan upcoming product lines with version, scope, readiness, and next-action evidence.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ lines: {
9
+ type: 'array',
10
+ items: { type: 'string' },
11
+ description: 'Product lines to include. Default: next six minor lines.',
12
+ },
13
+ max_tokens: {
14
+ type: 'number',
15
+ description: 'Cap the response to roughly this many tokens.',
16
+ },
17
+ },
18
+ },
19
+ handler: async (args, rootPath) => ({
20
+ releaseTrain: await computeReleaseTrain(rootPath, {
21
+ lines: Array.isArray(args.lines)
22
+ ? args.lines.filter((line) => typeof line === 'string')
23
+ : undefined,
24
+ }),
25
+ }),
26
+ };
27
+ //# sourceMappingURL=releaseTrain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseTrain.js","sourceRoot":"","sources":["../../../src/mcp/tools/releaseTrain.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAGjE,MAAM,CAAC,MAAM,gBAAgB,GAAY;IACvC,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,uFAAuF;IACzF,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gBACzB,WAAW,EAAE,0DAA0D;aACxE;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;SACF;KACF;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClC,YAAY,EAAE,MAAM,mBAAmB,CAAC,QAAQ,EAAE;YAChD,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;gBAC9B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC;gBACvE,CAAC,CAAC,SAAS;SACd,CAAC;KACH,CAAC;CACH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import type { McpTool } from './_shared.js';
2
+ export declare const workplanTool: McpTool;
@@ -0,0 +1,70 @@
1
+ import { computeWorkplan, isWorkplanMode } from '../../core/workplan.js';
2
+ const WORKPLAN_MODES = [
3
+ 'before_edit',
4
+ 'before_commit',
5
+ 'before_merge',
6
+ 'refactor',
7
+ 'release',
8
+ 'bug_hunt',
9
+ 'hardening',
10
+ ];
11
+ export const workplanTool = {
12
+ name: 'projscan_workplan',
13
+ description: 'Compose preflight, review, session, hotspot, plugin, and supply-chain signals into an ordered agent execution plan with evidence, suggested tools, verification commands, and handoff text.',
14
+ inputSchema: {
15
+ type: 'object',
16
+ properties: {
17
+ mode: {
18
+ type: 'string',
19
+ enum: WORKPLAN_MODES,
20
+ description: 'Planning mode. before_edit/before_commit/before_merge mirror preflight gates; refactor, release, bug_hunt, and hardening add mode-specific task recipes. Default: before_edit.',
21
+ },
22
+ base_ref: {
23
+ type: 'string',
24
+ description: 'Optional git base ref for commit/merge/release checks.',
25
+ },
26
+ head_ref: {
27
+ type: 'string',
28
+ description: 'Optional git head ref for merge/release checks.',
29
+ },
30
+ max_changed_files: {
31
+ type: 'number',
32
+ description: 'Optional caution threshold for changed-file count. Default: 50.',
33
+ },
34
+ max_tasks: {
35
+ type: 'number',
36
+ description: 'Maximum number of workplan tasks to return. Default: 8, max: 20.',
37
+ },
38
+ enable_plugins: {
39
+ type: 'boolean',
40
+ description: 'Enable local analyzer plugins for this run, equivalent to PROJSCAN_PLUGINS_PREVIEW=1.',
41
+ },
42
+ max_tokens: {
43
+ type: 'number',
44
+ description: 'Cap the response to roughly this many tokens.',
45
+ },
46
+ },
47
+ },
48
+ handler: async (args, rootPath) => {
49
+ return {
50
+ workplan: await computeWorkplan(rootPath, {
51
+ mode: readMode(args.mode),
52
+ baseRef: typeof args.base_ref === 'string' ? args.base_ref : undefined,
53
+ headRef: typeof args.head_ref === 'string' ? args.head_ref : undefined,
54
+ maxChangedFiles: typeof args.max_changed_files === 'number' && Number.isFinite(args.max_changed_files)
55
+ ? args.max_changed_files
56
+ : undefined,
57
+ maxTasks: typeof args.max_tasks === 'number' && Number.isFinite(args.max_tasks)
58
+ ? args.max_tasks
59
+ : undefined,
60
+ enablePlugins: args.enable_plugins === true,
61
+ }),
62
+ };
63
+ },
64
+ };
65
+ function readMode(value) {
66
+ if (typeof value === 'string' && isWorkplanMode(value))
67
+ return value;
68
+ return 'before_edit';
69
+ }
70
+ //# sourceMappingURL=workplan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workplan.js","sourceRoot":"","sources":["../../../src/mcp/tools/workplan.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIzE,MAAM,cAAc,GAA4B;IAC9C,aAAa;IACb,eAAe;IACf,cAAc;IACd,UAAU;IACV,SAAS;IACT,UAAU;IACV,WAAW;CACZ,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAY;IACnC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,6LAA6L;IAC/L,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,gLAAgL;aACnL;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wDAAwD;aACtE;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;aAC/D;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EA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AK,CAAC;IACrE,OAAO,aAAa,CAAC;AACvB,CAAC"}
package/dist/mcp/tools.js CHANGED
@@ -37,6 +37,14 @@ import { costSummaryTool } from './tools/costSummary.js';
37
37
  import { reviewWatchTool } from './tools/reviewWatch.js';
38
38
  import { pluginTool } from './tools/plugin.js';
39
39
  import { preflightTool } from './tools/preflight.js';
40
+ import { workplanTool } from './tools/workplan.js';
41
+ import { releaseTrainTool } from './tools/releaseTrain.js';
42
+ import { bugHuntTool } from './tools/bugHunt.js';
43
+ import { evidencePackTool } from './tools/evidencePack.js';
44
+ import { regressionPlanTool } from './tools/regressionPlan.js';
45
+ import { agentBriefTool } from './tools/agentBrief.js';
46
+ import { qualityScorecardTool } from './tools/qualityScorecard.js';
47
+ import { adoptionTool } from './tools/adoption.js';
40
48
  const tools = [
41
49
  analyzeTool,
42
50
  doctorTool,
@@ -67,6 +75,14 @@ const tools = [
67
75
  reviewWatchTool,
68
76
  pluginTool,
69
77
  preflightTool,
78
+ workplanTool,
79
+ releaseTrainTool,
80
+ bugHuntTool,
81
+ evidencePackTool,
82
+ regressionPlanTool,
83
+ agentBriefTool,
84
+ qualityScorecardTool,
85
+ adoptionTool,
70
86
  ];
71
87
  export function getToolDefinitions() {
72
88
  return tools.map(({ name, description, inputSchema }) => ({ name, description, inputSchema }));
@@ -1 +1 @@
1
- {"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/mcp/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,E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-8a61-4284-98be-050dd759568d",
5
5
  "version": 1,
6
6
  "metadata": {
7
- "timestamp": "2026-05-22T09:04:56.850Z",
7
+ "timestamp": "2026-05-23T13:07:23.569Z",
8
8
  "tools": [
9
9
  {
10
10
  "vendor": "projscan",
11
11
  "name": "projscan-sbom-generator",
12
- "version": "2.2.0"
12
+ "version": "2.9.0"
13
13
  }
14
14
  ],
15
15
  "component": {
16
16
  "type": "application",
17
- "bom-ref": "pkg:npm/projscan@2.2.0",
17
+ "bom-ref": "pkg:npm/projscan@2.9.0",
18
18
  "name": "projscan",
19
- "version": "2.2.0",
20
- "purl": "pkg:npm/projscan@2.2.0"
19
+ "version": "2.9.0",
20
+ "purl": "pkg:npm/projscan@2.9.0"
21
21
  }
22
22
  },
23
23
  "components": [
@@ -137,6 +137,10 @@ export function reportHealth(issues, scanTimeMsOrOptions) {
137
137
  if (opts.stableRuleCount && opts.stableRuleCount > 0) {
138
138
  console.log(` ${chalk.cyan('▲')} ${chalk.dim(`${opts.stableRuleCount} rule${opts.stableRuleCount === 1 ? ' has' : 's have'} been open across enough runs to count as accepted. Run`)} ${chalk.bold.cyan('projscan memory stable')} ${chalk.dim('to review and silence them in .projscanrc.')}\n`);
139
139
  }
140
+ console.log(header('Next best commands'));
141
+ console.log(` ${chalk.cyan('projscan preflight --mode before_edit --format json')} ${chalk.dim('for an agent-sized safety gate')}`);
142
+ console.log(` ${chalk.cyan('projscan bug-hunt --format json')} ${chalk.dim('for a ranked fix queue')}`);
143
+ console.log(` ${chalk.cyan('projscan recipes')} ${chalk.dim('for repeatable agent workflows')}`);
140
144
  console.log('');
141
145
  }
142
146
  // ── Report: ci ────────────────────────────────────────────