feat(config,curator,recall): memory curator job on opus high, notes head inline in the envelope, portrait in the morning seed

This commit is contained in:
hh
2026-09-01 16:48:25 +02:00
parent 58e343aae0
commit 3a77a12447
7 changed files with 375 additions and 27 deletions
+10 -6
View File
@@ -371,15 +371,19 @@ def append_notes(name: str, lines: list[str]) -> int:
def sort_notes() -> None:
"""Сортирует и дедупит только `## лента`; шапку (сейчас/паттерны/…) не трогает."""
for path in NOTES.glob("* - наблюдения.md"):
text = path.read_text(encoding="utf-8")
head, bullets = [], []
for ln in text.splitlines():
(bullets if ln.startswith("- ") else head).append(ln)
head_text, sep, feed = text.partition("## лента\n")
bullets = [ln for ln in feed.splitlines() if ln.startswith("- ")]
bullets = sorted(dict.fromkeys(bullets), key=lambda ln: ln[2:12])
while head and not head[-1].strip():
head.pop()
path.write_text("\n".join([*head, "", *bullets]) + "\n", encoding="utf-8")
if not sep:
head_text = head_text.rstrip("\n") + "\n\n"
head_text = head_text.replace("\n- ", "\n").rstrip() + "\n\n"
path.write_text(
head_text.rstrip("\n") + "\n\n## лента\n" + "\n".join(bullets) + "\n",
encoding="utf-8",
)
def link_card(person_path: Path, name: str) -> bool: