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.
npx agentmods add instructions/forthends/clockwork/agents-mdgit clone --depth 1 https://github.com/forthends/clockworkWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01274 | $0.01274 |
| Opus 5 | $0.00637 | $0.00637 |
| Sonnet 5 | $0.00255 | $0.00255 |
| Haiku 4.5 | $0.00127 | $0.00127 |
Grade A, and why
clockwork 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 147 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Clockwork — 全局 Agent 治理规则
本文件是 Clockwork 治理框架的核心规则定义,所有 Agent 在本工作空间中工作时必须遵守以下约束。
1. 工作空间认知
你正在 Clockwork(机关术) 治理工作空间中工作。该工作空间为敏捷开发团队提供统一的 AI Agent 协作环境。
目录结构
clockwork/
├── agents/ # 角色 Agent 定义(Analyst / PM / Developer / Tester / Reviewer)
├── skills/ # 可复用技能定义
├── workflow/ # 工作流定义与需求产物
│ ├── _schemas/ # 工作流 YAML Schema
│ ├── _definitions/# 工作流定义文件
│ ├── _templates/ # 产物模板(黄金标准)
│ └── features/ # 需求实例及其产物
├── docs/ # 项目文档与质量标准
│ └── projects/ # 各代码仓库的项目简介(由 Analyst 生成)
├── repos/ # 代码仓库(git submodule)
├── AGENTS.md # 本文件 — 全局治理规则
└── README.md # 项目介绍
识别你的角色
在开始任何任务之前,你必须:
- 确认当前用户的角色(Analyst / PM / Developer / Tester / Reviewer)
- 读取
agents/<role>/AGENT.md了解角色职责、约束和可用技能 - 仅在自己角色职责范围内操作,不得越权
2. 工作流感知
读取工作流定义
所有任务必须在工作流框架内执行:
- 读取
workflow/_definitions/<workflow-type>.yaml了解流程定义 - 识别当前所处的阶段(stage)
- 读取该阶段声明的
inputs(上游产物)作为工作上下文 - 按照该阶段声明的
outputs要求产出符合规范的产物
管理需求实例
每个需求实例存放在 workflow/features/FEAT-<id>-<name>/ 下:
- manifest.yaml:记录该需求的工作流状态,是持久脉冲的核心载体
- 产物文件(prd.md, tech-design.md 等):各阶段的输出产物
manifest.yaml 操作规范
- 开始一个阶段时:将该阶段
status更新为in_progress - 完成一个阶段时:将该阶段
status更新为completed,记录completed_at和artifacts - 校验通过时:设置
validation_passed: true - 永远不要跳过阶段,必须按工作流定义的顺序推进
3. 产物输出规范
模板使用
所有产物必须基于 workflow/_templates/ 中的模板创建:
- 保持模板定义的章节结构,不得随意删减必填章节
- 在模板的占位符处填写实际内容
- 可在模板结构基础上扩展额外章节
文件命名
- 产物文件名必须与工作流 YAML 中
outputs.id一致 - 使用小写字母和连字符:
prd.md,tech-design.md,test-plan.md
内容质量底线
- 所有产物必须使用中文撰写(除非该项目有其他语言要求)
- 章节内容不得为空或仅含占位符
- 涉及上游产物的引用必须准确,不得编造
4. 质量闸门(Quality Governors)
校验规则
每个阶段的 validation 字段定义了质量闸门:
required_sections:产物必须包含的章节- 其他自定义校验规则
校验流程
- 产物完成后,调用
validate-artifact技能进行校验 - 校验通过后,更新 manifest.yaml 中的
validation_passed: true - 校验未通过时,必须修正后重新校验,不得跳过
5. 技能调用
可用技能
技能定义在 skills/ 目录中,每个技能目录下包含 SKILL.md。
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.
- 2d ago First seen · 147 lines · 1,274 tokens per session scan A 0547ab51028b
clockwork AGENTS.md is an instructions file published in the GitHub repository forthends/clockwork (8 stars, last pushed 2mo ago), licensed MIT. It adds 1,274 tokens to every session, about $0.0064 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.
Other instructions, from other repositories
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
buildNext
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).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
spec-kit AGENTS.md
Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
langchain 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.