Repository navigation
feat(research): document format standard and agent memory - #257
Merged
Merged
Conversation
- add kind/format/summary/archived_at via migration 0005 - archive documents by default and purge explicitly with cascaded sources/notes - include recent document summaries in agent context with a 4k-character budget - add search_research and get_research_document tools - accept validated citations in research output - cover repository, service, context, tools, and runtime tests
- render sanitized Markdown with raw HTML skipped and links as text - add an editor preview toggle and document kind labels - show stored citations in the task detail view - add tests for preview rendering and citation parsing
- add docs/AGENT_MEMORY.md covering memory layers, context budget, tools, citations, and write policy - document Markdown/metadata/soft-delete conventions in DATA_MODEL.md - update AGENT_PROTOCOL, ARCHITECTURE, CLAUDE.md, roadmap, and changelog
EmptyContextProvider keeps the task's workspace id, not the task id.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the agreed document-format and agent-memory standards.
Document format
formatmay betext).0005_research_documents_metadataaddskind(note/web/pdf/agent),format,summary, andarchived_at.archived_at);purge_research_documentpermanently removes an archived document and cascades its sources/notes. Archived documents are excluded from lists, search, and agent context.react-markdown+rehype-sanitize), with raw HTML skipped and links shown as text.Agent memory
search_research(ids, titles, excerpts) andget_research_document(content capped at 8,000 chars).ResearchOutputaccepts validatedcitations(document/taskid + title, max 20, invalid entries dropped); the task detail lists them.docs/AGENT_MEMORY.mddocuments layers, budget, tools, citations, write policy, retention, and security.Test plan
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --workspace- repository, service, context, tool, and citation testspnpm typecheckeslinton changed filesnode node_modules/vitest/vitest.mjs run --pool=forks- 16 files, 72 testspnpm build- main chunk ~414 KB (Markdown renderer); artifact chunk remains ~1 KB