AGENTS.md@internal/agents/directorA

AGENTS.md@internal/agents/director from iohub/yagent is an AGENTS.md file: the standing instructions coding agents read in that repo.

Install it, pinned
mdr add iohub/yagent/internal/agents/director/AGENTS.md@git:20261103.104f21a

Pins git:20261103.104f21a in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
AGENTS.md file
Repository
iohub/yagent
Path
internal/agents/director/AGENTS.md
Versions recorded
8
Latest version
git:20261103.104f21a, committed Nov 3, 2026
First version recorded
Oct 21, 2026
Size
8,970 bytes
Repository stars
31
License
Apache-2.0

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# internal/agents/director — Director 编排内核

> 范围:本目录内不可派生的约束。全局见仓库根 `AGENTS.md` §6.2。
> **本包禁止 import `yagent/internal/agents`**(`scripts/check_no_agents_import.sh`)。

## 边界

Director 的编排内核:Planner 主循环、熔断与恢复、指标、便签索引注入、projectID 主键、Meta 注册表。
不负责子 Agent 实例与委派执行(经 `ToolRunner` 回调交给门面层)、不面向用户。

## 硬约束

**1. 依赖守卫扫的是整条传递依赖闭包,且必须整行匹配**(`scripts/check_no_agents_import.sh:15-23`)——
子包路径含父串,子串匹配会误伤。跨子系统的依赖一律经 `internal/agents/ports.go` 的窄接口注入。

**2. 非测试 `.go` ≤ 300 行;PENDING 名单现在是空的。** 条目格式是
`<相对路径>:<允许的最大行数>`(`scripts/check_file_sizes.sh:25,45`)。唯一的历史存量
`planner_run.go` 已拆完:压缩段/首轮落库/终止记账早就各自搬走,剩下的三段职责拆成
`planner_run.go`(主循环骨架)+ `planner_llm.go`(一次 LLM 调用与响应记账)+
`planner_delegate.go`(收尾判定与委派编排),三个文件都在 300 以下,条目于是按棘轮规则删除。
规则不变:新文件超限直接红;加条目 = 显式立项一笔要还的债;**改小了必须同步下调数字、达标必须删条目**,
否则脚本主动报"棘轮失步"并红。一条常红的守卫等于没有守卫。

**3. 便签索引是派生态且瞬态。** `messagesForLLMCall` 返回**新切片**,外层 `messages` 必须保持无索引
(`board_index.go:11-22`):一旦漏回,下一步的压缩预算会把目录算进正文,紧急压缩还会把它当成一条
用户输入折叠进摘要——那正是它要解决的病。同一步重试必须幂等(`:37`)。

**4. 恢复决策不许交给模型。** `PendingResumption` 在进 LLM 循环**之前**处理,结果作为**同一个
`call_id` 的第二条 tool output**(last-wins)交回(`planner_run.go:135-145`),零 token、确定性。
让模型决定怎么恢复的后果是"同样的停点有时重做、有时接着跑"。`DelegationID` 为空时必须整份忽略,
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add iohub/yagent/internal/agents/director/AGENTS.md@sha256:6eaf50ba31c49fe9

The line at the top of this page pins the label git:20261103.104f21a, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ye23n2goh3fuwzgm.svg)](https://markdownregistry.com/a/art_ye23n2goh3fuwzgm)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 8 versions of this file, between Oct 21, 2026 and Nov 3, 2026, about one every 2 days.

versioncommittedcommitsizeaudit
git:20261103.104f21a latest2026-11-03 104f21a 8,970 BA view · diff
git:20261028.5946dc52026-10-28 5946dc5 9,173 BA view · diff
git:20261028.4037dfe2026-10-28 4037dfe 8,704 BA view · diff
git:20261027.ffe1f492026-10-27 ffe1f49 8,319 BA view · diff
git:20261027.14c8a242026-10-27 14c8a24 7,516 BA view · diff
git:20261025.f70d95c2026-10-25 f70d95c 7,493 BA view · diff
git:20261024.9b444412026-10-24 9b44441 7,493 BA view · diff
git:20261021.9f5bf872026-10-21 9f5bf87 5,243 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (8970 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

iohub/yagent · 31 stars · license Apache-2.0 · pushed 2026-11-05 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ye23n2goh3fuwzgm
GET https://markdownregistry.com/api/v1/resolve?ref=iohub/yagent/internal/agents/director/AGENTS.md
GET https://markdownregistry.com/api/v1/blob/6eaf50ba31c49fe95624a9a45b7e47ed765994f1ef6e207f775b96ccc12e3f6d

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: how to write a good AGENTS.md · AGENTS.md vs CLAUDE.md · which agent file does what.

More from iohub/yagent

AGENTS.md AGENTS.md file
iohub/yagent · AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal AGENTS.md file
iohub/yagent · internal/AGENTS.md
git:20261026.7381d71 · audit A · 31 stars
AGENTS.md@internal/agents AGENTS.md file
iohub/yagent · internal/agents/AGENTS.md
git:20261103.104f21a · audit A · 31 stars
AGENTS.md@internal/app AGENTS.md file
iohub/yagent · internal/app/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars
AGENTS.md@internal/blackboard AGENTS.md file
iohub/yagent · internal/blackboard/AGENTS.md
git:20261026.89c0391 · audit A · 31 stars
AGENTS.md@internal/blueprint AGENTS.md file
iohub/yagent · internal/blueprint/AGENTS.md
git:20261026.9762922 · audit A · 31 stars
AGENTS.md@internal/browserctl AGENTS.md file
iohub/yagent · internal/browserctl/AGENTS.md
git:20261030.25a3126 · audit A · 31 stars
AGENTS.md@internal/compression AGENTS.md file
iohub/yagent · internal/compression/AGENTS.md
git:20261028.19903d6 · audit A · 31 stars
AGENTS.md@internal/config AGENTS.md file
iohub/yagent · internal/config/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars
AGENTS.md@internal/http AGENTS.md file
iohub/yagent · internal/http/AGENTS.md
git:20261026.7381d71 · audit A · 31 stars
AGENTS.md@internal/llm AGENTS.md file
iohub/yagent · internal/llm/AGENTS.md
git:20261027.0637c8b · audit A · 31 stars
AGENTS.md@internal/mcp AGENTS.md file
iohub/yagent · internal/mcp/AGENTS.md
git:20261024.9b44441 · audit A · 31 stars

Every file in iohub/yagent

Browse by kind, by grade A, or by owner.