Skip to content

v2.27.0: memory as an index-first, transcript-checked wiki with dreaming; to-do compaction - #92

Merged
cskwork merged 5 commits into
mainfrom
feat/memory-index-dream
Nov 16, 2026
Merged

cskwork merged 5 commits into
mainfrom
feat/memory-index-dream

Conversation

@cskwork

@cskwork cskwork commented Nov 16, 2026

Copy link
Copy Markdown
Owner

What

Applies Anthropic's The components of agent memory (and the knowledge-wiki quickstart conventions) to the kit's memory folder, and stops the to-do file from growing without bound.

Memory hierarchy

  • Scouts and intent read memory's INDEX.md first (a ## Core section of at most 25 lines / memory_core_kb, then a generated catalog), open only the pages they need, and grep when the index has no entry (answer "Not in memory" otherwise). Before, scouts read the whole folder.
  • sdlc.sh memory index rebuilds the catalog and lints: dangling links, MOVED TO stubs, pages without a basis tag, oversized pages, long pages without ## Current picture.
  • Agents write a page when they verify something reusable or hit a trap (purpose stated once, no fixed "record only X" rules). Fact lines end with [verified: path @ sha | as-of: date], [source: … | as-of: …] or [unconfirmed].
  • close <slug> shipped requires a Memory: line in evidence.md (pages updated, or none — reason). Dropped closes are exempt; check ship is unchanged.

Dreaming

  • sdlc.sh dream --check exits 10 when due: dream_every (3) closes since the last dream, or dream_max_days (14) with at least one close. Never due with zero closes.
  • sdlc.sh dream prints a brief for a fresh agent (roles/dreamer.md): verify notes against code at HEAD and against session transcripts listed by the optional transcripts: command (paths/lines only, capped), mark superseded facts was X until, CONFLICT: what can't be settled, merge duplicates into MOVED TO stubs, promote/demote Core rules, stay within budgets. sdlc.sh dream --done --through <close> records the run, so a failed launch loses nothing.

Close hygiene and safety

  • Close prunes reproducible caches listed in prune: (gradle-home, .gradle, node_modules, build, .m2, target) before archiving; evidence files are kept. Warns above archive_warn_mb.
  • approve/review/score/close hold a .state.lock (concurrent writes previously overwrote each other).

To-do compaction

  • Repeated state events (waiting, brief, suggest, working, sdlc status) keep only the latest per kind plus human events and everything after the last reply; older ones move to todo-history/<id>.log. todo.mjs compact --dry-run. On a real 395 KB file: 168 KB, with identical visible fields.
  • Archive overflow is appended, not rewritten; abandoned .todo.md.*.tmp files older than 1 hour are removed.
  • QA reads the latest review round plus still-open findings, not the whole review history.

Also replaces internal repository names in README examples, a code comment and tests with generic ones.

Downstream

Anything that runs sdlc.sh close <slug> shipped must first add - Memory: … to the slug's evidence.md.

Tests

  • node: 220/220.
  • selftest: run locally except ~13 checks in three sections that a local hook blocks (they use git reset --hard in temp repos); CI runs the full selftest.

todo.md가 386KB까지 커졌다(이벤트 2,360개 중 waiting·brief 반복 1,208개). 종류별 최신 1개·사람 이벤트·마지막 답글 이후는 남기고 나머지는 todo-history/<id>.log로. todo.mjs compact --dry-run. 실제 파일 복사본 395,432→167,943바이트, 화면 값 동일. QA는 review.md 전체 대신 최신 회차와 미해결 지적만.
…27.0)

scout가 memory 폴더 전체(약 45K 토큰)를 읽던 것을 INDEX.md(sdlc.sh memory index) 먼저로. close shipped는 evidence.md의 Memory: 줄(갱신 페이지 또는 none — 이유)을 요구(dropped 제외, check ship 불변). sdlc.sh dream / dream --check(닫힌 slug 수 dream_every=3, dream_max_days=14는 1건 이상 닫혔을 때만). close 때 prune: 목록의 빌드 캐시 정리, .state 잠금.
… 문서의 내부 저장소 이름 제거

dream 브리프에 transcripts: 명령({slug},{since})의 기록 위치(내용 없이 경로·줄)를 넣고 dreamer가 메모를 원본 기록과 대조. 사실마다 근거·as-of, was X until·CONFLICT·MOVED TO·Current picture, 전역 부재 단정 금지, 입력은 지시 아님. INDEX.md ## Core(25줄·2KB). memory index lint(끊긴 링크·근거 없는 페이지·큰 페이지). dream은 브리프만, 기록은 dream --done --through. README·주석·시험 예시의 내부 저장소 이름을 일반 이름으로.
@cskwork
cskwork merged commit 1028114 into main Nov 16, 2026
3 checks passed
@cskwork
cskwork deleted the feat/memory-index-dream branch November 16, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant