Compare commits
1 Commits
518dd77788
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23c3bd92d0 |
@@ -1,154 +0,0 @@
|
||||
# .gitignore Configuration for JPD Portal
|
||||
|
||||
This document explains the .gitignore configuration for the JPD Portal project.
|
||||
|
||||
## Critical Files Protected
|
||||
|
||||
The following sensitive files are **NEVER** committed to version control:
|
||||
|
||||
### 🔐 Security & Credentials
|
||||
- `src/JPD.env` - Contains API keys (Jira, Confluence, Claude API)
|
||||
- `*.env` files - All environment variable files
|
||||
- `secrets.json` - ASP.NET Core user secrets
|
||||
|
||||
### 💾 Databases & Data
|
||||
- `src/JpdPortal/data/vectors.db` - SQLite vector embeddings database
|
||||
- `src/JpdPortal/data/uploads/*` - User-uploaded requirements files (except .gitkeep)
|
||||
- All `.db`, `.sqlite`, `.sqlite3` files
|
||||
|
||||
### 🏗️ Build Artifacts
|
||||
- `bin/` and `obj/` directories - .NET build outputs
|
||||
- `Debug/` and `Release/` - Build configurations
|
||||
- `*.dll`, `*.exe`, `*.pdb` - Compiled binaries
|
||||
|
||||
## Directory Structure Preservation
|
||||
|
||||
Some directories need to exist but their contents should not be committed:
|
||||
|
||||
```
|
||||
src/JpdPortal/data/
|
||||
├── uploads/
|
||||
│ └── .gitkeep ← Tracked to preserve directory
|
||||
│ └── *.txt ← Ignored (user uploads)
|
||||
└── vectors.db ← Ignored (SQLite database)
|
||||
```
|
||||
|
||||
The `.gitkeep` file ensures the `uploads/` directory structure is preserved in git.
|
||||
|
||||
## Pattern Categories
|
||||
|
||||
The .gitignore is organized into these sections:
|
||||
|
||||
1. **Claude Code** - IDE-specific files
|
||||
2. **Project-Specific Sensitive Files** - JPD.env, databases, uploads
|
||||
3. **.NET Core / ASP.NET Core** - Build artifacts, Visual Studio files
|
||||
4. **AI/ML Specific** - ONNX models, training artifacts, vector databases
|
||||
5. **Blazor Specific** - WebAssembly cache, generated assets
|
||||
6. **Testing** - Test results and coverage reports
|
||||
7. **Environment Variables & Secrets** - All .env files
|
||||
8. **Database Files** - SQLite and other database files
|
||||
9. **Logs** - Application log files
|
||||
10. **OS Files** - Windows, macOS, Linux system files
|
||||
11. **Backup Files** - .bak, .old, .tmp files
|
||||
12. **Node.js** - npm packages (if used for frontend)
|
||||
13. **Python** - __pycache__, venv (if used for ML scripts)
|
||||
|
||||
## Already Tracked Files
|
||||
|
||||
If you see modified files in `bin/` or `obj/` directories that should be ignored, they were tracked before the .gitignore was updated. To remove them:
|
||||
|
||||
```bash
|
||||
# Remove build artifacts from git tracking
|
||||
git rm -r --cached src/JpdPortal/bin/
|
||||
git rm -r --cached src/JpdPortal/obj/
|
||||
|
||||
# Commit the changes
|
||||
git commit -m "chore: remove build artifacts from git tracking"
|
||||
```
|
||||
|
||||
**Note**: The `--cached` flag removes files from git tracking but keeps them on your local filesystem.
|
||||
|
||||
## Verifying Ignore Patterns
|
||||
|
||||
To check if a file will be ignored:
|
||||
|
||||
```bash
|
||||
# Check specific files
|
||||
git check-ignore -v src/JPD.env
|
||||
git check-ignore -v src/JpdPortal/data/vectors.db
|
||||
|
||||
# Check entire directory
|
||||
git check-ignore -v src/JpdPortal/bin/*
|
||||
```
|
||||
|
||||
Expected output for ignored files:
|
||||
```
|
||||
.gitignore:199:*.env src/JPD.env
|
||||
```
|
||||
|
||||
## Best Practices
|
||||
|
||||
### ✅ DO:
|
||||
- Always verify `src/JPD.env` is NOT staged before committing
|
||||
- Check `git status` before commits to ensure no sensitive data
|
||||
- Use `git check-ignore` to verify patterns
|
||||
- Keep the .gitkeep file in the uploads directory
|
||||
|
||||
### ❌ DON'T:
|
||||
- Never commit API keys or credentials
|
||||
- Never force-add ignored files with `git add -f`
|
||||
- Don't commit build artifacts (bin/, obj/)
|
||||
- Don't commit database files with user data
|
||||
- Don't commit user-uploaded files
|
||||
|
||||
## Emergency: Removing Sensitive Data
|
||||
|
||||
If you accidentally committed sensitive data (like JPD.env), you need to remove it from git history:
|
||||
|
||||
```bash
|
||||
# Remove file from git history (WARNING: rewrites history)
|
||||
git filter-branch --force --index-filter \
|
||||
"git rm --cached --ignore-unmatch src/JPD.env" \
|
||||
--prune-empty --tag-name-filter cat -- --all
|
||||
|
||||
# Force push (if already pushed to remote)
|
||||
git push origin --force --all
|
||||
```
|
||||
|
||||
**Better approach**: Use GitHub's BFG Repo-Cleaner or contact repository admin.
|
||||
|
||||
## Environment Setup for New Developers
|
||||
|
||||
When cloning this repository:
|
||||
|
||||
1. Copy the environment template:
|
||||
```bash
|
||||
cp src/JPD.env.example src/JPD.env
|
||||
```
|
||||
|
||||
2. Edit `src/JPD.env` with your credentials
|
||||
|
||||
3. Verify it's ignored:
|
||||
```bash
|
||||
git status
|
||||
# Should NOT show JPD.env as untracked
|
||||
```
|
||||
|
||||
4. Create necessary directories:
|
||||
```bash
|
||||
mkdir -p src/JpdPortal/data/uploads
|
||||
```
|
||||
|
||||
## Maintenance
|
||||
|
||||
Review and update this .gitignore when:
|
||||
- Adding new services with credentials
|
||||
- Adding new ML models or data storage
|
||||
- Changing build output directories
|
||||
- Adding new tools or frameworks
|
||||
- Team reports accidental commits of ignored files
|
||||
|
||||
---
|
||||
|
||||
**Last Updated**: 2025-10-20
|
||||
**Project**: JPD Portal v1.0.0
|
||||
File diff suppressed because it is too large
Load Diff
1095
CLAUDE_TEMPLATE.md
1095
CLAUDE_TEMPLATE.md
File diff suppressed because it is too large
Load Diff
@@ -1,329 +0,0 @@
|
||||
# MCP Documentation Consolidation Summary
|
||||
|
||||
> **Completed**: 2025-10-20
|
||||
> **Action**: Consolidated all MCP server documentation into ONE comprehensive file
|
||||
|
||||
---
|
||||
|
||||
## What Was Done
|
||||
|
||||
All MCP server documentation has been **consolidated into a single file** at the root level:
|
||||
|
||||
### 📄 New Consolidated File
|
||||
|
||||
**[MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md)** (Root Level)
|
||||
|
||||
This comprehensive guide includes:
|
||||
- ✅ Complete overview of all 8 MCP servers
|
||||
- ✅ Quick start and installation instructions
|
||||
- ✅ Detailed capabilities for each server
|
||||
- ✅ Configuration examples
|
||||
- ✅ Usage patterns by agent and command
|
||||
- ✅ Best practices
|
||||
- ✅ Troubleshooting guide
|
||||
- ✅ Advanced topics
|
||||
|
||||
**Size**: ~800 lines | **Reading Time**: ~20 minutes
|
||||
|
||||
---
|
||||
|
||||
## Files Consolidated
|
||||
|
||||
The new guide consolidates content from these previous files:
|
||||
|
||||
### Removed Files (Content Now in MCP_SERVERS_GUIDE.md)
|
||||
|
||||
1. ❌ **MCP_SETUP_TOOLS.md** (root) - Quick reference for setup tools
|
||||
2. ❌ **.claude/tools/README-MCP-SETUP.md** - Comprehensive setup guide
|
||||
3. ❌ **.claude/tools/QUICK-START.md** - Quick start guide
|
||||
|
||||
**Total Removed**: 3 files
|
||||
|
||||
### Preserved Files (Still Relevant)
|
||||
|
||||
These files were **kept** as they serve different purposes:
|
||||
|
||||
1. ✅ **.claude/agents/MCP_USAGE_TEMPLATES.md** - Quick reference template for agents/commands
|
||||
- **Purpose**: Copy-paste reference for adding MCP usage to agents
|
||||
- **Different from**: MCP_SERVERS_GUIDE.md (which is comprehensive documentation)
|
||||
- **Renamed and moved**: From `.claude/MCP_CORRECT_USAGE_GUIDE.md` to agents folder
|
||||
|
||||
2. ✅ **.mcp.json** - Configuration file (not documentation)
|
||||
|
||||
3. ✅ **.claude/tools/setup-all-mcp-servers.ps1** - Setup script (Windows)
|
||||
|
||||
4. ✅ **.claude/tools/setup-all-mcp-servers.sh** - Setup script (Linux/Mac)
|
||||
|
||||
5. ✅ **.claude/tools/test-mcp-servers.ps1** - Test script (Windows)
|
||||
|
||||
6. ✅ **.claude/tools/test-mcp-servers.sh** - Test script (Linux/Mac)
|
||||
|
||||
7. ✅ **.claude/tools/README.md** - Tools directory index (updated to reference new guide)
|
||||
|
||||
---
|
||||
|
||||
## Documentation Structure After Consolidation
|
||||
|
||||
### Root Level Documentation
|
||||
|
||||
```
|
||||
Claude Code Setup/
|
||||
├── README.md # Main project README
|
||||
├── QUICKSTART.md # Quick start guide
|
||||
├── CLAUDE.md # Project instructions
|
||||
├── CLAUDE_CODE_SETUP_COMPLETE.md # Complete Claude Code documentation
|
||||
├── MCP_SERVERS_GUIDE.md # ⭐ NEW: Complete MCP documentation
|
||||
└── .mcp.json # MCP configuration
|
||||
```
|
||||
|
||||
### MCP-Related Files
|
||||
|
||||
```
|
||||
.claude/
|
||||
├── agents/
|
||||
│ └── MCP_USAGE_TEMPLATES.md # Copy-paste templates for agents
|
||||
└── tools/
|
||||
├── README.md # Tools directory index (updated)
|
||||
├── setup-all-mcp-servers.ps1 # Windows setup
|
||||
├── setup-all-mcp-servers.sh # Linux/Mac setup
|
||||
├── test-mcp-servers.ps1 # Windows test
|
||||
└── test-mcp-servers.sh # Linux/Mac test
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Benefits of Consolidation
|
||||
|
||||
### Before (Multiple Files)
|
||||
|
||||
**Problems**:
|
||||
- ❌ MCP documentation scattered across 4+ files
|
||||
- ❌ Duplicate information in multiple locations
|
||||
- ❌ Unclear which file to read first
|
||||
- ❌ Inconsistent formatting and depth
|
||||
- ❌ Hard to maintain consistency
|
||||
|
||||
**User Experience**:
|
||||
- "Where do I find MCP server capabilities?"
|
||||
- "Is this the complete guide or just a quick reference?"
|
||||
- "Which file should I read?"
|
||||
|
||||
### After (Single File)
|
||||
|
||||
**Advantages**:
|
||||
- ✅ ONE comprehensive source of truth
|
||||
- ✅ All MCP information in one place
|
||||
- ✅ Clear table of contents with navigation
|
||||
- ✅ Consistent formatting throughout
|
||||
- ✅ Easy to search with Ctrl+F
|
||||
- ✅ Single file to maintain
|
||||
|
||||
**User Experience**:
|
||||
- "I need MCP info" → Open MCP_SERVERS_GUIDE.md
|
||||
- Clear, comprehensive, complete
|
||||
|
||||
---
|
||||
|
||||
## Where to Find MCP Information Now
|
||||
|
||||
### For Complete MCP Documentation
|
||||
|
||||
**Read**: [MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md)
|
||||
|
||||
**Contains**:
|
||||
- Overview of all 8 servers
|
||||
- Installation and setup
|
||||
- Complete tool documentation for each server
|
||||
- Configuration examples
|
||||
- Usage patterns
|
||||
- Best practices
|
||||
- Troubleshooting
|
||||
|
||||
### For Quick Reference Template
|
||||
|
||||
**Read**: [.claude/agents/MCP_USAGE_TEMPLATES.md](.claude/agents/MCP_USAGE_TEMPLATES.md)
|
||||
|
||||
**Contains**:
|
||||
- Copy-paste MCP sections for agents
|
||||
- Quick usage examples
|
||||
- Decision tree for memory selection
|
||||
- File naming conventions
|
||||
|
||||
**Purpose**: Template for adding MCP usage to agent/command files
|
||||
|
||||
### For Setup Scripts
|
||||
|
||||
**Location**: `.claude/tools/`
|
||||
|
||||
**Files**:
|
||||
- `setup-all-mcp-servers.ps1` (Windows)
|
||||
- `setup-all-mcp-servers.sh` (Linux/Mac)
|
||||
- `test-mcp-servers.ps1` (Test - Windows)
|
||||
- `test-mcp-servers.sh` (Test - Linux/Mac)
|
||||
|
||||
**Quick Command**:
|
||||
```powershell
|
||||
# Windows
|
||||
.\.claude\tools\setup-all-mcp-servers.ps1
|
||||
|
||||
# Linux/Mac
|
||||
./.claude/tools/setup-all-mcp-servers.sh
|
||||
```
|
||||
|
||||
### For Configuration
|
||||
|
||||
**Read/Edit**: `.mcp.json` (root level)
|
||||
|
||||
---
|
||||
|
||||
## Updated References
|
||||
|
||||
All documentation files have been updated to reference the new consolidated guide:
|
||||
|
||||
### Updated Files
|
||||
|
||||
1. ✅ **README.md** - Added MCP_SERVERS_GUIDE.md to documentation section
|
||||
2. ✅ **.claude/tools/README.md** - Updated to reference consolidated guide
|
||||
3. ✅ **CLAUDE_CODE_SETUP_COMPLETE.md** - Still contains MCP section (high-level)
|
||||
|
||||
### Documentation Hierarchy
|
||||
|
||||
```
|
||||
README.md
|
||||
├─ Quick Overview
|
||||
└─ Points to → MCP_SERVERS_GUIDE.md
|
||||
|
||||
MCP_SERVERS_GUIDE.md (ROOT)
|
||||
└─ Complete MCP Documentation
|
||||
├─ All 8 servers
|
||||
├─ Setup & installation
|
||||
├─ Usage guide
|
||||
├─ Configuration
|
||||
├─ Best practices
|
||||
└─ Troubleshooting
|
||||
|
||||
.claude/agents/MCP_USAGE_TEMPLATES.md
|
||||
└─ Quick Reference Template
|
||||
└─ For agents and commands
|
||||
|
||||
.claude/tools/README.md
|
||||
└─ Tools Directory Index
|
||||
└─ Points to → MCP_SERVERS_GUIDE.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Quick Access Commands
|
||||
|
||||
### View MCP Documentation
|
||||
|
||||
```bash
|
||||
# From root directory
|
||||
cat MCP_SERVERS_GUIDE.md
|
||||
|
||||
# Search for specific server
|
||||
grep -A 20 "### 1. Serena MCP" MCP_SERVERS_GUIDE.md
|
||||
|
||||
# View in editor
|
||||
code MCP_SERVERS_GUIDE.md
|
||||
```
|
||||
|
||||
### Setup MCP Servers
|
||||
|
||||
```powershell
|
||||
# Windows
|
||||
.\.claude\tools\setup-all-mcp-servers.ps1
|
||||
|
||||
# Test installation
|
||||
.\.claude\tools\test-mcp-servers.ps1
|
||||
```
|
||||
|
||||
### Check Configuration
|
||||
|
||||
```bash
|
||||
# View MCP configuration
|
||||
cat .mcp.json | jq .
|
||||
|
||||
# List available MCP servers
|
||||
claude mcp list
|
||||
|
||||
# Test specific server
|
||||
claude mcp test serena
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Migration Guide
|
||||
|
||||
### If You Were Using Old Files
|
||||
|
||||
**Before**: Reading `MCP_SETUP_TOOLS.md` or `.claude/tools/README-MCP-SETUP.md`
|
||||
|
||||
**Now**: Read [MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md) instead
|
||||
|
||||
**What Changed**:
|
||||
- All content is now in MCP_SERVERS_GUIDE.md
|
||||
- More comprehensive and better organized
|
||||
- Includes everything from old files plus more
|
||||
|
||||
**Bookmarks to Update**:
|
||||
- ❌ Old: `MCP_SETUP_TOOLS.md`
|
||||
- ✅ New: `MCP_SERVERS_GUIDE.md`
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents - MCP_SERVERS_GUIDE.md
|
||||
|
||||
Here's what's in the new consolidated guide:
|
||||
|
||||
1. **Overview** - What are MCP servers and why use them
|
||||
2. **Quick Start** - One-command setup and verification
|
||||
3. **Installation & Setup** - Prerequisites and detailed setup
|
||||
4. **Available MCP Servers** - Complete documentation for all 8 servers:
|
||||
- Serena (code navigation + memory)
|
||||
- Sequential Thinking (reasoning)
|
||||
- Database Server (SQL)
|
||||
- Context7 (documentation)
|
||||
- Memory (knowledge graph)
|
||||
- Fetch (web scraping)
|
||||
- Windows MCP (desktop automation)
|
||||
- Playwright (browser automation)
|
||||
5. **Usage Guide** - Decision tree, agent patterns, command patterns
|
||||
6. **Configuration** - .mcp.json, settings.json, environment variables
|
||||
7. **Best Practices** - Memory management, efficiency, security
|
||||
8. **Troubleshooting** - Common issues and solutions
|
||||
9. **Advanced Topics** - Custom servers, performance, CI/CD
|
||||
|
||||
---
|
||||
|
||||
## Summary
|
||||
|
||||
✅ **Created**: [MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md) - Single comprehensive guide (800+ lines)
|
||||
|
||||
✅ **Removed**: 3 redundant files
|
||||
- MCP_SETUP_TOOLS.md
|
||||
- .claude/tools/README-MCP-SETUP.md
|
||||
- .claude/tools/QUICK-START.md
|
||||
|
||||
✅ **Updated**: 2 files to reference new guide
|
||||
- README.md
|
||||
- .claude/tools/README.md
|
||||
|
||||
✅ **Preserved**: Files still needed
|
||||
- .claude/MCP_CORRECT_USAGE_GUIDE.md (quick reference template)
|
||||
- Setup and test scripts
|
||||
|
||||
---
|
||||
|
||||
## Result
|
||||
|
||||
**Before**: MCP documentation spread across 4+ files
|
||||
|
||||
**After**: ONE comprehensive guide at root level
|
||||
|
||||
**User Experience**: Clear, complete, consolidated ✨
|
||||
|
||||
---
|
||||
|
||||
**Completed**: 2024-10-20
|
||||
**Maintained by**: Claude Code Setup Project
|
||||
1827
MCP_SERVERS_GUIDE.md
1827
MCP_SERVERS_GUIDE.md
File diff suppressed because it is too large
Load Diff
775
QUICKSTART.md
775
QUICKSTART.md
@@ -1,641 +1,326 @@
|
||||
# Claude Code Quickstart Guide
|
||||
# Foundry VTT + Pathfinder 1e Quick Start Guide
|
||||
|
||||
> **Get started with Claude Code Setup in 5 minutes**
|
||||
> **Version**: 3.0.0 | **Last Updated**: 2025-10-20
|
||||
> **Get started with Foundry VTT development in 5 minutes**
|
||||
>
|
||||
> **Version**: 1.0.0 | **Last Updated**: 2025-01-30
|
||||
|
||||
---
|
||||
|
||||
## What's Configured?
|
||||
## 🚀 What You'll Do in 5 Minutes
|
||||
|
||||
This project has **Claude Code fully configured** with:
|
||||
|
||||
✅ **8 MCP Servers** - Code navigation, memory, docs, automation
|
||||
✅ **8 Specialized Agents** - Architecture, review, debug, security, testing
|
||||
✅ **9 Slash Commands** - Analyze, review, implement, test, optimize, adr
|
||||
✅ **6 Output Styles** - Concise, professional, verbose, learning, explanatory, security
|
||||
✅ **6 Event Hooks** - Session lifecycle, bash, file operations, stop tracking
|
||||
✅ **Complete Templates** - Extend all features easily
|
||||
✅ **Automatic Status Summaries** - Every response includes tool usage details
|
||||
1. Install PF1 system dependencies (**1 min**)
|
||||
2. Build the PF1 system (**2 min**)
|
||||
3. Launch Foundry VTT (**1 min**)
|
||||
4. Create and test a macro (**1 min**)
|
||||
|
||||
---
|
||||
|
||||
## Quick Commands
|
||||
|
||||
### Essential Commands
|
||||
## Step 1: Install Dependencies (1 minute)
|
||||
|
||||
```bash
|
||||
/help # Get help
|
||||
/setup-info # See full configuration
|
||||
/cost # View token usage
|
||||
/rewind # Undo changes (ESC ESC also works)
|
||||
# Navigate to PF1 system directory
|
||||
cd src/foundryvtt-pathfinder1-v10.8
|
||||
|
||||
# Install npm packages
|
||||
npm install
|
||||
```
|
||||
|
||||
### Development Commands
|
||||
|
||||
```bash
|
||||
/adr [list|view|create|update] # Manage Architectural Decision Records
|
||||
/analyze [path] # Comprehensive code analysis
|
||||
/review [file-or-path] # Code review with best practices
|
||||
/implement [feature] # Implement new features
|
||||
/test [file-path] # Run and analyze tests
|
||||
/optimize [file] # Performance optimization
|
||||
/explain [file] # Detailed code explanation
|
||||
/scaffold [type] [name] # Generate boilerplate
|
||||
```
|
||||
|
||||
### Workflow Examples
|
||||
|
||||
```bash
|
||||
# Quick code review
|
||||
> /review src/components/
|
||||
|
||||
# Implement feature
|
||||
> /implement user authentication with JWT
|
||||
|
||||
# Run tests
|
||||
> /test
|
||||
|
||||
# Get analysis
|
||||
> /analyze src/services/payment.ts
|
||||
```
|
||||
✅ **Done!** Dependencies are installed.
|
||||
|
||||
---
|
||||
|
||||
## MCP Servers (8 Available)
|
||||
## Step 2: Build the PF1 System (2 minutes)
|
||||
|
||||
### 🎯 Most Useful
|
||||
|
||||
**Serena** - Code navigation + persistent memory
|
||||
```bash
|
||||
# Find code
|
||||
find_symbol("UserService")
|
||||
find_referencing_symbols("authenticate", "src/auth/")
|
||||
# Still in src/foundryvtt-pathfinder1-v10.8
|
||||
|
||||
# Store knowledge (survives sessions)
|
||||
write_memory("adr-001-architecture", "Decision: Use microservices...")
|
||||
read_memory("adr-001-architecture")
|
||||
# Production build (one-time)
|
||||
npm run build
|
||||
|
||||
# OR for development (watches for changes)
|
||||
npm run build:watch
|
||||
```
|
||||
|
||||
**Context7** - Real-time library docs
|
||||
```bash
|
||||
# Get current framework documentation
|
||||
resolve-library-id("react")
|
||||
get-library-docs("/facebook/react")
|
||||
```
|
||||
|
||||
**Memory Graph** - Temporary session context
|
||||
```bash
|
||||
# Build context for current task (cleared after session)
|
||||
create_entities([{name: "UserService", type: "Class"}])
|
||||
create_relations([{from: "UserService", to: "AuthMiddleware"}])
|
||||
```
|
||||
|
||||
### 🔧 Automation
|
||||
|
||||
**Playwright** - Browser automation
|
||||
**Windows MCP** - Desktop automation
|
||||
**Fetch** - Web scraping
|
||||
|
||||
### 💾 Databases
|
||||
|
||||
**Database Server** - General database queries
|
||||
|
||||
### 🧠 Reasoning
|
||||
|
||||
**Sequential Thinking** - Complex problem solving with extended thinking
|
||||
✅ **Done!** System is built and ready.
|
||||
|
||||
---
|
||||
|
||||
## Agents (8 Specialized)
|
||||
## Step 3: Launch Foundry VTT (1 minute)
|
||||
|
||||
### How to Use
|
||||
### Option A: Run Executable (Recommended)
|
||||
|
||||
**Automatic**: Just mention the domain
|
||||
```bash
|
||||
> "I need to design a microservices architecture"
|
||||
# → Architect agent automatically invoked
|
||||
# Navigate to Foundry directory
|
||||
cd ../FoundryVTT-11.315
|
||||
|
||||
# Run Foundry (Windows)
|
||||
.\foundryvtt.exe
|
||||
|
||||
# Or double-click foundryvtt.exe in File Explorer
|
||||
```
|
||||
|
||||
**Manual**: Explicitly request
|
||||
### Option B: Run via Node.js
|
||||
|
||||
```bash
|
||||
> "Use the security-analyst agent to review this code"
|
||||
# → Security analyst explicitly invoked
|
||||
cd src/FoundryVTT-11.315
|
||||
node resources/app/main.js
|
||||
```
|
||||
|
||||
### Available Agents
|
||||
|
||||
| Agent | Use For | Keywords |
|
||||
|-------|---------|----------|
|
||||
| **architect** | System design, technical planning | architecture, design, scalability |
|
||||
| **code-reviewer** | Code quality, best practices | review, quality, standards |
|
||||
| **debugger** | Bug diagnosis, troubleshooting | debug, error, bug, issue |
|
||||
| **documentation-writer** | Technical docs, README | documentation, docs, readme |
|
||||
| **project-manager** | Task breakdown, coordination | project, manage, coordinate |
|
||||
| **refactoring-specialist** | Code improvement, cleanup | refactor, improve, cleanup |
|
||||
| **security-analyst** | Security analysis, vulnerabilities | security, vulnerability, audit |
|
||||
| **test-engineer** | Testing strategy, test generation | test, testing, coverage |
|
||||
✅ **Done!** Foundry VTT is running.
|
||||
|
||||
---
|
||||
|
||||
## Output Styles (6 Available)
|
||||
## Step 4: Test a Macro (1 minute)
|
||||
|
||||
Change how Claude responds:
|
||||
### Create & Import Arcane Pool Macro
|
||||
|
||||
```bash
|
||||
/output-style concise # Brief, minimal explanation
|
||||
/output-style professional # Formal, business-appropriate
|
||||
/output-style verbose # Detailed, comprehensive
|
||||
/output-style explanatory # Educational insights
|
||||
/output-style learning # Interactive - Claude teaches YOU
|
||||
/output-style security-reviewer # Security-focused analysis
|
||||
/output-style default # Return to standard
|
||||
```
|
||||
1. Open Foundry VTT in browser (usually http://localhost:30000)
|
||||
2. Create or open a world
|
||||
3. Click **Macro Directory** in the sidebar
|
||||
4. Click **Create Macro**
|
||||
5. Set **Macro Type** to "Script"
|
||||
6. Copy content from `src/macro.js`
|
||||
7. Click **Save Macro**
|
||||
8. Drag macro to hotbar
|
||||
|
||||
### Quick Guide
|
||||
### Test the Macro
|
||||
|
||||
- **Quick fixes**: Use `concise`
|
||||
- **Learning**: Use `learning` or `explanatory`
|
||||
- **Reports**: Use `professional`
|
||||
- **Deep understanding**: Use `verbose`
|
||||
- **Security work**: Use `security-reviewer`
|
||||
1. Select a token on the canvas (any character)
|
||||
2. Click the macro on the hotbar
|
||||
3. You should see a notification or dialog
|
||||
|
||||
✅ **Done!** Your first macro works!
|
||||
|
||||
---
|
||||
|
||||
## Advanced Features
|
||||
## 📚 Next Steps (10-30 minutes)
|
||||
|
||||
### Extended Thinking
|
||||
### Option A: Build a Custom Macro
|
||||
|
||||
For complex problems, use thinking keywords:
|
||||
```bash
|
||||
> "Think hard about the best database architecture"
|
||||
> "Ultrathink: How should I optimize this algorithm?"
|
||||
1. Open browser console (F12)
|
||||
2. Try simple commands:
|
||||
```javascript
|
||||
// Get current token's actor
|
||||
console.log(token.actor.name);
|
||||
|
||||
// Get actor's HP
|
||||
console.log(token.actor.system.attributes.hp);
|
||||
|
||||
// Get Arcane Pool resource
|
||||
console.log(token.actor.system.resources.classFeat_arcanePool);
|
||||
```
|
||||
|
||||
Levels: `think` → `think hard` → `think harder` → `ultrathink`
|
||||
|
||||
### Plan Mode
|
||||
|
||||
**Toggle**: Press `Tab` key
|
||||
|
||||
**Use**: Explore code safely before making changes
|
||||
1. Enter plan mode (Tab)
|
||||
2. Explore and understand
|
||||
3. Exit plan mode (Tab)
|
||||
4. Execute changes
|
||||
|
||||
### Checkpointing
|
||||
|
||||
**Access**: Press `ESC ESC` or `/rewind`
|
||||
|
||||
**Options**:
|
||||
- Code only (keep conversation)
|
||||
- Conversation only (keep files)
|
||||
- Both (complete rollback)
|
||||
|
||||
**Retention**: 30 days
|
||||
|
||||
### Parallel Execution
|
||||
|
||||
Claude can run multiple operations simultaneously:
|
||||
```bash
|
||||
# Multiple file reads
|
||||
> "Read src/auth/service.ts, src/auth/middleware.ts, and src/auth/utils.ts"
|
||||
|
||||
# Multiple agents
|
||||
> "I need code review and security analysis"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Memory System
|
||||
|
||||
### Three Memory Types
|
||||
|
||||
**1. Project Instructions (CLAUDE.md)**
|
||||
- Team-shared project conventions
|
||||
- Auto-loaded every session
|
||||
- Location: [CLAUDE.md](CLAUDE.md)
|
||||
|
||||
**2. Persistent Memory (Serena)**
|
||||
- Survives across sessions
|
||||
- Store ADRs, lessons, patterns
|
||||
```bash
|
||||
write_memory("name", "content")
|
||||
read_memory("name")
|
||||
list_memories()
|
||||
```
|
||||
|
||||
**3. Temporary Memory (Knowledge Graph)**
|
||||
- Current session only
|
||||
- Entity relationships
|
||||
```bash
|
||||
create_entities([...])
|
||||
create_relations([...])
|
||||
read_graph()
|
||||
```
|
||||
|
||||
### When to Use What?
|
||||
|
||||
**Should it exist next week?**
|
||||
- YES → Serena persistent memory
|
||||
- NO → Knowledge graph
|
||||
|
||||
---
|
||||
|
||||
## Hooks (Automated Actions)
|
||||
|
||||
**5 hooks configured** - execute automatically:
|
||||
|
||||
| Hook | Trigger | Current Action |
|
||||
|------|---------|----------------|
|
||||
| session-start | Session begins | Create logs, log start |
|
||||
| session-end | Session ends | Final logging |
|
||||
| pre-bash | Before bash commands | Command logging |
|
||||
| post-write | After file writes | Write logging, (auto-format optional) |
|
||||
| user-prompt-submit | After prompt | Prompt tracking |
|
||||
|
||||
**Logs location**: `.claude/logs/`
|
||||
|
||||
---
|
||||
|
||||
## Creating Custom Features
|
||||
|
||||
### Custom Command
|
||||
|
||||
```bash
|
||||
# 1. Copy template
|
||||
cp .claude/commands/.COMMANDS_TEMPLATE.md .claude/commands/deploy.md
|
||||
|
||||
# 2. Edit file (add frontmatter and instructions)
|
||||
---
|
||||
description: Deploy application to production
|
||||
argument-hint: [environment]
|
||||
allowed-tools: Bash(git *:*), Bash(npm *:*), Read(*)
|
||||
---
|
||||
|
||||
# 3. Use it
|
||||
> /deploy production
|
||||
```
|
||||
|
||||
### Custom Agent
|
||||
|
||||
```bash
|
||||
# 1. Copy template
|
||||
cp .claude/agents/.AGENT_TEMPLATE.md .claude/agents/api-tester.md
|
||||
|
||||
# 2. Configure frontmatter and instructions
|
||||
---
|
||||
name: api-tester
|
||||
description: API testing and validation specialist
|
||||
allowed-tools: Read(*), Bash(curl:*), Bash(npm test:*)
|
||||
---
|
||||
|
||||
# 3. Use it
|
||||
> "Use the api-tester agent to test our REST API"
|
||||
```
|
||||
|
||||
### Custom Output Style
|
||||
|
||||
```bash
|
||||
# 1. Copy template
|
||||
cp .claude/output-styles/.OUTPUT_STYLES_TEMPLATE.md .claude/output-styles/debugging-mode.md
|
||||
|
||||
# 2. Define behavior
|
||||
---
|
||||
name: debugging-mode
|
||||
description: Systematic debugging with detailed analysis
|
||||
---
|
||||
|
||||
# 3. Activate
|
||||
> /output-style debugging-mode
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Common Workflows
|
||||
|
||||
### Feature Development
|
||||
|
||||
```bash
|
||||
# 1. Architecture
|
||||
> "Use architect agent to design payment integration"
|
||||
|
||||
# 2. Implement
|
||||
> /implement Stripe payment integration
|
||||
|
||||
# 3. Test
|
||||
> /test src/payments/
|
||||
|
||||
# 4. Review
|
||||
> /review src/payments/
|
||||
|
||||
# 5. Document
|
||||
> "Use documentation-writer agent to document payment flow"
|
||||
|
||||
# 6. Commit
|
||||
> "Create git commit"
|
||||
|
||||
# After each step, you'll see a status summary showing:
|
||||
# - What was done
|
||||
# - Which agents/commands/MCP servers were used
|
||||
# - Files modified
|
||||
```
|
||||
|
||||
### Bug Fixing
|
||||
|
||||
```bash
|
||||
# 1. Debug
|
||||
> "Use debugger agent: [paste error]"
|
||||
|
||||
# 2. Extended thinking (for complex bugs)
|
||||
> "Think hard about this race condition"
|
||||
|
||||
# 3. Review fix
|
||||
> /review [fixed file]
|
||||
|
||||
# 4. Test
|
||||
> /test
|
||||
```
|
||||
|
||||
### Code Review
|
||||
|
||||
```bash
|
||||
# 1. Standard review
|
||||
> /review src/
|
||||
|
||||
# 2. Security check
|
||||
> "Use security-analyst agent to check vulnerabilities"
|
||||
|
||||
# 3. Refactoring suggestions
|
||||
> "Use refactoring-specialist agent for improvements"
|
||||
```
|
||||
|
||||
### Learning Codebase
|
||||
|
||||
```bash
|
||||
# 1. Use explanatory style
|
||||
> /output-style explanatory
|
||||
|
||||
# 2. High-level questions
|
||||
> "Explain the architecture of this project"
|
||||
> "How does authentication work?"
|
||||
|
||||
# 3. Deep dive with Serena
|
||||
> get_symbols_overview("src/core/engine.ts")
|
||||
> find_symbol("Engine/initialize")
|
||||
|
||||
# 4. Store learnings
|
||||
> write_memory("architecture-overview", "The system uses...")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## File Shortcuts
|
||||
|
||||
### Reference Files
|
||||
|
||||
Use `@` to include files in prompts:
|
||||
```bash
|
||||
> "Review @src/auth/service.ts"
|
||||
> "Explain @src/utils/*.ts"
|
||||
```
|
||||
|
||||
### Import in CLAUDE.md
|
||||
|
||||
Import additional context:
|
||||
```markdown
|
||||
@docs/architecture.md
|
||||
@docs/coding-standards.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Configuration Quick Reference
|
||||
|
||||
### Key Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `.claude/settings.json` | Main configuration (shared) |
|
||||
| `.claude/settings.local.json` | Personal config (not in git) |
|
||||
| `.mcp.json` | MCP servers |
|
||||
| `CLAUDE.md` | Project instructions |
|
||||
| `.claude/agents/*.md` | Specialized agents |
|
||||
| `.claude/commands/*.md` | Slash commands |
|
||||
| `.claude/output-styles/*.md` | Response styles |
|
||||
| `.claude/hooks/*.sh` | Automation scripts |
|
||||
|
||||
### Permissions
|
||||
|
||||
**Location**: `.claude/settings.json` → `permissions`
|
||||
|
||||
```json
|
||||
{
|
||||
"allowed": ["Read(*)", "Write(*)", "Bash(git *:*)"],
|
||||
"ask": ["Bash(npm install:*)"],
|
||||
"denied": ["Bash(rm -rf /:*)"]
|
||||
3. Create `src/macro_mytest.js`:
|
||||
```javascript
|
||||
(async () => {
|
||||
if (!token) {
|
||||
ui.notifications.warn("Select a token!");
|
||||
return;
|
||||
}
|
||||
|
||||
const actor = token.actor;
|
||||
ui.notifications.info(`Selected: ${actor.name}`);
|
||||
})();
|
||||
```
|
||||
|
||||
4. Import macro in Foundry and test
|
||||
|
||||
### Option B: Modify the PF1 System
|
||||
|
||||
1. Edit a file in `src/foundryvtt-pathfinder1-v10.8/module/`
|
||||
2. Run `npm run build` (already running in watch mode)
|
||||
3. Reload Foundry (F5)
|
||||
4. Test your change
|
||||
|
||||
### Option C: Explore the Code
|
||||
|
||||
1. Read [CLAUDE.md](CLAUDE.md) for complete documentation
|
||||
2. Check out macro examples: `src/macro.js`, `src/macro_haste.js`
|
||||
3. Review PF1 system structure: `src/foundryvtt-pathfinder1-v10.8/module/`
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Common Commands
|
||||
|
||||
```bash
|
||||
# Build PF1 system
|
||||
npm run build
|
||||
|
||||
# Development mode (auto-rebuild)
|
||||
npm run build:watch
|
||||
|
||||
# Lint code
|
||||
npm run lint
|
||||
|
||||
# Format code
|
||||
npm run format
|
||||
|
||||
# Extract compendium packs
|
||||
npm run packs:extract
|
||||
|
||||
# Compile compendium packs
|
||||
npm run packs:compile
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Keyboard Shortcuts
|
||||
## 🎮 Foundry VTT Basics
|
||||
|
||||
- `Tab` - Toggle plan mode
|
||||
- `ESC ESC` - Access checkpoints
|
||||
- `Ctrl+C` - Interrupt Claude
|
||||
### Global Objects Available in Macros
|
||||
|
||||
```javascript
|
||||
game.actors // All actors
|
||||
game.items // All items
|
||||
game.macros // All macros
|
||||
game.scenes // All scenes
|
||||
ui.notifications // Toast notifications
|
||||
canvas // Canvas/rendering
|
||||
```
|
||||
|
||||
### Common Macro Pattern
|
||||
|
||||
```javascript
|
||||
(async () => {
|
||||
// 1. Validate
|
||||
if (!token) {
|
||||
ui.notifications.warn("Select a token!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Get data
|
||||
const actor = token.actor;
|
||||
const hp = actor.system.attributes.hp;
|
||||
|
||||
// 3. Do something
|
||||
await actor.update({
|
||||
"system.attributes.hp.value": hp.value - 10
|
||||
});
|
||||
|
||||
// 4. Feedback
|
||||
ui.notifications.info("Damage applied!");
|
||||
})();
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Troubleshooting
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Agent Not Working
|
||||
### Macro Not Working?
|
||||
|
||||
```bash
|
||||
# Check it exists
|
||||
ls .claude/agents/
|
||||
|
||||
# Check description has keywords
|
||||
cat .claude/agents/[name].md
|
||||
|
||||
# Try manual invocation
|
||||
> "Use the [agent-name] agent to..."
|
||||
|
||||
# Restart Claude
|
||||
```javascript
|
||||
// Check browser console (F12)
|
||||
console.log(token); // Is token selected?
|
||||
console.log(token.actor); // Does actor exist?
|
||||
console.log(actor.system); // What data is available?
|
||||
```
|
||||
|
||||
### Command Not Found
|
||||
### Build Failed?
|
||||
|
||||
```bash
|
||||
# Check it exists
|
||||
ls .claude/commands/
|
||||
|
||||
# List available
|
||||
> /help
|
||||
|
||||
# Restart Claude
|
||||
# Clean and rebuild
|
||||
cd src/foundryvtt-pathfinder1-v10.8
|
||||
rm -r dist node_modules
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
### MCP Server Failed
|
||||
### Foundry Won't Start?
|
||||
|
||||
```bash
|
||||
# Check configuration
|
||||
cat .mcp.json | jq '.mcpServers'
|
||||
|
||||
# Test command manually
|
||||
npx -y @modelcontextprotocol/server-sequential-thinking
|
||||
|
||||
# Check logs
|
||||
cat .claude/logs/session.log
|
||||
cat src/FoundryVTT-11.315/Data/Logs/foundry.log
|
||||
|
||||
# Try Node.js directly
|
||||
cd src/FoundryVTT-11.315
|
||||
node resources/app/main.js
|
||||
```
|
||||
|
||||
### Permission Denied
|
||||
### Port Already in Use?
|
||||
|
||||
Foundry defaults to port 30000. If in use:
|
||||
```bash
|
||||
# Check permissions
|
||||
cat .claude/settings.json | jq '.permissions'
|
||||
# Find process using port
|
||||
netstat -ano | findstr :30000
|
||||
|
||||
# Add to allowed
|
||||
# Edit settings.json → permissions → allowed array
|
||||
|
||||
# Restart Claude
|
||||
# Kill process (Windows)
|
||||
taskkill /PID <PID> /F
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Tips & Tricks
|
||||
## 📖 Documentation
|
||||
|
||||
### 🚀 Performance
|
||||
|
||||
1. **Use concise style** for quick tasks
|
||||
2. **Parallel operations** when possible
|
||||
3. **Serena symbol tools** instead of full file reads
|
||||
4. **Extended thinking** only for complex problems
|
||||
|
||||
### 🎯 Effectiveness
|
||||
|
||||
1. **Start broad, then narrow** - high-level first, details later
|
||||
2. **Use appropriate tools** - agents for domains, commands for workflows
|
||||
3. **Leverage memory** - store ADRs, lessons, patterns
|
||||
4. **Reference files** with `@` syntax
|
||||
|
||||
### 🔐 Security
|
||||
|
||||
1. **Review hooks** before using
|
||||
2. **Restrict sensitive tools** in permissions
|
||||
3. **Use security-analyst** for audits
|
||||
4. **Never commit secrets** to CLAUDE.md
|
||||
|
||||
### 📈 Learning
|
||||
|
||||
1. **Use explanatory style** for understanding
|
||||
2. **Extended thinking** for complex topics
|
||||
3. **Store learnings** in Serena memory
|
||||
4. **Learning style** for hands-on practice
|
||||
| Document | Purpose | Read Time |
|
||||
|----------|---------|-----------|
|
||||
| **[README.md](README.md)** | Project overview & setup | 10 min |
|
||||
| **[CLAUDE.md](CLAUDE.md)** | Complete technical documentation | 30 min |
|
||||
| **Foundry API** | https://foundryvtt.com/api/v11/ | Reference |
|
||||
| **PF1 GitHub** | https://github.com/Furyspark/foundryvtt-pathfinder1 | Reference |
|
||||
|
||||
---
|
||||
|
||||
## Next Steps
|
||||
## 🎯 Success Checklist
|
||||
|
||||
### New Users
|
||||
After this quickstart, you should be able to:
|
||||
|
||||
1. Try basic commands: `/help`, `/setup-info`
|
||||
2. Experiment with agents: "Use the [agent] agent to..."
|
||||
3. Try output styles: `/output-style learning`
|
||||
4. Create your first custom command
|
||||
|
||||
### Experienced Users
|
||||
|
||||
1. Set up personal `.claude/settings.local.json`
|
||||
2. Create project-specific agents
|
||||
3. Configure hooks for your workflow
|
||||
4. Leverage MCP servers fully
|
||||
|
||||
### Team Setup
|
||||
|
||||
1. Review and customize `CLAUDE.md`
|
||||
2. Add team-specific commands
|
||||
3. Configure permissions
|
||||
4. Share setup via git
|
||||
- [x] Install and build PF1 system
|
||||
- [x] Launch Foundry VTT
|
||||
- [x] Create a macro
|
||||
- [x] Execute a macro in-game
|
||||
- [x] Access browser console (F12)
|
||||
- [x] Modify macro code
|
||||
- [x] Understand basic actor/item API
|
||||
|
||||
---
|
||||
|
||||
## Resources
|
||||
## 🎓 Learn More
|
||||
|
||||
### Documentation
|
||||
### Beginner Topics
|
||||
- Creating your first macro
|
||||
- Understanding actor/item structure
|
||||
- Using the browser console
|
||||
|
||||
- **Complete Setup**: [CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md) - Full documentation
|
||||
- **Templates Guide**: [.claude/TEMPLATES_README.md](.claude/TEMPLATES_README.md) - Template details
|
||||
- **MCP Servers**: [MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md) - Complete MCP documentation
|
||||
- **MCP Templates**: [.claude/agents/MCP_USAGE_TEMPLATES.md](.claude/agents/MCP_USAGE_TEMPLATES.md) - Copy-paste templates for agents
|
||||
- **Official Docs**: https://docs.claude.com/en/docs/claude-code/
|
||||
### Intermediate Topics
|
||||
- Dialog-based user interfaces
|
||||
- Buff management systems
|
||||
- Macro chaining
|
||||
|
||||
### Templates
|
||||
### Advanced Topics
|
||||
- Modifying PF1 system code
|
||||
- Adding compendium content
|
||||
- Integrating Claude Code automation
|
||||
|
||||
- **Agent**: [.claude/agents/.AGENT_TEMPLATE.md](.claude/agents/.AGENT_TEMPLATE.md)
|
||||
- **Command**: [.claude/commands/.COMMANDS_TEMPLATE.md](.claude/commands/.COMMANDS_TEMPLATE.md)
|
||||
- **Skill**: [.claude/skills/.SKILL_TEMPLATE.md](.claude/skills/.SKILL_TEMPLATE.md)
|
||||
- **Output Style**: [.claude/output-styles/.OUTPUT_STYLES_TEMPLATE.md](.claude/output-styles/.OUTPUT_STYLES_TEMPLATE.md)
|
||||
- **Project**: [CLAUDE_TEMPLATE.md](CLAUDE_TEMPLATE.md)
|
||||
|
||||
### Get Help
|
||||
|
||||
1. `/help` - Built-in help
|
||||
2. `/setup-info` - Configuration details
|
||||
3. GitHub Issues: https://github.com/anthropics/claude-code/issues
|
||||
4. Official Docs: https://docs.claude.com/en/docs/claude-code/
|
||||
See [CLAUDE.md](CLAUDE.md) for detailed tutorials on all topics.
|
||||
|
||||
---
|
||||
|
||||
## Cheat Sheet
|
||||
## 💡 Quick Tips
|
||||
|
||||
```bash
|
||||
# Development
|
||||
/adr [action] [id] # Manage ADRs
|
||||
/analyze [path] # Code analysis
|
||||
/review [path] # Code review
|
||||
/implement [feature] # Feature implementation
|
||||
/test [file] # Run tests
|
||||
/optimize [file] # Optimize performance
|
||||
/explain [file] # Explain code
|
||||
|
||||
# Agents (automatic or manual)
|
||||
architect # System design
|
||||
code-reviewer # Code review
|
||||
debugger # Bug fixing
|
||||
documentation-writer # Docs
|
||||
security-analyst # Security
|
||||
test-engineer # Testing
|
||||
|
||||
# Output Styles
|
||||
/output-style concise # Brief
|
||||
/output-style learning # Interactive
|
||||
/output-style explanatory # Educational
|
||||
/output-style security-reviewer # Security-focused
|
||||
|
||||
# Memory
|
||||
write_memory(name, content) # Save (persistent)
|
||||
read_memory(name) # Load (persistent)
|
||||
create_entities([...]) # Build context (temporary)
|
||||
|
||||
# Extended Thinking
|
||||
think / think hard / ultrathink
|
||||
|
||||
# Shortcuts
|
||||
Tab # Plan mode toggle
|
||||
ESC ESC # Checkpoints
|
||||
@file # Reference file
|
||||
```
|
||||
1. **Always select a token** - Most macros require a token to be selected
|
||||
2. **Use F12 for debugging** - Browser console shows errors and logs
|
||||
3. **F5 reloads Foundry** - Refresh after system changes
|
||||
4. **Check notification** - Macros often provide user feedback via notifications
|
||||
5. **Save often** - Macros are stored in Foundry's database
|
||||
|
||||
---
|
||||
|
||||
**Version**: 3.0.0 | **Last Updated**: 2025-10-20
|
||||
## 🆘 Need Help?
|
||||
|
||||
**Ready to start?** Run `claude` and try:
|
||||
```bash
|
||||
> /setup-info
|
||||
> "Use the architect agent to explain the project structure"
|
||||
> /output-style learning
|
||||
```
|
||||
1. **Check [CLAUDE.md](CLAUDE.md)** - Complete documentation
|
||||
2. **Review examples** - `src/macro.js`, `src/macro_haste.js`
|
||||
3. **Browser console (F12)** - Error messages and debugging
|
||||
4. **Foundry logs** - `src/FoundryVTT-11.315/Data/Logs/foundry.log`
|
||||
|
||||
For complete documentation, see [CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md)
|
||||
---
|
||||
|
||||
## ✅ Ready to Continue?
|
||||
|
||||
**Next steps:**
|
||||
1. Try modifying the Arcane Pool macro
|
||||
2. Create your own custom macro
|
||||
3. Read [CLAUDE.md](CLAUDE.md) for advanced topics
|
||||
4. Explore PF1 system code
|
||||
|
||||
---
|
||||
|
||||
**Questions?** Check [README.md](README.md) or [CLAUDE.md](CLAUDE.md)
|
||||
|
||||
878
README.md
878
README.md
@@ -1,539 +1,383 @@
|
||||
# Claude Code Setup - Complete Claude Code Configuration
|
||||
# Foundry VTT + Pathfinder 1e Development Environment
|
||||
|
||||
> **Production-ready Claude Code setup with comprehensive documentation**
|
||||
> **Version**: 3.0.0 | **Last Updated**: 2025-10-20
|
||||
> **A complete development environment for creating custom macros and automating Foundry VTT with Pathfinder 1e**
|
||||
>
|
||||
> **Version**: 1.0.0 | **Last Updated**: 2025-01-30 | **Repository**: [Gitea](https://gitea.gowlershome.dyndns.org/Gowler/FoundryVTT.git)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Quick Start
|
||||
## 🎯 Quick Start
|
||||
|
||||
**New to this project?** Start here: **[QUICKSTART.md](QUICKSTART.md)** (5-minute read)
|
||||
|
||||
**Need complete details?** See: **[CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md)** (comprehensive)
|
||||
**Need complete details?** See: **[CLAUDE.md](CLAUDE.md)** (comprehensive project guide)
|
||||
|
||||
---
|
||||
|
||||
## 📋 What's Included
|
||||
## 📋 What This Project Includes
|
||||
|
||||
This project demonstrates a **fully configured Claude Code setup** with:
|
||||
This is a professional development environment for Foundry VTT + Pathfinder 1e that combines:
|
||||
|
||||
### Core Features (100% Configured)
|
||||
### Core Components
|
||||
|
||||
✅ **8 MCP Servers**
|
||||
- Serena (code navigation + persistent memory)
|
||||
- Sequential Thinking (complex reasoning)
|
||||
- Context7 (real-time library docs)
|
||||
- Memory (knowledge graph)
|
||||
- Playwright (browser automation)
|
||||
- Windows MCP (desktop automation)
|
||||
- Fetch (web scraping)
|
||||
- Database Server
|
||||
✅ **Foundry VTT v11.315**
|
||||
- Complete Electron-based virtual tabletop platform
|
||||
- Express.js server backend with NeDB database
|
||||
- PIXI.js canvas rendering system
|
||||
- Socket.io real-time multiplayer support
|
||||
|
||||
✅ **8 Specialized Agents**
|
||||
- Architect, Code Reviewer, Debugger
|
||||
- Documentation Writer, Project Manager
|
||||
- Refactoring Specialist, Security Analyst, Test Engineer
|
||||
✅ **Pathfinder 1e System v10.8**
|
||||
- Full PF1 game rules implementation
|
||||
- Character sheets and NPC templates
|
||||
- Spell and feat compendiums
|
||||
- Automated action resolution system
|
||||
- Built with Vite + ES Modules + TypeScript
|
||||
|
||||
✅ **9 Slash Commands**
|
||||
- `/analyze`, `/review`, `/implement`, `/test`
|
||||
- `/optimize`, `/explain`, `/scaffold`, `/setup-info`, `/adr`
|
||||
✅ **Custom Macros & Automation**
|
||||
- Arcane Pool enhancement system (Magus class feature)
|
||||
- Haste buff automation with attack interception
|
||||
- Reusable macro patterns and templates
|
||||
- Dialog-based user interfaces
|
||||
|
||||
✅ **6 Output Styles**
|
||||
- Concise, Professional, Verbose
|
||||
- Explanatory, Learning, Security Reviewer
|
||||
|
||||
✅ **6 Event Hooks**
|
||||
- Session lifecycle (start/end)
|
||||
- Bash command interception
|
||||
- File write logging
|
||||
- User prompt tracking
|
||||
- Stop tracking for summaries
|
||||
|
||||
✅ **Complete Templates**
|
||||
- Agent Template, Command Template
|
||||
- Skill Template, Output Style Template
|
||||
- CLAUDE.md Project Template
|
||||
|
||||
✅ **Automatic Status Summaries**
|
||||
- Every task completion includes detailed summary
|
||||
- Shows agents, commands, MCP servers used
|
||||
- Lists all files modified
|
||||
- Promotes transparency and learning
|
||||
✅ **AI-Assisted Development**
|
||||
- Claude Code integration with 8 MCP servers
|
||||
- Semantic code navigation (Serena)
|
||||
- Complex problem solving (Sequential Thinking)
|
||||
- Real-time library documentation (Context7)
|
||||
- Persistent project memory (Knowledge Graph)
|
||||
|
||||
---
|
||||
|
||||
## 📚 Documentation
|
||||
## 🚀 Getting Started
|
||||
|
||||
### For Users
|
||||
### 1. Prerequisites
|
||||
|
||||
| Document | Purpose | Read Time |
|
||||
|----------|---------|-----------|
|
||||
| **[QUICKSTART.md](QUICKSTART.md)** | Get started quickly | 5 min |
|
||||
| **[CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md)** | Complete documentation | 30 min |
|
||||
| **[MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md)** | Complete MCP server documentation | 20 min |
|
||||
| **[CLAUDE.md](CLAUDE.md)** | Project instructions for Claude | Reference |
|
||||
- **Foundry VTT License** (required to download official builds)
|
||||
- **Node.js** v16-19 (for PF1 system development)
|
||||
- **npm** (Node Package Manager)
|
||||
- **Git** (version control)
|
||||
- **Visual Studio Code** (recommended IDE)
|
||||
|
||||
### For Developers
|
||||
|
||||
| Document | Purpose |
|
||||
|----------|---------|
|
||||
| **[CLAUDE_TEMPLATE.md](CLAUDE_TEMPLATE.md)** | Template for new projects |
|
||||
| **[.claude/TEMPLATES_README.md](.claude/TEMPLATES_README.md)** | Master template guide |
|
||||
| **[.claude/agents/MCP_USAGE_TEMPLATES.md](.claude/agents/MCP_USAGE_TEMPLATES.md)** | MCP usage templates for agents |
|
||||
| **[.claude/TEMPLATE_CAPABILITIES_ANALYSIS.md](.claude/TEMPLATE_CAPABILITIES_ANALYSIS.md)** | Template review & missing features |
|
||||
|
||||
### Specialized Guides
|
||||
|
||||
| Document | Purpose |
|
||||
|----------|---------|
|
||||
| **[MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md)** | Complete MCP server documentation |
|
||||
| **[.claude/CHECKPOINTING_GUIDE.md](.claude/CHECKPOINTING_GUIDE.md)** | Session checkpointing |
|
||||
| **[.claude/PLUGIN_SETUP.md](.claude/PLUGIN_SETUP.md)** | Plugin marketplace |
|
||||
| **[.claude/STATUS_LINE_SETUP.md](.claude/STATUS_LINE_SETUP.md)** | Status line customization |
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Key Capabilities
|
||||
|
||||
### Intelligent Code Navigation (Serena MCP)
|
||||
### 2. Initial Setup
|
||||
|
||||
```bash
|
||||
# Find symbols
|
||||
find_symbol("UserService")
|
||||
# Navigate to project root
|
||||
cd "C:\DEV\Foundry2\Foundry_VTT"
|
||||
|
||||
# Find references
|
||||
find_referencing_symbols("authenticate", "src/auth/")
|
||||
# Install PF1 system dependencies
|
||||
cd src/foundryvtt-pathfinder1-v10.8
|
||||
npm install
|
||||
|
||||
# Store persistent knowledge
|
||||
write_memory("adr-001-architecture", "Decision: Microservices...")
|
||||
# Build the PF1 system
|
||||
npm run build
|
||||
|
||||
# Or use watch mode for development
|
||||
npm run build:watch
|
||||
```
|
||||
|
||||
### Specialized Agents (8 Available)
|
||||
### 3. Running Foundry VTT
|
||||
|
||||
```bash
|
||||
# Automatic invocation
|
||||
> "I need to design a microservices architecture"
|
||||
# → Architect agent activated
|
||||
# Option 1: Run Foundry directly
|
||||
cd src/FoundryVTT-11.315
|
||||
.\foundryvtt.exe
|
||||
|
||||
# Manual invocation
|
||||
> "Use the security-analyst agent to review this code"
|
||||
# Option 2: Launch via Node.js
|
||||
node resources/app/main.js
|
||||
```
|
||||
|
||||
### Development Workflows (8 Commands)
|
||||
### 4. Creating & Using Macros
|
||||
|
||||
```bash
|
||||
/analyze src/ # Code analysis
|
||||
/review src/ # Code review
|
||||
/implement feature # Build features
|
||||
/test # Run tests
|
||||
/optimize file.ts # Performance tuning
|
||||
```
|
||||
|
||||
### Extended Thinking
|
||||
|
||||
```bash
|
||||
> "Think hard about the best database architecture"
|
||||
> "Ultrathink: How to optimize this algorithm?"
|
||||
```
|
||||
|
||||
### Custom Output Modes (6 Styles)
|
||||
|
||||
```bash
|
||||
/output-style learning # Interactive learning
|
||||
/output-style security-reviewer # Security focus
|
||||
/output-style explanatory # Educational insights
|
||||
```
|
||||
1. Open Foundry VTT
|
||||
2. Click "Macro Directory" in the sidebar
|
||||
3. Create a new macro (type: Script)
|
||||
4. Copy content from `src/macro.js` or `src/macro_haste.js`
|
||||
5. Save and drag to hotbar
|
||||
|
||||
---
|
||||
|
||||
## 📁 Project Structure
|
||||
|
||||
```
|
||||
Claude Code Setup/
|
||||
Foundry_VTT/
|
||||
├── src/
|
||||
│ ├── FoundryVTT-11.315/ # Foundry core application
|
||||
│ │ ├── resources/app/ # Electron app resources
|
||||
│ │ ├── node_modules/ # Foundry dependencies
|
||||
│ │ └── Data/ # User worlds & data (gitignored)
|
||||
│ │
|
||||
│ ├── foundryvtt-pathfinder1-v10.8/# PF1 system module
|
||||
│ │ ├── module/ # System source code (ES modules)
|
||||
│ │ ├── packs/ # Compendium databases
|
||||
│ │ ├── public/system.json # System manifest
|
||||
│ │ ├── package.json # Dev dependencies & scripts
|
||||
│ │ └── vite.config.js # Build configuration
|
||||
│ │
|
||||
│ ├── macro.js # Arcane Pool macro
|
||||
│ ├── macro_haste.js # Haste automation macro
|
||||
│ └── zeratal.json # Example character data
|
||||
│
|
||||
├── CLAUDE.md # Complete project documentation
|
||||
├── QUICKSTART.md # Quick start guide
|
||||
├── README.md # This file
|
||||
├── QUICKSTART.md # Quick start guide (5 min)
|
||||
├── CLAUDE_CODE_SETUP_COMPLETE.md # Complete documentation (30 min)
|
||||
├── CLAUDE.md # Project instructions
|
||||
├── CLAUDE_TEMPLATE.md # Project template
|
||||
│
|
||||
├── .claude/ # Claude Code configuration
|
||||
├── .mcp.json # MCP servers configuration
|
||||
│
|
||||
└── .claude/ # Main configuration directory
|
||||
├── settings.json # Shared configuration
|
||||
├── settings.local.json # Personal configuration
|
||||
│
|
||||
├── agents/ # 8 specialized agents
|
||||
│ ├── architect.md
|
||||
│ ├── code-reviewer.md
|
||||
│ ├── debugger.md
|
||||
│ ├── documentation-writer.md
|
||||
│ ├── project-manager.md
|
||||
│ ├── refactoring-specialist.md
|
||||
│ ├── security-analyst.md
|
||||
│ ├── test-engineer.md
|
||||
│ └── .AGENT_TEMPLATE.md
|
||||
│
|
||||
├── commands/ # 9 slash commands
|
||||
│ ├── adr.md
|
||||
│ ├── analyze.md
|
||||
│ ├── explain.md
|
||||
│ ├── implement.md
|
||||
│ ├── optimize.md
|
||||
│ ├── review.md
|
||||
│ ├── scaffold.md
|
||||
│ ├── setup-info.md
|
||||
│ ├── test.md
|
||||
│ └── .COMMANDS_TEMPLATE.md
|
||||
│
|
||||
├── output-styles/ # 6 custom styles
|
||||
│ ├── concise.md
|
||||
│ ├── professional.md
|
||||
│ ├── verbose.md
|
||||
│ ├── explanatory.md
|
||||
│ ├── learning.md
|
||||
│ ├── security-reviewer.md
|
||||
│ └── .OUTPUT_STYLES_TEMPLATE.md
|
||||
│
|
||||
├── skills/ # Skills directory
|
||||
│ └── .SKILL_TEMPLATE.md
|
||||
│
|
||||
├── hooks/ # 5 event hooks
|
||||
│ ├── session-start.sh
|
||||
│ ├── session-end.sh
|
||||
│ ├── pre-bash.sh
|
||||
│ ├── post-write.sh
|
||||
│ └── user-prompt-submit.sh
|
||||
│
|
||||
├── tools/ # Utility scripts
|
||||
│ ├── start-memory.ps1
|
||||
│ └── statusline.sh
|
||||
│
|
||||
├── logs/ # Session logs
|
||||
│
|
||||
└── [Documentation Files]
|
||||
├── TEMPLATES_README.md
|
||||
├── MCP_CORRECT_USAGE_GUIDE.md
|
||||
├── TEMPLATE_CAPABILITIES_ANALYSIS.md
|
||||
├── CHECKPOINTING_GUIDE.md
|
||||
├── PLUGIN_SETUP.md
|
||||
└── STATUS_LINE_SETUP.md
|
||||
└── .git/ # Git repository
|
||||
```
|
||||
|
||||
**See [CLAUDE.md](CLAUDE.md) for detailed project structure and file descriptions.**
|
||||
|
||||
---
|
||||
|
||||
## 🚦 Getting Started
|
||||
## 🛠️ Development Workflow
|
||||
|
||||
### 1. First Time Setup (1 minute)
|
||||
### Building the PF1 System
|
||||
|
||||
```bash
|
||||
# Clone or open this project
|
||||
cd "Claude Code Setup"
|
||||
cd src/foundryvtt-pathfinder1-v10.8
|
||||
|
||||
# Start Claude Code
|
||||
claude
|
||||
# Production build
|
||||
npm run build
|
||||
|
||||
# Verify setup
|
||||
> /setup-info
|
||||
# Development build with hot reload
|
||||
npm run build:watch
|
||||
|
||||
# Lint code
|
||||
npm run lint
|
||||
|
||||
# Format code
|
||||
npm run format
|
||||
```
|
||||
|
||||
### 2. Try Basic Commands (2 minutes)
|
||||
### Creating a New Macro
|
||||
|
||||
```bash
|
||||
# Get help
|
||||
> /help
|
||||
All macros follow the IIFE (Immediately Invoked Function Expression) pattern:
|
||||
|
||||
# See what's configured
|
||||
> /setup-info
|
||||
|
||||
# Try a command
|
||||
> /analyze src/
|
||||
|
||||
# Try an agent
|
||||
> "Use the architect agent to explain the project structure"
|
||||
```
|
||||
|
||||
### 3. Learn Core Features (5 minutes)
|
||||
|
||||
Read **[QUICKSTART.md](QUICKSTART.md)** for:
|
||||
- Essential commands
|
||||
- MCP server usage
|
||||
- Agent invocation
|
||||
- Output styles
|
||||
- Memory system
|
||||
|
||||
### 4. Deep Dive (30 minutes)
|
||||
|
||||
Read **[CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md)** for complete details on:
|
||||
- All MCP servers and capabilities
|
||||
- Agent configuration and usage
|
||||
- Slash command reference
|
||||
- Hooks system
|
||||
- Templates
|
||||
- Advanced features
|
||||
- Best practices
|
||||
|
||||
---
|
||||
|
||||
## 💡 Common Use Cases
|
||||
|
||||
### Feature Development
|
||||
|
||||
```bash
|
||||
# 1. Architecture
|
||||
> "Use architect agent to design payment integration"
|
||||
|
||||
# 2. Implement
|
||||
> /implement Stripe payment integration
|
||||
|
||||
# 3. Test
|
||||
> /test src/payments/
|
||||
|
||||
# 4. Review
|
||||
> /review src/payments/
|
||||
|
||||
# 5. Document
|
||||
> "Use documentation-writer agent to document payment flow"
|
||||
```
|
||||
|
||||
### Bug Fixing
|
||||
|
||||
```bash
|
||||
# 1. Debug
|
||||
> "Use debugger agent: [paste error]"
|
||||
|
||||
# 2. Extended thinking (for complex bugs)
|
||||
> "Think hard about this race condition"
|
||||
|
||||
# 3. Review fix
|
||||
> /review [fixed file]
|
||||
```
|
||||
|
||||
### Code Review
|
||||
|
||||
```bash
|
||||
# 1. Standard review
|
||||
> /review src/
|
||||
|
||||
# 2. Security check
|
||||
> "Use security-analyst agent to check vulnerabilities"
|
||||
|
||||
# 3. Refactoring suggestions
|
||||
> "Use refactoring-specialist agent for improvements"
|
||||
```
|
||||
|
||||
### Learning Codebase
|
||||
|
||||
```bash
|
||||
# 1. Use explanatory style
|
||||
> /output-style explanatory
|
||||
|
||||
# 2. High-level questions
|
||||
> "Explain the architecture of this project"
|
||||
|
||||
# 3. Deep dive with Serena
|
||||
> get_symbols_overview("src/core/engine.ts")
|
||||
|
||||
# 4. Store learnings
|
||||
> write_memory("architecture-overview", "The system uses...")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎓 Learning Path
|
||||
|
||||
### Beginner (Day 1)
|
||||
|
||||
1. Read [QUICKSTART.md](QUICKSTART.md)
|
||||
2. Try basic commands (`/help`, `/setup-info`)
|
||||
3. Experiment with one agent
|
||||
4. Try one output style
|
||||
|
||||
### Intermediate (Week 1)
|
||||
|
||||
1. Use all slash commands
|
||||
2. Work with multiple agents
|
||||
3. Try extended thinking
|
||||
4. Use Serena MCP for code navigation
|
||||
|
||||
### Advanced (Month 1)
|
||||
|
||||
1. Create custom commands
|
||||
2. Build custom agents
|
||||
3. Configure hooks for your workflow
|
||||
4. Leverage all MCP servers
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Customization
|
||||
|
||||
### Add a Custom Command
|
||||
|
||||
```bash
|
||||
# Copy template
|
||||
cp .claude/commands/.COMMANDS_TEMPLATE.md .claude/commands/my-command.md
|
||||
|
||||
# Edit and configure
|
||||
# Use it
|
||||
> /my-command
|
||||
```
|
||||
|
||||
### Add a Custom Agent
|
||||
|
||||
```bash
|
||||
# Copy template
|
||||
cp .claude/agents/.AGENT_TEMPLATE.md .claude/agents/my-agent.md
|
||||
|
||||
# Configure and use
|
||||
> "Use the my-agent agent to..."
|
||||
```
|
||||
|
||||
### Add a Custom Output Style
|
||||
|
||||
```bash
|
||||
# Copy template
|
||||
cp .claude/output-styles/.OUTPUT_STYLES_TEMPLATE.md .claude/output-styles/my-style.md
|
||||
|
||||
# Activate
|
||||
> /output-style my-style
|
||||
```
|
||||
|
||||
See [.claude/TEMPLATES_README.md](.claude/TEMPLATES_README.md) for detailed guides.
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Team Setup
|
||||
|
||||
### Sharing This Setup
|
||||
|
||||
```bash
|
||||
# Everything is in git, just commit and push
|
||||
git add .claude/ .mcp.json CLAUDE.md
|
||||
git commit -m "Add Claude Code configuration"
|
||||
git push
|
||||
|
||||
# Team members pull and get full setup
|
||||
git pull
|
||||
```
|
||||
|
||||
### Team Customization
|
||||
|
||||
**Shared (in git)**:
|
||||
- `.claude/settings.json`
|
||||
- `.claude/agents/`
|
||||
- `.claude/commands/`
|
||||
- `.mcp.json`
|
||||
- `CLAUDE.md`
|
||||
|
||||
**Personal (not in git)**:
|
||||
- `.claude/settings.local.json`
|
||||
- `~/.claude/` (user-wide)
|
||||
|
||||
---
|
||||
|
||||
## 📊 Setup Completeness
|
||||
|
||||
**Current**: ~95% of Claude Code capabilities implemented
|
||||
|
||||
**Implemented**:
|
||||
- ✅ MCP servers
|
||||
- ✅ Agents/Subagents
|
||||
- ✅ Slash commands
|
||||
- ✅ Output styles
|
||||
- ✅ Hooks
|
||||
- ✅ Templates
|
||||
- ✅ Memory system
|
||||
- ✅ Extended thinking
|
||||
- ✅ Plan mode
|
||||
- ✅ Checkpointing
|
||||
- ✅ Plugin marketplace
|
||||
|
||||
**Optional (not implemented)**:
|
||||
- ⚠️ Enterprise SSO/Analytics
|
||||
- ⚠️ Headless mode (CI/CD)
|
||||
- ⚠️ Network proxies/certificates
|
||||
|
||||
---
|
||||
|
||||
## 🖥️ Platform Notes
|
||||
|
||||
### Windows-Only Components
|
||||
|
||||
The following components are **Windows-specific** and will not work on Mac/Linux:
|
||||
|
||||
- **Windows MCP** ([.windows-mcp/](.windows-mcp/)) - Desktop automation using Python/uv
|
||||
- Provides Windows UI automation, PowerShell execution, clipboard operations
|
||||
- **Impact on other platforms**: Will show error on startup but won't affect other MCP servers
|
||||
- **Solution for Mac/Linux**: Ignore Windows MCP errors or disable in `.mcp.json`
|
||||
|
||||
- **PowerShell Scripts**:
|
||||
- [.claude/tools/start-memory.ps1](.claude/tools/start-memory.ps1) - Memory MCP launcher
|
||||
- Various hook scripts using PowerShell commands
|
||||
- **Alternative**: Create bash equivalents for cross-platform support
|
||||
|
||||
### Cross-Platform Components
|
||||
|
||||
All other MCP servers work on all platforms:
|
||||
- ✅ Serena (Python/uvx)
|
||||
- ✅ Sequential Thinking (Node.js/npx)
|
||||
- ✅ Database Server (Node.js/npx)
|
||||
- ✅ Context7 (Node.js/npx)
|
||||
- ✅ Memory (works via Node.js on all platforms - PowerShell launcher is Windows-only convenience)
|
||||
- ✅ Fetch (Python/uvx)
|
||||
- ✅ Playwright (Node.js/npx)
|
||||
|
||||
### Disabling Windows MCP on Mac/Linux
|
||||
|
||||
If you're on Mac/Linux and want to disable Windows MCP to avoid startup errors:
|
||||
|
||||
**Option 1: Comment out in .mcp.json**
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
// "windows-mcp": {
|
||||
// "command": "uv",
|
||||
// "args": ["--directory", "./.windows-mcp", "run", "main.py"]
|
||||
// },
|
||||
// ... other servers
|
||||
```javascript
|
||||
(async () => {
|
||||
// 1. Validation
|
||||
if (!token) {
|
||||
ui.notifications.warn("You must select a token!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 2. Data access
|
||||
const actor = token.actor;
|
||||
const arcanePool = actor.system.resources.classFeat_arcanePool;
|
||||
|
||||
// 3. Business logic
|
||||
async function doSomething() {
|
||||
// Implementation
|
||||
}
|
||||
|
||||
// 4. Execute
|
||||
await doSomething();
|
||||
|
||||
// 5. User feedback
|
||||
ui.notifications.info("Done!");
|
||||
})();
|
||||
```
|
||||
|
||||
**Option 2: Disable in settings**
|
||||
```json
|
||||
// In .claude/settings.json or .claude/settings.local.json
|
||||
{
|
||||
"mcpServers": {
|
||||
"windows-mcp": {
|
||||
"enabled": false
|
||||
}
|
||||
}
|
||||
}
|
||||
**See [CLAUDE.md § Macro Development Patterns](CLAUDE.md#macro-development-patterns) for detailed macro examples.**
|
||||
|
||||
### Debugging Macros
|
||||
|
||||
Press **F12** to open browser console:
|
||||
- Use **Console** tab for logs and errors
|
||||
- Use **Network** tab for API calls
|
||||
- Add `console.log()` for debugging
|
||||
- Check error messages in notifications
|
||||
|
||||
### Testing Changes
|
||||
|
||||
1. Make changes to PF1 system or macros
|
||||
2. Run `npm run build` to rebuild
|
||||
3. Reload Foundry VTT (F5)
|
||||
4. Test macros or features
|
||||
5. Check console (F12) for errors
|
||||
|
||||
---
|
||||
|
||||
## 📚 Documentation
|
||||
|
||||
| Document | Purpose | Read Time |
|
||||
|----------|---------|-----------|
|
||||
| **[CLAUDE.md](CLAUDE.md)** | Complete project guide & API reference | 30 min |
|
||||
| **[QUICKSTART.md](QUICKSTART.md)** | Quick start setup guide | 5 min |
|
||||
| **[Manual_dmgtracking.md](Manual_dmgtracking.md)** | Damage tracking implementation | Reference |
|
||||
| **[ARCANE_POOL_ANALYSIS.md](ARCANE_POOL_ANALYSIS.md)** | Arcane Pool macro analysis | Reference |
|
||||
|
||||
---
|
||||
|
||||
## 🎮 Foundry VTT & PF1 API
|
||||
|
||||
### Global Objects (Available in Macros)
|
||||
|
||||
```javascript
|
||||
game // Main game instance
|
||||
game.actors // Actor collection
|
||||
game.items // Item collection
|
||||
game.scenes // Scene collection
|
||||
game.macros // Macro collection
|
||||
game.settings // Settings registry
|
||||
|
||||
ui // UI manager
|
||||
ui.notifications // Toast notifications
|
||||
ui.chat // Chat sidebar
|
||||
|
||||
canvas // Canvas rendering system
|
||||
CONFIG // Global configuration
|
||||
CONFIG.PF1 // PF1-specific config
|
||||
```
|
||||
|
||||
### Common API Patterns
|
||||
|
||||
```javascript
|
||||
// Get documents
|
||||
const actor = game.actors.get(actorId);
|
||||
const item = game.items.getName("Item Name");
|
||||
const doc = fromUuidSync("Actor.abc123.Item.def456");
|
||||
|
||||
// Update documents
|
||||
await actor.update({
|
||||
"system.hp.value": 50,
|
||||
"system.attributes.ac.total": 25
|
||||
});
|
||||
|
||||
// Find items
|
||||
const buffs = actor.items.filter(i => i.type === "buff");
|
||||
const haste = actor.items.find(i => i.name === "Haste");
|
||||
|
||||
// Use hooks
|
||||
Hooks.on("updateActor", (actor, change, options, userId) => {
|
||||
console.log(`${actor.name} was updated`);
|
||||
});
|
||||
```
|
||||
|
||||
**See [CLAUDE.md § Foundry VTT API Reference](CLAUDE.md#foundry-vtt-api-reference) for complete API documentation.**
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Git Workflow
|
||||
|
||||
### Check Status
|
||||
|
||||
```bash
|
||||
git status # Show working tree status
|
||||
git log --oneline # Show recent commits
|
||||
git diff # Show unstaged changes
|
||||
```
|
||||
|
||||
### Make Changes
|
||||
|
||||
```bash
|
||||
# Create feature branch
|
||||
git checkout -b feature/my-feature
|
||||
|
||||
# Make changes...
|
||||
|
||||
# Commit
|
||||
git add src/
|
||||
git commit -m "feat(macro): add new feature"
|
||||
|
||||
# Push
|
||||
git push -u origin feature/my-feature
|
||||
```
|
||||
|
||||
### Commit Message Format
|
||||
|
||||
Follow [Conventional Commits](https://www.conventionalcommits.org/):
|
||||
|
||||
```
|
||||
<type>(<scope>): <subject>
|
||||
|
||||
<body>
|
||||
|
||||
<footer>
|
||||
```
|
||||
|
||||
**Types**: `feat`, `fix`, `docs`, `refactor`, `test`, `chore`, `style`
|
||||
**Scopes**: `macro`, `system`, `core`, `config`, `docs`
|
||||
|
||||
**Examples**:
|
||||
```bash
|
||||
feat(macro): add arcane pool enhancement UI
|
||||
fix(system): correct haste buff duration
|
||||
docs(readme): update setup instructions
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
Quick fixes:
|
||||
### Foundry Won't Start
|
||||
|
||||
```bash
|
||||
# Agent not working?
|
||||
> "Use the [agent-name] agent to..." # Manual invocation
|
||||
# Check logs in Data/Logs/
|
||||
cat "src/FoundryVTT-11.315/Data/Logs/foundry.log"
|
||||
|
||||
# Command not found?
|
||||
> /help # List available commands
|
||||
|
||||
# MCP server failed?
|
||||
cat .mcp.json | jq '.mcpServers' # Check configuration
|
||||
|
||||
# Permission denied?
|
||||
cat .claude/settings.json | jq '.permissions' # Check permissions
|
||||
|
||||
# Windows MCP error on Mac/Linux?
|
||||
# This is normal - see Platform Notes above
|
||||
# Try running directly
|
||||
cd src/FoundryVTT-11.315
|
||||
node resources/app/main.js
|
||||
```
|
||||
|
||||
See [CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md#troubleshooting) for detailed troubleshooting.
|
||||
### Macro Not Working
|
||||
|
||||
1. **Check token selection**: Click a token on the canvas
|
||||
2. **Check console (F12)**: Look for error messages
|
||||
3. **Verify actor exists**: `console.log(token.actor)`
|
||||
4. **Check syntax**: Paste into browser console
|
||||
5. **Clear cache**: Hard refresh (Ctrl+Shift+R)
|
||||
|
||||
### Build Failures
|
||||
|
||||
```bash
|
||||
cd src/foundryvtt-pathfinder1-v10.8
|
||||
|
||||
# Clean and rebuild
|
||||
rm -r dist node_modules
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Git Issues
|
||||
|
||||
```bash
|
||||
# Reset to last commit (discard changes)
|
||||
git reset --hard HEAD
|
||||
|
||||
# Pull latest changes
|
||||
git pull origin main
|
||||
|
||||
# Check remote
|
||||
git remote -v
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Common Tasks
|
||||
|
||||
### Add a New Macro
|
||||
|
||||
1. Create `src/macro_myfeature.js`
|
||||
2. Follow IIFE pattern (see examples)
|
||||
3. Test in Foundry VTT
|
||||
4. Commit: `git add src/macro_myfeature.js && git commit -m "feat(macro): add myfeature"`
|
||||
|
||||
### Modify PF1 System
|
||||
|
||||
1. Edit files in `src/foundryvtt-pathfinder1-v10.8/module/`
|
||||
2. Run `npm run build:watch`
|
||||
3. Reload Foundry VTT (F5)
|
||||
4. Test changes
|
||||
5. Commit: `git add src/foundryvtt-pathfinder1-v10.8/ && git commit -m "feat(system): describe change"`
|
||||
|
||||
### Add Compendium Content
|
||||
|
||||
1. Extract packs: `npm run packs:extract`
|
||||
2. Edit JSON files
|
||||
3. Compile packs: `npm run packs:compile`
|
||||
4. Commit changes
|
||||
|
||||
---
|
||||
|
||||
@@ -541,50 +385,102 @@ See [CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md#troubleshootin
|
||||
|
||||
### Official Documentation
|
||||
|
||||
- **Claude Code Docs**: https://docs.claude.com/en/docs/claude-code/
|
||||
- **GitHub Issues**: https://github.com/anthropics/claude-code/issues
|
||||
- **Foundry VTT API v11**: https://foundryvtt.com/api/v11/
|
||||
- **Foundry VTT Docs**: https://foundryvtt.com/kb/
|
||||
- **PF1 System GitHub**: https://github.com/Furyspark/foundryvtt-pathfinder1
|
||||
|
||||
### This Project
|
||||
### Project Documentation
|
||||
|
||||
- **Quick Start**: [QUICKSTART.md](QUICKSTART.md)
|
||||
- **Complete Guide**: [CLAUDE_CODE_SETUP_COMPLETE.md](CLAUDE_CODE_SETUP_COMPLETE.md)
|
||||
- **MCP Servers**: [MCP_SERVERS_GUIDE.md](MCP_SERVERS_GUIDE.md)
|
||||
- **Templates**: [.claude/TEMPLATES_README.md](.claude/TEMPLATES_README.md)
|
||||
- **MCP Templates**: [.claude/agents/MCP_USAGE_TEMPLATES.md](.claude/agents/MCP_USAGE_TEMPLATES.md)
|
||||
- **[CLAUDE.md](CLAUDE.md)** - Complete project guide (technology stack, API reference, configuration)
|
||||
- **[QUICKSTART.md](QUICKSTART.md)** - Setup and first steps
|
||||
- **[ARCANE_POOL_ANALYSIS.md](ARCANE_POOL_ANALYSIS.md)** - Arcane Pool macro implementation
|
||||
- **[Manual_dmgtracking.md](Manual_dmgtracking.md)** - Damage tracking system
|
||||
|
||||
### Community
|
||||
|
||||
- **Foundry VTT Discord**: https://discord.gg/foundryvtt
|
||||
- **Foundry VTT Reddit**: https://reddit.com/r/FoundryVTT
|
||||
- **PF1 System Issues**: https://github.com/Furyspark/foundryvtt-pathfinder1/issues
|
||||
|
||||
---
|
||||
|
||||
## 🎉 Success Checklist
|
||||
## 🤝 Contributing
|
||||
|
||||
After setup, you should be able to:
|
||||
### Code Style
|
||||
|
||||
- [x] Run `/setup-info` and see full configuration
|
||||
- [x] Use slash commands like `/analyze`, `/review`, `/test`
|
||||
- [x] Invoke agents automatically or manually
|
||||
- [x] Change output styles with `/output-style`
|
||||
- [x] Use Serena MCP for code navigation
|
||||
- [x] Store persistent memories
|
||||
- [x] Use extended thinking for complex problems
|
||||
- [x] Access checkpoints with ESC ESC
|
||||
- Use `camelCase` for variables and functions
|
||||
- Use `PascalCase` for classes
|
||||
- Use `UPPER_SNAKE_CASE` for constants
|
||||
- Follow ESLint rules: `npm run lint`
|
||||
- Format code: `npm run format`
|
||||
|
||||
**Ready?** Start with [QUICKSTART.md](QUICKSTART.md)!
|
||||
### Before Committing
|
||||
|
||||
```bash
|
||||
# Lint and format
|
||||
npm run lint
|
||||
npm run format
|
||||
|
||||
# Build to check for errors
|
||||
npm run build
|
||||
|
||||
# Commit
|
||||
git add .
|
||||
git commit -m "feat(...): description"
|
||||
git push
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📊 Project Statistics
|
||||
|
||||
- **Foundry VTT Version**: v11.315
|
||||
- **PF1 System Version**: v10.8
|
||||
- **Runtime**: Node.js v16-19 (Electron)
|
||||
- **Languages**: JavaScript (ES6+), TypeScript definitions
|
||||
- **Repository**: https://gitea.gowlershome.dyndns.org/Gowler/FoundryVTT.git
|
||||
|
||||
---
|
||||
|
||||
## 📝 Version History
|
||||
|
||||
- **v3.0.0** (2025-10-20): Complete documentation overhaul, consolidated docs, added /adr command
|
||||
- **v2.0.0** (2025-10-17): Added output styles, plugins, status line
|
||||
- **v1.0.0**: Initial comprehensive setup
|
||||
- **v1.0.0** (2025-01-30) - Initial project setup with Foundry VTT v11.315 and PF1e v10.8
|
||||
|
||||
---
|
||||
|
||||
## 📄 License
|
||||
## 🎓 Learning Path
|
||||
|
||||
This configuration setup is provided as-is for educational and development purposes. Feel free to use, modify, and share.
|
||||
### Day 1: Setup
|
||||
1. Read [QUICKSTART.md](QUICKSTART.md)
|
||||
2. Install dependencies
|
||||
3. Build PF1 system
|
||||
4. Launch Foundry VTT
|
||||
|
||||
### Week 1: Basics
|
||||
1. Create a simple macro
|
||||
2. Test macro in game
|
||||
3. Understand actor/item API
|
||||
4. Explore Foundry console (F12)
|
||||
|
||||
### Month 1: Advanced
|
||||
1. Build complex macros with dialogs
|
||||
2. Modify PF1 system code
|
||||
3. Add compendium content
|
||||
4. Integrate Claude Code for automation
|
||||
|
||||
---
|
||||
|
||||
**Questions?** Check the documentation files or see [troubleshooting](#troubleshooting)
|
||||
## 💬 Questions?
|
||||
|
||||
- Check [CLAUDE.md](CLAUDE.md) for detailed documentation
|
||||
- See [QUICKSTART.md](QUICKSTART.md) for setup help
|
||||
- Review macro examples: `src/macro.js`, `src/macro_haste.js`
|
||||
- Check browser console (F12) for errors
|
||||
|
||||
---
|
||||
|
||||
**Ready to start?** → **[QUICKSTART.md](QUICKSTART.md)**
|
||||
|
||||
**Need details?** → **[CLAUDE.md](CLAUDE.md)**
|
||||
|
||||
**Have questions?** Check the troubleshooting section above.
|
||||
|
||||
Reference in New Issue
Block a user