Configuration System
AgileFlow's configuration system provides a unified script for setting up, customizing, and verifying every aspect of your development workflow. Access it through /agileflow:configure.
Quick Start
# Interactive wizard - guides you through all options
/agileflow:configure
# Detect current configuration
/agileflow:configure --detect
# Enable specific features
/agileflow:configure --enable=damage-control,status-line,archival
# Upgrade to latest versions
/agileflow:configure --upgradeConfiguration Features
AgileFlow's configuration system includes 12 configurable features that can be enabled/disabled individually or through preset profiles:
| Feature | Type | Purpose |
|---|---|---|
| SessionStart | Hook | Welcome message and project status on session start |
| PreCompact | Hook | Context preservation during conversation compression |
| RalphLoop | Hook | Autonomous story processing loop (Stop hook) |
| SelfImprove | Hook | Automatic expertise updates (Stop hook) |
| Archival | Script | Auto-manage status.json file size |
| StatusLine | Script | Real-time project status bar |
| AutoUpdate | Metadata | Auto-check for AgileFlow updates |
| DamageControl | PreToolUse Hooks | Block dangerous commands (Bash, Edit, Write) |
| AskUserQuestion | Metadata | Enable interactive user prompts |
| TmuxAutoSpawn | Metadata | Auto-create tmux sessions |
| ShellAliases | Shell | Install af/agileflow command aliases |
| CLAUDE.md Reinforcement | Metadata | Enforce project rules in context preservation |
Setup Profiles
Choose a preset profile to configure multiple features at once:
Full Profile (Recommended for Active Development)
Enables all features including experimental Stop hooks:
/agileflow:configure --profile=fullIncludes: SessionStart, PreCompact, RalphLoop, SelfImprove, Archival, StatusLine, AskUserQuestion, TmuxAutoSpawn
Basic Profile (Recommended for New Projects)
Essential hooks + archival:
/agileflow:configure --profile=basicIncludes: SessionStart, PreCompact, Archival, AskUserQuestion, TmuxAutoSpawn
Minimal Profile (Safety First)
No automation - full manual control:
/agileflow:configure --profile=minimalIncludes: AskUserQuestion, TmuxAutoSpawn
None Profile
No hooks at all:
/agileflow:configure --profile=noneRecommended Setup Order
If configuring features manually:
Phase 1: Safety (5 min)
├─ DamageControl → Protect codebase first
└─ Validate settings
Phase 2: Foundation (10 min)
├─ SessionStart → Enable basic automation
├─ PreCompact → Preserve context
└─ AskUserQuestion → Enable user interactions
Phase 3: Productivity (10 min)
├─ Archival → Manage status.json
├─ StatusLine → Real-time visibility
└─ ShellAliases → Install quick-access commands
Phase 4: Advanced (5 min, optional)
├─ RalphLoop → Autonomous story processing
├─ SelfImprove → Auto-update expertise
└─ AutoUpdate → Check for updates
Feature Configuration Details
SessionStart Hook
Purpose: Run scripts when Claude Code session begins
What it does:
- Displays welcome message with project info
- Shows current git branch and active story
- Lists any blocked stories
- Runs archival if enabled
Controlled by:
/agileflow:configure --enable=sessionstart
/agileflow:configure --disable=sessionstartScript: scripts/agileflow-welcome.js
PreCompact Hook
Purpose: Preserve critical context when Claude Code compresses conversation
Benefits:
- Project rules survive compression
- Current story and WIP status maintained
- Active commands preserved
- Long conversations stay focused
Controlled by:
/agileflow:configure --enable=precompact
/agileflow:configure --disable=precompactScript: scripts/precompact-context.sh
RalphLoop (Stop Hook)
Purpose: Autonomous story processing - advance to next story after tests pass
When to use:
- Large epics with clear acceptance criteria
- Well-tested projects
- Batch processing overnight
Controlled by:
/agileflow:configure --enable=ralphloop
/agileflow:configure --disable=ralphloopScript: scripts/ralph-loop.js
Related: Loop Mode
SelfImprove (Stop Hook)
Purpose: Automatically update agent expertise files based on changes made
When to use:
- Domain agents that build expertise
- Projects using expertise-based agents
- Long-running agent coordination
Controlled by:
/agileflow:configure --enable=selfimprove
/agileflow:configure --disable=selfimproveScript: scripts/auto-self-improve.js
Related: Agent Expertise System
Archival
Purpose: Automatically clean up completed stories from status.json
Why it matters:
- status.json can exceed 25k tokens
- Archival keeps it lean and fast
- Completed stories moved to monthly archives
Threshold options:
/agileflow:configure --archival-days=30 # Default
/agileflow:configure --archival-days=14 # Fast-moving projects
/agileflow:configure --archival-days=7 # Large teamsArchive structure:
docs/09-agents/
├── status.json # Active work
└── archive/
├── 2025-01.json # Monthly archives
└── 2025-02.json
Script: scripts/archive-completed-stories.sh
StatusLine
Purpose: Display project status bar in Claude Code
Shows:
- Current story ID and title
- WIP count vs limit
- Git branch
- Epic progress
Available components:
# List available components
/agileflow:configure --list-statusline-components
# Set specific components
/agileflow:configure --statusline=story,branch,wipScript: scripts/agileflow-statusline.sh
DamageControl
Purpose: Block dangerous commands before execution
What it protects:
- Destructive deletions (
rm -rf /) - Force git operations (
git push --force) - Database destruction (
DROP TABLE) - Cloud CLI deletes (
aws delete)
Enable/disable:
/agileflow:configure --enable=damagecontrol
/agileflow:configure --disable=damagecontrolScripts:
scripts/damage-control-bash.jsscripts/damage-control-edit.jsscripts/damage-control-write.js
Related: Damage Control
AskUserQuestion
Purpose: Enable interactive user prompts
When enabled:
- Agents use AskUserQuestion tool for confirmations
- Smart Detection recommends features via prompts
- Users choose from options when ambiguous
Controlled by:
/agileflow:configure --enable=askuserquestion
/agileflow:configure --disable=askuserquestionTmuxAutoSpawn
Purpose: Automatically create tmux sessions for Claude Code
When enabled:
afcommand creates/reattaches tmux session- Session named based on directory
- All Claude Code in tmux windows
Controlled by:
/agileflow:configure --enable=tmuxautospawn
/agileflow:configure --disable=tmuxautospawnShellAliases
Purpose: Install af/agileflow shell aliases
What it does:
- Adds
afalias (shorthand for agileflow) - Adds
agileflowas full command - Works with .bashrc, .zshrc, .config/fish/config.fish
Enable:
/agileflow:configure --enable=shellaliasesAutoUpdate
Purpose: Check for AgileFlow updates automatically
When enabled:
- SessionStart checks for new version
- Notifies if updates available
- Manual upgrade via
/agileflow:update
Controlled by:
/agileflow:configure --enable=autoupdate
/agileflow:configure --disable=autoupdateCLAUDE.md Reinforcement
Purpose: Enforce project rules during context compression
When enabled:
- PreCompact preserves CLAUDE.md critical sections
- Project rules never forgotten during long sessions
- Babysit rules always active
Controlled by:
/agileflow:configure --enable=claudemdreinforcementFile Organization
project/
├── .github/workflows/ci.yml # GitHub Actions
├── .claude/
│ ├── settings.json # Hooks & status line (committed)
│ ├── settings.local.json # User overrides (gitignored)
│ └── settings.local.example.json # Template for team
├── .agileflow/
│ ├── config/
│ │ └── damage-control-patterns.yaml
│ └── scripts/
│ └── ...
├── scripts/
│ ├── agileflow-welcome.js
│ ├── agileflow-statusline.sh
│ └── precompact-context.sh
├── CLAUDE.md # Project guidelines
└── docs/00-meta/
└── agileflow-metadata.json # Configuration metadata
Gitignore Rules
Committed (team configuration):
.claude/settings.json.claude/settings.local.example.json.github/workflows/CLAUDE.mdscripts/.agileflow/
Gitignored (user-specific):
.claude/settings.local.json.claude/prompt-log.txt.claude/*.log
Token Reference
GitHub Token (ghp_xxx)
- Location:
.claude/settings.local.json - Scopes needed:
repo,workflow - Create at: https://github.com/settings/tokens/new
GitLab Token (glpat_xxx)
- Location:
.claude/settings.local.json - Scopes needed:
api,read_repository,write_repository - Create at: https://gitlab.com/-/profile/personal_access_tokens
CircleCI Token
- Location:
.claude/settings.local.json - Create at: https://app.circleci.com/settings/user/tokens
Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Config not taking effect | Claude Code not restarted | Quit (Cmd+Q) and restart |
| Hooks don't run | settings.json invalid | Check JSON syntax with jq |
| Status line missing | Script not executable | chmod +x scripts/*.sh |
| status.json too large | Exceeds token limit | Enable archival (--archival-days=7) |
Restart Requirement
These features require Claude Code restart:
- SessionStart
- PreCompact
- RalphLoop
- DamageControl
# Complete quit (not just closing window)
Cmd+Q (Mac) or Ctrl+Q (Windows/Linux)
# Wait 5 seconds, then reopenChecking Configuration Status
View current configuration:
/agileflow:configure --detectThis shows:
- Which features are enabled/disabled
- Profile in use (full, basic, minimal, none)
- Archival threshold (days)
- Version information
Rollback
# Restore from git
git checkout .claude/settings.json
# Remove specific hook
jq 'del(.hooks.HookName)' .claude/settings.json > tmp.json && mv tmp.json .claude/settings.json
# Disable all hooks
jq 'del(.hooks)' .claude/settings.json > tmp.json && mv tmp.json .claude/settings.jsonCommon Scenarios
Fresh Project Setup
# Apply basic profile (recommended)
/agileflow:configure --profile=basic
# Or build custom setup
/agileflow:configure --enable=sessionstart,precompact,archival,damagecontrolMinimal Setup (Safety First)
/agileflow:configure --profile=minimalFull Setup (All Features)
/agileflow:configure --profile=fullOptimize for Large Projects
/agileflow:configure --archival-days=7
/agileflow:configure --enable=statusline,ralphloopTeam Setup (with shared config)
# Setup project config
git add .claude/settings.json
git commit -m "chore: configure AgileFlow for team"
# Create template for developers
cp .claude/settings.local.json .claude/settings.local.example.json
git add .claude/settings.local.example.json
git commit -m "docs: add settings template for team members"On This Page
Configuration SystemQuick StartConfiguration FeaturesSetup ProfilesFull Profile (Recommended for Active Development)Basic Profile (Recommended for New Projects)Minimal Profile (Safety First)None ProfileRecommended Setup OrderFeature Configuration DetailsSessionStart HookPreCompact HookRalphLoop (Stop Hook)SelfImprove (Stop Hook)ArchivalStatusLineDamageControlAskUserQuestionTmuxAutoSpawnShellAliasesAutoUpdateCLAUDE.md ReinforcementFile OrganizationGitignore RulesToken ReferenceGitHub Token (ghp_xxx)GitLab Token (glpat_xxx)CircleCI TokenTroubleshootingRestart RequirementChecking Configuration StatusRollbackCommon ScenariosFresh Project SetupMinimal Setup (Safety First)Full Setup (All Features)Optimize for Large ProjectsTeam Setup (with shared config)