fix(agents): convert tools frontmatter from array to comma-separated string#2528
fix(agents): convert tools frontmatter from array to comma-separated string#2528MeGaurav4 wants to merge 1 commit into
Conversation
…string All 67 agent files declared tools as a YAML array (e.g. `tools: ["Read", "Grep", "Glob"]`), which Claude Code's agent loader silently rejects. The loader expects a comma-separated string (e.g. `tools: Read, Grep, Glob`). Convert every agent file to the expected format so agents actually register and can be used as subagents. Closes affaan-m#2526
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
📝 WalkthroughSummary by CodeRabbit
WalkthroughUpdated the ChangesAgent tool metadata
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Filename | Overview |
|---|---|
| agents/architect.md | Representative of all 67 agent files: one-line change converting tools from YAML flow-sequence to comma-separated string; no permission or content changes. |
| agents/chief-of-staff.md | Broader tool list (Read, Grep, Glob, Bash, Edit, Write) correctly reformatted; tool set unchanged from before the PR. |
| agents/security-reviewer.md | Security-sensitive agent; tools (Read, Grep, Glob, Bash) are unchanged in scope — only the YAML format was corrected. |
| agents/docs-lookup.md | Includes MCP tool names (mcp__context7__resolve-library-id, mcp__context7__query-docs) alongside standard tools; reformatted correctly, no new tools added. |
| agents/seo-specialist.md | Uses WebSearch and WebFetch tools; these were pre-existing and unchanged by this PR — format only. |
Reviews (1): Last reviewed commit: "fix(agents): convert tools frontmatter f..." | Re-trigger Greptile
There was a problem hiding this comment.
Actionable comments posted: 18
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@agents/a11y-architect.md`:
- Line 5: The metadata format currently exposes a scalar where downstream
repository consumers require an array. Update the metadata boundary represented
by the tools declarations so consumers consistently receive an array-compatible
value, either by normalizing the scalar downstream or preserving the array form
at the source. Apply the same correction at agents/a11y-architect.md:5-5,
agents/agent-evaluator.md:4-4, agents/architect.md:4-4,
agents/build-error-resolver.md:4-4, agents/kotlin-build-resolver.md:4-4,
agents/kotlin-reviewer.md:4-4, agents/loop-operator.md:4-4,
agents/marketing-agent.md:4-4, agents/mle-reviewer.md:4-4,
agents/network-architect.md:4-4, agents/network-config-reviewer.md:4-4, and
agents/network-troubleshooter.md:4-4.
In `@agents/agent-evaluator.md`:
- Line 4: Remove Bash from the tools declaration for the read-only agent in
agents/agent-evaluator.md, unless runtime policy explicitly enforces a
restricted shell allowlist; do not rely solely on the prompt’s read-only note to
constrain access.
In `@agents/chief-of-staff.md`:
- Line 4: Convert the tools frontmatter value from a scalar to a YAML array in
agents/chief-of-staff.md:4-4, agents/code-architect.md:5-5,
agents/code-explorer.md:5-5, agents/code-reviewer.md:4-4,
agents/code-simplifier.md:5-5, agents/opensource-forker.md:4-4,
agents/opensource-packager.md:4-4, agents/opensource-sanitizer.md:4-4,
agents/performance-optimizer.md:4-4, agents/php-reviewer.md:4-4, and
agents/planner.md:4-4, preserving each agent’s existing tool entries.
In `@agents/comment-analyzer.md`:
- Line 5: Update scripts/gemini-adapt-agents.js and
scripts/lib/agent-compress.js to accept both scalar and array forms of the tools
metadata before relying on the new scalar format. Apply this compatibility
change for agents/comment-analyzer.md:5, agents/conversation-analyzer.md:5,
agents/cpp-build-resolver.md:4, agents/cpp-reviewer.md:4,
agents/csharp-reviewer.md:4, agents/pr-test-analyzer.md:5,
agents/python-reviewer.md:4, agents/pytorch-build-resolver.md:4,
agents/react-build-resolver.md:4, agents/react-reviewer.md:4, and
agents/refactor-cleaner.md:4; no direct changes are required in those agent
files.
In `@agents/dart-build-resolver.md`:
- Line 4: The dashboard loader/parser in scripts/dashboard-web.js must parse
comma-separated scalar tools values instead of treating them as empty arrays,
while preserving existing array handling and spec-miner’s tool guardrails. Apply
this shared loader fix for agents/dart-build-resolver.md:4,
agents/database-reviewer.md:4, agents/django-build-resolver.md:4,
agents/django-reviewer.md:4, agents/doc-updater.md:4,
agents/rust-build-resolver.md:4, agents/rust-reviewer.md:4,
agents/security-reviewer.md:4, agents/seo-specialist.md:4,
agents/silent-failure-hunter.md:5, and agents/spec-miner.md:5; these sites
require no direct edits.
In `@agents/docs-lookup.md`:
- Line 4: Update the tools metadata consumers in scripts/dashboard-web.js and
scripts/lib/agent-compress.js to accept scalar comma-separated values as well as
arrays, splitting and normalizing the string into the expected tool list while
preserving existing array handling. Ensure the published agent retains its tools
metadata and satisfies the array expectations in the dashboard tests.
- Line 1: Update the dashboard and agent-compression consumers to normalize
scalar YAML tool values into single-element arrays before publishing or storing
agent metadata. Preserve existing array-valued handling, and ensure the listed
agents retain every declared tool so their internal metadata matches the
expected tool lists in the dashboard tests.
In `@agents/e2e-runner.md`:
- Line 4: Update the internal agent-file conversion flow used by
scripts/dashboard-web.js and scripts/lib/agent-compress.js to preserve scalar
tools values such as the e2e-runner configuration. Add scalar parsing support
before converting agent files, while retaining existing array handling.
In `@agents/fastapi-reviewer.md`:
- Line 4: Update the consumers in loadAgents and loadAgent to preserve non-array
tools values as valid tool metadata, rather than converting them to []. Ensure
Read, Grep, Glob, and Bash remain available after loading this agent before
changing the frontmatter type.
In `@agents/flutter-reviewer.md`:
- Line 4: The tool configuration must use a parser-supported collection format
rather than a scalar string so frontmatter consumers preserve the agent’s tool
permissions. Update the tools declaration in agents/flutter-reviewer.md to match
the array format expected by the existing frontmatter parsing logic, while
retaining the listed Read, Grep, Glob, and Bash tools.
In `@agents/fsharp-reviewer.md`:
- Line 4: Update both supplied tool loaders to normalize configured tools from
either arrays or comma-separated strings before applying the new behavior,
preserving array-valued inputs. Add a regression test in
tests/scripts/dashboard-web.test.js covering comma-separated tool values and
verifying they are parsed into the expected array.
In `@agents/gan-generator.md`:
- Line 4: Normalize comma-separated scalar values from frontmatter.tools into an
array before agents are loaded, within the loader used by
scripts/lib/agent-compress.js, trimming each tool name and preserving existing
array values; alternatively, change the metadata to YAML list syntax so the
loader receives the expected array shape.
In `@agents/swift-build-resolver.md`:
- Line 4: Update the shared frontmatter parsers/loaders that process the `tools`
field to normalize scalar tool declarations into a collection before any
`Array.isArray(frontmatter.tools)` checks. Preserve existing array handling and
ensure downstream loaders retain scalar values such as Read, Write, Edit, Bash,
Grep, and Glob instead of reducing them to an empty list; do not rely solely on
editing the agent frontmatter.
In `@agents/swift-reviewer.md`:
- Line 4: Update scripts/dashboard-web.js and scripts/lib/agent-compress.js to
normalize the tool metadata before migration, converting comma-separated scalar
strings into tool arrays. Preserve existing array handling and ensure both
consumers publish the parsed tools instead of an empty list.
In `@agents/tdd-guide.md`:
- Line 4: Update the frontmatter parsing loaders to normalize the scalar tools
value into an array while preserving existing array values, including splitting
comma-separated tools; add coverage for both formats before converting the agent
files. Use the existing loader and parsing-test symbols to implement and verify
the dual-format fm.tools contract.
In `@agents/type-design-analyzer.md`:
- Line 5: Update the shared metadata loaders used by the agent configuration
parsing to normalize scalar tools values into a one-item collection instead of
mapping non-array values to an empty array. Preserve array values unchanged so
the tools declared in agents/type-design-analyzer.md, including Read, Grep, and
Glob, remain available after loading.
In `@agents/typescript-reviewer.md`:
- Line 4: Update the parser logic in loadAgents and loadAgent to convert
string-valued tools into the corresponding scalar tool representation instead of
emitting an empty array. Preserve existing handling for array-valued tools,
ensuring repository consumers discover Read, Grep, Glob, and Bash when provided
as a scalar string.
In `@agents/vue-reviewer.md`:
- Line 4: Update the shared frontmatter parsing used by the dashboard and
compression metadata consumers before applying the agent-file changes. Normalize
comma-separated string values into arrays while preserving existing array
handling, and add regression coverage confirming valid YAML scalar metadata is
parsed rather than converted to an empty array.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1beb111f-b9d3-4672-bff1-4c969c7ca795
📒 Files selected for processing (67)
agents/a11y-architect.mdagents/agent-evaluator.mdagents/architect.mdagents/build-error-resolver.mdagents/chief-of-staff.mdagents/code-architect.mdagents/code-explorer.mdagents/code-reviewer.mdagents/code-simplifier.mdagents/comment-analyzer.mdagents/conversation-analyzer.mdagents/cpp-build-resolver.mdagents/cpp-reviewer.mdagents/csharp-reviewer.mdagents/dart-build-resolver.mdagents/database-reviewer.mdagents/django-build-resolver.mdagents/django-reviewer.mdagents/doc-updater.mdagents/docs-lookup.mdagents/e2e-runner.mdagents/fastapi-reviewer.mdagents/flutter-reviewer.mdagents/fsharp-reviewer.mdagents/gan-evaluator.mdagents/gan-generator.mdagents/gan-planner.mdagents/go-build-resolver.mdagents/go-reviewer.mdagents/harmonyos-app-resolver.mdagents/harness-optimizer.mdagents/healthcare-reviewer.mdagents/homelab-architect.mdagents/java-build-resolver.mdagents/java-reviewer.mdagents/kotlin-build-resolver.mdagents/kotlin-reviewer.mdagents/loop-operator.mdagents/marketing-agent.mdagents/mle-reviewer.mdagents/network-architect.mdagents/network-config-reviewer.mdagents/network-troubleshooter.mdagents/opensource-forker.mdagents/opensource-packager.mdagents/opensource-sanitizer.mdagents/performance-optimizer.mdagents/php-reviewer.mdagents/planner.mdagents/pr-test-analyzer.mdagents/python-reviewer.mdagents/pytorch-build-resolver.mdagents/react-build-resolver.mdagents/react-reviewer.mdagents/refactor-cleaner.mdagents/rust-build-resolver.mdagents/rust-reviewer.mdagents/security-reviewer.mdagents/seo-specialist.mdagents/silent-failure-hunter.mdagents/spec-miner.mdagents/swift-build-resolver.mdagents/swift-reviewer.mdagents/tdd-guide.mdagents/type-design-analyzer.mdagents/typescript-reviewer.mdagents/vue-reviewer.md
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
- GitHub Check: Greptile Review
🧰 Additional context used
📓 Path-based instructions (3)
agents/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Agents should be formatted as Markdown with YAML frontmatter containing name, description, tools, and model fields.
Files:
agents/network-architect.mdagents/tdd-guide.mdagents/go-reviewer.mdagents/database-reviewer.mdagents/spec-miner.mdagents/comment-analyzer.mdagents/loop-operator.mdagents/django-build-resolver.mdagents/a11y-architect.mdagents/harmonyos-app-resolver.mdagents/gan-evaluator.mdagents/opensource-sanitizer.mdagents/php-reviewer.mdagents/healthcare-reviewer.mdagents/homelab-architect.mdagents/gan-generator.mdagents/cpp-reviewer.mdagents/e2e-runner.mdagents/java-build-resolver.mdagents/kotlin-build-resolver.mdagents/swift-build-resolver.mdagents/seo-specialist.mdagents/silent-failure-hunter.mdagents/pytorch-build-resolver.mdagents/security-reviewer.mdagents/conversation-analyzer.mdagents/kotlin-reviewer.mdagents/mle-reviewer.mdagents/network-troubleshooter.mdagents/code-simplifier.mdagents/doc-updater.mdagents/agent-evaluator.mdagents/csharp-reviewer.mdagents/react-reviewer.mdagents/rust-reviewer.mdagents/swift-reviewer.mdagents/chief-of-staff.mdagents/code-reviewer.mdagents/flutter-reviewer.mdagents/dart-build-resolver.mdagents/go-build-resolver.mdagents/java-reviewer.mdagents/fsharp-reviewer.mdagents/rust-build-resolver.mdagents/code-architect.mdagents/harness-optimizer.mdagents/network-config-reviewer.mdagents/opensource-forker.mdagents/performance-optimizer.mdagents/gan-planner.mdagents/typescript-reviewer.mdagents/docs-lookup.mdagents/refactor-cleaner.mdagents/vue-reviewer.mdagents/python-reviewer.mdagents/architect.mdagents/pr-test-analyzer.mdagents/react-build-resolver.mdagents/build-error-resolver.mdagents/code-explorer.mdagents/django-reviewer.mdagents/fastapi-reviewer.mdagents/type-design-analyzer.mdagents/opensource-packager.mdagents/marketing-agent.mdagents/planner.mdagents/cpp-build-resolver.md
{agents,skills,commands}/**/*.md
📄 CodeRabbit inference engine (CLAUDE.md)
Use lowercase filenames with hyphens (e.g.,
python-reviewer.md,tdd-workflow.md) for agents, skills, and commands.
Files:
agents/network-architect.mdagents/tdd-guide.mdagents/go-reviewer.mdagents/database-reviewer.mdagents/spec-miner.mdagents/comment-analyzer.mdagents/loop-operator.mdagents/django-build-resolver.mdagents/a11y-architect.mdagents/harmonyos-app-resolver.mdagents/gan-evaluator.mdagents/opensource-sanitizer.mdagents/php-reviewer.mdagents/healthcare-reviewer.mdagents/homelab-architect.mdagents/gan-generator.mdagents/cpp-reviewer.mdagents/e2e-runner.mdagents/java-build-resolver.mdagents/kotlin-build-resolver.mdagents/swift-build-resolver.mdagents/seo-specialist.mdagents/silent-failure-hunter.mdagents/pytorch-build-resolver.mdagents/security-reviewer.mdagents/conversation-analyzer.mdagents/kotlin-reviewer.mdagents/mle-reviewer.mdagents/network-troubleshooter.mdagents/code-simplifier.mdagents/doc-updater.mdagents/agent-evaluator.mdagents/csharp-reviewer.mdagents/react-reviewer.mdagents/rust-reviewer.mdagents/swift-reviewer.mdagents/chief-of-staff.mdagents/code-reviewer.mdagents/flutter-reviewer.mdagents/dart-build-resolver.mdagents/go-build-resolver.mdagents/java-reviewer.mdagents/fsharp-reviewer.mdagents/rust-build-resolver.mdagents/code-architect.mdagents/harness-optimizer.mdagents/network-config-reviewer.mdagents/opensource-forker.mdagents/performance-optimizer.mdagents/gan-planner.mdagents/typescript-reviewer.mdagents/docs-lookup.mdagents/refactor-cleaner.mdagents/vue-reviewer.mdagents/python-reviewer.mdagents/architect.mdagents/pr-test-analyzer.mdagents/react-build-resolver.mdagents/build-error-resolver.mdagents/code-explorer.mdagents/django-reviewer.mdagents/fastapi-reviewer.mdagents/type-design-analyzer.mdagents/opensource-packager.mdagents/marketing-agent.mdagents/planner.mdagents/cpp-build-resolver.md
{skills,commands,agents,rules}/**
⚙️ CodeRabbit configuration file
{skills,commands,agents,rules}/**: Focus on prompt-injection resilience, tool-permission scope, destructive action guards, and secret exfiltration risks.
Files:
agents/network-architect.mdagents/tdd-guide.mdagents/go-reviewer.mdagents/database-reviewer.mdagents/spec-miner.mdagents/comment-analyzer.mdagents/loop-operator.mdagents/django-build-resolver.mdagents/a11y-architect.mdagents/harmonyos-app-resolver.mdagents/gan-evaluator.mdagents/opensource-sanitizer.mdagents/php-reviewer.mdagents/healthcare-reviewer.mdagents/homelab-architect.mdagents/gan-generator.mdagents/cpp-reviewer.mdagents/e2e-runner.mdagents/java-build-resolver.mdagents/kotlin-build-resolver.mdagents/swift-build-resolver.mdagents/seo-specialist.mdagents/silent-failure-hunter.mdagents/pytorch-build-resolver.mdagents/security-reviewer.mdagents/conversation-analyzer.mdagents/kotlin-reviewer.mdagents/mle-reviewer.mdagents/network-troubleshooter.mdagents/code-simplifier.mdagents/doc-updater.mdagents/agent-evaluator.mdagents/csharp-reviewer.mdagents/react-reviewer.mdagents/rust-reviewer.mdagents/swift-reviewer.mdagents/chief-of-staff.mdagents/code-reviewer.mdagents/flutter-reviewer.mdagents/dart-build-resolver.mdagents/go-build-resolver.mdagents/java-reviewer.mdagents/fsharp-reviewer.mdagents/rust-build-resolver.mdagents/code-architect.mdagents/harness-optimizer.mdagents/network-config-reviewer.mdagents/opensource-forker.mdagents/performance-optimizer.mdagents/gan-planner.mdagents/typescript-reviewer.mdagents/docs-lookup.mdagents/refactor-cleaner.mdagents/vue-reviewer.mdagents/python-reviewer.mdagents/architect.mdagents/pr-test-analyzer.mdagents/react-build-resolver.mdagents/build-error-resolver.mdagents/code-explorer.mdagents/django-reviewer.mdagents/fastapi-reviewer.mdagents/type-design-analyzer.mdagents/opensource-packager.mdagents/marketing-agent.mdagents/planner.mdagents/cpp-build-resolver.md
🔇 Additional comments (10)
agents/gan-evaluator.md (1)
4-4: LGTM!agents/gan-planner.md (1)
4-4: LGTM!agents/go-build-resolver.md (1)
4-4: LGTM!agents/go-reviewer.md (1)
4-4: LGTM!agents/harmonyos-app-resolver.md (1)
4-4: LGTM!agents/harness-optimizer.md (1)
4-4: LGTM!agents/healthcare-reviewer.md (1)
4-4: LGTM!agents/homelab-architect.md (1)
4-4: LGTM!agents/java-build-resolver.md (1)
4-4: LGTM!agents/java-reviewer.md (1)
4-4: LGTM!
| description: Accessibility Architect specializing in WCAG 2.2 compliance for Web and Native platforms. Use PROACTIVELY when designing UI components, establishing design systems, or auditing code for inclusive user experiences. | ||
| model: sonnet | ||
| tools: ["Read", "Write", "Edit", "Grep", "Glob"] | ||
| tools: Read, Write, Edit, Grep, Glob |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
The scalar format breaks repository consumers that still require arrays.
agents/a11y-architect.md#L5-L5: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/agent-evaluator.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/architect.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/build-error-resolver.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/kotlin-build-resolver.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/kotlin-reviewer.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/loop-operator.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/marketing-agent.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/mle-reviewer.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/network-architect.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/network-config-reviewer.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.agents/network-troubleshooter.md#L4-L4: normalize the scalar in downstream metadata consumers or preserve an array-compatible boundary.
📍 Affects 12 files
agents/a11y-architect.md#L5-L5(this comment)agents/agent-evaluator.md#L4-L4agents/architect.md#L4-L4agents/build-error-resolver.md#L4-L4agents/kotlin-build-resolver.md#L4-L4agents/kotlin-reviewer.md#L4-L4agents/loop-operator.md#L4-L4agents/marketing-agent.md#L4-L4agents/mle-reviewer.md#L4-L4agents/network-architect.md#L4-L4agents/network-config-reviewer.md#L4-L4agents/network-troubleshooter.md#L4-L4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/a11y-architect.md` at line 5, The metadata format currently exposes a
scalar where downstream repository consumers require an array. Update the
metadata boundary represented by the tools declarations so consumers
consistently receive an array-compatible value, either by normalizing the scalar
downstream or preserving the array form at the source. Apply the same correction
at agents/a11y-architect.md:5-5, agents/agent-evaluator.md:4-4,
agents/architect.md:4-4, agents/build-error-resolver.md:4-4,
agents/kotlin-build-resolver.md:4-4, agents/kotlin-reviewer.md:4-4,
agents/loop-operator.md:4-4, agents/marketing-agent.md:4-4,
agents/mle-reviewer.md:4-4, agents/network-architect.md:4-4,
agents/network-config-reviewer.md:4-4, and agents/network-troubleshooter.md:4-4.
| name: agent-evaluator | ||
| description: Evaluates agent output against 5-axis quality rubric (accuracy, completeness, clarity, actionability, conciseness). Use after any non-trivial task when the user wants a quality assessment, or when the agent-self-evaluation skill is active. Produces structured scorecard with evidence and improvement suggestions. | ||
| tools: ["Read", "Grep", "Glob", "Bash"] | ||
| tools: Read, Grep, Glob, Bash |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n## agents/agent-evaluator.md (first 80 lines)\n'
nl -ba agents/agent-evaluator.md | sed -n '1,80p'
printf '\n## files in agents/ and nearby configs mentioning Bash or tools\n'
rg -n --hidden --glob 'agents/**/*.md' --glob 'skills/**/*.md' --glob 'commands/**/*.md' --glob 'rules/**/*.md' -e '^tools:' -e 'Bash' -e 'allowlist' -e 'permission' -e 'read-only' -e 'destructive' -e 'prompt-injection' -e 'frontmatter' .Repository: affaan-m/ECC
Length of output: 237
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n## agents/agent-evaluator.md (first 120 lines)\n'
sed -n '1,120p' agents/agent-evaluator.md | cat -n
printf '\n## agent/tool/permission references\n'
rg -n --hidden --glob 'agents/**/*.md' --glob 'skills/**/*.md' --glob 'commands/**/*.md' --glob 'rules/**/*.md' \
-e '^tools:' -e '^model:' -e 'Bash' -e 'allowlist' -e 'permission' -e 'read-only' -e 'destructive' -e 'prompt-injection' -e 'frontmatter' .Repository: affaan-m/ECC
Length of output: 47330
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n## agent harness / hook references for tool enforcement\n'
rg -n --hidden \
-e 'allowedTools' \
-e 'tools:' \
-e 'PreToolUse' \
-e 'Bash Tool Constraints' \
-e 'permission' \
-e 'read-only' \
-e 'hook' \
skills/agents commands rules agents | sed -n '1,220p'
printf '\n## relevant docs: agent-harness-construction and hook integration\n'
for f in skills/agent-harness-construction/SKILL.md skills/agent-self-evaluation/references/hook-integration.md skills/safety-guard/SKILL.md; do
if [ -f "$f" ]; then
echo "--- $f ---"
sed -n '1,220p' "$f" | cat -n
fi
doneRepository: affaan-m/ECC
Length of output: 23727
🏁 Script executed:
#!/bin/bash
set -euo pipefail
for f in rules/common/hooks.md skills/agent-harness-construction/SKILL.md skills/agent-self-evaluation/references/hook-integration.md; do
if [ -f "$f" ]; then
echo "--- $f ---"
sed -n '1,220p' "$f" | cat -n
fi
done
printf '\n## direct references to agent-evaluator / runtime allowlists / hooks.json\n'
rg -n --hidden \
-e 'agent-evaluator' \
-e 'allowedTools' \
-e 'hooks/hooks.json' \
-e 'PreToolUse' \
-e 'PostToolUse' \
-e 'dangerously-skip-permissions' \
-e 'runtime permission' \
-e 'tools are granted' \
rules skills agents commands hooks . | sed -n '1,240p'Repository: affaan-m/ECC
Length of output: 37062
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n## agent-evaluator files in .kiro and repo\n'
find . -path '*/agent-evaluator*' -o -path '*/agent-evaluator.*' | sed -n '1,120p'
printf '\n## agent registries / loaders mentioning agents directory or .kiro/agents\n'
rg -n --hidden \
-e '\.kiro/agents' \
-e 'agents/' \
-e 'allowedTools' \
-e 'agent-evaluator' \
-e 'load.*agent' \
-e 'frontmatter' \
-e 'yaml' \
commands scripts hooks skills . | sed -n '1,220p'Repository: affaan-m/ECC
Length of output: 19331
Remove Bash from this read-only agent, or enforce it in runtime policy — the prompt-only read-only note at agents/agent-evaluator.md doesn’t constrain the granted tool. If shell access is required, scope it through the runtime allowlist/hook layer; otherwise drop Bash from tools.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/agent-evaluator.md` at line 4, Remove Bash from the tools declaration
for the read-only agent in agents/agent-evaluator.md, unless runtime policy
explicitly enforces a restricted shell allowlist; do not rely solely on the
prompt’s read-only note to constrain access.
Source: Path instructions
| name: chief-of-staff | ||
| description: Personal communication chief of staff that triages email, Slack, LINE, and Messenger. Classifies messages into 4 tiers (skip/info_only/meeting_info/action_required), generates draft replies, and enforces post-send follow-through via hooks. Use when managing multi-channel communication workflows. | ||
| tools: ["Read", "Grep", "Glob", "Bash", "Edit", "Write"] | ||
| tools: Read, Grep, Glob, Bash, Edit, Write |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== agent files ==\n'
git ls-files 'agents/*.md' | sed -n '1,120p'
printf '\n== search for frontmatter tools handling ==\n'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' 'tools[:=]|frontmatter|gray-matter|yaml|matter|agent.*tools|comma-separated|string' .
printf '\n== outline likely loaders (if any) ==\n'
fd -t f -a '.*(agent|frontmatter|yaml|md).*' . | sed -n '1,200p'Repository: affaan-m/ECC
Length of output: 50371
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== agent frontmatter samples ==\n'
for f in agents/chief-of-staff.md agents/code-architect.md agents/code-explorer.md agents/code-reviewer.md agents/code-simplifier.md agents/opensource-forker.md agents/opensource-packager.md agents/opensource-sanitizer.md agents/performance-optimizer.md agents/php-reviewer.md agents/planner.md; do
echo "--- $f"
sed -n '1,12p' "$f"
done
printf '\n== files that parse agent markdown/frontmatter ==\n'
rg -n --hidden --glob '!node_modules' --glob '!dist' --glob '!build' --glob '!*test*' --glob '!tests/**' \
'agents/.*\.md|frontmatter|gray-matter|matter|yaml-front|parse.*agent|load.*agent|tools:' .Repository: affaan-m/ECC
Length of output: 50371
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== scripts/lib/agent-compress.js ==\n'
sed -n '1,260p' scripts/lib/agent-compress.js
printf '\n== scripts/dashboard-web.js relevant frontmatter parsing ==\n'
sed -n '1,120p' scripts/dashboard-web.js
printf '\n== scripts/ci/validate-agents.js ==\n'
sed -n '1,140p' scripts/ci/validate-agents.jsRepository: affaan-m/ECC
Length of output: 25236
Keep tools as a YAML array in all listed agent frontmatter blocks. The catalog/dashboard loaders only preserve tools when it parses as an array; scalar values become [], so these agents will render with empty tool lists. Same issue applies to the other listed files.
📍 Affects 11 files
agents/chief-of-staff.md#L4-L4(this comment)agents/code-architect.md#L5-L5agents/code-explorer.md#L5-L5agents/code-reviewer.md#L4-L4agents/code-simplifier.md#L5-L5agents/opensource-forker.md#L4-L4agents/opensource-packager.md#L4-L4agents/opensource-sanitizer.md#L4-L4agents/performance-optimizer.md#L4-L4agents/php-reviewer.md#L4-L4agents/planner.md#L4-L4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/chief-of-staff.md` at line 4, Convert the tools frontmatter value from
a scalar to a YAML array in agents/chief-of-staff.md:4-4,
agents/code-architect.md:5-5, agents/code-explorer.md:5-5,
agents/code-reviewer.md:4-4, agents/code-simplifier.md:5-5,
agents/opensource-forker.md:4-4, agents/opensource-packager.md:4-4,
agents/opensource-sanitizer.md:4-4, agents/performance-optimizer.md:4-4,
agents/php-reviewer.md:4-4, and agents/planner.md:4-4, preserving each agent’s
existing tool entries.
Source: Path instructions
| description: Analyze code comments for accuracy, completeness, maintainability, and comment rot risk. | ||
| model: haiku | ||
| tools: [Read, Grep, Glob] | ||
| tools: Read, Grep, Glob |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Update downstream parsers before switching agent metadata to a scalar tools field. scripts/gemini-adapt-agents.js and scripts/lib/agent-compress.js need to accept both formats, or this change breaks agent discovery/tool availability across the affected files.
📍 Affects 11 files
agents/comment-analyzer.md#L5-L5(this comment)agents/conversation-analyzer.md#L5-L5agents/cpp-build-resolver.md#L4-L4agents/cpp-reviewer.md#L4-L4agents/csharp-reviewer.md#L4-L4agents/pr-test-analyzer.md#L5-L5agents/python-reviewer.md#L4-L4agents/pytorch-build-resolver.md#L4-L4agents/react-build-resolver.md#L4-L4agents/react-reviewer.md#L4-L4agents/refactor-cleaner.md#L4-L4
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/comment-analyzer.md` at line 5, Update scripts/gemini-adapt-agents.js
and scripts/lib/agent-compress.js to accept both scalar and array forms of the
tools metadata before relying on the new scalar format. Apply this compatibility
change for agents/comment-analyzer.md:5, agents/conversation-analyzer.md:5,
agents/cpp-build-resolver.md:4, agents/cpp-reviewer.md:4,
agents/csharp-reviewer.md:4, agents/pr-test-analyzer.md:5,
agents/python-reviewer.md:4, agents/pytorch-build-resolver.md:4,
agents/react-build-resolver.md:4, agents/react-reviewer.md:4, and
agents/refactor-cleaner.md:4; no direct changes are required in those agent
files.
| name: dart-build-resolver | ||
| description: Dart/Flutter build, analysis, and dependency error resolution specialist. Fixes `dart analyze` errors, Flutter compilation failures, pub dependency conflicts, and build_runner issues with minimal, surgical changes. Use when Dart/Flutter builds fail. | ||
| tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"] | ||
| tools: Read, Write, Edit, Bash, Grep, Glob |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Update the dashboard parser to support the new scalar contract.
All these agents now use comma-separated scalar tools values, but scripts/dashboard-web.js:24-51 only recognizes arrays and silently exposes t: []. This creates a cross-layer metadata mismatch: agent definitions retain tools, while the dashboard reports none.
agents/dart-build-resolver.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/database-reviewer.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/django-build-resolver.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/django-reviewer.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/doc-updater.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/rust-build-resolver.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/rust-reviewer.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/security-reviewer.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/seo-specialist.md#L4-L4: parse the scalar tool list in the dashboard loader.agents/silent-failure-hunter.md#L5-L5: parse the scalar tool list in the dashboard loader.agents/spec-miner.md#L5-L5: parse the scalar tool list in the dashboard loader while retaining its existing tool guardrails.
📍 Affects 11 files
agents/dart-build-resolver.md#L4-L4(this comment)agents/database-reviewer.md#L4-L4agents/django-build-resolver.md#L4-L4agents/django-reviewer.md#L4-L4agents/doc-updater.md#L4-L4agents/rust-build-resolver.md#L4-L4agents/rust-reviewer.md#L4-L4agents/security-reviewer.md#L4-L4agents/seo-specialist.md#L4-L4agents/silent-failure-hunter.md#L5-L5agents/spec-miner.md#L5-L5
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/dart-build-resolver.md` at line 4, The dashboard loader/parser in
scripts/dashboard-web.js must parse comma-separated scalar tools values instead
of treating them as empty arrays, while preserving existing array handling and
spec-miner’s tool guardrails. Apply this shared loader fix for
agents/dart-build-resolver.md:4, agents/database-reviewer.md:4,
agents/django-build-resolver.md:4, agents/django-reviewer.md:4,
agents/doc-updater.md:4, agents/rust-build-resolver.md:4,
agents/rust-reviewer.md:4, agents/security-reviewer.md:4,
agents/seo-specialist.md:4, agents/silent-failure-hunter.md:5, and
agents/spec-miner.md:5; these sites require no direct edits.
| name: swift-reviewer | ||
| description: Expert Swift code reviewer specializing in protocol-oriented design, value semantics, ARC memory management, Swift Concurrency, and idiomatic patterns. Use for all Swift code changes. MUST BE USED for Swift projects. | ||
| tools: ["Read", "Grep", "Glob", "Bash"] | ||
| tools: Read, Grep, Glob, Bash |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Maintain compatibility with existing frontmatter consumers.
The new scalar is not converted into an array by scripts/dashboard-web.js or scripts/lib/agent-compress.js; both paths therefore publish an empty tool list. Add support for comma-separated strings before applying this metadata migration.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/swift-reviewer.md` at line 4, Update scripts/dashboard-web.js and
scripts/lib/agent-compress.js to normalize the tool metadata before migration,
converting comma-separated scalar strings into tool arrays. Preserve existing
array handling and ensure both consumers publish the parsed tools instead of an
empty list.
| name: tdd-guide | ||
| description: Test-Driven Development specialist enforcing write-tests-first methodology. Use PROACTIVELY when writing new features, fixing bugs, or refactoring code. Ensures 80%+ test coverage. | ||
| tools: ["Read", "Write", "Edit", "Bash", "Grep"] | ||
| tools: Read, Write, Edit, Bash, Grep |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Update the parsing contract alongside this migration.
The repository test expects fm.tools to be an array, while the current loaders return [] for this new scalar. Add dual-format normalization and coverage for comma-separated tools before converting the agent files.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/tdd-guide.md` at line 4, Update the frontmatter parsing loaders to
normalize the scalar tools value into an array while preserving existing array
values, including splitting comma-separated tools; add coverage for both formats
before converting the agent files. Use the existing loader and parsing-test
symbols to implement and verify the dual-format fm.tools contract.
| description: Analyze type design for encapsulation, invariant expression, usefulness, and enforcement. | ||
| model: sonnet | ||
| tools: [Read, Grep, Glob] | ||
| tools: Read, Grep, Glob |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Avoid dropping tools during metadata loading.
Although the YAML remains valid, the supplied loaders map non-array tools values to []. This removes Read, Grep, and Glob from internal agent metadata; normalize scalar values in the shared loaders first.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/type-design-analyzer.md` at line 5, Update the shared metadata loaders
used by the agent configuration parsing to normalize scalar tools values into a
one-item collection instead of mapping non-array values to an empty array.
Preserve array values unchanged so the tools declared in
agents/type-design-analyzer.md, including Read, Grep, and Glob, remain available
after loading.
| name: typescript-reviewer | ||
| description: Expert TypeScript/JavaScript code reviewer specializing in type safety, async correctness, Node/web security, and idiomatic patterns. Use for all TypeScript and JavaScript code changes. MUST BE USED for TypeScript/JavaScript projects. | ||
| tools: ["Read", "Grep", "Glob", "Bash"] | ||
| tools: Read, Grep, Glob, Bash |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Make repository consumers accept the new scalar representation.
loadAgents and loadAgent currently emit an empty array for string-valued tools. Without a parser update, this agent will be discoverable with no Read, Grep, Glob, or Bash tools.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/typescript-reviewer.md` at line 4, Update the parser logic in
loadAgents and loadAgent to convert string-valued tools into the corresponding
scalar tool representation instead of emitting an empty array. Preserve existing
handling for array-valued tools, ensuring repository consumers discover Read,
Grep, Glob, and Bash when provided as a scalar string.
| name: vue-reviewer | ||
| description: Expert Vue.js code reviewer specializing in Composition API correctness, reactivity pitfalls, component architecture, template security, and Vue-specific performance. Use for any change touching .vue, .ts/.js files with Vue imports, or Vue ecosystem code (Pinia, Vue Router, Nuxt). MUST BE USED for Vue projects. | ||
| tools: ["Read", "Grep", "Glob", "Bash"] | ||
| tools: Read, Grep, Glob, Bash |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
Update shared frontmatter parsing before this conversion.
The current consumers preserve only arrays, so this valid YAML scalar becomes [] in dashboard and compression metadata. Add comma-separated string normalization and regression coverage before merging the agent-file changes.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@agents/vue-reviewer.md` at line 4, Update the shared frontmatter parsing used
by the dashboard and compression metadata consumers before applying the
agent-file changes. Normalize comma-separated string values into arrays while
preserving existing array handling, and add regression coverage confirming valid
YAML scalar metadata is parsed rather than converted to an empty array.
daltino
left a comment
There was a problem hiding this comment.
The PR makes a uniform and straightforward improvement by converting the tools frontmatter from arrays to comma-separated strings across multiple agent files. This change improves consistency and aligns with YAML best practices. The diff is minimal, clear, and adheres to the repo's contribution guidelines. Nice work!
Problem
All 60+ agents in
agents/are silently rejected by Claude Code's agent loader.Agent(subagent_type=ecc:architect)fails with:Root cause:
toolsin the agent frontmatter is a YAML array but Claude Code expects a comma-separated string.Fix
Converted
toolsfrontmatter from array format to comma-separated string format across all 67 agent files:Verification
tools:declarationstools:line)Closes #2526