Skip to main content
Task Pipeline · Layer 02

Task Execution Envelope (TEE)

After decomposition, each slice receives a Task Execution Envelope that tells the implementer agent exactly what it can and cannot do. The implementer outputs to a staging file — not the codebase. The human applies changes they agree with.

Escalation rule

If the implementer detects it needs to violate any TEE boundary, it stops and returns a structured escalation. It never proceeds silently outside its envelope.


TEE Field Reference​

FieldDescription
slice_idUnique identifier for this task slice
laneA | B | C — inherited from ECO classification
strategyFrom strategy selection step
descriptionWhat this slice should accomplish
allowed_modulesModules this slice may modify. Changes outside → rejected
allowed_filesSpecific files (empty = any within modules)
blocked_filesFiles the implementer must not touch
max_linesMaximum diff size (300–500 depending on strategy)
retrieval_modeindex_only | dual_mode (from ECO)
context_packetFiltered context relevant to this slice only
patterns_to_followCanonical pattern names for compliance
gate_failures_in_scopeExisting test failures in allowed files
tests_requiredBoolean — always true for Lane B/C
test_scopeunit | unit+integration
review_typeci_only | analyst_review | specialist_review
escalation_conditionsWhen to halt and return to analyst
confidence_at_planningECO confidence when plan was made. If implementer re-queries and confidence drops >15 points: escalate.

Strategy Selection Matrix​

IntentDefault strategyAlso permittedNever permitted
bug_fixrefactor-in-placeadditive (if fix requires new code)migration, parallel_path
new_featureadditive, flag-firstrefactor, migration(all valid)
refactorrefactor-in-placemigration, parallel_pathadditive
dep_updatemigrationparallel_pathadditive
quick_fixnone (Lane A)refactor-in-place if escalatedmigration, parallel_path

The analyst can choose any permitted strategy with a logged justification. Strategy overrides are recorded in the decision trace.


Decomposition Rules​

Max slice size:   300–500 lines (strategy-dependent)
Scope: Single module per slice
Testability: Each slice must be independently testable
Composite slices: Tagged by which intent they serve
Each slice has its own TEE boundaries

Staging Flow​