Add capture modules, auto-summaries, and documentation updates#7
Merged
Add capture modules, auto-summaries, and documentation updates#7
Conversation
- capture_from_ci(): parse test failures, compiler errors, deprecation warnings, timeouts, and CMake errors from CI log text - capture_from_discussion(): classify conversation statements into decisions, facts, preferences, risks, goals, and questions - CLI: 'memory capture ci' and 'memory capture discussion' subcommands with --input (file/stdin), --source-label, --extra-tags - MCP: memory_capture_ci and memory_capture_discussion tools (13 total) - README: autonomous workflow, build-as-guardian, human role sections; updated CLI reference, MCP tools table, project structure - 37 new tests covering both capture modules (242 total passing)
detect_auto_summaries() finds topics with ≥5 mem entries older than 60 days and proposes consolidating them into a single fact. Configurable via min_count and min_age_days parameters. Registered in ALL_CHECKS and _DETECTORS as 'auto_summaries'. 8 new tests (250 total passing).
There was a problem hiding this comment.
Pull request overview
Completes the “autonomous memory lifecycle” v0.3.0 plan by adding capture pipelines for CI logs and discussion transcripts, plus a planner detector that proposes consolidation of older observations into summarized facts.
Changes:
- Add CI and discussion capture logic (with new CLI + MCP entrypoints) to generate
MemoryCandidates and optionally auto-add them to a workspace. - Add
detect_auto_summariesplanner check to proposeSUPERSEDEactions for consolidating many oldmementries bytopic:tag. - Expand documentation and tests to cover the new capture modes, MCP tool registrations, and planner behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/ai_memory_protocol/capture.py |
Adds CI log parsing + discussion transcript classification to generate memory candidates. |
src/ai_memory_protocol/cli.py |
Extends memory capture to support ci and discussion sources plus auto-add workflow. |
src/ai_memory_protocol/planner.py |
Adds detect_auto_summaries and registers it as a planner check. |
src/ai_memory_protocol/mcp_server.py |
Adds MCP tools + handlers for CI/discussion capture. |
tests/test_capture.py |
Adds CI/discussion capture unit tests. |
tests/test_planner.py |
Adds unit tests for detect_auto_summaries. |
tests/test_mcp_server.py |
Updates MCP tool-count expectations and required tool names. |
README.md |
Documents new CLI commands, MCP tools, and the autonomous workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add 'auto_summaries' to memory_plan MCP tool schema enum - Filter empty strings from extra_tags split in CLI (ci + discussion) - Use set instead of list for by_topic in detect_auto_summaries to prevent duplicate IDs when a need has the same topic tag twice - Evaluate all matching patterns in _classify_statement and return highest-confidence classification instead of first match
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
Complete the autonomous memory lifecycle by adding CI capture, discussion capture, and the auto-summaries planner detector — the final pieces of the v0.3.0 implementation plan (62/62 items done).
This PR enables AI agents to:
Changes
New Features
CI Capture (
capture.py)capture_from_ci(log_text)— parses CI/test log output using pattern matchingFAILED/ERROR), compiler errors, deprecation warnings, timeout errors, CMake configuration errorsMemoryCandidateobjects with confidence levels and source attributionDiscussion Capture (
capture.py)capture_from_discussion(transcript)— classifies conversation lines into memory candidatesAuto-Summaries Detector (
planner.py)detect_auto_summaries(needs, min_count=5, min_age_days=60)— groups activemementries bytopic:tagSUPERSEDEaction to consolidate them into onefactALL_CHECKSand_DETECTORSMCP Tools (
mcp_server.py)memory_capture_ci— expose CI capture via MCP (log_text input)memory_capture_discussion— expose discussion capture via MCP (transcript input)CLI Commands (
cli.py)memory capture ci --input <file>— reads from file or stdinmemory capture discussion --input <file>— reads from file or stdin--auto-addand--rebuildflagsDocumentation
README.md— addedmemory doctorto CLI reference tableTests
test_capture.py— 30 tests: CI capture (test failures, compiler errors, deprecation warnings, timeouts, CMake errors, multi-signal, empty input) + discussion capture (decisions, facts, preferences, risks, goals, questions, deduplication, empty input)test_planner.py— 8 tests: auto-summaries detection (finds candidates, includes all IDs, collects tags, skips below threshold, skips recent entries, skips non-mem types, skips deprecated, custom thresholds)test_mcp_server.pyassertion: 11 → 13 tools