yoi/.yoi/tickets/00001KXMK7YMC/thread.md

158 lines
5.0 KiB
Markdown

<!-- event: create author: "yoi ticket" at: 2026-07-16T04:34:01Z -->
## 作成
LocalTicketBackend によって作成されました。
---
<!-- event: intake_summary author: hare at: 2026-07-16T04:35:41Z -->
## Intake summary
Marked ready by `yoi ticket state`.
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-16T04:35:41Z from: planning to: ready reason: cli_state field: state -->
## State changed
Marked ready by `yoi ticket state`.
---
<!-- event: decision author: hare at: 2026-07-16T04:38:21Z -->
## Decision
ユーザー指示により、設計で止める Ticket ではなく実装 Ticket として再スコープした。Overview-first extract / evidence tools は実装要件に変更し、staging 審査・剪定も resolution/disposition の実装まで含める。
---
<!-- event: decision author: hare at: 2026-07-16T14:06:41Z -->
## Decision
実装者が対象領域と意図を追いやすいように、実装意図、対象 module、実装方針、想定順序を item.md に追記した。特に `extract/input.rs`、`extract/tool.rs`、`extract/payload.rs`、`extract/staging.rs`、`worker.rs`、`memory_extract_system.md` を主な対象として明示し、初期 evidence tools は extract slice 内の bounded read-only search/read/anchor 解決に閉じる方針を示した。
---
<!-- event: decision author: hare at: 2026-07-16T17:19:41Z -->
## Decision
Rescoped from broad Overview-first extract implementation to the worker implementation slice. This Ticket now implements an extract worker that runs with only the builtin:session-explore feature enabled, connected to an immutable conversation snapshot and filtered Overview projection. It depends on Ticket 00001KXNYXNM6 for the staging source anchor / evidence ref format.
---
<!-- event: decision author: hare at: 2026-07-17T18:10:00Z -->
## Decision
Design updated: abandon the old batch `write_extracted` / `decisions` / `discussions` / `attempts` / `requests` staging direction. Extract now stages flat candidate records with `stage_candidate` and finishes with `finish_extraction`. The older dependency on 00001KXNYXNM6 is historical; the active schema dependency is 00001KXRM6G0G.
---
<!-- event: intake_summary author: hare at: 2026-07-18T01:12:22Z -->
## Intake summary
Marked ready by `yoi ticket state`.
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:12:22Z from: planning to: ready reason: cli_state field: state -->
## State changed
Marked ready by `yoi ticket state`.
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:12:22Z from: ready to: queued reason: queued field: state -->
## State changed
Ticket を `yoi ticket` が queued にしました。
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:12:22Z from: queued to: inprogress reason: cli_state field: state -->
## State changed
State changed to `inprogress`.
---
<!-- event: implementation_report author: hare at: 2026-07-18T01:35:46Z -->
## Implementation report
Implemented the session-explore-backed memory extract worker.
Changes:
- Added `builtin:session-explore` with `search_evidence`, `read_evidence`, `stage_candidate`, and `finish_extraction`.
- Extract worker now builds an immutable `SessionReferenceView` at extract start and enables only session-explore tools for the internal worker.
- Added overview-first / evidence-index-second extract input rendering over the reference view.
- `stage_candidate` writes one flat staging record per call, resolving evidence ids into bounded staging evidence and `SourceEvidenceRef` anchors.
- `finish_extraction` supports normal no-candidate completion with `staged_count = 0`.
- Updated `memory_extract_system.md` to the session-explore / stage / finish contract.
- Added a single-candidate staging helper in `memory::extract::staging`.
- Updated extract-trigger tests to use `finish_extraction` and added session-explore unit tests.
Validation:
- `cargo fmt --check`
- `cargo test -p worker`
- `cargo test -p memory`
- `nix build .#yoi`
- `yoi ticket doctor`
---
<!-- event: state_changed author: "yoi ticket" at: 2026-07-18T01:35:46Z from: inprogress to: done reason: cli_state field: state -->
## State changed
State changed to `done`.
---
<!-- event: state_changed author: hare at: 2026-07-18T01:35:46Z from: done to: closed reason: closed field: state -->
## State changed
Ticket を closed にしました。
---
<!-- event: close author: hare at: 2026-07-18T01:35:46Z status: closed -->
## 完了
Implemented the session-explore-backed extract worker.
The extract worker now receives an immutable `SessionReferenceView` snapshot and only the `builtin:session-explore` tool surface. It can search/read bounded evidence, stage one flat candidate per `stage_candidate` call with resolved source anchors, and finish cleanly with `finish_extraction` including the no-candidate path.
Validation passed:
- `cargo fmt --check`
- `cargo test -p worker`
- `cargo test -p memory`
- `nix build .#yoi`
- `yoi ticket doctor`
---