Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 90 additions & 40 deletions .opencode/INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,133 @@
# Installing Superpowers for OpenCode
# Installing DevKit DotNet + Superpowers

## Prerequisites

- [OpenCode.ai](https://opencode.ai) installed
- .NET SDK 8/9/10 (for .NET development)

## Installation

Add superpowers to the `plugin` array in your `opencode.json` (global or project-level):
### Step 1: Add plugins to opencode.json

Add both plugins to the `plugin` array in your `opencode.json` (global or project-level):

```json
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git"]
"plugin": [
"superpowers@git+https://github.com/obra/superpowers.git",
"devkit-dotnet@git+https://github.com/Hayr06/superpowers.git"
]
}
```

Restart OpenCode. That's it — the plugin auto-installs and registers all skills.
**Important:** Superpowers must be listed FIRST, then devkit-dotnet. The plugin order matters.

Verify by asking: "Tell me about your superpowers"
### Step 2: Restart OpenCode

## Migrating from the old symlink-based install
Restart OpenCode. Both plugins will auto-install and register all skills, agents, and commands.

If you previously installed superpowers using `git clone` and symlinks, remove the old setup:
Verify by asking: "Tell me about your superpowers and devkit-dotnet"

```bash
# Remove old symlinks
rm -f ~/.config/opencode/plugins/superpowers.js
rm -rf ~/.config/opencode/skills/superpowers
## Setup Script

# Optionally remove the cloned repo
rm -rf ~/.config/opencode/superpowers
After installation, run the setup script to install dependencies:

# Remove skills.paths from opencode.json if you added one for superpowers
```bash
bash .opencode/scripts/setup.sh
```

Then follow the installation steps above.

## Usage

Use OpenCode's native `skill` tool:

```
use skill tool to list skills
use skill tool to load superpowers/brainstorming
```
This installs:
- Python dependencies (OpenCV, Pillow, PyTesseract for Vision)
- Tesseract OCR
- RAG dependencies (PyMuPDF, openpyxl, python-docx)

## Included Content

### Agents
- `orchestrator` - Main agent hub, single point of contact for developers

### Skills (40+ total)

**Methodology (13 Superpowers skills):**
- brainstorming, writing-plans, test-driven-development
- subagent-driven-development, systematic-debugging
- verification-before-completion, requesting-code-review
- receiving-code-review, finishing-a-development-branch
- using-git-worktrees, dispatching-parallel-agents, writing-skills, executing-plans

**.NET Technical (25+ skills):**
- scaffolding, clean-arch-design, ddd-aggregate, domain-analysis
- blazor-component, blazor-authentication, blazor-debugging, blazor-error-handling, blazor-hosting
- fluentui-blazor, yarp-config, dapr-microservices
- jwt-auth, ef-core-filters, row-level-security, tenant-resolution
- sql-optimization, sql-code-review, dapper-reading, sqlserver-migration
- document-export, nuget-manager, dotnet-best-practices
- error-handling-patterns, fix-errors, frontend-design
- i18n-localization, microsoft-docs, rate-limiting

**RAG & Utils:**
- rag-document-retrieval, document-parsing, find-skills

### Commands
- `/start` - Full session with brainstorming
- `/brainstorm` - Design session
- `/plan` - Create implementation plan
- `/execute` - Execute plan
- `/poc` - Proof of concept
- `/test` - Run tests with coverage
- `/review` - Code review
- `/migrate` - Monolith to microservices
- rag-load, rag-search, analyze-image

### Scripts
- `setup.sh` - Install dependencies
- `test-endpoints.sh` - Test microservices /health endpoints
- `test-connections.sh` - Test SQL Server, Redis, Dapr connections

## Updating

Superpowers updates automatically when you restart OpenCode.
Both plugins update automatically when you restart OpenCode.

To pin a specific version:
To pin specific versions:

```json
{
"plugin": ["superpowers@git+https://github.com/obra/superpowers.git#v5.0.3"]
"plugin": [
"superpowers@git+https://github.com/obra/superpowers.git#v5.0.3",
"devkit-dotnet@git+https://github.com/Hayr06/superpowers.git#main"
]
}
```

## Troubleshooting

### Plugin not loading

1. Check logs: `opencode run --print-logs "hello" 2>&1 | grep -i superpowers`
2. Verify the plugin line in your `opencode.json`
3. Make sure you're running a recent version of OpenCode
1. Check plugin order (superpowers FIRST, devkit-dotnet SECOND)
2. Check logs: `opencode run --print-logs "hello" 2>&1 | grep -i devkit`
3. Verify plugins are installed: `ls ~/.config/opencode/plugins/`

### Skills not found

1. Use `skill` tool to list what's discovered
2. Check that the plugin is loading (see above)
Use `skill` tool to list what's discovered:
```
use skill tool to list skills
```

### Scripts not working

Make scripts executable:
```bash
chmod +x .opencode/scripts/*.sh
```

### Tool mapping
## Documentation

When skills reference Claude Code tools:
- `TodoWrite` → `todowrite`
- `Task` with subagents → `@mention` syntax
- `Skill` tool → OpenCode's native `skill` tool
- File operations → your native tools
- [AGENTS.md](AGENTS.md) - Agent documentation
- [docs/METHODOLOGY.md](docs/METHODOLOGY.md) - Superpowers methodology guide
- [docs/INSTALL.md](docs/INSTALL.md) - Full installation guide

## Getting Help

- Report issues: https://github.com/obra/superpowers/issues
- Full documentation: https://github.com/obra/superpowers/blob/main/docs/README.opencode.md
- DevKit issues: https://github.com/Hayr06/superpowers/issues
- Superpowers: https://github.com/obra/superpowers/issues
137 changes: 137 additions & 0 deletions .opencode/agents/orchestrator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
name: orchestrator
description: Agente principal del DevKit - coordina el flujo completo de desarrollo con metodologia Superpowers y skills .NET
---

# Orchestrator - DevKit .NET + OpenCode + Superpowers

Eres el orchestrator del DevKit para proyectos .NET Microservicios. Tu rol es ser el **UNICO punto de contacto** con el desarrollador.

## Tu Responsabilidad

Coordinar el flujo de desarrollo usando:
1. **Skills de metodologia** (Superpowers) - Gates obligatorios
2. **Skills tecnicos** (.NET) - Auto-trigger por contexto
3. **Subagentes** - Solo cuando se necesita expertise especializado

## Flujo Principal

```
DESARROLLADOR → @orchestrator → [BRAINSTORMING GATE] → [PLANNING] → [IMPLEMENTATION] → [VERIFY]
```

## Fases del Flujo

### Fase 1: Brainstorming (OBLIGATORIO)

Antes de cualquier creacion de codigo, **DEBES** invocar el skill `brainstorming`:

El skill `brainstorming` te guiara para:
- Explorar el contexto del proyecto
- Hacer preguntas clarificadoras (una a una)
- Proponer 2-3 enfoques con trade-offs
- Presentar el diseno por secciones
- Escribir el spec document en `docs/superpowers/specs/`
- Obtener aprobacion del usuario

**NO puedes avanzar a implementacion sin aprobacion del usuario en el diseno.**

### Fase 2: Planning

Una vez aprobado el diseno, invoca el skill `writing-plans`:

Esto creara tareas pequenas (2-5 min cada una) con:
- File paths exactos
- Codigo completo
- Pasos de verificacion

### Fase 3: Implementation

Durante implementacion, aplica estos gates:
1. **Test-Driven Development** (`test-driven-development` skill)
2. **Skills .NET auto-trigger** segun contexto
3. **Subagentes bajo demanda** cuando se necesite expertise

### Fase 4: Verification

Antes de declarar completion, usa `verification-before-completion`:
- Ejecutar comandos de verificacion
- Confirmar output esperado
- Evidence over assertions

## Subagentes Disponibles

Invoca estos subagentes SOLO cuando sea necesario via Task tool:

| Subagente | Cuando usarlo |
|-----------|---------------|
| `@code-reviewer` | Review de PR/codigo implementado |
| `@vision-analyst` | Analisis de imagenes UI/UX |
| `@rag-specialist` | Busqueda en documentos RAG |
| `@multi-tenant-specialist` | Solo si el proyecto requiere multi-tenant |

## Skills .NET Auto-Trigger

Los siguientes skills se auto-disparan segun el contexto de la tarea:

| Contexto | Skills a invocar |
|----------|------------------|
| Nuevo proyecto | `scaffolding`, `clean-arch-design` |
| Dominio/DDD | `ddd-aggregate`, `domain-analysis` |
| API Gateway | `yarp-config`, `jwt-auth`, `rate-limiting` |
| Frontend Blazor | `blazor-component`, `blazor-authentication`, `fluentui-blazor` |
| Microservicios | `dapr-microservices` |
| Multi-tenant | `ef-core-filters`, `row-level-security`, `tenant-resolution` |
| Base de datos | `sql-optimization`, `sql-code-review`, `dapper-reading` |
| Documentos | `document-export` (excel/pdf) |

## Stack Tecnologico del Equipo

- **Plataforma**: .NET 10 / .NET 9 / .NET 8
- **Backend**: Clean Architecture + DDD + CQRS + MediatR
- **Frontend**: Blazor WebAssembly (standalone)
- **API Gateway**: YARP (code-first)
- **Distributed Runtime**: Dapr
- **Base de datos**: SQL Server / PostgreSQL
- **Contenedores**: Docker + Docker Compose

## Convenciones Clave

1. **API Gateway**: Punto unico de entrada, NO logica de negocio
2. **Database-per-service**: Cada microservicio tiene su propia DB
3. **Event-driven**: Dapr Pub/Sub para comunicacion async
4. **CQRS**: EF Core para writes, Dapper para reads
5. **Minimal APIs**: Preferido sobre Controllers en .NET 10
6. **OpenTelemetry**: Logging y tracing desde dia 1
7. **Blazor WASM**: HttpClient tipado, NUNCA ProjectReference

## Reglas de Oro

1. **Nunca escribir codigo sin diseno aprobado**
2. **Siempre usar TDD** (RED-GREEN-REFACTOR)
3. **Evidence over claims** - verificar antes de declarar exito
4. **YAGNI** - You Aren't Gonna Need It
5. **DRY** - Don't Repeat Yourself

## Comandos Disponibles

| Comando | Uso |
|---------|-----|
| `/start` | Sesion completa con brainstorming |
| `/plan` | Solo analisis y planning |
| `/poc` | Prueba de concepto rapida |
| `/test` | Tests con coverage |
| `/migrate` | Migracion de monolith a microservices |
| `/review` | Code review del codigo actual |
| `/brainstorm` | Iniciar sesion de diseno |
| `/execute` | Ejecutar plan de implementacion |

## Escalacion

Si el usuario pide algo fuera de tu capacidad:
1. Invoca el subagente especializado correspondiente
2. Si ningun subagente puede ayudar, consulta un agente humano

---

**Recuerda**: Tu objetivo es que el desarrollador interactue con vos, no con multiples agentes. Tu responsabilidad es coordinar todo automaticamente.
81 changes: 81 additions & 0 deletions .opencode/commands/analyze-image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# analyze-image

Analiza imágenes UI/UX y extrae design tokens.

## Uso

```bash
analyze-image --image <ruta> --type <tipo> --format <formato>
```

## Argumentos

| Argumento | Requerido | Default | Descripción |
|-----------|-----------|---------|-------------|
| `--image` | Sí | - | Ruta de la imagen a analizar |
| `--type` | No | `all` | Tipo de extracción: `components`, `colors`, `typography`, `spacing`, `all` |
| `--format` | No | `json` | Formato de output: `json`, `markdown`, `tokens` |

## Ejemplos

### Análisis completo (default)

```bash
analyze-image --image screenshots/homepage.png
```

### Solo componentes

```bash
analyze-image --image screenshots/homepage.png --type components
```

### Reporte en markdown

```bash
analyze-image --image screenshots/homepage.png --format markdown
```

### Design tokens C#

```bash
analyze-image --image screenshots/homepage.png --format tokens
```

## Desde OpenCode TUI

1. **Arrastrar imagen**: Drag & drop de la imagen en el terminal
2. **Invocar agente**: `@vision-analyst analiza esta imagen`
3. **O usar tool directamente**: `analyze-image --image <ruta> --type all`

## Output

### JSON (default)

```json
{
"image_path": "screenshots/homepage.png",
"dimensions": {"width": 1920, "height": 1080},
"components": [...],
"colors": [...],
"typography": {...},
"spacing": [...],
"fluent_ui_suggestions": [...]
}
```

### Markdown

Reporte formateado con tablas y secciones.

### Design Tokens

Clase C# con design tokens listos para usar.

## Pre-requisitos

Ver `install-vision-deps.sh` para instalación de dependencias.

## Agente relacionado

- `@vision-analyst`: Especialista en análisis de imágenes UI/UX
Loading