hooks build-agents writes an absolute --output path RELATIVE to cwd while reporting the absolute one, creating stray dirs in the project; counts also disagree and --focus changes one agent of seven
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 812
- Forks
- 175
- Avg merge
- 2m
- Merged PRs (30d)
- 3
Description
Summary
hooks build-agents reports agents as created and writes zero files. It also barely responds to --focus: five of the seven agents are identical across every focus mode, and the agent set does not reflect the repository it analysed.
Version: agentic-flow 2.1.2, Node v22.23.0, macOS 15.
1. Reports success, writes nothing
mkdir -p /tmp/agentsout
npx agentic-flow hooks build-agents --focus security -o /tmp/agentsout
✅ Agents Generated!
📦 Total: 7
📂 Output: /tmp/agentsout
🎯 Focus: security
Agents created:
• rust-specialist
• typescript-specialist
• python-specialist
• react-specialist
• database-specialist
find /tmp/agentsout -type f | wc -l
# 0
Nothing is written. Exit code is 0 and the output is an unqualified success message. Reproduced with all five focus modes — security, testing, speed, quality, fullstack — always Total: 6 or 7, always 0 files.
Note also that the summary says Total: 7 while listing only 5 names, so the count and the list disagree with each other as well as with the filesystem.
2. --focus changes one agent out of seven
| focus | reported | agents listed |
|---|---|---|
| security | 7 | rust, typescript, python, react, database-specialist, security-auditor, project-coordinator |
| testing | 7 | …same five…, test-architect, project-coordinator |
| quality | 7 | …same five…, test-architect, project-coordinator |
| speed | 6 | …same five…, project-coordinator |
| fullstack | 6 | …same five…, project-coordinator |
The five language/database specialists and project-coordinator are constant. Only one slot varies, and speed and fullstack add nothing at all, so those two modes are indistinguishable from each other.
The documented example for --focus security shows security-auditor, vulnerability-scanner, auth-specialist, crypto-expert — a security-oriented set. In practice security yields four language specialists plus one security agent.
3. The generated set does not match the analysed repository
Run in a project whose own tracked files are:
182 .md 84 .py 59 .sh 38 .json 35 .csv 18 .yml 15 .cjs 14 .mjs
(Python scripts and HTML dashboards. The counts above exclude five vendored dependency trees.)
It generated rust-specialist, typescript-specialist and react-specialist. Checking those languages in the project's own code:
.rs own=0 total=20 (all under a vendored dependency)
.tsx/.jsx own=0 total=78 (all vendored)
Zero first-party Rust or React files. Both counts come entirely from vendored third-party trees inside node_modules-like directories that happen to be committed.
Meanwhile the project's second-largest own language after Markdown is Python (84 files) — python-specialist is generated, correctly — but no agent is produced for shell (59 .sh), and in the vendored trees there are 85 .svelte files with no Svelte specialist, so the selection is not simply "top languages by file count" either.
This suggests the agent list is drawn from a fixed roster with light matching, and that the matching counts vendored dependencies as project code.
Suggested fix
- Write the files, or report accurately when nothing is written. As it stands,
✅ Agents Generated! 📦 Total: 7with exit 0 and an empty output directory is indistinguishable from success. - Reconcile the reported total with the listed names (7 vs 5).
- Make
--focusmeaningfully change the set, or document that it adds a single specialist.speedandfullstackcurrently produce identical output. - Exclude vendored/ignored directories when inferring languages —
.gitignoreplus common vendor paths would be a reasonable default. Generating a Rust specialist for a project with zero first-party Rust files is a visible symptom of counting dependencies.
Note on the default output directory
-o defaults to .claude/agents, which in many projects is a curated, hand-maintained directory. Given that this command currently writes nothing, that is harmless today — but if the write path is fixed without also addressing the count/report mismatch, a user running it to "see what it would generate" would be writing into their live agent configuration. A --dry-run, or a non-destructive default, would be safer.
Related
- #185, #196, #199 — other
hookssubcommands whose reported numbers do not correspond to what is on disk.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the hooks build-agents entry point and reproduce the command with --focus security -o /tmp/agentsout, checking both its reported output and the filesystem. Trace how the agent list, counts, focus modes, and repository file detection are computed. Done means generated files and reported counts agree, focus modes produce their documented sets, and ignored or vendored files do not drive selection.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100