docs(ai-cli): note that green leaves no context breadcrumb - #128
Merged
Conversation
The statusline only persists a breadcrumb while context is yellow or red. At green it writes nothing, and drops any existing file when usage falls back below the yellow threshold -- absence is how the green state is represented, and the Stop hook short-circuits on a missing file. The doc described where breadcrumbs live without saying when they exist, so a missing file during a normal green session reads as a broken cache. Also records that an unchanged yellow/red refresh skips the rewrite, since that is the other reason the file's mtime can look stale. Follow-up to #125, which introduced the write-skipping behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs-only follow-up to #125.
docs/ai-cli-context-statusline.mdsaid where session breadcrumbs live but notwhen they exist. #125 changed that: the statusline now persists a breadcrumb
only while a session is yellow or red, so during a normal green session
~/.cache/ai-context-alerts/<session_id>.jsonis simply absent — which reads asa broken cache if you go looking for it.
Adds the lifecycle to the existing paragraph:
state, and the Stop hook short-circuits on a missing file.
whole-percent usage skips the rewrite, so the file's mtime can lag the
statusline by design.
Each claim was checked against the merged code rather than from memory:
executable_ai-statuslinegreen branch —rm -f "$state_path"guarded byprev_level != greenexecutable_context-threshold-stop.sh:21—[ ! -f "$state_path" ] && exit 0elifwrite gate comparinglevel/pct/new_ui_alertedexecutable_ai-statusline:53—cut -d. -f1No behavior change.
pre-commit --all-filesand both Neovim suites pass;prettier was clean on the first pass.