Skip to main content
Architecture · Intent & ECO

Execution Context Object (ECO)

The ECO is the machine-readable contract that carries evidence from the knowledge layer into lane classification, decomposition, execution, and trace logging. It is the bridge between knowledge and execution.

The ECO contains hard constraints (forced_lane_minimum, forced_retrieval_mode, forced_unknown) that the pipeline must obey. The pipeline can escalate above constraints — it can never downgrade below them.


Full Schema​

FieldTypeDescription
querystringOriginal requirement or feature description
intentobject{ primary, secondary?, composite: bool, retrieval_strategy, constraint_rule }
entity_scopestring[]Identified entities: module names, file paths, symbol names
modules_touchedstring[]Modules the knowledge layer determined are affected
dependency_depthintegerMaximum hop count in the dependency chain
cross_module_edgesobject[]Cross-module dependency edges: {from, to, edge_type, weight}
critical_path_hitbooleanWhether any file in .ai/critical-paths.txt is affected
hub_nodes_in_pathstring[]Hub nodes (>50 edges) in the dependency chain
eco_dimensionsobjectFive reliability dimensions (Coverage · Freshness · Mapping · Conflict · Graph)
evidence_checkpointsobjectBinary pass/fail per intent with provenance
freshnessobject{index_commit, head_commit, delta, lsp_state, delta_status}
confidence_scoreinteger0–100, from penalty matrix
penaltiesobject[]Each penalty: {rule, deduction, detail}
conflictsobject[]Spec/code conflicts detected with resolution status
forced_lane_minimumenumA | B | C — lowest lane evidence permits
forced_retrieval_modeenumindex_only | dual_mode
forced_unknownbooleanIf true, pipeline must not proceed to automated planning
escalation_reasonsstring[]Why forced constraints were set
recommended_laneenumA | B | C
recommended_strategyenumadditive | refactor | migration | parallel_path | flag_first
boundary_warningsstring[]What the knowledge layer cannot answer
unobservable_factorsstring[]Feature flags, runtime config, external APIs
suggested_nextobject{action, reason} — confidence-gated
mappingobjectMapping quality details with ranked alternatives

Constraint Enforcement Rules​

Evidence conditionForced constraint
modules_touched.length > 2forced_lane_minimum: C
critical_path_hit == trueforced_lane_minimum: C, forced_retrieval_mode: dual_mode
evidence_completeness == insufficient | unknownforced_unknown: true
confidence_score < 40forced_unknown: true
degradation_tier >= 3forced_lane_minimum: B, forced_retrieval_mode: dual_mode
conflicts.length > 0 (unresolved)forced_lane_minimum: B
Override policy

Only a human running dev override --reason "..." can bypass forced constraints. The override, reason, and identity are always logged.


ECO Construction Flow​


Spec / Code Conflict Resolution​

ConflictResolutionRationale
Spec references file/module that doesn't existFlag to developer. Code is ground truth for what exists.Spec is stale
Spec describes a flow that differs from codeEscalate to developer. Present both.Only the developer knows which is correct
Spec says modify but target is in critical-pathsCode constraints win. Escalate to Lane C.Architectural constraints exist for safety
Spec scope narrower than codebase evidenceCodebase wins. ECO includes full affected set with boundary_warning.Developer may not know full dependency chain
Spec scope broader than codebase (modules don't exist)Flag as partial. Distinguish modify-existing vs create-new.Spec may be planning ahead