Skip to content

Knowledge system 2/6: capture primitive and real-time ingest engine #523

@Brad-Edwards

Description

@Brad-Edwards

Builds on issue #522. Adds the agent capture primitive, the ingest engine, and all the processing semantics needed for the real-time write path. Design: docs/notes/agent-knowledge-system-design.md. Order: docs/notes/agent-knowledge-system-order.md.

Requirements

  • GC-X006 — Agent capture primitive for knowledge observations
  • GC-X007 — Ingest consistency: update existing pages, do not duplicate
  • GC-X008 — Serialized writes within a knowledge base
  • GC-X009 — Failed ingest retains source material for retry
  • GC-X010 — Knowledge base changes committed to version control
  • GC-X011 — Real-time ingest of captured observations

Deliverable

  • gc_remember MCP tool: structured inbox write with a fixed input shape (repo_path, note, source_type, source_ref, tags?), returns the inbox file path, spawns a detached ingest subprocess.
  • Shared ingest engine that real-time and later scheduled processing both call. Per-repo file lock serializes writes to a single knowledge base while leaving different bases parallelizable.
  • Read-before-write consistency: ingest consults index.md and any matching pages before writing so observations matching existing content update in place rather than creating duplicates.
  • Failure retry semantics: a failed ingest leaves the source inbox file untouched; a later run (real-time trigger, manual sweep, or scheduled sweep) picks it up automatically.
  • All ingest writes land as git commits on whatever branch the repo is on at the time, with a descriptive message identifying the integrated source.
  • Real-time latency: a captured observation is available in the wiki within seconds for the next agent invocation in the same repository.

Out of scope

No consumption integration (/implement Step 3 reading the knowledge base), no admin CLI, no scheduled sweep, no lint. Those follow in issues 3–6.

Order

Issue 2 of 6. Depends on issue #522.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions