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
package/dist/types.d.ts CHANGED
@@ -287,6 +287,246 @@ export interface PreflightReport {
287
287
  toolCalls: PreflightSuggestedAction[];
288
288
  truncated?: boolean;
289
289
  }
290
+ export type WorkplanMode = PreflightMode | 'refactor' | 'release' | 'bug_hunt' | 'hardening';
291
+ export type WorkplanPriority = 'p0' | 'p1' | 'p2';
292
+ export interface WorkplanEvidence {
293
+ source: PreflightReasonSource | 'coordination' | 'release' | 'verification';
294
+ message: string;
295
+ severity?: IssueSeverity;
296
+ file?: string;
297
+ issueId?: string;
298
+ tool?: string;
299
+ }
300
+ export interface WorkplanVerification {
301
+ commands: string[];
302
+ expected: string;
303
+ }
304
+ export interface WorkplanTask {
305
+ id: string;
306
+ priority: WorkplanPriority;
307
+ title: string;
308
+ why: string;
309
+ evidence: WorkplanEvidence[];
310
+ files: string[];
311
+ suggestedTools: string[];
312
+ verification: WorkplanVerification;
313
+ handoffText: string;
314
+ }
315
+ export interface WorkplanTopRisk extends WorkplanEvidence {
316
+ priority: WorkplanPriority;
317
+ }
318
+ export interface WorkplanCoordination {
319
+ touchedFiles: string[];
320
+ conflicts: SessionConflict[];
321
+ recommendedNextAgent: string;
322
+ }
323
+ export interface WorkplanReport {
324
+ schemaVersion: 1;
325
+ mode: WorkplanMode;
326
+ verdict: PreflightVerdict;
327
+ summary: string;
328
+ topRisks: WorkplanTopRisk[];
329
+ tasks: WorkplanTask[];
330
+ coordination: WorkplanCoordination;
331
+ suggestedNextActions: PreflightSuggestedAction[];
332
+ truncated?: boolean;
333
+ }
334
+ export interface ReleaseTrainTrack {
335
+ line: string;
336
+ theme: string;
337
+ outcome: string;
338
+ includedInPlan: boolean;
339
+ scope: string[];
340
+ successCriteria: string[];
341
+ }
342
+ export interface ReleaseTrainTask {
343
+ id: string;
344
+ priority: WorkplanPriority;
345
+ title: string;
346
+ why: string;
347
+ track: string;
348
+ files: string[];
349
+ verification: WorkplanVerification;
350
+ }
351
+ export interface ReleaseTrainReport {
352
+ schemaVersion: 1;
353
+ currentVersion: string | null;
354
+ plan: {
355
+ policy: 'product-readiness-plan';
356
+ lines: string[];
357
+ readOnly: true;
358
+ };
359
+ readiness: {
360
+ verdict: PreflightVerdict;
361
+ blockers: number;
362
+ cautions: number;
363
+ summary: string;
364
+ };
365
+ tracks: ReleaseTrainTrack[];
366
+ tasks: ReleaseTrainTask[];
367
+ suggestedNextActions: PreflightSuggestedAction[];
368
+ }
369
+ export type BugHuntVerdict = 'clean' | 'fix' | 'block';
370
+ export interface BugHuntFinding {
371
+ id: string;
372
+ priority: WorkplanPriority;
373
+ source: 'doctor' | 'preflight' | 'session' | 'hotspot' | 'verification';
374
+ title: string;
375
+ why: string;
376
+ files: string[];
377
+ evidence: WorkplanEvidence[];
378
+ suggestedTools: string[];
379
+ verification: WorkplanVerification;
380
+ }
381
+ export interface BugHuntReport {
382
+ schemaVersion: 1;
383
+ verdict: BugHuntVerdict;
384
+ summary: string;
385
+ health: HealthScore;
386
+ evidence: {
387
+ issueCounts: {
388
+ errors: number;
389
+ warnings: number;
390
+ infos: number;
391
+ };
392
+ hotspotCount: number;
393
+ preflightVerdict: PreflightVerdict;
394
+ touchedFiles: string[];
395
+ conflicts: number;
396
+ };
397
+ topSuspects: BugHuntFinding[];
398
+ fixQueue: BugHuntFinding[];
399
+ verificationMatrix: Array<{
400
+ command: string;
401
+ reason: string;
402
+ expected: string;
403
+ }>;
404
+ truncated?: boolean;
405
+ }
406
+ export type EvidencePackVerdict = 'ready' | 'caution' | 'blocked';
407
+ export type EvidencePackArtifactStatus = 'ready' | 'caution' | 'blocked';
408
+ export interface EvidencePackArtifact {
409
+ id: string;
410
+ title: string;
411
+ status: EvidencePackArtifactStatus;
412
+ summary: string;
413
+ evidence: string[];
414
+ commands: string[];
415
+ }
416
+ export interface EvidencePackReport {
417
+ schemaVersion: 1;
418
+ currentVersion: string | null;
419
+ readOnly: true;
420
+ verdict: EvidencePackVerdict;
421
+ summary: string;
422
+ train: {
423
+ lines: string[];
424
+ readiness: ReleaseTrainReport['readiness'];
425
+ };
426
+ approval: {
427
+ required: true;
428
+ recommendation: string;
429
+ blockingReasons: string[];
430
+ };
431
+ artifacts: EvidencePackArtifact[];
432
+ changelogEntries: string[];
433
+ websitePrompt?: string;
434
+ suggestedNextActions: PreflightSuggestedAction[];
435
+ }
436
+ export type RegressionPlanLevel = 'smoke' | 'focused' | 'full';
437
+ export type RegressionPlanVerdict = 'ready' | 'needs_tests' | 'blocked';
438
+ export interface RegressionPlanTarget {
439
+ id: string;
440
+ priority: WorkplanPriority;
441
+ source: 'baseline' | 'bug-hunt' | 'product-line' | 'preflight';
442
+ title: string;
443
+ why: string;
444
+ files: string[];
445
+ verification: WorkplanVerification;
446
+ }
447
+ export interface RegressionPlanReport {
448
+ schemaVersion: 1;
449
+ level: RegressionPlanLevel;
450
+ verdict: RegressionPlanVerdict;
451
+ summary: string;
452
+ releaseLines: string[];
453
+ evidence: {
454
+ healthScore: number;
455
+ bugHuntVerdict: BugHuntVerdict;
456
+ preflightVerdict: PreflightVerdict;
457
+ changedFiles: number;
458
+ touchedFiles: number;
459
+ };
460
+ targets: RegressionPlanTarget[];
461
+ commands: string[];
462
+ suggestedNextActions: PreflightSuggestedAction[];
463
+ truncated?: boolean;
464
+ }
465
+ export type AgentBriefIntent = 'next_agent' | 'bug_hunt' | 'release' | 'refactor' | 'hardening';
466
+ export interface AgentBriefItem {
467
+ id: string;
468
+ priority: WorkplanPriority;
469
+ title: string;
470
+ why: string;
471
+ files: string[];
472
+ commands: string[];
473
+ }
474
+ export interface AgentBriefGuardrail {
475
+ id: string;
476
+ label: string;
477
+ reason: string;
478
+ command: string;
479
+ }
480
+ export interface AgentBriefReport {
481
+ schemaVersion: 1;
482
+ intent: AgentBriefIntent;
483
+ summary: string;
484
+ health: HealthScore;
485
+ context: {
486
+ totalFiles: number;
487
+ totalDirectories: number;
488
+ topDirectories: Array<{
489
+ directory: string;
490
+ files: number;
491
+ }>;
492
+ touchedFiles: string[];
493
+ conflicts: number;
494
+ };
495
+ focus: AgentBriefItem[];
496
+ guardrails: AgentBriefGuardrail[];
497
+ suggestedNextActions: PreflightSuggestedAction[];
498
+ truncated?: boolean;
499
+ }
500
+ export type QualityScorecardVerdict = 'excellent' | 'healthy' | 'needs_attention' | 'blocked';
501
+ export type QualityScorecardStatus = 'pass' | 'watch' | 'fail';
502
+ export interface QualityScorecardDimension {
503
+ id: 'health' | 'security' | 'tests' | 'maintainability' | 'coordination';
504
+ label: string;
505
+ status: QualityScorecardStatus;
506
+ score: number;
507
+ summary: string;
508
+ evidence: string[];
509
+ commands: string[];
510
+ }
511
+ export interface QualityScorecardRisk {
512
+ id: string;
513
+ priority: WorkplanPriority;
514
+ title: string;
515
+ files: string[];
516
+ source: 'issue' | 'hotspot' | 'coordination';
517
+ command: string;
518
+ }
519
+ export interface QualityScorecardReport {
520
+ schemaVersion: 1;
521
+ verdict: QualityScorecardVerdict;
522
+ summary: string;
523
+ health: HealthScore;
524
+ dimensions: QualityScorecardDimension[];
525
+ topRisks: QualityScorecardRisk[];
526
+ commands: string[];
527
+ suggestedNextActions: PreflightSuggestedAction[];
528
+ truncated?: boolean;
529
+ }
290
530
  export interface SessionResourceSummary {
291
531
  schemaVersion: 1;
292
532
  sessionId: string;
@@ -1,10 +1,12 @@
1
1
  import type { ReportFormat } from '../types.js';
2
2
  export declare const OUTPUT_FORMATS: readonly ["console", "json", "markdown", "sarif", "html"];
3
3
  export declare const COMMAND_FORMAT_SUPPORT: {
4
+ readonly 'agent-brief': readonly ["console", "json"];
4
5
  readonly analyze: readonly ["console", "json", "markdown", "sarif", "html"];
5
6
  readonly 'apply-fix': readonly ["console", "json"];
6
7
  readonly audit: readonly ["console", "json", "markdown", "sarif"];
7
8
  readonly badge: readonly ["console"];
9
+ readonly 'bug-hunt': readonly ["console", "json"];
8
10
  readonly ci: readonly ["console", "json", "markdown", "sarif"];
9
11
  readonly coupling: readonly ["console", "json", "markdown", "html"];
10
12
  readonly coverage: readonly ["console", "json", "markdown", "html"];
@@ -12,15 +14,19 @@ export declare const COMMAND_FORMAT_SUPPORT: {
12
14
  readonly diagram: readonly ["console", "json", "markdown"];
13
15
  readonly diff: readonly ["console", "json", "markdown"];
14
16
  readonly doctor: readonly ["console", "json", "markdown", "sarif", "html"];
17
+ readonly 'evidence-pack': readonly ["console", "json"];
15
18
  readonly explain: readonly ["console", "json", "markdown"];
16
19
  readonly 'explain-issue': readonly ["console", "json", "markdown"];
17
20
  readonly file: readonly ["console", "json", "markdown"];
21
+ readonly 'first-run': readonly ["console", "json"];
18
22
  readonly fix: readonly ["console"];
19
23
  readonly 'fix-suggest': readonly ["console", "json", "markdown"];
24
+ readonly handoff: readonly ["console", "json"];
20
25
  readonly help: readonly ["console"];
21
26
  readonly hotspots: readonly ["console", "json", "markdown", "html"];
22
27
  readonly impact: readonly ["console", "json", "markdown", "html"];
23
28
  readonly init: readonly ["console"];
29
+ readonly 'init mcp': readonly ["console", "json"];
24
30
  readonly 'install-hook': readonly ["console"];
25
31
  readonly mcp: readonly ["console"];
26
32
  readonly memory: readonly ["console", "json"];
@@ -34,6 +40,10 @@ export declare const COMMAND_FORMAT_SUPPORT: {
34
40
  readonly 'plugin test': readonly ["console", "json"];
35
41
  readonly preflight: readonly ["console", "json"];
36
42
  readonly 'pr-diff': readonly ["console", "json", "markdown", "html"];
43
+ readonly 'quality-scorecard': readonly ["console", "json"];
44
+ readonly 'release-train': readonly ["console", "json"];
45
+ readonly 'regression-plan': readonly ["console", "json"];
46
+ readonly recipes: readonly ["console", "json"];
37
47
  readonly review: readonly ["console", "json", "markdown", "html"];
38
48
  readonly search: readonly ["console", "json", "markdown"];
39
49
  readonly session: readonly ["console", "json"];
@@ -48,6 +58,7 @@ export declare const COMMAND_FORMAT_SUPPORT: {
48
58
  readonly 'workspace add': readonly ["console"];
49
59
  readonly 'workspace remove': readonly ["console"];
50
60
  readonly workspaces: readonly ["console", "json", "markdown"];
61
+ readonly workplan: readonly ["console", "json"];
51
62
  };
52
63
  export type CommandFormatName = keyof typeof COMMAND_FORMAT_SUPPORT;
53
64
  export declare function formatList(formats?: readonly ReportFormat[]): string;
@@ -1,9 +1,11 @@
1
1
  export const OUTPUT_FORMATS = ['console', 'json', 'markdown', 'sarif', 'html'];
2
2
  export const COMMAND_FORMAT_SUPPORT = {
3
+ 'agent-brief': ['console', 'json'],
3
4
  analyze: ['console', 'json', 'markdown', 'sarif', 'html'],
4
5
  'apply-fix': ['console', 'json'],
5
6
  audit: ['console', 'json', 'markdown', 'sarif'],
6
7
  badge: ['console'],
8
+ 'bug-hunt': ['console', 'json'],
7
9
  ci: ['console', 'json', 'markdown', 'sarif'],
8
10
  coupling: ['console', 'json', 'markdown', 'html'],
9
11
  coverage: ['console', 'json', 'markdown', 'html'],
@@ -11,15 +13,19 @@ export const COMMAND_FORMAT_SUPPORT = {
11
13
  diagram: ['console', 'json', 'markdown'],
12
14
  diff: ['console', 'json', 'markdown'],
13
15
  doctor: ['console', 'json', 'markdown', 'sarif', 'html'],
16
+ 'evidence-pack': ['console', 'json'],
14
17
  explain: ['console', 'json', 'markdown'],
15
18
  'explain-issue': ['console', 'json', 'markdown'],
16
19
  file: ['console', 'json', 'markdown'],
20
+ 'first-run': ['console', 'json'],
17
21
  fix: ['console'],
18
22
  'fix-suggest': ['console', 'json', 'markdown'],
23
+ handoff: ['console', 'json'],
19
24
  help: ['console'],
20
25
  hotspots: ['console', 'json', 'markdown', 'html'],
21
26
  impact: ['console', 'json', 'markdown', 'html'],
22
27
  init: ['console'],
28
+ 'init mcp': ['console', 'json'],
23
29
  'install-hook': ['console'],
24
30
  mcp: ['console'],
25
31
  memory: ['console', 'json'],
@@ -33,6 +39,10 @@ export const COMMAND_FORMAT_SUPPORT = {
33
39
  'plugin test': ['console', 'json'],
34
40
  preflight: ['console', 'json'],
35
41
  'pr-diff': ['console', 'json', 'markdown', 'html'],
42
+ 'quality-scorecard': ['console', 'json'],
43
+ 'release-train': ['console', 'json'],
44
+ 'regression-plan': ['console', 'json'],
45
+ recipes: ['console', 'json'],
36
46
  review: ['console', 'json', 'markdown', 'html'],
37
47
  search: ['console', 'json', 'markdown'],
38
48
  session: ['console', 'json'],
@@ -47,6 +57,7 @@ export const COMMAND_FORMAT_SUPPORT = {
47
57
  'workspace add': ['console'],
48
58
  'workspace remove': ['console'],
49
59
  workspaces: ['console', 'json', 'markdown'],
60
+ workplan: ['console', 'json'],
50
61
  };
51
62
  export function formatList(formats = OUTPUT_FORMATS) {
52
63
  return formats.join(', ');
@@ -1 +1 @@
1
- {"version":3,"file":"formatSupport.js","sourceRoot":"","sources":["../../src/utils/formatSupport.ts"],"names":[],"mappings":"AA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,UAAU,CAAC;IAC1C,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC;IACxC,KAAK,EAAE,CAAC,SAAS,CAAC;IAClB,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;IACrC,eAAe,EAAE,CAAC,SAAS,CAAC;IAC5B,kBAAkB,EAAE,CAAC,SAAS,CAAC;IAC/B,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC;IAC3C,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC;CAC6B,CAAC;AAI7D,MAAM,UAAU,UAAU,CAAC,UAAmC,cAAc;IAC1E,OAAO,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,WAAmB;IACzD,OAAQ,sBAAkE,CAAC,WAAW,CAAC,CAAC;AAC1F,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC;QACzE,OAAO,EAAE,OAA4B;QACrC,OAAO;KACR,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -64,6 +64,10 @@ The machine-readable manifest schema lives at
64
64
  [`docs/plugin.schema.json`](plugin.schema.json). The examples under
65
65
  [`docs/examples/plugins/`](examples/plugins/) are tested in CI.
66
66
 
67
+ For packaged examples you can copy into a repo, see the
68
+ [Plugin Gallery](PLUGIN-GALLERY.md). It includes policy, team health, security,
69
+ and release-readiness examples.
70
+
67
71
  ## Scaffold
68
72
 
69
73
  Use `plugin init` to create a minimal local plugin without writing the manifest
@@ -0,0 +1,61 @@
1
+ # Plugin Gallery
2
+
3
+ These examples are packaged with projscan under `docs/examples/plugins/`. Copy
4
+ the manifest and module into `.projscan-plugins/`, then run:
5
+
6
+ ```bash
7
+ projscan plugin validate .projscan-plugins/<name>.projscan-plugin.json
8
+ projscan plugin test .projscan-plugins/<name>.projscan-plugin.json
9
+ PROJSCAN_PLUGINS_PREVIEW=1 projscan doctor
10
+ ```
11
+
12
+ Local plugins are code execution. Only enable plugins you trust.
13
+
14
+ ## Analyzer Plugins
15
+
16
+ ### `policy`
17
+
18
+ Flags TypeScript files under a `legacy` path so teams can keep local migration
19
+ rules close to the repo.
20
+
21
+ Files:
22
+ - `docs/examples/plugins/policy.projscan-plugin.json`
23
+ - `docs/examples/plugins/policy.mjs`
24
+
25
+ ### `security-radar`
26
+
27
+ Flags common local security review triggers:
28
+ - committed `.env` style files
29
+ - package scripts that pipe `curl` or `wget` output into a shell
30
+
31
+ Files:
32
+ - `docs/examples/plugins/security-radar.projscan-plugin.json`
33
+ - `docs/examples/plugins/security-radar.mjs`
34
+
35
+ ## Reporter Plugins
36
+
37
+ ### `team-radar`
38
+
39
+ Renders `doctor`, `analyze`, and `ci` output in a compact team health voice.
40
+
41
+ Files:
42
+ - `docs/examples/plugins/team-radar.projscan-plugin.json`
43
+ - `docs/examples/plugins/team-radar.mjs`
44
+
45
+ ### `release-readiness`
46
+
47
+ Renders `doctor`, `analyze`, and `ci` output as a release approval summary with
48
+ score, blocking issue count, warnings, and a continue/hold decision.
49
+
50
+ Files:
51
+ - `docs/examples/plugins/release-readiness.projscan-plugin.json`
52
+ - `docs/examples/plugins/release-readiness.mjs`
53
+
54
+ ## Suggested Adoption Path
55
+
56
+ 1. Start with `projscan init mcp --client all` to wire projscan into your MCP
57
+ client.
58
+ 2. Run `projscan recipes` to pick an agent workflow.
59
+ 3. Copy one gallery plugin into `.projscan-plugins/` only when you need local
60
+ policy or team-specific reporting.
61
+ 4. Keep MCP tools structured; use reporter plugins for human presentation.
@@ -0,0 +1,26 @@
1
+ export default {
2
+ render: async ({ command, payload }) => {
3
+ if (command === 'ci') {
4
+ const ci = payload.ci;
5
+ return [
6
+ `release-readiness: ${ci.pass ? 'ready' : 'not ready'}`,
7
+ `score: ${ci.score}/100 (${ci.grade})`,
8
+ `issues: ${ci.totalIssues}`,
9
+ `threshold: ${ci.threshold}`,
10
+ ].join('\n');
11
+ }
12
+
13
+ const issues = Array.isArray(payload.issues) ? payload.issues : [];
14
+ const health = payload.health;
15
+ const errors = issues.filter((issue) => issue.severity === 'error').length;
16
+ const warnings = issues.filter((issue) => issue.severity === 'warning').length;
17
+
18
+ return [
19
+ `release-readiness ${command}`,
20
+ `score: ${health?.score ?? 'n/a'}/100 (${health?.grade ?? 'n/a'})`,
21
+ `blocking: ${errors}`,
22
+ `warnings: ${warnings}`,
23
+ errors > 0 ? 'decision: hold release' : 'decision: continue release checks',
24
+ ].join('\n');
25
+ },
26
+ };
@@ -0,0 +1,8 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "release-readiness",
4
+ "kind": "reporter",
5
+ "module": "./release-readiness.mjs",
6
+ "commands": ["doctor", "analyze", "ci"],
7
+ "description": "Renders doctor, analyze, and ci output as a release approval summary"
8
+ }
@@ -0,0 +1,50 @@
1
+ import fs from 'node:fs/promises';
2
+ import path from 'node:path';
3
+
4
+ export default {
5
+ check: async (rootPath, files) => {
6
+ const issues = [];
7
+
8
+ for (const file of files) {
9
+ if (/^\.env(\.|$)/.test(path.basename(file.relativePath))) {
10
+ issues.push({
11
+ id: 'committed-env-file',
12
+ title: 'Committed environment file',
13
+ description: `${file.relativePath} looks like a committed environment file. Confirm it contains no secrets before release.`,
14
+ severity: 'warning',
15
+ category: 'security',
16
+ fixAvailable: false,
17
+ locations: [{ file: file.relativePath, line: 1 }],
18
+ });
19
+ }
20
+ }
21
+
22
+ const packageJson = files.find((file) => file.relativePath === 'package.json');
23
+ if (!packageJson) return issues;
24
+
25
+ try {
26
+ const parsed = JSON.parse(await fs.readFile(path.join(rootPath, 'package.json'), 'utf-8'));
27
+ const scripts = parsed && typeof parsed === 'object' ? parsed.scripts : undefined;
28
+ if (!scripts || typeof scripts !== 'object') return issues;
29
+
30
+ for (const [name, command] of Object.entries(scripts)) {
31
+ if (typeof command !== 'string') continue;
32
+ if (/\bcurl\b.*\|\s*(?:sh|bash)|\bwget\b.*\|\s*(?:sh|bash)/.test(command)) {
33
+ issues.push({
34
+ id: `script-fetch-pipe-${name}`,
35
+ title: 'Install script pipes network content to a shell',
36
+ description: `package.json script "${name}" fetches remote content and pipes it into a shell.`,
37
+ severity: 'warning',
38
+ category: 'security',
39
+ fixAvailable: false,
40
+ locations: [{ file: 'package.json', line: 1 }],
41
+ });
42
+ }
43
+ }
44
+ } catch {
45
+ return issues;
46
+ }
47
+
48
+ return issues;
49
+ },
50
+ };
@@ -0,0 +1,8 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "security-radar",
4
+ "kind": "analyzer",
5
+ "module": "./security-radar.mjs",
6
+ "category": "security",
7
+ "description": "Flags common local security review triggers such as committed env files and shell-fetch install scripts"
8
+ }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "projscan",
3
3
  "mcpName": "io.github.abhiyoheswaran1/projscan",
4
- "version": "2.2.0",
5
- "description": "Agent-first code intelligence. MCP server (2025-03-26) with AST parsing for JavaScript, TypeScript, Python, Go, Java, Ruby, Rust, PHP, C#, Kotlin, Swift, and C++; code graph, file + per-function AST cyclomatic complexity, per-function fan-in + fan-out, coupling + cycle detection, structural PR diff with HTML reporter, coverage report with HTML reporter, intent-grounded one-call PR review (projscan_review with optional `intent` arg) and long-running PR-watch mode with structured per-bucket deltas (projscan_review_watch), agent preflight with supply-chain IOC evidence, rule-driven fix suggestions + mechanical apply layer with rollback (projscan_apply_fix, projscan_fix_suggest, projscan_explain_issue), source-to-sink taint analysis (projscan_taint) with truncation reporting, transitive blast-radius analysis with cross-repo mode (projscan_impact for files and symbols), cross-repo workspace registration + intelligence (projscan_workspace_graph), per-function semantic search chunks (sub-file embeddings), per-rule confidence + severity drift + cost-summary analytics with live streaming (projscan_cost_summary), stable local analyzer + reporter plugin API (projscan_plugin, CLI --reporter, opt-in via PROJSCAN_PLUGINS_PREVIEW=1), monorepo workspace awareness with cross-package import policy + per-package dependencies / outdated / audit, BM25 + optional semantic search, cursor pagination, progress notifications, context-budgeted output, and a stable-surface CI guard. CLI on the side.",
4
+ "version": "2.9.0",
5
+ "description": "Agent-first code intelligence. MCP server (2025-03-26) with AST parsing for JavaScript, TypeScript, Python, Go, Java, Ruby, Rust, PHP, C#, Kotlin, Swift, and C++; code graph, file + per-function AST cyclomatic complexity, per-function fan-in + fan-out, coupling + cycle detection, structural PR diff with HTML reporter, coverage report with HTML reporter, intent-grounded one-call PR review (projscan_review with optional `intent` arg) and long-running PR-watch mode with structured per-bucket deltas (projscan_review_watch), agent workplans (projscan_workplan), bug-hunt queues (projscan_bug_hunt), product-line planning (projscan_release_train), evidence packs (projscan_evidence_pack), regression planning (projscan_regression_plan), agent briefs (projscan_agent_brief), quality scorecards (projscan_quality_scorecard), and preflight with supply-chain IOC evidence, rule-driven fix suggestions + mechanical apply layer with rollback (projscan_apply_fix, projscan_fix_suggest, projscan_explain_issue), source-to-sink taint analysis (projscan_taint) with truncation reporting, transitive blast-radius analysis with cross-repo mode (projscan_impact for files and symbols), cross-repo workspace registration + intelligence (projscan_workspace_graph), per-function semantic search chunks (sub-file embeddings), per-rule confidence + severity drift + cost-summary analytics with live streaming (projscan_cost_summary), stable local analyzer + reporter plugin API (projscan_plugin, CLI --reporter, opt-in via PROJSCAN_PLUGINS_PREVIEW=1), monorepo workspace awareness with cross-package import policy + per-package dependencies / outdated / audit, BM25 + optional semantic search, cursor pagination, progress notifications, context-budgeted output, and a stable-surface CI guard. CLI on the side.",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -14,14 +14,15 @@
14
14
  "README.md",
15
15
  "docs/2.0-MIGRATION.md",
16
16
  "docs/PLUGIN-AUTHORING.md",
17
+ "docs/PLUGIN-GALLERY.md",
17
18
  "docs/plugin.schema.json",
18
19
  "docs/examples/plugins"
19
20
  ],
20
21
  "scripts": {
21
22
  "build": "tsc && node scripts/copy-wasm.mjs && node scripts/generate-tool-manifest.mjs",
22
23
  "dev": "tsc --watch",
23
- "test": "vitest run --test-timeout 15000 --hook-timeout 15000",
24
- "test:watch": "vitest --test-timeout 15000 --hook-timeout 15000",
24
+ "test": "vitest run --test-timeout 60000 --hook-timeout 60000",
25
+ "test:watch": "vitest --test-timeout 60000 --hook-timeout 60000",
25
26
  "lint": "eslint src/",
26
27
  "format": "prettier --write .",
27
28
  "bench": "node scripts/bench.mjs",