Classify every comment as tautology, stale, excuse or decision record. Tautology/stale/excuse comments are deleted (excuses filed as issues #196-#236), decisions moved to docs/adr/0001-0034. - scripts/lint-comments.sh + .comment-baseline: per-file comment count may only go down; wired into tests/all.sh - .claude/skills/delete-comment: repeatable audit workflow - cargo fmt applied to touched crates Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
918 B
918 B
Startup latency, prompt cache stability and tool snapshots
Status: accepted
Context
Startup should be fast, yet the system prompt must stay cache-stable. Slow MCP servers and model list fetches would delay it.
Decision
- Model catalog: stale-while-revalidate; any cached list starts immediately, an expired one refreshes in the background.
- MCP servers get a short grace period so fast ones land in the (cache-stable) startup prompt; slow ones connect in the background.
- The tool snapshot for
tasksubagents and codemode is taken after every other tool (MCP, lens, task) is registered; children get the parent's tools as of then, withouttask(no recursion), and codemode is not callable inside itself.
Consequences
Late-connecting servers do not appear in the startup prompt.
Code: crates/hx-cli/src/main.rs (model catalog loader, run/startup MCP wait, subagent and codemode tool registration)