Intent Drift

How it Works

Nine evidence providers score independent signals. Weighted together they produce an explainable alignment report - not a yes/no flag.

Multi-Layered Architecture

Pluggable architecture for custom evidence providers and export formats.

Original Goal
Current Plan
Execution Context
Evidence Providers (x9)
Weighted Scoring
Score & Status
Evidence Trace
CLI Exporters (TXT · MD · JSON)

Nine evidence providers

The engine each provider runs, what it costs, and the exact shape of its input and output.

Goal Alignment

engine GoalProvider (topic_alignment)

Normalizes the goal and plan (stopword removal, light suffix stripping) and scores overlap as salient-token recall with fuzzy alias matching - bag-of-words topical similarity, blended 60/40 across plan and execution narrative. Explicit shift language ("rather than", "instead of", "pivot") overrides toward low. The same goal expressed in different words still scores high.

original_goal (string), current_plan (string), optional execution_context (string)

score 0–100 · confidence 0–1 · short rationale

Constraints

constraint phrase coverage + negation detection

Checks each stated constraint as a fuzzy phrase against the plan, reasoning, and recent activity via term-frequency coverage. Constraints the work never mentions - or explicitly negates ("break", "drop", "violate") - read as violated.

constraints[] parsed from original prompt · current_plan

per-constraint satisfied/violated · aggregate compliance %

Scope

file-set diff + task boundary analysis

Compares the set of files and capabilities the task implied against the files actually touched and the plan's described surface. A new auth flow or an extra dependency directory where one file was expected pushes scope up.

task boundary (from goal) · touched files · plan steps

scope delta (expansion|stable|reduction) · boundary violations

Architecture

diff-shape rewrite detector · new-file surge check

Analyzes the change shape - simultaneous deletions and additions concentrated in a few files, or a surge of new files - to flag hidden rewrites and overengineering that a small-looking diff can mask.

import graph before/after · modified module boundaries

architectural delta flags · fanout/impact metrics

Execution

git-log + diff parser · reasoning annotator

Reads git diff, recent commit messages, edited file paths, and the agent's reasoning notes, then scores how closely the observed activity tracks the stated objective. Purely mechanical evidence - no generative step - so it is cheap and deterministic.

commit messages · edited paths · reasoning lines · diffs

execution-alignment score 0–100 · mismatched activities listed

File Graph

file-graph diffing · blast-radius estimator

Checks each edited file name against the goal and plan vocabulary - files whose names share no keyword with the stated intent are counted as out of area. Edits that reach into unrelated modules read as scattered work, the classic early signal of a hidden rewrite.

file graph before/after · task root files · change set

blast-radius delta · unexpected-file list · subtree outliers

Dependencies

lockfile + manifest diff parser

Parses manifest and lockfile diffs (package.json, requirements.txt, pyproject.toml, Cargo.toml, go.mod) with structural parsing, and flags any add/remove/upgrade. It does not judge the library itself - only that it changed without being declared in the goal.

manifest/lockfile diff (package.json, requirements.txt, pyproject.toml, …)

dependency delta list · unexpected-change flags per manifest

Requirement Coverage

success-criteria checker

For each stated success criterion, measures fuzzy phrase coverage of its tokens across the plan and execution evidence. Outputs a count - N of M criteria actually addressed - so partial coverage is visible instead of hidden behind a vague final message.

success_criteria[] · execution evidence

X/Y criteria covered · unaddressed criteria listed

Problematic Findings

cross-provider pattern analyzer

A static pattern pass over the other providers' evidence: large silent rewrites, unrelated-file sprawl, dependency planets, and goal-substitution narratives. Cross-checks the weighted outputs for combinations that individually look fine but together mean drift.

all provider evidence + scores

risk pattern list · affected providers

Alignment is a loop, not a flag

The full lifecycle, driven by real engine output. Step through it.

original_goal:
Reduce the application's memory usage.
constraints:
Stay under 100MB RAM
success_criteria:
Peak memory < 50MB

The goal is captured as the reference trajectory

The developer states what they actually want to build - the goal, its constraints, and its success criteria. This is the line every other trajectory is measured against.