mcp-adr-analysis-server 2.0.12 โ†’ 2.0.13

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.
package/README.md CHANGED
@@ -25,6 +25,7 @@ The Model Context Protocol enables seamless integration between AI assistants an
25
25
  ๐Ÿ“Š **Workflow Automation** - Todo generation, deployment tracking, and rule validation
26
26
  ๐Ÿงช **TDD Integration** - Two-phase Test-Driven Development with ADR linking and validation
27
27
  ๐Ÿ” **Mock Detection** - Sophisticated analysis to distinguish mock from production code
28
+ ๐Ÿš€ **Deployment Readiness** - Zero-tolerance test validation with deployment history tracking and hard blocking
28
29
 
29
30
 
30
31
 
@@ -296,6 +297,50 @@ const rules = await generateRules({
296
297
  });
297
298
  ```
298
299
 
300
+ ### Deployment Readiness & Safety
301
+ ```typescript
302
+ // Comprehensive deployment validation with zero tolerance
303
+ const deploymentCheck = await deploymentReadiness({
304
+ operation: "full_audit",
305
+ projectPath: "/path/to/project",
306
+ targetEnvironment: "production",
307
+
308
+ // Test validation (zero tolerance by default)
309
+ maxTestFailures: 0, // Hard block on any test failures
310
+ requireTestCoverage: 80, // Minimum coverage requirement
311
+ blockOnFailingTests: true, // Prevent deployment with failing tests
312
+
313
+ // Deployment history validation
314
+ maxRecentFailures: 2, // Max recent deployment failures
315
+ deploymentSuccessThreshold: 80, // Required success rate
316
+ rollbackFrequencyThreshold: 20, // Max rollback frequency
317
+
318
+ // Integration options
319
+ integrateTodoTasks: true, // Auto-create blocking tasks
320
+ updateHealthScoring: true, // Update project metrics
321
+ strictMode: true // Enable all safety checks
322
+ });
323
+
324
+ // Enhanced git push with deployment readiness
325
+ const pushResult = await smartGitPush({
326
+ message: "Deploy feature X",
327
+ branch: "main",
328
+
329
+ // Deployment readiness integration
330
+ checkDeploymentReadiness: true, // Validate before push
331
+ enforceDeploymentReadiness: true, // Hard block on issues
332
+ targetEnvironment: "production", // Environment-specific checks
333
+ strictDeploymentMode: true // Maximum safety
334
+ });
335
+
336
+ // Emergency override for critical fixes
337
+ const override = await deploymentReadiness({
338
+ operation: "emergency_override",
339
+ businessJustification: "Critical security patch - CVE-2024-XXXX",
340
+ approvalRequired: true
341
+ });
342
+ ```
343
+
299
344
  ## ๐ŸŽฏ Use Cases
300
345
 
301
346
  ### ๐Ÿ‘จโ€๐Ÿ’ป **AI Coding Assistants**
@@ -136,6 +136,7 @@ export declare class McpAdrAnalysisServer {
136
136
  private manageTodoJson;
137
137
  private generateDeploymentGuidance;
138
138
  private smartGitPush;
139
+ private deploymentReadiness;
139
140
  private troubleshootGuidedWorkflow;
140
141
  private smartScore;
141
142
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;GAMG;AA2EH;;GAEG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,MAAM,CAAkC;IAChD,OAAO,CAAC,SAAS,CAAwB;;IAyBzC;;OAEG;YACW,qBAAqB;IAUnC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC;;OAEG;IACH,OAAO,CAAC,aAAa;IAu5DrB;;OAEG;YACW,sBAAsB;YAgGtB,mBAAmB;YAqMnB,sBAAsB;YAmQtB,uBAAuB;YA+VvB,uBAAuB;YA0PvB,mBAAmB;YA6RnB,eAAe;YA2Hf,kBAAkB;IAyFhC;;OAEG;YACW,+BAA+B;IA0K7C;;OAEG;IACH,OAAO,CAAC,cAAc;IAgCtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkDtB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAyClC;;OAEG;IACH,OAAO,CAAC,+BAA+B;IAmFvC;;OAEG;YACW,sBAAsB;YAKtB,sBAAsB;YAKtB,uBAAuB;YAKvB,wBAAwB;YAKxB,sBAAsB;YAK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A+B;IA0K7C;;OAEG;IACH,OAAO,CAAC,cAAc;IAgCtB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkDtB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAyClC;;OAEG;IACH,OAAO,CAAC,+BAA+B;IAmFvC;;OAEG;YACW,sBAAsB;YAKtB,sBAAsB;YAKtB,uBAAuB;YAKvB,wBAAwB;YAKxB,sBAAsB;YAKtB,WAAW;YAkJX,sBAAsB;IAuHpC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAyDnC;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAyF3B;;OAEG;YACW,WAAW;YAKX,uBAAuB;YAKvB,oBAAoB;IAKlC;;OAEG;YACW,mBAAmB;YAKnB,sBAAsB;YAKtB,yBAAyB;IAKvC;;OAEG;YACW,aAAa;YAKb,aAAa;YAKb,aAAa;IAK3B;;OAEG;YACW,kBAAkB;IAKhC;;OAEG;YACW,yBAAyB;IAKvC;;OAEG;YACW,yBAAyB;IAKvC;;OAEG;IACH;;OAEG;YACW,kBAAkB;YAwFlB,kBAAkB;IAWhC;;OAEG;YACW,YAAY;IAmF1B;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAc5B;;OAEG;YACW,QAAQ;YAiCR,SAAS;YAqCT,aAAa;YAuCb,cAAc;YAiBd,0BAA0B;YAY1B,YAAY;YAYZ,mBAAmB;YAYnB,0BAA0B;YAY1B,UAAU;CAWzB"}
package/dist/src/index.js CHANGED
@@ -1598,6 +1598,126 @@ export class McpAdrAnalysisServer {
1598
1598
  }
1599
1599
  }
1600
1600
  },
1601
+ {
1602
+ name: 'deployment_readiness',
1603
+ description: 'Comprehensive deployment readiness validation with test failure tracking, deployment history analysis, and hard blocking for unsafe deployments. Integrates with smart_git_push for deployment gating.',
1604
+ inputSchema: {
1605
+ type: 'object',
1606
+ properties: {
1607
+ operation: {
1608
+ type: 'string',
1609
+ enum: ['check_readiness', 'validate_production', 'test_validation', 'deployment_history', 'full_audit', 'emergency_override'],
1610
+ description: 'Type of deployment readiness check to perform'
1611
+ },
1612
+ projectPath: {
1613
+ type: 'string',
1614
+ description: 'Path to project directory (defaults to current working directory)'
1615
+ },
1616
+ targetEnvironment: {
1617
+ type: 'string',
1618
+ enum: ['staging', 'production', 'integration'],
1619
+ default: 'production',
1620
+ description: 'Target deployment environment'
1621
+ },
1622
+ strictMode: {
1623
+ type: 'boolean',
1624
+ default: true,
1625
+ description: 'Enable strict validation (recommended for production)'
1626
+ },
1627
+ allowMockCode: {
1628
+ type: 'boolean',
1629
+ default: false,
1630
+ description: 'Allow mock code in deployment (NOT RECOMMENDED)'
1631
+ },
1632
+ productionCodeThreshold: {
1633
+ type: 'number',
1634
+ default: 85,
1635
+ description: 'Minimum production code quality score (0-100)'
1636
+ },
1637
+ mockCodeMaxAllowed: {
1638
+ type: 'number',
1639
+ default: 0,
1640
+ description: 'Maximum mock code indicators allowed'
1641
+ },
1642
+ maxTestFailures: {
1643
+ type: 'number',
1644
+ default: 0,
1645
+ description: 'Maximum test failures allowed (0 = zero tolerance)'
1646
+ },
1647
+ requireTestCoverage: {
1648
+ type: 'number',
1649
+ default: 80,
1650
+ description: 'Minimum test coverage percentage required'
1651
+ },
1652
+ blockOnFailingTests: {
1653
+ type: 'boolean',
1654
+ default: true,
1655
+ description: 'Block deployment if tests are failing'
1656
+ },
1657
+ testSuiteRequired: {
1658
+ type: 'array',
1659
+ items: { type: 'string' },
1660
+ default: [],
1661
+ description: 'Required test suites that must pass'
1662
+ },
1663
+ maxRecentFailures: {
1664
+ type: 'number',
1665
+ default: 2,
1666
+ description: 'Maximum recent deployment failures allowed'
1667
+ },
1668
+ deploymentSuccessThreshold: {
1669
+ type: 'number',
1670
+ default: 80,
1671
+ description: 'Minimum deployment success rate required (%)'
1672
+ },
1673
+ blockOnRecentFailures: {
1674
+ type: 'boolean',
1675
+ default: true,
1676
+ description: 'Block if recent deployments failed'
1677
+ },
1678
+ rollbackFrequencyThreshold: {
1679
+ type: 'number',
1680
+ default: 20,
1681
+ description: 'Maximum rollback frequency allowed (%)'
1682
+ },
1683
+ requireAdrCompliance: {
1684
+ type: 'boolean',
1685
+ default: true,
1686
+ description: 'Require ADR compliance validation'
1687
+ },
1688
+ integrateTodoTasks: {
1689
+ type: 'boolean',
1690
+ default: true,
1691
+ description: 'Auto-create blocking tasks for issues'
1692
+ },
1693
+ updateHealthScoring: {
1694
+ type: 'boolean',
1695
+ default: true,
1696
+ description: 'Update project health scores'
1697
+ },
1698
+ triggerSmartGitPush: {
1699
+ type: 'boolean',
1700
+ default: false,
1701
+ description: 'Trigger smart git push validation'
1702
+ },
1703
+ emergencyBypass: {
1704
+ type: 'boolean',
1705
+ default: false,
1706
+ description: 'Emergency bypass for critical fixes'
1707
+ },
1708
+ businessJustification: {
1709
+ type: 'string',
1710
+ description: 'Business justification for overrides (required for emergency_override)'
1711
+ },
1712
+ approvalRequired: {
1713
+ type: 'boolean',
1714
+ default: true,
1715
+ description: 'Require approval for overrides'
1716
+ }
1717
+ },
1718
+ required: ['operation']
1719
+ }
1720
+ },
1601
1721
  {
1602
1722
  name: 'troubleshoot_guided_workflow',
1603
1723
  description: 'Structured failure analysis and test plan generation - provide JSON failure info to get specific test commands',
@@ -1924,6 +2044,9 @@ export class McpAdrAnalysisServer {
1924
2044
  case 'smart_git_push':
1925
2045
  response = await this.smartGitPush(args);
1926
2046
  break;
2047
+ case 'deployment_readiness':
2048
+ response = await this.deploymentReadiness(args);
2049
+ break;
1927
2050
  case 'troubleshoot_guided_workflow':
1928
2051
  response = await this.troubleshootGuidedWorkflow(args);
1929
2052
  break;
@@ -4615,6 +4738,15 @@ Please provide:
4615
4738
  throw new McpAdrError(`Smart git push failed: ${error instanceof Error ? error.message : String(error)}`, 'SMART_GIT_PUSH_ERROR');
4616
4739
  }
4617
4740
  }
4741
+ async deploymentReadiness(args) {
4742
+ try {
4743
+ const { deploymentReadiness } = await import('./tools/deployment-readiness-tool.js');
4744
+ return await deploymentReadiness(args);
4745
+ }
4746
+ catch (error) {
4747
+ throw new McpAdrError(`Deployment readiness check failed: ${error instanceof Error ? error.message : String(error)}`, 'DEPLOYMENT_READINESS_ERROR');
4748
+ }
4749
+ }
4618
4750
  async troubleshootGuidedWorkflow(args) {
4619
4751
  try {
4620
4752
  const { troubleshootGuidedWorkflow } = await import('./tools/troubleshoot-guided-workflow-tool.js');