agentic-sdlc-mcp 1.0.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 (67) hide show
  1. package/.env.example +20 -0
  2. package/README.md +335 -0
  3. package/dist/config.d.ts +22 -0
  4. package/dist/config.d.ts.map +1 -0
  5. package/dist/config.js +39 -0
  6. package/dist/config.js.map +1 -0
  7. package/dist/github/client.d.ts +28 -0
  8. package/dist/github/client.d.ts.map +1 -0
  9. package/dist/github/client.js +90 -0
  10. package/dist/github/client.js.map +1 -0
  11. package/dist/github/context.d.ts +47 -0
  12. package/dist/github/context.d.ts.map +1 -0
  13. package/dist/github/context.js +123 -0
  14. package/dist/github/context.js.map +1 -0
  15. package/dist/index.d.ts +13 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +92 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/resources/index.d.ts +9 -0
  20. package/dist/resources/index.d.ts.map +1 -0
  21. package/dist/resources/index.js +315 -0
  22. package/dist/resources/index.js.map +1 -0
  23. package/dist/tools/agent-handoff.d.ts +100 -0
  24. package/dist/tools/agent-handoff.d.ts.map +1 -0
  25. package/dist/tools/agent-handoff.js +196 -0
  26. package/dist/tools/agent-handoff.js.map +1 -0
  27. package/dist/tools/create-issue-set.d.ts +90 -0
  28. package/dist/tools/create-issue-set.d.ts.map +1 -0
  29. package/dist/tools/create-issue-set.js +142 -0
  30. package/dist/tools/create-issue-set.js.map +1 -0
  31. package/dist/tools/create-pr-summary.d.ts +60 -0
  32. package/dist/tools/create-pr-summary.d.ts.map +1 -0
  33. package/dist/tools/create-pr-summary.js +179 -0
  34. package/dist/tools/create-pr-summary.js.map +1 -0
  35. package/dist/tools/plan-from-context.d.ts +71 -0
  36. package/dist/tools/plan-from-context.d.ts.map +1 -0
  37. package/dist/tools/plan-from-context.js +201 -0
  38. package/dist/tools/plan-from-context.js.map +1 -0
  39. package/dist/tools/prepare-work-item.d.ts +90 -0
  40. package/dist/tools/prepare-work-item.d.ts.map +1 -0
  41. package/dist/tools/prepare-work-item.js +250 -0
  42. package/dist/tools/prepare-work-item.js.map +1 -0
  43. package/dist/tools/quality-gate-status.d.ts +175 -0
  44. package/dist/tools/quality-gate-status.d.ts.map +1 -0
  45. package/dist/tools/quality-gate-status.js +200 -0
  46. package/dist/tools/quality-gate-status.js.map +1 -0
  47. package/dist/tools/release-readiness.d.ts +55 -0
  48. package/dist/tools/release-readiness.d.ts.map +1 -0
  49. package/dist/tools/release-readiness.js +202 -0
  50. package/dist/tools/release-readiness.js.map +1 -0
  51. package/dist/tools/repo-context.d.ts +62 -0
  52. package/dist/tools/repo-context.d.ts.map +1 -0
  53. package/dist/tools/repo-context.js +183 -0
  54. package/dist/tools/repo-context.js.map +1 -0
  55. package/dist/tools/review-pr.d.ts +104 -0
  56. package/dist/tools/review-pr.d.ts.map +1 -0
  57. package/dist/tools/review-pr.js +378 -0
  58. package/dist/tools/review-pr.js.map +1 -0
  59. package/dist/tools/security-triage.d.ts +94 -0
  60. package/dist/tools/security-triage.d.ts.map +1 -0
  61. package/dist/tools/security-triage.js +228 -0
  62. package/dist/tools/security-triage.js.map +1 -0
  63. package/dist/types.d.ts +61 -0
  64. package/dist/types.d.ts.map +1 -0
  65. package/dist/types.js +5 -0
  66. package/dist/types.js.map +1 -0
  67. package/package.json +70 -0
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Helpers for reading repository context from the GitHub API.
3
+ */
4
+ import { getOctokit } from "./client.js";
5
+ export async function fetchRepoContext(opts) {
6
+ const octokit = getOctokit();
7
+ const { owner, repo } = opts;
8
+ // Fetch repo metadata (always)
9
+ const { data: repoData } = await octokit.repos.get({ owner, repo });
10
+ const result = {
11
+ name: repoData.name,
12
+ fullName: repoData.full_name,
13
+ description: repoData.description ?? null,
14
+ defaultBranch: repoData.default_branch,
15
+ visibility: repoData.visibility ?? "unknown",
16
+ language: repoData.language ?? null,
17
+ stargazersCount: repoData.stargazers_count,
18
+ openIssuesCount: repoData.open_issues_count,
19
+ topics: repoData.topics ?? [],
20
+ pushedAt: repoData.pushed_at ?? null,
21
+ };
22
+ // Optional: README
23
+ if (opts.includeReadme) {
24
+ try {
25
+ const { data: readmeData } = await octokit.repos.getReadme({
26
+ owner,
27
+ repo,
28
+ mediaType: { format: "raw" },
29
+ });
30
+ // Truncate to first 3000 characters for context efficiency
31
+ const raw = typeof readmeData === "string"
32
+ ? readmeData
33
+ : JSON.stringify(readmeData);
34
+ result.readme = raw.length > 3000 ? raw.slice(0, 3000) + "\n...(truncated)" : raw;
35
+ }
36
+ catch {
37
+ result.readme = "(README not found or inaccessible)";
38
+ }
39
+ }
40
+ // Optional: package.json
41
+ if (opts.includePackageJson) {
42
+ try {
43
+ const { data: fileData } = await octokit.repos.getContent({
44
+ owner,
45
+ repo,
46
+ path: "package.json",
47
+ mediaType: { format: "raw" },
48
+ });
49
+ const raw = typeof fileData === "string" ? fileData : JSON.stringify(fileData);
50
+ try {
51
+ result.packageJson = JSON.parse(raw);
52
+ }
53
+ catch {
54
+ result.packageJson = { _raw: raw };
55
+ }
56
+ }
57
+ catch {
58
+ result.packageJson = undefined;
59
+ }
60
+ }
61
+ // Optional: open issues
62
+ if (opts.includeOpenIssues) {
63
+ const { data: issuesData } = await octokit.issues.listForRepo({
64
+ owner,
65
+ repo,
66
+ state: "open",
67
+ per_page: opts.issueLimit ?? 20,
68
+ sort: "updated",
69
+ });
70
+ result.openIssues = issuesData
71
+ .filter((i) => !i.pull_request) // exclude PRs from issues list
72
+ .map((i) => ({
73
+ number: i.number,
74
+ title: i.title,
75
+ labels: i.labels.map((l) => (typeof l === "string" ? l : l.name ?? "")),
76
+ createdAt: i.created_at,
77
+ url: i.html_url,
78
+ }));
79
+ }
80
+ // Optional: open PRs
81
+ if (opts.includeOpenPRs) {
82
+ const { data: prsData } = await octokit.pulls.list({
83
+ owner,
84
+ repo,
85
+ state: "open",
86
+ per_page: opts.prLimit ?? 20,
87
+ sort: "updated",
88
+ });
89
+ result.openPRs = prsData.map((pr) => ({
90
+ number: pr.number,
91
+ title: pr.title,
92
+ author: pr.user?.login ?? "unknown",
93
+ draft: pr.draft ?? false,
94
+ createdAt: pr.created_at,
95
+ url: pr.html_url,
96
+ }));
97
+ }
98
+ return result;
99
+ }
100
+ /** Summarise a package.json into a concise string for context. */
101
+ export function summarizePackageJson(pkg) {
102
+ const lines = [];
103
+ if (pkg["name"])
104
+ lines.push(`name: ${pkg["name"]}`);
105
+ if (pkg["version"])
106
+ lines.push(`version: ${pkg["version"]}`);
107
+ if (pkg["description"])
108
+ lines.push(`description: ${pkg["description"]}`);
109
+ if (pkg["main"])
110
+ lines.push(`main: ${pkg["main"]}`);
111
+ const deps = pkg["dependencies"];
112
+ if (deps && typeof deps === "object") {
113
+ const keys = Object.keys(deps).slice(0, 10);
114
+ lines.push(`dependencies (${Object.keys(deps).length}): ${keys.join(", ")}${Object.keys(deps).length > 10 ? "..." : ""}`);
115
+ }
116
+ const devDeps = pkg["devDependencies"];
117
+ if (devDeps && typeof devDeps === "object") {
118
+ const keys = Object.keys(devDeps).slice(0, 5);
119
+ lines.push(`devDependencies (${Object.keys(devDeps).length}): ${keys.join(", ")}${Object.keys(devDeps).length > 5 ? "..." : ""}`);
120
+ }
121
+ return lines.join("\n");
122
+ }
123
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/github/context.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AA4CzC,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,IAAwB;IAExB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAE7B,+BAA+B;IAC/B,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,MAAM,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,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M,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACxJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * agentic-sdlc-mcp — Agentic SDLC Control Plane MCP Server
4
+ *
5
+ * Load .env FIRST (via dotenv/config), before any config import.
6
+ * Windows PowerShell inline alternative:
7
+ * $env:GITHUB_TOKEN="ghp_..."; node dist/index.js
8
+ *
9
+ * Smoke-test mode (no real token required):
10
+ * node dist/index.js --smoke
11
+ */
12
+ import "dotenv/config";
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AACH,OAAO,eAAe,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * agentic-sdlc-mcp — Agentic SDLC Control Plane MCP Server
4
+ *
5
+ * Load .env FIRST (via dotenv/config), before any config import.
6
+ * Windows PowerShell inline alternative:
7
+ * $env:GITHUB_TOKEN="ghp_..."; node dist/index.js
8
+ *
9
+ * Smoke-test mode (no real token required):
10
+ * node dist/index.js --smoke
11
+ */
12
+ import "dotenv/config";
13
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
14
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
15
+ // Tools
16
+ import { registerRepoContextTool } from "./tools/repo-context.js";
17
+ import { registerPlanFromContextTool } from "./tools/plan-from-context.js";
18
+ import { registerCreateIssueSetTool } from "./tools/create-issue-set.js";
19
+ import { registerPrepareWorkItemTool } from "./tools/prepare-work-item.js";
20
+ import { registerQualityGateStatusTool } from "./tools/quality-gate-status.js";
21
+ import { registerCreatePrSummaryTool } from "./tools/create-pr-summary.js";
22
+ import { registerReviewPrTool } from "./tools/review-pr.js";
23
+ import { registerSecurityTriageTool } from "./tools/security-triage.js";
24
+ import { registerReleaseReadinessTool } from "./tools/release-readiness.js";
25
+ import { registerAgentHandoffTool } from "./tools/agent-handoff.js";
26
+ // Resources
27
+ import { registerResources } from "./resources/index.js";
28
+ // Config (exits early if GITHUB_TOKEN missing — skipped in smoke mode)
29
+ import { config } from "./config.js";
30
+ // ---------------------------------------------------------------------------
31
+ // Server initialisation
32
+ // ---------------------------------------------------------------------------
33
+ const server = new McpServer({
34
+ name: "agentic-sdlc-mcp",
35
+ version: "1.0.0",
36
+ });
37
+ // Register all tools
38
+ registerRepoContextTool(server);
39
+ registerPlanFromContextTool(server);
40
+ registerCreateIssueSetTool(server);
41
+ registerPrepareWorkItemTool(server);
42
+ registerQualityGateStatusTool(server);
43
+ registerCreatePrSummaryTool(server);
44
+ registerReviewPrTool(server);
45
+ registerSecurityTriageTool(server);
46
+ registerReleaseReadinessTool(server);
47
+ registerAgentHandoffTool(server);
48
+ // Register all resources
49
+ registerResources(server);
50
+ // ---------------------------------------------------------------------------
51
+ // Smoke mode: verify registration succeeded then exit cleanly
52
+ // ---------------------------------------------------------------------------
53
+ if (config.isSmokeMode) {
54
+ console.error("[agentic-sdlc-mcp] SMOKE OK — all tools and resources registered successfully.");
55
+ console.error("[agentic-sdlc-mcp] Module load, tool registration, and resource registration: PASSED");
56
+ process.exit(0);
57
+ }
58
+ // ---------------------------------------------------------------------------
59
+ // Transport selection
60
+ // ---------------------------------------------------------------------------
61
+ const transport = process.env["TRANSPORT"] ?? "stdio";
62
+ if (transport === "http") {
63
+ /**
64
+ * HTTP transport — requires `express` runtime dependency.
65
+ * Windows PowerShell:
66
+ * $env:TRANSPORT="http"; $env:PORT="3000"; node dist/index.js
67
+ */
68
+ const { default: express } = await import("express");
69
+ const { StreamableHTTPServerTransport } = await import("@modelcontextprotocol/sdk/server/streamableHttp.js");
70
+ const app = express();
71
+ app.use(express.json());
72
+ app.post("/mcp", async (req, res) => {
73
+ const httpTransport = new StreamableHTTPServerTransport({
74
+ sessionIdGenerator: undefined,
75
+ enableJsonResponse: true,
76
+ });
77
+ res.on("close", () => httpTransport.close());
78
+ await server.connect(httpTransport);
79
+ await httpTransport.handleRequest(req, res, req.body);
80
+ });
81
+ const port = parseInt(process.env["PORT"] ?? "3000", 10);
82
+ app.listen(port, () => {
83
+ console.error(`[agentic-sdlc-mcp] HTTP server listening on http://localhost:${port}/mcp`);
84
+ });
85
+ }
86
+ else {
87
+ // Default: stdio
88
+ const stdioTransport = new StdioServerTransport();
89
+ await server.connect(stdioTransport);
90
+ console.error("[agentic-sdlc-mcp] Server running via stdio transport");
91
+ }
92
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AACH,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,QAAQ;AACR,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,8BAA8B,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CA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
5
+ * read standards and templates without calling a tool.
6
+ */
7
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
8
+ export declare function registerResources(server: McpServer): void;
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwPpE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgGzD"}
@@ -0,0 +1,315 @@
1
+ /**
2
+ * MCP Resources for the Agentic SDLC Server.
3
+ *
4
+ * These are static reference documents exposed as resources so agents can
5
+ * read standards and templates without calling a tool.
6
+ */
7
+ const AGENTIC_SDLC_STANDARD = `# Agentic SDLC Standard
8
+
9
+ ## Overview
10
+
11
+ The Agentic SDLC is a six-phase software development lifecycle designed for AI coding agents
12
+ working within GitHub. It ensures traceability, human oversight at key gates, and auditability
13
+ of every change.
14
+
15
+ ## Phases
16
+
17
+ ### 1. Plan
18
+ - Clarify requirements, acceptance criteria, and constraints
19
+ - Identify affected components and interfaces
20
+ - Define risks and unknowns
21
+ - Get human approval on scope before proceeding
22
+ - Output: issue set, SDLC plan document
23
+
24
+ ### 2. Create
25
+ - Work from a feature branch, never directly on main
26
+ - Implement changes incrementally with commits
27
+ - Write or update tests alongside implementation
28
+ - Reference the issue number in every commit message
29
+ - Output: branch with commits, passing local tests
30
+
31
+ ### 3. Test
32
+ - Run the full test suite
33
+ - Verify no regressions
34
+ - Test edge cases and error paths
35
+ - Achieve or maintain coverage thresholds
36
+ - Output: test results, coverage report
37
+
38
+ ### 4. Review
39
+ - Open a PR with a clear description and linked issues
40
+ - Run automated checks (CI, lint, type-check)
41
+ - Request human review — do NOT auto-merge
42
+ - Address all review comments
43
+ - ✋ **Human approval gate: PR must be approved by a human before merge**
44
+ - Output: approved PR
45
+
46
+ ### 5. Optimize
47
+ - Profile if performance-sensitive changes were made
48
+ - Review for unnecessary dependencies
49
+ - Consolidate related commits if requested
50
+ - Output: clean, efficient implementation
51
+
52
+ ### 6. Secure
53
+ - Run Dependabot / dependency audit
54
+ - Check for secret leakage
55
+ - Review input validation and error handling
56
+ - Verify access control changes
57
+ - ✋ **Human approval gate: security review required for auth/data changes**
58
+ - Output: security sign-off
59
+
60
+ ## Traceability Requirements
61
+
62
+ - Every commit must reference an issue number
63
+ - Every PR must be linked to one or more issues
64
+ - All human decisions must be recorded in issue/PR comments
65
+ - Release tags must reference the PR that introduced the change
66
+
67
+ ## Human Approval Gates
68
+
69
+ | Gate | When | Who |
70
+ |------|------|-----|
71
+ | Scope approval | After Plan phase | Product owner or tech lead |
72
+ | PR review | Before merge | At least one human reviewer |
73
+ | Security review | Before release (for auth/data changes) | Security-designated reviewer |
74
+ | Release approval | Before production deployment | On-call or release manager |
75
+
76
+ ## Safety Defaults
77
+
78
+ - All write operations default to dryRun: true
79
+ - Agents must not auto-merge PRs
80
+ - Agents must not force-push to protected branches
81
+ - Agents must not delete branches without confirmation
82
+ - All destructive operations require explicit human confirmation
83
+ `;
84
+ const ISSUE_TEMPLATE = `# Issue Template
85
+
86
+ ## Title
87
+ [Category] Short imperative description of the work
88
+
89
+ ## Body
90
+
91
+ ### Background
92
+ _What context does the reader need to understand this issue?_
93
+
94
+ ### Goal
95
+ _What should be true after this issue is resolved?_
96
+
97
+ ### Non-Goals
98
+ _What is explicitly OUT of scope for this issue?_
99
+
100
+ ### Acceptance Criteria
101
+ - [ ] Criterion 1
102
+ - [ ] Criterion 2
103
+ - [ ] All tests pass
104
+ - [ ] No regressions
105
+
106
+ ### Technical Notes
107
+ _Any implementation hints, links to relevant code, or constraints._
108
+
109
+ ### Risks
110
+ - Risk 1: mitigation approach
111
+ - Risk 2: mitigation approach
112
+
113
+ ### Definition of Done
114
+ - [ ] Implementation complete
115
+ - [ ] Tests added or updated
116
+ - [ ] PR reviewed and approved
117
+ - [ ] CI passing
118
+ - [ ] Documentation updated if applicable
119
+ `;
120
+ const PR_SUMMARY_TEMPLATE = `# PR Summary Template
121
+
122
+ ## Summary
123
+ _One paragraph describing WHAT changed and WHY._
124
+
125
+ ## Changes
126
+ _Bullet list of the main changes._
127
+
128
+ - Changed X to fix Y
129
+ - Added Z to support W
130
+ - Removed deprecated V
131
+
132
+ ## Testing
133
+ _How was this tested?_
134
+
135
+ - [ ] Unit tests added/updated
136
+ - [ ] Integration tests run
137
+ - [ ] Manual testing performed (describe steps)
138
+ - [ ] Edge cases verified
139
+
140
+ ## Risks
141
+ _What could go wrong after merging?_
142
+
143
+ - Risk 1
144
+ - Risk 2
145
+
146
+ ## Review Checklist
147
+ - [ ] Code logic is correct
148
+ - [ ] Edge cases handled
149
+ - [ ] No secrets in the diff
150
+ - [ ] Documentation updated
151
+ - [ ] CI checks pass
152
+
153
+ ## Release Notes Draft
154
+ \`\`\`markdown
155
+ ### <Feature/Fix Title>
156
+ <One-sentence description for the changelog>
157
+ \`\`\`
158
+
159
+ ## Related Issues
160
+ Closes #<issue_number>
161
+ `;
162
+ const RELEASE_READINESS_TEMPLATE = `# Release Readiness Checklist Template
163
+
164
+ ## Pre-Release Gate
165
+
166
+ **Release version:** <version>
167
+ **Date:** <date>
168
+ **Repo:** <owner>/<repo>
169
+ **Release engineer:** <name>
170
+
171
+ ## CI & Quality
172
+ - [ ] All CI checks pass on the release branch/tag
173
+ - [ ] No type errors (tsc --noEmit)
174
+ - [ ] No lint errors
175
+ - [ ] Test coverage is at or above threshold
176
+
177
+ ## Security
178
+ - [ ] No open critical/high Dependabot alerts
179
+ - [ ] No open code scanning critical/high alerts
180
+ - [ ] No exposed secrets (secret scanning clean)
181
+ - [ ] Dependencies audited (npm audit / pip-audit / cargo audit)
182
+
183
+ ## Documentation
184
+ - [ ] CHANGELOG.md updated
185
+ - [ ] README reflects current behaviour
186
+ - [ ] API docs updated if public API changed
187
+ - [ ] Migration guide written if breaking changes
188
+
189
+ ## Deployment
190
+ - [ ] Environment config reviewed
191
+ - [ ] Feature flags set correctly
192
+ - [ ] Database migrations tested (if applicable)
193
+ - [ ] Rollback plan documented
194
+
195
+ ## Sign-off
196
+ - [ ] Product owner sign-off
197
+ - [ ] Tech lead sign-off
198
+ - [ ] Security review sign-off (if auth/data changes)
199
+
200
+ ## Rollback Plan
201
+ 1. Identify last known-good version: <previous_tag>
202
+ 2. Trigger rollback deployment
203
+ 3. Verify health checks
204
+ 4. Open incident issue
205
+ 5. Notify stakeholders
206
+ `;
207
+ const HANDOFF_TEMPLATE = `# Agent Handoff Template
208
+
209
+ ## Handoff Prompt (copy this to the next agent)
210
+ \`\`\`
211
+ You are taking over work on <owner>/<repo>.
212
+
213
+ Current status: <what has been done>
214
+
215
+ Repository: <full_name> (default branch: <default_branch>)
216
+ Active issue: #<number> — <title> (<url>)
217
+ Active PR: #<number> — <title> (<url>)
218
+
219
+ Your next steps (in order):
220
+ 1. <step 1>
221
+ 2. <step 2>
222
+ 3. <step 3>
223
+
224
+ Tools available: repo_context, quality_gate_status, review_pr_against_standard,
225
+ security_triage, release_readiness_check, create_issue_set, agent_handoff_packet
226
+
227
+ Start by calling \`repo_context\` to orient yourself, then proceed with next steps.
228
+ \`\`\`
229
+
230
+ ## Current State
231
+ _Describe what the previous agent did._
232
+
233
+ ## Decisions Made
234
+ - Decision 1 and rationale
235
+ - Decision 2 and rationale
236
+
237
+ ## Remaining Tasks
238
+ - [ ] Task 1
239
+ - [ ] Task 2
240
+ - [ ] Task 3
241
+
242
+ ## Verification Needed
243
+ - [ ] Run quality_gate_status to confirm CI
244
+ - [ ] Run review_pr_against_standard if PR is open
245
+ - [ ] Confirm acceptance criteria from original issue are met
246
+ - [ ] Human review and approval before merge
247
+ `;
248
+ export function registerResources(server) {
249
+ server.registerResource("agentic-sdlc-standard", "sdlc://standards/agentic-sdlc", {
250
+ title: "Agentic SDLC Standard",
251
+ description: "The Agentic SDLC standard: six phases (Plan→Create→Test→Review→Optimize→Secure), traceability requirements, and human approval gates.",
252
+ mimeType: "text/markdown",
253
+ }, async () => ({
254
+ contents: [
255
+ {
256
+ uri: "sdlc://standards/agentic-sdlc",
257
+ mimeType: "text/markdown",
258
+ text: AGENTIC_SDLC_STANDARD,
259
+ },
260
+ ],
261
+ }));
262
+ server.registerResource("issue-template", "sdlc://templates/issue", {
263
+ title: "Issue Template",
264
+ description: "Standard GitHub issue template for Agentic SDLC work items.",
265
+ mimeType: "text/markdown",
266
+ }, async () => ({
267
+ contents: [
268
+ {
269
+ uri: "sdlc://templates/issue",
270
+ mimeType: "text/markdown",
271
+ text: ISSUE_TEMPLATE,
272
+ },
273
+ ],
274
+ }));
275
+ server.registerResource("pr-summary-template", "sdlc://templates/pr-summary", {
276
+ title: "PR Summary Template",
277
+ description: "Standard pull request summary template.",
278
+ mimeType: "text/markdown",
279
+ }, async () => ({
280
+ contents: [
281
+ {
282
+ uri: "sdlc://templates/pr-summary",
283
+ mimeType: "text/markdown",
284
+ text: PR_SUMMARY_TEMPLATE,
285
+ },
286
+ ],
287
+ }));
288
+ server.registerResource("release-readiness-template", "sdlc://templates/release-readiness", {
289
+ title: "Release Readiness Template",
290
+ description: "Pre-release checklist template.",
291
+ mimeType: "text/markdown",
292
+ }, async () => ({
293
+ contents: [
294
+ {
295
+ uri: "sdlc://templates/release-readiness",
296
+ mimeType: "text/markdown",
297
+ text: RELEASE_READINESS_TEMPLATE,
298
+ },
299
+ ],
300
+ }));
301
+ server.registerResource("handoff-template", "sdlc://templates/handoff", {
302
+ title: "Agent Handoff Template",
303
+ description: "Template for generating an agent-to-agent handoff packet.",
304
+ mimeType: "text/markdown",
305
+ }, async () => ({
306
+ contents: [
307
+ {
308
+ uri: "sdlc://templates/handoff",
309
+ mimeType: "text/markdown",
310
+ text: HANDOFF_TEMPLATE,
311
+ },
312
+ ],
313
+ }));
314
+ }
315
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"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BAA6B,EAC7B;QACE,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,yCAAyC;QACtD,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,6BAA6B;gBAClC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,mBAAmB;aAC1B;SACF;KACF,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,gBAAgB,CACrB,4BAA4B,EAC5B,oCAAoC,EACpC;QACE,KAAK,EAAE,4BAA4B;QACnC,WAAW,EAAE,iCAAiC;QAC9C,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,oCAAoC;gBACzC,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,0BAA0B;aACjC;SACF;KACF,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,gBAAgB,CACrB,kBAAkB,EAClB,0BAA0B,EAC1B;QACE,KAAK,EAAE,wBAAwB;QAC/B,WAAW,EAAE,2DAA2D;QACxE,QAAQ,EAAE,eAAe;KAC1B,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,GAAG,EAAE,0BAA0B;gBAC/B,QAAQ,EAAE,eAAe;gBACzB,IAAI,EAAE,gBAAgB;aACvB;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Tool: agent_handoff_packet
3
+ *
4
+ * Handler extracted as `handleAgentHandoff` for testing.
5
+ */
6
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7
+ import { z } from "zod";
8
+ import type { RepoRef } from "../types.js";
9
+ import type { Octokit } from "@octokit/rest";
10
+ export declare const AgentHandoffInputSchema: z.ZodObject<{
11
+ owner: z.ZodOptional<z.ZodString>;
12
+ repo: z.ZodOptional<z.ZodString>;
13
+ issueNumber: z.ZodOptional<z.ZodNumber>;
14
+ pullNumber: z.ZodOptional<z.ZodNumber>;
15
+ currentStatus: z.ZodString;
16
+ nextSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ currentStatus: string;
19
+ owner?: string | undefined;
20
+ repo?: string | undefined;
21
+ issueNumber?: number | undefined;
22
+ pullNumber?: number | undefined;
23
+ nextSteps?: string[] | undefined;
24
+ }, {
25
+ currentStatus: string;
26
+ owner?: string | undefined;
27
+ repo?: string | undefined;
28
+ issueNumber?: number | undefined;
29
+ pullNumber?: number | undefined;
30
+ nextSteps?: string[] | undefined;
31
+ }>;
32
+ export type AgentHandoffInput = z.infer<typeof AgentHandoffInputSchema>;
33
+ export declare const AgentHandoffOutputSchema: {
34
+ repo: z.ZodString;
35
+ defaultBranch: z.ZodString;
36
+ currentStatus: z.ZodString;
37
+ nextSteps: z.ZodArray<z.ZodString, "many">;
38
+ handoffPrompt: z.ZodString;
39
+ issueRef: z.ZodNullable<z.ZodObject<{
40
+ number: z.ZodNumber;
41
+ title: z.ZodString;
42
+ state: z.ZodString;
43
+ url: z.ZodString;
44
+ }, "strip", z.ZodTypeAny, {
45
+ number: number;
46
+ state: string;
47
+ title: string;
48
+ url: string;
49
+ }, {
50
+ number: number;
51
+ state: string;
52
+ title: string;
53
+ url: string;
54
+ }>>;
55
+ prRef: z.ZodNullable<z.ZodObject<{
56
+ number: z.ZodNumber;
57
+ title: z.ZodString;
58
+ state: z.ZodString;
59
+ branch: z.ZodString;
60
+ url: z.ZodString;
61
+ }, "strip", z.ZodTypeAny, {
62
+ number: number;
63
+ state: string;
64
+ title: string;
65
+ url: string;
66
+ branch: string;
67
+ }, {
68
+ number: number;
69
+ state: string;
70
+ title: string;
71
+ url: string;
72
+ branch: string;
73
+ }>>;
74
+ };
75
+ export interface AgentHandoffResult {
76
+ repo: string;
77
+ defaultBranch: string;
78
+ currentStatus: string;
79
+ nextSteps: string[];
80
+ handoffPrompt: string;
81
+ issueRef: {
82
+ number: number;
83
+ title: string;
84
+ state: string;
85
+ url: string;
86
+ } | null;
87
+ prRef: {
88
+ number: number;
89
+ title: string;
90
+ state: string;
91
+ branch: string;
92
+ url: string;
93
+ } | null;
94
+ }
95
+ export declare function handleAgentHandoff(params: AgentHandoffInput, ref: RepoRef, octokit: Octokit): Promise<{
96
+ text: string;
97
+ structured: AgentHandoffResult;
98
+ }>;
99
+ export declare function registerAgentHandoffTool(server: McpServer): void;
100
+ //# sourceMappingURL=agent-handoff.d.ts.map