@akjamie/agentic-sdlc 0.0.0-stage → 1.1.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/LICENSE +21 -0
- package/README.md +219 -2
- package/assets/ci/asdlc-ai-review.yml +65 -0
- package/assets/config/config.yaml +76 -0
- package/assets/githooks/post-merge +22 -0
- package/assets/githooks/pre-push +17 -0
- package/assets/policy/policy.yaml +46 -0
- package/assets/schema/schema.yaml +168 -0
- package/assets/schema/templates/design.md +134 -0
- package/assets/schema/templates/proposal.md +25 -0
- package/assets/schema/templates/review.md +24 -0
- package/assets/schema/templates/spec.md +37 -0
- package/assets/schema/templates/tasks.md +10 -0
- package/assets/skills/asdlc-apply/SKILL.md +128 -0
- package/assets/skills/asdlc-approve/SKILL.md +107 -0
- package/assets/skills/asdlc-archive/SKILL.md +49 -0
- package/assets/skills/asdlc-doctor/SKILL.md +82 -0
- package/assets/skills/asdlc-impl-review/SKILL.md +219 -0
- package/assets/skills/asdlc-init/SKILL.md +68 -0
- package/assets/skills/asdlc-lint/SKILL.md +59 -0
- package/assets/skills/asdlc-new/SKILL.md +107 -0
- package/assets/skills/asdlc-pr/SKILL.md +59 -0
- package/assets/skills/asdlc-review/SKILL.md +80 -0
- package/assets/skills/asdlc-spec-review/SKILL.md +206 -0
- package/assets/skills/asdlc-status/SKILL.md +49 -0
- package/assets/skills/asdlc-upgrade/SKILL.md +34 -0
- package/assets/skills/asdlc-verify/SKILL.md +55 -0
- package/assets/skills/batch-grill-me/SKILL.md +136 -0
- package/assets/skills/grilling/SKILL.md +136 -0
- package/bin/asdlc.js +6 -0
- package/package.json +43 -4
- package/src/cli.js +89 -0
- package/src/commands/apply.js +114 -0
- package/src/commands/approve.js +166 -0
- package/src/commands/archive.js +143 -0
- package/src/commands/doctor.js +163 -0
- package/src/commands/init.js +201 -0
- package/src/commands/lint.js +127 -0
- package/src/commands/new.js +171 -0
- package/src/commands/pr.js +495 -0
- package/src/commands/skills.js +184 -0
- package/src/commands/status.js +65 -0
- package/src/commands/test.js +137 -0
- package/src/commands/update.js +103 -0
- package/src/commands/upgrade.js +175 -0
- package/src/commands/verify.js +229 -0
- package/src/index.js +3 -0
- package/src/lib/agents.js +73 -0
- package/src/lib/cliutil.js +99 -0
- package/src/lib/errors.js +18 -0
- package/src/lib/exec.js +23 -0
- package/src/lib/fs.js +83 -0
- package/src/lib/git.js +76 -0
- package/src/lib/graphify.js +106 -0
- package/src/lib/log.js +15 -0
- package/src/lib/openspec.js +91 -0
- package/src/lib/paths.js +43 -0
- package/src/lib/policy.js +60 -0
- package/src/lib/prtype.js +41 -0
- package/src/lib/schema.js +86 -0
- package/src/lib/speclint.js +173 -0
- package/src/lib/tdd.js +71 -0
- package/src/lib/yaml.js +18 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asdlc-spec-review
|
|
3
|
+
description: "Independent AI Spec Review (Stage 3): evaluate a spec PR or local change for completeness, ambiguity, contradiction, testability, and security before human TL approval. Accepts a GitHub PR URL or local CHANGE_ID."
|
|
4
|
+
aliases:
|
|
5
|
+
- spec-review
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /asdlc:spec-review — CI-Triggered Independent Spec Reviewer
|
|
9
|
+
|
|
10
|
+
This skill executes **independent AI spec review**, triggered by CI when a PR carries the `asdlc:spec-review` label.
|
|
11
|
+
It posts its findings as a **markdown PR comment** via the GitHub API so the human TL sees them inline on the PR.
|
|
12
|
+
|
|
13
|
+
It applies the **Player ≠ Referee** principle: the reviewing agent MUST NOT be the agent that authored the spec.
|
|
14
|
+
|
|
15
|
+
> [!IMPORTANT]
|
|
16
|
+
> **Scope**: Reviews *intent* — BDD quality, logical consistency, architectural soundness, AC testability.
|
|
17
|
+
> Does NOT re-run `asdlc lint` (deterministic structural checks are already gated by `asdlc pr`).
|
|
18
|
+
> Does NOT review implementation code — that is `asdlc-impl-review`.
|
|
19
|
+
> Output is a **PR comment**, not a local file.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Trigger
|
|
24
|
+
|
|
25
|
+
This skill is invoked by CI when a PR is labeled `asdlc:spec-review`. The typical invocation in a GitHub Actions workflow or Jenkinsfile:
|
|
26
|
+
|
|
27
|
+
```yaml
|
|
28
|
+
# GitHub Actions example
|
|
29
|
+
- name: AI Spec Review
|
|
30
|
+
if: contains(github.event.pull_request.labels.*.name, 'asdlc:spec-review')
|
|
31
|
+
env:
|
|
32
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
+
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
34
|
+
REPO: ${{ github.repository }}
|
|
35
|
+
run: |
|
|
36
|
+
# Agent CLI / SDK invokes this skill with: /asdlc:spec-review $PR_NUMBER $REPO
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```groovy
|
|
40
|
+
// Jenkinsfile example
|
|
41
|
+
stage('Spec AI Review') {
|
|
42
|
+
when { expression { env.IS_IMPL != 'true' } }
|
|
43
|
+
steps {
|
|
44
|
+
withCredentials([string(credentialsId: 'github-token', variable: 'GH_TOKEN')]) {
|
|
45
|
+
sh "${env.ASDLC} spec-review --pr ${env.PR_NUMBER} --repo ${env.REPO}"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Workflow Sequence
|
|
54
|
+
|
|
55
|
+
### Step 1: Acquire PR Context
|
|
56
|
+
|
|
57
|
+
Run the following commands to collect everything needed for review:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# List changed files
|
|
61
|
+
gh pr view $PR_NUMBER --repo $REPO --json title,body,baseRefName,headRefName,files
|
|
62
|
+
|
|
63
|
+
# Read the full spec diff
|
|
64
|
+
gh pr diff $PR_NUMBER --repo $REPO
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Extract from the PR body:
|
|
68
|
+
- `CHANGE_ID` from the `**Change ID**:` field
|
|
69
|
+
- The proposal summary from the PR body itself
|
|
70
|
+
|
|
71
|
+
> [!NOTE]
|
|
72
|
+
> Read **all** changed files in the diff before forming any finding. Partial context produces false positives.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### Step 2: Apply the Six Review Dimensions
|
|
77
|
+
|
|
78
|
+
Evaluate every requirement in the diff against all six dimensions. Mark each `PASS`, `CONCERN`, or `FAIL`.
|
|
79
|
+
|
|
80
|
+
#### D1 — Completeness
|
|
81
|
+
- Does the spec cover all user journeys stated in the proposal `## Why`?
|
|
82
|
+
- Are nil/empty inputs, upstream failures, and degradation paths handled?
|
|
83
|
+
- Is every `## MODIFIED` or `## REMOVED` requirement accompanied by a `**Reason**`?
|
|
84
|
+
|
|
85
|
+
#### D2 — Ambiguity & Contradiction
|
|
86
|
+
- Does each requirement use normative `SHALL` / `MUST`, not passive voice?
|
|
87
|
+
- Are there contradictory ACs or scenarios within the spec? (e.g., one AC implies HTTP 200 graceful fallback, another implies HTTP 4xx hard error for the same trigger)
|
|
88
|
+
- Are threshold values, enum members, and schema field names precisely specified?
|
|
89
|
+
|
|
90
|
+
#### D3 — Cross-Repo Consistency
|
|
91
|
+
- Does this change alter a shared API contract, event schema, or RPC interface?
|
|
92
|
+
- If yes: is a System Design Amendment referenced in `proposal.md ## System Design refs`?
|
|
93
|
+
|
|
94
|
+
#### D4 — Contract Impact
|
|
95
|
+
- Are breaking changes explicitly flagged `**BREAKING**` in `proposal.md ## What Changes`?
|
|
96
|
+
- Are backward-compatibility commitments documented?
|
|
97
|
+
|
|
98
|
+
#### D5 — Testability
|
|
99
|
+
- Does every `### Requirement:` have ≥ 1 `- [ ] ACn:` with a concrete `(test: <path>)` mapping?
|
|
100
|
+
- Is each AC deterministically observable? ("must feel responsive" is not testable; "must respond in <2s (p99)" is)
|
|
101
|
+
- Are integration and contract test targets distinct from unit test targets where the scope demands it?
|
|
102
|
+
|
|
103
|
+
#### D6 — Security & Privacy
|
|
104
|
+
- Is authentication / authorization addressed for any new API or CLI endpoint?
|
|
105
|
+
- Are secrets, tokens, and credentials never logged or hard-coded?
|
|
106
|
+
- Is user-supplied input validated before use?
|
|
107
|
+
- If the change stores user data, is PII lifecycle (retention, deletion) documented?
|
|
108
|
+
|
|
109
|
+
#### D7 — Technical Design & UI/API Soundness
|
|
110
|
+
- **Design Ground Truth**: When UI is involved, does `design.md` cite an authoritative ground truth reference (mockup, Figma URL, design system URL, or existing brand CSS)? Flag as **Major** if tokens appear hallucinated without reference or justification.
|
|
111
|
+
- **Visual Testability**: When UI is involved, does the spec contain Visual Acceptance Criteria covering responsive breakpoints (mobile, tablet, desktop) and interaction states (loading, empty, error, active), mapped to test files (e.g. Playwright / visual snapshot tests)? Flag as **Blocker** if UI specs lack visual ACs or test mappings.
|
|
112
|
+
- **Unverified Assumptions**: Are there any `[UNVERIFIED: <reason>]` tags present in `clarifications.md`, `design.md`, or the specs? D7 MUST extract every `[UNVERIFIED]` tag. If an AC depends on an unverified endpoint, quota, or rate limit without a verified fallback, flag as **Major** and require explicit human TL sign-off.
|
|
113
|
+
- **API & Client Lifecycle**: When 3rd-party/external APIs are integrated, does the technical design enforce client reuse (singleton / connection pooling, never recreate per request), in-memory TTL caching for geocoding/lookup endpoints, rate-limit awareness, and degraded fallbacks? Flag as **Blocker** if clients are instantiated per request or lack caching/retry policies.
|
|
114
|
+
- **Interface & DTO Contracts**: Are request/response schemas, DTOs, and domain models rigorously typed (e.g. TypeScript interfaces) with validation boundaries?
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### Step 3: Build the Requirement → AC → Test Traceability Matrix
|
|
119
|
+
|
|
120
|
+
For each `### Requirement:` found in the diff, produce one row covering all its ACs and their test file mappings.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
### Step 4: Formulate Findings
|
|
125
|
+
|
|
126
|
+
Classify each finding:
|
|
127
|
+
|
|
128
|
+
- **🔴 Blocker** — Contradictory ACs, untestable assertion, missing normative language, missing visual ACs for UI, missing singleton/caching for external APIs, security risk. Blocks `asdlc approve`.
|
|
129
|
+
- **🟡 Major** — Ambiguous scenario, unhandled edge case, unverified assumption on external API (`[UNVERIFIED]`), missing design ground truth reference. Should be resolved or acknowledged before approval.
|
|
130
|
+
- **🟢 Advisory** — Clarity or style improvements. Does not block.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
### Step 5: Post PR Comment
|
|
135
|
+
|
|
136
|
+
Compose the review as markdown and post it as a PR comment using the GitHub API:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
gh pr comment $PR_NUMBER --repo $REPO --body "$(cat <<'EOF'
|
|
140
|
+
<review-markdown>
|
|
141
|
+
EOF
|
|
142
|
+
)"
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Format the comment body strictly as:
|
|
146
|
+
|
|
147
|
+
~~~markdown
|
|
148
|
+
## 🤖 AI Spec Review — `<CHANGE_ID>`
|
|
149
|
+
|
|
150
|
+
> **Reviewer**: AI Independent Spec Reviewer (`asdlc-spec-review`)
|
|
151
|
+
> **Verdict**: ✅ APPROVE | 🔴 NEEDS_REVISION
|
|
152
|
+
|
|
153
|
+
### Dimension Scores
|
|
154
|
+
|
|
155
|
+
| Dimension | Rating | Key Finding |
|
|
156
|
+
| :--- | :---: | :--- |
|
|
157
|
+
| D1 Completeness | ✅ PASS / ⚠️ CONCERN / ❌ FAIL | <one-line summary> |
|
|
158
|
+
| D2 Ambiguity & Contradiction | ✅ / ⚠️ / ❌ | <one-line summary> |
|
|
159
|
+
| D3 Cross-repo consistency | ✅ / ⚠️ / ❌ | <one-line summary> |
|
|
160
|
+
| D4 Contract impact | ✅ / ⚠️ / ❌ | <one-line summary> |
|
|
161
|
+
| D5 Testability | ✅ / ⚠️ / ❌ | <one-line summary> |
|
|
162
|
+
| D6 Security & Privacy | ✅ / ⚠️ / ❌ | <one-line summary> |
|
|
163
|
+
| D7 Technical Design & UI/API Soundness | ✅ / ⚠️ / ❌ | <one-line summary> |
|
|
164
|
+
|
|
165
|
+
### Requirement → AC → Test Traceability
|
|
166
|
+
|
|
167
|
+
| Requirement | ACs | Target Test | Status |
|
|
168
|
+
| :--- | :--- | :--- | :--- |
|
|
169
|
+
| <Requirement name> | AC1, AC2 | test/<feature>.test.ts | ✅ VERIFIED |
|
|
170
|
+
|
|
171
|
+
### ⚠️ Unverified Assumptions Requiring TL Acknowledgment
|
|
172
|
+
<!-- List any [UNVERIFIED: ...] tags found across clarifications.md, design.md, and specs. Omit section if none. -->
|
|
173
|
+
- `[UNVERIFIED: <reason>]` — <context / affected requirement>
|
|
174
|
+
|
|
175
|
+
### 🔴 Blocking Findings
|
|
176
|
+
<!-- Omit section if none -->
|
|
177
|
+
1. **[Blocker]** `<Requirement: Name>` — AC<n>: <description of contradiction or missing assertion>
|
|
178
|
+
|
|
179
|
+
### 🟡 Major Findings
|
|
180
|
+
<!-- Omit section if none -->
|
|
181
|
+
1. **[Major]** <description>
|
|
182
|
+
|
|
183
|
+
### 🟢 Advisory Notes
|
|
184
|
+
<!-- Omit section if none -->
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
*Human TL: review the findings above, then run `asdlc approve <CHANGE_ID>` when satisfied.*
|
|
188
|
+
~~~
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### Step 6: Set CI Status
|
|
193
|
+
|
|
194
|
+
After posting the comment:
|
|
195
|
+
|
|
196
|
+
- **If APPROVE**: set CI check status to `success` (green). The PR is unblocked for TL approval.
|
|
197
|
+
- **If NEEDS_REVISION**: set CI check status to `failure` (red). The PR is blocked until blockers are resolved.
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
# Using gh CLI to set a commit status
|
|
201
|
+
gh api repos/$REPO/statuses/$SHA \
|
|
202
|
+
-f state="success|failure" \
|
|
203
|
+
-f context="asdlc/spec-ai-review" \
|
|
204
|
+
-f description="AI Spec Review: APPROVE|NEEDS_REVISION" \
|
|
205
|
+
-f target_url="$PR_URL"
|
|
206
|
+
```
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asdlc-status
|
|
3
|
+
description: "Show change lifecycle progress, active artifacts, next actionable command, or an active portfolio dashboard of all open changes in the repository."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /asdlc:status - Lifecycle Navigation & Portfolio Dashboard
|
|
7
|
+
|
|
8
|
+
This skill provides navigation and visibility across the 7 stages of Agentic SDLC. It orientates developers and agents on where a change stands and what exact command to execute next.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Workflow Sequence
|
|
13
|
+
|
|
14
|
+
### Case A: Inspect a Specific Change (`/asdlc:status <CHANGE_ID>`)
|
|
15
|
+
Run:
|
|
16
|
+
|
|
17
|
+
```powershell
|
|
18
|
+
asdlc status <CHANGE_ID>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Parse and display:
|
|
22
|
+
1. **Current Stage**: (e.g. Stage 2: Spec Authoring, Stage 4: Approved on Main, Stage 5: Ready for Impl).
|
|
23
|
+
2. **Artifact Checklist**:
|
|
24
|
+
- `proposal.md`: present / missing
|
|
25
|
+
- `specs/**`: count and files
|
|
26
|
+
- `explore.md`: grounded status
|
|
27
|
+
- `clarifications.md`: settled / open
|
|
28
|
+
- `review.md`: verdict (`APPROVE` / `NEEDS_REVISION`)
|
|
29
|
+
- `tasks.md`: checked / unchecked count
|
|
30
|
+
3. **Next Recommended Command**: Exact command to unblock or advance the change (e.g. `asdlc lint <ID>`, `asdlc approve <ID>`, or `asdlc verify <ID>`).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
### Case B: Portfolio Overview (`/asdlc:status`)
|
|
35
|
+
If no `<CHANGE_ID>` is supplied, inspect `openspec/changes/`:
|
|
36
|
+
|
|
37
|
+
Render a dashboard of all active changes:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
### 📊 Agentic SDLC Portfolio Dashboard
|
|
41
|
+
|
|
42
|
+
| Change ID | Stage | Flow State | Next Action |
|
|
43
|
+
|---|---|---|---|
|
|
44
|
+
| `jwt-authentication` | Stage 5 (Apply) | READY_FOR_IMPL | Run `/asdlc:apply jwt-authentication` |
|
|
45
|
+
| `rate-limiting` | Stage 2 (New) | EXPLORING | Complete `clarifications.md` |
|
|
46
|
+
| `cache-layer` | Stage 3 (Lint) | LINT_FAIL | Fix BDD scenarios with `/asdlc:lint` |
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Offer to drill down into any change or start a new one with `/asdlc:new "<requirement>"`.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asdlc-upgrade
|
|
3
|
+
description: "Upgrade the Agentic SDLC toolchain: asdlc CLI, OpenSpec engine, Graphify knowledge graph, managed schemas, and post-upgrade health check."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /asdlc:upgrade - Self-Maintenance & Toolchain Upgrader
|
|
7
|
+
|
|
8
|
+
This skill upgrades all components of the Agentic SDLC toolchain.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Command
|
|
13
|
+
|
|
14
|
+
```powershell
|
|
15
|
+
asdlc upgrade
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Options
|
|
19
|
+
|
|
20
|
+
- `--no-asdlc`: Skip upgrading the `asdlc` CLI.
|
|
21
|
+
- `--no-openspec`: Skip upgrading OpenSpec.
|
|
22
|
+
- `--no-graphify`: Skip upgrading Graphify.
|
|
23
|
+
- `--no-schema`: Skip refreshing the BU-managed schema.
|
|
24
|
+
- `--no-doctor`: Skip the post-upgrade health check.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## What It Does
|
|
29
|
+
|
|
30
|
+
1. **CLI Upgrade**: Updates `@akjamie/agentic-sdlc` to the latest release via `npm install -g @akjamie/agentic-sdlc@latest`.
|
|
31
|
+
2. **OpenSpec Upgrade**: Keeps OpenSpec CLI up-to-date (`npm install -g openspec@latest`).
|
|
32
|
+
3. **Graphify Upgrade**: Updates the AST knowledge graph tool (`uv tool install --upgrade graphifyy` or `pip install --upgrade graphifyy`).
|
|
33
|
+
4. **Schema Refresh**: Refreshes centrally managed schemas and templates.
|
|
34
|
+
5. **Doctor Check**: Runs an automatic post-upgrade diagnostic report.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asdlc-verify
|
|
3
|
+
description: "Execute Stage 6 verification gate: validate path-limited approved SHA, artifacts, tasks complete, test-presence, tdd-evidence, BDD linting, external tests, and independent AI verification."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /asdlc:verify - Implementation Verification Gate
|
|
7
|
+
|
|
8
|
+
This skill executes **Stage 6 (Verify)** of the Agentic SDLC. It runs the full suite of deterministic and AI gates against the implementation, providing structured failure diagnostics and clear transition steps.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## What this skill verifies
|
|
13
|
+
|
|
14
|
+
`asdlc verify` executes 12 coordinated checks:
|
|
15
|
+
1. **`pr-type`**: Discriminates PR type based strictly on paths.
|
|
16
|
+
2. **`artifacts`**: Checks presence of `proposal.md`, `specs/**`, `review.md`, `explore.md`, `tasks.md`.
|
|
17
|
+
3. **`approved-spec`**: Verifies that the spec commit is merged into target branch and matches declared `specSha`.
|
|
18
|
+
4. **`spec-tamper`**: Enforces that locked spec files (`proposal.md`, `specs/**`) are 100% unmodified in the Impl PR diff.
|
|
19
|
+
5. **`flow-state`**: Verifies status is `READY_FOR_IMPL` (stamped by `asdlc approve`).
|
|
20
|
+
5. **`tasks-complete`**: Confirms zero unchecked task boxes (`- [ ]`) in `tasks.md`.
|
|
21
|
+
6. **`test-presence`**: Enforces that any production code diff is accompanied by test diffs.
|
|
22
|
+
7. **`tdd-evidence`**: Confirms that completed tasks record verification commands and test execution outputs.
|
|
23
|
+
8. **`BDD + AC`**: Confirms all Acceptance Criteria test targets exist on disk and pass linting.
|
|
24
|
+
9. **`openspec-validate`**: Strict schema validation via OpenSpec CLI.
|
|
25
|
+
10. **`schema-managed`**: Validates BU-managed schema version pin and checks for forbidden local overrides.
|
|
26
|
+
11. **`external`**: Executes repository test suites and security scans in a scrubbed environment.
|
|
27
|
+
12. **`AI verification`**: Executes independent referee verifier against the full implementation diff.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Workflow Sequence
|
|
32
|
+
|
|
33
|
+
### Step 1: Run `asdlc verify`
|
|
34
|
+
Execute:
|
|
35
|
+
|
|
36
|
+
```powershell
|
|
37
|
+
asdlc verify <CHANGE_ID>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 2: Handle Verification Failures (If Failed)
|
|
41
|
+
If any check outputs `[FAIL]`:
|
|
42
|
+
- **`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
|
+
- **`test-presence`**: Source code was changed with zero test files. Guide the user: write corresponding unit/integration tests following TDD.
|
|
44
|
+
- **`tdd-evidence`**: Tasks were checked without test run output. Guide the user: paste test execution results under tasks in `tasks.md`.
|
|
45
|
+
- **`tasks-complete`**: Unchecked tasks remain. Guide the user to finish implementing remaining tasks.
|
|
46
|
+
- **`BDD + AC`**: An acceptance criterion points to a test file that does not exist. Create the missing test file.
|
|
47
|
+
- **`external` (unit tests)**: Run the failing test command, debug the failure, fix the code, and re-run.
|
|
48
|
+
|
|
49
|
+
### Step 3: Transition to Post-Merge Testing & Archive (If Passed)
|
|
50
|
+
When all checks output `[PASS]` and verify succeeds:
|
|
51
|
+
Inform the human developer:
|
|
52
|
+
> "🎉 Verification passed! All 12 gates satisfied.
|
|
53
|
+
> Complete any remaining post-merge integration testing and human stakeholder review.
|
|
54
|
+
> Once satisfied, explicitly close and finalize the change by running:
|
|
55
|
+
> `/asdlc:archive <CHANGE_ID>`"
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: batch-grill-me
|
|
3
|
+
description: "A relentless design-tree interview that asks every frontier question at once, round by round, with recommended defaults and non-blocking fact discovery."
|
|
4
|
+
aliases:
|
|
5
|
+
- grilling
|
|
6
|
+
- grill-me
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Batch Grilling — Relentless Design-Tree Interview (`batch-grill-me`)
|
|
10
|
+
|
|
11
|
+
This skill drives the **Grilling phase** (Stage 2) of the Agentic SDLC. It operates between `asdlc new "<requirement>"` and spec authoring (`proposal.md` / `specs/**`). It can also be invoked standalone via `/batch-grill-me` or `/grill-me` for any architectural design.
|
|
12
|
+
|
|
13
|
+
Interview the author relentlessly until you reach a shared understanding. Map the requirement as a **design tree**: every decision branches into the decisions that hang off it.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Core Protocol: The Decision Tree & The Frontier
|
|
18
|
+
|
|
19
|
+
1. **Work the tree in rounds.**
|
|
20
|
+
The **frontier** is every decision whose prerequisites are *already settled* — the questions you can ask *now* without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the author's answers before the next round.
|
|
21
|
+
|
|
22
|
+
2. **No Tree-Flattening (CRITICAL RULE).**
|
|
23
|
+
> **A question whose answer depends on another question still open in this round belongs to a *later* round, not this one.**
|
|
24
|
+
|
|
25
|
+
- Never ask child or grandchild questions whose parent decision is still open in the current round.
|
|
26
|
+
- If Question C1 asks *"Should we support internationalization (en + zh)?"*, you **CANNOT** ask *"Which fields should be translated?"* or *"What format should the message catalog use?"* in the same round! Those depend on C1 being answered.
|
|
27
|
+
- Asking child questions prematurely forces you to guess at parent answers, which leads directly to pseudo-questions and fake choices. Hold them for Round 2.
|
|
28
|
+
|
|
29
|
+
3. **Dynamic Tree Reshaping.**
|
|
30
|
+
Each round the author answers reshapes the tree — settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. Fact-Finding vs. Human Decisions
|
|
35
|
+
|
|
36
|
+
1. **Finding facts is your job, never the author's.**
|
|
37
|
+
When a frontier question needs a fact from the environment (filesystem, codebase AST, existing specs, `explore.md`, tools), look it up yourself — don't ask the author for anything you could look up yourself.
|
|
38
|
+
|
|
39
|
+
2. **Non-blocking fact exploration (Granular Facts).**
|
|
40
|
+
When finding a fact requires deeper investigation (a sub-agent or targeted research):
|
|
41
|
+
- **Do not block on it.** A running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the result.
|
|
42
|
+
- **Ask the rest of the frontier now.** All independent frontier branches are asked immediately without waiting for the fact exploration to complete.
|
|
43
|
+
- Once the fact is established, unblock the downstream branch and include it in the next round.
|
|
44
|
+
|
|
45
|
+
3. **External search failure degradation (Offline/Sandbox Safety).**
|
|
46
|
+
If an external doc or web search fails (network down, rate limited, sandbox timeout):
|
|
47
|
+
- Emit an advisory: `[WARN] External search failed (<reason>); proceeding with local codebase context only.`
|
|
48
|
+
- Record unverified assumptions in `clarifications.md` under `## Unverified External Assumptions`.
|
|
49
|
+
- **NEVER block or fail the interview**. Proceed with best-effort engineering judgment.
|
|
50
|
+
|
|
51
|
+
4. **Decisions belong to the author.**
|
|
52
|
+
Architectural trade-offs, scope boundaries, migration strategies, and error policies belong to the human author. Put each to them and wait.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 3. Question Formulation & Anti-Patterns
|
|
57
|
+
|
|
58
|
+
> [!CAUTION]
|
|
59
|
+
> **Strict Anti-Pattern Enforcement**:
|
|
60
|
+
|
|
61
|
+
1. **NO Pseudo-Questions / NO "Rec: yes"**:
|
|
62
|
+
- Every question on the frontier MUST offer $\ge 2$ distinct, mutually exclusive choices: **Option A vs Option B [vs Option C]**.
|
|
63
|
+
- **NEVER write a statement ending with `→ Rec: yes` or `→ Rec: agree`**.
|
|
64
|
+
- If you catch yourself writing `Rec: yes`, it is a red flag indicating:
|
|
65
|
+
- *Case 1*: You flattened a child question whose parent is still open. **Fix**: Delete it from this round; ask it in a later round once the parent is settled.
|
|
66
|
+
- *Case 2*: You stated an obvious implementation detail with no architectural trade-off. **Fix**: Do not ask the user; treat it as an engineering fact and implement it in the spec.
|
|
67
|
+
|
|
68
|
+
2. **No Over-Fragmentation of Implementation Details**:
|
|
69
|
+
- Group closely related technical facets into a single coherent architectural decision rather than five micro-questions.
|
|
70
|
+
- Ask about system seams, contracts, and migration paths — not variable names or code trivia.
|
|
71
|
+
|
|
72
|
+
3. **Small-Fix / Patch Heuristic**:
|
|
73
|
+
- For a small bugfix, typo, or minor patch, the entire frontier is **0 to 1 question maximum** (confirming root cause and regression test target). Do not subject minor fixes to architectural grilling.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 4. Pre-Flight Self-Check (Run Before Every Batch)
|
|
78
|
+
|
|
79
|
+
Before emitting a batch round to the author, verify these 3 conditions:
|
|
80
|
+
- [ ] **Dependency Check**: Does any question in this round depend on the answer to another question in this same round? (If YES: cut the dependent question; save it for the next round).
|
|
81
|
+
- [ ] **Real Options Check**: Does every question have distinct, mutually exclusive options (Option A vs Option B)? Are there any `Rec: yes` or rhetorical statements? (If YES: rewrite as real options or drop).
|
|
82
|
+
- [ ] **Fact Check**: Did I ask the author anything that could be looked up in the codebase or `explore.md`? (If YES: look it up; don't ask).
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 5. Batch Presentation Format
|
|
87
|
+
|
|
88
|
+
Format each round of the interview strictly as follows:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
### 🎯 Batch Decision Frontier (Round <N>)
|
|
92
|
+
|
|
93
|
+
Requirement: **"<requirement>"**
|
|
94
|
+
Active Frontier: <N> independent decisions ready for resolution.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
❓ **Q1** — **<Decision Title>**:
|
|
99
|
+
<Concise explanation of the architectural fork and trade-offs>
|
|
100
|
+
- **Option A**: <Description of Option A>
|
|
101
|
+
- **Option B**: <Description of Option B>
|
|
102
|
+
|
|
103
|
+
➡️ **Recommendation**: **Option A** — <Fact-backed rationale grounded in codebase/explore.md>
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
❓ **Q2** — **<Decision Title>**:
|
|
108
|
+
<Concise explanation of the architectural fork and trade-offs>
|
|
109
|
+
- **Option A**: <Description of Option A>
|
|
110
|
+
- **Option B**: <Description of Option B>
|
|
111
|
+
|
|
112
|
+
➡️ **Recommendation**: **Option B** — <Fact-backed rationale>
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
💡 *To proceed efficiently, reply **"Approve all recommendations"**, or specify adjustments (e.g. `Q1: B, Q2: accept`).*
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 6. Termination Gate & ASDLC Artifact Sync
|
|
122
|
+
|
|
123
|
+
The session is done when the **frontier is empty**:
|
|
124
|
+
1. Every branch of the design tree has been visited.
|
|
125
|
+
2. Nothing is left silently assumed.
|
|
126
|
+
3. **Do not act until the author confirms you have reached a shared understanding** (e.g. by approving recommendations or answering all questions).
|
|
127
|
+
4. Record all settled decisions in `openspec/changes/<SLUG>/clarifications.md`:
|
|
128
|
+
```markdown
|
|
129
|
+
## Settled decisions
|
|
130
|
+
|
|
131
|
+
- **<Decision 1 Title>**: <Chosen Option>
|
|
132
|
+
- *Rationale*: <Why this was chosen>
|
|
133
|
+
- **<Decision 2 Title>**: <Chosen Option>
|
|
134
|
+
- *Rationale*: <Why this was chosen>
|
|
135
|
+
```
|
|
136
|
+
5. Only after `clarifications.md` is settled may you transition to authoring `proposal.md` and `specs/**`.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grilling
|
|
3
|
+
description: "High-efficiency batch design-tree interview (batch-grill-me) for Stage 2 of Agentic SDLC. Asks every frontier question at once round by round with recommended defaults, dispatches non-blocking fact explorations, settles clarifications.md, and stops only when shared understanding is confirmed."
|
|
4
|
+
aliases:
|
|
5
|
+
- batch-grill-me
|
|
6
|
+
- grill-me
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Batch Grilling — Relentless Design-Tree Interview (`grilling`)
|
|
10
|
+
|
|
11
|
+
This skill drives the **Grilling phase** (Stage 2) of the Agentic SDLC. It operates between `asdlc new "<requirement>"` and spec authoring (`proposal.md` / `specs/**`). It can also be invoked standalone via `/batch-grill-me` or `/grill-me` for any architectural design.
|
|
12
|
+
|
|
13
|
+
Interview the author relentlessly until you reach a shared understanding. Map the requirement as a **design tree**: every decision branches into the decisions that hang off it.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Core Protocol: The Decision Tree & The Frontier
|
|
18
|
+
|
|
19
|
+
1. **Work the tree in rounds.**
|
|
20
|
+
The **frontier** is every decision whose prerequisites are *already settled* — the questions you can ask *now* without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the author's answers before the next round.
|
|
21
|
+
|
|
22
|
+
2. **No Tree-Flattening (CRITICAL RULE).**
|
|
23
|
+
> **A question whose answer depends on another question still open in this round belongs to a *later* round, not this one.**
|
|
24
|
+
|
|
25
|
+
- Never ask child or grandchild questions whose parent decision is still open in the current round.
|
|
26
|
+
- If Question C1 asks *"Should we support internationalization (en + zh)?"*, you **CANNOT** ask *"Which fields should be translated?"* or *"What format should the message catalog use?"* in the same round! Those depend on C1 being answered.
|
|
27
|
+
- Asking child questions prematurely forces you to guess at parent answers, which leads directly to pseudo-questions and fake choices. Hold them for Round 2.
|
|
28
|
+
|
|
29
|
+
3. **Dynamic Tree Reshaping.**
|
|
30
|
+
Each round the author answers reshapes the tree — settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 2. Fact-Finding vs. Human Decisions
|
|
35
|
+
|
|
36
|
+
1. **Finding facts is your job, never the author's.**
|
|
37
|
+
When a frontier question needs a fact from the environment (filesystem, codebase AST, existing specs, `explore.md`, tools), look it up yourself — don't ask the author for anything you could look up yourself.
|
|
38
|
+
|
|
39
|
+
2. **Non-blocking fact exploration (Granular Facts).**
|
|
40
|
+
When finding a fact requires deeper investigation (a sub-agent or targeted research):
|
|
41
|
+
- **Do not block on it.** A running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the result.
|
|
42
|
+
- **Ask the rest of the frontier now.** All independent frontier branches are asked immediately without waiting for the fact exploration to complete.
|
|
43
|
+
- Once the fact is established, unblock the downstream branch and include it in the next round.
|
|
44
|
+
|
|
45
|
+
3. **External search failure degradation (Offline/Sandbox Safety).**
|
|
46
|
+
If an external doc or web search fails (network down, rate limited, sandbox timeout):
|
|
47
|
+
- Emit an advisory: `[WARN] External search failed (<reason>); proceeding with local codebase context only.`
|
|
48
|
+
- Record unverified assumptions in `clarifications.md` under `## Unverified External Assumptions`.
|
|
49
|
+
- **NEVER block or fail the interview**. Proceed with best-effort engineering judgment.
|
|
50
|
+
|
|
51
|
+
4. **Decisions belong to the author.**
|
|
52
|
+
Architectural trade-offs, scope boundaries, migration strategies, and error policies belong to the human author. Put each to them and wait.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 3. Question Formulation & Anti-Patterns
|
|
57
|
+
|
|
58
|
+
> [!CAUTION]
|
|
59
|
+
> **Strict Anti-Pattern Enforcement**:
|
|
60
|
+
|
|
61
|
+
1. **NO Pseudo-Questions / NO "Rec: yes"**:
|
|
62
|
+
- Every question on the frontier MUST offer $\ge 2$ distinct, mutually exclusive choices: **Option A vs Option B [vs Option C]**.
|
|
63
|
+
- **NEVER write a statement ending with `→ Rec: yes` or `→ Rec: agree`**.
|
|
64
|
+
- If you catch yourself writing `Rec: yes`, it is a red flag indicating:
|
|
65
|
+
- *Case 1*: You flattened a child question whose parent is still open. **Fix**: Delete it from this round; ask it in a later round once the parent is settled.
|
|
66
|
+
- *Case 2*: You stated an obvious implementation detail with no architectural trade-off. **Fix**: Do not ask the user; treat it as an engineering fact and implement it in the spec.
|
|
67
|
+
|
|
68
|
+
2. **No Over-Fragmentation of Implementation Details**:
|
|
69
|
+
- Group closely related technical facets into a single coherent architectural decision rather than five micro-questions.
|
|
70
|
+
- Ask about system seams, contracts, and migration paths — not variable names or code trivia.
|
|
71
|
+
|
|
72
|
+
3. **Small-Fix / Patch Heuristic**:
|
|
73
|
+
- For a small bugfix, typo, or minor patch, the entire frontier is **0 to 1 question maximum** (confirming root cause and regression test target). Do not subject minor fixes to architectural grilling.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 4. Pre-Flight Self-Check (Run Before Every Batch)
|
|
78
|
+
|
|
79
|
+
Before emitting a batch round to the author, verify these 3 conditions:
|
|
80
|
+
- [ ] **Dependency Check**: Does any question in this round depend on the answer to another question in this same round? (If YES: cut the dependent question; save it for the next round).
|
|
81
|
+
- [ ] **Real Options Check**: Does every question have distinct, mutually exclusive options (Option A vs Option B)? Are there any `Rec: yes` or rhetorical statements? (If YES: rewrite as real options or drop).
|
|
82
|
+
- [ ] **Fact Check**: Did I ask the author anything that could be looked up in the codebase or `explore.md`? (If YES: look it up; don't ask).
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 5. Batch Presentation Format
|
|
87
|
+
|
|
88
|
+
Format each round of the interview strictly as follows:
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
### 🎯 Batch Decision Frontier (Round <N>)
|
|
92
|
+
|
|
93
|
+
Requirement: **"<requirement>"**
|
|
94
|
+
Active Frontier: <N> independent decisions ready for resolution.
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
❓ **Q1** — **<Decision Title>**:
|
|
99
|
+
<Concise explanation of the architectural fork and trade-offs>
|
|
100
|
+
- **Option A**: <Description of Option A>
|
|
101
|
+
- **Option B**: <Description of Option B>
|
|
102
|
+
|
|
103
|
+
➡️ **Recommendation**: **Option A** — <Fact-backed rationale grounded in codebase/explore.md>
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
❓ **Q2** — **<Decision Title>**:
|
|
108
|
+
<Concise explanation of the architectural fork and trade-offs>
|
|
109
|
+
- **Option A**: <Description of Option A>
|
|
110
|
+
- **Option B**: <Description of Option B>
|
|
111
|
+
|
|
112
|
+
➡️ **Recommendation**: **Option B** — <Fact-backed rationale>
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
💡 *To proceed efficiently, reply **"Approve all recommendations"**, or specify adjustments (e.g. `Q1: B, Q2: accept`).*
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 6. Termination Gate & ASDLC Artifact Sync
|
|
122
|
+
|
|
123
|
+
The session is done when the **frontier is empty**:
|
|
124
|
+
1. Every branch of the design tree has been visited.
|
|
125
|
+
2. Nothing is left silently assumed.
|
|
126
|
+
3. **Do not act until the author confirms you have reached a shared understanding** (e.g. by approving recommendations or answering all questions).
|
|
127
|
+
4. Record all settled decisions in `openspec/changes/<SLUG>/clarifications.md`:
|
|
128
|
+
```markdown
|
|
129
|
+
## Settled decisions
|
|
130
|
+
|
|
131
|
+
- **<Decision 1 Title>**: <Chosen Option>
|
|
132
|
+
- *Rationale*: <Why this was chosen>
|
|
133
|
+
- **<Decision 2 Title>**: <Chosen Option>
|
|
134
|
+
- *Rationale*: <Why this was chosen>
|
|
135
|
+
```
|
|
136
|
+
5. Only after `clarifications.md` is settled may you transition to authoring `proposal.md` and `specs/**`.
|
package/bin/asdlc.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akjamie/agentic-sdlc",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Enterprise Agentic SDLC governance CLI: a 7-stage spec-driven flow on top of OpenSpec + Graphify, enforced by CI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"asdlc": "bin/asdlc.js"
|
|
8
|
+
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./src/index.js"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"preferGlobal": true,
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/akjamie/agentic-sdlc.git"
|
|
19
|
+
},
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=20.19.0"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"bin",
|
|
25
|
+
"src",
|
|
26
|
+
"assets",
|
|
27
|
+
"README.md"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"test": "node --test",
|
|
31
|
+
"lint": "node --check bin/asdlc.js"
|
|
32
|
+
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"openspec",
|
|
35
|
+
"sdlc",
|
|
36
|
+
"spec-driven-development",
|
|
37
|
+
"agentic",
|
|
38
|
+
"governance"
|
|
39
|
+
],
|
|
40
|
+
"license": "MIT",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"commander": "^12.1.0",
|
|
43
|
+
"yaml": "^2.6.1"
|
|
44
|
+
}
|
|
45
|
+
}
|