Transform Claude into your personal DevOps engineer, developer assistant, and incident responder.
Works with both Claude Code and Cursor IDE
Getting Started β’ Commands β’ Skills β’ Personas β’ Tool Modules β’ Architecture
AI Workflow is a comprehensive MCP (Model Context Protocol) server that gives Claude AI superpowers for software development:
| Capability | Description |
|---|---|
| π§ Execute Actions | Create branches, update Jira, deploy code |
| π§ Remember Context | Track your work across sessions |
| π Adopt Personas | DevOps, Developer, Incident modes |
| β‘ Run Workflows | Multi-step skills that chain tools |
| π Auto-Heal | Detect failures, fix auth/VPN, retry automatically |
| π Self-Debug | Analyze and fix its own tools |
git clone https://github.com/yourusername/ai-workflow.git ~/src/ai-workflow
cd ~/src/ai-workflow
# Using UV (recommended - fast!)
uv venv
uv syncDon't have UV? Install it:
curl -LsSf https://astral.sh/uv/install.sh | sh
For development tools (pytest, black, flake8, mypy), also run:
uv sync --extra devπ· Claude Code (claude.ai/code)
Create .mcp.json in your project root:
{
"mcpServers": {
"aa_workflow": {
"command": "bash",
"args": [
"-c",
"cd ~/src/ai-workflow && source .venv/bin/activate && python3 -m server"
]
}
}
}Then restart Claude Code or run /mcp to reload.
β¬ Cursor IDE
Create .cursor/mcp.json in your project directory:
{
"mcpServers": {
"aa_workflow": {
"command": "bash",
"args": [
"-c",
"cd ~/src/ai-workflow && source .venv/bin/activate && python3 -m server"
]
}
}
}
```text
Then restart Cursor (Cmd/Ctrl+Shift+P β "Reload Window").
</details>
> **Default Persona:** The server starts with the `developer` persona loaded by default (~78 tools). Use `persona_load("devops")` to switch.
>
> **Tool Organization:** Tools are split into `_basic` (used in skills, 188 tools) and `_extra` (rarely used, 75 tools) to reduce context window usage by 30%.
### 3οΈβ£ Restart and Go
```text
You: Load the developer persona
Claude: π¨βπ» Developer Persona Loaded
Tools: workflow, git_basic, gitlab_basic, jira_basic (~78 tools)
You: Start working on AAP-12345
Claude: [Runs start_work skill]
β
Created branch: aap-12345-implement-api
β
Updated Jira: In Progress
Ready to code!The Slack bot is an autonomous agent that monitors channels, responds to queries, and investigates alerts.
The bot uses Slack's web API. Extract credentials from Chrome:
uv add pycookiecheat
python scripts/get_slack_creds.pyAdd to config.json:
{
"slack": {
"auth": {
"xoxc_token": "xoxc-...",
"d_cookie": "xoxd-...",
"workspace_id": "E...",
"host": "your-company.enterprise.slack.com"
},
"channels": {
"team": { "id": "C01234567", "name": "my-team" }
},
"alert_channels": {
"C089XXXXXX": { "name": "alerts", "environment": "stage" }
}
}
}For autonomous responses:
# Vertex AI (recommended)
export CLAUDE_CODE_USE_VERTEX=1
export ANTHROPIC_VERTEX_PROJECT_ID="your-gcp-project"
# Or Anthropic API
export ANTHROPIC_API_KEY="your-key"# Test credentials
make slack-test
# Foreground (Ctrl+C to stop)
make slack-daemon
# Background with D-Bus control
make slack-daemon-bg
make slack-status
make slack-daemon-logs
make slack-daemon-stopSee Slack Persona docs for full setup guide.
Note: "Agents" in this project are tool configuration profiles (personas), not separate AI instances. When you "load an agent," you're configuring which tools Claude has access to.
Switch personas to get different tool sets. See full persona reference.
| Persona | Command | Tools | Focus |
|---|---|---|---|
| π¨βπ» developer | Load developer persona |
~78 | Daily coding, PRs |
| π§ devops | Load devops persona |
~74 | Deployments, K8s |
| π¨ incident | Load incident persona |
~78 | Production debugging |
| π¦ release | Load release persona |
~91 | Shipping releases |
| π¬ slack | Load slack persona |
~85 | Slack bot daemon |
graph LR
DEV[π¨βπ» Developer] --> |"persona_load"| DEVOPS[π§ DevOps]
DEVOPS --> |"persona_load"| INCIDENT[π¨ Incident]
INCIDENT --> |"persona_load"| DEV
style DEV fill:#3b82f6,stroke:#2563eb,color:#fff
style DEVOPS fill:#10b981,stroke:#059669,color:#fff
style INCIDENT fill:#ef4444,stroke:#dc2626,color:#fff
Skills are reusable multi-step workflows with built-in auto-healing. See full skills reference.
| Time | Command | What It Does |
|---|---|---|
| β Morning | /coffee |
Email, PRs, calendar, Jira summary |
| π» Work | /start-work AAP-12345 |
Create branch, update Jira |
| π Submit | /create-mr |
Validate, lint, create MR |
| πΊ Evening | /beer |
Wrap-up, standup prep |
| Skill | Description | Auto-Heal |
|---|---|---|
| β coffee | Morning briefing | β |
| πΊ beer | End-of-day wrap-up | β |
| β‘ start_work | Begin Jira issue | β VPN + Auth |
| π create_mr | Create MR + Slack notify | β VPN + Auth |
| β mark_mr_ready | Mark draft as ready | β |
| π review_pr | Review MR | β VPN + Auth |
| π sync_branch | Rebase onto main | β VPN |
| π standup_summary | Generate standup | β |
| π§ͺ test_mr_ephemeral | Deploy to ephemeral | β VPN + Auth |
| π¨ investigate_alert | Triage alerts | β VPN + Auth |
| π« create_jira_issue | Create Jira issue | β |
| β close_issue | Close issue with summary | β VPN |
| π update_docs | Check/update documentation | β |
All MCP tools include auto-healing via Python decorators. All skills also auto-retry with VPN/auth fixes.
When a decorated tool fails due to VPN or auth issues:
- Detects the failure pattern (network timeout, unauthorized, forbidden)
- Fixes by calling
vpn_connect()orkube_login() - Retries the operation automatically
- Logs the fix to
memory/learned/tool_failures.yamlfor learning
from server.auto_heal_decorator import auto_heal
@auto_heal() # Covers all tool types
@registry.tool()
async def git_push(repo: str, branch: str = "") -> str:
"""Push commits - auto-heals auth failures."""
...| Decorator | Use Case | Coverage |
|---|---|---|
@auto_heal() |
All tools (auto-detect cluster) | Git, GitLab, Jira + all |
@auto_heal_ephemeral() |
Bonfire namespace tools | Bonfire |
@auto_heal_konflux() |
Tekton pipeline tools | Konflux |
@auto_heal_k8s() |
Kubectl tools | K8s, Prometheus |
Skills automatically retry failing tools after applying fixes:
- Checks memory for known fixes via
check_known_issues() - Detects auth/network patterns in error output
- Applies VPN connect or kube_login based on context
- Retries the tool call once after successful fix
This means skills like start_work, create_mr, and deploy_ephemeral self-heal transparently.
66 slash commands for quick access. See full commands reference.
| Category | Commands |
|---|---|
| βοΈ Daily | /coffee /beer /standup /weekly-summary |
| π§ Development | /start-work /create-mr /mark-ready /close-issue /sync-branch /rebase-pr /hotfix |
| π Review | /review-mr /review-all-open /check-feedback /check-prs /close-mr |
| π§ͺ Testing | /deploy-ephemeral /test-ephemeral /check-namespaces /extend-ephemeral /run-local-tests |
| π¨ Operations | /investigate-alert /debug-prod /release-prod /env-overview /rollout-restart /scale-deployment /silence-alert |
| π Jira | /jira-hygiene /create-issue /clone-issue /sprint-planning |
| π Documentation | /check-docs /update-docs |
| π Discovery | /tools /personas /list-skills /smoke-tools /smoke-skills /memory |
| π Calendar | /my-calendar /schedule-meeting /setup-gmail /google-reauth |
| π Infrastructure | /vpn /konflux-status /appinterface-check /ci-health /cancel-pipeline /check-secrets /scan-vulns |
/coffee # Morning briefing
/start-work AAP-12345 # Begin work on issue
# ... code ...
/update-docs # Check if docs need updating
/create-mr # Create merge request (auto-checks docs)
/deploy-ephemeral # Test in ephemeral
/mark-ready # Remove draft, notify team (auto-checks docs)
# ... review cycle ...
/close-issue AAP-12345 # Wrap up
/beer # End of day summaryRepositories can have automatic documentation checks before creating MRs. Configure in config.json:
"my-repo": {
"docs": {
"enabled": true,
"path": "docs/",
"readme": "README.md",
"api_docs": "docs/api/",
"diagrams": ["docs/architecture/*.md"],
"check_on_mr": true
}
}
```text
When enabled, `/create-mr` and `/mark-ready` will:
- Scan for changed files in the branch
- Check README.md for broken links
- Review API docs if endpoints changed
- Check mermaid diagrams if architecture changed
- Report issues and suggestions (non-blocking)
---
## Tool Modules
**263 tools** across 16 modules, split into **188 basic** (used in skills, 71%) and **75 extra** (rarely used, 29%). See [full MCP server reference](docs/tool-modules/README.md).
> **Performance:** Loading basic tools only reduces context window usage by **30%** while maintaining full functionality for common workflows.
| Module | Total | Basic (Used) | Extra (Unused) | Description |
|--------|-------|--------------|----------------|-------------|
| [workflow](docs/tool-modules/workflow.md) | 18 | 18 | 0 | Core: agents, skills, memory, vpn, kube_login |
| [git](docs/tool-modules/git.md) | 30 | 27 | 3 | Git operations (90% usage) |
| [gitlab](docs/tool-modules/gitlab.md) | 30 | 16 | 14 | MRs, pipelines, code review (53% usage) |
| [jira](docs/tool-modules/jira.md) | 28 | 17 | 11 | Issue tracking (61% usage) |
| [k8s](docs/tool-modules/k8s.md) | 28 | 22 | 6 | Kubernetes operations (79% usage) |
| [bonfire](docs/tool-modules/bonfire.md) | 20 | 10 | 10 | Ephemeral environments (50% usage) |
| [konflux](docs/tool-modules/konflux.md) | 35 | 22 | 13 | Build pipelines (63% usage) |
| [prometheus](docs/tool-modules/prometheus.md) | 13 | 5 | 8 | Metrics queries (38% usage) |
| [kibana](docs/tool-modules/kibana.md) | 9 | 1 | 8 | Log search (11% usage) |
| [alertmanager](docs/tool-modules/alertmanager.md) | 7 | 4 | 3 | Alert management (57% usage) |
| [quay](docs/tool-modules/quay.md) | 7 | 5 | 2 | Container registry (71% usage) |
| [slack](docs/tool-modules/slack.md) | 9 | 6 | 3 | Slack integration (67% usage) |
| [google_calendar](docs/tool-modules/google_calendar.md) | 6 | 6 | 0 | Calendar & meetings (100% usage) |
| [appinterface](docs/tool-modules/appinterface.md) | 7 | 4 | 3 | GitOps config (57% usage) |
| [lint](docs/tool-modules/lint.md) | 7 | 1 | 6 | Python/YAML linting (14% usage) |
| [dev_workflow](docs/tool-modules/dev_workflow.md) | 9 | 9 | 0 | Development helpers (100% usage) |
> Plus **45+ shared parsers** in `scripts/common/parsers.py` and **config helpers** in `scripts/common/config_loader.py`
See [MCP Server Architecture](docs/architecture/README.md) for implementation details.
---
## π οΈ Auto-Debug & Learning Loop
When tools fail, Claude can fix them **and remember the fix forever**:
```text
Tool: β Failed to release namespace
π‘ Known Issues Found!
Previous fix for `bonfire_release`: Add --force flag
π‘ Auto-fix: debug_tool('bonfire_namespace_release')
```text
### The Learning Loop
```text
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Tool fails β Check memory β Apply known fix β β β
β β β
β Unknown? β debug_tool() β Fix code β learn_tool_fix() β β β
β β β
β Saved to memory forever β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```text
### Key Tools
| Tool | Purpose |
|------|---------|
| `check_known_issues(tool, error)` | Check if we've seen this before |
| `debug_tool(tool, error)` | Analyze source and propose fix |
| `learn_tool_fix(tool, pattern, cause, fix)` | Save fix to memory |
### Session Start with Memory
When you start a session with `session_start()`, the system automatically:
1. **Loads current work state** - Active issues, branches, MRs
2. **Loads learned patterns** - Shows count of patterns by category
3. **Shows loaded tools** - Which tool modules are active
4. **Provides guidance** - Prefer MCP tools over raw CLI commands
```text
You: session_start(agent="developer")
Claude: π Session Started
π§ Learned Patterns: 12 patterns loaded
- Jira CLI: 3 patterns
- Error handling: 5 patterns
- Authentication: 4 patterns
π οΈ Currently Loaded Tools: git, gitlab, jira (~78 tools)
```text
### Memory Files
| File | Purpose |
|------|---------|
| `memory/learned/tool_fixes.yaml` | Tool-specific fixes from auto-remediation |
| `memory/learned/patterns.yaml` | General error patterns and solutions |
| `memory/learned/runbooks.yaml` | Operational procedures that worked |
| `memory/learned/tool_failures.yaml` | Auto-heal history with success/failure tracking |
| `memory/state/current_work.yaml` | Active issues, branches, MRs |
| `memory/sessions/*.yaml` | Session logs for continuity |
---
## π€ Background Daemons
6 background services provide autonomous functionality:
| Daemon | Purpose | Service |
|--------|---------|---------|
| **Slack** | Real-time message monitoring & AI response | `bot-slack.service` |
| **Sprint** | Automated Jira issue processing | `bot-sprint.service` |
| **Meet** | Google Meet auto-join & note-taking | `bot-meet.service` |
| **Video** | Virtual camera for meeting overlays | `bot-video.service` |
| **Session** | Cursor chat synchronization | `bot-session.service` |
| **Cron** | Scheduled job execution | `bot-cron.service` |
All daemons use D-Bus IPC for control. See [Daemons Guide](docs/daemons/README.md) for details.
```bash
# Quick start
systemctl --user start bot-slack bot-cron
# Check status
python scripts/health_check.py
# Control via CLI
python scripts/service_control.py statusai-workflow/
βββ server/ # MCP server infrastructure
β βββ main.py # Server entry point
β βββ persona_loader.py # Dynamic persona loading
β βββ workspace_state.py # Multi-session management
β βββ state_manager.py # Runtime state persistence
β βββ websocket_server.py # Real-time skill updates
β βββ auto_heal_decorator.py # Auto-heal decorators
β βββ usage_pattern_*.py # Layer 5 learning (7 files)
β βββ utils.py # Shared utilities
βββ tool_modules/ # 20+ tool plugins (aa_git/, aa_jira/, etc.)
βββ personas/ # Persona configs (developer.yaml, devops.yaml)
βββ skills/ # 95+ workflow definitions
βββ memory/ # Persistent context
β βββ state/ # Active issues, MRs, environments
β βββ learned/ # Patterns, tool fixes, usage patterns
β βββ knowledge/ # Per-persona project knowledge
βββ extensions/ # IDE integrations
β βββ aa_workflow_vscode/ # VSCode/Cursor extension (TypeScript)
βββ scripts/ # Daemons and utilities
β βββ slack_daemon.py # Slack monitoring daemon
β βββ sprint_daemon.py # Sprint automation daemon
β βββ meet_daemon.py # Meet bot daemon
β βββ cron_daemon.py # Scheduled jobs daemon
β βββ session_daemon.py # Session sync daemon
β βββ health_check.py # Service health monitoring
β βββ service_control.py # Unified CLI control
β βββ common/ # Shared utilities
β βββ dbus_base.py # D-Bus daemon base class
β βββ parsers.py # 45+ shared parser functions
β βββ config_loader.py # Config helpers
βββ systemd/ # Systemd service files
βββ docs/ # Documentation (140+ files)
βββ tests/ # Test suite (25 files)
βββ config.json # Main configuration
βββ .cursor/commands/ # 66+ slash commands (Cursor)
βββ .claude/commands/ # 66+ slash commands (Claude Code)
| Document | Description |
|---|---|
| Commands Reference | 66+ slash commands (Claude/Cursor) |
| Skills Reference | 95+ workflow skills |
| Personas Reference | 5 tool configuration profiles |
| Tool Modules Reference | 20+ tool plugins with 263 tools |
| Document | Description |
|---|---|
| Architecture Overview | System architecture with diagrams |
| MCP Implementation | Server code, persona switching, skills |
| Daemon Architecture | 6 background services with D-Bus IPC |
| VSCode Extension | IDE integration details |
| Session Management | Multi-chat session handling |
| State Management | Persistence patterns |
| Usage Pattern Learning | Layer 5 auto-heal system |
| Document | Description |
|---|---|
| Daemons Guide | Background daemon operations |
| Learning Loop | Auto-remediation + memory |
| IDE Extension | VSCode/Cursor extension setup |
| Development Guide | Contributing and development setup |
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a merge request
MIT License - See LICENSE for details.