rdev/docs/guides/sdlc/cli-reference.md
jordan 56e3f83955 feat: add auth scopes, OpenAPI docs, SDLC guides, and code quality improvements
- Add auth.RequireScope() to all handler routes for proper authorization
- Add SDLC OpenAPI endpoint documentation (state, features, tasks, branches, merge, archive, orchestrator)
- Add SDLC documentation guides (getting-started, cli-reference, api-reference, command-catalog)
- Add artifact_test.go for SDLC artifact coverage
- Add CLAUDE.md rules: auth scopes requirement, error wrapping with %w
- Fix error wrapping to use %w instead of %v throughout codebase
- Improve CLI merge command with conflict detection and resolution
- Fix handler tests to include auth middleware for RequireScope
- Add cookbook tree runner scripts for automated testing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 13:55:50 -07:00

3.8 KiB

SDLC CLI Reference

The sdlc CLI provides deterministic SDLC orchestration within project pods.

Global Flags

Flag Description
--root Project root directory (default: auto-detect)
--json Output as JSON

Commands

sdlc init

Initialize SDLC in a project.

sdlc init --project "Project Name" [--type go|node|python]

sdlc state

Show the global SDLC state.

sdlc state

sdlc next

Get the classifier's recommended next action.

sdlc next [--feature <slug>]

Returns the action type, message, and command to execute.

Feature Management

sdlc feature create

Create a new feature.

sdlc feature create <slug> --title "Feature Title"

sdlc feature list

List all features.

sdlc feature list

sdlc feature show

Show feature details.

sdlc feature show <slug>

sdlc feature transition

Move feature to a new phase.

sdlc feature transition <slug> <phase>

Valid phases: draft, specified, planned, ready, implementation, review, audit, qa, merge, released

sdlc feature block

Block a feature with a reason.

sdlc feature block <slug> --reason "Waiting for dependency"

sdlc feature unblock

Remove all blockers from a feature.

sdlc feature unblock <slug>

sdlc feature delete

Delete a feature.

sdlc feature delete <slug> [--force]

Artifact Management

sdlc artifact status

Show artifact statuses for a feature.

sdlc artifact status <slug>

sdlc artifact create

Register a new artifact.

sdlc artifact create <slug> <type>

Types: spec, design, tasks, qa_plan, review, audit, qa_results

sdlc artifact approve

Approve an artifact.

sdlc artifact approve <slug> <type>

sdlc artifact reject

Reject an artifact.

sdlc artifact reject <slug> <type>

Task Management

sdlc task list

List tasks for a feature.

sdlc task list <slug>

sdlc task add

Add a new task.

sdlc task add <slug> --title "Task title"

sdlc task start

Start working on a task.

sdlc task start <slug> <task-id>

sdlc task complete

Mark a task as complete.

sdlc task complete <slug> <task-id>

sdlc task block

Mark a task as blocked.

sdlc task block <slug> <task-id>

Branch Management

sdlc branch create

Create a feature branch.

sdlc branch create <slug>

Creates both the git branch and the branch manifest.

sdlc branch status

Show branch status and merge checklist.

sdlc branch status <slug>

sdlc branch sync

Sync feature branch with base branch.

sdlc branch sync <slug>

Merge and Archive

sdlc merge

Merge a feature branch after all gates pass.

sdlc merge <slug> [--strategy squash|merge]

This command:

  1. Checks merge readiness (all gates passed)
  2. Checkouts the main branch
  3. Merges/squashes the feature branch
  4. Creates the commit
  5. Updates the branch manifest
  6. Transitions feature to released

sdlc archive

Archive a released feature.

sdlc archive <slug>

Query Commands

sdlc query blocked

List blocked features.

sdlc query blocked

sdlc query ready

List features ready for work.

sdlc query ready

sdlc query needs-approval

List features awaiting approval.

sdlc query needs-approval

Configuration

sdlc config show

Show current configuration.

sdlc config show

sdlc config set

Set a configuration value.

sdlc config set <key> <value>

Keys:

  • project.name
  • project.type
  • branches.main
  • branches.feature_prefix
  • compliance.require_approvals (true/false)
  • compliance.require_branch (true/false)
  • compliance.require_qa (true/false)