Skip to content

Conversation

@ian-pascoe
Copy link
Contributor

Summary

  • Enhanced agent descriptions with explicit "Use when:" guidance to help orchestrator make better delegation decisions
  • Dynamic agent list expansion in prompts via {{agents:list}} and {{agents:table}} placeholders, so agents always see the current swarm configuration
  • Refactored designer agent to implement UI/UX code with Chrome DevTools verification
  • Refactored architect agent to serve as expert consultant for debugging blockers and designing solutions
  • Streamlined prompts by extracting shared protocols into reusable templates (-796 net lines)
  • Removed tester agent (consolidated into executor/reviewer workflows)

Changes

Area Description
Agent Descriptions All 11 agents now have detailed descriptions with delegation triggers
Dynamic Expansion expandAgentsList() and expandAgentsTable() utilities for prompt templates
Designer Agent Now implements CSS/styling with chrome-devtools for visual verification
Architect Agent Now serves as expert consultant (consult/design modes)
Protocol Templates Simplified context-handling, error-handling, escalation, plan-versioning
File Naming Refactored hooks.tshook.ts convention

Testing

  • bun run typecheck
  • bun run lint
  • bun run build

Changed from spec-only consultant to full implementation agent:
- Mode: subagent → all (core implementation agent)
- Permissions: edit and bash now allowed (with ask)
- Chrome DevTools: enabled for visual inspection and verification

Workflow: inspect → understand patterns → implement → verify visually

Maintains bold aesthetic philosophy (no generic AI look) but now
writes actual CSS, component styling, layouts, and motion code
instead of specifications.
Expanded role to help other agents when stuck on problems:

Consultation Mode (new):
- Analyzes bug reports and error messages
- Suggests debugging strategies with specific steps
- Provides root cause analysis with confidence levels
- Guides without implementing (advisory only)
- Examples: executor stuck on bug, tester can't diagnose failure

Design Mode (existing):
- Solution design with options and recommendations
- Architecture guidance for new features
- Trade-off analysis

Temperature increased 0.3 → 0.5 for creative problem-solving.
Updated orchestrator to route stuck agents to architect.
Added {{agents}}, {{agents:table}}, and {{agents:list}} template variables
that expand to formatted lists of available agents.

Features:
- Filters out disabled agents (AgentConfig.disabled === true)
- Only includes agents with descriptions
- Truncates descriptions to 80 chars with ellipsis
- Sorted alphabetically by agent ID
- Backwards compatible (ctx parameter optional)

Formats:
- {{agents}} or {{agents:table}} → Markdown table
- {{agents:list}} → Bullet list with bold agent names

Updated all 11 agent index.ts files to pass context to expandVariables.
Orchestrator prompt now uses {{agents:table}} instead of hardcoded list.
Fixed ordering issue where agents only saw agents set up before them.

Solution: Two-phase setup
1. Phase 1: All agents set up with raw prompts (no expansion)
2. Phase 2: expandAgentPrompts() expands all prompts after registration

This ensures {{agents}} references see the complete agent list regardless
of setup order.
Descriptions now focus on ONE JOB + modes/levels:
- Removed delegation information from all descriptions
- Added constraints where applicable (READ-ONLY, ADVISORY-ONLY, IDEATION-ONLY)
- Kept concise (1-2 sentences max)

Added {{agents:table}} to all agent prompts:
- Every agent now knows the full swarm
- Can delegate to any agent via Task tool
- Placed after role description in each prompt

This enables true swarm collaboration - any agent can delegate
to any other agent based on the dynamically expanded agents table.
- Enhanced all agent descriptions with 'Use when:' guidance for better delegation
- Added missing description to compaction agent
- Streamlined prompts by extracting shared protocols into reusable templates
- Removed tester agent (consolidated into executor/reviewer workflows)
- Refactored hook files: hooks.ts → hook.ts naming convention
- Consolidated task tools with proper types
- Simplified protocol templates (context-handling, error-handling, escalation, plan-versioning)
@ian-pascoe ian-pascoe merged commit dba95be into main Jan 21, 2026
2 checks passed
@ian-pascoe ian-pascoe deleted the feat/designer branch January 21, 2026 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants