Shorter README with nothing that goes stale; honest rulebook budget; complete cycle instructions
ci / tests (macos-latest, python 3.10) (push) Canceled after 0s
ci / tests (macos-latest, python 3.11) (push) Canceled after 0s
ci / tests (macos-latest, python 3.13) (push) Canceled after 0s
ci / tests (macos-latest, python 3.9) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.10) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.11) (push) Canceled after 0s
ci / tests (ubuntu-latest, python 3.13) (push) Canceled after 0s

README cut by about 40 percent, with tests that refuse version numbers,
counts, years and a word ceiling. The rulebook budget now counts characters
as well as lines. Folded lessons no longer count as loose notes, reading a
lesson no longer invalidates a cycle, and the cycle brief answers the twenty
gaps the first real cycle reported. Adds `sisi cycle check`.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Fable 5.2 committed 2026-11-23 03:16:06 -07:00
1 parent 4a2905ba80
commit e5b603486b
12 files changed
+1026 -317

No files matched your search

+18 -2
View File
@@ -537,7 +537,22 @@ def new_lesson(con, f, cwd, fp):
return lid
def _append_note(kind_file, target, r, draft=False):
def notes_chars(con):
"""Characters counted toward the learned-notes limit: length(change) of active, strength-1,
still-loose learned notes only. Folded lessons (into a rule, entry, draft or enforced check),
tool backlog lessons and strengthened lessons do not count: folding is what reduces this."""
try:
return con.execute(
"SELECT COALESCE(sum(length(change)),0) FROM lessons WHERE status IN ('open','applied') "
"AND COALESCE(strength,1)=1 AND folded_into IS NULL AND COALESCE(effect,'')='learned-note'"
).fetchone()[0]
except Exception:
return con.execute(
"SELECT COALESCE(sum(length(change)),0) FROM lessons WHERE status IN ('open','applied') "
"AND COALESCE(strength,1)=1 AND folded_into IS NULL").fetchone()[0]
def _append_note(kind_file, target, r, draft=False, note_text=None):
d = paths.notes_dir()
os.makedirs(d, exist_ok=True)
p = os.path.join(d, kind_file)
@@ -548,7 +563,8 @@ def _append_note(kind_file, target, r, draft=False):
if draft:
f.write("No recipe with this id exists yet. These notes are shown by `sisi done for` when their "
"words match, until a cycle turns them into a recipe or folds them elsewhere.\n\n")
f.write("- %s: %s (aim: %s; seen %d times; lesson %d)\n" % (store.now()[:10], " ".join(r["change"].split()), r["aim"], r["count"], r["id"]))
text = note_text if note_text is not None else r["change"]
f.write("- %s: %s (aim: %s; seen %d times; lesson %d)\n" % (store.now()[:10], " ".join(text.split()), r["aim"], r["count"], r["id"]))
return p