{"id":51330292,"url":"https://github.com/fantasyce/across-context","last_synced_at":"2026-07-01T22:04:31.907Z","repository":{"id":362325227,"uuid":"1256351731","full_name":"fantasyce/across-context","owner":"fantasyce","description":"Local-first shared memory layer for coding agents","archived":false,"fork":false,"pushed_at":"2026-06-29T09:30:56.000Z","size":2069,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-29T11:16:46.646Z","etag":null,"topics":["agent-memory","claude-code","codex","coding-agents","cursor","local-first","mcp"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fantasyce.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-06-01T17:39:36.000Z","updated_at":"2026-06-29T09:30:31.000Z","dependencies_parsed_at":"2026-06-19T06:00:33.205Z","dependency_job_id":null,"html_url":"https://github.com/fantasyce/across-context","commit_stats":null,"previous_names":["fantasyce/across-context"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/fantasyce/across-context","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyce%2Facross-context","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyce%2Facross-context/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyce%2Facross-context/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyce%2Facross-context/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fantasyce","download_url":"https://codeload.github.com/fantasyce/across-context/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantasyce%2Facross-context/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35024385,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent-memory","claude-code","codex","coding-agents","cursor","local-first","mcp"],"created_at":"2026-07-01T22:04:30.498Z","updated_at":"2026-07-01T22:04:31.887Z","avatar_url":"https://github.com/fantasyce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Across Context\n\n![Quality](https://github.com/fantasyce/across-context/actions/workflows/quality.yml/badge.svg)\n![Security](https://github.com/fantasyce/across-context/actions/workflows/security.yml/badge.svg)\n![License](https://img.shields.io/badge/license-MIT-blue.svg)\n\nOne local-first memory layer for every coding agent.\n\n![Across Context hero](assets/readme/across-context-hero.png)\n\nAcross Context is a zero-runtime-dependency CLI and MCP server that gives Codex,\nClaude Code, Claude Desktop, Cursor, Hermes,\nOpenClaw, AAA, and future coding agents one shared local source of truth. It\nstores durable preferences, project decisions, reusable commands, and compact\nsession summaries in a local vault, then teaches agents when to read and write\nthat memory.\n\nUse Context when agent work should compound across tools instead of starting\nfrom zero every time. A Codex run can learn a project rule, a Claude Code run can\nreuse it later, and an Autopilot loop can write a pending summary for human\nreview without exposing raw secrets or transcripts.\n\nCommon workflows:\n\n- Share project conventions across Codex, Claude Code, Claude Desktop, AAA, and other\n  MCP-capable hosts.\n- Preserve release, testing, and repository commands as approved local memory.\n- Let Autopilot recall prior loop evidence and write pending loop summaries.\n- Store Plugin Compatibility Lab v2 evidence memory and agent-team trust\n  receipts so future Codex, Claude Code, Claude Desktop, AAA, or MCP hosts can\n  review adoption decisions without re-running the whole lab.\n- Keep memory local under `~/.across/data/across-context` with policy checks\n  before writes become active.\n\nAgent-readable entrypoints:\n\n- [llms.txt](llms.txt) for model and agent product discovery.\n- [AGENTS.md](AGENTS.md) for coding-agent repository instructions.\n- [across-context.product.json](across-context.product.json) for\n  machine-readable product classification.\n\n## English\n\n### Why It Exists\n\nModern coding agents are powerful, but their memory is fragmented. A useful\npreference learned by one agent often stays trapped in one chat, one IDE, or one\ntool-specific history. Across Context makes that memory portable across agents\nwithout sending it to a hosted service.\n\nUse it when you want agents to remember:\n\n- how you like work to be done\n- how a repository is built, tested, and released\n- which project decisions were already made\n- which commands are safe and repeatable\n- what the last agent learned during a complex task\n\n### What It Does\n\n- Creates a local vault at `~/.across/data/across-context`\n- Runs a stdio MCP server with memory tools\n- Detects supported local agents\n- Registers MCP integrations where each agent supports it\n- Generates `AGENTS.md`, `CLAUDE.md`, and Cursor rules\n- Adds behavior rules so agents know when to read and write memory\n- Protects the vault with a memory policy engine\n- Provides a local dashboard, explainable hybrid search, pending approval, lifecycle controls, MCP resources and prompts, team export, and deterministic hooks\n\n### New in v0.8.8: Skills Bridge And Memory Backend Projections\n\n- Exports Across Context agent cards and native skills as agentskills.io\n  directories, and imports Codex, Claude Code, and Qwen Code skill directories\n  as redacted pending memory summaries.\n- Adds optional `vault`, `mem0`, and `graphrag` memory backend contracts without\n  introducing a required network dependency.\n- Keeps agent-team trust receipt memory parseable under the existing memory\n  policy by compacting rich Lab v2 metadata before pending storage.\n\n### New in v0.8.7: Source-Sync Release\n\n- Records the current `main` commit as the latest source-first release after\n  release documentation synchronization.\n- Keeps the v0.8.6 memory, evidence, and host-plugin behavior unchanged.\n\n### New in v0.8.6: Agent-Team Receipts And Evidence Memory\n\n- Adds host-neutral agent-team trust receipts so generic hosts can preserve\n  who did what, which evidence was reviewed, and which release or promotion\n  gate accepted the result without storing raw transcripts.\n- Adds evidence-memory recall and compaction helpers for workflow packs,\n  Orchestrator evidence graphs, and Autopilot release evidence.\n- Keeps the managed memory plugin relocatable under `~/.across` for Codex,\n  Claude Code, Claude Desktop, AAA, and other MCP-capable hosts.\n\n### New in v0.8.5: Host Naming And Runtime Boundary Cleanup\n\n- Keeps the generic memory plugin contract unchanged while tightening public\n  docs around the official host names: Codex, Claude Code, Claude Desktop,\n  AAA, and other MCP-capable hosts.\n- Removes duplicate host rows and stale Claude naming from README guidance so\n  product hosts and coding agents see one consistent install target set.\n- Revalidates that managed runtime installs stay under `~/.across` and do not\n  require a developer checkout path.\n\n### New in v0.8.4: Agent-Readable Product Packaging\n\n- Adds `llms.txt`, `AGENTS.md`, and a machine-readable product manifest so\n  coding agents and large-language-model crawlers can understand when to\n  recommend Context, when not to recommend it, and how it fits into Across.\n- Keeps these agent-readable files in the npm package allowlist so managed\n  runtime installs preserve the same product discovery surface as GitHub.\n- Adds README entrypoints for model and agent product discovery.\n\n### New in v0.8.3: Sensitive Memory Policy Classification\n\n- Adds explicit sensitive memory policy classification for protected local\n  paths, credentials, private keys, and personal or regulated data indicators.\n- Keeps policy output host-neutral so Codex, Claude Code, Claude Desktop, AAA, and other\n  MCP-capable hosts can explain why a memory write is accepted, pending,\n  redacted, or rejected without receiving raw sensitive text.\n- Preserves the `v0.8.2` managed runtime layout under `~/.across` for generic\n  host portability.\n\n### New in v0.8.2: Generic Host Context Portability\n\n- Documents Across Context as a standalone memory plugin for Codex, Claude Code, Claude Desktop, AAA, and any MCP-capable host.\n- Keeps the supported install shape host-neutral: managed runtime under\n  `~/.across/plugins/across-context`, wrapper under `~/.across/bin`, durable\n  memory under `~/.across/data/across-context`, and no dependency on an AAA\n  source checkout.\n- Clarifies that hosts own UI, model credentials, agent process launch, and\n  approval policy; Context owns MCP tools/resources/prompts, memory search,\n  memory write policy, pending review, and local vault lifecycle.\n\n### New in v0.8.1: Generic Agent Plugin Context Surface\n\n- Adds host-plugin context pack and search surfaces that can be consumed by\n  Codex, Claude Code, Claude Desktop, AAA, or another\n  MCP-capable host without depending on a source checkout.\n- Hardens Codex and Claude installer output so managed wrappers and MCP\n  commands resolve through `~/.across/bin`.\n- Keeps runtime state, memory data, and generated integration files under the\n  unified `~/.across` ecosystem root.\n\n### New in v0.8.0: Loop Engineering Memory Surface\n\n- Adds Autopilot loop memory commands for `remember-loop`, `recall-loop`,\n  `loop-history`, and `loop-memory-diff`.\n- Applies loop memory policy before writes: safe summaries become\n  `accepted_pending`, protected local paths are redacted before pending review,\n  and credential/private-key style content is rejected.\n- Loop memory summaries may include non-secret model decision provenance\n  (`provider`, `model`, `decision_hash`, patch counts/paths) while keeping full\n  patch content in run evidence instead of long-term memory.\n- Exposes the same loop memory surfaces through MCP so Autopilot and other\n  hosts can recall prior loop evidence and write pending summaries without\n  depending on Context internals.\n\n### How It Works\n\n![Across Context architecture](assets/readme/across-context-architecture.svg)\n\nAcross Context has three layers:\n\n1. **MCP tools, resources, and prompts** give agents the ability to search, write, inspect, and reuse memory workflows.\n2. **Generated rules** teach agents when to use those capabilities.\n3. **Memory policy** rejects unsafe or low-value writes before they reach disk.\n\nThis is the important product idea: MCP alone is not enough. Agents also need\noperating instructions, and automatic memory needs guardrails.\n\n### New in v0.8.0\n\n- Adds aggregate Agent Loop memory-candidate metrics for hosts through\n  `across-context loop-memory-metrics --all-projects --json`, MCP resource\n  `across-context://agent-loop-memory-metrics`, and MCP tool\n  `get_agent_loop_memory_metrics`.\n- Records Agent Loop memory-candidate lifecycle policy events for allowed,\n  denied, duplicate, and forgotten candidates without storing raw memory text in\n  metric payloads.\n\n### New in v0.7.7\n\n- Documents the structured Agent Loop memory candidate contract used by Across\n  Orchestrator `v0.6.12`, including schema\n  `agent-loop-memory-candidate/1.0` and the non-secret fields that may be\n  proposed for pending Across Context review.\n- Records the current Agent Loop memory and telemetry boundaries in\n  [Agent Loop Memory RFC](AGENT_LOOP_MEMORY_RFC.md), keeping Context scoped to\n  memory policy and pending review rather than runtime routing.\n\n### New in v0.7.6\n\n- Release alignment for Across Orchestrator `v0.6.8` and Across Agents\n  Assistant `v0.8.9`; the memory provider contract remains stable while hosts\n  pick up corrected Agent Loop terminal-state handling from Orchestrator.\n\n### New in v0.7.5\n\n- Release alignment for host-neutral Across Orchestrator `v0.6.7` and Across\n  Agents Assistant `v0.8.8`; the memory policy surface remains stable for\n  packaged host installs and Agent Loop pending review.\n\n### New in v0.7.4\n\n- Product-mode host-plugin installs and path resolution now reject protected\n  user project directories and fall back to the managed `~/.across` runtime\n  unless developer mode is explicitly enabled.\n- Agent Loop memory policy now declares host-owned loop controls for cancel,\n  reject, and retry actions while keeping memory writes in the pending review\n  flow.\n\n### New in v0.7.3\n\n- Host-plugin install commands now reject legacy `--prefix` usage and ignore\n  legacy plugin-home overrides, keeping packaged hosts on the managed\n  `~/.across` runtime boundary.\n\n### New in v0.7.2\n\n- Host-plugin install metadata avoids embedding development checkout paths, so\n  packaged hosts can install and inspect the plugin from `~/.across` without\n  crossing into local source trees.\n- Package metadata now uses the neutral Across Context contributor identity for\n  public open-source distribution.\n\n### New in v0.7.1\n\n- Fresh installs and managed host-plugin runs use only\n  `~/.across/data/across-context` by default.\n- Old standalone `~/.across-context` vaults are no longer read or copied\n  automatically; hosts should pass an explicit `ACROSS_CONTEXT_HOME` only when\n  they intentionally want a custom vault location.\n\n### New in v0.7\n\n- Agent Loop memory policy schema `0.2` with an explicit adapter contract for\n  active search, pending summary writes, and review/approval flows\n- Plugin manifest capabilities for Agent Loop memory hooks v2 and pending loop\n  summaries, so host apps can discover the contract without reading source code\n- Pending review can aggregate project-scoped loop summaries with\n  `--all-projects`, which lets host apps show Agent Loop write candidates in a\n  single review queue.\n\n### New in v0.6\n\n- Agent-loop memory hook policy for durable orchestration runtimes\n- MCP resource, prompt, and tool surfaces for loop memory governance\n- CLI command `loop-memory-policy --json` so host apps can inspect the memory\n  lifecycle without reading vault internals\n\n### New in v0.5\n\n- Host-friendly plugin lifecycle metadata with install, repair, upgrade, and\n  uninstall actions that preserve user memory data\n- JSON memory lifecycle commands for host apps:\n  `remember --json`, `list --status --json`, `approve --json`, `archive --json`,\n  and `forget --json`\n- Unified Across ecosystem paths under `~/.across`, including\n  `~/.across/plugins/across-context` for runtime code and\n  `~/.across/data/across-context` for durable memory\n\n### New in v0.3\n\n- MCP resources and prompts for discoverable memory context and repeatable agent workflows\n- Explainable hybrid search: `across-context search \"agent handoff\" --mode hybrid --json --explain`\n- Dashboard review actions for approving, archiving, expiring, forgetting, searching, and filtering memories\n- Batch lifecycle updates: `across-context update-status active \u003cmemory-id...\u003e`\n- A2A-ready Agent Card metadata: `across-context agent-card --json`\n- Team-safe project export: `across-context team export --project .`\n- Deterministic hooks: `hook task-start` and `hook task-end`\n\n### Install\n\nThe current open-source distribution is GitHub-first. The `v0.8.8` tag and\nGitHub source archives are the canonical release artifacts; no extra npm\ntarball asset is attached to the GitHub Release, and npm registry publication is\nnot required for hosts to install or run the plugin.\n\nInstall from source for development:\n\n```bash\ngit clone https://github.com/fantasyce/across-context.git\ncd across-context\nnpm link\n```\n\nOr build and install a local npm tarball from the checked-out release tag:\n\n```bash\nnpm pack\nnpm install -g ./across-context-0.8.8.tgz\n```\n\nVerify:\n\n```bash\nacross-context --help\n```\n\nFor host apps such as Across Agents Assistant, install a local plugin runtime\nunder the user's hidden plugin directory:\n\n```bash\nacross-context install host-plugin\n```\n\nThis copies the Across Context runtime to `~/.across/plugins/across-context`,\ncreates `~/.across/bin/across-context`, and writes the plugin manifest at\n`~/.across/plugins/across-context/manifest.json`. Host apps should discover that\nwrapper instead of pointing at a source checkout, `npm link`, or a path under\n`~/Documents`. Hosts can also call `plugin-manifest`, `plugin-status`, and\n`health` to verify the installed plugin without reading private project files.\n\nWhen a host sets `ACROSS_CONTEXT_PRODUCT_MODE=1` or\n`ACROSS_AGENTS_PRODUCT_MODE=1`, explicit `install host-plugin` path arguments\nsuch as `--across-home`, `--plugin-root`, and `--bin-dir` are rejected if they\npoint under protected user project locations such as `~/Documents`,\n`~/Desktop`, or `~/Downloads`. Polluted environment roots such as\n`ACROSS_HOME`, `ACROSS_PLUGIN_HOME`, `ACROSS_BIN_HOME`, and protected\n`ACROSS_CONTEXT_HOME` vault overrides are ignored and fall back to `~/.across`.\nUse `ACROSS_CONTEXT_DEVELOPER_MODE=1` only for intentional source checkout\ndevelopment. Plugin manifest, status, install, and vault path resolution follow\nthe same product/developer-mode rule.\n\n### Quick Start\n\nRun this from any project directory:\n\n```bash\nacross-context setup --all --yes\n```\n\nThat one command initializes the vault, detects local agents, registers MCP\nwhere possible, and writes project instruction files.\n\nIf you only want project files and do not want to change user-level agent\nconfiguration:\n\n```bash\nacross-context setup --all --yes --no-external\n```\n\nVerify the result:\n\n```bash\nacross-context doctor\nacross-context status\n```\n\nFor the Plugin Compatibility Lab v2 trust-layer workflow, Context stores the\ncompact artifacts that should survive the run:\n\n```bash\nacross-context remember-evidence \\\n  --spec-id plugin-compatibility-lab-v2 \\\n  --run-id '\u003crun-id\u003e' \\\n  --graph-json '\u003cevidence-graph-json\u003e' \\\n  --json\n\nacross-context remember-agent-team-receipt \\\n  --pack-id plugin-compatibility-lab-v2 \\\n  --receipt-json '\u003ctrust-receipt-json\u003e' \\\n  --json\n\nacross-context recall-agent-team-receipts \\\n  --pack-id plugin-compatibility-lab-v2 \\\n  --json\n```\n\nBoth memories start as pending review. Context keeps the stored payload compact\nand parseable instead of preserving raw transcripts, long logs, or secrets.\n\n### Agent Support\n\n| Agent | What setup does |\n| --- | --- |\n| Codex | Writes `AGENTS.md` and registers `across-context mcp` when available. |\n| Claude Desktop | Uses the managed `~/.across/bin/across-context` MCP entrypoint where the host supports user-level MCP registration. |\n| Claude Code | Writes `CLAUDE.md` and registers a user-level MCP server when available. |\n| Cursor | Writes `.cursor/mcp.json` and `.cursor/rules/across-context.mdc`. |\n| Hermes | Registers `across-context mcp` when available. |\n| OpenClaw | Writes the OpenClaw MCP configuration when available. |\n\n### Automatic Memory Behavior\n\nGenerated agent rules instruct agents to:\n\n- search relevant memory at task start\n- use project context before architecture, release, dependency, test, or documentation decisions\n- remember only durable context before final responses\n- keep low-confidence automatic notes in pending review\n- avoid duplicate memories\n- never write secrets, credentials, huge logs, full chat history, temporary errors, private screenshots, or one-off noise\n\n### Dashboard\n\nStart the local review dashboard:\n\n```bash\nacross-context dashboard\n```\n\n![Across Context dashboard](assets/readme/across-context-dashboard.png)\n\nThe dashboard runs on `127.0.0.1` by default and shows memory counts, pending\nreview items, lifecycle status, visibility, stored text, search explanations,\nand local lifecycle actions.\n\n### Memory Policy\n\nAll CLI and MCP writes go through the same policy engine.\n\nAgent-loop runtimes should use Across Context as a memory provider, not as a\ntask scheduler. The `loop-memory-policy` command and MCP prompt/resource/tool\ndescribe the supported hooks: pre-loop search, step context attachment, and\npost-loop pending summary writes. Automatic loop writes default to `pending`\nuntil a user or host policy approves them.\n\nThe policy also declares host-owned loop controls (`cancel`, `reject_action`,\nand `retry_step`) so products can expose those actions while keeping loop state\ninside Across Orchestrator and memory review inside Across Context.\n\nWhen reviewing automatic loop summaries outside a specific project, use\n`across-context pending --all-projects --json` so project-scoped candidates are\nincluded alongside global pending memories.\n\nHosts that need aggregate Agent Loop memory-candidate diagnostics can use\n`across-context loop-memory-metrics --all-projects --json` or the matching MCP\ntool/resource. Metrics report lifecycle counts and status/scope breakdowns only;\nthey do not expose raw memory text.\n\nAllowed memory types:\n\n- `preference` - stable user preferences\n- `decision` - durable project or architecture decisions\n- `command` - reusable build, test, release, or troubleshooting commands\n- `session` - compact handoff summaries\n- `note` - short durable context that does not fit the other categories\n\nControlled writes:\n\n- secret-like content is rejected\n- duplicate memories return the existing record instead of appending another line\n- long memories are trimmed to a safe default length\n- low-confidence automatic notes and session summaries are stored as `pending`\n- approved memories become `active`; stale memories can be `archived` or `expired`\n- `compact` removes duplicates already on disk\n- `forget \u003cid\u003e` removes a memory by id\n\n### CLI Reference\n\n```bash\nacross-context init\nacross-context setup --all --yes\nacross-context doctor\nacross-context status\nacross-context remember \"Prefer small commits with tests.\" --type preference\nacross-context remember \"Run npm test before final answers.\" --scope project --project . --type command\nacross-context search \"tests before final\" --project .\nacross-context search \"agent handoff context\" --mode semantic --project .\nacross-context search \"release verification\" --mode hybrid --json --explain\nacross-context list\nacross-context pending\nacross-context pending --all-projects --json\nacross-context approve \u003cmemory-id\u003e\nacross-context archive \u003cmemory-id\u003e\nacross-context expire \u003cmemory-id\u003e\nacross-context update-status active \u003cmemory-id...\u003e\nacross-context stats\nacross-context compact\nacross-context forget \u003cmemory-id\u003e\nacross-context dashboard\nacross-context agent-card --json\nacross-context team export --project .\nacross-context hook task-start --query \"release workflow\" --project .\nacross-context hook task-end --summary \"Implemented dashboard and semantic search.\" --project .\nacross-context loop-memory-policy --json\nacross-context loop-memory-metrics --all-projects --json\nacross-context install host-plugin\nacross-context plugin-manifest --json\nacross-context plugin-status --json\nacross-context health --json\nacross-context mcp\n```\n\n### MCP Server\n\nThe MCP server exposes tools:\n\n- `remember_context`\n- `search_context`\n- `review_pending_memories`\n- `approve_memory`\n- `get_project_context`\n- `get_agent_card`\n- `export_agent_instructions`\n- `get_agent_loop_memory_policy`\n- `get_agent_loop_memory_metrics`\n\nIt also exposes resources:\n\n- `across-context://agent-card`\n- `across-context://stats`\n- `across-context://memories`\n- `across-context://project-context`\n- `across-context://agent-loop-memory-policy`\n- `across-context://agent-loop-memory-metrics`\n\nAnd prompts:\n\n- `task-start-context`\n- `task-end-summary`\n- `memory-review`\n- `agent-loop-memory-policy`\n\nStart it manually:\n\n```bash\nacross-context mcp\n```\n\n### Vault Layout\n\n```text\n~/.across/data/across-context/\n  global/\n    memories.jsonl\n  projects/\n    \u003cproject-id\u003e/\n      profile.json\n      memories.jsonl\n```\n\nFor isolated tests:\n\n```bash\nACROSS_CONTEXT_HOME=/tmp/across-context-demo across-context init\n```\n\n### Privacy\n\n- The vault is local-first.\n- This package does not sync memory to a hosted service.\n- Public exports never include absolute project paths.\n- Host-plugin manifests, wrappers, and status output should not embed\n  development checkout paths.\n- Generated files should be reviewed before committing.\n- Secrets, tokens, credentials, cookies, private screenshots, and large logs should not be stored.\n\n### Development\n\n```bash\nnpm test\nbash scripts/check.sh\nnpm pack --dry-run\n```\n\n### Community and Feedback\n\n- Bug reports: [GitHub Issues](https://github.com/fantasyce/across-context/issues/new/choose)\n- Product ideas: [Discussions Ideas](https://github.com/fantasyce/across-context/discussions/categories/ideas)\n- Setup questions: [Discussions Q\u0026A](https://github.com/fantasyce/across-context/discussions/categories/q-a)\n## 中文\n\n### 这个项目是什么\n\nAcross Context 是一个本地优先的跨 Agent 共享记忆层。它让 Codex、\nClaude Code、Claude Desktop、Cursor、Hermes、\nOpenClaw、AAA 以及未来更多 coding agent 使用同一个本地记忆库。\n\n它不是单纯的 MCP Server。完整产品由三部分组成：\n\n1. **MCP 工具**：让 Agent 有能力读取和写入记忆。\n2. **自动生成的 Agent 规则**：告诉 Agent 什么时候应该读、什么时候应该写。\n3. **记忆治理策略**：防止 Agent 乱写、重复写、写入密钥或写爆本地 vault。\n\n### 为什么需要它\n\n现在每个 Agent 都有自己的上下文和聊天历史。你在 Claude Code 里沉淀的偏好，\nCodex 不知道；Cursor 里学到的项目命令，Hermes 也不一定知道。Across Context\n把这些稳定、可复用的上下文放到一个本地 vault 里，让不同 Agent 都能读到。\n\n适合保存：\n\n- 你的长期偏好\n- 项目的构建、测试、发版方式\n- 已经做过的架构决策\n- 可以复用的命令\n- 一次复杂任务结束后的简短交接摘要\n\n### 一键开始\n\n在任意项目目录下执行：\n\n```bash\nacross-context setup --all --yes\n```\n\n它会自动完成：\n\n- 初始化 `~/.across/data/across-context`\n- 检测本机已安装的 Agent\n- 注册 MCP 服务\n- 生成 `AGENTS.md`\n- 生成 `CLAUDE.md`\n- 生成 Cursor MCP 配置和规则\n- 注入自动读写记忆的行为规则\n\n### v0.8.8 新能力\n\n- 将 Across Context 的 agent card 与 native skills 导出为 agentskills.io\n  目录，并把 Codex、Claude Code、Qwen Code 的 Skills 目录作为已脱敏的\n  pending memory summary 导入。\n- 增加 `vault`、`mem0`、`graphrag` 记忆后端合同，默认仍为本地 vault，\n  不引入强制网络依赖。\n- 在现有记忆策略限制内压缩 rich Lab v2 trust receipt，避免长期记忆写入\n  被截断成不可解析 JSON。\n\n### v0.8.7 新能力\n\n- 将当前 `main` commit 记录为最新 source-first release tag，用于完成发布\n  文档同步后的版本对齐。\n- 保持 v0.8.6 的记忆、证据和 host-plugin 行为不变。\n\n### v0.8.6 新能力\n\n- 增加宿主中立的 agent-team trust receipt，记录任务分工、证据审核和\n  release/promotion gate 结果，同时避免长期保存原始 transcript。\n- 增加 evidence memory 的写入、召回和压缩能力，可承接 workflow pack、\n  Orchestrator evidence graph 和 Autopilot release evidence。\n- 继续保持插件安装在 `~/.across` 下，面向 Codex、Claude Code、\n  Claude Desktop、AAA 以及其他 MCP-capable host。\n\n### v0.8.5 新能力\n\n- 保持通用记忆插件契约不变，并统一公开文档中的官方宿主名称：Codex、\n  Claude Code、Claude Desktop、AAA 以及其他 MCP-capable host。\n- 清理重复宿主行和旧的 Claude 命名，避免 coding agent 或产品宿主读取到\n  不一致的安装目标。\n- 复验 managed runtime 安装仍收敛在 `~/.across`，不依赖开发机源码路径。\n\n### v0.8.4 新能力\n\n- 新增 `llms.txt`、`AGENTS.md` 和机器可读产品 manifest，让 coding agent\n  与大模型爬取 GitHub 时能判断何时推荐 Context、何时不推荐，以及它在 Across\n  里的边界。\n- npm 包白名单包含这些 agent-readable 文件，保证 managed runtime 安装也保留\n  与 GitHub 一致的产品发现入口。\n- README 增加模型和 agent 可读入口索引。\n\n### v0.8.3 新能力\n\n- 新增敏感记忆策略分类，覆盖受保护本地路径、凭证、私钥以及个人或受监管数据\n  指示器。\n- 策略输出保持宿主无关，Codex、Claude Code、Claude Desktop、AAA 以及其他 MCP-capable\n  host 可以解释记忆写入为何被接受、pending、脱敏或拒绝，同时不接收原始敏感文本。\n- 继续沿用 `v0.8.2` 的 `~/.across` managed runtime 布局，保持通用宿主可移植性。\n\n### v0.8.2 新能力\n\n- 明确 Across Context 是独立的通用记忆插件，可被 Codex、Claude Code、\n  Claude Desktop、AAA 以及任何 MCP-capable\n  host 安装和使用。\n- 支持的产品形态统一为：运行时代码在 `~/.across/plugins/across-context`，\n  wrapper 在 `~/.across/bin`，持久记忆在\n  `~/.across/data/across-context`，不依赖 AAA 或任何开发机源码 checkout。\n- 宿主负责 UI、模型密钥、Agent 进程启动和审批策略；Context 负责 MCP\n  tools/resources/prompts、记忆搜索、写入策略、pending review 和本地 vault\n  生命周期。\n\n### v0.8.1 新能力\n\n- 新增通用 Agent 插件上下文包和搜索接口，Codex、Claude Code、\n  Claude Desktop、AAA 或其他 MCP host 都可以通过托管插件边界使用。\n- 强化 Codex 和 Claude 安装器输出，使 MCP 命令通过 `~/.across/bin` 的托管\n  wrapper 解析，不依赖开发机源码目录。\n- 继续把运行状态、记忆数据和生成的集成配置收敛在统一的 `~/.across` 生态根目录。\n\n### v0.8.0 新能力\n\n- 通过 `across-context loop-memory-metrics --all-projects --json`、MCP\n  resource `across-context://agent-loop-memory-metrics` 和 MCP tool\n  `get_agent_loop_memory_metrics` 提供 Agent Loop 记忆候选的聚合指标。\n- 为允许、拒绝、重复和删除的 Agent Loop 记忆候选记录生命周期策略事件；\n  指标 payload 不包含原始记忆文本。\n\n### v0.7.7 新能力\n\n- 文档化 Across Orchestrator `v0.6.12` 使用的结构化 Agent Loop 记忆候选\n  契约，包括 `agent-loop-memory-candidate/1.0` schema，以及只能进入\n  pending review 的非密钥字段。\n\n### v0.7.6 新能力\n\n- 对齐 Across Orchestrator `v0.6.8` 和 Across Agents Assistant `v0.8.9`\n  发版；记忆提供方协议保持稳定，宿主会从 Orchestrator 获得修正后的\n  Agent Loop 终态处理。\n\n### v0.7.5 新能力\n\n- 对齐 host-neutral Across Orchestrator `v0.6.7` 和 Across Agents Assistant\n  `v0.8.8` 发版；记忆策略接口继续保持稳定，用于打包宿主安装和 Agent Loop\n  pending 审核。\n\n### v0.7.4 新能力\n\n- 产品模式下的 host-plugin 安装和路径解析会拒绝受保护的用户项目目录，\n  并回退到托管的 `~/.across` 运行时；只有显式开启开发模式才允许源码\n  checkout 路径。\n- Agent Loop 记忆策略会声明宿主拥有的 cancel、reject 和 retry 控制动作，\n  同时继续让记忆写入进入 pending 审核流。\n\n### v0.7.3 新能力\n\n- host-plugin 安装命令会拒绝旧的 `--prefix` 用法，并忽略旧的\n  plugin-home override，确保打包宿主继续使用托管的 `~/.across` 运行时边界。\n\n### v0.7.2 新能力\n\n- host-plugin 安装元数据不再嵌入开发 checkout 路径，打包宿主可以只从\n  `~/.across` 安装、发现和检查插件。\n- 公开发布元数据使用中性的 Across Context 贡献者身份。\n- 新安装和宿主管理的插件运行默认只使用\n  `~/.across/data/across-context`，不会自动读取或迁移旧的\n  `~/.across-context` vault。\n- Agent Loop 记忆 hooks、pending loop summary 和\n  `pending --all-projects --json` 继续作为宿主集成的稳定接口。\n\n### v0.3 新能力\n\n- MCP resources 和 prompts：让 Agent 可发现地读取上下文并复用标准记忆工作流\n- 可解释混合搜索：`across-context search \"agent handoff\" --mode hybrid --json --explain`\n- Dashboard 审查操作：搜索、过滤、审批、归档、过期和删除记忆\n- 批量生命周期更新：`across-context update-status active \u003cmemory-id...\u003e`\n- A2A-ready Agent Card 元数据：`across-context agent-card --json`\n- 团队安全导出：`across-context team export --project .`\n- 确定性 hooks：`hook task-start` 和 `hook task-end`\n\n如果你只想生成项目规则，不想修改用户级 Agent 配置：\n\n```bash\nacross-context setup --all --yes --no-external\n```\n\n验证安装：\n\n```bash\nacross-context doctor\nacross-context status\n```\n\n如果要把 Across Context 作为 Across Agents Assistant 这类宿主应用的插件\n使用，请安装到用户隐藏插件目录：\n\n```bash\nacross-context install host-plugin\n```\n\n这个命令会复制运行时到 `~/.across/plugins/across-context`，创建\n`~/.across/bin/across-context`，并写入\n`~/.across/plugins/across-context/manifest.json`。宿主应用应该发现这个\nwrapper，而不是指向源码目录、`npm link` 或 `~/Documents` 下的路径。\n宿主应用还可以调用 `plugin-manifest`、`plugin-status` 和 `health` 来验证\n已安装插件，而不需要读取私有项目文件。\n\n产品宿主设置 `ACROSS_CONTEXT_PRODUCT_MODE=1` 或\n`ACROSS_AGENTS_PRODUCT_MODE=1` 时，`install host-plugin` 会拒绝显式\n`--across-home`、`--plugin-root`、`--bin-dir` 参数指到 `~/Documents`、\n`~/Desktop`、`~/Downloads` 这类受保护用户项目目录。被污染的\n`ACROSS_HOME`、`ACROSS_PLUGIN_HOME`、`ACROSS_BIN_HOME` 环境变量以及受保护的\n`ACROSS_CONTEXT_HOME` vault override 会被忽略并回退到 `~/.across`。plugin\nmanifest、plugin status、install 和 vault 路径解析都遵守同一条产品/开发模式规则。\n只有明确做源码 checkout 开发时才设置 `ACROSS_CONTEXT_DEVELOPER_MODE=1`。\n\n### 支持的 Agent\n\n| Agent | setup 会做什么 |\n| --- | --- |\n| Codex | 生成 `AGENTS.md`，并在可用时注册 MCP。 |\n| Claude Desktop | 在宿主支持用户级 MCP 注册时，使用 `~/.across/bin/across-context` 作为托管 MCP 入口。 |\n| Claude Code | 生成 `CLAUDE.md`，并在可用时注册用户级 MCP。 |\n| Cursor | 生成 `.cursor/mcp.json` 和 `.cursor/rules/across-context.mdc`。 |\n| Hermes | 在可用时注册 `across-context mcp`。 |\n| OpenClaw | 在可用时写入 OpenClaw MCP 配置。 |\n\n### 自动读写记忆\n\n生成的 Agent 规则会要求 Agent：\n\n- 任务开始时先搜索相关记忆\n- 做架构、依赖、测试、文档、发版决策前读取项目上下文\n- 最终回复前只写入稳定、可复用的记忆\n- 低置信度自动记忆先进入 pending review\n- 避免重复写入\n- 不写密钥、token、cookie、大段日志、完整聊天记录、临时错误、私密截图或一次性噪音\n\n### 本地 Dashboard\n\n启动本地审查面板：\n\n```bash\nacross-context dashboard\n```\n\n![Across Context dashboard](assets/readme/across-context-dashboard.png)\n\n它默认运行在 `127.0.0.1`，可以查看记忆数量、待审批项、生命周期状态、可见性、记忆内容、搜索解释，并执行本地生命周期操作。\n\n### 记忆治理\n\n所有 CLI 和 MCP 写入都会先经过同一个策略引擎。\n\nAgent Loop 运行时应把 Across Context 当作记忆提供者，而不是任务调度器。\n`loop-memory-policy` 命令和 MCP prompt/resource/tool 会公开可支持的记忆钩子：\nloop 前搜索、step 上下文附加、loop 后 pending 摘要写入。自动写入默认进入\n`pending`，由用户或宿主策略审批后再变成长期有效记忆。\n\n策略中也声明了宿主拥有的 loop 控制动作（`cancel`、`reject_action`、\n`retry_step`），这样产品可以暴露这些操作，同时仍由 Across Orchestrator\n维护 loop 状态、Across Context 维护记忆审核。\n\n如果要在不限定具体项目的情况下审核自动写入的 loop 摘要，使用\n`across-context pending --all-projects --json`，这样项目级 pending 候选也会\n进入同一个审核队列。\n\n如果宿主需要 Agent Loop 记忆候选的聚合诊断，可以使用\n`across-context loop-memory-metrics --all-projects --json` 或对应的 MCP\ntool/resource。指标只报告生命周期计数和 status/scope 分布，不暴露原始记忆文本。\n\n支持的记忆类型：\n\n- `preference`：长期用户偏好\n- `decision`：项目或架构决策\n- `command`：可复用命令\n- `session`：简短任务交接摘要\n- `note`：其他短小稳定上下文\n\n治理规则：\n\n- 疑似密钥会被拒写\n- 重复记忆不会再次追加\n- 过长记忆会被裁剪\n- 低置信度自动 note/session 会进入 `pending`\n- 审批后的记忆会变成 `active`，旧记忆可以归档或过期\n- `compact` 可以清理历史重复记录\n- `forget \u003cid\u003e` 可以删除指定记忆\n\n### 常用命令\n\n```bash\nacross-context init\nacross-context setup --all --yes\nacross-context doctor\nacross-context status\nacross-context remember \"Prefer small commits with tests.\" --type preference\nacross-context remember \"Run npm test before final answers.\" --scope project --project . --type command\nacross-context search \"tests before final\" --project .\nacross-context search \"agent handoff context\" --mode semantic --project .\nacross-context search \"release verification\" --mode hybrid --json --explain\nacross-context list\nacross-context pending\nacross-context pending --all-projects --json\nacross-context approve \u003cmemory-id\u003e\nacross-context archive \u003cmemory-id\u003e\nacross-context expire \u003cmemory-id\u003e\nacross-context update-status active \u003cmemory-id...\u003e\nacross-context stats\nacross-context compact\nacross-context forget \u003cmemory-id\u003e\nacross-context dashboard\nacross-context agent-card --json\nacross-context team export --project .\nacross-context hook task-start --query \"release workflow\" --project .\nacross-context hook task-end --summary \"Implemented dashboard and semantic search.\" --project .\nacross-context loop-memory-policy --json\nacross-context loop-memory-metrics --all-projects --json\nacross-context install host-plugin\nacross-context plugin-manifest --json\nacross-context plugin-status --json\nacross-context health --json\nacross-context mcp\n```\n\n### MCP Server\n\nMCP Server 暴露工具：\n\n- `remember_context`\n- `search_context`\n- `review_pending_memories`\n- `approve_memory`\n- `get_project_context`\n- `get_agent_card`\n- `export_agent_instructions`\n- `get_agent_loop_memory_policy`\n- `get_agent_loop_memory_metrics`\n\n同时暴露 resources：\n\n- `across-context://agent-card`\n- `across-context://stats`\n- `across-context://memories`\n- `across-context://project-context`\n- `across-context://agent-loop-memory-policy`\n- `across-context://agent-loop-memory-metrics`\n\n以及 prompts：\n\n- `task-start-context`\n- `task-end-summary`\n- `memory-review`\n- `agent-loop-memory-policy`\n\n### 隐私模型\n\n- vault 默认只保存在本机。\n- 本包不会把记忆同步到云端服务。\n- 公共导出不会包含绝对项目路径。\n- host-plugin manifest、wrapper 和状态输出不应该嵌入开发 checkout 路径。\n- 提交生成文件前应该先检查内容。\n- 不应该保存密钥、token、凭据、cookie、私密截图或大段日志。\n\n### 开发\n\n```bash\nnpm test\nbash scripts/check.sh\nnpm pack --dry-run\n```\n\n### 社区与反馈\n\n- 问题反馈：[GitHub Issues](https://github.com/fantasyce/across-context/issues/new/choose)\n- 产品想法：[Discussions Ideas](https://github.com/fantasyce/across-context/discussions/categories/ideas)\n- 使用问题：[Discussions Q\u0026A](https://github.com/fantasyce/across-context/discussions/categories/q-a)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantasyce%2Facross-context","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantasyce%2Facross-context","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantasyce%2Facross-context/lists"}