1.8 KiB
1.8 KiB
Executor Composer Final Answer
Background
Stages one to three moved the Chat diagnosis chain to structured Executor output, deterministic Gatekeeper validation, and Verifier claim_checks.
Before this stage, ChatService still owned final answer rendering. PASS paths could use a temporary V2 renderer, while LOW_CONFID and REJECT paths used templates. That left final user-facing expression too close to Executor material and made it harder to prove that only Verifier-allowed claims reached the user.
Goal
Add a Composer expression layer after Verifier:
chat_planner
-> chat_executor
-> VerifierInputHook + Gatekeeper
-> chat_verifier
-> chat_composer
-> final answer
Composer produces user-facing answers from filtered material only:
allowed_claimsallowed_hypothesesmissing_inforecommended_actionsrationale
Scope
- Added
chat-composer-prompt.md. - Added
chat_composerAgent construction inChatService. - Added Composer input filtering from Verifier decision and Executor structured output.
- Replaced PASS temporary V2 renderer usage with Composer-or-safe-fallback rendering.
- Routed LOW_CONFID and REJECT final answers through Composer when Verifier output is valid.
- Added deterministic fallback for malformed Composer output.
- Persisted
composer_outputunderdiagnosis_session.self_evaluation.verifier_evaluation. - Updated sequential workflow tests.
Non-Goals
- No Planner changes.
- No Executor retry changes.
- No Gatekeeper rule expansion.
- No Verifier classification expansion.
- No database schema migration.
- No stage-five eval fixture expansion.
OpenSpec
- Active change before archive:
openspec/changes/executor-composer-final-answer - Capabilities:
chat-composer-agent,chat-verifier-agent - Scale: standard