Advanced Claude Code setup with intelligent orchestration, cross-session learning, and AI-optimized workflows
This repository contains a production-grade configuration for Claude Code with multi-agent orchestration, semantic memory, automation scripts, and 32 domain-specific skills.
A comprehensive .claude configuration that transforms Claude Code into an intelligent development partner with:
- Smart Orchestration: Three-tier command system (
/solo,/spec,/conduct) for tasks of any complexity - Cross-Session Learning: PRISM semantic memory system that remembers patterns and decisions
- 32 Domain Skills: Pre-loaded expertise (Python, Git, testing, DevOps, API design, etc.)
- Automation Scripts: GitLab/Jira integration without token-heavy MCP servers (97.7% token savings)
- Quality Gates: Multi-agent validation (security, performance, code quality) on every build
- Hook System: Event-driven automation for formatting, validation, and learning
Token Efficiency: Scripts save 119,550 tokens per PR review workflow vs. MCP servers (99.6% reduction)
-
Clone into your home directory:
cd ~ git clone <your-repo-url> .claude
-
Set up credentials:
# GitLab credentials (optional, for GitLab scripts) cp ~/.claude/scripts/.gitlab-credentials.example ~/.claude/scripts/.gitlab-credentials # Edit with your token: vim ~/.claude/scripts/.gitlab-credentials # Jira credentials (optional, for Jira scripts) cp ~/.claude/scripts/.jira-credentials.example ~/.claude/scripts/.jira-credentials # Edit with your token: vim ~/.claude/scripts/.jira-credentials
-
Configure settings (already tracked):
- Settings are in
~/.claude/settings.json - Hooks enabled by default (auto-format on Edit/Write)
- Custom status line configured
- Output style:
daily_driver(witty, direct)
- Settings are in
-
Start using orchestration commands:
# In any project directory /solo add rate limiting to API endpoint /spec design real-time event processing system /pr_review INT-1234
Choose the right command for your task complexity:
| Command | When to Use | Prerequisites | Token Budget |
|---|---|---|---|
/solo |
Simple tasks, 1-3 files, clear requirements | None | 10-20k |
/spec |
Need investigation, architecture unclear | None | 15-30k |
/conduct |
Complex multi-component features | SPEC.md from /spec | 50k+ |
/pr_review |
Review merge request against Jira ticket | Jira ticket ID | 30-60k |
/update_docs |
Update all docs to match current code | None | 20-40k |
/coda |
End session with summary and handoff | None | 5-10k |
User Task
β
βΌ
βββββββββββββββββ
β Is it clear β
β what to do? β
βββββββββ¬ββββββββ
β
βββββββββββββ΄ββββββββββββ
β β
YES NO
β β
βΌ βΌ
βββββββββββββββββ ββββββββββββββββ
β Simple task? β β Need to β
β (1-3 files) β β investigate? β
βββββββββ¬ββββββββ ββββββββ¬ββββββββ
β β
βββββββββ΄βββββββ β
β β βΌ
YES NO βββββββββββ
β β β /spec ββββ
βΌ βΌ βββββββββββ β
ββββββββββ ββββββββββββ β
β /solo β β /conduct β β
ββββββββββ ββββββββββββ β
β β² β
β β β
ββββββββββββββββ΄βββββββββββββββββββββββ
β
βΌ
βββββββββββ
β Done β
βββββββββββ
Special Cases:
PR Review? βββ /pr_review
Update Docs? βββ /update_docs
Session End? βββ /coda
Best for: Straightforward tasks with clear scope
/solo add rate limiting middleware
/solo fix authentication bug in login endpoint
/solo implement CSV export for reportsWhat it does:
- Creates minimal spec (
.spec/BUILD_*.md) - Implements via specialized agents
- Validates with 6 reviewers (security, performance, code quality)
- Runs tests (if requested)
- Merges learnings into permanent docs
- Cleans up
.spec/
Validation Loop: Fix β Validate β Repeat (max 3 attempts, 95%+ test coverage)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β /solo Command β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Load agent-prompting β
β skill (MANDATORY) β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Generate minimal spec β
β .spec/BUILD_*.md β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Spawn implementation β
β & test agents β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β Validation Loop β
β βββββββββββββββββββββββββββββββββββ β
β β Run linting (ruff/pyright) β β
β βββββββββββββββ¬ββββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββββββ β
β β Spawn 6 reviewers in parallel: β β
β β β’ Security β β
β β β’ Performance β β
β β β’ Code Quality (3x) β β
β β β’ Style β β
β βββββββββββββββ¬ββββββββββββββββββββ β
β βΌ β
β βββββββββββββββ β
β β Issues? β β
β ββββββββ¬βββββββ β
β β β
β βββββββββββ΄ββββββββββ β
β YES NO β
β β β β
β βΌ β β
β ββββββββββββββ β β
β β Spawn fix- β β β
β β executor β β β
β βββββββ¬βββββββ β β
β β β β
β ββββββββββββββββββββ β
β (Repeat max 3 times) β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Run tests (pytest) β
β Coverage: 95%+ β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Merge learnings into β
β permanent docs β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Cleanup .spec/ β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββ
β Done β
βββββββββ
Best for: Complex features needing investigation
/spec design event-driven architecture with gRPC
/spec investigate options for real-time notificationsWhat it does:
- Assessment: Asks 3-5 clarifying questions
- Investigation: Auto-reads existing code
- Challenge Mode: Identifies β₯3 concerns/risks
- Spike Testing: Validates approaches in
/tmp/spike_* - Spec Creation: Writes
SPEC.mdwith 10 required sections - Component Breakdown: Creates phase specs (
SPEC_1_*.md, etc.)
Output: .spec/SPEC.md ready for /conduct
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β /spec Command β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Initial Assessment β
β Ask 3-5 questions β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Auto-Investigation β
β Read existing code β
β Understand context β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Challenge Mode β
β Find β₯3 concerns: β
β β’ Performance risks β
β β’ Security issues β
β β’ Integration points β
β β’ Complexity traps β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β Spike Testing Phase β
β βββββββββββββββββββββββββββββββββββ β
β β For each approach option: β β
β β β β
β β 1. Create /tmp/spike_NAME/ β β
β β 2. Write throwaway code β β
β β 3. Run & validate β β
β β 4. Document exact commands β β
β β 5. Capture gotchas + recovery β β
β βββββββββββββββββββββββββββββββββββ β
β β
β Test in parallel: β
β β’ gRPC spike β
β β’ Database spike β
β β’ UI integration spike β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Create SPEC.md with: β
β β’ Overview β
β β’ User Stories β
β β’ Acceptance Criteria β
β β’ Technical Design β
β β’ API Contracts β
β β’ Data Models β
β β’ Dependencies β
β β’ Testing Strategy β
β β’ Rollout Plan β
β β’ Spike Findings β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Create Component β
β Phase Specs: β
β β’ SPEC_1_auth.md β
β β’ SPEC_2_api.md β
β β’ SPEC_3_db.md β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Ready for /conduct β
βββββββββββββββββββββββββ
Best for: Implementing complex features from SPEC.md
/conduct # Requires .spec/SPEC.md from /specWhat it does:
- Parses SPEC.md β extracts components + dependencies
- Builds dependency graph β topological sort
- For each component (in dependency order):
- Skeleton β Implementation β Validate β Test β Document β Checkpoint
- Integration testing across all components
- Final documentation validation
- Cleanup
.spec/
Key Features:
- Dependency-aware execution (no broken imports)
- Per-component validation (catch issues early)
- Parallel agent execution where possible
- Checkpoints after each component
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β /conduct Command β
β (Requires .spec/SPEC.md) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Parse SPEC.md β
β Extract components β
β Extract dependencies β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Build dependency β
β graph β
β Topological sort β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β For Each Component (in order) β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 1. Skeleton Phase β β
β β β’ Create file structure β β
β β β’ Define interfaces β β
β β β’ Add NotImplementedError β β
β ββββββββββββββββ¬βββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββββββ β
β β 2. Implementation Phase β β
β β β’ Fill in logic β β
β β β’ Working code (no TODOs) β β
β ββββββββββββββββ¬βββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββββββ β
β β 3. Validation Phase β β
β β β’ Run linting β β
β β β’ Spawn 6 reviewers β β
β β β’ Fix issues (max 3 loops) β β
β ββββββββββββββββ¬βββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββββββ β
β β 4. Testing Phase β β
β β β’ Write tests (95%+ cov) β β
β β β’ Run tests β β
β β β’ Fix failures β β
β ββββββββββββββββ¬βββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββββββ β
β β 5. Documentation Phase β β
β β β’ Update CLAUDE.md β β
β β β’ Update README β β
β ββββββββββββββββ¬βββββββββββββββββββ β
β βΌ β
β βββββββββββββββββββββββββββββββββββ β
β β 6. Checkpoint β β
β β β’ Git commit β β
β β β’ Mark complete β β
β βββββββββββββββββββββββββββββββββββ β
β β
β Next component has access to β
β working APIs from previous phases β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Integration Testing β
β All components β
β together β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Final Documentation β
β Validation β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Cleanup .spec/ β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββ
β Done β
βββββββββ
Best for: Reviewing merge requests against Jira requirements
/pr_review INT-3877
/pr_review PLAT-54What it does:
- Fetches full Jira ticket context (description, acceptance criteria, developer checklist, test plan, comments, related tickets)
- Fetches all MR comments (resolved/unresolved)
- Spawns 8 specialized reviewers in parallel:
- Requirements compliance
- Security (OWASP Top 10)
- Performance (N+1 queries, inefficiencies)
- Code quality (patterns, maintainability)
- Tests (coverage, edge cases)
- Breaking changes
- Database impacts
- Integration impacts
- 7-layer voting system (eliminates false positives)
- Outputs structured markdown report with severity levels
Token Savings: Uses lightweight scripts instead of MCP (119,550 tokens saved per review)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β /pr_review <TICKET_ID> β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββ΄ββββββββββββββββ
β β
βΌ βΌ
βββββββββββββββββββββββββ βββββββββββββββββββββββββ
β jira-get-issue β β gitlab-mr-comments β
β Fetch FULL context: β β Fetch ALL comments: β
β β’ Description β β β’ Resolved β
β β’ Acceptance Criteria β β β’ Unresolved β
β β’ Developer Checklist β β β’ Inline comments β
β β’ Test Plan β βββββββββββββ¬ββββββββββββ
β β’ ALL Comments β β
β β’ Related Tickets β β
βββββββββββββ¬ββββββββββββ β
β β
βββββββββββββββββ¬ββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β Spawn 8 Reviewers in Parallel β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 1. Requirements Reviewer β β
β β β’ Matches acceptance criteriaβ β
β β β’ Fulfills user stories β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 2. Security Reviewer β β
β β β’ OWASP Top 10 check β β
β β β’ SQL injection, XSS, etc. β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 3. Performance Reviewer β β
β β β’ N+1 queries β β
β β β’ Inefficient algorithms β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 4. Code Quality Reviewer β β
β β β’ Patterns, maintainability β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 5. Test Reviewer β β
β β β’ Coverage, edge cases β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 6. Breaking Changes Reviewer β β
β β β’ API changes, deprecations β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 7. Database Reviewer β β
β β β’ Schema changes, migrations β β
β βββββββββββββββββββββββββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββ β
β β 8. Integration Reviewer β β
β β β’ Service boundaries β β
β βββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββ
β 7-Layer Voting System β
β (Eliminates false positives) β
β β
β Each finding must pass: β
β 1. Evidence exists in code β
β 2. Severity justified β
β 3. Not a false positive β
β 4. Actionable recommendation β
β 5. Aligned with ticket requirements β
β 6. Not already addressed in comments β
β 7. Actually matters for this PR β
βββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββ
β Generate Markdown β
β Report: β
β β’ Summary β
β β’ High severity β
β β’ Medium severity β
β β’ Low severity β
β β’ Positive findings β
βββββββββββββ¬ββββββββββββ
β
βΌ
βββββββββ
β Done β
βββββββββ
Best for: Keeping docs aligned with code
/update_docsWhat it does:
- Spawns multiple documentation-writer agents in parallel
- Updates CLAUDE.md, README.md, QUICKREF.md, skills
- Validates accuracy against actual code
- Follows AI documentation best practices (tables over prose, concise, scannable)
Skills are AI expertise modules that load automatically based on task context. No manual invocation needed.
| Category | Skills | Use When |
|---|---|---|
| Python (6) | python-style, python-linting, python-packaging, async-python, testing-standards, debugging-strategies | Writing/debugging Python code |
| Git & Workflows (3) | git-workflows, test-driven-development, code-review-patterns | Git operations, TDD, PR reviews |
| DevOps (3) | ci-cd-pipelines, docker-optimization, kubernetes-patterns | CI/CD setup, containerization |
| API & Database (3) | api-design-patterns, database-design-patterns, mongodb-aggregation-optimization | API design, schema design |
| Quality (4) | code-refactoring, mutation-testing, vulnerability-triage, performance-profiling | Code quality, security, performance |
| Automation (4) | gitlab-scripts, jira-scripts, mcp-integration, orchestration-workflow | GitLab/Jira automation |
| Meta (3) | agent-prompting, ai-documentation, skill-authoring | Creating docs, skills, agents |
| Frontend (1) | frontend-patterns | React/Vue/TypeScript |
- Automatic Discovery: Claude loads skills based on their descriptions when relevant
- Progressive Disclosure: Core patterns in SKILL.md, details in reference.md
- Token Efficient: ~30-50 tokens until fully loaded
- Composable: Skills work together (see
~/.claude/skills/README.mdfor synergies)
Skills load automatically when you work on relevant tasks:
# Writing Python code β Loads: python-style, python-linting
# Writing tests β Loads: testing-standards, test-driven-development
# PR review β Loads: code-review-patterns, gitlab-scripts, jira-scripts
# Spawning agents β Loads: agent-prompting (MANDATORY before sub-agents)See skills/README.md for complete skill catalog and synergies.
Lightweight bash scripts that replace token-heavy MCP servers.
| Tool | Functions | Tokens | Scripts | Script Tokens | Savings |
|---|---|---|---|---|---|
| GitLab MCP | 82 | 80,000 | 6 | ~1,000 | 98.75% |
| Jira MCP | 30 | 40,000 | 7 | ~1,750 | 95.6% |
| Combined | 112 | 120,000 | 13 | ~2,750 | 97.7% |
Located in ~/.claude/scripts/:
gitlab-mr-comments- Fetch all MR discussions (formatted markdown)gitlab-list-mrs- List merge requests with filtersgitlab-create-mr- Create new merge requestgitlab-comment-mr- Add MR commentgitlab-update-mr- Update MR metadata (title, description, labels)gitlab-inline-comment- Add inline code review commentsgit-worktree- Smart worktree manager for parallel development
jira-get-issue- Fetch comprehensive ticket context (description, acceptance criteria, developer checklist, test plan, ALL comments, related ticket details)jira-list-tickets- List tickets with filtersjira-list-sprint- Show current sprintjira-create-ticket- Create new ticketjira-comment-ticket- Add commentjira-update-ticket- Update ticket fieldsjira-log-work- Log time (supports2h 30m,1d 4hformat)jira-link-tickets- Link tickets with relationships
# GitLab
cp ~/.claude/scripts/.gitlab-credentials.example ~/.claude/scripts/.gitlab-credentials
vim ~/.claude/scripts/.gitlab-credentials
# Add: GITLAB_PERSONAL_ACCESS_TOKEN, GITLAB_API_URL, GITLAB_PROJECT_ID
# Jira
cp ~/.claude/scripts/.jira-credentials.example ~/.claude/scripts/.jira-credentials
vim ~/.claude/scripts/.jira-credentials
# Add: ATLASSIAN_API_TOKEN, ATLASSIAN_SITE_NAME, ATLASSIAN_USER_EMAILSee scripts/README.md for complete documentation.
Event-driven automation that runs at specific points in the workflow.
PostToolUse Hooks (in settings.json):
- Edit/MultiEdit/Write β
auto-format.sh- Runs
ruff formaton Python files - Runs
prettieron JS/TS files - Auto-formats on every code change
- Runs
PreCommit Hook (Git):
hooks/pre-commit-validation.sh- Validates code against anti-patterns
- Checks security patterns
- Blocks commits with issues
Hooks in ~/.claude/hooks/:
auto-format.sh- Auto-formatting for Python/JS/TSpre-commit-validation.sh- Git pre-commit quality gatespatterns/- Pattern definitions (anti-patterns, security, complexity)archive/- Deprecated hooks (PRISM integration, old validators)transcript_parsing/- Session analysis tools
Reusable formats for specs, reviews, and documentation.
Located in ~/.claude/templates/:
spec-minimal.md- For/solo(BUILD spec)spec-full.md- For/conduct(SPEC.md with 10 sections)
pr-review-requirements.md- Requirements compliancepr-review-security.md- OWASP Top 10 security reviewpr-review-performance.md- Performance analysispr-review-code-analysis.md- Code quality patternspr-review-tests.md- Test coverage and qualitypr-review-ripple-*.md- Breaking changes, DB impacts, integration impactspr-review-verification.md- Evidence-based verification
operational.md- Algorithms (fix-validate loops, dependency resolution)agent-responses.md- Structured agent output formats (NO prose)
INVARIANTS.md- Project invariants documentationGOTCHAS_TEMPLATE.md- Gotcha documentation pattern
~/.claude/
βββ CLAUDE.md # Core work contract (principles, quality gates)
βββ README.md # This file (human documentation)
βββ settings.json # Claude Code settings (hooks, output style)
β
βββ commands/ # Slash commands (orchestration)
β βββ solo.md # /solo - streamlined implementation
β βββ spec.md # /spec - discovery & planning
β βββ conduct.md # /conduct - multi-component orchestration
β βββ pr_review.md # /pr_review - comprehensive PR review
β βββ update_docs.md # /update_docs - documentation sync
β βββ coda.md # /coda - session summary
β
βββ skills/ # 32 domain skills (auto-loaded)
β βββ README.md # Skill catalog and synergies
β βββ python-style/ # Python coding standards
β βββ python-linting/ # Ruff/pyright usage
β βββ testing-standards/ # Test organization (3-layer pyramid)
β βββ agent-prompting/ # Sub-agent delegation (MANDATORY)
β βββ git-workflows/ # Advanced Git (rebase, bisect, worktrees)
β βββ gitlab-scripts/ # GitLab automation
β βββ jira-scripts/ # Jira integration
β βββ [27 more skills...]
β
βββ scripts/ # Automation scripts (GitLab/Jira)
β βββ README.md # Script documentation
β βββ gitlab-mr-comments # Fetch MR comments
β βββ gitlab-inline-comment # Add inline code review
β βββ jira-get-issue # Fetch full ticket context
β βββ [10 more scripts...]
β βββ .gitlab-credentials # GitLab API credentials (gitignored)
β βββ .jira-credentials # Jira API credentials (gitignored)
β
βββ hooks/ # Event-driven automation
β βββ auto-format.sh # Auto-format on Edit/Write
β βββ pre-commit-validation.sh # Git pre-commit quality gates
β βββ patterns/ # Pattern definitions
β
βββ templates/ # Reusable formats
β βββ spec-*.md # Spec templates (minimal/full)
β βββ pr-review-*.md # Review templates (8 reviewers)
β βββ operational.md # Algorithms
β βββ agent-responses.md # Structured outputs
β
βββ docs/ # Core documentation
β βββ OVERVIEW.md # System architecture (this file context)
β βββ ORCHESTRATION_GUIDE.md # Command decision tree
β βββ TESTING_STANDARDS.md # Test requirements (95% coverage)
β βββ AI_DOCUMENTATION_STANDARDS.md
β βββ MCP_SETUP_INSTRUCTIONS.md
β βββ llms.txt # Documentation index for AI
β
βββ orchestration/ # Orchestration instructions
β βββ SPEC_INSTRUCTIONS.md # Discovery phase (for /spec)
β βββ CONDUCT_INSTRUCTIONS.md # Execution phase (for /conduct)
β βββ ORCHESTRATOR_PATTERN.md # General orchestration principles
β
βββ configs/ # Language tool configs (fallbacks)
β βββ ruff.toml # Python linting
β βββ .prettierrc # JS/TS formatting
β βββ .golangci.yml # Go linting
β
βββ .claude/settings.local.json # Local Claude Code settings
βββ statusline-command.sh # Custom status line
βββ [session data...] # History, todos, debug logs
{
"hooks": {
"PostToolUse": [
{ "matcher": "Edit", "hooks": [{ "command": "~/.claude/hooks/auto-format.sh" }] },
{ "matcher": "Write", "hooks": [{ "command": "~/.claude/hooks/auto-format.sh" }] }
]
},
"statusLine": { "command": "~/.claude/statusline-command.sh" },
"outputStyle": "daily_driver",
"alwaysThinkingEnabled": true,
"permissions": { "defaultMode": "bypassPermissions" }
}Core principles that override default behavior:
- RUN HOT: Use full 200K token budget for thorough work
- NO PARTIAL WORK: Full implementation or explain why blocked
- FAIL LOUD: Errors surface with clear messages (never silent failures)
- QUALITY GATES: Tests + linting pass before claiming done
- MULTIEDIT FOR SAME FILE: Avoid parallel Edit race conditions
- NO MASS UPDATES: Use sub-agents, not scripts (manual = eyes on each change)
See CLAUDE.md for complete work contract.
Create CLAUDE.md in any project root to override global settings:
cd ~/my-project
cat > CLAUDE.md <<EOF
# Project-Specific Rules
## Override Global Settings
- Use 100 char line length (not 80)
- Use Jest (not pytest)
- Never use TypeScript `any` type
## Project Context
- Monorepo with 15 packages
- Nx build system
- GraphQL + REST hybrid API
EOFCross-session learning system that remembers patterns and decisions.
- Stores semantic code changes (added_error_handling, bug_fix, refactoring)
- Captures agent discoveries (patterns, decisions, gotchas)
- Detects user preferences (repeated corrections β enforced rules)
- Injects relevant context into prompts and agent launches
- Promotes patterns across tiers (WORKING β LONGTERM β ANCHORS)
- ANCHORS: Critical rules (violations block execution)
- LONGTERM: Stable patterns (3+ uses or 85%+ confidence)
- WORKING: Session-specific (cleared between sessions)
- EPISODIC: Recent events (time-based decay)
PRISM requires separate MCP server setup:
# Clone PRISM MCP
git clone <prism-mcp-repo> ~/repos/claude_mcp/prism_mcp
# Start PRISM services (Redis, Neo4j, Qdrant)
cd ~/repos/claude_mcp/prism_mcp
nerdctl compose up -d
# Verify PRISM running
curl http://localhost:8090/healthSee docs/MCP_SETUP_INSTRUCTIONS.md for complete setup.
Note: PRISM is optional. All orchestration commands work without it.
Configured in settings.json: "outputStyle": "daily_driver"
Personality: Witty companion who gets shit done
- Brutally honest and direct
- Casual tone with humor
- Concise explanations (no fluff)
- No code snippets (describes what code does verbally)
- Validates before claiming things work
Example Output:
Found 47 TODO comments from 2019. Someone was optimistic.
Spawning 6 reviewers in parallel. Code review by committee, but they can't argue.
This variable is called `data2_final_ACTUAL_final`. I have questions.
This configuration follows AI documentation best practices:
- Concise over comprehensive (agents can read code)
- Structure over prose (tables/bullets over paragraphs)
- Location over explanation (file:line references)
- Hierarchical CLAUDE.md (100-200 line rule, no duplication)
- CLAUDE.md - Core patterns and rules (100-200 lines)
- OVERVIEW.md - System architecture and navigation
- QUICKREF.md - Deep-dive examples and code snippets
- BUSINESS_RULES.md - Authoritative business logic catalog
- llms.txt - Documentation index for AI agents
See docs/AI_DOCUMENTATION_STANDARDS.md for complete guide.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude Code Orchestration β
β (Multi-Agent Architecture) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
User Request
β
βΌ
βββββββββββββββββββββββββββββββββββββββ
β Main Orchestrator (Sonnet 4.5) β
β β’ Analyzes task complexity β
β β’ Chooses orchestration command β
β β’ Loads agent-prompting skill β
β β’ Delegates to specialized agents β
βββββββββββββββββ¬ββββββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ
β /solo β β /spec β β /conduct β
β β β β β β
β β’ 1-3 files β β β’ Discovery β β β’ Multi- β
β β’ Clear req β β β’ Spike test β β component β
β β’ Standard β β β’ Create β β β’ Dependency β
β patterns β β SPEC.md β β aware β
ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββ¬ββββββββ
β β β
β ββββββββββ¬βββββββββ
β β
βΌ βΌ
ββββββββββββββββββββββββββββββββββββββββββββ
β Specialized Agents (Parallel) β
β β
β ββββββββββββββββββββββββββββββββββββββ β
β β Implementation Agents β β
β β β’ skeleton-builder β β
β β β’ implementation-executor β β
β β β’ test-implementer β β
β ββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββ β
β β Validation Agents (6 in parallel) β β
β β β’ security-auditor β β
β β β’ performance-optimizer β β
β β β’ code-reviewer (3x) β β
β ββββββββββββββββββββββββββββββββββββββ β
β β
β ββββββββββββββββββββββββββββββββββββββ β
β β Utility Agents β β
β β β’ fix-executor (for failures) β β
β β β’ spike-tester (validation) β β
β β β’ documentation-writer β β
β ββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Quality Gates β
β β
β β’ Linting: ruff β
β β’ Type check: pyrightβ
β β’ Tests: 95%+ cov β
β β’ Security: OWASP β
β β’ Performance: N+1 β
ββββββββββββ¬ββββββββββββ
β
ββββββββ΄βββββββ
β β
PASS FAIL
β β
β βΌ
β ββββββββββββββββ
β β fix-executor β
β β (max 3 loops)β
β ββββββββ¬ββββββββ
β β
βββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Documentation β
β β’ Update CLAUDE.md β
β β’ Update README β
β β’ Update skills β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββββββββββββββββ
β Cleanup & Commit β
β β’ Remove .spec/ β
β β’ Git commit β
β β’ Claude co-author β
ββββββββββββ¬ββββββββββββ
β
βΌ
ββββββββββ
β Done β
ββββββββββ
Parallel Execution Example:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Main Orchestrator sends single message with 6 Task calls: β
β β
β Task(security-auditor, ...) βββββ β
β Task(performance-optimizer, ...)β All execute β
β Task(code-reviewer, ...)βββββββββ€ simultaneously β
β Task(code-reviewer, ...)βββββββββ€ (token efficient) β
β Task(code-reviewer, ...)βββββββββ€ β
β Task(style-reviewer, ...) βββββββ β
β β
β Results aggregated β single validation report β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
/solo add rate limiting middleware to API
# What happens:
# 1. Creates .spec/BUILD_rate-limit.md (minimal spec)
# 2. Spawns implementation-executor agent
# 3. Spawns test-implementer agent
# 4. Validates with 6 reviewers (security, performance, code quality)
# 5. Runs pytest with coverage (95%+ required)
# 6. Merges learnings into permanent docs
# 7. Cleans up .spec//spec design event-driven system with gRPC
# Discovery phase:
# 1. Asks clarifying questions
# 2. Investigates existing code
# 3. Identifies concerns/risks
# 4. Spike tests approaches in /tmp
# 5. Creates .spec/SPEC.md
/conduct
# Execution phase:
# 1. Parses SPEC.md β dependency graph
# 2. Implements components in order
# 3. Per-component validation
# 4. Integration testing
# 5. Final documentation/pr_review INT-3877
# What happens:
# 1. Fetches full Jira context (ticket + related tickets + comments)
# 2. Fetches all MR comments
# 3. Spawns 8 reviewers in parallel
# 4. Applies 7-layer voting system (eliminates false positives)
# 5. Outputs structured markdown report/update_docs
# What happens:
# 1. Spawns parallel documentation-writer agents
# 2. Updates CLAUDE.md, README.md, skills
# 3. Validates against actual code
# 4. Follows AI documentation standards# Check hook configuration
cat ~/.claude/settings.json | jq '.hooks'
# Check hook permissions
ls -la ~/.claude/hooks/*.sh
# Test hook manually
~/.claude/hooks/auto-format.sh Edit test.py# Missing credentials
# Error: "β Credentials file not found"
cp ~/.claude/scripts/.gitlab-credentials.example ~/.claude/scripts/.gitlab-credentials
vim ~/.claude/scripts/.gitlab-credentials
# Test script
~/.claude/scripts/gitlab-mr-comments INT-3877
echo $? # Should be 0# Check progress
cat .spec/PROGRESS.md
# Check agent output
# Look for ESCALATE or BLOCKED messages in response# Verify PRISM running
curl http://localhost:8090/health
# Restart PRISM
cd ~/repos/claude_mcp/prism_mcp
nerdctl compose restart-
For Users:
docs/ORCHESTRATION_GUIDE.md- Command decision treeskills/README.md- Skill catalog and synergiesscripts/README.md- Script documentationdocs/TESTING_STANDARDS.md- Test requirements
-
For AI Agents:
docs/OVERVIEW.md- System architecturedocs/llms.txt- Documentation indexorchestration/- Orchestration instructionstemplates/- Spec and response formats
-
For Developers:
docs/AI_DOCUMENTATION_STANDARDS.md- Writing AI-friendly docsdocs/MCP_SETUP_INSTRUCTIONS.md- MCP server setuphooks/HOOKS_IDEAS.md- Hook development ideas
cd ~/.claude/skills
mkdir my-new-skill
cd my-new-skill
cat > SKILL.md <<EOF
---
name: my-new-skill
description: Brief description (includes "Use when...")
---
# My New Skill
[Skill content following skill-authoring guidelines]
EOFSee skill-authoring skill for complete guidelines.
cd ~/.claude/scripts
# Use template from scripts/README.md
# Follow exit code conventions: 0=success, 1=args, 2=not found, 3=API error, 4=credsEdit command files in ~/.claude/commands/:
solo.md- Streamlined implementationspec.md- Discovery & planningconduct.md- Multi-component orchestration
Token Efficiency:
- Scripts vs MCP: 97.7% token savings (120,000 β 2,750 tokens)
- PR Review workflow: 119,550 tokens saved per review
Quality Gates:
- 6 parallel reviewers: security, performance, code quality (3x), style, docs
- 7-layer voting system eliminates false positives
- 95%+ test coverage required
- Zero linting errors before completion
Productivity:
/solo: 10-20k tokens, 5-15 min for simple features/spec+/conduct: 50k+ tokens, 30-60 min for complex features/pr_review: 30-60k tokens, 10-20 min for comprehensive review
Personal configuration - use and modify as you see fit.
Built on top of Claude Code by Anthropic.
Inspired by:
- AI documentation best practices
- Multi-agent orchestration patterns
- Semantic memory systems (PRISM)
- GitLab/Jira API efficiency
Version: 2.0 (October 2025) Last Updated: 2025-10-27 Claude Model: Sonnet 4.5