@akjamie/agentic-sdlc 1.2.0 → 1.4.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 (48) hide show
  1. package/LICENSE +201 -21
  2. package/README.md +239 -302
  3. package/assets/commands/asdlc-apply.md +24 -0
  4. package/assets/commands/asdlc-approve.md +21 -0
  5. package/assets/commands/asdlc-archive.md +21 -0
  6. package/assets/commands/asdlc-doctor.md +24 -0
  7. package/assets/commands/asdlc-lint.md +30 -0
  8. package/assets/commands/asdlc-new.md +29 -0
  9. package/assets/commands/asdlc-pr.md +25 -0
  10. package/assets/commands/asdlc-status.md +23 -0
  11. package/assets/commands/asdlc-test.md +20 -0
  12. package/assets/commands/asdlc-verify.md +29 -0
  13. package/assets/schema/risk-assessment.schema.json +225 -0
  14. package/assets/skills/asdlc-apply/SKILL.md +43 -18
  15. package/assets/skills/asdlc-new/SKILL.md +15 -1
  16. package/assets/skills/asdlc-verify/SKILL.md +16 -6
  17. package/package.json +2 -2
  18. package/src/assess/ai_judge.js +163 -0
  19. package/src/assess/decide.js +164 -0
  20. package/src/assess/governance.js +53 -0
  21. package/src/assess/index.js +183 -0
  22. package/src/assess/render.js +71 -0
  23. package/src/assess/rules/builtin.js +195 -0
  24. package/src/assess/schema.js +148 -0
  25. package/src/assess/store.js +138 -0
  26. package/src/assess/vectors/v1_intent.js +80 -0
  27. package/src/assess/vectors/v2_security.js +131 -0
  28. package/src/assess/vectors/v3_topology.js +107 -0
  29. package/src/cli.js +91 -89
  30. package/src/commands/apply.js +103 -36
  31. package/src/commands/assess.js +57 -0
  32. package/src/commands/doctor.js +33 -18
  33. package/src/commands/init.js +5 -64
  34. package/src/commands/lint.js +9 -2
  35. package/src/commands/new.js +19 -2
  36. package/src/commands/pr.js +27 -3
  37. package/src/commands/skills.js +7 -19
  38. package/src/commands/status.js +169 -8
  39. package/src/commands/update.js +4 -3
  40. package/src/commands/upgrade.js +1 -1
  41. package/src/commands/verify.js +109 -15
  42. package/src/lib/fs.js +26 -3
  43. package/src/lib/level.js +118 -0
  44. package/src/lib/paths.js +3 -1
  45. package/src/lib/prtype.js +17 -4
  46. package/src/lib/risk.js +50 -0
  47. package/src/lib/schema.js +4 -0
  48. package/src/lib/tools.js +313 -0
package/README.md CHANGED
@@ -1,319 +1,239 @@
1
1
  # agentic-sdlc
2
2
 
3
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: MIT](https://img.shields.io/badge/license-MIT-10b981.svg)](LICENSE)
5
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18-38bdf8.svg)](https://nodejs.org/)
6
- [![tests](https://img.shields.io/badge/tests-89%20passing-10b981.svg)](#development--verification)
7
-
8
- > **Enterprise-grade Agentic SDLC governance.** Seven deterministic stages take a feature from natural-language intent to production — with every quality gate enforced by code, not by convention.
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.
9
12
  >
10
13
  > Built on [OpenSpec](https://openspec.dev) and [Graphify](https://github.com/safishamsi/graphify).
11
- > The spec is the authority. The gate is the law. Humans stay in control.
12
-
13
- ---
14
-
15
- ## Contents
16
-
17
- - [What problem this solves](#what-problem-this-solves)
18
- - [Enterprise Quality Gates & Non-Negotiable Invariants](#-enterprise-quality-gates--non-negotiable-invariants)
19
- - [Three-Plane Architecture](#three-plane-architecture)
20
- - [Bundled Out-of-the-Box Skills](#bundled-out-of-the-box-skills)
21
- - [Install & Setup](#install--setup)
22
- - [The Seven Stages](#the-seven-stages)
23
- - [What `asdlc verify` Checks](#what-asdlc-verify-checks)
24
- - [Governance Principles](#governance-principles)
25
- - [Documentation Hub](#documentation-hub)
26
- - [Development & Verification](#development--verification)
14
+ > The spec is the contract. The gate is the law. Humans stay in control.
27
15
 
28
16
  ---
29
17
 
30
- ## What Problem This Solves
31
-
32
- Spec-driven development works — until you scale it past one team or turn AI agents loose on a production codebase.
33
-
34
- OpenSpec manages spec documents, but it **enforces nothing** at runtime. Nothing stops an autonomous agent from:
35
-
36
- - Writing code that contradicts the approved spec
37
- - Shipping without tests
38
- - Silently editing the spec after the fact to make failing tests pass
39
- - Grading its own implementation (agent acts as both player and referee)
18
+ ## ⚡ The Dilemma: "Vibe Coding" vs. "Enterprise Bureaucracy"
40
19
 
41
- `asdlc` closes every one of those gaps by adding a **deterministic governance plane** on top of the spec engine:
20
+ Autonomous AI coding agents (Claude Code, Cursor, OpenCode, Codex) are transforming software delivery. But engineering leads face a frustrating dilemma:
42
21
 
43
- | What agents can't do | How `asdlc` enforces it |
44
- | :--- | :--- |
45
- | Write production code before spec approval | `asdlc apply` physically refuses via path-limited `git log` check |
46
- | Silently alter an approved spec | `spec-tamper` gate computes and compares path-limited SHA |
47
- | Ship code without tests | `test-presence` gate rejects diffs missing test changes |
48
- | Write ACs not mapped to test files | `(test: <path>)` annotation required per AC |
49
- | Self-certify their own implementation | CI runs independent `asdlc-impl-review` with fresh LLM context |
50
- | Declare success without recorded test evidence | `tdd-evidence` gate validates actual test output logs |
51
-
52
- ### Five Core Principles
53
-
54
- - **Intent-Driven Start** — `asdlc new "i want to build..."` derives a canonical slug; no artificial ticket IDs.
55
- - **Conversational Grilling Before Specs** — high-signal **`grill-me`** interview (or **`batch-grill-me`** via `--batch-grill`) stress-tests the decision frontier *before* any spec is written, with strict anti-fatigue guardrails. Decisions are recorded in `clarifications.md`.
56
- - **The Spec is Immutable** — once merged to the protected branch, the spec is locked. If reality diverges, the Converge protocol halts work (`SPEC_GAP`) and requires human re-approval via a fresh spec delta.
57
- - **Enforced Task-Level TDD** — `asdlc apply` requires an approved spec commit; `asdlc verify` enforces `test-presence` and `tdd-evidence` on every diff.
58
- - **Player ≠ Referee** — the authoring agent can never certify its own work; CI uses a separate model with fresh context.
59
-
60
- ---
61
-
62
- ## 🛡️ Enterprise Quality Gates & Non-Negotiable Invariants
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
+ ```
63
32
 
64
- These are the hard invariants enterprise engineering leads require when deploying autonomous agents on production repositories.
65
- Every invariant is enforced by deterministic code — not by convention, documentation, or hope.
33
+ ### The Solution: Adaptive Dual-Track SDLC (`asdlc`)
66
34
 
67
- | # | Quality Gate | Enforcement | Failure Mode |
68
- | :--: | :--- | :--- | :--- |
69
- | **1** | **No Apply Before Spec PR Merge** | `asdlc apply <ID>` verifies path-limited Git commit (`approvedSha`) on `main` touching `proposal.md` + `specs/**` | 🚫 **Hard Refusal** — zero production code on unapproved drafts |
70
- | **2** | **Cryptographic Anti-Tampering** (`spec-tamper`) | `asdlc verify` computes path-limited SHA of locked spec files in the impl diff against `approvedSha` | 🚫 **PR Rejection** — agents cannot move the goalposts to pass failing tests |
71
- | **3** | **Full Scenario-to-AC Traceability** (`R5-scenario-coverage`) | `asdlc lint` enforces `scens.length <= acs.length` — every scenario needs ≥1 AC | 🚫 **Pre-flight Blocker** — prevents single happy-path ACs for complex scenario sets |
72
- | **4** | **Deterministic AC Test Gate** (`asdlc test`) | Parses all `- [ ] ACn: ... (test: <path>)` mappings and executes real assertions via native runners | 🚫 **Dual Harness** — local TDD driver + independent CI gate; fake claims fail |
73
- | **5** | **Player ≠ Referee Isolation** | CI impl review runs with fresh LLM context; independent of author agent `tasks.md` declarations | 🚫 **Audit Integrity** — authoring agents cannot grade their own exam |
74
- | **6** | **Diff-Based Test Presence** (`test-presence`) | `asdlc verify` checks every `src/**` change is accompanied by `test/**` changes | 🚫 **Zero Untested Code** — shuts down AI "code dumps" with no test coverage |
75
- | **7** | **Immutable Converge Protocol** (`SPEC_GAP`) | If implementation exposes invalid spec assumptions, agent must halt and file a `SPEC_GAP` report | 🚫 **Anti-Drift** — silent spec mutations blocked; human re-approves fresh delta |
76
- | **8** | **Triple-Gated Trunk Merge** | Impl PR merge requires: ① CI AC Tests, ② AI Impl Review (Player ≠ Referee), ③ Human Tech Lead sign-off | 🚫 **Blast Radius Defense** — unreviewed agent code never reaches `main` |
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.
77
39
 
78
40
  ---
79
41
 
80
- ## Three-Plane Architecture
42
+ ## 🧭 Adaptive Risk-Tiered Governance (L0–L3)
81
43
 
82
- The system is structured across three distinct planes, each with a clear responsibility boundary:
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).
83
45
 
84
46
  ```mermaid
85
47
  flowchart TD
86
- subgraph P3 ["PLANE 3 · Agentic IDE Surface (.agents/skills/ · Conversational & Autonomous)"]
87
- direction TB
88
- subgraph P3_STAGES ["Stage Workflow Skills (Ordered by SDLC Stage)"]
89
- direction LR
90
- SK_INIT["1 · asdlc-init<br/>Repo Scaffolding"] --> SK_NEW["2 · asdlc-new<br/>AST Explore + Grilling"]
91
- SK_NEW --> SK_LINT["3 · asdlc-lint<br/>BDD & AC Quality"]
92
- SK_LINT --> SK_APPLY["5 · asdlc-apply<br/>Task-Level TDD Engine"]
93
- SK_APPLY --> SK_VERIFY["6 · asdlc-verify<br/>12-Gate Audit"]
94
- SK_VERIFY --> SK_GATE["Stage 6.5 Impl Gate<br/>AI AC Test + AI Review + Human TL"]
95
- SK_GATE --> SK_ARCHIVE["7 · asdlc-archive<br/>Living Spec Sync"]
96
- end
97
- subgraph P3_REVIEWS ["CI Reviewers & Orientation Skills"]
98
- direction LR
99
- SK_SPECREV["asdlc-spec-review<br/>Spec PR Evaluation"]
100
- SK_IMPLREV["asdlc-impl-review<br/>Player ≠ Referee Impl Audit"]
101
- SK_DOCTOR["asdlc-doctor<br/>Diagnostics & Auto-Fix"]
102
- SK_STATUS["asdlc-status<br/>Change Dashboard"]
103
- end
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)"]
104
60
  end
105
61
 
106
- subgraph P2 ["PLANE 2 · Governance CLI & Hard CI Gates (bin/asdlc.js · Deterministic Exit Codes)"]
107
- direction TB
108
- subgraph P2_STAGES ["7-Stage Lifecycle CLI Commands"]
109
- direction LR
110
- CMD_INIT["init"] --> CMD_NEW["new"]
111
- CMD_NEW --> CMD_LINT["lint"]
112
- CMD_LINT --> CMD_PR1["pr (spec)"]
113
- CMD_PR1 --> CMD_APPROVE["approve"]
114
- CMD_APPROVE --> CMD_APPLY["apply"]
115
- CMD_APPLY --> CMD_TEST["test"]
116
- CMD_TEST --> CMD_VERIFY["verify"]
117
- CMD_VERIFY --> CMD_PR2["pr (impl)"]
118
- CMD_PR2 --> CMD_ARCHIVE["archive"]
119
- end
120
- subgraph P2_GATES ["Cryptographic & Hard Verification Engines"]
121
- direction LR
122
- G_LOCK["approvedSha Gate<br/>Commit Lock on main"]
123
- G_TAMPER["spec-tamper Gate<br/>Anti-Cheat Tree Audit"]
124
- G_COV["R5 Scenario Coverage<br/>Scenario = AC Traceability"]
125
- G_RUNNER["asdlc test Runner<br/>(test: path) Execution"]
126
- G_PRESENCE["test-presence Gate<br/>Code Diff = Test Diff"]
127
- G_TRIPLE["Triple-Review Gate<br/>AI AC Test + AI Review + Human TL"]
128
- end
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)"]
129
70
  end
130
71
 
131
- subgraph P1 ["PLANE 1 · Core Library (src/lib/ · Pure Functions, Zero Side-Effects, 100% Tested)"]
132
- direction LR
133
- subgraph P1_GOV ["Spec & Governance Engine"]
134
- direction TB
135
- M_LINT["speclint.js · R0–R8 Rules"]
136
- M_POLICY["policy.js · .sdlc/policy.yaml"]
137
- M_SCHEMA["schema.js · Version Pinning"]
138
- M_AGENTS["agents.js · AGENTS.md Refresh"]
139
- end
140
- subgraph P1_GRAPH ["AST & Repository Context"]
141
- direction TB
142
- M_GRAPH["graphify.js · Knowledge Topology"]
143
- M_GIT["git.js · Path-Limited Queries"]
144
- M_FS["fs.js · Safe File Primitives"]
145
- M_PATHS["paths.js · Canonical Paths"]
146
- end
147
- subgraph P1_EXEC ["TDD & Gate Verification"]
148
- direction TB
149
- M_TDD["tdd.js · Evidence Parser"]
150
- M_TEST["commands/test.js · Test Runner"]
151
- M_PRTYPE["prtype.js · PR Classifier"]
152
- M_EXEC["exec.js · Process Isolation"]
153
- end
154
- end
155
-
156
- P3 ==>|"Invokes CLI commands with --json"| P2
157
- P2 ==>|"Calls pure library functions"| P1
158
-
159
- classDef p3Style fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#ffffff,rx:8px,ry:8px;
160
- classDef p2Style fill:#0f172a,stroke:#0ea5e9,stroke-width:2px,color:#ffffff,rx:8px,ry:8px;
161
- classDef p1Style fill:#022c22,stroke:#10b981,stroke-width:2px,color:#ffffff,rx:8px,ry:8px;
162
- classDef subCard fill:#020617,stroke:#334155,stroke-width:1.5px,color:#94a3b8;
163
- classDef nodeStyle fill:#1e293b,stroke:#475569,stroke-width:1px,color:#f8fafc,rx:6px,ry:6px;
164
- classDef cmdStyle fill:#0f172a,stroke:#38bdf8,stroke-width:1px,color:#38bdf8,font-weight:bold,rx:4px,ry:4px;
165
- classDef gateCard fill:#1e293b,stroke:#f59e0b,stroke-width:1px,color:#fef3c7,rx:6px,ry:6px;
166
-
167
- class P3 p3Style;
168
- class P2 p2Style;
169
- class P1 p1Style;
170
- class P3_STAGES,P3_REVIEWS,P2_STAGES,P2_GATES,P1_GOV,P1_GRAPH,P1_EXEC subCard;
171
- class SK_INIT,SK_NEW,SK_LINT,SK_APPLY,SK_VERIFY,SK_GATE,SK_ARCHIVE,SK_SPECREV,SK_IMPLREV,SK_DOCTOR,SK_STATUS,M_LINT,M_POLICY,M_SCHEMA,M_AGENTS,M_GRAPH,M_GIT,M_FS,M_PATHS,M_TDD,M_TEST,M_PRTYPE,M_EXEC nodeStyle;
172
- class CMD_INIT,CMD_NEW,CMD_LINT,CMD_PR1,CMD_APPROVE,CMD_APPLY,CMD_TEST,CMD_VERIFY,CMD_PR2,CMD_ARCHIVE cmdStyle;
173
- class G_LOCK,G_TAMPER,G_COV,G_RUNNER,G_PRESENCE,G_TRIPLE gateCard;
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;
174
90
  ```
175
91
 
176
- > **Rule**: Core reads and validates — it never prints and rarely writes. CLI is the thin shell (parse → call core → format → exit code). Skills are conversational coordinators — they call the CLI, interpret output, and guide multi-step flows.
92
+ ### Governance Tier Matrix
177
93
 
178
- For complete technical specifications of each plane, see [docs/architecture.md](docs/architecture.md).
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) |
179
100
 
180
101
  ---
181
102
 
182
- ## Bundled Out-of-the-Box Skills
103
+ ## 🛡️ Non-Negotiable Engineering Invariants
183
104
 
184
- `asdlc` ships all critical agent harnesses inside the package. They are installed automatically into `.agents/skills/` on `asdlc init` — no manual skill setup required.
105
+ Enterprise teams rely on deterministic code, not agent compliance or prompt enthusiasm. Every invariant is backed by cryptographic proofs or exit-coded engines:
185
106
 
186
- | **Stage & Skill** | **Purpose & Behavior** |
187
- | :--- | :--- |
188
- | **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. |
189
- | **Stage 2 · New**<br>[`asdlc-new`](assets/skills/asdlc-new/SKILL.md) | Grounds intent in Graphify AST queries, seeds `clarifications.md`, runs conversational `grill-me` (or `--batch-grill`), and scaffolds `design.md` guided by `api-design` and `frontend-design`. |
190
- | **API Design**<br>[`api-design`](assets/skills/api-design/SKILL.md) | Enforces enterprise RESTful standards: plural noun URLs, structured error envelopes (Stripe-style / RFC 7807), cursor pagination, `Idempotency-Key` headers, and rate-limiting resilience. |
191
- | **UI/UX Design**<br>[`frontend-design`](assets/skills/frontend-design/SKILL.md) | Enforces Anthropic official `frontend-design` & Vercel Web Interface Guidelines: anti-AI slop, bespoke 4–6 hex palettes, typography pairings, hero moments, and 5 mandatory states. |
192
- | **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. |
193
- | **Stage 3.5 · Spec AI Review**<br>[`asdlc-spec-review`](assets/skills/asdlc-spec-review/SKILL.md) | CI-triggered independent 6-dimension spec evaluation; posts structured findings and traceability matrix as PR comments. |
194
- | **Stage 4 · Approve**<br>[`asdlc-approve`](assets/skills/asdlc-approve/SKILL.md) | Explicit audit stamp after PR merge (`specSha` + `READY_FOR_IMPL`). Auto-recognized by `apply`. |
195
- | **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. |
196
- | **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. |
197
- | **Stage 6.5 · Impl AI Review**<br>[`asdlc-impl-review`](assets/skills/asdlc-impl-review/SKILL.md) | CI-triggered independent implementation reviewer incorporating Anthropic code review principles: anti-thrashing convergence (3-round cap, incremental diffs), repo-level `REVIEW.md` contracts, introduced-vs-preexisting defect attribution, and risk tiering; posts findings as PR comments via `gh`. |
198
- | **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. |
199
- | **Diagnostics**<br>[`asdlc-doctor`](assets/skills/asdlc-doctor/SKILL.md) | Evaluates 12 toolchain/governance invariants; provides automated 1-click remediation (`--fix`). |
200
- | **Orientation**<br>[`asdlc-status`](assets/skills/asdlc-status/SKILL.md) | Shows change stage progress, active artifacts, next command, or full portfolio dashboard. |
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. |
117
+
118
+ ---
119
+
120
+ ## 📦 Architecture: The Three Planes
121
+
122
+ `agentic-sdlc` strictly decouples interface, governance rules, and core execution:
123
+
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
+ ```
201
146
 
202
147
  ---
203
148
 
204
- ## Install & Setup
149
+ ## 🚀 Quickstart: 5-Minute Walkthrough
150
+
151
+ > 🧭 **New to Agentic SDLC?**
152
+ > 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!
153
+
154
+ ### 1. Installation
205
155
 
206
156
  ```bash
207
- # Recommended: install from npm
157
+ # Install globally via npm
208
158
  npm install -g @akjamie/agentic-sdlc
209
159
 
210
- # Or directly from GitHub (npm ≥12 requires --allow-git=all)
211
- npm install -g --allow-git=all git+https://github.com/akjamie/agentic-sdlc.git
160
+ # Initialize your repository with OpenSpec, Graphify, and bundled skills
161
+ asdlc init
212
162
 
213
- # Initialize a repository (installs OpenSpec, Graphify, policy, and bundled skills)
214
- asdlc init --ci jenkins
215
-
216
- # Verify toolchain health at any time
163
+ # Verify environment & toolchain health
217
164
  asdlc doctor
218
165
  ```
219
166
 
220
- > **One-liner health check**: `asdlc doctor` evaluates 12 invariants across your toolchain and governance setup, with `--fix` for automated remediation.
167
+ ### 2. Scenario A: Agile Routine Change (Level L1 · Single-PR)
221
168
 
222
- ---
169
+ ```bash
170
+ # 1. Start a routine change (automatically inferred as L1)
171
+ asdlc new "add memory cache helper with TTL eviction"
223
172
 
224
- ## The Seven Stages
173
+ # 2. Directly implement using the task-level TDD loop (no Spec PR needed!)
174
+ asdlc apply memory-cache-helper
225
175
 
226
- The lifecycle is divided into three phases. Human approval gates are explicit; the CI automation pipeline is non-bypassable.
176
+ # 3. Verify locally against 12 quality gates
177
+ asdlc verify memory-cache-helper
227
178
 
228
- ```mermaid
229
- flowchart TD
230
- subgraph PHASE1 ["Phase A · Specification & Alignment (Intent to Contract)"]
231
- direction LR
232
- S1["1 · init<br/><b>Toolchain Setup</b><br/>OpenSpec + Graphify"] --> S2["2 · new<br/><b>Scaffold + Batch-Grill-Me</b><br/>AST explore.md + clarifications.md"]
233
- S2 --> S3["3 · lint<br/><b>BDD/AC Gate</b><br/>R0–R8 + Scenario Coverage"]
234
- S3 --> PR1{{"<b>Spec PR (Stage 3.5)</b><br/>CI Spec AI Review"}}
235
- PR1 -->|"Human TL Approves & Merges"| S4["4 · approve<br/><b>Cryptographic Lock</b><br/>approvedSha & ready_for_impl"]
236
- end
179
+ # 4. Open Single PR (co-locates spec delta and code)
180
+ asdlc pr memory-cache-helper main
181
+ # → Auto-merge eligible once CI & AI checks pass!
182
+ ```
237
183
 
238
- subgraph PHASE2 ["Phase B · Implementation & Hard Gate TDD (Contract to Verified Code)"]
239
- direction LR
240
- S4 -.->|"Guarded Unlock"| S5["5 · apply<br/><b>Apply Guard Check</b><br/>Refuses unapproved specs"]
241
- S5 --> S5_TDD["<b>TDD Red-Green Loop</b><br/>Red -> Green -> Refactor"]
242
- S5_TDD --> S5_TEST["5.5 · test<br/><b>Acceptance Tests</b><br/>Runs mapped AC assertions"]
243
- S5_TEST --> S6["6 · verify<br/><b>12 Local Gates</b><br/>spec-tamper + test-presence"]
244
- S6 --> PR2{{"<b>Impl PR (Stage 6.5)</b><br/>asdlc pr (impl)"}}
245
- end
184
+ ### 3. Scenario B: High-Impact API Change (Level L2 · Dual-PR Spec-First)
246
185
 
247
- subgraph PHASE_GATE ["Stage 6.5 Quality Gate · Triple-Verification Peer Review"]
248
- direction LR
249
- G_AC["<b>1 · CI Acceptance Test</b><br/>asdlc test --json"] --> G_AI["<b>2 · AI Impl Review</b><br/>Player ≠ Referee Audit"]
250
- G_AI --> G_HUMAN{{"<b>3 · Human Final Review</b><br/>Tech Lead Sign-off"}}
251
- end
186
+ ```bash
187
+ # 1. Start an API change (automatically detected as L2 Spec-First)
188
+ asdlc new "create FastAPI user authentication router"
252
189
 
253
- subgraph PHASE3 ["Phase C · Closeout & Living Catalog (Trunk Archive)"]
254
- direction LR
255
- S7["7 · archive<br/><b>Living Spec Sync</b><br/>openspec/specs/ + AST Refresh"]
256
- end
190
+ # 2. Agent runs conversational grill-me to settle design in clarifications.md
191
+ # Drafts proposal.md, design.md, and specs/
257
192
 
258
- PR2 ==> G_AC
259
- G_HUMAN -.->|"Approved & Merged to main"| S7
260
-
261
- classDef stageBox fill:#0f172a,stroke:#38bdf8,stroke-width:1.5px,color:#f8fafc,rx:6px,ry:6px;
262
- classDef prBox fill:#312e81,stroke:#a855f7,stroke-width:2px,color:#ffffff,rx:10px,ry:10px;
263
- classDef lockBox fill:#451a03,stroke:#f59e0b,stroke-width:2px,color:#ffffff,rx:6px,ry:6px;
264
- classDef closeBox fill:#064e3b,stroke:#10b981,stroke-width:2px,color:#ffffff,rx:6px,ry:6px;
265
- classDef gateBox fill:#1e293b,stroke:#f59e0b,stroke-width:1.5px,color:#fef3c7,rx:6px,ry:6px;
266
- classDef humanBox fill:#4c1d95,stroke:#c084fc,stroke-width:2px,color:#ffffff,rx:10px,ry:10px;
267
- classDef subStyle fill:#020617,stroke:#334155,stroke-width:1.5px,color:#94a3b8;
268
-
269
- class S1,S2,S3,S5,S5_TDD,S5_TEST,S6 stageBox;
270
- class PR1,PR2 prBox;
271
- class G_AC,G_AI gateBox;
272
- class G_HUMAN humanBox;
273
- class S4 lockBox;
274
- class S7 closeBox;
275
- class PHASE1,PHASE2,PHASE_GATE,PHASE3 subStyle;
276
- ```
193
+ # 3. Open Spec PR (triggers CI AI Spec Review)
194
+ asdlc pr user-auth main
277
195
 
278
- ### Stage Reference
196
+ # 4. Human Tech Lead reviews & merges Spec PR to main.
197
+ # asdlc approve locks the specSha!
279
198
 
280
- | Stage & Command | What It Does |
281
- | :--- | :--- |
282
- | **1 · Init**<br>`asdlc init [--ci jenkins]` | Bootstraps OpenSpec + Graphify, governance schema, policy, and 8+ bundled agent skills. |
283
- | **2 · New**<br>`asdlc new "<requirement>" [--batch-grill] [--no-grill]` | Derives slug, queries code AST graph, seeds `design.md` for UI/API systems, and interviews author (conversational `grill-me` or `--batch-grill`). |
284
- | **3 · Spec PR**<br>`asdlc pr <ID> <branch>` | Runs `asdlc lint` (R0–R8 + `R5-scenario-coverage`), pushes spec branch, attaches `asdlc:spec-review` label, triggers CI Spec AI Review. |
285
- | **4 · Approve**<br>`asdlc approve <ID>` | Spec PR merge to `main` **is** the approval: records path-limited `specSha` and sets `READY_FOR_IMPL`. CI mode auto-detects merged PRs. |
286
- | **5 · Apply**<br>`asdlc apply <ID>` | **Hard guard**: verifies `approvedSha` on `main`, **refuses** unapproved specs, then launches the task-level TDD Red-Green loop. |
287
- | **5.5 · Acceptance Tests**<br>`asdlc test <ID> [--json]` | Parses `- [ ] ACn: ... (test: <path>)` mappings and runs real assertions. Local TDD driver + deterministic CI gate. |
288
- | **6 · Verify**<br>`asdlc verify <ID>` | 12-gate local pre-flight: `spec-tamper`, `test-presence`, `tdd-evidence`, AC mappings, task completion, schema, and more. |
289
- | **6.5 · Impl PR**<br>`asdlc pr <ID> <branch>` | Runs `asdlc verify`, pushes impl branch, attaches `asdlc:impl-review`, triggers ① CI `asdlc test --json` + ② CI AI Impl Review (Player ≠ Referee). |
290
- | **7 · Archive**<br>`asdlc archive <ID>` | After Tech Lead merges Impl PR to `main`: syncs specs to `openspec/specs/`, refreshes AST graph, updates `AGENTS.md` system status. |
199
+ # 5. Implementation is now unlocked
200
+ asdlc apply user-auth
201
+
202
+ # 6. Execute TDD loop and verify code + test presence
203
+ asdlc test user-auth
204
+ asdlc verify user-auth
291
205
 
292
- ### Dual-PR Governance & Label Dispatch
206
+ # 7. Open Implementation PR (attaches asdlc:impl-review)
207
+ asdlc pr user-auth main
208
+ # → Mandatory Human Tech Lead approval required before trunk merge!
209
+ ```
293
210
 
294
- `asdlc pr` auto-detects Spec vs. Implementation PR from lifecycle state — zero extra flags needed.
211
+ ---
295
212
 
296
- | PR Type | Pre-flight Check | Labels Applied | CI Pipeline | Human Gate |
297
- | :--- | :--- | :--- | :--- | :--- |
298
- | **Spec PR** (Stage 3.5) | `asdlc lint` — 0 blockers, R5 coverage | `asdlc:spec-review` · `spec` | Spec AI Review (6 dimensions) | TL / Domain Lead approves & merges to `main` |
299
- | **Impl PR** (Stage 6.5) | `asdlc verify` — 12 gates | `asdlc:impl-review` · `impl` | ① `asdlc test --json` (AC gate) → ② `asdlc-impl-review` (Player ≠ Referee) | Tech Lead verifies AI review + AC results, then approves & merges |
213
+ ## 🧰 Bundled Out-of-the-Box Skills
300
214
 
301
- ### Utility Commands
215
+ `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:
302
216
 
303
- | Command | Purpose |
217
+ | Skill | Role in Agentic SDLC |
304
218
  | :--- | :--- |
305
- | `asdlc status <ID>` | Instant orientation: current stage, active artifacts, exact next command. |
306
- | `asdlc doctor [--fix]` | 12-invariant toolchain health check with automated remediation. |
307
- | `asdlc update` | Refreshes `.agents/skills`, rebuilds AST graph at `HEAD`, updates `AGENTS.md` hubs and git hooks. |
308
- | `asdlc upgrade [--global]` | Upgrades `asdlc` CLI, OpenSpec engine, Graphify, and managed schema. `--global` updates user-level skills. |
309
- | `asdlc skills list` | Lists all bundled skills available in the package. |
310
- | `asdlc skills install --global` | Injects skills into global agent dirs (`~/.agents`, `~/.opencode`, etc.) for CI VMs. |
219
+ | [`asdlc-init`](assets/skills/asdlc-init/SKILL.md) | One-command bootstrapping of OpenSpec, Graphify AST, policies, and git hooks. |
220
+ | [`asdlc-new`](assets/skills/asdlc-new/SKILL.md) | Scaffolds change, queries AST hubs, runs conversational anti-fatigue `grill-me`. |
221
+ | [`asdlc-lint`](assets/skills/asdlc-lint/SKILL.md) | Enforces deterministic BDD GIVEN/WHEN/THEN and R5 scenario-to-AC coverage. |
222
+ | [`asdlc-pr`](assets/skills/asdlc-pr/SKILL.md) | Smart PR dispatcher: automatically handles Spec PR vs. Implementation PR. |
223
+ | [`asdlc-approve`](assets/skills/asdlc-approve/SKILL.md) | Stamps cryptographic `specSha` lock upon Spec PR merge. |
224
+ | [`asdlc-apply`](assets/skills/asdlc-apply/SKILL.md) | Strict task-level TDD engine (`Red -> Green -> Refactor -> Evidence -> Converge`). |
225
+ | [`asdlc-verify`](assets/skills/asdlc-verify/SKILL.md) | Pre-flight audit across 12 gates (test presence, evidence, tamper guard, schema). |
226
+ | [`asdlc-spec-review`](assets/skills/asdlc-spec-review/SKILL.md) | CI-triggered 6-dimensional spec review before human lead approval. |
227
+ | [`asdlc-impl-review`](assets/skills/asdlc-impl-review/SKILL.md) | CI-triggered Player ≠ Referee implementation reviewer with Anthropic convergence rules. |
228
+ | [`asdlc-archive`](assets/skills/asdlc-archive/SKILL.md) | Syncs specs to living catalog, refreshes AST graph, and updates system status. |
229
+ | [`asdlc-doctor`](assets/skills/asdlc-doctor/SKILL.md) | 12-invariant diagnostic engine with 1-click automated remediation (`--fix`). |
230
+ | [`asdlc-status`](assets/skills/asdlc-status/SKILL.md) | Real-time change lifecycle dashboard and next actionable command guidance. |
311
231
 
312
232
  ---
313
233
 
314
- ## What `asdlc verify` Checks
234
+ ## 🔍 What `asdlc verify` Checks (12 Local & CI Gates)
315
235
 
316
- `asdlc verify` runs identically in developer terminals and CI (Jenkins / GitHub Actions). It is deterministic and exit-coded — no drift between local and remote.
236
+ Every implementation diff must pass the 12 deterministic gates in `asdlc verify`:
317
237
 
318
238
  ```mermaid
319
239
  flowchart TD
@@ -322,7 +242,7 @@ flowchart TD
322
242
  subgraph TIER1 ["Tier 1 · Cryptographic & Contract Integrity"]
323
243
  G_APPROVED["<b>approved-spec</b><br/>Matches commit on main"]
324
244
  G_TAMPER["<b>spec-tamper</b><br/>Zero spec modifications in Impl PR"]
325
- G_STATE["<b>flow-state</b><br/>Status is READY_FOR_IMPL"]
245
+ G_LEVEL["<b>level-integrity</b><br/>Hash-chain tamper check"]
326
246
  G_ARTIFACTS["<b>artifacts</b><br/>proposal, tasks, spec delta present"]
327
247
  end
328
248
 
@@ -333,81 +253,98 @@ flowchart TD
333
253
  G_TASKS["<b>tasks-complete</b><br/>All tasks checked off in tasks.md"]
334
254
  end
335
255
 
336
- subgraph TIER3 ["Tier 3 · Engine & Environment Invariants"]
337
- G_PR["<b>pr-type</b><br/>Path classification"]
338
- G_OPENSPEC["<b>openspec validate</b><br/>Schema conformance --all --strict"]
256
+ subgraph TIER3 ["Tier 3 · Scope & Governance Invariants"]
257
+ G_ESCAPE["<b>risk-escape</b><br/>Detects unannounced API/DDL escalations"]
258
+ G_HUMAN["<b>human-gate</b><br/>Enforces Tech Lead sign-off for L2/L3"]
259
+ G_PR["<b>pr-type</b><br/>Path classification & single-PR validation"]
339
260
  G_SCHEMA["<b>schema-managed</b><br/>Central install + pinned version"]
340
- G_EXTERNAL["<b>external tests</b><br/>Unit, integration, and security tests"]
341
- end
342
-
343
- subgraph TIER4 ["Tier 4 · Independent AI Review (CI Referee)"]
344
- G_AI["<b>Player ≠ Referee AI Verification</b><br/>Independent model, fresh context, spec conformance audit"]
345
261
  end
346
262
 
347
263
  V --> TIER1
348
264
  V --> TIER2
349
265
  V --> TIER3
350
- V --> TIER4
351
266
 
352
267
  classDef rootStyle fill:#1e1b4b,stroke:#818cf8,stroke-width:2px,color:#ffffff,rx:8px,ry:8px;
353
268
  classDef tierStyle fill:#020617,stroke:#334155,stroke-width:1.5px,color:#94a3b8;
354
269
  classDef gateStyle fill:#0f172a,stroke:#0284c7,stroke-width:1px,color:#f1f5f9,rx:5px,ry:5px;
355
- classDef aiStyle fill:#3b0764,stroke:#c084fc,stroke-width:1.5px,color:#fdf4ff,rx:6px,ry:6px;
356
270
 
357
271
  class V rootStyle;
358
- class TIER1,TIER2,TIER3,TIER4 tierStyle;
359
- class G_APPROVED,G_TAMPER,G_STATE,G_ARTIFACTS,G_PRESENCE,G_TDD,G_BDD,G_TASKS,G_PR,G_OPENSPEC,G_SCHEMA,G_EXTERNAL gateStyle;
360
- class G_AI aiStyle;
272
+ class TIER1,TIER2,TIER3 tierStyle;
273
+ 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;
361
274
  ```
362
275
 
363
276
  ---
364
277
 
365
- ## Governance Principles
366
-
367
- These are the design philosophy decisions behind the hard invariants — the *why* behind each gate:
368
-
369
- 1. **Approval is Git, not process** — A merged Spec PR on the protected branch (`main`) *is* the human approval. `asdlc apply` proves it via path-limited `git log` and physically halts if the spec is unapproved. There is no approval bypass.
278
+ ## 🛠️ CLI Reference
370
279
 
371
- 2. **Cryptographic anti-tampering** — Once merged to the protected branch, the spec is locked. An Implementation PR that modifies any locked spec path is immediately rejected by `spec-tamper`, blocking the oldest agent trick in the book.
280
+ ```bash
281
+ asdlc init [--ci jenkins|github] # Scaffold repository with OpenSpec, Graphify, and skills
282
+ asdlc new "<intent>" # Scaffold change with AST explore + grill-me interview
283
+ asdlc lint <ID> # Validate BDD scenarios, AC rules, and coverage (docs/spec-format.md)
284
+ asdlc pr <ID> <target-branch> # Smart PR creator (auto-handles Spec PR vs Impl PR)
285
+ asdlc approve <ID> # Record approvedSha and transition to ready_for_impl
286
+ asdlc apply <ID> # Guarded implementation launcher (checks approvedSha)
287
+ asdlc test <ID> [--json] # Execute real test runners mapped to AC annotations
288
+ asdlc verify <ID> # Audit diff against all 12 quality gates
289
+ asdlc archive <ID> # Sync delta to living specs and refresh code graph
290
+ asdlc doctor [--fix] # 12-point toolchain & governance health check
291
+ asdlc status [<ID>] # Change progress orientation or portfolio dashboard
292
+ asdlc upgrade [--global] # Seamless upgrade of CLI, engine, and schemas
293
+ ```
372
294
 
373
- 3. **Deterministic acceptance testing** — Every requirement must carry test-mapped Acceptance Criteria (`ACn: ... (test: <path>)`). `asdlc test` runs real code assertions — both a local TDD driver and an independent CI gate that can't be faked.
295
+ ---
374
296
 
375
- 4. **Player ≠ Referee isolation** — The authoring agent cannot act as its own quality gate. CI independently runs the test runner and invokes a separate AI review model with fresh context. Authoring agents cannot grade their own exams.
297
+ ## 🧪 Development & Verification
376
298
 
377
- 5. **Full scenario-to-AC coverage** — The spec linter (`R5-scenario-coverage`) enforces that every declared scenario has at least one corresponding Acceptance Criterion. You can't describe complex failure modes and then only test the happy path.
299
+ `agentic-sdlc` is built to enterprise testing standards. Every feature is backed by rigorous unit, integration, and simulation tests:
378
300
 
379
- 6. **Enforced TDD via test presence** — Implementation diffs that touch production code (`src/**`) without corresponding test modifications (`test/**`) are rejected at the `test-presence` gate. No code without tests.
301
+ ```bash
302
+ git clone https://github.com/akjamie/agentic-sdlc.git
303
+ cd agentic-sdlc
304
+ npm install
380
305
 
381
- 7. **Specs grounded in code AST** — Graphify AST knowledge graph queries ground specifications in real code structure, architectural hubs, and module topology *before* drafting. Specs reflect the codebase, not aspirations.
306
+ # Run complete test suite (128 tests passing, 100% pass rate)
307
+ npm test
382
308
 
383
- 8. **One front door, fail-closed** — Everything routes through `asdlc` wrappers. There are no raw escape hatches. Any missing approval or broken invariant fails closed — never silently passes.
309
+ # Run end-to-end multi-language simulation tests
310
+ node --test test/simulation.test.js
311
+ ```
384
312
 
385
313
  ---
386
314
 
387
- ## Documentation Hub
388
-
389
- | Document | Purpose |
390
- |---|---|
391
- | [docs/usage.md](docs/usage.md) | Practical command-line and developer walkthrough. |
392
- | [docs/architecture.md](docs/architecture.md) | Complete 3-Plane Architecture & IDE Skill design specification. |
393
- | [docs/solution-review.md](docs/solution-review.md) | Solution review, gap analysis, and architectural evaluation. |
394
- | [docs/glossary.md](docs/glossary.md) | Formally locked domain model and SDLC vocabulary. |
395
- | [docs/blueprint.html](docs/blueprint.html) | Enterprise Agentic SDLC Blueprint (English). |
396
- | [docs/blueprint.zh.html](docs/blueprint.zh.html) | Enterprise Agentic SDLC Blueprint (Chinese). |
397
-
315
+ ## 📚 Documentation Center
316
+
317
+ Explore the complete documentation in the [`docs/`](docs/) directory:
318
+
319
+ - ⏱️ [**30-Minute Getting Started Guide**](docs/getting-started.md): Frictionless step-by-step tutorial from install to first Spec PR.
320
+ - 📐 [**Spec Format & Lint Reference**](docs/spec-format.md): Human-readable guide to R0–R8 lint rules with pass/fail examples.
321
+ - 🌐 [**Quickstart Guide (Bilingual)**](docs/quickstart.md): End-to-end walkthrough covering the complete 7-stage lifecycle.
322
+ - 🏛️ [**System Architecture & Whitepaper**](docs/about.md): Why Agentic SDLC, L0–L3 governance, and cryptographic anti-tamper proofs.
323
+ - 🩺 [**Environment Doctor Manual**](docs/doctor.md): Diagnostic reference for all 12 health checks and `--fix` automated healing.
324
+ - ⌨️ [**CLI Command Reference**](docs/usage.md): Full flag, option, and exit code reference for all `asdlc` commands.
325
+ - 📖 [**Standard Glossary**](docs/glossary.md): Authoritative lexicon for living specs, spec SHAs, and architectural god nodes.
326
+
398
327
  ---
399
-
400
- ## Development & Verification
401
-
402
- ```bash
403
- npm install
404
- npm test # 89 unit and integration tests — 100% pass rate
405
- ```
406
-
407
- The test suite covers the core governance library (`src/lib/`), all CLI commands, acceptance test execution, spec linting rules (R0–R8 + R5 scenario coverage), and verify gate logic (including `spec-tamper`, `test-presence`, and `tdd-evidence`).
328
+
329
+ ## 🤝 Community & Contributing
330
+
331
+ We welcome contributions from developers, architects, and researchers advancing the state of Agentic Software Engineering!
332
+
333
+ - **Contributing Guide**: Check out [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, development conventions, and PR expectations.
334
+ - **Specification & Linting Reference**: Read [docs/spec-format.md](docs/spec-format.md) for R0–R8 pass/fail examples, BDD rules, and troubleshooting remedies.
335
+ - **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)).
336
+ - **Architectural Specs**: Read [docs/architecture.md](docs/architecture.md) for deep dives on the 3-plane model.
337
+ - **Enterprise Blueprint**: Browse [docs/blueprint.md](docs/blueprint.md) (or [Chinese version](docs/blueprint.zh.md)) for enterprise deployment patterns.
338
+ - **Documentation Index**: See [docs/README.md](docs/README.md) for the active documentation catalog.
408
339
 
409
340
  ---
410
341
 
411
- ## License
342
+ ## 📄 License & Attribution
343
+
344
+ Distributed under the **Apache-2.0 License**. See [LICENSE](LICENSE) and [NOTICE](NOTICE) for details.
412
345
 
413
- [MIT](LICENSE)
346
+ ```markdown
347
+ Project: agentic-sdlc (Enterprise Agentic SDLC Governance)
348
+ Author: Jamie Zhang (@akjamie)
349
+ Repository: https://github.com/akjamie/agentic-sdlc
350
+ ```