Doc Bridge
Guides

Digest agent notes, classify them, and promote reviewable documentation drafts — never silent auto-merge.

View raw Markdown · llms.txt · For agents

Memory pipeline

Agent sessions leave durable learnings in local files. Doc Bridge ingests, classifies, and promotes them into draft documentation that humans review. Nothing lands in the corpus without a PR.

Sources (Layer 0)

SourcePath pattern
Agent memory notes.agent-memory/**/*.md
Cursor rules.cursor/rules/*.mdc

No API key. Classification is deterministic.

End-to-end commands

# 1) Normalize raw notes → MemoryCandidate[]
ak-docs memory ingest

# 2) Route each candidate: agent | human | playbook | discard
ak-docs memory classify

# 3) Build a safe draft body (safety scan; never auto-merges)
ak-docs memory promote

# 4) Optional: open a GitHub draft PR via `gh`
ak-docs memory promote --pr --dry-run
ak-docs memory promote --pr

What a candidate looks like

{
  "schemaVersion": 1,
  "id": "auth-abort-signal",
  "source": "agent-memory",
  "rawPath": ".agent-memory/auth.md",
  "fact": "Auth handlers must forward AbortSignal.",
  "why": "Run cancellation must stop network work.",
  "howToApply": "Use AbortSignal.any([caller, AbortSignal.timeout(ms)]).",
  "suggestedType": "project",
  "confidence": 0.8,
  "references": ["docs/for-agents/auth.md"]
}

Schema: MemoryCandidate v1

Digest mental model

.agent-memory / .cursor/rules


  memory ingest     →  normalized candidates


  memory classify   →  agent | human | playbook | discard


  memory promote    →  draft markdown (+ optional draft PR)


  Human review / merge   (never silent)

Safety guarantees

GuaranteeBehavior
Draft-onlyPromotion never writes the canonical corpus directly
Safety scanRisky content is flagged before draft output
HITL--pr opens a draft GitHub PR via gh
DeterministicSame inputs → same classify/promote routing

MCP tools

When MCP is running (ak-docs mcp):

ToolRole
memory.classifyClassify candidates
memory.promoteDraftProduce a draft promotion body

See MCP for agents.

Playbook feedback

ak-docs playbook draft      # payload from classified memory
ak-docs playbook pattern    # published Doc Bridge pattern (OKF)

The AgentsKit ecosystem

Build the agent. Then take it all the way.