memex GEMINI.md

memex GEMINI.md is an instructions file for Gemini CLI from STiFLeR7/memex. It costs 1,338 tokens per session, scanned A, original, MIT.

A set of instructions for Memex, a Python system that builds a time-based map of a codebase and shares its context with AI coding agents through MCP.

In plain words
What is it for?
Use it when developing Memex, following its system design, running project commands, or preparing a release through Git tags.
Why use it?
It tells agents how to work in the project, what rules cannot be changed, and how releases are published.

Instructions file for Gemini CLI

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/stifler7/memex/gemini-md
Clone the repo
git clone --depth 1 https://github.com/STiFLeR7/memex

Made for: Gemini CLI.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memex GEMINI.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/stifler7/memex/gemini-md.svg)](https://agentmods.dev/instructions/stifler7/memex/gemini-md)
Your own site
<a href="https://agentmods.dev/instructions/stifler7/memex/gemini-md"><img src="https://agentmods.dev/badge/instructions/stifler7/memex/gemini-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,338 This file is loaded in full into every session.
When invoked 1,338 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01338 $0.01338
Opus 5 $0.00669 $0.00669
Sonnet 5 $0.00268 $0.00268
Haiku 4.5 $0.00134 $0.00134

Measured 4d ago against content hash 093af3bd8198, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

memex GEMINI.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

GEMINI.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

memex

Inspired by Vannevar Bush's 1945 concept of a machine that remembers everything — memex is a developer context continuity system that builds and maintains a temporal knowledge graph of a codebase and serves it to any AI coding agent via MCP.

@./docs/memex-system-design.md


Agent Instructions

You are building memex - a Python project. Read the system design above before doing anything else in a session.

Execution mode

Run in full auto mode. Execute all shell commands, file operations, pytest runs, and environment variable assignments without asking for confirmation. Never pause to request permission for: uv commands, pytest, git operations, docker compose, PowerShell $env: assignments, file reads/writes anywhere in the repo, or Neo4j driver calls. If a command fails, fix it and retry automatically. Only stop and ask if a decision requires architectural judgement that isn't covered by this file or the system design doc. Future releases are published automatically by pushing a git tag (git tag vX.Y.Z && git push origin --tags). Manual twine or npm publish commands are no longer needed after v0.2.0.

Non-negotiables

  • Python 3.11+, managed with uv. Never use pip install directly.
  • All async code uses asyncio. No threading except where watchdog requires it.
  • Type hints on every function signature. No Any unless genuinely unavoidable.
  • Never use print() for logging — use the stdlib logging module with named loggers.
  • Tests live in tests/. Run with uv run pytest.

What is in scope

  • The watcher pipeline: git hooks, watchdog observer, event router, tree-sitter extractor, LLM synthesizer (Gemini Flash only), graph writer, decay scheduler.
  • The MCP server: 6 read tools + 4 write tools, stdio transport first, HTTP/SSE later.
  • Graphiti + Neo4j as the graph backend. No swapping these out.

What is out of scope — do not suggest or implement

  • AWS Bedrock, Hermes, any local LLM runner.
  • Any frontend, dashboard, or web UI.
  • Any database other than Neo4j (Community Edition, local Docker).
  • Any LLM other than Gemini (Flash for synthesis, text-embedding-004 for embeddings).

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 92 lines · 1,338 tokens per session scan A 093af3bd8198

Subscribe to this mod's changes

memex GEMINI.md is an instructions file published in the GitHub repository STiFLeR7/memex (12 stars, last pushed 4d ago), licensed MIT. It adds 1,338 tokens to every session, about $0.0067 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories