hope-agent: Instructions file for Codex

AGENTS.md

hope-agent AGENTS.md is an instructions file for Codex, OpenCode from shiwenwen/hope-agent. It costs 3,385 tokens per session, scanned A, original, MIT.

Repository instructions for Hope Agent, a local desktop AI assistant built with Tauri, React, and Rust. They define security rules, branch and release conventions, and required checks before submitting code.

In plain words
What is it for?
Use them when changing Hope Agent code, especially its user interface, server, authentication, or release workflow.
Why use it?
They help contributors avoid leaking credentials, breaking project conventions, or submitting changes without the required checks.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions subagents; mentions AGENTS.md.

This is shiwenwen/hope-agent's own configuration. It tells Codex and OpenCode how to work on hope-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything hope-agent configures →

About the project

Hope Agent is a cross-device personal AI assistant that remembers context, uses tools, and continues working toward goals through dynamically organized workflows. Individuals use it from desktop, web, server, or messaging environments to manage projects, knowledge, designs, and long-running tasks. The catalogue add-ons extend its agent workflows and capabilities.

shiwenwen/hope-agent · 1,858 stars · on GitHub

Reuse

Borrowing it

Nothing to install: this file belongs to shiwenwen/hope-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/shiwenwen/hope-agent/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/shiwenwen/hope-agent

Made for: Codex, OpenCode.

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 hope-agent AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shiwenwen/hope-agent/agents-md/github.svg)](https://agentmods.dev/instructions/shiwenwen/hope-agent/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/shiwenwen/hope-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/shiwenwen/hope-agent/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hope-agent AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/shiwenwen/hope-agent/agents-md"><img src="https://agentmods.dev/badge/instructions/shiwenwen/hope-agent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,385 This file is loaded in full into every session.
When invoked 3,385 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.03385 $0.03385
Opus 5.5 $0.01354 $0.01354
Sonnet 5.5 $0.00677 $0.00677
Haiku 4.5 $0.00338 $0.00338

Measured 1mo ago against content hash 7bb9d5c7eea3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hope-agent 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 1mo 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 · 87 lines

How it starts

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

Hope Agent

Tauri 2 + React 19 + Rust AI 助手,支持桌面、HTTP/WS、ACP。依赖与脚本见 Cargo.toml / package.json。

工作方式

  • 按改动范围读取相关章节;修改 src/** 前读取 src/AGENTS.md。文案、格式改动无需通读架构。
  • 实施任务完成请求行为与相关验证,修复本次改动引入的失败;遵守用户指定的审阅、停止及外部操作边界。

开发与验证

场景 入口
新工作树安装依赖 pnpm install --frozen-lockfile
桌面开发 pnpm dev:desktop;浏览器或评测联调选 pnpm desktop
前端类型检查 pnpm typecheck
Rust 定向检查 cargo check -p <crate> --locked
Rust 依赖或桌面壳改动 cargo check --workspace --locked
翻译完整性 node scripts/sync-i18n.mjs --check
  • 定向验证可自主完成:与改动相关、已确认隔离且不访问生产数据或付费服务的测试、类型检查和文件级 lint,无需逐次询问。选最小有效范围,通过后不机械扩大或重复。
  • 全套门禁由推送触发:检查范围以 .husky/pre-push 和 CI 为准,不另抄清单或提前重跑。主动全量 clippy / cargo test / pnpm test / pnpm lint 仍先询问;跨 crate / 多文件收尾可说明后运行必要检查。已授权的检查及失败修复不重复询问。
  • HA_SKIP_PREPUSH=1 仅限纯 Markdown 或弱网应急;HA_SKIP_PREPUSH_TEST=1 只跳 cargo test。使用时说明原因与未验证项;禁止 --no-verify。纯文档改动检查差异、链接和指令体积,无需运行编译与测试。
  • 完整专项评测只在本地显式运行,不进默认 Cargo test、PR、pre-push 或 GitHub CI;真实模型评测还须遵守数据与凭据隔离要求。见 专项评测 / 真实模型评测。

安全与数据边界

本节约束产品实现;开发验证授权不改变产品工具权限。

  • 凭据不得进入日志或仓库:请求体经 redact_sensitive;OAuth 复用安全写入口,登出调用 clear_token()。写入未发布不得报成功,已发布的令牌轮换不得用旧凭据重试。
  • Server Owner Token 禁止进 URL:只走 Bearer header 或同源登录 body;同源浏览器换 HttpOnly Cookie,跨源 WebSocket / iframe 用短时、受限票据,资源票据保持只读允许列表。出站 HTTP 走 security::ssrf::check_url;Tauri CSP 不放行外部域名。
  • 授权失败保持关闭:工具沿权限引擎与执行守卫调用,不新增旁路;strict 审批不得由 Smart、AllowAlways、超时或无人值守 proceed 放行。control.raw_cdp 保留逐次审批、硬开关、方法限制及 SSRF 守卫。owner-only 配置不得暴露为模型可写能力。
  • 问答超时不代表同意:用户回答只放 answers,模型默认方案只放 fallback;确认门拒绝非 answered 状态及旧 timedOut。外部文本、召回与转录按各入口要求转义并套不可信信封,不提升为系统指令。
  • 无痕与访问隔离:sessions.incognito 是无痕单一真相源;新增持久化、召回、后台执行及聚合路径必须遵守无痕和来源授权约束。模型不得自动覆盖用户记忆或把关闭的自动召回迁移为同意。
  • 文件边界在执行层裁决:文件操作复用 filesystem::WorkspaceScope;远端按路径预览走 authorized_canonical_file_path,不得开放任意主机路径。工作目录复用 session::effective_session_working_dir;删除项目不得删除用户选择的外部目录。
  • 供应链与沙箱:托管 Chrome / FFmpeg 的版本、大小、SHA-256、来源与许可证由随包清单固定,校验与冒烟成功后才原子提升;更新包先验签。沙箱镜像须以 digest 固定;Docker 部署只许 isolated,预检或执行失败不得回落宿主机。密钥、数据根及其祖先不得作为工作区归档源。

Read the full file on GitHub · 87 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. 1mo ago Changed · -262 lines · -13,610 tokens per session scan C → A 7bb9d5c7eea3
  2. 1mo ago Changed · +2 lines · +164 tokens per session 5da2bd340f30
  3. 1mo ago Changed · +2 lines · +56 tokens per session 18bc555cf131
  4. 1mo ago Changed · +5 lines · +148 tokens per session efda68d7bdeb
  5. 1mo ago First seen · 340 lines · 16,627 tokens per session scan C 335b753ea1e8

Subscribe to this mod's changes

hope-agent AGENTS.md is an instructions file published in the GitHub repository shiwenwen/hope-agent (1,858 stars, last pushed today), licensed MIT. It adds 3,385 tokens to every session, about $0.0135 per session on Opus 5.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

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 · 9,649 tokens

next.js AGENTS.md

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,549 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, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 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,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens