Bootstrap SpecFact CLI in a repository. Use init ide for IDE-specific setup; module lifecycle is under specfact module.
Usage
specfact init [OPTIONS]
specfact init ide [OPTIONS]
Options
| Option | Type | Description |
|---|---|---|
--repo |
DIRECTORY | Repository path (default: current directory) |
--profile |
TEXT | Validation tier or legacy first-run profile preset (see below) |
--install |
TEXT | Comma-separated bundle names or all to install without prompting |
--install-deps |
Install required packages for contract enhancement |
Validation Tiers
Validation tier profiles write .specfact/config.yaml with deterministic defaults and source annotations:
| Profile | Clean-code default | Validation posture |
|---|---|---|
solo |
advisory |
Fast local feedback |
startup |
advisory_then_mixed |
Team defaults with gradual enforcement |
mid_size |
mixed |
Mixed advisory and blocking checks |
enterprise |
hard |
Required evidence and hard-fail governance |
Config layers resolve in this order: profile defaults, org baseline, repo overlay, developer-local override.
The generated config records source_annotations for the winning value of each key.
Legacy Workflow Presets
Legacy presets still select a default set of bundles appropriate for your team setup:
| Profile | Description |
|---|---|
solo-developer |
Minimal bundle set for individual projects |
backlog-team |
Backlog sync and ceremony bundles for agile teams |
api-first-team |
Spec validation and contract testing bundles |
enterprise-full-stack |
All official bundles including governance and adapters |
# Bootstrap with a validation tier
specfact init --profile startup
# Bootstrap with the legacy solo-developer preset
specfact init --profile solo-developer
# Install specific bundles during init
specfact init --install backlog,code-review
# Install the requirements workflow explicitly
specfact init --install requirements
# Install every current workflow bundle
specfact init --install all
Profile and install selections are treated as explicit enable requests for the selected marketplace module ids. init discovers project modules relative to --repo and merges the refreshed rows into modules.json, preserving unrelated module lifecycle state from other repositories or scopes.
IDE Setup
The init ide subcommand discovers prompt templates from core (bundled specfact_cli resources or your repo checkout) and from installed modules under the effective module roots (builtin, project .specfact/modules, user ~/.specfact/modules, marketplace, and SPECFACT_MODULES_ROOTS). It is a re-sync command: it only copies what is already installed; it does not download or extract modules. If prompts are missing, install or seed modules first (for example specfact module init --scope project or specfact module install --scope user).
# Initialize Cursor IDE integration (interactive: pick IDE, then prompt sources)
specfact init ide --ide cursor
specfact init ide --ide vscode
specfact init ide --ide codex
specfact init ide --ide claude-skills
specfact init ide --ide vibe
# Non-interactive: export all discovered sources (default)
specfact init ide --ide cursor --repo .
# Non-interactive: only core, or a comma-separated list of module ids
specfact init ide --ide cursor --prompts core
specfact init ide --ide cursor --prompts all
specfact init ide --ide cursor --prompts "core,nold-ai/specfact-backlog"
# Initialize with dependency installation
specfact init ide --install-deps
Slash-command IDE targets export one file per prompt into their native command location, such as .cursor/commands/specfact.02-plan.md or .github/prompts/specfact.02-plan.prompt.md. Skill-based targets export one capability-oriented skill per source/module, such as .codex/skills/nold-ai-specfact-project/SKILL.md, .claude/skills/nold-ai-specfact-backlog/SKILL.md, or .vibe/skills/nold-ai-specfact-spec/SKILL.md.
This creates or refreshes:
.specfact/directory structure.specfact/templates/backlog/field_mappings/with default field mapping templates when available- IDE-specific slash-command files or grouped
SKILL.mdfiles under the IDE export directory
Dependency Installation
Use --install-deps to install optional packages required for contract enhancement (CrossHair, beartype, icontract):
specfact init --install-deps
Prefer specfact init ide --install-deps when setting up IDE integration at the same time.
Typical First-Run Sequence
# 1. Install SpecFact CLI
pip install specfact-cli
# 2. Bootstrap with a profile
specfact init --profile solo-developer
# 3. Set up IDE integration
specfact init ide --ide cursor
# 4. Verify modules are installed
specfact module list