Deployment SOPs
Standard operating procedures for adding WeftOS to a project and keeping it assessed: from initial project setup to continuous assessment.
These SOPs describe how to add WeftOS to a project and keep it assessed. Each SOP lists the commands, what they produce, and a check that it worked. The command syntax was checked against the clap definitions in crates/weftos/src/main.rs and crates/clawft-cli/src/commands/assess_cmd.rs.
Overview
| SOP | Purpose | Entry point |
|---|---|---|
| SOP 1 | Add WeftOS to an existing project | weftos init, weft assess init |
| SOP 2 | Scan and analyze the codebase | weft assess run, weaver graphify |
| SOP 3 | Cross-project coordination | weft assess link, peers, compare |
| SOP 4 | Continuous assessment | weft assess hooks, CI, scheduled runs |
| SOP 5 | Review and improve the SOPs | weft assess review |
SOP 1: Adding WeftOS to an existing project
cd /path/to/project
weftos init
weft assess initweftos init writes weave.toml (language and source patterns are detected from Cargo.toml, package.json, pyproject.toml or setup.py, and a git source is added when .git exists), creates .weftos/ with chain/, tree/, logs/ and artifacts/, and appends .weftos/ to an existing .gitignore. weft assess init writes the assessment configuration under .weftos/; pass --force to overwrite it.
weftos init can also install WeftOS agent packages for Claude Code, Grok Build and Codex with --claude, --grok or --codex (a plan by default; --apply writes). It never commits or pushes.
Quality gate
SOP 1 is complete when:
weave.tomlexists at the project root..weftos/exists with its four subdirectories.weft assess initsucceeded..gitignorecontains.weftos/.
SOP 2: Scanning and analyzing the codebase
weft assess run # full scope, table output
weft assess run --scope commit # files changed in the last commit
weft assess run --scope dependency # dependency manifests only
weft assess status # the last assessmentAn assessment follows the pipeline SCOPE, SCAN, ANALYZE, REPORT, and writes .weftos/artifacts/assessment-latest.json. Findings come from the registered analyzers (complexity, dependency, security, topology and data-source analyzers, plus Terraform, network and RabbitMQ analyzers; crates/clawft-kernel/src/assessment/analyzers/). Output formats are table, json and github-annotations.
To build a knowledge graph of the codebase for semantic search, use the Graphify tooling; see Graphify.
SOP 3: Cross-project coordination
When several projects run WeftOS, link them so assessments can be compared:
weft assess link frontend ../frontend/.weftos
weft assess link backend ../backend/.weftos
weft assess peers
weft assess compare frontendlink takes a peer name and the path to the peer's .weftos/ directory. With a running daemon that has the mesh enabled, weft assess mesh-status shows the gossip state of assessment peers on other nodes.
SOP 4: Continuous assessment
See the Assessment Workflow guide for the full command reference.
| Trigger | How | Scope |
|---|---|---|
| Git hook | weft assess hooks --hook-type post-commit (or pre-push; --uninstall removes it) | commit |
| CI pipeline | weft assess run --scope ci --format github-annotations | ci |
| Scheduled | Cron or a CI schedule running weft assess run | full |
The repository's own PR gate runs weft assess init --force and then weft assess run --scope ci --format github-annotations (the assess job in .github/workflows/pr-gates.yml).
SOP 5: Reviewing and improving the SOPs
weft assess review # analyze the last 5 assessments
weft assess review -n 20 # analyze the last 20review reads the assessment history, prints trends, and writes .weftos/artifacts/sop-review-latest.json with recommendations. A human decides which recommendations to adopt; SOP changes are versioned like any other document.
Next steps
- Assessment Workflow:
weft assesscommand reference - ExoChain: cryptographic audit trail
- Getting Started: install and first project setup