Installation
Requirements
- Python 3 (ships as a single-file CLI)
- Git (for scope auditing and diff tracking)
Install
Install from PyPI:
pip install scafldThe PyPI package installs PyYAML automatically as a runtime dependency.
Install from npm:
npm install -g scafldThe npm package ships the same CLI/runtime bundle, but the executable still requires python3 at runtime. Commands that edit YAML specs, such as scafld harden, also need PyYAML installed in that Python runtime:
python3 -m pip install PyYAMLClone the repo and run the install script:
git clone https://github.com/nilstate/scafld.git ~/.scafld && ~/.scafld/install.shOr as a one-liner:
curl -fsSL https://raw.githubusercontent.com/nilstate/scafld/main/install.sh | shThis clones scafld to ~/.scafld and symlinks the scafld command to ~/.local/bin/.
Verify
scafld --versionUpdate
scafld update --selfTo refresh the current workspace's managed bundle:
scafld updateTo refresh every scafld workspace under a root directory:
scafld update --scan-root ~/devInitialize a project
Navigate to your project root and run:
scafld initThis scaffolds the full .ai/ structure:
.ai/
scafld/ # Managed runtime bundle refreshed by `scafld update`
config.yaml # Validation rules, rubric, safety controls
config.local.yaml # Your overrides (build/test/lint commands)
prompts/ # Plan + exec mode instructions
plan.md
exec.md
review.md
schemas/ # Spec validation schema
spec.json
specs/
drafts/ # Planning in progress
approved/ # Ready for execution
active/ # Currently executing
archive/ # Completed work
examples/ # Reference specs
logs/ # Execution logs (gitignored)
reviews/ # Review findings (gitignored)
AGENTS.md # Your project's invariants and policies
CONVENTIONS.md # Coding standardsThe .ai/specs/ directory and AGENTS.md should be committed to version control. Specs are project artifacts, not personal notes.
Configuration
scafld uses two config files in .ai/:
scafld/config.yaml-- framework-managed defaults refreshed byscafld updateconfig.yaml-- project-level configuration and overrides committed with the repoconfig.local.yaml-- project-specific overrides (build/test/lint commands)
The local config merges on top of the project config, which itself layers on top of the managed bundle. See Configuration for the full reference.
Editor integration
scafld specs are YAML files validated against .ai/schemas/spec.json. Point your editor's YAML language server at the schema for autocompletion:
// .vscode/settings.json
{
"yaml.schemas": {
".ai/schemas/spec.json": ".ai/specs/**/*.yaml"
}
}