Skip to content

CCFlow is a comprehensive workflow system for Claude Code that provides structured development with TDD enforcement, memory bank context management, and intelligent agent-based task coordination.

Notifications You must be signed in to change notification settings

ScaleLabs-Dev/CCFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CCFlow - Claude Code Workflow System

Version: 1.0 (Release) Status: ✅ Production Ready Last Updated: 2025-10-05


Overview

CCFlow is a comprehensive workflow system for Claude Code that provides structured development with TDD enforcement, memory bank context management, and intelligent agent-based task coordination.

Key Features:

  • 🎯 Two-layer agent architecture (workflow coordination + implementation)
  • TDD workflow with 100% GREEN gate (tests must pass)
  • 📚 Memory bank system for persistent project context
  • 🤖 12 commands under /cf: namespace
  • 👥 9 agents (6 workflow + 3 hub) + specialist extensibility
  • 📊 4-level complexity assessment for intelligent routing
  • 🔄 Interactive modes for ambiguous requirements

Quick Start

1. Initialize Your Project

New Project

/cf:init MyProject

Existing Project (Auto-Import)

/cf:init MyProject
# Detects README.md, CLAUDE.md, package.json
# Offers to import existing documentation
# Pre-populates memory bank → validate → fill gaps

Force Fresh (Ignore Existing Docs)

/cf:init MyProject --force-fresh

What gets created:

  • memory-bank/ directory with 6 core files
  • Project context (imported from docs OR guided creation)
  • Foundation for structured development

Import Sources (if detected):

  • README.md → Executive Summary, Features, Problem Statement
  • CLAUDE.md → Tech Stack, Constraints, Patterns
  • package.json → Dependencies, Framework detection
  • Code structure → Architecture style, Component patterns

2. Customize Hub Agents (Important!)

Before first use, edit these 3 files to match your tech stack:

Testing Configuration (.claude/agents/testing/testEngineer.md):

Testing Framework: [Jest, Pytest, etc.]
Test Commands: [npm test, pytest, etc.]
Coverage Thresholds: [80%, 90%, etc.]

Development Configuration (.claude/agents/development/codeImplementer.md):

Tech Stack: [Node.js, Python, Go, etc.]
Coding Conventions: [ESLint, Black, etc.]
Project Patterns: [From systemPatterns.md]

UI Configuration (.claude/agents/ui/uiDeveloper.md):

UI Framework: [React, Vue, Angular, etc.]
Styling: [CSS-in-JS, TailwindCSS, etc.]
Component Conventions: [Naming, structure]

3. Start Building

# Create your first task
/cf:feature "implement user authentication"

# Plan it (if Level 2-4 complexity)
/cf:plan TASK-001 --interactive

# Implement with TDD
/cf:code TASK-001

# Save progress
/cf:checkpoint

Command Reference

Initialization (2)

Command Purpose
/cf:init [project-name] Bootstrap project with memory bank (auto-imports existing docs)
/cf:init [project-name] --force-fresh Bootstrap with empty templates (ignore existing docs)
/cf:sync Read-only memory bank status summary

Core Workflow (3)

Command Purpose Agent(s)
/cf:feature [description] Entry point for new work Assessor
/cf:plan TASK-[ID] [--interactive] Plan Level 2-4 tasks Architect, Product, Facilitator
/cf:code TASK-[ID] TDD implementation with GREEN gate testEngineer, Hub agents

Support (6)

Command Purpose Agent(s)
/cf:review [task-id|all] Quality assessment Reviewer
/cf:checkpoint [--message "..."] Save progress Documentarian
/cf:ask [question] Query memory bank None (semantic search)
/cf:context [--full] Load work context None (file reads)
/cf:status [--filter ...] Quick task overview None (file reads)
/cf:facilitate [topic] [--mode ...] Interactive refinement Facilitator

Agent Management (1)

Command Purpose
/cf:create-specialist [domain] --type [type] --name [name] Create domain specialist

Workflow Patterns

Simple Task (Level 1)

/cf:feature "fix login button styling"
# → Assessor rates as Level 1
# → Direct to implementation

/cf:code TASK-001
# → testEngineer writes tests (RED)
# → uiDeveloper implements (GREEN)
# → Done in < 2 hours

Complex Feature (Level 3)

/cf:feature "implement order management system"
# → Assessor rates as Level 3
# → Requires planning

/cf:plan TASK-002 --interactive
# → Architect designs system
# → Product defines requirements
# → Facilitator refines through dialogue
# → Creates sub-tasks

/cf:code TASK-002-1  # First sub-task
# → TDD workflow
# → Specialists may be delegated to

/cf:checkpoint  # Save progress
/cf:review TASK-002-1  # Quality check

Daily Workflow

# Morning: Load context
/cf:context
/cf:status

# Work: Implement tasks
/cf:code TASK-[ID]

# Regular: Save progress
/cf:checkpoint  # Every 30-60 minutes

# End of day: Review and save
/cf:review all
/cf:checkpoint --message "End of day"

Agent Architecture

Workflow Agents (6)

Located in .claude/agents/workflow/:

Agent Responsibilities
Assessor Complexity evaluation, routing decisions, codebase scanning
Architect System design, technical planning, architecture decisions
Product Requirements, user experience, feature prioritization
Documentarian Memory bank maintenance, checkpoint creation, knowledge preservation
Reviewer Code quality, technical debt, progress evaluation
Facilitator Interactive refinement, gap identification, collaborative exploration

Implementation Hub Agents (3)

Stack-agnostic coordinators that delegate to specialists:

Hub Agent Domain Delegates To
testEngineer TDD coordination Testing specialists
codeImplementer Backend/business logic Development specialists
uiDeveloper Frontend/UI UI specialists

Creating Specialists

# Create a database specialist
/cf:create-specialist database --type development --name databaseSpecialist

# Create a chart specialist for UI
/cf:create-specialist data-visualization --type ui --name chartSpecialist

# Create an API integration test specialist
/cf:create-specialist api-integration --type testing --name apiIntegrationSpecialist

Memory Bank System

6 Core Files

Located in memory-bank/:

File Purpose Updated By
projectbrief.md Scope, objectives, constraints, decisions Manual + Documentarian
productContext.md Features, requirements, user flows Product agent + Documentarian
systemPatterns.md Architecture, patterns, conventions Architect agent + Documentarian
activeContext.md Current focus, recent changes, next steps All agents + Documentarian
progress.md Completed work, milestones, checkpoints, tech debt Reviewer + Documentarian
tasks.md Task tracking, status, complexity, sub-tasks Assessor + various agents

Update Strategy

Hybrid Approach:

  • Auto-tracked changes during operations
  • Explicit commit via /cf:checkpoint
  • Agents update relevant files during workflow
  • Documentarian ensures cross-file consistency

TDD Workflow

Absolute Requirement: Tests must pass (100% GREEN gate)

RED → GREEN → REFACTOR

/cf:code TASK-001

# Step 1: RED Phase (testEngineer)
# - Write failing tests FIRST
# - Tests define expected behavior
# - No implementation yet

# Step 2: GREEN Phase (Hub Agent)
# - Implement to make tests pass
# - May delegate to specialists
# - Verify ALL tests pass

# Step 3: GREEN Gate Enforcement
# ✅ Tests pass → Update memory bank, mark complete
# ❌ Tests fail → Iterate (max 3 attempts)
# ❌ Still failing → STOP, report blocker

# Step 4: REFACTOR (Optional)
# - Improve code while maintaining GREEN
# - Tests must stay passing

GREEN Gate is Non-Negotiable: Implementation cannot be marked complete until all tests pass.


Complexity Levels

Level Name Criteria Time Routing
1 Quick Task Simple, 1-2 files < 2 hours /cf:code (direct)
2 Simple Enhancement 2-5 files, clear scope 2-6 hours /cf:plan required
3 Intermediate Feature 5-15 files, moderate complexity 1-3 days /cf:plan required
4 Complex Project 15+ files, high complexity 3+ days /cf:plan required

Assessor agent analyzes:

  • Keywords (implementation indicators)
  • Scope (files/components affected)
  • Risk (dependencies, unknowns)
  • Effort (estimated time)

Interactive Modes

Facilitator Modes

Exploration (--mode explore):

  • Open-ended discovery
  • Ambiguous requirements
  • Early-stage ideation

Refinement (--mode refine, default):

  • Improve existing plans
  • Fill gaps in specifications
  • Resolve ambiguities

Validation (--mode validate):

  • Pre-implementation check
  • Catch assumptions
  • Edge case discovery

Example Usage

# Explore a new feature idea
/cf:facilitate "notification preferences" --mode explore

# Refine an existing plan
/cf:facilitate TASK-042 --mode refine

# Validate before implementation
/cf:facilitate TASK-035 --mode validate

File Structure

your-project/
├── memory-bank/
│   ├── projectbrief.md
│   ├── productContext.md
│   ├── systemPatterns.md
│   ├── activeContext.md
│   ├── progress.md
│   └── tasks.md
├── .claude/
│   ├── agents/
│   │   ├── workflow/          # 6 workflow agents
│   │   ├── testing/           # testEngineer + specialists/
│   │   ├── development/       # codeImplementer + specialists/
│   │   └── ui/                # uiDeveloper + specialists/
│   └── commands/              # 12 command files
└── [your source code...]

Best Practices

Regular Workflow

DO:

  • Run /cf:checkpoint every 30-60 minutes
  • Use /cf:context at session start
  • Run /cf:review before marking tasks complete
  • Create specialists when patterns emerge (3+ delegations)
  • Follow TDD workflow (tests first, always)
  • Use /cf:status for quick orientation

DON'T:

  • Skip writing tests (TDD is enforced)
  • Mark tasks complete with failing tests
  • Let more than 1 hour pass without checkpoint
  • Create specialists prematurely (wait for patterns)
  • Ignore technical debt from /cf:review

Planning Strategy

Level 1 (Quick tasks):

  • Go straight to /cf:code
  • Keep it simple and fast

Level 2-4 (Complex tasks):

  • Always use /cf:plan first
  • Use --interactive for ambiguous requirements
  • Break into sub-tasks
  • Validate plan with /cf:facilitate --mode validate

Quality Management

  • Run /cf:review all weekly
  • Address high-priority tech debt promptly
  • Track quality trends in progress.md
  • Update systemPatterns.md as patterns evolve

Documentation

User Guides

System Documentation

Technical Specifications

Implementation Files

All commands and agents fully documented in .claude/:

  • Commands: .claude/commands/cf/ (12 commands)
  • Agents: .claude/agents/ (9 agents)
  • Templates: .claude/templates/ (6 memory bank templates)

Validation & Quality

Status: ✅ Production Ready

  • ✅ Command consistency: 100%
  • ✅ Agent frontmatter: 9/9 valid
  • ✅ Template consistency: 6/6 complete
  • ✅ Integration points: 100% valid
  • ✅ Cross-references: 100% correct
  • ✅ Documentation: 100% complete
  • ✅ Error handling: 30+ cases documented

Quality Metrics:

  • Total lines: ~20,000 across implementation files
  • Documentation coverage: 100%
  • Consistency score: 100%

See Validation Guide for methodology and standards.


Version History

v1.0 (2025-10-05) - Initial Release ✅

  • All 8 phases complete
  • 12 commands implemented
  • 9 agents created
  • 6 memory bank templates
  • Complete validation passed
  • Production ready

License

This system is designed for use with Claude Code by Anthropic.


Support & Feedback

For issues, questions, or feedback:

  • Review documentation in .claude/commands/cf/ for command usage
  • Check memory-bank/ files for project context
  • Refer to agent files in .claude/agents/ for agent behavior

Built with Claude Code 🤖


Version: 1.0 (Release) Status: ✅ Production Ready Validation: ✅ All Checks Passed (12/12)

About

CCFlow is a comprehensive workflow system for Claude Code that provides structured development with TDD enforcement, memory bank context management, and intelligent agent-based task coordination.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •