CLI Reference
Every command, with behavior, flags, and exit codes. Global conventions first:
--jsonon any command emits the versioned envelope instead of text — same facts, same exit code.- Exit codes are the contract:
0means the command's claim holds (valid, releasable, all proofs passed);1means blockers, failures, or a refused invocation — always with the remedy named. A successful diagnostic read (such asevidence status) exits0regardless of derived states; malformed inputs and refused reads still exit1. - Refusals over surprises: unknown flags, missing required values, and invalid combinations are rejected with the fix named, on every command uniformly. Each command supports
--help. - Commands run against the current working directory's repository.
Setup
walden version [--json]
Prints CLI version, JSON contract version (v0beta1), and supported document schema (v1alpha1).
walden update [--check] [--version <tag>] [--json]
Self-updates the binary from GitHub releases with checksum verification and rollback on failure. It changes one file: the executable. --check reports availability without applying; --version pins a specific tag (strict vX.Y.Z tags only).
The AI skill is not part of this flow: it is distributed and updated through the Skills CLI (npx skills update walden). The current guide requires v0.10.4 or a newer compatible CLI and available matching release assets.
Release assets are named walden-<tag>-<os>-<arch> for darwin/linux × amd64/arm64, and walden-<tag>-windows-<arch>.exe for Windows; checksums.txt lists all of them. On Windows walden update refuses before any download: a running .exe cannot replace itself in place. Update with go install github.com/andrearaponi/walden/cmd/walden@<tag> or by replacing the .exe from the releases page.
walden repo init [--json]
Initializes Walden in the current repository: .walden/ (constitution.md, lessons.md, scoped .gitignore), a PR template, and the generated CI workflow pinned to this CLI version. Initializes git first if absent.
It is safe to run again, and on a repository that already has some of these files: it creates the files that are missing and keeps the ones that exist. A filled constitution, recorded lessons and your own PR template are never overwritten. The only change it makes to an existing file is the version in the workflow's go install …/cmd/walden@<version> step, which it sets to the version of this CLI; the rest of the workflow stays as you left it. A workflow that does not install the CLI that way is kept, with a warning. To regenerate a file from its template, delete it and run the command again.
walden feature init <name> [--json]
Scaffolds .walden/specs/<kebab-name>/ with the three draft documents. Refuses names that normalize to empty.
Authoring and gates
walden status <feature> [--json]
Current phase, blockers, and the next action. Read-only.
walden validate [<feature>] [--all] [--json]
Structural validation: frontmatter contract, EARS criteria shape, traceability (task references to criteria and design sections), proof coverage (covers:), freshness of the approval chain. Without --all, validates up to the current phase; with it, the full spec. With no feature name, validates the whole portfolio. Exit 1 on any finding.
It also fails when the feature's evidence ledger, .walden/evidence/<feature>.json, cannot be read: a file that is not JSON, as after a merge that left conflict markers in it, a schema version this CLI does not support, or a ledger that names another feature. The summary names the file and the cause. A missing ledger is not a finding, and the content of a readable ledger is not judged here: stale or failed evidence stays with evidence status, verify and release check.
walden review open <feature> --phase <requirements|design|tasks> [--json]
Opens the review gate: moves the phase document to in-review. Refuses out-of-order phases and a document holding unresolved content: an open [decision: …] marker or an HTML comment that never closes. The refusal names the document, the body line of each finding and how to clear it; quoting the text in a code span, a fenced block or a proof line of tasks.md is one way (spec format).
walden review approve <feature> --phase <phase> [--json]
Runs full phase validation, then seals the approval: status: approved, approved_at, and the body's approved_fingerprint; downstream documents record the upstream fingerprint as their source_*_fingerprint when they are approved in turn. Nothing invalid can be sealed. Refuses a document holding unresolved content, as review open does: a document that gained a finding while in review is approved once it is fixed, with no new review open.
walden reconcile <feature> [--json]
Repairs a stale chain after upstream edits: resets the modified document and everything downstream to draft, clearing their fingerprints for re-approval. Read-only on fresh chains.
Execution
walden task status <feature> [--json]
Execution readiness: gate state, blockers, the next runnable task, and evidence warnings when completed tasks are no longer verified.
walden task start <feature> [task-id] [--json]
Resolves normalized execution context for a task (the next runnable one when no id is given): requirements referenced, design sections, verification steps.
walden task complete <feature> <task-id> [--json]
Runs the task's proof steps; on pass, records the complete proof fingerprint, chain bindings, post-proof code identity, profile and completion-policy facts, then checks the box. On failure the box stays unchecked and the failing step is named. Every step runs under its declared timeout: or the 10-minute default; expiry kills the step's process group and fails the proof.
A proof that passes without running any test adds a warning to the result and keeps the exit code, in this command and in every command that runs proofs: see Spec File Format § tasks.md.
walden task complete-all <feature> [--json]
Completes all runnable tasks in order, stopping at the first failing proof while preserving earlier completions. The warnings of the completed tasks stay in the result when a later proof fails.
Evidence
walden evidence status <feature> [--json]
Derives verified, delivered, stale-spec, stale-code, failed, unattested, unrecorded, or pending, reporting proof binding, code freshness and execution provenance separately. Profiles are diagnostic and do not gate state. This command executes declared profile probes but does not write evidence; use adopt <feature> for a probe-free legacy assessment. Successful inspection exits 0 even for non-verified states; unreadable inputs are errors.
The report also explains what it derives. Before the entries it shows what the current code identity is made of: the commit and each uncommitted path, as changed, added or removed, with untracked paths marked. Under a task whose code is stale it names the paths that differ from the tree its proof ran on; under a task whose specification is stale, the approvals that changed and the statements the task names that changed or are no longer defined. A task whose record keeps step durations shows how long that execution took. When a record lacks the facts an explanation needs, or names a commit that is not in the repository, the report says which fact is missing rather than naming a path. Text lists show the first 10 items and the number omitted; --json carries them whole. The explanations change no state and no exit status. See the JSON reference.
A delivered task is reported with the commit it was attested on, marked (sealed by adoption) when adoption wrote the attestation, and is not explained: that the code moved on since a delivery is what the state allows. A delivery task in any other state is marked (delivery proof), or (delivery proof, awaits adoption) when it holds a pass that adoption can seal. When it holds a recorded pass that is no attestation, the report says why, in one line: the proof ran on a tree with uncommitted paths, no commit could be read, the record keeps no commit and no paths, or the pass was recorded by a run that did not read the proof as a delivery proof. The line then names what attests the task: a pass of walden verify on a tree without uncommitted changes or, for a pass that awaits adoption, walden adopt. See Delivery proofs.
walden trace <feature> [--markdown] [--json]
Joins what three files hold: each acceptance criterion of the requirements, the leaf tasks whose Requirements line names it, the proof steps whose covers lists it, and the evidence state of the leaf task each step belongs to. The criteria come in the order of the document; a non-functional requirement or a constraint follows them when a leaf names it or a step covers it. The state of a leaf is the one release check derives, and a step of a leaf that declares a delivery proof is marked (delivery proof).
The report lists three kinds of hole, the criteria that lack a proof first:
unnamed: a criterion that no leaf task names.walden validate --allfails on such a plan.uncovered: a criterion that a leaf names and no proof step covers, with the leaves that name it. They are the criteriavalidate --jsonlists underproof_reference_coverage.not-standing: a statement covered by a step of a leaf whose state is neitherverifiednordelivered, with the leaf, the step and the state.
The summary counts the holes of each kind, so a missing proof is told from a proof that is not standing. After a change to the code every regression proof is stale-code until walden verify runs again: a trace has no hole of the third kind at delivery, after a verify on the tree it reads.
Three formats. Text by default: the summary, one entry for each statement and the holes. --markdown prints a table with one row for each pair of statement and proof step, then the holes, and nothing else: it is made to be pasted into a pull request. --json carries every field, with the design references of each leaf as the plan writes them; see the JSON reference. Text and Markdown show a command of more than 120 characters cut to 120, the last one being …; JSON carries it whole. --markdown and --json cannot be combined.
The trace shows what the plan declares and whether its proofs still stand. It does not judge whether a proof proves its statement, and it is not a gate: a completed report exits 0 with holes, writes nothing in the repository and runs no proof and no environment probe. walden release check judges, and evidence status explains a state. A feature without a specification, or a document, a plan or a ledger that cannot be read, is an error that names the file and the cause.
walden verify <feature> [--all] [--check] [--task <id>] [--json]
Re-executes the proofs of completed tasks against the current tree: those no longer verified by default, every one with --all, delivery proofs aside (see below). Fresh evidence replaces each task's record; --check reports without persisting anything. A failing proof never aborts the run — every selected task is re-proven and failures are collected. Exit 1 if any proof failed; in text mode such a run prints its warnings on stderr.
Re-verification is pure by contract: each task records its captured before/after identities. Mutation or a missing required identity creates sticky contamination; later executed tasks cannot earn verified evidence in that invocation, even after source restoration. Assertion and policy outcomes remain distinct. An unavailable initial identity rejects execution, and no source rollback occurs automatically. --check prevents ledger writes, not command side effects. Detection is manifest-based boundary sampling, not a sandbox. Normal verify prunes orphaned records only in the selected feature; default selection and --all never expand to other features.
--task <id> re-proves one completed leaf task, whatever its state unless it is delivered, under the same purity rules, and leaves every other record as it is, orphaned ones included. It serves a repair, not a release: the code identity still covers the whole tree, the run warns with the completed tasks left unverified, and release check still judges every task. --task cannot be combined with --all. A repeated or empty --task, or an id that is not a completed leaf task, is rejected before any environment probe or proof runs. Its exit code follows the selected task alone.
Delivery proofs are treated apart. A delivered task is kept: no run executes its proof, with or without --all, and --task refuses it before any probe, proof or write, naming the commit it was attested on. It is proven again only after its declaration or its proof changes in the approved plan, or after a statement it names changes. On a tree without uncommitted changes outside .walden/, a run without --task also proves each completed delivery task that holds neither an attestation nor a pass that awaits adoption, although it may read verified: a pass there attests it. A recorded pass that awaits adoption, recorded before the plan declared the delivery, is left for walden adopt: only --task proves its task again, and replaces the pass. The run names the tasks it kept, with their commits, and those it left for adoption, apart from the tasks it proved and those it skipped as verified.
walden adopt [<feature>] [--apply] [--json]
Brownfield lane. Default is a read-only plan for the named feature or, when omitted, the portfolio: technical class (backfill / re-prove / complete / blocked) plus independent binding/freshness/provenance assessments. It executes no proof or environment probe. Recoverable legacy bindings do not supply missing execution attestations; complete means nothing to adopt, not a finished product plan.
--apply explicitly executes the selected scope: seal eligible recorded approvals, then re-prove needed completed work through verify. A present contradictory fingerprint is never resealed automatically. A document approved before fingerprints records the upstream approval time it was reviewed against: a link without a fingerprint whose time differs from the upstream's blocks its feature and is never sealed, and the way out is walden reconcile <feature> and a new approval. The plan warns about a link that is already sealed and whose times differ: either its upstream was approved again without a change, or a backfill by v0.10.0 to v0.15.2 joined it without a review. The adoption guide says how to tell them apart and how to clear the warning. Apply resumes by classification and exits 1 for failures, blocked selections or errors, preserving the partition. No inspection or binary upgrade automatically replays historical work. Establish current business applicability before applying; see Brownfield Adoption.
--apply also seals the recorded pass of a completed delivery task as an attestation, without executing its proof, when the pass was recorded before the plan declared the delivery. The plan names each pass it can seal with the commit that holds the tree the pass ran on, and counts it: a feature with a pass to seal is not complete. Four checks run in order, and the first that fails leaves the pass unsealed with its reason. no-provenance: the execution provenance of the pass is not supported. proof-changed: the recorded proof differs from the approved one in more than the declaration. In both cases apply proves the task again, as any task that is not verified. statements-unknown: it cannot be established that the statements the task names read as they did at the pass. no-commit: no commit among the last 200 reachable from HEAD holds the tree of the pass. In these two cases the pass stays as recorded and no run without --task executes its proof: walden verify <feature> --task <id> proves the task again. After a declaration on a completed task the order is therefore walden adopt first, then walden verify <feature> --task <id> for a pass left unsealed. Sealing adds the attestation to the record and changes nothing else in it. A pass left unsealed does not change the exit status.
The plan counts tasks and declared steps, retaining unavailable workloads separately from known zero; these are not test counts or a runtime forecast. Text-mode apply reports task starts/completions and measured durations. Both modes retain proof diagnostics, separate assertion/policy facts and final evidence states. A feature-level error remains separate; evidence_persisted: false marks observed results that could not be saved. The legacy verified/failed partitions keep their existing accounting, including exclusion of a feature whose verification could not finish saving.
elapsed_ms measures attempted proofs, processed features and the apply operation (including planning), not an ETA; skipped tasks get no invented execution duration. elapsed_ms is not written to the ledger, and no logs are captured automatically. A record that apply writes keeps the same facts as any other record: the commit and the paths that differed from it, the statement fingerprints and the duration of each proof step (see the ledger format). Diagnostics may contain sensitive command output. JSON mode emits one JSON envelope with additive fields and no text progress on stdout, including failure paths. Older compatible CLIs may omit these fields; see the JSON contract.
Certification
walden release check [<feature>] [--strict] [--allow-pending --reason <text>] [--json]
One deterministic verdict per feature — chain, validation, decisions, evidence criteria — plus the repository-level clean-worktree check. Executes no proofs, writes nothing. Exit 0 iff no blocker.
- Pending leaf tasks block by default;
--allow-pending --reason "<text>"waives them for this verdict, recording reason and task identifiers in the result (completion classwith-waivers).--allow-pendingwithout a non-empty reason, or--reasonalone, is refused. --strictbinds the exact consumed spec/evidence bytes and presence to one existing commit, even for ignored inputs. An unqualified request also checks the committed feature inventory. Missing, different, unreadable or symlinked inputs block; ignored scratch outside the input set does not.- Uncommitted changes outside
.walden/always block, with no bypass. No usable git fails closed. Dirty.walden/warns by default (a refreshed ledger legitimately precedes its own commit) and blocks under--strict. - The verdict carries
completion,certified_commit, explicit feature/portfolio scope and guarantee, and committed-input binding status. A named-feature pass is not a repository-wide certificate. Non-strict mode does not claim local metadata is committed; pending waivers never waive unattested evidence or strict input defects. - A
deliveredtask satisfies theevidencecriterion without being proven again. The verdict lists it with the commit it was attested on, never asverified, and a releasable verdict states the number of delivered tasks in its summary. For each feature the verdict also lists the statements that only delivery proofs cover: once those tasks are delivered, nothing proves these statements again. A pending delivery task blocks and is waived as any pending task. - A due contract consolidation adds a note to
release.repository_warnings; it never blocks and never changes the verdict, blockers, completion class or exit code.
Consolidation
See Contract Consolidation for the cycle; walden consolidate --help prints it too, and each subcommand's help states its preconditions, refusals and next step. status also reports the consolidation state and its warnings; feature init repeats a due consolidation as a warning. None of this ever blocks a command.
walden consolidate report [--json]
Also plain walden consolidate. Read-only report: tracking state, pending contract changes, backlog, threshold (none, suggested, due), view state, the bounded review scope with link reasons and widely cited files, deterministic findings, and the defined identifiers of the scoped features. Writes nothing, runs no proofs or probes; exit 0 unless the specs directory is unreadable.
walden consolidate start [--json]
Starts tracking: records every approved, fresh feature as the unconsolidated backlog and scaffolds .walden/contracts.md in draft when absent. Refused when tracking already started.
walden consolidate open [--json]
Moves the view to in-review. Refused, naming every problem and changing nothing, while the view disagrees with the specifications or, with changes pending, its coherence review lacks a non-empty entry per pending feature citing a linked statement of its comparison.
walden consolidate approve [--json]
Run only after the user's explicit approval. Requires the view in review, no mismatches, a complete coherence review while changes are pending, and approved, fresh requirements for every covered feature. Seals the view and records the checkpoint in .walden/consolidation.json; covered features become consolidated. Re-running it on an unchanged approved view repairs a record left behind by an interrupted write.
Lessons
walden lesson log --feature <name> --phase <phase> --trigger <text> --lesson <text> --guardrail <text> [--json]
Appends a structured lesson to .walden/lessons.md: what happened, what was learned, and the guardrail that prevents the repeat.