Blog /

Engineering notes

From AI coding to verifiable delivery

Define the candidate, carry evidence across sessions, and make the approval boundary explicit.

DevCodex Labs3 min read
On this page
  1. Decide what completion means before editing
  2. Give review an immutable target
  3. Preserve the next permitted decision
  4. Record the review target in commands a second session can repeat
  5. Sources

Decide what completion means before editing

A request can ask for a fix, an explanation, an independent review, or all three. These produce different artifacts and permissions. Capture the intent, affected scope, required checks and which decision belongs to the maintainer. That record makes it possible to recover after a context switch without silently widening the work.

DevCodex describes an intent-driven workflow across coding hosts. The workflow reads project context, selects tasks and skills, verifies changes and persists checkpoints. The host continues to execute code, while the workflow establishes the delivery protocol.

Give review an immutable target

A reviewer needs the candidate identity, the expected parent and the applicable acceptance checks. A Git tree identifies the exact files and a patch digest covers the submitted delta. Store the exact command and outcome alongside both identities. For a narrow follow-up, keep previously verified checks available and rerun the checks whose inputs changed.

Useful review evidence includes a failure that the fix is expected to prevent. For example, for a generated directory replaced on success, verify that a failed rebuild preserves the prior files, that the preview does not silently call them current, and that a retry installs the new files only after validation. A positive build confirms a different property than this sequence.

Preserve the next permitted decision

Separate completion of implementation, acceptance of a tree and permission to publish. Record the outstanding actions, the specific boundary, and the evidence a new reviewer can access. A workflow can automate local checks and produce a useful checkpoint while keeping remote publication an accountable maintainer decision.

Record the review target in commands a second session can repeat

DevCodex 1.20.7 describes devcodex status as a local view of project state. Task Lifecycle v0.3.3 documents pre-check, scope confirmation, verification and handoff. For a staged candidate, run the following in a dedicated review copy with the intended index staged. git write-tree can write to that copy's Git object store. The script hashes Git's raw diff bytes.

import { execFileSync } from 'node:child_process';
import { createHash } from 'node:crypto';

const git = args => execFileSync('git', args, { maxBuffer: 64 * 1024 * 1024 });
const head = git(['rev-parse', 'HEAD']).toString('utf8').trim();
const tree = git(['write-tree']).toString('utf8').trim();
const stagedDiff = git([
  'diff', '--cached', '--binary', '--no-color', '--no-ext-diff', '--no-textconv',
  '--no-renames', '--full-index', '--src-prefix=a/', '--dst-prefix=b/', head, '--',
]);
const stagedDiffSha256 = createHash('sha256').update(stagedDiff).digest('hex');
console.log(JSON.stringify({ head, tree, stagedDiffSha256 }, null, 2));

At handoff, record the resulting head, tree and stagedDiffSha256, plus the Git version and review settings. Recompute them with the same inputs and compare all three values before reusing an approval. For a committed candidate, also verify its parent and tree with git rev-parse <candidate>^ and git rev-parse <candidate>^{tree}.

Run git diff --cached --check as a separate check for whitespace errors and conflict markers. Two different one-line edits staged on the same HEAD can both pass this check while producing different trees and digests. Record the check's exit status and identify the reviewed build output by its file manifest.

Use the status record to locate the evidence. Record authorization and outcome separately for the local commit, the remote branch write and publication.

Sources

Related work