agentic-sdlc-mcp 1.3.1 → 1.5.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 +27 -7
- package/dist/github/context.d.ts +48 -1
- package/dist/github/context.d.ts.map +1 -1
- package/dist/github/context.js +255 -7
- package/dist/github/context.js.map +1 -1
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/dist/tools/create-issue-set.d.ts +46 -0
- package/dist/tools/create-issue-set.d.ts.map +1 -1
- package/dist/tools/create-issue-set.js +175 -22
- package/dist/tools/create-issue-set.js.map +1 -1
- package/dist/tools/plan-from-context.d.ts +79 -4
- package/dist/tools/plan-from-context.d.ts.map +1 -1
- package/dist/tools/plan-from-context.js +689 -66
- package/dist/tools/plan-from-context.js.map +1 -1
- package/dist/tools/repo-context.d.ts +19 -0
- package/dist/tools/repo-context.d.ts.map +1 -1
- package/dist/tools/repo-context.js +101 -6
- package/dist/tools/repo-context.js.map +1 -1
- package/dist/types.d.ts +26 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +5 -0
- package/dist/version.js.map +1 -0
- package/package.json +1 -1
|
@@ -19,8 +19,18 @@ export const CreateIssueSetInputSchema = z.object({
|
|
|
19
19
|
body: z.string().describe("Issue body (markdown)."),
|
|
20
20
|
labels: z.array(z.string()).optional().describe("Labels to apply."),
|
|
21
21
|
assignees: z.array(z.string()).optional().describe("GitHub usernames to assign."),
|
|
22
|
+
phase: z.string().optional().describe("Optional SDLC phase metadata from plan_from_context."),
|
|
23
|
+
acceptanceCriteria: z
|
|
24
|
+
.array(z.string())
|
|
25
|
+
.optional()
|
|
26
|
+
.describe("Optional acceptance criteria metadata from plan_from_context."),
|
|
27
|
+
riskLevel: z
|
|
28
|
+
.enum(["low", "medium", "high"])
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Optional risk metadata from plan_from_context."),
|
|
31
|
+
goal: z.string().optional().describe("Optional parent goal metadata from plan_from_context."),
|
|
22
32
|
}))
|
|
23
|
-
.min(1)
|
|
33
|
+
.min(1, "At least one issue is required.")
|
|
24
34
|
.max(50)
|
|
25
35
|
.describe("Array of issues to create (1-50)."),
|
|
26
36
|
dryRun: z
|
|
@@ -30,39 +40,144 @@ export const CreateIssueSetInputSchema = z.object({
|
|
|
30
40
|
});
|
|
31
41
|
export const CreateIssueSetOutputSchema = {
|
|
32
42
|
dryRun: z.boolean().describe("Whether this was a preview-only run."),
|
|
33
|
-
count: z.number().int().describe("Number of issues previewed or created."),
|
|
43
|
+
count: z.number().int().describe("Number of issues previewed or successfully created."),
|
|
44
|
+
targetRepo: z.string().describe("Repository targeted by the preview or live batch."),
|
|
34
45
|
issues: z
|
|
35
46
|
.array(z.object({
|
|
36
47
|
number: z.number().int(),
|
|
37
48
|
title: z.string(),
|
|
38
49
|
url: z.string(),
|
|
50
|
+
labels: z.array(z.string()),
|
|
39
51
|
}))
|
|
40
52
|
.describe("Created issues (empty in dry run)."),
|
|
53
|
+
failures: z
|
|
54
|
+
.array(z.object({
|
|
55
|
+
inputIndex: z.number().int().nonnegative().describe("Zero-based index in the input issues array."),
|
|
56
|
+
title: z.string(),
|
|
57
|
+
reason: z.string(),
|
|
58
|
+
}))
|
|
59
|
+
.describe("Issues that could not be created. Empty in dry run and on full success."),
|
|
41
60
|
previewTitles: z.array(z.string()).describe("Final titles (with prefix applied)."),
|
|
61
|
+
preview: z
|
|
62
|
+
.array(z.object({
|
|
63
|
+
title: z.string(),
|
|
64
|
+
labels: z.array(z.string()),
|
|
65
|
+
bodySummary: z.string(),
|
|
66
|
+
}))
|
|
67
|
+
.describe("Per-issue preview (title, labels, truncated body) -- populated in dry run only."),
|
|
68
|
+
warnings: z
|
|
69
|
+
.array(z.string())
|
|
70
|
+
.describe("Human-review flags, e.g. missing labels, overlong title, missing/short body."),
|
|
42
71
|
};
|
|
43
72
|
// ---------------------------------------------------------------------------
|
|
73
|
+
// Pure helpers (exported for testing)
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
/** GitHub's actual hard limit on issue title length -- exceeding this makes the create call fail outright, not just look untidy. */
|
|
76
|
+
const GITHUB_TITLE_MAX_LENGTH = 256;
|
|
77
|
+
/** Matches the "meaningful description" bar used elsewhere in this project (see review-pr.ts's PR-body check) -- short enough to be a placeholder, not a real body. */
|
|
78
|
+
const MIN_MEANINGFUL_BODY_LENGTH = 20;
|
|
79
|
+
/** Chars kept in a dry-run body preview before truncating -- long enough to judge intent, short enough not to blow up a 50-issue preview response. */
|
|
80
|
+
const BODY_SUMMARY_MAX_CHARS = 200;
|
|
81
|
+
/** Truncate a body for the dry-run preview list. Pure -- no I/O. */
|
|
82
|
+
export function summarizeBody(body) {
|
|
83
|
+
const trimmed = body.trim();
|
|
84
|
+
if (trimmed.length === 0)
|
|
85
|
+
return "(empty)";
|
|
86
|
+
return trimmed.length > BODY_SUMMARY_MAX_CHARS
|
|
87
|
+
? trimmed.slice(0, BODY_SUMMARY_MAX_CHARS) + "..."
|
|
88
|
+
: trimmed;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Flag issues worth a human's attention before a live (dryRun: false) write:
|
|
92
|
+
* no labels, a title GitHub will reject outright, or a body too short to be
|
|
93
|
+
* a real description. Pure -- no I/O. One warning line per (issue, problem)
|
|
94
|
+
* pair, 1-indexed to match the preview's numbered list.
|
|
95
|
+
*/
|
|
96
|
+
export function generateIssueWarnings(issues, prefix) {
|
|
97
|
+
const warnings = [];
|
|
98
|
+
issues.forEach((issue, i) => {
|
|
99
|
+
const n = i + 1;
|
|
100
|
+
const finalTitle = `${prefix}${issue.title}`;
|
|
101
|
+
if (!issue.labels || issue.labels.length === 0) {
|
|
102
|
+
warnings.push(`Issue ${n} ("${issue.title}") has no labels.`);
|
|
103
|
+
}
|
|
104
|
+
if (finalTitle.length > GITHUB_TITLE_MAX_LENGTH) {
|
|
105
|
+
warnings.push(`Issue ${n} ("${issue.title}") title is ${finalTitle.length} characters, exceeding GitHub's ${GITHUB_TITLE_MAX_LENGTH}-character limit -- issue creation will fail as-is.`);
|
|
106
|
+
}
|
|
107
|
+
if (issue.body.trim().length < MIN_MEANINGFUL_BODY_LENGTH) {
|
|
108
|
+
warnings.push(`Issue ${n} ("${issue.title}") has a missing or very short body (under ${MIN_MEANINGFUL_BODY_LENGTH} characters).`);
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
return warnings;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Convert a per-issue failure into an actionable, response-safe reason.
|
|
115
|
+
* GitHub response bodies and arbitrary exception messages are deliberately
|
|
116
|
+
* excluded because they can contain private repository data or credentials.
|
|
117
|
+
*/
|
|
118
|
+
function describeIssueCreationFailure(error) {
|
|
119
|
+
const status = typeof error === "object" &&
|
|
120
|
+
error !== null &&
|
|
121
|
+
"status" in error &&
|
|
122
|
+
typeof error.status === "number"
|
|
123
|
+
? error.status
|
|
124
|
+
: undefined;
|
|
125
|
+
switch (status) {
|
|
126
|
+
case 401:
|
|
127
|
+
return "GitHub authentication failed (401); check that GITHUB_TOKEN is valid.";
|
|
128
|
+
case 403:
|
|
129
|
+
return "GitHub permission denied (403); check token and repository issue permissions.";
|
|
130
|
+
case 404:
|
|
131
|
+
return "GitHub repository or issue endpoint was not found (404); verify the target repository.";
|
|
132
|
+
case 422:
|
|
133
|
+
return "GitHub validation failed (422); check the title, body, labels, and assignees.";
|
|
134
|
+
case 429:
|
|
135
|
+
return "GitHub rate limit exceeded (429); retry after the limit resets.";
|
|
136
|
+
default:
|
|
137
|
+
return status
|
|
138
|
+
? `GitHub API error (${status}) while creating this issue.`
|
|
139
|
+
: "Unexpected error while creating this issue; retry or inspect the server logs.";
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// ---------------------------------------------------------------------------
|
|
44
143
|
// Core handler (exported for testing)
|
|
45
144
|
// ---------------------------------------------------------------------------
|
|
46
145
|
export async function handleCreateIssueSet(params, ref, octokit) {
|
|
47
146
|
const prefix = params.titlePrefix ? `${params.titlePrefix} ` : "";
|
|
147
|
+
const targetRepo = `${ref.owner}/${ref.repo}`;
|
|
48
148
|
if (params.dryRun) {
|
|
49
149
|
const previewTitles = params.issues.map((i) => `${prefix}${i.title}`);
|
|
150
|
+
const preview = params.issues.map((issue) => ({
|
|
151
|
+
title: `${prefix}${issue.title}`,
|
|
152
|
+
labels: issue.labels ?? [],
|
|
153
|
+
bodySummary: summarizeBody(issue.body),
|
|
154
|
+
}));
|
|
155
|
+
const warnings = generateIssueWarnings(params.issues, prefix);
|
|
50
156
|
const structured = {
|
|
51
157
|
dryRun: true,
|
|
52
158
|
count: params.issues.length,
|
|
159
|
+
targetRepo,
|
|
53
160
|
issues: [],
|
|
161
|
+
failures: [],
|
|
54
162
|
previewTitles,
|
|
163
|
+
preview,
|
|
164
|
+
warnings,
|
|
55
165
|
};
|
|
56
166
|
const lines = [
|
|
57
|
-
`# Issue Set Preview (dry run) - ${params.issues.length} issue(s)`,
|
|
167
|
+
`# [PREVIEW ONLY] Issue Set Preview (dry run) - ${params.issues.length} issue(s)`,
|
|
58
168
|
"",
|
|
59
|
-
|
|
169
|
+
`> **Preview only -- no GitHub issues were created.** No write call was made to the GitHub API. Set \`dryRun: false\` to create them for real.`,
|
|
60
170
|
"",
|
|
61
|
-
|
|
171
|
+
`**Target repo (confirm before a live write):** \`${targetRepo}\``,
|
|
62
172
|
"",
|
|
63
173
|
];
|
|
174
|
+
if (warnings.length > 0) {
|
|
175
|
+
lines.push("## Warnings", "");
|
|
176
|
+
warnings.forEach((w) => lines.push(`- [WARN] ${w}`));
|
|
177
|
+
lines.push("");
|
|
178
|
+
}
|
|
64
179
|
params.issues.forEach((issue, i) => {
|
|
65
|
-
lines.push(`## ${i + 1}. ${prefix}${issue.title}`, "",
|
|
180
|
+
lines.push(`## ${i + 1}. ${prefix}${issue.title}`, "", preview[i]?.bodySummary ?? "(empty)", "", issue.labels && issue.labels.length > 0 ? `**Labels:** ${issue.labels.join(", ")}` : "**Labels:** (none)", issue.assignees && issue.assignees.length > 0
|
|
66
181
|
? `**Assignees:** ${issue.assignees.join(", ")}`
|
|
67
182
|
: "", "");
|
|
68
183
|
});
|
|
@@ -70,29 +185,63 @@ export async function handleCreateIssueSet(params, ref, octokit) {
|
|
|
70
185
|
}
|
|
71
186
|
// Live mode - create issues sequentially
|
|
72
187
|
const created = [];
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
188
|
+
const failures = [];
|
|
189
|
+
for (const [inputIndex, issue] of params.issues.entries()) {
|
|
190
|
+
const finalTitle = `${prefix}${issue.title}`;
|
|
191
|
+
try {
|
|
192
|
+
const { data } = await octokit.issues.create({
|
|
193
|
+
owner: ref.owner,
|
|
194
|
+
repo: ref.repo,
|
|
195
|
+
title: finalTitle,
|
|
196
|
+
body: issue.body,
|
|
197
|
+
labels: issue.labels,
|
|
198
|
+
assignees: issue.assignees,
|
|
199
|
+
});
|
|
200
|
+
created.push({
|
|
201
|
+
number: data.number,
|
|
202
|
+
title: data.title,
|
|
203
|
+
url: data.html_url,
|
|
204
|
+
labels: (data.labels ?? [])
|
|
205
|
+
.map((label) => (typeof label === "string" ? label : label.name ?? ""))
|
|
206
|
+
.filter((label) => label.length > 0),
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
catch (error) {
|
|
210
|
+
failures.push({
|
|
211
|
+
inputIndex,
|
|
212
|
+
title: finalTitle,
|
|
213
|
+
reason: describeIssueCreationFailure(error),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
83
216
|
}
|
|
84
217
|
const structured = {
|
|
85
218
|
dryRun: false,
|
|
86
219
|
count: created.length,
|
|
220
|
+
targetRepo,
|
|
87
221
|
issues: created,
|
|
88
|
-
|
|
222
|
+
failures,
|
|
223
|
+
previewTitles: params.issues.map((issue) => `${prefix}${issue.title}`),
|
|
224
|
+
preview: [],
|
|
225
|
+
warnings: [],
|
|
89
226
|
};
|
|
90
227
|
const lines = [
|
|
91
|
-
`# Issue Set
|
|
228
|
+
`# Issue Set Creation Result - ${created.length} created, ${failures.length} failed`,
|
|
229
|
+
"",
|
|
230
|
+
`Repo: ${targetRepo}`,
|
|
92
231
|
"",
|
|
93
|
-
|
|
232
|
+
"## Created",
|
|
233
|
+
created.length > 0
|
|
234
|
+
? created
|
|
235
|
+
.map((issue) => `- #${issue.number} ${issue.title} - ${issue.url}${issue.labels.length > 0 ? ` [${issue.labels.join(", ")}]` : ""}`)
|
|
236
|
+
.join("\n")
|
|
237
|
+
: "(none)",
|
|
94
238
|
"",
|
|
95
|
-
|
|
239
|
+
"## Failed",
|
|
240
|
+
failures.length > 0
|
|
241
|
+
? failures
|
|
242
|
+
.map((failure) => `- Issue ${failure.inputIndex + 1} (${failure.title}): ${failure.reason}`)
|
|
243
|
+
.join("\n")
|
|
244
|
+
: "(none)",
|
|
96
245
|
];
|
|
97
246
|
return { text: lines.join("\n"), structured };
|
|
98
247
|
}
|
|
@@ -106,13 +255,17 @@ export function registerCreateIssueSetTool(server) {
|
|
|
106
255
|
|
|
107
256
|
SAFETY: dryRun defaults to true. You MUST explicitly pass dryRun:false to create issues.
|
|
108
257
|
|
|
258
|
+
Dry-run output is designed to work as a human pre-write confirmation page: it includes a per-issue
|
|
259
|
+
preview (title/labels/truncated body), warnings for issues missing labels, missing/short bodies, or
|
|
260
|
+
titles exceeding GitHub's 256-character limit, and the exact repo coordinates that would be written to.
|
|
261
|
+
|
|
109
262
|
Args:
|
|
110
263
|
- owner, repo: Repository coordinates.
|
|
111
264
|
- titlePrefix (string?): Prefix for every issue title.
|
|
112
|
-
- issues (array): 1-50 issues, each with title, body, labels?, assignees?.
|
|
265
|
+
- issues (array): 1-50 issues, each with title, body, labels?, assignees?. Accepts plan_from_context's issueDrafts directly.
|
|
113
266
|
- dryRun (boolean): Default true - preview mode only.
|
|
114
267
|
|
|
115
|
-
Returns: Created issue numbers + URLs (live) or a preview (dry run).`,
|
|
268
|
+
Returns: Created issue numbers + URLs + labels (live) or a preview + warnings (dry run).`,
|
|
116
269
|
inputSchema: CreateIssueSetInputSchema,
|
|
117
270
|
outputSchema: CreateIssueSetOutputSchema,
|
|
118
271
|
annotations: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-issue-set.js","sourceRoot":"","sources":["../../src/tools/create-issue-set.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIjF,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAClF,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC/E,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IAC9F,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC;QACjD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACnD,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;QACnE,SAAS,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AAM,EAAE,IAAI,EAAE,CAAC;gBACjC,iBAAiB,EAAE,UAAgD;aACpE,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,iBAAiB,CAAC,KAAK,CAAC,EAAE,CAAC;aAC5D,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -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, IssueDraft, RepoRef } 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<{
|
|
@@ -28,6 +63,19 @@ export declare const PlanFromContextOutputSchema: {
|
|
|
28
63
|
tasks: z.ZodArray<z.ZodString>;
|
|
29
64
|
}, z.core.$strip>>;
|
|
30
65
|
suggestedIssues: z.ZodArray<z.ZodString>;
|
|
66
|
+
issueDrafts: z.ZodArray<z.ZodObject<{
|
|
67
|
+
title: z.ZodString;
|
|
68
|
+
body: z.ZodString;
|
|
69
|
+
labels: z.ZodArray<z.ZodString>;
|
|
70
|
+
phase: z.ZodString;
|
|
71
|
+
acceptanceCriteria: z.ZodArray<z.ZodString>;
|
|
72
|
+
riskLevel: z.ZodEnum<{
|
|
73
|
+
high: "high";
|
|
74
|
+
medium: "medium";
|
|
75
|
+
low: "low";
|
|
76
|
+
}>;
|
|
77
|
+
goal: z.ZodString;
|
|
78
|
+
}, z.core.$strip>>;
|
|
31
79
|
risks: z.ZodArray<z.ZodString>;
|
|
32
80
|
};
|
|
33
81
|
export interface PlanFromContextResult {
|
|
@@ -35,15 +83,42 @@ export interface PlanFromContextResult {
|
|
|
35
83
|
repo: string;
|
|
36
84
|
defaultBranch: string;
|
|
37
85
|
language: string | null;
|
|
86
|
+
workType: SdlcWorkType;
|
|
87
|
+
confidence: "high" | "medium" | "low";
|
|
88
|
+
reasoning: string;
|
|
89
|
+
needsClarification: boolean;
|
|
38
90
|
constraints: string[];
|
|
39
91
|
acceptanceCriteria: string[];
|
|
40
92
|
phases: SdlcPlanPhase[];
|
|
41
93
|
suggestedIssues: string[];
|
|
94
|
+
issueDrafts: IssueDraft[];
|
|
42
95
|
risks: string[];
|
|
43
96
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
97
|
+
export interface WorkTypeInference {
|
|
98
|
+
workType: SdlcWorkType;
|
|
99
|
+
confidence: "high" | "medium" | "low";
|
|
100
|
+
reasoning: string;
|
|
101
|
+
needsClarification: boolean;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Infer a `workType` from free-text goal + acceptance criteria when the caller
|
|
105
|
+
* did not pass one explicitly. Conservative by design: ties or zero signal
|
|
106
|
+
* fall back to `feature` with `needsClarification: true` rather than guessing
|
|
107
|
+
* confidently, so callers know to double-check rather than trust a silent
|
|
108
|
+
* default.
|
|
109
|
+
*/
|
|
110
|
+
export declare function inferWorkType(goal: string, acceptanceCriteria: string[], explicit?: SdlcWorkType): WorkTypeInference;
|
|
111
|
+
/**
|
|
112
|
+
* Build structured issue drafts directly usable as `create_issue_set`'s
|
|
113
|
+
* `issues` input (the planning metadata is accepted but not sent to GitHub).
|
|
114
|
+
* One draft per `ISSUE_SPECS_BY_WORK_TYPE[workType]` entry --
|
|
115
|
+
* titles are identical to `buildSuggestedIssues`' output, in the same order,
|
|
116
|
+
* since both are derived from the same table.
|
|
117
|
+
*/
|
|
118
|
+
export declare function buildIssueDrafts(goal: string, workType: SdlcWorkType, plan: SdlcPlanPhase[], repoLabelNames: string[], userAcceptanceCriteria?: string[]): IssueDraft[];
|
|
119
|
+
/** Build the phase-by-phase plan for a given workType (defaults to "feature" for backward compatibility). Pure -- no I/O. */
|
|
120
|
+
export declare function buildPlan(goal: string, repoName: string, workType?: SdlcWorkType): SdlcPlanPhase[];
|
|
121
|
+
export declare function handlePlanFromContext(params: PlanFromContextInput, fetchContext: typeof fetchRepoContext, fetchLabels?: (ref: RepoRef) => Promise<string[]>): Promise<{
|
|
47
122
|
text: string;
|
|
48
123
|
structured: PlanFromContextResult;
|
|
49
124
|
}>;
|
|
@@ -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,EAAa,YAAY,EAAE,UAAU,EAAkB,OAAO,EAAE,MAAM,aAAa,CAAC;AAS/G,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;iBAgBrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAA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