Skip to content

Repository files navigation

Owned Record

Memory you can inspect, correct, export, and take with you.

A public reference architecture for persistent agent memory, domain routing, and durable operating state inside an Obsidian or Markdown vault.

Part of a larger system: this repository demonstrates P05 (semantic order lowers retrieval cost), P14 (authority is structured coverage over time), and P16 (one person, one canon, many surfaces) from the Seventeen Principles.

This repository is the architecture layer. It shows how prompts route to bounded domain context, how each domain carries current state and an activity trace, how local retrieval can add relevant memory before a tool call, and how reusable skills become filesystem artifacts instead of one-off prompt text.

Repository boundary: This is a genericized, Claude-first reference snapshot. It is not Victor's current private vault or an exact copy of the current provider/runtime stack. Private data, credentials, customer material, and deployment automation are omitted. The operating system has continued to evolve since this public extraction.

If you arrived through github.com/b2bvic/scale-with-search or github.com/b2bvic/subtlebodhi, GitHub redirected you here: the repository is now named for what it is, an owned record. Older links still land on a useful technical surface.

Implementation proof path

Owned Record explains the system pattern. These smaller repositories expose bounded implementations that are faster to review:

  1. pretool-memory: transcript-tail retrieval, local BM25 and FTS5 lookup, throttling, hash deduplication, and fail-open behavior.
  2. safe-api: dry-run mutation controls, endpoint scope, duplicate callbacks, circuit breakers, incident artifacts, and JSONL receipts.
  3. declip: a local-first Apple Silicon video CLI for transcription, filler removal, gap compression, EQ, and NLE/SRT export.
  4. observer-protocol: approval gates, correction history, drift detection, and observable agent loops.

What this reference implements

  • Domain routing: a UserPromptSubmit hook maps prompt keywords to a bounded _context.md file.
  • Persistent state: each domain carries _context.md for current state and _log.md for durable activity history.
  • Local recall: an optional PreToolUse hook searches a local Markdown index and session ledger before read-oriented tools.
  • Reusable skills: command files hold repeatable procedures, decision frameworks, session handoffs, reviews, and utilities.
  • Ground-truth corrections: a reference surface records durable corrections that future sessions can load.

Quick start

git clone https://github.com/b2bvic/owned-record.git
cd owned-record
bash scripts/setup.sh
claude

The setup script asks for a name, project name, and domain structure. It replaces template placeholders, creates domain folders, updates the domain table and routing hook, makes hooks executable, and leaves the configured vault in the cloned directory.

Review scripts/setup.sh before running it. Use a fresh clone or a backed-up vault because the script edits local template files.

Manual setup

  1. Copy the reference into an Obsidian vault or Markdown directory.
  2. Replace the placeholders in CLAUDE.md.
  3. Customize the keyword and path rules in .claude/hooks/route-domain.sh.
  4. Put current state in each domain's _context.md and append durable activity to _log.md.
  5. Make the hooks executable with chmod +x .claude/hooks/*.sh.
  6. Configure only the hooks and commands you intend to run.

Repository map

owned-record/
├── CLAUDE.md
├── _RECENT.md
├── .claude/
│   ├── settings.json
│   ├── hooks/
│   │   ├── route-domain.sh
│   │   └── pretool-memory.sh
│   └── commands/
├── 00 - System/
│   ├── Sessions/
│   ├── Patterns/
│   └── Reference/
├── 01 - Work/
├── 02 - Personal/
├── docs/
└── scripts/setup.sh

Domain routing

"review the sprint backlog"
  -> route-domain.sh matches a work-domain keyword
  -> the work _context.md is added to the prompt context
  -> the response starts from current domain state

Keyword routing is deterministic and inspectable. It is also heuristic. Ambiguous terms can load the wrong domain, so high-risk work still needs explicit context and authorization checks.

Local memory

assistant thinking block
  -> PreToolUse hook reads a bounded transcript tail
  -> QMD BM25 searches the local Markdown collection
  -> optional SQLite FTS5 searches prior session text
  -> relevant results are injected before a read-oriented tool

The included hook is a reference copy. The maintained, tested extraction is pretool-memory.

Skills

The command directory includes decision frameworks, deliberation, handoff and logging procedures, daily and weekly reviews, deep scraping, and web-to-Markdown conversion. Start with the skill authoring guide before adding new commands.

Documentation

Non-guarantees

  • The template does not ship a private corpus, QMD index, session ledger, credentials, or hosted service.
  • Local retrieval does not guarantee relevant or correct context.
  • Keyword routing does not enforce security boundaries.
  • Command files do not replace capability-level approval gates for sends, publishing, deletion, payments, or production writes.
  • The public Claude-first layout is a reference snapshot, not a promise that the current private system uses the same model, paths, counts, or automation surfaces.

Origin

Owned Record was extracted from a working private knowledge system and stripped of Victor-specific data. The useful artifact is the pattern: owned Markdown memory, bounded context, observable state, reusable procedures, and explicit side-effect gates.

License

MIT

Built by Victor Valentine Romo.

How this was built

Specification and judgment: human. Implementation: AI models executing that specification under a build contract, with an adversarial audit before publish. The division of labor is the point; see P07.

About

Public reference architecture for persistent agent memory, domain routing, durable state, and reusable skills in a Markdown vault.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages