# Claude Code Configuration

This project uses the MyAIDev Method — a skills-based AI development framework.

## Skills (`.claude/skills/`)

Skills are the primary delivery mechanism. Each skill is a self-contained orchestrator with its own subagents.

### Product Planning

Start here when the work is still a notion rather than a task. Each stage writes durable,
git-tracked artifacts to `docs/product/`.

- `myaidev-discover` - Interactive discovery → project constitution + brief
- `myaidev-prd` - Brief → PRD, epics, and sharded story files, gated by the constitution
- `myaidev-story` - Draft, refresh, and gate a single story

```
docs/product/
├── constitution.md   # project non-negotiables, enforced by every gate
├── brief.md          # the problem worth solving
├── prd.md            # FR-n / NFR-n with acceptance criteria
├── epics/            # sequenced bodies of work
├── stories/          # the unit of work — one story, one spec, one branch
└── backlog.json      # derived index
```

### Development

**Recommended entry point**: `/myaidev-workflow` orchestrates the full pipeline.

Work enters at whatever size it actually is:

| Input | Entry point |
|-------|-------------|
| A vague notion | `/myaidev-discover` |
| A clear idea | `/myaidev-prd` |
| A story from the backlog | `/myaidev-workflow --story 1.2` |
| A small change | `/myaidev-workflow "fix the thing"` |

#### Core Pipeline
- `myaidev-workflow` - Multi-agent orchestrator with feedback loops, project profiles, TDD mode, story input
- `myaidev-architect` - System architecture design with requirements analysis and compliance checking
- `myaidev-coder` - Pattern-aware code implementation with convention detection and self-review
- `myaidev-tester` - Test generation with TDD support (London/Chicago styles) and coverage analysis
- `myaidev-reviewer` - Code review with auto-fix capability, security scanning, and quality gates
- `myaidev-documenter` - Documentation generation with code analysis, writing, and validation

#### Standalone Development Tools
- `myaidev-analyze` - Deep codebase analysis: patterns, conventions, tech stack, dependencies, risks
- `myaidev-debug` - Systematic debugging with hypothesis testing and root cause analysis
- `myaidev-refactor` - Code smell detection, safe refactoring planning, and regression guarding
- `myaidev-performance` - Performance profiling, optimization, and before/after benchmarking
- `myaidev-migrate` - Framework upgrades, schema migrations, dependency swaps, pattern transitions

## Agents (`.claude/agents/`)

Invocable subagents, installed alongside the skills. Skills orchestrate multi-agent
pipelines; these agents do one job well and can be called directly.

| Agent | Role |
|-------|------|
| `dev-architect` | Component design, contracts, data models |
| `dev-coder` | Implementation in the codebase's own conventions |
| `dev-tester` | Tests, execution, real coverage |
| `dev-reviewer` | Correctness, security, convention review |
| `dev-documenter` | Documentation sourced from the code |
| `dev-debugger` | Hypothesis-driven root cause analysis |

## Commands (`.claude/commands/`)

| Command | Runs |
|---------|------|
| `/myai-dev-workflow` | Full pipeline, from a task or a backlog story |
| `/myai-dev-discover` | Discovery → constitution + brief |
| `/myai-dev-prd` | Brief → PRD, epics, gated stories |
| `/myai-dev-story` | One story, drafted and gated |
| `/myai-dev-architect` `/myai-dev-code` `/myai-dev-test` `/myai-dev-review` `/myai-dev-docs` | Single pipeline stages |

### Content Creation
- `myai-content-writer` - Multi-agent pipeline (research, plan, write, SEO, edit, visuals)
- `myai-content-rules-setup` - Interactive brand voice configuration
- `myai-content-verifier` - Content uniqueness and quality verification
- `myai-proprietary-content-verifier` - Pre-production content stub verification and scoring
- `myai-content-production-coordinator` - End-to-end content pipeline orchestrator
- `myai-content-ideation` - Research-driven topic discovery and article planning
- `myai-content-enrichment` - Enrich articles with real-time data and visuals

### Publishing
- `content-publisher` - Platform-detecting publisher (WordPress, PayloadCMS, Astro, Docusaurus, Mintlify)

### Visual & Media
- `myai-visual-generator` - AI image/video generation (Gemini, DALL-E, FLUX, Veo) with fal.ai MCP model discovery

### Deployment & Infrastructure
- `deployer` - Multi-environment deployment (dev/staging/prod)
- `coolify-deployer` - Coolify PaaS deployment
- `openstack-manager` - OpenStack VM management

### Git & CI/CD
- `git-workflow` - PRs, releases, hotfixes, branch sync

### Security
- `security-tester` - Penetration testing (PTES methodology)
- `security-auditor` - Compliance auditing (PCI-DSS, GDPR, SOC 2)

### Skill Development
- `myai-skill-builder` - Guided skill creation with concept discovery, iterative refinement, testing, and marketplace submission
- `skill-contributor` - Quick skill scaffolding and marketplace submission

### Configuration
- `configure` - Interactive environment setup wizard

## Content Customization

- **content-rules.md** - Brand voice and writing guidelines
  - Run the `content-rules-config` skill to generate this interactively

## Platform Configuration

Run the `configure` skill to set up credentials, or manually edit `.env`:

```bash
# WordPress
WORDPRESS_URL=https://your-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=your-app-password

# PayloadCMS
PAYLOADCMS_URL=https://cms.your-site.com
PAYLOADCMS_EMAIL=your-email
PAYLOADCMS_PASSWORD=your-password

# Visual APIs
GOOGLE_API_KEY=your-key
OPENAI_API_KEY=your-key
FAL_KEY=your-key

# Coolify
COOLIFY_URL=https://coolify.your-server.com
COOLIFY_API_KEY=your-key
```

## Scripts and Utilities

The `.myaidev-method/` directory contains helper scripts that skills can invoke:

```bash
node .myaidev-method/scripts/payloadcms-publish.js "article.md"
node .myaidev-method/scripts/wordpress-health-check.js
node .myaidev-method/scripts/coolify-deploy-app.js --name myapp
```

## MCP Servers

The following MCP servers are auto-configured during init:

| Server | Purpose | Env Var Required |
|--------|---------|------------------|
| `fal-ai` | Visual generation model discovery, pricing, and generation across 600+ models | `FAL_KEY` |

MCP servers activate automatically when their required environment variable is set.

## Project Structure

```
.claude/
├── skills/              # All skill definitions (SKILL.md + agents/)
├── mcp/                 # MCP server configurations
└── CLAUDE.md            # This file
.myaidev-method/
├── scripts/             # Publishing and deployment scripts
├── lib/                 # Utility libraries
└── package.json         # Script dependencies
```

## Updating

```bash
npx myaidev-method@latest update --claude        # Interactive update
npx myaidev-method@latest update --claude --force # Force overwrite
npx myaidev-method@latest update --claude --dry-run # Preview changes
```

See `USER_GUIDE.md` for detailed instructions.
