正在打开每日关注
正在打开每日关注
通过启动时扫描 docs/与 YAML frontmatter,让 Codex持续获得项目上下文并沉淀可检索文档。
one of my fav Codex configs is docs-list by @steipete (not sure if he still uses it since i didn't see it in his AGENTS.md anymore): i have a line in my AGENTS.md to get Codex to run this docs-list script every time a new chat starts so that it can gather context from the docs/ folder. when suitable, Codex writes a new md file to the docs/ folder, containing YAML frontmatter so that the docs-list lookups can find relevant files easily i've found this super useful for getting Codex to keep useful docs in the repo and it updates the docs quite often so i haven't had any issues with docs going out of date this is more useful for solo projects unless your team also runs the same docs-list script https://t.co/pZkIZaU3mG
是什么
这条推文建议把 docs-list 写入项目 AGENTS.md,让 Codex 在新对话启动时扫描 docs/,主动获得仓库上下文。steipete/agent-scripts 是共享代理指令、技能和便携脚本的仓库(Shell,6575 stars)。README 将 AGENTS.MD、skills/、scripts/、hooks/ 分别用于硬规则、可复用工作流、辅助工具和本地防护;scripts/docs-list.ts 遍历 docs/,要求 YAML frontmatter 含 summary、read_when,并输出 onboarding summaries。
核心设计
它把文档变成 agent 的持续上下文层:启动时发现已有知识,合适时再写回带元数据的 Markdown。核心是“目录扫描 + 轻量元数据 + AGENTS 触发”,无需复杂检索。sync-skills 还通过符号链接跨仓库暴露技能,validate-skills 校验技能元数据,体现集中维护与复用。
关键洞察与边界
个人项目可减少重复解释架构的成本;团队则必须统一脚本和文档约定,否则 agent 上下文会分叉。推文所称“文档经常更新、没有过时问题”只是作者经验;脚本能发现和提示文件,不等于验证内容正确,效果依赖 frontmatter 完整、AGENTS 配置持续存在及团队共同执行。