{ "task_id": "DEV-000251", "task_revision": 1, "architecture_revision": "ADR-0018", "base_repo_revision": "c1cde67bcfff8e0e80553ce0562f9841f6c00b30", "risk_tier": "E", "intent": "Prevent the reflection worker from resolving cognition-required candidates before a governed reflection path evaluates them.", "requirement_ids": ["learning reflection loop", "durable candidate routing", "no false resolution"], "allowed_change_scope": {"modules": ["epistemics"], "paths": ["adapters/postgres/epistemics_repository.go", "cmd/reflection-worker/**", "modules/epistemics/domain/**", "dev/ACTIVE_TASK.json", "dev/tasks/DEV-000251-reflection-cognition-routing.json"]}, "forbidden_change_scope": {"paths": ["architecture/**", "security/**", "database/**", "deploy/**", "contracts/**", "LLM-local/**", "modules/work/**", "cmd/cognitive-worker/**"]}, "allowed_architecture_delta": {"new_cross_module_dependencies": 0, "new_canonical_owners": 0, "new_privileges": 0, "new_third_party_dependencies": 0, "new_database_owner_roles": 0}, "contracts": {"consume": ["existing ReflectionCandidate state and requires_cognition field", "existing Epistemics repository"], "may_change": []}, "semantic_owner": "Epistemics reflection candidate lifecycle", "canonical_state": ["existing epistemics.reflection_candidates rows only"], "state_transitions": ["OPEN deterministic -> EVALUATING -> RESOLVED", "OPEN cognition-required remains OPEN until governed evaluator"], "side_effects_and_privileges": ["existing epistemics owner updates only; no cognition call or proposal promotion"], "persistence_and_migrations": ["none"], "failure_retry_restart": ["cognition-required candidates remain durable and claimable only by a future cognition evaluator; stale deterministic claims recover"], "assumptions": ["reflection worker is the deterministic close loop and must not impersonate a cognitive evaluator"], "acceptance_scenarios": ["worker resolves deterministic candidate", "worker does not claim cognition-required candidate", "OPEN cognition candidate survives restart", "status remains healthy when only cognition candidates are pending"], "required_tests": ["go test ./cmd/reflection-worker ./adapters/postgres ./modules/epistemics/domain", "go vet ./cmd/reflection-worker ./adapters/postgres ./modules/epistemics/domain", "go run ./cmd/devctl preflight -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-diff -active dev/ACTIVE_TASK.json", "go run ./cmd/devctl check-architecture", "git diff --check", "independent", "CI", "production health smoke", "live reflection-worker status"], "terminal_gap_states": ["BLOCKED_BY_MISSING_CAPABILITY", "BLOCKED_BY_SPEC_GAP"] }