refactor(heartbeat): remove Completed section and tighten section gating
- Remove ## Completed section from HEARTBEAT.md template; completed tasks should be deleted, not accumulated - Change in_active_section from tri-state (None/True/False) to bool (True/False) so stray text before any ## heading no longer triggers heartbeat - Add test cases for stray pre-heading text and ## Notes section - Update docs/chat-commands.md to reference ## Active Tasks
This commit is contained in:
@@ -107,7 +107,7 @@ _HEARTBEAT_PREAMBLE = (
|
||||
def _heartbeat_has_active_tasks(content: str) -> bool:
|
||||
"""True if HEARTBEAT.md has task lines, ignoring headers, blanks and comments."""
|
||||
in_comment = False
|
||||
in_active_section: bool | None = None
|
||||
in_active_section: bool = False
|
||||
for line in content.splitlines():
|
||||
stripped = line.strip()
|
||||
if in_comment:
|
||||
|
||||
Reference in New Issue
Block a user