@akjamie/agentic-sdlc 1.1.0 → 1.3.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 (40) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +264 -154
  3. package/assets/schema/risk-assessment.schema.json +225 -0
  4. package/assets/schema/templates/design.md +94 -31
  5. package/assets/skills/api-design/SKILL.md +204 -0
  6. package/assets/skills/asdlc-apply/SKILL.md +43 -18
  7. package/assets/skills/asdlc-impl-review/SKILL.md +153 -47
  8. package/assets/skills/asdlc-new/SKILL.md +42 -24
  9. package/assets/skills/asdlc-verify/SKILL.md +16 -6
  10. package/assets/skills/batch-grill-me/SKILL.md +11 -7
  11. package/assets/skills/frontend-design/SKILL.md +84 -0
  12. package/assets/skills/grilling/SKILL.md +43 -17
  13. package/package.json +2 -2
  14. package/src/assess/ai_judge.js +163 -0
  15. package/src/assess/decide.js +164 -0
  16. package/src/assess/governance.js +53 -0
  17. package/src/assess/index.js +183 -0
  18. package/src/assess/render.js +71 -0
  19. package/src/assess/rules/builtin.js +195 -0
  20. package/src/assess/schema.js +148 -0
  21. package/src/assess/store.js +138 -0
  22. package/src/assess/vectors/v1_intent.js +80 -0
  23. package/src/assess/vectors/v2_security.js +131 -0
  24. package/src/assess/vectors/v3_topology.js +107 -0
  25. package/src/cli.js +91 -89
  26. package/src/commands/apply.js +103 -36
  27. package/src/commands/assess.js +57 -0
  28. package/src/commands/doctor.js +1 -14
  29. package/src/commands/init.js +0 -9
  30. package/src/commands/new.js +97 -19
  31. package/src/commands/pr.js +27 -3
  32. package/src/commands/upgrade.js +1 -1
  33. package/src/commands/verify.js +109 -15
  34. package/src/lib/agents.js +5 -4
  35. package/src/lib/fs.js +26 -3
  36. package/src/lib/level.js +118 -0
  37. package/src/lib/paths.js +2 -1
  38. package/src/lib/prtype.js +17 -4
  39. package/src/lib/risk.js +50 -0
  40. package/src/lib/schema.js +4 -0
package/README.md CHANGED
@@ -1,220 +1,330 @@
1
1
  # agentic-sdlc
2
2
 
3
- > **BLUF** — Enterprise-grade Agentic Software Development Lifecycle (SDLC) governance.
4
- > Seven stages take a feature from natural language intent to production, with governance
5
- > **enforced by deterministic gates**, not by hope. Built on [OpenSpec](https://openspec.dev)
6
- > and [Graphify](https://github.com/safishamsi/graphify); the governance plane is yours.
3
+ [![npm version](https://img.shields.io/npm/v/@akjamie/agentic-sdlc?color=6366f1&label=npm)](https://www.npmjs.com/package/@akjamie/agentic-sdlc)
4
+ [![license: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-10b981.svg)](LICENSE)
5
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D20.19.0-38bdf8.svg)](https://nodejs.org/)
6
+ [![tests](https://img.shields.io/badge/tests-128%20passing-10b981.svg)](#development--verification)
7
+ [![architecture](https://img.shields.io/badge/governance-L0--L3%20Adaptive%20Dual--Track-f59e0b.svg)](#adaptive-risk-tiered-governance-l0l3)
8
+
9
+ > **The Intelligent Governance Engine for Autonomous AI Coding.**
10
+ > Move fast on routine tasks. Lock down APIs, schemas, and security.
11
+ > Never let an autonomous agent wander into production unverified.
12
+ >
13
+ > Built on [OpenSpec](https://openspec.dev) and [Graphify](https://github.com/safishamsi/graphify).
14
+ > The spec is the contract. The gate is the law. Humans stay in control.
7
15
 
8
16
  ---
9
17
 
10
- ## Contents
18
+ ## ⚡ The Dilemma: "Vibe Coding" vs. "Enterprise Bureaucracy"
11
19
 
12
- - [What problem this solves](#what-problem-this-solves)
13
- - [Three-Plane Architecture](#three-plane-architecture)
14
- - [Bundled Out-of-the-Box Skills](#bundled-out-of-the-box-skills)
15
- - [Install & Setup](#install--setup)
16
- - [The Seven Stages](#the-seven-stages)
17
- - [What `asdlc verify` Checks](#what-asdlc-verify-checks)
18
- - [Governance Principles](#governance-principles)
19
- - [Documentation Hub](#documentation-hub)
20
- - [Development & Verification](#development--verification)
20
+ Autonomous AI coding agents (Claude Code, Cursor, OpenCode, Codex) are transforming software delivery. But engineering leads face a frustrating dilemma:
21
+
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
+ └───────────────────────────┘ └───────────────────────────┘
31
+ ```
32
+
33
+ ### The Solution: Adaptive Dual-Track SDLC (`asdlc`)
34
+
35
+ `agentic-sdlc` bridges this gap with an **Intelligent, Neuro-Symbolic Governance Plane**:
36
+ - 🚀 **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
+ - 🛡️ **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
+ - 🤝 **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.
21
39
 
22
40
  ---
23
41
 
24
- ## What problem this solves
42
+ ## 🧭 Adaptive Risk-Tiered Governance (L0–L3)
25
43
 
26
- Spec-driven development works — until you scale it past one team or turn AI agents loose on production code. OpenSpec manages spec documents, but it **enforces nothing** at runtime. Nothing stops a developer or an autonomous agent from merging code that contradicts the approved spec, shipping without tests, or silently editing the spec after the fact.
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).
27
45
 
28
- `asdlc` closes that gap. It adds a deterministic governance plane *on top of* the engines:
46
+ ```mermaid
47
+ flowchart TD
48
+ REQ["Natural Language Intent / Code Diff"] --> ASSESS{"Neuro-Symbolic Risk Engine<br/>(AI Classifier + Invariant Guard)"}
49
+
50
+ ASSESS -->|L0: Trivial / Test / Doc| T_L0["<b>Level L0 · Trivial</b><br/>Tests, Docs, Typo Fixes"]
51
+ ASSESS -->|L1: Bounded Local / Tooling| T_L1["<b>Level L1 · Routine</b><br/>Internal Helpers, CI, Local Logic"]
52
+ ASSESS -->|L2: Cross-Boundary API / Schema| T_L2["<b>Level L2 · Structural</b><br/>FastAPI, SpringBoot, DDL, gRPC"]
53
+ ASSESS -->|L3: Critical Security / Architecture| T_L3["<b>Level L3 · Critical</b><br/>DROP TABLE, Auth Engines, AGENTS.md"]
54
+
55
+ subgraph FAST_TRACK ["⚡ Fast-Track: Single PR Flow"]
56
+ T_L0 --> SP1["Direct Implementation<br/>(Spec Delta & Code Co-Located)"]
57
+ T_L1 --> SP1
58
+ SP1 --> V_AUTO["Local asdlc verify<br/>12 Quality Gates"]
59
+ V_AUTO --> PR_AUTO["Single PR to main<br/>(CI + AI Review Auto-Merge)"]
60
+ end
61
+
62
+ subgraph SPEC_FIRST ["🛡️ Spec-First Track: Dual-PR Flow"]
63
+ T_L2 --> DP1["Spec PR to main<br/>(asdlc pr spec)"]
64
+ T_L3 --> DP1
65
+ DP1 --> G_SPEC["CI Spec Review & Human TL Approval"]
66
+ G_SPEC --> S_LOCK["approvedSha Cryptographic Lock<br/>(asdlc approve)"]
67
+ S_LOCK --> DP2["Implementation Unlocked<br/>(asdlc apply)"]
68
+ DP2 --> DP3["Task-Level TDD Red-Green Loop<br/>(asdlc test)"]
69
+ DP3 --> PR_IMPL["Implementation PR to main<br/>(Human Tech Lead Final Gate)"]
70
+ end
71
+
72
+ FAST_TRACK -.->|"In-Place Escalation<br/>(Touches API/DDL in Impl)"| ESCALATE["Maintain Single PR in-place<br/>Revoke Auto-Merge & Enforce Human Lead Sign-Off"]
73
+ ESCALATE -.-> PR_IMPL
74
+
75
+ classDef l0Style fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#ffffff,rx:6px,ry:6px;
76
+ classDef l1Style fill:#0f766e,stroke:#14b8a6,stroke-width:2px,color:#ffffff,rx:6px,ry:6px;
77
+ classDef l2Style fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#ffffff,rx:6px,ry:6px;
78
+ classDef l3Style fill:#450a0a,stroke:#ef4444,stroke-width:2px,color:#ffffff,rx:6px,ry:6px;
79
+ classDef subFast fill:#022c22,stroke:#059669,stroke-width:1.5px,color:#a7f3d0;
80
+ classDef subSpec fill:#0f172a,stroke:#3b82f6,stroke-width:1.5px,color:#bfdbfe;
81
+ classDef escStyle fill:#451a03,stroke:#f59e0b,stroke-width:2px,color:#fef3c7,rx:6px,ry:6px;
82
+
83
+ class T_L0 l0Style;
84
+ class T_L1 l1Style;
85
+ class T_L2 l2Style;
86
+ class T_L3 l3Style;
87
+ class FAST_TRACK subFast;
88
+ class SPEC_FIRST subSpec;
89
+ class ESCALATE escStyle;
90
+ ```
91
+
92
+ ### Governance Tier Matrix
29
93
 
30
- - **Intent-Driven Start**: Developers start with natural language requirements (`asdlc new "i want to build..."`), not artificial ticket IDs. Canonical slugs are automatically derived, and knowledge graph queries are seeded with real domain terms.
31
- - **High-Efficiency Batch Grilling**: A bundled interview engine (**`batch-grill-me`**) stress-tests the entire decision frontier in 1-2 structured batches with recommended defaults *before* writing specs. Decisions are recorded in `clarifications.md`.
32
- - **The Spec is the Authority**: Merged to the protected branch, the spec is immutable. If reality diverges during implementation, the Converge protocol halts affected work (`SPEC_GAP`) — you never silently mutate an approved spec.
33
- - **Enforced Task-Level TDD**: Unlocking implementation (`asdlc apply`) requires approved spec commits, while `asdlc verify` deterministically checks `test-presence` (rejects code changes without test changes in diff) and `tdd-evidence` (validates recorded test outputs).
34
- - **Player ≠ Referee**: Independent AI verification uses a different model and a fresh context than the authoring agent.
94
+ | Tier | Typical Scope | Workflow Mode | Spec-First Block? | Implementation Review | Auto-Merge |
95
+ | :---: | :--- | :---: | :---: | :---: | :---: |
96
+ | **L0** | Test additions, fixtures, docs, typos, comments | **Single PR** | ❌ None | None (Pass) | **Enabled** (once CI passes) |
97
+ | **L1** | Internal utils, CI workflows, git hooks, local refactors | **Single PR** | ❌ None | AI Review | **Enabled** (once AI passes) |
98
+ | **L2** | Public APIs (FastAPI/Spring/Go), schemas, shared libs | **Dual PR** | **Enforced** | AI + Human Lead | 🚫 **Denied** (Lead Approval required) |
99
+ | **L3** | Destructive DDL (`DROP`), auth engines, `AGENTS.md` | **Dual PR** | **Enforced** | AI + Human Lead | 🚫 **Denied** (Lead Approval required) |
35
100
 
36
101
  ---
37
102
 
38
- ## Three-Plane Architecture
103
+ ## 🛡️ Non-Negotiable Engineering Invariants
39
104
 
40
- ```
41
- ┌─────────────────────────────────────────────────────────────────────────────┐
42
- │ PLANE 3: Agentic IDE Skills & Commands (.agents/skills, .claude/skills, ...)│
43
- │ ● asdlc:new ● asdlc:lint ● asdlc:review ● asdlc:apply ● asdlc:verify │
44
- │ ● Bundled Engines: grilling (batch-grill-me), asdlc-apply (TDD Red-Green) │
45
- └──────────────────────────────────────┬──────────────────────────────────────┘
46
- │ runs CLI with --json
47
- ┌──────────────────────────────────────▼──────────────────────────────────────┐
48
- │ PLANE 2: Governance CLI & CI Gate (asdlc init/new/lint/approve/apply/verify)│
49
- │ ● Path-limited approval evidence ● Deterministic BDD/AC linters │
50
- │ ● Diff-based test presence gate ● Schema version pin & override guard │
51
- └──────────────────────────────────────┬──────────────────────────────────────┘
52
- │ calls pure functions
53
- ┌──────────────────────────────────────▼──────────────────────────────────────┐
54
- │ PLANE 1: Core Library (src/lib/ — zero side-effects, fully unit-tested) │
55
- │ ● speclint ● tdd ● prtype ● policy ● graphify ● schema ● agents │
56
- └─────────────────────────────────────────────────────────────────────────────┘
57
- ```
105
+ Enterprise teams rely on deterministic code, not agent compliance or prompt enthusiasm. Every invariant is backed by cryptographic proofs or exit-coded engines:
58
106
 
59
- For complete technical specifications of each plane, see [docs/architecture.md](docs/architecture.md).
107
+ | # | Enterprise Invariant | How `asdlc` Enforces It | Failure Mode |
108
+ | :-: | :--- | :--- | :--- |
109
+ | **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. |
111
+ | **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
+ | **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
+ | **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. |
114
+ | **6** | **Deterministic AC Assertions (`asdlc test`)** | Parses `- [ ] ACn: (test: <path>)` annotations and runs native test suites. | 🚫 **Fake Claim Gate** — Unimplemented acceptance criteria immediately fail CI. |
115
+ | **7** | **Player ≠ Referee Isolation** | CI runs independent verification with a fresh LLM instance outside the author agent context. | 🚫 **Audit Integrity** — Authoring agents can never grade their own exam. |
116
+ | **8** | **Humane In-Place Scope Escalation** | If an L1 change touches an API during implementation, single PR is preserved with mandatory human sign-off. | **Safe Convergence** — No messy branch rebases; human stays in control. |
60
117
 
61
118
  ---
62
119
 
63
- ## Bundled Out-of-the-Box Skills
120
+ ## 📦 Architecture: The Three Planes
64
121
 
65
- `asdlc` does not assume or require external user-level skills to be pre-installed. All critical agent harnesses are **packaged inside `asdlc` and installed automatically upon `asdlc init`**:
122
+ `agentic-sdlc` strictly decouples interface, governance rules, and core execution:
66
123
 
67
- | Stage & Skill | Purpose & Behavior |
68
- | :--- | :--- |
69
- | **Stage 1 · Init**<br>[`asdlc-init`](assets/skills/asdlc-init/SKILL.md) | Bootstraps repository: OpenSpec, Graphify AST engine, governance schema, policies, git hooks, and agent skills. |
70
- | **Stage 2 · New**<br>[`asdlc-new`](assets/skills/asdlc-new/SKILL.md) | Grounds intent in Graphify AST queries, seeds `clarifications.md`, and runs bundled **`batch-grill-me`** interview. |
71
- | **Stage 3 · Spec PR**<br>[`asdlc-pr`](assets/skills/asdlc-pr/SKILL.md) | Enforces deterministic BDD/AC linting (R0–R8) and opens Spec PR (CLI → REST API → 1-click Web URL) with auto-labels. |
72
- | **Stage 3 · Spec AI Review**<br>[`asdlc-spec-review`](assets/skills/asdlc-spec-review/SKILL.md) | CI-triggered independent 6-dimension spec evaluation; posts structured markdown findings and traceability matrix as PR comments via `gh`. |
73
- | **Stage 4 · Approve (Optional)**<br>[`asdlc-approve`](assets/skills/asdlc-approve/SKILL.md) | *(Optional)* Explicit audit stamp after PR merge (`specSha` + `READY_FOR_IMPL`). Auto-recognized by `apply`. |
74
- | **Stage 5 · Apply**<br>[`asdlc-apply`](assets/skills/asdlc-apply/SKILL.md) | Path-isolated zero-diff guard; executes strict **Red -> Green -> Refactor -> Evidence -> Converge** TDD loop. |
75
- | **Stage 6 · Verify**<br>[`asdlc-verify`](assets/skills/asdlc-verify/SKILL.md) | 12-gate implementation verification: test presence, task evidence, AC test mapping, and independent AI verifier. |
76
- | **Stage 6.5 · Impl AI Review**<br>[`asdlc-impl-review`](assets/skills/asdlc-impl-review/SKILL.md) | CI-triggered independent implementation evaluation (AC conformance matrix, code quality, TDD evidence); posts markdown findings as PR comments via `gh`. |
77
- | **Stage 7 · Archive**<br>[`asdlc-archive`](assets/skills/asdlc-archive/SKILL.md) | Deliberate closeout: syncs specs to master catalog, refreshes code AST graph, and updates system status. |
78
- | **Diagnostics**<br>[`asdlc-doctor`](assets/skills/asdlc-doctor/SKILL.md) | Evaluates 12 toolchain/governance invariants; provides automated 1-click remediation (`--fix`). |
79
- | **Orientation**<br>[`asdlc-status`](assets/skills/asdlc-status/SKILL.md) | Shows change stage progress, active artifacts, next command, or full portfolio dashboard. |
124
+ ```
125
+ ┌────────────────────────────────────────────────────────────────────────┐
126
+ │ PLANE 3 · Conversational Agent Surface (.agents/skills/) │
127
+ │ Bundled out-of-the-box skills for Claude Code, Cursor, OpenCode, etc. │
128
+ │ Coordinates multi-turn flows, interviews, TDD loops, and reviews. │
129
+ └──────────────────────────────────┬─────────────────────────────────────┘
130
+ │ Invokes commands with --json
131
+ ┌──────────────────────────────────▼─────────────────────────────────────┐
132
+ │ PLANE 2 · Governance CLI & Hard CI Gates (bin/asdlc.js) │
133
+ │ Deterministic CLI exit codes (0 = pass, 1 = fail). No LLM fuzziness. │
134
+ │ init · new · lint · approve · apply · test · verify · pr · archive │
135
+ └──────────────────────────────────┬─────────────────────────────────────┘
136
+ │ Pure function calls
137
+ ┌──────────────────────────────────▼─────────────────────────────────────┐
138
+ │ PLANE 1 · Core Library & Engines (src/lib/, src/assess/) │
139
+ │ Pure functions, 100% tested, zero side-effects. │
140
+ │ ├─ assess/ Neuro-symbolic risk evaluation & hash-chain history │
141
+ │ ├─ speclint/ R0–R8 BDD/AC linting & scenario coverage traceability │
142
+ │ ├─ graphify/ Knowledge graph & code AST topology discovery │
143
+ │ └─ verify/ 12 cryptographic & structural quality gates │
144
+ └────────────────────────────────────────────────────────────────────────┘
145
+ ```
80
146
 
81
147
  ---
82
148
 
83
- ## Install & Setup
149
+ ## 🚀 Quickstart: 5-Minute Walkthrough
84
150
 
85
- `asdlc` supports multiple installation methods depending on your environment:
151
+ ### 1. Installation
86
152
 
87
153
  ```bash
88
- # Option A: From npm registry (Recommended)
154
+ # Install globally via npm
89
155
  npm install -g @akjamie/agentic-sdlc
90
156
 
91
- # Option B: Directly from GitHub repository (npm v12+ requires --allow-git=all)
92
- npm install -g --allow-git=all git+https://github.com/akjamie/agentic-sdlc.git
157
+ # Initialize your repository with OpenSpec, Graphify, and bundled skills
158
+ asdlc init
159
+
160
+ # Verify environment & toolchain health
161
+ asdlc doctor
162
+ ```
163
+
164
+ ### 2. Scenario A: Agile Routine Change (Level L1 · Single-PR)
165
+
166
+ ```bash
167
+ # 1. Start a routine change (automatically inferred as L1)
168
+ asdlc new "add memory cache helper with TTL eviction"
93
169
 
94
- # Option C: Local development repository
95
- npm install -g .
170
+ # 2. Directly implement using the task-level TDD loop (no Spec PR needed!)
171
+ asdlc apply memory-cache-helper
96
172
 
97
- # Initialize repository (installs OpenSpec engine, Graphify, policy, and bundled skills)
98
- asdlc init --ci jenkins
173
+ # 3. Verify locally against 12 quality gates
174
+ asdlc verify memory-cache-helper
175
+
176
+ # 4. Open Single PR (co-locates spec delta and code)
177
+ asdlc pr memory-cache-helper main
178
+ # → Auto-merge eligible once CI & AI checks pass!
99
179
  ```
100
180
 
101
- Verify setup health at any time:
181
+ ### 3. Scenario B: High-Impact API Change (Level L2 · Dual-PR Spec-First)
102
182
 
103
183
  ```bash
104
- asdlc doctor
184
+ # 1. Start an API change (automatically detected as L2 Spec-First)
185
+ asdlc new "create FastAPI user authentication router"
186
+
187
+ # 2. Agent runs conversational grill-me to settle design in clarifications.md
188
+ # Drafts proposal.md, design.md, and specs/
189
+
190
+ # 3. Open Spec PR (triggers CI AI Spec Review)
191
+ asdlc pr user-auth main
192
+
193
+ # 4. Human Tech Lead reviews & merges Spec PR to main.
194
+ # asdlc approve locks the specSha!
195
+
196
+ # 5. Implementation is now unlocked
197
+ asdlc apply user-auth
198
+
199
+ # 6. Execute TDD loop and verify code + test presence
200
+ asdlc test user-auth
201
+ asdlc verify user-auth
202
+
203
+ # 7. Open Implementation PR (attaches asdlc:impl-review)
204
+ asdlc pr user-auth main
205
+ # → Mandatory Human Tech Lead approval required before trunk merge!
105
206
  ```
106
207
 
107
208
  ---
108
209
 
109
- ## The Seven Stages
210
+ ## 🧰 Bundled Out-of-the-Box Skills
110
211
 
111
- ```mermaid
112
- flowchart LR
113
- S1["1 · init<br/>setup + skills"] --> S2["2 · new<br/>intent + grill"]
114
- S2 --> S3["3 · spec pr<br/>lint + open Spec PR"]
115
- S3 --> S4["4 · approve (optional)<br/>audit check"]
116
- S4 --> S5["5 · apply<br/>TDD loop"]
117
- S5 --> S6["6 · verify<br/>12 gates (local)"]
118
- S6 --> PR2["Impl PR<br/>asdlc pr (CI AI Review)"]
119
- PR2 --> S7["7 · archive<br/>sync + graph"]
120
-
121
- style S1 fill:#e8f4fd,stroke:#2196f3
122
- style S2 fill:#e8f4fd,stroke:#2196f3
123
- style S3 fill:#e8f4fd,stroke:#2196f3
124
- style S4 fill:#fff3e0,stroke:#ff9800
125
- style S5 fill:#e8f5e9,stroke:#4caf50
126
- style S6 fill:#fff3e0,stroke:#ff9800
127
- style PR2 fill:#e8f5e9,stroke:#4caf50
128
- style S7 fill:#f3e5f5,stroke:#9c27b0
129
- ```
212
+ `asdlc` includes production-grade agent skills installed automatically into `.agents/skills/`. Your AI assistant (Claude Code, Cursor, OpenCode, Antigravity IDE) immediately gains enterprise SDLC capabilities:
130
213
 
131
- | Stage & Command | Lifecycle Action & Governance Guard |
214
+ | Skill | Role in Agentic SDLC |
132
215
  | :--- | :--- |
133
- | **1 · Init**<br>`asdlc init [--ci jenkins]` | Bootstraps OpenSpec + Graphify, governance schema, policy, and 8+ agent tools. |
134
- | **2 · New**<br>`asdlc new "<requirement>" [--design]` | Derives slug, auto-seeds `design.md` for UI/API systems, queries code graph, guides 3rd-party research with offline degradation, and interviews author via `batch-grill-me`. |
135
- | **3 · Spec PR**<br>`asdlc pr <ID> <targetBranch>` | Pre-flight BDD/AC and technical design linting (`asdlc lint`), attaches `asdlc:spec-review` label, triggers CI Spec AI Review before human approval. |
136
- | **4 · Approve (Optional)**<br>`asdlc approve <ID>` | *(Optional)* Explicit audit stamp after Spec PR merge. `asdlc apply` automatically detects merged PRs if skipped. |
137
- | **5 · Apply**<br>`asdlc apply <ID>` | Multi-tenant zero-diff guard; launches `/asdlc:apply` task-level TDD Red-Green engine guided by approved specs and `design.md`. |
138
- | **6 · Verify (Local)**<br>`asdlc verify <ID>` | Local pre-flight self-check across 12 deterministic gates (test-presence, tdd-evidence, AC mappings, external tests). |
139
- | **6.5 · Impl PR**<br>`asdlc pr <ID> <targetBranch>` | Pre-flight implementation verification, pushes impl branch, attaches `asdlc:impl-review` label, triggers CI Code AI Review before merge. |
140
- | **7 · Archive**<br>`asdlc archive <ID>` | Syncs delta to `openspec/specs/`, creates `AGENTS.md` if missing, refreshes knowledge graph, and updates `AGENTS.md` system status. |
141
-
142
- ### Dual-PR Governance & Label Dispatch
143
-
144
- `asdlc pr` automatically detects whether you are submitting a **Spec PR** (Stage 3) or an **Implementation PR** (Stage 6.5) based on lifecycle state, branch, and approval history — completely autonomous with zero extra flags:
145
-
146
- | PR Phase | Trigger Moment & Pre-flight | PR Labels | CI Automation Trigger | Human Action |
147
- | :--- | :--- | :--- | :--- | :--- |
148
- | **Spec PR** | After spec drafting; runs **`asdlc lint`** (0 blockers) | `asdlc:spec-review`<br>`spec` | Runs `asdlc lint` + triggers **Spec AI Review** (clarity, BDD scenarios, architecture alignment) | TL / Domain Lead approves & merges |
149
- | **Impl PR** | After TDD implementation; runs **`asdlc verify`** (12 gates) | `asdlc:impl-review`<br>`impl` | Runs `asdlc verify` + triggers **Code AI Review** (diff analysis, style, edge cases) | Lead / Peer reviews code & merges |
150
-
151
- **Navigation, Diagnostics & Workspace Maintenance:**
152
- - `asdlc status <ID>`: Instant orientation on current stage and exact next command.
153
- - `asdlc doctor [--fix]`: Comprehensive toolchain and policy health diagnostics with auto-remediation.
154
- - `asdlc update`: Synchronizes repository SDLC state in seconds: refreshes repo-level agent skills (`.agents/skills`), rebuilds codebase AST knowledge graph (`graphify-out/` bound to `HEAD`), updates `AGENTS.md` system status & architectural hubs, and verifies git hooks. Fails fast with guidance if run outside an initialized repository.
155
- - `asdlc upgrade [--global]`: Upgrades the machine toolchain (`asdlc` CLI, OpenSpec engine, Graphify, managed schema) and automatically updates the current repository if inside one, or global user skills (`~/.agents`) with `--global`.
156
- - `asdlc skills list`: Lists all bundled skills available in agentic-sdlc.
157
- - `asdlc skills install --global`: One-click setup on CI Linux VMs to inject skills into global agent directories (`~/.agents`, `~/.opencode`, `~/.pi`, `~/.dsh`) without polluting developer workspaces.
216
+ | [`asdlc-init`](assets/skills/asdlc-init/SKILL.md) | One-command bootstrapping of OpenSpec, Graphify AST, policies, and git hooks. |
217
+ | [`asdlc-new`](assets/skills/asdlc-new/SKILL.md) | Scaffolds change, queries AST hubs, runs conversational anti-fatigue `grill-me`. |
218
+ | [`asdlc-lint`](assets/skills/asdlc-lint/SKILL.md) | Enforces deterministic BDD GIVEN/WHEN/THEN and R5 scenario-to-AC coverage. |
219
+ | [`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. |
221
+ | [`asdlc-apply`](assets/skills/asdlc-apply/SKILL.md) | Strict task-level TDD engine (`Red -> Green -> Refactor -> Evidence -> Converge`). |
222
+ | [`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. |
225
+ | [`asdlc-archive`](assets/skills/asdlc-archive/SKILL.md) | Syncs specs to living catalog, refreshes AST graph, and updates system status. |
226
+ | [`asdlc-doctor`](assets/skills/asdlc-doctor/SKILL.md) | 12-invariant diagnostic engine with 1-click automated remediation (`--fix`). |
227
+ | [`asdlc-status`](assets/skills/asdlc-status/SKILL.md) | Real-time change lifecycle dashboard and next actionable command guidance. |
158
228
 
159
229
  ---
160
230
 
161
- ## What `asdlc verify` Checks
231
+ ## 🔍 What `asdlc verify` Checks (12 Local & CI Gates)
162
232
 
163
- `asdlc verify` executes in local developer terminals and on CI (Jenkins) without drift:
233
+ Every implementation diff must pass the 12 deterministic gates in `asdlc verify`:
164
234
 
165
235
  ```mermaid
166
- flowchart TB
167
- V["asdlc verify"] --> C1["pr-type<br/>paths only discrimination"]
168
- V --> C2["artifacts<br/>proposal + review + tasks + explore + spec"]
169
- V --> C3["approved-spec<br/>git log verification on target branch"]
170
- V --> C3b["spec-tamper<br/>locked spec paths unmodified in impl PR"]
171
- V --> C4["flow-state<br/>READY_FOR_IMPL verification"]
172
- V --> C5["tasks-complete<br/>all checkboxes resolved"]
173
- V --> C6["test-presence<br/>code diff mandates test diff"]
174
- V --> C7["tdd-evidence<br/>verified task output annotations"]
175
- V --> C8["BDD + AC<br/>GIVEN/WHEN/THEN + AC→test mapping"]
176
- V --> C9["openspec validate<br/>--all --strict"]
177
- V --> C10["schema-managed<br/>central install + version pin"]
178
- V --> C11["external<br/>unit tests · contract · security"]
179
- V --> C12["AI verification<br/>independent referee model"]
236
+ flowchart TD
237
+ V["<b>asdlc verify &lt;ID&gt;</b><br/>Deterministic Implementation Gatekeeper"]
238
+
239
+ subgraph TIER1 ["Tier 1 · Cryptographic & Contract Integrity"]
240
+ G_APPROVED["<b>approved-spec</b><br/>Matches commit on main"]
241
+ G_TAMPER["<b>spec-tamper</b><br/>Zero spec modifications in Impl PR"]
242
+ G_LEVEL["<b>level-integrity</b><br/>Hash-chain tamper check"]
243
+ G_ARTIFACTS["<b>artifacts</b><br/>proposal, tasks, spec delta present"]
244
+ end
245
+
246
+ subgraph TIER2 ["Tier 2 · Code & Test Fidelity (TDD Invariants)"]
247
+ G_PRESENCE["<b>test-presence</b><br/>Code changes mandate test changes"]
248
+ G_TDD["<b>tdd-evidence</b><br/>Recorded test execution logs"]
249
+ G_BDD["<b>BDD + AC Traceability</b><br/>GIVEN/WHEN/THEN + (test: path)"]
250
+ G_TASKS["<b>tasks-complete</b><br/>All tasks checked off in tasks.md"]
251
+ end
252
+
253
+ subgraph TIER3 ["Tier 3 · Scope & Governance Invariants"]
254
+ G_ESCAPE["<b>risk-escape</b><br/>Detects unannounced API/DDL escalations"]
255
+ G_HUMAN["<b>human-gate</b><br/>Enforces Tech Lead sign-off for L2/L3"]
256
+ G_PR["<b>pr-type</b><br/>Path classification & single-PR validation"]
257
+ G_SCHEMA["<b>schema-managed</b><br/>Central install + pinned version"]
258
+ end
259
+
260
+ V --> TIER1
261
+ V --> TIER2
262
+ V --> TIER3
263
+
264
+ classDef rootStyle fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#ffffff,rx:8px,ry:8px;
265
+ classDef tierStyle fill:#020617,stroke:#334155,stroke-width:1.5px,color:#94a3b8;
266
+ classDef gateStyle fill:#0f172a,stroke:#0284c7,stroke-width:1px,color:#f1f5f9,rx:5px,ry:5px;
267
+
268
+ class V rootStyle;
269
+ class TIER1,TIER2,TIER3 tierStyle;
270
+ class G_APPROVED,G_TAMPER,G_LEVEL,G_ARTIFACTS,G_PRESENCE,G_TDD,G_BDD,G_TASKS,G_ESCAPE,G_HUMAN,G_PR,G_SCHEMA gateStyle;
180
271
  ```
181
272
 
182
273
  ---
183
274
 
184
- ## Governance Principles
275
+ ## 🛠️ CLI Reference
185
276
 
186
- 1. **Adopt the engines, own the governance plane.** OpenSpec and Graphify are adopted, not forked.
187
- 2. **Approval is git.** A merged spec PR *is* the human approval; the gate proves it with a path-limited `git log`.
188
- 3. **Fail-closed.** Any verification without an approved commit fails.
189
- 4. **Deterministic first.** Linters, diff analyzers, and schema validators are pure functions (no LLM jitter).
190
- 5. **Enforced TDD.** Implementation diffs touching production code without tests are rejected by `test-presence`.
191
- 6. **Ground specs in code.** Graphify AST queries ground specifications in real code structure.
192
- 7. **One front door.** Everything runs through `asdlc` — no raw escape hatches.
277
+ ```bash
278
+ asdlc init [--ci jenkins|github] # Scaffold repository with OpenSpec, Graphify, and skills
279
+ asdlc new "<intent>" # Scaffold change with AST explore + grill-me interview
280
+ asdlc lint <ID> # Validate BDD scenarios, AC rules, and coverage
281
+ asdlc pr <ID> <target-branch> # Smart PR creator (auto-handles Spec PR vs Impl PR)
282
+ asdlc approve <ID> # Record approvedSha and transition to ready_for_impl
283
+ asdlc apply <ID> # Guarded implementation launcher (checks approvedSha)
284
+ asdlc test <ID> [--json] # Execute real test runners mapped to AC annotations
285
+ asdlc verify <ID> # Audit diff against all 12 quality gates
286
+ asdlc archive <ID> # Sync delta to living specs and refresh code graph
287
+ asdlc doctor [--fix] # 12-point toolchain & governance health check
288
+ asdlc status [<ID>] # Change progress orientation or portfolio dashboard
289
+ asdlc upgrade [--global] # Seamless upgrade of CLI, engine, and schemas
290
+ ```
193
291
 
194
292
  ---
195
293
 
196
- ## Documentation Hub
294
+ ## 🧪 Development & Verification
197
295
 
198
- | Document | Purpose |
199
- |---|---|
200
- | [docs/usage.md](docs/usage.md) | Practical command-line and developer walkthrough. |
201
- | [docs/architecture.md](docs/architecture.md) | Complete 3-Plane Architecture & IDE Skill design specification. |
202
- | [docs/solution-review.md](docs/solution-review.md) | Solution review, gap analysis, and architectural evaluation. |
203
- | [docs/glossary.md](docs/glossary.md) | Formally locked domain model and SDLC vocabulary. |
204
- | [docs/blueprint.html](docs/blueprint.html) | Enterprise Agentic SDLC Blueprint (English). |
205
- | [docs/blueprint.zh.html](docs/blueprint.zh.html) | Enterprise Agentic SDLC Blueprint (Chinese). |
206
-
207
- ---
208
-
209
- ## Development & Verification
296
+ `agentic-sdlc` is built to enterprise testing standards. Every feature is backed by rigorous unit, integration, and simulation tests:
210
297
 
211
298
  ```bash
299
+ git clone https://github.com/akjamie/agentic-sdlc.git
300
+ cd agentic-sdlc
212
301
  npm install
213
- npm test # 66 unit and integration tests (100% pass)
302
+
303
+ # Run complete test suite (128 tests passing, 100% pass rate)
304
+ npm test
305
+
306
+ # Run end-to-end multi-language simulation tests
307
+ node --test test/simulation.test.js
214
308
  ```
215
309
 
216
310
  ---
217
311
 
218
- ## License
312
+ ## 🤝 Community & Contributing
313
+
314
+ We welcome contributions from developers, architects, and researchers advancing the state of Agentic Software Engineering!
315
+
316
+ - **Contributing Guide**: Check out [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, development conventions, and PR expectations.
317
+ - **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.
319
+
320
+ ---
321
+
322
+ ## 📄 License & Attribution
323
+
324
+ Distributed under the **Apache-2.0 License**. See [LICENSE](LICENSE) and [NOTICE](NOTICE) for details.
219
325
 
220
- [MIT](LICENSE)
326
+ ```markdown
327
+ Project: agentic-sdlc (Enterprise Agentic SDLC Governance)
328
+ Author: Jamie Zhang (@akjamie)
329
+ Repository: https://github.com/akjamie/agentic-sdlc
330
+ ```