55 lines
1.8 KiB
Markdown
55 lines
1.8 KiB
Markdown
# 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:
|
|
|
|
```text
|
|
chat_planner
|
|
-> chat_executor
|
|
-> VerifierInputHook + Gatekeeper
|
|
-> chat_verifier
|
|
-> chat_composer
|
|
-> final answer
|
|
```
|
|
|
|
Composer produces user-facing answers from filtered material only:
|
|
|
|
- `allowed_claims`
|
|
- `allowed_hypotheses`
|
|
- `missing_info`
|
|
- `recommended_actions`
|
|
- `rationale`
|
|
|
|
## Scope
|
|
|
|
- Added `chat-composer-prompt.md`.
|
|
- Added `chat_composer` Agent construction in `ChatService`.
|
|
- 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_output` under `diagnosis_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
|