Implemented a comprehensive estimation workflow with a robust fallback for actor resolution, domain model enhancements, DB schema updates, and test coverage.
What was implemented
- Added a 4-level fallback chain in use_action() for estimation_actor:
- CLI override > action YAML > project config > actor.default.estimation global config
- The resolved actor is stored on the plan at creation time for consistency and traceability
- Introduced PLAN_ESTIMATION_COMPLETE to the EventType enum with the value "plan.estimation_complete"
- Wired _run_estimation() to emit PLAN_ESTIMATION_COMPLETE after a successful estimation
- Extended Plan domain model with cost_estimate_usd and estimation_report fields
- Extended LifecyclePlanModel DB model with a new estimation_report_json column
- Wired cost_estimate_usd and estimation_report_json through from_domain(), to_domain(), and update()
- Created Alembic migration m6_006_estimation_report_json to add the new column
- Added a Behave BDD feature file with 11 scenarios covering all acceptance criteria
Key design decisions
- The fallback chain is implemented in use_action() so the resolved actor is stored on the plan at creation time
- The estimation step runs in execute_plan() (Strategize-to-Execute transition), not in complete_strategize()
- Estimation failures are non-fatal (logged as warnings, never block Execute transition)
- The estimation_report field stores the full EstimationResult as a JSON dict for future use
ISSUES CLOSED: #651