 Backlog

## Pending

### Verify direct tool execution after one-loop migration

Problem:
- Zuza now loads enabled tool and skill instructions into the main loop context
  and executes `next_action.tool_call` directly.
- The old selected-contract preload pass is obsolete, so remaining prompt,
  trace, and test coverage should focus on schema-valid direct calls and clear
  tool-result recovery.

Acceptance criteria:
- A simple replan from one tool to another does not require an extra LLM pass
  when the selected tool id is valid and arguments pass schema validation.
- Missing or invalid arguments produce a visible failed tool result that the
  main loop can recover from.
- The trace clearly distinguishes planning, actual tool execution, and final
  response.

### Memory search and skill distillation

Build first-class memory search around tags, task similarity, outcomes, and
reusable lessons. The goal is to make durable memories useful for future task
planning and eventually distill repeated successful patterns into explicit
Zuza skills.

Scope:
- tag-aware search filters for durable memory
- search by situation, outcome, failure cause, tool, site/domain, artifact type,
  and learned approach
- cluster related memory lessons across chats
- identify repeated successful chains of action that can become tools, senses,
  prompts, or operating rules
- keep raw traces out of memory search results unless explicitly requested for
  debugging

Why it matters:
- memories should be compact records of experience, not raw execution logs
- future planning and replanning should retrieve lessons, changed beliefs, and
  reusable content quickly
- skill distillation needs searchable, tagged experience records as input

### Download workflow for persistent browser tasks

Add first-class download primitives to `playwright_browser` so Zuza can handle
file downloads reliably during long-running browser tasks.

Scope:
- wait explicitly for browser downloads
- capture download metadata
- save downloads to a controlled workspace location
- return download file links back into the chat UI
- support multi-step flows where download completion is part of task success

Why it matters:
- current persistent browser sessions are good for navigation and form flows
- download handling still relies on generic waits and indirect inspection
- booking, reporting, export, and document retrieval tasks need explicit
  download lifecycle support
