session-map AGENTS.md

Project instructions for SessionMap, an application that helps users return to their previous train of thought across different work sessions. They describe the product rules, system architecture, data handling, web interface, desktop app, and release process.

In plain words
What is it for?
Use them when changing SessionMap's state model, transcript collection, session navigation, web app, local runtime, desktop wrapper, migration, or release process.
Why use it?
They show which documents and design rules must be checked before changing behavior, storage, or the interface. This helps keep related parts of the application consistent.

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/hao-cyber/session-map/agents-md
Clone the repo
git clone --depth 1 https://github.com/hao-cyber/session-map

Made for: Codex, OpenCode.

Per session 2,889 This file is loaded in full into every session.
When invoked 2,889 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.02889 $0.02889
Opus 5 $0.01444 $0.01444
Sonnet 5 $0.00578 $0.00578
Haiku 4.5 $0.00289 $0.00289

Measured yesterday against content hash 1b085207062e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

session-map 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 yesterday.

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 · 139 lines

How it starts

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

SessionMap 项目指令

产品事实源

  • 修改产品行为、UI、信息架构、命名、持久化、运行时或分发之前,必须完整阅读 docs/product-design.md
  • 该文档是产品与设计宪章。功能规格、设计稿、框架惯例或实现便利与它冲突时, 以其中的裁决优先级为准。
  • 不变的结果目标是:用户切回任何一条工作线时,能在三秒内找回此前的思考位置。

模块文档索引

先按改动范围读取对应模块文档;跨模块改动同时读取所有受影响文档。模块文档解释 “代码现在如何守住契约”,不得覆盖或重新解释产品宪章。

问题求解与文档演进

  • 遇到卡点、反复失败或问题边界不清时,先整理已知事实、约束、假设和未知量,再把 具体故障抽象成若干可检索的问题。确认它是否已有成熟的问题名称、理论模型、标准 解法或业界实践;优先查阅一手资料和成熟实现,并明确外部解法与本项目约束的映射, 不得未经验证直接照搬。
  • 修改模块前必须阅读对应模块文档;改动使现有职责、契约、数据流、边界或验证方式 发生变化时,功能与相关文档必须在同一改动中更新。文档描述当前真实设计,不把 changelog 混入正文;实现细节不得反向篡改产品宪章。
  • 文档随模块增长而变得过长、混合多个可独立理解的子主题,或单文件已难以可靠导航时, 按 hub-and-spoke 方式拆分:hub 保留职责、核心不变量、全局关系和 spoke 索引,spoke 承载具体协议、流程或子模块细节。Hub 与 spoke 必须双向链接;新增一级模块边界时同步 更新本文件的模块文档索引,避免产生不可发现的孤立文档。

架构取向与变更门禁

  • 追求简洁、显式、可推导的模块化单体:职责高内聚,依赖沿公开契约单向流动;同一 事实只有一个来源,同一类副作用只有一个所有者。能减少概念、状态、入口和机制时, 不增加抽象。

  • 新能力必须沿既有数据流和模块边界接入。禁止“飞线”:跨层调用内部实现、绕过统一 写入、校验、鉴权或生命周期,复制持久状态,引入旁路入口,或用特例把本应独立的 模块绑在一起。

  • 若合理需求反复需要越界,先修正模块职责或公开契约,并同步架构文档;不得用无归属 的 helper、共享可变状态或重复编排掩盖边界错误。抽象只用于消除已经存在的重复或 隔离已确认的变化,不为假设中的未来扩展预建层级。

  • 改动跨越模块边界,或改变职责、数据所有权、写入路径、信任边界、生命周期、失败恢复 与分发方式时,编码前先完成轻量架构审查。

  • 审查至少明确:受影响契约、唯一事实源与写入者、数据流和依赖方向、失败与重启行为、 安全边界、迁移与回滚方式,以及能够证明这些约束的验证证据。

  • 重大架构决策必须记录背景、约束、备选方案、取舍和后果;后续推翻时标记替代关系, 不得静默改写历史决定。

  • 删除旧实现、旧状态或兼容桥之前,必须证明新路径完成真实迁移、重启恢复、回滚和安装 冒烟;“新实现能运行”不等于“旧路径可以清理”。

Read the full file on GitHub · 139 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. yesterday First seen · 139 lines · 2,889 tokens per session scan A 1b085207062e

Subscribe to this mod's changes

session-map AGENTS.md is an instructions file published in the GitHub repository hao-cyber/session-map (2 stars, last pushed 18d ago), licensed MIT. It adds 2,889 tokens to every session, about $0.0144 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-31.