Skip to content

Phase 4: Contextual Delivery

Phase 4 is the culmination of the Briefing — it aggregates all previous phases into a tailored deliverable. The delivery mode is determined by the user’s situation selected in Phase 1.

ModeSituationContentGenerator Function
Síntese (Synthesis)pesquisandoConcise summary of favorable and unfavorable precedentsbuildSinteseContent()
Parecer (Opinion)avaliandoFormal legal opinion with favorability percentagebuildParecerContent()
Estratégia (Strategy)atuando2-3 strategic paths with actionable stepsbuildEstrategiaContent()
Mapa (Map)estudandoTemporal evolution map + divergent current analysisbuildMapaContent()
  1. All phase data aggregated (diagnosis + precedents + risks)
  2. Delivery mode automatically selected based on Phase 1 situation
  3. AI generates the tailored deliverable
  4. A delivery block renders the output
  5. An exit_card block appears with session summary + PDF export option
Block TypePurpose
deliveryFinal analysis output in one of the 4 adaptive modes
exit_cardSession completion card with summary and export options
// Generate the delivery based on accumulated briefing state
generateDelivery(sessionId: string)
→ Returns: { state: BriefingFlowState, phase4Blocks: Block[] }
// Select a strategic path (Strategy mode)
choosePath(sessionId: string, pathId: string)
→ Returns: BriefingFlowState
// Set the procedural stage
setFaseProcessual(sessionId: string, fase: string)
→ Returns: BriefingFlowState
// Finalize the session
finalizeSession(sessionId: string)
→ Returns: BriefingFlowState
// Handle exit card actions (export, new session, etc.)
handleExitAction(sessionId: string, action: string)
→ Returns: { state: BriefingFlowState, action: string }

After delivery, the exit_card offers PDF export. The generated PDF reflects the user’s journey through all four phases:

  • Phase 1 diagnosis summary
  • Phase 2 selected precedents
  • Phase 3 risk balance visualization
  • Phase 4 delivery content in the chosen mode

See PDF Export for technical details.

🚧 Planned Feature — Phase 4 is planned for v0.4 milestone. Briefing PDF with phase selections is tracked in #289.