@akjamie/agentic-sdlc 1.11.1 → 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/README.md +2 -2
- package/assets/commands/asdlc-apply.md +5 -2
- package/assets/commands/asdlc-impl-review.md +28 -0
- package/assets/commands/asdlc-new.md +1 -1
- package/assets/commands/asdlc-spec-review.md +26 -0
- package/assets/commands/asdlc-status.md +4 -0
- package/assets/commands/asdlc-verify.md +8 -6
- package/assets/skills/asdlc-apply/SKILL.md +23 -2
- package/assets/skills/asdlc-impl-review/SKILL.md +23 -2
- package/assets/skills/asdlc-new/SKILL.md +2 -2
- package/assets/skills/asdlc-pr/SKILL.md +2 -2
- package/assets/skills/asdlc-spec-review/SKILL.md +2 -1
- package/assets/skills/asdlc-status/SKILL.md +15 -0
- package/assets/skills/asdlc-verify/SKILL.md +20 -18
- package/assets/templates/asdlc-ai-review.yml +63 -0
- package/package.json +1 -1
- package/src/commands/apply.js +133 -61
- package/src/commands/lint.js +14 -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/test.js +2 -23
- 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/tasks-gen.js +123 -0
- package/src/lib/telemetry.js +84 -1
- package/src/lib/tools.js +53 -6
- package/src/lib/triage.js +15 -53
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# agentic-sdlc
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@akjamie/agentic-sdlc)
|
|
4
|
-
[](package.json)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
[](https://nodejs.org/)
|
|
7
|
-
[](#development--verification)
|
|
8
8
|
[](#adaptive-risk-tiered-governance-l0l3)
|
|
9
9
|
|
|
10
10
|
> **The Intelligent Governance Engine for Autonomous AI Coding.**
|
|
@@ -10,7 +10,7 @@ Launch task-level Test-Driven Development (TDD) loop from `tasks.md`.
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
asdlc apply <CHANGE_ID> [--from-pr <pr>] [--auto-pr] [--target-branch <branch>]
|
|
13
|
+
asdlc apply <CHANGE_ID> --agent [--from-pr <pr>] [--auto-pr] [--target-branch <branch>]
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Behavior
|
|
@@ -21,4 +21,7 @@ asdlc apply <CHANGE_ID> [--from-pr <pr>] [--auto-pr] [--target-branch <branch>]
|
|
|
21
21
|
- GREEN: Implement minimal production code to pass the tests.
|
|
22
22
|
- REFACTOR: Clean code structure without altering behavior.
|
|
23
23
|
- EVIDENCE: Record passing test evidence.
|
|
24
|
-
3. **
|
|
24
|
+
3. **Autonomous PR Review Triage (`--from-pr <pr>`)**:
|
|
25
|
+
- Classifies unresolved review threads into `SUGGESTION_BLOCK`, `ACTION_REQUIRED`, `INFORMATIONAL_QUESTION`, or `NON_ACTIONABLE`.
|
|
26
|
+
- Applies fixes with `(ref: #<threadId>)` commit trailers; replies without mutating code for questions; never mutates locked specs or self-resolves disputed spec-conflict threads (`asdlc:needs-human-arbitration`).
|
|
27
|
+
4. **Anti-Hallucination & Anti-Drift Guard**: Prevents modifying locked specification paths during code implementation.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asdlc-impl-review
|
|
3
|
+
description: "Stage 6.5: Independent AI Implementation Review & 3-Round Audit (Player != Referee)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /asdlc-impl-review - Independent Implementation Review
|
|
7
|
+
|
|
8
|
+
Evaluate an Implementation PR or local change in an isolated session (`Player != Referee`) against the locked base-branch specification, `REVIEW.md`, and test evidence.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Provide a PR URL, PR number, or local `<CHANGE_ID>` inside your AI Agent session:
|
|
13
|
+
|
|
14
|
+
- `/asdlc-impl-review https://github.com/<org>/<repo>/pull/<N>`
|
|
15
|
+
- `/asdlc-impl-review #<N>`
|
|
16
|
+
- `/asdlc-impl-review <CHANGE_ID>`
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
1. **Trusted Base-Branch Grounding**: Read approved specs and `REVIEW.md` from `origin/<baseBranch>` (never from untrusted PR `HEAD`).
|
|
21
|
+
2. **Incremental Diff on Rounds 2–3**: Extract the previous `lastReviewedSha` / `<!-- asdlc:review-round:N -->` anchor and inspect `git diff <lastReviewedSha>...HEAD`, rendering a `Re-Review Accounting` table.
|
|
22
|
+
3. **5-Dimension Audit (D1–D5) & Defect Attribution**:
|
|
23
|
+
- Audit spec conformance (AC matrix), code quality, test fidelity (`asdlc test <ID> --json`), production readiness, and security hygiene.
|
|
24
|
+
- Distinguish `🔴 [Blocker: Introduced]` / `🟡 [Major: Introduced]` from non-blocking `⚪ [Tech Debt: Pre-existing]`.
|
|
25
|
+
4. **3-Round Cap & Delivery**:
|
|
26
|
+
- Include `<!-- asdlc:review-round:<N> -->` at the top of PR comments.
|
|
27
|
+
- Submit formal GitHub PR Review (`gh api repos/$REPO/pulls/$PR/reviews`) or `gh pr comment` + `asdlc/impl-ai-review` commit status (`success` or `failure`).
|
|
28
|
+
- Escalate with `asdlc:needs-human-arbitration` if unresolved after Round 3.
|
|
@@ -10,7 +10,7 @@ Start a new spec-driven change in the repository using the Agentic SDLC workflow
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
asdlc new "<requirement>" [--from-file <path>] [--from-issue <id> | --ticket <id>] [--batch-grill] [--no-grill]
|
|
13
|
+
asdlc new "<requirement>" --agent [--from-file <path>] [--from-issue <id> | --ticket <id>] [--batch-grill] [--no-grill]
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
## Workflow Sequence
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asdlc-spec-review
|
|
3
|
+
description: "Stage 3: Independent AI Spec & Architecture Review (Player != Referee)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /asdlc-spec-review - Independent Spec & Architecture Review
|
|
7
|
+
|
|
8
|
+
Evaluate a Spec PR, RFC, `proposal.md`, `design.md`, and `specs/**` in an isolated session (`Player != Referee`) before human Tech Lead approval.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
Provide a PR URL, PR number, or local `<CHANGE_ID>` inside your AI Agent session:
|
|
13
|
+
|
|
14
|
+
- `/asdlc-spec-review https://github.com/<org>/<repo>/pull/<N>`
|
|
15
|
+
- `/asdlc-spec-review #<N>`
|
|
16
|
+
- `/asdlc-spec-review <CHANGE_ID>`
|
|
17
|
+
|
|
18
|
+
## Behavior
|
|
19
|
+
|
|
20
|
+
1. **Trusted Grounding**: Inspect `proposal.md`, `design.md`, `clarifications.md`, `specs/**`, and `explore.md`. When reviewing a PR, read `REVIEW.md` / `.sdlc/policy.yaml` from `origin/<baseBranch>`.
|
|
21
|
+
2. **7-Dimension Audit (D1–D7)**:
|
|
22
|
+
- Completeness, ambiguity/contradiction, cross-repo consistency, contract impact, testability, security/privacy, and UI/API design soundness.
|
|
23
|
+
3. **Structured Output & Round Anchor**:
|
|
24
|
+
- Include `<!-- asdlc:review-round:<N> -->` at the top of PR comments for deterministic round tracking.
|
|
25
|
+
- In **PR Mode**, post the review comment directly via `gh pr comment` and set the `asdlc/spec-ai-review` commit status (`success` or `failure`).
|
|
26
|
+
- In **Local Mode**, print the formatted review report directly without posting to GitHub.
|
|
@@ -15,9 +15,13 @@ asdlc status [--json]
|
|
|
15
15
|
|
|
16
16
|
# Single change status
|
|
17
17
|
asdlc status <CHANGE_ID> [--json]
|
|
18
|
+
|
|
19
|
+
# Team governance & gate friction metrics (last 30 days by default)
|
|
20
|
+
asdlc status --metrics [--days <count>] [--json]
|
|
18
21
|
```
|
|
19
22
|
|
|
20
23
|
## Output
|
|
21
24
|
|
|
22
25
|
- In portfolio mode: outputs compact single-line table with `CHANGE`, `LEVEL`, `STAGE`, and `NEXT COMMAND` (strictly excludes archived changes).
|
|
23
26
|
- In single-change mode: outputs completed artifacts, stage progression, and next exact command.
|
|
27
|
+
- In `--metrics` mode: outputs local gate friction leaderboard (`.sdlc/events.jsonl`), 3-round PR convergence rates, stage lead times (P50/P90), and L0–L3 risk tier breakdown.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asdlc-verify
|
|
3
|
-
description: "Stage 6: Verify implementation against all
|
|
3
|
+
description: "Stage 6: Verify implementation against all deterministic & AI quality gates"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /asdlc-verify - Enterprise Quality Gates Audit
|
|
7
7
|
|
|
8
|
-
Audit the implementation diff against all
|
|
8
|
+
Audit the implementation diff against all deterministic and AI quality gates before merging to main.
|
|
9
9
|
|
|
10
10
|
## Usage
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ Audit the implementation diff against all 12 deterministic quality gates before
|
|
|
13
13
|
asdlc verify <CHANGE_ID> [--repo <name>] [--json]
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
##
|
|
16
|
+
## Core Quality Gates
|
|
17
17
|
|
|
18
18
|
1. `level-integrity`: Validates declared risk level matches change topology.
|
|
19
19
|
2. `pr-type`: Classifies PR type (normal vs. spec vs. impl).
|
|
@@ -22,8 +22,10 @@ asdlc verify <CHANGE_ID> [--repo <name>] [--json]
|
|
|
22
22
|
5. `spec-tamper`: Enforces that locked spec files were not modified during implementation.
|
|
23
23
|
6. `flow-state`: Validates `READY_FOR_IMPL` transition.
|
|
24
24
|
7. `risk-escape`: Detects unannounced API/DDL escalations.
|
|
25
|
-
8. `human-gate`: Validates mandatory Tech Lead approval for L2/L3 changes.
|
|
25
|
+
8. `human-gate`: Validates mandatory Tech Lead approval for L2/L3 (and supervised) changes.
|
|
26
26
|
9. `tasks-complete`: Verifies all tasks in `tasks.md` are checked off.
|
|
27
27
|
10. `test-presence`: Enforces that source code changes are paired with test changes.
|
|
28
|
-
11. `
|
|
29
|
-
12. `
|
|
28
|
+
11. `anti-test-weakening`: Blocks deleted tests or newly introduced `.skip` / `@Disabled` / `@pytest.mark.skip` bypasses.
|
|
29
|
+
12. `tdd-evidence`: Verifies red-green-refactor execution log.
|
|
30
|
+
13. `BDD + acceptance criteria`: Deterministic R0–R8 quality lint clean.
|
|
31
|
+
14. `openspec-validate` / `schema-managed` / `acceptance-tests` / `AI verification`: Schema compliance, mapped AC test execution, and independent referee verification.
|
|
@@ -22,7 +22,7 @@ This skill executes **Stage 5 (Apply)** of the Agentic SDLC. It enforces strict
|
|
|
22
22
|
Before editing any implementation or test code, run the apply guard:
|
|
23
23
|
|
|
24
24
|
```powershell
|
|
25
|
-
asdlc apply <CHANGE_ID> [--auto-pr] [--target-branch <ref>]
|
|
25
|
+
asdlc apply <CHANGE_ID> [--auto-pr] [--target-branch <ref>] --agent
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
`asdlc apply` deterministically verifies Git-anchored preconditions:
|
|
@@ -123,7 +123,7 @@ If any check fails, resolve the issue locally within the TDD loop and re-run `as
|
|
|
123
123
|
|
|
124
124
|
### Step 5: Implementation Complete & Submission Protocol (Dual-Mode Authority)
|
|
125
125
|
|
|
126
|
-
Once all tasks in `tasks.md` are marked complete with captured evidence and local `asdlc verify <CHANGE_ID>` passes (all
|
|
126
|
+
Once all tasks in `tasks.md` are marked complete with captured evidence and local `asdlc verify <CHANGE_ID>` passes (all verification gates exit 0), determine the submission path based on explicit authority:
|
|
127
127
|
|
|
128
128
|
#### Path A: Default Local Mode (Safe Default, `autoPr: false` or unspecified)
|
|
129
129
|
> [!CAUTION]
|
|
@@ -151,3 +151,24 @@ Once all tasks in `tasks.md` are marked complete with captured evidence and loca
|
|
|
151
151
|
> asdlc pr <CHANGE_ID> <targetBranch>
|
|
152
152
|
> ```
|
|
153
153
|
> 3. Provide the resulting PR link to the user and announce readiness for AI / Human Implementation Review.
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Workflow B: Autonomous PR Review Feedback Loop (`--from-pr`)
|
|
158
|
+
|
|
159
|
+
When the user asks to fix PR review comments (e.g., `"fix comments on PR #44"` or `/asdlc:apply <CHANGE_ID> --from-pr 44`), execute the 4-way semantic triage protocol:
|
|
160
|
+
|
|
161
|
+
1. **Fetch & Triage Unresolved Threads**:
|
|
162
|
+
```powershell
|
|
163
|
+
asdlc apply <CHANGE_ID> --from-pr #<PR_NUMBER> --agent
|
|
164
|
+
```
|
|
165
|
+
This fetches GraphQL `reviewThreads`, PR comments, and `reviewDecision`, and computes the current round (`Round <N> of 3`) from `<!-- asdlc:review-round:<N> -->` anchors and `(ref: #PRRT_...)` commit trailers.
|
|
166
|
+
2. **Execute Per-Category Actions**:
|
|
167
|
+
- **`SUGGESTION_BLOCK` (Category B)**: Apply the exact ```suggestion diff, run tests, commit with `fix(review): <summary> (ref: #<threadId>)`, and resolve the thread with the commit SHA.
|
|
168
|
+
- **`ACTION_REQUIRED` (Category A)**: Enter the TDD loop (add/update test assertions, fix implementation, run `asdlc verify <CHANGE_ID>`), commit with `(ref: #<threadId>)`, and reply with the commit SHA before resolving.
|
|
169
|
+
- **`INFORMATIONAL_QUESTION` (Category C)**: Formulate a technical answer grounded in `design.md` / `specs/**` and reply directly to the thread. **Do NOT mutate code and do NOT resolve the thread.**
|
|
170
|
+
- **`NON_ACTIONABLE` (Category D)**: Safely ignore pure praise/acknowledgments without empty commits.
|
|
171
|
+
3. **Constitutional Guard (`SPEC_CONFLICT` / Disputed Threads)**:
|
|
172
|
+
- If a review comment contradicts the locked (`specSha`) specification in `proposal.md` or `specs/**`:
|
|
173
|
+
- **STRICTLY FORBIDDEN** from editing locked specs or self-resolving the thread (`Player != Referee`).
|
|
174
|
+
- Reply citing the exact approved spec section, leave the thread **unresolved** (`disputed: true`), and attach the `asdlc:needs-human-arbitration` label so the human Tech Lead arbitrates.
|
|
@@ -227,7 +227,27 @@ Every finding must follow a structured schema with explicit defect attribution s
|
|
|
227
227
|
|
|
228
228
|
Compose the review using the markdown format below, then deliver it according to the invocation mode:
|
|
229
229
|
|
|
230
|
-
- **If reviewing a PR** (PR URL, PR number, or CI PR trigger): **Post the
|
|
230
|
+
- **If reviewing a PR** (PR URL, PR number, or CI PR trigger): **Post the review directly** without asking the user for confirmation:
|
|
231
|
+
- **Preferred (when inline file/line findings exist or reviewing a teammate's PR)**: Submit a formal GitHub PR Review via `gh api repos/$REPO/pulls/$PR_NUMBER/reviews --input -` (note: GitHub forbids `APPROVE`/`REQUEST_CHANGES` on your own PR — in that case, use `event: "COMMENT"` or fall back to `gh pr comment`):
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
gh api repos/$REPO/pulls/$PR_NUMBER/reviews --input - <<'EOF'
|
|
235
|
+
{
|
|
236
|
+
"commit_id": "<headRefOid>",
|
|
237
|
+
"event": "REQUEST_CHANGES",
|
|
238
|
+
"body": "<!-- asdlc:review-round:<round> -->\n## 🤖 AI Implementation Review — `<CHANGE_ID>`\n...",
|
|
239
|
+
"comments": [
|
|
240
|
+
{
|
|
241
|
+
"path": "src/example.js",
|
|
242
|
+
"line": 42,
|
|
243
|
+
"side": "RIGHT",
|
|
244
|
+
"body": "**[Blocker: Introduced]** `R<round>-#1`: <defect and required fix>"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
EOF
|
|
249
|
+
```
|
|
250
|
+
- **Standard / Fallback**: Post the structured review as a PR comment:
|
|
231
251
|
|
|
232
252
|
```bash
|
|
233
253
|
gh pr comment $PR_NUMBER --repo $REPO --body "$(cat <<'EOF'
|
|
@@ -238,9 +258,10 @@ EOF
|
|
|
238
258
|
|
|
239
259
|
- **If reviewing locally** (`<CHANGE_ID>` only, no PR): **Print the formatted review markdown directly** in your response and skip `gh pr comment` and Step 6.
|
|
240
260
|
|
|
241
|
-
Format the comment body strictly as:
|
|
261
|
+
Format the comment body strictly as (keeping the hidden `<!-- asdlc:review-round:<round> -->` anchor on line 1 for deterministic triage round tracking):
|
|
242
262
|
|
|
243
263
|
~~~markdown
|
|
264
|
+
<!-- asdlc:review-round:<round> -->
|
|
244
265
|
## 🤖 AI Implementation Review — `<CHANGE_ID>`
|
|
245
266
|
|
|
246
267
|
> **Reviewer**: AI Independent Implementation Reviewer (`asdlc-impl-review`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asdlc-new
|
|
3
|
-
description: "Start a new spec-driven change: derives change slug from natural language requirement, grounds in knowledge graph (explore.md), runs
|
|
3
|
+
description: "Start a new spec-driven change: derives change slug from natural language requirement, grounds in knowledge graph (explore.md), runs grill-me (or --batch-grill) interview, and drafts initial proposal, technical design (design.md), and spec deltas."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /asdlc:new - Start Feature & Batch-Grill Author
|
|
@@ -33,7 +33,7 @@ When the user invokes `/asdlc:new` or provides a task with `--from-file`/`--file
|
|
|
33
33
|
When the grounded requirement is established:
|
|
34
34
|
|
|
35
35
|
```powershell
|
|
36
|
-
asdlc new "<requirement>" [--from-file <path>] [--from-issue <id> | --ticket <id>] [--batch-grill] [--no-grill]
|
|
36
|
+
asdlc new "<requirement>" --agent [--from-file <path>] [--from-issue <id> | --ticket <id>] [--batch-grill] [--no-grill]
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
The CLI:
|
|
@@ -25,7 +25,7 @@ asdlc pr <CHANGE_ID> [targetBranch]
|
|
|
25
25
|
| PR Type | Track & Moment | Pre-Flight Guard | Auto Labels | Review Automation Trigger |
|
|
26
26
|
| :--- | :--- | :--- | :--- | :--- |
|
|
27
27
|
| **Spec PR** | **Track A** Stage 3 (L2/L3/`spec-first` after drafting proposal & specs) | **`asdlc lint <ID>`**<br>(0 blocking BDD/AC issues) | `asdlc:spec-review`<br>`spec` | Runs `asdlc lint` + routes to **Independent Spec AI Review** (`asdlc-spec-review`) |
|
|
28
|
-
| **Impl / Single PR** | **Track A** Stage 6.5 or **Track B** (L0/L1 Single-PR after TDD & tasks complete) | **`asdlc verify <ID>`**<br>(
|
|
28
|
+
| **Impl / Single PR** | **Track A** Stage 6.5 or **Track B** (L0/L1 Single-PR after TDD & tasks complete) | **`asdlc verify <ID>`**<br>(all verification gates pass) | `asdlc:impl-review`<br>`impl` | Runs `asdlc verify` + routes to **Independent Impl AI Review** (`asdlc-impl-review`) |
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -44,7 +44,7 @@ asdlc pr <CHANGE_ID> [targetBranch]
|
|
|
44
44
|
|
|
45
45
|
2. **Pre-flight Quality Gate**:
|
|
46
46
|
- **Spec PR**: runs `asdlc lint <ID>`. Fails fast if any blocking BDD or acceptance criteria findings exist.
|
|
47
|
-
- **Impl PR**: runs `asdlc verify <ID>`. Fails fast if any
|
|
47
|
+
- **Impl PR**: runs `asdlc verify <ID>`. Fails fast if any verification checks fail.
|
|
48
48
|
|
|
49
49
|
3. **Title & Body Extraction**:
|
|
50
50
|
- **Spec PR**: derives clean title (`spec(<slug>): <title>`) and embeds proposal intent.
|
|
@@ -141,9 +141,10 @@ EOF
|
|
|
141
141
|
|
|
142
142
|
- **If reviewing locally** (`<CHANGE_ID>` only, no PR): **Print the formatted review markdown directly** in your response and skip `gh pr comment` and Step 6.
|
|
143
143
|
|
|
144
|
-
Format the comment body strictly as:
|
|
144
|
+
Format the comment body strictly as (keeping the hidden `<!-- asdlc:review-round:<round> -->` anchor on line 1 for deterministic round tracking):
|
|
145
145
|
|
|
146
146
|
~~~markdown
|
|
147
|
+
<!-- asdlc:review-round:<round> -->
|
|
147
148
|
## 🤖 AI Spec Review — `<CHANGE_ID>`
|
|
148
149
|
|
|
149
150
|
> **Reviewer**: AI Independent Spec Reviewer (`asdlc-spec-review`)
|
|
@@ -47,3 +47,18 @@ Render a dashboard of all active changes:
|
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
Offer to drill down into any change or start a new one with `/asdlc:new "<requirement>"`.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### Case C: Team Governance & Observability Metrics (`/asdlc:status --metrics`)
|
|
54
|
+
Run:
|
|
55
|
+
|
|
56
|
+
```powershell
|
|
57
|
+
asdlc status --metrics [--days 30] [--json]
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Displays the **ASDLC Harness Observability** dashboard:
|
|
61
|
+
1. **Gate Friction Leaderboard**: Top local gate failures & failure patterns from `.sdlc/events.jsonl`.
|
|
62
|
+
2. **Autonomous PR Convergence (3-Round Cap)**: Round 1/2/3 pass rates and human escalations derived from Git archive history and `(ref: #PRRT_...)` commit trailers.
|
|
63
|
+
3. **Stage Lead Time (P50 / P90)**: Spec phase (`new -> approve`) and TDD phase (`apply -> verify`) durations via Git provenance.
|
|
64
|
+
4. **Risk Tier Breakdown**: Count of `L0`–`L3` changes tracked over the selected window.
|
|
@@ -11,20 +11,21 @@ This skill executes **Stage 6 (Verify)** of the Agentic SDLC. It runs the full s
|
|
|
11
11
|
|
|
12
12
|
## What this skill verifies
|
|
13
13
|
|
|
14
|
-
`asdlc verify` executes
|
|
15
|
-
1. **`
|
|
16
|
-
2. **`
|
|
17
|
-
3. **`
|
|
18
|
-
4. **`spec
|
|
19
|
-
5. **`
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
14
|
+
`asdlc verify` executes coordinated deterministic and AI quality gates:
|
|
15
|
+
1. **`level-integrity`**: Validates declared risk level matches change topology and hash-chain history.
|
|
16
|
+
2. **`pr-type`**: Discriminates PR type based strictly on paths.
|
|
17
|
+
3. **`artifacts`**: Checks presence of `proposal.md`, `specs/**`, `review.md`, `explore.md`, `tasks.md`.
|
|
18
|
+
4. **`approved-spec`**: Verifies that the spec commit is merged into target branch and matches declared `specSha`.
|
|
19
|
+
5. **`spec-tamper`**: Enforces that locked spec files (`proposal.md`, `specs/**`) are 100% unmodified in the Impl PR diff.
|
|
20
|
+
6. **`flow-state`**: Verifies status is `READY_FOR_IMPL` (stamped by `asdlc approve` or single-PR `apply`).
|
|
21
|
+
7. **`risk-escape`**: Detects unannounced API/DDL escalations that cross risk boundaries.
|
|
22
|
+
8. **`human-gate`**: Validates mandatory Tech Lead approval for L2/L3 (and `supervised`) changes.
|
|
23
|
+
9. **`tasks-complete`**: Confirms zero unchecked task boxes (`- [ ]`) in `tasks.md`.
|
|
24
|
+
10. **`test-presence`**: Enforces that any production code diff is accompanied by test diffs.
|
|
25
|
+
11. **`anti-test-weakening`**: Blocks deleted tests or newly injected `.skip` / `@Disabled` / `@pytest.mark.skip` bypasses.
|
|
26
|
+
12. **`tdd-evidence`**: Confirms that completed tasks record verification commands and test execution outputs.
|
|
27
|
+
13. **`BDD + acceptance criteria`**: Confirms all Acceptance Criteria test targets exist on disk and pass R0–R8 linting.
|
|
28
|
+
14. **`openspec-validate` / `schema-managed` / `acceptance-tests` / `external` / `AI verification`**: Strict OpenSpec schema validation, BU-managed schema pin check, spec-mapped AC test execution (`asdlc test`), external CI checks, and independent referee verification.
|
|
28
29
|
|
|
29
30
|
---
|
|
30
31
|
|
|
@@ -41,10 +42,11 @@ asdlc verify <CHANGE_ID>
|
|
|
41
42
|
If any check outputs `[FAIL]`:
|
|
42
43
|
- **`approved-spec`**: The spec is not yet merged on the protected branch. Guide the user: merge the spec PR, then run `asdlc approve <CHANGE_ID>`.
|
|
43
44
|
- **`test-presence`**: Source code was changed with zero test files. Guide the user: write corresponding unit/integration tests following TDD.
|
|
45
|
+
- **`anti-test-weakening`**: Existing tests were deleted or `.skip` / `@Disabled` / `@pytest.mark.skip` markers were added. Restore the tests and fix the underlying behavior.
|
|
44
46
|
- **`tdd-evidence`**: Tasks were checked without test run output. Guide the user: paste test execution results under tasks in `tasks.md`.
|
|
45
47
|
- **`tasks-complete`**: Unchecked tasks remain. Guide the user to finish implementing remaining tasks.
|
|
46
|
-
- **`BDD +
|
|
47
|
-
- **`external` (unit tests)**: Run the failing test command, debug the failure, fix the code, and re-run.
|
|
48
|
+
- **`BDD + acceptance criteria`**: An acceptance criterion points to a test file that does not exist. Create the missing test file.
|
|
49
|
+
- **`acceptance-tests` / `external` (unit tests)**: Run the failing test command, debug the failure, fix the code, and re-run.
|
|
48
50
|
|
|
49
51
|
### Step 3: Next Actions (Depending on Lifecycle Stage)
|
|
50
52
|
When all checks output `[PASS]` and verify succeeds:
|
|
@@ -52,7 +54,7 @@ When all checks output `[PASS]` and verify succeeds:
|
|
|
52
54
|
- **Scenario A: Pre-PR Local Implementation Verification (Stage 6)**
|
|
53
55
|
If running on a feature branch before opening the Implementation PR:
|
|
54
56
|
Inform the developer:
|
|
55
|
-
> "🎉 Local verification passed! All
|
|
57
|
+
> "🎉 Local verification passed! All verification gates satisfied.
|
|
56
58
|
> When you are ready to submit this implementation for CI AI review and team approval, run:
|
|
57
59
|
> `asdlc pr <CHANGE_ID> <targetBranch>` (or trigger `/asdlc:pr`).
|
|
58
60
|
> *(The agent will NOT automatically open a PR without your explicit command).* "
|
|
@@ -60,6 +62,6 @@ When all checks output `[PASS]` and verify succeeds:
|
|
|
60
62
|
- **Scenario B: Post-Merge Trunk Verification (Stage 6 -> Stage 7)**
|
|
61
63
|
If running after the Implementation PR has been approved and merged into the protected target branch (`main`):
|
|
62
64
|
Inform the developer:
|
|
63
|
-
> "🎉 Post-merge verification passed! All
|
|
65
|
+
> "🎉 Post-merge verification passed! All verification gates verified on the target branch.
|
|
64
66
|
> To close out and archive this change into the master specification catalog, run:
|
|
65
67
|
> `asdlc archive <CHANGE_ID>` (or trigger `/asdlc:archive`)."
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: ASDLC Governance & AI Review
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, synchronize, labeled]
|
|
6
|
+
pull_request_review:
|
|
7
|
+
types: [submitted]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
pull-requests: write
|
|
12
|
+
statuses: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
asdlc-gates:
|
|
16
|
+
name: ASDLC Deterministic Gates
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- name: Checkout repository
|
|
20
|
+
uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0
|
|
23
|
+
|
|
24
|
+
- name: Set up Node.js
|
|
25
|
+
uses: actions/setup-node@v4
|
|
26
|
+
with:
|
|
27
|
+
node-version: '20.x'
|
|
28
|
+
|
|
29
|
+
- name: Install agentic-sdlc
|
|
30
|
+
run: npm install -g @akjamie/agentic-sdlc@latest
|
|
31
|
+
|
|
32
|
+
- name: Detect active change and run Spec/Impl gates
|
|
33
|
+
env:
|
|
34
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
35
|
+
run: |
|
|
36
|
+
set -e
|
|
37
|
+
LABELS='${{ join(github.event.pull_request.labels.*.name, ',') }}'
|
|
38
|
+
CHANGE_ID=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep -oE 'openspec/changes/[^/]+' | grep -v '/archive$' | head -n1 | cut -d/ -f3 || true)
|
|
39
|
+
if [ -z "$CHANGE_ID" ]; then
|
|
40
|
+
echo "No openspec/changes/<id> touched; skipping asdlc gate."
|
|
41
|
+
exit 0
|
|
42
|
+
fi
|
|
43
|
+
if echo "$LABELS" | grep -q "asdlc:spec-review"; then
|
|
44
|
+
asdlc lint "$CHANGE_ID"
|
|
45
|
+
fi
|
|
46
|
+
if echo "$LABELS" | grep -q "asdlc:impl-review"; then
|
|
47
|
+
APPROVED_FLAG=""
|
|
48
|
+
PR_NUM="${{ github.event.pull_request.number || github.event.review.pull_request.number }}"
|
|
49
|
+
REVIEW_DECISION=$(gh pr view "$PR_NUM" --json reviewDecision --jq '.reviewDecision' 2>/dev/null || echo "")
|
|
50
|
+
if [ "$REVIEW_DECISION" = "APPROVED" ]; then
|
|
51
|
+
APPROVED_FLAG="--approved"
|
|
52
|
+
fi
|
|
53
|
+
asdlc verify "$CHANGE_ID" --protected-branch "origin/${{ github.base_ref }}" $APPROVED_FLAG
|
|
54
|
+
fi
|
|
55
|
+
|
|
56
|
+
# Optional: configure repository variable ASDLC_AI_REVIEW_CMD + LLM secret to run a headless review agent
|
|
57
|
+
- name: Optional Headless AI Review Runner
|
|
58
|
+
if: ${{ vars.ASDLC_AI_REVIEW_CMD != '' }}
|
|
59
|
+
env:
|
|
60
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
+
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
62
|
+
run: |
|
|
63
|
+
${{ vars.ASDLC_AI_REVIEW_CMD }}
|
package/package.json
CHANGED