agentic-sdlc-mcp 1.0.0 → 1.3.1

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 (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +220 -233
  3. package/dist/config.d.ts +4 -3
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +117 -23
  6. package/dist/config.js.map +1 -1
  7. package/dist/index.js +8 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/tools/agent-handoff.d.ts +5 -41
  10. package/dist/tools/agent-handoff.d.ts.map +1 -1
  11. package/dist/tools/branch-protection-status.d.ts +71 -0
  12. package/dist/tools/branch-protection-status.d.ts.map +1 -0
  13. package/dist/tools/branch-protection-status.js +252 -0
  14. package/dist/tools/branch-protection-status.js.map +1 -0
  15. package/dist/tools/create-issue-set.d.ts +6 -46
  16. package/dist/tools/create-issue-set.d.ts.map +1 -1
  17. package/dist/tools/create-pr-summary.d.ts +3 -11
  18. package/dist/tools/create-pr-summary.d.ts.map +1 -1
  19. package/dist/tools/plan-from-context.d.ts +9 -29
  20. package/dist/tools/plan-from-context.d.ts.map +1 -1
  21. package/dist/tools/prepare-work-item.d.ts +6 -30
  22. package/dist/tools/prepare-work-item.d.ts.map +1 -1
  23. package/dist/tools/quality-gate-status.d.ts +11 -107
  24. package/dist/tools/quality-gate-status.d.ts.map +1 -1
  25. package/dist/tools/release-readiness.d.ts +8 -15
  26. package/dist/tools/release-readiness.d.ts.map +1 -1
  27. package/dist/tools/repo-context.d.ts +4 -30
  28. package/dist/tools/repo-context.d.ts.map +1 -1
  29. package/dist/tools/review-pr.d.ts +57 -29
  30. package/dist/tools/review-pr.d.ts.map +1 -1
  31. package/dist/tools/review-pr.js +249 -7
  32. package/dist/tools/review-pr.js.map +1 -1
  33. package/dist/tools/security-triage.d.ts +12 -46
  34. package/dist/tools/security-triage.d.ts.map +1 -1
  35. package/dist/tools/workflow-permissions-audit.d.ts +85 -0
  36. package/dist/tools/workflow-permissions-audit.d.ts.map +1 -0
  37. package/dist/tools/workflow-permissions-audit.js +306 -0
  38. package/dist/tools/workflow-permissions-audit.js.map +1 -0
  39. package/package.json +11 -10
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,335 +1,322 @@
1
- # agentic-sdlc-mcp
1
+ <p align="center">
2
+ <img src="assets/logo.svg" alt="MCP Logo" width="120"/>
3
+ </p>
2
4
 
3
- [![CI](https://github.com/SakuraCianna/agentic-sdlc-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/SakuraCianna/agentic-sdlc-mcp/actions/workflows/ci.yml)
5
+ <h1 align="center">Agentic SDLC Control Plane (agentic-sdlc-mcp)</h1>
4
6
 
5
- An MCP (Model Context Protocol) Server that acts as an **Agentic SDLC Control Plane** — helping AI coding agents plan, create, test, review, secure, and release software following GitHub Agentic AI best practices.
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
- - GitHub: [SakuraCianna/agentic-sdlc-mcp](https://github.com/SakuraCianna/agentic-sdlc-mcp)
8
- - Issues: [github.com/SakuraCianna/agentic-sdlc-mcp/issues](https://github.com/SakuraCianna/agentic-sdlc-mcp/issues)
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
- `agentic-sdlc-mcp` is not a simple GitHub API wrapper. It is a **SDLC orchestration layer** that exposes structured, agent-friendly tools aligned to the full software development lifecycle:
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
- **Safety first:** All write operations default to `dryRun: true`. Destructive or irreversible operations are never silently executed.
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
- ## Installation
41
+ ## 🛠️ Tools Categorization
25
42
 
26
- **Requirements:** Node.js >= 24 (see `engines` in `package.json`; CI runs on Node 24).
43
+ Instead of exposing raw API endpoints, this server provides **12 specialized tools** structured around the SDLC pipeline:
27
44
 
28
- ```powershell
29
- # Clone the repository
30
- git clone https://github.com/SakuraCianna/agentic-sdlc-mcp.git
31
- cd agentic-sdlc-mcp
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
- # Install dependencies
34
- npm install
53
+ ---
35
54
 
36
- # Build
37
- npm run build
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
- ## Environment Variables
43
-
44
- Copy `.env.example` to `.env` and fill in your values:
84
+ ## 📋 Prerequisites
45
85
 
46
- ```powershell
47
- Copy-Item .env.example .env
48
- ```
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.
49
93
 
50
- Then edit `.env` — it is loaded automatically by `dotenv` when the server starts.
94
+ ---
51
95
 
52
- Alternatively, set variables inline in PowerShell:
96
+ ## ⚡ Quick Start
53
97
 
54
- ```powershell
55
- $env:GITHUB_TOKEN = "ghp_your_token_here"
56
- $env:GITHUB_OWNER = "your-org"
57
- $env:GITHUB_REPO = "your-repo"
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
58
102
  ```
59
103
 
60
- | Variable | Required | Description |
61
- |---|---|---|
62
- | `GITHUB_TOKEN` | Yes | GitHub PAT or App token |
63
- | `GITHUB_OWNER` | Optional | Default owner (org or user) |
64
- | `GITHUB_REPO` | Optional | Default repository name |
65
- | `SDLC_DEFAULT_BRANCH` | Optional | Default branch (default: `main`) |
66
- | `TRANSPORT` | Optional | `stdio` (default) or `http` |
67
- | `PORT` | Optional | HTTP port (default: `3000`) |
68
-
69
- ### Required GitHub Token Scopes
70
-
71
- | Scope | Purpose |
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 |
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
110
+ ```
76
111
 
77
- > Verified against GitHub's REST API reference (Dependabot alerts, Code Scanning alerts, Secret Scanning alerts, Checks endpoints) as of this writing. GitHub's scope requirements can change — see the [REST API docs](https://docs.github.com/en/rest) if a tool reports a permission error that doesn't match this table.
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
+ ```
78
121
 
79
122
  ---
80
123
 
81
- ## MCP Client Configuration
82
-
83
- ### Claude Desktop / Kiro / Cursor
124
+ ## ⚙️ MCP Client Configuration
84
125
 
85
- Add to your MCP client config (`claude_desktop_config.json` or equivalent):
126
+ Add this server configuration to your MCP client setting files (e.g., `claude_desktop_config.json`, Cursor, or Windsurf settings):
86
127
 
128
+ ### Claude Desktop / Cursor / Windsurf (Using npm package)
87
129
  ```json
88
130
  {
89
131
  "mcpServers": {
90
132
  "agentic-sdlc": {
91
- "command": "node",
92
- "args": ["E:/CodeHome/agentic-sdlc-mcp/dist/index.js"],
133
+ "command": "npx",
134
+ "args": ["-y", "agentic-sdlc-mcp"],
93
135
  "env": {
94
136
  "GITHUB_TOKEN": "ghp_your_token",
95
- "GITHUB_OWNER": "your-org",
96
- "GITHUB_REPO": "your-repo"
137
+ "GITHUB_OWNER": "your-github-username-or-org",
138
+ "GITHUB_REPO": "your-target-repository"
97
139
  }
98
140
  }
99
141
  }
100
142
  }
101
143
  ```
102
144
 
103
- Use forward slashes or escaped backslashes for Windows paths.
104
-
105
- ---
106
-
107
- ## Running the Server
145
+ ### 🔑 Global Configuration & Interactive Setup (Persistent)
108
146
 
109
- ### stdio mode (default — for MCP clients)
147
+ 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
148
 
111
- ```powershell
112
- $env:GITHUB_TOKEN = "ghp_your_token"
113
- node dist/index.js
149
+ #### 1. Configure via CLI
150
+ Run the configuration command:
151
+ ```bash
152
+ npx agentic-sdlc-mcp configure
114
153
  ```
154
+ This guides you through configuring:
155
+ * `GITHUB_TOKEN` (Primary token; [generate classic token here](https://github.com/settings/tokens) with `repo` and `read:org` scopes)
156
+ * `GITHUB_OWNER` (Default repository owner name, optional)
157
+ * `GITHUB_REPO` (Default repository name, optional)
115
158
 
116
- ### HTTP mode (for remote / multi-client use)
159
+ #### 2. Automatic Setup Prompts (TTY)
160
+ 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
161
 
162
+ #### 3. Global Environment Variables (Fallback)
163
+ You can still define environment variables directly in your terminal shell (`PowerShell` for Windows or `bash` for macOS/Linux):
118
164
  ```powershell
119
- $env:TRANSPORT = "http"
120
- $env:PORT = "3000"
165
+ # Windows PowerShell
121
166
  $env:GITHUB_TOKEN = "ghp_your_token"
122
- node dist/index.js
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.
167
+ $env:GITHUB_OWNER = "your-org"
168
+ $env:GITHUB_REPO = "your-repo"
133
169
  ```
134
170
 
135
171
  ---
136
172
 
137
- ## npm Scripts
173
+ ## 🎯 Typical Scenarios & Best Practices
138
174
 
139
- | Script | Description |
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 |
175
+ 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
176
 
150
- ---
177
+ ### Scenario 1: Bootstrapping a Feature / Fix
178
+ When an agent starts a task, it must follow this checklist to prevent "blind coding":
179
+ 1. **Gather Context**: Call [`repo_context`](#repo_context) to check current issues, PRs, and branch states.
180
+ 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).
181
+ 3. **Write Issues**: Call [`create_issue_set`](#create_issue_set) with `dryRun: false` to publish the checklist directly to GitHub.
182
+ 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
183
 
152
- ## MCP Inspector (smoke test / exploration)
184
+ ### Scenario 2: Guarding the Pull Request Gate
185
+ Before submitting a PR for human review, the agent must verify its own quality:
186
+ 1. **Generate PR Summary**: Call [`create_pr_summary`](#create_pr_summary) to auto-generate structured, professional release notes and file diff changes.
187
+ 2. **Audit CI Status**: Call [`quality_gate_status`](#quality_gate_status) to ensure all GitHub Actions tests and linting check runs are passing green.
188
+ 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
189
 
154
- ```powershell
155
- $env:GITHUB_TOKEN = "ghp_your_token"
156
- npx @modelcontextprotocol/inspector node dist/index.js
157
- ```
190
+ ### Scenario 3: Release Readiness Check
191
+ When preparation is complete and a release is requested:
192
+ 1. **Vulnerability Check**: Call [`security_triage`](#security_triage) to audit Code Scanning (SAST), Dependabot, and Secret Scanning. Ensure no critical alerts block the release.
193
+ 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.
194
+ 3. **Handoff**: If transferring deployment duties to another agent, call [`agent_handoff_packet`](#agent_handoff_packet) to pass along the complete audit log.
158
195
 
159
196
  ---
160
197
 
161
- ## Tools Reference
198
+ ## 📖 Tools Reference
199
+
200
+ Detailed specifications of the exposed MCP tools.
162
201
 
163
202
  ### `repo_context`
164
- Read repository metadata, README, package.json, open issues, and open PRs.
165
- Use at the start of every workflow.
166
- - `issueLimit` / `prLimit` (number, default: `20`, max: `100`): cap how many open issues/PRs are fetched, to avoid token-heavy responses on large repos.
203
+ Reads repository metadata, README, package.json, open issues, and open PRs. Use this at the start of any workflow to orient the agent.
204
+ * **Arguments:**
205
+ * `owner` (string, optional): GitHub owner.
206
+ * `repo` (string, optional): GitHub repo.
207
+ * `issueLimit` / `prLimit` (number, default: `20`, max: `100`): Cap how many issues/PRs are fetched.
167
208
 
168
209
  ### `plan_from_context`
169
- Generate a phase-by-phase SDLC plan (Plan→Create→Test→Review→Optimize→Secure).
170
- Template-based — no LLM call needed.
210
+ Generates a structured, phase-by-phase SDLC plan matching the standard milestones.
211
+ * **Arguments:**
212
+ * `owner` / `repo` (string, optional): Repo coordinates.
213
+ * `goal` (string, required): The target feature or fix description.
171
214
 
172
215
  ### `create_issue_set`
173
- Batch-create GitHub issues from a plan.
174
- ⚠️ `dryRun` defaults to `true` — pass `dryRun: false` to write to GitHub.
216
+ Batch-creates GitHub issues mapping to the generated plan.
217
+ * **Arguments:**
218
+ * `owner` / `repo` (string, optional): Repo coordinates.
219
+ * `issues` (array of objects, required): Structured list of issues to create (title, body, labels).
220
+ * `dryRun` (boolean, default: `true`): If `true`, previews the list without writing to GitHub.
175
221
 
176
222
  ### `prepare_work_item`
177
- Generate an agent-ready brief for a specific issue: goals, non-goals, acceptance criteria, risks, and a handoff prompt.
178
- - `includeRelatedFiles` (boolean, default: `false`): heuristically extract file paths mentioned in the issue body.
179
- - `includeRecentPRs` (boolean, default: `false`): scan up to 20 recently-updated closed PRs and return up to 5 merged ones that touched the related file hints (requires `includeRelatedFiles` to have found hints — returns an empty list otherwise). Output field: `recentPRs`.
223
+ Generates an agent-ready brief for a specific issue containing goals, non-goals, and technical risks.
224
+ * **Arguments:**
225
+ * `owner` / `repo` (string, optional): Repo coordinates.
226
+ * `issueNumber` (number, required): The target issue ID.
227
+ * `includeRelatedFiles` (boolean, default: `false`): Heuristically extract mentioned file paths.
228
+ * `includeRecentPRs` (boolean, default: `false`): Scan up to 5 merged PRs that touched these paths.
180
229
 
181
230
  ### `quality_gate_status`
182
- Read check-run results for a PR or git ref.
183
- Use to verify CI before merging or releasing.
231
+ Audits the check-runs (CI status, build status, linting status) for a given PR or git ref.
232
+ * **Arguments:**
233
+ * `owner` / `repo` (string, optional): Repo coordinates.
234
+ * `pullNumber` (number, optional): Query checks by PR number.
235
+ * `ref` (string, optional): Query checks by branch, tag, or SHA.
184
236
 
185
237
  ### `create_pr_summary`
186
- Generate a structured PR summary: change overview, file categories, test coverage signals, risks, review checklist, and release notes draft.
238
+ Generates a structured pull request description and changelog draft.
239
+ * **Arguments:**
240
+ * `owner` / `repo` (string, optional): Repo coordinates.
241
+ * `pullNumber` (number, required): The pull request ID.
187
242
 
188
243
  ### `review_pr_against_standard`
189
- Review a PR against SDLC standards (`basic` / `strict` / `security-focused`).
190
- `security-focused` mode scans actual patch lines for secret patterns, `.env` files, lockfile changes, and dist files.
244
+ Reviews pull request code changes against SDLC governance levels (`basic` / `strict` / `security-focused`).
245
+ * **Arguments:**
246
+ * `owner` / `repo` (string, optional): Repo coordinates.
247
+ * `pullNumber` (number, required): The pull request ID.
248
+ * `standard` (string, default: `"basic"`): Standard level.
249
+ * `checkOwnership` (boolean, default: `true`): Validates file ownership changes against `.github/CODEOWNERS` and flags unassigned reviewers.
191
250
 
192
251
  ### `security_triage`
193
- Read Code Scanning, Dependabot, and Secret Scanning alerts, triage by severity, recommend fix order.
252
+ Retrieves and triages Code Scanning, Dependabot, and Secret Scanning alerts.
253
+ * **Arguments:**
254
+ * `owner` / `repo` (string, optional): Repo coordinates.
194
255
 
195
256
  ### `release_readiness_check`
196
- Pre-release assessment: CI status, open bugs, CHANGELOG, release checklist, rollback template.
257
+ Assesses pre-release health (tests, open bugs, changelogs) and generates rollback instructions.
258
+ * **Arguments:**
259
+ * `owner` / `repo` (string, optional): Repo coordinates.
260
+ * `headRef` (string, optional): Target release branch/tag.
261
+
262
+ ### `branch_protection_status`
263
+ Queries classic branch protection and repository rulesets for required reviews, status checks, and push limits.
264
+ * **Arguments:**
265
+ * `owner` / `repo` (string, optional): Repo coordinates.
266
+ * `branch` (string, optional): Target branch. Defaults to default branch.
267
+
268
+ ### `workflow_permissions_audit`
269
+ Scans `.github/workflows/*.yml` files for `permissions` blocks and flags over-permissioned tokens.
270
+ * **Arguments:**
271
+ * `owner` / `repo` (string, optional): Repo coordinates.
272
+ * `ref` (string, optional): Git ref. Defaults to default branch.
197
273
 
198
274
  ### `agent_handoff_packet`
199
- Generate a compact handoff packet so another agent can continue work without losing context.
200
-
201
- ---
202
-
203
- ## Resources
204
-
205
- | URI | Description |
206
- |---|---|
207
- | `sdlc://standards/agentic-sdlc` | Full Agentic SDLC standard with phases and human gates |
208
- | `sdlc://templates/issue` | Standard issue template |
209
- | `sdlc://templates/pr-summary` | Standard PR summary template |
210
- | `sdlc://templates/release-readiness` | Pre-release checklist template |
211
- | `sdlc://templates/handoff` | Agent handoff template |
275
+ Compiles current issue context, completed work, and remaining tasks into a compact prompt packet for the next agent.
276
+ * **Arguments:**
277
+ * `owner` / `repo` (string, optional): Repo coordinates.
278
+ * `issueNumber` (number, required): Active issue ID.
212
279
 
213
280
  ---
214
281
 
215
- ## dryRun Safety Model
282
+ ## 📚 Resources Reference
216
283
 
217
- All write tools implement `dryRun`:
284
+ The server exposes read-only static resources under the `sdlc://` schema for quick agent guidance:
218
285
 
219
- | `dryRun` | Effect |
286
+ | Resource URI | Description |
220
287
  |---|---|
221
- | `true` (default) | Preview mode — no GitHub API writes |
222
- | `false` | Live mode — actually writes to GitHub |
223
-
224
- The default is always `dryRun: true`. Agents must explicitly pass `dryRun: false`.
225
-
226
- ---
227
-
228
- ## Workflow Examples
229
-
230
- ### 1. Start a new feature
231
-
232
- ```
233
- 1. repo_context # understand the codebase
234
- 2. plan_from_context (goal=...) # generate SDLC plan
235
- 3. create_issue_set (dryRun:true) # preview issues
236
- 4. create_issue_set (dryRun:false) # create issues
237
- 5. prepare_work_item (issueNumber=N) # get agent brief
238
- ```
239
-
240
- ### 2. Review a pull request
241
-
242
- ```
243
- 1. create_pr_summary (pullNumber=N) # diff overview
244
- 2. quality_gate_status (pullNumber=N) # CI check
245
- 3. review_pr_against_standard (standard:strict) # findings
246
- ```
247
-
248
- ### 3. Pre-release check
249
-
250
- ```
251
- 1. security_triage # check alerts
252
- 2. release_readiness_check # full readiness
253
- 3. (fix blocking issues)
254
- 4. Human approval before tagging release
255
- ```
288
+ | `sdlc://standards/agentic-sdlc` | Full Markdown specification of the Agentic SDLC Standard. |
289
+ | `sdlc://templates/issue` | Markdown template for creating structured GitHub issues. |
290
+ | `sdlc://templates/pr-summary` | Markdown template for PR descriptions and changelogs. |
291
+ | `sdlc://templates/release-readiness` | Checklist for pre-release audits. |
292
+ | `sdlc://templates/handoff` | Prompt packet template for agent handoffs. |
256
293
 
257
294
  ---
258
295
 
259
- ## Security
296
+ ## 🔒 Safety Defaults & `dryRun` Model
260
297
 
261
- - Never commit your `GITHUB_TOKEN` — use `.env` or PowerShell `$env:` variables
262
- - `dryRun: true` by default prevents accidental writes
263
- - No auto-merge, no force-push, no branch deletion
264
- - Secret scanning alerts are always rated `critical`
265
- - The server does not make outbound requests beyond the GitHub API
298
+ To prevent AI coding agents from performing destructive or unintended actions on production repositories, this control plane enforces:
266
299
 
267
- ---
268
-
269
- ## Development
270
-
271
- ```powershell
272
- # Type check
273
- npm run typecheck
274
-
275
- # Watch mode
276
- npm run dev
277
-
278
- # Build
279
- npm run build
280
-
281
- # Test
282
- npm run test
283
-
284
- # Smoke test (no token needed)
285
- npm run smoke
286
- ```
300
+ * **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`.
301
+ * **Zero Self-Merge Policy**: No tools exist to auto-merge pull requests. Human approval is required on all merge gates.
302
+ * **Access Restraints**: The server does not support force-pushing or deleting branch rules.
303
+ * **CODEOWNERS Enforced Review**: Special paths (such as workflows under `.github/` and core files under `src/`) require owner approvals.
287
304
 
288
305
  ---
289
306
 
290
- ## Publishing (Maintainers)
291
-
292
- 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`.
293
-
294
- ### One-time setup on npmjs.com
307
+ ## 📦 Developer Guide & npm Publishing
295
308
 
296
- 1. Sign in to [npmjs.com](https://www.npmjs.com) and open the package's **Settings -> Publishing access**.
297
- 2. Add a **Trusted Publisher** with:
298
- - Provider: `GitHub Actions`
299
- - Repository: `SakuraCianna/agentic-sdlc-mcp`
300
- - Workflow filename: `publish.yml`
301
- 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.
309
+ ### Development Scripts
310
+ * `npm run typecheck`: Runs TypeScript compiler type checking.
311
+ * `npm run build`: Compiles TS files to the `dist/` directory.
312
+ * `npm run test`: Executes the unit test suite (165 test cases).
313
+ * `npm run smoke`: Verifies registration and loading without external credentials.
302
314
 
303
- > 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.
304
-
305
- ### Triggering a publish
306
-
307
- - **Preferred:** create a GitHub Release (tag it, then "Publish release") — this fires `release: published` and runs `publish.yml` automatically.
308
- - **Manual:** go to **Actions -> Publish to npm -> Run workflow** (`workflow_dispatch`).
309
-
310
- ### Pre-publish checklist (run locally before tagging a release)
311
-
312
- ```powershell
313
- npm run typecheck
314
- npm run build
315
- npm run test
316
- npm run smoke
317
- npm run test:coverage
318
- npm pack --dry-run
319
- ```
320
-
321
- `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).
322
-
323
- ### GitHub Actions workflows
324
-
325
- | Workflow | Trigger | Purpose |
326
- |---|---|---|
327
- | `.github/workflows/ci.yml` | `pull_request`, `push` to `main` | Runs typecheck, build, test, smoke, and coverage on Node 24 |
328
- | `.github/workflows/publish.yml` | GitHub Release published, or manual dispatch | Publishes to npm via OIDC Trusted Publishing |
329
- | `.github/dependabot.yml` | Weekly schedule | Opens PRs for npm and GitHub Actions dependency updates (labelled `dependencies`) |
315
+ ### OIDC Trusted Publishing (For Maintainers)
316
+ 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.
330
317
 
331
318
  ---
332
319
 
333
- ## License
320
+ ## 📄 License
334
321
 
335
- MIT
322
+ 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
- export declare function loadConfig(): Config;
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
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;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;AActE,wBAAgB,UAAU,IAAI,MAAM,CAmBnC;AAED,yCAAyC;AACzC,eAAO,MAAM,MAAM,EAAE,MAAqB,CAAC"}
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"}