fix: [ENG-2858] tool-mode dream CLI UX — finalize validation, SKILL.md, kinds drift-guard
Address findings from interactive e2e testing (blind + adversarial agents) and /brv-pre-push-review: brv dream finalize: - Correct --help examples to match what scan emits: relative paths with the .html extension and hyphens (not underscores). Blind-agent tester copy-pasted the old style and hit a silent no-op. - Reject combinations of --archive and --archive-file as mutually exclusive (previously --archive silently won, --archive-file dropped). - Require at least one of --archive or --archive-file. A bare `dream finalize --session X` previously exited 0 with archived:[], which hides a typo'd flag in scripting. - Cap archive batch at 200 entries per call. Without this, a multi-MB --archive string crashed the daemon with a raw Node stack trace (ERR_AGENT_DISCONNECTED). Callers with larger lists should split into multiple finalize calls. brv dream scan: - Derive VALID_KINDS from the canonical ALL_DREAM_KINDS on the daemon side instead of redeclaring the same literal array in the CLI. Prevents the two lists from drifting if a new kind is ever added. SKILL.md: - Add section "7. Dream — Context Tree Cleanup" documenting the three-phase scan → curate → finalize workflow, the four candidate kinds, undo semantics, and the v1 stateless-session caveat. Matches the existing pattern (Overview / Use this when / Do NOT use this when / Commands) used by the other command sections.
N
Nguyễn Thuận Phát committed
438c9543041e8ff72c409b9b6b0ffbb49376c214
Parent: 2cb2bf3