comet AGENTS.md

A set of project instructions for rpamis/comet, written in Chinese. It covers reply language, testing, formatting, commit messages, and project structure.

In plain words
What is it for?
Use it to guide Chinese-language responses, choose tests based on change risk, run formatting and lint checks, and follow commit conventions.
Why use it?
It gives contributors shared rules for checking and submitting code, reducing inconsistent project practices.

Instructions file for CodexOpenCode

▶ The Comet by W. E. B. DuBois - Short Story Summary, Analysis, Review The CodeX Cantina · about rpamis/comet · on YouTube →
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/rpamis/comet/agents-md
Clone the repo
git clone --depth 1 https://github.com/rpamis/comet

Made for: Codex, OpenCode.

Per session 3,720 This file is loaded in full into every session.
When invoked 3,720 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.03720 $0.03720
Opus 5 $0.01860 $0.01860
Sonnet 5 $0.00744 $0.00744
Haiku 4.5 $0.00372 $0.00372

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

Security

Grade A, and why

comet 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 today.

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

How it starts

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

回复语言

必须采用中文回答用户

测试

验证范围必须与改动风险相匹配,不要在每次编辑后默认运行全量测试。

  • 每轮先运行覆盖当前改动的最小相关测试。
  • 纯文档或 Skill 内容修改:运行相关契约测试和受影响文件的 Prettier 检查。
  • 单一 app/domains/platform/ 模块修改:运行对应测试;涉及编译、Runtime 或生成物时再运行 build。
  • 跨模块、Runtime、安装/路由、发布准备或其他高风险修改:最终交付前运行一次全量测试。
  • 全量测试失败或超时时,先定位原因;只有修正了明确原因后才重跑,不盲目重复。
  • CI 已覆盖全量检查时,可以在本地只运行相关验证,但交付时必须明确说明未在本地运行的检查。
npx vitest run <相关测试文件>                     # 默认:最小相关测试
npx vitest run                                   # 高风险修改或最终交付前的全量测试

提交前检查

仓库已配置 Git pre-commit 钩子(husky + lint-staged),每次 git commit 会自动对 app/domains/platform/scripts/test/.github/config/ 下的暂存源文件运行 prettier --write(与 CI format:check 范围一致;冻结的 test/fixtures/ 除外),编辑器无关,所有贡献者生效。

根据改动范围选择提交前检查;不要求每个提交机械地运行全部命令(CI 会执行完整检查):

pnpm format:check   # 大范围格式检查;小范围可只检查受影响文件
pnpm lint           # 修改源码、测试、脚本或配置时
pnpm build          # 涉及编译、Runtime、生成物或发布资产时
pnpm test           # 高风险修改或最终交付前需要本地全量验证时

注:本地 Windows 若 core.autocrlf=true,未改动的旧文件可能因 CRLF 被 prettier --check 误报;钩子只处理暂存文件,不受影响,旧文件下次编辑时会自动转为 LF。

Commit 规范

提交信息必须使用类型前缀,格式为 <type>: <summary>,scope 可选:<type>(<scope>): <summary>

常用类型包括:featfixdocschorerefactortestbuildciperf

示例:

  • feat: add eval report language switch
  • fix(eval): prevent chart labels from overlapping
  • docs: update contributor commit rules

项目结构规范

当前源码目录按责任分层:

  • app/:CLI 入口、命令编排和用户交互层。只能组合 domain/platform 能力,不承载领域规则。
  • domains/:业务领域模块。每个子目录是一个可独立维护的领域模块,例如 domains/agent-learning/domains/bundle/domains/comet-classic/domains/comet-native/domains/comet-entry/domains/dashboard/domains/project-knowledge/domains/skill/domains/workflow-contract/
  • platform/:文件系统、进程、安装平台、版本、路径等平台适配能力。domain 不应直接散落平台差异逻辑。
  • scripts/:构建、发布、benchmark、lint 等仓库自动化脚本。可调用源码模块,但不要成为运行时业务入口。
  • assets/:发布资产和内置 Skill 内容。修改 runtime 源码后必须通过构建同步生成资产,不要把业务逻辑只写在生成物里。
  • eval/scaffold/shell/ 中仅允许 config/repository-layout.json 明确列出的隔离评审 sidecar 入口;它们属于 Eval 容器边界,不是产品 Runtime 入口。

Read the full file on GitHub · 235 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. today Changed · +16 tokens per session 648ae9942ee0
  2. 3d ago First seen · 235 lines · 3,704 tokens per session scan A 981953340ffd

Subscribe to this mod's changes

comet AGENTS.md is an instructions file published in the GitHub repository rpamis/comet (2,902 stars, last pushed yesterday), licensed MIT. It adds 3,720 tokens to every session, about $0.0186 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.