using-aisdlc (Using AI SDLC / Spec Pack Process in sdlc-dev)
Overview
This is a "Navigation + Guardrail" type Skill: used in the Spec Pack (
) process of sdlc-dev,
this Skill acts as the "only Router" to determine which skill to use next, and uses hard guardrails to prevent context drift and incorrect directory writes.
Announce at the start: "I am using the using-aisdlc skill to navigate the Spec Pack process and perform guardrail checks."
This Skill now covers two main paths:
- Demand Path (R0–R4):
raw.md → solution.md → prd.md → prototype.md → demo/
- Design Path (D0–D2, can be skipped entirely):
D0 Diversion → (Optional) D1 research → (If not skipped) D2 RFC
- Development Path (I1–I2 + Finish):
solution/prd/design → implementation/plan.md → Execute Implementation → finishing-development
Core Principles:
- Context first, read/write later: For any read/write operations on
{FEATURE_DIR}/requirements/*
, , {FEATURE_DIR}/implementation/*
(or writing demo in R4) → first run to get (stop if it fails).
- One node = one skill = one persisted artifact: Execute R0/R1/R2/R3/R4 step by step; prohibit "completing PRD + prototype + Demo all at once".
- Progressive disclosure: First read project-level and related contract indexes; only read/write
{FEATURE_DIR}/requirements/*
after clearly handling a specific Spec.
- Do not write "to-be-confirmed issue list" for uncertainties: Uniformly enter into a "validation checklist" (Owner/Deadline/Signal/Action).
- Closed-loop feedback: Verification findings from R3/R4 will flow back to update R1/R2/R3 (re-run R4 if necessary).
- SSOT for implementation phase: During implementation,
{FEATURE_DIR}/implementation/plan.md
serves as the single source of truth (SSOT) for the execution checklist and status (checkbox + audit information); execution status is only written back to .
Routing Contract (Only Authority: Next Step Determined Solely by using-aisdlc)
In the Spec Pack scenario of this repository, the judgment of "what to do next/whether to skip/which path to take" can only be made by using-aisdlc.
Other skills (R1/R2/R3/R4/D1/D2/I1/I2/Finish) are worker skills: they only handle guardrails for their phase, persist artifacts, and perform DoD self-checks. They must not:
- "Autonomously divert to the next skill" within the skill (e.g., "automatically proceed to X after completion")
- Make routing conclusions like "skip/not skip a phase" within the skill (at most perform foolproof checks: stop if preconditions are not met, and prompt to return to using-aisdlc)
Important Supplement: Router allows auto-advance. As the Router, using-aisdlc
can execute in series within the same conversation following guardrails:
spec-context → worker skill → (Optional) re-route
.
Worker skills still cannot "decide the next step on their own", but can provide structured artifact and status summaries at the end to facilitate the Router's judgment on whether to continue auto-advancing.
Unified Loop Output: After any worker skill completes, output the following uniformly (both sections are required):
- "The artifact for this phase has been persisted. Please return to for next-step routing (if no manual guardrail is triggered, the Router can continue automatically)."
- (structured summary for automatic routing; YAML format is recommended with fixed fields, avoid free text):
- : e.g., / / / / /
- : array of artifact paths (can be empty)
- :
- :
- : string (empty if none)
- : string (can be empty)
Auto-Advance Strategy (Improve Experience and Efficiency)
Goal: Without sacrificing guardrails and SSOT, turn "return to using-aisdlc" from manual operation to default automatic behavior; only stop when user intervention is truly needed.
Trigger Conditions for Auto-Advance (Satisfy Any One)
- User explicitly states: "Continue / Next step / Follow recommendation / Auto-advance / Run through the shortest loop / Take me through the process directly"
- Current conversation intent is clear and unidirectional: e.g., user says "I want to create PRD/prototype/Demo/implementation plan/start implementation", and all pre-requisite artifacts are complete
- from the previous worker skill marks: and
Scenarios That Must Stop and Hand Over to the User (Manual Guardrails)
- Requires user review and confirmation: The artifact will become the authoritative input for subsequent phases, and the cost of errors is high
- Typical examples: (especially ), , , ,
- Better for user to make path choices: Multiple reasonable routes exist, and the Router may choose the wrong one with default strategies alone
- Typical diversion points: Whether to supplement R2/R3/R4; whether to enter implementation (I1/I2); whether to skip design in D0 (if user has not indicated preference)
- Missing critical external input: Cannot proceed without it
- Typical examples: fails; R4 cannot find ; worker skill marks
Exception: If the user explicitly requests "directly develop following the shortest loop and accept default decisions", using-aisdlc can automatically determine whether to skip design in D0 based on the decision table, and automatically enter I1; however, before entering I2 (modifying code), it should still confirm the user's intent is "start implementation" rather than "only produce a plan".
Default Auto-Advance Sequence (When Auto-Advance is Allowed)
- Guardrails first: If the next step triggers read/write operations on or writes demo, first run and echo (stop if it fails)
- Then execute: Call the only routed worker skill and complete artifact persistence
- Then re-route: Read , continue if auto-advance conditions are met; otherwise output "reason for stopping + minimal action requiring user selection/review"
Routing Input/Output (Conversation-Level Protocol)
- Input (Minimum Information Required for Routing): User intent (what to produce/which phase to enter) + current Spec context (must obtain
FEATURE_DIR/CURRENT_BRANCH/REPO_ROOT
via ).
- Decision Basis (Only Recognize SSOT Files and Guardrails):
- R0:
{FEATURE_DIR}/requirements/raw.md
- R1:
{FEATURE_DIR}/requirements/solution.md
(must contain , anchor )
- R2:
{FEATURE_DIR}/requirements/prd.md
- R3:
{FEATURE_DIR}/requirements/prototype.md
- D1:
{FEATURE_DIR}/design/research.md
- D2:
{FEATURE_DIR}/design/design.md
- I1:
{FEATURE_DIR}/implementation/plan.md
- Output (Only "Next Step Instruction" Format):
- You are currently in:
- Next step (only one):
- Must pass first:
spec-context → FEATURE_DIR=...
(and hard guardrails of this Skill)
- Will produce:
<Persisted Artifact Path>
When to Use / Not to Use
-
Use Cases
- You want to start/continue a Spec: generate or update
raw.md / solution.md / prd.md / prototype.md / demo
- You want to push a "simple requirement" directly to the development loop:
solution.md → plan.md → execute → finishing
- You want to decide the design phase route: whether to skip design, whether research is needed, whether RFC (design/design.md) is needed
- You are unsure "which spec-product-* skill to run now"
- You are unsure "whether to run spec-implementation-plan / spec-implementation-execute or first supplement demand inputs"
-
Do Not Use
- Only discussing concepts, not involving persisted files and directory structures of the Spec Pack in this repository
Only Guardrails (Must Be Followed)
Rule: As long as the task involves reading/writing any of the following, you must first run and echo :
{FEATURE_DIR}/requirements/raw.md
{FEATURE_DIR}/requirements/solution.md
{FEATURE_DIR}/requirements/prd.md
{FEATURE_DIR}/requirements/prototype.md
{FEATURE_DIR}/design/*.md
(e.g., , )
{FEATURE_DIR}/implementation/plan.md
{REPO_ROOT}/demo/prototypes/{CURRENT_BRANCH}/...
(R4)
This applies even if the user verbally provides . (The most common violation in baseline testing: treating "user-provided path" as trusted context.)
Command Writing Convention: Default to PowerShell; use
to separate multiple commands on the same line (do not use
).
The Shortest Loop You Need (Simple Requirement Development): raw → solution.md → plan.md → execute → finishing-development
Applicable Premises (Satisfy Any One):
- Single scope, clear boundaries, low risk, no need for additional design phase decision documents (can determine to skip design per D0 in
design/aisdlc_spec_design.md
)
- Traceable acceptance criteria: At least can write clear acceptance points in (or more complete )
Shortest Loop (Recommended to Run First):
- R0: Persist raw (if package not yet created)
- Use:
- Output:
{FEATURE_DIR}/requirements/raw.md
- Guardrail: Locate Spec Context
- Use:
- Requirement: Must echo in the conversation; stop if it fails
- R1: raw → solution (Converge on a Solution)
- Use:
- Output:
{FEATURE_DIR}/requirements/solution.md
- Artifact Guardrail: must contain (anchor ), as constrained input for subsequent D2/I1
- Compatibility Note: Users may say , but the SSOT for demand side in this repository is (singular); do not create to avoid dual SSOT
- D0: Diversion Judgment (Whether Design Phase is Needed)
- Use: (This Skill is responsible for judgment; no persistence or reference to diversion conclusion in subsequent artifacts)
- Conclusion: Skip design → I1; Do not skip → (As needed) D1/D2
- I1: solution/prd/design → plan (Write to Executable)
- Use:
- Output:
{FEATURE_DIR}/implementation/plan.md
(SSOT for execution checklist and status)
- I2: Execute in Batches per Plan (Implementation + Write Back Status/Audit)
- Use:
spec-implementation-execute
- Rule: Execution status is only written back to ; stop when encountering / blocked
- Finish: Development Completion Confirmation (Verification Only, Complete Only When All Green)
- Use:
- Output: A "completion confirmation report" (including actually executed commands and results)
Core Workflows (Demand Side R0 → R4; Design Side D0 → (Optional) D1 → (Optional) D2; Implementation Side I1 → I2 → Finish)
dot
digraph aisdlc_flow {
rankdir=LR;
node [shape=box];
"Need to handle a requirement (Spec)" -> "Is there a valid spec branch/Spec Pack?";
"Is there a valid spec branch/Spec Pack?" [shape=diamond];
"Is there a valid spec branch/Spec Pack?" -> "R0: spec-init" [label="No / Uncertain"];
"R0: spec-init" -> "Run spec-context" ;
"Is there a valid spec branch/Spec Pack?" -> "Run spec-context" [label="Yes"];
"Run spec-context" -> "Obtain FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT";
"Obtain FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT" -> "Select demand path R1-R4 (Optional)";
"Obtain FEATURE_DIR / CURRENT_BRANCH / REPO_ROOT" -> "D0: Skip design?";
"Select demand path R1-R4 (Optional)" -> "R1: raw->solution (with Impact Analysis)";
"R1: raw->solution (with Impact Analysis)" -> "R2: solution->prd (Optional)";
"R2: solution->prd (Optional)" -> "R3: prd->prototype (Optional)";
"R3: prd->prototype (Optional)" -> "R4: prototype->demo (Optional)";
"D0: Skip design?" [shape=diamond];
"D0: Skip design?" -> "I1: spec-implementation-plan" [label="Yes (Skip)"];
"D0: Skip design?" -> "D1: spec-design-research (Optional)" [label="No, and research needed"];
"D0: Skip design?" -> "D2: spec-design (RFC)" [label="No, and no research needed"];
"D1: spec-design-research (Optional)" -> "D2: spec-design (RFC)";
"R1: raw->solution (with Impact Analysis)" -> "D0: Skip design?";
"R2: solution->prd (Optional)" -> "D0: Skip design?";
"R3: prd->prototype (Optional)" -> "D0: Skip design?";
"D2: spec-design (RFC)" -> "I1: spec-implementation-plan";
"I1: spec-implementation-plan" -> "I2: spec-implementation-execute";
"I2: spec-implementation-execute" -> "Finish: finishing-development";
}
D0/D1/D2 Routing Rules (Determined by using-aisdlc)
The caliber and details of the design phase are subject to
design/aisdlc_spec_design.md
; only the executable routing decision table is provided here.
D0: Whether to Skip Design Phase (Only Determined by using-aisdlc)
- Consider skipping (satisfy any one to consider): Single scope with clear boundaries / no changes to external commitments (API/events/permissions/data caliber) and no migration rollback / no critical technical uncertainties / acceptance criteria are sufficiently traceable
- Default to not skip (hit any one): Changes to external contracts/permissions/calibers, data migration/rollback, high-risk uncertainties, large impact on multiple systems/upstream and downstream, team explicitly requires RFC review
Conclusion:
- Skip → Route to (I1), and require supplementing minimal decision information in
- Do not skip → Enter D1/D2 diversion
D1: Whether Research is Needed (Only Determined by using-aisdlc)
Route to
(need D1) if any of the following are hit:
- Solution correctness depends on unknown facts (if X is not true, the entire solution will be overturned)
- Multiple solutions lack evidence to support trade-offs
- High-risk points exist in external contracts/migration/security/performance/consistency that need to be verified first
Otherwise: Directly route to
to produce D2 (RFC).
D2: Execute RFC (Worker Skill spec-design Persists Artifact)
When routed to D2,
is only responsible for producing/updating:
{FEATURE_DIR}/design/design.md
And must consume:
solution.md#impact-analysis
+ full text of affected module component pages + full text of related ADRs; must explicitly mark
if any are missing.
R0: Initialize New Spec Pack
- Use:
- When: No branch and
.aisdlc/specs/{num}-{short-name}/
directory exist yet
- Output:
{FEATURE_DIR}/requirements/raw.md
(UTF-8 with BOM)
- After completion: Return to for next-step routing (usually first , then enter R1)
R1: Clarification + Solution Decision (raw → solution)
- Use:
- Pre-requisite Input: succeeds;
{FEATURE_DIR}/requirements/raw.md
exists and is non-empty
- Key Discipline: One question at a time (prioritize multiple-choice questions) + incrementally write back to
raw.md/## Clarification Records
+ stop mechanism
- Output:
{FEATURE_DIR}/requirements/solution.md
- Artifact Guardrail: must contain (), and can be directly referenced by D2/I1/I2
- After completion: Return to for next-step routing (R2/R3/R4/D0→I1/D1/D2 etc., uniformly determined by this Skill)
R2: PRD (solution → prd, Optional)
- Use:
- Pre-requisite Input:
{FEATURE_DIR}/requirements/solution.md
must exist
- Output:
{FEATURE_DIR}/requirements/prd.md
- After completion: Return to for next-step routing
R3: Prototype (prd → prototype, Optional)
- Use:
- Pre-requisite Input:
{FEATURE_DIR}/requirements/prd.md
must exist
- Output:
{FEATURE_DIR}/requirements/prototype.md
- After completion: Return to for next-step routing (enter R4 as needed; flow back to R1/R2/R3 if issues are found)
R4: Interactive Demo (prototype → demo, Optional)
- Use:
- Pre-requisite Input:
{FEATURE_DIR}/requirements/prototype.md
must exist; Demo project root directory can be located (stop and request if not found)
- Output: Default to
{REPO_ROOT}/demo/prototypes/{CURRENT_BRANCH}/
- After completion: Return to for next-step routing (run walkthrough; flow back to update R1/R2/R3/R4 as needed if issues are found)
D1: Research (Optional)
- Use:
- Pre-requisite Input: exists and is traceable;
- Output:
{FEATURE_DIR}/design/research.md
- After completion: Return to to route to D2 or return to R1 to revise inputs
D2: Design (RFC / Decision Document; Mandatory if Not Skipped)
- Use:
- Pre-requisite Input: Must read
solution.md#impact-analysis
, and read full text of affected module component pages and related ADRs (must write if not readable)
- Output:
{FEATURE_DIR}/design/design.md
- After completion: Return to to route to I1
I1: Implementation Plan (solution/prd/design → plan.md, Mandatory)
- Use:
- Pre-requisite Input: succeeds; at least one of
{FEATURE_DIR}/requirements/solution.md
or exists (otherwise must mark in and block entry to I2)
- Output:
{FEATURE_DIR}/implementation/plan.md
(SSOT for execution checklist and status)
- After completion: Return to to route to I2
I2: Execution (Batch Implementation per plan.md and Write Back, Mandatory)
- Use:
spec-implementation-execute
- Pre-requisite Input:
{FEATURE_DIR}/implementation/plan.md
must exist and be executable; return to I1 if it does not exist/is not executable
- Output: Code and configuration changes + write back of checkbox/audit information (only source of status)
- After completion: Return to to route to Finish
Finish: Development Completion Confirmation (Verification Only, Complete Only When All Green)
- Use:
- Output: Completion confirmation report (executed commands and results are reproducible)
- After completion: Return to (or end; this Skill does not handle merging/PR/cleanup)
Quick Reference (High-Frequency Lookup)
| What You Want to Do | Must Have First | Execute Skill | Main Artifact |
|---|
| Create package for new requirement | Original requirement (text or file) | | |
| Converge on solution (with impact analysis) | | | requirements/solution.md#impact-analysis
|
| Freeze delivery specification | | | |
| Eliminate interaction ambiguity | | | requirements/prototype.md
|
| High-fidelity walkthrough | + runnable demo project root directory | | demo/prototypes/{branch}/
|
| Design research (Optional) | | | |
| Produce RFC (if not skipped) | solution.md#impact-analysis
| | |
| Write executable plan (Mandatory) | or | | |
| Implement per plan (Mandatory) | | spec-implementation-execute
| Code changes + write back |
| Development completion confirmation (Mandatory) | Code implemented + plan tasks completed | | Completion confirmation report |
As long as you read/write
{FEATURE_DIR}/requirements/*
,
,
{FEATURE_DIR}/implementation/*
, or write demo in R4: first run
, stop if it fails.
Red Flag List (Stop and Correct if Any Appears)
- Start reading/writing
{FEATURE_DIR}/requirements/*
, , {FEATURE_DIR}/implementation/*
(or start R4 demo writing) without running
- Accept verbal from user and "trust it and skip scripts"
- Continue even if reports an error (e.g., "write a version first" even on main branch)
- Generate documents first to catch up on progress, then supplement context/clarify later
- When R4 cannot find the runnable demo project root directory, initialize a Vite/Next.js project "in the location you think is appropriate" on your own
- Start "directly writing code" without
{FEATURE_DIR}/implementation/plan.md
(or if the plan is not executable)
- Write status/audit information elsewhere (issue/chat record/another file) during execution instead of writing back to
Common Errors (and How to Fix Them)
- Treat "user-provided path/branch name" as context: Still must run to echo ; stop if it cannot be executed.
- Generate first, then clarify/supplement evidence later: First complete the R1 clarification loop (one question at a time + write back), then generate artifacts after meeting DoD.
- Skip levels: Write without , write without , make demo without → stop and return to the previous step in all cases.
- Skip levels in development: Start implementation without → return to I1 to write until "executable + verifiable + auditable", then enter I2.
Common Excuses and Countermeasures (From Baseline Testing)
| Excuse (Source of Pressure) | Common Violations | Mandatory Countermeasures |
|---|
| "I already told you the FEATURE_DIR, don't run the script" | Accept verbal path and write files directly | Still must run ; stop if it cannot be executed, only deliver "blocking reason + required input/next step" |
| "I'm in a hurry, write solution.md on main first" | Skip guardrails, guess directory to write | fails → Stop; switch to a valid spec branch first or run first |
| "Do PRD/prototype/Demo all at once" | Node coupling leads to drift, cannot flow back | Split into R1→R2→R3→R4; provide next step and DoD self-check after each step |
| "Don't write the plan, directly modify the code" | Skip I1, execution is not auditable, easy to go out of bounds | First use to produce (SSOT), then use spec-implementation-execute
for batch execution and write back |
A Good Example (Correct Opening for the Shortest Path)
User: "I want to work on a new requirement, first create a solution (solution.md), I don't want to find the directory myself."
Correct Approach (First Round):
- If no spec branch/Spec Pack has been created yet → first run (persist the original requirement to )
- Then execute and echo
- Enter R1: Ask the user only 1 highest-leverage multiple-choice question; incrementally write back to
raw.md/## Clarification Records
after receiving the answer
- After meeting DoD or triggering the stop mechanism, generate , and provide the next step:
- Simple requirement for development: I1 → I2
spec-implementation-execute
→
- Need more complete specification/prototype: Enter I1/I2 only after R2/R3/R4 (as needed)