Skip to content

Production-validated SAFe multi-agent development methodology with Claude Code. Treat AI agents as specialized team members (11 roles: BSA, Architect, QAS, etc). Complete whitepaper + working template.

License

Notifications You must be signed in to change notification settings

bybren-llc/wtfb-safe-agentic-workflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

SAFe Multi-Agent Development Methodology

Evidence-Based Multi-Agent Development: A SAFe Framework Implementation with Claude Code

License Version Production Validated

πŸ€– LLM Context: Get the entire repository as LLM-ready context β†’ GitIngest

Perfect for loading this methodology into Claude, ChatGPT, or any LLM to understand the complete SAFe multi-agent workflow.


🎯 What This Is

A comprehensive methodology for software development using multi-agent orchestration with Claude Code's Task tool. Based on 5 months of production experience (169 issues, 9 cycles, 2,193 commits) implementing the Scaled Agile Framework (SAFe) with AI agents.

Key Innovation: Treating AI agents like specialized team members (11 roles: BSA, System Architect, Data Engineer, Backend Dev, Frontend Dev, QAS, RTE, DevOps, Security, Technical Writer, TDM) instead of "better autocomplete."


✨ What Makes This Methodology Unique

This isn't just "AI-assisted development" - it's a fundamentally different approach to human-AI collaboration:

🎯 Round Table Philosophy

Equal Voice for All Contributors - Human and AI input have equal weight in technical discussions. No hierarchy, just expertise.

  • βœ… Mutual Respect: All perspectives valued, regardless of source
  • βœ… Shared Responsibility: Everyone owns project success
  • βœ… Transparent Decision-Making: Decisions made openly with input from all
  • βœ… Constructive Disagreement: Disagreement welcomed when it leads to better solutions

Why This Matters: Traditional AI tools are "assistants" - this methodology treats AI as collaborative team members with agency and expertise.

πŸ›‘ Stop-the-Line Authority

AI Agents Can Halt Work - Any agent can exercise "stop-the-line" authority for architectural or security concerns.

  • 🚨 Architectural Integrity: Flag issues that compromise system design
  • πŸ” Security Concerns: Highlight potential vulnerabilities
  • πŸ“ˆ Performance Implications: Note potential bottlenecks
  • πŸ”§ Maintainability Issues: Identify future maintenance problems

When Exercised:

  1. Agent clearly explains the concern with specific examples
  2. Proposes alternative approaches
  3. Documents decision in an ADR (Architecture Decision Record)
  4. Updates Linear ticket with architectural discussion

Real Example: System Architect blocked a 710-line deployment script (WOR-321) due to complexity concerns, leading to a complete redesign with proper error handling and rollback capabilities.

οΏ½ 3. Claude Code Task Tool - The Breakthrough

True Multi-Agent Delegation - Claude Code's Task tool enables one agent to delegate work to another while preserving context, maintaining quality gates, and enabling parallel development.

The Innovation:

// Agent A delegates to Agent B with full context transfer
Task({
  targetAgent: "data-engineer",
  taskDescription: "Design migration validation pipeline",
  context: {
    linearTicket: "WOR-321",
    dependencies: ["existing migration scripts", "RLS patterns"],
    acceptance: ["migration safety verified", "SQL validation queries created"]
  },
  expectedArtifacts: ["validation scripts", "safety documentation"]
})

What This Enables:

  • πŸ”„ Context Transfer: Full project context, ticket requirements, and dependencies passed between agents
  • 🎭 Role Specialization: Each agent operates within its specialized expertise and tool access
  • ⚑ Independent Execution: Agents work autonomously without blocking each other
  • πŸ“Š Quality Gates: Multiple specialized checkpoints catch different issue types
  • πŸ“ Evidence Trail: Complete audit trail with artifacts at each stage

Real Example (WOR-321):

BSA β†’ Planning Spec (45 min)
  β”œβ†’ Data Engineer β†’ Schema Design (1.5 hrs)
  β”œβ†’ Backend Dev β†’ CI/CD Implementation (2 hrs)
  β””β†’ QAS β†’ Test Validation (1 hr)
     β””β†’ RTE β†’ Production Delivery (30 min)

Why This Matters: Traditional AI tools are single-threaded (Developer β†’ AI β†’ Code β†’ Review). This enables parallel, specialized workflows with multiple quality gates - like having a real team, not just an assistant.

The Secret: Treating AI agents like specialized team members with clear roles, handoff protocols, and quality checkpoints - not like "better autocomplete."

πŸ” 4. Pattern Discovery Protocol

"Search First, Reuse Always, Create Only When Necessary" - MANDATORY before any implementation.

4-Step Discovery Process:

  1. Search Specs Directory: Find similar implementations in past specs
  2. Search Codebase: Look for existing patterns and helpers
  3. Search Pattern Library: Check patterns_library/ for reusable patterns
  4. Propose to System Architect: Get approval before creating new patterns

Why This Works: Prevents reinventing the wheel, ensures consistency, and builds institutional knowledge over time.

🏷️ 5. Metacognitive Tags System

Explicit Knowledge Transfer - Three tags for passing context from planning to execution:

  • #PATH_DECISION - Documents why a particular approach was chosen over alternatives
  • #PLAN_UNCERTAINTY - Flags assumptions that require validation during implementation
  • #EXPORT_CRITICAL - Highlights non-negotiable requirements (security, compliance, architecture)

Example:

#PATH_DECISION: Chose REST over GraphQL due to existing API patterns
#PLAN_UNCERTAINTY: Assumed field is optional - verify with POPM
#EXPORT_CRITICAL: MUST use withAdminContext for all operations

Impact: Execution agents understand not just what to build, but why decisions were made and what cannot be compromised.

πŸ“‹ 6. Specs-Driven Workflow

Single Source of Truth - Every feature starts with a comprehensive spec following SAFe hierarchy:

Epic (Strategic Initiative)
  └── Feature (Deliverable Capability)
      β”œβ”€β”€ User Story (User-Facing Functionality)
      └── Enabler (Technical Foundation)

Workflow:

  1. BSA creates spec with acceptance criteria and testing strategy
  2. System Architect validates architectural approach
  3. Implementation agents execute with pattern discovery
  4. QAS validates against acceptance criteria
  5. Evidence attached to Linear ticket before POPM review

Key Insight: Separation of planning (BSA) from execution (developers) ensures thorough upfront thinking and consistent implementation.

🎭 7. Specialized Agent Roles with Tool Restrictions

Each Agent Has Specific Capabilities - Not all agents can do everything:

  • Planning Agents (Opus model): BSA, System Architect - Slower but thorough
  • Execution Agents (Sonnet model): Developers, Engineers - Faster implementation
  • Tool Restrictions: Each agent only has access to tools needed for their role

Example: QAS (Quality Assurance) can only Read, Bash, and Grep - cannot Write or Edit code. This enforces role boundaries and prevents scope creep.

πŸ“Š 8. Evidence-Based Delivery

All Work Requires Verifiable Evidence - No "trust me, it works":

  • βœ… Test Results: All tests must pass before PR
  • βœ… Screenshots: Visual proof of UI changes
  • βœ… Validation Output: Command output showing success
  • βœ… Session IDs: Complete audit trail of agent work

Swimlane Workflow: Backlog β†’ Ready β†’ In Progress β†’ Testing β†’ Ready for Review β†’ Done

POPM Approval: Product Owner/Product Manager has final approval on all deliverables with full evidence trail.

πŸ”„ 9. Simon Willison's Agent Loop

Iterative Problem Solving - Agents follow a clear loop until success or blocked:

  1. Clear Goal - BSA defines with acceptance criteria
  2. Pattern Discovery - Search codebase and sessions
  3. Iterative Problem Solving:
    • Implement approach
    • Run validation command
    • If fails β†’ analyze error, adjust, repeat
    • If blocked β†’ escalate to TDM with context
  4. Evidence Attachment - Session ID + validation results in Linear

No Over-Engineering: No file locks, circuit breakers, or arbitrary retry limits. Agents iterate until success or blocked, then escalate with context.


πŸ“Š Real Production Results

Metric Value Source
Sprint Cycles 9 cycles (5 months) Linear
Issues Completed 169 issues Linear API
Velocity Growth 14Γ— improvement Cycle 3 (3) β†’ Cycle 8 (42)
Commits 2,193 commits (10.3/day) GitHub API
PR Merge Rate 90.9% (159/175) GitHub
Documentation 136 docs, 36 specs, 208 Confluence pages Repository

All metrics are fully verifiable. See whitepaper/data/ for validation.


πŸ“– Quick Start

For Practitioners

  1. Read: Executive Summary (5 min)
  2. Understand: Case Studies (15 min)
  3. Implement: Implementation Guide (30 min)
  4. Assess: Limitations (10 min)

For Researchers

  1. Data Validation: Real Production Data Synthesis
  2. Methodology: Background & Related Work
  3. Meta-Circular Validation: Validation Evidence
  4. Future Research: Open Questions

For Leaders

  1. ROI Analysis: Executive Summary
  2. Risk Assessment: Limitations
  3. Adoption Guide: Implementation Prerequisites
  4. Cost-Benefit: Cost Analysis

πŸš€ Quick Start for Agents

Want to use the 11-agent system in your project? Here's how to get started in 3 steps:

Step 1: Install Claude Code or Augment Code

Step 2: Install the Agents

# Clone this repository
git clone https://github.com/ByBren-LLC/WTFB-SAFe-Agentic-Workflow
cd WTFB-SAFe-Agentic-Workflow

# Install agents (choose one)
./scripts/install-prompts.sh          # For Claude Code (user install)
./scripts/install-prompts.sh --team   # For team sharing (in-project)
./scripts/install-prompts.sh --augment # For Augment Code

Step 3: Invoke Your First Agent

@bsa Create a spec for a simple "Hello World" API endpoint

That's it! The BSA agent will create a user story with acceptance criteria and testing strategy.

Next Steps:


πŸ—οΈ Repository Structure

WTFB-SAFe-Agentic-Workflow/
β”œβ”€β”€ whitepaper/              # Complete whitepaper (12 sections, ~270KB)
β”‚   β”œβ”€β”€ data/                # Supporting data and metrics (6 files)
β”‚   └── validation/          # Meta-circular validation evidence (19 files)
β”œβ”€β”€ specs/                   # Implementation specifications
β”œβ”€β”€ examples/                # Coming in v1.1
β”œβ”€β”€ patterns/                # Whitepaper patterns (see also patterns_library/)
β”œβ”€β”€ templates/               # Coming in v1.1
β”œβ”€β”€ patterns_library/        # Existing production patterns (11 patterns)
β”œβ”€β”€ agent_providers/         # Claude Code & Augment configurations
β”œβ”€β”€ project_workflow/        # SAFe workflow templates
└── specs_templates/         # Specification templates

πŸŽ“ Citation

Download: CITATION.bib | CITATION.cff

APA 7th Edition

Graham, J. S., & WTFB Development Team. (2025). Evidence-based multi-agent
development: A SAFe framework implementation with Claude Code [White paper].
https://github.com/ByBren-LLC/WTFB-SAFe-Agentic-Workflow

⚠️ Important Caveats

This is version 1.0 of an emerging methodology, not a proven standard:

  • Production use: 5 months tracked (June-October 2025), 2+ years methodology evolution
  • Sample size: 169 issues, 2,193 commits, single-developer validation
  • Context: Single-developer context limits multi-team scalability validation
  • Not universal: Only valuable for complex/high-risk work (see Section 7)

Honest limitations documented in Section 7.


🀝 Contributing

We welcome contributions:

  • Patterns: Share production-tested patterns
  • Case Studies: Document your implementation experience
  • Research: Explore open questions from Section 10
  • Improvements: Suggest methodology enhancements

See CONTRIBUTING.md for guidelines.


πŸ“œ License

MIT License - See LICENSE for details.


πŸ“¬ Contact


πŸ›οΈ Meta-Note: Self-Validation

This methodology was validated by itself: 7 SAFe agents performed meta-circular validation of the whitepaper and caught critical fabricated data before publication.

See whitepaper/validation/VALIDATION-SUMMARY.md for the complete story of how the methodology prevented academic fraud by validating its own documentation.

The methodology caught its own problems. That's the proof it works.


πŸ“š Complete Whitepaper Sections

  1. Executive Summary
  2. Introduction
  3. Background & Related Work
  4. Innovation: Subagent Communication
  5. Architecture & Implementation
  6. Case Studies
  7. Limitations: Honest Assessment
  8. Agile Retrospective Advantage
  9. Implementation Guide
  10. Future Work & Community
  11. Conclusion
  12. Appendices

Version: 1.0 (October 2025)
Status: Production-validated, academically honest, publication-ready

πŸŽ‰ This repository contains both the whitepaper AND the complete working template for implementing the methodology!