Skip to main content

Review the shape, not the diff

A small diff can change a public contract, leave a consumer incompatible, or hide unfinished behavior behind an otherwise plausible implementation. Start review with the shape of the work: why it exists, what changed, what consumes it, and which evidence is still missing. Then use the source and diff to investigate individual findings.

This walkthrough uses atomic review twice:

  1. Inspect one recorded change, including a deliberately broken caller.
  2. Compare the final draft state with a shared baseline, then promote it.

Local review uses Atomic's existing semantic/audit engines. It does not call a model, require provider credentials, execute your tests, switch views, or grant signed approval. The command reference documents every option, including the separate, explicit review publish workflow.

Use a throwaway repository

The first edit intentionally leaves a placeholder and an incompatible call so you can see what the review surfaces. Do not make this experiment in a production working copy. You need Atomic, a Rust/Cargo toolchain, and your normal local recording identity configured; no AI integration is needed.

1. Establish a small shared baseline​

cargo new --lib --vcs none shape-review-demo
cd shape-review-demo
atomic init --view dev --kind rust --vault

Replace src/lib.rs with:

pub fn shipping_total(subtotal: u64) -> u64 {
subtotal + 500
}

pub fn checkout() -> u64 {
shipping_total(2_000)
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn regular_checkout_total() {
assert_eq!(checkout(), 2_500);
}
}

Run the baseline test and record the project:

cargo test
atomic add .
atomic record -m "feat: establish regular shipping baseline"
atomic view list

The initial dev view is shared. The record gives later reviews an actual before state, not a guessed working-copy baseline.

2. Start draft work and declare its intent​

atomic view create feature-shipping --draft --parent dev --switch
atomic intent new "Add expedited shipping without breaking checkout"

Open the generated intent file at the path printed by intent new. Keep its frontmatter and generated directive IDs. Fill in the scaffold:

  • Why: offer an expedited option while keeping regular checkout compatible.
  • Acceptance criterion: regular shipping adds 500, expedited shipping adds 1,500, and checkout callers compile with the intended option.
  • Task: implement the option and update its consumers; include ::file-ref{path=src/lib.rs}.
  • Scope/constraints: this library and its tests; no checkout API break or unrelated pricing change.

Leave the criterion unmet and the task open while the work is incomplete. Save the file and synchronize its declaration:

atomic vault sync

The intent is assigned to feature-shipping, the view where you created it. Conformance will list it even without a per-change plan link. That assignment is not an acceptance verdict or a claim that every change is governed by it. In a manual example like this, use --change or --from/--to; --intent selects changes only when actual governing declarations were recorded.

3. Make and record a deliberately incomplete change​

Change only shipping_total to:

pub fn shipping_total(subtotal: u64, expedited: bool) -> u64 {
let fee = if expedited {
todo!("price expedited shipping")
} else {
500
};
subtotal + fee
}

Leave checkout and the baseline test unchanged for now. Track the intent definition as well as the source, then record the edit:

atomic add src/ .vault/intents/
atomic record -m "feat: introduce expedited shipping option"
atomic log -n 1 --full-hash

Copy the change hash from the output. Replace CHANGE_HASH below with that actual hash or its unambiguous prefix:

atomic review --change CHANGE_HASH --html

Read the change's shape​

The viewer opens on Summary. Its tables report actual local coverage, not an all-clear signal. Open the detail tabs:

TabWhat to investigate in this example
Anti-slopThe todo! placeholder is an unfinished-behavior observation with source evidence and a rule card. Check the source, not just the metric counts
ConformanceA change needs genuine governing declarations for change-level criterion scope. An absent binding is missing context, not proof that no work intent exists. The view-level walkthrough below shows the draft's explicit intent assignment
Blast radiusThe declaration now requires two arguments while checkout still supplies one. Supported static call binding can surface that incompatibility even though the caller's line did not change

Use the before/after source controls, related locations, metric cards, and finding numbers to follow the evidence. Do not depend on a specific F1 number or risk rating: numbering and advisory signals depend on the report's exact scope.

The report does not run Cargo. Confirm the compiler-level consequence yourself:

cargo test

At this deliberate intermediate state, compilation should fail because the caller is missing the new argument. A small signature diff had a larger consumer consequence; the placeholder is a separate problem.

For machine-readable evidence or more terminal detail:

atomic review --change CHANGE_HASH --json
atomic review --change CHANGE_HASH --details
atomic change CHANGE_HASH
atomic diff -c CHANGE_HASH --word-diff

4. Repair the contract and verify behavior​

Replace src/lib.rs with the completed implementation and tests:

pub fn shipping_total(subtotal: u64, expedited: bool) -> u64 {
let fee = if expedited { 1_500 } else { 500 };
subtotal + fee
}

pub fn checkout() -> u64 {
shipping_total(2_000, false)
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn regular_checkout_total() {
assert_eq!(checkout(), 2_500);
}

#[test]
fn expedited_shipping_total() {
assert_eq!(shipping_total(2_000, true), 3_500);
}
}
cargo test
atomic record -m "fix: complete expedited pricing and update checkout"
atomic log -n 1 --full-hash

Use the newly printed hash as FIX_CHANGE_HASH:

atomic review --change FIX_CHANGE_HASH --html

Inspect the corrected call and tests. A passing test and the absence of a particular local finding are useful evidence, not whole-program correctness or independent review approval.

Update the work intent's task, criterion, and evidence only as justified by the checks you actually ran. Synchronize and re-attest it when appropriate; see Atomic Vault. If you changed its tracked definition, record that updated evidence too:

atomic vault sync
atomic record -m "docs: retain shipping acceptance evidence"

Skip that last record if there are no pending tracked changes. A later edit to working files does not retroactively alter a review of an earlier recorded hash.

5. Review the draft against the shared view​

Now ask a different question: how does the final recorded draft state differ from the shared state?

atomic insert preview feature-shipping --to dev
atomic review --from feature-shipping --to dev --html
Use pull-request direction

For both review and insertion, From/source = feature-shipping and To/destination = dev. Measurements compare target before / source after; the v5 report carries those roles explicitly. Review does not insert anything.

In Summary, check both view pins, file identities/states, coverage, and the overall risk estimate. In the three detail tabs:

  1. Anti-slop: inspect the current source and real metric deltas. The removed placeholder is not replayed as a current finding just because it exists in an intermediate recorded change.
  2. Conformance: the left navigation lists intents scoped to the From/source view, with criteria beneath their keys/titles. Search the shipping intent; inspect its criterion, task-file links, and declared evidence. Unknown assessment is not a passing verdict. Intents without criteria remain visible too.
  3. Blast radius: inspect the changed declaration and consumers in the two actual endpoint states. The updated checkout call should no longer be the earlier argument-count incompatibility. Static checks still do not prove type, runtime, security, or executed-test coverage.

Both feature records remain in history and in the insertion preview. The view comparison does not replace reviewing their provenance or your team's policy for the exact changes being promoted. It also is not a simulated merge result: inspect the preview, dependency additions, and any conflicts separately.

To export without opening a browser, keep the source-bearing artifacts outside the working copy:

REPORT_DIR=$(mktemp -d "${TMPDIR:-/tmp}/atomic-review.XXXXXX")
atomic review --from feature-shipping --to dev --json > "$REPORT_DIR/review.json"
atomic review --from feature-shipping --to dev \
--html --no-open --output "$REPORT_DIR/review.html"

JSON and HTML expose the same complete finding set, not only the first 100 findings. Missing source text due to export limits is labelled rather than silently dropping a finding. Regenerate the report if either view or relevant intent context moves.

6. Evaluate and attest the review, including remaining degradation​

Finish your team's required human review and CI. Even the repaired code can have unknown criterion assessments or static-analysis coverage gaps. Native publication retains your explicit evaluation of those shortcomings; it does not run an agent or LLM, require OpenCode/Copilot configuration, or fabricate passing evidence.

atomic review publish --from feature-shipping --to dev \
--dry-run --json > "$REPORT_DIR/publication-plan.json"

Open that file. Inspect the complete report and issues, then fill its evaluation_template, preserving the scope/report digests and exact issue IDs:

  1. Evaluate all three passes: anti-slop, intent conformance, blast radius/risk. Set evaluated: true with a substantive rationale for each pass.
  2. If a pass has outstanding findings or gaps you knowingly accept, keep accepted_degradation and give every accepted_degradations entry its own rationale. Link the test evidence you actually obtained through optional evidence references and add a follow_up when needed. Do not accept an unknown merely to make a command succeed.
  3. A ready pass must have no outstanding issues. Use not_ready with no accepted entries when you refuse a pass; it records rejection and blocks insertion. Integrity/signature/provenance failures cannot be waived as debt.

Select an existing signing identity already trusted by repository policy. Replace reviewer below with that identity; selecting a name does not create a key or grant it trust. Once a responsible user has evaluated the evidence:

atomic review publish --from feature-shipping --to dev \
--evaluation "$REPORT_DIR/publication-plan.json" --identity reviewer --yes --json \
> "$REPORT_DIR/attested-review.json"
atomic review publish --from feature-shipping --to dev \
--evaluation "$REPORT_DIR/publication-plan.json" --identity reviewer --yes \
--html --no-open --output "$REPORT_DIR/attested-review.html"
atomic review publish inspect

--yes only confirms the filled evaluation; it cannot accept findings itself. The second command reuses the exact same immutable attestation. The viewer links accepted degradation to the actual findings/criteria; Summary retains the issue ledger, signer, report digest, and separate insertion disposition. Its JSON download is the full signed decision. Evidence readiness stays not_ready when issues remain, even if the user accepts insertion risk. It is not independent approval or a claim that the code is defect-free.

Retention is in the repository vault database, without creating a dirty working file. Explicit exports stay in REPORT_DIR. See Evaluate and publish a review for concrete evaluation fields, artifact structure, and supersession; the publication reference lists all options.

7. Promote the evaluated draft into the shared view​

Immediately before insertion, recheck the preview and comparison if either source moved. Keep the working copy clean before switching:

atomic status --short
atomic insert preview feature-shipping --to dev
atomic view switch dev
atomic insert view feature-shipping --to dev
atomic conflicts --short
atomic status --short
cargo test
atomic review --view dev --html

Insertion adds the draft's change references and required dependency closure to the shared view; it is not textual diff replay. The final --view dev audits the resulting shared state. It is a single snapshot, so do not expect invented before measurements or the old pre-promotion baseline from it.

Insertion revalidates the applicable decision against both view states, the exact change closure, current intent context, signature/trust, and original provenance rules. It surfaces accepted degradation and links the attestation hash in its operation evidence. Stale, tampered, incomplete, or explicitly not_ready decisions refuse reuse. Regenerate and reevaluate rather than bypassing the gate.

The work intent remains assigned to the draft where you created it; insertion does not automatically reassign that metadata to dev. A shared-view intent catalogue therefore need not match the draft's catalogue even when the shared view now contains the code. Preserve the reviewed artifacts and change hashes when recording the actual promotion decision.

What to take back to your own project​

  • Select the scope deliberately: change, turn, governing intent, one view, or two endpoint views.
  • Start with intent, contracts, consumers, and evidence; use the diff to investigate the details.
  • Separate view assignment, actual change governance, author claims, static observations, and signed approval.
  • Run the required tests yourself; local review does not execute arbitrary project code.
  • Use draft/source → shared/destination for review and insertion; measurements remain target-before/source-after.
  • Attest explicit accepted degradation without deleting findings or calling unready code clean.
  • Keep every finding available and every unsupported or unavailable check explicit.

See atomic review for all selectors, output options, change-review inputs, and explicit publication/signing commands.