agentleFS
wittyreferencewittyreference/twilio-claude-plugin/skills/workflows/SKILL.md

workflows

Skill2 starsChanged 8 months agoMITView on GitHub

Twilio development skill: workflows

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Update documentation without code changes:

    line 82
  2. Distinctive:

    All subagents work independently.

    line 182
  3. Very specific:

    Start with /architect and follow the phase sequence for your workflow type (see above).

    line 186
  4. Distinctive:

    Run individual subagents when:

    line 213
  5. Very specific:

    Run /review: before merging any significant changes

    line 311
  6. Very specific:

    Use /twilio-logs: when debugging production issues

    line 313

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Development Workflows

This document describes the available workflow patterns for developing Twilio features using Claude Code subagents and agent teams.

Available Subagents

CommandRoleDescription
/architectArchitectDesign review, pattern selection, unknowns identification — pipeline entry point
/prototypePrototyperQuick spike to test unknowns — no tests, produces learnings
/specSpecification WriterCreates detailed technical specifications
/test-genTest GeneratorTDD Red Phase - writes failing tests first
/devDeveloperTDD Green Phase - implements to pass tests
/reviewSenior DeveloperCode review, security audit, approval authority
/testTest RunnerExecutes and validates test suites
/docsTechnical WriterDocumentation updates and maintenance
/deployDeployment HelperPre/post deployment checks
/twilio-docsDocumentation LookupSearches Twilio documentation
/twilio-logsLog AnalyzerFetches and analyzes Twilio debugger logs

Workflow Patterns

New Feature Pipeline

Full development pipeline for building new Twilio functionality:

/architect ──► /prototype (if unknowns) ──► /spec ──► /test-gen ──► /dev ──► /review ──► /test ──► /docs

Execution:

  1. /architect [feature] - Get architecture review, identify unknowns
  2. /prototype [unknowns] - Quick spike to test unfamiliar APIs (skip if no unknowns)
  3. /spec [feature] - Create detailed technical specification
  4. /test-gen [feature] - Generate failing tests (TDD Red)
  5. /dev [feature] - Implement to pass tests (TDD Green)
  6. /review - Code review and security audit
  7. /test - Run full test suite
  8. /docs - Update documentation

Bug Fix Pipeline

Quick fix pipeline for resolving issues:

/twilio-logs ──► /architect ──► /test-gen ──► /dev ──► /review ──► /test

Execution:

  1. /twilio-logs - Analyze debugger logs to identify the issue
  2. /architect [diagnosis] - Determine fix approach
  3. /test-gen [regression] - Write regression tests
  4. /dev [fix] - Implement the fix
  5. /review - Validate the fix
  6. /test - Verify all tests pass

Refactor Pipeline

Improve code structure without changing behavior:

/test ──► /architect ──► /dev ──► /review ──► /test

Execution:

  1. /test - Verify existing tests pass (baseline)
  2. /architect [refactor plan] - Design the refactoring approach
  3. /dev [refactor] - Implement changes
  4. /review - Validate changes
  5. /test - Confirm behavior unchanged

Documentation Only

Update documentation without code changes:

/docs

Execution:

  1. /docs [scope] - Update specified documentation

Security Audit

Review code for security issues:

/review ──► /dev ──► /test

Execution:

  1. /review security [scope] - Security-focused code review
  2. /dev [fixes] - Implement security fixes (if needed)
  3. /test - Validate fixes

Agent Team Workflows

For tasks that benefit from parallel work or inter-agent discussion, use /team. Agent teams spawn multiple Claude Code instances that communicate via messaging and a shared task list.

When to Use Teams vs Subagents

CriteriaUse Sequential PhasesUse Teams (/team)
Task structureSequential, clear phasesParallel or adversarial
CommunicationResults flow one directionAgents discuss findings
Context needsShared context is fineEach agent needs fresh context
Token budgetTightFlexible (2-3x more)
Best forRoutine featuresBug debugging, code review, complex features

Team: New Feature (Parallel Review)

Phase 1 (Sequential): architect → spec → test-gen → dev
Phase 2 (Parallel):   qa ──┬── review
Phase 3 (Sequential): docs

Run with: /team new-feature [description]

QA and review teammates work in parallel after implementation, each with a fresh context window. Both must pass quality gates before docs teammate starts.

Team: Bug Fix (Competing Hypotheses)

Phase 1 (Parallel): investigator-1 ──┬── investigator-2 ──┬── investigator-3
                    (code path)       │   (logs/debugger)  │   (config/env)
Phase 2: Lead synthesizes strongest hypothesis
Phase 3 (Sequential): test-gen → dev → review

Run with: /team bug-fix [issue]

Three investigators work in parallel, messaging each other to challenge hypotheses. Lead picks the strongest root cause analysis.

Team: Code Review (Multi-Lens)

Phase 1 (Parallel): security ──┬── performance ──┬── testing
Phase 2: Cross-challenge (each reads others' findings)
Phase 3: Lead compiles unified review

Run with: /team code-review [scope]

Three reviewers with different focus areas. After initial review, each reads others' findings and adds counter-points or agreement.

Team: Refactor (Parallel Analysis)

Phase 1 (Parallel): baseline-qa ──┬── architect
Phase 2 (Sequential): dev (tests must stay green)
Phase 3 (Parallel): verify-qa ──┬── reviewer

Run with: /team refactor [target]

Baseline QA and architect work in parallel to establish metrics and plan. After implementation, verification and review run in parallel.

Team: Validation (Parallel Domain Coverage)

Phase 1 (Parallel): call-validator ──┬── recording-validator ──┬── taskrouter-validator ──┬── debugger-validator
Phase 2 (Sequential): Lead aggregates results into unified validation report

Run with: /team validation [scope]

Four validators run simultaneously, each focused on one domain (voice/calls, recordings, TaskRouter tasks, debugger sweep). Lead synthesizes findings into a unified pass/fail report. Use after deployments or workflow completions to verify multiple products in parallel.

Sequential vs Team-Based

All subagents work independently. Choose the approach that fits your workflow:

Sequential Mode

Start with /architect and follow the phase sequence for your workflow type (see above). Claude Code handles sequencing, context handoff, and state tracking natively.

Example:

/architect voice IVR menu with speech recognition
# Claude guides you through spec → test-gen → dev → review → docs

Team-Based Mode

Use /team when:

  • Agents need to discuss or challenge each other's findings
  • Parallel work would save time (e.g., qa + review simultaneously)
  • Task benefits from competing hypotheses (bug debugging)
  • Each agent needs a fresh context window (prevents bloat)

Example:

/team bug-fix "webhook returning 500 for empty body"
/team code-review 

Standalone Mode

Run individual subagents when:

  • Working on a specific phase only
  • Need more control over the process
  • Task doesn't fit standard patterns
  • Iterating on a particular aspect

Example:

/spec voice IVR menu
# Review output, make adjustments
/test-gen voice IVR menu
# Review tests, refine
/dev voice IVR menu

TDD Enforcement

This project strictly follows Test-Driven Development:

  1. Red Phase (/test-gen): Write failing tests first
  2. Green Phase (/dev): Write minimal code to pass tests
  3. Refactor: Improve code while keeping tests green

The /dev subagent will verify that failing tests exist before implementing. If no tests exist, it will suggest running /test-gen first.

Handoff Protocol

Each subagent suggests the next logical step:

AfterSuggests
/architect/prototype (if unknowns) or /spec (if no unknowns)
/prototype/spec for detailed specification
/spec/test-gen for test generation
/test-gen/dev for implementation
/dev/review for code review
/review (APPROVED)/test for final validation
/review (NEEDS_CHANGES)/dev for fixes
/test/docs for documentation
/deploy/team validation for post-deploy verification

Examples

Example 1: Add Voice IVR

/architect voice IVR with department routing
/spec voice IVR with Gather verb for digit input
/test-gen voice IVR handler
/dev voice IVR handler
/review
/test
/docs

Example 2: Fix SMS Webhook Bug

/twilio-logs
/test-gen regression test for empty SMS body
/dev fix empty body handling in messaging webhook
/review
/test

Example 3: Add Verification Feature

# Start with architecture review
/architect phone verification using Twilio Verify

# Get detailed spec
/spec phone verification with SMS channel

# Generate tests for the feature
/test-gen verify send-code function

# Implement to pass tests
/dev verify send-code function

# Code review
/review

# Run all tests
/test

# Update docs
/docs

Best Practices

  1. Always start with /architect for new features to ensure proper design
  2. Prototype unknowns first — if the architect identifies unfamiliar APIs or ambiguous behavior, spike them before writing a spec
  3. Use /spec to clarify requirements before writing code
  4. Never skip /test-gen - tests must exist before implementation
  5. Run /review before merging any significant changes
  6. Keep /docs updated as features evolve
  7. Use /twilio-logs when debugging production issues
  8. Use /team for bug debugging (competing hypotheses find root causes faster)
  9. Use /team for code review (multi-lens parallel review catches more issues)
  10. Avoid teams for simple sequential tasks (overhead exceeds benefit)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.