Skip to content

feat(memory): TASK 기억, 여러 단계·여러 턴 일을 하나의 기억 단위로 (4.98.0) - #170

Merged
CocoRoF merged 6 commits into
mainfrom
feat/task-memory
Oct 23, 2026
Merged

CocoRoF merged 6 commits into
mainfrom
feat/task-memory

Conversation

@CocoRoF

@CocoRoF CocoRoF commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

무엇을 더했나

TASK 기억이다. 여러 단계·여러 턴 일을 사실·원문과 따로 두는 기억 층이다. 설계: Agent-Geny 메모리와 TASK 구조 분석의 1~3단계(기록·판단·회상)를 런타임 쪽에 구현했다. 판단 주체는 "모델 선언 + 호스트 보완", 범위는 "사람별" 이다.

무엇 어디
모델 Task, TaskEvent, 저장 계약 TaskStore, 참조 구현 InMemoryTaskStore, provider_tasks() memory/tasks.py
도구 Task(open·update·switch·close·list), TaskRecall(card·history·turn) host/task_tools.py
턴 시작 TASK 판(현재 TASK 전체 + 다른 열린 TASK), 검색 질의에 현재 TASK 더하기 Stage 2 _preload_task_board
판을 매 턴 싣는 volatile 블록 Stage 3 TaskBoardBlock, build_pipeline
턴 끝 기록(요청·답·도구·파일·결과), TodoWrite → 계획, 호스트 보완 열기 runner._record_task_turn
압축 요약을 현재 TASK 의 체크포인트로 core.compaction._keep_checkpoint_on_task
  • 호스트 보완 기준(LLM 없음): 끝나지 않은 계획(TodoWrite) 2단계 이상, 또는 도구를 쓰다 끝나지 못한 턴(멈춤·오류). 도구도 Task 도 쓰지 않은 짧은 질문은 현재 TASK 의 기록에 넣지 않는다.
  • 판의 몫은 창의 5%(최소 3,000자)다. 넘치면 오래된 결정·파일·기록부터 빼고, 뺀 수와 TaskRecall 을 적는다.
  • TASK 마다 tasks/task-<id>.md 노트를 만들어 기억 검색과 메모리 화면에 오른다.
  • provider 에 tasks() 가 없으면 아무것도 바뀌지 않는다. XGEN 의 DB 저장소는 xgen-core 표 + workflow 구현으로 따로 붙는다.

확인

  • tests/unit/test_task_memory.py 19개(저장소, 도구, 판·카드 표식, 턴 기록·보완, 체크포인트, Stage 2 판·질의, 다른 대화 원문).
  • 전체 6,246 passed, 18 skipped. ruff, format, mypy(core·llm_client), gen_event_docs --check 통과.

🤖 Generated with Claude Code

CocoRoF and others added 6 commits October 23, 2026 11:26
….98.0)

- memory.tasks: Task / TaskEvent, the TaskStore contract (host-scoped per person,
  spanning conversations), InMemoryTaskStore, provider_tasks(); the ephemeral
  provider has the layer.
- Judged by the model and completed by the host: the Task tool (open, update,
  switch, close, list); at the end of each turn the host records the turn on the
  current task (request, answer, tools, files, outcome), turns TodoWrite's list into
  its plan, keeps a compaction's summary on it, and opens a task from the request
  when the turn was clearly multi-step work (an unfinished plan of two or more steps,
  or a turn that ended before it finished after using tools). Quick unrelated
  questions are not put on the current task.
- Recalled every turn: the task board (TaskBoardBlock, volatile) carries this
  conversation's current task in full and the other open tasks in one line each,
  sized as a share of the window, with markers naming TaskRecall when it has to
  leave entries out; memory search adds the current task's title and goal;
  TaskRecall reads a task's card, history and one turn word for word (this
  conversation through ConversationHistory, another through provider.session_stm).
  Each task is rendered to a tasks/ note so memory search finds it.
- Event context.task_board (catalogue v19).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…hed twice

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-to-end test

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…iders), list finds tasks by words

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@CocoRoF
CocoRoF merged commit 53c2e82 into main Oct 23, 2026
7 checks passed
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