@akjamie/agentic-sdlc 1.3.0 → 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.
Files changed (41) hide show
  1. package/README.md +48 -24
  2. package/assets/commands/asdlc-apply.md +24 -0
  3. package/assets/commands/asdlc-approve.md +21 -0
  4. package/assets/commands/asdlc-archive.md +21 -0
  5. package/assets/commands/asdlc-doctor.md +24 -0
  6. package/assets/commands/asdlc-lint.md +30 -0
  7. package/assets/commands/asdlc-new.md +29 -0
  8. package/assets/commands/asdlc-pr.md +25 -0
  9. package/assets/commands/asdlc-status.md +23 -0
  10. package/assets/commands/asdlc-test.md +20 -0
  11. package/assets/commands/asdlc-verify.md +29 -0
  12. package/assets/schema/risk-assessment.schema.json +2 -1
  13. package/assets/skills/asdlc-apply/SKILL.md +1 -1
  14. package/assets/skills/asdlc-approve/SKILL.md +1 -1
  15. package/assets/skills/asdlc-impl-review/SKILL.md +13 -11
  16. package/assets/skills/asdlc-new/SKILL.md +20 -3
  17. package/assets/skills/asdlc-spec-review/SKILL.md +8 -6
  18. package/package.json +1 -1
  19. package/src/assess/ai_judge.js +70 -33
  20. package/src/assess/decide.js +8 -6
  21. package/src/assess/index.js +13 -3
  22. package/src/assess/rules/builtin.js +6 -1
  23. package/src/assess/schema.js +6 -1
  24. package/src/assess/vectors/v1_intent.js +53 -8
  25. package/src/assess/vectors/v3_topology.js +97 -3
  26. package/src/cli.js +1 -1
  27. package/src/commands/apply.js +32 -3
  28. package/src/commands/doctor.js +32 -4
  29. package/src/commands/init.js +5 -55
  30. package/src/commands/lint.js +41 -4
  31. package/src/commands/new.js +23 -22
  32. package/src/commands/skills.js +7 -19
  33. package/src/commands/status.js +170 -9
  34. package/src/commands/test.js +31 -4
  35. package/src/commands/update.js +4 -3
  36. package/src/commands/verify.js +47 -20
  37. package/src/lib/graphify.js +67 -3
  38. package/src/lib/paths.js +1 -0
  39. package/src/lib/speclint.js +5 -3
  40. package/src/lib/tdd.js +6 -2
  41. package/src/lib/tools.js +313 -0
package/README.md CHANGED
@@ -15,24 +15,28 @@
15
15
 
16
16
  ---
17
17
 
18
- ## ⚡ The Dilemma: "Vibe Coding" vs. "Enterprise Bureaucracy"
18
+ ## ⚡ The AI Software Engineering Bottleneck Shift
19
19
 
20
- Autonomous AI coding agents (Claude Code, Cursor, OpenCode, Codex) are transforming software delivery. But engineering leads face a frustrating dilemma:
20
+ AI coding agents (Claude Code, Cursor, OpenCode, Codex) write hundreds of lines of code in seconds. However, as code generation cost approaches zero, the engineering bottleneck shifts to **three predictable modes of failure in real-world codebases**:
21
21
 
22
22
  ```
23
- UNGOVERNED "VIBE CODING" RIGID "ALWAYS TWO-PR" FRAMEWORKS
24
- (Chaos & Silent Drift) (Suffocating Bureaucracy)
25
- ┌───────────────────────────┐ ┌───────────────────────────┐
26
- │ 💥 Hallucinated contracts │ │ 🐌 2 PRs for a 1-line doc │
27
- │ 💥 Code shipped w/o tests │ VS │ 🐌 45-min review for typo │
28
- │ 💥 Agents rewrite specs │ │ 🐌 Dev velocity tanks │
29
- │ 💥 Self-grading exams │ │ 🐌 Agents circumvent tool │
30
- └───────────────────────────┘ └───────────────────────────┘
23
+ HOW AUTONOMOUS AI AGENTS DRIFT IN PRODUCTION
24
+ ┌───────────────────────────┐ ┌───────────────────────────┐ ┌───────────────────────────┐
25
+ │ 1. Guessing on Ambiguity │ │ 2. Reward-Hacking Exams │ │ 3. Review Fatigue Chaos │
26
+ ├───────────────────────────┤ ├───────────────────────────┤ ├───────────────────────────┤
27
+ │ Agents guess architecture │ │ When tests or edge cases │ │ Tech Leads are flooded │
28
+ │ and schema assumptions │ │ fail, agents weaken test │ │ with 500-line AI diffs │
29
+ │ silently across 15 files │ │ assertions or modify specs│ │ lacking verified intent, │
30
+ │ instead of clarifying. │ │ to force green builds. │ │ tests, or rationale. │
31
+ └───────────────────────────┘ └───────────────────────────┘ └───────────────────────────┘
31
32
  ```
32
33
 
34
+ > **Why prompts alone (`AGENTS.md`, `CLAUDE.md`) cannot fix this:**
35
+ > Prompts are **suggestions**, not gates. An autonomous agent under token pressure will prioritize getting code written over adherence to instructions. True governance requires **deterministic exit-coded gates and independent verification agents**.
36
+
33
37
  ### The Solution: Adaptive Dual-Track SDLC (`asdlc`)
34
38
 
35
- `agentic-sdlc` bridges this gap with an **Intelligent, Neuro-Symbolic Governance Plane**:
39
+ `agentic-sdlc` bridges this gap with an **Intelligent, Adaptive Governance Plane**:
36
40
  - 🚀 **Frictionless Agility for Routine Work (L0 / L1)**: Pure test additions, documentation updates, and bounded local refactors run in a streamlined **Single-PR** mode with automated validation and zero red tape.
37
41
  - 🛡️ **Ironclad Rigor for High-Impact Changes (L2 / L3)**: Cross-boundary APIs (Spring Boot, FastAPI, Go, NestJS), database schemas, security tokens, and constitutional rules enforce **Dual-PR Spec-First** contracts with human sign-off.
38
42
  - 🤝 **Humane In-Place Scope Escalation**: If scope unexpectedly expands during implementation, the system **never punishes the engineer** by ripping their Git branch apart. It maintains the single PR in-place, revokes auto-merge, and routes to a Tech Lead for human review.
@@ -41,7 +45,7 @@ Autonomous AI coding agents (Claude Code, Cursor, OpenCode, Codex) are transform
41
45
 
42
46
  ## 🧭 Adaptive Risk-Tiered Governance (L0–L3)
43
47
 
44
- Every change evaluated by `asdlc` is continuously assessed along its lifecycle across 5 orthogonal risk vectors (Intent, Architecture/API, Security/Data, AST Topology, and Test/Doc Semantics).
48
+ Every change evaluated by `asdlc` is continuously assessed along its lifecycle across core risk vectors (Task Intent, Security/Data Boundaries, and AST Topology/Architecture).
45
49
 
46
50
  ```mermaid
47
51
  flowchart TD
@@ -63,7 +67,7 @@ flowchart TD
63
67
  T_L2 --> DP1["Spec PR to main<br/>(asdlc pr spec)"]
64
68
  T_L3 --> DP1
65
69
  DP1 --> G_SPEC["CI Spec Review & Human TL Approval"]
66
- G_SPEC --> S_LOCK["approvedSha Cryptographic Lock<br/>(asdlc approve)"]
70
+ G_SPEC --> S_LOCK["approvedSha Git SHA Lock<br/>(asdlc approve)"]
67
71
  S_LOCK --> DP2["Implementation Unlocked<br/>(asdlc apply)"]
68
72
  DP2 --> DP3["Task-Level TDD Red-Green Loop<br/>(asdlc test)"]
69
73
  DP3 --> PR_IMPL["Implementation PR to main<br/>(Human Tech Lead Final Gate)"]
@@ -102,12 +106,12 @@ flowchart TD
102
106
 
103
107
  ## 🛡️ Non-Negotiable Engineering Invariants
104
108
 
105
- Enterprise teams rely on deterministic code, not agent compliance or prompt enthusiasm. Every invariant is backed by cryptographic proofs or exit-coded engines:
109
+ Enterprise teams rely on deterministic code, not agent compliance or prompt enthusiasm. Every invariant is backed by Git-anchored proofs, hash-chain integrity, or exit-coded engines:
106
110
 
107
111
  | # | Enterprise Invariant | How `asdlc` Enforces It | Failure Mode |
108
112
  | :-: | :--- | :--- | :--- |
109
113
  | **1** | **No Apply Before Spec Approval (L2/L3)** | `asdlc apply` physically inspects path-limited Git history for `approvedSha` on `main`. | 🚫 **Hard Refusal** — Zero production code allowed without an approved spec. |
110
- | **2** | **Cryptographic Anti-Tamper (`spec-tamper`)** | Implementation diffs must NOT modify locked spec files once approved on `main`. | 🚫 **Instant Rejection** — Agents cannot alter requirements to make failing tests pass. |
114
+ | **2** | **Git-Anchored Anti-Tamper (`spec-tamper`)** | Implementation diffs must NOT modify locked spec files once approved on `main`. | 🚫 **Instant Rejection** — Agents cannot alter requirements to make failing tests pass. |
111
115
  | **3** | **Anti-Gaming Hash Chain** | Every level transition is sealed in an append-only, SHA-256 hash-chained `risk-history.jsonl`. | 🚫 **Integrity Breach** — Manual downgrades (`L2 -> L1`) are detected and blocked. |
112
116
  | **4** | **AI Classifier Invariant Defense** | AI semantic classifier output is validated against hard mathematical expectations. | 🚫 **Evasion Shield** — Prompts claiming a `DROP TABLE` is "just a test" are vetoed to L3. |
113
117
  | **5** | **Zero Untested Code (`test-presence`)** | Any change touching production source code (`src/**`, `app/**`) requires test diffs. | 🚫 **Rejection** — Stops AI "code dumps" without corresponding test coverage. |
@@ -140,7 +144,7 @@ Enterprise teams rely on deterministic code, not agent compliance or prompt enth
140
144
  │ ├─ assess/ Neuro-symbolic risk evaluation & hash-chain history │
141
145
  │ ├─ speclint/ R0–R8 BDD/AC linting & scenario coverage traceability │
142
146
  │ ├─ graphify/ Knowledge graph & code AST topology discovery │
143
- │ └─ verify/ 12 cryptographic & structural quality gates │
147
+ │ └─ verify/ 12 deterministic & structural quality gates │
144
148
  └────────────────────────────────────────────────────────────────────────┘
145
149
  ```
146
150
 
@@ -148,6 +152,9 @@ Enterprise teams rely on deterministic code, not agent compliance or prompt enth
148
152
 
149
153
  ## 🚀 Quickstart: 5-Minute Walkthrough
150
154
 
155
+ > 🧭 **New to Agentic SDLC?**
156
+ > Follow our hands-on [**30-Minute Getting Started Guide (docs/getting-started.md)**](docs/getting-started.md) for a step-by-step walkthrough with copy-paste examples, AI grilling guidance, and expected CLI outputs from zero install to your first verified Spec PR!
157
+
151
158
  ### 1. Installation
152
159
 
153
160
  ```bash
@@ -217,11 +224,11 @@ asdlc pr user-auth main
217
224
  | [`asdlc-new`](assets/skills/asdlc-new/SKILL.md) | Scaffolds change, queries AST hubs, runs conversational anti-fatigue `grill-me`. |
218
225
  | [`asdlc-lint`](assets/skills/asdlc-lint/SKILL.md) | Enforces deterministic BDD GIVEN/WHEN/THEN and R5 scenario-to-AC coverage. |
219
226
  | [`asdlc-pr`](assets/skills/asdlc-pr/SKILL.md) | Smart PR dispatcher: automatically handles Spec PR vs. Implementation PR. |
220
- | [`asdlc-approve`](assets/skills/asdlc-approve/SKILL.md) | Stamps cryptographic `specSha` lock upon Spec PR merge. |
227
+ | [`asdlc-approve`](assets/skills/asdlc-approve/SKILL.md) | Stamps Git `specSha` lock upon Spec PR merge. |
221
228
  | [`asdlc-apply`](assets/skills/asdlc-apply/SKILL.md) | Strict task-level TDD engine (`Red -> Green -> Refactor -> Evidence -> Converge`). |
222
229
  | [`asdlc-verify`](assets/skills/asdlc-verify/SKILL.md) | Pre-flight audit across 12 gates (test presence, evidence, tamper guard, schema). |
223
- | [`asdlc-spec-review`](assets/skills/asdlc-spec-review/SKILL.md) | CI-triggered 6-dimensional spec review before human lead approval. |
224
- | [`asdlc-impl-review`](assets/skills/asdlc-impl-review/SKILL.md) | CI-triggered Player ≠ Referee implementation reviewer with Anthropic convergence rules. |
230
+ | [`asdlc-spec-review`](assets/skills/asdlc-spec-review/SKILL.md) | Independent review agent: 6-dimensional spec review before human lead approval. |
231
+ | [`asdlc-impl-review`](assets/skills/asdlc-impl-review/SKILL.md) | Independent review agent: Player ≠ Referee verification with test execution and Anthropic convergence rules. |
225
232
  | [`asdlc-archive`](assets/skills/asdlc-archive/SKILL.md) | Syncs specs to living catalog, refreshes AST graph, and updates system status. |
226
233
  | [`asdlc-doctor`](assets/skills/asdlc-doctor/SKILL.md) | 12-invariant diagnostic engine with 1-click automated remediation (`--fix`). |
227
234
  | [`asdlc-status`](assets/skills/asdlc-status/SKILL.md) | Real-time change lifecycle dashboard and next actionable command guidance. |
@@ -236,7 +243,7 @@ Every implementation diff must pass the 12 deterministic gates in `asdlc verify`
236
243
  flowchart TD
237
244
  V["<b>asdlc verify &lt;ID&gt;</b><br/>Deterministic Implementation Gatekeeper"]
238
245
 
239
- subgraph TIER1 ["Tier 1 · Cryptographic & Contract Integrity"]
246
+ subgraph TIER1 ["Tier 1 · Contract & Hash-Chain Integrity"]
240
247
  G_APPROVED["<b>approved-spec</b><br/>Matches commit on main"]
241
248
  G_TAMPER["<b>spec-tamper</b><br/>Zero spec modifications in Impl PR"]
242
249
  G_LEVEL["<b>level-integrity</b><br/>Hash-chain tamper check"]
@@ -277,7 +284,7 @@ flowchart TD
277
284
  ```bash
278
285
  asdlc init [--ci jenkins|github] # Scaffold repository with OpenSpec, Graphify, and skills
279
286
  asdlc new "<intent>" # Scaffold change with AST explore + grill-me interview
280
- asdlc lint <ID> # Validate BDD scenarios, AC rules, and coverage
287
+ asdlc lint <ID> # Validate BDD scenarios, AC rules, and coverage (docs/spec-format.md)
281
288
  asdlc pr <ID> <target-branch> # Smart PR creator (auto-handles Spec PR vs Impl PR)
282
289
  asdlc approve <ID> # Record approvedSha and transition to ready_for_impl
283
290
  asdlc apply <ID> # Guarded implementation launcher (checks approvedSha)
@@ -309,13 +316,30 @@ node --test test/simulation.test.js
309
316
 
310
317
  ---
311
318
 
319
+ ## 📚 Documentation Center
320
+
321
+ Explore the complete documentation in the [`docs/`](docs/) directory:
322
+
323
+ - ⏱️ [**30-Minute Getting Started Guide**](docs/getting-started.md): Frictionless step-by-step tutorial from install to first Spec PR.
324
+ - 📐 [**Spec Format & Lint Reference**](docs/spec-format.md): Human-readable guide to R0–R8 lint rules with pass/fail examples.
325
+ - 🌐 [**Quickstart Guide (Bilingual)**](docs/quickstart.md): End-to-end walkthrough covering the complete 7-stage lifecycle.
326
+ - 🏛️ [**System Architecture & Whitepaper**](docs/about.md): Why Agentic SDLC, L0–L3 governance, and Git SHA anti-tamper locks.
327
+ - 🩺 [**Environment Doctor Manual**](docs/doctor.md): Diagnostic reference for all 12 health checks and `--fix` automated healing.
328
+ - ⌨️ [**CLI Command Reference**](docs/usage.md): Full flag, option, and exit code reference for all `asdlc` commands.
329
+ - 📖 [**Standard Glossary**](docs/glossary.md): Authoritative lexicon for living specs, spec SHAs, and architectural god nodes.
330
+
331
+ ---
332
+
312
333
  ## 🤝 Community & Contributing
313
-
334
+
314
335
  We welcome contributions from developers, architects, and researchers advancing the state of Agentic Software Engineering!
315
-
336
+
316
337
  - **Contributing Guide**: Check out [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, development conventions, and PR expectations.
338
+ - **Specification & Linting Reference**: Read [docs/spec-format.md](docs/spec-format.md) for R0–R8 pass/fail examples, BDD rules, and troubleshooting remedies.
339
+ - **IDE Slash-Command Parity**: First-class slash commands (`/asdlc-*`) across Claude Code, OpenCode, Pi, Antigravity, GitHub Copilot, Cursor, Trae, and Windsurf (see [docs/usage.md](docs/usage.md)).
317
340
  - **Architectural Specs**: Read [docs/architecture.md](docs/architecture.md) for deep dives on the 3-plane model.
318
- - **Enterprise Blueprint**: Browse [docs/blueprint.html](docs/blueprint.html) (or [Chinese version](docs/blueprint.zh.html)) for enterprise deployment patterns.
341
+ - **Enterprise Blueprint**: Browse [docs/blueprint.md](docs/blueprint.md) (or [Chinese version](docs/blueprint.zh.md)) for enterprise deployment patterns.
342
+ - **Documentation Index**: See [docs/README.md](docs/README.md) for the active documentation catalog.
319
343
 
320
344
  ---
321
345
 
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: asdlc-apply
3
+ description: "Stage 5: Guarded task-level TDD implementation loop"
4
+ ---
5
+
6
+ # /asdlc-apply - Guarded Implementation Launcher
7
+
8
+ Launch task-level Test-Driven Development (TDD) loop from `tasks.md`.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc apply <CHANGE_ID> [--auto-pr] [--target-branch <branch>]
14
+ ```
15
+
16
+ ## Behavior
17
+
18
+ 1. **Approval Guard**: Enforces that the spec has been approved and `approvedSha` is locked (or L0/L1 single-PR mode).
19
+ 2. **Task-Level TDD Loop**:
20
+ - RED: Author failing unit/integration tests mapped to requirement ACs.
21
+ - GREEN: Implement minimal production code to pass the tests.
22
+ - REFACTOR: Clean code structure without altering behavior.
23
+ - EVIDENCE: Record passing test evidence.
24
+ 3. **Anti-Hallucination & Anti-Drift Guard**: Prevents modifying locked specification paths during code implementation.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: asdlc-approve
3
+ description: "Stage 4: Lock approvedSha and transition change to READY_FOR_IMPL"
4
+ ---
5
+
6
+ # /asdlc-approve - Approve Spec & Git SHA Lock
7
+
8
+ Lock the approved specification state and unlock implementation for the change.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc approve <CHANGE_ID>
14
+ ```
15
+
16
+ ## Behavior
17
+
18
+ 1. Evaluates human lead approval (or PR merge commit on target branch).
19
+ 2. Computes and locks the Git-anchored `approvedSha` snapshot for the spec files.
20
+ 3. Stamps `review.md` with `verdict: APPROVE` and `specSha`.
21
+ 4. Transitions change state to `READY_FOR_IMPL`.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: asdlc-archive
3
+ description: "Stage 7: Sync spec deltas to living specs, archive change directory, and refresh codebase graph"
4
+ ---
5
+
6
+ # /asdlc-archive - Sync & Archive Verified Change
7
+
8
+ Archive a verified change after implementation PR merge.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc archive <CHANGE_ID>
14
+ ```
15
+
16
+ ## Behavior
17
+
18
+ 1. Merges spec deltas into canonical `openspec/specs/` living specifications.
19
+ 2. Moves change directory to `openspec/changes/archive/<slug>/`.
20
+ 3. Rebuilds Graphify AST knowledge graph.
21
+ 4. Refreshes `AGENTS.md` system status.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: asdlc-doctor
3
+ description: "Diagnose repository health, toolchain integrity, and per-tool skill/command status"
4
+ ---
5
+
6
+ # /asdlc-doctor - Diagnostic Health Check
7
+
8
+ Verify environment, toolchain health, git hooks, managed schema integrity, and IDE agent tool readiness.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc doctor [--fix] [--global]
14
+ ```
15
+
16
+ ## Checks Performed
17
+
18
+ 1. Node version compatibility (`>= 20.19.0`).
19
+ 2. Pinned OpenSpec version availability.
20
+ 3. Graphify AST toolchain availability.
21
+ 4. Managed schema installation and absence of committed overrides.
22
+ 5. Repository configuration and `.githooks` integration.
23
+ 6. `AGENTS.md` routing table and system status freshness.
24
+ 7. Per-tool skill and slash command parity across detected IDE tools (Claude, OpenCode, Pi, Antigravity, GitHub Copilot, Cursor, etc.).
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: asdlc-lint
3
+ description: "Stage 3: Deterministic spec lint gate (R0-R8 BDD rules, scenario coverage, and test mappings)"
4
+ ---
5
+
6
+ # /asdlc-lint - Deterministic Spec Quality Gate
7
+
8
+ Verify that the active specification meets enterprise BDD, traceability, and review standards before creating a Pull Request.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc lint <CHANGE_ID> [--json]
14
+ ```
15
+
16
+ ## Checks Performed
17
+
18
+ 1. **Artifact Completeness**: `proposal.md`, `specs/**/*.md`, and `design.md` (for UI/external API changes).
19
+ 2. **Deterministic Rules (R0–R8)**:
20
+ - `R0-no-requirements`: Explicit requirement headers.
21
+ - `R1-purpose`: Capability purpose length >= 50 characters.
22
+ - `R2-normative`: RFC-2119 `SHALL` / `MUST` invariant statements.
23
+ - `R3-scenario`: Concrete observable BDD scenarios.
24
+ - `R4-when / R4-then / R4-given`: Bold Gherkin clauses.
25
+ - `R5-ac & R5-scenario-coverage`: Traceable checkboxes covering all scenarios (`count(ACs) >= count(Scenarios)`).
26
+ - `R6-ac-test`: Every AC maps to a test file (`(test: <path>)`).
27
+ - `R7-test-strategy`: Multi-tiered test pyramid section.
28
+ - `R8-removed-reason`: Explicit rationale for deprecations / removals.
29
+
30
+ See `docs/spec-format.md` for worked pass/fail examples and 1-minute remedies.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: asdlc-new
3
+ description: "Stage 1/2: Start a new spec-driven change: ground in codebase graph, run grill-me, author proposal and specs"
4
+ ---
5
+
6
+ # /asdlc-new - Start a New Spec-Driven Change
7
+
8
+ Start a new spec-driven change in the repository using the Agentic SDLC workflow.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc new "<requirement>" [--batch-grill] [--no-grill]
14
+ ```
15
+
16
+ ## Workflow Sequence
17
+
18
+ 1. **Scaffold Change & Ground in Graph**:
19
+ - Derives a clean kebab-case change slug from intent or ticket ID.
20
+ - Refreshes the Graphify AST knowledge graph and generates `explore.md`.
21
+ - Seeds `clarifications.md` and `proposal.md`.
22
+ 2. **High-Signal Grilling Interview (Stage 2)**:
23
+ - Settle architectural decisions and trade-offs in `clarifications.md`.
24
+ - Stop questioning as soon as the author reaches consensus or forks hit zero.
25
+ 3. **Specification Delta Authoring**:
26
+ - Author capability spec deltas under `specs/<capability>/spec.md` with RFC-2119 BDD requirements.
27
+ - If UI or external APIs are involved, author `design.md`.
28
+ 4. **Pre-flight Lint**:
29
+ - Run `asdlc lint <CHANGE_ID>` to verify that all BDD rules (R0–R8) pass with 0 blockers.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: asdlc-pr
3
+ description: "Stage 3.5: Open a Spec or Implementation PR with automated title, body, and governance labels"
4
+ ---
5
+
6
+ # /asdlc-pr - Open Spec or Implementation Pull Request
7
+
8
+ Push your branch and automatically create a Pull Request with governance labels on GitHub or GitLab.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc pr <CHANGE_ID> <target-branch>
14
+ ```
15
+
16
+ ## Behavior
17
+
18
+ 1. **Pre-flight Gate Audit**:
19
+ - For Spec PRs: runs `asdlc lint` (must pass with 0 blockers).
20
+ - For Implementation PRs: runs `asdlc verify` (must pass all quality gates).
21
+ 2. **Git Push**: Automatically pushes `spec/<CHANGE_ID>` or implementation branch to origin.
22
+ 3. **PR Metadata Extraction**: Automatically populates Title and Description from `proposal.md`.
23
+ 4. **Governance Labels**:
24
+ - Spec PR -> `asdlc:spec-review` (triggers automated CI AI Spec Review).
25
+ - Impl PR -> `asdlc:impl-review` (triggers automated CI AI Impl Review).
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: asdlc-status
3
+ description: "Show lifecycle state, active artifacts, next actionable command, or portfolio overview"
4
+ ---
5
+
6
+ # /asdlc-status - Change & Portfolio Status Overview
7
+
8
+ Inspect the active change state or get an overview of all in-flight changes across the repository.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ # Portfolio overview (lists all active changes in flight)
14
+ asdlc status [--json]
15
+
16
+ # Single change status
17
+ asdlc status <CHANGE_ID> [--json]
18
+ ```
19
+
20
+ ## Output
21
+
22
+ - In portfolio mode: outputs compact single-line table with `CHANGE`, `LEVEL`, `STAGE`, and `NEXT COMMAND` (strictly excludes archived changes).
23
+ - In single-change mode: outputs completed artifacts, stage progression, and next exact command.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: asdlc-test
3
+ description: "Stage 5.5: Execute real test runners mapped to Acceptance Criteria annotations"
4
+ ---
5
+
6
+ # /asdlc-test - Run Mapped Acceptance Criteria Tests
7
+
8
+ Execute project test suites referenced by spec acceptance criteria lines `(test: <path>)`.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc test <CHANGE_ID> [--json]
14
+ ```
15
+
16
+ ## Behavior
17
+
18
+ 1. Parses all `(test: <path>)` annotations across the change's capability specs.
19
+ 2. Resolves test runners (e.g. Node `--test`, Jest, Pytest, Go test, Cargo test).
20
+ 3. Executes target test files and reports individual test execution status.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: asdlc-verify
3
+ description: "Stage 6: Verify implementation against all 12 enterprise quality gates"
4
+ ---
5
+
6
+ # /asdlc-verify - Enterprise Quality Gates Audit
7
+
8
+ Audit the implementation diff against all 12 deterministic quality gates before merging to main.
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ asdlc verify <CHANGE_ID> [--repo <name>] [--json]
14
+ ```
15
+
16
+ ## The 12 Quality Gates
17
+
18
+ 1. `level-integrity`: Validates declared risk level matches change topology.
19
+ 2. `pr-type`: Classifies PR type (normal vs. spec vs. impl).
20
+ 3. `artifacts`: Ensures proposal, tasks, and spec deltas are present.
21
+ 4. `approved-spec`: Verifies spec PR was approved on protected branch.
22
+ 5. `spec-tamper`: Enforces that locked spec files were not modified during implementation.
23
+ 6. `flow-state`: Validates `READY_FOR_IMPL` transition.
24
+ 7. `risk-escape`: Detects unannounced API/DDL escalations.
25
+ 8. `human-gate`: Validates mandatory Tech Lead approval for L2/L3 changes.
26
+ 9. `tasks-complete`: Verifies all tasks in `tasks.md` are checked off.
27
+ 10. `test-presence`: Enforces that source code changes are paired with test changes.
28
+ 11. `tdd-evidence`: Verifies red-green-refactor execution log.
29
+ 12. `BDD + acceptance criteria`: Deterministic R0–R8 quality lint clean.
@@ -199,6 +199,7 @@
199
199
  "properties": {
200
200
  "level": { "type": "string", "enum": ["L0", "L1", "L2", "L3"] },
201
201
  "confidence": { "type": "string", "enum": ["high", "medium", "low"] },
202
+ "evaluator_mode": { "type": "string", "enum": ["agent_native", "llm_classifier", "heuristic_seed"] },
202
203
  "evidence": {
203
204
  "type": "array",
204
205
  "items": {
@@ -207,7 +208,7 @@
207
208
  "additionalProperties": false,
208
209
  "properties": {
209
210
  "id": { "type": "string" },
210
- "kind": { "type": "string", "enum": ["repository_fact", "task_statement", "scanner_result", "rule_hit", "reviewer_finding"] },
211
+ "kind": { "type": "string", "enum": ["repository_fact", "task_statement", "scanner_result", "rule_hit", "reviewer_finding", "semantic_intent", "topology_centrality"] },
211
212
  "signal": { "type": "string", "enum": ["hard", "soft"] },
212
213
  "summary": { "type": "string" },
213
214
  "source": { "type": "string" },
@@ -25,7 +25,7 @@ Before editing any implementation or test code, run the apply guard:
25
25
  asdlc apply <CHANGE_ID> [--auto-pr] [--target-branch <ref>]
26
26
  ```
27
27
 
28
- `asdlc apply` deterministically verifies cryptographic preconditions:
28
+ `asdlc apply` deterministically verifies Git-anchored preconditions:
29
29
  1. **Target Branch Approved Commit (`approvedSha`)**: Confirms that a commit touching the locked paths (`proposal.md` and `specs/**`) is physically merged into the target branch (`main` or `origin/main`).
30
30
  2. **Change State Machine (`ready_for_impl`)**: Confirms `.openspec.yaml` has been transitioned to `status: ready_for_impl` (via `asdlc approve <ID>`).
31
31
  3. **Spec Fingerprint Integrity (`specSha`)**: Verifies that the declared `specSha` in `.openspec.yaml` exactly matches the `approvedSha` on the protected branch.
@@ -13,7 +13,7 @@ This skill executes **Stage 4 (Approve)** of the Agentic SDLC. It transitions a
13
13
 
14
14
  `asdlc approve` is **branch-agnostic**. It does not enforce a rigid branching dogma, nor does it require selecting artificial "modes".
15
15
 
16
- In enterprise environments (whether using `feature -> staging -> main`, trunk-based, or multi-level git flow), **Approve** represents a single cryptographic gate:
16
+ In enterprise environments (whether using `feature -> staging -> main`, trunk-based, or multi-level git flow), **Approve** represents a single Git-anchored tamper-detection gate:
17
17
 
18
18
  ```text
19
19
  [Stage 2: Grilling / Proposal]
@@ -6,10 +6,10 @@ aliases:
6
6
  - code-review-asdlc
7
7
  ---
8
8
 
9
- # /asdlc:impl-review — CI-Triggered Independent Implementation Reviewer
9
+ # /asdlc:impl-review — Independent Implementation Review Agent
10
10
 
11
- This skill executes **independent AI implementation review**, triggered by CI when a PR carries the `asdlc:impl-review` label.
12
- It posts its findings as a **markdown PR comment** via the GitHub API so the human lead sees them inline on the PR.
11
+ This skill executes **independent AI implementation review**, executed by an independent reviewer agent (either triggered on PR or invoked locally on a change ID).
12
+ It evaluates the code against approved specifications, test evidence, and production safety.
13
13
 
14
14
  It applies the **Player ≠ Referee** principle: the reviewing agent MUST NOT be the agent that authored the implementation.
15
15
 
@@ -19,21 +19,23 @@ Drawing from Anthropic's engineering practices for scaling AI code reviews, this
19
19
  1. **Convergence Protocol**: Review loops must converge, not thrash. Capped at **3 rounds** max; re-reviews inspect **incremental diffs only**.
20
20
  2. **Defect Attribution**: Clearly separates defects introduced by this PR (`[Blocker: Introduced]`) from pre-existing legacy issues (`[Tech Debt: Pre-existing]`). Pre-existing flaws **never block** the PR.
21
21
  3. **Repository Contract (`REVIEW.md`)**: Respects repository-defined domain rules, failure modes, and ignore paths from the trusted base branch over generic AI opinions.
22
- 4. **Risk-Based Tiering**: Scrutiny scales with the change's risk profile (Tier 1 Docs/Style, Tier 2 Standard, Tier 3 Critical/Auth/Billing). Highest-risk file sets the PR tier.
23
- 5. **Class-of-Bug Grouping**: Defect patterns are grouped into singular findings rather than fragmented into line-by-line spam.
24
- 6. **Structural & Actionable Findings**: Every finding provides explicit Location, Defect, Impact, and Action Required for instant clarity to both AI agents and human leads.
22
+ 4. **Mandatory Acceptance Test Verification (`asdlc test`)**: Reviewer mandates that `asdlc test <CHANGE_ID>` has executed and all mapped AC assertions pass before issuing approval.
23
+ 5. **Risk-Based Tiering**: Scrutiny scales with the change's risk profile (Tier 1 Docs/Style, Tier 2 Standard, Tier 3 Critical/Auth/Billing). Highest-risk file sets the PR tier.
24
+ 6. **Class-of-Bug Grouping**: Defect patterns are grouped into singular findings rather than fragmented into line-by-line spam.
25
+ 7. **Structural & Actionable Findings**: Every finding provides explicit Location, Defect, Impact, and Action Required for instant clarity to both AI agents and human leads.
25
26
 
26
27
  > [!IMPORTANT]
27
28
  > **Scope**: Reviews *implementation conformance and code quality* — spec adherence, test rigor, architecture, and production safety.
28
- > Requires `asdlc verify <CHANGE_ID>` to have passed (12 gates) before this review is meaningful.
29
- > Does NOT re-run `asdlc verify`. Does NOT review spec intent — that is `asdlc-spec-review`.
30
- > Output is a **PR comment**, not a local file.
29
+ > Requires `asdlc test <CHANGE_ID>` and `asdlc verify <CHANGE_ID>` to have passed before this review can issue an APPROVE verdict.
30
+ > Does NOT review spec intent — that is `asdlc-spec-review`.
31
31
 
32
32
  ---
33
33
 
34
- ## Trigger
34
+ ## Invocation & Triggers
35
35
 
36
- This skill is invoked by CI when a PR is labeled `asdlc:impl-review`. The typical invocation in a GitHub Actions workflow or Jenkinsfile:
36
+ This skill can be invoked:
37
+ 1. **Locally by an independent agent**: `/asdlc:impl-review <CHANGE_ID>`
38
+ 2. **Automatically on PRs** carrying the `asdlc:impl-review` label via PR automation workflows:
37
39
 
38
40
  ```yaml
39
41
  # GitHub Actions example
@@ -11,8 +11,22 @@ This skill executes **Stage 2 (New)** of the Agentic SDLC. It transforms a natur
11
11
 
12
12
  ## Workflow Sequence
13
13
 
14
+ ### Step 0: Input Grounding & Ticket Resolution (Anti-Hallucination Guard)
15
+ When the user invokes `/asdlc:new` or provides a task, check if it references a ticket ID or link (e.g. Jira key `PROJ-123`, Jira URL, GitHub Issue `#42`, or internal company tracker link):
16
+
17
+ 1. **Attempt Tool/Skill Resolution**:
18
+ - If you have an applicable skill, MCP tool, or CLI available (e.g. Jira skill, GitHub MCP, `gh issue view`), use it to retrieve the ticket title, description, and acceptance criteria.
19
+ 2. **Handle Inaccessible / Unresolvable Tickets (Mandatory Pause)**:
20
+ - If the ticket link or ID cannot be read or accessed (e.g. no integration tool installed, unauthorized/VPN required, 404 not found, or network error):
21
+ - 🛑 **PAUSE IMMEDIATELY**: Do NOT proceed to scaffold or write specs.
22
+ - ❌ **DO NOT GUESS OR INVENT REQUIREMENTS**: Hallucinating specifications without verified ground truth is strictly prohibited.
23
+ - ❓ **ASK THE USER DIRECTLY**: Halt and prompt the user:
24
+ > *"I see you referenced ticket/link `<ID/URL>`, but I'm unable to access your issue tracker directly. To ensure the specifications are trustworthy and accurate, could you please paste the ticket title, description, and any acceptance criteria here?"*
25
+ 3. **Proceed with Grounded Context**:
26
+ - Once the user supplies the ticket details or confirms the requirement in plain language, proceed to Step 1 using that grounded requirement text. (If ticket acceptance criteria were retrieved or pasted, carry them forward into `clarifications.md` in Step 3).
27
+
14
28
  ### Step 1: Scaffold Change & Refresh Graph
15
- When the user invokes `/asdlc:new "<requirement>"`:
29
+ When the grounded requirement is established:
16
30
 
17
31
  ```powershell
18
32
  asdlc new "<requirement>" [--batch-grill] [--no-grill]
@@ -26,7 +40,10 @@ The CLI:
26
40
  - **Default (conversational)**: Runs high-signal, recommendation-led `grill-me` (1 material decision at a time).
27
41
  - **`--batch-grill`**: Evaluates the entire design tree and presents the active frontier in structured batches.
28
42
  - **`--no-grill`**: Bypasses interactive grilling for self-evident fixes and pre-aligned tasks.
29
- 5. **Technical Design Auto-Detection**: If the requirement touches UI/UX, frontend, APIs, services, databases, or architecture (or if `--design` is passed), seeds `design.md` with enterprise-grade technical design scaffolding.
43
+ 5. **Agent-Native Semantic Grounding**:
44
+ - As an AI agent in an active reasoning session, evaluate the true architectural and security intent of the requirement.
45
+ - If the requirement touches APIs, schemas, or destructive operations, record your agent evaluation into `openspec/changes/<SLUG>/.agent-assess.json` (e.g. `{"classification":"api_contract","rationale":"..."}`). The governance engine reads this alongside Graphify AST hubs to enforce accurate risk tiers without developer gaming.
46
+ 6. **Technical Design Auto-Detection**: If the requirement touches UI/UX, frontend, APIs, services, databases, or architecture (or if `--design` is passed), seeds `design.md` with enterprise-grade technical design scaffolding.
30
47
 
31
48
  > [!IMPORTANT]
32
49
  > **NO PAUSE / CONTINUOUS EXECUTION**: Do NOT stop after `asdlc new` to ask the author "Should I start grilling?".
@@ -117,7 +134,7 @@ Once `## Open questions` in `clarifications.md` is empty, author the change docu
117
134
  4. **Review Provenance (Player $\ne$ Referee)**:
118
135
  - The authoring agent MUST NOT approve its own spec.
119
136
  - Do NOT stamp `review.md` with self-approval.
120
- - Independent AI review (`asdlc:spec-review`) is executed automatically on the Spec PR by CI.
137
+ - Independent AI review (`asdlc:spec-review`) is executed by an independent review agent (locally or via PR automation).
121
138
  - Formal approval is given by the human lead via PR merge or `asdlc approve <SLUG>`.
122
139
 
123
140
  ### Step 5: Transition to Lint
@@ -5,10 +5,10 @@ aliases:
5
5
  - spec-review
6
6
  ---
7
7
 
8
- # /asdlc:spec-review — CI-Triggered Independent Spec Reviewer
8
+ # /asdlc:spec-review — Independent Spec Review Agent
9
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.
10
+ This skill executes **independent AI spec review**, executed by an independent reviewer agent (either triggered on PR or invoked locally on a change ID).
11
+ It evaluates the specification and provides clear review findings so the human Tech Lead can make informed approval decisions.
12
12
 
13
13
  It applies the **Player ≠ Referee** principle: the reviewing agent MUST NOT be the agent that authored the spec.
14
14
 
@@ -16,13 +16,15 @@ It applies the **Player ≠ Referee** principle: the reviewing agent MUST NOT be
16
16
  > **Scope**: Reviews *intent* — BDD quality, logical consistency, architectural soundness, AC testability.
17
17
  > Does NOT re-run `asdlc lint` (deterministic structural checks are already gated by `asdlc pr`).
18
18
  > Does NOT review implementation code — that is `asdlc-impl-review`.
19
- > Output is a **PR comment**, not a local file.
19
+ > Output can be posted as a PR comment or reported locally.
20
20
 
21
21
  ---
22
22
 
23
- ## Trigger
23
+ ## Invocation & Triggers
24
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:
25
+ This skill can be invoked:
26
+ 1. **Locally by an independent agent**: `/asdlc:spec-review <CHANGE_ID>`
27
+ 2. **Automatically on PRs** carrying the `asdlc:spec-review` label via PR automation workflows:
26
28
 
27
29
  ```yaml
28
30
  # GitHub Actions example
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akjamie/agentic-sdlc",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Enterprise Agentic SDLC governance CLI: a 7-stage spec-driven flow on top of OpenSpec + Graphify, enforced by CI.",
5
5
  "type": "module",
6
6
  "bin": {