# Data flow — msitarzewski/agency-agents

> Canonical page: https://codevetter.com/unpack/agency-agents/data-flow

# Data flow — msitarzewski/agency-agents

Scanned commit 053ddbbf392a1688fc7043d81529f47ef2cf86c8 (2026-09-21). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

Source of truth is the division markdown files. lib.sh parses frontmatter and body. convert.sh transforms each agent into a host format under integrations/, except Claude Code and Copilot, which install the source file unchanged. install.sh filters by slug, then copies or symlinks into a host directory resolved from --path, an env override, or a hardcoded default. Hermes is the outlier: bodies are packed into data/agents.json and only the matched specialist is returned or delegated at runtime. Runbook deploys use a different identifier, the filename stem, than the installer slug.
- get_field reads the first YAML frontmatter scalar, strips one matching quote pair, and folds indented continuation lines into a single space-separated value so multi-line descriptions are not truncated. get_body returns everything after the second --- fence. — [scripts/lib.sh#L19-L46](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/lib.sh#L19-L46)
- agent_slug is get_field name piped through slugify, which lowercases and replaces non-alphanumeric runs with single hyphens. That slug is the install filter key and the filename stem for most converters (frontend-developer), while Antigravity and Osaurus prefix it with agency-. — [scripts/lib.sh#L48-L64](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/lib.sh#L48-L64) [scripts/convert.sh#L118-L128](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L118-L128) [scripts/convert.sh#L171-L178](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L171-L178)
- The convert loop walks AGENT_DIRS, skips files whose first line is not --- and files with an empty name, then dispatches convert_<tool> or accumulate_<tool>. clean_tool_output first deletes prior output except README.md so renamed agents do not leave orphans. — [scripts/convert.sh#L654-L713](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L654-L713)
- OpenCode files are markdown with name, description, mode subagent, and a resolved #RRGGBB color. Cursor files are .mdc with description, empty globs, and alwaysApply false. Gemini CLI files keep name/description frontmatter plus the raw body. Codex writes a TOML file under integrations/codex/agents/<slug>.toml. — [scripts/convert.sh#L171-L213](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L171-L213) [scripts/convert.sh#L266-L313](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L266-L313)
- yaml_quote wraps values in single quotes and doubles apostrophes. toml_escape_string shells out to perl -0pe to escape backslashes, quotes, newlines, and other control characters before they are embedded in TOML. — [scripts/convert.sh#L94-L114](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L94-L114)
- Install destination order is --path, then a tool-specific env var, then the default. CLAUDE_CONFIG_DIR is treated as the config root and agents are placed in its agents/ subdirectory unless the value already ends in /agents. path_collision_group blocks --path when two tools would write the same filenames (raw-source-md, slug-md, or agency-skill). — [scripts/install.sh#L285-L330](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L285-L330) [scripts/install.sh#L1385-L1400](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1385-L1400)
- build_selection unions slugs from --division (every agent_slug in those dirs), --agent, and --agents-file. slug_allowed strips a leading agency- prefix. With no filter, SELECTION_ACTIVE stays false and every frontmatter file is installed. Hermes later warns that selection flags are ignored. — [scripts/install.sh#L192-L237](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L192-L237) [scripts/install.sh#L1286-L1288](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1286-L1288)
- ensure_converted auto-runs convert.sh --tool when integrations/<tool> has no file other than README.md. Claude Code and Copilot return immediately. AUTO_CONVERT defaults true and --no-convert disables it. — [scripts/install.sh#L346-L365](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L346-L365)
- Hermes data flow packs every agent into data/agents.json (slug, name, description, division, color, emoji, vibe, source_path, body). At runtime _load_agents reads that JSON once. Search tokenizes the query and scores name, description, division, vibe, and body[:8000]. Load and delegate call _specialist_prompt, which prepends a 'obey higher-priority system instructions' wrapper and the user task. — [scripts/build-hermes-plugin.py#L37-L91](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/build-hermes-plugin.py#L37-L91) [scripts/build-hermes-plugin.py#L131-L221](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/build-hermes-plugin.py#L131-L221) [scripts/build-hermes-plugin.py#L311-L360](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/build-hermes-plugin.py#L311-L360)
- Delegate context is truncated to _MAX_LIFECYCLE_CONTEXT_CHARS (32000) with an explicit truncation marker. The wait budget is _DELEGATION_WAIT_SECONDS 330 and cancellation wait 30. On failure the handler returns the composed prompt instead of the subagent result. — [scripts/build-hermes-plugin.py#L119-L129](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/build-hermes-plugin.py#L119-L129) [scripts/build-hermes-plugin.py#L362-L450](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/build-hermes-plugin.py#L362-L450)
- Runbook slugs are filename stems, not name-slugs. check-runbooks.sh builds the real set with git ls-files '*.md', drops integrations/examples/strategy/scripts/.github, and requires every roster agents[] entry to match a basename without .md. startup-mvp's core team therefore lists engineering-frontend-developer, while install --agent frontend-developer is the name slug of that same file. — [strategy/runbooks.json#L1-L25](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/strategy/runbooks.json#L1-L25) [scripts/check-runbooks.sh#L45-L71](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/check-runbooks.sh#L45-L71) [engineering/engineering-frontend-developer.md#L1-L3](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/engineering/engineering-frontend-developer.md#L1-L3)
- scripts/convert-outputs.sha256 is the drift manifest for generated output. test-convert-outputs.sh records one hash per agent across every tool, one hash per tool's non-agent files, and contract hashes for divisions.json, tools.json, and runbooks.json. Hashes are normalized to forward slashes and LF. — [scripts/test-convert-outputs.sh#L1-L46](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/test-convert-outputs.sh#L1-L46) [scripts/test-convert-outputs.sh#L79-L100](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/test-convert-outputs.sh#L79-L100)
- About 33 of 279 filename stems do not contain the slugify(name) value, so the two identifier spaces are not a simple prefix convention. (inferred) — [scripts/lib.sh#L48-L59](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/lib.sh#L48-L59) [scripts/check-runbooks.sh#L16-L18](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/check-runbooks.sh#L16-L18) [engineering/engineering-frontend-developer.md#L2](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/engineering/engineering-frontend-developer.md#L2)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
