clickmem AGENTS.md

Workspace instructions recording learned preferences and project facts for clickmem, a knowledge-management system. They cover coding practices, configuration, architecture, interfaces, asynchronous work, and keeping knowledge separated by project.

In plain words
What is it for?
Use them when designing or changing clickmem APIs, MCP tools, hooks, asynchronous server code, configuration, embeddings, or project-scoped knowledge handling.
Why use it?
They preserve decisions that should remain consistent across future changes, such as using environment variables and fixing root causes. They also explain boundaries between project-specific knowledge and general preferences.

Instructions file for CodexOpenCode

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/auxten/clickmem/agents-md
Clone the repo
git clone --depth 1 https://github.com/auxten/clickmem

Made for: Codex, OpenCode.

Per session 1,104 This file is loaded in full into every session.
When invoked 1,104 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.01104 $0.01104
Opus 5 $0.00552 $0.00552
Sonnet 5 $0.00221 $0.00221
Haiku 4.5 $0.00110 $0.00110

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

Security

Grade A, and why

clickmem AGENTS.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 2d 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.

AGENTS.md · 39 lines

How it starts

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

Learned User Preferences

Code quality & process

  • Fix root causes for all users; no case-by-case patches, retries, or workarounds; revert speculative changes promptly
  • All config via env vars with sensible defaults; never hardcode IPs or machine-specific values
  • Repo code, docs, and comments in English; extracted CEO Brain knowledge preserved in the user's original language
  • Batch commits by logical grouping; commit and push only when explicitly asked; release only via git tags + CI

Architecture & design

  • Plan and discuss architecture before coding; deliver plans in current chat mode — don't switch to Plan mode unless asked
  • All interfaces (CLI, MCP tools, plugins) must expose the same capabilities as the HTTP API; never access chDB directly
  • Use asyncio.to_thread() for all blocking calls (chDB, embedding, LLM) inside the async server
  • Prefer event-driven hooks over periodic cron; hooks source code in project tree (cursor-hooks/), not .cursor/
  • Distinguish project-scoped facts from global principles; use project_id + score boosting to prevent cross-project knowledge pollution
  • AGENTS.md bullets parsed directly as principles (not re-extracted through LLM); CLAUDE.md goes through LLM extraction

Workflow

  • Deploy changes AND verify end-to-end yourself; don't tell the user to verify
  • Test with representative cases before bulk operations; import data newest-first; don't proactively scan beyond what's specified
  • Coordinate parallel sessions: if another session implements a feature, revert speculative changes and wait for merge

Learned Workspace Facts

  • ClickMem: local memory system / belief-revision store for AI coding agents; explicit-only, no LLM in the server loop, no auto-extraction
  • Single port 9527 serves REST (/v1/*), MCP SSE (/sse), and the dashboard (/dashboard)
  • Two storage backends, switchable via CLICKMEM_BACKEND: local (embedded chDB, default) or clickhouse (ClickHouse Cloud or self-hosted via clickhouse-connect); all DDL flows through src/clickmem/schema.py
  • Single entity Memory with kind ∈ {principle, decision, fact, doc, free} and status ∈ {active, contracted, conflicted}; partitioned by project_id + privacy ∈ {public, private, confidential}
  • Conflict surfacing: on Expand/Revise, embeddings at cosine ≥ CLICKMEM_CONFLICT_THRESHOLD (default 0.92) inside the same (project_id, kind) flag both rows conflicted; pinned memories short-circuit (non-pinned conflicting commits are rejected outright)
  • Five first-class operations with CLI ↔ MCP parity: Expand (remember), Revise (edit), Contract (forget), Reinforce (pin), Refuse (blacklist)
  • Embedding-only retrieval: Qwen3-Embedding-0.6B at 256d on CPU (never MPS / GPU); no mlx-lm, no litellm, no [llm] extra
  • Recall scoring: same-project ×1.0, global (project_id='') ×0.9, other-project ×0.0; privacy filter (confidential excluded unless privacy_ack=true); pinned boost; recall_trace exposes the per-candidate breakdown
  • Hooks are slim: Cursor stop hook fires-and-forgets POST /v1/raw (<50 ms); Claude Code hooks.json has only SessionStart (HTTP recall) and Stop (HTTP raw landing), both <100 ms — never an LLM call inline
  • Adapters live in src/clickmem/adapters/ behind one AgentAdapter protocol; built-ins: Claude Code, Cursor, Codex, Aider, Continue.dev, Cline, Windsurf, Zed, JetBrains AI, generic
  • Config env vars: CLICKMEM_SERVER_HOST / CLICKMEM_SERVER_PORT (9527), CLICKMEM_REMOTE, CLICKMEM_API_KEY, CLICKMEM_BACKEND, CLICKMEM_DB_PATH, CLICKMEM_CH_URL / CH_USER / CH_PASSWORD / CH_DATABASE, CLICKMEM_CONFLICT_THRESHOLD, CLICKMEM_EMBEDDING_MODEL, CLICKMEM_LOG_LEVEL
  • Dashboard at /dashboard is the primary user-management surface (React + Vite + Tailwind + Recharts, bundled into the wheel via tool.hatch.build.targets.wheel.force-include of src/clickmem/dashboard/dist)
  • Tests use an in-memory chDB backend + MockEmbeddingEngine via tests/conftest.py; unit + httpx integration + MCP smoke layers
  • Package layout: src/clickmem/ (Python), src/clickmem/dashboard/ (TypeScript SPA), cursor-hooks/, claude-hooks/, skills/
  • PyPI clickmem 1.0.0 is the first release on the rebuilt code; CI on Python 3.10/3.12/3.13; release via v* tags + PyPI Trusted Publisher

Read the full file on GitHub · 39 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. 2d ago First seen · 39 lines · 1,104 tokens per session scan A a1df46a00071

Subscribe to this mod's changes

clickmem AGENTS.md is an instructions file published in the GitHub repository auxten/clickmem (58 stars, last pushed 2mo ago), licensed MIT. It adds 1,104 tokens to every session, about $0.0055 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

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,345 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

next.js AGENTS.md

Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens