Skip to content

sdtk-spec — Command Reference

Planning & specification CLI. Guide: SDTK-SPEC.

bash
npm install -g sdtk-spec-kit   # included in sdtk-kit
sdtk-spec --help

Workspace

sdtk-spec init

Initialize the SDTK-SPEC workspace in a project.

bash
sdtk-spec init

init auto-detects your stack (language / framework) where it can and writes it into sdtk-spec.config.json. When detection is low-confidence it leaves placeholders and points you at config apply-profile to fill them, then config check to verify — the detect → apply-profile → check flow.

sdtk-spec generate

Scaffold the 17-file SDLC document set for a feature.

bash
sdtk-spec generate --feature-key CRM_LEADS --feature-name "Lead tracking"
OptionDescription
--feature-key (alias --key)Stable feature identifier
--feature-name (alias --name)Human-readable feature name

sdtk-spec analyze

Analyze an existing source document into structured planning input.

bash
sdtk-spec analyze --source ./legacy-notes.md

Configuration

sdtk-spec config fills and verifies sdtk-spec.config.json — the per-project stack / commands / docs contract that delivery gates read.

bash
sdtk-spec config apply-profile <name>   # merge a stack profile into sdtk-spec.config.json
sdtk-spec config check                  # scan for unfilled placeholders (exit 1 if any remain)

sdtk-spec config apply-profile

Merge a named profile from sdtk-spec.config.profiles.example.json (shipped into the project by init) into your config. It overwrites the profile-owned sections (orchestration, stack, commands) while preserving docs, schemaVersion, and any auto-detected stack.detection. Bundled profiles: php-laravel, django-react, node-nextjs.

bash
sdtk-spec config apply-profile php-laravel

sdtk-spec config check

Scan sdtk-spec.config.json for unfilled placeholders (UPDATE_ME / Set your …). Exits 1 while any remain and 0 once the config is complete — wire it into a delivery gate so a half-configured project can't ship.

bash
sdtk-spec config check          # exit 1 lists each remaining placeholder; exit 0 when clean
OptionDescription
--project-path <path>Project root containing sdtk-spec.config.json (default: cwd)
--jsonMachine-readable output

The config carries a schemaVersion (currently 1); apply-profile never rewrites it.

Atlas

Knowledge graph + viewer over spec artifacts. This is the R1 compatibility namespace: every subcommand forwards verbatim to sdtk-wiki atlas, which owns the builder. Requires sdtk-wiki-kit (bundled with sdtk-kit); without it the command exits 2 and prints the install steps.

bash
sdtk-spec atlas init
sdtk-spec atlas build
sdtk-spec atlas open
sdtk-spec atlas watch
sdtk-spec atlas status

Project Intelligence Pro

Docs baseline for existing codebases. ingest, audit, and refresh fail closed without a Pro entitlement. promote is free (it only copies already-generated staged docs into docs/).

bash
sdtk-spec project ingest    # Pro: build census/profile foundation + staged docs baseline
sdtk-spec project audit     # Pro: read-only readiness / gap / risk audit
sdtk-spec project refresh   # Pro: incremental refresh of .sdtk/project/ artifacts
sdtk-spec project promote   # free: publish reviewed staged docs into docs/ (dry-run by default)

project promote is a dry-run by default (prints the plan, writes nothing). It classifies each existing live doc as identical (=) or differing () from the staged version; differing docs are skipped unless --force is given. Add --apply to publish, --json for a machine-readable plan.

bash
sdtk-spec project promote --project-path .            # dry-run plan
sdtk-spec project promote --project-path . --apply    # publish new docs
sdtk-spec project promote --project-path . --apply --force   # also overwrite differing docs

Every project verb accepts --help for verb-scoped usage (e.g. sdtk-spec project promote --help).

Runtime assets

bash
sdtk-spec runtime install
sdtk-spec runtime status
sdtk-spec runtime uninstall

Licensing

bash
sdtk-spec activate            # activate Pro on this machine
sdtk-spec entitlement status  # show current entitlements
sdtk-spec entitlement sync    # refresh entitlement state
sdtk-spec auth                # advanced auth management

Maintenance

bash
sdtk-spec update

Exit codes

CodeMeaning
0Success
1Validation or user error (bad args, missing auth)
2Dependency error (PowerShell not found)
3Integrity error (payload hash mismatch)
4Unexpected internal error

SDTK — governed, auditable, resumable AI-assisted engineering.