Skip to content

Commit 9bf98ab

Browse files
fix(agents): 1.6 — agent frontmatter alignment (name, model, color, description) (#56)
* fix(plugin-dev): validate-agent.sh — arithmetic, SIGPIPE, and shellcheck fixes Bug 1 — arithmetic (((n++)) with set -e): Replace all 18 ((n++)) with n=$((n+1)) to prevent premature script exit. ((n++)) returns exit code 1 when n=0 (post-increment evaluates to 0 = false); set -e treats this as failure and aborts the script before counting is complete. Pattern already applied in validate-hook-schema.sh; now consistent. Bug 2 — SIGPIPE in tail | grep -q: Replace `tail -n +2 | grep -q '^---$'` with `grep -c` check. grep -q exits immediately on first match while tail is still writing; with set -o pipefail, tail's SIGPIPE exit (141) propagates as pipeline failure. The `if !` inversion converts this to a false positive "Frontmatter not closed" for any agent where the closing --- appears before tail finishes. grep -c reads all input before exiting, eliminating the race condition. Affects locally: all plugin-dev agents (177-185 lines) and most other agents (≥108 lines on WSL). CI (Ubuntu) was unaffected due to different pipe buffer behaviour. Shellcheck SC2086 — unquoted integer variables: Quote $name_length, $desc_length, $prompt_length in numeric comparisons. Pre-existing issues, fixed while script is open. ux-reviewer.md — CRLF line endings: Discovered during investigation: ux-reviewer.md had Windows (CRLF) line endings causing Check 2 to fail ("File must start with YAML frontmatter") since head -1 returned '---\r' instead of '---'. Fixed with sed -i 's/\r//'. plugin-validation.yml — update stale CI comment: Remove reference to the now-fixed arithmetic bug; keep || true as defensive programming (tolerates future script regressions). Note: 4 non-plugin-dev agents (pm-assistant, productivity-assistant, automation-validator, strategic-analyst) use a different frontmatter format (no name/model/color fields) and exit silently on validation — pre-existing behaviour unchanged. Tracked separately for a future frontmatter alignment fix. Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> * fix(agents): 1.6 — add missing frontmatter and fix descriptions in 4 agents Four agents were missing `name:`, `model:`, `color:` fields required by validate-agent.sh, causing the script to silently exit under `set -e` when grep returned exit 1 on the missing `name:` field. Descriptions also used multiline YAML `>` blocks which the validator's single-line grep could only capture as `>` (1 character), triggering false description-too-short warnings and masking the missing <example> blocks. Changes per agent: - pm-assistant (product-management): add name/model:sonnet/color:blue, convert description to inline with trigger phrases + 2 <example> blocks - productivity-assistant (productivity): add name/model:sonnet/color:green, convert description to inline with trigger phrases + 2 <example> blocks - automation-validator (repo-structure): add name/model:sonnet/color:yellow, convert description to inline with trigger phrases + 2 <example> blocks - strategic-analyst (strategy-toolkit): add name/model:sonnet/color:cyan, convert description to inline with trigger phrases + 2 <example> blocks Also fixes validate-agent.sh TOOLS grep: `grep '^tools:'` with `set -e` caused silent exit for agents without a `tools:` field (optional field). Added `|| true` guard — same safe pattern used for required-field greps. All 4 agents now complete full validation with ✅ All checks passed or ⚠️ warnings-only (no ❌ errors). CI `grep -q '❌'` check unaffected. Generated by Nuno Salvação Co-Authored-By: Nexo <nexo.modeling@gmail.com> --------- Co-authored-by: Nexo <nexo.modeling@gmail.com>
1 parent 032b417 commit 9bf98ab

5 files changed

Lines changed: 17 additions & 30 deletions

File tree

plugins/plugin-dev/skills/agent-development/scripts/validate-agent.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ else
163163
fi
164164

165165
# Check tools field (optional)
166-
TOOLS=$(echo "$FRONTMATTER" | grep '^tools:' | sed 's/tools: *//')
166+
TOOLS=$(echo "$FRONTMATTER" | grep '^tools:' | sed 's/tools: *//' || true)
167167

168168
if [ -n "$TOOLS" ]; then
169169
echo "✅ tools: $TOOLS"

plugins/product-management/agents/pm-assistant.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
---
2-
description: >
3-
Product management assistant for PM decision support and workflow routing.
4-
Use when the user asks for "PM help", "what should I work on", "help me prioritize",
5-
"draft a spec", "analyze competitors", "write a stakeholder update", "review the
6-
roadmap", "synthesize this feedback", or any product management task that spans
7-
multiple PM disciplines. Reads existing project context before responding — never
8-
makes assumptions about the product, roadmap, or stakeholders without first
9-
checking available documentation.
2+
name: pm-assistant
3+
description: Use this agent when the user asks for "PM help", "what should I work on", "help me prioritize", "draft a spec", "analyze competitors", "write a stakeholder update", "review the roadmap", "synthesize this feedback", or any product management task spanning multiple PM disciplines. Reads existing project context before responding. <example>user: "Help me prioritize these features for the next sprint" assistant: "I'll use the pm-assistant agent to apply PM prioritization frameworks."</example> <example>user: "Write a stakeholder update for this week's progress" assistant: "I'll use the pm-assistant agent to draft a structured update."</example>
104
capabilities:
115
- Routes between PM workflows: spec writing, roadmap, research synthesis, metrics, competitive analysis, stakeholder comms
126
- Reads existing docs (README, roadmap files, specs) before producing PM outputs
137
- Applies structured PM frameworks (RICE, MoSCoW, Jobs-to-be-Done, OKRs)
148
- Helps prioritize feature requests against strategic goals
159
- Surfaces metrics gaps and measurement blind spots
1610
- Produces stakeholder-appropriate communications (exec summary vs eng detail)
11+
model: sonnet
12+
color: blue
1713
---
1814

1915
# PM Assistant

plugins/productivity/agents/productivity-assistant.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
---
2-
description: >
3-
Productivity assistant that routes between task management and memory management
4-
based on conversational context. Use when the user asks about "my tasks", "what's
5-
on my plate", "remind me to", "who is X", "what does Y mean", "help me stay on
6-
track", "end of day review", "what did I work on today", or needs help maintaining
7-
focus and clarity across a work session.
8-
Reads TASKS.md and memory files before responding — never makes assumptions
9-
about the user's current workload or terminology without checking.
2+
name: productivity-assistant
3+
description: Use this agent when the user asks about "my tasks", "what's on my plate", "remind me to", "who is X", "what does Y mean", "help me stay on track", "end of day review", or "what did I work on today". Routes between task management and memory management. Reads TASKS.md and memory files before responding. <example>user: "What tasks do I still have for today?" assistant: "I'll use the productivity-assistant agent to check your task list."</example> <example>user: "Who is the lead dev on the API project?" assistant: "I'll use the productivity-assistant agent to look up that context from memory."</example>
104
capabilities:
115
- Reads TASKS.md and surfaces active commitments and blockers
126
- Understands workplace acronyms, nicknames, and terminology from memory
137
- Extracts action items from meeting notes or conversation summaries
148
- Tracks what was worked on during a session and updates accordingly
159
- Flags overdue or stalled tasks proactively
1610
- Bridges task-management and memory-management skills seamlessly
11+
model: sonnet
12+
color: green
1713
---
1814

1915
# Productivity Assistant

plugins/repo-structure/agents/automation-validator.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
---
2-
description: >
3-
Validates health of all automation files in a repository — GitHub Actions workflows,
4-
pre-commit hooks, Claude Code hooks, Makefile/package.json scripts, and GitHub Actions
5-
matrix coherence. Use when: "validate automation", "check my hooks", "automation health
6-
check", /repo-validate --automation. Produces structured report with OK/WARN/FAIL per
7-
category plus actionable fix list.
2+
name: automation-validator
3+
description: Use this agent when the user asks to "validate automation", "check my hooks", "automation health check", or runs /repo-validate --automation. Validates GitHub Actions workflows, pre-commit hooks, Claude Code hooks, Makefile/package.json scripts, and GitHub Actions matrix coherence. Produces structured report with OK/WARN/FAIL per category plus actionable fix list. <example>user: "Validate my GitHub Actions and hook setup" assistant: "I'll use the automation-validator agent for a comprehensive health check."</example> <example>user: "Check if my Claude Code hooks are correctly configured" assistant: "I'll use the automation-validator agent to audit the automation files."</example>
84
capabilities:
95
- Validate GitHub Actions workflow files (YAML syntax, events, runners, permissions)
106
- Validate .pre-commit-config.yaml (hook existence, stale versions, executable)
117
- Validate Claude Code hooks (scripts exist, executable, syntax OK)
128
- Validate task runners (Makefile, package.json scripts, pyproject.toml taskipy)
139
- Check GitHub Actions matrix coherence across workflow files
10+
model: sonnet
11+
color: yellow
1412
---
1513

1614
# Automation Validator Agent

plugins/strategy-toolkit/agents/strategic-analyst.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
---
2-
description: >
3-
Strategic analyst agent for deep project analysis and strategic recommendations.
4-
Use when the user asks to "analyze this project strategically", "help me think about
5-
expansion", "do a strategic deep-dive", "evaluate my product positioning",
6-
"prepare me for a launch decision", or needs a systematic strategic perspective
7-
that goes beyond quick brainstorming. This agent reads the full project context
8-
before producing analysis — never makes claims without reading available files.
2+
name: strategic-analyst
3+
description: Use this agent when the user asks to "analyze this project strategically", "help me think about expansion", "do a strategic deep-dive", "evaluate my product positioning", or "prepare me for a launch decision". Reads full project context before producing analysis — never makes claims without reading available files. <example>user: "Do a strategic deep-dive on my CLI tool project" assistant: "I'll use the strategic-analyst agent for a comprehensive strategic analysis."</example> <example>user: "Help me think about whether to pivot this project" assistant: "I'll use the strategic-analyst agent to evaluate the strategic options."</example>
94
capabilities:
105
- Reads and synthesizes full project context (README, docs, CLAUDE.md, code structure)
116
- Applies 12 strategic frameworks from the toolkit reference
127
- Produces asset-first analysis (identifies the real asset, not just the code)
138
- Generates second-order thinking (what happens after success?)
149
- Delivers honest assessments including failure modes and uncomfortable truths
1510
- Connects every insight to a concrete, actionable next step
11+
model: sonnet
12+
color: cyan
1613
---
1714

1815
# Strategic Analyst

0 commit comments

Comments
 (0)