- Replace command/subcommand/args with module/method/input envelope - Calendar handler uses discriminated union (mode) for read operations - Strict Pydantic models with extra='forbid' for all calendar methods - Worker max_iters=7, router prompt simplified (removed project_cli_defaults) - Skill index cards + per-action files for progressive disclosure - Frontend/AG-UI aligned to module/method dispatch - Protocol docs updated to module/method/input contract WIP: action cards need envelope fix, 2 tests need update, memory handler needs Pydantic models.
5.7 KiB
Decision Log: Single CLI + Progressive Skill Disclosure Redesign
Accepted Decisions
D1. Keep one executable tool
Accepted.
Reason:
- lower tool-selection complexity
- lower repeated schema exposure cost
- consistent with the original valid direction of the CLI refactor
D2. Replace command/subcommand/args with module/method/input
Accepted.
Reason:
- keeps one tool while removing ambiguous CLI-history semantics
- aligns the worker-facing protocol with business intent
- reduces repeated failure from action guessing
- keeps skill files decoupled from the executable tool contract
D2.1 Remove skill from project_cli
Accepted.
Reason:
- skill files are guidance, not transport
- project_cli should execute by business module and method only
- error messages and validation should remain tool-native and not point back into skill docs
D2.2 Use strong typed calendar read inputs
Accepted.
Reason:
date: strplus manual parsing is glue code and too easy to misuse- Pydantic
date, timezone-awaredatetime, andUUIDgive stricter and clearer validation calendar.readcan cover day/range/event reads with one module-scoped method while still keeping input modes explicit
D3. Keep progressive disclosure through skill files
Accepted.
Reason:
- allows the model to load only current-scenario knowledge
- avoids injecting every action definition into every model call
- fits AgentScope skill usage better than giant tool schemas
D4. Split skill knowledge into index + action cards
Accepted.
Reason:
- real progressive disclosure needs smaller files, not only a long
SKILL.md - action-scoped files are easier for the worker to read and apply correctly
D5. Set worker max_iters=7
Accepted.
Reason:
- current default 10 is too high for repeated invalid action discovery
- 7 preserves room for complex tasks without keeping the current waste level
D6. Keep worker temperature unchanged
Accepted.
Reason:
- explicit user requirement
- this task focuses on protocol clarity and token efficiency, not generation-style tuning
D7. Remove semantic reliance on worker context_messages
Accepted.
Reason:
- current runtime does not feed those messages into worker execution
- keeping the config active on worker is misleading and complicates reasoning about cost
Rejected Decisions
R1. Re-split into many domain tools
Rejected.
Reason:
- increases tool schema size
- increases selection ambiguity
- pushes the design back toward the old high-token path
R2. Keep old CLI shape and only improve skill writing
Rejected.
Reason:
- failure came from structural action ambiguity, not only poor wording
readremains overloaded even with better prose
R3. Keep broad legacy input compatibility
Rejected.
Reason:
- old aliases teach the model that guessing is acceptable
- compatibility paths increase parser complexity and maintenance burden
- the repository is still early enough to tighten the protocol cleanly
R4. Add duplicate-failure circuit breaker now
Rejected for this task.
Reason:
- user explicitly wants to keep some exploration room while refining skills
- this redesign should first fix the protocol itself
Open Questions To Resolve During Implementation
- Should router output add all optional execution hint fields in one step or phase them in gradually?
- Should
worker.config.context_messagesbe removed from schema entirely or retained as ignored/deprecated for one migration cycle? - Should
calendaraction files be separate files underactions/or a single file with stable sections andrangesreads? - Should action validation errors include
suggested_alternative_actionsfor every validation failure or only for selected known-confusion cases? - Should
archivebecome an explicit calendar action now, or remain represented viaupdate_event.patch.status = archiveduntil there is a dedicated route and UI contract? Frontend/live integration assertions still need migration fromResolved 2026-04-24: assertions migrated and integration tests passing.skill/actiontomodule/method
Session 2026-04-24: Integration Test Debugging
D8. Tool schema input must be required, not optional
Accepted.
Root cause of project_cli repeatedly receiving input: {}:
input: dict[str, Any] | None = Nonegenerated a tool schema withinputas optional, nullable, andadditionalProperties: true- Small models (qwen3.5-flash) interpret this as "input can be anything, including empty object"
- The tool schema has higher priority than skill file content in the model's attention
- Fix: changed to
input: dict[str, Any](required, no default, no nullable)
D9. Router must not resolve time or suggest tool args
Accepted.
Previous router prompt included instructions for:
- Including
project_cli_defaultsincontext_summary - Standardizing time values to project_cli input format
- Resolving relative dates via
system_time_local
This violated the router/worker responsibility split:
- Router: intent extraction + context summary + requires_tool evidence
- Worker: tool selection + time resolution via skill + ENV section + tool execution
Fix: removed all project_cli_defaults and time-resolution instructions from router prompt.
Time resolution is now the sole responsibility of worker + skill file, using system_time_local from ENV section as the single time source.
D10. Skill files should reference ENV section variable names explicitly
Accepted.
Instead of abstract instructions like "resolve dates using system_time_local", skill files should directly reference system_time_local and timezone_effective from USER_CONTEXT_JSON in the ENV section, with concrete examples showing how to extract values.