Why
write currently waits for the full generation before printing. Streaming makes the CLI feel alive, helps users catch slop early, and is a classic high-visibility contribution for a terminal product.
Scope
- Stream MLX generation tokens to stdout while drafting (
--channel post first; article sections can stream per section)
- Keep
--json non-streaming (emit one final receipt) unless --json --stream is explicitly designed
- Show a small Rich status line: channel, adapter=none|path, section N/M for articles
- Ctrl-C should abort cleanly without corrupting profile state
Pointers
src/personality_protect/write.py — generation
src/personality_protect/write_article.py — section loop
src/personality_protect/mlx_runtime.py — MLX calls
cli.py write command
Acceptance criteria
Difficulty
Easy–Medium — mostly plumbing a stream callback through existing generate helpers.
Why
writecurrently waits for the full generation before printing. Streaming makes the CLI feel alive, helps users catch slop early, and is a classic high-visibility contribution for a terminal product.Scope
--channel postfirst; article sections can stream per section)--jsonnon-streaming (emit one final receipt) unless--json --streamis explicitly designedPointers
src/personality_protect/write.py— generationsrc/personality_protect/write_article.py— section loopsrc/personality_protect/mlx_runtime.py— MLX callscli.pywritecommandAcceptance criteria
--jsonremains a single final object (backward compatible)Difficulty
Easy–Medium — mostly plumbing a stream callback through existing generate helpers.