Flow2Spec AGENTS.md

Entry instructions for Flow2Spec, a project that routes questions and coding tasks through a local knowledge base. A knowledge base is a collection of project information used to guide answers and changes.

In plain words
What is it for?
Use them when handling Flow2Spec tasks, reading its knowledge base, applying its specialized skills, or deciding whether a tracked task must be created.
Why use it?
They identify the files that must be read first and explain configuration switches that control routing, sub-agents, verification, and change tracking.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/double-coding-lab/flow2spec/agents-md
Clone the repo
git clone --depth 1 https://github.com/double-coding-lab/Flow2Spec

Made for: Codex, OpenCode.

Per session 3,206 This file is loaded in full into every session.
When invoked 3,206 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.03206 $0.03206
Opus 5 $0.01603 $0.01603
Sonnet 5 $0.00641 $0.00641
Haiku 4.5 $0.00321 $0.00321

Measured 2d ago against content hash 6307d3bb6e67, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

Flow2Spec 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.

AGENTS.md · 115 lines

How it starts

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

Flow2Spec 项目入口

本文件由 flow2spec init 写入仓库根 ./AGENTS.md,作为 Codex 读取的项目入口。./.codex/AGENTS.md 仅为指针。知识库根目录为 ./.Knowledge/

先做这两步

  1. 本轮首次处理当前仓库相关问题时,先读 ./.Knowledge/manifest-routing.json
  2. 执行任何 f2s-* 技能前,先 Read("flow2spec.config.json")
必须执行:Read(".Knowledge/manifest-routing.json")
必须执行:Read("flow2spec.config.json")  ← 仅在进入 f2s-* 技能前

禁止在未读 flow2spec.config.json 的情况下进入 f2s-* 技能正文。

配置开关(以磁盘为准)

下表只说明字段语义与 flow2spec init 写入的默认值;配置真值仍以本轮 Read("flow2spec.config.json") 结果为准(用户可能手工改过)。

配置项 init 默认 说明
subAgent true 技能正文写明某步可用子 agent 时,true 才允许拆子;false 一律主会话完成。用户「动态判断谁用子 agent」仅当本项为 true 时有效。
switchAgentVerification true 切换 agent 校验。仅当本项为 true 且当前技能正文明确绑定该字段时启用交叉校验;否则仍是谁落盘谁自验。旧键 subAgentVerification 仍可被解析。
intentRecognition true true 时可按 f2s-intent-routing 对高置信操作意图自动进入对应 f2s-* 技能;false 或缺失时不自动分流。
changeTracking.feat true truef2s-kb-feat 步骤 0 必须创建/续作 .task/active/ 变更追踪任务;false 时跳过。
changeTracking.fix false truef2s-kb-fix 步骤 0 必须创建/续作 .task/active/ 变更追踪任务;false 时跳过。
changeTracking.implement true truef2s-implement-tech-design 写入任务清单并在满足归档门禁后归档;false 时跳过变更追踪部分。
collaboration.enabled true true 时按 developerId 隔离任务根 .task/<id>/false 时始终 legacy 单根 .task/
collaboration.developerId "" 非空则作为任务进度目录名;空则尝试 git user.email/name 规范化;仍无则 legacy .task/。解析顺序:config → git → legacy。
  • subAgent=true 时,主 agent 必须在技能前段显式判断一次本次是否拆子,并说明原因;即使判断不拆,也必须输出不拆原因。subAgent=false 时不得拆子 agent。
  • intentRecognition=false 或字段缺失时,禁止自动进入任何 skill;只能按用户显式触发或当前规则允许的高置信分流进入。

配置细表与补充规则见 ./.codex/topics/f2s-config-check.md

KB 路由规则

  • 机读事实源只认 ./.Knowledge/manifest-routing.json 与其 matcherPath 指向的 ./.Knowledge/matchers/*.json
  • match -> expand -> verify -> act 执行:主命中后先展开 topicDependencies,再检查是否缺关键上下文。
  • 仅在以下情况允许跨 matcher 全量补检索:无命中、主次候选过近、缺口检查失败、用户明确要求“全量检查/不要遗漏”。
  • fallbackTopic 仅作低置信兜底,不能直接作为最终执行依据。

Read the full file on GitHub · 115 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. 2d ago First seen · 115 lines · 3,206 tokens per session scan A 6307d3bb6e67

Subscribe to this mod's changes

Flow2Spec AGENTS.md is an instructions file published in the GitHub repository double-coding-lab/Flow2Spec (47 stars, last pushed 4d ago), licensed MIT. It adds 3,206 tokens to every session, about $0.0160 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-30.

Related

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.

openai/codex · 5,182 tokens

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).

microsoft/vscode · 6,785 tokens

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.

vercel/next.js · 7,296 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

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.

github/spec-kit · 7,040 tokens

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.

langchain-ai/langchain · 4,345 tokens