From 32f79d1da1591234d497e37657cf4c0390fa9a2f Mon Sep 17 00:00:00 2001 From: 7fpb5574ck-maker <369284625@qq.com> Date: Fri, 13 Nov 2026 14:17:53 +0800 Subject: [PATCH] docs: add sanitized optional AGENTS example --- .github/workflows/opc-lab.yml | 2 ++ CHANGELOG.md | 2 ++ README.en.md | 2 ++ README.md | 2 ++ .../leo-system/AGENTS.public.example.en.md | 36 +++++++++++++++++++ examples/leo-system/AGENTS.public.example.md | 36 +++++++++++++++++++ examples/leo-system/README.en.md | 2 ++ examples/leo-system/README.md | 2 ++ scripts/verify.sh | 11 ++++++ 9 files changed, 95 insertions(+) create mode 100644 examples/leo-system/AGENTS.public.example.en.md create mode 100644 examples/leo-system/AGENTS.public.example.md diff --git a/.github/workflows/opc-lab.yml b/.github/workflows/opc-lab.yml index 233d9f6..d29ff73 100644 --- a/.github/workflows/opc-lab.yml +++ b/.github/workflows/opc-lab.yml @@ -6,6 +6,8 @@ on: - 'labs/opc-company/**' - 'labs/chat-export/**' - 'labs/session-hooks/**' + - 'examples/leo-system/**' + - 'CHANGELOG.md' - 'scripts/verify.sh' - 'README.md' - 'README.en.md' diff --git a/CHANGELOG.md b/CHANGELOG.md index b874cf3..c5b3c9f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ ### Added +- `examples/leo-system/AGENTS.public.example*.md`:新增可选的中英文脱敏 AGENTS 协作规则,不影响默认 Core,并纳入仓库验证及隐私检查。 + - `labs/session-hooks/`:实验性的三个 Claude Code 钩子(会话标题提醒、归档检查、「需要我决定」清单注入),只用 Python 标准库,附中英文说明、示例配置和合成数据测试。 ## [3.1.0] - 2026-08-05 diff --git a/README.en.md b/README.en.md index 1989452..15275bf 100644 --- a/README.en.md +++ b/README.en.md @@ -208,6 +208,8 @@ The Core and first-success exercise above are enough to begin. The structures be To adapt the larger system, begin with [examples/leo-system](examples/leo-system/). Keep or rename the business lines, choose stable owners, connect per-task records to your own storage, and add claims or writer locks only when real concurrency requires them. +The optional [sanitized AGENTS example](examples/leo-system/AGENTS.public.example.en.md) ([中文](examples/leo-system/AGENTS.public.example.md)) describes portable multi-agent rules, not the private original or default Core. + Existing v2 users should follow [MIGRATION-v3.en.md](MIGRATION-v3.en.md) and disable old discovery paths reversibly before installing. ## Repository layout diff --git a/README.md b/README.md index 304c445..1784dea 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,8 @@ QuietHarness 是主干。我的一些真实业务能力已经长成独立仓库 4. 接入自己的 readout/writeback; 5. 只有出现真实冲突时,再加入 claim 或 writer lock。 +多模型协作的工作约束可选读 [公开脱敏版 AGENTS 示例](examples/leo-system/AGENTS.public.example.md)。它不是我的私人原文,也不会随 Core 自动安装。 + ### 从 v2 迁移 先运行只读盘点,再按 [MIGRATION-v3.md](MIGRATION-v3.md) 可逆停用旧规则、Skill、Hook 和固定日流程。不要直接删除已有配置。 diff --git a/examples/leo-system/AGENTS.public.example.en.md b/examples/leo-system/AGENTS.public.example.en.md new file mode 100644 index 0000000..5d14c6c --- /dev/null +++ b/examples/leo-system/AGENTS.public.example.en.md @@ -0,0 +1,36 @@ +# Leo System AGENTS (sanitized public example) + +> Optional working rules distilled from a real multi-agent workflow. This is not the private original and is not installed with QuietHarness's default Core. Simplify it for your own needs; do not overwrite an existing AGENTS.md. + +## Goal and principles + +- Optimize for real outcomes and verifiable evidence; reliable systems before elaborate narratives. +- Understand the user problem and acceptance criteria before deciding to write code. +- Add claims, single-Writer controls, or coordination only when real concurrent conflicts justify them. + +## Start work and maintain continuity + +1. Read applicable project rules, repository status, existing behavior, and uncommitted edits. Preserve unrelated user work. +2. Resume from one canonical task record: goal, owner, prior evidence, blockers, and next action. Report a missing record rather than fabricate history. +3. Continue the original task and write back to its source; changing agents does not create a new task database, reminder, or scheduler. +4. Batch adjacent safe actions to a verifiable checkpoint instead of requesting permission after every step. +5. For genuine parallel work, a stable Owner is accountable and replaceable Workers execute. Maintain one Writer per shared repository with explicit handoffs. Skip this ceremony for a single-worker task. + +## Changes and verification + +- Bound the scope; prefer small, reversible patches. Test risky experiments in isolation and preserve a rollback path. +- Support conclusions with tests, diffs, execution receipts, or checkable sources. Disclose failed, unknown, or partially complete outcomes. +- Record artifacts, validation, blockers, and the next gate; read the task record back after writing. +- Before retrying an action with external effects, reconcile its prior outcome to avoid duplicates. + +## Authority and privacy + +- Within existing permission, proceed through read-only investigations and low-risk reversible local changes. +- Funds, trades, accounts, credentials, external messages, public posts, deletion, and risky production changes require explicit task-specific approval and existing gates. +- Do not escalate access, bypass protections, or extract secrets. Report precise permission blockers. +- Exclude identities, real accounts, holdings, funds, health data, customers, private absolute paths, live tasks, session IDs, and production controls from public material. Use synthetic scenarios and relative paths. + +## Evolve deliberately + +- Keep only practices proven in use to prevent real failures; rule count is not a success metric. +- Keep the default Core lean. Readers may opt in to this larger example, which is not an installation dependency. diff --git a/examples/leo-system/AGENTS.public.example.md b/examples/leo-system/AGENTS.public.example.md new file mode 100644 index 0000000..b1c0df7 --- /dev/null +++ b/examples/leo-system/AGENTS.public.example.md @@ -0,0 +1,36 @@ +# Leo System AGENTS(公开脱敏示例) + +> 这是一份可选的工作规则样例,提炼自真实多 AI 协作经验;不是私人原文,也不会随 QuietHarness 的默认 Core 安装。先按自身规模删减,勿直接覆盖现有 AGENTS.md。 + +## 目标与原则 + +- 追求实际结果与可核验证据;系统可用性优先于复杂叙事。 +- 先理解用户问题和验收条件,再决定是否写代码。 +- 遇到真实的并发冲突后才引入 claim、单 Writer 等协调机制。 + +## 开工与持续推进 + +1. 读取项目适用规则、仓库状态、现有实现和未提交改动。保留不相关的用户工作。 +2. 从唯一可信的任务记录恢复目标、负责人、上次证据、阻塞和下一动作。缺失时明确报告,不能编造历史。 +3. 继续原任务,在原位置记录结果并回读。更换 Agent 不代表重新建任务库、提醒或调度器。 +4. 批量完成相邻的安全动作,推进到可验证节点再报告;不必每修改一步就问一次是否继续。 +5. 需要分工时,由稳定 Owner 对结果负责,Worker 可替换;同一仓库同时只保留一个写入者,明确交接。单人任务不需要额外仪式。 + +## 修改与验证 + +- 限定修改范围,优先小而可逆的补丁。高风险实验先隔离测试,并保留回滚方式。 +- 用测试、diff、运行回执或可信来源证明结论;失败、未知和部分完成要如实写明。 +- 更新任务状态时附上产物、验证、阻塞及下一门槛,写回后再读取核验。 +- 重试任何可能产生外部效果的操作前,先检查是否已执行,避免重复动作。 + +## 权限与安全 + +- 在既有授权范围内,可以连续执行只读检查与低风险本地可逆操作。 +- 资金、交易、账号、凭证、对外消息、公开发布、删除及生产高风险操作必须另行满足明确批准和已有门禁。 +- 不提权、不绕过系统保护、不导出私密凭证。遇到权限边界时说明准确阻塞,不猜测。 +- 公开分享时排除个人身份、真实账户、持仓、资金、健康、客户、私有绝对路径、实时任务、会话 ID 和生产控制细节;使用合成示例与相对路径。 + +## 进化边界 + +- 只沉淀实际使用且被验证能减少错误的做法,不以规则数量衡量成熟度。 +- 保持默认 Core 精简。此扩展示例由读者自行选择,不成为安装依赖。 diff --git a/examples/leo-system/README.en.md b/examples/leo-system/README.en.md index 191be66..2bc61db 100644 --- a/examples/leo-system/README.en.md +++ b/examples/leo-system/README.en.md @@ -11,6 +11,8 @@ It removes absolute paths, thread UUIDs, live tasks, accounts, positions, health Files: - `AGENTS.private.example.md`: stable preferences and pointers only; +- `AGENTS.public.example.md`: optional sanitized working rules (Chinese source); +- `AGENTS.public.example.en.md`: English mirror of those rules; - `business-lines.example.json`: Leo's real nine-line topology; - `task.example.json`: a synthetic task that preserves the real contracts; - `writer-lock.example.json`: acquire/release contract; diff --git a/examples/leo-system/README.md b/examples/leo-system/README.md index c05b30f..fb521b6 100644 --- a/examples/leo-system/README.md +++ b/examples/leo-system/README.md @@ -20,6 +20,8 @@ ```text AGENTS.private.example.md 私人层只保存偏好与事实源入口 +AGENTS.public.example.md 可选的通用协作规则(中文脱敏版) +AGENTS.public.example.en.md 上述规则的英文镜像 business-lines.example.json Leo 的九条真实业务线拓扑 task.example.json 一份沿用真实约束的合成任务样例 writer-lock.example.json 一次仓库写入的 acquire/release 契约 diff --git a/scripts/verify.sh b/scripts/verify.sh index 85b3bb5..173a0af 100755 --- a/scripts/verify.sh +++ b/scripts/verify.sh @@ -31,6 +31,8 @@ docs/TASK-CONTINUITY.en.md examples/leo-system/README.md examples/leo-system/README.en.md examples/leo-system/AGENTS.private.example.md +examples/leo-system/AGENTS.public.example.md +examples/leo-system/AGENTS.public.example.en.md examples/leo-system/business-lines.example.json examples/leo-system/task.example.json examples/leo-system/writer-lock.example.json @@ -166,6 +168,15 @@ if [ -n "$private_hits" ]; then exit 1 fi +public_agent_examples=( + examples/leo-system/AGENTS.public.example.md + examples/leo-system/AGENTS.public.example.en.md +) +if grep -Eq '(AKIA[A-Z0-9]{16}|(sk-|ghp_|github_pat_|glpat-|xox[baprs]-)[A-Za-z0-9_-]{12,}|-----BEGIN (RSA |OPENSSH |EC )?PRIVATE KEY-----|0x[[:xdigit:]]{40})' "${public_agent_examples[@]}"; then + echo "VERIFY_FAIL possible secret in public AGENTS example" >&2 + exit 1 +fi + for marker in '"owner_thread"' '"primary_worker"' '"next_action"' '"updated_at"' '"execution_map"' '"evaluator"'; do if ! grep -Fq "$marker" examples/leo-system/task.example.json; then echo "VERIFY_FAIL continuity example omits contract marker: $marker" >&2