Skip to content

feat(prompt): add verification discipline to default identity#97

Merged
jkyberneees merged 1 commit into
mainfrom
feat/verification-discipline-prompt
Jul 25, 2026
Merged

feat(prompt): add verification discipline to default identity#97
jkyberneees merged 1 commit into
mainfrom
feat/verification-discipline-prompt

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

What

Adds a Verification discipline section to the compiled-in default system prompt (cmd/odek/main.go), plus a matching line in the prompt's doc comment.

Prompt-only change ("Layer 0"): no engine machinery, no config, no new tool arguments.

Why

The ReAct loop treats "tool returned without error" as success, and the model can declare a change done without ever observing a check. This section makes verification an explicit standard:

  • A state-changing action (write, patch, mutating shell command) is not done until a deterministic check (build, tests, read-back) has run and passed — the check's exit status decides, not the model's expectation.
  • Defines what counts as decisive (test -f file is not a check; prefer build + tests > build > syntax > read-back).
  • Checks must be read-only, self-contained, and re-runnable.
  • If no deterministic check exists, the agent must say so instead of inventing a trivial one.
  • Failure protocol: diagnose the root cause, never weaken the check, stop after two failures on the same target and report the blocker.

Deliberately not included

Engine-enforced verification (auto-derived checks executed per iteration, rollback) was evaluated and deferred: it enforces the link that already works, adds an unapproved LLM-derived command execution path (against odek's deny-by-default posture), and has fuzzy coverage semantics with parallel tool batches. If this prompt proves insufficient, the next step is a single final-answer gate, not per-iteration enforcement.

Testing

  • go build ./...
  • go test ./cmd/odek/ -run 'TestDefaultSystemPrompt|TestLoadIdentityFile|TestBuildSystemPrompt|TestIdentity' -count=1 — pass
  • No test asserts on prompt content beyond presence checks.

Suggested follow-up: A/B the AIEB benchmark suite with/without this prompt to measure the behavioral delta.

State changes (file writes, patches, mutating shell commands) are only
'done' once a deterministic check — build, tests, or read-back — has
run and passed. The section defines what counts as a decisive check,
requires read-only self-contained verification, forbids claiming
success before observing the result, and sets the failure protocol:
diagnose the root cause, never weaken the check, stop after two
failures on the same target and report the blocker.

Prompt-only change (Layer 0): no engine machinery, so it composes with
any identity override and costs nothing when the model already verifies.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
odek 7ce4ac1 Commit Preview URL

Branch Preview URL
Jul 25 2026, 11:11 AM

@jkyberneees
jkyberneees merged commit 6a90bc4 into main Jul 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant