- Anchor file becomes temp/.active_project.<host pid>: dies with the GA process,
so closing GA auto-deactivates; re-activation requires user confirmation per SOP
- Multiple GA instances each keep their own active project, no cross-talk
- Startup sweep removes only legacy unsuffixed anchors and own-pid leftovers
(pid reuse); anchors of other pids are never touched — deliberately no
liveness probe, because os.kill(pid, 0) on Windows terminates the process
Activate a project with a file anchor (temp/.active_project); every turn
the agent_before hook appends an L1 context (rules + memory file pointer
+ wrap-up discipline) to the latest user message, while the full project
memory (L2) stays on disk for the model to read on demand.
Zero core changes: plugin + SOP + gitignore whitelist only.
- Plan card (📋): per-session message-scan with `plan_scan_baseline` so
`/continue` of a finished session doesn't auto-resurrect old plan cards;
prefers `<summary>当前步骤:` over the long plan-item echo; placeholder
while enter_plan_mode is armed but plan.md hasn't been written yet.
- Done annotation (⠿ {Verb} for Xm Ys · ↑ N · ↓ M): post-turn elapsed
+ per-call token deltas, frozen at done so the line stays put across
re-mounts. Spinner annotation gated on cumulative deltas past stream-start
baselines — fixes `↓ 16` showing immediately on prompt submit.
- fold_turns regex anchored to line-start (`^` + MULTILINE) so embedded
backticks in tool output (e.g. `N|\`\`\`\`` gutter from file_read) don't
pair with later real fences. ~100x faster on long /continue sessions.
- /cost: per-session card + `/cost all`; `Context window` line now reads
GA's actual char cap via `cost_tracker.context_window_chars(backend)` =
`backend.context_win * 3` (the `trim_messages_history` trigger threshold
in llmcore.py), so the percentage reflects real budget and respects
`mykey.py` overrides. Unit changes from token to character. Dropped the
model-theoretical `_CTX_LIMITS` table (never actually constrained anything).
Subagent log scan via `cost_tracker.scan_subagent_logs` aggregates
`temp/*/stdout.log` since TUI start.
- /review: standalone in-session reviewer; reuses `review_cmd.handle`
to render the inline prompt and submits as a normal user task.
- llmcore: emit `[Output] tokens=N` for chat_completions / responses modes
(already emitted for `messages` SSE) so cost_tracker scopes output
tokens uniformly across all three API modes.
- review_inline_prompt.{txt,en.txt}: filled out the in-session review
discipline — Three Iron Rules, Q1-Q4 framing, severity examples,
8 false-positive rules expanded, 8 wording rules expanded, 8-item
self-check. ZH/EN both grow ~80 lines.
- memory/review_sop.md: rewrite 52 → 191 lines, 11 sections covering
quick-start, entry files, Three Iron Rules, 5-step workflow, severity,
output protocol, relationship to plan_sop / verify_sop. Style mirrors
plan_sop.md + autonomous_operation_sop.md.
Files: frontends/{tuiapp_v2,tuiapp,cost_tracker,plan_state}.py, llmcore.py,
memory/review_sop.md, memory/review_sop/review_inline_prompt.{txt,en.txt},
.gitignore (allowlist new SOP).
Co-authored-by: Shen Hao <shenhao-stu@users.noreply.github.com>