agentic-sdlc-mcp 1.3.1 → 1.4.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.
- package/README.md +22 -5
- package/dist/github/context.d.ts +41 -0
- package/dist/github/context.d.ts.map +1 -1
- package/dist/github/context.js +191 -3
- package/dist/github/context.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/tools/plan-from-context.d.ts +56 -3
- package/dist/tools/plan-from-context.d.ts.map +1 -1
- package/dist/tools/plan-from-context.js +545 -61
- package/dist/tools/plan-from-context.js.map +1 -1
- package/dist/tools/repo-context.d.ts +17 -0
- package/dist/tools/repo-context.d.ts.map +1 -1
- package/dist/tools/repo-context.js +86 -4
- package/dist/tools/repo-context.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -121,6 +121,12 @@ node dist/index.js
|
|
|
121
121
|
|
|
122
122
|
---
|
|
123
123
|
|
|
124
|
+
## ✅ Generic AI Coding Agent Smoke Test
|
|
125
|
+
|
|
126
|
+
If you need to verify this MCP server in any MCP-capable AI coding agent, follow the client-neutral guide in [`docs/ai-coding-agent-smoke-test.md`](docs/ai-coding-agent-smoke-test.md). It covers the minimum configuration, repository fallback behavior, `repo_context` read-only validation, and `create_issue_set` dry-run preview without creating GitHub issues.
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
124
130
|
## ⚙️ MCP Client Configuration
|
|
125
131
|
|
|
126
132
|
Add this server configuration to your MCP client setting files (e.g., `claude_desktop_config.json`, Cursor, or Windsurf settings):
|
|
@@ -133,7 +139,7 @@ Add this server configuration to your MCP client setting files (e.g., `claude_de
|
|
|
133
139
|
"command": "npx",
|
|
134
140
|
"args": ["-y", "agentic-sdlc-mcp"],
|
|
135
141
|
"env": {
|
|
136
|
-
"GITHUB_TOKEN": "
|
|
142
|
+
"GITHUB_TOKEN": "REPLACE_WITH_GITHUB_TOKEN",
|
|
137
143
|
"GITHUB_OWNER": "your-github-username-or-org",
|
|
138
144
|
"GITHUB_REPO": "your-target-repository"
|
|
139
145
|
}
|
|
@@ -163,7 +169,7 @@ If you run `npx -y agentic-sdlc-mcp` directly without a configured `GITHUB_TOKEN
|
|
|
163
169
|
You can still define environment variables directly in your terminal shell (`PowerShell` for Windows or `bash` for macOS/Linux):
|
|
164
170
|
```powershell
|
|
165
171
|
# Windows PowerShell
|
|
166
|
-
$env:GITHUB_TOKEN = "
|
|
172
|
+
$env:GITHUB_TOKEN = "REPLACE_WITH_GITHUB_TOKEN"
|
|
167
173
|
$env:GITHUB_OWNER = "your-org"
|
|
168
174
|
$env:GITHUB_REPO = "your-repo"
|
|
169
175
|
```
|
|
@@ -200,17 +206,28 @@ When preparation is complete and a release is requested:
|
|
|
200
206
|
Detailed specifications of the exposed MCP tools.
|
|
201
207
|
|
|
202
208
|
### `repo_context`
|
|
203
|
-
Reads repository metadata, README, package.json, open issues, and open PRs. Use this at the start of any workflow to orient the agent.
|
|
209
|
+
Reads repository metadata, README, package.json, open issues, and open PRs. Optionally acts as a fuller "repository briefing packet" -- detected package manager, tech stack, common verification scripts, workflow file names, lightweight governance signals, and agent instruction file summaries (e.g. `AGENTS.md`, `CLAUDE.md`). Use this at the start of any workflow to orient the agent.
|
|
204
210
|
* **Arguments:**
|
|
205
211
|
* `owner` (string, optional): GitHub owner.
|
|
206
212
|
* `repo` (string, optional): GitHub repo.
|
|
213
|
+
* `includeReadme` (boolean, default: `true`): Include a truncated README summary.
|
|
214
|
+
* `includePackageJson` (boolean, default: `false`): Include package.json summary, detected package manager (npm/pnpm/yarn/bun), tech stack, and common scripts (build/test/typecheck/lint/smoke/...).
|
|
215
|
+
* `includeWorkflows` (boolean, default: `false`): Include `.github/workflows/*.yml` file names (names only -- use `workflow_permissions_audit` for permission contents).
|
|
216
|
+
* `includeAgentInstructions` (boolean, default: `false`): Include summaries of agent instruction files found at the repo root (`AGENTS.md`, `CLAUDE.md`).
|
|
217
|
+
* `includeGovernance` (boolean, default: `false`): Include whether a CODEOWNERS file exists (for full branch protection details, use `branch_protection_status`).
|
|
218
|
+
* `includeOpenIssues` / `includeOpenPRs` (boolean, default: `false`): Include recent open issues/PRs.
|
|
207
219
|
* `issueLimit` / `prLimit` (number, default: `20`, max: `100`): Cap how many issues/PRs are fetched.
|
|
220
|
+
* `maxReadmeChars` (number, default: `3000`): Max README characters before truncation.
|
|
221
|
+
* `maxInstructionChars` (number, default: `1000`): Max characters per agent instruction file summary before truncation.
|
|
208
222
|
|
|
209
223
|
### `plan_from_context`
|
|
210
|
-
Generates a structured, phase-by-phase SDLC plan matching the standard milestones.
|
|
224
|
+
Generates a structured, phase-by-phase SDLC plan matching the standard milestones, tailored to a `workType`. Each work type gets a materially different plan -- e.g. `docs` never defaults to requiring code unit tests, `bugfix` always includes repro + regression tests, `security` always includes a threat model and least-privilege review, and `release`/`infra` always include changelog/rollback and workflow-permission checks respectively.
|
|
211
225
|
* **Arguments:**
|
|
212
226
|
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
213
227
|
* `goal` (string, required): The target feature or fix description.
|
|
228
|
+
* `workType` (string, optional): One of `docs` / `feature` / `bugfix` / `refactor` / `security` / `release` / `infra`. If omitted, it is inferred from `goal` + `acceptanceCriteria` via a conservative keyword heuristic -- the response's `confidence` (`high`/`medium`/`low`) and `needsClarification` fields tell you whether to trust the guess or pass `workType` explicitly.
|
|
229
|
+
* `constraints` (string[], optional): Technical or business constraints.
|
|
230
|
+
* `acceptanceCriteria` (string[], optional): Explicit acceptance criteria (also used for workType inference).
|
|
214
231
|
|
|
215
232
|
### `create_issue_set`
|
|
216
233
|
Batch-creates GitHub issues mapping to the generated plan.
|
|
@@ -309,7 +326,7 @@ To prevent AI coding agents from performing destructive or unintended actions on
|
|
|
309
326
|
### Development Scripts
|
|
310
327
|
* `npm run typecheck`: Runs TypeScript compiler type checking.
|
|
311
328
|
* `npm run build`: Compiles TS files to the `dist/` directory.
|
|
312
|
-
* `npm run test`: Executes the unit test suite (
|
|
329
|
+
* `npm run test`: Executes the unit test suite (214 test cases).
|
|
313
330
|
* `npm run smoke`: Verifies registration and loading without external credentials.
|
|
314
331
|
|
|
315
332
|
### OIDC Trusted Publishing (For Maintainers)
|
package/dist/github/context.d.ts
CHANGED
|
@@ -7,11 +7,24 @@ export interface RepoContextOptions extends RepoRef {
|
|
|
7
7
|
includePackageJson?: boolean;
|
|
8
8
|
includeOpenIssues?: boolean;
|
|
9
9
|
includeOpenPRs?: boolean;
|
|
10
|
+
/** Include `.github/workflows/*.yml` file names (not contents/permissions -- see workflow_permissions_audit for that). */
|
|
11
|
+
includeWorkflows?: boolean;
|
|
12
|
+
/** Include summaries of agent instruction files (AGENTS.md, CLAUDE.md) if present. */
|
|
13
|
+
includeAgentInstructions?: boolean;
|
|
14
|
+
/** Include lightweight governance signals, e.g. whether a CODEOWNERS file exists. */
|
|
15
|
+
includeGovernance?: boolean;
|
|
10
16
|
/** Max number of open issues to fetch. Default: 20. */
|
|
11
17
|
issueLimit?: number;
|
|
12
18
|
/** Max number of open PRs to fetch. Default: 20. */
|
|
13
19
|
prLimit?: number;
|
|
20
|
+
/** Max README characters before truncation. Default: 3000. */
|
|
21
|
+
maxReadmeChars?: number;
|
|
22
|
+
/** Max characters per agent instruction file summary before truncation. Default: 1000. */
|
|
23
|
+
maxInstructionChars?: number;
|
|
14
24
|
}
|
|
25
|
+
/** Package managers this module can positively identify. */
|
|
26
|
+
declare const KNOWN_PACKAGE_MANAGERS: readonly ["npm", "pnpm", "yarn", "bun"];
|
|
27
|
+
export type PackageManager = (typeof KNOWN_PACKAGE_MANAGERS)[number] | "unknown";
|
|
15
28
|
export interface RepoContextResult {
|
|
16
29
|
name: string;
|
|
17
30
|
fullName: string;
|
|
@@ -25,6 +38,23 @@ export interface RepoContextResult {
|
|
|
25
38
|
pushedAt: string | null;
|
|
26
39
|
readme?: string;
|
|
27
40
|
packageJson?: Record<string, unknown>;
|
|
41
|
+
/** Detected package manager. Only populated when includePackageJson is true. */
|
|
42
|
+
packageManager?: PackageManager;
|
|
43
|
+
/** Detected technologies from package.json dependencies (e.g. "TypeScript", "Vitest"). Capped, not exhaustive. */
|
|
44
|
+
techStack?: string[];
|
|
45
|
+
/** Common verification scripts (build/test/typecheck/lint/smoke/...) found in package.json, keyed by script name. */
|
|
46
|
+
scripts?: Record<string, string>;
|
|
47
|
+
/** `.github/workflows/*.yml` file names. Names only -- see workflow_permissions_audit for permission contents. */
|
|
48
|
+
workflows?: string[];
|
|
49
|
+
/** Lightweight governance signals. Does not duplicate branch_protection_status -- call that tool for protection details. */
|
|
50
|
+
governance?: {
|
|
51
|
+
codeownersFound: boolean;
|
|
52
|
+
};
|
|
53
|
+
/** Summaries of agent instruction files found at the repo root (e.g. AGENTS.md, CLAUDE.md). */
|
|
54
|
+
agentInstructions?: Array<{
|
|
55
|
+
path: string;
|
|
56
|
+
summary: string;
|
|
57
|
+
}>;
|
|
28
58
|
openIssues?: Array<{
|
|
29
59
|
number: number;
|
|
30
60
|
title: string;
|
|
@@ -41,7 +71,18 @@ export interface RepoContextResult {
|
|
|
41
71
|
url: string;
|
|
42
72
|
}>;
|
|
43
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Read a corepack-style `"packageManager"` field (e.g. `"npm@10.1.0"`) from a
|
|
76
|
+
* package.json object. Returns null when the field is absent or unrecognised
|
|
77
|
+
* so the caller can fall back to lock-file probing.
|
|
78
|
+
*/
|
|
79
|
+
export declare function identifyPackageManagerFromField(pkg: Record<string, unknown> | undefined): PackageManager | null;
|
|
80
|
+
/** Detect technologies from a package.json's dependencies/devDependencies. Pure -- no I/O. Capped to 15 entries. */
|
|
81
|
+
export declare function detectTechStack(pkg: Record<string, unknown> | undefined): string[];
|
|
82
|
+
/** Extract known, commonly-useful scripts from package.json. Pure -- no I/O. */
|
|
83
|
+
export declare function extractCommonScripts(pkg: Record<string, unknown> | undefined): Record<string, string>;
|
|
44
84
|
export declare function fetchRepoContext(opts: RepoContextOptions): Promise<RepoContextResult>;
|
|
45
85
|
/** Summarise a package.json into a concise string for context. */
|
|
46
86
|
export declare function summarizePackageJson(pkg: Record<string, unknown>): string;
|
|
87
|
+
export {};
|
|
47
88
|
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/github/context.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/github/context.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C,MAAM,WAAW,kBAAmB,SAAQ,OAAO;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0HAA0H;IAC1H,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,sFAAsF;IACtF,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qFAAqF;IACrF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0FAA0F;IAC1F,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,4DAA4D;AAC5D,QAAA,MAAM,sBAAsB,yCAA0C,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;AAEjF,MAAM,WAAW,iBAAiB;IAChC,IAAI,EA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K,EAAE,OAAO,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;QAClB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;CACJ;AAMD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,cAAc,GAAG,IAAI,CAQ/G;AAkCD,oHAAoH;AACpH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,EAAE,CAalF;AAgBD,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASrG;AA4FD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,iBAAiB,CAAC,CA6H5B;AAED,kEAAkE;AAClE,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAmBzE"}
|
package/dist/github/context.js
CHANGED
|
@@ -2,6 +2,178 @@
|
|
|
2
2
|
* Helpers for reading repository context from the GitHub API.
|
|
3
3
|
*/
|
|
4
4
|
import { getOctokit } from "./client.js";
|
|
5
|
+
/** Package managers this module can positively identify. */
|
|
6
|
+
const KNOWN_PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Pure helpers (exported for testing)
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
/**
|
|
11
|
+
* Read a corepack-style `"packageManager"` field (e.g. `"npm@10.1.0"`) from a
|
|
12
|
+
* package.json object. Returns null when the field is absent or unrecognised
|
|
13
|
+
* so the caller can fall back to lock-file probing.
|
|
14
|
+
*/
|
|
15
|
+
export function identifyPackageManagerFromField(pkg) {
|
|
16
|
+
const value = pkg?.["packageManager"];
|
|
17
|
+
if (typeof value !== "string")
|
|
18
|
+
return null;
|
|
19
|
+
const name = value.split("@")[0]?.trim().toLowerCase();
|
|
20
|
+
if (name && KNOWN_PACKAGE_MANAGERS.includes(name)) {
|
|
21
|
+
return name;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
/** Dependency name -> human-readable technology label, checked across dependencies + devDependencies. */
|
|
26
|
+
const TECH_DEPENDENCY_MAP = {
|
|
27
|
+
typescript: "TypeScript",
|
|
28
|
+
vite: "Vite",
|
|
29
|
+
next: "Next.js",
|
|
30
|
+
vitest: "Vitest",
|
|
31
|
+
jest: "Jest",
|
|
32
|
+
mocha: "Mocha",
|
|
33
|
+
express: "Express",
|
|
34
|
+
fastify: "Fastify",
|
|
35
|
+
koa: "Koa",
|
|
36
|
+
react: "React",
|
|
37
|
+
"react-dom": "React",
|
|
38
|
+
vue: "Vue",
|
|
39
|
+
"@angular/core": "Angular",
|
|
40
|
+
"@nestjs/core": "NestJS",
|
|
41
|
+
svelte: "Svelte",
|
|
42
|
+
nuxt: "Nuxt",
|
|
43
|
+
tailwindcss: "Tailwind CSS",
|
|
44
|
+
prisma: "Prisma",
|
|
45
|
+
"@prisma/client": "Prisma",
|
|
46
|
+
playwright: "Playwright",
|
|
47
|
+
"@playwright/test": "Playwright",
|
|
48
|
+
electron: "Electron",
|
|
49
|
+
eslint: "ESLint",
|
|
50
|
+
webpack: "Webpack",
|
|
51
|
+
rollup: "Rollup",
|
|
52
|
+
esbuild: "esbuild",
|
|
53
|
+
"@modelcontextprotocol/sdk": "MCP SDK",
|
|
54
|
+
zod: "Zod",
|
|
55
|
+
};
|
|
56
|
+
/** Detect technologies from a package.json's dependencies/devDependencies. Pure -- no I/O. Capped to 15 entries. */
|
|
57
|
+
export function detectTechStack(pkg) {
|
|
58
|
+
if (!pkg)
|
|
59
|
+
return [];
|
|
60
|
+
const names = new Set();
|
|
61
|
+
for (const section of ["dependencies", "devDependencies"]) {
|
|
62
|
+
const deps = pkg[section];
|
|
63
|
+
if (deps && typeof deps === "object" && !Array.isArray(deps)) {
|
|
64
|
+
for (const depName of Object.keys(deps)) {
|
|
65
|
+
const label = TECH_DEPENDENCY_MAP[depName];
|
|
66
|
+
if (label)
|
|
67
|
+
names.add(label);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return Array.from(names).slice(0, 15);
|
|
72
|
+
}
|
|
73
|
+
/** Verification-relevant script names worth surfacing to an agent before it starts work. */
|
|
74
|
+
const COMMON_SCRIPT_KEYS = [
|
|
75
|
+
"build",
|
|
76
|
+
"dev",
|
|
77
|
+
"start",
|
|
78
|
+
"test",
|
|
79
|
+
"test:watch",
|
|
80
|
+
"test:coverage",
|
|
81
|
+
"typecheck",
|
|
82
|
+
"lint",
|
|
83
|
+
"smoke",
|
|
84
|
+
"format",
|
|
85
|
+
];
|
|
86
|
+
/** Extract known, commonly-useful scripts from package.json. Pure -- no I/O. */
|
|
87
|
+
export function extractCommonScripts(pkg) {
|
|
88
|
+
const scripts = pkg?.["scripts"];
|
|
89
|
+
if (!scripts || typeof scripts !== "object" || Array.isArray(scripts))
|
|
90
|
+
return {};
|
|
91
|
+
const result = {};
|
|
92
|
+
for (const key of COMMON_SCRIPT_KEYS) {
|
|
93
|
+
const value = scripts[key];
|
|
94
|
+
if (typeof value === "string")
|
|
95
|
+
result[key] = value;
|
|
96
|
+
}
|
|
97
|
+
return result;
|
|
98
|
+
}
|
|
99
|
+
// ---------------------------------------------------------------------------
|
|
100
|
+
// I/O helpers (exported for testing)
|
|
101
|
+
// ---------------------------------------------------------------------------
|
|
102
|
+
/** Lock files checked in order; the first one found determines the package manager. */
|
|
103
|
+
const LOCK_FILE_CANDIDATES = [
|
|
104
|
+
{ file: "package-lock.json", manager: "npm" },
|
|
105
|
+
{ file: "pnpm-lock.yaml", manager: "pnpm" },
|
|
106
|
+
{ file: "yarn.lock", manager: "yarn" },
|
|
107
|
+
{ file: "bun.lockb", manager: "bun" },
|
|
108
|
+
];
|
|
109
|
+
/**
|
|
110
|
+
* Probe for a lock file to identify the package manager when package.json
|
|
111
|
+
* did not declare a `packageManager` field. Stops at the first match --
|
|
112
|
+
* at most 4 extra API calls, only incurred when includePackageJson is true
|
|
113
|
+
* and the field-based check above came back empty.
|
|
114
|
+
*/
|
|
115
|
+
async function probePackageManagerByLockFile(octokit, owner, repo) {
|
|
116
|
+
for (const { file, manager } of LOCK_FILE_CANDIDATES) {
|
|
117
|
+
try {
|
|
118
|
+
await octokit.repos.getContent({ owner, repo, path: file });
|
|
119
|
+
return manager;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
// Not found at this path -- try the next candidate.
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
return "unknown";
|
|
126
|
+
}
|
|
127
|
+
/** List `.github/workflows/*.yml`|`.yaml` file names. Names only -- no content parsing (see workflow_permissions_audit). */
|
|
128
|
+
async function listWorkflowFileNames(octokit, owner, repo) {
|
|
129
|
+
try {
|
|
130
|
+
const { data } = await octokit.repos.getContent({ owner, repo, path: ".github/workflows" });
|
|
131
|
+
if (!Array.isArray(data))
|
|
132
|
+
return [];
|
|
133
|
+
return data.filter((entry) => entry.type === "file" && /\.ya?ml$/i.test(entry.name)).map((entry) => entry.name);
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
return [];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/** Conventional CODEOWNERS candidate paths, same set used by review_pr_against_standard. */
|
|
140
|
+
const CODEOWNERS_CANDIDATE_PATHS = [".github/CODEOWNERS", "CODEOWNERS", "docs/CODEOWNERS"];
|
|
141
|
+
/** Whether a CODEOWNERS file exists at any conventional path. Existence only -- ownership routing lives in review_pr_against_standard. */
|
|
142
|
+
async function checkCodeownersExists(octokit, owner, repo) {
|
|
143
|
+
for (const path of CODEOWNERS_CANDIDATE_PATHS) {
|
|
144
|
+
try {
|
|
145
|
+
await octokit.repos.getContent({ owner, repo, path });
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
// Not found at this path -- try the next candidate.
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return false;
|
|
153
|
+
}
|
|
154
|
+
/** Agent instruction files this module looks for at the repo root, checked in order. */
|
|
155
|
+
const AGENT_INSTRUCTION_CANDIDATE_PATHS = ["AGENTS.md", "CLAUDE.md"];
|
|
156
|
+
/** Fetch and truncate any agent instruction files found at the repo root. */
|
|
157
|
+
async function fetchAgentInstructionSummaries(octokit, owner, repo, maxChars) {
|
|
158
|
+
const results = [];
|
|
159
|
+
for (const path of AGENT_INSTRUCTION_CANDIDATE_PATHS) {
|
|
160
|
+
try {
|
|
161
|
+
const { data } = await octokit.repos.getContent({
|
|
162
|
+
owner,
|
|
163
|
+
repo,
|
|
164
|
+
path,
|
|
165
|
+
mediaType: { format: "raw" },
|
|
166
|
+
});
|
|
167
|
+
const raw = typeof data === "string" ? data : JSON.stringify(data);
|
|
168
|
+
const summary = raw.length > maxChars ? raw.slice(0, maxChars) + "\n...(truncated)" : raw;
|
|
169
|
+
results.push({ path, summary });
|
|
170
|
+
}
|
|
171
|
+
catch {
|
|
172
|
+
// Not found at this path -- try the next candidate.
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return results;
|
|
176
|
+
}
|
|
5
177
|
export async function fetchRepoContext(opts) {
|
|
6
178
|
const octokit = getOctokit();
|
|
7
179
|
const { owner, repo } = opts;
|
|
@@ -27,17 +199,17 @@ export async function fetchRepoContext(opts) {
|
|
|
27
199
|
repo,
|
|
28
200
|
mediaType: { format: "raw" },
|
|
29
201
|
});
|
|
30
|
-
|
|
202
|
+
const maxChars = opts.maxReadmeChars ?? 3000;
|
|
31
203
|
const raw = typeof readmeData === "string"
|
|
32
204
|
? readmeData
|
|
33
205
|
: JSON.stringify(readmeData);
|
|
34
|
-
result.readme = raw.length >
|
|
206
|
+
result.readme = raw.length > maxChars ? raw.slice(0, maxChars) + "\n...(truncated)" : raw;
|
|
35
207
|
}
|
|
36
208
|
catch {
|
|
37
209
|
result.readme = "(README not found or inaccessible)";
|
|
38
210
|
}
|
|
39
211
|
}
|
|
40
|
-
// Optional: package.json
|
|
212
|
+
// Optional: package.json + derived packageManager/techStack/scripts
|
|
41
213
|
if (opts.includePackageJson) {
|
|
42
214
|
try {
|
|
43
215
|
const { data: fileData } = await octokit.repos.getContent({
|
|
@@ -57,6 +229,22 @@ export async function fetchRepoContext(opts) {
|
|
|
57
229
|
catch {
|
|
58
230
|
result.packageJson = undefined;
|
|
59
231
|
}
|
|
232
|
+
result.techStack = detectTechStack(result.packageJson);
|
|
233
|
+
result.scripts = extractCommonScripts(result.packageJson);
|
|
234
|
+
const fieldPackageManager = identifyPackageManagerFromField(result.packageJson);
|
|
235
|
+
result.packageManager = fieldPackageManager ?? (await probePackageManagerByLockFile(octokit, owner, repo));
|
|
236
|
+
}
|
|
237
|
+
// Optional: workflow file names
|
|
238
|
+
if (opts.includeWorkflows) {
|
|
239
|
+
result.workflows = await listWorkflowFileNames(octokit, owner, repo);
|
|
240
|
+
}
|
|
241
|
+
// Optional: lightweight governance signals
|
|
242
|
+
if (opts.includeGovernance) {
|
|
243
|
+
result.governance = { codeownersFound: await checkCodeownersExists(octokit, owner, repo) };
|
|
244
|
+
}
|
|
245
|
+
// Optional: agent instruction file summaries
|
|
246
|
+
if (opts.includeAgentInstructions) {
|
|
247
|
+
result.agentInstructions = await fetchAgentInstructionSummaries(octokit, owner, repo, opts.maxInstructionChars ?? 1000);
|
|
60
248
|
}
|
|
61
249
|
// Optional: open issues
|
|
62
250
|
if (opts.includeOpenIssues) {
|
|
@@ -1 +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,CA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AAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ await initializeConfig();
|
|
|
36
36
|
// ---------------------------------------------------------------------------
|
|
37
37
|
const server = new McpServer({
|
|
38
38
|
name: "agentic-sdlc-mcp",
|
|
39
|
-
version: "1.
|
|
39
|
+
version: "1.4.0",
|
|
40
40
|
});
|
|
41
41
|
// Register all tools
|
|
42
42
|
registerRepoContextTool(server);
|
|
@@ -2,15 +2,34 @@
|
|
|
2
2
|
* Tool: plan_from_context
|
|
3
3
|
*
|
|
4
4
|
* Handler extracted as `buildPlan` and `handlePlanFromContext` for testing.
|
|
5
|
+
*
|
|
6
|
+
* Supports `workType` (docs/feature/bugfix/refactor/security/release/infra):
|
|
7
|
+
* each type gets a distinct phase-by-phase template rather than one
|
|
8
|
+
* one-size-fits-all plan -- a docs-only task should not default to requiring
|
|
9
|
+
* code unit tests, while a bugfix task must always include repro + regression
|
|
10
|
+
* tests. When the caller does not pass `workType` explicitly, it is inferred
|
|
11
|
+
* from `goal` + `acceptanceCriteria` via a conservative keyword heuristic
|
|
12
|
+
* (see `inferWorkType`), and the inference itself (confidence, reasoning,
|
|
13
|
+
* whether clarification is needed) is surfaced in the output rather than
|
|
14
|
+
* hidden -- callers should not have to trust a silent guess.
|
|
5
15
|
*/
|
|
6
16
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
7
17
|
import { z } from "zod";
|
|
8
18
|
import { fetchRepoContext } from "../github/context.js";
|
|
9
|
-
import type { SdlcPlanPhase } from "../types.js";
|
|
19
|
+
import type { SdlcPlanPhase, SdlcWorkType } from "../types.js";
|
|
10
20
|
export declare const PlanFromContextInputSchema: z.ZodObject<{
|
|
11
21
|
goal: z.ZodString;
|
|
12
22
|
owner: z.ZodOptional<z.ZodString>;
|
|
13
23
|
repo: z.ZodOptional<z.ZodString>;
|
|
24
|
+
workType: z.ZodOptional<z.ZodEnum<{
|
|
25
|
+
docs: "docs";
|
|
26
|
+
feature: "feature";
|
|
27
|
+
bugfix: "bugfix";
|
|
28
|
+
refactor: "refactor";
|
|
29
|
+
security: "security";
|
|
30
|
+
release: "release";
|
|
31
|
+
infra: "infra";
|
|
32
|
+
}>>;
|
|
14
33
|
constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
15
34
|
acceptanceCriteria: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
35
|
}, z.core.$strip>;
|
|
@@ -20,6 +39,22 @@ export declare const PlanFromContextOutputSchema: {
|
|
|
20
39
|
repo: z.ZodString;
|
|
21
40
|
defaultBranch: z.ZodString;
|
|
22
41
|
language: z.ZodNullable<z.ZodString>;
|
|
42
|
+
workType: z.ZodEnum<{
|
|
43
|
+
docs: "docs";
|
|
44
|
+
feature: "feature";
|
|
45
|
+
bugfix: "bugfix";
|
|
46
|
+
refactor: "refactor";
|
|
47
|
+
security: "security";
|
|
48
|
+
release: "release";
|
|
49
|
+
infra: "infra";
|
|
50
|
+
}>;
|
|
51
|
+
confidence: z.ZodEnum<{
|
|
52
|
+
high: "high";
|
|
53
|
+
medium: "medium";
|
|
54
|
+
low: "low";
|
|
55
|
+
}>;
|
|
56
|
+
reasoning: z.ZodString;
|
|
57
|
+
needsClarification: z.ZodBoolean;
|
|
23
58
|
constraints: z.ZodArray<z.ZodString>;
|
|
24
59
|
acceptanceCriteria: z.ZodArray<z.ZodString>;
|
|
25
60
|
phases: z.ZodArray<z.ZodObject<{
|
|
@@ -35,14 +70,32 @@ export interface PlanFromContextResult {
|
|
|
35
70
|
repo: string;
|
|
36
71
|
defaultBranch: string;
|
|
37
72
|
language: string | null;
|
|
73
|
+
workType: SdlcWorkType;
|
|
74
|
+
confidence: "high" | "medium" | "low";
|
|
75
|
+
reasoning: string;
|
|
76
|
+
needsClarification: boolean;
|
|
38
77
|
constraints: string[];
|
|
39
78
|
acceptanceCriteria: string[];
|
|
40
79
|
phases: SdlcPlanPhase[];
|
|
41
80
|
suggestedIssues: string[];
|
|
42
81
|
risks: string[];
|
|
43
82
|
}
|
|
44
|
-
|
|
45
|
-
|
|
83
|
+
export interface WorkTypeInference {
|
|
84
|
+
workType: SdlcWorkType;
|
|
85
|
+
confidence: "high" | "medium" | "low";
|
|
86
|
+
reasoning: string;
|
|
87
|
+
needsClarification: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Infer a `workType` from free-text goal + acceptance criteria when the caller
|
|
91
|
+
* did not pass one explicitly. Conservative by design: ties or zero signal
|
|
92
|
+
* fall back to `feature` with `needsClarification: true` rather than guessing
|
|
93
|
+
* confidently, so callers know to double-check rather than trust a silent
|
|
94
|
+
* default.
|
|
95
|
+
*/
|
|
96
|
+
export declare function inferWorkType(goal: string, acceptanceCriteria: string[], explicit?: SdlcWorkType): WorkTypeInference;
|
|
97
|
+
/** Build the phase-by-phase plan for a given workType (defaults to "feature" for backward compatibility). Pure -- no I/O. */
|
|
98
|
+
export declare function buildPlan(goal: string, repoName: string, workType?: SdlcWorkType): SdlcPlanPhase[];
|
|
46
99
|
export declare function handlePlanFromContext(params: PlanFromContextInput, fetchContext: typeof fetchRepoContext): Promise<{
|
|
47
100
|
text: string;
|
|
48
101
|
structured: PlanFromContextResult;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plan-from-context.d.ts","sourceRoot":"","sources":["../../src/tools/plan-from-context.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"plan-from-context.d.ts","sourceRoot":"","sources":["../../src/tools/plan-from-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MA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