@akjamie/agentic-sdlc 1.12.0 → 1.13.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/assets/templates/asdlc-ai-review.yml +9 -1
- package/package.json +1 -1
- package/src/commands/apply.js +31 -80
- package/src/commands/lint.js +5 -1
- package/src/commands/new.js +136 -3
- package/src/commands/pr.js +43 -43
- package/src/commands/status.js +8 -2
- package/src/commands/verify.js +23 -0
- package/src/lib/forge/github.js +248 -0
- package/src/lib/forge/gitlab.js +185 -0
- package/src/lib/forge/index.js +33 -0
- package/src/lib/remote.js +41 -0
- package/src/lib/telemetry.js +84 -1
- package/src/lib/triage.js +15 -53
package/src/lib/triage.js
CHANGED
|
@@ -1,36 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export const PULL_REQUEST_THREADS_QUERY = `
|
|
5
|
-
query PullRequestReviewThreads($owner: String!, $repo: String!, $number: Int!) {
|
|
6
|
-
repository(owner: $owner, name: $repo) {
|
|
7
|
-
pullRequest(number: $number) {
|
|
8
|
-
reviewDecision
|
|
9
|
-
headRefOid
|
|
10
|
-
commits(last: 1) { nodes { commit { committedDate, oid } } }
|
|
11
|
-
reviewThreads(first: 100) {
|
|
12
|
-
nodes {
|
|
13
|
-
id
|
|
14
|
-
isResolved
|
|
15
|
-
isOutdated
|
|
16
|
-
path
|
|
17
|
-
line
|
|
18
|
-
originalLine
|
|
19
|
-
comments(first: 20) {
|
|
20
|
-
nodes {
|
|
21
|
-
id
|
|
22
|
-
databaseId
|
|
23
|
-
author { login }
|
|
24
|
-
body
|
|
25
|
-
createdAt
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
`.trim();
|
|
1
|
+
import { PULL_REQUEST_THREADS_QUERY } from './forge/github.js';
|
|
2
|
+
|
|
3
|
+
export { PULL_REQUEST_THREADS_QUERY };
|
|
34
4
|
|
|
35
5
|
const DEFAULT_AGENT_LOGINS = [
|
|
36
6
|
'asdlc-bot',
|
|
@@ -319,8 +289,8 @@ export function applySuggestionToLines(fileContent, { startLine = null, endLine
|
|
|
319
289
|
|
|
320
290
|
/**
|
|
321
291
|
* Tier 3 Resolution Plan:
|
|
322
|
-
* Generates
|
|
323
|
-
*
|
|
292
|
+
* Generates platform-agnostic resolution intent (commit trailer, reply body, resolve/dispute decision).
|
|
293
|
+
* Platform adapters (GitHubAdapter, GitLabAdapter, etc.) execute the actual API mutations.
|
|
324
294
|
*/
|
|
325
295
|
export function buildThreadResolutionPlan(triagedThread, { commitSha = null, summary = '', answerBody = null, disputed = false, specRef = null } = {}) {
|
|
326
296
|
const intent = triagedThread?.classification?.intent;
|
|
@@ -332,15 +302,12 @@ export function buildThreadResolutionPlan(triagedThread, { commitSha = null, sum
|
|
|
332
302
|
const replyBody = answerBody || `Spec Conflict: ${specCitation}, requested change contradicts approved design. Escalated for human review.`;
|
|
333
303
|
return {
|
|
334
304
|
threadId,
|
|
305
|
+
action: 'dispute',
|
|
335
306
|
commitMessage: null,
|
|
307
|
+
replyBody,
|
|
336
308
|
shouldResolve: false,
|
|
337
309
|
disputed: true,
|
|
338
310
|
escalationLabel: 'asdlc:needs-human-arbitration',
|
|
339
|
-
replyMutation: {
|
|
340
|
-
query: 'mutation ReplyThread($threadId: ID!, $body: String!) { addPullRequestReviewThreadReply(input: { pullRequestReviewThreadId: $threadId, body: $body }) { comment { id } } }',
|
|
341
|
-
variables: { threadId, body: replyBody },
|
|
342
|
-
},
|
|
343
|
-
resolveMutation: null,
|
|
344
311
|
};
|
|
345
312
|
}
|
|
346
313
|
|
|
@@ -348,13 +315,12 @@ export function buildThreadResolutionPlan(triagedThread, { commitSha = null, sum
|
|
|
348
315
|
const replyBody = answerBody || summary || 'Answered in technical explanation above.';
|
|
349
316
|
return {
|
|
350
317
|
threadId,
|
|
318
|
+
action: 'reply_only',
|
|
351
319
|
commitMessage: null,
|
|
320
|
+
replyBody,
|
|
352
321
|
shouldResolve: false,
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
variables: { threadId, body: replyBody },
|
|
356
|
-
},
|
|
357
|
-
resolveMutation: null,
|
|
322
|
+
disputed: false,
|
|
323
|
+
escalationLabel: null,
|
|
358
324
|
};
|
|
359
325
|
}
|
|
360
326
|
|
|
@@ -365,16 +331,12 @@ export function buildThreadResolutionPlan(triagedThread, { commitSha = null, sum
|
|
|
365
331
|
|
|
366
332
|
return {
|
|
367
333
|
threadId,
|
|
334
|
+
action: 'reply_and_resolve',
|
|
368
335
|
commitMessage,
|
|
336
|
+
replyBody,
|
|
369
337
|
shouldResolve: true,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
variables: { threadId, body: replyBody },
|
|
373
|
-
},
|
|
374
|
-
resolveMutation: {
|
|
375
|
-
query: 'mutation ResolveThread($threadId: ID!) { resolveReviewThread(input: { threadId: $threadId }) { thread { isResolved } } }',
|
|
376
|
-
variables: { threadId },
|
|
377
|
-
},
|
|
338
|
+
disputed: false,
|
|
339
|
+
escalationLabel: null,
|
|
378
340
|
};
|
|
379
341
|
}
|
|
380
342
|
|