feat: Complete Phase 1 - AI Coding Assistant Integrations (v2.10.0)
Add comprehensive integration guides for 4 AI coding assistants: ## New Integration Guides (98KB total) - docs/integrations/WINDSURF.md (20KB) - Windsurf IDE with .windsurfrules - docs/integrations/CLINE.md (25KB) - Cline VS Code extension with MCP - docs/integrations/CONTINUE_DEV.md (28KB) - Continue.dev for any IDE - docs/integrations/INTEGRATIONS.md (25KB) - Comprehensive hub with decision tree ## Working Examples (3 directories, 11 files) - examples/windsurf-fastapi-context/ - FastAPI + Windsurf automation - examples/cline-django-assistant/ - Django + Cline with MCP server - examples/continue-dev-universal/ - HTTP context server for all IDEs ## README.md Updates - Updated tagline: Universal preprocessor for 10+ AI systems - Expanded Supported Integrations table (7 → 10 platforms) - Added 'AI Coding Assistant Integrations' section (60+ lines) - Cross-links to all new guides and examples ## Impact - Week 2 of ACTION_PLAN.md: 4/4 tasks complete (100%) ✅ - Total new documentation: ~3,000 lines - Total new code: ~1,000 lines (automation scripts, servers) - Integration coverage: LangChain, LlamaIndex, Pinecone, Cursor, Windsurf, Cline, Continue.dev, Claude, Gemini, ChatGPT ## Key Features - All guides follow proven 11-section pattern from CURSOR.md - Real-world examples with automation scripts - Multi-IDE consistency (Continue.dev works in VS Code, JetBrains, Vim) - MCP integration for dynamic documentation access - Complete troubleshooting sections with solutions Positions Skill Seekers as universal preprocessor for ANY AI system. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
279
examples/windsurf-fastapi-context/README.md
Normal file
279
examples/windsurf-fastapi-context/README.md
Normal file
@@ -0,0 +1,279 @@
|
||||
# Windsurf + FastAPI Context Example
|
||||
|
||||
Complete example showing how to use Skill Seekers to generate Windsurf rules for FastAPI development.
|
||||
|
||||
## What This Example Does
|
||||
|
||||
- ✅ Generates FastAPI documentation skill
|
||||
- ✅ Creates modular .windsurfrules for Windsurf IDE
|
||||
- ✅ Shows Cascade AI-powered FastAPI code generation
|
||||
- ✅ Handles character limits with split rules
|
||||
|
||||
## Quick Start
|
||||
|
||||
### 1. Generate FastAPI Skill
|
||||
|
||||
```bash
|
||||
# Install Skill Seekers
|
||||
pip install skill-seekers
|
||||
|
||||
# Generate FastAPI documentation skill
|
||||
skill-seekers scrape --config configs/fastapi.json
|
||||
|
||||
# Package for Windsurf with split rules (respects 6K char limit)
|
||||
skill-seekers package output/fastapi --target markdown --split-rules
|
||||
```
|
||||
|
||||
### 2. Copy to Windsurf Project
|
||||
|
||||
```bash
|
||||
# Create rules directory
|
||||
mkdir -p my-fastapi-project/.windsurf/rules
|
||||
|
||||
# Copy all rule files
|
||||
cp -r output/fastapi-markdown/rules/* my-fastapi-project/.windsurf/rules/
|
||||
|
||||
# Or use the automation script
|
||||
python generate_windsurfrules.py --project my-fastapi-project
|
||||
```
|
||||
|
||||
### 3. Test in Windsurf
|
||||
|
||||
```bash
|
||||
# Open project in Windsurf
|
||||
windsurf my-fastapi-project/
|
||||
|
||||
# Start Cascade (Cmd+L or Ctrl+L)
|
||||
# Try these prompts:
|
||||
# - "Create a FastAPI endpoint with async database queries"
|
||||
# - "Add Pydantic models with validation for user registration"
|
||||
# - "Implement JWT authentication with dependencies"
|
||||
```
|
||||
|
||||
## Expected Results
|
||||
|
||||
### Before (Without Rules)
|
||||
|
||||
**Prompt:** "Create a FastAPI user endpoint with database"
|
||||
|
||||
**Cascade Output:**
|
||||
```python
|
||||
from fastapi import FastAPI
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
@app.get("/users")
|
||||
def get_users():
|
||||
# Generic sync code
|
||||
users = db.query(User).all()
|
||||
return users
|
||||
```
|
||||
|
||||
❌ Uses sync code (not async)
|
||||
❌ No dependency injection
|
||||
❌ Returns ORM instances (not Pydantic)
|
||||
|
||||
### After (With Rules)
|
||||
|
||||
**Prompt:** "Create a FastAPI user endpoint with database"
|
||||
|
||||
**Cascade Output:**
|
||||
```python
|
||||
from fastapi import APIRouter, Depends
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
from app.database import get_db
|
||||
from app.schemas import UserResponse
|
||||
|
||||
router = APIRouter(prefix="/api/v1")
|
||||
|
||||
@router.get("/users", response_model=list[UserResponse])
|
||||
async def get_users(
|
||||
skip: int = 0,
|
||||
limit: int = 100,
|
||||
db: AsyncSession = Depends(get_db)
|
||||
):
|
||||
"""Get all users with pagination."""
|
||||
result = await db.execute(
|
||||
select(User).offset(skip).limit(limit)
|
||||
)
|
||||
users = result.scalars().all()
|
||||
return [UserResponse.model_validate(user) for user in users]
|
||||
```
|
||||
|
||||
✅ Async/await pattern
|
||||
✅ Dependency injection
|
||||
✅ Pydantic response models
|
||||
✅ Proper pagination
|
||||
✅ OpenAPI documentation
|
||||
|
||||
## Files in This Example
|
||||
|
||||
- `generate_windsurfrules.py` - Automation script for generating rules
|
||||
- `requirements.txt` - Python dependencies
|
||||
- `example-project/` - Minimal FastAPI project structure
|
||||
- `app/main.py` - FastAPI application
|
||||
- `app/models.py` - SQLAlchemy models
|
||||
- `app/schemas.py` - Pydantic schemas
|
||||
- `app/database.py` - Database connection
|
||||
|
||||
## Rule Files Generated
|
||||
|
||||
After running the script, you'll have:
|
||||
|
||||
```
|
||||
my-fastapi-project/.windsurf/rules/
|
||||
├── fastapi-core.md (5,200 chars, Always On)
|
||||
├── fastapi-database.md (5,800 chars, Always On)
|
||||
├── fastapi-authentication.md (4,900 chars, Model Decision)
|
||||
├── fastapi-testing.md (4,100 chars, Manual)
|
||||
└── fastapi-best-practices.md (3,500 chars, Always On)
|
||||
```
|
||||
|
||||
## Rule Activation Modes
|
||||
|
||||
| File | Activation | When Used |
|
||||
|------|-----------|-----------|
|
||||
| `fastapi-core.md` | Always On | Every request - core patterns |
|
||||
| `fastapi-database.md` | Always On | Database-related code |
|
||||
| `fastapi-authentication.md` | Model Decision | When Cascade detects auth needs |
|
||||
| `fastapi-testing.md` | Manual | Only when @mentioned for testing |
|
||||
| `fastapi-best-practices.md` | Always On | Code quality, error handling |
|
||||
|
||||
## Customization
|
||||
|
||||
### Add Project-Specific Patterns
|
||||
|
||||
Create `project-conventions.md`:
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: "Project Conventions"
|
||||
activation: "always-on"
|
||||
priority: "highest"
|
||||
---
|
||||
|
||||
# Project-Specific Patterns
|
||||
|
||||
## Database Sessions
|
||||
|
||||
ALWAYS use this pattern:
|
||||
|
||||
\```python
|
||||
async with get_session() as db:
|
||||
result = await db.execute(query)
|
||||
\```
|
||||
|
||||
## API Versioning
|
||||
|
||||
All endpoints MUST use `/api/v1` prefix:
|
||||
|
||||
\```python
|
||||
router = APIRouter(prefix="/api/v1")
|
||||
\```
|
||||
```
|
||||
|
||||
### Adjust Character Limits
|
||||
|
||||
```bash
|
||||
# Generate smaller rule files (5K chars each)
|
||||
skill-seekers package output/fastapi --target markdown --split-rules --max-chars 5000
|
||||
|
||||
# Generate larger rule files (5.5K chars each)
|
||||
skill-seekers package output/fastapi --target markdown --split-rules --max-chars 5500
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Issue: Rules not loading
|
||||
|
||||
**Solution 1:** Verify directory structure
|
||||
```bash
|
||||
# Must be exactly:
|
||||
my-project/.windsurf/rules/*.md
|
||||
|
||||
# Check:
|
||||
ls -la my-project/.windsurf/rules/
|
||||
```
|
||||
|
||||
**Solution 2:** Reload Windsurf
|
||||
```
|
||||
Cmd+Shift+P → "Reload Window"
|
||||
```
|
||||
|
||||
### Issue: Character limit exceeded
|
||||
|
||||
**Solution:** Re-generate with smaller max-chars
|
||||
```bash
|
||||
skill-seekers package output/fastapi --target markdown --split-rules --max-chars 4500
|
||||
```
|
||||
|
||||
### Issue: Cascade not using rules
|
||||
|
||||
**Solution:** Check activation mode in frontmatter
|
||||
```markdown
|
||||
---
|
||||
activation: "always-on" # Not "model-decision"
|
||||
priority: "high"
|
||||
---
|
||||
```
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Combine with MCP Server
|
||||
|
||||
```bash
|
||||
# Install Skill Seekers MCP server
|
||||
pip install skill-seekers[mcp]
|
||||
|
||||
# Configure in Windsurf's mcp_config.json
|
||||
{
|
||||
"mcpServers": {
|
||||
"skill-seekers": {
|
||||
"command": "python",
|
||||
"args": ["-m", "skill_seekers.mcp.server_fastmcp", "--transport", "stdio"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Now Cascade can query documentation dynamically via MCP tools.
|
||||
|
||||
### Multi-Framework Project
|
||||
|
||||
```bash
|
||||
# Generate backend rules (FastAPI)
|
||||
skill-seekers package output/fastapi --target markdown --split-rules
|
||||
|
||||
# Generate frontend rules (React)
|
||||
skill-seekers package output/react --target markdown --split-rules
|
||||
|
||||
# Organize rules:
|
||||
.windsurf/rules/
|
||||
├── backend/
|
||||
│ ├── fastapi-core.md
|
||||
│ └── fastapi-database.md
|
||||
└── frontend/
|
||||
├── react-hooks.md
|
||||
└── react-components.md
|
||||
```
|
||||
|
||||
## Related Examples
|
||||
|
||||
- [Cursor Example](../cursor-react-skill/) - Similar IDE, different format
|
||||
- [Cline Example](../cline-django-assistant/) - VS Code extension with MCP
|
||||
- [Continue.dev Example](../continue-dev-universal/) - IDE-agnostic
|
||||
- [LangChain RAG Example](../langchain-rag-pipeline/) - Build RAG systems
|
||||
|
||||
## Next Steps
|
||||
|
||||
1. Customize rules for your project patterns
|
||||
2. Add team-specific conventions
|
||||
3. Integrate with MCP for live documentation
|
||||
4. Build RAG pipeline with `--target langchain`
|
||||
5. Share your rules at [Windsurf Rules Directory](https://windsurf.com/editor/directory)
|
||||
|
||||
## Support
|
||||
|
||||
- **Skill Seekers Issues:** [GitHub](https://github.com/yusufkaraaslan/Skill_Seekers/issues)
|
||||
- **Windsurf Docs:** [docs.windsurf.com](https://docs.windsurf.com/)
|
||||
- **Integration Guide:** [WINDSURF.md](../../docs/integrations/WINDSURF.md)
|
||||
159
examples/windsurf-fastapi-context/generate_windsurfrules.py
Normal file
159
examples/windsurf-fastapi-context/generate_windsurfrules.py
Normal file
@@ -0,0 +1,159 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Automation script to generate Windsurf rules from FastAPI documentation.
|
||||
|
||||
Usage:
|
||||
python generate_windsurfrules.py --project /path/to/project
|
||||
python generate_windsurfrules.py --project . --max-chars 5000
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def run_command(cmd: list[str], description: str) -> bool:
|
||||
"""Run a shell command and return success status."""
|
||||
print(f"\n{'='*60}")
|
||||
print(f"STEP: {description}")
|
||||
print(f"{'='*60}")
|
||||
print(f"Running: {' '.join(cmd)}\n")
|
||||
|
||||
result = subprocess.run(cmd, capture_output=True, text=True)
|
||||
|
||||
if result.stdout:
|
||||
print(result.stdout)
|
||||
if result.stderr:
|
||||
print(result.stderr, file=sys.stderr)
|
||||
|
||||
if result.returncode != 0:
|
||||
print(f"❌ ERROR: {description} failed with code {result.returncode}")
|
||||
return False
|
||||
|
||||
print(f"✅ SUCCESS: {description}")
|
||||
return True
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Generate Windsurf rules from FastAPI documentation"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--project",
|
||||
type=str,
|
||||
default=".",
|
||||
help="Path to your project directory (default: current directory)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--max-chars",
|
||||
type=int,
|
||||
default=5500,
|
||||
help="Maximum characters per rule file (default: 5500, max: 6000)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-scrape",
|
||||
action="store_true",
|
||||
help="Skip scraping step (use existing output/fastapi)",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
project_path = Path(args.project).resolve()
|
||||
output_dir = Path("output/fastapi")
|
||||
rules_dir = project_path / ".windsurf" / "rules"
|
||||
|
||||
print("=" * 60)
|
||||
print("Windsurf Rules Generator for FastAPI")
|
||||
print("=" * 60)
|
||||
print(f"Project: {project_path}")
|
||||
print(f"Rules directory: {rules_dir}")
|
||||
print(f"Max characters per file: {args.max_chars}")
|
||||
print("=" * 60)
|
||||
|
||||
# Step 1: Scrape FastAPI documentation (unless skipped)
|
||||
if not args.skip_scrape:
|
||||
if not run_command(
|
||||
[
|
||||
"skill-seekers",
|
||||
"scrape",
|
||||
"--config",
|
||||
"configs/fastapi.json",
|
||||
],
|
||||
"Scraping FastAPI documentation",
|
||||
):
|
||||
return 1
|
||||
else:
|
||||
print(f"\n⏭️ SKIPPED: Using existing {output_dir}")
|
||||
|
||||
if not output_dir.exists():
|
||||
print(f"❌ ERROR: {output_dir} does not exist!")
|
||||
print(f"Run without --skip-scrape to generate documentation first.")
|
||||
return 1
|
||||
|
||||
# Step 2: Package with split rules
|
||||
if not run_command(
|
||||
[
|
||||
"skill-seekers",
|
||||
"package",
|
||||
str(output_dir),
|
||||
"--target",
|
||||
"markdown",
|
||||
"--split-rules",
|
||||
"--max-chars",
|
||||
str(args.max_chars),
|
||||
],
|
||||
"Packaging for Windsurf with split rules",
|
||||
):
|
||||
return 1
|
||||
|
||||
# Step 3: Copy rules to project
|
||||
print(f"\n{'='*60}")
|
||||
print(f"STEP: Copying rules to project")
|
||||
print(f"{'='*60}")
|
||||
|
||||
markdown_output = output_dir.parent / "fastapi-markdown"
|
||||
source_rules = markdown_output / "rules"
|
||||
|
||||
if not source_rules.exists():
|
||||
# Single file (no splitting needed)
|
||||
source_skill = markdown_output / "SKILL.md"
|
||||
if not source_skill.exists():
|
||||
print(f"❌ ERROR: {source_skill} does not exist!")
|
||||
return 1
|
||||
|
||||
# Create rules directory
|
||||
rules_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Copy as single rule file
|
||||
dest_file = rules_dir / "fastapi.md"
|
||||
shutil.copy(source_skill, dest_file)
|
||||
print(f"✅ Copied: {dest_file}")
|
||||
else:
|
||||
# Multiple rule files
|
||||
rules_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
for rule_file in source_rules.glob("*.md"):
|
||||
dest_file = rules_dir / rule_file.name
|
||||
shutil.copy(rule_file, dest_file)
|
||||
print(f"✅ Copied: {dest_file}")
|
||||
|
||||
print(f"\n{'='*60}")
|
||||
print(f"✅ SUCCESS: Rules generated and copied!")
|
||||
print(f"{'='*60}")
|
||||
print(f"\nRules location: {rules_dir}")
|
||||
print(f"\nNext steps:")
|
||||
print(f"1. Open project in Windsurf: windsurf {project_path}")
|
||||
print(f"2. Reload window: Cmd+Shift+P → 'Reload Window'")
|
||||
print(f"3. Start Cascade: Cmd+L (or Ctrl+L)")
|
||||
print(f"4. Test: 'Create a FastAPI endpoint with async database'")
|
||||
print(f"\nRule files:")
|
||||
for rule_file in sorted(rules_dir.glob("*.md")):
|
||||
size = rule_file.stat().st_size
|
||||
print(f" - {rule_file.name} ({size:,} bytes)")
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
||||
4
examples/windsurf-fastapi-context/requirements.txt
Normal file
4
examples/windsurf-fastapi-context/requirements.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
skill-seekers>=2.9.0
|
||||
fastapi>=0.115.0
|
||||
uvicorn>=0.32.0
|
||||
sqlalchemy>=2.0.0
|
||||
Reference in New Issue
Block a user