# E-030 — An early contract can freeze a hypothesis not yet inspected

## Context and hierarchy

- Date: 2026-08-03.
- Main objective: detect drift without turning the guard into early bureaucracy.
- Phase objective: allow the agent to learn the real structure before freezing objective, scope, and evidence.
- Round: evolution of the pre-edit protocol and contextual evidence.

## Observed trajectory

The previous flow required `start` with a complete objective, type, and scope before any guided exploration. This protects against accommodating the contract after editing, but forces artificial precision when the agent still only has the requirement. In large repositories, that premature precision can declare the wrong scope or discourage use of the guard.

## Adopted correction

A local phase that cannot be promoted on its own is added:

1. `oguard intent` stores a mutable hypothesis with objective, type, and candidate globs.
2. `oguard intent-scan` enumerates the observable Git files and candidate tests that match the globs, with an explicit limit of 80 files.
3. The agent can review and replace the draft.
4. `oguard start --from-intent` copies the chosen version into the frozen contract and records the draft's hash, timestamp, and scan count.

The draft lives under `.oguard/`; it grants no preflight and does not activate the gate. After a typed contract is created, `intent` is rejected, and any correction of direction requires a successor round.

## Evidence and behavior

The regression creates a minimal repo, declares an initial scope of `src/**`, obtains a single candidate file, revises the scope to `src/**,test/**`, and explicitly promotes the second version. It verifies that the frozen contract receives the revised scope, retains the `intent-promoted` event, and does not allow reopening a draft after `start`.

## Classification and limit

This is a protocol-friction fix, not a semantic detector. The scan finds candidates by structure and names; it does not certify that they are the right place, nor that the tests cover the behavior. The agent's review remains necessary.

## Impact and follow-up

The thesis becomes more precise: freezing late relative to exploration, but before material mutation, preserves both learning and auditability. Measure in future telemetry the proportion of intents promoted, revised, and abandoned; do not turn those counts into a causal inference without comparison.
