memex:brain:capture
Capture a free-form note or observation into the personal Brain (~/.memex/article.db.captures). Lighter than ingest — no source URL, no raw archive, but still routed through the Librarian subagent for classification and linking.
- License 许可
- MIT
- 所属仓库
- nitekeeper/memex
- 最近更新
- 2026-09-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- memex:brain:capture
- description
- Capture a free-form note or observation into the personal Brain (~/.memex/article.db.captures). Lighter than ingest — no source URL, no raw archive, but still routed through the Librarian subagent for classification and linking.
03 SKILL.md 正文
memex:brain:capture
When to use
The user wants to record a thought, observation, or short snippet that isn't sourced from elsewhere. No URL, no provenance — just a note that should be findable later.
Inputs
body— the note textcaller_agent_id— registered agent idtitle— optional short label
Recipe (Option-B Task-tool dispatch)
Step 1 — Prepare
from scripts import brain
prep = brain.capture_prepare(
body=body,
caller_agent_id=caller_agent_id,
title=title, # may be None
)
prep["status"] is always "ready" (no source-hash dedup for captures — every capture is a fresh thought).
Step 2 — Dispatch the Librarian subagent
Use the Task tool:
subagent_type:general-purposedescription:Librarian: classify captureprompt:prep["subagent_prompt"]model:claude-sonnet-4-6
sonnet — bounded payload, deliberate downshift, never silent. (Enforced by
tests/test_model_tier_dispatch.py.)
Same Librarian profile + classification policy as ingest; the subagent decides domain="capture" (or whatever fits — Librarian's judgment).
Step 3 — Parse and validate
from scripts.agents import librarian
librarian_output = librarian.parse_response(subagent_response)
Retry once on ValueError. After two failures, report BLOCKED.
Step 4 — Encode embedding (optional)
from scripts import embeddings
embedding = embeddings.encode_or_skip(
librarian_output["searchable"],
caller_agent_id="brain-capture",
index_id=librarian_output["index_id"],
)
Step 5 — Complete
result = brain.capture_complete(prep, librarian_output, embedding=embedding)
Writes to ~/.memex/article.db.captures and the Index.
Step 6 — Report
Captured to Brain:
index_id: <result["index_id"]>
key: <result["key"]>
domain: <result["domain"]>
capture id: <result["row_id"]>
Notes
- Captures and ingests share the same Librarian flow; they only differ in target table (
capturesvsarticles) and whether the payload includes source-URL/hash fields. - Captures don't go through Archivist — they're not "sources" with raw originals. The
bodytext incapturesIS the canonical content.
04 同仓库更多 Skills
run
Use to invoke any Memex v2.0 operation. Routes user-facing intents (ingest, ask, capture, lint, synthesize, dashboard) and agent-facing CRUD primitives to the right internal procedure.
memex:steward:reconcile-orphan
Authorized fix-up of a flagged orphan. Four actions — delete-index (remove documents row), repair (backfill row_id when target exists), reindex (re-run Librarian; deferred), note (acknowledge). Raises OrphanNotFoundError when index_id is unknown or, for repair, already linked.
memex:steward:dashboard
Launch a loopback-only, read-only HTTP dashboard over Memex — per-store summary, the federated index, knowledge communities, the code-navigation graph, and the agent registry, plus keyword search, a click-to-read content overlay, and an interactive 3D knowledge-graph view.
memex:steward:audit
Run a full integrity audit across the Memex Index and all registered stores. Detects orphans, broken relations, schema drift. Writes a structured audit report to ~/.memex/audits/. Read-only — never auto-fixes.
memex:steward:audit-store
Run an integrity audit scoped to a single registered store (reverse orphans + schema drift). Lighter than full audit.
memex:index:write
Direct write to the federated Index — the lower-level primitive that memex:brain:ingest and memex:brain:capture build on. Use when a consumer (Atelier, custom plugin) needs to add a document to its own store and have it indexed by the Librarian, without going through the Brain layer. Routes through Librarian subagent + Memex Core.