# Behavior traces — msitarzewski/agency-agents

> Canonical page: https://codevetter.com/unpack/agency-agents/behavior-traces

# Behavior traces — msitarzewski/agency-agents

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

Three flows dominate: installing into a host, regenerating integration files, and turning the roster into a Hermes plugin that can search and delegate. A fourth, docs-only flow is NEXUS activation by pasting a prompt. The traces below name the functions in call order as they appear in the scripts.
- Install startup: main parses flags, do_list exits early for --list, build_selection computes _ALLOWED_SLUGS, check_integrations requires integrations/ to exist, then either interactive_wizard or the detect loop fills SELECTED_TOOLS. Dry-run prints the plan via selected_agent_count and exits before any write. — [scripts/install.sh#L1316-L1358](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1316-L1358) [scripts/install.sh#L1404-L1462](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1404-L1462)
- Non-interactive detection calls is_detected per ALL_TOOLS entry, which dispatches detect_claude_code (directory ~/.claude or CLAUDE_CONFIG_DIR), detect_copilot (code binary or ~/.github or ~/.copilot), detect_hermes (hermes binary or HERMES_HOME), and the other detect_* helpers. Zero detections exits 0 with a tip, not an error. — [scripts/install.sh#L428-L468](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L428-L468) [scripts/install.sh#L1420-L1440](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1420-L1440)
- Wizard order is tui_begin, then screen_tools -> screen_teams -> screen_review. Each screen calls selector, which loops read_key and draw_frame. On install, the wizard commits SELECTED_TOOLS and, if not every team is selected, FILTER_DIVISIONS, then build_selection. No TTY makes interactive_wizard return 1 and main falls through to auto-detect. — [scripts/install.sh#L720-L751](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L720-L751) [scripts/lib.sh#L147-L157](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/lib.sh#L147-L157) [scripts/install.sh#L1404-L1414](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1404-L1414)
- A real install calls install_tool, which calls ensure_converted then the matching install_<tool>. Sequential mode prints progress_bar around each tool. --parallel re-execs install.sh with AGENCY_INSTALL_WORKER=1 via xargs -P, passing worker_flags (--link, --no-convert, --path, --division, --agent, --agents-file). — [scripts/install.sh#L254-L263](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L254-L263) [scripts/install.sh#L1291-L1310](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1291-L1310) [scripts/install.sh#L1465-L1510](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1465-L1510)
- Claude Code file loop: for each AGENT_DIRS entry, find *.md, is_agent_file, agent_slug, slug_allowed, install_file (cp, or ln -sf if --link) into the resolved dest. Copilot repeats that write into two directories and counts once. — [scripts/install.sh#L280-L282](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L280-L282) [scripts/install.sh#L758-L788](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L758-L788)
- Convert startup: main validates --tool against valid_tools, then run_conversions. For a normal tool it clean_tool_output, find-sorts markdown, skips non-frontmatter, and calls the converter. --parallel on tool=all runs every tool except aider and windsurf through xargs, because those two share temp accumulators, then runs them serially. — [scripts/convert.sh#L667-L713](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L667-L713) [scripts/convert.sh#L718-L778](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L718-L778)
- OpenClaw convert of one file: get_field name/description, slugify, get_body, then a line loop that uses fence_open_p/fence_closes_p so fenced ## lines are not section breaks, classifies headers into soul vs agents, and writes SOUL.md, AGENTS.md, and IDENTITY.md. — [scripts/convert.sh#L315-L425](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L315-L425) [scripts/lib.sh#L70-L91](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/lib.sh#L70-L91)
- Hermes install order: ensure_converted may call convert.sh --tool hermes; install_hermes checks plugin.yaml, __init__.py, and data/agents.json exist; if HERMES_PLUGIN_DIR's basename is not agency-agents-router it appends that segment; rm -rf only that directory; cp -R or ln -s; ensure_hermes_plugin_enabled; then a python one-liner prints len(agents.json). — [scripts/install.sh#L1249-L1288](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1249-L1288) [scripts/install.sh#L346-L363](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L346-L363)
- ensure_hermes_plugin_enabled copies config.yaml to config.yaml.bak.agency-agents-plugin.$$, then an inline Python script finds the plugins: block, repairs lines where '- ' was glued into a scalar, and inserts '- agency-agents-router' at the existing list-item indent. It exits 0 if the plugin is already present and exits 1 without writing when it cannot find an insertion point. — [scripts/install.sh#L1080-L1247](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/install.sh#L1080-L1247) [.github/workflows/check-hermes-config-rewrite.yml#L1-L8](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/.github/workflows/check-hermes-config-rewrite.yml#L1-L8)
- Hermes delegate order inside the generated plugin: _identifier, _agent_lookup, require task, _specialist_prompt as fallback, import SubagentLaunchRequest, lifecycle.launch, lifecycle.wait(330), on timeout lifecycle.cancel then wait(30), lifecycle.result, and on any exception return either pending or the fallback prompt. — [scripts/build-hermes-plugin.py#L362-L450](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/build-hermes-plugin.py#L362-L450)
- Lint of one agent: lint_file rejects CRLF, requires an opening ---, requires name/description/color, checks color against names awk-extracted from resolve_opencode_color, warns if Identity, Core Mission, or Critical Rules are absent, warns under 50 words, and warns if no ## header classifies as soul or as agents. — [scripts/lint-agents.sh#L39-L196](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/lint-agents.sh#L39-L196) [scripts/convert.sh#L221-L250](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/scripts/convert.sh#L221-L250)
- NEXUS-Sprint startup, as documented rather than executed, is a pasted prompt: activate Agents Orchestrator, skip Phase 0, staff PM/design/engineering/QA/support roles, begin at Phase 1, and require Reality Checker approval before launch. The matching runbook startup-mvp lists agents-orchestrator plus engineering-frontend-developer and testing-reality-checker as always-on. — [strategy/QUICKSTART.md#L46-L67](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/strategy/QUICKSTART.md#L46-L67) [strategy/runbooks.json#L4-L25](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/strategy/runbooks.json#L4-L25) [specialized/agents-orchestrator.md#L19-L31](https://github.com/msitarzewski/agency-agents/blob/053ddbbf392a1688fc7043d81529f47ef2cf86c8/specialized/agents-orchestrator.md#L19-L31)

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)
