agentic-sdlc-mcp 1.3.0 → 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/LICENSE +21 -0
- package/README.md +233 -240
- package/dist/config.d.ts +4 -3
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +117 -23
- package/dist/config.js.map +1 -1
- 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 +4 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/agent-handoff.d.ts +5 -41
- package/dist/tools/agent-handoff.d.ts.map +1 -1
- package/dist/tools/branch-protection-status.d.ts +17 -25
- package/dist/tools/branch-protection-status.d.ts.map +1 -1
- package/dist/tools/create-issue-set.d.ts +6 -46
- package/dist/tools/create-issue-set.d.ts.map +1 -1
- package/dist/tools/create-pr-summary.d.ts +3 -11
- package/dist/tools/create-pr-summary.d.ts.map +1 -1
- package/dist/tools/plan-from-context.d.ts +65 -32
- 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/prepare-work-item.d.ts +6 -30
- package/dist/tools/prepare-work-item.d.ts.map +1 -1
- package/dist/tools/quality-gate-status.d.ts +11 -107
- package/dist/tools/quality-gate-status.d.ts.map +1 -1
- package/dist/tools/release-readiness.d.ts +8 -15
- package/dist/tools/release-readiness.d.ts.map +1 -1
- package/dist/tools/repo-context.d.ts +21 -30
- 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/tools/review-pr.d.ts +20 -28
- package/dist/tools/review-pr.d.ts.map +1 -1
- package/dist/tools/security-triage.d.ts +12 -46
- package/dist/tools/security-triage.d.ts.map +1 -1
- package/dist/tools/workflow-permissions-audit.d.ts +16 -24
- package/dist/tools/workflow-permissions-audit.d.ts.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +9 -9
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SakuraCianna
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,346 +1,339 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/logo.svg" alt="MCP Logo" width="120"/>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">Agentic SDLC Control Plane (agentic-sdlc-mcp)</h1>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<b>Expose professional, structured SDLC workflows as MCP tools to guide AI coding agents (Claude, Cursor, etc.) through safe, auditable development lifecycles.</b>
|
|
9
|
+
</p>
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/agentic-sdlc-mcp"><img src="https://img.shields.io/npm/v/agentic-sdlc-mcp.svg?style=flat-square&color=blue" alt="npm version"></a>
|
|
13
|
+
<a href="https://github.com/SakuraCianna/agentic-sdlc-mcp/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/SakuraCianna/agentic-sdlc-mcp/ci.yml?branch=main&style=flat-square" alt="CI status"></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/agentic-sdlc-mcp"><img src="https://img.shields.io/npm/dm/agentic-sdlc-mcp.svg?style=flat-square&color=green" alt="downloads"></a>
|
|
15
|
+
<a href="https://github.com/SakuraCianna/agentic-sdlc-mcp/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/agentic-sdlc-mcp.svg?style=flat-square&color=orange" alt="license"></a>
|
|
16
|
+
<a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Compatible-blue?style=flat-square" alt="MCP Compatible"></a>
|
|
17
|
+
</p>
|
|
9
18
|
|
|
10
19
|
---
|
|
11
20
|
|
|
12
|
-
## What Is This?
|
|
21
|
+
## 💡 What Is This?
|
|
13
22
|
|
|
14
|
-
|
|
23
|
+
Traditional AI agents write code but often lack the context of software engineering discipline. They might force-push, bypass reviews, fail to run CI, leak secrets, or skip writing test cases.
|
|
15
24
|
|
|
16
|
-
|
|
17
|
-
Plan -> Create -> Test -> Review -> Optimize -> Secure
|
|
18
|
-
```
|
|
25
|
+
`agentic-sdlc-mcp` is an **SDLC orchestration layer and control plane** built on the **Model Context Protocol (MCP)**. It wraps GitHub APIs into high-level, opinionated tools that enforce traceability, human-in-the-loop gates, quality thresholds, and security checks for AI coding agents.
|
|
19
26
|
|
|
20
|
-
|
|
27
|
+
### The Agentic SDLC Loop
|
|
28
|
+
```mermaid
|
|
29
|
+
graph TD
|
|
30
|
+
A[Phase 1: Plan] -->|Exposed context & briefs| B[Phase 2: Create]
|
|
31
|
+
B -->|Incremental commits| C[Phase 3: Test]
|
|
32
|
+
C -->|Local test reports| D[Phase 4: Review]
|
|
33
|
+
D -->|Human review gate| E[Phase 5: Optimize]
|
|
34
|
+
E -->|Refinement| F[Phase 6: Secure]
|
|
35
|
+
F -->|Security check | G[Human Release Approval]
|
|
36
|
+
G -->|Release Tag & deploy| A
|
|
37
|
+
```
|
|
21
38
|
|
|
22
39
|
---
|
|
23
40
|
|
|
24
|
-
##
|
|
41
|
+
## 🛠️ Tools Categorization
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
Instead of exposing raw API endpoints, this server provides **12 specialized tools** structured around the SDLC pipeline:
|
|
27
44
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
45
|
+
| Category | Tools | Description |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| **💡 Planning & Context** | [`repo_context`](#repo_context)<br>[`plan_from_context`](#plan_from_context)<br>[`prepare_work_item`](#prepare_work_item) | Understand the codebase, structure phase-by-phase plans, and generate agent briefs. |
|
|
48
|
+
| **🚀 Execution** | [`create_issue_set`](#create_issue_set) | Batch-create GitHub issues mapping directly to the SDLC plan. |
|
|
49
|
+
| **🔍 Review & Verification** | [`quality_gate_status`](#quality_gate_status)<br>[`create_pr_summary`](#create_pr_summary)<br>[`review_pr_against_standard`](#review_pr_against_standard) | Audit CI checks, generate structured PR summaries, and review code against SDLC standard levels. |
|
|
50
|
+
| **🛡️ Governance & Security** | [`branch_protection_status`](#branch_protection_status)<br>[`workflow_permissions_audit`](#workflow_permissions_audit)<br>[`security_triage`](#security_triage)<br>[`release_readiness_check`](#release_readiness_check) | Query branch rule enforcement, audit Actions workflow permissions, triage vulnerabilities, and perform pre-release checks. |
|
|
51
|
+
| **🤝 Handoff & Continuity** | [`agent_handoff_packet`](#agent_handoff_packet) | Compile a packet so other agents can seamlessly take over the work. |
|
|
32
52
|
|
|
33
|
-
|
|
34
|
-
npm install
|
|
53
|
+
---
|
|
35
54
|
|
|
36
|
-
|
|
37
|
-
|
|
55
|
+
## 🗺️ System Architecture
|
|
56
|
+
```mermaid
|
|
57
|
+
sequenceDiagram
|
|
58
|
+
autonumber
|
|
59
|
+
actor Developer as Human Owner
|
|
60
|
+
participant Agent as AI Coding Agent (Cursor/Claude)
|
|
61
|
+
participant MCP as agentic-sdlc-mcp (Control Plane)
|
|
62
|
+
participant GitHub as GitHub API
|
|
63
|
+
participant npm as npm Registry
|
|
64
|
+
|
|
65
|
+
Developer->>Agent: "Create a feature for repo X"
|
|
66
|
+
Agent->>MCP: Call repo_context / plan_from_context
|
|
67
|
+
MCP->>GitHub: Fetch repository states & file tree
|
|
68
|
+
GitHub-->>MCP: Repo Metadata & Files
|
|
69
|
+
MCP-->>Agent: SDLC Plan & context brief
|
|
70
|
+
Note over Agent: Agent develops code...
|
|
71
|
+
Agent->>MCP: Call review_pr_against_standard / quality_gate_status
|
|
72
|
+
MCP->>GitHub: Audit pull request, CODEOWNERS, & checks status
|
|
73
|
+
GitHub-->>MCP: PR approvals, CI check status
|
|
74
|
+
MCP-->>Agent: Verification report & findings
|
|
75
|
+
Note over Developer,Agent: Human Review Gate: Merge PR
|
|
76
|
+
Developer->>MCP: Trigger gh release create v1.3.0
|
|
77
|
+
MCP->>GitHub: Create Release Tag
|
|
78
|
+
GitHub->>GitHub: Trigger publish.yml Workflow (OIDC)
|
|
79
|
+
GitHub->>npm: Publish package (Signed with provenance)
|
|
38
80
|
```
|
|
39
81
|
|
|
40
82
|
---
|
|
41
83
|
|
|
42
|
-
##
|
|
84
|
+
## 📋 Prerequisites
|
|
43
85
|
|
|
44
|
-
|
|
86
|
+
Before running the server, ensure you have:
|
|
87
|
+
1. **Node.js >= 24** installed on your system.
|
|
88
|
+
2. **GitHub Personal Access Token (PAT)**:
|
|
89
|
+
* **Scopes required**:
|
|
90
|
+
* `repo` (Full control of private/public repositories, issues, PRs, and checks).
|
|
91
|
+
* `security_events` (To query Code Scanning and Dependabot alerts).
|
|
92
|
+
* Note: Make sure to verify token permissions against [GitHub REST API Documentation](https://docs.github.com/en/rest) if security endpoints fail.
|
|
45
93
|
|
|
46
|
-
|
|
47
|
-
Copy-Item .env.example .env
|
|
48
|
-
```
|
|
94
|
+
---
|
|
49
95
|
|
|
50
|
-
|
|
96
|
+
## ⚡ Quick Start
|
|
51
97
|
|
|
52
|
-
|
|
98
|
+
### 1. Instant Run via npx (Recommended)
|
|
99
|
+
You do not need to download or clone the repository. Run the server directly inside your MCP client environment:
|
|
100
|
+
```bash
|
|
101
|
+
npx -y agentic-sdlc-mcp
|
|
102
|
+
```
|
|
53
103
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
104
|
+
### 2. Global Installation
|
|
105
|
+
Or install the package globally on your system:
|
|
106
|
+
```bash
|
|
107
|
+
npm install -g agentic-sdlc-mcp
|
|
108
|
+
# Start using the global command
|
|
109
|
+
agentic-sdlc-mcp
|
|
58
110
|
```
|
|
59
111
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
112
|
+
### 3. Local Development (From Source)
|
|
113
|
+
If you want to run or extend the server locally from the source code:
|
|
114
|
+
```bash
|
|
115
|
+
git clone https://github.com/SakuraCianna/agentic-sdlc-mcp.git
|
|
116
|
+
cd agentic-sdlc-mcp
|
|
117
|
+
npm install
|
|
118
|
+
npm run build
|
|
119
|
+
node dist/index.js
|
|
120
|
+
```
|
|
68
121
|
|
|
69
|
-
|
|
122
|
+
---
|
|
70
123
|
|
|
71
|
-
|
|
72
|
-
|---|---|
|
|
73
|
-
| `repo` | Read/write issues, PRs, file contents, checks (or `public_repo` for public-only repos) |
|
|
74
|
-
| `security_events` | Code Scanning and Dependabot alerts (or `public_repo` for public-only repos) |
|
|
75
|
-
| `repo` or `security_events` | Secret Scanning alerts |
|
|
124
|
+
## ✅ Generic AI Coding Agent Smoke Test
|
|
76
125
|
|
|
77
|
-
|
|
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.
|
|
78
127
|
|
|
79
128
|
---
|
|
80
129
|
|
|
81
|
-
## MCP Client Configuration
|
|
130
|
+
## ⚙️ MCP Client Configuration
|
|
82
131
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
Add to your MCP client config (`claude_desktop_config.json` or equivalent):
|
|
132
|
+
Add this server configuration to your MCP client setting files (e.g., `claude_desktop_config.json`, Cursor, or Windsurf settings):
|
|
86
133
|
|
|
134
|
+
### Claude Desktop / Cursor / Windsurf (Using npm package)
|
|
87
135
|
```json
|
|
88
136
|
{
|
|
89
137
|
"mcpServers": {
|
|
90
138
|
"agentic-sdlc": {
|
|
91
|
-
"command": "
|
|
92
|
-
"args": ["
|
|
139
|
+
"command": "npx",
|
|
140
|
+
"args": ["-y", "agentic-sdlc-mcp"],
|
|
93
141
|
"env": {
|
|
94
|
-
"GITHUB_TOKEN": "
|
|
95
|
-
"GITHUB_OWNER": "your-org",
|
|
96
|
-
"GITHUB_REPO": "your-
|
|
142
|
+
"GITHUB_TOKEN": "REPLACE_WITH_GITHUB_TOKEN",
|
|
143
|
+
"GITHUB_OWNER": "your-github-username-or-org",
|
|
144
|
+
"GITHUB_REPO": "your-target-repository"
|
|
97
145
|
}
|
|
98
146
|
}
|
|
99
147
|
}
|
|
100
148
|
}
|
|
101
149
|
```
|
|
102
150
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Running the Server
|
|
151
|
+
### 🔑 Global Configuration & Interactive Setup (Persistent)
|
|
108
152
|
|
|
109
|
-
|
|
153
|
+
In addition to specifying environment variables in your MCP client configurations, you can configure your GitHub credentials globally using an interactive terminal questionnaire. The settings will be saved to `~/.agentic-sdlc-mcp.json` under your home directory and automatically loaded in subsequent runs.
|
|
110
154
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
155
|
+
#### 1. Configure via CLI
|
|
156
|
+
Run the configuration command:
|
|
157
|
+
```bash
|
|
158
|
+
npx agentic-sdlc-mcp configure
|
|
114
159
|
```
|
|
160
|
+
This guides you through configuring:
|
|
161
|
+
* `GITHUB_TOKEN` (Primary token; [generate classic token here](https://github.com/settings/tokens) with `repo` and `read:org` scopes)
|
|
162
|
+
* `GITHUB_OWNER` (Default repository owner name, optional)
|
|
163
|
+
* `GITHUB_REPO` (Default repository name, optional)
|
|
115
164
|
|
|
116
|
-
|
|
165
|
+
#### 2. Automatic Setup Prompts (TTY)
|
|
166
|
+
If you run `npx -y agentic-sdlc-mcp` directly without a configured `GITHUB_TOKEN`, the tool detects if it is in an interactive environment (TTY) and automatically launches the prompt flow. If it runs non-interactively (e.g. launched by Claude Desktop in the background), it exits gracefully with clear setup instructions.
|
|
117
167
|
|
|
168
|
+
#### 3. Global Environment Variables (Fallback)
|
|
169
|
+
You can still define environment variables directly in your terminal shell (`PowerShell` for Windows or `bash` for macOS/Linux):
|
|
118
170
|
```powershell
|
|
119
|
-
|
|
120
|
-
$env:
|
|
121
|
-
$env:
|
|
122
|
-
|
|
123
|
-
# Server listens at http://localhost:3000/mcp
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### Smoke test (no real token required)
|
|
127
|
-
|
|
128
|
-
Verifies the module loads cleanly and all tools register without error:
|
|
129
|
-
|
|
130
|
-
```powershell
|
|
131
|
-
npm run smoke
|
|
132
|
-
# Output: [agentic-sdlc-mcp] SMOKE OK — all tools and resources registered successfully.
|
|
171
|
+
# Windows PowerShell
|
|
172
|
+
$env:GITHUB_TOKEN = "REPLACE_WITH_GITHUB_TOKEN"
|
|
173
|
+
$env:GITHUB_OWNER = "your-org"
|
|
174
|
+
$env:GITHUB_REPO = "your-repo"
|
|
133
175
|
```
|
|
134
176
|
|
|
135
177
|
---
|
|
136
178
|
|
|
137
|
-
##
|
|
179
|
+
## 🎯 Typical Scenarios & Best Practices
|
|
138
180
|
|
|
139
|
-
|
|
140
|
-
|---|---|
|
|
141
|
-
| `npm run build` | Compile TypeScript to `dist/` |
|
|
142
|
-
| `npm run typecheck` | Type-check without emitting |
|
|
143
|
-
| `npm run test` | Run the Vitest test suite |
|
|
144
|
-
| `npm run test:watch` | Watch mode for TDD |
|
|
145
|
-
| `npm run test:coverage` | Coverage report (lcov + text) |
|
|
146
|
-
| `npm run smoke` | Smoke-test: load + register, no real token needed |
|
|
147
|
-
| `npm run dev` | Watch mode with tsx (development) |
|
|
148
|
-
| `npm start` | Run the compiled server |
|
|
181
|
+
AI agents should not run commands blindly or write code without structure. This control plane enforces software engineering discipline. Below are the recommended agent-collaboration patterns:
|
|
149
182
|
|
|
150
|
-
|
|
183
|
+
### Scenario 1: Bootstrapping a Feature / Fix
|
|
184
|
+
When an agent starts a task, it must follow this checklist to prevent "blind coding":
|
|
185
|
+
1. **Gather Context**: Call [`repo_context`](#repo_context) to check current issues, PRs, and branch states.
|
|
186
|
+
2. **Design a Plan**: Call [`plan_from_context`](#plan_from_context) with the task goal. This will outline structured issues corresponding to SDLC phases (Plan, Create, Test, Review, Optimize, Secure).
|
|
187
|
+
3. **Write Issues**: Call [`create_issue_set`](#create_issue_set) with `dryRun: false` to publish the checklist directly to GitHub.
|
|
188
|
+
4. **Acquire Work Brief**: Call [`prepare_work_item`](#prepare_work_item) on the active issue to retrieve precise guidelines, scope definitions, and related files.
|
|
151
189
|
|
|
152
|
-
|
|
190
|
+
### Scenario 2: Guarding the Pull Request Gate
|
|
191
|
+
Before submitting a PR for human review, the agent must verify its own quality:
|
|
192
|
+
1. **Generate PR Summary**: Call [`create_pr_summary`](#create_pr_summary) to auto-generate structured, professional release notes and file diff changes.
|
|
193
|
+
2. **Audit CI Status**: Call [`quality_gate_status`](#quality_gate_status) to ensure all GitHub Actions tests and linting check runs are passing green.
|
|
194
|
+
3. **Execute Static Audit**: Call [`review_pr_against_standard`](#review_pr_against_standard) with `standard: "strict"` or `"security-focused"` to scan diffs for key leaks, verify `.env` safety, and ensure `.github/CODEOWNERS` reviewers are correctly assigned.
|
|
153
195
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
196
|
+
### Scenario 3: Release Readiness Check
|
|
197
|
+
When preparation is complete and a release is requested:
|
|
198
|
+
1. **Vulnerability Check**: Call [`security_triage`](#security_triage) to audit Code Scanning (SAST), Dependabot, and Secret Scanning. Ensure no critical alerts block the release.
|
|
199
|
+
2. **Release Readiness**: Call [`release_readiness_check`](#release_readiness_check) to generate a rollback plan template, verify there are no open release-blocking issues, and ensure CHANGELOG.md is up to date.
|
|
200
|
+
3. **Handoff**: If transferring deployment duties to another agent, call [`agent_handoff_packet`](#agent_handoff_packet) to pass along the complete audit log.
|
|
158
201
|
|
|
159
202
|
---
|
|
160
203
|
|
|
161
|
-
## Tools Reference
|
|
204
|
+
## 📖 Tools Reference
|
|
205
|
+
|
|
206
|
+
Detailed specifications of the exposed MCP tools.
|
|
162
207
|
|
|
163
208
|
### `repo_context`
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
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.
|
|
210
|
+
* **Arguments:**
|
|
211
|
+
* `owner` (string, optional): GitHub owner.
|
|
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.
|
|
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.
|
|
167
222
|
|
|
168
223
|
### `plan_from_context`
|
|
169
|
-
|
|
170
|
-
|
|
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.
|
|
225
|
+
* **Arguments:**
|
|
226
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
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).
|
|
171
231
|
|
|
172
232
|
### `create_issue_set`
|
|
173
|
-
Batch-
|
|
174
|
-
|
|
233
|
+
Batch-creates GitHub issues mapping to the generated plan.
|
|
234
|
+
* **Arguments:**
|
|
235
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
236
|
+
* `issues` (array of objects, required): Structured list of issues to create (title, body, labels).
|
|
237
|
+
* `dryRun` (boolean, default: `true`): If `true`, previews the list without writing to GitHub.
|
|
175
238
|
|
|
176
239
|
### `prepare_work_item`
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
240
|
+
Generates an agent-ready brief for a specific issue containing goals, non-goals, and technical risks.
|
|
241
|
+
* **Arguments:**
|
|
242
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
243
|
+
* `issueNumber` (number, required): The target issue ID.
|
|
244
|
+
* `includeRelatedFiles` (boolean, default: `false`): Heuristically extract mentioned file paths.
|
|
245
|
+
* `includeRecentPRs` (boolean, default: `false`): Scan up to 5 merged PRs that touched these paths.
|
|
180
246
|
|
|
181
247
|
### `quality_gate_status`
|
|
182
|
-
|
|
183
|
-
|
|
248
|
+
Audits the check-runs (CI status, build status, linting status) for a given PR or git ref.
|
|
249
|
+
* **Arguments:**
|
|
250
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
251
|
+
* `pullNumber` (number, optional): Query checks by PR number.
|
|
252
|
+
* `ref` (string, optional): Query checks by branch, tag, or SHA.
|
|
184
253
|
|
|
185
254
|
### `create_pr_summary`
|
|
186
|
-
|
|
255
|
+
Generates a structured pull request description and changelog draft.
|
|
256
|
+
* **Arguments:**
|
|
257
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
258
|
+
* `pullNumber` (number, required): The pull request ID.
|
|
187
259
|
|
|
188
260
|
### `review_pr_against_standard`
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
261
|
+
Reviews pull request code changes against SDLC governance levels (`basic` / `strict` / `security-focused`).
|
|
262
|
+
* **Arguments:**
|
|
263
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
264
|
+
* `pullNumber` (number, required): The pull request ID.
|
|
265
|
+
* `standard` (string, default: `"basic"`): Standard level.
|
|
266
|
+
* `checkOwnership` (boolean, default: `true`): Validates file ownership changes against `.github/CODEOWNERS` and flags unassigned reviewers.
|
|
192
267
|
|
|
193
268
|
### `security_triage`
|
|
194
|
-
|
|
269
|
+
Retrieves and triages Code Scanning, Dependabot, and Secret Scanning alerts.
|
|
270
|
+
* **Arguments:**
|
|
271
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
195
272
|
|
|
196
273
|
### `release_readiness_check`
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
274
|
+
Assesses pre-release health (tests, open bugs, changelogs) and generates rollback instructions.
|
|
275
|
+
* **Arguments:**
|
|
276
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
277
|
+
* `headRef` (string, optional): Target release branch/tag.
|
|
201
278
|
|
|
202
279
|
### `branch_protection_status`
|
|
203
|
-
|
|
204
|
-
|
|
280
|
+
Queries classic branch protection and repository rulesets for required reviews, status checks, and push limits.
|
|
281
|
+
* **Arguments:**
|
|
282
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
283
|
+
* `branch` (string, optional): Target branch. Defaults to default branch.
|
|
205
284
|
|
|
206
285
|
### `workflow_permissions_audit`
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
---
|
|
286
|
+
Scans `.github/workflows/*.yml` files for `permissions` blocks and flags over-permissioned tokens.
|
|
287
|
+
* **Arguments:**
|
|
288
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
289
|
+
* `ref` (string, optional): Git ref. Defaults to default branch.
|
|
212
290
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
| `sdlc://templates/issue` | Standard issue template |
|
|
219
|
-
| `sdlc://templates/pr-summary` | Standard PR summary template |
|
|
220
|
-
| `sdlc://templates/release-readiness` | Pre-release checklist template |
|
|
221
|
-
| `sdlc://templates/handoff` | Agent handoff template |
|
|
291
|
+
### `agent_handoff_packet`
|
|
292
|
+
Compiles current issue context, completed work, and remaining tasks into a compact prompt packet for the next agent.
|
|
293
|
+
* **Arguments:**
|
|
294
|
+
* `owner` / `repo` (string, optional): Repo coordinates.
|
|
295
|
+
* `issueNumber` (number, required): Active issue ID.
|
|
222
296
|
|
|
223
297
|
---
|
|
224
298
|
|
|
225
|
-
##
|
|
299
|
+
## 📚 Resources Reference
|
|
226
300
|
|
|
227
|
-
|
|
301
|
+
The server exposes read-only static resources under the `sdlc://` schema for quick agent guidance:
|
|
228
302
|
|
|
229
|
-
|
|
|
303
|
+
| Resource URI | Description |
|
|
230
304
|
|---|---|
|
|
231
|
-
| `
|
|
232
|
-
| `
|
|
233
|
-
|
|
234
|
-
|
|
305
|
+
| `sdlc://standards/agentic-sdlc` | Full Markdown specification of the Agentic SDLC Standard. |
|
|
306
|
+
| `sdlc://templates/issue` | Markdown template for creating structured GitHub issues. |
|
|
307
|
+
| `sdlc://templates/pr-summary` | Markdown template for PR descriptions and changelogs. |
|
|
308
|
+
| `sdlc://templates/release-readiness` | Checklist for pre-release audits. |
|
|
309
|
+
| `sdlc://templates/handoff` | Prompt packet template for agent handoffs. |
|
|
235
310
|
|
|
236
311
|
---
|
|
237
312
|
|
|
238
|
-
##
|
|
239
|
-
|
|
240
|
-
### 1. Start a new feature
|
|
313
|
+
## 🔒 Safety Defaults & `dryRun` Model
|
|
241
314
|
|
|
242
|
-
|
|
243
|
-
1. repo_context # understand the codebase
|
|
244
|
-
2. plan_from_context (goal=...) # generate SDLC plan
|
|
245
|
-
3. create_issue_set (dryRun:true) # preview issues
|
|
246
|
-
4. create_issue_set (dryRun:false) # create issues
|
|
247
|
-
5. prepare_work_item (issueNumber=N) # get agent brief
|
|
248
|
-
```
|
|
315
|
+
To prevent AI coding agents from performing destructive or unintended actions on production repositories, this control plane enforces:
|
|
249
316
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
2. quality_gate_status (pullNumber=N) # CI check
|
|
255
|
-
3. review_pr_against_standard (standard:strict) # findings
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### 3. Pre-release check
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
1. security_triage # check alerts
|
|
262
|
-
2. release_readiness_check # full readiness
|
|
263
|
-
3. (fix blocking issues)
|
|
264
|
-
4. Human approval before tagging release
|
|
265
|
-
```
|
|
317
|
+
* **Preview by Default (`dryRun: true`)**: All tools that write data (like `create_issue_set`) run in preview mode by default. Writing requires explicitly passing `dryRun: false`.
|
|
318
|
+
* **Zero Self-Merge Policy**: No tools exist to auto-merge pull requests. Human approval is required on all merge gates.
|
|
319
|
+
* **Access Restraints**: The server does not support force-pushing or deleting branch rules.
|
|
320
|
+
* **CODEOWNERS Enforced Review**: Special paths (such as workflows under `.github/` and core files under `src/`) require owner approvals.
|
|
266
321
|
|
|
267
322
|
---
|
|
268
323
|
|
|
269
|
-
##
|
|
270
|
-
|
|
271
|
-
- Never commit your `GITHUB_TOKEN` — use `.env` or PowerShell `$env:` variables
|
|
272
|
-
- `dryRun: true` by default prevents accidental writes
|
|
273
|
-
- No auto-merge, no force-push, no branch deletion
|
|
274
|
-
- Secret scanning alerts are always rated `critical`
|
|
275
|
-
- The server does not make outbound requests beyond the GitHub API
|
|
276
|
-
- `.github/CODEOWNERS` routes review of high-risk paths (`.github/`, `src/github/`, `src/tools/`) to the maintainer
|
|
277
|
-
|
|
278
|
-
---
|
|
279
|
-
|
|
280
|
-
## Development
|
|
281
|
-
|
|
282
|
-
```powershell
|
|
283
|
-
# Type check
|
|
284
|
-
npm run typecheck
|
|
324
|
+
## 📦 Developer Guide & npm Publishing
|
|
285
325
|
|
|
286
|
-
|
|
287
|
-
npm run
|
|
326
|
+
### Development Scripts
|
|
327
|
+
* `npm run typecheck`: Runs TypeScript compiler type checking.
|
|
328
|
+
* `npm run build`: Compiles TS files to the `dist/` directory.
|
|
329
|
+
* `npm run test`: Executes the unit test suite (214 test cases).
|
|
330
|
+
* `npm run smoke`: Verifies registration and loading without external credentials.
|
|
288
331
|
|
|
289
|
-
|
|
290
|
-
npm
|
|
291
|
-
|
|
292
|
-
# Test
|
|
293
|
-
npm run test
|
|
294
|
-
|
|
295
|
-
# Smoke test (no token needed)
|
|
296
|
-
npm run smoke
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
---
|
|
300
|
-
|
|
301
|
-
## Publishing (Maintainers)
|
|
302
|
-
|
|
303
|
-
This package is published to npm using **Trusted Publishing (OIDC)** — no long-lived `NPM_TOKEN` secret is stored in the repo. Publishing is handled by `.github/workflows/publish.yml`.
|
|
304
|
-
|
|
305
|
-
### One-time setup on npmjs.com
|
|
306
|
-
|
|
307
|
-
1. Sign in to [npmjs.com](https://www.npmjs.com) and open the package's **Settings -> Publishing access**.
|
|
308
|
-
2. Add a **Trusted Publisher** with:
|
|
309
|
-
- Provider: `GitHub Actions`
|
|
310
|
-
- Repository: `SakuraCianna/agentic-sdlc-mcp`
|
|
311
|
-
- Workflow filename: `publish.yml`
|
|
312
|
-
3. Save. From then on, `publish.yml` publishes without any npm token — GitHub issues a short-lived OIDC token that npm exchanges for a publish credential, and provenance is generated automatically.
|
|
313
|
-
|
|
314
|
-
> First publish only: if the package name doesn't exist on npm yet, Trusted Publisher can't be linked until the package exists. In that case, do one manual `npm publish` from your machine with a classic token first, then configure Trusted Publishing for all subsequent releases. The `publish.yml` workflow itself always uses OIDC — it never falls back to a token.
|
|
315
|
-
|
|
316
|
-
### Triggering a publish
|
|
317
|
-
|
|
318
|
-
- **Preferred:** create a GitHub Release (tag it, then "Publish release") — this fires `release: published` and runs `publish.yml` automatically.
|
|
319
|
-
- **Manual:** go to **Actions -> Publish to npm -> Run workflow** (`workflow_dispatch`).
|
|
320
|
-
|
|
321
|
-
### Pre-publish checklist (run locally before tagging a release)
|
|
322
|
-
|
|
323
|
-
```powershell
|
|
324
|
-
npm run typecheck
|
|
325
|
-
npm run build
|
|
326
|
-
npm run test
|
|
327
|
-
npm run smoke
|
|
328
|
-
npm run test:coverage
|
|
329
|
-
npm pack --dry-run
|
|
330
|
-
```
|
|
331
|
-
|
|
332
|
-
`npm pack --dry-run` prints exactly which files would ship in the published tarball, without creating one. Confirm only `dist/`, `README.md`, and `.env.example` are included — test files and `package-lock.json` must NOT appear (enforced by `tsconfig.build.json`, which excludes `src/__tests__/**` from the compiled `dist/` output used for publishing).
|
|
333
|
-
|
|
334
|
-
### GitHub Actions workflows
|
|
335
|
-
|
|
336
|
-
| Workflow | Trigger | Purpose |
|
|
337
|
-
|---|---|---|
|
|
338
|
-
| `.github/workflows/ci.yml` | `pull_request`, `push` to `main` | Runs typecheck, build, test, smoke, and coverage on Node 24 |
|
|
339
|
-
| `.github/workflows/publish.yml` | GitHub Release published, or manual dispatch | Publishes to npm via OIDC Trusted Publishing |
|
|
340
|
-
| `.github/dependabot.yml` | Weekly schedule | Opens PRs for npm and GitHub Actions dependency updates (labelled `dependencies`) |
|
|
332
|
+
### OIDC Trusted Publishing (For Maintainers)
|
|
333
|
+
This package is securely published to npm via GitHub Actions using **Trusted Publishing (OIDC)**, eliminating the need to store static `NPM_TOKEN` secrets in the repository. Publishing is triggered by creating a GitHub Release or manually running the Action.
|
|
341
334
|
|
|
342
335
|
---
|
|
343
336
|
|
|
344
|
-
## License
|
|
337
|
+
## 📄 License
|
|
345
338
|
|
|
346
|
-
MIT
|
|
339
|
+
Exposed under the [MIT License](LICENSE).
|
package/dist/config.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Configuration loader — reads all settings from environment variables.
|
|
2
|
+
* Configuration loader — reads all settings from environment variables or global config file.
|
|
3
3
|
* In smoke mode (--smoke flag or SMOKE=true) token validation is skipped.
|
|
4
4
|
*/
|
|
5
5
|
export interface Config {
|
|
@@ -16,7 +16,8 @@ export interface Config {
|
|
|
16
16
|
}
|
|
17
17
|
/** True when --smoke CLI flag or SMOKE=true env var is set. */
|
|
18
18
|
export declare const isSmokeMode: boolean;
|
|
19
|
-
|
|
20
|
-
/** Singleton — loaded once at startup */
|
|
19
|
+
/** Singleton config instance — properties will be populated on initialization */
|
|
21
20
|
export declare const config: Config;
|
|
21
|
+
/** Initializes the configuration. Exits early if required keys are missing and TTY is false. */
|
|
22
|
+
export declare function initializeConfig(): Promise<void>;
|
|
22
23
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAOA;;;GAGG;AAEH,MAAM,WAAW,MAAM;IACrB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,qCAAqC;IACrC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,0BAA0B;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,+DAA+D;AAC/D,eAAO,MAAM,WAAW,SAC6C,CAAC;AAKtE,iFAAiF;AACjF,eAAO,MAAM,MAAM,EAAE,MAMpB,CAAC;AA2EF,gGAAgG;AAChG,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CA4CtD"}
|