@akjamie/agentic-sdlc 1.9.2 → 1.9.3
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.
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asdlc-impl-review
|
|
3
|
-
description: "
|
|
3
|
+
description: "Comprehensive code review & independent implementation review (Stage 6.5). Evaluates any PR, code review request, or local change for spec conformance, bug classes, code quality, test fidelity, and production readiness. Triggers on 'review PR', 'code review', 'impl review', PR URLs (https://github.com/.../pull/...), PR numbers (#N), or local CHANGE_ID. Supports standalone PR-only review without requiring local repo checkout or OpenSpec artifacts."
|
|
4
4
|
aliases:
|
|
5
5
|
- impl-review
|
|
6
6
|
- code-review-asdlc
|
|
7
|
+
- pr-review
|
|
8
|
+
- code-review
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
# /asdlc:impl-review — Independent Implementation Review Agent
|
|
@@ -26,7 +28,7 @@ Drawing from Anthropic's engineering practices for scaling AI code reviews, this
|
|
|
26
28
|
|
|
27
29
|
> [!IMPORTANT]
|
|
28
30
|
> **Scope**: Reviews *implementation conformance and code quality* — spec adherence, test rigor, architecture, and production safety.
|
|
29
|
-
>
|
|
31
|
+
> When reviewing an OpenSpec change, requires `asdlc test <CHANGE_ID>` and `asdlc verify <CHANGE_ID>` to have passed before this review can issue an APPROVE verdict. For standalone PRs without OpenSpec artifacts, checks CI status (`gh pr checks`) and test coverage directly.
|
|
30
32
|
> Does NOT review spec intent — that is `asdlc-spec-review`.
|
|
31
33
|
>
|
|
32
34
|
> **Output Routing Contract (PR vs. Local)**:
|
|
@@ -38,8 +40,9 @@ Drawing from Anthropic's engineering practices for scaling AI code reviews, this
|
|
|
38
40
|
## Invocation & Triggers
|
|
39
41
|
|
|
40
42
|
This skill can be invoked:
|
|
41
|
-
1. **
|
|
42
|
-
2. **
|
|
43
|
+
1. **Interactive Prompt**: Whenever the user asks to "review PR", "code review", "review this PR", passes a GitHub/GitLab PR URL (`https://github.com/owner/repo/pull/123`), or gives a PR number (`#123`).
|
|
44
|
+
2. **Locally by an independent agent**: `/asdlc:impl-review <CHANGE_ID>` or `/asdlc:impl-review <PR_URL>`
|
|
45
|
+
3. **Automatically on PRs** carrying the `asdlc:impl-review` label via PR automation workflows:
|
|
43
46
|
|
|
44
47
|
```yaml
|
|
45
48
|
# GitHub Actions / PR Automation example
|
|
@@ -100,19 +103,21 @@ Classify the PR into one of three risk tiers based on files changed (**highest-r
|
|
|
100
103
|
- **Tier 3 (High Risk)**: Auth/security, payment/billing, cryptography, DB migrations, core CI/governance engine, or **any PR modifying `REVIEW.md` or governance files**.
|
|
101
104
|
*Protocol*: Rigorous scrutiny, failure-mode analysis, strict zero-tolerance for untested edge cases, mandatory human lead sign-off. Flag governance modification explicitly in the review body.
|
|
102
105
|
|
|
103
|
-
#### Read Approved Spec Ground Truth
|
|
106
|
+
#### Read Approved Spec Ground Truth (if available)
|
|
104
107
|
```bash
|
|
105
|
-
# Read the approved spec from the base branch
|
|
106
|
-
git show origin/<baseRefName>:openspec/changes/<CHANGE_ID>/specs/<capability>/spec.md
|
|
107
|
-
git show origin/<baseRefName>:openspec/changes/<CHANGE_ID>/tasks.md
|
|
108
|
+
# Read the approved spec from the base branch (when CHANGE_ID / OpenSpec is used)
|
|
109
|
+
git show origin/<baseRefName>:openspec/changes/<CHANGE_ID>/specs/<capability>/spec.md 2>/dev/null || true
|
|
110
|
+
git show origin/<baseRefName>:openspec/changes/<CHANGE_ID>/tasks.md 2>/dev/null || true
|
|
108
111
|
|
|
109
|
-
# Execute Acceptance Tests in CI (Player != Referee gate)
|
|
110
|
-
asdlc test <CHANGE_ID> --json
|
|
112
|
+
# Execute Acceptance Tests in CI (Player != Referee gate) when local checkout and asdlc are available
|
|
113
|
+
asdlc test <CHANGE_ID> --json 2>/dev/null || true
|
|
111
114
|
```
|
|
112
115
|
|
|
113
116
|
> [!NOTE]
|
|
114
|
-
>
|
|
115
|
-
>
|
|
117
|
+
> **OpenSpec vs. Standalone PR Mode**:
|
|
118
|
+
> - If the repository uses OpenSpec / changesets (`openspec/changes/<CHANGE_ID>`), read the **spec first**, then the implementation diff. The spec is the ground truth; the code is the candidate.
|
|
119
|
+
> - If this is a standalone PR without OpenSpec artifacts or local clone (e.g. reviewed via PR URL only), derive requirements directly from the PR title, PR description, linked issue context, and repository `REVIEW.md` contract. Lack of an OpenSpec `CHANGE_ID` **NEVER blocks** reviewing the PR.
|
|
120
|
+
> - Enforce **Player ≠ Referee**: When local checkout exists, CI executes `asdlc test <CHANGE_ID> --json` independently rather than trusting claims in `tasks.md`. In standalone PR-only mode, inspect CI test run checks via `gh pr checks $PR_NUMBER --repo $REPO`.
|
|
116
121
|
|
|
117
122
|
---
|
|
118
123
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asdlc-spec-review
|
|
3
|
-
description: "Independent AI Spec Review (Stage 3)
|
|
3
|
+
description: "Independent AI Spec & Architecture Review (Stage 3). Evaluates a spec PR, RFC, design doc, proposal.md, or OpenSpec change for completeness, ambiguity, contradiction, testability, and security before human TL approval. Triggers on 'review spec', 'review proposal', 'spec review', or Spec PRs carrying the 'asdlc:spec-review' label. Accepts a GitHub PR URL or local CHANGE_ID."
|
|
4
4
|
aliases:
|
|
5
5
|
- spec-review
|
|
6
|
+
- proposal-review
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
# /asdlc:spec-review — Independent Spec Review Agent
|
|
@@ -26,8 +27,9 @@ It applies the **Player ≠ Referee** principle: the reviewing agent MUST NOT be
|
|
|
26
27
|
## Invocation & Triggers
|
|
27
28
|
|
|
28
29
|
This skill can be invoked:
|
|
29
|
-
1. **
|
|
30
|
-
2. **
|
|
30
|
+
1. **Interactive Prompt**: Whenever the user asks to "review spec", "review proposal", "review design", "review RFC", or provides a Spec PR URL.
|
|
31
|
+
2. **Locally by an independent agent**: `/asdlc:spec-review <CHANGE_ID>`
|
|
32
|
+
3. **Automatically on PRs** carrying the `asdlc:spec-review` label via PR automation workflows:
|
|
31
33
|
|
|
32
34
|
```yaml
|
|
33
35
|
# GitHub Actions / PR Automation example
|
package/package.json
CHANGED
package/src/commands/skills.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import os from 'node:os';
|
|
3
3
|
import fs from 'node:fs';
|
|
4
|
-
import { exists, listDir, readText, copyTree, ensureDir } from '../lib/fs.js';
|
|
4
|
+
import { exists, listDir, readText, copyTree, ensureDir, removeDir } from '../lib/fs.js';
|
|
5
5
|
import { skillsAssetDir, resolveRepoRoot, openspecDir } from '../lib/paths.js';
|
|
6
6
|
import { detectTools, installSkills } from './init.js';
|
|
7
7
|
import { fail } from '../lib/errors.js';
|
|
8
8
|
import { log } from '../lib/log.js';
|
|
9
9
|
|
|
10
|
-
import { TOOL_REGISTRY, getToolDefinition } from '../lib/tools.js';
|
|
10
|
+
import { TOOL_REGISTRY, getToolDefinition, DEPRECATED_SKILLS } from '../lib/tools.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Parse YAML frontmatter from a SKILL.md file
|
|
@@ -124,6 +124,14 @@ export function installGlobalSkills(opts = {}) {
|
|
|
124
124
|
log.ok(`installed skills -> ~/${dir}/skills/`);
|
|
125
125
|
installedCount++;
|
|
126
126
|
}
|
|
127
|
+
// Prune deprecated legacy skills from global user agent directory
|
|
128
|
+
for (const dep of DEPRECATED_SKILLS) {
|
|
129
|
+
const depPath = path.join(dest, dep);
|
|
130
|
+
if (exists(depPath)) {
|
|
131
|
+
removeDir(depPath);
|
|
132
|
+
log.ok(`pruned deprecated skill '${dep}' from ~/${dir}/skills/`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
127
135
|
}
|
|
128
136
|
|
|
129
137
|
log.info('');
|
package/src/lib/tools.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
|
-
import { exists, listDir, copyTree, ensureDir, readText, writeText } from './fs.js';
|
|
2
|
+
import { exists, listDir, copyTree, ensureDir, readText, writeText, removeDir } from './fs.js';
|
|
3
3
|
import { skillsAssetDir, commandsAssetDir } from './paths.js';
|
|
4
4
|
import { log } from './log.js';
|
|
5
5
|
|
|
6
|
+
export const DEPRECATED_SKILLS = ['asdlc-review'];
|
|
7
|
+
|
|
6
8
|
export const TOOL_REGISTRY = {
|
|
7
9
|
claude: {
|
|
8
10
|
id: 'claude',
|
|
@@ -207,6 +209,14 @@ export function installSkills(repoRoot, tools = []) {
|
|
|
207
209
|
for (const dir of targetDirs) {
|
|
208
210
|
const dest = path.join(repoRoot, dir);
|
|
209
211
|
copyTree(skillsAssetDir, dest);
|
|
212
|
+
// Prune deprecated legacy skills from target directory to prevent orphan skill pollution
|
|
213
|
+
for (const dep of DEPRECATED_SKILLS) {
|
|
214
|
+
const depPath = path.join(dest, dep);
|
|
215
|
+
if (exists(depPath)) {
|
|
216
|
+
removeDir(depPath);
|
|
217
|
+
log.ok(`pruned deprecated skill '${dep}' from ${dir}/`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
210
220
|
log.ok(`installed bundled skills (${count} skills) -> ${dir}/`);
|
|
211
221
|
}
|
|
212
222
|
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: asdlc-review
|
|
3
|
-
description: "Independent fresh-context spec review helper. Primary reviews run via asdlc-spec-review and asdlc-impl-review agent sessions."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# /asdlc:review - Independent Spec Review Helper
|
|
7
|
-
|
|
8
|
-
> [!NOTE]
|
|
9
|
-
> **Independent Agent Session Review**:
|
|
10
|
-
> Spec and implementation reviews are executed by dedicated **Independent Review Agent Sessions** (`asdlc-spec-review` and `asdlc-impl-review`) adhering to the **Player ≠ Referee** principle.
|
|
11
|
-
> This skill (`asdlc-review`) is retained as a local fresh-context dry-run helper to inspect changes and generate or preview `review.md`.
|
|
12
|
-
|
|
13
|
-
When invoked, it switches into the **Independent Reviewer** role (Player ≠ Referee). The reviewer MUST NOT be the authoring agent of the change.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Review Dimensions
|
|
18
|
-
|
|
19
|
-
Every change is evaluated along six core dimensions:
|
|
20
|
-
|
|
21
|
-
1. **Completeness**: Are all user journeys covered? Are edge cases, error conditions, and nil/empty inputs handled?
|
|
22
|
-
2. **Ambiguity**: Are requirements clear and unambiguous? Does each use strict normative language (`SHALL` / `MUST`) rather than passive voice?
|
|
23
|
-
3. **Cross-repo consistency**: Does this change break or impact cross-repo API/event contracts? If so, is a System Design Amendment required?
|
|
24
|
-
4. **Contract impact**: Are breaking changes flagged with `**BREAKING**` in `proposal.md`? Are backwards compatibility guarantees documented?
|
|
25
|
-
5. **Testability**: Does every requirement have verifiable Acceptance Criteria (`AC<n>`) with concrete test paths?
|
|
26
|
-
6. **Security**: Are authentication, authorization, input validation, secret hygiene, and data privacy respected?
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## Workflow Sequence
|
|
31
|
-
|
|
32
|
-
### Step 1: Read Change Context (Read-Only)
|
|
33
|
-
Inspect all intent files under `openspec/changes/<CHANGE_ID>/`:
|
|
34
|
-
- `proposal.md`
|
|
35
|
-
- `specs/**/*.md`
|
|
36
|
-
- `explore.md`
|
|
37
|
-
|
|
38
|
-
### Step 2: Formulate Findings
|
|
39
|
-
Categorize findings by severity:
|
|
40
|
-
- **Blocker**: Spec violation, missing acceptance criteria, untestable assertion, or security risk.
|
|
41
|
-
- **Major**: Ambiguous scenario, missing `**GIVEN**`, or unaddressed edge cases.
|
|
42
|
-
- **Minor / Advisory**: Documentation clarity, style suggestions.
|
|
43
|
-
|
|
44
|
-
### Step 3: Author `review.md`
|
|
45
|
-
Write `openspec/changes/<CHANGE_ID>/review.md` with the following structure:
|
|
46
|
-
|
|
47
|
-
```markdown
|
|
48
|
-
# Review: <CHANGE_ID>
|
|
49
|
-
|
|
50
|
-
## Summary
|
|
51
|
-
<2-3 sentences summarizing the change and the evaluation outcome>
|
|
52
|
-
|
|
53
|
-
## Dimensions Evaluation
|
|
54
|
-
- Completeness: PASS | CONCERN | FAIL
|
|
55
|
-
- Ambiguity: PASS | CONCERN | FAIL
|
|
56
|
-
- Cross-repo consistency: PASS | CONCERN | FAIL
|
|
57
|
-
- Contract impact: PASS | CONCERN | FAIL
|
|
58
|
-
- Testability: PASS | CONCERN | FAIL
|
|
59
|
-
- Security: PASS | CONCERN | FAIL
|
|
60
|
-
|
|
61
|
-
## Requirement -> Implementation -> Test Traceability
|
|
62
|
-
| Requirement | Acceptance Criteria | Target Test | Status |
|
|
63
|
-
|---|---|---|---|
|
|
64
|
-
| Req 1 | AC1: ... | test/foo.test.js | VERIFIED |
|
|
65
|
-
|
|
66
|
-
## Blocking Findings
|
|
67
|
-
(none)
|
|
68
|
-
<!-- Or list: 1. [Blocker] <description> -->
|
|
69
|
-
|
|
70
|
-
## Advisory Notes
|
|
71
|
-
<Optional recommendations>
|
|
72
|
-
|
|
73
|
-
## Verdict
|
|
74
|
-
APPROVE
|
|
75
|
-
<!-- Or: NEEDS_REVISION -->
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
### Step 4: Next Steps
|
|
79
|
-
- If verdict is `APPROVE`: Guide the author to run `/asdlc:lint <CHANGE_ID>` and submit the Spec PR.
|
|
80
|
-
- If verdict is `NEEDS_REVISION`: List blocking items that the spec author must address.
|