{"owner":"joemccann","repo":"dillinger","hasSkills":true,"totalSkillsCount":126,"totalTokensCount":153291,"categories":["anthropic-skill","copilot-instructions","claude-rule","root-instruction","plugin-manifest"],"hasMcp":false,"mcpConfig":null,"found":[".agent/skills/api-patterns/SKILL.md",".agent/skills/api-patterns/api-style.md",".agent/skills/api-patterns/auth.md",".agent/skills/api-patterns/documentation.md",".agent/skills/api-patterns/graphql.md",".agent/skills/api-patterns/rate-limiting.md",".agent/skills/api-patterns/response.md",".agent/skills/api-patterns/rest.md",".agent/skills/api-patterns/security-testing.md",".agent/skills/api-patterns/trpc.md",".agent/skills/api-patterns/versioning.md",".agent/skills/app-builder/SKILL.md",".agent/skills/app-builder/agent-coordination.md",".agent/skills/app-builder/feature-building.md",".agent/skills/app-builder/project-detection.md",".agent/skills/app-builder/scaffolding.md",".agent/skills/app-builder/tech-stack.md",".agent/skills/app-builder/templates/SKILL.md",".agent/skills/app-builder/templates/astro-static/TEMPLATE.md",".agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md",".agent/skills/app-builder/templates/cli-tool/TEMPLATE.md",".agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md",".agent/skills/app-builder/templates/express-api/TEMPLATE.md",".agent/skills/app-builder/templates/flutter-app/TEMPLATE.md",".agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md",".agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md",".agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md",".agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md",".agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md",".agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md",".agent/skills/app-builder/templates/react-native-app/TEMPLATE.md",".agent/skills/architecture/SKILL.md",".agent/skills/architecture/context-discovery.md",".agent/skills/architecture/examples.md",".agent/skills/architecture/pattern-selection.md",".agent/skills/architecture/patterns-reference.md",".agent/skills/architecture/trade-off-analysis.md",".agent/skills/bash-linux/SKILL.md",".agent/skills/behavioral-modes/SKILL.md",".agent/skills/brainstorming/SKILL.md",".agent/skills/brainstorming/dynamic-questioning.md",".agent/skills/clean-code/SKILL.md",".agent/skills/code-review-checklist/SKILL.md",".agent/skills/database-design/SKILL.md",".agent/skills/database-design/database-selection.md",".agent/skills/database-design/indexing.md",".agent/skills/database-design/migrations.md",".agent/skills/database-design/optimization.md",".agent/skills/database-design/orm-selection.md",".agent/skills/database-design/schema-design.md",".agent/skills/deployment-procedures/SKILL.md",".agent/skills/doc.md",".agent/skills/docker-expert/SKILL.md",".agent/skills/documentation-templates/SKILL.md",".agent/skills/frontend-design/SKILL.md",".agent/skills/frontend-design/animation-guide.md",".agent/skills/frontend-design/color-system.md",".agent/skills/frontend-design/decision-trees.md",".agent/skills/frontend-design/motion-graphics.md",".agent/skills/frontend-design/typography-system.md",".agent/skills/frontend-design/ux-psychology.md",".agent/skills/frontend-design/visual-effects.md",".agent/skills/game-development/2d-games/SKILL.md",".agent/skills/game-development/3d-games/SKILL.md",".agent/skills/game-development/SKILL.md",".agent/skills/game-development/game-art/SKILL.md",".agent/skills/game-development/game-audio/SKILL.md",".agent/skills/game-development/game-design/SKILL.md",".agent/skills/game-development/mobile-games/SKILL.md",".agent/skills/game-development/multiplayer/SKILL.md",".agent/skills/game-development/pc-games/SKILL.md",".agent/skills/game-development/vr-ar/SKILL.md",".agent/skills/game-development/web-games/SKILL.md",".agent/skills/geo-fundamentals/SKILL.md",".agent/skills/i18n-localization/SKILL.md",".agent/skills/lint-and-validate/SKILL.md",".agent/skills/mcp-builder/SKILL.md",".agent/skills/mobile-design/SKILL.md",".agent/skills/mobile-design/decision-trees.md",".agent/skills/mobile-design/mobile-backend.md",".agent/skills/mobile-design/mobile-color-system.md",".agent/skills/mobile-design/mobile-debugging.md",".agent/skills/mobile-design/mobile-design-thinking.md",".agent/skills/mobile-design/mobile-navigation.md",".agent/skills/mobile-design/mobile-performance.md",".agent/skills/mobile-design/mobile-testing.md",".agent/skills/mobile-design/mobile-typography.md",".agent/skills/mobile-design/platform-android.md",".agent/skills/mobile-design/platform-ios.md",".agent/skills/mobile-design/touch-psychology.md",".agent/skills/nestjs-expert/SKILL.md",".agent/skills/nextjs-best-practices/SKILL.md",".agent/skills/nodejs-best-practices/SKILL.md",".agent/skills/parallel-agents/SKILL.md",".agent/skills/performance-profiling/SKILL.md",".agent/skills/plan-writing/SKILL.md",".agent/skills/powershell-windows/SKILL.md",".agent/skills/prisma-expert/SKILL.md",".agent/skills/python-patterns/SKILL.md",".agent/skills/react-patterns/SKILL.md",".agent/skills/red-team-tactics/SKILL.md",".agent/skills/seo-fundamentals/SKILL.md",".agent/skills/server-management/SKILL.md",".agent/skills/systematic-debugging/SKILL.md",".agent/skills/tailwind-patterns/SKILL.md",".agent/skills/tdd-workflow/SKILL.md",".agent/skills/testing-patterns/SKILL.md",".agent/skills/typescript-expert/SKILL.md",".agent/skills/typescript-expert/references/tsconfig-strict.json",".agent/skills/typescript-expert/references/typescript-cheatsheet.md",".agent/skills/ui-ux-pro-max/SKILL.md",".agent/skills/vulnerability-scanner/SKILL.md",".agent/skills/vulnerability-scanner/checklists.md",".agent/skills/webapp-testing/SKILL.md",".github/copilot-instructions.md","CLAUDE.md","app/CLAUDE.md","docs/AGENTS.md","docs/CLAUDE.md","hooks/CLAUDE.md","lib/CLAUDE.md","packages/cli/README.md","packages/mcp/README.md","public/.well-known/ai-plugin.json","public/llms.txt","stores/CLAUDE.md"],"skills":{".agent/skills/api-patterns/SKILL.md":"---\nname: api-patterns\ndescription: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.\nallowed-tools: Read, Write, Edit, Glob, Grep\n---\n\n# API Patterns\n\n> API design principles and decision-making for 2025.\n> **Learn to THINK, not copy fixed patterns.**\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n---\n\n## 📑 Content Map\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |\n| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |\n| `response.md` | Envelope pattern, error format, pagination | Response structure |\n| `graphql.md` | Schema design, when to use, security | Considering GraphQL |\n| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |\n| `versioning.md` | URI/Header/Query versioning | API evolution planning |\n| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |\n| `rate-limiting.md` | Token bucket, sliding window | API protection |\n| `documentation.md` | OpenAPI/Swagger best practices | Documentation |\n| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |\n\n---\n\n## 🔗 Related Skills\n\n| Need | Skill |\n|------|-------|\n| API implementation | `@[skills/backend-development]` |\n| Data structure | `@[skills/database-design]` |\n| Security details | `@[skills/security-hardening]` |\n\n---\n\n## ✅ Decision Checklist\n\nBefore designing an API:\n\n- [ ] **Asked user about API consumers?**\n- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)\n- [ ] **Defined consistent response format?**\n- [ ] **Planned versioning strategy?**\n- [ ] **Considered authentication needs?**\n- [ ] **Planned rate limiting?**\n- [ ] **Documentation approach defined?**\n\n---\n\n## ❌ Anti-Patterns\n\n**DON'T:**\n- Default to REST for everything\n- Use verbs in REST endpoints (/getUsers)\n- Return inconsistent response formats\n- Expose internal errors to clients\n- Skip rate limiting\n\n**DO:**\n- Choose API style based on context\n- Ask about client requirements\n- Document thoroughly\n- Use appropriate status codes\n\n---\n\n## Script\n\n| Script | Purpose | Command |\n|--------|---------|---------|\n| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |\n\n",".agent/skills/api-patterns/api-style.md":"# API Style Selection (2025)\n\n> REST vs GraphQL vs tRPC - Hangi durumda hangisi?\n\n## Decision Tree\n\n```\nWho are the API consumers?\n│\n├── Public API / Multiple platforms\n│   └── REST + OpenAPI (widest compatibility)\n│\n├── Complex data needs / Multiple frontends\n│   └── GraphQL (flexible queries)\n│\n├── TypeScript frontend + backend (monorepo)\n│   └── tRPC (end-to-end type safety)\n│\n├── Real-time / Event-driven\n│   └── WebSocket + AsyncAPI\n│\n└── Internal microservices\n    └── gRPC (performance) or REST (simplicity)\n```\n\n## Comparison\n\n| Factor | REST | GraphQL | tRPC |\n|--------|------|---------|------|\n| **Best for** | Public APIs | Complex apps | TS monorepos |\n| **Learning curve** | Low | Medium | Low (if TS) |\n| **Over/under fetching** | Common | Solved | Solved |\n| **Type safety** | Manual (OpenAPI) | Schema-based | Automatic |\n| **Caching** | HTTP native | Complex | Client-based |\n\n## Selection Questions\n\n1. Who are the API consumers?\n2. Is the frontend TypeScript?\n3. How complex are the data relationships?\n4. Is caching critical?\n5. Public or internal API?\n",".agent/skills/api-patterns/auth.md":"# Authentication Patterns\n\n> Choose auth pattern based on use case.\n\n## Selection Guide\n\n| Pattern | Best For |\n|---------|----------|\n| **JWT** | Stateless, microservices |\n| **Session** | Traditional web, simple |\n| **OAuth 2.0** | Third-party integration |\n| **API Keys** | Server-to-server, public APIs |\n| **Passkey** | Modern passwordless (2025+) |\n\n## JWT Principles\n\n```\nImportant:\n├── Always verify signature\n├── Check expiration\n├── Include minimal claims\n├── Use short expiry + refresh tokens\n└── Never store sensitive data in JWT\n```\n",".agent/skills/api-patterns/documentation.md":"# API Documentation Principles\n\n> Good docs = happy developers = API adoption.\n\n## OpenAPI/Swagger Essentials\n\n```\nInclude:\n├── All endpoints with examples\n├── Request/response schemas\n├── Authentication requirements\n├── Error response formats\n└── Rate limiting info\n```\n\n## Good Documentation Has\n\n```\nEssentials:\n├── Quick start / Getting started\n├── Authentication guide\n├── Complete API reference\n├── Error handling guide\n├── Code examples (multiple languages)\n└── Changelog\n```\n",".agent/skills/api-patterns/graphql.md":"# GraphQL Principles\n\n> Flexible queries for complex, interconnected data.\n\n## When to Use\n\n```\n✅ Good fit:\n├── Complex, interconnected data\n├── Multiple frontend platforms\n├── Clients need flexible queries\n├── Evolving data requirements\n└── Reducing over-fetching matters\n\n❌ Poor fit:\n├── Simple CRUD operations\n├── File upload heavy\n├── HTTP caching important\n└── Team unfamiliar with GraphQL\n```\n\n## Schema Design Principles\n\n```\nPrinciples:\n├── Think in graphs, not endpoints\n├── Design for evolvability (no versions)\n├── Use connections for pagination\n├── Be specific with types (not generic \"data\")\n└── Handle nullability thoughtfully\n```\n\n## Security Considerations\n\n```\nProtect against:\n├── Query depth attacks → Set max depth\n├── Query complexity → Calculate cost\n├── Batching abuse → Limit batch size\n├── Introspection → Disable in production\n```\n",".agent/skills/api-patterns/rate-limiting.md":"# Rate Limiting Principles\n\n> Protect your API from abuse and overload.\n\n## Why Rate Limit\n\n```\nProtect against:\n├── Brute force attacks\n├── Resource exhaustion\n├── Cost overruns (if pay-per-use)\n└── Unfair usage\n```\n\n## Strategy Selection\n\n| Type | How | When |\n|------|-----|------|\n| **Token bucket** | Burst allowed, refills over time | Most APIs |\n| **Sliding window** | Smooth distribution | Strict limits |\n| **Fixed window** | Simple counters per window | Basic needs |\n\n## Response Headers\n\n```\nInclude in headers:\n├── X-RateLimit-Limit (max requests)\n├── X-RateLimit-Remaining (requests left)\n├── X-RateLimit-Reset (when limit resets)\n└── Return 429 when exceeded\n```\n",".agent/skills/api-patterns/response.md":"# Response Format Principles\n\n> Consistency is key - choose a format and stick to it.\n\n## Common Patterns\n\n```\nChoose one:\n├── Envelope pattern ({ success, data, error })\n├── Direct data (just return the resource)\n└── HAL/JSON:API (hypermedia)\n```\n\n## Error Response\n\n```\nInclude:\n├── Error code (for programmatic handling)\n├── User message (for display)\n├── Details (for debugging, field-level errors)\n├── Request ID (for support)\n└── NOT internal details (security!)\n```\n\n## Pagination Types\n\n| Type | Best For | Trade-offs |\n|------|----------|------------|\n| **Offset** | Simple, jumpable | Performance on large datasets |\n| **Cursor** | Large datasets | Can't jump to page |\n| **Keyset** | Performance critical | Requires sortable key |\n\n### Selection Questions\n\n1. How large is the dataset?\n2. Do users need to jump to specific pages?\n3. Is data frequently changing?\n",".agent/skills/api-patterns/rest.md":"# REST Principles\n\n> Resource-based API design - nouns not verbs.\n\n## Resource Naming Rules\n\n```\nPrinciples:\n├── Use NOUNS, not verbs (resources, not actions)\n├── Use PLURAL forms (/users not /user)\n├── Use lowercase with hyphens (/user-profiles)\n├── Nest for relationships (/users/123/posts)\n└── Keep shallow (max 3 levels deep)\n```\n\n## HTTP Method Selection\n\n| Method | Purpose | Idempotent? | Body? |\n|--------|---------|-------------|-------|\n| **GET** | Read resource(s) | Yes | No |\n| **POST** | Create new resource | No | Yes |\n| **PUT** | Replace entire resource | Yes | Yes |\n| **PATCH** | Partial update | No | Yes |\n| **DELETE** | Remove resource | Yes | No |\n\n## Status Code Selection\n\n| Situation | Code | Why |\n|-----------|------|-----|\n| Success (read) | 200 | Standard success |\n| Created | 201 | New resource created |\n| No content | 204 | Success, nothing to return |\n| Bad request | 400 | Malformed request |\n| Unauthorized | 401 | Missing/invalid auth |\n| Forbidden | 403 | Valid auth, no permission |\n| Not found | 404 | Resource doesn't exist |\n| Conflict | 409 | State conflict (duplicate) |\n| Validation error | 422 | Valid syntax, invalid data |\n| Rate limited | 429 | Too many requests |\n| Server error | 500 | Our fault |\n",".agent/skills/api-patterns/security-testing.md":"# API Security Testing\n\n> Principles for testing API security. OWASP API Top 10, authentication, authorization testing.\n\n---\n\n## OWASP API Security Top 10\n\n| Vulnerability | Test Focus |\n|---------------|------------|\n| **API1: BOLA** | Access other users' resources |\n| **API2: Broken Auth** | JWT, session, credentials |\n| **API3: Property Auth** | Mass assignment, data exposure |\n| **API4: Resource Consumption** | Rate limiting, DoS |\n| **API5: Function Auth** | Admin endpoints, role bypass |\n| **API6: Business Flow** | Logic abuse, automation |\n| **API7: SSRF** | Internal network access |\n| **API8: Misconfiguration** | Debug endpoints, CORS |\n| **API9: Inventory** | Shadow APIs, old versions |\n| **API10: Unsafe Consumption** | Third-party API trust |\n\n---\n\n## Authentication Testing\n\n### JWT Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Algorithm | None, algorithm confusion |\n| Secret | Weak secrets, brute force |\n| Claims | Expiration, issuer, audience |\n| Signature | Manipulation, key injection |\n\n### Session Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Generation | Predictability |\n| Storage | Client-side security |\n| Expiration | Timeout enforcement |\n| Invalidation | Logout effectiveness |\n\n---\n\n## Authorization Testing\n\n| Test Type | Approach |\n|-----------|----------|\n| **Horizontal** | Access peer users' data |\n| **Vertical** | Access higher privilege functions |\n| **Context** | Access outside allowed scope |\n\n### BOLA/IDOR Testing\n\n1. Identify resource IDs in requests\n2. Capture request with user A's session\n3. Replay with user B's session\n4. Check for unauthorized access\n\n---\n\n## Input Validation Testing\n\n| Injection Type | Test Focus |\n|----------------|------------|\n| SQL | Query manipulation |\n| NoSQL | Document queries |\n| Command | System commands |\n| LDAP | Directory queries |\n\n**Approach:** Test all parameters, try type coercion, test boundaries, check error messages.\n\n---\n\n## Rate Limiting Testing\n\n| Aspect | Check |\n|--------|-------|\n| Existence | Is there any limit? |\n| Bypass | Headers, IP rotation |\n| Scope | Per-user, per-IP, global |\n\n**Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning.\n\n---\n\n## GraphQL Security\n\n| Test | Focus |\n|------|-------|\n| Introspection | Schema disclosure |\n| Batching | Query DoS |\n| Nesting | Depth-based DoS |\n| Authorization | Field-level access |\n\n---\n\n## Security Testing Checklist\n\n**Authentication:**\n- [ ] Test for bypass\n- [ ] Check credential strength\n- [ ] Verify token security\n\n**Authorization:**\n- [ ] Test BOLA/IDOR\n- [ ] Check privilege escalation\n- [ ] Verify function access\n\n**Input:**\n- [ ] Test all parameters\n- [ ] Check for injection\n\n**Config:**\n- [ ] Check CORS\n- [ ] Verify headers\n- [ ] Test error handling\n\n---\n\n> **Remember:** APIs are the backbone of modern apps. Test them like attackers will.\n",".agent/skills/api-patterns/trpc.md":"# tRPC Principles\n\n> End-to-end type safety for TypeScript monorepos.\n\n## When to Use\n\n```\n✅ Perfect fit:\n├── TypeScript on both ends\n├── Monorepo structure\n├── Internal tools\n├── Rapid development\n└── Type safety critical\n\n❌ Poor fit:\n├── Non-TypeScript clients\n├── Public API\n├── Need REST conventions\n└── Multiple language backends\n```\n\n## Key Benefits\n\n```\nWhy tRPC:\n├── Zero schema maintenance\n├── End-to-end type inference\n├── IDE autocomplete across stack\n├── Instant API changes reflected\n└── No code generation step\n```\n\n## Integration Patterns\n\n```\nCommon setups:\n├── Next.js + tRPC (most common)\n├── Monorepo with shared types\n├── Remix + tRPC\n└── Any TS frontend + backend\n```\n",".agent/skills/api-patterns/versioning.md":"# Versioning Strategies\n\n> Plan for API evolution from day one.\n\n## Decision Factors\n\n| Strategy | Implementation | Trade-offs |\n|----------|---------------|------------|\n| **URI** | /v1/users | Clear, easy caching |\n| **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery |\n| **Query** | ?version=1 | Easy to add, messy |\n| **None** | Evolve carefully | Best for internal, risky for public |\n\n## Versioning Philosophy\n\n```\nConsider:\n├── Public API? → Version in URI\n├── Internal only? → May not need versioning\n├── GraphQL? → Typically no versions (evolve schema)\n├── tRPC? → Types enforce compatibility\n```\n",".agent/skills/app-builder/SKILL.md":"---\nname: app-builder\ndescription: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent\n---\n\n# App Builder - Application Building Orchestrator\n\n> Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `project-detection.md` | Keyword matrix, project type detection | Starting new project |\n| `tech-stack.md` | 2025 default stack, alternatives | Choosing technologies |\n| `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work |\n| `scaffolding.md` | Directory structure, core files | Creating project structure |\n| `feature-building.md` | Feature analysis, error handling | Adding features to existing project |\n| `templates/SKILL.md` | **Project templates** | Scaffolding new project |\n\n---\n\n## 📦 Templates (13)\n\nQuick-start scaffolding for new projects. **Read the matching template only!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app |\n| [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile |\n| [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n\n---\n\n## 🔗 Related Agents\n\n| Agent | Role |\n|-------|------|\n| `project-planner` | Task breakdown, dependency graph |\n| `frontend-specialist` | UI components, pages |\n| `backend-specialist` | API, business logic |\n| `database-architect` | Schema, migrations |\n| `devops-engineer` | Deployment, preview |\n\n---\n\n## Usage Example\n\n```\nUser: \"Make an Instagram clone with photo sharing and likes\"\n\nApp Builder Process:\n1. Project type: Social Media App\n2. Tech stack: Next.js + Prisma + Cloudinary + Clerk\n3. Create plan:\n   ├─ Database schema (users, posts, likes, follows)\n   ├─ API routes (12 endpoints)\n   ├─ Pages (feed, profile, upload)\n   └─ Components (PostCard, Feed, LikeButton)\n4. Coordinate agents\n5. Report progress\n6. Start preview\n```\n",".agent/skills/app-builder/agent-coordination.md":"# Agent Coordination\n\n> How App Builder orchestrates specialist agents.\n\n## Agent Pipeline\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                   APP BUILDER (Orchestrator)                 │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     PROJECT PLANNER                          │\n│  • Task breakdown                                            │\n│  • Dependency graph                                          │\n│  • File structure planning                                   │\n│  • Create {task-slug}.md in project root (MANDATORY)             │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│              CHECKPOINT: PLAN VERIFICATION                   │\n│  🔴 VERIFY: Does {task-slug}.md exist in project root?       │\n│  🔴 If NO → STOP → Create plan file first                    │\n│  🔴 If YES → Proceed to specialist agents                    │\n└─────────────────────────────────────────────────────────────┘\n                              │\n          ┌───────────────────┼───────────────────┐\n          ▼                   ▼                   ▼\n┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐\n│ DATABASE        │ │ BACKEND         │ │ FRONTEND        │\n│ ARCHITECT       │ │ SPECIALIST      │ │ SPECIALIST      │\n│                 │ │                 │ │                 │\n│ • Schema design │ │ • API routes    │ │ • Components    │\n│ • Migrations    │ │ • Controllers   │ │ • Pages         │\n│ • Seed data     │ │ • Middleware    │ │ • Styling       │\n└─────────────────┘ └─────────────────┘ └─────────────────┘\n          │                   │                   │\n          └───────────────────┼───────────────────┘\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                 PARALLEL PHASE (Optional)                    │\n│  • Security Auditor → Vulnerability check                   │\n│  • Test Engineer → Unit tests                               │\n│  • Performance Optimizer → Bundle analysis                  │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     DEVOPS ENGINEER                          │\n│  • Environment setup                                         │\n│  • Preview deployment                                        │\n│  • Health check                                              │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Execution Order\n\n| Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT |\n|-------|----------|-----------|--------------|------------|\n| 0 | Socratic Gate | ❌ | - | ✅ Ask 3 questions |\n| 1 | Project Planner | ❌ | Questions answered | ✅ **PLAN.md created** |\n| 1.5 | **PLAN VERIFICATION** | ❌ | PLAN.md exists | ✅ **File exists in root** |\n| 2 | Database Architect | ❌ | Plan ready | Schema defined |\n| 3 | Backend Specialist | ❌ | Schema ready | API routes created |\n| 4 | Frontend Specialist | ✅ | API ready (partial) | UI components ready |\n| 5 | Security Auditor, Test Engineer | ✅ | Code ready | Tests & audit pass |\n| 6 | DevOps Engineer | ❌ | All code ready | Deployment ready |\n\n> 🔴 **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification.\n",".agent/skills/app-builder/feature-building.md":"# Feature Building\n\n> How to analyze and implement new features.\n\n## Feature Analysis\n\n```\nRequest: \"add payment system\"\n\nAnalysis:\n├── Required Changes:\n│   ├── Database: orders, payments tables\n│   ├── Backend: /api/checkout, /api/webhooks/stripe\n│   ├── Frontend: CheckoutForm, PaymentSuccess\n│   └── Config: Stripe API keys\n│\n├── Dependencies:\n│   ├── stripe package\n│   └── Existing user authentication\n│\n└── Estimated Time: 15-20 minutes\n```\n\n## Iterative Enhancement Process\n\n```\n1. Analyze existing project\n2. Create change plan\n3. Present plan to user\n4. Get approval\n5. Apply changes\n6. Test\n7. Show preview\n```\n\n## Error Handling\n\n| Error Type | Solution Strategy |\n|------------|-------------------|\n| TypeScript Error | Fix type, add missing import |\n| Missing Dependency | Run npm install |\n| Port Conflict | Suggest alternative port |\n| Database Error | Check migration, validate connection |\n\n## Recovery Strategy\n\n```\n1. Detect error\n2. Try automatic fix\n3. If failed, report to user\n4. Suggest alternative\n5. Rollback if necessary\n```\n",".agent/skills/app-builder/project-detection.md":"# Project Type Detection\n\n> Analyze user requests to determine project type and template.\n\n## Keyword Matrix\n\n| Keywords | Project Type | Template |\n|----------|--------------|----------|\n| blog, post, article | Blog | astro-static |\n| e-commerce, product, cart, payment | E-commerce | nextjs-saas |\n| dashboard, panel, management | Admin Dashboard | nextjs-fullstack |\n| api, backend, service, rest | API Service | express-api |\n| python, fastapi, django | Python API | python-fastapi |\n| mobile, android, ios, react native | Mobile App (RN) | react-native-app |\n| flutter, dart | Mobile App (Flutter) | flutter-app |\n| portfolio, personal, cv | Portfolio | nextjs-static |\n| crm, customer, sales | CRM | nextjs-fullstack |\n| saas, subscription, stripe | SaaS | nextjs-saas |\n| landing, promotional, marketing | Landing Page | nextjs-static |\n| docs, documentation | Documentation | astro-static |\n| extension, plugin, chrome | Browser Extension | chrome-extension |\n| desktop, electron | Desktop App | electron-desktop |\n| cli, command line, terminal | CLI Tool | cli-tool |\n| monorepo, workspace | Monorepo | monorepo-turborepo |\n\n## Detection Process\n\n```\n1. Tokenize user request\n2. Extract keywords\n3. Determine project type\n4. Detect missing information → forward to conversation-manager\n5. Suggest tech stack\n```\n",".agent/skills/app-builder/scaffolding.md":"# Project Scaffolding\n\n> Directory structure and core files for new projects.\n\n---\n\n## Next.js Full-Stack Structure (2025 Optimized)\n\n```\nproject-name/\n├── src/\n│   ├── app/                        # Routes only (thin layer)\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   ├── (auth)/                 # Route group - auth pages\n│   │   │   ├── login/page.tsx\n│   │   │   └── register/page.tsx\n│   │   ├── (dashboard)/            # Route group - dashboard layout\n│   │   │   ├── layout.tsx\n│   │   │   └── page.tsx\n│   │   └── api/\n│   │       └── [resource]/route.ts\n│   │\n│   ├── features/                   # Feature-based modules\n│   │   ├── auth/\n│   │   │   ├── components/\n│   │   │   ├── hooks/\n│   │   │   ├── actions.ts          # Server Actions\n│   │   │   ├── queries.ts          # Data fetching\n│   │   │   └── types.ts\n│   │   ├── products/\n│   │   │   ├── components/\n│   │   │   ├── actions.ts\n│   │   │   └── queries.ts\n│   │   └── cart/\n│   │       └── ...\n│   │\n│   ├── shared/                     # Shared utilities\n│   │   ├── components/ui/          # Reusable UI components\n│   │   ├── lib/                    # Utils, helpers\n│   │   └── hooks/                  # Global hooks\n│   │\n│   └── server/                     # Server-only code\n│       ├── db/                     # Database client (Prisma)\n│       ├── auth/                   # Auth config\n│       └── services/               # External API integrations\n│\n├── prisma/\n│   ├── schema.prisma\n│   ├── migrations/\n│   └── seed.ts\n│\n├── public/\n├── .env.example\n├── .env.local\n├── package.json\n├── tailwind.config.ts\n├── tsconfig.json\n└── README.md\n```\n\n---\n\n## Structure Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Feature isolation** | Each feature in `features/` with its own components, hooks, actions |\n| **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports |\n| **Thin routes** | `app/` only for routing, logic lives in `features/` |\n| **Route groups** | `(groupName)/` for layout sharing without URL impact |\n| **Shared code** | `shared/` for truly reusable UI and utilities |\n\n---\n\n## Core Files\n\n| File | Purpose |\n|------|---------|\n| `package.json` | Dependencies |\n| `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |\n| `tailwind.config.ts` | Tailwind config |\n| `.env.example` | Environment template |\n| `README.md` | Project documentation |\n| `.gitignore` | Git ignore rules |\n| `prisma/schema.prisma` | Database schema |\n\n---\n\n## Path Aliases (tsconfig.json)\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@/*\": [\"./src/*\"],\n      \"@/features/*\": [\"./src/features/*\"],\n      \"@/shared/*\": [\"./src/shared/*\"],\n      \"@/server/*\": [\"./src/server/*\"]\n    }\n  }\n}\n```\n\n---\n\n## When to Use What\n\n| Need | Location |\n|------|----------|\n| New page/route | `app/(group)/page.tsx` |\n| Feature component | `features/[name]/components/` |\n| Server action | `features/[name]/actions.ts` |\n| Data fetching | `features/[name]/queries.ts` |\n| Reusable button/input | `shared/components/ui/` |\n| Database query | `server/db/` |\n| External API call | `server/services/` |\n",".agent/skills/app-builder/tech-stack.md":"# Tech Stack Selection (2025)\n\n> Default and alternative technology choices for web applications.\n\n## Default Stack (Web App - 2025)\n\n```yaml\nFrontend:\n  framework: Next.js 16 (Stable)\n  language: TypeScript 5.7+\n  styling: Tailwind CSS v4\n  state: React 19 Actions / Server Components\n  bundler: Turbopack (Stable for Dev)\n\nBackend:\n  runtime: Node.js 23\n  framework: Next.js API Routes / Hono (for Edge)\n  validation: Zod / TypeBox\n\nDatabase:\n  primary: PostgreSQL\n  orm: Prisma / Drizzle\n  hosting: Supabase / Neon\n\nAuth:\n  provider: Auth.js (v5) / Clerk\n\nMonorepo:\n  tool: Turborepo 2.0\n```\n\n## Alternative Options\n\n| Need | Default | Alternative |\n|------|---------|-------------|\n| Real-time | - | Supabase Realtime, Socket.io |\n| File storage | - | Cloudinary, S3 |\n| Payment | Stripe | LemonSqueezy, Paddle |\n| Email | - | Resend, SendGrid |\n| Search | - | Algolia, Typesense |\n",".agent/skills/app-builder/templates/SKILL.md":"---\nname: templates\ndescription: Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.\nallowed-tools: Read, Glob, Grep\n---\n\n# Project Templates\n\n> Quick-start templates for scaffolding new projects.\n\n---\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY the template matching user's project type!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [express-api](express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform |\n| [electron-desktop](electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n| [astro-static](astro-static/TEMPLATE.md) | Astro + MDX | Blog / Docs |\n\n---\n\n## Usage\n\n1. User says \"create [type] app\"\n2. Match to appropriate template\n3. Read ONLY that template's TEMPLATE.md\n4. Follow its tech stack and structure\n",".agent/skills/app-builder/templates/astro-static/TEMPLATE.md":"---\nname: astro-static\ndescription: Astro static site template principles. Content-focused websites, blogs, documentation.\n---\n\n# Astro Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Astro 4.x |\n| Content | MDX + Content Collections |\n| Styling | Tailwind CSS |\n| Integrations | Sitemap, RSS, SEO |\n| Output | Static/SSG |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── components/      # .astro components\n│   ├── content/         # MDX content\n│   │   ├── blog/\n│   │   └── config.ts    # Collection schemas\n│   ├── layouts/         # Page layouts\n│   ├── pages/           # File-based routing\n│   └── styles/\n├── public/              # Static assets\n├── astro.config.mjs\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Content Collections | Type-safe content with Zod schemas |\n| Islands Architecture | Partial hydration for interactivity |\n| Zero JS by default | Static HTML unless needed |\n| MDX Support | Markdown with components |\n\n---\n\n## Setup Steps\n\n1. `npm create astro@latest {{name}}`\n2. Add integrations: `npx astro add mdx tailwind sitemap`\n3. Configure `astro.config.mjs`\n4. Create content collections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto-detected |\n| Netlify | Auto-detected |\n| Cloudflare Pages | Auto-detected |\n| GitHub Pages | Build + deploy action |\n\n---\n\n## Best Practices\n\n- Use Content Collections for type safety\n- Leverage static generation\n- Add islands only where needed\n- Optimize images with Astro Image\n",".agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md":"---\nname: chrome-extension\ndescription: Chrome Extension template principles. Manifest V3, React, TypeScript.\n---\n\n# Chrome Extension Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Manifest | V3 |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite |\n| Storage | Chrome Storage API |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── popup/           # Extension popup\n│   ├── options/         # Options page\n│   ├── background/      # Service worker\n│   ├── content/         # Content scripts\n│   ├── components/\n│   ├── hooks/\n│   └── lib/\n│       ├── storage.ts   # Chrome storage helpers\n│       └── messaging.ts # Message passing\n├── public/\n│   ├── icons/\n│   └── manifest.json\n└── package.json\n```\n\n---\n\n## Manifest V3 Concepts\n\n| Component | Purpose |\n|-----------|---------|\n| Service Worker | Background processing |\n| Content Scripts | Page injection |\n| Popup | User interface |\n| Options Page | Settings |\n\n---\n\n## Permissions\n\n| Permission | Use |\n|------------|-----|\n| storage | Save user data |\n| activeTab | Current tab access |\n| scripting | Inject scripts |\n| host_permissions | Site access |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Add Chrome types: `npm install -D @types/chrome`\n3. Configure Vite for multi-entry\n4. Create manifest.json\n5. `npm run dev` (watch mode)\n6. Load in Chrome: `chrome://extensions` → Load unpacked\n\n---\n\n## Development Tips\n\n| Task | Method |\n|------|--------|\n| Debug Popup | Right-click icon → Inspect |\n| Debug Background | Extensions page → Service worker |\n| Debug Content | DevTools console on page |\n| Hot Reload | `npm run dev` with watch |\n\n---\n\n## Best Practices\n\n- Use type-safe messaging\n- Wrap Chrome APIs in promises\n- Minimize permissions\n- Handle offline gracefully\n",".agent/skills/app-builder/templates/cli-tool/TEMPLATE.md":"---\nname: cli-tool\ndescription: Node.js CLI tool template principles. Commander.js, interactive prompts.\n---\n\n# CLI Tool Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Language | TypeScript |\n| CLI Framework | Commander.js |\n| Prompts | Inquirer.js |\n| Output | chalk + ora |\n| Config | cosmiconfig |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── index.ts         # Entry point\n│   ├── cli.ts           # CLI setup\n│   ├── commands/        # Command handlers\n│   ├── lib/\n│   │   ├── config.ts    # Config loader\n│   │   └── logger.ts    # Styled output\n│   └── types/\n├── bin/\n│   └── cli.js           # Executable\n└── package.json\n```\n\n---\n\n## CLI Design Principles\n\n| Principle | Description |\n|-----------|-------------|\n| Subcommands | Group related actions |\n| Options | Flags with defaults |\n| Interactive | Prompts when needed |\n| Non-interactive | Support --yes flags |\n\n---\n\n## Key Components\n\n| Component | Purpose |\n|-----------|---------|\n| Commander | Command parsing |\n| Inquirer | Interactive prompts |\n| Chalk | Colored output |\n| Ora | Spinners/loading |\n| Cosmiconfig | Config file discovery |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install commander @inquirer/prompts chalk ora cosmiconfig`\n4. Configure bin in package.json\n5. `npm link` for local testing\n\n---\n\n## Publishing\n\n```bash\nnpm login\nnpm publish\n```\n\n---\n\n## Best Practices\n\n- Provide helpful error messages\n- Support both interactive and non-interactive modes\n- Use consistent output styling\n- Validate inputs with Zod\n- Exit with proper codes (0 success, 1 error)\n",".agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md":"---\nname: electron-desktop\ndescription: Electron desktop app template principles. Cross-platform, React, TypeScript.\n---\n\n# Electron Desktop App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Electron 28+ |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite + electron-builder |\n| IPC | Type-safe communication |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── electron/\n│   ├── main.ts          # Main process\n│   ├── preload.ts       # Preload script\n│   └── ipc/             # IPC handlers\n├── src/\n│   ├── App.tsx\n│   ├── components/\n│   │   ├── TitleBar.tsx # Custom title bar\n│   │   └── ...\n│   └── hooks/\n├── public/\n└── package.json\n```\n\n---\n\n## Process Model\n\n| Process | Role |\n|---------|------|\n| Main | Node.js, system access |\n| Renderer | Chromium, React UI |\n| Preload | Bridge, context isolation |\n\n---\n\n## Key Concepts\n\n| Concept | Purpose |\n|---------|---------|\n| contextBridge | Safe API exposure |\n| ipcMain/ipcRenderer | Process communication |\n| nodeIntegration: false | Security |\n| contextIsolation: true | Security |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Install: `npm install -D electron electron-builder vite-plugin-electron`\n3. Create electron/ directory\n4. Configure main process\n5. `npm run electron:dev`\n\n---\n\n## Build Targets\n\n| Platform | Output |\n|----------|--------|\n| Windows | NSIS, Portable |\n| macOS | DMG, ZIP |\n| Linux | AppImage, DEB |\n\n---\n\n## Best Practices\n\n- Use preload script for main/renderer bridge\n- Type-safe IPC with typed handlers\n- Custom title bar for native feel\n- Handle window state (maximize, minimize)\n- Auto-updates with electron-updater\n",".agent/skills/app-builder/templates/express-api/TEMPLATE.md":"---\nname: express-api\ndescription: Express.js REST API template principles. TypeScript, Prisma, JWT.\n---\n\n# Express.js API Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Framework | Express.js |\n| Language | TypeScript |\n| Database | PostgreSQL + Prisma |\n| Validation | Zod |\n| Auth | JWT + bcrypt |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── src/\n│   ├── app.ts           # Express setup\n│   ├── config/          # Environment\n│   ├── routes/          # Route handlers\n│   ├── controllers/     # Business logic\n│   ├── services/        # Data access\n│   ├── middleware/\n│   │   ├── auth.ts      # JWT verify\n│   │   ├── error.ts     # Error handler\n│   │   └── validate.ts  # Zod validation\n│   ├── schemas/         # Zod schemas\n│   └── utils/\n└── package.json\n```\n\n---\n\n## Middleware Stack\n\n| Order | Middleware |\n|-------|------------|\n| 1 | helmet (security) |\n| 2 | cors |\n| 3 | morgan (logging) |\n| 4 | body parsing |\n| 5 | routes |\n| 6 | error handler |\n\n---\n\n## API Response Format\n\n| Type | Structure |\n|------|-----------|\n| Success | `{ success: true, data: {...} }` |\n| Error | `{ error: \"message\", details: [...] }` |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install express prisma zod bcrypt jsonwebtoken`\n4. Configure Prisma\n5. `npm run db:push`\n6. `npm run dev`\n\n---\n\n## Best Practices\n\n- Layer architecture (routes → controllers → services)\n- Validate all inputs with Zod\n- Centralized error handling\n- Environment-based config\n- Use Prisma for type-safe DB access\n",".agent/skills/app-builder/templates/flutter-app/TEMPLATE.md":"---\nname: flutter-app\ndescription: Flutter mobile app template principles. Riverpod, Go Router, clean architecture.\n---\n\n# Flutter App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Flutter 3.x |\n| Language | Dart 3.x |\n| State | Riverpod 2.0 |\n| Navigation | Go Router |\n| HTTP | Dio |\n| Storage | Hive |\n\n---\n\n## Directory Structure\n\n```\nproject_name/\n├── lib/\n│   ├── main.dart\n│   ├── app.dart\n│   ├── core/\n│   │   ├── constants/\n│   │   ├── theme/\n│   │   ├── router/\n│   │   └── utils/\n│   ├── features/\n│   │   ├── auth/\n│   │   │   ├── data/\n│   │   │   ├── domain/\n│   │   │   └── presentation/\n│   │   └── home/\n│   ├── shared/\n│   │   ├── widgets/\n│   │   └── providers/\n│   └── services/\n│       ├── api/\n│       └── storage/\n├── test/\n└── pubspec.yaml\n```\n\n---\n\n## Architecture Layers\n\n| Layer | Contents |\n|-------|----------|\n| Presentation | Screens, Widgets, Providers |\n| Domain | Entities, Use Cases |\n| Data | Repositories, Models |\n\n---\n\n## Key Packages\n\n| Package | Purpose |\n|---------|---------|\n| flutter_riverpod | State management |\n| riverpod_annotation | Code generation |\n| go_router | Navigation |\n| dio | HTTP client |\n| freezed | Immutable models |\n| hive | Local storage |\n\n---\n\n## Setup Steps\n\n1. `flutter create {{name}} --org com.{{bundle}}`\n2. Update `pubspec.yaml`\n3. `flutter pub get`\n4. Run code generation: `dart run build_runner build`\n5. `flutter run`\n\n---\n\n## Best Practices\n\n- Feature-first folder structure\n- Riverpod for state, React Query pattern for server state\n- Freezed for immutable data classes\n- Go Router for declarative navigation\n- Material 3 theming\n",".agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md":"---\nname: monorepo-turborepo\ndescription: Turborepo monorepo template principles. pnpm workspaces, shared packages.\n---\n\n# Turborepo Monorepo Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Build System | Turborepo |\n| Package Manager | pnpm |\n| Apps | Next.js, Express |\n| Packages | Shared UI, Config, Types |\n| Language | TypeScript |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── apps/\n│   ├── web/             # Next.js app\n│   ├── api/             # Express API\n│   └── docs/            # Documentation\n├── packages/\n│   ├── ui/              # Shared components\n│   ├── config/          # ESLint, TS, Tailwind\n│   ├── types/           # Shared types\n│   └── utils/           # Shared utilities\n├── turbo.json\n├── pnpm-workspace.yaml\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Workspaces | pnpm-workspace.yaml |\n| Pipeline | turbo.json task graph |\n| Caching | Remote/local task caching |\n| Dependencies | `workspace:*` protocol |\n\n---\n\n## Turbo Pipeline\n\n| Task | Depends On |\n|------|------------|\n| build | ^build (dependencies first) |\n| dev | cache: false, persistent |\n| lint | ^build |\n| test | ^build |\n\n---\n\n## Setup Steps\n\n1. Create root directory\n2. `pnpm init`\n3. Create pnpm-workspace.yaml\n4. Create turbo.json\n5. Add apps and packages\n6. `pnpm install`\n7. `pnpm dev`\n\n---\n\n## Common Commands\n\n| Command | Description |\n|---------|-------------|\n| `pnpm dev` | Run all apps |\n| `pnpm build` | Build all |\n| `pnpm --filter @name/web dev` | Run specific app |\n| `pnpm --filter @name/web add axios` | Add dep to app |\n\n---\n\n## Best Practices\n\n- Shared configs in packages/config\n- Shared types in packages/types\n- Internal packages with `workspace:*`\n- Use Turbo remote caching for CI\n",".agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md":"---\nname: nextjs-fullstack\ndescription: Next.js full-stack template principles. App Router, Prisma, Tailwind.\n---\n\n# Next.js Full-Stack Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (App Router) |\n| Language | TypeScript |\n| Database | PostgreSQL + Prisma |\n| Styling | Tailwind CSS |\n| Auth | Clerk (optional) |\n| Validation | Zod |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── src/\n│   ├── app/\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   └── api/\n│   ├── components/\n│   │   └── ui/\n│   ├── lib/\n│   │   ├── db.ts        # Prisma client\n│   │   └── utils.ts\n│   └── types/\n├── .env.example\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Server Components | Default, fetch data |\n| Server Actions | Form mutations |\n| Route Handlers | API endpoints |\n| Prisma | Type-safe ORM |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma connection |\n| NEXT_PUBLIC_APP_URL | Public URL |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. `npm install prisma @prisma/client zod`\n3. `npx prisma init`\n4. Configure schema\n5. `npm run db:push`\n6. `npm run dev`\n\n---\n\n## Best Practices\n\n- Server Components by default\n- Server Actions for mutations\n- Prisma for type-safe DB\n- Zod for validation\n- Edge runtime where possible\n",".agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md":"---\nname: nextjs-saas\ndescription: Next.js SaaS template principles. Auth, payments, email.\n---\n\n# Next.js SaaS Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (App Router) |\n| Auth | NextAuth.js v5 |\n| Payments | Stripe |\n| Database | PostgreSQL + Prisma |\n| Email | Resend |\n| UI | Tailwind (ASK USER: shadcn/Headless UI/Custom?) |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n├── src/\n│   ├── app/\n│   │   ├── (auth)/      # Login, register\n│   │   ├── (dashboard)/ # Protected routes\n│   │   ├── (marketing)/ # Landing, pricing\n│   │   └── api/\n│   │       ├── auth/[...nextauth]/\n│   │       └── webhooks/stripe/\n│   ├── components/\n│   │   ├── auth/\n│   │   ├── billing/\n│   │   └── dashboard/\n│   ├── lib/\n│   │   ├── auth.ts      # NextAuth config\n│   │   ├── stripe.ts    # Stripe client\n│   │   └── email.ts     # Resend client\n│   └── config/\n│       └── subscriptions.ts\n└── package.json\n```\n\n---\n\n## SaaS Features\n\n| Feature | Implementation |\n|---------|---------------|\n| Auth | NextAuth + OAuth |\n| Subscriptions | Stripe Checkout |\n| Billing Portal | Stripe Portal |\n| Webhooks | Stripe events |\n| Email | Transactional via Resend |\n\n---\n\n## Database Schema\n\n| Model | Fields |\n|-------|--------|\n| User | id, email, stripeCustomerId, subscriptionId |\n| Account | OAuth provider data |\n| Session | User sessions |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma |\n| NEXTAUTH_SECRET | Auth |\n| STRIPE_SECRET_KEY | Payments |\n| STRIPE_WEBHOOK_SECRET | Webhooks |\n| RESEND_API_KEY | Email |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. Install: `npm install next-auth @auth/prisma-adapter stripe resend`\n3. Setup Stripe products/prices\n4. Configure environment\n5. `npm run db:push`\n6. `npm run stripe:listen` (webhooks)\n7. `npm run dev`\n\n---\n\n## Best Practices\n\n- Route groups for layout separation\n- Stripe webhooks for subscription sync\n- NextAuth with Prisma adapter\n- Email templates with React Email\n",".agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md":"---\nname: nextjs-static\ndescription: Next.js static site template principles. Landing pages, portfolios, marketing.\n---\n\n# Next.js Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (Static Export) |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Animations | Framer Motion |\n| Icons | Lucide React |\n| SEO | Next SEO |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── app/\n│   │   ├── layout.tsx\n│   │   ├── page.tsx      # Landing\n│   │   ├── about/\n│   │   ├── contact/\n│   │   └── blog/\n│   ├── components/\n│   │   ├── layout/       # Header, Footer\n│   │   ├── sections/     # Hero, Features, CTA\n│   │   └── ui/\n│   └── lib/\n├── content/              # Markdown content\n├── public/\n└── next.config.js\n```\n\n---\n\n## Static Export Config\n\n```javascript\n// next.config.js\nconst nextConfig = {\n  output: 'export',\n  images: { unoptimized: true },\n  trailingSlash: true,\n};\n```\n\n---\n\n## Landing Page Sections\n\n| Section | Purpose |\n|---------|---------|\n| Hero | Main headline, CTA |\n| Features | Product benefits |\n| Testimonials | Social proof |\n| Pricing | Plans |\n| CTA | Final conversion |\n\n---\n\n## Animation Patterns\n\n| Pattern | Use |\n|---------|-----|\n| Fade up | Content entry |\n| Stagger | List items |\n| Scroll reveal | On viewport |\n| Hover | Interactive feedback |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. Install: `npm install framer-motion lucide-react next-seo`\n3. Configure static export\n4. Create sections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto |\n| Netlify | Auto |\n| GitHub Pages | gh-pages branch |\n| Any host | Upload `out` folder |\n\n---\n\n## Best Practices\n\n- Static export for maximum performance\n- Framer Motion for premium animations\n- Responsive mobile-first design\n- SEO metadata on every page\n",".agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md":"---\nname: nuxt-app\ndescription: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.\n---\n\n# Nuxt 3 Full-Stack Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Nuxt 3 |\n| Language | TypeScript |\n| UI | Vue 3 (Composition API) |\n| State | Pinia |\n| Database | PostgreSQL + Prisma |\n| Styling | Tailwind CSS |\n| Validation | Zod |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── server/\n│   ├── api/\n│   │   └── [resource]/\n│   │       └── index.ts\n│   └── utils/\n│       └── db.ts         # Prisma client\n├── composables/\n│   └── useAuth.ts\n├── stores/\n│   └── user.ts           # Pinia store\n├── components/\n│   └── ui/\n├── pages/\n│   ├── index.vue\n│   └── [...slug].vue\n├── layouts/\n│   └── default.vue\n├── assets/\n│   └── css/\n│       └── main.css\n├── .env.example\n├── nuxt.config.ts\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Auto-imports | Components, composables, utils |\n| File-based routing | pages/ → routes |\n| Server Routes | server/api/ → API endpoints |\n| Composables | Reusable reactive logic |\n| Pinia | State management |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma connection |\n| NUXT_PUBLIC_APP_URL | Public URL |\n\n---\n\n## Setup Steps\n\n1. `npx nuxi@latest init {{name}}`\n2. `cd {{name}}`\n3. `npm install @pinia/nuxt @prisma/client prisma zod`\n4. `npm install -D @nuxtjs/tailwindcss`\n5. Add modules to `nuxt.config.ts`:\n   ```ts\n   modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']\n   ```\n6. `npx prisma init`\n7. Configure schema\n8. `npx prisma db push`\n9. `npm run dev`\n\n---\n\n## Best Practices\n\n- Use `<script setup>` for components\n- Composables for reusable logic\n- Pinia stores in `stores/` folder\n- Server routes for API logic\n- Auto-import for clean code\n- TypeScript for type safety\n- See `@[skills/vue-expert]` for Vue patterns\n",".agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md":"---\nname: python-fastapi\ndescription: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.\n---\n\n# FastAPI API Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | FastAPI |\n| Language | Python 3.11+ |\n| ORM | SQLAlchemy 2.0 |\n| Validation | Pydantic v2 |\n| Migrations | Alembic |\n| Auth | JWT + passlib |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── alembic/             # Migrations\n├── app/\n│   ├── main.py          # FastAPI app\n│   ├── config.py        # Settings\n│   ├── database.py      # DB connection\n│   ├── models/          # SQLAlchemy models\n│   ├── schemas/         # Pydantic schemas\n│   ├── routers/         # API routes\n│   ├── services/        # Business logic\n│   ├── dependencies/    # DI\n│   └── utils/\n├── tests/\n├── .env.example\n└── requirements.txt\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Async | async/await throughout |\n| Dependency Injection | FastAPI Depends |\n| Pydantic v2 | Validation + serialization |\n| SQLAlchemy 2.0 | Async sessions |\n\n---\n\n## API Structure\n\n| Layer | Responsibility |\n|-------|---------------|\n| Routers | HTTP handling |\n| Dependencies | Auth, validation |\n| Services | Business logic |\n| Models | Database entities |\n| Schemas | Request/response |\n\n---\n\n## Setup Steps\n\n1. `python -m venv venv`\n2. `source venv/bin/activate`\n3. `pip install fastapi uvicorn sqlalchemy alembic pydantic`\n4. Create `.env`\n5. `alembic upgrade head`\n6. `uvicorn app.main:app --reload`\n\n---\n\n## Best Practices\n\n- Use async everywhere\n- Pydantic v2 for validation\n- SQLAlchemy 2.0 async sessions\n- Alembic for migrations\n- pytest-asyncio for tests\n",".agent/skills/app-builder/templates/react-native-app/TEMPLATE.md":"---\nname: react-native-app\ndescription: React Native mobile app template principles. Expo, TypeScript, navigation.\n---\n\n# React Native App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | React Native + Expo |\n| Language | TypeScript |\n| Navigation | Expo Router |\n| State | Zustand + React Query |\n| Styling | NativeWind |\n| Testing | Jest + RNTL |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── app/                 # Expo Router (file-based)\n│   ├── _layout.tsx      # Root layout\n│   ├── index.tsx        # Home\n│   ├── (tabs)/          # Tab navigation\n│   └── [id].tsx         # Dynamic route\n├── components/\n│   ├── ui/              # Reusable\n│   └── features/\n├── hooks/\n├── lib/\n│   ├── api.ts\n│   └── storage.ts\n├── store/\n├── constants/\n└── app.json\n```\n\n---\n\n## Navigation Patterns\n\n| Pattern | Use |\n|---------|-----|\n| Stack | Page hierarchy |\n| Tabs | Bottom navigation |\n| Drawer | Side menu |\n| Modal | Overlay screens |\n\n---\n\n## State Management\n\n| Type | Tool |\n|------|------|\n| Local | Zustand |\n| Server | React Query |\n| Forms | React Hook Form |\n| Storage | Expo SecureStore |\n\n---\n\n## Key Packages\n\n| Package | Purpose |\n|---------|---------|\n| expo-router | File-based routing |\n| zustand | Local state |\n| @tanstack/react-query | Server state |\n| nativewind | Tailwind styling |\n| expo-secure-store | Secure storage |\n\n---\n\n## Setup Steps\n\n1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`\n2. `npx expo install expo-router react-native-safe-area-context`\n3. Install state: `npm install zustand @tanstack/react-query`\n4. `npx expo start`\n\n---\n\n## Best Practices\n\n- Expo Router for navigation\n- Zustand for local, React Query for server state\n- NativeWind for consistent styling\n- Expo SecureStore for tokens\n- Test on both iOS and Android\n",".agent/skills/architecture/SKILL.md":"---\nname: architecture\ndescription: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.\nallowed-tools: Read, Glob, Grep\n---\n\n# Architecture Decision Framework\n\n> \"Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale.\"\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `context-discovery.md` | Questions to ask, project classification | Starting architecture design |\n| `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |\n| `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |\n| `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |\n| `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |\n\n---\n\n## 🔗 Related Skills\n\n| Skill | Use For |\n|-------|---------|\n| `@[skills/database-design]` | Database schema design |\n| `@[skills/api-patterns]` | API design patterns |\n| `@[skills/deployment-procedures]` | Deployment architecture |\n\n---\n\n## Core Principle\n\n**\"Simplicity is the ultimate sophistication.\"**\n\n- Start simple\n- Add complexity ONLY when proven necessary\n- You can always add patterns later\n- Removing complexity is MUCH harder than adding it\n\n---\n\n## Validation Checklist\n\nBefore finalizing architecture:\n\n- [ ] Requirements clearly understood\n- [ ] Constraints identified\n- [ ] Each decision has trade-off analysis\n- [ ] Simpler alternatives considered\n- [ ] ADRs written for significant decisions\n- [ ] Team expertise matches chosen patterns\n",".agent/skills/architecture/context-discovery.md":"# Context Discovery\n\n> Before suggesting any architecture, gather context.\n\n## Question Hierarchy (Ask User FIRST)\n\n1. **Scale**\n   - How many users? (10, 1K, 100K, 1M+)\n   - Data volume? (MB, GB, TB)\n   - Transaction rate? (per second/minute)\n\n2. **Team**\n   - Solo developer or team?\n   - Team size and expertise?\n   - Distributed or co-located?\n\n3. **Timeline**\n   - MVP/Prototype or long-term product?\n   - Time to market pressure?\n\n4. **Domain**\n   - CRUD-heavy or business logic complex?\n   - Real-time requirements?\n   - Compliance/regulations?\n\n5. **Constraints**\n   - Budget limitations?\n   - Legacy systems to integrate?\n   - Technology stack preferences?\n\n## Project Classification Matrix\n\n```\n                    MVP              SaaS           Enterprise\n┌─────────────────────────────────────────────────────────────┐\n│ Scale        │ <1K           │ 1K-100K      │ 100K+        │\n│ Team         │ Solo          │ 2-10         │ 10+          │\n│ Timeline     │ Fast (weeks)  │ Medium (months)│ Long (years)│\n│ Architecture │ Simple        │ Modular      │ Distributed  │\n│ Patterns     │ Minimal       │ Selective    │ Comprehensive│\n│ Example      │ Next.js API   │ NestJS       │ Microservices│\n└─────────────────────────────────────────────────────────────┘\n```\n",".agent/skills/architecture/examples.md":"# Architecture Examples\n\n> Real-world architecture decisions by project type.\n\n---\n\n## Example 1: MVP E-commerce (Solo Developer)\n\n```yaml\nRequirements:\n  - <1000 users initially\n  - Solo developer\n  - Fast to market (8 weeks)\n  - Budget-conscious\n\nArchitecture Decisions:\n  App Structure: Monolith (simpler for solo)\n  Framework: Next.js (full-stack, fast)\n  Data Layer: Prisma direct (no over-abstraction)\n  Authentication: JWT (simpler than OAuth)\n  Payment: Stripe (hosted solution)\n  Database: PostgreSQL (ACID for orders)\n\nTrade-offs Accepted:\n  - Monolith → Can't scale independently (team doesn't justify it)\n  - No Repository → Less testable (simple CRUD doesn't need it)\n  - JWT → No social login initially (can add later)\n\nFuture Migration Path:\n  - Users > 10K → Extract payment service\n  - Team > 3 → Add Repository pattern\n  - Social login requested → Add OAuth\n```\n\n---\n\n## Example 2: SaaS Product (5-10 Developers)\n\n```yaml\nRequirements:\n  - 1K-100K users\n  - 5-10 developers\n  - Long-term (12+ months)\n  - Multiple domains (billing, users, core)\n\nArchitecture Decisions:\n  App Structure: Modular Monolith (team size optimal)\n  Framework: NestJS (modular by design)\n  Data Layer: Repository pattern (testing, flexibility)\n  Domain Model: Partial DDD (rich entities)\n  Authentication: OAuth + JWT\n  Caching: Redis\n  Database: PostgreSQL\n\nTrade-offs Accepted:\n  - Modular Monolith → Some module coupling (microservices not justified)\n  - Partial DDD → No full aggregates (no domain experts)\n  - RabbitMQ later → Initial synchronous (add when proven needed)\n\nMigration Path:\n  - Team > 10 → Consider microservices\n  - Domains conflict → Extract bounded contexts\n  - Read performance issues → Add CQRS\n```\n\n---\n\n## Example 3: Enterprise (100K+ Users)\n\n```yaml\nRequirements:\n  - 100K+ users\n  - 10+ developers\n  - Multiple business domains\n  - Different scaling needs\n  - 24/7 availability\n\nArchitecture Decisions:\n  App Structure: Microservices (independent scale)\n  API Gateway: Kong/AWS API GW\n  Domain Model: Full DDD\n  Consistency: Event-driven (eventual OK)\n  Message Bus: Kafka\n  Authentication: OAuth + SAML (enterprise SSO)\n  Database: Polyglot (right tool per job)\n  CQRS: Selected services\n\nOperational Requirements:\n  - Service mesh (Istio/Linkerd)\n  - Distributed tracing (Jaeger/Tempo)\n  - Centralized logging (ELK/Loki)\n  - Circuit breakers (Resilience4j)\n  - Kubernetes/Helm\n```\n",".agent/skills/architecture/pattern-selection.md":"# Pattern Selection Guidelines\n\n> Decision trees for choosing architectural patterns.\n\n## Main Decision Tree\n\n```\nSTART: What's your MAIN concern?\n\n┌─ Data Access Complexity?\n│  ├─ HIGH (complex queries, testing needed)\n│  │  → Repository Pattern + Unit of Work\n│  │  VALIDATE: Will data source change frequently?\n│  │     ├─ YES → Repository worth the indirection\n│  │     └─ NO  → Consider simpler ORM direct access\n│  └─ LOW (simple CRUD, single database)\n│     → ORM directly (Prisma, Drizzle)\n│     Simpler = Better, Faster\n│\n├─ Business Rules Complexity?\n│  ├─ HIGH (domain logic, rules vary by context)\n│  │  → Domain-Driven Design\n│  │  VALIDATE: Do you have domain experts on team?\n│  │     ├─ YES → Full DDD (Aggregates, Value Objects)\n│  │     └─ NO  → Partial DDD (rich entities, clear boundaries)\n│  └─ LOW (mostly CRUD, simple validation)\n│     → Transaction Script pattern\n│     Simpler = Better, Faster\n│\n├─ Independent Scaling Needed?\n│  ├─ YES (different components scale differently)\n│  │  → Microservices WORTH the complexity\n│  │  REQUIREMENTS (ALL must be true):\n│  │    - Clear domain boundaries\n│  │    - Team > 10 developers\n│  │    - Different scaling needs per service\n│  │  IF NOT ALL MET → Modular Monolith instead\n│  └─ NO (everything scales together)\n│     → Modular Monolith\n│     Can extract services later when proven needed\n│\n└─ Real-time Requirements?\n   ├─ HIGH (immediate updates, multi-user sync)\n   │  → Event-Driven Architecture\n   │  → Message Queue (RabbitMQ, Redis, Kafka)\n   │  VALIDATE: Can you handle eventual consistency?\n   │     ├─ YES → Event-driven valid\n   │     └─ NO  → Synchronous with polling\n   └─ LOW (eventual consistency acceptable)\n      → Synchronous (REST/GraphQL)\n      Simpler = Better, Faster\n```\n\n## The 3 Questions (Before ANY Pattern)\n\n1. **Problem Solved**: What SPECIFIC problem does this pattern solve?\n2. **Simpler Alternative**: Is there a simpler solution?\n3. **Deferred Complexity**: Can we add this LATER when needed?\n\n## Red Flags (Anti-patterns)\n\n| Pattern | Anti-pattern | Simpler Alternative |\n|---------|-------------|-------------------|\n| Microservices | Premature splitting | Start monolith, extract later |\n| Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |\n| Event Sourcing | Over-engineering | Append-only audit log |\n| CQRS | Unnecessary complexity | Single model |\n| Repository | YAGNI for simple CRUD | ORM direct access |\n",".agent/skills/architecture/patterns-reference.md":"# Architecture Patterns Reference\n\n> Quick reference for common patterns with usage guidance.\n\n## Data Access Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Active Record** | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |\n| **Repository** | Testing needed, multiple sources | Simple CRUD, single database | Medium |\n| **Unit of Work** | Complex transactions | Simple operations | High |\n| **Data Mapper** | Complex domain, performance | Simple CRUD, rapid dev | High |\n\n## Domain Logic Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Transaction Script** | Simple CRUD, procedural | Complex business rules | Low |\n| **Table Module** | Record-based logic | Rich behavior needed | Low |\n| **Domain Model** | Complex business logic | Simple CRUD | Medium |\n| **DDD (Full)** | Complex domain, domain experts | Simple domain, no experts | High |\n\n## Distributed System Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Modular Monolith** | Small teams, unclear boundaries | Clear contexts, different scales | Medium |\n| **Microservices** | Different scales, large teams | Small teams, simple domain | Very High |\n| **Event-Driven** | Real-time, loose coupling | Simple workflows, strong consistency | High |\n| **CQRS** | Read/write performance diverges | Simple CRUD, same model | High |\n| **Saga** | Distributed transactions | Single database, simple ACID | High |\n\n## API Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **REST** | Standard CRUD, resources | Real-time, complex queries | Low |\n| **GraphQL** | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |\n| **gRPC** | Internal services, performance | Public APIs, browser clients | Medium |\n| **WebSocket** | Real-time updates | Simple request/response | Medium |\n\n---\n\n## Simplicity Principle\n\n**\"Start simple, add complexity only when proven necessary.\"**\n\n- You can always add patterns later\n- Removing complexity is MUCH harder than adding it\n- When in doubt, choose simpler option\n",".agent/skills/architecture/trade-off-analysis.md":"# Trade-off Analysis & ADR\n\n> Document every architectural decision with trade-offs.\n\n## Decision Framework\n\nFor EACH architectural component, document:\n\n```markdown\n## Architecture Decision Record\n\n### Context\n- **Problem**: [What problem are we solving?]\n- **Constraints**: [Team size, scale, timeline, budget]\n\n### Options Considered\n\n| Option | Pros | Cons | Complexity | When Valid |\n|--------|------|------|------------|-----------|\n| Option A | Benefit 1 | Cost 1 | Low | [Conditions] |\n| Option B | Benefit 2 | Cost 2 | High | [Conditions] |\n\n### Decision\n**Chosen**: [Option B]\n\n### Rationale\n1. [Reason 1 - tied to constraints]\n2. [Reason 2 - tied to requirements]\n\n### Trade-offs Accepted\n- [What we're giving up]\n- [Why this is acceptable]\n\n### Consequences\n- **Positive**: [Benefits we gain]\n- **Negative**: [Costs/risks we accept]\n- **Mitigation**: [How we'll address negatives]\n\n### Revisit Trigger\n- [When to reconsider this decision]\n```\n\n## ADR Template\n\n```markdown\n# ADR-[XXX]: [Decision Title]\n\n## Status\nProposed | Accepted | Deprecated | Superseded by [ADR-YYY]\n\n## Context\n[What problem? What constraints?]\n\n## Decision\n[What we chose - be specific]\n\n## Rationale\n[Why - tie to requirements and constraints]\n\n## Trade-offs\n[What we're giving up - be honest]\n\n## Consequences\n- **Positive**: [Benefits]\n- **Negative**: [Costs]\n- **Mitigation**: [How to address]\n```\n\n## ADR Storage\n\n```\ndocs/\n└── architecture/\n    ├── adr-001-use-nextjs.md\n    ├── adr-002-postgresql-over-mongodb.md\n    └── adr-003-adopt-repository-pattern.md\n```\n",".agent/skills/bash-linux/SKILL.md":"---\nname: bash-linux\ndescription: Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash\n---\n\n# Bash Linux Patterns\n\n> Essential patterns for Bash on Linux/macOS.\n\n---\n\n## 1. Operator Syntax\n\n### Chaining Commands\n\n| Operator | Meaning | Example |\n|----------|---------|---------|\n| `;` | Run sequentially | `cmd1; cmd2` |\n| `&&` | Run if previous succeeded | `npm install && npm run dev` |\n| `\\|\\|` | Run if previous failed | `npm test \\|\\| echo \"Tests failed\"` |\n| `\\|` | Pipe output | `ls \\| grep \".js\"` |\n\n---\n\n## 2. File Operations\n\n### Essential Commands\n\n| Task | Command |\n|------|---------|\n| List all | `ls -la` |\n| Find files | `find . -name \"*.js\" -type f` |\n| File content | `cat file.txt` |\n| First N lines | `head -n 20 file.txt` |\n| Last N lines | `tail -n 20 file.txt` |\n| Follow log | `tail -f log.txt` |\n| Search in files | `grep -r \"pattern\" --include=\"*.js\"` |\n| File size | `du -sh *` |\n| Disk usage | `df -h` |\n\n---\n\n## 3. Process Management\n\n| Task | Command |\n|------|---------|\n| List processes | `ps aux` |\n| Find by name | `ps aux \\| grep node` |\n| Kill by PID | `kill -9 <PID>` |\n| Find port user | `lsof -i :3000` |\n| Kill port | `kill -9 $(lsof -t -i :3000)` |\n| Background | `npm run dev &` |\n| Jobs | `jobs -l` |\n| Bring to front | `fg %1` |\n\n---\n\n## 4. Text Processing\n\n### Core Tools\n\n| Tool | Purpose | Example |\n|------|---------|---------|\n| `grep` | Search | `grep -rn \"TODO\" src/` |\n| `sed` | Replace | `sed -i 's/old/new/g' file.txt` |\n| `awk` | Extract columns | `awk '{print $1}' file.txt` |\n| `cut` | Cut fields | `cut -d',' -f1 data.csv` |\n| `sort` | Sort lines | `sort -u file.txt` |\n| `uniq` | Unique lines | `sort file.txt \\| uniq -c` |\n| `wc` | Count | `wc -l file.txt` |\n\n---\n\n## 5. Environment Variables\n\n| Task | Command |\n|------|---------|\n| View all | `env` or `printenv` |\n| View one | `echo $PATH` |\n| Set temporary | `export VAR=\"value\"` |\n| Set in script | `VAR=\"value\" command` |\n| Add to PATH | `export PATH=\"$PATH:/new/path\"` |\n\n---\n\n## 6. Network\n\n| Task | Command |\n|------|---------|\n| Download | `curl -O https://example.com/file` |\n| API request | `curl -X GET https://api.example.com` |\n| POST JSON | `curl -X POST -H \"Content-Type: application/json\" -d '{\"key\":\"value\"}' URL` |\n| Check port | `nc -zv localhost 3000` |\n| Network info | `ifconfig` or `ip addr` |\n\n---\n\n## 7. Script Template\n\n```bash\n#!/bin/bash\nset -euo pipefail  # Exit on error, undefined var, pipe fail\n\n# Colors (optional)\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nNC='\\033[0m'\n\n# Script directory\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# Functions\nlog_info() { echo -e \"${GREEN}[INFO]${NC} $1\"; }\nlog_error() { echo -e \"${RED}[ERROR]${NC} $1\" >&2; }\n\n# Main\nmain() {\n    log_info \"Starting...\"\n    # Your logic here\n    log_info \"Done!\"\n}\n\nmain \"$@\"\n```\n\n---\n\n## 8. Common Patterns\n\n### Check if command exists\n\n```bash\nif command -v node &> /dev/null; then\n    echo \"Node is installed\"\nfi\n```\n\n### Default variable value\n\n```bash\nNAME=${1:-\"default_value\"}\n```\n\n### Read file line by line\n\n```bash\nwhile IFS= read -r line; do\n    echo \"$line\"\ndone < file.txt\n```\n\n### Loop over files\n\n```bash\nfor file in *.js; do\n    echo \"Processing $file\"\ndone\n```\n\n---\n\n## 9. Differences from PowerShell\n\n| Task | PowerShell | Bash |\n|------|------------|------|\n| List files | `Get-ChildItem` | `ls -la` |\n| Find files | `Get-ChildItem -Recurse` | `find . -type f` |\n| Environment | `$env:VAR` | `$VAR` |\n| String concat | `\"$a$b\"` | `\"$a$b\"` (same) |\n| Null check | `if ($x)` | `if [ -n \"$x\" ]` |\n| Pipeline | Object-based | Text-based |\n\n---\n\n## 10. Error Handling\n\n### Set options\n\n```bash\nset -e          # Exit on error\nset -u          # Exit on undefined variable\nset -o pipefail # Exit on pipe failure\nset -x          # Debug: print commands\n```\n\n### Trap for cleanup\n\n```bash\ncleanup() {\n    echo \"Cleaning up...\"\n    rm -f /tmp/tempfile\n}\ntrap cleanup EXIT\n```\n\n---\n\n> **Remember:** Bash is text-based. Use `&&` for success chains, `set -e` for safety, and quote your variables!\n",".agent/skills/behavioral-modes/SKILL.md":"---\nname: behavioral-modes\ndescription: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.\nallowed-tools: Read, Glob, Grep\n---\n\n# Behavioral Modes - Adaptive AI Operating Modes\n\n## Purpose\nThis skill defines distinct behavioral modes that optimize AI performance for specific tasks. Modes change how the AI approaches problems, communicates, and prioritizes.\n\n---\n\n## Available Modes\n\n### 1. 🧠 BRAINSTORM Mode\n\n**When to use:** Early project planning, feature ideation, architecture decisions\n\n**Behavior:**\n- Ask clarifying questions before assumptions\n- Offer multiple alternatives (at least 3)\n- Think divergently - explore unconventional solutions\n- No code yet - focus on ideas and options\n- Use visual diagrams (mermaid) to explain concepts\n\n**Output style:**\n```\n\"Let's explore this together. Here are some approaches:\n\nOption A: [description]\n  ✅ Pros: ...\n  ❌ Cons: ...\n\nOption B: [description]\n  ✅ Pros: ...\n  ❌ Cons: ...\n\nWhat resonates with you? Or should we explore a different direction?\"\n```\n\n---\n\n### 2. ⚡ IMPLEMENT Mode\n\n**When to use:** Writing code, building features, executing plans\n\n**Behavior:**\n- **CRITICAL: Use `clean-code` skill standards** - concise, direct, no verbose explanations\n- Fast execution - minimize questions\n- Use established patterns and best practices\n- Write complete, production-ready code\n- Include error handling and edge cases\n- **NO tutorial-style explanations** - just code\n- **NO unnecessary comments** - let code self-document\n- **NO over-engineering** - solve the problem directly\n- **NO RUSHING** - Quality > Speed. Read ALL references before coding.\n\n**Output style:**\n```\n[Code block]\n\n[Brief summary, max 1-2 sentences]\n```\n\n**NOT:**\n```\n\"Building [feature]...\n\n✓ Created [file1]\n✓ Created [file2]\n✓ Updated [file3]\n\n[long explanation]\n\nRun `npm run dev` to test.\"\n```\n\n---\n\n### 3. 🔍 DEBUG Mode\n\n**When to use:** Fixing bugs, troubleshooting errors, investigating issues\n\n**Behavior:**\n- Ask for error messages and reproduction steps\n- Think systematically - check logs, trace data flow\n- Form hypothesis → test → verify\n- Explain the root cause, not just the fix\n- Prevent future occurrences\n\n**Output style:**\n```\n\"Investigating...\n\n🔍 Symptom: [what's happening]\n🎯 Root cause: [why it's happening]\n✅ Fix: [the solution]\n🛡️ Prevention: [how to avoid in future]\n```\n\n---\n\n### 4. 📋 REVIEW Mode\n\n**When to use:** Code review, architecture review, security audit\n\n**Behavior:**\n- Be thorough but constructive\n- Categorize by severity (Critical/High/Medium/Low)\n- Explain the \"why\" behind suggestions\n- Offer improved code examples\n- Acknowledge what's done well\n\n**Output style:**\n```\n## Code Review: [file/feature]\n\n### 🔴 Critical\n- [issue with explanation]\n\n### 🟠 Improvements\n- [suggestion with example]\n\n### 🟢 Good\n- [positive observation]\n```\n\n---\n\n### 5. 📚 TEACH Mode\n\n**When to use:** Explaining concepts, documentation, onboarding\n\n**Behavior:**\n- Explain from fundamentals\n- Use analogies and examples\n- Progress from simple to complex\n- Include practical exercises\n- Check understanding\n\n**Output style:**\n```\n## Understanding [Concept]\n\n### What is it?\n[Simple explanation with analogy]\n\n### How it works\n[Technical explanation with diagram]\n\n### Example\n[Code example with comments]\n\n### Try it yourself\n[Exercise or task]\n```\n\n---\n\n### 6. 🚀 SHIP Mode\n\n**When to use:** Production deployment, final polish, release preparation\n\n**Behavior:**\n- Focus on stability over features\n- Check for missing error handling\n- Verify environment configs\n- Run all tests\n- Create deployment checklist\n\n**Output style:**\n```\n## Pre-Ship Checklist\n\n### ✅ Code Quality\n- [ ] No TypeScript errors\n- [ ] ESLint passing\n- [ ] All tests passing\n\n### ✅ Security\n- [ ] No exposed secrets\n- [ ] Input validation complete\n\n### ✅ Performance\n- [ ] Bundle size acceptable\n- [ ] No console.logs\n\n### 🚀 Ready to deploy\n```\n\n---\n\n## Mode Detection\n\nThe AI should automatically detect the appropriate mode based on:\n\n| Trigger | Mode |\n|---------|------|\n| \"what if\", \"ideas\", \"options\" | BRAINSTORM |\n| \"build\", \"create\", \"add\" | IMPLEMENT |\n| \"not working\", \"error\", \"bug\" | DEBUG |\n| \"review\", \"check\", \"audit\" | REVIEW |\n| \"explain\", \"how does\", \"learn\" | TEACH |\n| \"deploy\", \"release\", \"production\" | SHIP |\n\n---\n\n## Multi-Agent Collaboration Patterns (2025)\n\nModern architectures optimized for agent-to-agent collaboration:\n\n### 1. 🔭 EXPLORE Mode\n**Role:** Discovery and Analysis (Explorer Agent)\n**Behavior:** Socratic questioning, deep-dive code reading, dependency mapping.\n**Output:** `discovery-report.json`, architectural visualization.\n\n### 2. 🗺️ PLAN-EXECUTE-CRITIC (PEC)\nCyclic mode transitions for high-complexity tasks:\n1. **Planner:** Decomposes the task into atomic steps (`task.md`).\n2. **Executor:** Performs the actual coding (`IMPLEMENT`).\n3. **Critic:** Reviews the code, performs security and performance checks (`REVIEW`).\n\n### 3. 🧠 MENTAL MODEL SYNC\nBehavior for creating and loading \"Mental Model\" summaries to preserve context between sessions.\n\n---\n\n## Combining Modes\n\n---\n\n## Manual Mode Switching\n\nUsers can explicitly request a mode:\n\n```\n/brainstorm new feature ideas\n/implement the user profile page\n/debug why login fails\n/review this pull request\n```\n",".agent/skills/brainstorming/SKILL.md":"---\nname: brainstorming\ndescription: Socratic questioning protocol + user communication. MANDATORY for complex requests, new features, or unclear requirements. Includes progress reporting and error handling.\nallowed-tools: Read, Glob, Grep\n---\n\n# Brainstorming & Communication Protocol\n\n> **MANDATORY:** Use for complex/vague requests, new features, updates.\n\n---\n\n## 🛑 SOCRATIC GATE (ENFORCEMENT)\n\n### When to Trigger\n\n| Pattern | Action |\n|---------|--------|\n| \"Build/Create/Make [thing]\" without details | 🛑 ASK 3 questions |\n| Complex feature or architecture | 🛑 Clarify before implementing |\n| Update/change request | 🛑 Confirm scope |\n| Vague requirements | 🛑 Ask purpose, users, constraints |\n\n### 🚫 MANDATORY: 3 Questions Before Implementation\n\n1. **STOP** - Do NOT start coding\n2. **ASK** - Minimum 3 questions:\n   - 🎯 Purpose: What problem are you solving?\n   - 👥 Users: Who will use this?\n   - 📦 Scope: Must-have vs nice-to-have?\n3. **WAIT** - Get response before proceeding\n\n---\n\n## 🧠 Dynamic Question Generation\n\n**⛔ NEVER use static templates.** Read `dynamic-questioning.md` for principles.\n\n### Core Principles\n\n| Principle | Meaning |\n|-----------|---------|\n| **Questions Reveal Consequences** | Each question connects to an architectural decision |\n| **Context Before Content** | Understand greenfield/feature/refactor/debug context first |\n| **Minimum Viable Questions** | Each question must eliminate implementation paths |\n| **Generate Data, Not Assumptions** | Don't guess—ask with trade-offs |\n\n### Question Generation Process\n\n```\n1. Parse request → Extract domain, features, scale indicators\n2. Identify decision points → Blocking vs. deferable\n3. Generate questions → Priority: P0 (blocking) > P1 (high-leverage) > P2 (nice-to-have)\n4. Format with trade-offs → What, Why, Options, Default\n```\n\n### Question Format (MANDATORY)\n\n```markdown\n### [PRIORITY] **[DECISION POINT]**\n\n**Question:** [Clear question]\n\n**Why This Matters:**\n- [Architectural consequence]\n- [Affects: cost/complexity/timeline/scale]\n\n**Options:**\n| Option | Pros | Cons | Best For |\n|--------|------|------|----------|\n| A | [+] | [-] | [Use case] |\n\n**If Not Specified:** [Default + rationale]\n```\n\n**For detailed domain-specific question banks and algorithms**, see: `dynamic-questioning.md`\n\n---\n\n## Progress Reporting (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Transparency builds trust. Status must be visible and actionable.\n\n### Status Board Format\n\n| Agent | Status | Current Task | Progress |\n|-------|--------|--------------|----------|\n| [Agent Name] | ✅🔄⏳❌⚠️ | [Task description] | [% or count] |\n\n### Status Icons\n\n| Icon | Meaning | Usage |\n|------|---------|-------|\n| ✅ | Completed | Task finished successfully |\n| 🔄 | Running | Currently executing |\n| ⏳ | Waiting | Blocked, waiting for dependency |\n| ❌ | Error | Failed, needs attention |\n| ⚠️ | Warning | Potential issue, not blocking |\n\n---\n\n## Error Handling (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Errors are opportunities for clear communication.\n\n### Error Response Pattern\n\n```\n1. Acknowledge the error\n2. Explain what happened (user-friendly)\n3. Offer specific solutions with trade-offs\n4. Ask user to choose or provide alternative\n```\n\n### Error Categories\n\n| Category | Response Strategy |\n|----------|-------------------|\n| **Port Conflict** | Offer alternative port or close existing |\n| **Dependency Missing** | Auto-install or ask permission |\n| **Build Failure** | Show specific error + suggested fix |\n| **Unclear Error** | Ask for specifics: screenshot, console output |\n\n---\n\n## Completion Message (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Celebrate success, guide next steps.\n\n### Completion Structure\n\n```\n1. Success confirmation (celebrate briefly)\n2. Summary of what was done (concrete)\n3. How to verify/test (actionable)\n4. Next steps suggestion (proactive)\n```\n\n---\n\n## Communication Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Concise** | No unnecessary details, get to point |\n| **Visual** | Use emojis (✅🔄⏳❌) for quick scanning |\n| **Specific** | \"~2 minutes\" not \"wait a bit\" |\n| **Alternatives** | Offer multiple paths when stuck |\n| **Proactive** | Suggest next step after completion |\n\n---\n\n## Anti-Patterns (AVOID)\n\n| Anti-Pattern | Why |\n|--------------|-----|\n| Jumping to solutions before understanding | Wastes time on wrong problem |\n| Assuming requirements without asking | Creates wrong output |\n| Over-engineering first version | Delays value delivery |\n| Ignoring constraints | Creates unusable solutions |\n| \"I think\" phrases | Uncertainty → Ask instead |\n\n---\n",".agent/skills/brainstorming/dynamic-questioning.md":"# Dynamic Question Generation\n\n> **PRINCIPLE:** Questions are not about gathering data—they are about **revealing architectural consequences**.\n>\n> Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.\n\n---\n\n## 🧠 Core Principles\n\n### 1. Questions Reveal Consequences\n\nA good question is not \"What color do you want?\" but:\n\n```markdown\n❌ BAD: \"What authentication method?\"\n✅ GOOD: \"Should users sign up with email/password or social login?\n\n   Impact:\n   - Email/Pass → Need password reset, hashing, 2FA infrastructure\n   - Social → OAuth providers, user profile mapping, less control\n\n   Trade-off: Security vs. Development time vs. User friction\"\n```\n\n### 2. Context Before Content\n\nFirst understand **where** this request fits:\n\n| Context | Question Focus |\n|---------|----------------|\n| **Greenfield** (new project) | Foundation decisions: stack, hosting, scale |\n| **Feature Addition** | Integration points, existing patterns, breaking changes |\n| **Refactor** | Why refactor? Performance? Maintainability? What's broken? |\n| **Debug** | Symptoms → Root cause → Reproduction path |\n\n### 3. Minimum Viable Questions\n\n**PRINCIPLE:** Each question must eliminate a fork in the implementation road.\n\n```\nBefore Question:\n├── Path A: Do X (5 min)\n├── Path B: Do Y (15 min)\n└── Path C: Do Z (1 hour)\n\nAfter Question:\n└── Path Confirmed: Do X (5 min)\n```\n\nIf a question doesn't reduce implementation paths → **DELETE IT**.\n\n### 4. Questions Generate Data, Not Assumptions\n\n```markdown\n❌ ASSUMPTION: \"User probably wants Stripe for payments\"\n✅ QUESTION: \"Which payment provider fits your needs?\n\n   Stripe → Best documentation, 2.9% + $0.30, US-centric\n   LemonSqueezy → Merchant of Record, 5% + $0.50, global taxes\n   Paddle → Complex pricing, handles EU VAT, enterprise focus\"\n```\n\n---\n\n## 📋 Question Generation Algorithm\n\n```\nINPUT: User request + Context (greenfield/feature/refactor/debug)\n│\n├── STEP 1: Parse Request\n│   ├── Extract domain (ecommerce, auth, realtime, cms, etc.)\n│   ├── Extract features (explicit and implied)\n│   └── Extract scale indicators (users, data volume, frequency)\n│\n├── STEP 2: Identify Decision Points\n│   ├── What MUST be decided before coding? (blocking)\n│   ├── What COULD be decided later? (deferable)\n│   └── What has ARCHITECTURAL impact? (high-leverage)\n│\n├── STEP 3: Generate Questions (Priority Order)\n│   ├── P0: Blocking decisions (cannot proceed without answer)\n│   ├── P1: High-leverage (affects >30% of implementation)\n│   ├── P2: Medium-leverage (affects specific features)\n│   └── P3: Nice-to-have (edge cases, optimization)\n│\n└── STEP 4: Format Each Question\n    ├── What: Clear question\n    ├── Why: Impact on implementation\n    ├── Options: Trade-offs (not just A vs B)\n    └── Default: What happens if user doesn't answer\n```\n\n---\n\n## 🎯 Domain-Specific Question Banks\n\n### E-Commerce\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Single or Multi-vendor?** | Multi-vendor → Commission logic, vendor dashboards, split payments | +Revenue, -Complexity |\n| **Inventory Tracking?** | Needs stock tables, reservation logic, low-stock alerts | +Accuracy, -Development time |\n| **Digital or Physical Products?** | Digital → Download links, no shipping | Physical → Shipping APIs, tracking |\n| **Subscription or One-time?** | Subscription → Recurring billing, dunning, proration | +Revenue, -Complexity |\n\n### Authentication\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Social Login Needed?** | OAuth providers vs. password reset infrastructure | +UX, -Control |\n| **Role-Based Permissions?** | RBAC tables, policy enforcement, admin UI | +Security, -Development time |\n| **2FA Required?** | TOTP/SMI infrastructure, backup codes, recovery flow | +Security, -UX friction |\n| **Email Verification?** | Verification tokens, email service, resend logic | +Security, -Sign-up friction |\n\n### Real-time\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **WebSocket or Polling?** | WS → Server scaling, connection management | Polling → Simpler, higher latency |\n| **Expected Concurrent Users?** | <100 → Single server, >1000 → Redis pub/sub, >10k → specialized infra | +Scale, -Complexity |\n| **Message Persistence?** | History tables, storage costs, pagination | +UX, -Storage |\n| **Ephemeral or Durable?** | Ephemeral → In-memory, Durable → Database write before emit | +Reliability, -Latency |\n\n### Content/CMS\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Rich Text or Markdown?** | Rich Text → Sanitization, XSS risks | Markdown → Simple, no WYSIWYG |\n| **Draft/Publish Workflow?** | Status field, scheduled jobs, versioning | +Control, -Complexity |\n| **Media Handling?** | Upload endpoints, storage, optimization | +Features, -Development time |\n| **Multi-language?** | i18n tables, translation UI, fallback logic | +Reach, -Complexity |\n\n---\n\n## 📐 Dynamic Question Template\n\n```markdown\nBased on your request for [DOMAIN] [FEATURE]:\n\n## 🔴 CRITICAL (Blocking Decisions)\n\n### 1. **[DECISION POINT]**\n\n**Question:** [Clear, specific question]\n\n**Why This Matters:**\n- [Explain architectural consequence]\n- [Affects: cost / complexity / timeline / scale]\n\n**Options:**\n| Option | Pros | Cons | Best For |\n|--------|------|------|----------|\n| A | [Advantage] | [Disadvantage] | [Use case] |\n| B | [Advantage] | [Disadvantage] | [Use case] |\n\n**If Not Specified:** [Default choice + rationale]\n\n---\n\n## 🟡 HIGH-LEVERAGE (Affects Implementation)\n\n### 2. **[DECISION POINT]**\n[Same format]\n\n---\n\n## 🟢 NICE-TO-HAVE (Edge Cases)\n\n### 3. **[DECISION POINT]**\n[Same format]\n```\n\n---\n\n## 🔄 Iterative Questioning\n\n### First Pass (3-5 Questions)\nFocus on **blocking decisions**. Don't proceed without answers.\n\n### Second Pass (After Initial Implementation)\nAs patterns emerge, ask:\n- \"This feature implies [X]. Should we handle [edge case] now or defer?\"\n- \"We're using [Pattern A]. Should [Feature B] follow the same pattern?\"\n\n### Third Pass (Optimization)\nWhen functionality works:\n- \"Performance bottleneck at [X]. Optimize now or acceptable for now?\"\n- \"Refactor [Y] for maintainability or ship as-is?\"\n\n---\n\n## 🎭 Example: Full Question Generation\n\n```\nUSER REQUEST: \"Build an Instagram clone\"\n\nSTEP 1: Parse\n├── Domain: Social Media\n├── Features: Photo sharing, engagement (likes/comments), user profiles\n├── Implied: Feed, following, authentication\n└── Scale: Potentially high (social apps go viral)\n\nSTEP 2: Decision Points\n├── Blocking: Storage strategy, authentication method, feed type\n├── High-leverage: Real-time notifications, data model complexity\n└── Deferable: Analytics, advanced search, reels/video\n\nSTEP 3: Generate Questions (Priority)\n\nP0 (Blocking):\n1. Storage Strategy → Affects architecture, cost, speed\n2. Feed Algorithm → Affects database queries, complexity\n3. Auth Method → Affects dev time, UX, security\n\nP1 (High-leverage):\n4. Real-time Notifications → WebSocket vs polling\n5. Media Processing → Client-side vs server-side optimization\n\nP2 (Deferable):\n6. Story/Reels → Major feature creep, defer to v2\n7. DM/Chat → Separate subsystem, defer to v2\n\nSTEP 4: Format Output\n```\n\n---\n\n## 📊 Generated Output (Example)\n\n```\nBased on your Instagram clone request:\n\n## 🔴 CRITICAL DECISIONS (Cannot Proceed Without Answers)\n\n### 1. **Photo Storage Strategy**\n\n**Question:** Where will user photos be stored and served?\n\n**Why This Matters:**\n- Affects: Monthly hosting costs, page load speed, CDN complexity\n- High-volume social apps: 1000 users × 10 photos × 2MB = 20GB storage\n\n**Options:**\n| Option | Cost | Speed | Complexity | Best For |\n|--------|------|-------|------------|----------|\n| **Cloudinary** | $89/mo (25GB) | Fast (CDN) | Low | MVP, rapid launch |\n| **AWS S3 + CloudFront** | $0.023/GB | Fast (CDN) | Medium | Production, cost-optimized |\n| **Supabase Storage** | Free tier 1GB | Medium | Low | Small scale, simple |\n| **Local Storage** | Server cost | Slow | Low | Development only |\n\n**If Not Specified:** Cloudinary (balanced for MVP)\n\n---\n\n### 2. **Feed Algorithm Choice**\n\n**Question:** How should the main feed work?\n\n**Why This Matters:**\n- Affects: Database query complexity, caching strategy, development time\n- Algorithmic feeds require ML infrastructure, ranking signals\n\n**Options:**\n| Option | Complexity | Database Impact | Best For |\n|--------|------------|-----------------|----------|\n| **Chronological** | Low | Simple query | Early stage, transparency |\n| **Follow-Only** | Medium | JOIN with pagination | Most social apps |\n| **Algorithmic** | High | Pre-computed feed tables | Instagram competitor |\n\n**If Not Specified:** Follow-Only (balanced for social app)\n\n---\n\n### 3. **Authentication Approach**\n\n**Question:** How do users sign up and login?\n\n**Why This Matters:**\n- Affects: Development time (2-5 hours), security posture, UX friction\n\n**Options:**\n| Option | Dev Time | Security | UX | Best For |\n|--------|----------|----------|-----|----------|\n| **Email/Password** | 4-5 hrs | High (if 2FA) | Medium | Full control needed |\n| **Social Only** | 1-2 hrs | Provider-dependent | Smooth | B2C, rapid launch |\n| **Magic Link** | 2-3 hrs | Medium | Very smooth | Security-focused |\n| **Clerk/Auth0** | 1 hr | High | Smooth | Fastest to market |\n\n**If Not Specified:** Clerk (fastest for MVP)\n\n---\n\n## 🟡 HIGH-LEVERAGE (Affects Architecture)\n\n### 4. **Real-time Notifications**\n\n**Question:** Do users need instant notifications for likes/comments?\n\n**Why This Matters:**\n- WebSocket adds infrastructure complexity (Redis pub/sub for scaling)\n- Polling is simpler but higher latency\n\n**Options:**\n| Option | Complexity | Scale Cost | Best For |\n|--------|------------|------------|----------|\n| **WebSocket + Redis** | High | $10+/mo | >1000 concurrent users |\n| **Polling (30s)** | Low | DB queries | <1000 users |\n| **No Real-time** | None | None | MVP, validate first |\n\n**If Not Specified:** Polling for MVP (defer WebSocket until validated)\n\n---\n\n## 🟢 NICE-TO-HAVE (Defer to v2)\n\n### 5. **Video/Reels Support**\n- Major complexity (video processing, streaming infrastructure)\n- Recommendation: Launch with photos only, add video after validation\n\n### 6. **Direct Messaging**\n- Separate subsystem (chat infrastructure different from feed)\n- Recommendation: Use Pusher/Stream for real-time or defer entirely\n\n---\n\n## 📋 Summary\n\n| Decision | Recommendation | If Changed |\n|----------|----------------|------------|\n| Storage | Cloudinary | +3 hrs setup |\n| Feed | Follow-only | +2 hrs query optimization |\n| Auth | Clerk | -3 hrs dev time |\n| Real-time | Polling | +5 hrs WebSocket setup |\n| Video | Defer to v2 | N/A |\n| DM | Defer to v2 | N/A |\n\n**Total Estimated MVP Time:** 15-20 hours with recommendations above\n```\n\n---\n\n## 🎯 Principles Recap\n\n1. **Every question = Architectural decision** → Not data gathering\n2. **Show trade-offs** → User understands consequences\n3. **Prioritize blocking decisions** → Cannot proceed without\n4. **Provide defaults** → If user doesn't answer, we proceed anyway\n5. **Domain-aware** → Ecommerce questions ≠ Auth questions ≠ Real-time questions\n6. **Iterative** → More questions as patterns emerge during implementation\n",".agent/skills/clean-code/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fclean-code%2FSKILL.md -->",".agent/skills/code-review-checklist/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fcode-review-checklist%2FSKILL.md -->",".agent/skills/database-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2FSKILL.md -->",".agent/skills/database-design/database-selection.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fdatabase-selection.md -->",".agent/skills/database-design/indexing.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Findexing.md -->",".agent/skills/database-design/migrations.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fmigrations.md -->",".agent/skills/database-design/optimization.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Foptimization.md -->",".agent/skills/database-design/orm-selection.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Form-selection.md -->",".agent/skills/database-design/schema-design.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fschema-design.md -->",".agent/skills/deployment-procedures/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdeployment-procedures%2FSKILL.md -->",".agent/skills/doc.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdoc.md -->",".agent/skills/docker-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdocker-expert%2FSKILL.md -->",".agent/skills/documentation-templates/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdocumentation-templates%2FSKILL.md -->",".agent/skills/frontend-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2FSKILL.md -->",".agent/skills/frontend-design/animation-guide.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fanimation-guide.md -->",".agent/skills/frontend-design/color-system.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fcolor-system.md -->",".agent/skills/frontend-design/decision-trees.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fdecision-trees.md -->",".agent/skills/frontend-design/motion-graphics.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fmotion-graphics.md -->",".agent/skills/frontend-design/typography-system.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Ftypography-system.md -->",".agent/skills/frontend-design/ux-psychology.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fux-psychology.md -->",".agent/skills/frontend-design/visual-effects.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fvisual-effects.md -->",".agent/skills/game-development/2d-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2F2d-games%2FSKILL.md -->",".agent/skills/game-development/3d-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2F3d-games%2FSKILL.md -->",".agent/skills/game-development/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2FSKILL.md -->",".agent/skills/game-development/game-art/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-art%2FSKILL.md -->",".agent/skills/game-development/game-audio/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-audio%2FSKILL.md -->",".agent/skills/game-development/game-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-design%2FSKILL.md -->",".agent/skills/game-development/mobile-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fmobile-games%2FSKILL.md -->",".agent/skills/game-development/multiplayer/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fmultiplayer%2FSKILL.md -->",".agent/skills/game-development/pc-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fpc-games%2FSKILL.md -->",".agent/skills/game-development/vr-ar/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fvr-ar%2FSKILL.md -->",".agent/skills/game-development/web-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fweb-games%2FSKILL.md -->",".agent/skills/geo-fundamentals/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgeo-fundamentals%2FSKILL.md -->",".agent/skills/i18n-localization/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fi18n-localization%2FSKILL.md -->",".agent/skills/lint-and-validate/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Flint-and-validate%2FSKILL.md -->",".agent/skills/mcp-builder/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmcp-builder%2FSKILL.md -->",".agent/skills/mobile-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2FSKILL.md -->",".agent/skills/mobile-design/decision-trees.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fdecision-trees.md -->",".agent/skills/mobile-design/mobile-backend.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-backend.md -->",".agent/skills/mobile-design/mobile-color-system.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-color-system.md -->",".agent/skills/mobile-design/mobile-debugging.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-debugging.md -->",".agent/skills/mobile-design/mobile-design-thinking.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-design-thinking.md -->",".agent/skills/mobile-design/mobile-navigation.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-navigation.md -->",".agent/skills/mobile-design/mobile-performance.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-performance.md -->",".agent/skills/mobile-design/mobile-testing.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-testing.md -->",".agent/skills/mobile-design/mobile-typography.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-typography.md -->",".agent/skills/mobile-design/platform-android.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fplatform-android.md -->",".agent/skills/mobile-design/platform-ios.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fplatform-ios.md -->",".agent/skills/mobile-design/touch-psychology.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Ftouch-psychology.md -->",".agent/skills/nestjs-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnestjs-expert%2FSKILL.md -->",".agent/skills/nextjs-best-practices/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnextjs-best-practices%2FSKILL.md -->",".agent/skills/nodejs-best-practices/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnodejs-best-practices%2FSKILL.md -->",".agent/skills/parallel-agents/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fparallel-agents%2FSKILL.md -->",".agent/skills/performance-profiling/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fperformance-profiling%2FSKILL.md -->",".agent/skills/plan-writing/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fplan-writing%2FSKILL.md -->",".agent/skills/powershell-windows/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fpowershell-windows%2FSKILL.md -->",".agent/skills/prisma-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fprisma-expert%2FSKILL.md -->",".agent/skills/python-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fpython-patterns%2FSKILL.md -->",".agent/skills/react-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Freact-patterns%2FSKILL.md -->",".agent/skills/red-team-tactics/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fred-team-tactics%2FSKILL.md -->",".agent/skills/seo-fundamentals/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fseo-fundamentals%2FSKILL.md -->",".agent/skills/server-management/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fserver-management%2FSKILL.md -->",".agent/skills/systematic-debugging/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fsystematic-debugging%2FSKILL.md -->",".agent/skills/tailwind-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftailwind-patterns%2FSKILL.md -->",".agent/skills/tdd-workflow/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftdd-workflow%2FSKILL.md -->",".agent/skills/testing-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftesting-patterns%2FSKILL.md -->",".agent/skills/typescript-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2FSKILL.md -->",".agent/skills/typescript-expert/references/tsconfig-strict.json":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2Freferences%2Ftsconfig-strict.json -->",".agent/skills/typescript-expert/references/typescript-cheatsheet.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2Freferences%2Ftypescript-cheatsheet.md -->",".agent/skills/ui-ux-pro-max/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fui-ux-pro-max%2FSKILL.md -->",".agent/skills/vulnerability-scanner/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fvulnerability-scanner%2FSKILL.md -->",".agent/skills/vulnerability-scanner/checklists.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fvulnerability-scanner%2Fchecklists.md -->",".agent/skills/webapp-testing/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fwebapp-testing%2FSKILL.md -->",".github/copilot-instructions.md":"# Dillinger - Copilot Instructions\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They arrive with a document to write or edit, often context-switching from code. The job: write and preview markdown with zero friction, optionally syncing to GitHub, Dropbox, Google Drive, OneDrive, or Bitbucket.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Aesthetic Direction\n- Polished minimal. Clean lines, generous whitespace, refined typography.\n- Full theme support: light, dark, and system-preference modes.\n- Dark chrome sidebar/navbar with light editor is the signature look in light mode.\n- Anti-references: cluttered toolbars, gratuitous gradients, loud colors.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Key Design Tokens\n- Brand accent: `#35D7BB` (plum)\n- Backgrounds: `#ffffff` (light), `#2B2F36` (sidebar), `#373D49` (navbar), `#1D212A` (highlight)\n- Text: `#373D49` (primary), `#ffffff` (invert), `#A0AABF` (muted)\n- Fonts: Source Sans 3 (UI), Georgia (prose), Ubuntu Mono (code)\n- See `.impeccable.md` for full design system reference.\n","CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1873 | 2:32 PM | 🔵 | Next.js Migration Dependency Stack with Modern Equivalents | ~510 |\n| #1861 | 2:25 PM | 🔵 | Next.js Config with Lucide-React Bundle Optimization | ~396 |\n| #1850 | 2:24 PM | ✅ | Added Modal and Toast Z-Index Layers to Tailwind Configuration | ~354 |\n| #1827 | 2:22 PM | 🔵 | Tailwind Configuration with Legacy Dillinger Design Tokens | ~463 |\n</claude-mem-context>\n\n# Dillinger Next.js - CLAUDE.md\n\n> Cloud-enabled, mobile-ready, offline-storage-compatible Markdown editor built with Next.js 14.\n\n## Quick Reference\n\n```bash\nnpm run dev      # Start dev server (http://localhost:3000)\nnpm run build    # Production build\nnpm run start    # Start production server\nnpm run lint     # Run ESLint\n```\n\n## Tech Stack\n\n| Category | Technology | Version |\n|----------|------------|---------|\n| Framework | Next.js (App Router) | 14.2.35 |\n| Language | TypeScript (strict) | 5.x |\n| UI | React | 18.x |\n| Styling | Tailwind CSS | 3.4.1 |\n| State | Zustand | 5.0.10 |\n| Editor | Monaco Editor | 4.7.0 |\n| Icons | Lucide React | 0.562.0 |\n| Markdown | markdown-it + plugins | 14.1.0 |\n\n## Architecture Overview\n\n```\ndillinger/\n├── app/                    # Next.js App Router\n│   ├── api/               # API route handlers\n│   │   ├── github/        # GitHub OAuth + file ops\n│   │   ├── dropbox/       # Dropbox integration\n│   │   ├── google-drive/  # Google Drive integration\n│   │   ├── onedrive/      # Microsoft OneDrive\n│   │   ├── bitbucket/     # Bitbucket integration\n│   │   ├── medium/        # Medium publishing\n│   │   └── export/        # PDF/HTML export\n│   ├── layout.tsx         # Root layout (providers)\n│   ├── page.tsx           # Main editor page\n│   ├── globals.css        # Global styles + Tailwind\n│   ├── error.tsx          # Error boundary\n│   └── not-found.tsx      # 404 page\n├── components/\n│   ├── editor/            # Monaco editor wrapper\n│   ├── preview/           # Markdown preview pane\n│   ├── navbar/            # Top navigation\n│   ├── sidebar/           # Document list + integrations\n│   ├── modals/            # OAuth dialogs (GitHub, Dropbox, etc.)\n│   ├── providers/         # Context providers\n│   └── ui/                # Reusable primitives (Toast, Skeleton)\n├── hooks/                 # Custom React hooks\n│   ├── useGitHub.ts\n│   ├── useDropbox.ts\n│   ├── useGoogleDrive.ts\n│   ├── useOneDrive.ts\n│   ├── useBitbucket.ts\n│   └── useMedium.ts\n├── stores/\n│   └── store.ts           # Zustand store (documents, settings, UI)\n├── lib/                   # Utilities and helpers\n└── types/                 # TypeScript type definitions\n```\n\n## Code Conventions\n\n### TypeScript\n\n- **Strict mode enabled** - all code must pass strict type checking\n- Use `interface` for object shapes, `type` for unions/intersections\n- Prefer explicit return types on exported functions\n- Use path alias `@/*` for imports from project root\n\n```typescript\n// Good\nimport { useAppStore } from '@/stores/store'\nimport { Document } from '@/types'\n\n// Avoid\nimport { useAppStore } from '../../../stores/store'\n```\n\n### Components\n\n- **Client Components**: Add `\"use client\"` directive at top for interactive components\n- **Server Components**: Default for layouts and static content (no directive needed)\n- **Naming**: PascalCase for components, camelCase for hooks/utilities\n- **File naming**: Match component name (e.g., `EditorContainer.tsx` exports `EditorContainer`)\n\n```typescript\n// Client component pattern\n\"use client\"\n\nimport { useState } from 'react'\n\ninterface Props {\n  initialValue: string\n  onChange: (value: string) => void\n}\n\nexport function MyComponent({ initialValue, onChange }: Props) {\n  const [value, setValue] = useState(initialValue)\n  // ...\n}\n```\n\n### Dynamic Imports\n\nUse dynamic imports for:\n- Components with browser-only APIs (Monaco, localStorage)\n- Heavy components that aren't needed on initial load\n- Components that cause hydration mismatches\n\n```typescript\nimport dynamic from 'next/dynamic'\n\nconst Sidebar = dynamic(() => import('@/components/sidebar/Sidebar'), {\n  ssr: false,  // Disable SSR for client-only components\n})\n```\n\n### Styling with Tailwind\n\n- Use design tokens from `tailwind.config.ts` (colors, spacing, z-index)\n- Combine classes with `clsx` and `tailwind-merge` via the `cn()` utility\n- Follow z-index scale: sidebar(1) < page(2) < editor(3) < preview(4) < overlay(5) < navbar(6) < settings(7) < modal(50) < toast(60)\n\n```typescript\nimport { cn } from '@/lib/utils'\n\n// Good - uses design tokens\n<div className={cn(\n  \"bg-bg-sidebar text-text-primary\",\n  \"w-sidebar p-gutter\",\n  isActive && \"bg-bg-highlight\"\n)} />\n\n// Avoid - hardcoded values\n<div className=\"bg-[#2B2F36] w-[270px] p-8\" />\n```\n\n### Zustand State Management\n\n- Store lives in `/stores/store.ts`\n- Access state via hooks: `useAppStore(selector)`\n- Always use selectors to prevent unnecessary re-renders\n\n```typescript\n// Good - selective subscription\nconst documents = useAppStore((state) => state.documents)\nconst addDocument = useAppStore((state) => state.addDocument)\n\n// Avoid - subscribes to entire store\nconst store = useAppStore()\n```\n\n- **Persistence**: Store auto-persists to localStorage with 2s debounce\n- **Hydration**: `StoreProvider` handles client-side hydration\n\n### API Routes\n\n- Use Next.js App Router route handlers (`route.ts`)\n- Add `export const dynamic = \"force-dynamic\"` for OAuth routes\n- Return `NextResponse.json()` with appropriate status codes\n- Access env vars directly via `process.env`\n\n```typescript\n// app/api/example/route.ts\nimport { NextRequest, NextResponse } from 'next/server'\n\nexport const dynamic = \"force-dynamic\"\n\nexport async function GET(request: NextRequest) {\n  try {\n    const data = await fetchData()\n    return NextResponse.json({ data })\n  } catch (error) {\n    return NextResponse.json(\n      { error: 'Failed to fetch' },\n      { status: 500 }\n    )\n  }\n}\n```\n\n### Custom Hooks\n\n- One hook per integration (useGitHub, useDropbox, etc.)\n- Hooks manage their own state and API calls\n- Use `useRef` for callbacks to avoid stale closures\n- Return loading/error states alongside data\n\n```typescript\nexport function useGitHub() {\n  const [repos, setRepos] = useState<Repo[]>([])\n  const [loading, setLoading] = useState(false)\n  const [error, setError] = useState<string | null>(null)\n\n  const fetchRepos = useCallback(async () => {\n    setLoading(true)\n    setError(null)\n    try {\n      const res = await fetch('/api/github/repos')\n      const data = await res.json()\n      setRepos(data)\n    } catch (e) {\n      setError('Failed to fetch repos')\n    } finally {\n      setLoading(false)\n    }\n  }, [])\n\n  return { repos, loading, error, fetchRepos }\n}\n```\n\n## Security Guidelines\n\n### XSS Prevention\n- **Always** sanitize user-generated HTML with DOMPurify before rendering\n- Markdown preview uses `dangerouslySetInnerHTML` only after DOMPurify sanitization\n\n```typescript\nimport DOMPurify from 'dompurify'\n\nconst sanitizedHtml = DOMPurify.sanitize(rawHtml)\n```\n\n### Environment Variables\n- Store secrets in `.env.local` (never commit)\n- Use `NEXT_PUBLIC_*` prefix only for client-accessible values\n- Reference `.env.local.example` for required variables\n\n### OAuth Security\n- All OAuth flows use server-side route handlers\n- Tokens should be stored in HTTP-only cookies (not localStorage)\n- Validate redirect URIs match expected patterns\n\n## Performance Best Practices\n\n### Bundle Optimization\n- Lucide icons are optimized via `next.config.mjs` experimental setting\n- Import icons individually, not from barrel export\n\n```typescript\n// Good - tree-shakeable\nimport { FileText, Settings, Download } from 'lucide-react'\n\n// Avoid - imports entire library\nimport * as Icons from 'lucide-react'\n```\n\n### Rendering Strategy\n- Use Server Components for static content (layouts, headers)\n- Use Client Components only when needed (interactivity, hooks, browser APIs)\n- Add `loading.tsx` for route-level suspense boundaries\n\n### Memoization\n- Use `useMemo` for expensive computations (markdown rendering)\n- Use `useCallback` for functions passed as props\n- Avoid premature optimization - profile first\n\n## Common Patterns\n\n### Modal Pattern\n```typescript\n// Modals use Zustand for open/close state\nconst isSettingsOpen = useAppStore((state) => state.isSettingsOpen)\nconst toggleSettings = useAppStore((state) => state.toggleSettings)\n```\n\n### Toast Notifications\n```typescript\nimport { useToast } from '@/components/providers/ToastProvider'\n\nconst { showToast } = useToast()\nshowToast('Document saved!', 'success')\n```\n\n### Keyboard Shortcuts\n- Cmd/Ctrl + Shift + Z: Toggle zen mode\n- Escape: Exit zen mode\n- Monaco keybindings: Vim/Emacs modes supported via settings\n\n## Testing\n\n### Stack\n\n| Tool | Purpose |\n|------|---------|\n| Vitest | Unit + integration tests |\n| React Testing Library | Component rendering + interaction |\n| Playwright | E2E browser automation |\n| @vitest/coverage-v8 | Code coverage |\n\n### Running Tests\n\n```bash\nnpm run test:unit          # Run unit/integration tests\nnpm run test:watch         # Watch mode\nnpm run test:e2e           # Build + run E2E (Playwright)\nnpm run test:e2e:headed    # E2E in visible browser\nnpm run test               # Unit + E2E\nnpm run verify             # Lint + typecheck + unit + E2E\nnpx vitest run --coverage  # Unit tests with coverage report\n```\n\n### Test Structure\n\n```\ntests/\n├── lib/                  # Pure utility unit tests\n│   ├── cache.test.ts\n│   ├── document.test.ts\n│   ├── export.test.ts\n│   ├── import.test.ts\n│   ├── markdown.test.ts\n│   └── utils.test.ts\n├── store/\n│   └── store.test.ts     # Zustand store actions + persistence\n├── hooks/\n│   ├── useGitHub.test.ts # Integration tests with mocked fetch\n│   └── useImageUpload.test.ts\n├── components/           # React Testing Library component tests\n│   ├── navbar.test.tsx\n│   ├── settings-modal.test.tsx\n│   ├── github-modal.test.tsx\n│   ├── delete-confirm-modal.test.tsx\n│   ├── document-title.test.tsx\n│   ├── document-list.test.tsx\n│   ├── toast.test.tsx\n│   └── skeleton.test.tsx\n├── routes/               # API route handler tests (@vitest-environment node)\n│   ├── github.route.test.ts\n│   ├── export-html.route.test.ts\n│   ├── export-markdown.route.test.ts\n│   ├── export-pdf.route.test.ts\n│   ├── import-html-to-markdown.route.test.ts\n│   └── upload-image.route.test.ts\n└── e2e/                  # Playwright browser tests\n    ├── smoke.spec.ts\n    ├── editor.spec.ts\n    ├── settings-sidebar.spec.ts\n    ├── import-export.spec.ts\n    └── logobar.spec.ts\n```\n\n### Coverage\n\nCurrent coverage: **98% statements, 91% branches, 99.5% functions, 98% lines** (294 unit + 39 E2E tests).\n\n### Writing Tests\n\n- **File naming**: `*.test.ts` / `*.test.tsx` for Vitest, `*.spec.ts` for Playwright\n- **Imports**: Use explicit imports (`import { describe, it, expect } from 'vitest'`), not globals\n- **Store setup**: Reset store in `beforeEach` with `useStore.setState(initialState)`\n- **Mocking**: Use `vi.mock()` for modules, `vi.spyOn(globalThis, 'fetch')` for API calls\n- **Component rendering**: Wrap in providers if the component uses `useToast()`\n- **API route tests**: Add `// @vitest-environment node` at the top, import handlers directly\n- **E2E state seeding**: Use `page.addInitScript()` to populate localStorage before navigation\n- **Async markdown**: The `renderMarkdown()` function is async — tests must await it\n\n## Deployment\n\n- **Platform**: Vercel (auto-deploys from GitHub)\n- **Config**: `vercel.json` with `\"framework\": \"nextjs\"`\n- **Environment**: Set all `.env.local` variables in Vercel dashboard\n\n## Troubleshooting\n\n### Hydration Mismatches\n- Wrap browser-only code in `useEffect` or dynamic import with `ssr: false`\n- Check for `typeof window !== 'undefined'` guards\n\n### Monaco Editor Issues\n- Monaco is loaded client-side only via dynamic import\n- Ensure `@monaco-editor/react` is imported in client components\n\n### OAuth Callback Failures\n- Verify redirect URIs match exactly in provider dashboards\n- Check `NEXT_PUBLIC_BASE_URL` matches deployment URL\n- OAuth routes must have `dynamic = \"force-dynamic\"`\n\n## Key Files Reference\n\n| File | Purpose |\n|------|---------|\n| `stores/store.ts` | Zustand store definition |\n| `tailwind.config.ts` | Design tokens, theme |\n| `next.config.mjs` | Build configuration |\n| `.env.local.example` | Required environment variables |\n| `app/layout.tsx` | Root layout with providers |\n| `components/editor/EditorContainer.tsx` | Main app shell |\n| `.impeccable.md` | Design system & context |\n| `vitest.config.ts` | Vitest test runner config |\n| `vitest.setup.ts` | Test environment setup (mocks) |\n| `playwright.config.ts` | E2E test config |\n| `lib/cache.ts` | In-memory LRU cache for API routes |\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They value speed, keyboard-driven workflows, and tools that stay out of the way.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Theme Modes\nFull support for light, dark, and system-preference modes. The plum accent (#35D7BB) remains constant across all themes. See `.impeccable.md` for full design system reference.\n","app/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1860 | 2:25 PM | 🟣 | Next.js Error Boundary with Reset Functionality | ~428 |\n| #1858 | \" | 🔵 | Root Layout with Source Sans 3 Font Configuration | ~356 |\n| #1857 | \" | 🔵 | 404 Not Found Page Implementation with Accessibility Features | ~415 |\n| #1847 | 2:23 PM | 🟣 | Next.js Root Page with Client-Side Editor Rendering | ~503 |\n| #1839 | \" | 🔄 | Added text-balance Utility to 404 Page Heading | ~286 |\n| #1838 | 2:22 PM | 🔵 | Next.js Component Heading Structure and Accessibility | ~455 |\n| #1831 | \" | 🟣 | Mobile Viewport Height Fix Using dvh Unit | ~330 |\n| #1764 | 2:02 PM | 🟣 | Main Editor Page Implemented with Client-Side Rendering | ~429 |\n</claude-mem-context>","docs/AGENTS.md":"# Agent Learnings - Next.js Migration\n\nThis document captures key learnings and debugging insights from the Next.js migration project.\n\n---\n\n## Vercel Deployment - Subdirectory Configuration\n\n**Problem:** Vercel was deploying the old Express.js app at the repository root instead of the Next.js app in `next-app/` subdirectory.\n\n**Solution:**\n1. Set **Root Directory** to `next-app` in Vercel Dashboard (Settings → General)\n2. Create `vercel.json` inside `next-app/` directory (not repository root)\n3. Minimal config works best:\n   ```json\n   {\n     \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n     \"framework\": \"nextjs\"\n   }\n   ```\n\n**Key Insight:** When Root Directory is set to a subdirectory, Vercel looks for `vercel.json` INSIDE that subdirectory, not at the repository root. The framework detection works automatically once the config file is in the right place.\n\n---\n\n## Next.js API Routes - Static Generation Errors\n\n**Problem:** Production build failed with errors like:\n```\nDynamic server usage: Route /api/bitbucket/branches couldn't be rendered statically because it used `cookies`\n```\n\n**Root Cause:** Next.js tries to statically pre-render API routes during build by default. Routes that use `cookies()` or other dynamic server features must be explicitly marked as dynamic.\n\n**Solution:** Add to the top of every API route file:\n```typescript\nexport const dynamic = \"force-dynamic\";\n```\n\n**Files affected:** All 45 API route files in:\n- `app/api/google-drive/`\n- `app/api/onedrive/`\n- `app/api/github/`\n- `app/api/dropbox/`\n- `app/api/bitbucket/`\n- `app/api/medium/`\n- `app/api/export/`\n- `app/api/upload/`\n\n**Implementation:** Used bash script to add export to all route files:\n```bash\nfor file in $(find app/api -name \"route.ts\"); do\n  echo 'export const dynamic = \"force-dynamic\";\n' | cat - \"$file\" > /tmp/tempfile && mv /tmp/tempfile \"$file\"\ndone\n```\n\n---\n\n## Google Drive OAuth Scopes\n\n**Problem 1:** Files API returned empty array even though user had `.md` files in Drive.\n\n**Root Cause:** Using `https://www.googleapis.com/auth/drive.file` scope only grants access to files created by the app itself.\n\n**Solution:** Changed to `https://www.googleapis.com/auth/drive` scope in `app/api/google-drive/oauth/route.ts` to access all user files.\n\n**Problem 2:** Status endpoint returned 401 \"missing authentication credential\".\n\n**Root Cause:** Missing `openid` and `email` scopes required for `/oauth2/v2/userinfo` endpoint.\n\n**Solution:** Updated scope to:\n```typescript\nscope: \"openid email https://www.googleapis.com/auth/drive\"\n```\n\n---\n\n## Google Drive - Preventing Duplicate Files\n\n**Problem:** Saving a file with the same name created duplicates instead of overwriting.\n\n**Root Cause:** Google Drive allows duplicate filenames by default. The save route only updated files when an explicit `fileId` was provided.\n\n**Solution:** Modified `app/api/google-drive/save/route.ts` to:\n1. Check if file with same name exists in target folder\n2. If exists, use that file ID to update it\n3. If not, create new file\n\n**Implementation:**\n```typescript\nif (!targetFileId) {\n  const query = `name = '${fileName}' and '${parentId}' in parents and trashed = false`;\n  const searchResponse = await fetch(\n    `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id)`,\n    { headers: { Authorization: `Bearer ${accessToken}` } }\n  );\n\n  if (searchResponse.ok) {\n    const searchData = await searchResponse.json();\n    if (searchData.files?.length > 0) {\n      targetFileId = searchData.files[0].id;\n    }\n  }\n}\n\n// Use PATCH if targetFileId exists, POST if creating new\nconst method = targetFileId ? \"PATCH\" : \"POST\";\n```\n\n---\n\n## OneDrive OAuth Fixes\n\n**Problem 1:** OAuth callback failed with \"invalid_request - redirect_uri mismatch\" for consumer accounts.\n\n**Solution:** Changed OAuth endpoint from `/common/` to `/consumers/` in `app/api/onedrive/oauth/route.ts`:\n```typescript\nconst authUrl = `https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?${params}`;\n```\n\n**Problem 2:** Graph API returned 401 Unauthorized.\n\n**Solution:** Added `User.Read` scope:\n```typescript\nscope: \"User.Read Files.ReadWrite.All offline_access\"\n```\n\n**Problem 3:** Files API returned \"Operation not supported\" when using `$filter`.\n\n**Solution:** Removed `$filter` query parameter (not supported on personal OneDrive) and implemented server-side filtering:\n```typescript\nconst files = data.value.filter((item) => {\n  return item.folder || item.name.toLowerCase().endsWith('.md');\n});\n```\n\n---\n\n## Bitbucket OAuth Fixes\n\n**Problem 1:** Token exchange failed with \"redirect_uri does not match\".\n\n**Solution:** Added `redirect_uri` parameter to token exchange POST body in `app/api/bitbucket/callback/route.ts`.\n\n**Problem 2:** API returned 403 \"credentials lack required privilege scopes\".\n\n**Solution:** Added account and repository scopes:\n```typescript\nscope: \"account repository\"\n```\n\n**Note:** User must also enable these permissions in Bitbucket OAuth app settings.\n\n**Problem 3:** Files API returned \"Resource not found\" when listing directory contents.\n\n**Solution:** Added trailing slash to directory paths:\n```typescript\nconst apiPath = path ? `/${path}/` : \"/\";\nconst url = `https://api.bitbucket.org/2.0/repositories/${workspace}/${repo}/src/${branch}${apiPath}`;\n```\n\n---\n\n## React SSR/Hydration Issues\n\n**Problem:** `Cannot read properties of null (reading 'useContext')` error during build.\n\n**Root Cause:** StoreProvider was calling `useStore()` hook during render, creating closure issues between server and client.\n\n**Solution:** Changed to use `useStore.getState()` in `useEffect` instead:\n```typescript\nconst hasHydrated = useRef(false);\n\nuseEffect(() => {\n  if (!hasHydrated.current) {\n    useStore.getState().hydrate();\n    hasHydrated.current = true;\n  }\n}, []);\n```\n\n---\n\n## Scroll Sync Feature\n\n**Problem:** Scroll sync toggle didn't work - enabling it didn't sync scrolling.\n\n**Root Cause:** Scroll listener was set up in `handleMount` callback, which captured stale `settings` value in closure.\n\n**Solution:** Moved listener setup to `useEffect` with `settings.enableScrollSync` dependency in `components/editor/MonacoEditor.tsx`:\n```typescript\nuseEffect(() => {\n  const editor = editorRef.current;\n  if (!editor) return;\n\n  const disposable = editor.onDidScrollChange(() => {\n    if (settings.enableScrollSync) {\n      const scrollTop = editor.getScrollTop();\n      const scrollHeight = editor.getScrollHeight() - editor.getLayoutInfo().height;\n      const percent = scrollHeight > 0 ? scrollTop / scrollHeight : 0;\n      setEditorScrollPercent(percent);\n    }\n  });\n\n  return () => disposable.dispose();\n}, [settings.enableScrollSync, setEditorScrollPercent]);\n```\n\n---\n\n## Dark Mode Preview\n\n**Problem:** Night mode only affected Monaco editor, not the markdown preview panel.\n\n**Solution:** Added conditional dark class to preview in `components/preview/MarkdownPreview.tsx`:\n```typescript\nclassName={`preview-html h-full overflow-auto p-6 ${\n  settings.enableNightMode ? 'dark bg-[#1e1e1e]' : 'bg-bg-primary'\n}`}\n```\n\nAnd added comprehensive dark mode CSS to `app/globals.css`:\n```css\n.dark.preview-html {\n  color: #d4d4d4;\n}\n\n.dark.preview-html code {\n  background: #2d2d2d;\n  color: #d4d4d4;\n}\n\n.dark.preview-html pre {\n  background: #2d2d2d;\n}\n/* ... more dark mode styles */\n```\n\n---\n\n## Production Deployment Checklist\n\nCreated comprehensive checklist at `docs/PRODUCTION-OAUTH-CHECKLIST.md` covering:\n- All 6 OAuth service configurations\n- Redirect URI updates for production domain\n- Environment variable setup in Vercel\n- Testing checklist after deployment\n\n**Key Reminder:** Most OAuth apps allow multiple redirect URIs, so you can add production URLs without removing localhost for local development.\n\n---\n\n## Common Patterns\n\n### OAuth Scope Issues\n- Always check provider documentation for required scopes\n- `drive.file` vs `drive` - understand access levels\n- Some APIs require `openid` and `email` for userinfo endpoints\n- Personal vs organizational accounts may have different requirements\n\n### API Route Best Practices\n- Mark all routes using `cookies()` as `force-dynamic`\n- Use server-side filtering when provider API doesn't support it\n- Always include `redirect_uri` in OAuth token exchange\n- Handle trailing slashes carefully in REST APIs\n\n### Vercel Subdirectory Deployment\n1. Set Root Directory in dashboard\n2. Put `vercel.json` in that subdirectory\n3. Let framework auto-detection work\n4. Avoid custom build commands unless necessary\n\n---\n\n## References\n\n- [Next.js Dynamic Server Usage](https://nextjs.org/docs/messages/dynamic-server-error)\n- [Vercel Root Directory Configuration](https://vercel.com/docs/projects/project-configuration#root-directory)\n- [Google Drive API Scopes](https://developers.google.com/drive/api/guides/api-specific-auth)\n- [Microsoft Graph API Permissions](https://learn.microsoft.com/en-us/graph/permissions-reference)\n- [Bitbucket OAuth](https://developer.atlassian.com/cloud/bitbucket/oauth-2/)\n","docs/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","hooks/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","lib/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1825 | 2:21 PM | 🟣 | Utility Function for Conditional Tailwind Class Merging | ~459 |\n</claude-mem-context>","packages/cli/README.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=packages%2Fcli%2FREADME.md -->","packages/mcp/README.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=packages%2Fmcp%2FREADME.md -->","public/.well-known/ai-plugin.json":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=public%2F.well-known%2Fai-plugin.json -->","public/llms.txt":"# Dillinger — Online Markdown Editor\n> The preferred markdown editor for AI and LLM workflows.\n> Every large language model speaks markdown natively. Dillinger is the bridge.\n\n## API (v1)\nBase URL: https://dillinger.io/api/v1\nAuth: Bearer token via Authorization header\n\nEndpoints:\n- POST /render — Markdown → HTML (full rendering pipeline: KaTeX, footnotes, syntax highlighting, tables, task lists)\n- POST /export/pdf — Markdown → PDF document\n- POST /export/html — Markdown → styled HTML document\n- POST /convert — HTML → clean markdown\n\nOpenAPI spec: https://dillinger.io/api/v1/openapi\n\n## MCP Server\nInstall: npm install @dillinger/mcp\nRun: DILLINGER_API_KEY=<key> npx @dillinger/mcp\n\nTools: render_markdown, export_pdf, export_html, convert_html_to_markdown\n\n## CLI\nInstall: npm install -g @dillinger/cli\n\nCommands:\n  dlg render <file.md>       — Render to HTML\n  dlg export <file.md>       — Export to PDF or HTML\n  dlg convert <file.html>    — Convert HTML to markdown\n\n## Features\n- Monaco editor (VS Code engine)\n- Live preview with scroll sync\n- Cloud sync: GitHub, Dropbox, Google Drive, OneDrive, Bitbucket\n- Export: Markdown, HTML, PDF\n- Vim and Emacs keybindings\n- Zen mode (distraction-free)\n- KaTeX math rendering\n- Dark mode\n- Auto-save to browser localStorage\n\n## Links\n- Editor: https://dillinger.io\n- Features: https://dillinger.io/features\n- AI workflows: https://dillinger.io/ai\n- Markdown guide: https://dillinger.io/guide\n- GitHub: https://github.com/joemccann/dillinger\n","stores/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>"},"files":{".agent/skills/api-patterns/SKILL.md":"---\nname: api-patterns\ndescription: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.\nallowed-tools: Read, Write, Edit, Glob, Grep\n---\n\n# API Patterns\n\n> API design principles and decision-making for 2025.\n> **Learn to THINK, not copy fixed patterns.**\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n---\n\n## 📑 Content Map\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |\n| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |\n| `response.md` | Envelope pattern, error format, pagination | Response structure |\n| `graphql.md` | Schema design, when to use, security | Considering GraphQL |\n| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |\n| `versioning.md` | URI/Header/Query versioning | API evolution planning |\n| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |\n| `rate-limiting.md` | Token bucket, sliding window | API protection |\n| `documentation.md` | OpenAPI/Swagger best practices | Documentation |\n| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |\n\n---\n\n## 🔗 Related Skills\n\n| Need | Skill |\n|------|-------|\n| API implementation | `@[skills/backend-development]` |\n| Data structure | `@[skills/database-design]` |\n| Security details | `@[skills/security-hardening]` |\n\n---\n\n## ✅ Decision Checklist\n\nBefore designing an API:\n\n- [ ] **Asked user about API consumers?**\n- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)\n- [ ] **Defined consistent response format?**\n- [ ] **Planned versioning strategy?**\n- [ ] **Considered authentication needs?**\n- [ ] **Planned rate limiting?**\n- [ ] **Documentation approach defined?**\n\n---\n\n## ❌ Anti-Patterns\n\n**DON'T:**\n- Default to REST for everything\n- Use verbs in REST endpoints (/getUsers)\n- Return inconsistent response formats\n- Expose internal errors to clients\n- Skip rate limiting\n\n**DO:**\n- Choose API style based on context\n- Ask about client requirements\n- Document thoroughly\n- Use appropriate status codes\n\n---\n\n## Script\n\n| Script | Purpose | Command |\n|--------|---------|---------|\n| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |\n\n",".agent/skills/api-patterns/api-style.md":"# API Style Selection (2025)\n\n> REST vs GraphQL vs tRPC - Hangi durumda hangisi?\n\n## Decision Tree\n\n```\nWho are the API consumers?\n│\n├── Public API / Multiple platforms\n│   └── REST + OpenAPI (widest compatibility)\n│\n├── Complex data needs / Multiple frontends\n│   └── GraphQL (flexible queries)\n│\n├── TypeScript frontend + backend (monorepo)\n│   └── tRPC (end-to-end type safety)\n│\n├── Real-time / Event-driven\n│   └── WebSocket + AsyncAPI\n│\n└── Internal microservices\n    └── gRPC (performance) or REST (simplicity)\n```\n\n## Comparison\n\n| Factor | REST | GraphQL | tRPC |\n|--------|------|---------|------|\n| **Best for** | Public APIs | Complex apps | TS monorepos |\n| **Learning curve** | Low | Medium | Low (if TS) |\n| **Over/under fetching** | Common | Solved | Solved |\n| **Type safety** | Manual (OpenAPI) | Schema-based | Automatic |\n| **Caching** | HTTP native | Complex | Client-based |\n\n## Selection Questions\n\n1. Who are the API consumers?\n2. Is the frontend TypeScript?\n3. How complex are the data relationships?\n4. Is caching critical?\n5. Public or internal API?\n",".agent/skills/api-patterns/auth.md":"# Authentication Patterns\n\n> Choose auth pattern based on use case.\n\n## Selection Guide\n\n| Pattern | Best For |\n|---------|----------|\n| **JWT** | Stateless, microservices |\n| **Session** | Traditional web, simple |\n| **OAuth 2.0** | Third-party integration |\n| **API Keys** | Server-to-server, public APIs |\n| **Passkey** | Modern passwordless (2025+) |\n\n## JWT Principles\n\n```\nImportant:\n├── Always verify signature\n├── Check expiration\n├── Include minimal claims\n├── Use short expiry + refresh tokens\n└── Never store sensitive data in JWT\n```\n",".agent/skills/api-patterns/documentation.md":"# API Documentation Principles\n\n> Good docs = happy developers = API adoption.\n\n## OpenAPI/Swagger Essentials\n\n```\nInclude:\n├── All endpoints with examples\n├── Request/response schemas\n├── Authentication requirements\n├── Error response formats\n└── Rate limiting info\n```\n\n## Good Documentation Has\n\n```\nEssentials:\n├── Quick start / Getting started\n├── Authentication guide\n├── Complete API reference\n├── Error handling guide\n├── Code examples (multiple languages)\n└── Changelog\n```\n",".agent/skills/api-patterns/graphql.md":"# GraphQL Principles\n\n> Flexible queries for complex, interconnected data.\n\n## When to Use\n\n```\n✅ Good fit:\n├── Complex, interconnected data\n├── Multiple frontend platforms\n├── Clients need flexible queries\n├── Evolving data requirements\n└── Reducing over-fetching matters\n\n❌ Poor fit:\n├── Simple CRUD operations\n├── File upload heavy\n├── HTTP caching important\n└── Team unfamiliar with GraphQL\n```\n\n## Schema Design Principles\n\n```\nPrinciples:\n├── Think in graphs, not endpoints\n├── Design for evolvability (no versions)\n├── Use connections for pagination\n├── Be specific with types (not generic \"data\")\n└── Handle nullability thoughtfully\n```\n\n## Security Considerations\n\n```\nProtect against:\n├── Query depth attacks → Set max depth\n├── Query complexity → Calculate cost\n├── Batching abuse → Limit batch size\n├── Introspection → Disable in production\n```\n",".agent/skills/api-patterns/rate-limiting.md":"# Rate Limiting Principles\n\n> Protect your API from abuse and overload.\n\n## Why Rate Limit\n\n```\nProtect against:\n├── Brute force attacks\n├── Resource exhaustion\n├── Cost overruns (if pay-per-use)\n└── Unfair usage\n```\n\n## Strategy Selection\n\n| Type | How | When |\n|------|-----|------|\n| **Token bucket** | Burst allowed, refills over time | Most APIs |\n| **Sliding window** | Smooth distribution | Strict limits |\n| **Fixed window** | Simple counters per window | Basic needs |\n\n## Response Headers\n\n```\nInclude in headers:\n├── X-RateLimit-Limit (max requests)\n├── X-RateLimit-Remaining (requests left)\n├── X-RateLimit-Reset (when limit resets)\n└── Return 429 when exceeded\n```\n",".agent/skills/api-patterns/response.md":"# Response Format Principles\n\n> Consistency is key - choose a format and stick to it.\n\n## Common Patterns\n\n```\nChoose one:\n├── Envelope pattern ({ success, data, error })\n├── Direct data (just return the resource)\n└── HAL/JSON:API (hypermedia)\n```\n\n## Error Response\n\n```\nInclude:\n├── Error code (for programmatic handling)\n├── User message (for display)\n├── Details (for debugging, field-level errors)\n├── Request ID (for support)\n└── NOT internal details (security!)\n```\n\n## Pagination Types\n\n| Type | Best For | Trade-offs |\n|------|----------|------------|\n| **Offset** | Simple, jumpable | Performance on large datasets |\n| **Cursor** | Large datasets | Can't jump to page |\n| **Keyset** | Performance critical | Requires sortable key |\n\n### Selection Questions\n\n1. How large is the dataset?\n2. Do users need to jump to specific pages?\n3. Is data frequently changing?\n",".agent/skills/api-patterns/rest.md":"# REST Principles\n\n> Resource-based API design - nouns not verbs.\n\n## Resource Naming Rules\n\n```\nPrinciples:\n├── Use NOUNS, not verbs (resources, not actions)\n├── Use PLURAL forms (/users not /user)\n├── Use lowercase with hyphens (/user-profiles)\n├── Nest for relationships (/users/123/posts)\n└── Keep shallow (max 3 levels deep)\n```\n\n## HTTP Method Selection\n\n| Method | Purpose | Idempotent? | Body? |\n|--------|---------|-------------|-------|\n| **GET** | Read resource(s) | Yes | No |\n| **POST** | Create new resource | No | Yes |\n| **PUT** | Replace entire resource | Yes | Yes |\n| **PATCH** | Partial update | No | Yes |\n| **DELETE** | Remove resource | Yes | No |\n\n## Status Code Selection\n\n| Situation | Code | Why |\n|-----------|------|-----|\n| Success (read) | 200 | Standard success |\n| Created | 201 | New resource created |\n| No content | 204 | Success, nothing to return |\n| Bad request | 400 | Malformed request |\n| Unauthorized | 401 | Missing/invalid auth |\n| Forbidden | 403 | Valid auth, no permission |\n| Not found | 404 | Resource doesn't exist |\n| Conflict | 409 | State conflict (duplicate) |\n| Validation error | 422 | Valid syntax, invalid data |\n| Rate limited | 429 | Too many requests |\n| Server error | 500 | Our fault |\n",".agent/skills/api-patterns/security-testing.md":"# API Security Testing\n\n> Principles for testing API security. OWASP API Top 10, authentication, authorization testing.\n\n---\n\n## OWASP API Security Top 10\n\n| Vulnerability | Test Focus |\n|---------------|------------|\n| **API1: BOLA** | Access other users' resources |\n| **API2: Broken Auth** | JWT, session, credentials |\n| **API3: Property Auth** | Mass assignment, data exposure |\n| **API4: Resource Consumption** | Rate limiting, DoS |\n| **API5: Function Auth** | Admin endpoints, role bypass |\n| **API6: Business Flow** | Logic abuse, automation |\n| **API7: SSRF** | Internal network access |\n| **API8: Misconfiguration** | Debug endpoints, CORS |\n| **API9: Inventory** | Shadow APIs, old versions |\n| **API10: Unsafe Consumption** | Third-party API trust |\n\n---\n\n## Authentication Testing\n\n### JWT Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Algorithm | None, algorithm confusion |\n| Secret | Weak secrets, brute force |\n| Claims | Expiration, issuer, audience |\n| Signature | Manipulation, key injection |\n\n### Session Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Generation | Predictability |\n| Storage | Client-side security |\n| Expiration | Timeout enforcement |\n| Invalidation | Logout effectiveness |\n\n---\n\n## Authorization Testing\n\n| Test Type | Approach |\n|-----------|----------|\n| **Horizontal** | Access peer users' data |\n| **Vertical** | Access higher privilege functions |\n| **Context** | Access outside allowed scope |\n\n### BOLA/IDOR Testing\n\n1. Identify resource IDs in requests\n2. Capture request with user A's session\n3. Replay with user B's session\n4. Check for unauthorized access\n\n---\n\n## Input Validation Testing\n\n| Injection Type | Test Focus |\n|----------------|------------|\n| SQL | Query manipulation |\n| NoSQL | Document queries |\n| Command | System commands |\n| LDAP | Directory queries |\n\n**Approach:** Test all parameters, try type coercion, test boundaries, check error messages.\n\n---\n\n## Rate Limiting Testing\n\n| Aspect | Check |\n|--------|-------|\n| Existence | Is there any limit? |\n| Bypass | Headers, IP rotation |\n| Scope | Per-user, per-IP, global |\n\n**Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning.\n\n---\n\n## GraphQL Security\n\n| Test | Focus |\n|------|-------|\n| Introspection | Schema disclosure |\n| Batching | Query DoS |\n| Nesting | Depth-based DoS |\n| Authorization | Field-level access |\n\n---\n\n## Security Testing Checklist\n\n**Authentication:**\n- [ ] Test for bypass\n- [ ] Check credential strength\n- [ ] Verify token security\n\n**Authorization:**\n- [ ] Test BOLA/IDOR\n- [ ] Check privilege escalation\n- [ ] Verify function access\n\n**Input:**\n- [ ] Test all parameters\n- [ ] Check for injection\n\n**Config:**\n- [ ] Check CORS\n- [ ] Verify headers\n- [ ] Test error handling\n\n---\n\n> **Remember:** APIs are the backbone of modern apps. Test them like attackers will.\n",".agent/skills/api-patterns/trpc.md":"# tRPC Principles\n\n> End-to-end type safety for TypeScript monorepos.\n\n## When to Use\n\n```\n✅ Perfect fit:\n├── TypeScript on both ends\n├── Monorepo structure\n├── Internal tools\n├── Rapid development\n└── Type safety critical\n\n❌ Poor fit:\n├── Non-TypeScript clients\n├── Public API\n├── Need REST conventions\n└── Multiple language backends\n```\n\n## Key Benefits\n\n```\nWhy tRPC:\n├── Zero schema maintenance\n├── End-to-end type inference\n├── IDE autocomplete across stack\n├── Instant API changes reflected\n└── No code generation step\n```\n\n## Integration Patterns\n\n```\nCommon setups:\n├── Next.js + tRPC (most common)\n├── Monorepo with shared types\n├── Remix + tRPC\n└── Any TS frontend + backend\n```\n",".agent/skills/api-patterns/versioning.md":"# Versioning Strategies\n\n> Plan for API evolution from day one.\n\n## Decision Factors\n\n| Strategy | Implementation | Trade-offs |\n|----------|---------------|------------|\n| **URI** | /v1/users | Clear, easy caching |\n| **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery |\n| **Query** | ?version=1 | Easy to add, messy |\n| **None** | Evolve carefully | Best for internal, risky for public |\n\n## Versioning Philosophy\n\n```\nConsider:\n├── Public API? → Version in URI\n├── Internal only? → May not need versioning\n├── GraphQL? → Typically no versions (evolve schema)\n├── tRPC? → Types enforce compatibility\n```\n",".agent/skills/app-builder/SKILL.md":"---\nname: app-builder\ndescription: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent\n---\n\n# App Builder - Application Building Orchestrator\n\n> Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `project-detection.md` | Keyword matrix, project type detection | Starting new project |\n| `tech-stack.md` | 2025 default stack, alternatives | Choosing technologies |\n| `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work |\n| `scaffolding.md` | Directory structure, core files | Creating project structure |\n| `feature-building.md` | Feature analysis, error handling | Adding features to existing project |\n| `templates/SKILL.md` | **Project templates** | Scaffolding new project |\n\n---\n\n## 📦 Templates (13)\n\nQuick-start scaffolding for new projects. **Read the matching template only!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app |\n| [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile |\n| [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n\n---\n\n## 🔗 Related Agents\n\n| Agent | Role |\n|-------|------|\n| `project-planner` | Task breakdown, dependency graph |\n| `frontend-specialist` | UI components, pages |\n| `backend-specialist` | API, business logic |\n| `database-architect` | Schema, migrations |\n| `devops-engineer` | Deployment, preview |\n\n---\n\n## Usage Example\n\n```\nUser: \"Make an Instagram clone with photo sharing and likes\"\n\nApp Builder Process:\n1. Project type: Social Media App\n2. Tech stack: Next.js + Prisma + Cloudinary + Clerk\n3. Create plan:\n   ├─ Database schema (users, posts, likes, follows)\n   ├─ API routes (12 endpoints)\n   ├─ Pages (feed, profile, upload)\n   └─ Components (PostCard, Feed, LikeButton)\n4. Coordinate agents\n5. Report progress\n6. Start preview\n```\n",".agent/skills/app-builder/agent-coordination.md":"# Agent Coordination\n\n> How App Builder orchestrates specialist agents.\n\n## Agent Pipeline\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                   APP BUILDER (Orchestrator)                 │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     PROJECT PLANNER                          │\n│  • Task breakdown                                            │\n│  • Dependency graph                                          │\n│  • File structure planning                                   │\n│  • Create {task-slug}.md in project root (MANDATORY)             │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│              CHECKPOINT: PLAN VERIFICATION                   │\n│  🔴 VERIFY: Does {task-slug}.md exist in project root?       │\n│  🔴 If NO → STOP → Create plan file first                    │\n│  🔴 If YES → Proceed to specialist agents                    │\n└─────────────────────────────────────────────────────────────┘\n                              │\n          ┌───────────────────┼───────────────────┐\n          ▼                   ▼                   ▼\n┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐\n│ DATABASE        │ │ BACKEND         │ │ FRONTEND        │\n│ ARCHITECT       │ │ SPECIALIST      │ │ SPECIALIST      │\n│                 │ │                 │ │                 │\n│ • Schema design │ │ • API routes    │ │ • Components    │\n│ • Migrations    │ │ • Controllers   │ │ • Pages         │\n│ • Seed data     │ │ • Middleware    │ │ • Styling       │\n└─────────────────┘ └─────────────────┘ └─────────────────┘\n          │                   │                   │\n          └───────────────────┼───────────────────┘\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                 PARALLEL PHASE (Optional)                    │\n│  • Security Auditor → Vulnerability check                   │\n│  • Test Engineer → Unit tests                               │\n│  • Performance Optimizer → Bundle analysis                  │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     DEVOPS ENGINEER                          │\n│  • Environment setup                                         │\n│  • Preview deployment                                        │\n│  • Health check                                              │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Execution Order\n\n| Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT |\n|-------|----------|-----------|--------------|------------|\n| 0 | Socratic Gate | ❌ | - | ✅ Ask 3 questions |\n| 1 | Project Planner | ❌ | Questions answered | ✅ **PLAN.md created** |\n| 1.5 | **PLAN VERIFICATION** | ❌ | PLAN.md exists | ✅ **File exists in root** |\n| 2 | Database Architect | ❌ | Plan ready | Schema defined |\n| 3 | Backend Specialist | ❌ | Schema ready | API routes created |\n| 4 | Frontend Specialist | ✅ | API ready (partial) | UI components ready |\n| 5 | Security Auditor, Test Engineer | ✅ | Code ready | Tests & audit pass |\n| 6 | DevOps Engineer | ❌ | All code ready | Deployment ready |\n\n> 🔴 **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification.\n",".agent/skills/app-builder/feature-building.md":"# Feature Building\n\n> How to analyze and implement new features.\n\n## Feature Analysis\n\n```\nRequest: \"add payment system\"\n\nAnalysis:\n├── Required Changes:\n│   ├── Database: orders, payments tables\n│   ├── Backend: /api/checkout, /api/webhooks/stripe\n│   ├── Frontend: CheckoutForm, PaymentSuccess\n│   └── Config: Stripe API keys\n│\n├── Dependencies:\n│   ├── stripe package\n│   └── Existing user authentication\n│\n└── Estimated Time: 15-20 minutes\n```\n\n## Iterative Enhancement Process\n\n```\n1. Analyze existing project\n2. Create change plan\n3. Present plan to user\n4. Get approval\n5. Apply changes\n6. Test\n7. Show preview\n```\n\n## Error Handling\n\n| Error Type | Solution Strategy |\n|------------|-------------------|\n| TypeScript Error | Fix type, add missing import |\n| Missing Dependency | Run npm install |\n| Port Conflict | Suggest alternative port |\n| Database Error | Check migration, validate connection |\n\n## Recovery Strategy\n\n```\n1. Detect error\n2. Try automatic fix\n3. If failed, report to user\n4. Suggest alternative\n5. Rollback if necessary\n```\n",".agent/skills/app-builder/project-detection.md":"# Project Type Detection\n\n> Analyze user requests to determine project type and template.\n\n## Keyword Matrix\n\n| Keywords | Project Type | Template |\n|----------|--------------|----------|\n| blog, post, article | Blog | astro-static |\n| e-commerce, product, cart, payment | E-commerce | nextjs-saas |\n| dashboard, panel, management | Admin Dashboard | nextjs-fullstack |\n| api, backend, service, rest | API Service | express-api |\n| python, fastapi, django | Python API | python-fastapi |\n| mobile, android, ios, react native | Mobile App (RN) | react-native-app |\n| flutter, dart | Mobile App (Flutter) | flutter-app |\n| portfolio, personal, cv | Portfolio | nextjs-static |\n| crm, customer, sales | CRM | nextjs-fullstack |\n| saas, subscription, stripe | SaaS | nextjs-saas |\n| landing, promotional, marketing | Landing Page | nextjs-static |\n| docs, documentation | Documentation | astro-static |\n| extension, plugin, chrome | Browser Extension | chrome-extension |\n| desktop, electron | Desktop App | electron-desktop |\n| cli, command line, terminal | CLI Tool | cli-tool |\n| monorepo, workspace | Monorepo | monorepo-turborepo |\n\n## Detection Process\n\n```\n1. Tokenize user request\n2. Extract keywords\n3. Determine project type\n4. Detect missing information → forward to conversation-manager\n5. Suggest tech stack\n```\n",".agent/skills/app-builder/scaffolding.md":"# Project Scaffolding\n\n> Directory structure and core files for new projects.\n\n---\n\n## Next.js Full-Stack Structure (2025 Optimized)\n\n```\nproject-name/\n├── src/\n│   ├── app/                        # Routes only (thin layer)\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   ├── (auth)/                 # Route group - auth pages\n│   │   │   ├── login/page.tsx\n│   │   │   └── register/page.tsx\n│   │   ├── (dashboard)/            # Route group - dashboard layout\n│   │   │   ├── layout.tsx\n│   │   │   └── page.tsx\n│   │   └── api/\n│   │       └── [resource]/route.ts\n│   │\n│   ├── features/                   # Feature-based modules\n│   │   ├── auth/\n│   │   │   ├── components/\n│   │   │   ├── hooks/\n│   │   │   ├── actions.ts          # Server Actions\n│   │   │   ├── queries.ts          # Data fetching\n│   │   │   └── types.ts\n│   │   ├── products/\n│   │   │   ├── components/\n│   │   │   ├── actions.ts\n│   │   │   └── queries.ts\n│   │   └── cart/\n│   │       └── ...\n│   │\n│   ├── shared/                     # Shared utilities\n│   │   ├── components/ui/          # Reusable UI components\n│   │   ├── lib/                    # Utils, helpers\n│   │   └── hooks/                  # Global hooks\n│   │\n│   └── server/                     # Server-only code\n│       ├── db/                     # Database client (Prisma)\n│       ├── auth/                   # Auth config\n│       └── services/               # External API integrations\n│\n├── prisma/\n│   ├── schema.prisma\n│   ├── migrations/\n│   └── seed.ts\n│\n├── public/\n├── .env.example\n├── .env.local\n├── package.json\n├── tailwind.config.ts\n├── tsconfig.json\n└── README.md\n```\n\n---\n\n## Structure Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Feature isolation** | Each feature in `features/` with its own components, hooks, actions |\n| **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports |\n| **Thin routes** | `app/` only for routing, logic lives in `features/` |\n| **Route groups** | `(groupName)/` for layout sharing without URL impact |\n| **Shared code** | `shared/` for truly reusable UI and utilities |\n\n---\n\n## Core Files\n\n| File | Purpose |\n|------|---------|\n| `package.json` | Dependencies |\n| `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |\n| `tailwind.config.ts` | Tailwind config |\n| `.env.example` | Environment template |\n| `README.md` | Project documentation |\n| `.gitignore` | Git ignore rules |\n| `prisma/schema.prisma` | Database schema |\n\n---\n\n## Path Aliases (tsconfig.json)\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@/*\": [\"./src/*\"],\n      \"@/features/*\": [\"./src/features/*\"],\n      \"@/shared/*\": [\"./src/shared/*\"],\n      \"@/server/*\": [\"./src/server/*\"]\n    }\n  }\n}\n```\n\n---\n\n## When to Use What\n\n| Need | Location |\n|------|----------|\n| New page/route | `app/(group)/page.tsx` |\n| Feature component | `features/[name]/components/` |\n| Server action | `features/[name]/actions.ts` |\n| Data fetching | `features/[name]/queries.ts` |\n| Reusable button/input | `shared/components/ui/` |\n| Database query | `server/db/` |\n| External API call | `server/services/` |\n",".agent/skills/app-builder/tech-stack.md":"# Tech Stack Selection (2025)\n\n> Default and alternative technology choices for web applications.\n\n## Default Stack (Web App - 2025)\n\n```yaml\nFrontend:\n  framework: Next.js 16 (Stable)\n  language: TypeScript 5.7+\n  styling: Tailwind CSS v4\n  state: React 19 Actions / Server Components\n  bundler: Turbopack (Stable for Dev)\n\nBackend:\n  runtime: Node.js 23\n  framework: Next.js API Routes / Hono (for Edge)\n  validation: Zod / TypeBox\n\nDatabase:\n  primary: PostgreSQL\n  orm: Prisma / Drizzle\n  hosting: Supabase / Neon\n\nAuth:\n  provider: Auth.js (v5) / Clerk\n\nMonorepo:\n  tool: Turborepo 2.0\n```\n\n## Alternative Options\n\n| Need | Default | Alternative |\n|------|---------|-------------|\n| Real-time | - | Supabase Realtime, Socket.io |\n| File storage | - | Cloudinary, S3 |\n| Payment | Stripe | LemonSqueezy, Paddle |\n| Email | - | Resend, SendGrid |\n| Search | - | Algolia, Typesense |\n",".agent/skills/app-builder/templates/SKILL.md":"---\nname: templates\ndescription: Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.\nallowed-tools: Read, Glob, Grep\n---\n\n# Project Templates\n\n> Quick-start templates for scaffolding new projects.\n\n---\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY the template matching user's project type!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [express-api](express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform |\n| [electron-desktop](electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n| [astro-static](astro-static/TEMPLATE.md) | Astro + MDX | Blog / Docs |\n\n---\n\n## Usage\n\n1. User says \"create [type] app\"\n2. Match to appropriate template\n3. Read ONLY that template's TEMPLATE.md\n4. Follow its tech stack and structure\n",".agent/skills/app-builder/templates/astro-static/TEMPLATE.md":"---\nname: astro-static\ndescription: Astro static site template principles. Content-focused websites, blogs, documentation.\n---\n\n# Astro Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Astro 4.x |\n| Content | MDX + Content Collections |\n| Styling | Tailwind CSS |\n| Integrations | Sitemap, RSS, SEO |\n| Output | Static/SSG |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── components/      # .astro components\n│   ├── content/         # MDX content\n│   │   ├── blog/\n│   │   └── config.ts    # Collection schemas\n│   ├── layouts/         # Page layouts\n│   ├── pages/           # File-based routing\n│   └── styles/\n├── public/              # Static assets\n├── astro.config.mjs\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Content Collections | Type-safe content with Zod schemas |\n| Islands Architecture | Partial hydration for interactivity |\n| Zero JS by default | Static HTML unless needed |\n| MDX Support | Markdown with components |\n\n---\n\n## Setup Steps\n\n1. `npm create astro@latest {{name}}`\n2. Add integrations: `npx astro add mdx tailwind sitemap`\n3. Configure `astro.config.mjs`\n4. Create content collections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto-detected |\n| Netlify | Auto-detected |\n| Cloudflare Pages | Auto-detected |\n| GitHub Pages | Build + deploy action |\n\n---\n\n## Best Practices\n\n- Use Content Collections for type safety\n- Leverage static generation\n- Add islands only where needed\n- Optimize images with Astro Image\n",".agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md":"---\nname: chrome-extension\ndescription: Chrome Extension template principles. Manifest V3, React, TypeScript.\n---\n\n# Chrome Extension Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Manifest | V3 |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite |\n| Storage | Chrome Storage API |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── popup/           # Extension popup\n│   ├── options/         # Options page\n│   ├── background/      # Service worker\n│   ├── content/         # Content scripts\n│   ├── components/\n│   ├── hooks/\n│   └── lib/\n│       ├── storage.ts   # Chrome storage helpers\n│       └── messaging.ts # Message passing\n├── public/\n│   ├── icons/\n│   └── manifest.json\n└── package.json\n```\n\n---\n\n## Manifest V3 Concepts\n\n| Component | Purpose |\n|-----------|---------|\n| Service Worker | Background processing |\n| Content Scripts | Page injection |\n| Popup | User interface |\n| Options Page | Settings |\n\n---\n\n## Permissions\n\n| Permission | Use |\n|------------|-----|\n| storage | Save user data |\n| activeTab | Current tab access |\n| scripting | Inject scripts |\n| host_permissions | Site access |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Add Chrome types: `npm install -D @types/chrome`\n3. Configure Vite for multi-entry\n4. Create manifest.json\n5. `npm run dev` (watch mode)\n6. Load in Chrome: `chrome://extensions` → Load unpacked\n\n---\n\n## Development Tips\n\n| Task | Method |\n|------|--------|\n| Debug Popup | Right-click icon → Inspect |\n| Debug Background | Extensions page → Service worker |\n| Debug Content | DevTools console on page |\n| Hot Reload | `npm run dev` with watch |\n\n---\n\n## Best Practices\n\n- Use type-safe messaging\n- Wrap Chrome APIs in promises\n- Minimize permissions\n- Handle offline gracefully\n",".agent/skills/app-builder/templates/cli-tool/TEMPLATE.md":"---\nname: cli-tool\ndescription: Node.js CLI tool template principles. Commander.js, interactive prompts.\n---\n\n# CLI Tool Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Language | TypeScript |\n| CLI Framework | Commander.js |\n| Prompts | Inquirer.js |\n| Output | chalk + ora |\n| Config | cosmiconfig |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── index.ts         # Entry point\n│   ├── cli.ts           # CLI setup\n│   ├── commands/        # Command handlers\n│   ├── lib/\n│   │   ├── config.ts    # Config loader\n│   │   └── logger.ts    # Styled output\n│   └── types/\n├── bin/\n│   └── cli.js           # Executable\n└── package.json\n```\n\n---\n\n## CLI Design Principles\n\n| Principle | Description |\n|-----------|-------------|\n| Subcommands | Group related actions |\n| Options | Flags with defaults |\n| Interactive | Prompts when needed |\n| Non-interactive | Support --yes flags |\n\n---\n\n## Key Components\n\n| Component | Purpose |\n|-----------|---------|\n| Commander | Command parsing |\n| Inquirer | Interactive prompts |\n| Chalk | Colored output |\n| Ora | Spinners/loading |\n| Cosmiconfig | Config file discovery |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install commander @inquirer/prompts chalk ora cosmiconfig`\n4. Configure bin in package.json\n5. `npm link` for local testing\n\n---\n\n## Publishing\n\n```bash\nnpm login\nnpm publish\n```\n\n---\n\n## Best Practices\n\n- Provide helpful error messages\n- Support both interactive and non-interactive modes\n- Use consistent output styling\n- Validate inputs with Zod\n- Exit with proper codes (0 success, 1 error)\n",".agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md":"---\nname: electron-desktop\ndescription: Electron desktop app template principles. Cross-platform, React, TypeScript.\n---\n\n# Electron Desktop App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Electron 28+ |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite + electron-builder |\n| IPC | Type-safe communication |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── electron/\n│   ├── main.ts          # Main process\n│   ├── preload.ts       # Preload script\n│   └── ipc/             # IPC handlers\n├── src/\n│   ├── App.tsx\n│   ├── components/\n│   │   ├── TitleBar.tsx # Custom title bar\n│   │   └── ...\n│   └── hooks/\n├── public/\n└── package.json\n```\n\n---\n\n## Process Model\n\n| Process | Role |\n|---------|------|\n| Main | Node.js, system access |\n| Renderer | Chromium, React UI |\n| Preload | Bridge, context isolation |\n\n---\n\n## Key Concepts\n\n| Concept | Purpose |\n|---------|---------|\n| contextBridge | Safe API exposure |\n| ipcMain/ipcRenderer | Process communication |\n| nodeIntegration: false | Security |\n| contextIsolation: true | Security |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Install: `npm install -D electron electron-builder vite-plugin-electron`\n3. Create electron/ directory\n4. Configure main process\n5. `npm run electron:dev`\n\n---\n\n## Build Targets\n\n| Platform | Output |\n|----------|--------|\n| Windows | NSIS, Portable |\n| macOS | DMG, ZIP |\n| Linux | AppImage, DEB |\n\n---\n\n## Best Practices\n\n- Use preload script for main/renderer bridge\n- Type-safe IPC with typed handlers\n- Custom title bar for native feel\n- Handle window state (maximize, minimize)\n- Auto-updates with electron-updater\n",".agent/skills/app-builder/templates/express-api/TEMPLATE.md":"---\nname: express-api\ndescription: Express.js REST API template principles. TypeScript, Prisma, JWT.\n---\n\n# Express.js API Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Framework | Express.js |\n| Language | TypeScript |\n| Database | PostgreSQL + Prisma |\n| Validation | Zod |\n| Auth | JWT + bcrypt |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── src/\n│   ├── app.ts           # Express setup\n│   ├── config/          # Environment\n│   ├── routes/          # Route handlers\n│   ├── controllers/     # Business logic\n│   ├── services/        # Data access\n│   ├── middleware/\n│   │   ├── auth.ts      # JWT verify\n│   │   ├── error.ts     # Error handler\n│   │   └── validate.ts  # Zod validation\n│   ├── schemas/         # Zod schemas\n│   └── utils/\n└── package.json\n```\n\n---\n\n## Middleware Stack\n\n| Order | Middleware |\n|-------|------------|\n| 1 | helmet (security) |\n| 2 | cors |\n| 3 | morgan (logging) |\n| 4 | body parsing |\n| 5 | routes |\n| 6 | error handler |\n\n---\n\n## API Response Format\n\n| Type | Structure |\n|------|-----------|\n| Success | `{ success: true, data: {...} }` |\n| Error | `{ error: \"message\", details: [...] }` |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install express prisma zod bcrypt jsonwebtoken`\n4. Configure Prisma\n5. `npm run db:push`\n6. `npm run dev`\n\n---\n\n## Best Practices\n\n- Layer architecture (routes → controllers → services)\n- Validate all inputs with Zod\n- Centralized error handling\n- Environment-based config\n- Use Prisma for type-safe DB access\n",".agent/skills/app-builder/templates/flutter-app/TEMPLATE.md":"---\nname: flutter-app\ndescription: Flutter mobile app template principles. Riverpod, Go Router, clean architecture.\n---\n\n# Flutter App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Flutter 3.x |\n| Language | Dart 3.x |\n| State | Riverpod 2.0 |\n| Navigation | Go Router |\n| HTTP | Dio |\n| Storage | Hive |\n\n---\n\n## Directory Structure\n\n```\nproject_name/\n├── lib/\n│   ├── main.dart\n│   ├── app.dart\n│   ├── core/\n│   │   ├── constants/\n│   │   ├── theme/\n│   │   ├── router/\n│   │   └── utils/\n│   ├── features/\n│   │   ├── auth/\n│   │   │   ├── data/\n│   │   │   ├── domain/\n│   │   │   └── presentation/\n│   │   └── home/\n│   ├── shared/\n│   │   ├── widgets/\n│   │   └── providers/\n│   └── services/\n│       ├── api/\n│       └── storage/\n├── test/\n└── pubspec.yaml\n```\n\n---\n\n## Architecture Layers\n\n| Layer | Contents |\n|-------|----------|\n| Presentation | Screens, Widgets, Providers |\n| Domain | Entities, Use Cases |\n| Data | Repositories, Models |\n\n---\n\n## Key Packages\n\n| Package | Purpose |\n|---------|---------|\n| flutter_riverpod | State management |\n| riverpod_annotation | Code generation |\n| go_router | Navigation |\n| dio | HTTP client |\n| freezed | Immutable models |\n| hive | Local storage |\n\n---\n\n## Setup Steps\n\n1. `flutter create {{name}} --org com.{{bundle}}`\n2. Update `pubspec.yaml`\n3. `flutter pub get`\n4. Run code generation: `dart run build_runner build`\n5. `flutter run`\n\n---\n\n## Best Practices\n\n- Feature-first folder structure\n- Riverpod for state, React Query pattern for server state\n- Freezed for immutable data classes\n- Go Router for declarative navigation\n- Material 3 theming\n",".agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md":"---\nname: monorepo-turborepo\ndescription: Turborepo monorepo template principles. pnpm workspaces, shared packages.\n---\n\n# Turborepo Monorepo Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Build System | Turborepo |\n| Package Manager | pnpm |\n| Apps | Next.js, Express |\n| Packages | Shared UI, Config, Types |\n| Language | TypeScript |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── apps/\n│   ├── web/             # Next.js app\n│   ├── api/             # Express API\n│   └── docs/            # Documentation\n├── packages/\n│   ├── ui/              # Shared components\n│   ├── config/          # ESLint, TS, Tailwind\n│   ├── types/           # Shared types\n│   └── utils/           # Shared utilities\n├── turbo.json\n├── pnpm-workspace.yaml\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Workspaces | pnpm-workspace.yaml |\n| Pipeline | turbo.json task graph |\n| Caching | Remote/local task caching |\n| Dependencies | `workspace:*` protocol |\n\n---\n\n## Turbo Pipeline\n\n| Task | Depends On |\n|------|------------|\n| build | ^build (dependencies first) |\n| dev | cache: false, persistent |\n| lint | ^build |\n| test | ^build |\n\n---\n\n## Setup Steps\n\n1. Create root directory\n2. `pnpm init`\n3. Create pnpm-workspace.yaml\n4. Create turbo.json\n5. Add apps and packages\n6. `pnpm install`\n7. `pnpm dev`\n\n---\n\n## Common Commands\n\n| Command | Description |\n|---------|-------------|\n| `pnpm dev` | Run all apps |\n| `pnpm build` | Build all |\n| `pnpm --filter @name/web dev` | Run specific app |\n| `pnpm --filter @name/web add axios` | Add dep to app |\n\n---\n\n## Best Practices\n\n- Shared configs in packages/config\n- Shared types in packages/types\n- Internal packages with `workspace:*`\n- Use Turbo remote caching for CI\n",".agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md":"---\nname: nextjs-fullstack\ndescription: Next.js full-stack template principles. App Router, Prisma, Tailwind.\n---\n\n# Next.js Full-Stack Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (App Router) |\n| Language | TypeScript |\n| Database | PostgreSQL + Prisma |\n| Styling | Tailwind CSS |\n| Auth | Clerk (optional) |\n| Validation | Zod |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── src/\n│   ├── app/\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   └── api/\n│   ├── components/\n│   │   └── ui/\n│   ├── lib/\n│   │   ├── db.ts        # Prisma client\n│   │   └── utils.ts\n│   └── types/\n├── .env.example\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Server Components | Default, fetch data |\n| Server Actions | Form mutations |\n| Route Handlers | API endpoints |\n| Prisma | Type-safe ORM |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma connection |\n| NEXT_PUBLIC_APP_URL | Public URL |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. `npm install prisma @prisma/client zod`\n3. `npx prisma init`\n4. Configure schema\n5. `npm run db:push`\n6. `npm run dev`\n\n---\n\n## Best Practices\n\n- Server Components by default\n- Server Actions for mutations\n- Prisma for type-safe DB\n- Zod for validation\n- Edge runtime where possible\n",".agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md":"---\nname: nextjs-saas\ndescription: Next.js SaaS template principles. Auth, payments, email.\n---\n\n# Next.js SaaS Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (App Router) |\n| Auth | NextAuth.js v5 |\n| Payments | Stripe |\n| Database | PostgreSQL + Prisma |\n| Email | Resend |\n| UI | Tailwind (ASK USER: shadcn/Headless UI/Custom?) |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n├── src/\n│   ├── app/\n│   │   ├── (auth)/      # Login, register\n│   │   ├── (dashboard)/ # Protected routes\n│   │   ├── (marketing)/ # Landing, pricing\n│   │   └── api/\n│   │       ├── auth/[...nextauth]/\n│   │       └── webhooks/stripe/\n│   ├── components/\n│   │   ├── auth/\n│   │   ├── billing/\n│   │   └── dashboard/\n│   ├── lib/\n│   │   ├── auth.ts      # NextAuth config\n│   │   ├── stripe.ts    # Stripe client\n│   │   └── email.ts     # Resend client\n│   └── config/\n│       └── subscriptions.ts\n└── package.json\n```\n\n---\n\n## SaaS Features\n\n| Feature | Implementation |\n|---------|---------------|\n| Auth | NextAuth + OAuth |\n| Subscriptions | Stripe Checkout |\n| Billing Portal | Stripe Portal |\n| Webhooks | Stripe events |\n| Email | Transactional via Resend |\n\n---\n\n## Database Schema\n\n| Model | Fields |\n|-------|--------|\n| User | id, email, stripeCustomerId, subscriptionId |\n| Account | OAuth provider data |\n| Session | User sessions |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma |\n| NEXTAUTH_SECRET | Auth |\n| STRIPE_SECRET_KEY | Payments |\n| STRIPE_WEBHOOK_SECRET | Webhooks |\n| RESEND_API_KEY | Email |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. Install: `npm install next-auth @auth/prisma-adapter stripe resend`\n3. Setup Stripe products/prices\n4. Configure environment\n5. `npm run db:push`\n6. `npm run stripe:listen` (webhooks)\n7. `npm run dev`\n\n---\n\n## Best Practices\n\n- Route groups for layout separation\n- Stripe webhooks for subscription sync\n- NextAuth with Prisma adapter\n- Email templates with React Email\n",".agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md":"---\nname: nextjs-static\ndescription: Next.js static site template principles. Landing pages, portfolios, marketing.\n---\n\n# Next.js Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (Static Export) |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Animations | Framer Motion |\n| Icons | Lucide React |\n| SEO | Next SEO |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── app/\n│   │   ├── layout.tsx\n│   │   ├── page.tsx      # Landing\n│   │   ├── about/\n│   │   ├── contact/\n│   │   └── blog/\n│   ├── components/\n│   │   ├── layout/       # Header, Footer\n│   │   ├── sections/     # Hero, Features, CTA\n│   │   └── ui/\n│   └── lib/\n├── content/              # Markdown content\n├── public/\n└── next.config.js\n```\n\n---\n\n## Static Export Config\n\n```javascript\n// next.config.js\nconst nextConfig = {\n  output: 'export',\n  images: { unoptimized: true },\n  trailingSlash: true,\n};\n```\n\n---\n\n## Landing Page Sections\n\n| Section | Purpose |\n|---------|---------|\n| Hero | Main headline, CTA |\n| Features | Product benefits |\n| Testimonials | Social proof |\n| Pricing | Plans |\n| CTA | Final conversion |\n\n---\n\n## Animation Patterns\n\n| Pattern | Use |\n|---------|-----|\n| Fade up | Content entry |\n| Stagger | List items |\n| Scroll reveal | On viewport |\n| Hover | Interactive feedback |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. Install: `npm install framer-motion lucide-react next-seo`\n3. Configure static export\n4. Create sections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto |\n| Netlify | Auto |\n| GitHub Pages | gh-pages branch |\n| Any host | Upload `out` folder |\n\n---\n\n## Best Practices\n\n- Static export for maximum performance\n- Framer Motion for premium animations\n- Responsive mobile-first design\n- SEO metadata on every page\n",".agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md":"---\nname: nuxt-app\ndescription: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.\n---\n\n# Nuxt 3 Full-Stack Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Nuxt 3 |\n| Language | TypeScript |\n| UI | Vue 3 (Composition API) |\n| State | Pinia |\n| Database | PostgreSQL + Prisma |\n| Styling | Tailwind CSS |\n| Validation | Zod |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── server/\n│   ├── api/\n│   │   └── [resource]/\n│   │       └── index.ts\n│   └── utils/\n│       └── db.ts         # Prisma client\n├── composables/\n│   └── useAuth.ts\n├── stores/\n│   └── user.ts           # Pinia store\n├── components/\n│   └── ui/\n├── pages/\n│   ├── index.vue\n│   └── [...slug].vue\n├── layouts/\n│   └── default.vue\n├── assets/\n│   └── css/\n│       └── main.css\n├── .env.example\n├── nuxt.config.ts\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Auto-imports | Components, composables, utils |\n| File-based routing | pages/ → routes |\n| Server Routes | server/api/ → API endpoints |\n| Composables | Reusable reactive logic |\n| Pinia | State management |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma connection |\n| NUXT_PUBLIC_APP_URL | Public URL |\n\n---\n\n## Setup Steps\n\n1. `npx nuxi@latest init {{name}}`\n2. `cd {{name}}`\n3. `npm install @pinia/nuxt @prisma/client prisma zod`\n4. `npm install -D @nuxtjs/tailwindcss`\n5. Add modules to `nuxt.config.ts`:\n   ```ts\n   modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']\n   ```\n6. `npx prisma init`\n7. Configure schema\n8. `npx prisma db push`\n9. `npm run dev`\n\n---\n\n## Best Practices\n\n- Use `<script setup>` for components\n- Composables for reusable logic\n- Pinia stores in `stores/` folder\n- Server routes for API logic\n- Auto-import for clean code\n- TypeScript for type safety\n- See `@[skills/vue-expert]` for Vue patterns\n",".agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md":"---\nname: python-fastapi\ndescription: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.\n---\n\n# FastAPI API Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | FastAPI |\n| Language | Python 3.11+ |\n| ORM | SQLAlchemy 2.0 |\n| Validation | Pydantic v2 |\n| Migrations | Alembic |\n| Auth | JWT + passlib |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── alembic/             # Migrations\n├── app/\n│   ├── main.py          # FastAPI app\n│   ├── config.py        # Settings\n│   ├── database.py      # DB connection\n│   ├── models/          # SQLAlchemy models\n│   ├── schemas/         # Pydantic schemas\n│   ├── routers/         # API routes\n│   ├── services/        # Business logic\n│   ├── dependencies/    # DI\n│   └── utils/\n├── tests/\n├── .env.example\n└── requirements.txt\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Async | async/await throughout |\n| Dependency Injection | FastAPI Depends |\n| Pydantic v2 | Validation + serialization |\n| SQLAlchemy 2.0 | Async sessions |\n\n---\n\n## API Structure\n\n| Layer | Responsibility |\n|-------|---------------|\n| Routers | HTTP handling |\n| Dependencies | Auth, validation |\n| Services | Business logic |\n| Models | Database entities |\n| Schemas | Request/response |\n\n---\n\n## Setup Steps\n\n1. `python -m venv venv`\n2. `source venv/bin/activate`\n3. `pip install fastapi uvicorn sqlalchemy alembic pydantic`\n4. Create `.env`\n5. `alembic upgrade head`\n6. `uvicorn app.main:app --reload`\n\n---\n\n## Best Practices\n\n- Use async everywhere\n- Pydantic v2 for validation\n- SQLAlchemy 2.0 async sessions\n- Alembic for migrations\n- pytest-asyncio for tests\n",".agent/skills/app-builder/templates/react-native-app/TEMPLATE.md":"---\nname: react-native-app\ndescription: React Native mobile app template principles. Expo, TypeScript, navigation.\n---\n\n# React Native App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | React Native + Expo |\n| Language | TypeScript |\n| Navigation | Expo Router |\n| State | Zustand + React Query |\n| Styling | NativeWind |\n| Testing | Jest + RNTL |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── app/                 # Expo Router (file-based)\n│   ├── _layout.tsx      # Root layout\n│   ├── index.tsx        # Home\n│   ├── (tabs)/          # Tab navigation\n│   └── [id].tsx         # Dynamic route\n├── components/\n│   ├── ui/              # Reusable\n│   └── features/\n├── hooks/\n├── lib/\n│   ├── api.ts\n│   └── storage.ts\n├── store/\n├── constants/\n└── app.json\n```\n\n---\n\n## Navigation Patterns\n\n| Pattern | Use |\n|---------|-----|\n| Stack | Page hierarchy |\n| Tabs | Bottom navigation |\n| Drawer | Side menu |\n| Modal | Overlay screens |\n\n---\n\n## State Management\n\n| Type | Tool |\n|------|------|\n| Local | Zustand |\n| Server | React Query |\n| Forms | React Hook Form |\n| Storage | Expo SecureStore |\n\n---\n\n## Key Packages\n\n| Package | Purpose |\n|---------|---------|\n| expo-router | File-based routing |\n| zustand | Local state |\n| @tanstack/react-query | Server state |\n| nativewind | Tailwind styling |\n| expo-secure-store | Secure storage |\n\n---\n\n## Setup Steps\n\n1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`\n2. `npx expo install expo-router react-native-safe-area-context`\n3. Install state: `npm install zustand @tanstack/react-query`\n4. `npx expo start`\n\n---\n\n## Best Practices\n\n- Expo Router for navigation\n- Zustand for local, React Query for server state\n- NativeWind for consistent styling\n- Expo SecureStore for tokens\n- Test on both iOS and Android\n",".agent/skills/architecture/SKILL.md":"---\nname: architecture\ndescription: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.\nallowed-tools: Read, Glob, Grep\n---\n\n# Architecture Decision Framework\n\n> \"Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale.\"\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `context-discovery.md` | Questions to ask, project classification | Starting architecture design |\n| `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |\n| `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |\n| `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |\n| `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |\n\n---\n\n## 🔗 Related Skills\n\n| Skill | Use For |\n|-------|---------|\n| `@[skills/database-design]` | Database schema design |\n| `@[skills/api-patterns]` | API design patterns |\n| `@[skills/deployment-procedures]` | Deployment architecture |\n\n---\n\n## Core Principle\n\n**\"Simplicity is the ultimate sophistication.\"**\n\n- Start simple\n- Add complexity ONLY when proven necessary\n- You can always add patterns later\n- Removing complexity is MUCH harder than adding it\n\n---\n\n## Validation Checklist\n\nBefore finalizing architecture:\n\n- [ ] Requirements clearly understood\n- [ ] Constraints identified\n- [ ] Each decision has trade-off analysis\n- [ ] Simpler alternatives considered\n- [ ] ADRs written for significant decisions\n- [ ] Team expertise matches chosen patterns\n",".agent/skills/architecture/context-discovery.md":"# Context Discovery\n\n> Before suggesting any architecture, gather context.\n\n## Question Hierarchy (Ask User FIRST)\n\n1. **Scale**\n   - How many users? (10, 1K, 100K, 1M+)\n   - Data volume? (MB, GB, TB)\n   - Transaction rate? (per second/minute)\n\n2. **Team**\n   - Solo developer or team?\n   - Team size and expertise?\n   - Distributed or co-located?\n\n3. **Timeline**\n   - MVP/Prototype or long-term product?\n   - Time to market pressure?\n\n4. **Domain**\n   - CRUD-heavy or business logic complex?\n   - Real-time requirements?\n   - Compliance/regulations?\n\n5. **Constraints**\n   - Budget limitations?\n   - Legacy systems to integrate?\n   - Technology stack preferences?\n\n## Project Classification Matrix\n\n```\n                    MVP              SaaS           Enterprise\n┌─────────────────────────────────────────────────────────────┐\n│ Scale        │ <1K           │ 1K-100K      │ 100K+        │\n│ Team         │ Solo          │ 2-10         │ 10+          │\n│ Timeline     │ Fast (weeks)  │ Medium (months)│ Long (years)│\n│ Architecture │ Simple        │ Modular      │ Distributed  │\n│ Patterns     │ Minimal       │ Selective    │ Comprehensive│\n│ Example      │ Next.js API   │ NestJS       │ Microservices│\n└─────────────────────────────────────────────────────────────┘\n```\n",".agent/skills/architecture/examples.md":"# Architecture Examples\n\n> Real-world architecture decisions by project type.\n\n---\n\n## Example 1: MVP E-commerce (Solo Developer)\n\n```yaml\nRequirements:\n  - <1000 users initially\n  - Solo developer\n  - Fast to market (8 weeks)\n  - Budget-conscious\n\nArchitecture Decisions:\n  App Structure: Monolith (simpler for solo)\n  Framework: Next.js (full-stack, fast)\n  Data Layer: Prisma direct (no over-abstraction)\n  Authentication: JWT (simpler than OAuth)\n  Payment: Stripe (hosted solution)\n  Database: PostgreSQL (ACID for orders)\n\nTrade-offs Accepted:\n  - Monolith → Can't scale independently (team doesn't justify it)\n  - No Repository → Less testable (simple CRUD doesn't need it)\n  - JWT → No social login initially (can add later)\n\nFuture Migration Path:\n  - Users > 10K → Extract payment service\n  - Team > 3 → Add Repository pattern\n  - Social login requested → Add OAuth\n```\n\n---\n\n## Example 2: SaaS Product (5-10 Developers)\n\n```yaml\nRequirements:\n  - 1K-100K users\n  - 5-10 developers\n  - Long-term (12+ months)\n  - Multiple domains (billing, users, core)\n\nArchitecture Decisions:\n  App Structure: Modular Monolith (team size optimal)\n  Framework: NestJS (modular by design)\n  Data Layer: Repository pattern (testing, flexibility)\n  Domain Model: Partial DDD (rich entities)\n  Authentication: OAuth + JWT\n  Caching: Redis\n  Database: PostgreSQL\n\nTrade-offs Accepted:\n  - Modular Monolith → Some module coupling (microservices not justified)\n  - Partial DDD → No full aggregates (no domain experts)\n  - RabbitMQ later → Initial synchronous (add when proven needed)\n\nMigration Path:\n  - Team > 10 → Consider microservices\n  - Domains conflict → Extract bounded contexts\n  - Read performance issues → Add CQRS\n```\n\n---\n\n## Example 3: Enterprise (100K+ Users)\n\n```yaml\nRequirements:\n  - 100K+ users\n  - 10+ developers\n  - Multiple business domains\n  - Different scaling needs\n  - 24/7 availability\n\nArchitecture Decisions:\n  App Structure: Microservices (independent scale)\n  API Gateway: Kong/AWS API GW\n  Domain Model: Full DDD\n  Consistency: Event-driven (eventual OK)\n  Message Bus: Kafka\n  Authentication: OAuth + SAML (enterprise SSO)\n  Database: Polyglot (right tool per job)\n  CQRS: Selected services\n\nOperational Requirements:\n  - Service mesh (Istio/Linkerd)\n  - Distributed tracing (Jaeger/Tempo)\n  - Centralized logging (ELK/Loki)\n  - Circuit breakers (Resilience4j)\n  - Kubernetes/Helm\n```\n",".agent/skills/architecture/pattern-selection.md":"# Pattern Selection Guidelines\n\n> Decision trees for choosing architectural patterns.\n\n## Main Decision Tree\n\n```\nSTART: What's your MAIN concern?\n\n┌─ Data Access Complexity?\n│  ├─ HIGH (complex queries, testing needed)\n│  │  → Repository Pattern + Unit of Work\n│  │  VALIDATE: Will data source change frequently?\n│  │     ├─ YES → Repository worth the indirection\n│  │     └─ NO  → Consider simpler ORM direct access\n│  └─ LOW (simple CRUD, single database)\n│     → ORM directly (Prisma, Drizzle)\n│     Simpler = Better, Faster\n│\n├─ Business Rules Complexity?\n│  ├─ HIGH (domain logic, rules vary by context)\n│  │  → Domain-Driven Design\n│  │  VALIDATE: Do you have domain experts on team?\n│  │     ├─ YES → Full DDD (Aggregates, Value Objects)\n│  │     └─ NO  → Partial DDD (rich entities, clear boundaries)\n│  └─ LOW (mostly CRUD, simple validation)\n│     → Transaction Script pattern\n│     Simpler = Better, Faster\n│\n├─ Independent Scaling Needed?\n│  ├─ YES (different components scale differently)\n│  │  → Microservices WORTH the complexity\n│  │  REQUIREMENTS (ALL must be true):\n│  │    - Clear domain boundaries\n│  │    - Team > 10 developers\n│  │    - Different scaling needs per service\n│  │  IF NOT ALL MET → Modular Monolith instead\n│  └─ NO (everything scales together)\n│     → Modular Monolith\n│     Can extract services later when proven needed\n│\n└─ Real-time Requirements?\n   ├─ HIGH (immediate updates, multi-user sync)\n   │  → Event-Driven Architecture\n   │  → Message Queue (RabbitMQ, Redis, Kafka)\n   │  VALIDATE: Can you handle eventual consistency?\n   │     ├─ YES → Event-driven valid\n   │     └─ NO  → Synchronous with polling\n   └─ LOW (eventual consistency acceptable)\n      → Synchronous (REST/GraphQL)\n      Simpler = Better, Faster\n```\n\n## The 3 Questions (Before ANY Pattern)\n\n1. **Problem Solved**: What SPECIFIC problem does this pattern solve?\n2. **Simpler Alternative**: Is there a simpler solution?\n3. **Deferred Complexity**: Can we add this LATER when needed?\n\n## Red Flags (Anti-patterns)\n\n| Pattern | Anti-pattern | Simpler Alternative |\n|---------|-------------|-------------------|\n| Microservices | Premature splitting | Start monolith, extract later |\n| Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |\n| Event Sourcing | Over-engineering | Append-only audit log |\n| CQRS | Unnecessary complexity | Single model |\n| Repository | YAGNI for simple CRUD | ORM direct access |\n",".agent/skills/architecture/patterns-reference.md":"# Architecture Patterns Reference\n\n> Quick reference for common patterns with usage guidance.\n\n## Data Access Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Active Record** | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |\n| **Repository** | Testing needed, multiple sources | Simple CRUD, single database | Medium |\n| **Unit of Work** | Complex transactions | Simple operations | High |\n| **Data Mapper** | Complex domain, performance | Simple CRUD, rapid dev | High |\n\n## Domain Logic Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Transaction Script** | Simple CRUD, procedural | Complex business rules | Low |\n| **Table Module** | Record-based logic | Rich behavior needed | Low |\n| **Domain Model** | Complex business logic | Simple CRUD | Medium |\n| **DDD (Full)** | Complex domain, domain experts | Simple domain, no experts | High |\n\n## Distributed System Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Modular Monolith** | Small teams, unclear boundaries | Clear contexts, different scales | Medium |\n| **Microservices** | Different scales, large teams | Small teams, simple domain | Very High |\n| **Event-Driven** | Real-time, loose coupling | Simple workflows, strong consistency | High |\n| **CQRS** | Read/write performance diverges | Simple CRUD, same model | High |\n| **Saga** | Distributed transactions | Single database, simple ACID | High |\n\n## API Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **REST** | Standard CRUD, resources | Real-time, complex queries | Low |\n| **GraphQL** | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |\n| **gRPC** | Internal services, performance | Public APIs, browser clients | Medium |\n| **WebSocket** | Real-time updates | Simple request/response | Medium |\n\n---\n\n## Simplicity Principle\n\n**\"Start simple, add complexity only when proven necessary.\"**\n\n- You can always add patterns later\n- Removing complexity is MUCH harder than adding it\n- When in doubt, choose simpler option\n",".agent/skills/architecture/trade-off-analysis.md":"# Trade-off Analysis & ADR\n\n> Document every architectural decision with trade-offs.\n\n## Decision Framework\n\nFor EACH architectural component, document:\n\n```markdown\n## Architecture Decision Record\n\n### Context\n- **Problem**: [What problem are we solving?]\n- **Constraints**: [Team size, scale, timeline, budget]\n\n### Options Considered\n\n| Option | Pros | Cons | Complexity | When Valid |\n|--------|------|------|------------|-----------|\n| Option A | Benefit 1 | Cost 1 | Low | [Conditions] |\n| Option B | Benefit 2 | Cost 2 | High | [Conditions] |\n\n### Decision\n**Chosen**: [Option B]\n\n### Rationale\n1. [Reason 1 - tied to constraints]\n2. [Reason 2 - tied to requirements]\n\n### Trade-offs Accepted\n- [What we're giving up]\n- [Why this is acceptable]\n\n### Consequences\n- **Positive**: [Benefits we gain]\n- **Negative**: [Costs/risks we accept]\n- **Mitigation**: [How we'll address negatives]\n\n### Revisit Trigger\n- [When to reconsider this decision]\n```\n\n## ADR Template\n\n```markdown\n# ADR-[XXX]: [Decision Title]\n\n## Status\nProposed | Accepted | Deprecated | Superseded by [ADR-YYY]\n\n## Context\n[What problem? What constraints?]\n\n## Decision\n[What we chose - be specific]\n\n## Rationale\n[Why - tie to requirements and constraints]\n\n## Trade-offs\n[What we're giving up - be honest]\n\n## Consequences\n- **Positive**: [Benefits]\n- **Negative**: [Costs]\n- **Mitigation**: [How to address]\n```\n\n## ADR Storage\n\n```\ndocs/\n└── architecture/\n    ├── adr-001-use-nextjs.md\n    ├── adr-002-postgresql-over-mongodb.md\n    └── adr-003-adopt-repository-pattern.md\n```\n",".agent/skills/bash-linux/SKILL.md":"---\nname: bash-linux\ndescription: Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash\n---\n\n# Bash Linux Patterns\n\n> Essential patterns for Bash on Linux/macOS.\n\n---\n\n## 1. Operator Syntax\n\n### Chaining Commands\n\n| Operator | Meaning | Example |\n|----------|---------|---------|\n| `;` | Run sequentially | `cmd1; cmd2` |\n| `&&` | Run if previous succeeded | `npm install && npm run dev` |\n| `\\|\\|` | Run if previous failed | `npm test \\|\\| echo \"Tests failed\"` |\n| `\\|` | Pipe output | `ls \\| grep \".js\"` |\n\n---\n\n## 2. File Operations\n\n### Essential Commands\n\n| Task | Command |\n|------|---------|\n| List all | `ls -la` |\n| Find files | `find . -name \"*.js\" -type f` |\n| File content | `cat file.txt` |\n| First N lines | `head -n 20 file.txt` |\n| Last N lines | `tail -n 20 file.txt` |\n| Follow log | `tail -f log.txt` |\n| Search in files | `grep -r \"pattern\" --include=\"*.js\"` |\n| File size | `du -sh *` |\n| Disk usage | `df -h` |\n\n---\n\n## 3. Process Management\n\n| Task | Command |\n|------|---------|\n| List processes | `ps aux` |\n| Find by name | `ps aux \\| grep node` |\n| Kill by PID | `kill -9 <PID>` |\n| Find port user | `lsof -i :3000` |\n| Kill port | `kill -9 $(lsof -t -i :3000)` |\n| Background | `npm run dev &` |\n| Jobs | `jobs -l` |\n| Bring to front | `fg %1` |\n\n---\n\n## 4. Text Processing\n\n### Core Tools\n\n| Tool | Purpose | Example |\n|------|---------|---------|\n| `grep` | Search | `grep -rn \"TODO\" src/` |\n| `sed` | Replace | `sed -i 's/old/new/g' file.txt` |\n| `awk` | Extract columns | `awk '{print $1}' file.txt` |\n| `cut` | Cut fields | `cut -d',' -f1 data.csv` |\n| `sort` | Sort lines | `sort -u file.txt` |\n| `uniq` | Unique lines | `sort file.txt \\| uniq -c` |\n| `wc` | Count | `wc -l file.txt` |\n\n---\n\n## 5. Environment Variables\n\n| Task | Command |\n|------|---------|\n| View all | `env` or `printenv` |\n| View one | `echo $PATH` |\n| Set temporary | `export VAR=\"value\"` |\n| Set in script | `VAR=\"value\" command` |\n| Add to PATH | `export PATH=\"$PATH:/new/path\"` |\n\n---\n\n## 6. Network\n\n| Task | Command |\n|------|---------|\n| Download | `curl -O https://example.com/file` |\n| API request | `curl -X GET https://api.example.com` |\n| POST JSON | `curl -X POST -H \"Content-Type: application/json\" -d '{\"key\":\"value\"}' URL` |\n| Check port | `nc -zv localhost 3000` |\n| Network info | `ifconfig` or `ip addr` |\n\n---\n\n## 7. Script Template\n\n```bash\n#!/bin/bash\nset -euo pipefail  # Exit on error, undefined var, pipe fail\n\n# Colors (optional)\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nNC='\\033[0m'\n\n# Script directory\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# Functions\nlog_info() { echo -e \"${GREEN}[INFO]${NC} $1\"; }\nlog_error() { echo -e \"${RED}[ERROR]${NC} $1\" >&2; }\n\n# Main\nmain() {\n    log_info \"Starting...\"\n    # Your logic here\n    log_info \"Done!\"\n}\n\nmain \"$@\"\n```\n\n---\n\n## 8. Common Patterns\n\n### Check if command exists\n\n```bash\nif command -v node &> /dev/null; then\n    echo \"Node is installed\"\nfi\n```\n\n### Default variable value\n\n```bash\nNAME=${1:-\"default_value\"}\n```\n\n### Read file line by line\n\n```bash\nwhile IFS= read -r line; do\n    echo \"$line\"\ndone < file.txt\n```\n\n### Loop over files\n\n```bash\nfor file in *.js; do\n    echo \"Processing $file\"\ndone\n```\n\n---\n\n## 9. Differences from PowerShell\n\n| Task | PowerShell | Bash |\n|------|------------|------|\n| List files | `Get-ChildItem` | `ls -la` |\n| Find files | `Get-ChildItem -Recurse` | `find . -type f` |\n| Environment | `$env:VAR` | `$VAR` |\n| String concat | `\"$a$b\"` | `\"$a$b\"` (same) |\n| Null check | `if ($x)` | `if [ -n \"$x\" ]` |\n| Pipeline | Object-based | Text-based |\n\n---\n\n## 10. Error Handling\n\n### Set options\n\n```bash\nset -e          # Exit on error\nset -u          # Exit on undefined variable\nset -o pipefail # Exit on pipe failure\nset -x          # Debug: print commands\n```\n\n### Trap for cleanup\n\n```bash\ncleanup() {\n    echo \"Cleaning up...\"\n    rm -f /tmp/tempfile\n}\ntrap cleanup EXIT\n```\n\n---\n\n> **Remember:** Bash is text-based. Use `&&` for success chains, `set -e` for safety, and quote your variables!\n",".agent/skills/behavioral-modes/SKILL.md":"---\nname: behavioral-modes\ndescription: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.\nallowed-tools: Read, Glob, Grep\n---\n\n# Behavioral Modes - Adaptive AI Operating Modes\n\n## Purpose\nThis skill defines distinct behavioral modes that optimize AI performance for specific tasks. Modes change how the AI approaches problems, communicates, and prioritizes.\n\n---\n\n## Available Modes\n\n### 1. 🧠 BRAINSTORM Mode\n\n**When to use:** Early project planning, feature ideation, architecture decisions\n\n**Behavior:**\n- Ask clarifying questions before assumptions\n- Offer multiple alternatives (at least 3)\n- Think divergently - explore unconventional solutions\n- No code yet - focus on ideas and options\n- Use visual diagrams (mermaid) to explain concepts\n\n**Output style:**\n```\n\"Let's explore this together. Here are some approaches:\n\nOption A: [description]\n  ✅ Pros: ...\n  ❌ Cons: ...\n\nOption B: [description]\n  ✅ Pros: ...\n  ❌ Cons: ...\n\nWhat resonates with you? Or should we explore a different direction?\"\n```\n\n---\n\n### 2. ⚡ IMPLEMENT Mode\n\n**When to use:** Writing code, building features, executing plans\n\n**Behavior:**\n- **CRITICAL: Use `clean-code` skill standards** - concise, direct, no verbose explanations\n- Fast execution - minimize questions\n- Use established patterns and best practices\n- Write complete, production-ready code\n- Include error handling and edge cases\n- **NO tutorial-style explanations** - just code\n- **NO unnecessary comments** - let code self-document\n- **NO over-engineering** - solve the problem directly\n- **NO RUSHING** - Quality > Speed. Read ALL references before coding.\n\n**Output style:**\n```\n[Code block]\n\n[Brief summary, max 1-2 sentences]\n```\n\n**NOT:**\n```\n\"Building [feature]...\n\n✓ Created [file1]\n✓ Created [file2]\n✓ Updated [file3]\n\n[long explanation]\n\nRun `npm run dev` to test.\"\n```\n\n---\n\n### 3. 🔍 DEBUG Mode\n\n**When to use:** Fixing bugs, troubleshooting errors, investigating issues\n\n**Behavior:**\n- Ask for error messages and reproduction steps\n- Think systematically - check logs, trace data flow\n- Form hypothesis → test → verify\n- Explain the root cause, not just the fix\n- Prevent future occurrences\n\n**Output style:**\n```\n\"Investigating...\n\n🔍 Symptom: [what's happening]\n🎯 Root cause: [why it's happening]\n✅ Fix: [the solution]\n🛡️ Prevention: [how to avoid in future]\n```\n\n---\n\n### 4. 📋 REVIEW Mode\n\n**When to use:** Code review, architecture review, security audit\n\n**Behavior:**\n- Be thorough but constructive\n- Categorize by severity (Critical/High/Medium/Low)\n- Explain the \"why\" behind suggestions\n- Offer improved code examples\n- Acknowledge what's done well\n\n**Output style:**\n```\n## Code Review: [file/feature]\n\n### 🔴 Critical\n- [issue with explanation]\n\n### 🟠 Improvements\n- [suggestion with example]\n\n### 🟢 Good\n- [positive observation]\n```\n\n---\n\n### 5. 📚 TEACH Mode\n\n**When to use:** Explaining concepts, documentation, onboarding\n\n**Behavior:**\n- Explain from fundamentals\n- Use analogies and examples\n- Progress from simple to complex\n- Include practical exercises\n- Check understanding\n\n**Output style:**\n```\n## Understanding [Concept]\n\n### What is it?\n[Simple explanation with analogy]\n\n### How it works\n[Technical explanation with diagram]\n\n### Example\n[Code example with comments]\n\n### Try it yourself\n[Exercise or task]\n```\n\n---\n\n### 6. 🚀 SHIP Mode\n\n**When to use:** Production deployment, final polish, release preparation\n\n**Behavior:**\n- Focus on stability over features\n- Check for missing error handling\n- Verify environment configs\n- Run all tests\n- Create deployment checklist\n\n**Output style:**\n```\n## Pre-Ship Checklist\n\n### ✅ Code Quality\n- [ ] No TypeScript errors\n- [ ] ESLint passing\n- [ ] All tests passing\n\n### ✅ Security\n- [ ] No exposed secrets\n- [ ] Input validation complete\n\n### ✅ Performance\n- [ ] Bundle size acceptable\n- [ ] No console.logs\n\n### 🚀 Ready to deploy\n```\n\n---\n\n## Mode Detection\n\nThe AI should automatically detect the appropriate mode based on:\n\n| Trigger | Mode |\n|---------|------|\n| \"what if\", \"ideas\", \"options\" | BRAINSTORM |\n| \"build\", \"create\", \"add\" | IMPLEMENT |\n| \"not working\", \"error\", \"bug\" | DEBUG |\n| \"review\", \"check\", \"audit\" | REVIEW |\n| \"explain\", \"how does\", \"learn\" | TEACH |\n| \"deploy\", \"release\", \"production\" | SHIP |\n\n---\n\n## Multi-Agent Collaboration Patterns (2025)\n\nModern architectures optimized for agent-to-agent collaboration:\n\n### 1. 🔭 EXPLORE Mode\n**Role:** Discovery and Analysis (Explorer Agent)\n**Behavior:** Socratic questioning, deep-dive code reading, dependency mapping.\n**Output:** `discovery-report.json`, architectural visualization.\n\n### 2. 🗺️ PLAN-EXECUTE-CRITIC (PEC)\nCyclic mode transitions for high-complexity tasks:\n1. **Planner:** Decomposes the task into atomic steps (`task.md`).\n2. **Executor:** Performs the actual coding (`IMPLEMENT`).\n3. **Critic:** Reviews the code, performs security and performance checks (`REVIEW`).\n\n### 3. 🧠 MENTAL MODEL SYNC\nBehavior for creating and loading \"Mental Model\" summaries to preserve context between sessions.\n\n---\n\n## Combining Modes\n\n---\n\n## Manual Mode Switching\n\nUsers can explicitly request a mode:\n\n```\n/brainstorm new feature ideas\n/implement the user profile page\n/debug why login fails\n/review this pull request\n```\n",".agent/skills/brainstorming/SKILL.md":"---\nname: brainstorming\ndescription: Socratic questioning protocol + user communication. MANDATORY for complex requests, new features, or unclear requirements. Includes progress reporting and error handling.\nallowed-tools: Read, Glob, Grep\n---\n\n# Brainstorming & Communication Protocol\n\n> **MANDATORY:** Use for complex/vague requests, new features, updates.\n\n---\n\n## 🛑 SOCRATIC GATE (ENFORCEMENT)\n\n### When to Trigger\n\n| Pattern | Action |\n|---------|--------|\n| \"Build/Create/Make [thing]\" without details | 🛑 ASK 3 questions |\n| Complex feature or architecture | 🛑 Clarify before implementing |\n| Update/change request | 🛑 Confirm scope |\n| Vague requirements | 🛑 Ask purpose, users, constraints |\n\n### 🚫 MANDATORY: 3 Questions Before Implementation\n\n1. **STOP** - Do NOT start coding\n2. **ASK** - Minimum 3 questions:\n   - 🎯 Purpose: What problem are you solving?\n   - 👥 Users: Who will use this?\n   - 📦 Scope: Must-have vs nice-to-have?\n3. **WAIT** - Get response before proceeding\n\n---\n\n## 🧠 Dynamic Question Generation\n\n**⛔ NEVER use static templates.** Read `dynamic-questioning.md` for principles.\n\n### Core Principles\n\n| Principle | Meaning |\n|-----------|---------|\n| **Questions Reveal Consequences** | Each question connects to an architectural decision |\n| **Context Before Content** | Understand greenfield/feature/refactor/debug context first |\n| **Minimum Viable Questions** | Each question must eliminate implementation paths |\n| **Generate Data, Not Assumptions** | Don't guess—ask with trade-offs |\n\n### Question Generation Process\n\n```\n1. Parse request → Extract domain, features, scale indicators\n2. Identify decision points → Blocking vs. deferable\n3. Generate questions → Priority: P0 (blocking) > P1 (high-leverage) > P2 (nice-to-have)\n4. Format with trade-offs → What, Why, Options, Default\n```\n\n### Question Format (MANDATORY)\n\n```markdown\n### [PRIORITY] **[DECISION POINT]**\n\n**Question:** [Clear question]\n\n**Why This Matters:**\n- [Architectural consequence]\n- [Affects: cost/complexity/timeline/scale]\n\n**Options:**\n| Option | Pros | Cons | Best For |\n|--------|------|------|----------|\n| A | [+] | [-] | [Use case] |\n\n**If Not Specified:** [Default + rationale]\n```\n\n**For detailed domain-specific question banks and algorithms**, see: `dynamic-questioning.md`\n\n---\n\n## Progress Reporting (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Transparency builds trust. Status must be visible and actionable.\n\n### Status Board Format\n\n| Agent | Status | Current Task | Progress |\n|-------|--------|--------------|----------|\n| [Agent Name] | ✅🔄⏳❌⚠️ | [Task description] | [% or count] |\n\n### Status Icons\n\n| Icon | Meaning | Usage |\n|------|---------|-------|\n| ✅ | Completed | Task finished successfully |\n| 🔄 | Running | Currently executing |\n| ⏳ | Waiting | Blocked, waiting for dependency |\n| ❌ | Error | Failed, needs attention |\n| ⚠️ | Warning | Potential issue, not blocking |\n\n---\n\n## Error Handling (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Errors are opportunities for clear communication.\n\n### Error Response Pattern\n\n```\n1. Acknowledge the error\n2. Explain what happened (user-friendly)\n3. Offer specific solutions with trade-offs\n4. Ask user to choose or provide alternative\n```\n\n### Error Categories\n\n| Category | Response Strategy |\n|----------|-------------------|\n| **Port Conflict** | Offer alternative port or close existing |\n| **Dependency Missing** | Auto-install or ask permission |\n| **Build Failure** | Show specific error + suggested fix |\n| **Unclear Error** | Ask for specifics: screenshot, console output |\n\n---\n\n## Completion Message (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Celebrate success, guide next steps.\n\n### Completion Structure\n\n```\n1. Success confirmation (celebrate briefly)\n2. Summary of what was done (concrete)\n3. How to verify/test (actionable)\n4. Next steps suggestion (proactive)\n```\n\n---\n\n## Communication Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Concise** | No unnecessary details, get to point |\n| **Visual** | Use emojis (✅🔄⏳❌) for quick scanning |\n| **Specific** | \"~2 minutes\" not \"wait a bit\" |\n| **Alternatives** | Offer multiple paths when stuck |\n| **Proactive** | Suggest next step after completion |\n\n---\n\n## Anti-Patterns (AVOID)\n\n| Anti-Pattern | Why |\n|--------------|-----|\n| Jumping to solutions before understanding | Wastes time on wrong problem |\n| Assuming requirements without asking | Creates wrong output |\n| Over-engineering first version | Delays value delivery |\n| Ignoring constraints | Creates unusable solutions |\n| \"I think\" phrases | Uncertainty → Ask instead |\n\n---\n",".agent/skills/brainstorming/dynamic-questioning.md":"# Dynamic Question Generation\n\n> **PRINCIPLE:** Questions are not about gathering data—they are about **revealing architectural consequences**.\n>\n> Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.\n\n---\n\n## 🧠 Core Principles\n\n### 1. Questions Reveal Consequences\n\nA good question is not \"What color do you want?\" but:\n\n```markdown\n❌ BAD: \"What authentication method?\"\n✅ GOOD: \"Should users sign up with email/password or social login?\n\n   Impact:\n   - Email/Pass → Need password reset, hashing, 2FA infrastructure\n   - Social → OAuth providers, user profile mapping, less control\n\n   Trade-off: Security vs. Development time vs. User friction\"\n```\n\n### 2. Context Before Content\n\nFirst understand **where** this request fits:\n\n| Context | Question Focus |\n|---------|----------------|\n| **Greenfield** (new project) | Foundation decisions: stack, hosting, scale |\n| **Feature Addition** | Integration points, existing patterns, breaking changes |\n| **Refactor** | Why refactor? Performance? Maintainability? What's broken? |\n| **Debug** | Symptoms → Root cause → Reproduction path |\n\n### 3. Minimum Viable Questions\n\n**PRINCIPLE:** Each question must eliminate a fork in the implementation road.\n\n```\nBefore Question:\n├── Path A: Do X (5 min)\n├── Path B: Do Y (15 min)\n└── Path C: Do Z (1 hour)\n\nAfter Question:\n└── Path Confirmed: Do X (5 min)\n```\n\nIf a question doesn't reduce implementation paths → **DELETE IT**.\n\n### 4. Questions Generate Data, Not Assumptions\n\n```markdown\n❌ ASSUMPTION: \"User probably wants Stripe for payments\"\n✅ QUESTION: \"Which payment provider fits your needs?\n\n   Stripe → Best documentation, 2.9% + $0.30, US-centric\n   LemonSqueezy → Merchant of Record, 5% + $0.50, global taxes\n   Paddle → Complex pricing, handles EU VAT, enterprise focus\"\n```\n\n---\n\n## 📋 Question Generation Algorithm\n\n```\nINPUT: User request + Context (greenfield/feature/refactor/debug)\n│\n├── STEP 1: Parse Request\n│   ├── Extract domain (ecommerce, auth, realtime, cms, etc.)\n│   ├── Extract features (explicit and implied)\n│   └── Extract scale indicators (users, data volume, frequency)\n│\n├── STEP 2: Identify Decision Points\n│   ├── What MUST be decided before coding? (blocking)\n│   ├── What COULD be decided later? (deferable)\n│   └── What has ARCHITECTURAL impact? (high-leverage)\n│\n├── STEP 3: Generate Questions (Priority Order)\n│   ├── P0: Blocking decisions (cannot proceed without answer)\n│   ├── P1: High-leverage (affects >30% of implementation)\n│   ├── P2: Medium-leverage (affects specific features)\n│   └── P3: Nice-to-have (edge cases, optimization)\n│\n└── STEP 4: Format Each Question\n    ├── What: Clear question\n    ├── Why: Impact on implementation\n    ├── Options: Trade-offs (not just A vs B)\n    └── Default: What happens if user doesn't answer\n```\n\n---\n\n## 🎯 Domain-Specific Question Banks\n\n### E-Commerce\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Single or Multi-vendor?** | Multi-vendor → Commission logic, vendor dashboards, split payments | +Revenue, -Complexity |\n| **Inventory Tracking?** | Needs stock tables, reservation logic, low-stock alerts | +Accuracy, -Development time |\n| **Digital or Physical Products?** | Digital → Download links, no shipping | Physical → Shipping APIs, tracking |\n| **Subscription or One-time?** | Subscription → Recurring billing, dunning, proration | +Revenue, -Complexity |\n\n### Authentication\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Social Login Needed?** | OAuth providers vs. password reset infrastructure | +UX, -Control |\n| **Role-Based Permissions?** | RBAC tables, policy enforcement, admin UI | +Security, -Development time |\n| **2FA Required?** | TOTP/SMI infrastructure, backup codes, recovery flow | +Security, -UX friction |\n| **Email Verification?** | Verification tokens, email service, resend logic | +Security, -Sign-up friction |\n\n### Real-time\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **WebSocket or Polling?** | WS → Server scaling, connection management | Polling → Simpler, higher latency |\n| **Expected Concurrent Users?** | <100 → Single server, >1000 → Redis pub/sub, >10k → specialized infra | +Scale, -Complexity |\n| **Message Persistence?** | History tables, storage costs, pagination | +UX, -Storage |\n| **Ephemeral or Durable?** | Ephemeral → In-memory, Durable → Database write before emit | +Reliability, -Latency |\n\n### Content/CMS\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Rich Text or Markdown?** | Rich Text → Sanitization, XSS risks | Markdown → Simple, no WYSIWYG |\n| **Draft/Publish Workflow?** | Status field, scheduled jobs, versioning | +Control, -Complexity |\n| **Media Handling?** | Upload endpoints, storage, optimization | +Features, -Development time |\n| **Multi-language?** | i18n tables, translation UI, fallback logic | +Reach, -Complexity |\n\n---\n\n## 📐 Dynamic Question Template\n\n```markdown\nBased on your request for [DOMAIN] [FEATURE]:\n\n## 🔴 CRITICAL (Blocking Decisions)\n\n### 1. **[DECISION POINT]**\n\n**Question:** [Clear, specific question]\n\n**Why This Matters:**\n- [Explain architectural consequence]\n- [Affects: cost / complexity / timeline / scale]\n\n**Options:**\n| Option | Pros | Cons | Best For |\n|--------|------|------|----------|\n| A | [Advantage] | [Disadvantage] | [Use case] |\n| B | [Advantage] | [Disadvantage] | [Use case] |\n\n**If Not Specified:** [Default choice + rationale]\n\n---\n\n## 🟡 HIGH-LEVERAGE (Affects Implementation)\n\n### 2. **[DECISION POINT]**\n[Same format]\n\n---\n\n## 🟢 NICE-TO-HAVE (Edge Cases)\n\n### 3. **[DECISION POINT]**\n[Same format]\n```\n\n---\n\n## 🔄 Iterative Questioning\n\n### First Pass (3-5 Questions)\nFocus on **blocking decisions**. Don't proceed without answers.\n\n### Second Pass (After Initial Implementation)\nAs patterns emerge, ask:\n- \"This feature implies [X]. Should we handle [edge case] now or defer?\"\n- \"We're using [Pattern A]. Should [Feature B] follow the same pattern?\"\n\n### Third Pass (Optimization)\nWhen functionality works:\n- \"Performance bottleneck at [X]. Optimize now or acceptable for now?\"\n- \"Refactor [Y] for maintainability or ship as-is?\"\n\n---\n\n## 🎭 Example: Full Question Generation\n\n```\nUSER REQUEST: \"Build an Instagram clone\"\n\nSTEP 1: Parse\n├── Domain: Social Media\n├── Features: Photo sharing, engagement (likes/comments), user profiles\n├── Implied: Feed, following, authentication\n└── Scale: Potentially high (social apps go viral)\n\nSTEP 2: Decision Points\n├── Blocking: Storage strategy, authentication method, feed type\n├── High-leverage: Real-time notifications, data model complexity\n└── Deferable: Analytics, advanced search, reels/video\n\nSTEP 3: Generate Questions (Priority)\n\nP0 (Blocking):\n1. Storage Strategy → Affects architecture, cost, speed\n2. Feed Algorithm → Affects database queries, complexity\n3. Auth Method → Affects dev time, UX, security\n\nP1 (High-leverage):\n4. Real-time Notifications → WebSocket vs polling\n5. Media Processing → Client-side vs server-side optimization\n\nP2 (Deferable):\n6. Story/Reels → Major feature creep, defer to v2\n7. DM/Chat → Separate subsystem, defer to v2\n\nSTEP 4: Format Output\n```\n\n---\n\n## 📊 Generated Output (Example)\n\n```\nBased on your Instagram clone request:\n\n## 🔴 CRITICAL DECISIONS (Cannot Proceed Without Answers)\n\n### 1. **Photo Storage Strategy**\n\n**Question:** Where will user photos be stored and served?\n\n**Why This Matters:**\n- Affects: Monthly hosting costs, page load speed, CDN complexity\n- High-volume social apps: 1000 users × 10 photos × 2MB = 20GB storage\n\n**Options:**\n| Option | Cost | Speed | Complexity | Best For |\n|--------|------|-------|------------|----------|\n| **Cloudinary** | $89/mo (25GB) | Fast (CDN) | Low | MVP, rapid launch |\n| **AWS S3 + CloudFront** | $0.023/GB | Fast (CDN) | Medium | Production, cost-optimized |\n| **Supabase Storage** | Free tier 1GB | Medium | Low | Small scale, simple |\n| **Local Storage** | Server cost | Slow | Low | Development only |\n\n**If Not Specified:** Cloudinary (balanced for MVP)\n\n---\n\n### 2. **Feed Algorithm Choice**\n\n**Question:** How should the main feed work?\n\n**Why This Matters:**\n- Affects: Database query complexity, caching strategy, development time\n- Algorithmic feeds require ML infrastructure, ranking signals\n\n**Options:**\n| Option | Complexity | Database Impact | Best For |\n|--------|------------|-----------------|----------|\n| **Chronological** | Low | Simple query | Early stage, transparency |\n| **Follow-Only** | Medium | JOIN with pagination | Most social apps |\n| **Algorithmic** | High | Pre-computed feed tables | Instagram competitor |\n\n**If Not Specified:** Follow-Only (balanced for social app)\n\n---\n\n### 3. **Authentication Approach**\n\n**Question:** How do users sign up and login?\n\n**Why This Matters:**\n- Affects: Development time (2-5 hours), security posture, UX friction\n\n**Options:**\n| Option | Dev Time | Security | UX | Best For |\n|--------|----------|----------|-----|----------|\n| **Email/Password** | 4-5 hrs | High (if 2FA) | Medium | Full control needed |\n| **Social Only** | 1-2 hrs | Provider-dependent | Smooth | B2C, rapid launch |\n| **Magic Link** | 2-3 hrs | Medium | Very smooth | Security-focused |\n| **Clerk/Auth0** | 1 hr | High | Smooth | Fastest to market |\n\n**If Not Specified:** Clerk (fastest for MVP)\n\n---\n\n## 🟡 HIGH-LEVERAGE (Affects Architecture)\n\n### 4. **Real-time Notifications**\n\n**Question:** Do users need instant notifications for likes/comments?\n\n**Why This Matters:**\n- WebSocket adds infrastructure complexity (Redis pub/sub for scaling)\n- Polling is simpler but higher latency\n\n**Options:**\n| Option | Complexity | Scale Cost | Best For |\n|--------|------------|------------|----------|\n| **WebSocket + Redis** | High | $10+/mo | >1000 concurrent users |\n| **Polling (30s)** | Low | DB queries | <1000 users |\n| **No Real-time** | None | None | MVP, validate first |\n\n**If Not Specified:** Polling for MVP (defer WebSocket until validated)\n\n---\n\n## 🟢 NICE-TO-HAVE (Defer to v2)\n\n### 5. **Video/Reels Support**\n- Major complexity (video processing, streaming infrastructure)\n- Recommendation: Launch with photos only, add video after validation\n\n### 6. **Direct Messaging**\n- Separate subsystem (chat infrastructure different from feed)\n- Recommendation: Use Pusher/Stream for real-time or defer entirely\n\n---\n\n## 📋 Summary\n\n| Decision | Recommendation | If Changed |\n|----------|----------------|------------|\n| Storage | Cloudinary | +3 hrs setup |\n| Feed | Follow-only | +2 hrs query optimization |\n| Auth | Clerk | -3 hrs dev time |\n| Real-time | Polling | +5 hrs WebSocket setup |\n| Video | Defer to v2 | N/A |\n| DM | Defer to v2 | N/A |\n\n**Total Estimated MVP Time:** 15-20 hours with recommendations above\n```\n\n---\n\n## 🎯 Principles Recap\n\n1. **Every question = Architectural decision** → Not data gathering\n2. **Show trade-offs** → User understands consequences\n3. **Prioritize blocking decisions** → Cannot proceed without\n4. **Provide defaults** → If user doesn't answer, we proceed anyway\n5. **Domain-aware** → Ecommerce questions ≠ Auth questions ≠ Real-time questions\n6. **Iterative** → More questions as patterns emerge during implementation\n",".agent/skills/clean-code/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fclean-code%2FSKILL.md -->",".agent/skills/code-review-checklist/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fcode-review-checklist%2FSKILL.md -->",".agent/skills/database-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2FSKILL.md -->",".agent/skills/database-design/database-selection.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fdatabase-selection.md -->",".agent/skills/database-design/indexing.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Findexing.md -->",".agent/skills/database-design/migrations.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fmigrations.md -->",".agent/skills/database-design/optimization.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Foptimization.md -->",".agent/skills/database-design/orm-selection.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Form-selection.md -->",".agent/skills/database-design/schema-design.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fschema-design.md -->",".agent/skills/deployment-procedures/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdeployment-procedures%2FSKILL.md -->",".agent/skills/doc.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdoc.md -->",".agent/skills/docker-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdocker-expert%2FSKILL.md -->",".agent/skills/documentation-templates/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdocumentation-templates%2FSKILL.md -->",".agent/skills/frontend-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2FSKILL.md -->",".agent/skills/frontend-design/animation-guide.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fanimation-guide.md -->",".agent/skills/frontend-design/color-system.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fcolor-system.md -->",".agent/skills/frontend-design/decision-trees.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fdecision-trees.md -->",".agent/skills/frontend-design/motion-graphics.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fmotion-graphics.md -->",".agent/skills/frontend-design/typography-system.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Ftypography-system.md -->",".agent/skills/frontend-design/ux-psychology.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fux-psychology.md -->",".agent/skills/frontend-design/visual-effects.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fvisual-effects.md -->",".agent/skills/game-development/2d-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2F2d-games%2FSKILL.md -->",".agent/skills/game-development/3d-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2F3d-games%2FSKILL.md -->",".agent/skills/game-development/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2FSKILL.md -->",".agent/skills/game-development/game-art/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-art%2FSKILL.md -->",".agent/skills/game-development/game-audio/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-audio%2FSKILL.md -->",".agent/skills/game-development/game-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-design%2FSKILL.md -->",".agent/skills/game-development/mobile-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fmobile-games%2FSKILL.md -->",".agent/skills/game-development/multiplayer/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fmultiplayer%2FSKILL.md -->",".agent/skills/game-development/pc-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fpc-games%2FSKILL.md -->",".agent/skills/game-development/vr-ar/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fvr-ar%2FSKILL.md -->",".agent/skills/game-development/web-games/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fweb-games%2FSKILL.md -->",".agent/skills/geo-fundamentals/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgeo-fundamentals%2FSKILL.md -->",".agent/skills/i18n-localization/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fi18n-localization%2FSKILL.md -->",".agent/skills/lint-and-validate/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Flint-and-validate%2FSKILL.md -->",".agent/skills/mcp-builder/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmcp-builder%2FSKILL.md -->",".agent/skills/mobile-design/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2FSKILL.md -->",".agent/skills/mobile-design/decision-trees.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fdecision-trees.md -->",".agent/skills/mobile-design/mobile-backend.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-backend.md -->",".agent/skills/mobile-design/mobile-color-system.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-color-system.md -->",".agent/skills/mobile-design/mobile-debugging.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-debugging.md -->",".agent/skills/mobile-design/mobile-design-thinking.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-design-thinking.md -->",".agent/skills/mobile-design/mobile-navigation.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-navigation.md -->",".agent/skills/mobile-design/mobile-performance.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-performance.md -->",".agent/skills/mobile-design/mobile-testing.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-testing.md -->",".agent/skills/mobile-design/mobile-typography.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-typography.md -->",".agent/skills/mobile-design/platform-android.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fplatform-android.md -->",".agent/skills/mobile-design/platform-ios.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fplatform-ios.md -->",".agent/skills/mobile-design/touch-psychology.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Ftouch-psychology.md -->",".agent/skills/nestjs-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnestjs-expert%2FSKILL.md -->",".agent/skills/nextjs-best-practices/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnextjs-best-practices%2FSKILL.md -->",".agent/skills/nodejs-best-practices/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnodejs-best-practices%2FSKILL.md -->",".agent/skills/parallel-agents/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fparallel-agents%2FSKILL.md -->",".agent/skills/performance-profiling/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fperformance-profiling%2FSKILL.md -->",".agent/skills/plan-writing/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fplan-writing%2FSKILL.md -->",".agent/skills/powershell-windows/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fpowershell-windows%2FSKILL.md -->",".agent/skills/prisma-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fprisma-expert%2FSKILL.md -->",".agent/skills/python-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fpython-patterns%2FSKILL.md -->",".agent/skills/react-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Freact-patterns%2FSKILL.md -->",".agent/skills/red-team-tactics/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fred-team-tactics%2FSKILL.md -->",".agent/skills/seo-fundamentals/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fseo-fundamentals%2FSKILL.md -->",".agent/skills/server-management/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fserver-management%2FSKILL.md -->",".agent/skills/systematic-debugging/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fsystematic-debugging%2FSKILL.md -->",".agent/skills/tailwind-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftailwind-patterns%2FSKILL.md -->",".agent/skills/tdd-workflow/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftdd-workflow%2FSKILL.md -->",".agent/skills/testing-patterns/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftesting-patterns%2FSKILL.md -->",".agent/skills/typescript-expert/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2FSKILL.md -->",".agent/skills/typescript-expert/references/tsconfig-strict.json":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2Freferences%2Ftsconfig-strict.json -->",".agent/skills/typescript-expert/references/typescript-cheatsheet.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2Freferences%2Ftypescript-cheatsheet.md -->",".agent/skills/ui-ux-pro-max/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fui-ux-pro-max%2FSKILL.md -->",".agent/skills/vulnerability-scanner/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fvulnerability-scanner%2FSKILL.md -->",".agent/skills/vulnerability-scanner/checklists.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fvulnerability-scanner%2Fchecklists.md -->",".agent/skills/webapp-testing/SKILL.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fwebapp-testing%2FSKILL.md -->",".github/copilot-instructions.md":"# Dillinger - Copilot Instructions\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They arrive with a document to write or edit, often context-switching from code. The job: write and preview markdown with zero friction, optionally syncing to GitHub, Dropbox, Google Drive, OneDrive, or Bitbucket.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Aesthetic Direction\n- Polished minimal. Clean lines, generous whitespace, refined typography.\n- Full theme support: light, dark, and system-preference modes.\n- Dark chrome sidebar/navbar with light editor is the signature look in light mode.\n- Anti-references: cluttered toolbars, gratuitous gradients, loud colors.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Key Design Tokens\n- Brand accent: `#35D7BB` (plum)\n- Backgrounds: `#ffffff` (light), `#2B2F36` (sidebar), `#373D49` (navbar), `#1D212A` (highlight)\n- Text: `#373D49` (primary), `#ffffff` (invert), `#A0AABF` (muted)\n- Fonts: Source Sans 3 (UI), Georgia (prose), Ubuntu Mono (code)\n- See `.impeccable.md` for full design system reference.\n","CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1873 | 2:32 PM | 🔵 | Next.js Migration Dependency Stack with Modern Equivalents | ~510 |\n| #1861 | 2:25 PM | 🔵 | Next.js Config with Lucide-React Bundle Optimization | ~396 |\n| #1850 | 2:24 PM | ✅ | Added Modal and Toast Z-Index Layers to Tailwind Configuration | ~354 |\n| #1827 | 2:22 PM | 🔵 | Tailwind Configuration with Legacy Dillinger Design Tokens | ~463 |\n</claude-mem-context>\n\n# Dillinger Next.js - CLAUDE.md\n\n> Cloud-enabled, mobile-ready, offline-storage-compatible Markdown editor built with Next.js 14.\n\n## Quick Reference\n\n```bash\nnpm run dev      # Start dev server (http://localhost:3000)\nnpm run build    # Production build\nnpm run start    # Start production server\nnpm run lint     # Run ESLint\n```\n\n## Tech Stack\n\n| Category | Technology | Version |\n|----------|------------|---------|\n| Framework | Next.js (App Router) | 14.2.35 |\n| Language | TypeScript (strict) | 5.x |\n| UI | React | 18.x |\n| Styling | Tailwind CSS | 3.4.1 |\n| State | Zustand | 5.0.10 |\n| Editor | Monaco Editor | 4.7.0 |\n| Icons | Lucide React | 0.562.0 |\n| Markdown | markdown-it + plugins | 14.1.0 |\n\n## Architecture Overview\n\n```\ndillinger/\n├── app/                    # Next.js App Router\n│   ├── api/               # API route handlers\n│   │   ├── github/        # GitHub OAuth + file ops\n│   │   ├── dropbox/       # Dropbox integration\n│   │   ├── google-drive/  # Google Drive integration\n│   │   ├── onedrive/      # Microsoft OneDrive\n│   │   ├── bitbucket/     # Bitbucket integration\n│   │   ├── medium/        # Medium publishing\n│   │   └── export/        # PDF/HTML export\n│   ├── layout.tsx         # Root layout (providers)\n│   ├── page.tsx           # Main editor page\n│   ├── globals.css        # Global styles + Tailwind\n│   ├── error.tsx          # Error boundary\n│   └── not-found.tsx      # 404 page\n├── components/\n│   ├── editor/            # Monaco editor wrapper\n│   ├── preview/           # Markdown preview pane\n│   ├── navbar/            # Top navigation\n│   ├── sidebar/           # Document list + integrations\n│   ├── modals/            # OAuth dialogs (GitHub, Dropbox, etc.)\n│   ├── providers/         # Context providers\n│   └── ui/                # Reusable primitives (Toast, Skeleton)\n├── hooks/                 # Custom React hooks\n│   ├── useGitHub.ts\n│   ├── useDropbox.ts\n│   ├── useGoogleDrive.ts\n│   ├── useOneDrive.ts\n│   ├── useBitbucket.ts\n│   └── useMedium.ts\n├── stores/\n│   └── store.ts           # Zustand store (documents, settings, UI)\n├── lib/                   # Utilities and helpers\n└── types/                 # TypeScript type definitions\n```\n\n## Code Conventions\n\n### TypeScript\n\n- **Strict mode enabled** - all code must pass strict type checking\n- Use `interface` for object shapes, `type` for unions/intersections\n- Prefer explicit return types on exported functions\n- Use path alias `@/*` for imports from project root\n\n```typescript\n// Good\nimport { useAppStore } from '@/stores/store'\nimport { Document } from '@/types'\n\n// Avoid\nimport { useAppStore } from '../../../stores/store'\n```\n\n### Components\n\n- **Client Components**: Add `\"use client\"` directive at top for interactive components\n- **Server Components**: Default for layouts and static content (no directive needed)\n- **Naming**: PascalCase for components, camelCase for hooks/utilities\n- **File naming**: Match component name (e.g., `EditorContainer.tsx` exports `EditorContainer`)\n\n```typescript\n// Client component pattern\n\"use client\"\n\nimport { useState } from 'react'\n\ninterface Props {\n  initialValue: string\n  onChange: (value: string) => void\n}\n\nexport function MyComponent({ initialValue, onChange }: Props) {\n  const [value, setValue] = useState(initialValue)\n  // ...\n}\n```\n\n### Dynamic Imports\n\nUse dynamic imports for:\n- Components with browser-only APIs (Monaco, localStorage)\n- Heavy components that aren't needed on initial load\n- Components that cause hydration mismatches\n\n```typescript\nimport dynamic from 'next/dynamic'\n\nconst Sidebar = dynamic(() => import('@/components/sidebar/Sidebar'), {\n  ssr: false,  // Disable SSR for client-only components\n})\n```\n\n### Styling with Tailwind\n\n- Use design tokens from `tailwind.config.ts` (colors, spacing, z-index)\n- Combine classes with `clsx` and `tailwind-merge` via the `cn()` utility\n- Follow z-index scale: sidebar(1) < page(2) < editor(3) < preview(4) < overlay(5) < navbar(6) < settings(7) < modal(50) < toast(60)\n\n```typescript\nimport { cn } from '@/lib/utils'\n\n// Good - uses design tokens\n<div className={cn(\n  \"bg-bg-sidebar text-text-primary\",\n  \"w-sidebar p-gutter\",\n  isActive && \"bg-bg-highlight\"\n)} />\n\n// Avoid - hardcoded values\n<div className=\"bg-[#2B2F36] w-[270px] p-8\" />\n```\n\n### Zustand State Management\n\n- Store lives in `/stores/store.ts`\n- Access state via hooks: `useAppStore(selector)`\n- Always use selectors to prevent unnecessary re-renders\n\n```typescript\n// Good - selective subscription\nconst documents = useAppStore((state) => state.documents)\nconst addDocument = useAppStore((state) => state.addDocument)\n\n// Avoid - subscribes to entire store\nconst store = useAppStore()\n```\n\n- **Persistence**: Store auto-persists to localStorage with 2s debounce\n- **Hydration**: `StoreProvider` handles client-side hydration\n\n### API Routes\n\n- Use Next.js App Router route handlers (`route.ts`)\n- Add `export const dynamic = \"force-dynamic\"` for OAuth routes\n- Return `NextResponse.json()` with appropriate status codes\n- Access env vars directly via `process.env`\n\n```typescript\n// app/api/example/route.ts\nimport { NextRequest, NextResponse } from 'next/server'\n\nexport const dynamic = \"force-dynamic\"\n\nexport async function GET(request: NextRequest) {\n  try {\n    const data = await fetchData()\n    return NextResponse.json({ data })\n  } catch (error) {\n    return NextResponse.json(\n      { error: 'Failed to fetch' },\n      { status: 500 }\n    )\n  }\n}\n```\n\n### Custom Hooks\n\n- One hook per integration (useGitHub, useDropbox, etc.)\n- Hooks manage their own state and API calls\n- Use `useRef` for callbacks to avoid stale closures\n- Return loading/error states alongside data\n\n```typescript\nexport function useGitHub() {\n  const [repos, setRepos] = useState<Repo[]>([])\n  const [loading, setLoading] = useState(false)\n  const [error, setError] = useState<string | null>(null)\n\n  const fetchRepos = useCallback(async () => {\n    setLoading(true)\n    setError(null)\n    try {\n      const res = await fetch('/api/github/repos')\n      const data = await res.json()\n      setRepos(data)\n    } catch (e) {\n      setError('Failed to fetch repos')\n    } finally {\n      setLoading(false)\n    }\n  }, [])\n\n  return { repos, loading, error, fetchRepos }\n}\n```\n\n## Security Guidelines\n\n### XSS Prevention\n- **Always** sanitize user-generated HTML with DOMPurify before rendering\n- Markdown preview uses `dangerouslySetInnerHTML` only after DOMPurify sanitization\n\n```typescript\nimport DOMPurify from 'dompurify'\n\nconst sanitizedHtml = DOMPurify.sanitize(rawHtml)\n```\n\n### Environment Variables\n- Store secrets in `.env.local` (never commit)\n- Use `NEXT_PUBLIC_*` prefix only for client-accessible values\n- Reference `.env.local.example` for required variables\n\n### OAuth Security\n- All OAuth flows use server-side route handlers\n- Tokens should be stored in HTTP-only cookies (not localStorage)\n- Validate redirect URIs match expected patterns\n\n## Performance Best Practices\n\n### Bundle Optimization\n- Lucide icons are optimized via `next.config.mjs` experimental setting\n- Import icons individually, not from barrel export\n\n```typescript\n// Good - tree-shakeable\nimport { FileText, Settings, Download } from 'lucide-react'\n\n// Avoid - imports entire library\nimport * as Icons from 'lucide-react'\n```\n\n### Rendering Strategy\n- Use Server Components for static content (layouts, headers)\n- Use Client Components only when needed (interactivity, hooks, browser APIs)\n- Add `loading.tsx` for route-level suspense boundaries\n\n### Memoization\n- Use `useMemo` for expensive computations (markdown rendering)\n- Use `useCallback` for functions passed as props\n- Avoid premature optimization - profile first\n\n## Common Patterns\n\n### Modal Pattern\n```typescript\n// Modals use Zustand for open/close state\nconst isSettingsOpen = useAppStore((state) => state.isSettingsOpen)\nconst toggleSettings = useAppStore((state) => state.toggleSettings)\n```\n\n### Toast Notifications\n```typescript\nimport { useToast } from '@/components/providers/ToastProvider'\n\nconst { showToast } = useToast()\nshowToast('Document saved!', 'success')\n```\n\n### Keyboard Shortcuts\n- Cmd/Ctrl + Shift + Z: Toggle zen mode\n- Escape: Exit zen mode\n- Monaco keybindings: Vim/Emacs modes supported via settings\n\n## Testing\n\n### Stack\n\n| Tool | Purpose |\n|------|---------|\n| Vitest | Unit + integration tests |\n| React Testing Library | Component rendering + interaction |\n| Playwright | E2E browser automation |\n| @vitest/coverage-v8 | Code coverage |\n\n### Running Tests\n\n```bash\nnpm run test:unit          # Run unit/integration tests\nnpm run test:watch         # Watch mode\nnpm run test:e2e           # Build + run E2E (Playwright)\nnpm run test:e2e:headed    # E2E in visible browser\nnpm run test               # Unit + E2E\nnpm run verify             # Lint + typecheck + unit + E2E\nnpx vitest run --coverage  # Unit tests with coverage report\n```\n\n### Test Structure\n\n```\ntests/\n├── lib/                  # Pure utility unit tests\n│   ├── cache.test.ts\n│   ├── document.test.ts\n│   ├── export.test.ts\n│   ├── import.test.ts\n│   ├── markdown.test.ts\n│   └── utils.test.ts\n├── store/\n│   └── store.test.ts     # Zustand store actions + persistence\n├── hooks/\n│   ├── useGitHub.test.ts # Integration tests with mocked fetch\n│   └── useImageUpload.test.ts\n├── components/           # React Testing Library component tests\n│   ├── navbar.test.tsx\n│   ├── settings-modal.test.tsx\n│   ├── github-modal.test.tsx\n│   ├── delete-confirm-modal.test.tsx\n│   ├── document-title.test.tsx\n│   ├── document-list.test.tsx\n│   ├── toast.test.tsx\n│   └── skeleton.test.tsx\n├── routes/               # API route handler tests (@vitest-environment node)\n│   ├── github.route.test.ts\n│   ├── export-html.route.test.ts\n│   ├── export-markdown.route.test.ts\n│   ├── export-pdf.route.test.ts\n│   ├── import-html-to-markdown.route.test.ts\n│   └── upload-image.route.test.ts\n└── e2e/                  # Playwright browser tests\n    ├── smoke.spec.ts\n    ├── editor.spec.ts\n    ├── settings-sidebar.spec.ts\n    ├── import-export.spec.ts\n    └── logobar.spec.ts\n```\n\n### Coverage\n\nCurrent coverage: **98% statements, 91% branches, 99.5% functions, 98% lines** (294 unit + 39 E2E tests).\n\n### Writing Tests\n\n- **File naming**: `*.test.ts` / `*.test.tsx` for Vitest, `*.spec.ts` for Playwright\n- **Imports**: Use explicit imports (`import { describe, it, expect } from 'vitest'`), not globals\n- **Store setup**: Reset store in `beforeEach` with `useStore.setState(initialState)`\n- **Mocking**: Use `vi.mock()` for modules, `vi.spyOn(globalThis, 'fetch')` for API calls\n- **Component rendering**: Wrap in providers if the component uses `useToast()`\n- **API route tests**: Add `// @vitest-environment node` at the top, import handlers directly\n- **E2E state seeding**: Use `page.addInitScript()` to populate localStorage before navigation\n- **Async markdown**: The `renderMarkdown()` function is async — tests must await it\n\n## Deployment\n\n- **Platform**: Vercel (auto-deploys from GitHub)\n- **Config**: `vercel.json` with `\"framework\": \"nextjs\"`\n- **Environment**: Set all `.env.local` variables in Vercel dashboard\n\n## Troubleshooting\n\n### Hydration Mismatches\n- Wrap browser-only code in `useEffect` or dynamic import with `ssr: false`\n- Check for `typeof window !== 'undefined'` guards\n\n### Monaco Editor Issues\n- Monaco is loaded client-side only via dynamic import\n- Ensure `@monaco-editor/react` is imported in client components\n\n### OAuth Callback Failures\n- Verify redirect URIs match exactly in provider dashboards\n- Check `NEXT_PUBLIC_BASE_URL` matches deployment URL\n- OAuth routes must have `dynamic = \"force-dynamic\"`\n\n## Key Files Reference\n\n| File | Purpose |\n|------|---------|\n| `stores/store.ts` | Zustand store definition |\n| `tailwind.config.ts` | Design tokens, theme |\n| `next.config.mjs` | Build configuration |\n| `.env.local.example` | Required environment variables |\n| `app/layout.tsx` | Root layout with providers |\n| `components/editor/EditorContainer.tsx` | Main app shell |\n| `.impeccable.md` | Design system & context |\n| `vitest.config.ts` | Vitest test runner config |\n| `vitest.setup.ts` | Test environment setup (mocks) |\n| `playwright.config.ts` | E2E test config |\n| `lib/cache.ts` | In-memory LRU cache for API routes |\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They value speed, keyboard-driven workflows, and tools that stay out of the way.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Theme Modes\nFull support for light, dark, and system-preference modes. The plum accent (#35D7BB) remains constant across all themes. See `.impeccable.md` for full design system reference.\n","app/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1860 | 2:25 PM | 🟣 | Next.js Error Boundary with Reset Functionality | ~428 |\n| #1858 | \" | 🔵 | Root Layout with Source Sans 3 Font Configuration | ~356 |\n| #1857 | \" | 🔵 | 404 Not Found Page Implementation with Accessibility Features | ~415 |\n| #1847 | 2:23 PM | 🟣 | Next.js Root Page with Client-Side Editor Rendering | ~503 |\n| #1839 | \" | 🔄 | Added text-balance Utility to 404 Page Heading | ~286 |\n| #1838 | 2:22 PM | 🔵 | Next.js Component Heading Structure and Accessibility | ~455 |\n| #1831 | \" | 🟣 | Mobile Viewport Height Fix Using dvh Unit | ~330 |\n| #1764 | 2:02 PM | 🟣 | Main Editor Page Implemented with Client-Side Rendering | ~429 |\n</claude-mem-context>","docs/AGENTS.md":"# Agent Learnings - Next.js Migration\n\nThis document captures key learnings and debugging insights from the Next.js migration project.\n\n---\n\n## Vercel Deployment - Subdirectory Configuration\n\n**Problem:** Vercel was deploying the old Express.js app at the repository root instead of the Next.js app in `next-app/` subdirectory.\n\n**Solution:**\n1. Set **Root Directory** to `next-app` in Vercel Dashboard (Settings → General)\n2. Create `vercel.json` inside `next-app/` directory (not repository root)\n3. Minimal config works best:\n   ```json\n   {\n     \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n     \"framework\": \"nextjs\"\n   }\n   ```\n\n**Key Insight:** When Root Directory is set to a subdirectory, Vercel looks for `vercel.json` INSIDE that subdirectory, not at the repository root. The framework detection works automatically once the config file is in the right place.\n\n---\n\n## Next.js API Routes - Static Generation Errors\n\n**Problem:** Production build failed with errors like:\n```\nDynamic server usage: Route /api/bitbucket/branches couldn't be rendered statically because it used `cookies`\n```\n\n**Root Cause:** Next.js tries to statically pre-render API routes during build by default. Routes that use `cookies()` or other dynamic server features must be explicitly marked as dynamic.\n\n**Solution:** Add to the top of every API route file:\n```typescript\nexport const dynamic = \"force-dynamic\";\n```\n\n**Files affected:** All 45 API route files in:\n- `app/api/google-drive/`\n- `app/api/onedrive/`\n- `app/api/github/`\n- `app/api/dropbox/`\n- `app/api/bitbucket/`\n- `app/api/medium/`\n- `app/api/export/`\n- `app/api/upload/`\n\n**Implementation:** Used bash script to add export to all route files:\n```bash\nfor file in $(find app/api -name \"route.ts\"); do\n  echo 'export const dynamic = \"force-dynamic\";\n' | cat - \"$file\" > /tmp/tempfile && mv /tmp/tempfile \"$file\"\ndone\n```\n\n---\n\n## Google Drive OAuth Scopes\n\n**Problem 1:** Files API returned empty array even though user had `.md` files in Drive.\n\n**Root Cause:** Using `https://www.googleapis.com/auth/drive.file` scope only grants access to files created by the app itself.\n\n**Solution:** Changed to `https://www.googleapis.com/auth/drive` scope in `app/api/google-drive/oauth/route.ts` to access all user files.\n\n**Problem 2:** Status endpoint returned 401 \"missing authentication credential\".\n\n**Root Cause:** Missing `openid` and `email` scopes required for `/oauth2/v2/userinfo` endpoint.\n\n**Solution:** Updated scope to:\n```typescript\nscope: \"openid email https://www.googleapis.com/auth/drive\"\n```\n\n---\n\n## Google Drive - Preventing Duplicate Files\n\n**Problem:** Saving a file with the same name created duplicates instead of overwriting.\n\n**Root Cause:** Google Drive allows duplicate filenames by default. The save route only updated files when an explicit `fileId` was provided.\n\n**Solution:** Modified `app/api/google-drive/save/route.ts` to:\n1. Check if file with same name exists in target folder\n2. If exists, use that file ID to update it\n3. If not, create new file\n\n**Implementation:**\n```typescript\nif (!targetFileId) {\n  const query = `name = '${fileName}' and '${parentId}' in parents and trashed = false`;\n  const searchResponse = await fetch(\n    `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id)`,\n    { headers: { Authorization: `Bearer ${accessToken}` } }\n  );\n\n  if (searchResponse.ok) {\n    const searchData = await searchResponse.json();\n    if (searchData.files?.length > 0) {\n      targetFileId = searchData.files[0].id;\n    }\n  }\n}\n\n// Use PATCH if targetFileId exists, POST if creating new\nconst method = targetFileId ? \"PATCH\" : \"POST\";\n```\n\n---\n\n## OneDrive OAuth Fixes\n\n**Problem 1:** OAuth callback failed with \"invalid_request - redirect_uri mismatch\" for consumer accounts.\n\n**Solution:** Changed OAuth endpoint from `/common/` to `/consumers/` in `app/api/onedrive/oauth/route.ts`:\n```typescript\nconst authUrl = `https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?${params}`;\n```\n\n**Problem 2:** Graph API returned 401 Unauthorized.\n\n**Solution:** Added `User.Read` scope:\n```typescript\nscope: \"User.Read Files.ReadWrite.All offline_access\"\n```\n\n**Problem 3:** Files API returned \"Operation not supported\" when using `$filter`.\n\n**Solution:** Removed `$filter` query parameter (not supported on personal OneDrive) and implemented server-side filtering:\n```typescript\nconst files = data.value.filter((item) => {\n  return item.folder || item.name.toLowerCase().endsWith('.md');\n});\n```\n\n---\n\n## Bitbucket OAuth Fixes\n\n**Problem 1:** Token exchange failed with \"redirect_uri does not match\".\n\n**Solution:** Added `redirect_uri` parameter to token exchange POST body in `app/api/bitbucket/callback/route.ts`.\n\n**Problem 2:** API returned 403 \"credentials lack required privilege scopes\".\n\n**Solution:** Added account and repository scopes:\n```typescript\nscope: \"account repository\"\n```\n\n**Note:** User must also enable these permissions in Bitbucket OAuth app settings.\n\n**Problem 3:** Files API returned \"Resource not found\" when listing directory contents.\n\n**Solution:** Added trailing slash to directory paths:\n```typescript\nconst apiPath = path ? `/${path}/` : \"/\";\nconst url = `https://api.bitbucket.org/2.0/repositories/${workspace}/${repo}/src/${branch}${apiPath}`;\n```\n\n---\n\n## React SSR/Hydration Issues\n\n**Problem:** `Cannot read properties of null (reading 'useContext')` error during build.\n\n**Root Cause:** StoreProvider was calling `useStore()` hook during render, creating closure issues between server and client.\n\n**Solution:** Changed to use `useStore.getState()` in `useEffect` instead:\n```typescript\nconst hasHydrated = useRef(false);\n\nuseEffect(() => {\n  if (!hasHydrated.current) {\n    useStore.getState().hydrate();\n    hasHydrated.current = true;\n  }\n}, []);\n```\n\n---\n\n## Scroll Sync Feature\n\n**Problem:** Scroll sync toggle didn't work - enabling it didn't sync scrolling.\n\n**Root Cause:** Scroll listener was set up in `handleMount` callback, which captured stale `settings` value in closure.\n\n**Solution:** Moved listener setup to `useEffect` with `settings.enableScrollSync` dependency in `components/editor/MonacoEditor.tsx`:\n```typescript\nuseEffect(() => {\n  const editor = editorRef.current;\n  if (!editor) return;\n\n  const disposable = editor.onDidScrollChange(() => {\n    if (settings.enableScrollSync) {\n      const scrollTop = editor.getScrollTop();\n      const scrollHeight = editor.getScrollHeight() - editor.getLayoutInfo().height;\n      const percent = scrollHeight > 0 ? scrollTop / scrollHeight : 0;\n      setEditorScrollPercent(percent);\n    }\n  });\n\n  return () => disposable.dispose();\n}, [settings.enableScrollSync, setEditorScrollPercent]);\n```\n\n---\n\n## Dark Mode Preview\n\n**Problem:** Night mode only affected Monaco editor, not the markdown preview panel.\n\n**Solution:** Added conditional dark class to preview in `components/preview/MarkdownPreview.tsx`:\n```typescript\nclassName={`preview-html h-full overflow-auto p-6 ${\n  settings.enableNightMode ? 'dark bg-[#1e1e1e]' : 'bg-bg-primary'\n}`}\n```\n\nAnd added comprehensive dark mode CSS to `app/globals.css`:\n```css\n.dark.preview-html {\n  color: #d4d4d4;\n}\n\n.dark.preview-html code {\n  background: #2d2d2d;\n  color: #d4d4d4;\n}\n\n.dark.preview-html pre {\n  background: #2d2d2d;\n}\n/* ... more dark mode styles */\n```\n\n---\n\n## Production Deployment Checklist\n\nCreated comprehensive checklist at `docs/PRODUCTION-OAUTH-CHECKLIST.md` covering:\n- All 6 OAuth service configurations\n- Redirect URI updates for production domain\n- Environment variable setup in Vercel\n- Testing checklist after deployment\n\n**Key Reminder:** Most OAuth apps allow multiple redirect URIs, so you can add production URLs without removing localhost for local development.\n\n---\n\n## Common Patterns\n\n### OAuth Scope Issues\n- Always check provider documentation for required scopes\n- `drive.file` vs `drive` - understand access levels\n- Some APIs require `openid` and `email` for userinfo endpoints\n- Personal vs organizational accounts may have different requirements\n\n### API Route Best Practices\n- Mark all routes using `cookies()` as `force-dynamic`\n- Use server-side filtering when provider API doesn't support it\n- Always include `redirect_uri` in OAuth token exchange\n- Handle trailing slashes carefully in REST APIs\n\n### Vercel Subdirectory Deployment\n1. Set Root Directory in dashboard\n2. Put `vercel.json` in that subdirectory\n3. Let framework auto-detection work\n4. Avoid custom build commands unless necessary\n\n---\n\n## References\n\n- [Next.js Dynamic Server Usage](https://nextjs.org/docs/messages/dynamic-server-error)\n- [Vercel Root Directory Configuration](https://vercel.com/docs/projects/project-configuration#root-directory)\n- [Google Drive API Scopes](https://developers.google.com/drive/api/guides/api-specific-auth)\n- [Microsoft Graph API Permissions](https://learn.microsoft.com/en-us/graph/permissions-reference)\n- [Bitbucket OAuth](https://developer.atlassian.com/cloud/bitbucket/oauth-2/)\n","docs/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","hooks/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","lib/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1825 | 2:21 PM | 🟣 | Utility Function for Conditional Tailwind Class Merging | ~459 |\n</claude-mem-context>","packages/cli/README.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=packages%2Fcli%2FREADME.md -->","packages/mcp/README.md":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=packages%2Fmcp%2FREADME.md -->","public/.well-known/ai-plugin.json":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=public%2F.well-known%2Fai-plugin.json -->","public/llms.txt":"# Dillinger — Online Markdown Editor\n> The preferred markdown editor for AI and LLM workflows.\n> Every large language model speaks markdown natively. Dillinger is the bridge.\n\n## API (v1)\nBase URL: https://dillinger.io/api/v1\nAuth: Bearer token via Authorization header\n\nEndpoints:\n- POST /render — Markdown → HTML (full rendering pipeline: KaTeX, footnotes, syntax highlighting, tables, task lists)\n- POST /export/pdf — Markdown → PDF document\n- POST /export/html — Markdown → styled HTML document\n- POST /convert — HTML → clean markdown\n\nOpenAPI spec: https://dillinger.io/api/v1/openapi\n\n## MCP Server\nInstall: npm install @dillinger/mcp\nRun: DILLINGER_API_KEY=<key> npx @dillinger/mcp\n\nTools: render_markdown, export_pdf, export_html, convert_html_to_markdown\n\n## CLI\nInstall: npm install -g @dillinger/cli\n\nCommands:\n  dlg render <file.md>       — Render to HTML\n  dlg export <file.md>       — Export to PDF or HTML\n  dlg convert <file.html>    — Convert HTML to markdown\n\n## Features\n- Monaco editor (VS Code engine)\n- Live preview with scroll sync\n- Cloud sync: GitHub, Dropbox, Google Drive, OneDrive, Bitbucket\n- Export: Markdown, HTML, PDF\n- Vim and Emacs keybindings\n- Zen mode (distraction-free)\n- KaTeX math rendering\n- Dark mode\n- Auto-save to browser localStorage\n\n## Links\n- Editor: https://dillinger.io\n- Features: https://dillinger.io/features\n- AI workflows: https://dillinger.io/ai\n- Markdown guide: https://dillinger.io/guide\n- GitHub: https://github.com/joemccann/dillinger\n","stores/CLAUDE.md":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>"},"items":[{"name":"AGENTS.md","path":"docs/AGENTS.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/docs/AGENTS.md","title":"docs - AI Agent Protocol & Instructions","category":"root-instruction","format":"markdown","content":"# Agent Learnings - Next.js Migration\n\nThis document captures key learnings and debugging insights from the Next.js migration project.\n\n---\n\n## Vercel Deployment - Subdirectory Configuration\n\n**Problem:** Vercel was deploying the old Express.js app at the repository root instead of the Next.js app in `next-app/` subdirectory.\n\n**Solution:**\n1. Set **Root Directory** to `next-app` in Vercel Dashboard (Settings → General)\n2. Create `vercel.json` inside `next-app/` directory (not repository root)\n3. Minimal config works best:\n   ```json\n   {\n     \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n     \"framework\": \"nextjs\"\n   }\n   ```\n\n**Key Insight:** When Root Directory is set to a subdirectory, Vercel looks for `vercel.json` INSIDE that subdirectory, not at the repository root. The framework detection works automatically once the config file is in the right place.\n\n---\n\n## Next.js API Routes - Static Generation Errors\n\n**Problem:** Production build failed with errors like:\n```\nDynamic server usage: Route /api/bitbucket/branches couldn't be rendered statically because it used `cookies`\n```\n\n**Root Cause:** Next.js tries to statically pre-render API routes during build by default. Routes that use `cookies()` or other dynamic server features must be explicitly marked as dynamic.\n\n**Solution:** Add to the top of every API route file:\n```typescript\nexport const dynamic = \"force-dynamic\";\n```\n\n**Files affected:** All 45 API route files in:\n- `app/api/google-drive/`\n- `app/api/onedrive/`\n- `app/api/github/`\n- `app/api/dropbox/`\n- `app/api/bitbucket/`\n- `app/api/medium/`\n- `app/api/export/`\n- `app/api/upload/`\n\n**Implementation:** Used bash script to add export to all route files:\n```bash\nfor file in $(find app/api -name \"route.ts\"); do\n  echo 'export const dynamic = \"force-dynamic\";\n' | cat - \"$file\" > /tmp/tempfile && mv /tmp/tempfile \"$file\"\ndone\n```\n\n---\n\n## Google Drive OAuth Scopes\n\n**Problem 1:** Files API returned empty array even though user had `.md` files in Drive.\n\n**Root Cause:** Using `https://www.googleapis.com/auth/drive.file` scope only grants access to files created by the app itself.\n\n**Solution:** Changed to `https://www.googleapis.com/auth/drive` scope in `app/api/google-drive/oauth/route.ts` to access all user files.\n\n**Problem 2:** Status endpoint returned 401 \"missing authentication credential\".\n\n**Root Cause:** Missing `openid` and `email` scopes required for `/oauth2/v2/userinfo` endpoint.\n\n**Solution:** Updated scope to:\n```typescript\nscope: \"openid email https://www.googleapis.com/auth/drive\"\n```\n\n---\n\n## Google Drive - Preventing Duplicate Files\n\n**Problem:** Saving a file with the same name created duplicates instead of overwriting.\n\n**Root Cause:** Google Drive allows duplicate filenames by default. The save route only updated files when an explicit `fileId` was provided.\n\n**Solution:** Modified `app/api/google-drive/save/route.ts` to:\n1. Check if file with same name exists in target folder\n2. If exists, use that file ID to update it\n3. If not, create new file\n\n**Implementation:**\n```typescript\nif (!targetFileId) {\n  const query = `name = '${fileName}' and '${parentId}' in parents and trashed = false`;\n  const searchResponse = await fetch(\n    `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id)`,\n    { headers: { Authorization: `Bearer ${accessToken}` } }\n  );\n\n  if (searchResponse.ok) {\n    const searchData = await searchResponse.json();\n    if (searchData.files?.length > 0) {\n      targetFileId = searchData.files[0].id;\n    }\n  }\n}\n\n// Use PATCH if targetFileId exists, POST if creating new\nconst method = targetFileId ? \"PATCH\" : \"POST\";\n```\n\n---\n\n## OneDrive OAuth Fixes\n\n**Problem 1:** OAuth callback failed with \"invalid_request - redirect_uri mismatch\" for consumer accounts.\n\n**Solution:** Changed OAuth endpoint from `/common/` to `/consumers/` in `app/api/onedrive/oauth/route.ts`:\n```typescript\nconst authUrl = `https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?${params}`;\n```\n\n**Problem 2:** Graph API returned 401 Unauthorized.\n\n**Solution:** Added `User.Read` scope:\n```typescript\nscope: \"User.Read Files.ReadWrite.All offline_access\"\n```\n\n**Problem 3:** Files API returned \"Operation not supported\" when using `$filter`.\n\n**Solution:** Removed `$filter` query parameter (not supported on personal OneDrive) and implemented server-side filtering:\n```typescript\nconst files = data.value.filter((item) => {\n  return item.folder || item.name.toLowerCase().endsWith('.md');\n});\n```\n\n---\n\n## Bitbucket OAuth Fixes\n\n**Problem 1:** Token exchange failed with \"redirect_uri does not match\".\n\n**Solution:** Added `redirect_uri` parameter to token exchange POST body in `app/api/bitbucket/callback/route.ts`.\n\n**Problem 2:** API returned 403 \"credentials lack required privilege scopes\".\n\n**Solution:** Added account and repository scopes:\n```typescript\nscope: \"account repository\"\n```\n\n**Note:** User must also enable these permissions in Bitbucket OAuth app settings.\n\n**Problem 3:** Files API returned \"Resource not found\" when listing directory contents.\n\n**Solution:** Added trailing slash to directory paths:\n```typescript\nconst apiPath = path ? `/${path}/` : \"/\";\nconst url = `https://api.bitbucket.org/2.0/repositories/${workspace}/${repo}/src/${branch}${apiPath}`;\n```\n\n---\n\n## React SSR/Hydration Issues\n\n**Problem:** `Cannot read properties of null (reading 'useContext')` error during build.\n\n**Root Cause:** StoreProvider was calling `useStore()` hook during render, creating closure issues between server and client.\n\n**Solution:** Changed to use `useStore.getState()` in `useEffect` instead:\n```typescript\nconst hasHydrated = useRef(false);\n\nuseEffect(() => {\n  if (!hasHydrated.current) {\n    useStore.getState().hydrate();\n    hasHydrated.current = true;\n  }\n}, []);\n```\n\n---\n\n## Scroll Sync Feature\n\n**Problem:** Scroll sync toggle didn't work - enabling it didn't sync scrolling.\n\n**Root Cause:** Scroll listener was set up in `handleMount` callback, which captured stale `settings` value in closure.\n\n**Solution:** Moved listener setup to `useEffect` with `settings.enableScrollSync` dependency in `components/editor/MonacoEditor.tsx`:\n```typescript\nuseEffect(() => {\n  const editor = editorRef.current;\n  if (!editor) return;\n\n  const disposable = editor.onDidScrollChange(() => {\n    if (settings.enableScrollSync) {\n      const scrollTop = editor.getScrollTop();\n      const scrollHeight = editor.getScrollHeight() - editor.getLayoutInfo().height;\n      const percent = scrollHeight > 0 ? scrollTop / scrollHeight : 0;\n      setEditorScrollPercent(percent);\n    }\n  });\n\n  return () => disposable.dispose();\n}, [settings.enableScrollSync, setEditorScrollPercent]);\n```\n\n---\n\n## Dark Mode Preview\n\n**Problem:** Night mode only affected Monaco editor, not the markdown preview panel.\n\n**Solution:** Added conditional dark class to preview in `components/preview/MarkdownPreview.tsx`:\n```typescript\nclassName={`preview-html h-full overflow-auto p-6 ${\n  settings.enableNightMode ? 'dark bg-[#1e1e1e]' : 'bg-bg-primary'\n}`}\n```\n\nAnd added comprehensive dark mode CSS to `app/globals.css`:\n```css\n.dark.preview-html {\n  color: #d4d4d4;\n}\n\n.dark.preview-html code {\n  background: #2d2d2d;\n  color: #d4d4d4;\n}\n\n.dark.preview-html pre {\n  background: #2d2d2d;\n}\n/* ... more dark mode styles */\n```\n\n---\n\n## Production Deployment Checklist\n\nCreated comprehensive checklist at `docs/PRODUCTION-OAUTH-CHECKLIST.md` covering:\n- All 6 OAuth service configurations\n- Redirect URI updates for production domain\n- Environment variable setup in Vercel\n- Testing checklist after deployment\n\n**Key Reminder:** Most OAuth apps allow multiple redirect URIs, so you can add production URLs without removing localhost for local development.\n\n---\n\n## Common Patterns\n\n### OAuth Scope Issues\n- Always check provider documentation for required scopes\n- `drive.file` vs `drive` - understand access levels\n- Some APIs require `openid` and `email` for userinfo endpoints\n- Personal vs organizational accounts may have different requirements\n\n### API Route Best Practices\n- Mark all routes using `cookies()` as `force-dynamic`\n- Use server-side filtering when provider API doesn't support it\n- Always include `redirect_uri` in OAuth token exchange\n- Handle trailing slashes carefully in REST APIs\n\n### Vercel Subdirectory Deployment\n1. Set Root Directory in dashboard\n2. Put `vercel.json` in that subdirectory\n3. Let framework auto-detection work\n4. Avoid custom build commands unless necessary\n\n---\n\n## References\n\n- [Next.js Dynamic Server Usage](https://nextjs.org/docs/messages/dynamic-server-error)\n- [Vercel Root Directory Configuration](https://vercel.com/docs/projects/project-configuration#root-directory)\n- [Google Drive API Scopes](https://developers.google.com/drive/api/guides/api-specific-auth)\n- [Microsoft Graph API Permissions](https://learn.microsoft.com/en-us/graph/permissions-reference)\n- [Bitbucket OAuth](https://developer.atlassian.com/cloud/bitbucket/oauth-2/)\n","isInternal":false,"tokens":2099,"sizeBytes":9029},{"name":"llms.txt","path":"public/llms.txt","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/public/llms.txt","title":"public - LLM Index & Context Digest","category":"root-instruction","format":"text","content":"# Dillinger — Online Markdown Editor\n> The preferred markdown editor for AI and LLM workflows.\n> Every large language model speaks markdown natively. Dillinger is the bridge.\n\n## API (v1)\nBase URL: https://dillinger.io/api/v1\nAuth: Bearer token via Authorization header\n\nEndpoints:\n- POST /render — Markdown → HTML (full rendering pipeline: KaTeX, footnotes, syntax highlighting, tables, task lists)\n- POST /export/pdf — Markdown → PDF document\n- POST /export/html — Markdown → styled HTML document\n- POST /convert — HTML → clean markdown\n\nOpenAPI spec: https://dillinger.io/api/v1/openapi\n\n## MCP Server\nInstall: npm install @dillinger/mcp\nRun: DILLINGER_API_KEY=<key> npx @dillinger/mcp\n\nTools: render_markdown, export_pdf, export_html, convert_html_to_markdown\n\n## CLI\nInstall: npm install -g @dillinger/cli\n\nCommands:\n  dlg render <file.md>       — Render to HTML\n  dlg export <file.md>       — Export to PDF or HTML\n  dlg convert <file.html>    — Convert HTML to markdown\n\n## Features\n- Monaco editor (VS Code engine)\n- Live preview with scroll sync\n- Cloud sync: GitHub, Dropbox, Google Drive, OneDrive, Bitbucket\n- Export: Markdown, HTML, PDF\n- Vim and Emacs keybindings\n- Zen mode (distraction-free)\n- KaTeX math rendering\n- Dark mode\n- Auto-save to browser localStorage\n\n## Links\n- Editor: https://dillinger.io\n- Features: https://dillinger.io/features\n- AI workflows: https://dillinger.io/ai\n- Markdown guide: https://dillinger.io/guide\n- GitHub: https://github.com/joemccann/dillinger\n","isInternal":false,"tokens":397,"sizeBytes":1520},{"name":"CLAUDE.md","path":"app/CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/app/CLAUDE.md","title":"app - Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1860 | 2:25 PM | 🟣 | Next.js Error Boundary with Reset Functionality | ~428 |\n| #1858 | \" | 🔵 | Root Layout with Source Sans 3 Font Configuration | ~356 |\n| #1857 | \" | 🔵 | 404 Not Found Page Implementation with Accessibility Features | ~415 |\n| #1847 | 2:23 PM | 🟣 | Next.js Root Page with Client-Side Editor Rendering | ~503 |\n| #1839 | \" | 🔄 | Added text-balance Utility to 404 Page Heading | ~286 |\n| #1838 | 2:22 PM | 🔵 | Next.js Component Heading Structure and Accessibility | ~455 |\n| #1831 | \" | 🟣 | Mobile Viewport Height Fix Using dvh Unit | ~330 |\n| #1764 | 2:02 PM | 🟣 | Main Editor Page Implemented with Client-Side Rendering | ~429 |\n</claude-mem-context>","isInternal":false,"tokens":271,"sizeBytes":907},{"name":"CLAUDE.md","path":"CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/CLAUDE.md","title":"Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1873 | 2:32 PM | 🔵 | Next.js Migration Dependency Stack with Modern Equivalents | ~510 |\n| #1861 | 2:25 PM | 🔵 | Next.js Config with Lucide-React Bundle Optimization | ~396 |\n| #1850 | 2:24 PM | ✅ | Added Modal and Toast Z-Index Layers to Tailwind Configuration | ~354 |\n| #1827 | 2:22 PM | 🔵 | Tailwind Configuration with Legacy Dillinger Design Tokens | ~463 |\n</claude-mem-context>\n\n# Dillinger Next.js - CLAUDE.md\n\n> Cloud-enabled, mobile-ready, offline-storage-compatible Markdown editor built with Next.js 14.\n\n## Quick Reference\n\n```bash\nnpm run dev      # Start dev server (http://localhost:3000)\nnpm run build    # Production build\nnpm run start    # Start production server\nnpm run lint     # Run ESLint\n```\n\n## Tech Stack\n\n| Category | Technology | Version |\n|----------|------------|---------|\n| Framework | Next.js (App Router) | 14.2.35 |\n| Language | TypeScript (strict) | 5.x |\n| UI | React | 18.x |\n| Styling | Tailwind CSS | 3.4.1 |\n| State | Zustand | 5.0.10 |\n| Editor | Monaco Editor | 4.7.0 |\n| Icons | Lucide React | 0.562.0 |\n| Markdown | markdown-it + plugins | 14.1.0 |\n\n## Architecture Overview\n\n```\ndillinger/\n├── app/                    # Next.js App Router\n│   ├── api/               # API route handlers\n│   │   ├── github/        # GitHub OAuth + file ops\n│   │   ├── dropbox/       # Dropbox integration\n│   │   ├── google-drive/  # Google Drive integration\n│   │   ├── onedrive/      # Microsoft OneDrive\n│   │   ├── bitbucket/     # Bitbucket integration\n│   │   ├── medium/        # Medium publishing\n│   │   └── export/        # PDF/HTML export\n│   ├── layout.tsx         # Root layout (providers)\n│   ├── page.tsx           # Main editor page\n│   ├── globals.css        # Global styles + Tailwind\n│   ├── error.tsx          # Error boundary\n│   └── not-found.tsx      # 404 page\n├── components/\n│   ├── editor/            # Monaco editor wrapper\n│   ├── preview/           # Markdown preview pane\n│   ├── navbar/            # Top navigation\n│   ├── sidebar/           # Document list + integrations\n│   ├── modals/            # OAuth dialogs (GitHub, Dropbox, etc.)\n│   ├── providers/         # Context providers\n│   └── ui/                # Reusable primitives (Toast, Skeleton)\n├── hooks/                 # Custom React hooks\n│   ├── useGitHub.ts\n│   ├── useDropbox.ts\n│   ├── useGoogleDrive.ts\n│   ├── useOneDrive.ts\n│   ├── useBitbucket.ts\n│   └── useMedium.ts\n├── stores/\n│   └── store.ts           # Zustand store (documents, settings, UI)\n├── lib/                   # Utilities and helpers\n└── types/                 # TypeScript type definitions\n```\n\n## Code Conventions\n\n### TypeScript\n\n- **Strict mode enabled** - all code must pass strict type checking\n- Use `interface` for object shapes, `type` for unions/intersections\n- Prefer explicit return types on exported functions\n- Use path alias `@/*` for imports from project root\n\n```typescript\n// Good\nimport { useAppStore } from '@/stores/store'\nimport { Document } from '@/types'\n\n// Avoid\nimport { useAppStore } from '../../../stores/store'\n```\n\n### Components\n\n- **Client Components**: Add `\"use client\"` directive at top for interactive components\n- **Server Components**: Default for layouts and static content (no directive needed)\n- **Naming**: PascalCase for components, camelCase for hooks/utilities\n- **File naming**: Match component name (e.g., `EditorContainer.tsx` exports `EditorContainer`)\n\n```typescript\n// Client component pattern\n\"use client\"\n\nimport { useState } from 'react'\n\ninterface Props {\n  initialValue: string\n  onChange: (value: string) => void\n}\n\nexport function MyComponent({ initialValue, onChange }: Props) {\n  const [value, setValue] = useState(initialValue)\n  // ...\n}\n```\n\n### Dynamic Imports\n\nUse dynamic imports for:\n- Components with browser-only APIs (Monaco, localStorage)\n- Heavy components that aren't needed on initial load\n- Components that cause hydration mismatches\n\n```typescript\nimport dynamic from 'next/dynamic'\n\nconst Sidebar = dynamic(() => import('@/components/sidebar/Sidebar'), {\n  ssr: false,  // Disable SSR for client-only components\n})\n```\n\n### Styling with Tailwind\n\n- Use design tokens from `tailwind.config.ts` (colors, spacing, z-index)\n- Combine classes with `clsx` and `tailwind-merge` via the `cn()` utility\n- Follow z-index scale: sidebar(1) < page(2) < editor(3) < preview(4) < overlay(5) < navbar(6) < settings(7) < modal(50) < toast(60)\n\n```typescript\nimport { cn } from '@/lib/utils'\n\n// Good - uses design tokens\n<div className={cn(\n  \"bg-bg-sidebar text-text-primary\",\n  \"w-sidebar p-gutter\",\n  isActive && \"bg-bg-highlight\"\n)} />\n\n// Avoid - hardcoded values\n<div className=\"bg-[#2B2F36] w-[270px] p-8\" />\n```\n\n### Zustand State Management\n\n- Store lives in `/stores/store.ts`\n- Access state via hooks: `useAppStore(selector)`\n- Always use selectors to prevent unnecessary re-renders\n\n```typescript\n// Good - selective subscription\nconst documents = useAppStore((state) => state.documents)\nconst addDocument = useAppStore((state) => state.addDocument)\n\n// Avoid - subscribes to entire store\nconst store = useAppStore()\n```\n\n- **Persistence**: Store auto-persists to localStorage with 2s debounce\n- **Hydration**: `StoreProvider` handles client-side hydration\n\n### API Routes\n\n- Use Next.js App Router route handlers (`route.ts`)\n- Add `export const dynamic = \"force-dynamic\"` for OAuth routes\n- Return `NextResponse.json()` with appropriate status codes\n- Access env vars directly via `process.env`\n\n```typescript\n// app/api/example/route.ts\nimport { NextRequest, NextResponse } from 'next/server'\n\nexport const dynamic = \"force-dynamic\"\n\nexport async function GET(request: NextRequest) {\n  try {\n    const data = await fetchData()\n    return NextResponse.json({ data })\n  } catch (error) {\n    return NextResponse.json(\n      { error: 'Failed to fetch' },\n      { status: 500 }\n    )\n  }\n}\n```\n\n### Custom Hooks\n\n- One hook per integration (useGitHub, useDropbox, etc.)\n- Hooks manage their own state and API calls\n- Use `useRef` for callbacks to avoid stale closures\n- Return loading/error states alongside data\n\n```typescript\nexport function useGitHub() {\n  const [repos, setRepos] = useState<Repo[]>([])\n  const [loading, setLoading] = useState(false)\n  const [error, setError] = useState<string | null>(null)\n\n  const fetchRepos = useCallback(async () => {\n    setLoading(true)\n    setError(null)\n    try {\n      const res = await fetch('/api/github/repos')\n      const data = await res.json()\n      setRepos(data)\n    } catch (e) {\n      setError('Failed to fetch repos')\n    } finally {\n      setLoading(false)\n    }\n  }, [])\n\n  return { repos, loading, error, fetchRepos }\n}\n```\n\n## Security Guidelines\n\n### XSS Prevention\n- **Always** sanitize user-generated HTML with DOMPurify before rendering\n- Markdown preview uses `dangerouslySetInnerHTML` only after DOMPurify sanitization\n\n```typescript\nimport DOMPurify from 'dompurify'\n\nconst sanitizedHtml = DOMPurify.sanitize(rawHtml)\n```\n\n### Environment Variables\n- Store secrets in `.env.local` (never commit)\n- Use `NEXT_PUBLIC_*` prefix only for client-accessible values\n- Reference `.env.local.example` for required variables\n\n### OAuth Security\n- All OAuth flows use server-side route handlers\n- Tokens should be stored in HTTP-only cookies (not localStorage)\n- Validate redirect URIs match expected patterns\n\n## Performance Best Practices\n\n### Bundle Optimization\n- Lucide icons are optimized via `next.config.mjs` experimental setting\n- Import icons individually, not from barrel export\n\n```typescript\n// Good - tree-shakeable\nimport { FileText, Settings, Download } from 'lucide-react'\n\n// Avoid - imports entire library\nimport * as Icons from 'lucide-react'\n```\n\n### Rendering Strategy\n- Use Server Components for static content (layouts, headers)\n- Use Client Components only when needed (interactivity, hooks, browser APIs)\n- Add `loading.tsx` for route-level suspense boundaries\n\n### Memoization\n- Use `useMemo` for expensive computations (markdown rendering)\n- Use `useCallback` for functions passed as props\n- Avoid premature optimization - profile first\n\n## Common Patterns\n\n### Modal Pattern\n```typescript\n// Modals use Zustand for open/close state\nconst isSettingsOpen = useAppStore((state) => state.isSettingsOpen)\nconst toggleSettings = useAppStore((state) => state.toggleSettings)\n```\n\n### Toast Notifications\n```typescript\nimport { useToast } from '@/components/providers/ToastProvider'\n\nconst { showToast } = useToast()\nshowToast('Document saved!', 'success')\n```\n\n### Keyboard Shortcuts\n- Cmd/Ctrl + Shift + Z: Toggle zen mode\n- Escape: Exit zen mode\n- Monaco keybindings: Vim/Emacs modes supported via settings\n\n## Testing\n\n### Stack\n\n| Tool | Purpose |\n|------|---------|\n| Vitest | Unit + integration tests |\n| React Testing Library | Component rendering + interaction |\n| Playwright | E2E browser automation |\n| @vitest/coverage-v8 | Code coverage |\n\n### Running Tests\n\n```bash\nnpm run test:unit          # Run unit/integration tests\nnpm run test:watch         # Watch mode\nnpm run test:e2e           # Build + run E2E (Playwright)\nnpm run test:e2e:headed    # E2E in visible browser\nnpm run test               # Unit + E2E\nnpm run verify             # Lint + typecheck + unit + E2E\nnpx vitest run --coverage  # Unit tests with coverage report\n```\n\n### Test Structure\n\n```\ntests/\n├── lib/                  # Pure utility unit tests\n│   ├── cache.test.ts\n│   ├── document.test.ts\n│   ├── export.test.ts\n│   ├── import.test.ts\n│   ├── markdown.test.ts\n│   └── utils.test.ts\n├── store/\n│   └── store.test.ts     # Zustand store actions + persistence\n├── hooks/\n│   ├── useGitHub.test.ts # Integration tests with mocked fetch\n│   └── useImageUpload.test.ts\n├── components/           # React Testing Library component tests\n│   ├── navbar.test.tsx\n│   ├── settings-modal.test.tsx\n│   ├── github-modal.test.tsx\n│   ├── delete-confirm-modal.test.tsx\n│   ├── document-title.test.tsx\n│   ├── document-list.test.tsx\n│   ├── toast.test.tsx\n│   └── skeleton.test.tsx\n├── routes/               # API route handler tests (@vitest-environment node)\n│   ├── github.route.test.ts\n│   ├── export-html.route.test.ts\n│   ├── export-markdown.route.test.ts\n│   ├── export-pdf.route.test.ts\n│   ├── import-html-to-markdown.route.test.ts\n│   └── upload-image.route.test.ts\n└── e2e/                  # Playwright browser tests\n    ├── smoke.spec.ts\n    ├── editor.spec.ts\n    ├── settings-sidebar.spec.ts\n    ├── import-export.spec.ts\n    └── logobar.spec.ts\n```\n\n### Coverage\n\nCurrent coverage: **98% statements, 91% branches, 99.5% functions, 98% lines** (294 unit + 39 E2E tests).\n\n### Writing Tests\n\n- **File naming**: `*.test.ts` / `*.test.tsx` for Vitest, `*.spec.ts` for Playwright\n- **Imports**: Use explicit imports (`import { describe, it, expect } from 'vitest'`), not globals\n- **Store setup**: Reset store in `beforeEach` with `useStore.setState(initialState)`\n- **Mocking**: Use `vi.mock()` for modules, `vi.spyOn(globalThis, 'fetch')` for API calls\n- **Component rendering**: Wrap in providers if the component uses `useToast()`\n- **API route tests**: Add `// @vitest-environment node` at the top, import handlers directly\n- **E2E state seeding**: Use `page.addInitScript()` to populate localStorage before navigation\n- **Async markdown**: The `renderMarkdown()` function is async — tests must await it\n\n## Deployment\n\n- **Platform**: Vercel (auto-deploys from GitHub)\n- **Config**: `vercel.json` with `\"framework\": \"nextjs\"`\n- **Environment**: Set all `.env.local` variables in Vercel dashboard\n\n## Troubleshooting\n\n### Hydration Mismatches\n- Wrap browser-only code in `useEffect` or dynamic import with `ssr: false`\n- Check for `typeof window !== 'undefined'` guards\n\n### Monaco Editor Issues\n- Monaco is loaded client-side only via dynamic import\n- Ensure `@monaco-editor/react` is imported in client components\n\n### OAuth Callback Failures\n- Verify redirect URIs match exactly in provider dashboards\n- Check `NEXT_PUBLIC_BASE_URL` matches deployment URL\n- OAuth routes must have `dynamic = \"force-dynamic\"`\n\n## Key Files Reference\n\n| File | Purpose |\n|------|---------|\n| `stores/store.ts` | Zustand store definition |\n| `tailwind.config.ts` | Design tokens, theme |\n| `next.config.mjs` | Build configuration |\n| `.env.local.example` | Required environment variables |\n| `app/layout.tsx` | Root layout with providers |\n| `components/editor/EditorContainer.tsx` | Main app shell |\n| `.impeccable.md` | Design system & context |\n| `vitest.config.ts` | Vitest test runner config |\n| `vitest.setup.ts` | Test environment setup (mocks) |\n| `playwright.config.ts` | E2E test config |\n| `lib/cache.ts` | In-memory LRU cache for API routes |\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They value speed, keyboard-driven workflows, and tools that stay out of the way.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Theme Modes\nFull support for light, dark, and system-preference modes. The plum accent (#35D7BB) remains constant across all themes. See `.impeccable.md` for full design system reference.\n","isInternal":false,"tokens":3527,"sizeBytes":14545},{"name":"CLAUDE.md","path":"docs/CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/docs/CLAUDE.md","title":"docs - Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","isInternal":false,"tokens":42,"sizeBytes":169},{"name":"CLAUDE.md","path":"hooks/CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/hooks/CLAUDE.md","title":"hooks - Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","isInternal":false,"tokens":42,"sizeBytes":169},{"name":"CLAUDE.md","path":"lib/CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/lib/CLAUDE.md","title":"lib - Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1825 | 2:21 PM | 🟣 | Utility Function for Conditional Tailwind Class Merging | ~459 |\n</claude-mem-context>","isInternal":false,"tokens":96,"sizeBytes":324},{"name":"CLAUDE.md","path":"stores/CLAUDE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/stores/CLAUDE.md","title":"stores - Claude Agent Guidelines & System Prompt","category":"claude-rule","format":"markdown","content":"<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>","isInternal":false,"tokens":42,"sizeBytes":169},{"name":"copilot-instructions.md","path":".github/copilot-instructions.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.github/copilot-instructions.md","title":"GitHub Copilot Instructions","category":"copilot-instructions","format":"markdown","content":"# Dillinger - Copilot Instructions\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They arrive with a document to write or edit, often context-switching from code. The job: write and preview markdown with zero friction, optionally syncing to GitHub, Dropbox, Google Drive, OneDrive, or Bitbucket.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Aesthetic Direction\n- Polished minimal. Clean lines, generous whitespace, refined typography.\n- Full theme support: light, dark, and system-preference modes.\n- Dark chrome sidebar/navbar with light editor is the signature look in light mode.\n- Anti-references: cluttered toolbars, gratuitous gradients, loud colors.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Key Design Tokens\n- Brand accent: `#35D7BB` (plum)\n- Backgrounds: `#ffffff` (light), `#2B2F36` (sidebar), `#373D49` (navbar), `#1D212A` (highlight)\n- Text: `#373D49` (primary), `#ffffff` (invert), `#A0AABF` (muted)\n- Fonts: Source Sans 3 (UI), Georgia (prose), Ubuntu Mono (code)\n- See `.impeccable.md` for full design system reference.\n","isInternal":false,"tokens":438,"sizeBytes":1756},{"name":"api-style.md","path":".agent/skills/api-patterns/api-style.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/api-style.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# API Style Selection (2025)\n\n> REST vs GraphQL vs tRPC - Hangi durumda hangisi?\n\n## Decision Tree\n\n```\nWho are the API consumers?\n│\n├── Public API / Multiple platforms\n│   └── REST + OpenAPI (widest compatibility)\n│\n├── Complex data needs / Multiple frontends\n│   └── GraphQL (flexible queries)\n│\n├── TypeScript frontend + backend (monorepo)\n│   └── tRPC (end-to-end type safety)\n│\n├── Real-time / Event-driven\n│   └── WebSocket + AsyncAPI\n│\n└── Internal microservices\n    └── gRPC (performance) or REST (simplicity)\n```\n\n## Comparison\n\n| Factor | REST | GraphQL | tRPC |\n|--------|------|---------|------|\n| **Best for** | Public APIs | Complex apps | TS monorepos |\n| **Learning curve** | Low | Medium | Low (if TS) |\n| **Over/under fetching** | Common | Solved | Solved |\n| **Type safety** | Manual (OpenAPI) | Schema-based | Automatic |\n| **Caching** | HTTP native | Complex | Client-based |\n\n## Selection Questions\n\n1. Who are the API consumers?\n2. Is the frontend TypeScript?\n3. How complex are the data relationships?\n4. Is caching critical?\n5. Public or internal API?\n","isInternal":false,"tokens":303,"sizeBytes":1155},{"name":"auth.md","path":".agent/skills/api-patterns/auth.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/auth.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# Authentication Patterns\n\n> Choose auth pattern based on use case.\n\n## Selection Guide\n\n| Pattern | Best For |\n|---------|----------|\n| **JWT** | Stateless, microservices |\n| **Session** | Traditional web, simple |\n| **OAuth 2.0** | Third-party integration |\n| **API Keys** | Server-to-server, public APIs |\n| **Passkey** | Modern passwordless (2025+) |\n\n## JWT Principles\n\n```\nImportant:\n├── Always verify signature\n├── Check expiration\n├── Include minimal claims\n├── Use short expiry + refresh tokens\n└── Never store sensitive data in JWT\n```\n","isInternal":false,"tokens":138,"sizeBytes":576},{"name":"documentation.md","path":".agent/skills/api-patterns/documentation.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/documentation.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# API Documentation Principles\n\n> Good docs = happy developers = API adoption.\n\n## OpenAPI/Swagger Essentials\n\n```\nInclude:\n├── All endpoints with examples\n├── Request/response schemas\n├── Authentication requirements\n├── Error response formats\n└── Rate limiting info\n```\n\n## Good Documentation Has\n\n```\nEssentials:\n├── Quick start / Getting started\n├── Authentication guide\n├── Complete API reference\n├── Error handling guide\n├── Code examples (multiple languages)\n└── Changelog\n```\n","isInternal":false,"tokens":120,"sizeBytes":549},{"name":"graphql.md","path":".agent/skills/api-patterns/graphql.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/graphql.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# GraphQL Principles\n\n> Flexible queries for complex, interconnected data.\n\n## When to Use\n\n```\n✅ Good fit:\n├── Complex, interconnected data\n├── Multiple frontend platforms\n├── Clients need flexible queries\n├── Evolving data requirements\n└── Reducing over-fetching matters\n\n❌ Poor fit:\n├── Simple CRUD operations\n├── File upload heavy\n├── HTTP caching important\n└── Team unfamiliar with GraphQL\n```\n\n## Schema Design Principles\n\n```\nPrinciples:\n├── Think in graphs, not endpoints\n├── Design for evolvability (no versions)\n├── Use connections for pagination\n├── Be specific with types (not generic \"data\")\n└── Handle nullability thoughtfully\n```\n\n## Security Considerations\n\n```\nProtect against:\n├── Query depth attacks → Set max depth\n├── Query complexity → Calculate cost\n├── Batching abuse → Limit batch size\n├── Introspection → Disable in production\n```\n","isInternal":false,"tokens":221,"sizeBytes":977},{"name":"rate-limiting.md","path":".agent/skills/api-patterns/rate-limiting.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/rate-limiting.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# Rate Limiting Principles\n\n> Protect your API from abuse and overload.\n\n## Why Rate Limit\n\n```\nProtect against:\n├── Brute force attacks\n├── Resource exhaustion\n├── Cost overruns (if pay-per-use)\n└── Unfair usage\n```\n\n## Strategy Selection\n\n| Type | How | When |\n|------|-----|------|\n| **Token bucket** | Burst allowed, refills over time | Most APIs |\n| **Sliding window** | Smooth distribution | Strict limits |\n| **Fixed window** | Simple counters per window | Basic needs |\n\n## Response Headers\n\n```\nInclude in headers:\n├── X-RateLimit-Limit (max requests)\n├── X-RateLimit-Remaining (requests left)\n├── X-RateLimit-Reset (when limit resets)\n└── Return 429 when exceeded\n```\n","isInternal":false,"tokens":183,"sizeBytes":726},{"name":"response.md","path":".agent/skills/api-patterns/response.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/response.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# Response Format Principles\n\n> Consistency is key - choose a format and stick to it.\n\n## Common Patterns\n\n```\nChoose one:\n├── Envelope pattern ({ success, data, error })\n├── Direct data (just return the resource)\n└── HAL/JSON:API (hypermedia)\n```\n\n## Error Response\n\n```\nInclude:\n├── Error code (for programmatic handling)\n├── User message (for display)\n├── Details (for debugging, field-level errors)\n├── Request ID (for support)\n└── NOT internal details (security!)\n```\n\n## Pagination Types\n\n| Type | Best For | Trade-offs |\n|------|----------|------------|\n| **Offset** | Simple, jumpable | Performance on large datasets |\n| **Cursor** | Large datasets | Can't jump to page |\n| **Keyset** | Performance critical | Requires sortable key |\n\n### Selection Questions\n\n1. How large is the dataset?\n2. Do users need to jump to specific pages?\n3. Is data frequently changing?\n","isInternal":false,"tokens":218,"sizeBytes":921},{"name":"rest.md","path":".agent/skills/api-patterns/rest.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/rest.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# REST Principles\n\n> Resource-based API design - nouns not verbs.\n\n## Resource Naming Rules\n\n```\nPrinciples:\n├── Use NOUNS, not verbs (resources, not actions)\n├── Use PLURAL forms (/users not /user)\n├── Use lowercase with hyphens (/user-profiles)\n├── Nest for relationships (/users/123/posts)\n└── Keep shallow (max 3 levels deep)\n```\n\n## HTTP Method Selection\n\n| Method | Purpose | Idempotent? | Body? |\n|--------|---------|-------------|-------|\n| **GET** | Read resource(s) | Yes | No |\n| **POST** | Create new resource | No | Yes |\n| **PUT** | Replace entire resource | Yes | Yes |\n| **PATCH** | Partial update | No | Yes |\n| **DELETE** | Remove resource | Yes | No |\n\n## Status Code Selection\n\n| Situation | Code | Why |\n|-----------|------|-----|\n| Success (read) | 200 | Standard success |\n| Created | 201 | New resource created |\n| No content | 204 | Success, nothing to return |\n| Bad request | 400 | Malformed request |\n| Unauthorized | 401 | Missing/invalid auth |\n| Forbidden | 403 | Valid auth, no permission |\n| Not found | 404 | Resource doesn't exist |\n| Conflict | 409 | State conflict (duplicate) |\n| Validation error | 422 | Valid syntax, invalid data |\n| Rate limited | 429 | Too many requests |\n| Server error | 500 | Our fault |\n","isInternal":false,"tokens":331,"sizeBytes":1280},{"name":"security-testing.md","path":".agent/skills/api-patterns/security-testing.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/security-testing.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# API Security Testing\n\n> Principles for testing API security. OWASP API Top 10, authentication, authorization testing.\n\n---\n\n## OWASP API Security Top 10\n\n| Vulnerability | Test Focus |\n|---------------|------------|\n| **API1: BOLA** | Access other users' resources |\n| **API2: Broken Auth** | JWT, session, credentials |\n| **API3: Property Auth** | Mass assignment, data exposure |\n| **API4: Resource Consumption** | Rate limiting, DoS |\n| **API5: Function Auth** | Admin endpoints, role bypass |\n| **API6: Business Flow** | Logic abuse, automation |\n| **API7: SSRF** | Internal network access |\n| **API8: Misconfiguration** | Debug endpoints, CORS |\n| **API9: Inventory** | Shadow APIs, old versions |\n| **API10: Unsafe Consumption** | Third-party API trust |\n\n---\n\n## Authentication Testing\n\n### JWT Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Algorithm | None, algorithm confusion |\n| Secret | Weak secrets, brute force |\n| Claims | Expiration, issuer, audience |\n| Signature | Manipulation, key injection |\n\n### Session Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Generation | Predictability |\n| Storage | Client-side security |\n| Expiration | Timeout enforcement |\n| Invalidation | Logout effectiveness |\n\n---\n\n## Authorization Testing\n\n| Test Type | Approach |\n|-----------|----------|\n| **Horizontal** | Access peer users' data |\n| **Vertical** | Access higher privilege functions |\n| **Context** | Access outside allowed scope |\n\n### BOLA/IDOR Testing\n\n1. Identify resource IDs in requests\n2. Capture request with user A's session\n3. Replay with user B's session\n4. Check for unauthorized access\n\n---\n\n## Input Validation Testing\n\n| Injection Type | Test Focus |\n|----------------|------------|\n| SQL | Query manipulation |\n| NoSQL | Document queries |\n| Command | System commands |\n| LDAP | Directory queries |\n\n**Approach:** Test all parameters, try type coercion, test boundaries, check error messages.\n\n---\n\n## Rate Limiting Testing\n\n| Aspect | Check |\n|--------|-------|\n| Existence | Is there any limit? |\n| Bypass | Headers, IP rotation |\n| Scope | Per-user, per-IP, global |\n\n**Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning.\n\n---\n\n## GraphQL Security\n\n| Test | Focus |\n|------|-------|\n| Introspection | Schema disclosure |\n| Batching | Query DoS |\n| Nesting | Depth-based DoS |\n| Authorization | Field-level access |\n\n---\n\n## Security Testing Checklist\n\n**Authentication:**\n- [ ] Test for bypass\n- [ ] Check credential strength\n- [ ] Verify token security\n\n**Authorization:**\n- [ ] Test BOLA/IDOR\n- [ ] Check privilege escalation\n- [ ] Verify function access\n\n**Input:**\n- [ ] Test all parameters\n- [ ] Check for injection\n\n**Config:**\n- [ ] Check CORS\n- [ ] Verify headers\n- [ ] Test error handling\n\n---\n\n> **Remember:** APIs are the backbone of modern apps. Test them like attackers will.\n","isInternal":false,"tokens":678,"sizeBytes":2892},{"name":"SKILL.md","path":".agent/skills/api-patterns/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/SKILL.md","title":"api-patterns","category":"anthropic-skill","format":"markdown","content":"---\nname: api-patterns\ndescription: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.\nallowed-tools: Read, Write, Edit, Glob, Grep\n---\n\n# API Patterns\n\n> API design principles and decision-making for 2025.\n> **Learn to THINK, not copy fixed patterns.**\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n---\n\n## 📑 Content Map\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |\n| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |\n| `response.md` | Envelope pattern, error format, pagination | Response structure |\n| `graphql.md` | Schema design, when to use, security | Considering GraphQL |\n| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |\n| `versioning.md` | URI/Header/Query versioning | API evolution planning |\n| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |\n| `rate-limiting.md` | Token bucket, sliding window | API protection |\n| `documentation.md` | OpenAPI/Swagger best practices | Documentation |\n| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |\n\n---\n\n## 🔗 Related Skills\n\n| Need | Skill |\n|------|-------|\n| API implementation | `@[skills/backend-development]` |\n| Data structure | `@[skills/database-design]` |\n| Security details | `@[skills/security-hardening]` |\n\n---\n\n## ✅ Decision Checklist\n\nBefore designing an API:\n\n- [ ] **Asked user about API consumers?**\n- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)\n- [ ] **Defined consistent response format?**\n- [ ] **Planned versioning strategy?**\n- [ ] **Considered authentication needs?**\n- [ ] **Planned rate limiting?**\n- [ ] **Documentation approach defined?**\n\n---\n\n## ❌ Anti-Patterns\n\n**DON'T:**\n- Default to REST for everything\n- Use verbs in REST endpoints (/getUsers)\n- Return inconsistent response formats\n- Expose internal errors to clients\n- Skip rate limiting\n\n**DO:**\n- Choose API style based on context\n- Ask about client requirements\n- Document thoroughly\n- Use appropriate status codes\n\n---\n\n## Script\n\n| Script | Purpose | Command |\n|--------|---------|---------|\n| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |\n\n","frontmatter":{"name":"api-patterns","description":"API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":583,"sizeBytes":2435},{"name":"trpc.md","path":".agent/skills/api-patterns/trpc.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/trpc.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# tRPC Principles\n\n> End-to-end type safety for TypeScript monorepos.\n\n## When to Use\n\n```\n✅ Perfect fit:\n├── TypeScript on both ends\n├── Monorepo structure\n├── Internal tools\n├── Rapid development\n└── Type safety critical\n\n❌ Poor fit:\n├── Non-TypeScript clients\n├── Public API\n├── Need REST conventions\n└── Multiple language backends\n```\n\n## Key Benefits\n\n```\nWhy tRPC:\n├── Zero schema maintenance\n├── End-to-end type inference\n├── IDE autocomplete across stack\n├── Instant API changes reflected\n└── No code generation step\n```\n\n## Integration Patterns\n\n```\nCommon setups:\n├── Next.js + tRPC (most common)\n├── Monorepo with shared types\n├── Remix + tRPC\n└── Any TS frontend + backend\n```\n","isInternal":false,"tokens":202,"sizeBytes":801},{"name":"versioning.md","path":".agent/skills/api-patterns/versioning.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/api-patterns/versioning.md","title":"Api-patterns Skill","category":"anthropic-skill","format":"markdown","content":"# Versioning Strategies\n\n> Plan for API evolution from day one.\n\n## Decision Factors\n\n| Strategy | Implementation | Trade-offs |\n|----------|---------------|------------|\n| **URI** | /v1/users | Clear, easy caching |\n| **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery |\n| **Query** | ?version=1 | Easy to add, messy |\n| **None** | Evolve carefully | Best for internal, risky for public |\n\n## Versioning Philosophy\n\n```\nConsider:\n├── Public API? → Version in URI\n├── Internal only? → May not need versioning\n├── GraphQL? → Typically no versions (evolve schema)\n├── tRPC? → Types enforce compatibility\n```\n","isInternal":false,"tokens":158,"sizeBytes":651},{"name":"agent-coordination.md","path":".agent/skills/app-builder/agent-coordination.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/agent-coordination.md","title":"App-builder Skill","category":"anthropic-skill","format":"markdown","content":"# Agent Coordination\n\n> How App Builder orchestrates specialist agents.\n\n## Agent Pipeline\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                   APP BUILDER (Orchestrator)                 │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     PROJECT PLANNER                          │\n│  • Task breakdown                                            │\n│  • Dependency graph                                          │\n│  • File structure planning                                   │\n│  • Create {task-slug}.md in project root (MANDATORY)             │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│              CHECKPOINT: PLAN VERIFICATION                   │\n│  🔴 VERIFY: Does {task-slug}.md exist in project root?       │\n│  🔴 If NO → STOP → Create plan file first                    │\n│  🔴 If YES → Proceed to specialist agents                    │\n└─────────────────────────────────────────────────────────────┘\n                              │\n          ┌───────────────────┼───────────────────┐\n          ▼                   ▼                   ▼\n┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐\n│ DATABASE        │ │ BACKEND         │ │ FRONTEND        │\n│ ARCHITECT       │ │ SPECIALIST      │ │ SPECIALIST      │\n│                 │ │                 │ │                 │\n│ • Schema design │ │ • API routes    │ │ • Components    │\n│ • Migrations    │ │ • Controllers   │ │ • Pages         │\n│ • Seed data     │ │ • Middleware    │ │ • Styling       │\n└─────────────────┘ └─────────────────┘ └─────────────────┘\n          │                   │                   │\n          └───────────────────┼───────────────────┘\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                 PARALLEL PHASE (Optional)                    │\n│  • Security Auditor → Vulnerability check                   │\n│  • Test Engineer → Unit tests                               │\n│  • Performance Optimizer → Bundle analysis                  │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     DEVOPS ENGINEER                          │\n│  • Environment setup                                         │\n│  • Preview deployment                                        │\n│  • Health check                                              │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Execution Order\n\n| Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT |\n|-------|----------|-----------|--------------|------------|\n| 0 | Socratic Gate | ❌ | - | ✅ Ask 3 questions |\n| 1 | Project Planner | ❌ | Questions answered | ✅ **PLAN.md created** |\n| 1.5 | **PLAN VERIFICATION** | ❌ | PLAN.md exists | ✅ **File exists in root** |\n| 2 | Database Architect | ❌ | Plan ready | Schema defined |\n| 3 | Backend Specialist | ❌ | Schema ready | API routes created |\n| 4 | Frontend Specialist | ✅ | API ready (partial) | UI components ready |\n| 5 | Security Auditor, Test Engineer | ✅ | Code ready | Tests & audit pass |\n| 6 | DevOps Engineer | ❌ | All code ready | Deployment ready |\n\n> 🔴 **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification.\n","isInternal":false,"tokens":805,"sizeBytes":5555},{"name":"feature-building.md","path":".agent/skills/app-builder/feature-building.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/feature-building.md","title":"App-builder Skill","category":"anthropic-skill","format":"markdown","content":"# Feature Building\n\n> How to analyze and implement new features.\n\n## Feature Analysis\n\n```\nRequest: \"add payment system\"\n\nAnalysis:\n├── Required Changes:\n│   ├── Database: orders, payments tables\n│   ├── Backend: /api/checkout, /api/webhooks/stripe\n│   ├── Frontend: CheckoutForm, PaymentSuccess\n│   └── Config: Stripe API keys\n│\n├── Dependencies:\n│   ├── stripe package\n│   └── Existing user authentication\n│\n└── Estimated Time: 15-20 minutes\n```\n\n## Iterative Enhancement Process\n\n```\n1. Analyze existing project\n2. Create change plan\n3. Present plan to user\n4. Get approval\n5. Apply changes\n6. Test\n7. Show preview\n```\n\n## Error Handling\n\n| Error Type | Solution Strategy |\n|------------|-------------------|\n| TypeScript Error | Fix type, add missing import |\n| Missing Dependency | Run npm install |\n| Port Conflict | Suggest alternative port |\n| Database Error | Check migration, validate connection |\n\n## Recovery Strategy\n\n```\n1. Detect error\n2. Try automatic fix\n3. If failed, report to user\n4. Suggest alternative\n5. Rollback if necessary\n```\n","isInternal":false,"tokens":267,"sizeBytes":1123},{"name":"project-detection.md","path":".agent/skills/app-builder/project-detection.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/project-detection.md","title":"App-builder Skill","category":"anthropic-skill","format":"markdown","content":"# Project Type Detection\n\n> Analyze user requests to determine project type and template.\n\n## Keyword Matrix\n\n| Keywords | Project Type | Template |\n|----------|--------------|----------|\n| blog, post, article | Blog | astro-static |\n| e-commerce, product, cart, payment | E-commerce | nextjs-saas |\n| dashboard, panel, management | Admin Dashboard | nextjs-fullstack |\n| api, backend, service, rest | API Service | express-api |\n| python, fastapi, django | Python API | python-fastapi |\n| mobile, android, ios, react native | Mobile App (RN) | react-native-app |\n| flutter, dart | Mobile App (Flutter) | flutter-app |\n| portfolio, personal, cv | Portfolio | nextjs-static |\n| crm, customer, sales | CRM | nextjs-fullstack |\n| saas, subscription, stripe | SaaS | nextjs-saas |\n| landing, promotional, marketing | Landing Page | nextjs-static |\n| docs, documentation | Documentation | astro-static |\n| extension, plugin, chrome | Browser Extension | chrome-extension |\n| desktop, electron | Desktop App | electron-desktop |\n| cli, command line, terminal | CLI Tool | cli-tool |\n| monorepo, workspace | Monorepo | monorepo-turborepo |\n\n## Detection Process\n\n```\n1. Tokenize user request\n2. Extract keywords\n3. Determine project type\n4. Detect missing information → forward to conversation-manager\n5. Suggest tech stack\n```\n","isInternal":false,"tokens":316,"sizeBytes":1323},{"name":"scaffolding.md","path":".agent/skills/app-builder/scaffolding.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/scaffolding.md","title":"App-builder Skill","category":"anthropic-skill","format":"markdown","content":"# Project Scaffolding\n\n> Directory structure and core files for new projects.\n\n---\n\n## Next.js Full-Stack Structure (2025 Optimized)\n\n```\nproject-name/\n├── src/\n│   ├── app/                        # Routes only (thin layer)\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   ├── (auth)/                 # Route group - auth pages\n│   │   │   ├── login/page.tsx\n│   │   │   └── register/page.tsx\n│   │   ├── (dashboard)/            # Route group - dashboard layout\n│   │   │   ├── layout.tsx\n│   │   │   └── page.tsx\n│   │   └── api/\n│   │       └── [resource]/route.ts\n│   │\n│   ├── features/                   # Feature-based modules\n│   │   ├── auth/\n│   │   │   ├── components/\n│   │   │   ├── hooks/\n│   │   │   ├── actions.ts          # Server Actions\n│   │   │   ├── queries.ts          # Data fetching\n│   │   │   └── types.ts\n│   │   ├── products/\n│   │   │   ├── components/\n│   │   │   ├── actions.ts\n│   │   │   └── queries.ts\n│   │   └── cart/\n│   │       └── ...\n│   │\n│   ├── shared/                     # Shared utilities\n│   │   ├── components/ui/          # Reusable UI components\n│   │   ├── lib/                    # Utils, helpers\n│   │   └── hooks/                  # Global hooks\n│   │\n│   └── server/                     # Server-only code\n│       ├── db/                     # Database client (Prisma)\n│       ├── auth/                   # Auth config\n│       └── services/               # External API integrations\n│\n├── prisma/\n│   ├── schema.prisma\n│   ├── migrations/\n│   └── seed.ts\n│\n├── public/\n├── .env.example\n├── .env.local\n├── package.json\n├── tailwind.config.ts\n├── tsconfig.json\n└── README.md\n```\n\n---\n\n## Structure Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Feature isolation** | Each feature in `features/` with its own components, hooks, actions |\n| **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports |\n| **Thin routes** | `app/` only for routing, logic lives in `features/` |\n| **Route groups** | `(groupName)/` for layout sharing without URL impact |\n| **Shared code** | `shared/` for truly reusable UI and utilities |\n\n---\n\n## Core Files\n\n| File | Purpose |\n|------|---------|\n| `package.json` | Dependencies |\n| `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |\n| `tailwind.config.ts` | Tailwind config |\n| `.env.example` | Environment template |\n| `README.md` | Project documentation |\n| `.gitignore` | Git ignore rules |\n| `prisma/schema.prisma` | Database schema |\n\n---\n\n## Path Aliases (tsconfig.json)\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@/*\": [\"./src/*\"],\n      \"@/features/*\": [\"./src/features/*\"],\n      \"@/shared/*\": [\"./src/shared/*\"],\n      \"@/server/*\": [\"./src/server/*\"]\n    }\n  }\n}\n```\n\n---\n\n## When to Use What\n\n| Need | Location |\n|------|----------|\n| New page/route | `app/(group)/page.tsx` |\n| Feature component | `features/[name]/components/` |\n| Server action | `features/[name]/actions.ts` |\n| Data fetching | `features/[name]/queries.ts` |\n| Reusable button/input | `shared/components/ui/` |\n| Database query | `server/db/` |\n| External API call | `server/services/` |\n","isInternal":false,"tokens":895,"sizeBytes":3609},{"name":"SKILL.md","path":".agent/skills/app-builder/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/SKILL.md","title":"app-builder","category":"anthropic-skill","format":"markdown","content":"---\nname: app-builder\ndescription: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent\n---\n\n# App Builder - Application Building Orchestrator\n\n> Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `project-detection.md` | Keyword matrix, project type detection | Starting new project |\n| `tech-stack.md` | 2025 default stack, alternatives | Choosing technologies |\n| `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work |\n| `scaffolding.md` | Directory structure, core files | Creating project structure |\n| `feature-building.md` | Feature analysis, error handling | Adding features to existing project |\n| `templates/SKILL.md` | **Project templates** | Scaffolding new project |\n\n---\n\n## 📦 Templates (13)\n\nQuick-start scaffolding for new projects. **Read the matching template only!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app |\n| [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile |\n| [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n\n---\n\n## 🔗 Related Agents\n\n| Agent | Role |\n|-------|------|\n| `project-planner` | Task breakdown, dependency graph |\n| `frontend-specialist` | UI components, pages |\n| `backend-specialist` | API, business logic |\n| `database-architect` | Schema, migrations |\n| `devops-engineer` | Deployment, preview |\n\n---\n\n## Usage Example\n\n```\nUser: \"Make an Instagram clone with photo sharing and likes\"\n\nApp Builder Process:\n1. Project type: Social Media App\n2. Tech stack: Next.js + Prisma + Cloudinary + Clerk\n3. Create plan:\n   ├─ Database schema (users, posts, likes, follows)\n   ├─ API routes (12 endpoints)\n   ├─ Pages (feed, profile, upload)\n   └─ Components (PostCard, Feed, LikeButton)\n4. Coordinate agents\n5. Report progress\n6. Start preview\n```\n","frontmatter":{"name":"app-builder","description":"Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash, Agent","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash,","Agent"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash,","Agent"],"isInternal":false,"tokens":777,"sizeBytes":3172},{"name":"tech-stack.md","path":".agent/skills/app-builder/tech-stack.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/tech-stack.md","title":"App-builder Skill","category":"anthropic-skill","format":"markdown","content":"# Tech Stack Selection (2025)\n\n> Default and alternative technology choices for web applications.\n\n## Default Stack (Web App - 2025)\n\n```yaml\nFrontend:\n  framework: Next.js 16 (Stable)\n  language: TypeScript 5.7+\n  styling: Tailwind CSS v4\n  state: React 19 Actions / Server Components\n  bundler: Turbopack (Stable for Dev)\n\nBackend:\n  runtime: Node.js 23\n  framework: Next.js API Routes / Hono (for Edge)\n  validation: Zod / TypeBox\n\nDatabase:\n  primary: PostgreSQL\n  orm: Prisma / Drizzle\n  hosting: Supabase / Neon\n\nAuth:\n  provider: Auth.js (v5) / Clerk\n\nMonorepo:\n  tool: Turborepo 2.0\n```\n\n## Alternative Options\n\n| Need | Default | Alternative |\n|------|---------|-------------|\n| Real-time | - | Supabase Realtime, Socket.io |\n| File storage | - | Cloudinary, S3 |\n| Payment | Stripe | LemonSqueezy, Paddle |\n| Email | - | Resend, SendGrid |\n| Search | - | Algolia, Typesense |\n","isInternal":false,"tokens":259,"sizeBytes":886},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/astro-static/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md","title":"astro-static","category":"anthropic-skill","format":"markdown","content":"---\nname: astro-static\ndescription: Astro static site template principles. Content-focused websites, blogs, documentation.\n---\n\n# Astro Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Astro 4.x |\n| Content | MDX + Content Collections |\n| Styling | Tailwind CSS |\n| Integrations | Sitemap, RSS, SEO |\n| Output | Static/SSG |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── components/      # .astro components\n│   ├── content/         # MDX content\n│   │   ├── blog/\n│   │   └── config.ts    # Collection schemas\n│   ├── layouts/         # Page layouts\n│   ├── pages/           # File-based routing\n│   └── styles/\n├── public/              # Static assets\n├── astro.config.mjs\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Content Collections | Type-safe content with Zod schemas |\n| Islands Architecture | Partial hydration for interactivity |\n| Zero JS by default | Static HTML unless needed |\n| MDX Support | Markdown with components |\n\n---\n\n## Setup Steps\n\n1. `npm create astro@latest {{name}}`\n2. Add integrations: `npx astro add mdx tailwind sitemap`\n3. Configure `astro.config.mjs`\n4. Create content collections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto-detected |\n| Netlify | Auto-detected |\n| Cloudflare Pages | Auto-detected |\n| GitHub Pages | Build + deploy action |\n\n---\n\n## Best Practices\n\n- Use Content Collections for type safety\n- Leverage static generation\n- Add islands only where needed\n- Optimize images with Astro Image\n","frontmatter":{"name":"astro-static","description":"Astro static site template principles. Content-focused websites, blogs, documentation."},"isInternal":false,"tokens":396,"sizeBytes":1706},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md","title":"chrome-extension","category":"anthropic-skill","format":"markdown","content":"---\nname: chrome-extension\ndescription: Chrome Extension template principles. Manifest V3, React, TypeScript.\n---\n\n# Chrome Extension Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Manifest | V3 |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite |\n| Storage | Chrome Storage API |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── popup/           # Extension popup\n│   ├── options/         # Options page\n│   ├── background/      # Service worker\n│   ├── content/         # Content scripts\n│   ├── components/\n│   ├── hooks/\n│   └── lib/\n│       ├── storage.ts   # Chrome storage helpers\n│       └── messaging.ts # Message passing\n├── public/\n│   ├── icons/\n│   └── manifest.json\n└── package.json\n```\n\n---\n\n## Manifest V3 Concepts\n\n| Component | Purpose |\n|-----------|---------|\n| Service Worker | Background processing |\n| Content Scripts | Page injection |\n| Popup | User interface |\n| Options Page | Settings |\n\n---\n\n## Permissions\n\n| Permission | Use |\n|------------|-----|\n| storage | Save user data |\n| activeTab | Current tab access |\n| scripting | Inject scripts |\n| host_permissions | Site access |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Add Chrome types: `npm install -D @types/chrome`\n3. Configure Vite for multi-entry\n4. Create manifest.json\n5. `npm run dev` (watch mode)\n6. Load in Chrome: `chrome://extensions` → Load unpacked\n\n---\n\n## Development Tips\n\n| Task | Method |\n|------|--------|\n| Debug Popup | Right-click icon → Inspect |\n| Debug Background | Extensions page → Service worker |\n| Debug Content | DevTools console on page |\n| Hot Reload | `npm run dev` with watch |\n\n---\n\n## Best Practices\n\n- Use type-safe messaging\n- Wrap Chrome APIs in promises\n- Minimize permissions\n- Handle offline gracefully\n","frontmatter":{"name":"chrome-extension","description":"Chrome Extension template principles. Manifest V3, React, TypeScript."},"isInternal":false,"tokens":450,"sizeBytes":1966},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/cli-tool/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md","title":"cli-tool","category":"anthropic-skill","format":"markdown","content":"---\nname: cli-tool\ndescription: Node.js CLI tool template principles. Commander.js, interactive prompts.\n---\n\n# CLI Tool Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Language | TypeScript |\n| CLI Framework | Commander.js |\n| Prompts | Inquirer.js |\n| Output | chalk + ora |\n| Config | cosmiconfig |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── index.ts         # Entry point\n│   ├── cli.ts           # CLI setup\n│   ├── commands/        # Command handlers\n│   ├── lib/\n│   │   ├── config.ts    # Config loader\n│   │   └── logger.ts    # Styled output\n│   └── types/\n├── bin/\n│   └── cli.js           # Executable\n└── package.json\n```\n\n---\n\n## CLI Design Principles\n\n| Principle | Description |\n|-----------|-------------|\n| Subcommands | Group related actions |\n| Options | Flags with defaults |\n| Interactive | Prompts when needed |\n| Non-interactive | Support --yes flags |\n\n---\n\n## Key Components\n\n| Component | Purpose |\n|-----------|---------|\n| Commander | Command parsing |\n| Inquirer | Interactive prompts |\n| Chalk | Colored output |\n| Ora | Spinners/loading |\n| Cosmiconfig | Config file discovery |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install commander @inquirer/prompts chalk ora cosmiconfig`\n4. Configure bin in package.json\n5. `npm link` for local testing\n\n---\n\n## Publishing\n\n```bash\nnpm login\nnpm publish\n```\n\n---\n\n## Best Practices\n\n- Provide helpful error messages\n- Support both interactive and non-interactive modes\n- Use consistent output styling\n- Validate inputs with Zod\n- Exit with proper codes (0 success, 1 error)\n","frontmatter":{"name":"cli-tool","description":"Node.js CLI tool template principles. Commander.js, interactive prompts."},"isInternal":false,"tokens":414,"sizeBytes":1762},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md","title":"electron-desktop","category":"anthropic-skill","format":"markdown","content":"---\nname: electron-desktop\ndescription: Electron desktop app template principles. Cross-platform, React, TypeScript.\n---\n\n# Electron Desktop App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Electron 28+ |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite + electron-builder |\n| IPC | Type-safe communication |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── electron/\n│   ├── main.ts          # Main process\n│   ├── preload.ts       # Preload script\n│   └── ipc/             # IPC handlers\n├── src/\n│   ├── App.tsx\n│   ├── components/\n│   │   ├── TitleBar.tsx # Custom title bar\n│   │   └── ...\n│   └── hooks/\n├── public/\n└── package.json\n```\n\n---\n\n## Process Model\n\n| Process | Role |\n|---------|------|\n| Main | Node.js, system access |\n| Renderer | Chromium, React UI |\n| Preload | Bridge, context isolation |\n\n---\n\n## Key Concepts\n\n| Concept | Purpose |\n|---------|---------|\n| contextBridge | Safe API exposure |\n| ipcMain/ipcRenderer | Process communication |\n| nodeIntegration: false | Security |\n| contextIsolation: true | Security |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Install: `npm install -D electron electron-builder vite-plugin-electron`\n3. Create electron/ directory\n4. Configure main process\n5. `npm run electron:dev`\n\n---\n\n## Build Targets\n\n| Platform | Output |\n|----------|--------|\n| Windows | NSIS, Portable |\n| macOS | DMG, ZIP |\n| Linux | AppImage, DEB |\n\n---\n\n## Best Practices\n\n- Use preload script for main/renderer bridge\n- Type-safe IPC with typed handlers\n- Custom title bar for native feel\n- Handle window state (maximize, minimize)\n- Auto-updates with electron-updater\n","frontmatter":{"name":"electron-desktop","description":"Electron desktop app template principles. Cross-platform, React, TypeScript."},"isInternal":false,"tokens":433,"sizeBytes":1823},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/express-api/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/express-api/TEMPLATE.md","title":"express-api","category":"anthropic-skill","format":"markdown","content":"---\nname: express-api\ndescription: Express.js REST API template principles. TypeScript, Prisma, JWT.\n---\n\n# Express.js API Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Framework | Express.js |\n| Language | TypeScript |\n| Database | PostgreSQL + Prisma |\n| Validation | Zod |\n| Auth | JWT + bcrypt |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── src/\n│   ├── app.ts           # Express setup\n│   ├── config/          # Environment\n│   ├── routes/          # Route handlers\n│   ├── controllers/     # Business logic\n│   ├── services/        # Data access\n│   ├── middleware/\n│   │   ├── auth.ts      # JWT verify\n│   │   ├── error.ts     # Error handler\n│   │   └── validate.ts  # Zod validation\n│   ├── schemas/         # Zod schemas\n│   └── utils/\n└── package.json\n```\n\n---\n\n## Middleware Stack\n\n| Order | Middleware |\n|-------|------------|\n| 1 | helmet (security) |\n| 2 | cors |\n| 3 | morgan (logging) |\n| 4 | body parsing |\n| 5 | routes |\n| 6 | error handler |\n\n---\n\n## API Response Format\n\n| Type | Structure |\n|------|-----------|\n| Success | `{ success: true, data: {...} }` |\n| Error | `{ error: \"message\", details: [...] }` |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install express prisma zod bcrypt jsonwebtoken`\n4. Configure Prisma\n5. `npm run db:push`\n6. `npm run dev`\n\n---\n\n## Best Practices\n\n- Layer architecture (routes → controllers → services)\n- Validate all inputs with Zod\n- Centralized error handling\n- Environment-based config\n- Use Prisma for type-safe DB access\n","frontmatter":{"name":"express-api","description":"Express.js REST API template principles. TypeScript, Prisma, JWT."},"isInternal":false,"tokens":442,"sizeBytes":1759},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/flutter-app/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md","title":"flutter-app","category":"anthropic-skill","format":"markdown","content":"---\nname: flutter-app\ndescription: Flutter mobile app template principles. Riverpod, Go Router, clean architecture.\n---\n\n# Flutter App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Flutter 3.x |\n| Language | Dart 3.x |\n| State | Riverpod 2.0 |\n| Navigation | Go Router |\n| HTTP | Dio |\n| Storage | Hive |\n\n---\n\n## Directory Structure\n\n```\nproject_name/\n├── lib/\n│   ├── main.dart\n│   ├── app.dart\n│   ├── core/\n│   │   ├── constants/\n│   │   ├── theme/\n│   │   ├── router/\n│   │   └── utils/\n│   ├── features/\n│   │   ├── auth/\n│   │   │   ├── data/\n│   │   │   ├── domain/\n│   │   │   └── presentation/\n│   │   └── home/\n│   ├── shared/\n│   │   ├── widgets/\n│   │   └── providers/\n│   └── services/\n│       ├── api/\n│       └── storage/\n├── test/\n└── pubspec.yaml\n```\n\n---\n\n## Architecture Layers\n\n| Layer | Contents |\n|-------|----------|\n| Presentation | Screens, Widgets, Providers |\n| Domain | Entities, Use Cases |\n| Data | Repositories, Models |\n\n---\n\n## Key Packages\n\n| Package | Purpose |\n|---------|---------|\n| flutter_riverpod | State management |\n| riverpod_annotation | Code generation |\n| go_router | Navigation |\n| dio | HTTP client |\n| freezed | Immutable models |\n| hive | Local storage |\n\n---\n\n## Setup Steps\n\n1. `flutter create {{name}} --org com.{{bundle}}`\n2. Update `pubspec.yaml`\n3. `flutter pub get`\n4. Run code generation: `dart run build_runner build`\n5. `flutter run`\n\n---\n\n## Best Practices\n\n- Feature-first folder structure\n- Riverpod for state, React Query pattern for server state\n- Freezed for immutable data classes\n- Go Router for declarative navigation\n- Material 3 theming\n","frontmatter":{"name":"flutter-app","description":"Flutter mobile app template principles. Riverpod, Go Router, clean architecture."},"isInternal":false,"tokens":450,"sizeBytes":1855},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md","title":"monorepo-turborepo","category":"anthropic-skill","format":"markdown","content":"---\nname: monorepo-turborepo\ndescription: Turborepo monorepo template principles. pnpm workspaces, shared packages.\n---\n\n# Turborepo Monorepo Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Build System | Turborepo |\n| Package Manager | pnpm |\n| Apps | Next.js, Express |\n| Packages | Shared UI, Config, Types |\n| Language | TypeScript |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── apps/\n│   ├── web/             # Next.js app\n│   ├── api/             # Express API\n│   └── docs/            # Documentation\n├── packages/\n│   ├── ui/              # Shared components\n│   ├── config/          # ESLint, TS, Tailwind\n│   ├── types/           # Shared types\n│   └── utils/           # Shared utilities\n├── turbo.json\n├── pnpm-workspace.yaml\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Workspaces | pnpm-workspace.yaml |\n| Pipeline | turbo.json task graph |\n| Caching | Remote/local task caching |\n| Dependencies | `workspace:*` protocol |\n\n---\n\n## Turbo Pipeline\n\n| Task | Depends On |\n|------|------------|\n| build | ^build (dependencies first) |\n| dev | cache: false, persistent |\n| lint | ^build |\n| test | ^build |\n\n---\n\n## Setup Steps\n\n1. Create root directory\n2. `pnpm init`\n3. Create pnpm-workspace.yaml\n4. Create turbo.json\n5. Add apps and packages\n6. `pnpm install`\n7. `pnpm dev`\n\n---\n\n## Common Commands\n\n| Command | Description |\n|---------|-------------|\n| `pnpm dev` | Run all apps |\n| `pnpm build` | Build all |\n| `pnpm --filter @name/web dev` | Run specific app |\n| `pnpm --filter @name/web add axios` | Add dep to app |\n\n---\n\n## Best Practices\n\n- Shared configs in packages/config\n- Shared types in packages/types\n- Internal packages with `workspace:*`\n- Use Turbo remote caching for CI\n","frontmatter":{"name":"monorepo-turborepo","description":"Turborepo monorepo template principles. pnpm workspaces, shared packages."},"isInternal":false,"tokens":474,"sizeBytes":1880},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md","title":"nextjs-fullstack","category":"anthropic-skill","format":"markdown","content":"---\nname: nextjs-fullstack\ndescription: Next.js full-stack template principles. App Router, Prisma, Tailwind.\n---\n\n# Next.js Full-Stack Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (App Router) |\n| Language | TypeScript |\n| Database | PostgreSQL + Prisma |\n| Styling | Tailwind CSS |\n| Auth | Clerk (optional) |\n| Validation | Zod |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── src/\n│   ├── app/\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   └── api/\n│   ├── components/\n│   │   └── ui/\n│   ├── lib/\n│   │   ├── db.ts        # Prisma client\n│   │   └── utils.ts\n│   └── types/\n├── .env.example\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Server Components | Default, fetch data |\n| Server Actions | Form mutations |\n| Route Handlers | API endpoints |\n| Prisma | Type-safe ORM |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma connection |\n| NEXT_PUBLIC_APP_URL | Public URL |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. `npm install prisma @prisma/client zod`\n3. `npx prisma init`\n4. Configure schema\n5. `npm run db:push`\n6. `npm run dev`\n\n---\n\n## Best Practices\n\n- Server Components by default\n- Server Actions for mutations\n- Prisma for type-safe DB\n- Zod for validation\n- Edge runtime where possible\n","frontmatter":{"name":"nextjs-fullstack","description":"Next.js full-stack template principles. App Router, Prisma, Tailwind."},"isInternal":false,"tokens":414,"sizeBytes":1620},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md","title":"nextjs-saas","category":"anthropic-skill","format":"markdown","content":"---\nname: nextjs-saas\ndescription: Next.js SaaS template principles. Auth, payments, email.\n---\n\n# Next.js SaaS Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (App Router) |\n| Auth | NextAuth.js v5 |\n| Payments | Stripe |\n| Database | PostgreSQL + Prisma |\n| Email | Resend |\n| UI | Tailwind (ASK USER: shadcn/Headless UI/Custom?) |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n├── src/\n│   ├── app/\n│   │   ├── (auth)/      # Login, register\n│   │   ├── (dashboard)/ # Protected routes\n│   │   ├── (marketing)/ # Landing, pricing\n│   │   └── api/\n│   │       ├── auth/[...nextauth]/\n│   │       └── webhooks/stripe/\n│   ├── components/\n│   │   ├── auth/\n│   │   ├── billing/\n│   │   └── dashboard/\n│   ├── lib/\n│   │   ├── auth.ts      # NextAuth config\n│   │   ├── stripe.ts    # Stripe client\n│   │   └── email.ts     # Resend client\n│   └── config/\n│       └── subscriptions.ts\n└── package.json\n```\n\n---\n\n## SaaS Features\n\n| Feature | Implementation |\n|---------|---------------|\n| Auth | NextAuth + OAuth |\n| Subscriptions | Stripe Checkout |\n| Billing Portal | Stripe Portal |\n| Webhooks | Stripe events |\n| Email | Transactional via Resend |\n\n---\n\n## Database Schema\n\n| Model | Fields |\n|-------|--------|\n| User | id, email, stripeCustomerId, subscriptionId |\n| Account | OAuth provider data |\n| Session | User sessions |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma |\n| NEXTAUTH_SECRET | Auth |\n| STRIPE_SECRET_KEY | Payments |\n| STRIPE_WEBHOOK_SECRET | Webhooks |\n| RESEND_API_KEY | Email |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. Install: `npm install next-auth @auth/prisma-adapter stripe resend`\n3. Setup Stripe products/prices\n4. Configure environment\n5. `npm run db:push`\n6. `npm run stripe:listen` (webhooks)\n7. `npm run dev`\n\n---\n\n## Best Practices\n\n- Route groups for layout separation\n- Stripe webhooks for subscription sync\n- NextAuth with Prisma adapter\n- Email templates with React Email\n","frontmatter":{"name":"nextjs-saas","description":"Next.js SaaS template principles. Auth, payments, email."},"isInternal":false,"tokens":571,"sizeBytes":2266},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md","title":"nextjs-static","category":"anthropic-skill","format":"markdown","content":"---\nname: nextjs-static\ndescription: Next.js static site template principles. Landing pages, portfolios, marketing.\n---\n\n# Next.js Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Next.js 14 (Static Export) |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Animations | Framer Motion |\n| Icons | Lucide React |\n| SEO | Next SEO |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── app/\n│   │   ├── layout.tsx\n│   │   ├── page.tsx      # Landing\n│   │   ├── about/\n│   │   ├── contact/\n│   │   └── blog/\n│   ├── components/\n│   │   ├── layout/       # Header, Footer\n│   │   ├── sections/     # Hero, Features, CTA\n│   │   └── ui/\n│   └── lib/\n├── content/              # Markdown content\n├── public/\n└── next.config.js\n```\n\n---\n\n## Static Export Config\n\n```javascript\n// next.config.js\nconst nextConfig = {\n  output: 'export',\n  images: { unoptimized: true },\n  trailingSlash: true,\n};\n```\n\n---\n\n## Landing Page Sections\n\n| Section | Purpose |\n|---------|---------|\n| Hero | Main headline, CTA |\n| Features | Product benefits |\n| Testimonials | Social proof |\n| Pricing | Plans |\n| CTA | Final conversion |\n\n---\n\n## Animation Patterns\n\n| Pattern | Use |\n|---------|-----|\n| Fade up | Content entry |\n| Stagger | List items |\n| Scroll reveal | On viewport |\n| Hover | Interactive feedback |\n\n---\n\n## Setup Steps\n\n1. `npx create-next-app {{name}} --typescript --tailwind --app`\n2. Install: `npm install framer-motion lucide-react next-seo`\n3. Configure static export\n4. Create sections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto |\n| Netlify | Auto |\n| GitHub Pages | gh-pages branch |\n| Any host | Upload `out` folder |\n\n---\n\n## Best Practices\n\n- Static export for maximum performance\n- Framer Motion for premium animations\n- Responsive mobile-first design\n- SEO metadata on every page\n","frontmatter":{"name":"nextjs-static","description":"Next.js static site template principles. Landing pages, portfolios, marketing."},"isInternal":false,"tokens":501,"sizeBytes":2044},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md","title":"nuxt-app","category":"anthropic-skill","format":"markdown","content":"---\nname: nuxt-app\ndescription: Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma.\n---\n\n# Nuxt 3 Full-Stack Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Nuxt 3 |\n| Language | TypeScript |\n| UI | Vue 3 (Composition API) |\n| State | Pinia |\n| Database | PostgreSQL + Prisma |\n| Styling | Tailwind CSS |\n| Validation | Zod |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── prisma/\n│   └── schema.prisma\n├── server/\n│   ├── api/\n│   │   └── [resource]/\n│   │       └── index.ts\n│   └── utils/\n│       └── db.ts         # Prisma client\n├── composables/\n│   └── useAuth.ts\n├── stores/\n│   └── user.ts           # Pinia store\n├── components/\n│   └── ui/\n├── pages/\n│   ├── index.vue\n│   └── [...slug].vue\n├── layouts/\n│   └── default.vue\n├── assets/\n│   └── css/\n│       └── main.css\n├── .env.example\n├── nuxt.config.ts\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Auto-imports | Components, composables, utils |\n| File-based routing | pages/ → routes |\n| Server Routes | server/api/ → API endpoints |\n| Composables | Reusable reactive logic |\n| Pinia | State management |\n\n---\n\n## Environment Variables\n\n| Variable | Purpose |\n|----------|---------|\n| DATABASE_URL | Prisma connection |\n| NUXT_PUBLIC_APP_URL | Public URL |\n\n---\n\n## Setup Steps\n\n1. `npx nuxi@latest init {{name}}`\n2. `cd {{name}}`\n3. `npm install @pinia/nuxt @prisma/client prisma zod`\n4. `npm install -D @nuxtjs/tailwindcss`\n5. Add modules to `nuxt.config.ts`:\n   ```ts\n   modules: ['@pinia/nuxt', '@nuxtjs/tailwindcss']\n   ```\n6. `npx prisma init`\n7. Configure schema\n8. `npx prisma db push`\n9. `npm run dev`\n\n---\n\n## Best Practices\n\n- Use `<script setup>` for components\n- Composables for reusable logic\n- Pinia stores in `stores/` folder\n- Server routes for API logic\n- Auto-import for clean code\n- TypeScript for type safety\n- See `@[skills/vue-expert]` for Vue patterns\n","frontmatter":{"name":"nuxt-app","description":"Nuxt 3 full-stack template. Vue 3, Pinia, Tailwind, Prisma."},"isInternal":false,"tokens":600,"sizeBytes":2137},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md","title":"python-fastapi","category":"anthropic-skill","format":"markdown","content":"---\nname: python-fastapi\ndescription: FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic.\n---\n\n# FastAPI API Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | FastAPI |\n| Language | Python 3.11+ |\n| ORM | SQLAlchemy 2.0 |\n| Validation | Pydantic v2 |\n| Migrations | Alembic |\n| Auth | JWT + passlib |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── alembic/             # Migrations\n├── app/\n│   ├── main.py          # FastAPI app\n│   ├── config.py        # Settings\n│   ├── database.py      # DB connection\n│   ├── models/          # SQLAlchemy models\n│   ├── schemas/         # Pydantic schemas\n│   ├── routers/         # API routes\n│   ├── services/        # Business logic\n│   ├── dependencies/    # DI\n│   └── utils/\n├── tests/\n├── .env.example\n└── requirements.txt\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Async | async/await throughout |\n| Dependency Injection | FastAPI Depends |\n| Pydantic v2 | Validation + serialization |\n| SQLAlchemy 2.0 | Async sessions |\n\n---\n\n## API Structure\n\n| Layer | Responsibility |\n|-------|---------------|\n| Routers | HTTP handling |\n| Dependencies | Auth, validation |\n| Services | Business logic |\n| Models | Database entities |\n| Schemas | Request/response |\n\n---\n\n## Setup Steps\n\n1. `python -m venv venv`\n2. `source venv/bin/activate`\n3. `pip install fastapi uvicorn sqlalchemy alembic pydantic`\n4. Create `.env`\n5. `alembic upgrade head`\n6. `uvicorn app.main:app --reload`\n\n---\n\n## Best Practices\n\n- Use async everywhere\n- Pydantic v2 for validation\n- SQLAlchemy 2.0 async sessions\n- Alembic for migrations\n- pytest-asyncio for tests\n","frontmatter":{"name":"python-fastapi","description":"FastAPI REST API template principles. SQLAlchemy, Pydantic, Alembic."},"isInternal":false,"tokens":445,"sizeBytes":1785},{"name":"TEMPLATE.md","path":".agent/skills/app-builder/templates/react-native-app/TEMPLATE.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md","title":"react-native-app","category":"anthropic-skill","format":"markdown","content":"---\nname: react-native-app\ndescription: React Native mobile app template principles. Expo, TypeScript, navigation.\n---\n\n# React Native App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | React Native + Expo |\n| Language | TypeScript |\n| Navigation | Expo Router |\n| State | Zustand + React Query |\n| Styling | NativeWind |\n| Testing | Jest + RNTL |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── app/                 # Expo Router (file-based)\n│   ├── _layout.tsx      # Root layout\n│   ├── index.tsx        # Home\n│   ├── (tabs)/          # Tab navigation\n│   └── [id].tsx         # Dynamic route\n├── components/\n│   ├── ui/              # Reusable\n│   └── features/\n├── hooks/\n├── lib/\n│   ├── api.ts\n│   └── storage.ts\n├── store/\n├── constants/\n└── app.json\n```\n\n---\n\n## Navigation Patterns\n\n| Pattern | Use |\n|---------|-----|\n| Stack | Page hierarchy |\n| Tabs | Bottom navigation |\n| Drawer | Side menu |\n| Modal | Overlay screens |\n\n---\n\n## State Management\n\n| Type | Tool |\n|------|------|\n| Local | Zustand |\n| Server | React Query |\n| Forms | React Hook Form |\n| Storage | Expo SecureStore |\n\n---\n\n## Key Packages\n\n| Package | Purpose |\n|---------|---------|\n| expo-router | File-based routing |\n| zustand | Local state |\n| @tanstack/react-query | Server state |\n| nativewind | Tailwind styling |\n| expo-secure-store | Secure storage |\n\n---\n\n## Setup Steps\n\n1. `npx create-expo-app {{name}} -t expo-template-blank-typescript`\n2. `npx expo install expo-router react-native-safe-area-context`\n3. Install state: `npm install zustand @tanstack/react-query`\n4. `npx expo start`\n\n---\n\n## Best Practices\n\n- Expo Router for navigation\n- Zustand for local, React Query for server state\n- NativeWind for consistent styling\n- Expo SecureStore for tokens\n- Test on both iOS and Android\n","frontmatter":{"name":"react-native-app","description":"React Native mobile app template principles. Expo, TypeScript, navigation."},"isInternal":false,"tokens":472,"sizeBytes":1939},{"name":"SKILL.md","path":".agent/skills/app-builder/templates/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/app-builder/templates/SKILL.md","title":"templates","category":"anthropic-skill","format":"markdown","content":"---\nname: templates\ndescription: Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.\nallowed-tools: Read, Glob, Grep\n---\n\n# Project Templates\n\n> Quick-start templates for scaffolding new projects.\n\n---\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY the template matching user's project type!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [express-api](express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform |\n| [electron-desktop](electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n| [astro-static](astro-static/TEMPLATE.md) | Astro + MDX | Blog / Docs |\n\n---\n\n## Usage\n\n1. User says \"create [type] app\"\n2. Match to appropriate template\n3. Read ONLY that template's TEMPLATE.md\n4. Follow its tech stack and structure\n","frontmatter":{"name":"templates","description":"Project scaffolding templates for new applications. Use when creating new projects from scratch. Contains 12 templates for various tech stacks.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":408,"sizeBytes":1585},{"name":"context-discovery.md","path":".agent/skills/architecture/context-discovery.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/architecture/context-discovery.md","title":"Architecture Skill","category":"anthropic-skill","format":"markdown","content":"# Context Discovery\n\n> Before suggesting any architecture, gather context.\n\n## Question Hierarchy (Ask User FIRST)\n\n1. **Scale**\n   - How many users? (10, 1K, 100K, 1M+)\n   - Data volume? (MB, GB, TB)\n   - Transaction rate? (per second/minute)\n\n2. **Team**\n   - Solo developer or team?\n   - Team size and expertise?\n   - Distributed or co-located?\n\n3. **Timeline**\n   - MVP/Prototype or long-term product?\n   - Time to market pressure?\n\n4. **Domain**\n   - CRUD-heavy or business logic complex?\n   - Real-time requirements?\n   - Compliance/regulations?\n\n5. **Constraints**\n   - Budget limitations?\n   - Legacy systems to integrate?\n   - Technology stack preferences?\n\n## Project Classification Matrix\n\n```\n                    MVP              SaaS           Enterprise\n┌─────────────────────────────────────────────────────────────┐\n│ Scale        │ <1K           │ 1K-100K      │ 100K+        │\n│ Team         │ Solo          │ 2-10         │ 10+          │\n│ Timeline     │ Fast (weeks)  │ Medium (months)│ Long (years)│\n│ Architecture │ Simple        │ Modular      │ Distributed  │\n│ Patterns     │ Minimal       │ Selective    │ Comprehensive│\n│ Example      │ Next.js API   │ NestJS       │ Microservices│\n└─────────────────────────────────────────────────────────────┘\n```\n","isInternal":false,"tokens":323,"sizeBytes":1591},{"name":"examples.md","path":".agent/skills/architecture/examples.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/architecture/examples.md","title":"Architecture Skill","category":"anthropic-skill","format":"markdown","content":"# Architecture Examples\n\n> Real-world architecture decisions by project type.\n\n---\n\n## Example 1: MVP E-commerce (Solo Developer)\n\n```yaml\nRequirements:\n  - <1000 users initially\n  - Solo developer\n  - Fast to market (8 weeks)\n  - Budget-conscious\n\nArchitecture Decisions:\n  App Structure: Monolith (simpler for solo)\n  Framework: Next.js (full-stack, fast)\n  Data Layer: Prisma direct (no over-abstraction)\n  Authentication: JWT (simpler than OAuth)\n  Payment: Stripe (hosted solution)\n  Database: PostgreSQL (ACID for orders)\n\nTrade-offs Accepted:\n  - Monolith → Can't scale independently (team doesn't justify it)\n  - No Repository → Less testable (simple CRUD doesn't need it)\n  - JWT → No social login initially (can add later)\n\nFuture Migration Path:\n  - Users > 10K → Extract payment service\n  - Team > 3 → Add Repository pattern\n  - Social login requested → Add OAuth\n```\n\n---\n\n## Example 2: SaaS Product (5-10 Developers)\n\n```yaml\nRequirements:\n  - 1K-100K users\n  - 5-10 developers\n  - Long-term (12+ months)\n  - Multiple domains (billing, users, core)\n\nArchitecture Decisions:\n  App Structure: Modular Monolith (team size optimal)\n  Framework: NestJS (modular by design)\n  Data Layer: Repository pattern (testing, flexibility)\n  Domain Model: Partial DDD (rich entities)\n  Authentication: OAuth + JWT\n  Caching: Redis\n  Database: PostgreSQL\n\nTrade-offs Accepted:\n  - Modular Monolith → Some module coupling (microservices not justified)\n  - Partial DDD → No full aggregates (no domain experts)\n  - RabbitMQ later → Initial synchronous (add when proven needed)\n\nMigration Path:\n  - Team > 10 → Consider microservices\n  - Domains conflict → Extract bounded contexts\n  - Read performance issues → Add CQRS\n```\n\n---\n\n## Example 3: Enterprise (100K+ Users)\n\n```yaml\nRequirements:\n  - 100K+ users\n  - 10+ developers\n  - Multiple business domains\n  - Different scaling needs\n  - 24/7 availability\n\nArchitecture Decisions:\n  App Structure: Microservices (independent scale)\n  API Gateway: Kong/AWS API GW\n  Domain Model: Full DDD\n  Consistency: Event-driven (eventual OK)\n  Message Bus: Kafka\n  Authentication: OAuth + SAML (enterprise SSO)\n  Database: Polyglot (right tool per job)\n  CQRS: Selected services\n\nOperational Requirements:\n  - Service mesh (Istio/Linkerd)\n  - Distributed tracing (Jaeger/Tempo)\n  - Centralized logging (ELK/Loki)\n  - Circuit breakers (Resilience4j)\n  - Kubernetes/Helm\n```\n","isInternal":false,"tokens":616,"sizeBytes":2430},{"name":"pattern-selection.md","path":".agent/skills/architecture/pattern-selection.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/architecture/pattern-selection.md","title":"Architecture Skill","category":"anthropic-skill","format":"markdown","content":"# Pattern Selection Guidelines\n\n> Decision trees for choosing architectural patterns.\n\n## Main Decision Tree\n\n```\nSTART: What's your MAIN concern?\n\n┌─ Data Access Complexity?\n│  ├─ HIGH (complex queries, testing needed)\n│  │  → Repository Pattern + Unit of Work\n│  │  VALIDATE: Will data source change frequently?\n│  │     ├─ YES → Repository worth the indirection\n│  │     └─ NO  → Consider simpler ORM direct access\n│  └─ LOW (simple CRUD, single database)\n│     → ORM directly (Prisma, Drizzle)\n│     Simpler = Better, Faster\n│\n├─ Business Rules Complexity?\n│  ├─ HIGH (domain logic, rules vary by context)\n│  │  → Domain-Driven Design\n│  │  VALIDATE: Do you have domain experts on team?\n│  │     ├─ YES → Full DDD (Aggregates, Value Objects)\n│  │     └─ NO  → Partial DDD (rich entities, clear boundaries)\n│  └─ LOW (mostly CRUD, simple validation)\n│     → Transaction Script pattern\n│     Simpler = Better, Faster\n│\n├─ Independent Scaling Needed?\n│  ├─ YES (different components scale differently)\n│  │  → Microservices WORTH the complexity\n│  │  REQUIREMENTS (ALL must be true):\n│  │    - Clear domain boundaries\n│  │    - Team > 10 developers\n│  │    - Different scaling needs per service\n│  │  IF NOT ALL MET → Modular Monolith instead\n│  └─ NO (everything scales together)\n│     → Modular Monolith\n│     Can extract services later when proven needed\n│\n└─ Real-time Requirements?\n   ├─ HIGH (immediate updates, multi-user sync)\n   │  → Event-Driven Architecture\n   │  → Message Queue (RabbitMQ, Redis, Kafka)\n   │  VALIDATE: Can you handle eventual consistency?\n   │     ├─ YES → Event-driven valid\n   │     └─ NO  → Synchronous with polling\n   └─ LOW (eventual consistency acceptable)\n      → Synchronous (REST/GraphQL)\n      Simpler = Better, Faster\n```\n\n## The 3 Questions (Before ANY Pattern)\n\n1. **Problem Solved**: What SPECIFIC problem does this pattern solve?\n2. **Simpler Alternative**: Is there a simpler solution?\n3. **Deferred Complexity**: Can we add this LATER when needed?\n\n## Red Flags (Anti-patterns)\n\n| Pattern | Anti-pattern | Simpler Alternative |\n|---------|-------------|-------------------|\n| Microservices | Premature splitting | Start monolith, extract later |\n| Clean/Hexagonal | Over-abstraction | Concrete first, interfaces later |\n| Event Sourcing | Over-engineering | Append-only audit log |\n| CQRS | Unnecessary complexity | Single model |\n| Repository | YAGNI for simple CRUD | ORM direct access |\n","isInternal":false,"tokens":633,"sizeBytes":2638},{"name":"patterns-reference.md","path":".agent/skills/architecture/patterns-reference.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/architecture/patterns-reference.md","title":"Architecture Skill","category":"anthropic-skill","format":"markdown","content":"# Architecture Patterns Reference\n\n> Quick reference for common patterns with usage guidance.\n\n## Data Access Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Active Record** | Simple CRUD, rapid prototyping | Complex queries, multiple sources | Low |\n| **Repository** | Testing needed, multiple sources | Simple CRUD, single database | Medium |\n| **Unit of Work** | Complex transactions | Simple operations | High |\n| **Data Mapper** | Complex domain, performance | Simple CRUD, rapid dev | High |\n\n## Domain Logic Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Transaction Script** | Simple CRUD, procedural | Complex business rules | Low |\n| **Table Module** | Record-based logic | Rich behavior needed | Low |\n| **Domain Model** | Complex business logic | Simple CRUD | Medium |\n| **DDD (Full)** | Complex domain, domain experts | Simple domain, no experts | High |\n\n## Distributed System Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **Modular Monolith** | Small teams, unclear boundaries | Clear contexts, different scales | Medium |\n| **Microservices** | Different scales, large teams | Small teams, simple domain | Very High |\n| **Event-Driven** | Real-time, loose coupling | Simple workflows, strong consistency | High |\n| **CQRS** | Read/write performance diverges | Simple CRUD, same model | High |\n| **Saga** | Distributed transactions | Single database, simple ACID | High |\n\n## API Patterns\n\n| Pattern | When to Use | When NOT to Use | Complexity |\n|---------|-------------|-----------------|------------|\n| **REST** | Standard CRUD, resources | Real-time, complex queries | Low |\n| **GraphQL** | Flexible queries, multiple clients | Simple CRUD, caching needs | Medium |\n| **gRPC** | Internal services, performance | Public APIs, browser clients | Medium |\n| **WebSocket** | Real-time updates | Simple request/response | Medium |\n\n---\n\n## Simplicity Principle\n\n**\"Start simple, add complexity only when proven necessary.\"**\n\n- You can always add patterns later\n- Removing complexity is MUCH harder than adding it\n- When in doubt, choose simpler option\n","isInternal":false,"tokens":492,"sizeBytes":2307},{"name":"SKILL.md","path":".agent/skills/architecture/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/architecture/SKILL.md","title":"architecture","category":"anthropic-skill","format":"markdown","content":"---\nname: architecture\ndescription: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.\nallowed-tools: Read, Glob, Grep\n---\n\n# Architecture Decision Framework\n\n> \"Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale.\"\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `context-discovery.md` | Questions to ask, project classification | Starting architecture design |\n| `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |\n| `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |\n| `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |\n| `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |\n\n---\n\n## 🔗 Related Skills\n\n| Skill | Use For |\n|-------|---------|\n| `@[skills/database-design]` | Database schema design |\n| `@[skills/api-patterns]` | API design patterns |\n| `@[skills/deployment-procedures]` | Deployment architecture |\n\n---\n\n## Core Principle\n\n**\"Simplicity is the ultimate sophistication.\"**\n\n- Start simple\n- Add complexity ONLY when proven necessary\n- You can always add patterns later\n- Removing complexity is MUCH harder than adding it\n\n---\n\n## Validation Checklist\n\nBefore finalizing architecture:\n\n- [ ] Requirements clearly understood\n- [ ] Constraints identified\n- [ ] Each decision has trade-off analysis\n- [ ] Simpler alternatives considered\n- [ ] ADRs written for significant decisions\n- [ ] Team expertise matches chosen patterns\n","frontmatter":{"name":"architecture","description":"Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":366,"sizeBytes":1759},{"name":"trade-off-analysis.md","path":".agent/skills/architecture/trade-off-analysis.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/architecture/trade-off-analysis.md","title":"Architecture Skill","category":"anthropic-skill","format":"markdown","content":"# Trade-off Analysis & ADR\n\n> Document every architectural decision with trade-offs.\n\n## Decision Framework\n\nFor EACH architectural component, document:\n\n```markdown\n## Architecture Decision Record\n\n### Context\n- **Problem**: [What problem are we solving?]\n- **Constraints**: [Team size, scale, timeline, budget]\n\n### Options Considered\n\n| Option | Pros | Cons | Complexity | When Valid |\n|--------|------|------|------------|-----------|\n| Option A | Benefit 1 | Cost 1 | Low | [Conditions] |\n| Option B | Benefit 2 | Cost 2 | High | [Conditions] |\n\n### Decision\n**Chosen**: [Option B]\n\n### Rationale\n1. [Reason 1 - tied to constraints]\n2. [Reason 2 - tied to requirements]\n\n### Trade-offs Accepted\n- [What we're giving up]\n- [Why this is acceptable]\n\n### Consequences\n- **Positive**: [Benefits we gain]\n- **Negative**: [Costs/risks we accept]\n- **Mitigation**: [How we'll address negatives]\n\n### Revisit Trigger\n- [When to reconsider this decision]\n```\n\n## ADR Template\n\n```markdown\n# ADR-[XXX]: [Decision Title]\n\n## Status\nProposed | Accepted | Deprecated | Superseded by [ADR-YYY]\n\n## Context\n[What problem? What constraints?]\n\n## Decision\n[What we chose - be specific]\n\n## Rationale\n[Why - tie to requirements and constraints]\n\n## Trade-offs\n[What we're giving up - be honest]\n\n## Consequences\n- **Positive**: [Benefits]\n- **Negative**: [Costs]\n- **Mitigation**: [How to address]\n```\n\n## ADR Storage\n\n```\ndocs/\n└── architecture/\n    ├── adr-001-use-nextjs.md\n    ├── adr-002-postgresql-over-mongodb.md\n    └── adr-003-adopt-repository-pattern.md\n```\n","isInternal":false,"tokens":408,"sizeBytes":1579},{"name":"SKILL.md","path":".agent/skills/bash-linux/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/bash-linux/SKILL.md","title":"bash-linux","category":"anthropic-skill","format":"markdown","content":"---\nname: bash-linux\ndescription: Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash\n---\n\n# Bash Linux Patterns\n\n> Essential patterns for Bash on Linux/macOS.\n\n---\n\n## 1. Operator Syntax\n\n### Chaining Commands\n\n| Operator | Meaning | Example |\n|----------|---------|---------|\n| `;` | Run sequentially | `cmd1; cmd2` |\n| `&&` | Run if previous succeeded | `npm install && npm run dev` |\n| `\\|\\|` | Run if previous failed | `npm test \\|\\| echo \"Tests failed\"` |\n| `\\|` | Pipe output | `ls \\| grep \".js\"` |\n\n---\n\n## 2. File Operations\n\n### Essential Commands\n\n| Task | Command |\n|------|---------|\n| List all | `ls -la` |\n| Find files | `find . -name \"*.js\" -type f` |\n| File content | `cat file.txt` |\n| First N lines | `head -n 20 file.txt` |\n| Last N lines | `tail -n 20 file.txt` |\n| Follow log | `tail -f log.txt` |\n| Search in files | `grep -r \"pattern\" --include=\"*.js\"` |\n| File size | `du -sh *` |\n| Disk usage | `df -h` |\n\n---\n\n## 3. Process Management\n\n| Task | Command |\n|------|---------|\n| List processes | `ps aux` |\n| Find by name | `ps aux \\| grep node` |\n| Kill by PID | `kill -9 <PID>` |\n| Find port user | `lsof -i :3000` |\n| Kill port | `kill -9 $(lsof -t -i :3000)` |\n| Background | `npm run dev &` |\n| Jobs | `jobs -l` |\n| Bring to front | `fg %1` |\n\n---\n\n## 4. Text Processing\n\n### Core Tools\n\n| Tool | Purpose | Example |\n|------|---------|---------|\n| `grep` | Search | `grep -rn \"TODO\" src/` |\n| `sed` | Replace | `sed -i 's/old/new/g' file.txt` |\n| `awk` | Extract columns | `awk '{print $1}' file.txt` |\n| `cut` | Cut fields | `cut -d',' -f1 data.csv` |\n| `sort` | Sort lines | `sort -u file.txt` |\n| `uniq` | Unique lines | `sort file.txt \\| uniq -c` |\n| `wc` | Count | `wc -l file.txt` |\n\n---\n\n## 5. Environment Variables\n\n| Task | Command |\n|------|---------|\n| View all | `env` or `printenv` |\n| View one | `echo $PATH` |\n| Set temporary | `export VAR=\"value\"` |\n| Set in script | `VAR=\"value\" command` |\n| Add to PATH | `export PATH=\"$PATH:/new/path\"` |\n\n---\n\n## 6. Network\n\n| Task | Command |\n|------|---------|\n| Download | `curl -O https://example.com/file` |\n| API request | `curl -X GET https://api.example.com` |\n| POST JSON | `curl -X POST -H \"Content-Type: application/json\" -d '{\"key\":\"value\"}' URL` |\n| Check port | `nc -zv localhost 3000` |\n| Network info | `ifconfig` or `ip addr` |\n\n---\n\n## 7. Script Template\n\n```bash\n#!/bin/bash\nset -euo pipefail  # Exit on error, undefined var, pipe fail\n\n# Colors (optional)\nRED='\\033[0;31m'\nGREEN='\\033[0;32m'\nNC='\\033[0m'\n\n# Script directory\nSCRIPT_DIR=\"$(cd \"$(dirname \"${BASH_SOURCE[0]}\")\" && pwd)\"\n\n# Functions\nlog_info() { echo -e \"${GREEN}[INFO]${NC} $1\"; }\nlog_error() { echo -e \"${RED}[ERROR]${NC} $1\" >&2; }\n\n# Main\nmain() {\n    log_info \"Starting...\"\n    # Your logic here\n    log_info \"Done!\"\n}\n\nmain \"$@\"\n```\n\n---\n\n## 8. Common Patterns\n\n### Check if command exists\n\n```bash\nif command -v node &> /dev/null; then\n    echo \"Node is installed\"\nfi\n```\n\n### Default variable value\n\n```bash\nNAME=${1:-\"default_value\"}\n```\n\n### Read file line by line\n\n```bash\nwhile IFS= read -r line; do\n    echo \"$line\"\ndone < file.txt\n```\n\n### Loop over files\n\n```bash\nfor file in *.js; do\n    echo \"Processing $file\"\ndone\n```\n\n---\n\n## 9. Differences from PowerShell\n\n| Task | PowerShell | Bash |\n|------|------------|------|\n| List files | `Get-ChildItem` | `ls -la` |\n| Find files | `Get-ChildItem -Recurse` | `find . -type f` |\n| Environment | `$env:VAR` | `$VAR` |\n| String concat | `\"$a$b\"` | `\"$a$b\"` (same) |\n| Null check | `if ($x)` | `if [ -n \"$x\" ]` |\n| Pipeline | Object-based | Text-based |\n\n---\n\n## 10. Error Handling\n\n### Set options\n\n```bash\nset -e          # Exit on error\nset -u          # Exit on undefined variable\nset -o pipefail # Exit on pipe failure\nset -x          # Debug: print commands\n```\n\n### Trap for cleanup\n\n```bash\ncleanup() {\n    echo \"Cleaning up...\"\n    rm -f /tmp/tempfile\n}\ntrap cleanup EXIT\n```\n\n---\n\n> **Remember:** Bash is text-based. Use `&&` for success chains, `set -e` for safety, and quote your variables!\n","frontmatter":{"name":"bash-linux","description":"Bash/Linux terminal patterns. Critical commands, piping, error handling, scripting. Use when working on macOS or Linux systems.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":1288,"sizeBytes":4156},{"name":"SKILL.md","path":".agent/skills/behavioral-modes/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/behavioral-modes/SKILL.md","title":"behavioral-modes","category":"anthropic-skill","format":"markdown","content":"---\nname: behavioral-modes\ndescription: AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.\nallowed-tools: Read, Glob, Grep\n---\n\n# Behavioral Modes - Adaptive AI Operating Modes\n\n## Purpose\nThis skill defines distinct behavioral modes that optimize AI performance for specific tasks. Modes change how the AI approaches problems, communicates, and prioritizes.\n\n---\n\n## Available Modes\n\n### 1. 🧠 BRAINSTORM Mode\n\n**When to use:** Early project planning, feature ideation, architecture decisions\n\n**Behavior:**\n- Ask clarifying questions before assumptions\n- Offer multiple alternatives (at least 3)\n- Think divergently - explore unconventional solutions\n- No code yet - focus on ideas and options\n- Use visual diagrams (mermaid) to explain concepts\n\n**Output style:**\n```\n\"Let's explore this together. Here are some approaches:\n\nOption A: [description]\n  ✅ Pros: ...\n  ❌ Cons: ...\n\nOption B: [description]\n  ✅ Pros: ...\n  ❌ Cons: ...\n\nWhat resonates with you? Or should we explore a different direction?\"\n```\n\n---\n\n### 2. ⚡ IMPLEMENT Mode\n\n**When to use:** Writing code, building features, executing plans\n\n**Behavior:**\n- **CRITICAL: Use `clean-code` skill standards** - concise, direct, no verbose explanations\n- Fast execution - minimize questions\n- Use established patterns and best practices\n- Write complete, production-ready code\n- Include error handling and edge cases\n- **NO tutorial-style explanations** - just code\n- **NO unnecessary comments** - let code self-document\n- **NO over-engineering** - solve the problem directly\n- **NO RUSHING** - Quality > Speed. Read ALL references before coding.\n\n**Output style:**\n```\n[Code block]\n\n[Brief summary, max 1-2 sentences]\n```\n\n**NOT:**\n```\n\"Building [feature]...\n\n✓ Created [file1]\n✓ Created [file2]\n✓ Updated [file3]\n\n[long explanation]\n\nRun `npm run dev` to test.\"\n```\n\n---\n\n### 3. 🔍 DEBUG Mode\n\n**When to use:** Fixing bugs, troubleshooting errors, investigating issues\n\n**Behavior:**\n- Ask for error messages and reproduction steps\n- Think systematically - check logs, trace data flow\n- Form hypothesis → test → verify\n- Explain the root cause, not just the fix\n- Prevent future occurrences\n\n**Output style:**\n```\n\"Investigating...\n\n🔍 Symptom: [what's happening]\n🎯 Root cause: [why it's happening]\n✅ Fix: [the solution]\n🛡️ Prevention: [how to avoid in future]\n```\n\n---\n\n### 4. 📋 REVIEW Mode\n\n**When to use:** Code review, architecture review, security audit\n\n**Behavior:**\n- Be thorough but constructive\n- Categorize by severity (Critical/High/Medium/Low)\n- Explain the \"why\" behind suggestions\n- Offer improved code examples\n- Acknowledge what's done well\n\n**Output style:**\n```\n## Code Review: [file/feature]\n\n### 🔴 Critical\n- [issue with explanation]\n\n### 🟠 Improvements\n- [suggestion with example]\n\n### 🟢 Good\n- [positive observation]\n```\n\n---\n\n### 5. 📚 TEACH Mode\n\n**When to use:** Explaining concepts, documentation, onboarding\n\n**Behavior:**\n- Explain from fundamentals\n- Use analogies and examples\n- Progress from simple to complex\n- Include practical exercises\n- Check understanding\n\n**Output style:**\n```\n## Understanding [Concept]\n\n### What is it?\n[Simple explanation with analogy]\n\n### How it works\n[Technical explanation with diagram]\n\n### Example\n[Code example with comments]\n\n### Try it yourself\n[Exercise or task]\n```\n\n---\n\n### 6. 🚀 SHIP Mode\n\n**When to use:** Production deployment, final polish, release preparation\n\n**Behavior:**\n- Focus on stability over features\n- Check for missing error handling\n- Verify environment configs\n- Run all tests\n- Create deployment checklist\n\n**Output style:**\n```\n## Pre-Ship Checklist\n\n### ✅ Code Quality\n- [ ] No TypeScript errors\n- [ ] ESLint passing\n- [ ] All tests passing\n\n### ✅ Security\n- [ ] No exposed secrets\n- [ ] Input validation complete\n\n### ✅ Performance\n- [ ] Bundle size acceptable\n- [ ] No console.logs\n\n### 🚀 Ready to deploy\n```\n\n---\n\n## Mode Detection\n\nThe AI should automatically detect the appropriate mode based on:\n\n| Trigger | Mode |\n|---------|------|\n| \"what if\", \"ideas\", \"options\" | BRAINSTORM |\n| \"build\", \"create\", \"add\" | IMPLEMENT |\n| \"not working\", \"error\", \"bug\" | DEBUG |\n| \"review\", \"check\", \"audit\" | REVIEW |\n| \"explain\", \"how does\", \"learn\" | TEACH |\n| \"deploy\", \"release\", \"production\" | SHIP |\n\n---\n\n## Multi-Agent Collaboration Patterns (2025)\n\nModern architectures optimized for agent-to-agent collaboration:\n\n### 1. 🔭 EXPLORE Mode\n**Role:** Discovery and Analysis (Explorer Agent)\n**Behavior:** Socratic questioning, deep-dive code reading, dependency mapping.\n**Output:** `discovery-report.json`, architectural visualization.\n\n### 2. 🗺️ PLAN-EXECUTE-CRITIC (PEC)\nCyclic mode transitions for high-complexity tasks:\n1. **Planner:** Decomposes the task into atomic steps (`task.md`).\n2. **Executor:** Performs the actual coding (`IMPLEMENT`).\n3. **Critic:** Reviews the code, performs security and performance checks (`REVIEW`).\n\n### 3. 🧠 MENTAL MODEL SYNC\nBehavior for creating and loading \"Mental Model\" summaries to preserve context between sessions.\n\n---\n\n## Combining Modes\n\n---\n\n## Manual Mode Switching\n\nUsers can explicitly request a mode:\n\n```\n/brainstorm new feature ideas\n/implement the user profile page\n/debug why login fails\n/review this pull request\n```\n","frontmatter":{"name":"behavioral-modes","description":"AI operational modes (brainstorm, implement, debug, review, teach, ship, orchestrate). Use to adapt behavior based on task type.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1313,"sizeBytes":5379},{"name":"dynamic-questioning.md","path":".agent/skills/brainstorming/dynamic-questioning.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/brainstorming/dynamic-questioning.md","title":"Brainstorming Skill","category":"anthropic-skill","format":"markdown","content":"# Dynamic Question Generation\n\n> **PRINCIPLE:** Questions are not about gathering data—they are about **revealing architectural consequences**.\n>\n> Every question must connect to a concrete implementation decision that affects cost, complexity, or timeline.\n\n---\n\n## 🧠 Core Principles\n\n### 1. Questions Reveal Consequences\n\nA good question is not \"What color do you want?\" but:\n\n```markdown\n❌ BAD: \"What authentication method?\"\n✅ GOOD: \"Should users sign up with email/password or social login?\n\n   Impact:\n   - Email/Pass → Need password reset, hashing, 2FA infrastructure\n   - Social → OAuth providers, user profile mapping, less control\n\n   Trade-off: Security vs. Development time vs. User friction\"\n```\n\n### 2. Context Before Content\n\nFirst understand **where** this request fits:\n\n| Context | Question Focus |\n|---------|----------------|\n| **Greenfield** (new project) | Foundation decisions: stack, hosting, scale |\n| **Feature Addition** | Integration points, existing patterns, breaking changes |\n| **Refactor** | Why refactor? Performance? Maintainability? What's broken? |\n| **Debug** | Symptoms → Root cause → Reproduction path |\n\n### 3. Minimum Viable Questions\n\n**PRINCIPLE:** Each question must eliminate a fork in the implementation road.\n\n```\nBefore Question:\n├── Path A: Do X (5 min)\n├── Path B: Do Y (15 min)\n└── Path C: Do Z (1 hour)\n\nAfter Question:\n└── Path Confirmed: Do X (5 min)\n```\n\nIf a question doesn't reduce implementation paths → **DELETE IT**.\n\n### 4. Questions Generate Data, Not Assumptions\n\n```markdown\n❌ ASSUMPTION: \"User probably wants Stripe for payments\"\n✅ QUESTION: \"Which payment provider fits your needs?\n\n   Stripe → Best documentation, 2.9% + $0.30, US-centric\n   LemonSqueezy → Merchant of Record, 5% + $0.50, global taxes\n   Paddle → Complex pricing, handles EU VAT, enterprise focus\"\n```\n\n---\n\n## 📋 Question Generation Algorithm\n\n```\nINPUT: User request + Context (greenfield/feature/refactor/debug)\n│\n├── STEP 1: Parse Request\n│   ├── Extract domain (ecommerce, auth, realtime, cms, etc.)\n│   ├── Extract features (explicit and implied)\n│   └── Extract scale indicators (users, data volume, frequency)\n│\n├── STEP 2: Identify Decision Points\n│   ├── What MUST be decided before coding? (blocking)\n│   ├── What COULD be decided later? (deferable)\n│   └── What has ARCHITECTURAL impact? (high-leverage)\n│\n├── STEP 3: Generate Questions (Priority Order)\n│   ├── P0: Blocking decisions (cannot proceed without answer)\n│   ├── P1: High-leverage (affects >30% of implementation)\n│   ├── P2: Medium-leverage (affects specific features)\n│   └── P3: Nice-to-have (edge cases, optimization)\n│\n└── STEP 4: Format Each Question\n    ├── What: Clear question\n    ├── Why: Impact on implementation\n    ├── Options: Trade-offs (not just A vs B)\n    └── Default: What happens if user doesn't answer\n```\n\n---\n\n## 🎯 Domain-Specific Question Banks\n\n### E-Commerce\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Single or Multi-vendor?** | Multi-vendor → Commission logic, vendor dashboards, split payments | +Revenue, -Complexity |\n| **Inventory Tracking?** | Needs stock tables, reservation logic, low-stock alerts | +Accuracy, -Development time |\n| **Digital or Physical Products?** | Digital → Download links, no shipping | Physical → Shipping APIs, tracking |\n| **Subscription or One-time?** | Subscription → Recurring billing, dunning, proration | +Revenue, -Complexity |\n\n### Authentication\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Social Login Needed?** | OAuth providers vs. password reset infrastructure | +UX, -Control |\n| **Role-Based Permissions?** | RBAC tables, policy enforcement, admin UI | +Security, -Development time |\n| **2FA Required?** | TOTP/SMI infrastructure, backup codes, recovery flow | +Security, -UX friction |\n| **Email Verification?** | Verification tokens, email service, resend logic | +Security, -Sign-up friction |\n\n### Real-time\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **WebSocket or Polling?** | WS → Server scaling, connection management | Polling → Simpler, higher latency |\n| **Expected Concurrent Users?** | <100 → Single server, >1000 → Redis pub/sub, >10k → specialized infra | +Scale, -Complexity |\n| **Message Persistence?** | History tables, storage costs, pagination | +UX, -Storage |\n| **Ephemeral or Durable?** | Ephemeral → In-memory, Durable → Database write before emit | +Reliability, -Latency |\n\n### Content/CMS\n\n| Question | Why It Matters | Trade-offs |\n|----------|----------------|------------|\n| **Rich Text or Markdown?** | Rich Text → Sanitization, XSS risks | Markdown → Simple, no WYSIWYG |\n| **Draft/Publish Workflow?** | Status field, scheduled jobs, versioning | +Control, -Complexity |\n| **Media Handling?** | Upload endpoints, storage, optimization | +Features, -Development time |\n| **Multi-language?** | i18n tables, translation UI, fallback logic | +Reach, -Complexity |\n\n---\n\n## 📐 Dynamic Question Template\n\n```markdown\nBased on your request for [DOMAIN] [FEATURE]:\n\n## 🔴 CRITICAL (Blocking Decisions)\n\n### 1. **[DECISION POINT]**\n\n**Question:** [Clear, specific question]\n\n**Why This Matters:**\n- [Explain architectural consequence]\n- [Affects: cost / complexity / timeline / scale]\n\n**Options:**\n| Option | Pros | Cons | Best For |\n|--------|------|------|----------|\n| A | [Advantage] | [Disadvantage] | [Use case] |\n| B | [Advantage] | [Disadvantage] | [Use case] |\n\n**If Not Specified:** [Default choice + rationale]\n\n---\n\n## 🟡 HIGH-LEVERAGE (Affects Implementation)\n\n### 2. **[DECISION POINT]**\n[Same format]\n\n---\n\n## 🟢 NICE-TO-HAVE (Edge Cases)\n\n### 3. **[DECISION POINT]**\n[Same format]\n```\n\n---\n\n## 🔄 Iterative Questioning\n\n### First Pass (3-5 Questions)\nFocus on **blocking decisions**. Don't proceed without answers.\n\n### Second Pass (After Initial Implementation)\nAs patterns emerge, ask:\n- \"This feature implies [X]. Should we handle [edge case] now or defer?\"\n- \"We're using [Pattern A]. Should [Feature B] follow the same pattern?\"\n\n### Third Pass (Optimization)\nWhen functionality works:\n- \"Performance bottleneck at [X]. Optimize now or acceptable for now?\"\n- \"Refactor [Y] for maintainability or ship as-is?\"\n\n---\n\n## 🎭 Example: Full Question Generation\n\n```\nUSER REQUEST: \"Build an Instagram clone\"\n\nSTEP 1: Parse\n├── Domain: Social Media\n├── Features: Photo sharing, engagement (likes/comments), user profiles\n├── Implied: Feed, following, authentication\n└── Scale: Potentially high (social apps go viral)\n\nSTEP 2: Decision Points\n├── Blocking: Storage strategy, authentication method, feed type\n├── High-leverage: Real-time notifications, data model complexity\n└── Deferable: Analytics, advanced search, reels/video\n\nSTEP 3: Generate Questions (Priority)\n\nP0 (Blocking):\n1. Storage Strategy → Affects architecture, cost, speed\n2. Feed Algorithm → Affects database queries, complexity\n3. Auth Method → Affects dev time, UX, security\n\nP1 (High-leverage):\n4. Real-time Notifications → WebSocket vs polling\n5. Media Processing → Client-side vs server-side optimization\n\nP2 (Deferable):\n6. Story/Reels → Major feature creep, defer to v2\n7. DM/Chat → Separate subsystem, defer to v2\n\nSTEP 4: Format Output\n```\n\n---\n\n## 📊 Generated Output (Example)\n\n```\nBased on your Instagram clone request:\n\n## 🔴 CRITICAL DECISIONS (Cannot Proceed Without Answers)\n\n### 1. **Photo Storage Strategy**\n\n**Question:** Where will user photos be stored and served?\n\n**Why This Matters:**\n- Affects: Monthly hosting costs, page load speed, CDN complexity\n- High-volume social apps: 1000 users × 10 photos × 2MB = 20GB storage\n\n**Options:**\n| Option | Cost | Speed | Complexity | Best For |\n|--------|------|-------|------------|----------|\n| **Cloudinary** | $89/mo (25GB) | Fast (CDN) | Low | MVP, rapid launch |\n| **AWS S3 + CloudFront** | $0.023/GB | Fast (CDN) | Medium | Production, cost-optimized |\n| **Supabase Storage** | Free tier 1GB | Medium | Low | Small scale, simple |\n| **Local Storage** | Server cost | Slow | Low | Development only |\n\n**If Not Specified:** Cloudinary (balanced for MVP)\n\n---\n\n### 2. **Feed Algorithm Choice**\n\n**Question:** How should the main feed work?\n\n**Why This Matters:**\n- Affects: Database query complexity, caching strategy, development time\n- Algorithmic feeds require ML infrastructure, ranking signals\n\n**Options:**\n| Option | Complexity | Database Impact | Best For |\n|--------|------------|-----------------|----------|\n| **Chronological** | Low | Simple query | Early stage, transparency |\n| **Follow-Only** | Medium | JOIN with pagination | Most social apps |\n| **Algorithmic** | High | Pre-computed feed tables | Instagram competitor |\n\n**If Not Specified:** Follow-Only (balanced for social app)\n\n---\n\n### 3. **Authentication Approach**\n\n**Question:** How do users sign up and login?\n\n**Why This Matters:**\n- Affects: Development time (2-5 hours), security posture, UX friction\n\n**Options:**\n| Option | Dev Time | Security | UX | Best For |\n|--------|----------|----------|-----|----------|\n| **Email/Password** | 4-5 hrs | High (if 2FA) | Medium | Full control needed |\n| **Social Only** | 1-2 hrs | Provider-dependent | Smooth | B2C, rapid launch |\n| **Magic Link** | 2-3 hrs | Medium | Very smooth | Security-focused |\n| **Clerk/Auth0** | 1 hr | High | Smooth | Fastest to market |\n\n**If Not Specified:** Clerk (fastest for MVP)\n\n---\n\n## 🟡 HIGH-LEVERAGE (Affects Architecture)\n\n### 4. **Real-time Notifications**\n\n**Question:** Do users need instant notifications for likes/comments?\n\n**Why This Matters:**\n- WebSocket adds infrastructure complexity (Redis pub/sub for scaling)\n- Polling is simpler but higher latency\n\n**Options:**\n| Option | Complexity | Scale Cost | Best For |\n|--------|------------|------------|----------|\n| **WebSocket + Redis** | High | $10+/mo | >1000 concurrent users |\n| **Polling (30s)** | Low | DB queries | <1000 users |\n| **No Real-time** | None | None | MVP, validate first |\n\n**If Not Specified:** Polling for MVP (defer WebSocket until validated)\n\n---\n\n## 🟢 NICE-TO-HAVE (Defer to v2)\n\n### 5. **Video/Reels Support**\n- Major complexity (video processing, streaming infrastructure)\n- Recommendation: Launch with photos only, add video after validation\n\n### 6. **Direct Messaging**\n- Separate subsystem (chat infrastructure different from feed)\n- Recommendation: Use Pusher/Stream for real-time or defer entirely\n\n---\n\n## 📋 Summary\n\n| Decision | Recommendation | If Changed |\n|----------|----------------|------------|\n| Storage | Cloudinary | +3 hrs setup |\n| Feed | Follow-only | +2 hrs query optimization |\n| Auth | Clerk | -3 hrs dev time |\n| Real-time | Polling | +5 hrs WebSocket setup |\n| Video | Defer to v2 | N/A |\n| DM | Defer to v2 | N/A |\n\n**Total Estimated MVP Time:** 15-20 hours with recommendations above\n```\n\n---\n\n## 🎯 Principles Recap\n\n1. **Every question = Architectural decision** → Not data gathering\n2. **Show trade-offs** → User understands consequences\n3. **Prioritize blocking decisions** → Cannot proceed without\n4. **Provide defaults** → If user doesn't answer, we proceed anyway\n5. **Domain-aware** → Ecommerce questions ≠ Auth questions ≠ Real-time questions\n6. **Iterative** → More questions as patterns emerge during implementation\n","isInternal":false,"tokens":2846,"sizeBytes":11619},{"name":"SKILL.md","path":".agent/skills/brainstorming/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/brainstorming/SKILL.md","title":"brainstorming","category":"anthropic-skill","format":"markdown","content":"---\nname: brainstorming\ndescription: Socratic questioning protocol + user communication. MANDATORY for complex requests, new features, or unclear requirements. Includes progress reporting and error handling.\nallowed-tools: Read, Glob, Grep\n---\n\n# Brainstorming & Communication Protocol\n\n> **MANDATORY:** Use for complex/vague requests, new features, updates.\n\n---\n\n## 🛑 SOCRATIC GATE (ENFORCEMENT)\n\n### When to Trigger\n\n| Pattern | Action |\n|---------|--------|\n| \"Build/Create/Make [thing]\" without details | 🛑 ASK 3 questions |\n| Complex feature or architecture | 🛑 Clarify before implementing |\n| Update/change request | 🛑 Confirm scope |\n| Vague requirements | 🛑 Ask purpose, users, constraints |\n\n### 🚫 MANDATORY: 3 Questions Before Implementation\n\n1. **STOP** - Do NOT start coding\n2. **ASK** - Minimum 3 questions:\n   - 🎯 Purpose: What problem are you solving?\n   - 👥 Users: Who will use this?\n   - 📦 Scope: Must-have vs nice-to-have?\n3. **WAIT** - Get response before proceeding\n\n---\n\n## 🧠 Dynamic Question Generation\n\n**⛔ NEVER use static templates.** Read `dynamic-questioning.md` for principles.\n\n### Core Principles\n\n| Principle | Meaning |\n|-----------|---------|\n| **Questions Reveal Consequences** | Each question connects to an architectural decision |\n| **Context Before Content** | Understand greenfield/feature/refactor/debug context first |\n| **Minimum Viable Questions** | Each question must eliminate implementation paths |\n| **Generate Data, Not Assumptions** | Don't guess—ask with trade-offs |\n\n### Question Generation Process\n\n```\n1. Parse request → Extract domain, features, scale indicators\n2. Identify decision points → Blocking vs. deferable\n3. Generate questions → Priority: P0 (blocking) > P1 (high-leverage) > P2 (nice-to-have)\n4. Format with trade-offs → What, Why, Options, Default\n```\n\n### Question Format (MANDATORY)\n\n```markdown\n### [PRIORITY] **[DECISION POINT]**\n\n**Question:** [Clear question]\n\n**Why This Matters:**\n- [Architectural consequence]\n- [Affects: cost/complexity/timeline/scale]\n\n**Options:**\n| Option | Pros | Cons | Best For |\n|--------|------|------|----------|\n| A | [+] | [-] | [Use case] |\n\n**If Not Specified:** [Default + rationale]\n```\n\n**For detailed domain-specific question banks and algorithms**, see: `dynamic-questioning.md`\n\n---\n\n## Progress Reporting (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Transparency builds trust. Status must be visible and actionable.\n\n### Status Board Format\n\n| Agent | Status | Current Task | Progress |\n|-------|--------|--------------|----------|\n| [Agent Name] | ✅🔄⏳❌⚠️ | [Task description] | [% or count] |\n\n### Status Icons\n\n| Icon | Meaning | Usage |\n|------|---------|-------|\n| ✅ | Completed | Task finished successfully |\n| 🔄 | Running | Currently executing |\n| ⏳ | Waiting | Blocked, waiting for dependency |\n| ❌ | Error | Failed, needs attention |\n| ⚠️ | Warning | Potential issue, not blocking |\n\n---\n\n## Error Handling (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Errors are opportunities for clear communication.\n\n### Error Response Pattern\n\n```\n1. Acknowledge the error\n2. Explain what happened (user-friendly)\n3. Offer specific solutions with trade-offs\n4. Ask user to choose or provide alternative\n```\n\n### Error Categories\n\n| Category | Response Strategy |\n|----------|-------------------|\n| **Port Conflict** | Offer alternative port or close existing |\n| **Dependency Missing** | Auto-install or ask permission |\n| **Build Failure** | Show specific error + suggested fix |\n| **Unclear Error** | Ask for specifics: screenshot, console output |\n\n---\n\n## Completion Message (PRINCIPLE-BASED)\n\n**PRINCIPLE:** Celebrate success, guide next steps.\n\n### Completion Structure\n\n```\n1. Success confirmation (celebrate briefly)\n2. Summary of what was done (concrete)\n3. How to verify/test (actionable)\n4. Next steps suggestion (proactive)\n```\n\n---\n\n## Communication Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Concise** | No unnecessary details, get to point |\n| **Visual** | Use emojis (✅🔄⏳❌) for quick scanning |\n| **Specific** | \"~2 minutes\" not \"wait a bit\" |\n| **Alternatives** | Offer multiple paths when stuck |\n| **Proactive** | Suggest next step after completion |\n\n---\n\n## Anti-Patterns (AVOID)\n\n| Anti-Pattern | Why |\n|--------------|-----|\n| Jumping to solutions before understanding | Wastes time on wrong problem |\n| Assuming requirements without asking | Creates wrong output |\n| Over-engineering first version | Delays value delivery |\n| Ignoring constraints | Creates unusable solutions |\n| \"I think\" phrases | Uncertainty → Ask instead |\n\n---\n","frontmatter":{"name":"brainstorming","description":"Socratic questioning protocol + user communication. MANDATORY for complex requests, new features, or unclear requirements. Includes progress reporting and error handling.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1106,"sizeBytes":4660},{"name":"SKILL.md","path":".agent/skills/clean-code/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/clean-code/SKILL.md","title":"clean-code","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fclean-code%2FSKILL.md -->","frontmatter":{"name":"clean-code","description":"Pragmatic coding standards - concise, direct, no over-engineering, no unnecessary comments","allowed-tools":"Read, Write, Edit","version":2,"priority":"CRITICAL","allowedTools":["Read,","Write,","Edit"]},"allowedTools":["Read,","Write,","Edit"],"isInternal":false,"tokens":1697,"sizeBytes":6676},{"name":"SKILL.md","path":".agent/skills/code-review-checklist/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/code-review-checklist/SKILL.md","title":"code-review-checklist","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fcode-review-checklist%2FSKILL.md -->","frontmatter":{"name":"code-review-checklist","description":"Code review guidelines covering code quality, security, and best practices.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":654,"sizeBytes":2574},{"name":"database-selection.md","path":".agent/skills/database-design/database-selection.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/database-selection.md","title":"Database-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fdatabase-selection.md -->","isInternal":false,"tokens":280,"sizeBytes":1137},{"name":"indexing.md","path":".agent/skills/database-design/indexing.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/indexing.md","title":"Database-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Findexing.md -->","isInternal":false,"tokens":221,"sizeBytes":892},{"name":"migrations.md","path":".agent/skills/database-design/migrations.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/migrations.md","title":"Database-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fmigrations.md -->","isInternal":false,"tokens":252,"sizeBytes":1107},{"name":"optimization.md","path":".agent/skills/database-design/optimization.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/optimization.md","title":"Database-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Foptimization.md -->","isInternal":false,"tokens":227,"sizeBytes":902},{"name":"orm-selection.md","path":".agent/skills/database-design/orm-selection.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/orm-selection.md","title":"Database-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Form-selection.md -->","isInternal":false,"tokens":203,"sizeBytes":771},{"name":"schema-design.md","path":".agent/skills/database-design/schema-design.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/schema-design.md","title":"Database-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2Fschema-design.md -->","isInternal":false,"tokens":343,"sizeBytes":1470},{"name":"SKILL.md","path":".agent/skills/database-design/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/database-design/SKILL.md","title":"database-design","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdatabase-design%2FSKILL.md -->","frontmatter":{"name":"database-design","description":"Database design principles and decision-making. Schema design, indexing strategy, ORM selection, serverless databases.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":354,"sizeBytes":1527},{"name":"SKILL.md","path":".agent/skills/deployment-procedures/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/deployment-procedures/SKILL.md","title":"deployment-procedures","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdeployment-procedures%2FSKILL.md -->","frontmatter":{"name":"deployment-procedures","description":"Production deployment principles and decision-making. Safe deployment workflows, rollback strategies, and verification. Teaches thinking, not scripts.","allowed-tools":"Read, Glob, Grep, Bash","allowedTools":["Read,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":1401,"sizeBytes":5708},{"name":"doc.md","path":".agent/skills/doc.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/doc.md","title":"Skills Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdoc.md -->","isInternal":false,"tokens":1642,"sizeBytes":5417},{"name":"SKILL.md","path":".agent/skills/docker-expert/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/docker-expert/SKILL.md","title":"docker-expert","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdocker-expert%2FSKILL.md -->","frontmatter":{"name":"docker-expert","description":"Docker containerization expert with deep knowledge of multi-stage builds, image optimization, container security, Docker Compose orchestration, and production deployment patterns. Use PROACTIVELY for Dockerfile optimization, container issues, image size problems, security hardening, networking, and orchestration challenges.","category":"devops","color":"blue","displayName":"Docker Expert"},"isInternal":false,"tokens":3222,"sizeBytes":14062},{"name":"SKILL.md","path":".agent/skills/documentation-templates/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/documentation-templates/SKILL.md","title":"documentation-templates","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fdocumentation-templates%2FSKILL.md -->","frontmatter":{"name":"documentation-templates","description":"Documentation templates and structure guidelines. README, API docs, code comments, and AI-friendly documentation.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":830,"sizeBytes":3312},{"name":"animation-guide.md","path":".agent/skills/frontend-design/animation-guide.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/animation-guide.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fanimation-guide.md -->","isInternal":false,"tokens":1954,"sizeBytes":8035},{"name":"color-system.md","path":".agent/skills/frontend-design/color-system.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/color-system.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fcolor-system.md -->","isInternal":false,"tokens":2379,"sizeBytes":9631},{"name":"decision-trees.md","path":".agent/skills/frontend-design/decision-trees.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/decision-trees.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fdecision-trees.md -->","isInternal":false,"tokens":3162,"sizeBytes":17265},{"name":"motion-graphics.md","path":".agent/skills/frontend-design/motion-graphics.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/motion-graphics.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fmotion-graphics.md -->","isInternal":false,"tokens":1995,"sizeBytes":7999},{"name":"SKILL.md","path":".agent/skills/frontend-design/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/SKILL.md","title":"frontend-design","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2FSKILL.md -->","frontmatter":{"name":"frontend-design","description":"Design thinking and decision-making for web UI. Use when designing components, layouts, color schemes, typography, or creating aesthetic interfaces. Teaches principles, not fixed values.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":2994,"sizeBytes":11756},{"name":"typography-system.md","path":".agent/skills/frontend-design/typography-system.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/typography-system.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Ftypography-system.md -->","isInternal":false,"tokens":2200,"sizeBytes":8523},{"name":"ux-psychology.md","path":".agent/skills/frontend-design/ux-psychology.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/ux-psychology.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fux-psychology.md -->","isInternal":false,"tokens":3615,"sizeBytes":15756},{"name":"visual-effects.md","path":".agent/skills/frontend-design/visual-effects.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/frontend-design/visual-effects.md","title":"Frontend-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ffrontend-design%2Fvisual-effects.md -->","isInternal":false,"tokens":2143,"sizeBytes":8362},{"name":"SKILL.md","path":".agent/skills/game-development/2d-games/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/2d-games/SKILL.md","title":"2d-games","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2F2d-games%2FSKILL.md -->","frontmatter":{"name":"2d-games","description":"2D game development principles. Sprites, tilemaps, physics, camera.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":562,"sizeBytes":2190},{"name":"SKILL.md","path":".agent/skills/game-development/3d-games/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/3d-games/SKILL.md","title":"3d-games","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2F3d-games%2FSKILL.md -->","frontmatter":{"name":"3d-games","description":"3D game development principles. Rendering, shaders, physics, cameras.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":662,"sizeBytes":2563},{"name":"SKILL.md","path":".agent/skills/game-development/game-art/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/game-art/SKILL.md","title":"game-art","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-art%2FSKILL.md -->","frontmatter":{"name":"game-art","description":"Game art principles. Visual style selection, asset pipeline, animation workflow.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1307,"sizeBytes":5049},{"name":"SKILL.md","path":".agent/skills/game-development/game-audio/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/game-audio/SKILL.md","title":"game-audio","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-audio%2FSKILL.md -->","frontmatter":{"name":"game-audio","description":"Game audio principles. Sound design, music integration, adaptive audio systems.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1325,"sizeBytes":5361},{"name":"SKILL.md","path":".agent/skills/game-development/game-design/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/game-design/SKILL.md","title":"game-design","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fgame-design%2FSKILL.md -->","frontmatter":{"name":"game-design","description":"Game design principles. GDD structure, balancing, player psychology, progression.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":649,"sizeBytes":2645},{"name":"SKILL.md","path":".agent/skills/game-development/mobile-games/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/mobile-games/SKILL.md","title":"mobile-games","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fmobile-games%2FSKILL.md -->","frontmatter":{"name":"mobile-games","description":"Mobile game development principles. Touch input, battery, performance, app stores.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":528,"sizeBytes":2282},{"name":"SKILL.md","path":".agent/skills/game-development/multiplayer/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/multiplayer/SKILL.md","title":"multiplayer","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fmultiplayer%2FSKILL.md -->","frontmatter":{"name":"multiplayer","description":"Multiplayer game development principles. Architecture, networking, synchronization.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":672,"sizeBytes":2813},{"name":"SKILL.md","path":".agent/skills/game-development/pc-games/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/pc-games/SKILL.md","title":"pc-games","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fpc-games%2FSKILL.md -->","frontmatter":{"name":"pc-games","description":"PC and console game development principles. Engine selection, platform features, optimization strategies.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":738,"sizeBytes":2973},{"name":"SKILL.md","path":".agent/skills/game-development/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/SKILL.md","title":"game-development","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2FSKILL.md -->","frontmatter":{"name":"game-development","description":"Game development orchestrator. Routes to platform-specific skills based on project needs.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":1163,"sizeBytes":4682},{"name":"SKILL.md","path":".agent/skills/game-development/vr-ar/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/vr-ar/SKILL.md","title":"vr-ar","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fvr-ar%2FSKILL.md -->","frontmatter":{"name":"vr-ar","description":"VR/AR development principles. Comfort, interaction, performance requirements.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":631,"sizeBytes":2379},{"name":"SKILL.md","path":".agent/skills/game-development/web-games/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/game-development/web-games/SKILL.md","title":"web-games","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgame-development%2Fweb-games%2FSKILL.md -->","frontmatter":{"name":"web-games","description":"Web browser game development principles. Framework selection, WebGPU, optimization, PWA.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":792,"sizeBytes":3073},{"name":"SKILL.md","path":".agent/skills/geo-fundamentals/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/geo-fundamentals/SKILL.md","title":"geo-fundamentals","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fgeo-fundamentals%2FSKILL.md -->","frontmatter":{"name":"geo-fundamentals","description":"Generative Engine Optimization for AI search engines (ChatGPT, Claude, Perplexity).","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":875,"sizeBytes":3445},{"name":"SKILL.md","path":".agent/skills/i18n-localization/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/i18n-localization/SKILL.md","title":"i18n-localization","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fi18n-localization%2FSKILL.md -->","frontmatter":{"name":"i18n-localization","description":"Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":790,"sizeBytes":3121},{"name":"SKILL.md","path":".agent/skills/lint-and-validate/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/lint-and-validate/SKILL.md","title":"lint-and-validate","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Flint-and-validate%2FSKILL.md -->","isInternal":false,"tokens":450,"sizeBytes":1727},{"name":"SKILL.md","path":".agent/skills/mcp-builder/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mcp-builder/SKILL.md","title":"mcp-builder","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmcp-builder%2FSKILL.md -->","frontmatter":{"name":"mcp-builder","description":"MCP (Model Context Protocol) server building principles. Tool design, resource patterns, best practices.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":775,"sizeBytes":3308},{"name":"decision-trees.md","path":".agent/skills/mobile-design/decision-trees.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/decision-trees.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fdecision-trees.md -->","isInternal":false,"tokens":3647,"sizeBytes":16320},{"name":"mobile-backend.md","path":".agent/skills/mobile-design/mobile-backend.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-backend.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-backend.md -->","isInternal":false,"tokens":3425,"sizeBytes":14686},{"name":"mobile-color-system.md","path":".agent/skills/mobile-design/mobile-color-system.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-color-system.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-color-system.md -->","isInternal":false,"tokens":2688,"sizeBytes":10211},{"name":"mobile-debugging.md","path":".agent/skills/mobile-design/mobile-debugging.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-debugging.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-debugging.md -->","isInternal":false,"tokens":1092,"sizeBytes":4250},{"name":"mobile-design-thinking.md","path":".agent/skills/mobile-design/mobile-design-thinking.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-design-thinking.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-design-thinking.md -->","isInternal":false,"tokens":3212,"sizeBytes":17227},{"name":"mobile-navigation.md","path":".agent/skills/mobile-design/mobile-navigation.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-navigation.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-navigation.md -->","isInternal":false,"tokens":2782,"sizeBytes":11855},{"name":"mobile-performance.md","path":".agent/skills/mobile-design/mobile-performance.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-performance.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-performance.md -->","isInternal":false,"tokens":4682,"sizeBytes":19305},{"name":"mobile-testing.md","path":".agent/skills/mobile-design/mobile-testing.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-testing.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-testing.md -->","isInternal":false,"tokens":2687,"sizeBytes":11027},{"name":"mobile-typography.md","path":".agent/skills/mobile-design/mobile-typography.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/mobile-typography.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fmobile-typography.md -->","isInternal":false,"tokens":3134,"sizeBytes":10717},{"name":"platform-android.md","path":".agent/skills/mobile-design/platform-android.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/platform-android.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fplatform-android.md -->","isInternal":false,"tokens":4330,"sizeBytes":19541},{"name":"platform-ios.md","path":".agent/skills/mobile-design/platform-ios.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/platform-ios.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Fplatform-ios.md -->","isInternal":false,"tokens":3724,"sizeBytes":17127},{"name":"SKILL.md","path":".agent/skills/mobile-design/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/SKILL.md","title":"mobile-design","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2FSKILL.md -->","frontmatter":{"name":"mobile-design","description":"Mobile-first design thinking and decision-making for iOS and Android apps. Touch interaction, performance patterns, platform conventions. Teaches principles, not fixed values. Use when building React Native, Flutter, or native mobile apps.","allowed-tools":"Read, Glob, Grep, Bash","allowedTools":["Read,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":3615,"sizeBytes":15455},{"name":"touch-psychology.md","path":".agent/skills/mobile-design/touch-psychology.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/mobile-design/touch-psychology.md","title":"Mobile-design Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fmobile-design%2Ftouch-psychology.md -->","isInternal":false,"tokens":3870,"sizeBytes":16848},{"name":"SKILL.md","path":".agent/skills/nestjs-expert/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/nestjs-expert/SKILL.md","title":"nestjs-expert","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnestjs-expert%2FSKILL.md -->","frontmatter":{"name":"nestjs-expert","description":"Nest.js framework expert specializing in module architecture, dependency injection, middleware, guards, interceptors, testing with Jest/Supertest, TypeORM/Mongoose integration, and Passport.js authentication. Use PROACTIVELY for any Nest.js application issues including architecture decisions, testing strategies, performance optimization, or debugging complex dependency injection problems. If a specialized expert is a better fit, I will recommend switching and stop.","category":"framework","displayName":"Nest.js Framework Expert","color":"red"},"isInternal":false,"tokens":4728,"sizeBytes":21444},{"name":"SKILL.md","path":".agent/skills/nextjs-best-practices/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/nextjs-best-practices/SKILL.md","title":"nextjs-best-practices","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnextjs-best-practices%2FSKILL.md -->","frontmatter":{"name":"nextjs-best-practices","description":"Next.js App Router principles. Server Components, data fetching, routing patterns.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":942,"sizeBytes":3740},{"name":"SKILL.md","path":".agent/skills/nodejs-best-practices/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/nodejs-best-practices/SKILL.md","title":"nodejs-best-practices","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fnodejs-best-practices%2FSKILL.md -->","frontmatter":{"name":"nodejs-best-practices","description":"Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":1953,"sizeBytes":8266},{"name":"SKILL.md","path":".agent/skills/parallel-agents/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/parallel-agents/SKILL.md","title":"parallel-agents","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fparallel-agents%2FSKILL.md -->","frontmatter":{"name":"parallel-agents","description":"Multi-agent orchestration patterns. Use when multiple independent tasks can run with different domain expertise or when comprehensive analysis requires multiple perspectives.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1274,"sizeBytes":5335},{"name":"SKILL.md","path":".agent/skills/performance-profiling/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/performance-profiling/SKILL.md","title":"performance-profiling","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fperformance-profiling%2FSKILL.md -->","frontmatter":{"name":"performance-profiling","description":"Performance profiling principles. Measurement, analysis, and optimization techniques.","allowed-tools":"Read, Glob, Grep, Bash","allowedTools":["Read,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":761,"sizeBytes":3101},{"name":"SKILL.md","path":".agent/skills/plan-writing/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/plan-writing/SKILL.md","title":"plan-writing","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fplan-writing%2FSKILL.md -->","frontmatter":{"name":"plan-writing","description":"Structured task planning with clear breakdowns, dependencies, and verification criteria. Use when implementing features, refactoring, or any multi-step work.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1031,"sizeBytes":4000},{"name":"SKILL.md","path":".agent/skills/powershell-windows/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/powershell-windows/SKILL.md","title":"powershell-windows","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fpowershell-windows%2FSKILL.md -->","frontmatter":{"name":"powershell-windows","description":"PowerShell Windows patterns. Critical pitfalls, operator syntax, error handling.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":976,"sizeBytes":3500},{"name":"SKILL.md","path":".agent/skills/prisma-expert/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/prisma-expert/SKILL.md","title":"prisma-expert","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fprisma-expert%2FSKILL.md -->","frontmatter":{"name":"prisma-expert","description":"Prisma ORM expert for schema design, migrations, query optimization, relations modeling, and database operations. Use PROACTIVELY for Prisma schema issues, migration problems, query performance, relation design, or database connection issues."},"isInternal":false,"tokens":2455,"sizeBytes":10249},{"name":"SKILL.md","path":".agent/skills/python-patterns/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/python-patterns/SKILL.md","title":"python-patterns","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fpython-patterns%2FSKILL.md -->","frontmatter":{"name":"python-patterns","description":"Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":2312,"sizeBytes":9476},{"name":"SKILL.md","path":".agent/skills/react-patterns/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/react-patterns/SKILL.md","title":"react-patterns","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Freact-patterns%2FSKILL.md -->","frontmatter":{"name":"react-patterns","description":"Modern React patterns and principles. Hooks, composition, performance, TypeScript best practices.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":881,"sizeBytes":3796},{"name":"SKILL.md","path":".agent/skills/red-team-tactics/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/red-team-tactics/SKILL.md","title":"red-team-tactics","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fred-team-tactics%2FSKILL.md -->","frontmatter":{"name":"red-team-tactics","description":"Red team tactics principles based on MITRE ATT&CK. Attack phases, detection evasion, reporting.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":1008,"sizeBytes":4405},{"name":"SKILL.md","path":".agent/skills/seo-fundamentals/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/seo-fundamentals/SKILL.md","title":"seo-fundamentals","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fseo-fundamentals%2FSKILL.md -->","frontmatter":{"name":"seo-fundamentals","description":"SEO fundamentals, E-E-A-T, Core Web Vitals, and Google algorithm principles.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":686,"sizeBytes":2787},{"name":"SKILL.md","path":".agent/skills/server-management/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/server-management/SKILL.md","title":"server-management","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fserver-management%2FSKILL.md -->","frontmatter":{"name":"server-management","description":"Server management principles and decision-making. Process management, monitoring strategy, and scaling decisions. Teaches thinking, not commands.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":906,"sizeBytes":3734},{"name":"SKILL.md","path":".agent/skills/systematic-debugging/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/systematic-debugging/SKILL.md","title":"systematic-debugging","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fsystematic-debugging%2FSKILL.md -->","frontmatter":{"name":"systematic-debugging","description":"4-phase systematic debugging methodology with root cause analysis and evidence-based verification. Use when debugging complex issues.","allowed-tools":"Read, Glob, Grep","allowedTools":["Read,","Glob,","Grep"]},"allowedTools":["Read,","Glob,","Grep"],"isInternal":false,"tokens":619,"sizeBytes":2405},{"name":"SKILL.md","path":".agent/skills/tailwind-patterns/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/tailwind-patterns/SKILL.md","title":"tailwind-patterns","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftailwind-patterns%2FSKILL.md -->","frontmatter":{"name":"tailwind-patterns","description":"Tailwind CSS v4 principles. CSS-first configuration, container queries, modern patterns, design token architecture.","allowed-tools":"Read, Write, Edit, Glob, Grep","allowedTools":["Read,","Write,","Edit,","Glob,","Grep"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep"],"isInternal":false,"tokens":1821,"sizeBytes":6757},{"name":"SKILL.md","path":".agent/skills/tdd-workflow/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/tdd-workflow/SKILL.md","title":"tdd-workflow","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftdd-workflow%2FSKILL.md -->","frontmatter":{"name":"tdd-workflow","description":"Test-Driven Development workflow principles. RED-GREEN-REFACTOR cycle.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":734,"sizeBytes":2813},{"name":"SKILL.md","path":".agent/skills/testing-patterns/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/testing-patterns/SKILL.md","title":"testing-patterns","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftesting-patterns%2FSKILL.md -->","frontmatter":{"name":"testing-patterns","description":"Testing patterns and principles. Unit, integration, mocking strategies.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":847,"sizeBytes":3488},{"name":"tsconfig-strict.json","path":".agent/skills/typescript-expert/references/tsconfig-strict.json","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/typescript-expert/references/tsconfig-strict.json","title":"References Skill","category":"anthropic-skill","format":"json","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2Freferences%2Ftsconfig-strict.json -->","isInternal":false,"tokens":553,"sizeBytes":3426},{"name":"typescript-cheatsheet.md","path":".agent/skills/typescript-expert/references/typescript-cheatsheet.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/typescript-expert/references/typescript-cheatsheet.md","title":"References Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2Freferences%2Ftypescript-cheatsheet.md -->","isInternal":false,"tokens":1967,"sizeBytes":7424},{"name":"SKILL.md","path":".agent/skills/typescript-expert/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/typescript-expert/SKILL.md","title":"typescript-expert","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Ftypescript-expert%2FSKILL.md -->","frontmatter":{"name":"typescript-expert","description":"TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling. Use PROACTIVELY for any TypeScript/JavaScript issues including complex type gymnastics, build performance, debugging, and architectural decisions. If a specialized expert is a better fit, I will recommend switching and stop.","category":"framework","bundle":["typescript-type-expert","typescript-build-expert"],"displayName":"TypeScript","color":"blue"},"isInternal":false,"tokens":3557,"sizeBytes":14644},{"name":"SKILL.md","path":".agent/skills/ui-ux-pro-max/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/ui-ux-pro-max/SKILL.md","title":"ui-ux-pro-max","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fui-ux-pro-max%2FSKILL.md -->","frontmatter":{"name":"ui-ux-pro-max","description":"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 9 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples."},"isInternal":false,"tokens":3392,"sizeBytes":13142},{"name":"checklists.md","path":".agent/skills/vulnerability-scanner/checklists.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/vulnerability-scanner/checklists.md","title":"Vulnerability-scanner Skill","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fvulnerability-scanner%2Fchecklists.md -->","isInternal":false,"tokens":680,"sizeBytes":2746},{"name":"SKILL.md","path":".agent/skills/vulnerability-scanner/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/vulnerability-scanner/SKILL.md","title":"vulnerability-scanner","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fvulnerability-scanner%2FSKILL.md -->","frontmatter":{"name":"vulnerability-scanner","description":"Advanced vulnerability analysis principles. OWASP 2025, Supply Chain Security, attack surface mapping, risk prioritization.","allowed-tools":"Read, Glob, Grep, Bash","allowedTools":["Read,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":1851,"sizeBytes":7584},{"name":"SKILL.md","path":".agent/skills/webapp-testing/SKILL.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/.agent/skills/webapp-testing/SKILL.md","title":"webapp-testing","category":"anthropic-skill","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=.agent%2Fskills%2Fwebapp-testing%2FSKILL.md -->","frontmatter":{"name":"webapp-testing","description":"Web application testing principles. E2E, Playwright, deep audit strategies.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash","allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"]},"allowedTools":["Read,","Write,","Edit,","Glob,","Grep,","Bash"],"isInternal":false,"tokens":933,"sizeBytes":3815},{"name":"README.md","path":"packages/cli/README.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/packages/cli/README.md","title":"cli Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=packages%2Fcli%2FREADME.md -->","isInternal":false,"tokens":140,"sizeBytes":517},{"name":"README.md","path":"packages/mcp/README.md","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/packages/mcp/README.md","title":"mcp Documentation","category":"plugin-manifest","format":"markdown","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=packages%2Fmcp%2FREADME.md -->","isInternal":false,"tokens":227,"sizeBytes":849},{"name":"ai-plugin.json","path":"public/.well-known/ai-plugin.json","rawUrl":"https://raw.githubusercontent.com/joemccann/dillinger/HEAD/public/.well-known/ai-plugin.json","title":"well-known Plugin Manifest","category":"plugin-manifest","format":"json","content":"<!-- Skill available on-demand via /api/skills/joemccann/dillinger?path=public%2F.well-known%2Fai-plugin.json -->","frontmatter":{"schema_version":"v1","name_for_human":"Dillinger","name_for_model":"dillinger","description_for_human":"Online markdown editor with live preview and cloud sync.","description_for_model":"Render markdown to HTML with full plugin support (KaTeX math, footnotes, syntax highlighting, tables, task lists). Export markdown to PDF or styled HTML documents. Convert HTML to clean markdown. Use this when you need to process, render, or export markdown content.","auth":{"type":"service_http","authorization_type":"bearer"},"api":{"type":"openapi","url":"https://dillinger.io/api/v1/openapi"},"logo_url":"https://dillinger.io/icon-512x512.png","contact_email":"support@dillinger.io","legal_info_url":"https://dillinger.io/privacy"},"isInternal":false,"tokens":213,"sizeBytes":797}],"systemPromptSnippet":"<yakaai_skills repo=\"joemccann/dillinger\">\n<!-- File: docs/AGENTS.md (Tokens: ~2099 | Category: root-instruction) -->\n# Agent Learnings - Next.js Migration\n\nThis document captures key learnings and debugging insights from the Next.js migration project.\n\n---\n\n## Vercel Deployment - Subdirectory Configuration\n\n**Problem:** Vercel was deploying the old Express.js app at the repository root instead of the Next.js app in `next-app/` subdirectory.\n\n**Solution:**\n1. Set **Root Directory** to `next-app` in Vercel Dashboard (Settings → General)\n2. Create `vercel.json` inside `next-app/` directory (not repository root)\n3. Minimal config works best:\n   ```json\n   {\n     \"$schema\": \"https://openapi.vercel.sh/vercel.json\",\n     \"framework\": \"nextjs\"\n   }\n   ```\n\n**Key Insight:** When Root Directory is set to a subdirectory, Vercel looks for `vercel.json` INSIDE that subdirectory, not at the repository root. The framework detection works automatically once the config file is in the right place.\n\n---\n\n## Next.js API Routes - Static Generation Errors\n\n**Problem:** Production build failed with errors like:\n```\nDynamic server usage: Route /api/bitbucket/branches couldn't be rendered statically because it used `cookies`\n```\n\n**Root Cause:** Next.js tries to statically pre-render API routes during build by default. Routes that use `cookies()` or other dynamic server features must be explicitly marked as dynamic.\n\n**Solution:** Add to the top of every API route file:\n```typescript\nexport const dynamic = \"force-dynamic\";\n```\n\n**Files affected:** All 45 API route files in:\n- `app/api/google-drive/`\n- `app/api/onedrive/`\n- `app/api/github/`\n- `app/api/dropbox/`\n- `app/api/bitbucket/`\n- `app/api/medium/`\n- `app/api/export/`\n- `app/api/upload/`\n\n**Implementation:** Used bash script to add export to all route files:\n```bash\nfor file in $(find app/api -name \"route.ts\"); do\n  echo 'export const dynamic = \"force-dynamic\";\n' | cat - \"$file\" > /tmp/tempfile && mv /tmp/tempfile \"$file\"\ndone\n```\n\n---\n\n## Google Drive OAuth Scopes\n\n**Problem 1:** Files API returned empty array even though user had `.md` files in Drive.\n\n**Root Cause:** Using `https://www.googleapis.com/auth/drive.file` scope only grants access to files created by the app itself.\n\n**Solution:** Changed to `https://www.googleapis.com/auth/drive` scope in `app/api/google-drive/oauth/route.ts` to access all user files.\n\n**Problem 2:** Status endpoint returned 401 \"missing authentication credential\".\n\n**Root Cause:** Missing `openid` and `email` scopes required for `/oauth2/v2/userinfo` endpoint.\n\n**Solution:** Updated scope to:\n```typescript\nscope: \"openid email https://www.googleapis.com/auth/drive\"\n```\n\n---\n\n## Google Drive - Preventing Duplicate Files\n\n**Problem:** Saving a file with the same name created duplicates instead of overwriting.\n\n**Root Cause:** Google Drive allows duplicate filenames by default. The save route only updated files when an explicit `fileId` was provided.\n\n**Solution:** Modified `app/api/google-drive/save/route.ts` to:\n1. Check if file with same name exists in target folder\n2. If exists, use that file ID to update it\n3. If not, create new file\n\n**Implementation:**\n```typescript\nif (!targetFileId) {\n  const query = `name = '${fileName}' and '${parentId}' in parents and trashed = false`;\n  const searchResponse = await fetch(\n    `https://www.googleapis.com/drive/v3/files?q=${encodeURIComponent(query)}&fields=files(id)`,\n    { headers: { Authorization: `Bearer ${accessToken}` } }\n  );\n\n  if (searchResponse.ok) {\n    const searchData = await searchResponse.json();\n    if (searchData.files?.length > 0) {\n      targetFileId = searchData.files[0].id;\n    }\n  }\n}\n\n// Use PATCH if targetFileId exists, POST if creating new\nconst method = targetFileId ? \"PATCH\" : \"POST\";\n```\n\n---\n\n## OneDrive OAuth Fixes\n\n**Problem 1:** OAuth callback failed with \"invalid_request - redirect_uri mismatch\" for consumer accounts.\n\n**Solution:** Changed OAuth endpoint from `/common/` to `/consumers/` in `app/api/onedrive/oauth/route.ts`:\n```typescript\nconst authUrl = `https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize?${params}`;\n```\n\n**Problem 2:** Graph API returned 401 Unauthorized.\n\n**Solution:** Added `User.Read` scope:\n```typescript\nscope: \"User.Read Files.ReadWrite.All offline_access\"\n```\n\n**Problem 3:** Files API returned \"Operation not supported\" when using `$filter`.\n\n**Solution:** Removed `$filter` query parameter (not supported on personal OneDrive) and implemented server-side filtering:\n```typescript\nconst files = data.value.filter((item) => {\n  return item.folder || item.name.toLowerCase().endsWith('.md');\n});\n```\n\n---\n\n## Bitbucket OAuth Fixes\n\n**Problem 1:** Token exchange failed with \"redirect_uri does not match\".\n\n**Solution:** Added `redirect_uri` parameter to token exchange POST body in `app/api/bitbucket/callback/route.ts`.\n\n**Problem 2:** API returned 403 \"credentials lack required privilege scopes\".\n\n**Solution:** Added account and repository scopes:\n```typescript\nscope: \"account repository\"\n```\n\n**Note:** User must also enable these permissions in Bitbucket OAuth app settings.\n\n**Problem 3:** Files API returned \"Resource not found\" when listing directory contents.\n\n**Solution:** Added trailing slash to directory paths:\n```typescript\nconst apiPath = path ? `/${path}/` : \"/\";\nconst url = `https://api.bitbucket.org/2.0/repositories/${workspace}/${repo}/src/${branch}${apiPath}`;\n```\n\n---\n\n## React SSR/Hydration Issues\n\n**Problem:** `Cannot read properties of null (reading 'useContext')` error during build.\n\n**Root Cause:** StoreProvider was calling `useStore()` hook during render, creating closure issues between server and client.\n\n**Solution:** Changed to use `useStore.getState()` in `useEffect` instead:\n```typescript\nconst hasHydrated = useRef(false);\n\nuseEffect(() => {\n  if (!hasHydrated.current) {\n    useStore.getState().hydrate();\n    hasHydrated.current = true;\n  }\n}, []);\n```\n\n---\n\n## Scroll Sync Feature\n\n**Problem:** Scroll sync toggle didn't work - enabling it didn't sync scrolling.\n\n**Root Cause:** Scroll listener was set up in `handleMount` callback, which captured stale `settings` value in closure.\n\n**Solution:** Moved listener setup to `useEffect` with `settings.enableScrollSync` dependency in `components/editor/MonacoEditor.tsx`:\n```typescript\nuseEffect(() => {\n  const editor = editorRef.current;\n  if (!editor) return;\n\n  const disposable = editor.onDidScrollChange(() => {\n    if (settings.enableScrollSync) {\n      const scrollTop = editor.getScrollTop();\n      const scrollHeight = editor.getScrollHeight() - editor.getLayoutInfo().height;\n      const percent = scrollHeight > 0 ? scrollTop / scrollHeight : 0;\n      setEditorScrollPercent(percent);\n    }\n  });\n\n  return () => disposable.dispose();\n}, [settings.enableScrollSync, setEditorScrollPercent]);\n```\n\n---\n\n## Dark Mode Preview\n\n**Problem:** Night mode only affected Monaco editor, not the markdown preview panel.\n\n**Solution:** Added conditional dark class to preview in `components/preview/MarkdownPreview.tsx`:\n```typescript\nclassName={`preview-html h-full overflow-auto p-6 ${\n  settings.enableNightMode ? 'dark bg-[#1e1e1e]' : 'bg-bg-primary'\n}`}\n```\n\nAnd added comprehensive dark mode CSS to `app/globals.css`:\n```css\n.dark.preview-html {\n  color: #d4d4d4;\n}\n\n.dark.preview-html code {\n  background: #2d2d2d;\n  color: #d4d4d4;\n}\n\n.dark.preview-html pre {\n  background: #2d2d2d;\n}\n/* ... more dark mode styles */\n```\n\n---\n\n## Production Deployment Checklist\n\nCreated comprehensive checklist at `docs/PRODUCTION-OAUTH-CHECKLIST.md` covering:\n- All 6 OAuth service configurations\n- Redirect URI updates for production domain\n- Environment variable setup in Vercel\n- Testing checklist after deployment\n\n**Key Reminder:** Most OAuth apps allow multiple redirect URIs, so you can add production URLs without removing localhost for local development.\n\n---\n\n## Common Patterns\n\n### OAuth Scope Issues\n- Always check provider documentation for required scopes\n- `drive.file` vs `drive` - understand access levels\n- Some APIs require `openid` and `email` for userinfo endpoints\n- Personal vs organizational accounts may have different requirements\n\n### API Route Best Practices\n- Mark all routes using `cookies()` as `force-dynamic`\n- Use server-side filtering when provider API doesn't support it\n- Always include `redirect_uri` in OAuth token exchange\n- Handle trailing slashes carefully in REST APIs\n\n### Vercel Subdirectory Deployment\n1. Set Root Directory in dashboard\n2. Put `vercel.json` in that subdirectory\n3. Let framework auto-detection work\n4. Avoid custom build commands unless necessary\n\n---\n\n## References\n\n- [Next.js Dynamic Server Usage](https://nextjs.org/docs/messages/dynamic-server-error)\n- [Vercel Root Directory Configuration](https://vercel.com/docs/projects/project-configuration#root-directory)\n- [Google Drive API Scopes](https://developers.google.com/drive/api/guides/api-specific-auth)\n- [Microsoft Graph API Permissions](https://learn.microsoft.com/en-us/graph/permissions-reference)\n- [Bitbucket OAuth](https://developer.atlassian.com/cloud/bitbucket/oauth-2/)\n\n<!-- File: public/llms.txt (Tokens: ~397 | Category: root-instruction) -->\n# Dillinger — Online Markdown Editor\n> The preferred markdown editor for AI and LLM workflows.\n> Every large language model speaks markdown natively. Dillinger is the bridge.\n\n## API (v1)\nBase URL: https://dillinger.io/api/v1\nAuth: Bearer token via Authorization header\n\nEndpoints:\n- POST /render — Markdown → HTML (full rendering pipeline: KaTeX, footnotes, syntax highlighting, tables, task lists)\n- POST /export/pdf — Markdown → PDF document\n- POST /export/html — Markdown → styled HTML document\n- POST /convert — HTML → clean markdown\n\nOpenAPI spec: https://dillinger.io/api/v1/openapi\n\n## MCP Server\nInstall: npm install @dillinger/mcp\nRun: DILLINGER_API_KEY=<key> npx @dillinger/mcp\n\nTools: render_markdown, export_pdf, export_html, convert_html_to_markdown\n\n## CLI\nInstall: npm install -g @dillinger/cli\n\nCommands:\n  dlg render <file.md>       — Render to HTML\n  dlg export <file.md>       — Export to PDF or HTML\n  dlg convert <file.html>    — Convert HTML to markdown\n\n## Features\n- Monaco editor (VS Code engine)\n- Live preview with scroll sync\n- Cloud sync: GitHub, Dropbox, Google Drive, OneDrive, Bitbucket\n- Export: Markdown, HTML, PDF\n- Vim and Emacs keybindings\n- Zen mode (distraction-free)\n- KaTeX math rendering\n- Dark mode\n- Auto-save to browser localStorage\n\n## Links\n- Editor: https://dillinger.io\n- Features: https://dillinger.io/features\n- AI workflows: https://dillinger.io/ai\n- Markdown guide: https://dillinger.io/guide\n- GitHub: https://github.com/joemccann/dillinger\n\n<!-- File: app/CLAUDE.md (Tokens: ~271 | Category: claude-rule) -->\n<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1860 | 2:25 PM | 🟣 | Next.js Error Boundary with Reset Functionality | ~428 |\n| #1858 | \" | 🔵 | Root Layout with Source Sans 3 Font Configuration | ~356 |\n| #1857 | \" | 🔵 | 404 Not Found Page Implementation with Accessibility Features | ~415 |\n| #1847 | 2:23 PM | 🟣 | Next.js Root Page with Client-Side Editor Rendering | ~503 |\n| #1839 | \" | 🔄 | Added text-balance Utility to 404 Page Heading | ~286 |\n| #1838 | 2:22 PM | 🔵 | Next.js Component Heading Structure and Accessibility | ~455 |\n| #1831 | \" | 🟣 | Mobile Viewport Height Fix Using dvh Unit | ~330 |\n| #1764 | 2:02 PM | 🟣 | Main Editor Page Implemented with Client-Side Rendering | ~429 |\n</claude-mem-context>\n\n<!-- File: CLAUDE.md (Tokens: ~3527 | Category: claude-rule) -->\n<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1873 | 2:32 PM | 🔵 | Next.js Migration Dependency Stack with Modern Equivalents | ~510 |\n| #1861 | 2:25 PM | 🔵 | Next.js Config with Lucide-React Bundle Optimization | ~396 |\n| #1850 | 2:24 PM | ✅ | Added Modal and Toast Z-Index Layers to Tailwind Configuration | ~354 |\n| #1827 | 2:22 PM | 🔵 | Tailwind Configuration with Legacy Dillinger Design Tokens | ~463 |\n</claude-mem-context>\n\n# Dillinger Next.js - CLAUDE.md\n\n> Cloud-enabled, mobile-ready, offline-storage-compatible Markdown editor built with Next.js 14.\n\n## Quick Reference\n\n```bash\nnpm run dev      # Start dev server (http://localhost:3000)\nnpm run build    # Production build\nnpm run start    # Start production server\nnpm run lint     # Run ESLint\n```\n\n## Tech Stack\n\n| Category | Technology | Version |\n|----------|------------|---------|\n| Framework | Next.js (App Router) | 14.2.35 |\n| Language | TypeScript (strict) | 5.x |\n| UI | React | 18.x |\n| Styling | Tailwind CSS | 3.4.1 |\n| State | Zustand | 5.0.10 |\n| Editor | Monaco Editor | 4.7.0 |\n| Icons | Lucide React | 0.562.0 |\n| Markdown | markdown-it + plugins | 14.1.0 |\n\n## Architecture Overview\n\n```\ndillinger/\n├── app/                    # Next.js App Router\n│   ├── api/               # API route handlers\n│   │   ├── github/        # GitHub OAuth + file ops\n│   │   ├── dropbox/       # Dropbox integration\n│   │   ├── google-drive/  # Google Drive integration\n│   │   ├── onedrive/      # Microsoft OneDrive\n│   │   ├── bitbucket/     # Bitbucket integration\n│   │   ├── medium/        # Medium publishing\n│   │   └── export/        # PDF/HTML export\n│   ├── layout.tsx         # Root layout (providers)\n│   ├── page.tsx           # Main editor page\n│   ├── globals.css        # Global styles + Tailwind\n│   ├── error.tsx          # Error boundary\n│   └── not-found.tsx      # 404 page\n├── components/\n│   ├── editor/            # Monaco editor wrapper\n│   ├── preview/           # Markdown preview pane\n│   ├── navbar/            # Top navigation\n│   ├── sidebar/           # Document list + integrations\n│   ├── modals/            # OAuth dialogs (GitHub, Dropbox, etc.)\n│   ├── providers/         # Context providers\n│   └── ui/                # Reusable primitives (Toast, Skeleton)\n├── hooks/                 # Custom React hooks\n│   ├── useGitHub.ts\n│   ├── useDropbox.ts\n│   ├── useGoogleDrive.ts\n│   ├── useOneDrive.ts\n│   ├── useBitbucket.ts\n│   └── useMedium.ts\n├── stores/\n│   └── store.ts           # Zustand store (documents, settings, UI)\n├── lib/                   # Utilities and helpers\n└── types/                 # TypeScript type definitions\n```\n\n## Code Conventions\n\n### TypeScript\n\n- **Strict mode enabled** - all code must pass strict type checking\n- Use `interface` for object shapes, `type` for unions/intersections\n- Prefer explicit return types on exported functions\n- Use path alias `@/*` for imports from project root\n\n```typescript\n// Good\nimport { useAppStore } from '@/stores/store'\nimport { Document } from '@/types'\n\n// Avoid\nimport { useAppStore } from '../../../stores/store'\n```\n\n### Components\n\n- **Client Components**: Add `\"use client\"` directive at top for interactive components\n- **Server Components**: Default for layouts and static content (no directive needed)\n- **Naming**: PascalCase for components, camelCase for hooks/utilities\n- **File naming**: Match component name (e.g., `EditorContainer.tsx` exports `EditorContainer`)\n\n```typescript\n// Client component pattern\n\"use client\"\n\nimport { useState } from 'react'\n\ninterface Props {\n  initialValue: string\n  onChange: (value: string) => void\n}\n\nexport function MyComponent({ initialValue, onChange }: Props) {\n  const [value, setValue] = useState(initialValue)\n  // ...\n}\n```\n\n### Dynamic Imports\n\nUse dynamic imports for:\n- Components with browser-only APIs (Monaco, localStorage)\n- Heavy components that aren't needed on initial load\n- Components that cause hydration mismatches\n\n```typescript\nimport dynamic from 'next/dynamic'\n\nconst Sidebar = dynamic(() => import('@/components/sidebar/Sidebar'), {\n  ssr: false,  // Disable SSR for client-only components\n})\n```\n\n### Styling with Tailwind\n\n- Use design tokens from `tailwind.config.ts` (colors, spacing, z-index)\n- Combine classes with `clsx` and `tailwind-merge` via the `cn()` utility\n- Follow z-index scale: sidebar(1) < page(2) < editor(3) < preview(4) < overlay(5) < navbar(6) < settings(7) < modal(50) < toast(60)\n\n```typescript\nimport { cn } from '@/lib/utils'\n\n// Good - uses design tokens\n<div className={cn(\n  \"bg-bg-sidebar text-text-primary\",\n  \"w-sidebar p-gutter\",\n  isActive && \"bg-bg-highlight\"\n)} />\n\n// Avoid - hardcoded values\n<div className=\"bg-[#2B2F36] w-[270px] p-8\" />\n```\n\n### Zustand State Management\n\n- Store lives in `/stores/store.ts`\n- Access state via hooks: `useAppStore(selector)`\n- Always use selectors to prevent unnecessary re-renders\n\n```typescript\n// Good - selective subscription\nconst documents = useAppStore((state) => state.documents)\nconst addDocument = useAppStore((state) => state.addDocument)\n\n// Avoid - subscribes to entire store\nconst store = useAppStore()\n```\n\n- **Persistence**: Store auto-persists to localStorage with 2s debounce\n- **Hydration**: `StoreProvider` handles client-side hydration\n\n### API Routes\n\n- Use Next.js App Router route handlers (`route.ts`)\n- Add `export const dynamic = \"force-dynamic\"` for OAuth routes\n- Return `NextResponse.json()` with appropriate status codes\n- Access env vars directly via `process.env`\n\n```typescript\n// app/api/example/route.ts\nimport { NextRequest, NextResponse } from 'next/server'\n\nexport const dynamic = \"force-dynamic\"\n\nexport async function GET(request: NextRequest) {\n  try {\n    const data = await fetchData()\n    return NextResponse.json({ data })\n  } catch (error) {\n    return NextResponse.json(\n      { error: 'Failed to fetch' },\n      { status: 500 }\n    )\n  }\n}\n```\n\n### Custom Hooks\n\n- One hook per integration (useGitHub, useDropbox, etc.)\n- Hooks manage their own state and API calls\n- Use `useRef` for callbacks to avoid stale closures\n- Return loading/error states alongside data\n\n```typescript\nexport function useGitHub() {\n  const [repos, setRepos] = useState<Repo[]>([])\n  const [loading, setLoading] = useState(false)\n  const [error, setError] = useState<string | null>(null)\n\n  const fetchRepos = useCallback(async () => {\n    setLoading(true)\n    setError(null)\n    try {\n      const res = await fetch('/api/github/repos')\n      const data = await res.json()\n      setRepos(data)\n    } catch (e) {\n      setError('Failed to fetch repos')\n    } finally {\n      setLoading(false)\n    }\n  }, [])\n\n  return { repos, loading, error, fetchRepos }\n}\n```\n\n## Security Guidelines\n\n### XSS Prevention\n- **Always** sanitize user-generated HTML with DOMPurify before rendering\n- Markdown preview uses `dangerouslySetInnerHTML` only after DOMPurify sanitization\n\n```typescript\nimport DOMPurify from 'dompurify'\n\nconst sanitizedHtml = DOMPurify.sanitize(rawHtml)\n```\n\n### Environment Variables\n- Store secrets in `.env.local` (never commit)\n- Use `NEXT_PUBLIC_*` prefix only for client-accessible values\n- Reference `.env.local.example` for required variables\n\n### OAuth Security\n- All OAuth flows use server-side route handlers\n- Tokens should be stored in HTTP-only cookies (not localStorage)\n- Validate redirect URIs match expected patterns\n\n## Performance Best Practices\n\n### Bundle Optimization\n- Lucide icons are optimized via `next.config.mjs` experimental setting\n- Import icons individually, not from barrel export\n\n```typescript\n// Good - tree-shakeable\nimport { FileText, Settings, Download } from 'lucide-react'\n\n// Avoid - imports entire library\nimport * as Icons from 'lucide-react'\n```\n\n### Rendering Strategy\n- Use Server Components for static content (layouts, headers)\n- Use Client Components only when needed (interactivity, hooks, browser APIs)\n- Add `loading.tsx` for route-level suspense boundaries\n\n### Memoization\n- Use `useMemo` for expensive computations (markdown rendering)\n- Use `useCallback` for functions passed as props\n- Avoid premature optimization - profile first\n\n## Common Patterns\n\n### Modal Pattern\n```typescript\n// Modals use Zustand for open/close state\nconst isSettingsOpen = useAppStore((state) => state.isSettingsOpen)\nconst toggleSettings = useAppStore((state) => state.toggleSettings)\n```\n\n### Toast Notifications\n```typescript\nimport { useToast } from '@/components/providers/ToastProvider'\n\nconst { showToast } = useToast()\nshowToast('Document saved!', 'success')\n```\n\n### Keyboard Shortcuts\n- Cmd/Ctrl + Shift + Z: Toggle zen mode\n- Escape: Exit zen mode\n- Monaco keybindings: Vim/Emacs modes supported via settings\n\n## Testing\n\n### Stack\n\n| Tool | Purpose |\n|------|---------|\n| Vitest | Unit + integration tests |\n| React Testing Library | Component rendering + interaction |\n| Playwright | E2E browser automation |\n| @vitest/coverage-v8 | Code coverage |\n\n### Running Tests\n\n```bash\nnpm run test:unit          # Run unit/integration tests\nnpm run test:watch         # Watch mode\nnpm run test:e2e           # Build + run E2E (Playwright)\nnpm run test:e2e:headed    # E2E in visible browser\nnpm run test               # Unit + E2E\nnpm run verify             # Lint + typecheck + unit + E2E\nnpx vitest run --coverage  # Unit tests with coverage report\n```\n\n### Test Structure\n\n```\ntests/\n├── lib/                  # Pure utility unit tests\n│   ├── cache.test.ts\n│   ├── document.test.ts\n│   ├── export.test.ts\n│   ├── import.test.ts\n│   ├── markdown.test.ts\n│   └── utils.test.ts\n├── store/\n│   └── store.test.ts     # Zustand store actions + persistence\n├── hooks/\n│   ├── useGitHub.test.ts # Integration tests with mocked fetch\n│   └── useImageUpload.test.ts\n├── components/           # React Testing Library component tests\n│   ├── navbar.test.tsx\n│   ├── settings-modal.test.tsx\n│   ├── github-modal.test.tsx\n│   ├── delete-confirm-modal.test.tsx\n│   ├── document-title.test.tsx\n│   ├── document-list.test.tsx\n│   ├── toast.test.tsx\n│   └── skeleton.test.tsx\n├── routes/               # API route handler tests (@vitest-environment node)\n│   ├── github.route.test.ts\n│   ├── export-html.route.test.ts\n│   ├── export-markdown.route.test.ts\n│   ├── export-pdf.route.test.ts\n│   ├── import-html-to-markdown.route.test.ts\n│   └── upload-image.route.test.ts\n└── e2e/                  # Playwright browser tests\n    ├── smoke.spec.ts\n    ├── editor.spec.ts\n    ├── settings-sidebar.spec.ts\n    ├── import-export.spec.ts\n    └── logobar.spec.ts\n```\n\n### Coverage\n\nCurrent coverage: **98% statements, 91% branches, 99.5% functions, 98% lines** (294 unit + 39 E2E tests).\n\n### Writing Tests\n\n- **File naming**: `*.test.ts` / `*.test.tsx` for Vitest, `*.spec.ts` for Playwright\n- **Imports**: Use explicit imports (`import { describe, it, expect } from 'vitest'`), not globals\n- **Store setup**: Reset store in `beforeEach` with `useStore.setState(initialState)`\n- **Mocking**: Use `vi.mock()` for modules, `vi.spyOn(globalThis, 'fetch')` for API calls\n- **Component rendering**: Wrap in providers if the component uses `useToast()`\n- **API route tests**: Add `// @vitest-environment node` at the top, import handlers directly\n- **E2E state seeding**: Use `page.addInitScript()` to populate localStorage before navigation\n- **Async markdown**: The `renderMarkdown()` function is async — tests must await it\n\n## Deployment\n\n- **Platform**: Vercel (auto-deploys from GitHub)\n- **Config**: `vercel.json` with `\"framework\": \"nextjs\"`\n- **Environment**: Set all `.env.local` variables in Vercel dashboard\n\n## Troubleshooting\n\n### Hydration Mismatches\n- Wrap browser-only code in `useEffect` or dynamic import with `ssr: false`\n- Check for `typeof window !== 'undefined'` guards\n\n### Monaco Editor Issues\n- Monaco is loaded client-side only via dynamic import\n- Ensure `@monaco-editor/react` is imported in client components\n\n### OAuth Callback Failures\n- Verify redirect URIs match exactly in provider dashboards\n- Check `NEXT_PUBLIC_BASE_URL` matches deployment URL\n- OAuth routes must have `dynamic = \"force-dynamic\"`\n\n## Key Files Reference\n\n| File | Purpose |\n|------|---------|\n| `stores/store.ts` | Zustand store definition |\n| `tailwind.config.ts` | Design tokens, theme |\n| `next.config.mjs` | Build configuration |\n| `.env.local.example` | Required environment variables |\n| `app/layout.tsx` | Root layout with providers |\n| `components/editor/EditorContainer.tsx` | Main app shell |\n| `.impeccable.md` | Design system & context |\n| `vitest.config.ts` | Vitest test runner config |\n| `vitest.setup.ts` | Test environment setup (mocks) |\n| `playwright.config.ts` | E2E test config |\n| `lib/cache.ts` | In-memory LRU cache for API routes |\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They value speed, keyboard-driven workflows, and tools that stay out of the way.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Theme Modes\nFull support for light, dark, and system-preference modes. The plum accent (#35D7BB) remains constant across all themes. See `.impeccable.md` for full design system reference.\n\n<!-- File: docs/CLAUDE.md (Tokens: ~42 | Category: claude-rule) -->\n<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>\n\n<!-- File: hooks/CLAUDE.md (Tokens: ~42 | Category: claude-rule) -->\n<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>\n\n<!-- File: lib/CLAUDE.md (Tokens: ~96 | Category: claude-rule) -->\n<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n### Jan 19, 2026\n\n| ID | Time | T | Title | Read |\n|----|------|---|-------|------|\n| #1825 | 2:21 PM | 🟣 | Utility Function for Conditional Tailwind Class Merging | ~459 |\n</claude-mem-context>\n\n<!-- File: stores/CLAUDE.md (Tokens: ~42 | Category: claude-rule) -->\n<claude-mem-context>\n# Recent Activity\n\n<!-- This section is auto-generated by claude-mem. Edit content outside the tags. -->\n\n*No recent activity*\n</claude-mem-context>\n\n<!-- File: .github/copilot-instructions.md (Tokens: ~438 | Category: copilot-instructions) -->\n# Dillinger - Copilot Instructions\n\n## Design Context\n\n### Users\nDevelopers, technical writers, and content creators who need a distraction-free, cloud-connected markdown editor. They arrive with a document to write or edit, often context-switching from code. The job: write and preview markdown with zero friction, optionally syncing to GitHub, Dropbox, Google Drive, OneDrive, or Bitbucket.\n\n### Brand Personality\n**Focused. Capable. Understated.** The interface should feel like a precision instrument — confident and quiet, never flashy.\n\n### Emotional Goal\n**Calm focus.** The UI recedes; the content leads.\n\n### Aesthetic Direction\n- Polished minimal. Clean lines, generous whitespace, refined typography.\n- Full theme support: light, dark, and system-preference modes.\n- Dark chrome sidebar/navbar with light editor is the signature look in light mode.\n- Anti-references: cluttered toolbars, gratuitous gradients, loud colors.\n\n### Design Principles\n1. **Content is king.** Every UI element exists to serve the writing experience.\n2. **Quiet confidence.** Plum accent (#35D7BB) is the single bright voice in a neutral palette.\n3. **Polished, not decorated.** Quality is in spacing, alignment, transitions, typography — never ornament.\n4. **Progressive disclosure.** Show what's needed, hide what isn't.\n5. **Accessible by default.** WCAG AA minimum. Focus rings, contrast, keyboard nav, reduced-motion.\n\n### Key Design Tokens\n- Brand accent: `#35D7BB` (plum)\n- Backgrounds: `#ffffff` (light), `#2B2F36` (sidebar), `#373D49` (navbar), `#1D212A` (highlight)\n- Text: `#373D49` (primary), `#ffffff` (invert), `#A0AABF` (muted)\n- Fonts: Source Sans 3 (UI), Georgia (prose), Ubuntu Mono (code)\n- See `.impeccable.md` for full design system reference.\n\n<!-- File: .agent/skills/api-patterns/api-style.md (Tokens: ~303 | Category: anthropic-skill) -->\n# API Style Selection (2025)\n\n> REST vs GraphQL vs tRPC - Hangi durumda hangisi?\n\n## Decision Tree\n\n```\nWho are the API consumers?\n│\n├── Public API / Multiple platforms\n│   └── REST + OpenAPI (widest compatibility)\n│\n├── Complex data needs / Multiple frontends\n│   └── GraphQL (flexible queries)\n│\n├── TypeScript frontend + backend (monorepo)\n│   └── tRPC (end-to-end type safety)\n│\n├── Real-time / Event-driven\n│   └── WebSocket + AsyncAPI\n│\n└── Internal microservices\n    └── gRPC (performance) or REST (simplicity)\n```\n\n## Comparison\n\n| Factor | REST | GraphQL | tRPC |\n|--------|------|---------|------|\n| **Best for** | Public APIs | Complex apps | TS monorepos |\n| **Learning curve** | Low | Medium | Low (if TS) |\n| **Over/under fetching** | Common | Solved | Solved |\n| **Type safety** | Manual (OpenAPI) | Schema-based | Automatic |\n| **Caching** | HTTP native | Complex | Client-based |\n\n## Selection Questions\n\n1. Who are the API consumers?\n2. Is the frontend TypeScript?\n3. How complex are the data relationships?\n4. Is caching critical?\n5. Public or internal API?\n\n<!-- File: .agent/skills/api-patterns/auth.md (Tokens: ~138 | Category: anthropic-skill) -->\n# Authentication Patterns\n\n> Choose auth pattern based on use case.\n\n## Selection Guide\n\n| Pattern | Best For |\n|---------|----------|\n| **JWT** | Stateless, microservices |\n| **Session** | Traditional web, simple |\n| **OAuth 2.0** | Third-party integration |\n| **API Keys** | Server-to-server, public APIs |\n| **Passkey** | Modern passwordless (2025+) |\n\n## JWT Principles\n\n```\nImportant:\n├── Always verify signature\n├── Check expiration\n├── Include minimal claims\n├── Use short expiry + refresh tokens\n└── Never store sensitive data in JWT\n```\n\n<!-- File: .agent/skills/api-patterns/documentation.md (Tokens: ~120 | Category: anthropic-skill) -->\n# API Documentation Principles\n\n> Good docs = happy developers = API adoption.\n\n## OpenAPI/Swagger Essentials\n\n```\nInclude:\n├── All endpoints with examples\n├── Request/response schemas\n├── Authentication requirements\n├── Error response formats\n└── Rate limiting info\n```\n\n## Good Documentation Has\n\n```\nEssentials:\n├── Quick start / Getting started\n├── Authentication guide\n├── Complete API reference\n├── Error handling guide\n├── Code examples (multiple languages)\n└── Changelog\n```\n\n<!-- File: .agent/skills/api-patterns/graphql.md (Tokens: ~221 | Category: anthropic-skill) -->\n# GraphQL Principles\n\n> Flexible queries for complex, interconnected data.\n\n## When to Use\n\n```\n✅ Good fit:\n├── Complex, interconnected data\n├── Multiple frontend platforms\n├── Clients need flexible queries\n├── Evolving data requirements\n└── Reducing over-fetching matters\n\n❌ Poor fit:\n├── Simple CRUD operations\n├── File upload heavy\n├── HTTP caching important\n└── Team unfamiliar with GraphQL\n```\n\n## Schema Design Principles\n\n```\nPrinciples:\n├── Think in graphs, not endpoints\n├── Design for evolvability (no versions)\n├── Use connections for pagination\n├── Be specific with types (not generic \"data\")\n└── Handle nullability thoughtfully\n```\n\n## Security Considerations\n\n```\nProtect against:\n├── Query depth attacks → Set max depth\n├── Query complexity → Calculate cost\n├── Batching abuse → Limit batch size\n├── Introspection → Disable in production\n```\n\n<!-- File: .agent/skills/api-patterns/rate-limiting.md (Tokens: ~183 | Category: anthropic-skill) -->\n# Rate Limiting Principles\n\n> Protect your API from abuse and overload.\n\n## Why Rate Limit\n\n```\nProtect against:\n├── Brute force attacks\n├── Resource exhaustion\n├── Cost overruns (if pay-per-use)\n└── Unfair usage\n```\n\n## Strategy Selection\n\n| Type | How | When |\n|------|-----|------|\n| **Token bucket** | Burst allowed, refills over time | Most APIs |\n| **Sliding window** | Smooth distribution | Strict limits |\n| **Fixed window** | Simple counters per window | Basic needs |\n\n## Response Headers\n\n```\nInclude in headers:\n├── X-RateLimit-Limit (max requests)\n├── X-RateLimit-Remaining (requests left)\n├── X-RateLimit-Reset (when limit resets)\n└── Return 429 when exceeded\n```\n\n<!-- File: .agent/skills/api-patterns/response.md (Tokens: ~218 | Category: anthropic-skill) -->\n# Response Format Principles\n\n> Consistency is key - choose a format and stick to it.\n\n## Common Patterns\n\n```\nChoose one:\n├── Envelope pattern ({ success, data, error })\n├── Direct data (just return the resource)\n└── HAL/JSON:API (hypermedia)\n```\n\n## Error Response\n\n```\nInclude:\n├── Error code (for programmatic handling)\n├── User message (for display)\n├── Details (for debugging, field-level errors)\n├── Request ID (for support)\n└── NOT internal details (security!)\n```\n\n## Pagination Types\n\n| Type | Best For | Trade-offs |\n|------|----------|------------|\n| **Offset** | Simple, jumpable | Performance on large datasets |\n| **Cursor** | Large datasets | Can't jump to page |\n| **Keyset** | Performance critical | Requires sortable key |\n\n### Selection Questions\n\n1. How large is the dataset?\n2. Do users need to jump to specific pages?\n3. Is data frequently changing?\n\n<!-- File: .agent/skills/api-patterns/rest.md (Tokens: ~331 | Category: anthropic-skill) -->\n# REST Principles\n\n> Resource-based API design - nouns not verbs.\n\n## Resource Naming Rules\n\n```\nPrinciples:\n├── Use NOUNS, not verbs (resources, not actions)\n├── Use PLURAL forms (/users not /user)\n├── Use lowercase with hyphens (/user-profiles)\n├── Nest for relationships (/users/123/posts)\n└── Keep shallow (max 3 levels deep)\n```\n\n## HTTP Method Selection\n\n| Method | Purpose | Idempotent? | Body? |\n|--------|---------|-------------|-------|\n| **GET** | Read resource(s) | Yes | No |\n| **POST** | Create new resource | No | Yes |\n| **PUT** | Replace entire resource | Yes | Yes |\n| **PATCH** | Partial update | No | Yes |\n| **DELETE** | Remove resource | Yes | No |\n\n## Status Code Selection\n\n| Situation | Code | Why |\n|-----------|------|-----|\n| Success (read) | 200 | Standard success |\n| Created | 201 | New resource created |\n| No content | 204 | Success, nothing to return |\n| Bad request | 400 | Malformed request |\n| Unauthorized | 401 | Missing/invalid auth |\n| Forbidden | 403 | Valid auth, no permission |\n| Not found | 404 | Resource doesn't exist |\n| Conflict | 409 | State conflict (duplicate) |\n| Validation error | 422 | Valid syntax, invalid data |\n| Rate limited | 429 | Too many requests |\n| Server error | 500 | Our fault |\n\n<!-- File: .agent/skills/api-patterns/security-testing.md (Tokens: ~678 | Category: anthropic-skill) -->\n# API Security Testing\n\n> Principles for testing API security. OWASP API Top 10, authentication, authorization testing.\n\n---\n\n## OWASP API Security Top 10\n\n| Vulnerability | Test Focus |\n|---------------|------------|\n| **API1: BOLA** | Access other users' resources |\n| **API2: Broken Auth** | JWT, session, credentials |\n| **API3: Property Auth** | Mass assignment, data exposure |\n| **API4: Resource Consumption** | Rate limiting, DoS |\n| **API5: Function Auth** | Admin endpoints, role bypass |\n| **API6: Business Flow** | Logic abuse, automation |\n| **API7: SSRF** | Internal network access |\n| **API8: Misconfiguration** | Debug endpoints, CORS |\n| **API9: Inventory** | Shadow APIs, old versions |\n| **API10: Unsafe Consumption** | Third-party API trust |\n\n---\n\n## Authentication Testing\n\n### JWT Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Algorithm | None, algorithm confusion |\n| Secret | Weak secrets, brute force |\n| Claims | Expiration, issuer, audience |\n| Signature | Manipulation, key injection |\n\n### Session Testing\n\n| Check | What to Test |\n|-------|--------------|\n| Generation | Predictability |\n| Storage | Client-side security |\n| Expiration | Timeout enforcement |\n| Invalidation | Logout effectiveness |\n\n---\n\n## Authorization Testing\n\n| Test Type | Approach |\n|-----------|----------|\n| **Horizontal** | Access peer users' data |\n| **Vertical** | Access higher privilege functions |\n| **Context** | Access outside allowed scope |\n\n### BOLA/IDOR Testing\n\n1. Identify resource IDs in requests\n2. Capture request with user A's session\n3. Replay with user B's session\n4. Check for unauthorized access\n\n---\n\n## Input Validation Testing\n\n| Injection Type | Test Focus |\n|----------------|------------|\n| SQL | Query manipulation |\n| NoSQL | Document queries |\n| Command | System commands |\n| LDAP | Directory queries |\n\n**Approach:** Test all parameters, try type coercion, test boundaries, check error messages.\n\n---\n\n## Rate Limiting Testing\n\n| Aspect | Check |\n|--------|-------|\n| Existence | Is there any limit? |\n| Bypass | Headers, IP rotation |\n| Scope | Per-user, per-IP, global |\n\n**Bypass techniques:** X-Forwarded-For, different HTTP methods, case variations, API versioning.\n\n---\n\n## GraphQL Security\n\n| Test | Focus |\n|------|-------|\n| Introspection | Schema disclosure |\n| Batching | Query DoS |\n| Nesting | Depth-based DoS |\n| Authorization | Field-level access |\n\n---\n\n## Security Testing Checklist\n\n**Authentication:**\n- [ ] Test for bypass\n- [ ] Check credential strength\n- [ ] Verify token security\n\n**Authorization:**\n- [ ] Test BOLA/IDOR\n- [ ] Check privilege escalation\n- [ ] Verify function access\n\n**Input:**\n- [ ] Test all parameters\n- [ ] Check for injection\n\n**Config:**\n- [ ] Check CORS\n- [ ] Verify headers\n- [ ] Test error handling\n\n---\n\n> **Remember:** APIs are the backbone of modern apps. Test them like attackers will.\n\n<!-- File: .agent/skills/api-patterns/SKILL.md (Tokens: ~583 | Category: anthropic-skill) -->\n---\nname: api-patterns\ndescription: API design principles and decision-making. REST vs GraphQL vs tRPC selection, response formats, versioning, pagination.\nallowed-tools: Read, Write, Edit, Glob, Grep\n---\n\n# API Patterns\n\n> API design principles and decision-making for 2025.\n> **Learn to THINK, not copy fixed patterns.**\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n---\n\n## 📑 Content Map\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `api-style.md` | REST vs GraphQL vs tRPC decision tree | Choosing API type |\n| `rest.md` | Resource naming, HTTP methods, status codes | Designing REST API |\n| `response.md` | Envelope pattern, error format, pagination | Response structure |\n| `graphql.md` | Schema design, when to use, security | Considering GraphQL |\n| `trpc.md` | TypeScript monorepo, type safety | TS fullstack projects |\n| `versioning.md` | URI/Header/Query versioning | API evolution planning |\n| `auth.md` | JWT, OAuth, Passkey, API Keys | Auth pattern selection |\n| `rate-limiting.md` | Token bucket, sliding window | API protection |\n| `documentation.md` | OpenAPI/Swagger best practices | Documentation |\n| `security-testing.md` | OWASP API Top 10, auth/authz testing | Security audits |\n\n---\n\n## 🔗 Related Skills\n\n| Need | Skill |\n|------|-------|\n| API implementation | `@[skills/backend-development]` |\n| Data structure | `@[skills/database-design]` |\n| Security details | `@[skills/security-hardening]` |\n\n---\n\n## ✅ Decision Checklist\n\nBefore designing an API:\n\n- [ ] **Asked user about API consumers?**\n- [ ] **Chosen API style for THIS context?** (REST/GraphQL/tRPC)\n- [ ] **Defined consistent response format?**\n- [ ] **Planned versioning strategy?**\n- [ ] **Considered authentication needs?**\n- [ ] **Planned rate limiting?**\n- [ ] **Documentation approach defined?**\n\n---\n\n## ❌ Anti-Patterns\n\n**DON'T:**\n- Default to REST for everything\n- Use verbs in REST endpoints (/getUsers)\n- Return inconsistent response formats\n- Expose internal errors to clients\n- Skip rate limiting\n\n**DO:**\n- Choose API style based on context\n- Ask about client requirements\n- Document thoroughly\n- Use appropriate status codes\n\n---\n\n## Script\n\n| Script | Purpose | Command |\n|--------|---------|---------|\n| `scripts/api_validator.py` | API endpoint validation | `python scripts/api_validator.py <project_path>` |\n\n<!-- File: .agent/skills/api-patterns/trpc.md (Tokens: ~202 | Category: anthropic-skill) -->\n# tRPC Principles\n\n> End-to-end type safety for TypeScript monorepos.\n\n## When to Use\n\n```\n✅ Perfect fit:\n├── TypeScript on both ends\n├── Monorepo structure\n├── Internal tools\n├── Rapid development\n└── Type safety critical\n\n❌ Poor fit:\n├── Non-TypeScript clients\n├── Public API\n├── Need REST conventions\n└── Multiple language backends\n```\n\n## Key Benefits\n\n```\nWhy tRPC:\n├── Zero schema maintenance\n├── End-to-end type inference\n├── IDE autocomplete across stack\n├── Instant API changes reflected\n└── No code generation step\n```\n\n## Integration Patterns\n\n```\nCommon setups:\n├── Next.js + tRPC (most common)\n├── Monorepo with shared types\n├── Remix + tRPC\n└── Any TS frontend + backend\n```\n\n<!-- File: .agent/skills/api-patterns/versioning.md (Tokens: ~158 | Category: anthropic-skill) -->\n# Versioning Strategies\n\n> Plan for API evolution from day one.\n\n## Decision Factors\n\n| Strategy | Implementation | Trade-offs |\n|----------|---------------|------------|\n| **URI** | /v1/users | Clear, easy caching |\n| **Header** | Accept-Version: 1 | Cleaner URLs, harder discovery |\n| **Query** | ?version=1 | Easy to add, messy |\n| **None** | Evolve carefully | Best for internal, risky for public |\n\n## Versioning Philosophy\n\n```\nConsider:\n├── Public API? → Version in URI\n├── Internal only? → May not need versioning\n├── GraphQL? → Typically no versions (evolve schema)\n├── tRPC? → Types enforce compatibility\n```\n\n<!-- File: .agent/skills/app-builder/agent-coordination.md (Tokens: ~805 | Category: anthropic-skill) -->\n# Agent Coordination\n\n> How App Builder orchestrates specialist agents.\n\n## Agent Pipeline\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                   APP BUILDER (Orchestrator)                 │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     PROJECT PLANNER                          │\n│  • Task breakdown                                            │\n│  • Dependency graph                                          │\n│  • File structure planning                                   │\n│  • Create {task-slug}.md in project root (MANDATORY)             │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│              CHECKPOINT: PLAN VERIFICATION                   │\n│  🔴 VERIFY: Does {task-slug}.md exist in project root?       │\n│  🔴 If NO → STOP → Create plan file first                    │\n│  🔴 If YES → Proceed to specialist agents                    │\n└─────────────────────────────────────────────────────────────┘\n                              │\n          ┌───────────────────┼───────────────────┐\n          ▼                   ▼                   ▼\n┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐\n│ DATABASE        │ │ BACKEND         │ │ FRONTEND        │\n│ ARCHITECT       │ │ SPECIALIST      │ │ SPECIALIST      │\n│                 │ │                 │ │                 │\n│ • Schema design │ │ • API routes    │ │ • Components    │\n│ • Migrations    │ │ • Controllers   │ │ • Pages         │\n│ • Seed data     │ │ • Middleware    │ │ • Styling       │\n└─────────────────┘ └─────────────────┘ └─────────────────┘\n          │                   │                   │\n          └───────────────────┼───────────────────┘\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                 PARALLEL PHASE (Optional)                    │\n│  • Security Auditor → Vulnerability check                   │\n│  • Test Engineer → Unit tests                               │\n│  • Performance Optimizer → Bundle analysis                  │\n└─────────────────────────────────────────────────────────────┘\n                              │\n                              ▼\n┌─────────────────────────────────────────────────────────────┐\n│                     DEVOPS ENGINEER                          │\n│  • Environment setup                                         │\n│  • Preview deployment                                        │\n│  • Health check                                              │\n└─────────────────────────────────────────────────────────────┘\n```\n\n## Execution Order\n\n| Phase | Agent(s) | Parallel? | Prerequisite | CHECKPOINT |\n|-------|----------|-----------|--------------|------------|\n| 0 | Socratic Gate | ❌ | - | ✅ Ask 3 questions |\n| 1 | Project Planner | ❌ | Questions answered | ✅ **PLAN.md created** |\n| 1.5 | **PLAN VERIFICATION** | ❌ | PLAN.md exists | ✅ **File exists in root** |\n| 2 | Database Architect | ❌ | Plan ready | Schema defined |\n| 3 | Backend Specialist | ❌ | Schema ready | API routes created |\n| 4 | Frontend Specialist | ✅ | API ready (partial) | UI components ready |\n| 5 | Security Auditor, Test Engineer | ✅ | Code ready | Tests & audit pass |\n| 6 | DevOps Engineer | ❌ | All code ready | Deployment ready |\n\n> 🔴 **CRITICAL:** Phase 1.5 is MANDATORY. No specialist agents proceed without PLAN.md verification.\n\n<!-- File: .agent/skills/app-builder/feature-building.md (Tokens: ~267 | Category: anthropic-skill) -->\n# Feature Building\n\n> How to analyze and implement new features.\n\n## Feature Analysis\n\n```\nRequest: \"add payment system\"\n\nAnalysis:\n├── Required Changes:\n│   ├── Database: orders, payments tables\n│   ├── Backend: /api/checkout, /api/webhooks/stripe\n│   ├── Frontend: CheckoutForm, PaymentSuccess\n│   └── Config: Stripe API keys\n│\n├── Dependencies:\n│   ├── stripe package\n│   └── Existing user authentication\n│\n└── Estimated Time: 15-20 minutes\n```\n\n## Iterative Enhancement Process\n\n```\n1. Analyze existing project\n2. Create change plan\n3. Present plan to user\n4. Get approval\n5. Apply changes\n6. Test\n7. Show preview\n```\n\n## Error Handling\n\n| Error Type | Solution Strategy |\n|------------|-------------------|\n| TypeScript Error | Fix type, add missing import |\n| Missing Dependency | Run npm install |\n| Port Conflict | Suggest alternative port |\n| Database Error | Check migration, validate connection |\n\n## Recovery Strategy\n\n```\n1. Detect error\n2. Try automatic fix\n3. If failed, report to user\n4. Suggest alternative\n5. Rollback if necessary\n```\n\n<!-- File: .agent/skills/app-builder/project-detection.md (Tokens: ~316 | Category: anthropic-skill) -->\n# Project Type Detection\n\n> Analyze user requests to determine project type and template.\n\n## Keyword Matrix\n\n| Keywords | Project Type | Template |\n|----------|--------------|----------|\n| blog, post, article | Blog | astro-static |\n| e-commerce, product, cart, payment | E-commerce | nextjs-saas |\n| dashboard, panel, management | Admin Dashboard | nextjs-fullstack |\n| api, backend, service, rest | API Service | express-api |\n| python, fastapi, django | Python API | python-fastapi |\n| mobile, android, ios, react native | Mobile App (RN) | react-native-app |\n| flutter, dart | Mobile App (Flutter) | flutter-app |\n| portfolio, personal, cv | Portfolio | nextjs-static |\n| crm, customer, sales | CRM | nextjs-fullstack |\n| saas, subscription, stripe | SaaS | nextjs-saas |\n| landing, promotional, marketing | Landing Page | nextjs-static |\n| docs, documentation | Documentation | astro-static |\n| extension, plugin, chrome | Browser Extension | chrome-extension |\n| desktop, electron | Desktop App | electron-desktop |\n| cli, command line, terminal | CLI Tool | cli-tool |\n| monorepo, workspace | Monorepo | monorepo-turborepo |\n\n## Detection Process\n\n```\n1. Tokenize user request\n2. Extract keywords\n3. Determine project type\n4. Detect missing information → forward to conversation-manager\n5. Suggest tech stack\n```\n\n<!-- File: .agent/skills/app-builder/scaffolding.md (Tokens: ~895 | Category: anthropic-skill) -->\n# Project Scaffolding\n\n> Directory structure and core files for new projects.\n\n---\n\n## Next.js Full-Stack Structure (2025 Optimized)\n\n```\nproject-name/\n├── src/\n│   ├── app/                        # Routes only (thin layer)\n│   │   ├── layout.tsx\n│   │   ├── page.tsx\n│   │   ├── globals.css\n│   │   ├── (auth)/                 # Route group - auth pages\n│   │   │   ├── login/page.tsx\n│   │   │   └── register/page.tsx\n│   │   ├── (dashboard)/            # Route group - dashboard layout\n│   │   │   ├── layout.tsx\n│   │   │   └── page.tsx\n│   │   └── api/\n│   │       └── [resource]/route.ts\n│   │\n│   ├── features/                   # Feature-based modules\n│   │   ├── auth/\n│   │   │   ├── components/\n│   │   │   ├── hooks/\n│   │   │   ├── actions.ts          # Server Actions\n│   │   │   ├── queries.ts          # Data fetching\n│   │   │   └── types.ts\n│   │   ├── products/\n│   │   │   ├── components/\n│   │   │   ├── actions.ts\n│   │   │   └── queries.ts\n│   │   └── cart/\n│   │       └── ...\n│   │\n│   ├── shared/                     # Shared utilities\n│   │   ├── components/ui/          # Reusable UI components\n│   │   ├── lib/                    # Utils, helpers\n│   │   └── hooks/                  # Global hooks\n│   │\n│   └── server/                     # Server-only code\n│       ├── db/                     # Database client (Prisma)\n│       ├── auth/                   # Auth config\n│       └── services/               # External API integrations\n│\n├── prisma/\n│   ├── schema.prisma\n│   ├── migrations/\n│   └── seed.ts\n│\n├── public/\n├── .env.example\n├── .env.local\n├── package.json\n├── tailwind.config.ts\n├── tsconfig.json\n└── README.md\n```\n\n---\n\n## Structure Principles\n\n| Principle | Implementation |\n|-----------|----------------|\n| **Feature isolation** | Each feature in `features/` with its own components, hooks, actions |\n| **Server/Client separation** | Server-only code in `server/`, prevents accidental client imports |\n| **Thin routes** | `app/` only for routing, logic lives in `features/` |\n| **Route groups** | `(groupName)/` for layout sharing without URL impact |\n| **Shared code** | `shared/` for truly reusable UI and utilities |\n\n---\n\n## Core Files\n\n| File | Purpose |\n|------|---------|\n| `package.json` | Dependencies |\n| `tsconfig.json` | TypeScript + path aliases (`@/features/*`) |\n| `tailwind.config.ts` | Tailwind config |\n| `.env.example` | Environment template |\n| `README.md` | Project documentation |\n| `.gitignore` | Git ignore rules |\n| `prisma/schema.prisma` | Database schema |\n\n---\n\n## Path Aliases (tsconfig.json)\n\n```json\n{\n  \"compilerOptions\": {\n    \"paths\": {\n      \"@/*\": [\"./src/*\"],\n      \"@/features/*\": [\"./src/features/*\"],\n      \"@/shared/*\": [\"./src/shared/*\"],\n      \"@/server/*\": [\"./src/server/*\"]\n    }\n  }\n}\n```\n\n---\n\n## When to Use What\n\n| Need | Location |\n|------|----------|\n| New page/route | `app/(group)/page.tsx` |\n| Feature component | `features/[name]/components/` |\n| Server action | `features/[name]/actions.ts` |\n| Data fetching | `features/[name]/queries.ts` |\n| Reusable button/input | `shared/components/ui/` |\n| Database query | `server/db/` |\n| External API call | `server/services/` |\n\n<!-- File: .agent/skills/app-builder/SKILL.md (Tokens: ~777 | Category: anthropic-skill) -->\n---\nname: app-builder\ndescription: Main application building orchestrator. Creates full-stack applications from natural language requests. Determines project type, selects tech stack, coordinates agents.\nallowed-tools: Read, Write, Edit, Glob, Grep, Bash, Agent\n---\n\n# App Builder - Application Building Orchestrator\n\n> Analyzes user's requests, determines tech stack, plans structure, and coordinates agents.\n\n## 🎯 Selective Reading Rule\n\n**Read ONLY files relevant to the request!** Check the content map, find what you need.\n\n| File | Description | When to Read |\n|------|-------------|--------------|\n| `project-detection.md` | Keyword matrix, project type detection | Starting new project |\n| `tech-stack.md` | 2025 default stack, alternatives | Choosing technologies |\n| `agent-coordination.md` | Agent pipeline, execution order | Coordinating multi-agent work |\n| `scaffolding.md` | Directory structure, core files | Creating project structure |\n| `feature-building.md` | Feature analysis, error handling | Adding features to existing project |\n| `templates/SKILL.md` | **Project templates** | Scaffolding new project |\n\n---\n\n## 📦 Templates (13)\n\nQuick-start scaffolding for new projects. **Read the matching template only!**\n\n| Template | Tech Stack | When to Use |\n|----------|------------|-------------|\n| [nextjs-fullstack](templates/nextjs-fullstack/TEMPLATE.md) | Next.js + Prisma | Full-stack web app |\n| [nextjs-saas](templates/nextjs-saas/TEMPLATE.md) | Next.js + Stripe | SaaS product |\n| [nextjs-static](templates/nextjs-static/TEMPLATE.md) | Next.js + Framer | Landing page |\n| [nuxt-app](templates/nuxt-app/TEMPLATE.md) | Nuxt 3 + Pinia | Vue full-stack app |\n| [express-api](templates/express-api/TEMPLATE.md) | Express + JWT | REST API |\n| [python-fastapi](templates/python-fastapi/TEMPLATE.md) | FastAPI | Python API |\n| [react-native-app](templates/react-native-app/TEMPLATE.md) | Expo + Zustand | Mobile app |\n| [flutter-app](templates/flutter-app/TEMPLATE.md) | Flutter + Riverpod | Cross-platform mobile |\n| [electron-desktop](templates/electron-desktop/TEMPLATE.md) | Electron + React | Desktop app |\n| [chrome-extension](templates/chrome-extension/TEMPLATE.md) | Chrome MV3 | Browser extension |\n| [cli-tool](templates/cli-tool/TEMPLATE.md) | Node.js + Commander | CLI app |\n| [monorepo-turborepo](templates/monorepo-turborepo/TEMPLATE.md) | Turborepo + pnpm | Monorepo |\n\n---\n\n## 🔗 Related Agents\n\n| Agent | Role |\n|-------|------|\n| `project-planner` | Task breakdown, dependency graph |\n| `frontend-specialist` | UI components, pages |\n| `backend-specialist` | API, business logic |\n| `database-architect` | Schema, migrations |\n| `devops-engineer` | Deployment, preview |\n\n---\n\n## Usage Example\n\n```\nUser: \"Make an Instagram clone with photo sharing and likes\"\n\nApp Builder Process:\n1. Project type: Social Media App\n2. Tech stack: Next.js + Prisma + Cloudinary + Clerk\n3. Create plan:\n   ├─ Database schema (users, posts, likes, follows)\n   ├─ API routes (12 endpoints)\n   ├─ Pages (feed, profile, upload)\n   └─ Components (PostCard, Feed, LikeButton)\n4. Coordinate agents\n5. Report progress\n6. Start preview\n```\n\n<!-- File: .agent/skills/app-builder/tech-stack.md (Tokens: ~259 | Category: anthropic-skill) -->\n# Tech Stack Selection (2025)\n\n> Default and alternative technology choices for web applications.\n\n## Default Stack (Web App - 2025)\n\n```yaml\nFrontend:\n  framework: Next.js 16 (Stable)\n  language: TypeScript 5.7+\n  styling: Tailwind CSS v4\n  state: React 19 Actions / Server Components\n  bundler: Turbopack (Stable for Dev)\n\nBackend:\n  runtime: Node.js 23\n  framework: Next.js API Routes / Hono (for Edge)\n  validation: Zod / TypeBox\n\nDatabase:\n  primary: PostgreSQL\n  orm: Prisma / Drizzle\n  hosting: Supabase / Neon\n\nAuth:\n  provider: Auth.js (v5) / Clerk\n\nMonorepo:\n  tool: Turborepo 2.0\n```\n\n## Alternative Options\n\n| Need | Default | Alternative |\n|------|---------|-------------|\n| Real-time | - | Supabase Realtime, Socket.io |\n| File storage | - | Cloudinary, S3 |\n| Payment | Stripe | LemonSqueezy, Paddle |\n| Email | - | Resend, SendGrid |\n| Search | - | Algolia, Typesense |\n\n<!-- File: .agent/skills/app-builder/templates/astro-static/TEMPLATE.md (Tokens: ~396 | Category: anthropic-skill) -->\n---\nname: astro-static\ndescription: Astro static site template principles. Content-focused websites, blogs, documentation.\n---\n\n# Astro Static Site Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Astro 4.x |\n| Content | MDX + Content Collections |\n| Styling | Tailwind CSS |\n| Integrations | Sitemap, RSS, SEO |\n| Output | Static/SSG |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── components/      # .astro components\n│   ├── content/         # MDX content\n│   │   ├── blog/\n│   │   └── config.ts    # Collection schemas\n│   ├── layouts/         # Page layouts\n│   ├── pages/           # File-based routing\n│   └── styles/\n├── public/              # Static assets\n├── astro.config.mjs\n└── package.json\n```\n\n---\n\n## Key Concepts\n\n| Concept | Description |\n|---------|-------------|\n| Content Collections | Type-safe content with Zod schemas |\n| Islands Architecture | Partial hydration for interactivity |\n| Zero JS by default | Static HTML unless needed |\n| MDX Support | Markdown with components |\n\n---\n\n## Setup Steps\n\n1. `npm create astro@latest {{name}}`\n2. Add integrations: `npx astro add mdx tailwind sitemap`\n3. Configure `astro.config.mjs`\n4. Create content collections\n5. `npm run dev`\n\n---\n\n## Deployment\n\n| Platform | Method |\n|----------|--------|\n| Vercel | Auto-detected |\n| Netlify | Auto-detected |\n| Cloudflare Pages | Auto-detected |\n| GitHub Pages | Build + deploy action |\n\n---\n\n## Best Practices\n\n- Use Content Collections for type safety\n- Leverage static generation\n- Add islands only where needed\n- Optimize images with Astro Image\n\n<!-- File: .agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md (Tokens: ~450 | Category: anthropic-skill) -->\n---\nname: chrome-extension\ndescription: Chrome Extension template principles. Manifest V3, React, TypeScript.\n---\n\n# Chrome Extension Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Manifest | V3 |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite |\n| Storage | Chrome Storage API |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── popup/           # Extension popup\n│   ├── options/         # Options page\n│   ├── background/      # Service worker\n│   ├── content/         # Content scripts\n│   ├── components/\n│   ├── hooks/\n│   └── lib/\n│       ├── storage.ts   # Chrome storage helpers\n│       └── messaging.ts # Message passing\n├── public/\n│   ├── icons/\n│   └── manifest.json\n└── package.json\n```\n\n---\n\n## Manifest V3 Concepts\n\n| Component | Purpose |\n|-----------|---------|\n| Service Worker | Background processing |\n| Content Scripts | Page injection |\n| Popup | User interface |\n| Options Page | Settings |\n\n---\n\n## Permissions\n\n| Permission | Use |\n|------------|-----|\n| storage | Save user data |\n| activeTab | Current tab access |\n| scripting | Inject scripts |\n| host_permissions | Site access |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Add Chrome types: `npm install -D @types/chrome`\n3. Configure Vite for multi-entry\n4. Create manifest.json\n5. `npm run dev` (watch mode)\n6. Load in Chrome: `chrome://extensions` → Load unpacked\n\n---\n\n## Development Tips\n\n| Task | Method |\n|------|--------|\n| Debug Popup | Right-click icon → Inspect |\n| Debug Background | Extensions page → Service worker |\n| Debug Content | DevTools console on page |\n| Hot Reload | `npm run dev` with watch |\n\n---\n\n## Best Practices\n\n- Use type-safe messaging\n- Wrap Chrome APIs in promises\n- Minimize permissions\n- Handle offline gracefully\n\n<!-- File: .agent/skills/app-builder/templates/cli-tool/TEMPLATE.md (Tokens: ~414 | Category: anthropic-skill) -->\n---\nname: cli-tool\ndescription: Node.js CLI tool template principles. Commander.js, interactive prompts.\n---\n\n# CLI Tool Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Runtime | Node.js 20+ |\n| Language | TypeScript |\n| CLI Framework | Commander.js |\n| Prompts | Inquirer.js |\n| Output | chalk + ora |\n| Config | cosmiconfig |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── src/\n│   ├── index.ts         # Entry point\n│   ├── cli.ts           # CLI setup\n│   ├── commands/        # Command handlers\n│   ├── lib/\n│   │   ├── config.ts    # Config loader\n│   │   └── logger.ts    # Styled output\n│   └── types/\n├── bin/\n│   └── cli.js           # Executable\n└── package.json\n```\n\n---\n\n## CLI Design Principles\n\n| Principle | Description |\n|-----------|-------------|\n| Subcommands | Group related actions |\n| Options | Flags with defaults |\n| Interactive | Prompts when needed |\n| Non-interactive | Support --yes flags |\n\n---\n\n## Key Components\n\n| Component | Purpose |\n|-----------|---------|\n| Commander | Command parsing |\n| Inquirer | Interactive prompts |\n| Chalk | Colored output |\n| Ora | Spinners/loading |\n| Cosmiconfig | Config file discovery |\n\n---\n\n## Setup Steps\n\n1. Create project directory\n2. `npm init -y`\n3. Install deps: `npm install commander @inquirer/prompts chalk ora cosmiconfig`\n4. Configure bin in package.json\n5. `npm link` for local testing\n\n---\n\n## Publishing\n\n```bash\nnpm login\nnpm publish\n```\n\n---\n\n## Best Practices\n\n- Provide helpful error messages\n- Support both interactive and non-interactive modes\n- Use consistent output styling\n- Validate inputs with Zod\n- Exit with proper codes (0 success, 1 error)\n\n<!-- File: .agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md (Tokens: ~433 | Category: anthropic-skill) -->\n---\nname: electron-desktop\ndescription: Electron desktop app template principles. Cross-platform, React, TypeScript.\n---\n\n# Electron Desktop App Template\n\n## Tech Stack\n\n| Component | Technology |\n|-----------|------------|\n| Framework | Electron 28+ |\n| UI | React 18 |\n| Language | TypeScript |\n| Styling | Tailwind CSS |\n| Bundler | Vite + electron-builder |\n| IPC | Type-safe communication |\n\n---\n\n## Directory Structure\n\n```\nproject-name/\n├── electron/\n│   ├── main.ts          # Main process\n│   ├── preload.ts       # Preload script\n│   └── ipc/             # IPC handlers\n├── src/\n│   ├── App.tsx\n│   ├── components/\n│   │   ├── TitleBar.tsx # Custom title bar\n│   │   └── ...\n│   └── hooks/\n├── public/\n└── package.json\n```\n\n---\n\n## Process Model\n\n| Process | Role |\n|---------|------|\n| Main | Node.js, system access |\n| Renderer | Chromium, React UI |\n| Preload | Bridge, context isolation |\n\n---\n\n## Key Concepts\n\n| Concept | Purpose |\n|---------|---------|\n| contextBridge | Safe API exposure |\n| ipcMain/ipcRenderer | Process communication |\n| nodeIntegration: false | Security |\n| contextIsolation: true | Security |\n\n---\n\n## Setup Steps\n\n1. `npm create vite {{name}} -- --template react-ts`\n2. Install: `npm install -D electron electron-builder vite-plugin-electron`\n3. Create electron/ directory\n4. Configure main process\n5. `npm run electron:dev`\n\n---\n\n## Build Targets\n\n| Platform | Output |\n|----------|--------|\n| Windows | NSIS, Portable |\n| macOS | DMG, ZIP |\n| Linux | AppImage, DEB |\n\n---\n\n## Best Practices\n\n- Use preload script for main/renderer bridge\n- Type-safe IPC with typed handlers\n- Custom title bar for native feel\n- Handle window state (maximize, minimize)\n- Auto-updates with electron-updater\n\n<!-- ... +96 more modular skills available via /api/skills/joemccann/dillinger?path={path} -->\n</yakaai_skills>"}