Status: Active (AISDLC-143; interactive wizard is the default)
Audience: New AI-SDLC adopters bootstrapping a repo, plus operators
extending an already-initialized repo with additional features.
Companion: orchestrator/src/cli/commands/init.ts,
orchestrator/src/cli/commands/init-features.ts,
docs/operations/quality-gate.md
# Interactive bootstrap (recommended for first-time users):
ai-sdlc init
# Non-interactive bootstrap (CI / scripted setup; accepts every default):
ai-sdlc init --yes
# Bootstrap with explicit feature opt-ins (no prompts asked):
ai-sdlc init --with-dor --with-attestation --with-branch-protection
# Bootstrap with the full GitHub Actions workflow bundle (AISDLC-261):
ai-sdlc init --with-workflows
# Extend an already-initialized repo with one feature (idempotent):
ai-sdlc init --add classifier
# Add the GitHub Actions workflow bundle to a pre-261 repo:
ai-sdlc init --add workflows
# Overwrite existing workflow files with the current templates:
ai-sdlc init --add workflows --forceThe wizard guides you through five feature toggles (DoR, attestation, review classifier, branch protection, GitHub Actions workflows) on top of an always-on baseline. After it runs, you'll see a "next steps" summary listing the operator actions needed to finish wiring the chosen features.
When you run ai-sdlc init with no flags, the wizard prompts for five
features in this order. Every prompt defaults to Yes — pressing Enter
accepts the prescriptive default ratified in Q1 of the
quality-gate redesign.
| # | Prompt | If yes, scaffolds |
|---|---|---|
| 1 | "Will this repo use Definition-of-Ready gates?" | .ai-sdlc/dor-config.yaml, .github/workflows/dor-ingress.yml |
| 2 | "Do you want attestation infrastructure (audit-only)?" | .ai-sdlc/trusted-reviewers.yaml, .ai-sdlc/attestations/.gitkeep, .github/workflows/verify-attestation.yml, .husky/pre-push (sign block appended) |
| 3 | "Add review classifier for cost-optimized reviews?" | .ai-sdlc/review-classifier.yaml (stub; runtime ships in AISDLC-141) |
| 4 | "Apply recommended branch protection?" | PUT /repos/{owner}/{repo}/branches/main/protection via gh api (required checks: ai-sdlc/pr-ready, codecov/patch) |
| 5 | "Scaffold GitHub Actions workflows (gate, review, attestation, auto-merge)?" | .github/workflows/ai-sdlc-gate.yml, .github/workflows/verify-attestation.yml, .github/workflows/ai-sdlc-review.yml, .github/workflows/auto-enable-auto-merge.yml (AISDLC-261) |
Independent of any wizard answer, every run of ai-sdlc init writes:
| Path | Purpose |
|---|---|
.ai-sdlc/pipeline.yaml |
Default pipeline definition (org/repo substituted from git remote get-url origin) |
.ai-sdlc/agent-role.yaml |
Default agent-role policy (configurable via --role coding|research|meta) |
.ai-sdlc/quality-gate.yaml |
Default quality-gate config |
.ai-sdlc/autonomy-policy.yaml |
Default autonomy-policy config |
.github/workflows/ai-sdlc-gate.yml |
The single rollup ai-sdlc/pr-ready PR-ready gate (Q1 prescriptive default) |
CLAUDE.md |
Recommendation pointer block (idempotent — won't duplicate if you already have one) |
| Flag | Behavior |
|---|---|
--yes / -y |
Accept ALL defaults; no prompts. Required for CI/scripted bootstrap. |
--with-dor |
Scaffold DoR without prompting (other features still prompted unless --yes is also set). |
--with-attestation |
Scaffold attestation infra without prompting. |
--with-classifier |
Scaffold classifier config stub without prompting. |
--with-branch-protection |
Apply branch protection without prompting (requires gh on PATH). |
--with-workflows |
Scaffold the full GitHub Actions workflow bundle (gate, review, attestation, auto-merge) without prompting (AISDLC-261). |
--force |
Overwrite existing workflow files. Only applies to .github/workflows/ files — non-workflow files are always skipped for safety. Use with --with-workflows or --add workflows (AISDLC-261). |
--add <feature> |
Extend an already-initialized repo with a single feature. <feature> is one of dor, attestation, classifier, branch-protection, workflows. Idempotent — files that already exist are left untouched (except with --force for workflows). The baseline scaffold is NOT re-written in --add mode. |
--dry-run |
Print what would happen without writing files. For branch protection this prints the JSON body of the gh api request. |
--skip-mcp |
Skip MCP server auto-configuration (Claude Code, Cursor, etc.). |
--cursor |
Force-install Cursor MCP config even if Cursor isn't detected on this machine. |
--role <tier> |
Agent-role tool tier: coding (default), research (adds WebFetch + WebSearch), meta (adds Task + Skill). |
-d, --dir <path> |
Config directory name (default .ai-sdlc). |
Re-running ai-sdlc init on an already-initialized repo is safe:
- Existing files are skipped. Each scaffolded path is checked for
existence before writing; the wizard logs
skip <path> (already exists)and moves on. - Append-once for shared files.
.husky/pre-pushandCLAUDE.mdare appended to (not overwritten) and use sentinel markers (# ai-sdlc:attestation-sign-block,<!-- ai-sdlc:recommendation-pointer -->) so re-running the wizard never duplicates content. - Branch protection is a PUT. GitHub's API treats
PUT branches/{branch}/protectionas upsert — re-applying the recommended rule overwrites with the same payload.
This is what makes --add <feature> safe to run after an initial
bootstrap: you can opt into a feature later without worrying about
clobbering the original install.
cd my-new-repo
git init # required for org/repo detection
git remote add origin git@github.com:my-org/my-new-repo.git
ai-sdlc init # walk the wizard
git add .ai-sdlc .github .husky CLAUDE.md
git commit -m "chore: bootstrap AI-SDLC config"ai-sdlc init --yes --skip-mcp
git add .ai-sdlc .github .husky CLAUDE.md
git commit -m "chore: bootstrap AI-SDLC config"ai-sdlc init --add attestation
# Then:
/ai-sdlc init-signing-key # one-time: generate your key
# open a PR appending the printed YAML block to .ai-sdlc/trusted-reviewers.yamlai-sdlc init --add branch-protection --dry-run # see the JSON body
ai-sdlc init --add branch-protection # actually applyIf you initialized before AISDLC-261 shipped and don't have the full
workflow bundle in .github/workflows/, run:
# Dry-run first to see what would be written:
ai-sdlc init --add workflows --dry-run
# Write the 4 workflow files (skips any that already exist):
ai-sdlc init --add workflows
# Overwrite ALL 4 workflow files with the current templates:
ai-sdlc init --add workflows --forceThe four files written:
| File | Purpose |
|---|---|
.github/workflows/ai-sdlc-gate.yml |
Single rollup ai-sdlc/pr-ready check |
.github/workflows/verify-attestation.yml |
DSSE attestation verifier (audit-only) |
.github/workflows/ai-sdlc-review.yml |
PR review status poster (stub — wire your reviewers) |
.github/workflows/auto-enable-auto-merge.yml |
Arms auto-merge on every same-repo PR |
After scaffolding:
- Enable "Allow auto-merge" in GitHub Settings → General.
- Add an
AI_SDLC_PATrepository secret with write access (used byauto-enable-auto-merge.yml). - Commit and push the 4 workflow files.
ai-sdlc health # validates config files + reports driftBranch-protection apply requires gh authenticated against the target
repo. Run gh auth login and re-run with ai-sdlc init --add branch-protection.
pipeline.yaml will use the literal your-org placeholder. Add a remote
with git remote add origin <url> and re-run ai-sdlc init (existing
files will be skipped; you'll need to either delete pipeline.yaml to
trigger a re-write or manually substitute the placeholder).
You're running in a non-TTY environment (CI, container, redirected
stdin). Pass --yes (or any combination of --with-X flags that
covers the prompts) to bypass interactive input.
Delete the scaffolded files. The features are file-presence-driven —
remove .ai-sdlc/dor-config.yaml + .github/workflows/dor-ingress.yml
to disable DoR; remove .github/workflows/verify-attestation.yml to
disable attestation verification; etc.
- Q1 (prescriptive default). The baseline gate workflow is
scaffolded UNCONDITIONALLY because every adopter benefits from the
single rollup
ai-sdlc/pr-readycheck. There's no--without-gateflag — operators who want to opt out can delete the file. - Q3 (attestation = audit-only). The scaffolded
verify-attestation.ymlis the audit-only variant. It logs verification results to the workflow run log but does NOT post a required commit status. Promoting attestation to a hard gate is an explicit operator action documented inquality-gate.md. - Q4(b) (interactive default +
--yesescape hatch). The wizard is the default to give first-time adopters a guided bootstrap;--yesexists for CI/scripted use.--with-Xflags are for operators who know exactly which features they want without the wizard preamble. - Adopter-first design. Per the
feedback_design_for_adopters_firstmemory, the framework defaults must work in a brand-new repo with no prior configuration — hence the always-on baseline + idempotent re-runs.
docs/operations/quality-gate.md— theai-sdlc/pr-readyrollup architecture this init scaffolds.docs/operations/operator-runbook.md— day-2 operations for AI-SDLC repos.- The
init-features.tssource — for adopters extending the wizard with custom features (theFeatureTemplateSetinterface is the extension point).