Compare commits
2 Commits
main
...
feature/wo
| Author | SHA1 | Date |
|---|---|---|
|
|
617122195e | |
|
|
d533768f74 |
|
|
@ -0,0 +1,63 @@
|
|||
---
|
||||
description: View deployment logs from Eureka platform
|
||||
allowed-tools: Read, Bash, Glob
|
||||
---
|
||||
|
||||
# Eureka Deploy Logs
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## PURPOSE
|
||||
|
||||
View the deployment logs from the Eureka platform to debug issues or monitor progress.
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 1: Fetch Logs
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 1.1: Run Logs Command
|
||||
|
||||
```bash
|
||||
# Default: last 100 lines
|
||||
eureka deploy logs
|
||||
|
||||
# Custom tail count
|
||||
eureka deploy logs --tail 200
|
||||
```
|
||||
|
||||
#### 1.2: Parse Arguments
|
||||
|
||||
If `$ARGUMENTS` contains a number, use it as tail count:
|
||||
```bash
|
||||
TAIL_COUNT="${ARGUMENTS:-100}"
|
||||
eureka deploy logs --tail "$TAIL_COUNT"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENTS
|
||||
|
||||
| Argument | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `[tail]` | `100` | Number of log lines to show |
|
||||
| `--id <deploymentId>` | Latest | Specific deployment ID |
|
||||
| `--follow` | `false` | Follow logs in real-time |
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
```bash
|
||||
# View last 100 lines
|
||||
/eureka:deploy-logs
|
||||
|
||||
# View last 500 lines
|
||||
/eureka:deploy-logs 500
|
||||
|
||||
# View specific deployment
|
||||
/eureka:deploy-logs --id dep_abc123
|
||||
```
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
---
|
||||
description: Check deployment status on Eureka platform
|
||||
allowed-tools: Read, Bash, Glob
|
||||
---
|
||||
|
||||
# Eureka Deploy Status
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## PURPOSE
|
||||
|
||||
Check the current deployment status of the application on the Eureka platform.
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 1: Check Status
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 1.1: Run Status Command
|
||||
|
||||
```bash
|
||||
eureka deploy status --verbose
|
||||
```
|
||||
|
||||
#### 1.2: Display Results
|
||||
|
||||
The command will show:
|
||||
- Current deployment status (pending, building, deploying, deployed, failed)
|
||||
- Version information
|
||||
- Environment
|
||||
- Timestamps
|
||||
- Deployment URL (if deployed)
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENTS
|
||||
|
||||
| Argument | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `--verbose` | `false` | Show detailed logs |
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
```bash
|
||||
# Check current deployment status
|
||||
/eureka:deploy-status
|
||||
|
||||
# Check with verbose output
|
||||
/eureka:deploy-status --verbose
|
||||
```
|
||||
|
|
@ -0,0 +1,279 @@
|
|||
---
|
||||
description: Deploy application to Eureka platform (creates app if needed)
|
||||
allowed-tools: Read, Write, Edit, Bash, Glob, Grep
|
||||
---
|
||||
|
||||
# Eureka Deploy
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## PURPOSE
|
||||
|
||||
Deploy the current project to the Eureka platform. If no `app_id` is configured, automatically creates a new directory app first, then triggers the deployment.
|
||||
|
||||
---
|
||||
|
||||
## ⛔ CRITICAL RULES
|
||||
|
||||
### MUST DO
|
||||
1. **MUST** check for existing `app_id` in `.claude/eureka-factory.yaml` first
|
||||
2. **MUST** create a new app via API if no `app_id` exists
|
||||
3. **MUST** save the new `app_id` to config after creation
|
||||
4. **MUST** display deployment status after triggering
|
||||
|
||||
### CANNOT DO
|
||||
1. **CANNOT** deploy without valid API key
|
||||
2. **CANNOT** skip app creation if `app_id` is missing
|
||||
3. **CANNOT** proceed if API calls fail
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 1: Configuration Check
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 1.1: Display Start Banner
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 🚀 EUREKA DEPLOY ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Deploying to Eureka Platform... ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
#### 1.2: Check Configuration
|
||||
|
||||
Read the configuration file:
|
||||
```bash
|
||||
# Check if config exists
|
||||
cat .claude/eureka-factory.yaml 2>/dev/null || cat .claude/eureka-factory.yml 2>/dev/null || echo "NO_CONFIG"
|
||||
```
|
||||
|
||||
**Extract from config:**
|
||||
- `api_key` - Required for all operations
|
||||
- `app_id` - If exists, skip app creation
|
||||
- `api_endpoint` - Optional custom endpoint
|
||||
|
||||
#### 1.3: Validate API Key
|
||||
|
||||
If no `api_key` found:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ❌ NO API KEY CONFIGURED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Run `eureka setup` to configure your credentials. ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
**STOP EXECUTION**
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 2: App Creation (if needed)
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 2.1: Check for app_id
|
||||
|
||||
If `app_id` exists in config → **SKIP TO PHASE 3**
|
||||
|
||||
If `app_id` is missing:
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 📁 CREATING DIRECTORY APP ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ No app_id found. Creating new app on Eureka... ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
#### 2.2: Determine App Name
|
||||
|
||||
Use the project directory name as the default app name:
|
||||
```bash
|
||||
APP_NAME=$(basename $(pwd))
|
||||
echo "App name: $APP_NAME"
|
||||
```
|
||||
|
||||
Or use argument if provided: `$ARGUMENTS` as app name
|
||||
|
||||
#### 2.3: Create App via API
|
||||
|
||||
```bash
|
||||
# Create app using eureka CLI
|
||||
eureka deploy trigger --name "$APP_NAME" --type other --yes
|
||||
```
|
||||
|
||||
**If the command is not available, use direct API call:**
|
||||
|
||||
```bash
|
||||
API_KEY="<from config>"
|
||||
API_ENDPOINT="<from config or default>"
|
||||
|
||||
curl -X POST "${API_ENDPOINT}/v1/apps" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: ${API_KEY}" \
|
||||
-d "{\"name\": \"${APP_NAME}\", \"type\": \"other\"}"
|
||||
```
|
||||
|
||||
#### 2.4: Save app_id to Config
|
||||
|
||||
Extract `app_id` from API response and update config:
|
||||
|
||||
```yaml
|
||||
# .claude/eureka-factory.yaml
|
||||
api_key: <existing>
|
||||
project_id: <existing>
|
||||
repo_id: <existing>
|
||||
app_id: <NEW_APP_ID> # Add this line
|
||||
```
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ APP CREATED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ App ID: <app_id> ║
|
||||
║ Saved to: .claude/eureka-factory.yaml ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 3: Trigger Deployment
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 3.1: Trigger Deploy
|
||||
|
||||
```bash
|
||||
# Using eureka CLI
|
||||
eureka deploy trigger --yes
|
||||
|
||||
# Or direct API call
|
||||
curl -X POST "${API_ENDPOINT}/v1/apps/${APP_ID}/deployments" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-API-Key: ${API_KEY}" \
|
||||
-d '{"environment": "production"}'
|
||||
```
|
||||
|
||||
#### 3.2: Display Deployment Status
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ DEPLOYMENT TRIGGERED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Deployment ID: <deployment_id> ║
|
||||
║ Status: PENDING ║
|
||||
║ Environment: production ║
|
||||
║ Version: <version> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Use `/eureka:deploy-status` to check progress ║
|
||||
║ Use `/eureka:deploy-logs` to view logs ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENTS
|
||||
|
||||
| Argument | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `[app-name]` | Directory name | Name for new app (only used if creating) |
|
||||
| `--env <environment>` | `production` | Deployment environment |
|
||||
| `--branch <branch>` | Current branch | Git branch to deploy |
|
||||
| `--force` | `false` | Force deploy even if already deploying |
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
```bash
|
||||
# Deploy current project (creates app if needed)
|
||||
/eureka:deploy
|
||||
|
||||
# Deploy with custom app name
|
||||
/eureka:deploy my-awesome-app
|
||||
|
||||
# Deploy specific branch to staging
|
||||
/eureka:deploy --env staging --branch develop
|
||||
|
||||
# Force redeploy
|
||||
/eureka:deploy --force
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ERROR HANDLING
|
||||
|
||||
### No Configuration
|
||||
```
|
||||
❌ No configuration found.
|
||||
Run `eureka setup` to configure credentials.
|
||||
```
|
||||
|
||||
### App Creation Failed
|
||||
```
|
||||
❌ Failed to create app: <error message>
|
||||
Check your API key and try again.
|
||||
```
|
||||
|
||||
### Deployment Failed
|
||||
```
|
||||
❌ Deployment failed: <error message>
|
||||
Use `/eureka:deploy-logs` to see details.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## FLOW DIAGRAM
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ /eureka:deploy │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ ┌─────────────────┐ │
|
||||
│ │ Check Config │ │
|
||||
│ └────────┬────────┘ │
|
||||
│ │ │
|
||||
│ ┌─────────▼─────────┐ │
|
||||
│ │ Has API Key? │ │
|
||||
│ └─────────┬─────────┘ │
|
||||
│ │ │
|
||||
│ NO │ YES │
|
||||
│ ┌────────────────────┼────────────────────┐ │
|
||||
│ ▼ ▼ │
|
||||
│ ┌───────────┐ ┌─────────────────┐ │
|
||||
│ │ ERROR │ │ Has app_id? │ │
|
||||
│ │ No Key │ └────────┬────────┘ │
|
||||
│ └───────────┘ │ │
|
||||
│ NO │ YES │
|
||||
│ ┌───────────────────┼──────────┐ │
|
||||
│ ▼ ▼ │
|
||||
│ ┌─────────────────┐ ┌──────────────┐
|
||||
│ │ Create App │ │ │
|
||||
│ │ via API │ │ │
|
||||
│ └────────┬────────┘ │ │
|
||||
│ │ │ │
|
||||
│ ▼ │ │
|
||||
│ ┌─────────────────┐ │ │
|
||||
│ │ Save app_id │ │ │
|
||||
│ │ to Config │ │ │
|
||||
│ └────────┬────────┘ │ │
|
||||
│ │ │ │
|
||||
│ └───────────────────┘ │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ ┌─────────────────┐ │
|
||||
│ │ Trigger Deploy │ │
|
||||
│ └────────┬────────┘ │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ ┌─────────────────┐ │
|
||||
│ │ Show Status │ │
|
||||
│ └─────────────────┘ │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
|
@ -0,0 +1,595 @@
|
|||
---
|
||||
description: Generate comprehensive project documentation for engineers and non-engineers
|
||||
allowed-tools: Read, Write, Edit, Bash, Task, TodoWrite, Glob, Grep
|
||||
---
|
||||
|
||||
# Eureka Index - Project Documentation Generator
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## PURPOSE
|
||||
|
||||
Generate comprehensive, dual-audience documentation by analyzing the current project structure using **parallel agent execution**. The output is designed to be understandable for **both engineers and non-engineers**.
|
||||
|
||||
### Documentation Layers
|
||||
|
||||
| Layer | Audience | Content |
|
||||
|-------|----------|---------|
|
||||
| Executive Summary | Everyone | Project purpose, value, capabilities |
|
||||
| Architecture Overview | Everyone | Visual diagrams, technology stack |
|
||||
| Getting Started | Semi-technical | Setup, basic usage, configuration |
|
||||
| Feature Guide | Non-engineers | Plain-language feature descriptions |
|
||||
| API Reference | Engineers | Endpoints, schemas, authentication |
|
||||
| Component Catalog | Engineers | Props, interfaces, usage examples |
|
||||
| Data Models | Both | ER diagrams + plain descriptions |
|
||||
| Glossary | Non-engineers | Technical terms explained |
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION ARCHITECTURE
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────────┐
|
||||
│ PARALLEL EXECUTION PIPELINE │
|
||||
├─────────────────────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ PHASE 1: PARALLEL ANALYSIS (run_in_background: true) │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────────┐ │
|
||||
│ │ Structure │ │ API │ │ Components │ │ Models │ │
|
||||
│ │ Analyzer │ │ Analyzer │ │ Analyzer │ │ Analyzer │ │
|
||||
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └─────┬──────┘ │
|
||||
│ │ │ │ │ │
|
||||
│ ▼ ▼ ▼ ▼ │
|
||||
│ PHASE 2: SYNCHRONIZATION │
|
||||
│ ┌─────────────────────────────────────────────────────────────┐ │
|
||||
│ │ Merge & Create Unified Analysis │ │
|
||||
│ └─────────────────────────────────────────────────────────────┘ │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ PHASE 3: PARALLEL DOCUMENTATION (run_in_background: true) │
|
||||
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌────────────┐ │
|
||||
│ │ Main Doc │ │ API Docs │ │ Components │ │ Quick │ │
|
||||
│ │ Generator │ │ Generator │ │ Generator │ │ Reference │ │
|
||||
│ └──────┬───────┘ └──────┬───────┘ └──────┬───────┘ └─────┬──────┘ │
|
||||
│ │ │ │ │ │
|
||||
│ ▼ ▼ ▼ ▼ │
|
||||
│ PHASE 4: FINALIZATION │
|
||||
│ ┌─────────────────────────────────────────────────────────────┐ │
|
||||
│ │ HTML Generation + Validation + Summary │ │
|
||||
│ └─────────────────────────────────────────────────────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ⛔ CRITICAL RULES
|
||||
|
||||
### MUST DO
|
||||
1. **MUST** launch analysis agents in parallel using `run_in_background: true`
|
||||
2. **MUST** wait for all analysis agents before synchronization
|
||||
3. **MUST** launch documentation agents in parallel after synchronization
|
||||
4. **MUST** include both technical and non-technical descriptions
|
||||
5. **MUST** validate generated documentation against actual code
|
||||
|
||||
### CANNOT DO
|
||||
1. **CANNOT** make up features that don't exist
|
||||
2. **CANNOT** skip the parallel analysis phase
|
||||
3. **CANNOT** generate docs without synchronizing analysis results
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 1: Parallel Analysis
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 1.1: Display Start Banner & Setup
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 📚 EUREKA INDEX - Parallel Documentation Generator ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Launching parallel analysis agents... ║
|
||||
║ Output: Dual-audience documentation (Engineer + Non-Engineer)║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
```bash
|
||||
OUTPUT_DIR="${ARGUMENTS:-docs}"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
echo "📁 Output directory: $OUTPUT_DIR"
|
||||
```
|
||||
|
||||
#### 1.2: Launch Parallel Analysis Agents
|
||||
|
||||
**CRITICAL: Launch ALL four agents in a SINGLE message with multiple Task tool calls:**
|
||||
|
||||
```
|
||||
Launch these 4 Task agents IN PARALLEL (single message, multiple tool calls):
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 1: Structure Analyzer │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "Explore" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # PROJECT STRUCTURE ANALYSIS │
|
||||
│ │
|
||||
│ Analyze the project structure and return findings. │
|
||||
│ │
|
||||
│ ## Tasks │
|
||||
│ 1. Identify project type (package.json, requirements.txt, │
|
||||
│ Cargo.toml, go.mod, pom.xml) │
|
||||
│ 2. Extract metadata (name, version, description) │
|
||||
│ 3. Map directory structure with purposes │
|
||||
│ 4. Identify tech stack (language, framework, database) │
|
||||
│ 5. List key dependencies with plain English purposes │
|
||||
│ │
|
||||
│ ## Output Format (YAML) │
|
||||
│ ```yaml │
|
||||
│ project: │
|
||||
│ name: "..." │
|
||||
│ version: "..." │
|
||||
│ description: "..." │
|
||||
│ type: "node|python|rust|go|java|other" │
|
||||
│ tech_stack: │
|
||||
│ language: "..." │
|
||||
│ framework: "..." │
|
||||
│ database: "..." │
|
||||
│ structure: │
|
||||
│ directories: │
|
||||
│ - path: "..." │
|
||||
│ purpose: "..." │
|
||||
│ file_count: N │
|
||||
│ dependencies: │
|
||||
│ - name: "..." │
|
||||
│ purpose: "plain English" │
|
||||
│ ``` │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 2: API Analyzer │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "Explore" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # API ENDPOINTS ANALYSIS │
|
||||
│ │
|
||||
│ Find and analyze all API endpoints in the project. │
|
||||
│ │
|
||||
│ ## Search Patterns │
|
||||
│ - Next.js App Router: app/api/**/route.ts │
|
||||
│ - Next.js Pages: pages/api/**/*.ts │
|
||||
│ - Express: router.get/post/put/delete │
|
||||
│ - FastAPI: @app.get/post/put/delete │
|
||||
│ - GraphQL: Query/Mutation resolvers │
|
||||
│ │
|
||||
│ ## Output Format (YAML) │
|
||||
│ ```yaml │
|
||||
│ api_endpoints: │
|
||||
│ - method: "GET|POST|PUT|DELETE" │
|
||||
│ path: "/api/..." │
|
||||
│ handler_file: "path/to/file.ts" │
|
||||
│ description: "plain English" │
|
||||
│ request_body: "schema if POST/PUT" │
|
||||
│ response: "schema summary" │
|
||||
│ auth_required: true|false │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ If no APIs found, return: api_endpoints: [] │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 3: Components Analyzer │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "Explore" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # UI COMPONENTS ANALYSIS │
|
||||
│ │
|
||||
│ Find and analyze all UI components in the project. │
|
||||
│ │
|
||||
│ ## Search Patterns │
|
||||
│ - React: components/**/*.tsx, function Component() │
|
||||
│ - Vue: components/**/*.vue, <script setup> │
|
||||
│ - Angular: *.component.ts, @Component │
|
||||
│ - Svelte: **/*.svelte │
|
||||
│ │
|
||||
│ ## Output Format (YAML) │
|
||||
│ ```yaml │
|
||||
│ components: │
|
||||
│ - id: "component_name" │
|
||||
│ name: "ComponentName" │
|
||||
│ path: "path/to/Component.tsx" │
|
||||
│ description: "what it does in plain English" │
|
||||
│ props: │
|
||||
│ - name: "propName" │
|
||||
│ type: "string|number|boolean|..." │
|
||||
│ required: true|false │
|
||||
│ description: "what it controls" │
|
||||
│ events: ["onClick", "onChange"] │
|
||||
│ dependencies: ["OtherComponent"] │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ If no components found, return: components: [] │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 4: Data Models Analyzer │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "Explore" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # DATA MODELS ANALYSIS │
|
||||
│ │
|
||||
│ Find and analyze all data models in the project. │
|
||||
│ │
|
||||
│ ## Search Patterns │
|
||||
│ - Prisma: prisma/schema.prisma, model X {} │
|
||||
│ - TypeORM: @Entity(), entities/**/*.ts │
|
||||
│ - Mongoose: new Schema(), models/**/*.ts │
|
||||
│ - SQLAlchemy: class X(Base), models/**/*.py │
|
||||
│ - TypeScript: interface/type definitions │
|
||||
│ │
|
||||
│ ## Output Format (YAML) │
|
||||
│ ```yaml │
|
||||
│ data_models: │
|
||||
│ - name: "ModelName" │
|
||||
│ source: "prisma|typeorm|mongoose|typescript" │
|
||||
│ file_path: "path/to/model" │
|
||||
│ description: "what data it represents" │
|
||||
│ fields: │
|
||||
│ - name: "fieldName" │
|
||||
│ type: "String|Int|Boolean|..." │
|
||||
│ description: "plain English" │
|
||||
│ constraints: "unique|optional|default" │
|
||||
│ relations: │
|
||||
│ - type: "hasMany|belongsTo|hasOne" │
|
||||
│ target: "OtherModel" │
|
||||
│ glossary_terms: │
|
||||
│ - term: "technical term found" │
|
||||
│ definition: "plain English definition" │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ If no models found, return: data_models: [] │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### 1.3: Wait for All Analysis Agents
|
||||
|
||||
```
|
||||
Use TaskOutput tool to wait for each agent:
|
||||
- TaskOutput with task_id from Agent 1, block: true
|
||||
- TaskOutput with task_id from Agent 2, block: true
|
||||
- TaskOutput with task_id from Agent 3, block: true
|
||||
- TaskOutput with task_id from Agent 4, block: true
|
||||
|
||||
Collect all results for synchronization.
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 2: Synchronization
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 2.1: Merge Analysis Results
|
||||
|
||||
Combine outputs from all 4 agents into a unified analysis:
|
||||
|
||||
```yaml
|
||||
# $OUTPUT_DIR/analysis.yml - Merged from parallel agents
|
||||
|
||||
project:
|
||||
# From Agent 1: Structure Analyzer
|
||||
name: "..."
|
||||
version: "..."
|
||||
description: "..."
|
||||
type: "..."
|
||||
|
||||
tech_stack:
|
||||
# From Agent 1: Structure Analyzer
|
||||
language: "..."
|
||||
framework: "..."
|
||||
database: "..."
|
||||
key_dependencies: [...]
|
||||
|
||||
structure:
|
||||
# From Agent 1: Structure Analyzer
|
||||
directories: [...]
|
||||
|
||||
api_endpoints:
|
||||
# From Agent 2: API Analyzer
|
||||
[...]
|
||||
|
||||
components:
|
||||
# From Agent 3: Components Analyzer
|
||||
[...]
|
||||
|
||||
data_models:
|
||||
# From Agent 4: Data Models Analyzer
|
||||
[...]
|
||||
|
||||
glossary_terms:
|
||||
# Merged from all agents
|
||||
[...]
|
||||
```
|
||||
|
||||
#### 2.2: Write Unified Analysis File
|
||||
|
||||
```bash
|
||||
# Write merged analysis to file
|
||||
Write the unified YAML to: $OUTPUT_DIR/analysis.yml
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 3: Parallel Documentation Generation
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 3.1: Launch Parallel Documentation Agents
|
||||
|
||||
**CRITICAL: Launch ALL four doc agents in a SINGLE message with multiple Task tool calls:**
|
||||
|
||||
```
|
||||
Launch these 4 Task agents IN PARALLEL (single message, multiple tool calls):
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ DOC AGENT 1: Main Documentation │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # Generate PROJECT_DOCUMENTATION.md │
|
||||
│ │
|
||||
│ Using the analysis from $OUTPUT_DIR/analysis.yml, │
|
||||
│ generate comprehensive main documentation. │
|
||||
│ │
|
||||
│ ## Sections Required │
|
||||
│ 1. Executive Summary (plain English, no jargon) │
|
||||
│ 2. Quick Start (installation, basic usage) │
|
||||
│ 3. Architecture Overview (ASCII diagrams) │
|
||||
│ 4. Features (dual-audience: plain + technical details) │
|
||||
│ 5. Glossary (all technical terms explained) │
|
||||
│ │
|
||||
│ ## Rules │
|
||||
│ - Plain English FIRST, technical in <details> tags │
|
||||
│ - Include ASCII architecture diagrams │
|
||||
│ - Use tables for structured data │
|
||||
│ - Code blocks with language hints │
|
||||
│ │
|
||||
│ Write to: $OUTPUT_DIR/PROJECT_DOCUMENTATION.md │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ DOC AGENT 2: API Reference │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # Generate API_REFERENCE.md │
|
||||
│ │
|
||||
│ Using api_endpoints from $OUTPUT_DIR/analysis.yml, │
|
||||
│ generate detailed API documentation. │
|
||||
│ │
|
||||
│ ## Format per Endpoint │
|
||||
│ ### [METHOD] /path │
|
||||
│ **Description**: Plain English │
|
||||
│ **Authentication**: Required/Optional │
|
||||
│ │
|
||||
│ <details> │
|
||||
│ <summary>Technical Details</summary> │
|
||||
│ Request body, response schema, example │
|
||||
│ </details> │
|
||||
│ │
|
||||
│ If no APIs exist, write brief note explaining this. │
|
||||
│ │
|
||||
│ Write to: $OUTPUT_DIR/API_REFERENCE.md │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ DOC AGENT 3: Components Catalog │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # Generate COMPONENTS.md │
|
||||
│ │
|
||||
│ Using components from $OUTPUT_DIR/analysis.yml, │
|
||||
│ generate component catalog documentation. │
|
||||
│ │
|
||||
│ ## Format per Component │
|
||||
│ ### ComponentName │
|
||||
│ **Purpose**: Plain English description │
|
||||
│ **Location**: `path/to/file` │
|
||||
│ │
|
||||
│ <details> │
|
||||
│ <summary>Props & Usage</summary> │
|
||||
│ Props table, usage example, dependencies │
|
||||
│ </details> │
|
||||
│ │
|
||||
│ If no components exist, write brief note explaining this. │
|
||||
│ │
|
||||
│ Write to: $OUTPUT_DIR/COMPONENTS.md │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ DOC AGENT 4: Quick Reference │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # Generate QUICK_REFERENCE.md │
|
||||
│ │
|
||||
│ Using $OUTPUT_DIR/analysis.yml, create a one-page │
|
||||
│ quick reference card. │
|
||||
│ │
|
||||
│ ## Sections (tables only, minimal text) │
|
||||
│ - Commands (npm scripts, make targets) │
|
||||
│ - Key Files (important files and purposes) │
|
||||
│ - API Endpoints (method, path, purpose) │
|
||||
│ - Environment Variables │
|
||||
│ - Common Patterns │
|
||||
│ │
|
||||
│ Keep it to ONE PAGE - scannable, dense, useful. │
|
||||
│ │
|
||||
│ Write to: $OUTPUT_DIR/QUICK_REFERENCE.md │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### 3.2: Wait for All Documentation Agents
|
||||
|
||||
```
|
||||
Use TaskOutput tool to wait for each doc agent:
|
||||
- TaskOutput with task_id from Doc Agent 1, block: true
|
||||
- TaskOutput with task_id from Doc Agent 2, block: true
|
||||
- TaskOutput with task_id from Doc Agent 3, block: true
|
||||
- TaskOutput with task_id from Doc Agent 4, block: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 4: Finalization
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 4.1: Generate HTML Documentation (Optional)
|
||||
|
||||
```bash
|
||||
# If Python scripts exist, generate HTML
|
||||
if [ -f "skills/documentation-generator/scripts/generate_html.py" ]; then
|
||||
python3 skills/documentation-generator/scripts/generate_html.py \
|
||||
$OUTPUT_DIR/analysis.yml \
|
||||
skills/documentation-generator/templates/documentation.html \
|
||||
$OUTPUT_DIR/index.html
|
||||
fi
|
||||
```
|
||||
|
||||
#### 4.2: Validate Generated Documentation
|
||||
|
||||
Verify all documentation files exist and are non-empty:
|
||||
- `$OUTPUT_DIR/analysis.yml`
|
||||
- `$OUTPUT_DIR/PROJECT_DOCUMENTATION.md`
|
||||
- `$OUTPUT_DIR/API_REFERENCE.md`
|
||||
- `$OUTPUT_DIR/COMPONENTS.md`
|
||||
- `$OUTPUT_DIR/QUICK_REFERENCE.md`
|
||||
|
||||
#### 4.3: Display Completion Banner
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ PARALLEL DOCUMENTATION COMPLETE ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Execution: 4 analysis agents → sync → 4 doc agents ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Output Directory: $OUTPUT_DIR ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Files Created: ║
|
||||
║ 📊 analysis.yml (Merged analysis data) ║
|
||||
║ 📄 PROJECT_DOCUMENTATION.md (Main documentation) ║
|
||||
║ 📄 API_REFERENCE.md (API details) ║
|
||||
║ 📄 COMPONENTS.md (Component catalog) ║
|
||||
║ 📄 QUICK_REFERENCE.md (One-page reference) ║
|
||||
║ 🌐 index.html (HTML version - if generated) ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Performance: ║
|
||||
║ ⚡ Analysis: 4 agents in parallel ║
|
||||
║ ⚡ Documentation: 4 agents in parallel ║
|
||||
║ ⚡ Total: ~2x faster than sequential execution ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENTS
|
||||
|
||||
| Argument | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `[output_dir]` | `docs` | Output directory for documentation |
|
||||
| `--format` | `markdown` | Output format: markdown, html |
|
||||
| `--sections` | `all` | Sections to include: all, api, components, models |
|
||||
| `--audience` | `both` | Target: both, technical, non-technical |
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
```bash
|
||||
# Generate full documentation with parallel agents
|
||||
/eureka:index
|
||||
|
||||
# Generate in custom directory
|
||||
/eureka:index my-docs
|
||||
|
||||
# Generate API-only documentation
|
||||
/eureka:index --sections api
|
||||
|
||||
# Generate non-technical documentation only
|
||||
/eureka:index --audience non-technical
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## PARALLEL EXECUTION BENEFITS
|
||||
|
||||
| Metric | Sequential | Parallel | Improvement |
|
||||
|--------|-----------|----------|-------------|
|
||||
| Analysis Phase | 4x agent time | 1x agent time | 75% faster |
|
||||
| Doc Generation | 4x agent time | 1x agent time | 75% faster |
|
||||
| Total Time | ~8 units | ~2 units | **4x faster** |
|
||||
|
||||
---
|
||||
|
||||
## DUAL-AUDIENCE WRITING GUIDELINES
|
||||
|
||||
### For Non-Engineers (Primary)
|
||||
- Lead with "What" and "Why", not "How"
|
||||
- Use analogies and real-world comparisons
|
||||
- Avoid acronyms; spell them out first time
|
||||
- Use bullet points over paragraphs
|
||||
- Include visual diagrams
|
||||
|
||||
### For Engineers (Secondary)
|
||||
- Include in collapsible `<details>` sections
|
||||
- Provide code examples
|
||||
- Reference file paths and line numbers
|
||||
- Include type definitions
|
||||
- Link to source files
|
||||
|
||||
### Balance Example
|
||||
|
||||
```markdown
|
||||
## User Authentication
|
||||
|
||||
**What it does**: Allows users to securely log into the application
|
||||
using their email and password.
|
||||
|
||||
**How it works** (simplified):
|
||||
1. User enters credentials
|
||||
2. System verifies them
|
||||
3. User receives access
|
||||
|
||||
<details>
|
||||
<summary>Technical Implementation</summary>
|
||||
|
||||
- **Strategy**: JWT-based authentication
|
||||
- **Token Storage**: HTTP-only cookies
|
||||
- **Session Duration**: 24 hours
|
||||
- **Refresh Logic**: Automatic refresh 1 hour before expiry
|
||||
|
||||
**Key Files**:
|
||||
- `src/auth/jwt.service.ts` - Token generation
|
||||
- `src/auth/auth.guard.ts` - Route protection
|
||||
|
||||
</details>
|
||||
```
|
||||
|
|
@ -0,0 +1,660 @@
|
|||
---
|
||||
description: Generate a designer-quality landing page from project documentation with AI-generated images
|
||||
allowed-tools: Read, Write, Edit, Bash, Task, TodoWrite, Glob, Grep, mcp__eureka-imagen__generate_hero_image, mcp__eureka-imagen__generate_feature_icon, mcp__eureka-imagen__generate_illustration, mcp__eureka-imagen__generate_og_image, mcp__eureka-imagen__generate_logo_concept, mcp__eureka-imagen__list_available_models, mcp__eureka-imagen__check_status
|
||||
---
|
||||
|
||||
# Eureka Landing - Landing Page Generator
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## PURPOSE
|
||||
|
||||
Generate a **designer-quality landing page** with concept branding and Q&A section based on existing project documentation. This command requires documentation to be generated first via `/eureka:index`.
|
||||
|
||||
### Output Features
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| Hero Section | Compelling headline, tagline, CTA buttons |
|
||||
| Features Grid | Visual feature cards with icons |
|
||||
| How It Works | Step-by-step visual flow |
|
||||
| Screenshots/Demo | Placeholder for app visuals |
|
||||
| Q&A/FAQ | Common questions answered |
|
||||
| Concept Branding | Colors, typography, visual style |
|
||||
| Responsive Design | Mobile-first, works on all devices |
|
||||
| Dark Mode | Automatic system preference detection |
|
||||
| **AI Images** | AI-generated hero, icons, illustrations (ImageRouter) |
|
||||
|
||||
### Image Generation (Optional)
|
||||
|
||||
When `--with-images` flag is used and IMAGEROUTER_API_KEY is set, the command will:
|
||||
- Generate a hero banner image
|
||||
- Generate feature icons
|
||||
- Generate how-it-works illustrations
|
||||
- Generate OG image for social sharing
|
||||
|
||||
```bash
|
||||
# With AI-generated images
|
||||
/eureka:landing --with-images
|
||||
|
||||
# Without images (default)
|
||||
/eureka:landing
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## PREREQUISITES
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ⚠️ REQUIRES DOCUMENTATION FIRST ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ ║
|
||||
║ This command uses data from /eureka:index output. ║
|
||||
║ ║
|
||||
║ Required files: ║
|
||||
║ ✓ docs/analysis.yml (or custom output dir) ║
|
||||
║ ✓ docs/PROJECT_DOCUMENTATION.md ║
|
||||
║ ║
|
||||
║ If missing, run first: ║
|
||||
║ /eureka:index ║
|
||||
║ ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 1: Validate Prerequisites
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 1.1: Check for Documentation
|
||||
|
||||
```bash
|
||||
DOCS_DIR="${ARGUMENTS:-docs}"
|
||||
|
||||
# Check if documentation exists
|
||||
if [ ! -f "$DOCS_DIR/analysis.yml" ] && [ ! -f "$DOCS_DIR/PROJECT_DOCUMENTATION.md" ]; then
|
||||
echo "❌ ERROR: Documentation not found!"
|
||||
echo ""
|
||||
echo "Required: $DOCS_DIR/analysis.yml or $DOCS_DIR/PROJECT_DOCUMENTATION.md"
|
||||
echo ""
|
||||
echo "Run first: /eureka:index"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "✅ Documentation found in $DOCS_DIR"
|
||||
```
|
||||
|
||||
#### 1.2: Display Start Banner
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 🎨 EUREKA LANDING - Designer Landing Page Generator ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Creating: Hero + Features + How It Works + Q&A ║
|
||||
║ Style: Modern, professional, conversion-optimized ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 2: Parallel Content Generation
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 2.1: Launch Content Generation Agents in Parallel
|
||||
|
||||
**CRITICAL: Launch ALL agents in a SINGLE message:**
|
||||
|
||||
```
|
||||
Launch these 4 Task agents IN PARALLEL:
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 1: Branding Concept Generator │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "frontend-architect" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # CONCEPT BRANDING GENERATION │
|
||||
│ │
|
||||
│ Read $DOCS_DIR/analysis.yml and create a branding concept. │
|
||||
│ │
|
||||
│ ## Output: branding.json │
|
||||
│ ```json │
|
||||
│ { │
|
||||
│ "brand": { │
|
||||
│ "name": "Project Name", │
|
||||
│ "tagline": "Compelling one-liner", │
|
||||
│ "value_proposition": "What makes it special" │
|
||||
│ }, │
|
||||
│ "colors": { │
|
||||
│ "primary": "#hex - main brand color", │
|
||||
│ "secondary": "#hex - accent color", │
|
||||
│ "accent": "#hex - CTA/highlight color", │
|
||||
│ "background": "#hex - light bg", │
|
||||
│ "background_dark": "#hex - dark mode bg", │
|
||||
│ "text": "#hex - primary text", │
|
||||
│ "text_muted": "#hex - secondary text" │
|
||||
│ }, │
|
||||
│ "typography": { │
|
||||
│ "heading_font": "Inter, system-ui, sans-serif", │
|
||||
│ "body_font": "Inter, system-ui, sans-serif", │
|
||||
│ "mono_font": "JetBrains Mono, monospace" │
|
||||
│ }, │
|
||||
│ "style": { │
|
||||
│ "border_radius": "12px", │
|
||||
│ "shadow": "0 4px 6px -1px rgba(0,0,0,0.1)", │
|
||||
│ "gradient": "linear-gradient(...)" │
|
||||
│ }, │
|
||||
│ "icons": { │
|
||||
│ "style": "lucide|heroicons|phosphor", │
|
||||
│ "feature_icons": ["icon1", "icon2", ...] │
|
||||
│ } │
|
||||
│ } │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ Base colors on project type: │
|
||||
│ - Developer tools: Blues, purples │
|
||||
│ - Business apps: Blues, greens │
|
||||
│ - Creative tools: Vibrant, gradients │
|
||||
│ - Data/Analytics: Teals, blues │
|
||||
│ │
|
||||
│ Write to: $DOCS_DIR/branding.json │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 2: Hero & Features Content │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # HERO & FEATURES CONTENT │
|
||||
│ │
|
||||
│ Read $DOCS_DIR/analysis.yml and create marketing content. │
|
||||
│ │
|
||||
│ ## Output: content.json │
|
||||
│ ```json │
|
||||
│ { │
|
||||
│ "hero": { │
|
||||
│ "headline": "Powerful, benefit-focused headline", │
|
||||
│ "subheadline": "Explain the value in one sentence", │
|
||||
│ "cta_primary": "Get Started", │
|
||||
│ "cta_secondary": "Learn More", │
|
||||
│ "social_proof": "Used by X developers" │
|
||||
│ }, │
|
||||
│ "features": [ │
|
||||
│ { │
|
||||
│ "title": "Feature Name", │
|
||||
│ "description": "Benefit-focused description", │
|
||||
│ "icon": "suggested-icon-name" │
|
||||
│ } │
|
||||
│ ], │
|
||||
│ "how_it_works": [ │
|
||||
│ { │
|
||||
│ "step": 1, │
|
||||
│ "title": "Step Title", │
|
||||
│ "description": "What happens" │
|
||||
│ } │
|
||||
│ ], │
|
||||
│ "stats": [ │
|
||||
│ { "value": "10x", "label": "Faster" } │
|
||||
│ ] │
|
||||
│ } │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ Writing Rules: │
|
||||
│ - Headlines: Benefit-focused, action-oriented │
|
||||
│ - Features: Max 6, each with clear benefit │
|
||||
│ - How It Works: 3-4 steps maximum │
|
||||
│ - Use numbers and specifics when possible │
|
||||
│ │
|
||||
│ Write to: $DOCS_DIR/content.json │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 3: Q&A / FAQ Generator │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # Q&A / FAQ GENERATION │
|
||||
│ │
|
||||
│ Read $DOCS_DIR/analysis.yml and PROJECT_DOCUMENTATION.md │
|
||||
│ to generate comprehensive Q&A. │
|
||||
│ │
|
||||
│ ## Output: faq.json │
|
||||
│ ```json │
|
||||
│ { │
|
||||
│ "categories": [ │
|
||||
│ { │
|
||||
│ "name": "Getting Started", │
|
||||
│ "questions": [ │
|
||||
│ { │
|
||||
│ "q": "How do I install [Project]?", │
|
||||
│ "a": "Clear, step-by-step answer" │
|
||||
│ } │
|
||||
│ ] │
|
||||
│ }, │
|
||||
│ { │
|
||||
│ "name": "Features", │
|
||||
│ "questions": [...] │
|
||||
│ }, │
|
||||
│ { │
|
||||
│ "name": "Technical", │
|
||||
│ "questions": [...] │
|
||||
│ }, │
|
||||
│ { │
|
||||
│ "name": "Pricing & Support", │
|
||||
│ "questions": [...] │
|
||||
│ } │
|
||||
│ ] │
|
||||
│ } │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ Q&A Guidelines: │
|
||||
│ - 3-5 questions per category │
|
||||
│ - Anticipate real user questions │
|
||||
│ - Answers should be concise but complete │
|
||||
│ - Include code snippets where helpful │
|
||||
│ - Address common concerns and objections │
|
||||
│ │
|
||||
│ Write to: $DOCS_DIR/faq.json │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
|
||||
┌─────────────────────────────────────────────────────────────────┐
|
||||
│ AGENT 4: SEO & Meta Content │
|
||||
├─────────────────────────────────────────────────────────────────┤
|
||||
│ Task tool with: │
|
||||
│ subagent_type: "technical-writer" │
|
||||
│ run_in_background: true │
|
||||
│ prompt: | │
|
||||
│ # SEO & META CONTENT │
|
||||
│ │
|
||||
│ Read $DOCS_DIR/analysis.yml and create SEO content. │
|
||||
│ │
|
||||
│ ## Output: seo.json │
|
||||
│ ```json │
|
||||
│ { │
|
||||
│ "title": "Project Name - Tagline | Category", │
|
||||
│ "description": "150-160 char meta description", │
|
||||
│ "keywords": ["keyword1", "keyword2"], │
|
||||
│ "og": { │
|
||||
│ "title": "Open Graph title", │
|
||||
│ "description": "OG description", │
|
||||
│ "type": "website" │
|
||||
│ }, │
|
||||
│ "twitter": { │
|
||||
│ "card": "summary_large_image", │
|
||||
│ "title": "Twitter title", │
|
||||
│ "description": "Twitter description" │
|
||||
│ }, │
|
||||
│ "structured_data": { │
|
||||
│ "@type": "SoftwareApplication", │
|
||||
│ "name": "...", │
|
||||
│ "description": "..." │
|
||||
│ } │
|
||||
│ } │
|
||||
│ ``` │
|
||||
│ │
|
||||
│ Write to: $DOCS_DIR/seo.json │
|
||||
└─────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
#### 2.2: Wait for All Content Agents
|
||||
|
||||
```
|
||||
Use TaskOutput tool to wait for each agent:
|
||||
- TaskOutput with task_id from Agent 1 (branding), block: true
|
||||
- TaskOutput with task_id from Agent 2 (content), block: true
|
||||
- TaskOutput with task_id from Agent 3 (faq), block: true
|
||||
- TaskOutput with task_id from Agent 4 (seo), block: true
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 3: Generate Landing Page HTML
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 3.1: Generate Designer-Quality Landing Page
|
||||
|
||||
**Use Task tool with frontend-architect agent:**
|
||||
|
||||
```
|
||||
Task tool with:
|
||||
subagent_type: "frontend-architect"
|
||||
prompt: |
|
||||
# GENERATE LANDING PAGE HTML
|
||||
|
||||
Read these files and generate a stunning landing page:
|
||||
- $DOCS_DIR/branding.json (colors, typography, style)
|
||||
- $DOCS_DIR/content.json (hero, features, how-it-works)
|
||||
- $DOCS_DIR/faq.json (Q&A sections)
|
||||
- $DOCS_DIR/seo.json (meta tags)
|
||||
|
||||
## Output: $DOCS_DIR/landing.html
|
||||
|
||||
## Design Requirements
|
||||
|
||||
### Structure
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<!-- SEO meta tags from seo.json -->
|
||||
<!-- Fonts: Google Fonts or system fonts -->
|
||||
<!-- Inline critical CSS -->
|
||||
</head>
|
||||
<body>
|
||||
<!-- Navigation (sticky) -->
|
||||
<nav>Logo | Links | CTA Button</nav>
|
||||
|
||||
<!-- Hero Section -->
|
||||
<section class="hero">
|
||||
<h1>Headline</h1>
|
||||
<p>Subheadline</p>
|
||||
<div class="cta-buttons">Primary | Secondary</div>
|
||||
<!-- Optional: Animated gradient background -->
|
||||
</section>
|
||||
|
||||
<!-- Social Proof / Stats -->
|
||||
<section class="stats">
|
||||
<div class="stat">Value + Label</div>
|
||||
</section>
|
||||
|
||||
<!-- Features Grid -->
|
||||
<section class="features">
|
||||
<h2>Features</h2>
|
||||
<div class="feature-grid">
|
||||
<!-- 3-column grid of feature cards -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- How It Works -->
|
||||
<section class="how-it-works">
|
||||
<h2>How It Works</h2>
|
||||
<div class="steps">
|
||||
<!-- Numbered steps with visual flow -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- Q&A / FAQ -->
|
||||
<section class="faq">
|
||||
<h2>Frequently Asked Questions</h2>
|
||||
<div class="faq-accordion">
|
||||
<!-- Expandable Q&A items -->
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<!-- CTA Section -->
|
||||
<section class="cta-final">
|
||||
<h2>Ready to Get Started?</h2>
|
||||
<button>Primary CTA</button>
|
||||
</section>
|
||||
|
||||
<!-- Footer -->
|
||||
<footer>
|
||||
Links | Copyright | Social
|
||||
</footer>
|
||||
|
||||
<!-- Inline JavaScript for interactions -->
|
||||
<script>
|
||||
// FAQ accordion
|
||||
// Smooth scroll
|
||||
// Dark mode toggle
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Visual Design Standards
|
||||
|
||||
**Hero Section**:
|
||||
- Full viewport height or 80vh minimum
|
||||
- Gradient or subtle pattern background
|
||||
- Large, bold headline (48-72px)
|
||||
- Clear visual hierarchy
|
||||
- Floating elements or subtle animation
|
||||
|
||||
**Feature Cards**:
|
||||
- Icon + Title + Description
|
||||
- Subtle hover effects (scale, shadow)
|
||||
- Consistent spacing (24-32px gaps)
|
||||
- 3-column on desktop, 1 on mobile
|
||||
|
||||
**How It Works**:
|
||||
- Visual step indicators (1, 2, 3)
|
||||
- Connecting lines or arrows
|
||||
- Icons or illustrations per step
|
||||
- Horizontal on desktop, vertical on mobile
|
||||
|
||||
**FAQ Accordion**:
|
||||
- Click to expand/collapse
|
||||
- Smooth animation (max-height transition)
|
||||
- Plus/minus or chevron indicator
|
||||
- Category grouping
|
||||
|
||||
**Micro-interactions**:
|
||||
- Button hover: scale(1.02) + shadow
|
||||
- Card hover: translateY(-4px) + shadow
|
||||
- Smooth scroll for anchor links
|
||||
- Fade-in on scroll (intersection observer)
|
||||
|
||||
### CSS Requirements
|
||||
|
||||
```css
|
||||
/* CSS Custom Properties from branding.json */
|
||||
:root {
|
||||
--color-primary: ...;
|
||||
--color-secondary: ...;
|
||||
--font-heading: ...;
|
||||
--radius: ...;
|
||||
}
|
||||
|
||||
/* Dark mode */
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-bg: var(--color-bg-dark);
|
||||
...
|
||||
}
|
||||
}
|
||||
|
||||
/* Responsive breakpoints */
|
||||
/* Mobile: < 640px */
|
||||
/* Tablet: 640-1024px */
|
||||
/* Desktop: > 1024px */
|
||||
```
|
||||
|
||||
### JavaScript Requirements
|
||||
- FAQ accordion functionality
|
||||
- Smooth scroll for navigation
|
||||
- Optional: Scroll-triggered animations
|
||||
- Dark mode toggle (optional)
|
||||
- Mobile menu toggle
|
||||
|
||||
### Performance
|
||||
- Single HTML file (no external dependencies)
|
||||
- Inline critical CSS
|
||||
- Minimal JavaScript
|
||||
- Optimized for Core Web Vitals
|
||||
- < 100KB total size
|
||||
|
||||
Write complete HTML to: $DOCS_DIR/landing.html
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### PHASE 4: Finalization
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 4.1: Validate Generated Files
|
||||
|
||||
Verify all files exist:
|
||||
- `$DOCS_DIR/branding.json`
|
||||
- `$DOCS_DIR/content.json`
|
||||
- `$DOCS_DIR/faq.json`
|
||||
- `$DOCS_DIR/seo.json`
|
||||
- `$DOCS_DIR/landing.html`
|
||||
|
||||
#### 4.2: Display Completion Banner
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ LANDING PAGE GENERATED SUCCESSFULLY ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Output Directory: $DOCS_DIR ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Files Created: ║
|
||||
║ 🎨 branding.json (Colors, typography, style guide) ║
|
||||
║ 📝 content.json (Hero, features, how-it-works) ║
|
||||
║ ❓ faq.json (Q&A content by category) ║
|
||||
║ 🔍 seo.json (Meta tags, Open Graph, Schema) ║
|
||||
║ 🌐 landing.html (Designer-quality landing page) ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Landing Page Features: ║
|
||||
║ ✅ Hero with compelling headline + CTAs ║
|
||||
║ ✅ Feature grid with icons ║
|
||||
║ ✅ How It Works visual flow ║
|
||||
║ ✅ Interactive FAQ accordion ║
|
||||
║ ✅ Responsive (mobile-first) ║
|
||||
║ ✅ Dark mode support ║
|
||||
║ ✅ SEO optimized ║
|
||||
║ ✅ Single file, no dependencies ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Next Steps: ║
|
||||
║ → Open landing.html in browser to preview ║
|
||||
║ → Customize colors in branding.json ║
|
||||
║ → Add real screenshots/images ║
|
||||
║ → Deploy to your hosting ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENTS
|
||||
|
||||
| Argument | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `[docs_dir]` | `docs` | Directory containing documentation from /eureka:index |
|
||||
| `--style` | `modern` | Design style: modern, minimal, bold, corporate |
|
||||
| `--theme` | `auto` | Color theme: auto, light, dark |
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
```bash
|
||||
# Generate landing page from default docs directory
|
||||
/eureka:landing
|
||||
|
||||
# Generate from custom documentation directory
|
||||
/eureka:landing my-docs
|
||||
|
||||
# Generate with specific style
|
||||
/eureka:landing --style minimal
|
||||
|
||||
# Generate dark-only theme
|
||||
/eureka:landing --theme dark
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## DESIGN STYLE OPTIONS
|
||||
|
||||
### Modern (Default)
|
||||
- Gradient backgrounds
|
||||
- Rounded corners (12-16px)
|
||||
- Soft shadows
|
||||
- Vibrant accent colors
|
||||
- Floating elements
|
||||
|
||||
### Minimal
|
||||
- Clean white space
|
||||
- Thin borders
|
||||
- Muted colors
|
||||
- Typography-focused
|
||||
- Subtle interactions
|
||||
|
||||
### Bold
|
||||
- Strong colors
|
||||
- Large typography
|
||||
- High contrast
|
||||
- Geometric shapes
|
||||
- Impactful CTAs
|
||||
|
||||
### Corporate
|
||||
- Professional blues/grays
|
||||
- Structured layout
|
||||
- Trust indicators
|
||||
- Clean lines
|
||||
- Conservative animations
|
||||
|
||||
---
|
||||
|
||||
## OUTPUT STRUCTURE
|
||||
|
||||
```
|
||||
docs/
|
||||
├── analysis.yml (from /eureka:index)
|
||||
├── PROJECT_DOCUMENTATION.md
|
||||
├── API_REFERENCE.md
|
||||
├── COMPONENTS.md
|
||||
├── QUICK_REFERENCE.md
|
||||
├── index.html (documentation HTML)
|
||||
│
|
||||
├── branding.json (NEW - concept branding)
|
||||
├── content.json (NEW - marketing content)
|
||||
├── faq.json (NEW - Q&A content)
|
||||
├── seo.json (NEW - SEO metadata)
|
||||
└── landing.html (NEW - landing page)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## BRANDING SYSTEM
|
||||
|
||||
The generated branding.json provides a complete design system:
|
||||
|
||||
```json
|
||||
{
|
||||
"brand": {
|
||||
"name": "Project Name",
|
||||
"tagline": "Your compelling tagline",
|
||||
"value_proposition": "What makes it unique"
|
||||
},
|
||||
"colors": {
|
||||
"primary": "#6366f1",
|
||||
"secondary": "#8b5cf6",
|
||||
"accent": "#f59e0b",
|
||||
"background": "#ffffff",
|
||||
"background_dark": "#0f172a",
|
||||
"text": "#1e293b",
|
||||
"text_muted": "#64748b"
|
||||
},
|
||||
"typography": {
|
||||
"heading_font": "Inter, system-ui, sans-serif",
|
||||
"body_font": "Inter, system-ui, sans-serif",
|
||||
"mono_font": "JetBrains Mono, Consolas, monospace"
|
||||
},
|
||||
"style": {
|
||||
"border_radius": "12px",
|
||||
"shadow_sm": "0 1px 2px rgba(0,0,0,0.05)",
|
||||
"shadow_md": "0 4px 6px -1px rgba(0,0,0,0.1)",
|
||||
"shadow_lg": "0 10px 15px -3px rgba(0,0,0,0.1)",
|
||||
"gradient": "linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This can be used to:
|
||||
- Maintain consistent branding across all pages
|
||||
- Generate CSS custom properties
|
||||
- Create Figma/design tool exports
|
||||
- Build component libraries
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
---
|
||||
description: Analyze codebase and generate project manifest from existing code
|
||||
allowed-tools: Read, Write, Bash, Glob, Grep, Task, AskUserQuestion
|
||||
---
|
||||
|
||||
# Analyze Codebase and Generate Manifest
|
||||
|
||||
Analyze the current codebase and generate all files needed for the guardrail workflow system.
|
||||
|
||||
## Arguments
|
||||
|
||||
- `$ARGUMENTS` - Optional flags:
|
||||
- `--force` - Overwrite existing manifest without asking
|
||||
- `--dry-run` - Preview manifest without writing
|
||||
- `--deep` - Use AI agent for deeper analysis
|
||||
- `<name>` - Custom project name
|
||||
|
||||
## Generated Files
|
||||
|
||||
This command creates:
|
||||
1. `project_manifest.json` - Entity definitions and dependencies
|
||||
2. `.workflow/index.yml` - Version tracking index
|
||||
3. `.workflow/versions/` - Directory for version snapshots
|
||||
|
||||
## Quick Execution (Default)
|
||||
|
||||
### Step 1: Run the Python analyzer script
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/analyze_codebase.py --path . $ARGUMENTS
|
||||
```
|
||||
|
||||
If the script succeeds, continue to Step 2.
|
||||
|
||||
### Step 2: Initialize Workflow Directory Structure [MANDATORY]
|
||||
```bash
|
||||
# Create workflow directory structure
|
||||
mkdir -p .workflow/versions
|
||||
|
||||
# Create index.yml if it doesn't exist
|
||||
if [ ! -f .workflow/index.yml ]; then
|
||||
cat > .workflow/index.yml << 'EOF'
|
||||
versions: []
|
||||
latest_version: null
|
||||
total_versions: 0
|
||||
EOF
|
||||
echo "Created .workflow/index.yml"
|
||||
fi
|
||||
```
|
||||
|
||||
### Step 3: Display Summary
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ GUARDRAIL INITIALIZED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Files Created: ║
|
||||
║ ✓ project_manifest.json ║
|
||||
║ ✓ .workflow/index.yml ║
|
||||
║ ✓ .workflow/versions/ ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Ready to use: ║
|
||||
║ /workflow:spawn <feature> Start a new feature ║
|
||||
║ /guardrail:status Check project status ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
## Deep Analysis Mode (--deep flag)
|
||||
|
||||
**Use the Task tool to spawn an Explore agent for comprehensive codebase analysis**
|
||||
|
||||
Use Task tool with:
|
||||
subagent_type: "Explore"
|
||||
prompt: |
|
||||
Analyze this codebase thoroughly and return structured information about:
|
||||
|
||||
1. **Pages** (Next.js App Router):
|
||||
- Find all page.tsx files in app/ directory
|
||||
- Extract route paths from file locations
|
||||
- Identify components imported/used
|
||||
- Identify API dependencies (fetch calls)
|
||||
|
||||
2. **Components**:
|
||||
- Find all .tsx files in app/components/
|
||||
- Extract component names and exports
|
||||
- Extract prop interfaces/types
|
||||
- Identify child component dependencies
|
||||
|
||||
3. **API Routes**:
|
||||
- Find all route.ts files in app/api/
|
||||
- Extract HTTP methods (GET, POST, PUT, DELETE, PATCH)
|
||||
- Identify request/response types
|
||||
- Extract path parameters
|
||||
|
||||
4. **Database/Types**:
|
||||
- Find type definitions in app/lib/
|
||||
- Extract interfaces and type aliases
|
||||
- Identify database schemas/tables
|
||||
|
||||
5. **Dependencies**:
|
||||
- Which components are used by which pages
|
||||
- Which APIs are called by which components
|
||||
- Which database tables are used by which APIs
|
||||
|
||||
Return the analysis as structured JSON sections.
|
||||
|
||||
### Phase 2: Generate Manifest
|
||||
|
||||
Based on the analysis, create `project_manifest.json` with this structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"project": {
|
||||
"name": "<project-name>",
|
||||
"version": "1.0.0",
|
||||
"created_at": "<ISO timestamp>",
|
||||
"description": "<inferred from package.json or README>"
|
||||
},
|
||||
"state": {
|
||||
"current_phase": "IMPLEMENTATION_PHASE",
|
||||
"approval_status": {
|
||||
"manifest_approved": true,
|
||||
"approved_by": "analyzer",
|
||||
"approved_at": "<ISO timestamp>"
|
||||
},
|
||||
"revision_history": [
|
||||
{
|
||||
"action": "MANIFEST_GENERATED",
|
||||
"timestamp": "<ISO timestamp>",
|
||||
"details": "Generated from existing codebase analysis"
|
||||
}
|
||||
]
|
||||
},
|
||||
"entities": {
|
||||
"pages": [
|
||||
{
|
||||
"id": "page_<name>",
|
||||
"path": "/<route>",
|
||||
"file_path": "app/<path>/page.tsx",
|
||||
"status": "IMPLEMENTED",
|
||||
"description": "<inferred>",
|
||||
"components": ["comp_<name>", ...],
|
||||
"data_dependencies": ["api_<name>", ...]
|
||||
}
|
||||
],
|
||||
"components": [
|
||||
{
|
||||
"id": "comp_<name>",
|
||||
"name": "<ComponentName>",
|
||||
"file_path": "app/components/<Name>.tsx",
|
||||
"status": "IMPLEMENTED",
|
||||
"description": "<inferred from component>",
|
||||
"props": {
|
||||
"<propName>": {
|
||||
"type": "<type>",
|
||||
"optional": true|false,
|
||||
"description": "<if available>"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"api_endpoints": [
|
||||
{
|
||||
"id": "api_<action>_<resource>",
|
||||
"path": "/api/<path>",
|
||||
"method": "GET|POST|PUT|DELETE|PATCH",
|
||||
"file_path": "app/api/<path>/route.ts",
|
||||
"status": "IMPLEMENTED",
|
||||
"description": "<inferred>",
|
||||
"request": {
|
||||
"params": {},
|
||||
"query": {},
|
||||
"body": {}
|
||||
},
|
||||
"response": {
|
||||
"type": "<type>",
|
||||
"description": "<description>"
|
||||
}
|
||||
}
|
||||
],
|
||||
"database_tables": [
|
||||
{
|
||||
"id": "table_<name>",
|
||||
"name": "<tableName>",
|
||||
"file_path": "app/lib/db.ts",
|
||||
"status": "IMPLEMENTED",
|
||||
"description": "<description>",
|
||||
"columns": {}
|
||||
}
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"component_to_page": {},
|
||||
"api_to_component": {},
|
||||
"table_to_api": {}
|
||||
},
|
||||
"types": {}
|
||||
}
|
||||
```
|
||||
|
||||
### Phase 3: Entity Naming Conventions
|
||||
|
||||
Use these ID formats:
|
||||
- **Pages**: `page_<name>` (e.g., `page_home`, `page_tasks`, `page_task_detail`)
|
||||
- **Components**: `comp_<snake_case>` (e.g., `comp_task_list`, `comp_filter_bar`)
|
||||
- **APIs**: `api_<action>_<resource>` (e.g., `api_list_tasks`, `api_create_task`)
|
||||
- **Tables**: `table_<name>` (e.g., `table_tasks`, `table_users`)
|
||||
|
||||
### Phase 4: Write Manifest
|
||||
|
||||
1. Write the generated manifest to `project_manifest.json`
|
||||
2. Validate JSON syntax
|
||||
3. Display summary:
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 📊 MANIFEST GENERATED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Project: <name> ║
|
||||
║ Generated: <timestamp> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ ENTITIES DISCOVERED ║
|
||||
║ 📄 Pages: X ║
|
||||
║ 🧩 Components: X ║
|
||||
║ 🔌 APIs: X ║
|
||||
║ 🗄️ Tables: X ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Status: All entities marked as IMPLEMENTED ║
|
||||
║ Phase: IMPLEMENTATION_PHASE ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
If manifest already exists, ask user:
|
||||
1. **Overwrite** - Replace existing manifest
|
||||
2. **Merge** - Add new entities, keep existing
|
||||
3. **Cancel** - Abort operation
|
||||
|
||||
## Notes
|
||||
|
||||
- All discovered entities are marked as `IMPLEMENTED` since they already exist
|
||||
- Project starts in `IMPLEMENTATION_PHASE` since code exists
|
||||
- Use this command to bring existing projects under guardrail management
|
||||
- After generation, use `/guardrail:validate` to verify manifest accuracy
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
---
|
||||
description: Approve design and transition to IMPLEMENTATION_PHASE (Reviewer mode)
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Approve Design (Reviewer Mode)
|
||||
|
||||
✅ **REVIEWER MODE ACTIVATED**
|
||||
|
||||
Approve the current design and enable implementation.
|
||||
|
||||
## CRITICAL RULES
|
||||
|
||||
You are acting as the **REVIEWER AGENT**.
|
||||
|
||||
✅ **ALLOWED**:
|
||||
- Read any file
|
||||
- Update approval status in manifest
|
||||
- Transition phases
|
||||
|
||||
❌ **BLOCKED**:
|
||||
- Write ANY code files
|
||||
- You cannot implement anything
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Verify Phase**: Must be in `DESIGN_REVIEW`
|
||||
|
||||
2. **Run Full Validation**:
|
||||
```bash
|
||||
python3 "$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_manifest.py" --strict
|
||||
```
|
||||
|
||||
3. **If Valid**, update manifest:
|
||||
- Set `state.approval_status.manifest_approved = true`
|
||||
- Set `state.approval_status.approved_by = "reviewer"`
|
||||
- Set `state.approval_status.approved_at = <current timestamp>`
|
||||
|
||||
4. **Transition to Implementation**:
|
||||
```bash
|
||||
python3 "$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/transition_phase.py" --to IMPLEMENTATION_PHASE
|
||||
```
|
||||
|
||||
5. **Show Results**:
|
||||
- List all entities now with status `APPROVED`
|
||||
- Explain that code can now be written for these entities
|
||||
- Suggest `/guardrail:implement` to start
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
---
|
||||
description: Design a new feature by adding entities to manifest (Architect mode)
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Design Feature (Architect Mode)
|
||||
|
||||
🏗️ **ARCHITECT MODE ACTIVATED**
|
||||
|
||||
Design the feature: "$ARGUMENTS"
|
||||
|
||||
## CRITICAL RULES
|
||||
|
||||
You are now acting as the **ARCHITECT AGENT**.
|
||||
|
||||
✅ **ALLOWED**:
|
||||
- Read any file
|
||||
- Write to `project_manifest.json` ONLY
|
||||
- Run validation scripts
|
||||
|
||||
❌ **BLOCKED**:
|
||||
- Write ANY code files (.ts, .tsx, .css, .sql, .js, .jsx)
|
||||
- You CANNOT write implementation code yet
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Verify Phase**: Check `project_manifest.json` - must be in `DESIGN_PHASE`
|
||||
|
||||
2. **Analyze Requirements**: Break down "$ARGUMENTS" into:
|
||||
- Pages needed (routes/screens)
|
||||
- Components needed (UI elements)
|
||||
- API endpoints needed (backend routes)
|
||||
- Database tables needed (data storage)
|
||||
|
||||
3. **Define Each Entity** in manifest with:
|
||||
- Unique ID following naming convention
|
||||
- Complete specification (props, schemas, columns)
|
||||
- `status: "DEFINED"`
|
||||
- File path where it will be implemented
|
||||
|
||||
4. **Update Manifest**: Add all entities to `project_manifest.json`
|
||||
|
||||
5. **Validate**: Run `python3 skills/guardrail-orchestrator/scripts/validate_manifest.py`
|
||||
|
||||
6. **Summarize**: List what was added and suggest `/guardrail:review`
|
||||
|
||||
## Entity Templates
|
||||
|
||||
### Page
|
||||
```json
|
||||
{
|
||||
"id": "page_[name]",
|
||||
"path": "/[route]",
|
||||
"file_path": "src/pages/[name]/index.tsx",
|
||||
"status": "DEFINED",
|
||||
"components": [],
|
||||
"data_dependencies": []
|
||||
}
|
||||
```
|
||||
|
||||
### Component
|
||||
```json
|
||||
{
|
||||
"id": "comp_[name]",
|
||||
"name": "[PascalCase]",
|
||||
"file_path": "src/components/[Name]/index.tsx",
|
||||
"status": "DEFINED",
|
||||
"props": {}
|
||||
}
|
||||
```
|
||||
|
||||
### API Endpoint
|
||||
```json
|
||||
{
|
||||
"id": "api_[action]_[resource]",
|
||||
"path": "/api/v1/[resource]",
|
||||
"method": "GET|POST|PUT|DELETE",
|
||||
"file_path": "src/api/[resource]/[action].ts",
|
||||
"status": "DEFINED"
|
||||
}
|
||||
```
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
---
|
||||
description: Implement an approved entity from the manifest
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Implement Entity
|
||||
|
||||
Implement the entity: "$ARGUMENTS"
|
||||
|
||||
## CRITICAL RULES
|
||||
|
||||
⚠️ **GUARDRAIL ENFORCEMENT ACTIVE**
|
||||
|
||||
You can ONLY write to files that:
|
||||
1. Are defined in `project_manifest.json`
|
||||
2. Have status = `APPROVED`
|
||||
3. Match the `file_path` in the manifest EXACTLY
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Verify Phase**: Must be in `IMPLEMENTATION_PHASE`
|
||||
|
||||
2. **Find Entity** in manifest:
|
||||
- If "$ARGUMENTS" is `--all`: implement all APPROVED entities
|
||||
- Otherwise: find the specific entity by ID
|
||||
|
||||
3. **For Each Entity**:
|
||||
|
||||
a. **Load Definition** from manifest
|
||||
|
||||
b. **Verify Status** is `APPROVED`
|
||||
|
||||
c. **Generate Code** matching the specification:
|
||||
- Props must match manifest exactly
|
||||
- Types must match manifest exactly
|
||||
- File path must match `file_path` in manifest
|
||||
|
||||
d. **Write File** to the exact path in manifest
|
||||
|
||||
e. **Run Validations**:
|
||||
```bash
|
||||
npm run lint --if-present
|
||||
npm run type-check --if-present
|
||||
```
|
||||
|
||||
4. **Status Updates** (handled by post-hook):
|
||||
- Entity status changes to `IMPLEMENTED`
|
||||
- Timestamp recorded
|
||||
|
||||
## Code Templates
|
||||
|
||||
### Component (Frontend)
|
||||
```tsx
|
||||
import React from 'react';
|
||||
|
||||
interface [Name]Props {
|
||||
// From manifest.props
|
||||
}
|
||||
|
||||
export const [Name]: React.FC<[Name]Props> = (props) => {
|
||||
return (
|
||||
// Implementation
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
### API Endpoint (Backend)
|
||||
```typescript
|
||||
import { Request, Response } from 'express';
|
||||
|
||||
export async function handler(req: Request, res: Response) {
|
||||
// From manifest.request/response schemas
|
||||
}
|
||||
```
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
description: Initialize a new guardrailed project with manifest
|
||||
allowed-tools: Bash, Write, Read
|
||||
---
|
||||
|
||||
# Initialize Guardrailed Project
|
||||
|
||||
Initialize a new project called "$ARGUMENTS" with guardrail enforcement and workflow system.
|
||||
|
||||
## Generated Files
|
||||
|
||||
This command creates:
|
||||
1. `project_manifest.json` - Entity definitions and dependencies
|
||||
2. `.workflow/index.yml` - Version tracking index
|
||||
3. `.workflow/versions/` - Directory for version snapshots
|
||||
|
||||
## Steps
|
||||
|
||||
### Step 1: Run the initialization script
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/init_project.py --name "$ARGUMENTS" --path .
|
||||
```
|
||||
|
||||
### Step 2: Initialize Workflow Directory Structure [MANDATORY]
|
||||
```bash
|
||||
# Create workflow directory structure
|
||||
mkdir -p .workflow/versions
|
||||
|
||||
# Create index.yml if it doesn't exist
|
||||
if [ ! -f .workflow/index.yml ]; then
|
||||
cat > .workflow/index.yml << 'EOF'
|
||||
versions: []
|
||||
latest_version: null
|
||||
total_versions: 0
|
||||
EOF
|
||||
fi
|
||||
```
|
||||
|
||||
### Step 3: Verify and Display Summary
|
||||
```bash
|
||||
# Verify files exist
|
||||
ls project_manifest.json .workflow/index.yml
|
||||
```
|
||||
|
||||
Display:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ PROJECT INITIALIZED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Project: $ARGUMENTS ║
|
||||
║ Phase: DESIGN_PHASE ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Files Created: ║
|
||||
║ ✓ project_manifest.json ║
|
||||
║ ✓ .workflow/index.yml ║
|
||||
║ ✓ .workflow/versions/ ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Next Steps: ║
|
||||
║ /guardrail:design Design features in manifest ║
|
||||
║ /workflow:spawn <feat> Start automated workflow ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
## Notes
|
||||
- Project starts in **DESIGN_PHASE** (manifest edits only)
|
||||
- Use `/guardrail:design` for manual design workflow
|
||||
- Use `/workflow:spawn` for automated design + implementation
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
description: Request design review and transition to DESIGN_REVIEW phase
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Request Design Review
|
||||
|
||||
Transition the project from DESIGN_PHASE to DESIGN_REVIEW.
|
||||
|
||||
## Steps
|
||||
|
||||
1. **Validate Manifest**:
|
||||
```bash
|
||||
python3 "$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_manifest.py" --strict
|
||||
```
|
||||
|
||||
2. **If Valid**, transition phase:
|
||||
```bash
|
||||
python3 "$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/transition_phase.py" --to DESIGN_REVIEW
|
||||
```
|
||||
|
||||
3. **Show Review Checklist**:
|
||||
- [ ] All pages have at least one component
|
||||
- [ ] All components have defined props with types
|
||||
- [ ] All APIs have request/response schemas
|
||||
- [ ] All database tables have primary keys
|
||||
- [ ] No orphan components
|
||||
- [ ] No circular dependencies
|
||||
|
||||
4. **Explain Next Steps**:
|
||||
- Use `/guardrail:approve` to approve and move to implementation
|
||||
- Use `/guardrail:reject <feedback>` to send back for fixes
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
description: Show current project phase, entity counts, and pending work
|
||||
allowed-tools: Read, Bash
|
||||
---
|
||||
|
||||
# Guardrail Status
|
||||
|
||||
Display the current guardrail project status.
|
||||
|
||||
## Steps
|
||||
|
||||
1. Read `project_manifest.json`
|
||||
|
||||
2. Display:
|
||||
- **Current Phase**: `state.current_phase`
|
||||
- **Approval Status**: `state.approval_status.manifest_approved`
|
||||
- **Entity Counts**:
|
||||
- Pages: count by status (DEFINED/APPROVED/IMPLEMENTED)
|
||||
- Components: count by status
|
||||
- API Endpoints: count by status
|
||||
- Database Tables: count by status
|
||||
- **Recent History**: last 5 items from `state.revision_history`
|
||||
|
||||
3. Show available actions for current phase:
|
||||
- DESIGN_PHASE: Can use `/guardrail:design`, then `/guardrail:review`
|
||||
- DESIGN_REVIEW: Can use `/guardrail:approve` or `/guardrail:reject`
|
||||
- IMPLEMENTATION_PHASE: Can use `/guardrail:implement`
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
description: Validate manifest integrity and completeness
|
||||
allowed-tools: Bash, Read
|
||||
---
|
||||
|
||||
# Validate Manifest
|
||||
|
||||
Run validation checks on `project_manifest.json`.
|
||||
|
||||
## Command
|
||||
|
||||
```bash
|
||||
python3 "$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_manifest.py" $ARGUMENTS
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
- No arguments: Basic validation
|
||||
- `--strict`: Treat warnings as errors
|
||||
|
||||
## What It Checks
|
||||
|
||||
1. **Structure**: Required top-level keys exist
|
||||
2. **Pages**: Have paths, components, file_paths
|
||||
3. **Components**: Have props with types, valid dependencies
|
||||
4. **APIs**: Have methods, paths, request/response schemas
|
||||
5. **Database**: Tables have primary keys, valid foreign keys
|
||||
6. **Dependencies**: No orphans, no circular references
|
||||
7. **Naming**: Follows conventions
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
---
|
||||
description: Verify implementation matches manifest specifications
|
||||
allowed-tools: Bash, Read
|
||||
---
|
||||
|
||||
# Verify Implementation
|
||||
|
||||
Run verification to ensure all implemented code matches the manifest specifications.
|
||||
|
||||
## Command
|
||||
|
||||
```bash
|
||||
python3 "$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/verify_implementation.py" --project-root "$CLAUDE_PROJECT_DIR" $ARGUMENTS
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
- No arguments: Basic verification
|
||||
- `--verbose` or `-v`: Include warnings
|
||||
- `--json`: Output as JSON for programmatic use
|
||||
|
||||
## What It Checks
|
||||
|
||||
For each entity in the manifest:
|
||||
|
||||
### Components
|
||||
- File exists at specified `file_path`
|
||||
- Component name is exported
|
||||
- Props interface matches manifest definition
|
||||
|
||||
### Pages
|
||||
- File exists at specified `file_path`
|
||||
- Has `export default` (Next.js requirement)
|
||||
- Uses specified component dependencies
|
||||
|
||||
### API Endpoints
|
||||
- File exists at specified `file_path`
|
||||
- HTTP method handler exists (GET, POST, PUT, DELETE)
|
||||
- Request parameters are handled
|
||||
|
||||
### Database Tables
|
||||
- File exists at specified `file_path`
|
||||
- Column definitions present
|
||||
- CRUD operations implemented
|
||||
|
||||
## Example Output
|
||||
|
||||
```
|
||||
✅ [component] comp_button
|
||||
File: app/components/Button.tsx
|
||||
|
||||
❌ [component] comp_missing
|
||||
File: app/components/Missing.tsx
|
||||
❌ ERROR: File not found
|
||||
|
||||
SUMMARY: 17/18 passed, 1 failed, 3 warnings
|
||||
```
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
---
|
||||
description: Approve a workflow gate (design or implementation)
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Approve Workflow Gate
|
||||
|
||||
Approve gate: "$ARGUMENTS"
|
||||
|
||||
## Valid Gates
|
||||
- `design` - Approve the design phase (entities + tasks)
|
||||
- `implementation` - Approve the implementation phase (all code)
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Validate Gate
|
||||
- If "$ARGUMENTS" is not `design` or `implementation`: STOP and show usage
|
||||
|
||||
### 2. Check Workflow State
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py exists
|
||||
```
|
||||
|
||||
If no active workflow:
|
||||
```
|
||||
❌ No active workflow found.
|
||||
Start a new workflow with: /workflow:spawn "feature name"
|
||||
```
|
||||
|
||||
### 3. Verify Current Phase
|
||||
|
||||
**For design approval**:
|
||||
- Current phase must be `AWAITING_DESIGN_APPROVAL`
|
||||
- If not: Report error with current phase
|
||||
|
||||
**For implementation approval**:
|
||||
- Current phase must be `AWAITING_IMPL_APPROVAL`
|
||||
- If not: Report error with current phase
|
||||
|
||||
### 4. Execute Approval
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py approve $ARGUMENTS
|
||||
```
|
||||
|
||||
### 5. Transition to Next Phase
|
||||
|
||||
**If design approved**:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition DESIGN_APPROVED
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition IMPLEMENTING
|
||||
```
|
||||
|
||||
**If implementation approved**:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition IMPL_APPROVED
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition COMPLETING
|
||||
```
|
||||
|
||||
### 6. Report
|
||||
|
||||
**Design Approved**:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ DESIGN APPROVED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ The design has been approved. Implementation will begin. ║
|
||||
║ ║
|
||||
║ Next steps: ║
|
||||
║ /workflow:frontend --next Start frontend tasks ║
|
||||
║ /workflow:backend --next Start backend tasks ║
|
||||
║ /workflow:resume Auto-continue workflow ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
**Implementation Approved**:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ✅ IMPLEMENTATION APPROVED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ All implementations have been approved. ║
|
||||
║ ║
|
||||
║ Next steps: ║
|
||||
║ /workflow:complete --all Mark all tasks as done ║
|
||||
║ /workflow:resume Auto-complete workflow ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
---
|
||||
description: Implement backend tasks (Backend agent)
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
---
|
||||
|
||||
# Backend Agent - Implementation Mode
|
||||
|
||||
⚙️ **BACKEND AGENT ACTIVATED**
|
||||
|
||||
Implement task: "$ARGUMENTS"
|
||||
|
||||
## CRITICAL RULES
|
||||
|
||||
You are now the **BACKEND AGENT**.
|
||||
|
||||
✅ **ALLOWED**:
|
||||
- Read any file
|
||||
- Write new files (API routes, DB)
|
||||
- Edit existing backend files
|
||||
- Run Bash (build, lint, type-check, tests)
|
||||
|
||||
✅ **ALLOWED FILES**:
|
||||
- `app/api/**/*`
|
||||
- `app/lib/**/*`
|
||||
- `prisma/**/*`
|
||||
- `db/**/*`
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1: Load Task
|
||||
First, get the version-specific tasks directory:
|
||||
```bash
|
||||
TASKS_DIR=$(python3 skills/guardrail-orchestrator/scripts/version_manager.py tasks-dir)
|
||||
```
|
||||
|
||||
Read the task file: `$TASKS_DIR/$ARGUMENTS.yml`
|
||||
- If "$ARGUMENTS" is `--next`: find first task with `agent: backend` and `status: pending`
|
||||
|
||||
### Step 2: Update Workflow State
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> in_progress
|
||||
```
|
||||
|
||||
### Step 3: Verify Prerequisites
|
||||
- Check entity is `APPROVED` in `project_manifest.json`
|
||||
- Check all `dependencies` tasks are `completed`
|
||||
- If blocked:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> blocked
|
||||
```
|
||||
Stop and report blocker.
|
||||
|
||||
### Step 4: Implement
|
||||
For each file in `file_paths`:
|
||||
1. Read manifest entity specification
|
||||
2. Generate code matching spec exactly:
|
||||
- HTTP methods must match manifest
|
||||
- Request params must match manifest
|
||||
- Response types must match manifest
|
||||
3. Follow existing project patterns
|
||||
|
||||
### Step 5: Validate
|
||||
Run validations:
|
||||
```bash
|
||||
npm run lint
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Step 6: Update Task Status
|
||||
Update the task file:
|
||||
```yaml
|
||||
status: review
|
||||
completed_at: <current timestamp>
|
||||
```
|
||||
|
||||
Update workflow state:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> review
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py progress --tasks-impl <count>
|
||||
```
|
||||
|
||||
### Step 7: Report
|
||||
- List implemented files
|
||||
- Show validation results
|
||||
- Suggest: `/workflow:review $ARGUMENTS`
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
---
|
||||
description: Mark approved task as completed
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Complete Task
|
||||
|
||||
Mark task "$ARGUMENTS" as completed.
|
||||
|
||||
## Prerequisites
|
||||
- Task must have `status: approved`
|
||||
- All acceptance criteria verified by reviewer
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Read Task
|
||||
First, get the version-specific tasks directory:
|
||||
```bash
|
||||
TASKS_DIR=$(python3 skills/guardrail-orchestrator/scripts/version_manager.py tasks-dir)
|
||||
```
|
||||
|
||||
Read `$TASKS_DIR/$ARGUMENTS.yml`
|
||||
|
||||
### 2. Verify Status
|
||||
- If `status` is NOT `approved`: STOP and report error
|
||||
- If `status` is `approved`: proceed
|
||||
|
||||
### 3. Update Task
|
||||
Update the task file with:
|
||||
```yaml
|
||||
status: completed
|
||||
completed_at: <current timestamp>
|
||||
```
|
||||
|
||||
### 4. Update Workflow State
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> completed
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py progress --tasks-completed <count>
|
||||
```
|
||||
|
||||
### 5. Update Manifest (if applicable)
|
||||
For each entity in `entity_ids`:
|
||||
- Update entity status to `IMPLEMENTED` in `project_manifest.json`
|
||||
|
||||
### 6. Check Workflow Completion
|
||||
Check if all tasks are now completed:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py status
|
||||
```
|
||||
|
||||
If all tasks completed, transition to implementation approval:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition AWAITING_IMPL_APPROVAL
|
||||
```
|
||||
|
||||
### 7. Report
|
||||
```
|
||||
✅ Task completed: $ARGUMENTS
|
||||
|
||||
Entities implemented:
|
||||
- <entity_id_1>
|
||||
- <entity_id_2>
|
||||
|
||||
Next: /workflow:status to see remaining tasks
|
||||
/workflow:complete --all to complete all approved tasks
|
||||
```
|
||||
|
|
@ -0,0 +1,476 @@
|
|||
---
|
||||
description: Design system architecture with ER diagram, API contracts, and UI structure
|
||||
allowed-tools: Read, Write, Edit, Bash, Task, TodoWrite
|
||||
---
|
||||
|
||||
# Workflow Design - System Architecture Phase
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## PURPOSE
|
||||
|
||||
This command creates a comprehensive **design document** that serves as the source of truth for implementation. It defines:
|
||||
|
||||
1. **Data Layer** - ER diagram with models, fields, relations
|
||||
2. **API Layer** - REST endpoints with request/response contracts
|
||||
3. **UI Layer** - Pages and components with data requirements
|
||||
4. **Dependency Graph** - Layered execution order for parallel tasks
|
||||
|
||||
---
|
||||
|
||||
## ⛔ CRITICAL RULES
|
||||
|
||||
### MUST DO
|
||||
1. **MUST** create `design_document.yml` with ALL layers defined
|
||||
2. **MUST** run `validate_design.py` to generate dependency graph
|
||||
3. **MUST** verify no circular dependencies before proceeding
|
||||
4. **MUST** show layered execution plan to user
|
||||
|
||||
### CANNOT DO
|
||||
1. **CANNOT** create tasks without design document
|
||||
2. **CANNOT** skip validation step
|
||||
3. **CANNOT** proceed if validation fails
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### STEP 1: Initialize Design Session
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 1.1: Get Current Version
|
||||
```bash
|
||||
# Get active version from workflow
|
||||
VERSION_ID=$(cat .workflow/current.yml 2>/dev/null | grep "active_version:" | awk '{print $2}')
|
||||
if [ -z "$VERSION_ID" ]; then
|
||||
echo "ERROR: No active workflow. Run /workflow:spawn first"
|
||||
exit 1
|
||||
fi
|
||||
echo "VERSION_ID=$VERSION_ID"
|
||||
```
|
||||
|
||||
#### 1.2: Create Design Directory
|
||||
```bash
|
||||
mkdir -p .workflow/versions/$VERSION_ID/design
|
||||
mkdir -p .workflow/versions/$VERSION_ID/contexts
|
||||
mkdir -p .workflow/versions/$VERSION_ID/tasks
|
||||
```
|
||||
|
||||
#### 1.3: Display Design Start Banner
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 📐 SYSTEM DESIGN PHASE ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Feature: $ARGUMENTS ║
|
||||
║ Version: $VERSION_ID ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ You will define: ║
|
||||
║ Layer 1: Data Models (ER Diagram) ║
|
||||
║ Layer 2: API Endpoints (REST Contracts) ║
|
||||
║ Layer 3: Pages & Components (UI Structure) ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### STEP 2: Analyze Requirements & Design System
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
**Use Task tool with system-architect agent:**
|
||||
|
||||
```
|
||||
Use Task tool with:
|
||||
subagent_type: "system-architect"
|
||||
prompt: |
|
||||
# SYSTEM ARCHITECT - Design Document Creation
|
||||
|
||||
## INPUT
|
||||
Feature: "$ARGUMENTS"
|
||||
Version: $VERSION_ID
|
||||
Output: .workflow/versions/$VERSION_ID/design/design_document.yml
|
||||
|
||||
## YOUR MISSION
|
||||
Create a comprehensive design document following the schema in:
|
||||
skills/guardrail-orchestrator/schemas/design_document.yml
|
||||
|
||||
## ANALYSIS PROCESS
|
||||
|
||||
### Phase A: Understand Requirements
|
||||
1. Read the feature description carefully
|
||||
2. Identify the core user flows
|
||||
3. Determine what data needs to be stored
|
||||
4. Identify what APIs are needed
|
||||
5. Plan the UI structure
|
||||
|
||||
### Phase B: Design Data Layer (ER Diagram)
|
||||
For each entity needed:
|
||||
- Define fields with types and constraints
|
||||
- Define relations to other entities
|
||||
- Define validations
|
||||
- Consider indexes for performance
|
||||
|
||||
### Phase C: Design API Layer
|
||||
For each endpoint needed:
|
||||
- Define HTTP method and path
|
||||
- Define request body schema (for POST/PUT/PATCH)
|
||||
- Define response schemas for all status codes
|
||||
- Define authentication requirements
|
||||
- Link to data models used
|
||||
|
||||
### Phase D: Design UI Layer
|
||||
For each page needed:
|
||||
- Define route path
|
||||
- List data requirements (which APIs)
|
||||
- List components used
|
||||
- Define auth requirements
|
||||
|
||||
For each component needed:
|
||||
- Define props interface
|
||||
- Define events emitted
|
||||
- List child components
|
||||
- List APIs called directly (if any)
|
||||
|
||||
## OUTPUT FORMAT
|
||||
|
||||
Create `.workflow/versions/$VERSION_ID/design/design_document.yml`:
|
||||
|
||||
```yaml
|
||||
# Design Document
|
||||
workflow_version: "$VERSION_ID"
|
||||
feature: "$ARGUMENTS"
|
||||
created_at: <timestamp>
|
||||
status: draft
|
||||
revision: 1
|
||||
|
||||
# LAYER 1: DATA MODELS
|
||||
data_models:
|
||||
- id: model_<name>
|
||||
name: <PascalCase>
|
||||
description: "<what this model represents>"
|
||||
table_name: <snake_case>
|
||||
fields:
|
||||
- name: id
|
||||
type: uuid
|
||||
constraints: [primary_key]
|
||||
- name: <field_name>
|
||||
type: <string|integer|boolean|datetime|uuid|json|text|float|enum>
|
||||
constraints: [<unique|not_null|indexed|default>]
|
||||
# If enum:
|
||||
enum_values: [<value1>, <value2>]
|
||||
relations:
|
||||
- type: <has_one|has_many|belongs_to|many_to_many>
|
||||
target: model_<other>
|
||||
foreign_key: <fk_field>
|
||||
on_delete: <cascade|set_null|restrict>
|
||||
timestamps: true
|
||||
validations:
|
||||
- field: <field_name>
|
||||
rule: "<validation_rule>"
|
||||
message: "<error message>"
|
||||
|
||||
# LAYER 2: API ENDPOINTS
|
||||
api_endpoints:
|
||||
- id: api_<verb>_<resource>
|
||||
method: <GET|POST|PUT|PATCH|DELETE>
|
||||
path: /api/<path>
|
||||
summary: "<short description>"
|
||||
description: "<detailed description>"
|
||||
# For POST/PUT/PATCH:
|
||||
request_body:
|
||||
content_type: application/json
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
- name: <field>
|
||||
type: <type>
|
||||
required: <true|false>
|
||||
validations: [<rules>]
|
||||
responses:
|
||||
- status: 200
|
||||
description: "Success"
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
- name: <field>
|
||||
type: <type>
|
||||
- status: 400
|
||||
description: "Validation error"
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
- name: error
|
||||
type: string
|
||||
depends_on_models: [model_<name>]
|
||||
auth:
|
||||
required: <true|false>
|
||||
roles: [<role1>, <role2>]
|
||||
|
||||
# LAYER 3: PAGES
|
||||
pages:
|
||||
- id: page_<name>
|
||||
name: "<Human Name>"
|
||||
path: /<route>
|
||||
layout: <layout_component>
|
||||
data_needs:
|
||||
- api_id: api_<name>
|
||||
purpose: "<why needed>"
|
||||
on_load: <true|false>
|
||||
components: [component_<name1>, component_<name2>]
|
||||
auth:
|
||||
required: <true|false>
|
||||
roles: []
|
||||
redirect: /login
|
||||
|
||||
# LAYER 3: COMPONENTS
|
||||
components:
|
||||
- id: component_<name>
|
||||
name: <PascalCaseName>
|
||||
props:
|
||||
- name: <propName>
|
||||
type: <TypeScript type>
|
||||
required: <true|false>
|
||||
description: "<what this prop does>"
|
||||
events:
|
||||
- name: <onEventName>
|
||||
payload: "<payload type>"
|
||||
description: "<when this fires>"
|
||||
uses_apis: []
|
||||
uses_components: [component_<child>]
|
||||
variants: [<variant1>, <variant2>]
|
||||
```
|
||||
|
||||
## DESIGN PRINCIPLES
|
||||
|
||||
1. **Start with Data**: What data is needed? Design models first.
|
||||
2. **APIs Serve UI**: What operations does UI need? Design APIs next.
|
||||
3. **UI Consumes APIs**: Pages/Components use APIs. Design UI last.
|
||||
4. **Explicit Dependencies**: Every relation must be clearly defined.
|
||||
5. **Contracts First**: API request/response schemas are contracts.
|
||||
|
||||
## VERIFICATION
|
||||
|
||||
After creating the design document, verify:
|
||||
1. Every API references existing models
|
||||
2. Every page references existing APIs and components
|
||||
3. Every component references existing child components
|
||||
4. No circular dependencies
|
||||
|
||||
## OUTPUT
|
||||
|
||||
After creating the file, output:
|
||||
```
|
||||
=== DESIGN DOCUMENT CREATED ===
|
||||
|
||||
Data Models: X
|
||||
API Endpoints: X
|
||||
Pages: X
|
||||
Components: X
|
||||
|
||||
File: .workflow/versions/$VERSION_ID/design/design_document.yml
|
||||
```
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### STEP 3: Validate Design & Generate Dependency Graph
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
#### 3.1: Run Design Validation [MANDATORY]
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/validate_design.py \
|
||||
.workflow/versions/$VERSION_ID/design/design_document.yml \
|
||||
--output-dir .workflow/versions/$VERSION_ID
|
||||
```
|
||||
|
||||
**This generates:**
|
||||
- `.workflow/versions/$VERSION_ID/dependency_graph.yml` - Layered execution order
|
||||
- `.workflow/versions/$VERSION_ID/contexts/*.yml` - Per-entity context snapshots
|
||||
- `.workflow/versions/$VERSION_ID/tasks/*.yml` - Tasks with full context
|
||||
|
||||
#### 3.2: Check Validation Result
|
||||
```bash
|
||||
VALIDATION_EXIT=$?
|
||||
if [ $VALIDATION_EXIT -ne 0 ]; then
|
||||
echo "❌ Design validation failed. Fix errors and re-run."
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
**BLOCK IF**: Validation fails → Display errors, do not proceed
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### STEP 4: Display Layered Execution Plan
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
Read the generated dependency graph and display:
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 📊 DEPENDENCY GRAPH - EXECUTION LAYERS ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ ║
|
||||
║ Layer 1: DATA MODELS (Parallel) ║
|
||||
║ ───────────────────────────────────────────── ║
|
||||
║ 📦 model_user → backend ║
|
||||
║ 📦 model_post → backend ║
|
||||
║ ║
|
||||
║ Layer 2: API ENDPOINTS (Parallel, after Layer 1) ║
|
||||
║ ───────────────────────────────────────────── ║
|
||||
║ 🔌 api_create_user → backend (needs: model_user) ║
|
||||
║ 🔌 api_list_users → backend (needs: model_user) ║
|
||||
║ 🔌 api_create_post → backend (needs: model_user, model_post)║
|
||||
║ ║
|
||||
║ Layer 3: UI (Parallel, after Layer 2) ║
|
||||
║ ───────────────────────────────────────────── ║
|
||||
║ 🧩 component_user_card → frontend ║
|
||||
║ 📄 page_users → frontend (needs: api_list_users) ║
|
||||
║ ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ EXECUTION SUMMARY ║
|
||||
║ Total entities: X ║
|
||||
║ Total layers: X ║
|
||||
║ Max parallelism: X (tasks can run simultaneously) ║
|
||||
║ Critical path: X layers deep ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### STEP 5: Display Design Summary for Approval
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 🛑 DESIGN APPROVAL REQUIRED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Feature: $ARGUMENTS ║
|
||||
║ Version: $VERSION_ID ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ DESIGN DOCUMENT ║
|
||||
║ 📦 Data Models: X ║
|
||||
║ 🔌 API Endpoints: X ║
|
||||
║ 📄 Pages: X ║
|
||||
║ 🧩 Components: X ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ GENERATED ARTIFACTS ║
|
||||
║ ✅ Dependency graph calculated ║
|
||||
║ ✅ Context snapshots created (X files) ║
|
||||
║ ✅ Implementation tasks created (X tasks) ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ EXECUTION PLAN ║
|
||||
║ Layer 1: X tasks (parallel) → backend ║
|
||||
║ Layer 2: X tasks (parallel) → backend ║
|
||||
║ Layer 3: X tasks (parallel) → frontend ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ FILES CREATED ║
|
||||
║ .workflow/versions/$VERSION_ID/design/design_document.yml ║
|
||||
║ .workflow/versions/$VERSION_ID/dependency_graph.yml ║
|
||||
║ .workflow/versions/$VERSION_ID/contexts/*.yml ║
|
||||
║ .workflow/versions/$VERSION_ID/tasks/*.yml ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ NEXT STEPS ║
|
||||
║ Review the design above, then: ║
|
||||
║ /workflow:approve - Proceed to implementation ║
|
||||
║ /workflow:reject - Request design changes ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
### STEP 6: Transition Workflow State
|
||||
### ═══════════════════════════════════════════════════════════════
|
||||
|
||||
```bash
|
||||
# Update progress
|
||||
TASK_COUNT=$(ls .workflow/versions/$VERSION_ID/tasks/*.yml 2>/dev/null | wc -l)
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py progress \
|
||||
--tasks-created $TASK_COUNT
|
||||
|
||||
# Transition to awaiting approval
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition AWAITING_DESIGN_APPROVAL
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## CONTEXT SNAPSHOT EXAMPLE
|
||||
|
||||
Each task gets a context file like `.workflow/versions/$VERSION_ID/contexts/api_create_user.yml`:
|
||||
|
||||
```yaml
|
||||
task_id: task_create_api_create_user
|
||||
entity_id: api_create_user
|
||||
workflow_version: v001
|
||||
|
||||
target:
|
||||
type: api
|
||||
definition:
|
||||
method: POST
|
||||
path: /api/users
|
||||
request_body:
|
||||
properties:
|
||||
- name: email
|
||||
type: string
|
||||
required: true
|
||||
validations: [email]
|
||||
- name: password
|
||||
type: string
|
||||
required: true
|
||||
validations: [min:8]
|
||||
responses:
|
||||
- status: 201
|
||||
schema: { id, email, name, created_at }
|
||||
- status: 400
|
||||
schema: { error, details }
|
||||
- status: 409
|
||||
schema: { error }
|
||||
|
||||
related:
|
||||
models:
|
||||
- id: model_user
|
||||
definition:
|
||||
name: User
|
||||
fields:
|
||||
- { name: id, type: uuid }
|
||||
- { name: email, type: string }
|
||||
- { name: password_hash, type: string }
|
||||
|
||||
dependencies:
|
||||
entity_ids: [model_user]
|
||||
|
||||
files:
|
||||
to_create:
|
||||
- app/api/users/route.ts
|
||||
reference:
|
||||
- path: app/api/health/route.ts
|
||||
purpose: "API route pattern"
|
||||
|
||||
acceptance:
|
||||
- criterion: "POST /api/users returns 201 on success"
|
||||
verification: "curl -X POST /api/users with valid data"
|
||||
- criterion: "Returns 409 if email exists"
|
||||
verification: "Test with duplicate email"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## USAGE
|
||||
|
||||
```bash
|
||||
# After /workflow:spawn, run design:
|
||||
/workflow:design
|
||||
|
||||
# This will:
|
||||
# 1. Create comprehensive design document
|
||||
# 2. Validate and generate dependency graph
|
||||
# 3. Create tasks with full context
|
||||
# 4. Wait for approval before implementation
|
||||
```
|
||||
|
|
@ -0,0 +1,193 @@
|
|||
---
|
||||
description: Compare workflow versions and show manifest changes
|
||||
allowed-tools: Read, Bash
|
||||
---
|
||||
|
||||
# Workflow Version Diff
|
||||
|
||||
Compare workflow versions to see what changed in the project manifest.
|
||||
|
||||
## EXECUTION PROTOCOL
|
||||
|
||||
### Step 1: Parse Arguments
|
||||
|
||||
```
|
||||
IF "$ARGUMENTS" = "":
|
||||
MODE = "current" (diff latest version with current)
|
||||
ELSE IF "$ARGUMENTS" matches "v\d+ v\d+":
|
||||
MODE = "versions" (diff two specific versions)
|
||||
ELSE IF "$ARGUMENTS" matches "v\d+":
|
||||
MODE = "single" (diff specific version with current)
|
||||
ELSE IF "$ARGUMENTS" = "--changelog" or "--log":
|
||||
MODE = "changelog" (show all version changelogs)
|
||||
ELSE IF "$ARGUMENTS" contains "--json":
|
||||
OUTPUT = "json"
|
||||
```
|
||||
|
||||
### Step 2: Get Available Versions
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/manifest_diff.py versions
|
||||
```
|
||||
|
||||
### Step 3: Execute Diff Based on Mode
|
||||
|
||||
**MODE: current (default)**
|
||||
```bash
|
||||
# Get latest version
|
||||
LATEST=$(ls -1 .workflow/versions/ 2>/dev/null | tail -1)
|
||||
|
||||
# Diff with current manifest
|
||||
python3 skills/guardrail-orchestrator/scripts/manifest_diff.py diff $LATEST current
|
||||
```
|
||||
|
||||
**MODE: versions (e.g., "v001 v002")**
|
||||
```bash
|
||||
# Diff two specific versions
|
||||
python3 skills/guardrail-orchestrator/scripts/manifest_diff.py diff v001 v002
|
||||
```
|
||||
|
||||
**MODE: single (e.g., "v001")**
|
||||
```bash
|
||||
# Diff specific version with current
|
||||
python3 skills/guardrail-orchestrator/scripts/manifest_diff.py diff v001
|
||||
```
|
||||
|
||||
**MODE: changelog**
|
||||
```bash
|
||||
# Show all changelogs
|
||||
python3 skills/guardrail-orchestrator/scripts/manifest_diff.py changelog
|
||||
```
|
||||
|
||||
**JSON output**
|
||||
```bash
|
||||
# Add --json for programmatic use
|
||||
python3 skills/guardrail-orchestrator/scripts/manifest_diff.py diff v001 --json
|
||||
```
|
||||
|
||||
### Step 4: Display Results
|
||||
|
||||
The script outputs:
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════════════╗
|
||||
║ MANIFEST DIFF: v001 → v002 ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ SUMMARY ║
|
||||
║ + Added: 3 ║
|
||||
║ ~ Modified: 2 ║
|
||||
║ - Removed: 1 ║
|
||||
║ = Unchanged: 5 ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ BY TYPE ║
|
||||
║ pages: +1 ║
|
||||
║ components: +2 ~1 ║
|
||||
║ api_endpoints: ~1 -1 ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ ➕ ADDED ║
|
||||
║ + 📄 Profile (app/profile/page.tsx) ║
|
||||
║ + 🧩 Button (app/components/Button.tsx) ║
|
||||
║ + 🧩 Modal (app/components/Modal.tsx) ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ 📝 MODIFIED ║
|
||||
║ ~ 🧩 Header (app/components/Header.tsx) ║
|
||||
║ dependencies: [] → ['Button'] ║
|
||||
║ ~ 🔌 users (app/api/users/route.ts) ║
|
||||
║ status: PENDING → IMPLEMENTED ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ ➖ REMOVED ║
|
||||
║ - 🔌 legacy (app/api/legacy/route.ts) ║
|
||||
╚══════════════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## USAGE EXAMPLES
|
||||
|
||||
```bash
|
||||
# Compare latest version with current manifest
|
||||
/workflow:diff
|
||||
|
||||
# Compare two specific versions
|
||||
/workflow:diff v001 v002
|
||||
|
||||
# Compare specific version with current
|
||||
/workflow:diff v003
|
||||
|
||||
# Show all version changelogs
|
||||
/workflow:diff --changelog
|
||||
|
||||
# Output as JSON
|
||||
/workflow:diff v001 --json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## WHAT IT SHOWS
|
||||
|
||||
### Entity Changes
|
||||
- **Added**: New pages, components, API endpoints, etc.
|
||||
- **Modified**: Status changes, dependency updates, path changes
|
||||
- **Removed**: Deleted entities from manifest
|
||||
|
||||
### Entity Type Icons
|
||||
- 📄 page
|
||||
- 🧩 component
|
||||
- 🔌 api_endpoint
|
||||
- 📚 lib
|
||||
- 🪝 hook
|
||||
- 📝 type
|
||||
- ⚙️ config
|
||||
|
||||
### Change Details
|
||||
- Entity name and file path
|
||||
- Specific field changes with before/after values
|
||||
- Summary statistics by type
|
||||
|
||||
---
|
||||
|
||||
## CHANGELOG MODE
|
||||
|
||||
Show version history with changes:
|
||||
|
||||
```bash
|
||||
/workflow:diff --changelog
|
||||
```
|
||||
|
||||
Output:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════════════╗
|
||||
║ CHANGELOG: v001 ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ Feature: User authentication ║
|
||||
║ Status: completed ║
|
||||
║ Started: 2025-01-15 10:30:00 ║
|
||||
║ Completed: 2025-01-15 14:45:00 ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ CHANGES ║
|
||||
║ + Added page: Login ║
|
||||
║ + Added page: Register ║
|
||||
║ + Added component: AuthForm ║
|
||||
║ + Added api_endpoint: auth ║
|
||||
╚══════════════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## INTEGRATION
|
||||
|
||||
### Uses Version Snapshots
|
||||
|
||||
The diff tool uses snapshots created by version_manager.py:
|
||||
- `snapshot_before/manifest.json` - Manifest at version start
|
||||
- `snapshot_after/manifest.json` - Manifest at version completion
|
||||
|
||||
These are automatically created when:
|
||||
- `/workflow:spawn` initializes a new version
|
||||
- `/workflow:complete` marks a version as done
|
||||
|
||||
### Related Commands
|
||||
|
||||
- `/workflow:history` - List all workflow versions
|
||||
- `/workflow:status` - Show current workflow state
|
||||
- `/workflow:changelog <version>` - Alias for `--changelog`
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
---
|
||||
description: Implement frontend tasks (Frontend agent)
|
||||
allowed-tools: Read, Write, Edit, Bash
|
||||
---
|
||||
|
||||
# Frontend Agent - Implementation Mode
|
||||
|
||||
🎨 **FRONTEND AGENT ACTIVATED**
|
||||
|
||||
Implement task: "$ARGUMENTS"
|
||||
|
||||
## CRITICAL RULES
|
||||
|
||||
You are now the **FRONTEND AGENT**.
|
||||
|
||||
✅ **ALLOWED**:
|
||||
- Read any file
|
||||
- Write new files (components, pages)
|
||||
- Edit existing UI files
|
||||
- Run Bash (build, lint, type-check)
|
||||
|
||||
✅ **ALLOWED FILES**:
|
||||
- `app/components/**/*`
|
||||
- `app/**/page.tsx`
|
||||
- `app/**/layout.tsx`
|
||||
- `app/globals.css`
|
||||
|
||||
## Workflow
|
||||
|
||||
### Step 1: Load Task
|
||||
First, get the version-specific tasks directory:
|
||||
```bash
|
||||
TASKS_DIR=$(python3 skills/guardrail-orchestrator/scripts/version_manager.py tasks-dir)
|
||||
```
|
||||
|
||||
Read the task file: `$TASKS_DIR/$ARGUMENTS.yml`
|
||||
- If "$ARGUMENTS" is `--next`: find first task with `agent: frontend` and `status: pending`
|
||||
|
||||
### Step 2: Update Workflow State
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> in_progress
|
||||
```
|
||||
|
||||
### Step 3: Verify Prerequisites
|
||||
- Check entity is `APPROVED` in `project_manifest.json`
|
||||
- Check all `dependencies` tasks are `completed`
|
||||
- If blocked:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> blocked
|
||||
```
|
||||
Stop and report blocker.
|
||||
|
||||
### Step 4: Implement
|
||||
For each file in `file_paths`:
|
||||
1. Read manifest entity specification
|
||||
2. Generate code matching spec exactly:
|
||||
- Props must match manifest
|
||||
- Types must match manifest
|
||||
- File path must match manifest
|
||||
3. Follow existing project patterns
|
||||
|
||||
### Step 5: Validate
|
||||
Run validations:
|
||||
```bash
|
||||
npm run lint
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Step 6: Update Task Status
|
||||
Update the task file:
|
||||
```yaml
|
||||
status: review
|
||||
completed_at: <current timestamp>
|
||||
```
|
||||
|
||||
Update workflow state:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> review
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py progress --tasks-impl <count>
|
||||
```
|
||||
|
||||
### Step 7: Report
|
||||
- List implemented files
|
||||
- Show validation results
|
||||
- Suggest: `/workflow:review $ARGUMENTS`
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
---
|
||||
description: Show workflow version history
|
||||
allowed-tools: Read, Bash
|
||||
---
|
||||
|
||||
# Workflow History
|
||||
|
||||
Display version history of all workflow sessions.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/workflow:history # List all versions
|
||||
/workflow:history v001 # Show details for specific version
|
||||
/workflow:history --changelog # Show changelog for current version
|
||||
```
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. List All Versions (default)
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/version_manager.py history
|
||||
```
|
||||
|
||||
### 2. Show Version Details
|
||||
If "$ARGUMENTS" is a version (e.g., `v001`):
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/version_manager.py changelog $ARGUMENTS
|
||||
```
|
||||
|
||||
### 3. Display Format
|
||||
|
||||
**Version List**:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════════════╗
|
||||
║ WORKFLOW VERSION HISTORY ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ ✅ v003: Dashboard with analytics ║
|
||||
║ Started: 2025-01-16T16:00:00 | Tasks: 12 | Ops: 45 ║
|
||||
║ ────────────────────────────────────────────────────────────────── ║
|
||||
║ ✅ v002: Task filters and search ║
|
||||
║ Started: 2025-01-16T14:00:00 | Tasks: 8 | Ops: 28 ║
|
||||
║ ────────────────────────────────────────────────────────────────── ║
|
||||
║ ✅ v001: User authentication ║
|
||||
║ Started: 2025-01-16T10:00:00 | Tasks: 5 | Ops: 18 ║
|
||||
╚══════════════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
**Version Changelog**:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════════════╗
|
||||
║ CHANGELOG: v001 ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ Feature: User authentication ║
|
||||
║ Status: completed ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ CREATED ║
|
||||
║ + [page] page_login ║
|
||||
║ app/login/page.tsx ║
|
||||
║ + [component] component_LoginForm ║
|
||||
║ app/components/LoginForm.tsx ║
|
||||
║ + [api] api_auth ║
|
||||
║ app/api/auth/route.ts ║
|
||||
║ UPDATED ║
|
||||
║ ~ [component] component_Header ║
|
||||
║ DELETED ║
|
||||
║ (none) ║
|
||||
╠══════════════════════════════════════════════════════════════════════╣
|
||||
║ SUMMARY ║
|
||||
║ Entities: +3 ~1 -0 ║
|
||||
║ Files: +4 ~2 -0 ║
|
||||
╚══════════════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
### 4. Show Task Sessions
|
||||
If `$ARGUMENTS` includes `--tasks`:
|
||||
List all task sessions for the version with their operations:
|
||||
|
||||
```
|
||||
Task Sessions for v001:
|
||||
─────────────────────────────────────────────────
|
||||
🎨 task_create_LoginPage (frontend)
|
||||
Status: completed | Duration: 5m 32s
|
||||
Operations:
|
||||
+ CREATE file: app/login/page.tsx
|
||||
~ UPDATE manifest: project_manifest.json
|
||||
Review: ✅ approved
|
||||
|
||||
⚙️ task_create_AuthAPI (backend)
|
||||
Status: completed | Duration: 8m 15s
|
||||
Operations:
|
||||
+ CREATE file: app/api/auth/route.ts
|
||||
+ CREATE file: app/lib/auth.ts
|
||||
Review: ✅ approved
|
||||
```
|
||||
|
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
description: Reject a workflow gate and request changes
|
||||
allowed-tools: Read, Write, Bash
|
||||
---
|
||||
|
||||
# Reject Workflow Gate
|
||||
|
||||
Reject gate with reason: "$ARGUMENTS"
|
||||
|
||||
## Usage
|
||||
```
|
||||
/workflow:reject design "Need more API endpoints for authentication"
|
||||
/workflow:reject implementation "Login form missing validation"
|
||||
```
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Parse Arguments
|
||||
Extract:
|
||||
- `gate`: First word (design | implementation)
|
||||
- `reason`: Remaining text in quotes
|
||||
|
||||
If invalid format:
|
||||
```
|
||||
❌ Usage: /workflow:reject <gate> "reason"
|
||||
|
||||
Examples:
|
||||
/workflow:reject design "Need user profile page"
|
||||
/workflow:reject implementation "Missing error handling"
|
||||
```
|
||||
|
||||
### 2. Check Workflow State
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py exists
|
||||
```
|
||||
|
||||
If no active workflow:
|
||||
```
|
||||
❌ No active workflow found.
|
||||
```
|
||||
|
||||
### 3. Verify Current Phase
|
||||
|
||||
**For design rejection**:
|
||||
- Current phase must be `AWAITING_DESIGN_APPROVAL`
|
||||
|
||||
**For implementation rejection**:
|
||||
- Current phase must be `AWAITING_IMPL_APPROVAL`
|
||||
|
||||
### 4. Execute Rejection
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py reject <gate> "<reason>"
|
||||
```
|
||||
|
||||
### 5. Transition to Revision Phase
|
||||
|
||||
**If design rejected**:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition DESIGN_REJECTED
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition DESIGNING
|
||||
```
|
||||
|
||||
**If implementation rejected**:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition IMPL_REJECTED
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py transition IMPLEMENTING
|
||||
```
|
||||
|
||||
### 6. Report
|
||||
|
||||
**Design Rejected**:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ❌ DESIGN REJECTED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Reason: <rejection_reason> ║
|
||||
║ ║
|
||||
║ The workflow has returned to the DESIGNING phase. ║
|
||||
║ Revision count: X ║
|
||||
║ ║
|
||||
║ Next steps: ║
|
||||
║ /workflow:design --revise Revise the design ║
|
||||
║ /workflow:resume Auto-revise and continue ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
**Implementation Rejected**:
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ ❌ IMPLEMENTATION REJECTED ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Reason: <rejection_reason> ║
|
||||
║ ║
|
||||
║ The workflow has returned to the IMPLEMENTING phase. ║
|
||||
║ Revision count: X ║
|
||||
║ ║
|
||||
║ Tasks requiring fixes will be marked as 'pending'. ║
|
||||
║ ║
|
||||
║ Next steps: ║
|
||||
║ /workflow:frontend --next Fix frontend tasks ║
|
||||
║ /workflow:backend --next Fix backend tasks ║
|
||||
║ /workflow:resume Auto-fix and continue ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
### 7. Update Related Tasks (Implementation Rejection)
|
||||
|
||||
If implementation was rejected, identify tasks related to the rejection reason and mark them as pending:
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <affected_task_id> pending
|
||||
```
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
---
|
||||
description: Resume an interrupted workflow from saved state
|
||||
allowed-tools: Read, Write, Edit, Bash, AskUserQuestion, TodoWrite
|
||||
---
|
||||
|
||||
# Workflow Orchestrator - Resume
|
||||
|
||||
Resume a previously interrupted or paused workflow.
|
||||
|
||||
## EXECUTION PROTOCOL
|
||||
|
||||
### Step 1: Load Workflow State
|
||||
|
||||
Read `.workflow/current.yml`:
|
||||
- If not found: Report "No workflow to resume" and exit
|
||||
- If found: Load state and continue
|
||||
|
||||
### Step 2: Display Resume Summary
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ 🔄 RESUMING WORKFLOW ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Workflow ID: <id> ║
|
||||
║ Feature: <feature> ║
|
||||
║ Started: <started_at> ║
|
||||
║ Last Updated: <updated_at> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ CURRENT STATE ║
|
||||
║ Phase: <current_phase> ║
|
||||
║ Resume Point: <resume_point.action> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ PROGRESS ║
|
||||
║ Entities Designed: <progress.entities_designed> ║
|
||||
║ Tasks Created: <progress.tasks_created> ║
|
||||
║ Tasks Implemented: <progress.tasks_implemented> ║
|
||||
║ Tasks Reviewed: <progress.tasks_reviewed> ║
|
||||
║ Tasks Completed: <progress.tasks_completed> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ LAST ERROR (if any): <last_error> ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
### Step 3: Confirm Resume
|
||||
|
||||
**Ask user**:
|
||||
- Option 1: "Continue - Resume from current point"
|
||||
- Option 2: "Restart Phase - Redo current phase from beginning"
|
||||
- Option 3: "Abort - Cancel workflow entirely"
|
||||
|
||||
### Step 4: Resume Based on Phase
|
||||
|
||||
**INITIALIZING**:
|
||||
→ Continue to DESIGNING phase
|
||||
|
||||
**DESIGNING**:
|
||||
→ Continue architect work
|
||||
→ Resume creating entities/tasks
|
||||
|
||||
**AWAITING_DESIGN_APPROVAL**:
|
||||
→ Present design summary again
|
||||
→ Ask for approval
|
||||
|
||||
**DESIGN_APPROVED**:
|
||||
→ Continue to IMPLEMENTING phase
|
||||
|
||||
**DESIGN_REJECTED**:
|
||||
→ Show rejection reason
|
||||
→ Return to DESIGNING with feedback
|
||||
|
||||
**IMPLEMENTING**:
|
||||
→ Find incomplete tasks
|
||||
→ Continue implementation from next pending task
|
||||
|
||||
**REVIEWING**:
|
||||
→ Find tasks awaiting review
|
||||
→ Continue review process
|
||||
|
||||
**SECURITY_REVIEW**:
|
||||
→ Continue security scanning
|
||||
→ Run: `python3 skills/guardrail-orchestrator/scripts/security_scan.py --project-dir . --severity HIGH`
|
||||
→ Run: `python3 skills/guardrail-orchestrator/scripts/validate_api_contract.py --project-dir .`
|
||||
→ If passed: Transition to AWAITING_IMPL_APPROVAL
|
||||
→ If critical issues: Return to IMPLEMENTING with security feedback
|
||||
|
||||
**AWAITING_IMPL_APPROVAL**:
|
||||
→ Present implementation summary again
|
||||
→ Ask for approval
|
||||
|
||||
**IMPL_APPROVED**:
|
||||
→ Continue to COMPLETING phase
|
||||
|
||||
**IMPL_REJECTED**:
|
||||
→ Show rejection reason
|
||||
→ Return to IMPLEMENTING with feedback
|
||||
|
||||
**COMPLETING**:
|
||||
→ Continue marking tasks complete
|
||||
|
||||
**PAUSED**:
|
||||
→ Resume from `resume_point.phase`
|
||||
|
||||
**FAILED**:
|
||||
→ Show error details
|
||||
→ Ask user how to proceed:
|
||||
- Retry failed operation
|
||||
- Skip and continue
|
||||
- Abort workflow
|
||||
|
||||
### Step 5: Continue Workflow
|
||||
|
||||
Execute remaining phases following `/workflow:spawn` protocol.
|
||||
|
||||
## TASK-LEVEL RESUME
|
||||
|
||||
If resuming during IMPLEMENTING phase:
|
||||
|
||||
1. **Identify incomplete tasks**:
|
||||
```yaml
|
||||
# Resume from first task not in 'completed' or 'approved'
|
||||
resume_task: tasks.pending[0] || tasks.in_progress[0] || tasks.review[0]
|
||||
```
|
||||
|
||||
2. **Skip completed work**:
|
||||
- Don't recreate files that exist and are valid
|
||||
- Don't re-run validations that passed
|
||||
|
||||
3. **Continue from failure point**:
|
||||
- If task failed mid-implementation, restart that task
|
||||
- If validation failed, show error and retry
|
||||
|
||||
## STATE RECOVERY
|
||||
|
||||
If `.workflow/current.yml` is corrupted:
|
||||
|
||||
1. **Check for backup**: `.workflow/current.yml.bak`
|
||||
2. **Attempt recovery from manifest**:
|
||||
- Read `project_manifest.json` for entity status
|
||||
- Scan version-specific tasks directory for task status
|
||||
- Reconstruct workflow state
|
||||
3. **If unrecoverable**:
|
||||
- Report error
|
||||
- Suggest starting fresh with `/workflow:spawn`
|
||||
|
||||
## ABORT WORKFLOW
|
||||
|
||||
If user chooses to abort:
|
||||
|
||||
1. **Confirm abort**:
|
||||
"This will cancel the workflow. Files already created will remain. Continue?"
|
||||
|
||||
2. **If confirmed**:
|
||||
- Archive state to `.workflow/history/<id>_aborted.yml`
|
||||
- Clear `.workflow/current.yml`
|
||||
- Report: "Workflow aborted. Created files remain in place."
|
||||
|
||||
3. **Cleanup options**:
|
||||
- Offer to rollback created files (if git available)
|
||||
- Offer to keep partial implementation
|
||||
|
|
@ -0,0 +1,526 @@
|
|||
---
|
||||
description: Review implementation (Reviewer agent)
|
||||
allowed-tools: Read, Bash
|
||||
---
|
||||
|
||||
# Reviewer Agent - Review Mode
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL ENFORCEMENT RULES
|
||||
|
||||
**YOU ARE IN READ-ONLY MODE. VIOLATIONS WILL BE BLOCKED.**
|
||||
|
||||
### MUST DO (Non-Negotiable)
|
||||
1. **MUST** run all validation checks (build, typecheck, lint, test, API contract)
|
||||
2. **MUST** verify every file in task's `file_paths` exists
|
||||
3. **MUST** read and analyze each implemented file
|
||||
4. **MUST** check against acceptance_criteria in task file
|
||||
5. **MUST** output structured review report (format below)
|
||||
6. **MUST** run workflow_manager.py to update task status
|
||||
|
||||
### CANNOT DO (Strictly Forbidden)
|
||||
1. **CANNOT** create files (Write tool blocked)
|
||||
2. **CANNOT** modify files (Edit tool blocked)
|
||||
3. **CANNOT** fix issues yourself - only report them
|
||||
4. **CANNOT** approve tasks with missing files
|
||||
5. **CANNOT** approve if ANY validation check fails
|
||||
6. **CANNOT** skip any validation check
|
||||
|
||||
### ALLOWED ACTIONS
|
||||
- Read any file
|
||||
- Run Bash commands (build, lint, test, typecheck, ls, cat, grep)
|
||||
- Output review reports
|
||||
- Update task status via workflow_manager.py
|
||||
|
||||
---
|
||||
|
||||
## VALIDATION CHECKS MATRIX
|
||||
|
||||
| Check | Command | Blocks Approval | When |
|
||||
|-------|---------|-----------------|------|
|
||||
| Build | `npm run build` | YES | Always |
|
||||
| TypeScript | `npx tsc --noEmit` | YES | Always |
|
||||
| Async/Await | `python3 verify_async.py` | YES | Always |
|
||||
| Lint | `npm run lint` | YES (if --strict) | --strict mode |
|
||||
| Unit Tests | `npm test -- --passWithNoTests` | YES (if --strict) | --strict mode |
|
||||
| API Contract | `python3 validate_api_contract.py` | YES | Always |
|
||||
| Security Scan | `python3 security_scan.py` | YES (critical) | Always |
|
||||
| Files Exist | `ls -la` each file | YES | Always |
|
||||
|
||||
**Note:** For comprehensive security audit, use `/workflow:security --full`
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENT PARSING
|
||||
|
||||
```
|
||||
IF "$ARGUMENTS" contains "--auto":
|
||||
MODE = AUTO (batch review all tasks)
|
||||
STRICT = "$ARGUMENTS" contains "--strict"
|
||||
FULL = "$ARGUMENTS" contains "--full"
|
||||
ELSE IF "$ARGUMENTS" = "--next":
|
||||
MODE = SINGLE (next pending task)
|
||||
ELSE:
|
||||
MODE = SINGLE (specific task: "$ARGUMENTS")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## MODE: AUTO REVIEW (--auto)
|
||||
|
||||
### Step A1: Get Active Version [MANDATORY]
|
||||
```bash
|
||||
VERSION_ID=$(python3 skills/guardrail-orchestrator/scripts/version_manager.py current)
|
||||
TASKS_DIR=".workflow/versions/$VERSION_ID/tasks"
|
||||
```
|
||||
|
||||
### Step A2: Run Global Validations [MANDATORY]
|
||||
|
||||
#### 2.1 Build Check
|
||||
```bash
|
||||
npm run build 2>&1
|
||||
BUILD_EXIT=$?
|
||||
echo "BUILD_EXIT=$BUILD_EXIT"
|
||||
```
|
||||
|
||||
#### 2.2 TypeScript Strict Check
|
||||
```bash
|
||||
npx tsc --noEmit 2>&1
|
||||
TS_EXIT=$?
|
||||
echo "TS_EXIT=$TS_EXIT"
|
||||
```
|
||||
|
||||
#### 2.3 Async/Await Check [MANDATORY]
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/verify_async.py --path . 2>&1
|
||||
ASYNC_EXIT=$?
|
||||
echo "ASYNC_EXIT=$ASYNC_EXIT"
|
||||
```
|
||||
|
||||
This catches runtime errors at build time:
|
||||
- `fetch()` without `await`
|
||||
- `.json()` without `await`
|
||||
- `Promise.all()` without `await`
|
||||
- Floating promises (unawaited async calls)
|
||||
|
||||
**Exit codes:**
|
||||
- 0 = PASS (no high-severity issues)
|
||||
- 1 = HIGH severity issues found (blocks approval)
|
||||
|
||||
#### 2.4 Lint Check (if --strict or --full)
|
||||
```bash
|
||||
npm run lint 2>&1
|
||||
LINT_EXIT=$?
|
||||
echo "LINT_EXIT=$LINT_EXIT"
|
||||
```
|
||||
|
||||
#### 2.5 Unit Tests (if --strict or --full)
|
||||
```bash
|
||||
npm test -- --passWithNoTests 2>&1
|
||||
TEST_EXIT=$?
|
||||
echo "TEST_EXIT=$TEST_EXIT"
|
||||
```
|
||||
|
||||
#### 2.6 API Contract Validation [MANDATORY]
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/validate_api_contract.py --project-dir . 2>&1
|
||||
API_EXIT=$?
|
||||
echo "API_EXIT=$API_EXIT"
|
||||
```
|
||||
|
||||
This validates:
|
||||
- Frontend API calls have matching backend endpoints
|
||||
- HTTP methods match (GET, POST, PUT, DELETE)
|
||||
- Request bodies are sent where expected
|
||||
- Response handling matches backend output
|
||||
|
||||
#### 2.7 Security Scan [MANDATORY]
|
||||
```bash
|
||||
# Run comprehensive security scanner
|
||||
python3 skills/guardrail-orchestrator/scripts/security_scan.py \
|
||||
--project-dir . \
|
||||
--severity HIGH
|
||||
SECURITY_EXIT=$?
|
||||
echo "SECURITY_EXIT=$SECURITY_EXIT"
|
||||
```
|
||||
|
||||
**Security scan checks:**
|
||||
- Hardcoded secrets (API keys, passwords, tokens)
|
||||
- SQL injection vulnerabilities
|
||||
- XSS risks (dangerouslySetInnerHTML, innerHTML)
|
||||
- Command injection patterns
|
||||
- Path traversal vulnerabilities
|
||||
- NoSQL injection risks
|
||||
- SSRF vulnerabilities
|
||||
- Prototype pollution
|
||||
- Insecure authentication patterns
|
||||
- CORS misconfigurations
|
||||
- Sensitive data exposure
|
||||
- Debug code in production
|
||||
|
||||
**Exit codes:**
|
||||
- 0 = PASS (no critical/high issues)
|
||||
- 1 = HIGH issues found (warning)
|
||||
- 2 = CRITICAL issues found (blocks approval)
|
||||
|
||||
**For full security audit, run:** `/workflow:security --full`
|
||||
|
||||
### Step A3: Gather All Tasks [MANDATORY]
|
||||
```bash
|
||||
ls $TASKS_DIR/*.yml 2>/dev/null
|
||||
```
|
||||
**MUST process ALL task files found**
|
||||
|
||||
### Step A4: Review Each Task [MANDATORY]
|
||||
|
||||
For EACH task file:
|
||||
|
||||
```bash
|
||||
# Extract file_paths from task
|
||||
TASK_FILES=$(grep -A 20 "file_paths:" "$TASK_FILE" | grep -E "^\s+-" | sed 's/.*- //')
|
||||
```
|
||||
|
||||
**Check each file exists**:
|
||||
```bash
|
||||
for file in $TASK_FILES; do
|
||||
if [ -f "$file" ]; then
|
||||
echo "EXISTS: $file"
|
||||
else
|
||||
echo "MISSING: $file"
|
||||
MISSING_COUNT=$((MISSING_COUNT + 1))
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
**Determine task verdict**:
|
||||
```
|
||||
IF all files exist
|
||||
AND BUILD_EXIT = 0
|
||||
AND TS_EXIT = 0
|
||||
AND ASYNC_EXIT = 0
|
||||
AND API_EXIT = 0
|
||||
AND SECURITY_EXIT != 2 (no critical security issues)
|
||||
AND (not --strict OR (LINT_EXIT = 0 AND TEST_EXIT = 0)):
|
||||
-> TASK_VERDICT = APPROVED
|
||||
ELSE:
|
||||
-> TASK_VERDICT = REJECTED
|
||||
-> Record reason (missing files / build failure / type error / async issue / API mismatch / security issue)
|
||||
```
|
||||
|
||||
**Security exit codes:**
|
||||
- 0 = PASS
|
||||
- 1 = HIGH issues (warning, doesn't block unless --strict)
|
||||
- 2 = CRITICAL issues (always blocks)
|
||||
|
||||
### Step A5: Batch Update [MANDATORY]
|
||||
|
||||
For APPROVED tasks:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> approved
|
||||
```
|
||||
|
||||
For REJECTED tasks:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task <task_id> pending
|
||||
```
|
||||
|
||||
### Step A6: Auto Review Report [MANDATORY]
|
||||
|
||||
**MUST output this exact format**:
|
||||
```
|
||||
+======================================================================+
|
||||
| REVIEW COMPLETE |
|
||||
+======================================================================+
|
||||
| Version: $VERSION_ID |
|
||||
| Mode: AUTO [STRICT if --strict] [FULL if --full] |
|
||||
+======================================================================+
|
||||
| VALIDATION RESULTS |
|
||||
+----------------------------------------------------------------------+
|
||||
| Build: PASS (exit 0) / FAIL (exit $BUILD_EXIT) |
|
||||
| TypeScript: PASS (exit 0) / FAIL (exit $TS_EXIT) |
|
||||
| Async/Await: PASS / FAIL (X high, Y medium issues) |
|
||||
| Lint: PASS / FAIL / SKIPPED |
|
||||
| Tests: PASS / FAIL / SKIPPED |
|
||||
| API Contract: PASS / FAIL (X errors, Y warnings) |
|
||||
| Security: PASS / WARNING / CRITICAL |
|
||||
| (C:X H:X M:X L:X issues) |
|
||||
+======================================================================+
|
||||
| API CONTRACT DETAILS |
|
||||
+----------------------------------------------------------------------+
|
||||
| Frontend calls: X matched, Y unmatched |
|
||||
| Backend endpoints: X defined, Y unused |
|
||||
| Method mismatches: X |
|
||||
| Body mismatches: X |
|
||||
+======================================================================+
|
||||
| TASK RESULTS |
|
||||
+----------------------------------------------------------------------+
|
||||
| Total: X tasks |
|
||||
| Approved: X tasks |
|
||||
| Rejected: X tasks |
|
||||
| Skipped: X tasks (already completed) |
|
||||
+======================================================================+
|
||||
| APPROVED TASKS |
|
||||
| - task_create_Button |
|
||||
| - task_create_Form |
|
||||
+----------------------------------------------------------------------+
|
||||
| REJECTED TASKS |
|
||||
| - task_create_Modal |
|
||||
| Reason: Missing file app/components/Modal.tsx |
|
||||
| - task_update_API |
|
||||
| Reason: API contract error - endpoint not found |
|
||||
+======================================================================+
|
||||
| SECURITY WARNINGS |
|
||||
| - src/lib/api.ts:15 - Possible hardcoded API key |
|
||||
| - app/page.tsx:42 - dangerouslySetInnerHTML usage |
|
||||
+======================================================================+
|
||||
```
|
||||
|
||||
### Step A7: Next Steps [MANDATORY]
|
||||
|
||||
**IF all approved**:
|
||||
```
|
||||
All tasks approved.
|
||||
Next: Run `/workflow:approve implementation` to continue.
|
||||
```
|
||||
|
||||
**IF any rejected**:
|
||||
```
|
||||
Some tasks need fixes.
|
||||
|
||||
API Contract Issues:
|
||||
For frontend issues: Fix the API call URL or method
|
||||
For backend issues: Create or fix the API endpoint
|
||||
|
||||
For each rejected task, run:
|
||||
/workflow:frontend <task_id> (for frontend tasks)
|
||||
/workflow:backend <task_id> (for backend tasks)
|
||||
|
||||
Then re-run: /workflow:review --auto
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## MODE: SINGLE TASK REVIEW (--next or task_id)
|
||||
|
||||
### Step S1: Get Task [MANDATORY]
|
||||
```bash
|
||||
VERSION_ID=$(python3 skills/guardrail-orchestrator/scripts/version_manager.py current)
|
||||
TASKS_DIR=".workflow/versions/$VERSION_ID/tasks"
|
||||
```
|
||||
|
||||
**IF --next**:
|
||||
```bash
|
||||
# Find first task with status: pending or status: implemented
|
||||
TASK_FILE=$(grep -l "status: pending\|status: implemented" $TASKS_DIR/*.yml 2>/dev/null | head -1)
|
||||
```
|
||||
|
||||
**IF specific task_id**:
|
||||
```bash
|
||||
TASK_FILE="$TASKS_DIR/$ARGUMENTS.yml"
|
||||
```
|
||||
|
||||
**BLOCK IF**: Task file does not exist -> Error: "Task not found: $ARGUMENTS"
|
||||
|
||||
### Step S2: Read Task Spec [MANDATORY]
|
||||
```bash
|
||||
cat "$TASK_FILE"
|
||||
```
|
||||
|
||||
Extract:
|
||||
- `id`: Task identifier
|
||||
- `file_paths`: List of files to verify
|
||||
- `acceptance_criteria`: List of requirements to check
|
||||
|
||||
### Step S3: Run All Validations [MANDATORY]
|
||||
|
||||
```bash
|
||||
# Build
|
||||
npm run build 2>&1
|
||||
BUILD_EXIT=$?
|
||||
|
||||
# TypeScript
|
||||
npx tsc --noEmit 2>&1
|
||||
TS_EXIT=$?
|
||||
|
||||
# API Contract
|
||||
python3 skills/guardrail-orchestrator/scripts/validate_api_contract.py --project-dir . 2>&1
|
||||
API_EXIT=$?
|
||||
```
|
||||
|
||||
**MUST capture and report all exit codes**
|
||||
|
||||
### Step S4: Verify Files Exist [MANDATORY]
|
||||
|
||||
For each path in `file_paths`:
|
||||
```bash
|
||||
ls -la "$path" 2>/dev/null && echo "EXISTS" || echo "MISSING"
|
||||
```
|
||||
|
||||
**Record**:
|
||||
- FILES_EXIST = true/false
|
||||
- MISSING_FILES = list of missing paths
|
||||
|
||||
### Step S5: Read and Analyze Files [MANDATORY]
|
||||
|
||||
For each EXISTING file:
|
||||
1. Read file content
|
||||
2. Check against acceptance_criteria:
|
||||
- [ ] File exports correct components/functions
|
||||
- [ ] Props/types match manifest spec
|
||||
- [ ] Code follows project patterns
|
||||
- [ ] No obvious bugs or issues
|
||||
3. Check API contract compliance:
|
||||
- [ ] Frontend calls use correct endpoints
|
||||
- [ ] HTTP methods are appropriate
|
||||
- [ ] Request bodies are properly structured
|
||||
- [ ] Response handling is correct
|
||||
|
||||
### Step S6: Determine Verdict [MANDATORY]
|
||||
|
||||
```
|
||||
IF BUILD_EXIT = 0
|
||||
AND TS_EXIT = 0
|
||||
AND API_EXIT = 0
|
||||
AND FILES_EXIST = true
|
||||
AND acceptance_criteria met:
|
||||
-> VERDICT = APPROVED
|
||||
ELSE:
|
||||
-> VERDICT = REQUEST_CHANGES
|
||||
-> Record all issues found
|
||||
```
|
||||
|
||||
### Step S7: Update Task Status [MANDATORY]
|
||||
|
||||
**IF APPROVED**:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task $TASK_ID approved
|
||||
```
|
||||
|
||||
**IF REQUEST_CHANGES**:
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py task $TASK_ID pending
|
||||
```
|
||||
|
||||
### Step S8: Output Review Report [MANDATORY]
|
||||
|
||||
**MUST output this exact format**:
|
||||
```
|
||||
+======================================================================+
|
||||
| TASK REVIEW |
|
||||
+======================================================================+
|
||||
| Task: $TASK_ID |
|
||||
| Version: $VERSION_ID |
|
||||
+======================================================================+
|
||||
| VALIDATION CHECKS |
|
||||
+----------------------------------------------------------------------+
|
||||
| Build: PASS / FAIL |
|
||||
| TypeScript: PASS / FAIL |
|
||||
| API Contract: PASS / FAIL |
|
||||
| Files exist: PASS / FAIL (X/Y files) |
|
||||
| Acceptance criteria: PASS / PARTIAL / FAIL |
|
||||
| Code quality: PASS / ISSUES |
|
||||
+======================================================================+
|
||||
| API CONTRACT STATUS |
|
||||
+----------------------------------------------------------------------+
|
||||
| Endpoint calls: X found, Y matched |
|
||||
| Method correctness: PASS / X mismatches |
|
||||
| Request bodies: PASS / X issues |
|
||||
| Response handling: PASS / ISSUES |
|
||||
+======================================================================+
|
||||
| VERDICT: APPROVED / REQUEST_CHANGES |
|
||||
+======================================================================+
|
||||
| [If REQUEST_CHANGES, list all issues:] |
|
||||
| 1. Missing file: app/components/Button.tsx |
|
||||
| 2. TypeScript error: Type 'string' not assignable to 'number' |
|
||||
| 3. API contract: POST /api/users called but endpoint expects GET |
|
||||
| 4. API contract: Frontend sends body but backend ignores it |
|
||||
| 5. Acceptance criterion not met: "Must support dark mode" |
|
||||
+======================================================================+
|
||||
```
|
||||
|
||||
### Step S9: Next Steps [MANDATORY]
|
||||
|
||||
**IF APPROVED**:
|
||||
```
|
||||
Task approved.
|
||||
Next: Run `/workflow:complete $TASK_ID` to mark as done.
|
||||
Or run `/workflow:review --next` to review next task.
|
||||
```
|
||||
|
||||
**IF REQUEST_CHANGES**:
|
||||
```
|
||||
Changes requested.
|
||||
|
||||
Issues to fix:
|
||||
[List specific issues with file locations]
|
||||
|
||||
For API contract issues:
|
||||
- If frontend issue: Fix the fetch/axios call in [file:line]
|
||||
- If backend issue: Update the API route handler in [file]
|
||||
|
||||
Fix issues and re-run:
|
||||
/workflow:frontend $TASK_ID (for frontend tasks)
|
||||
/workflow:backend $TASK_ID (for backend tasks)
|
||||
Then: /workflow:review $TASK_ID
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## USAGE EXAMPLES
|
||||
|
||||
```bash
|
||||
# Review specific task
|
||||
/workflow:review task_create_Button
|
||||
|
||||
# Review next pending task
|
||||
/workflow:review --next
|
||||
|
||||
# Auto-review all tasks (standard - build + types + API)
|
||||
/workflow:review --auto
|
||||
|
||||
# Auto-review all tasks (strict - includes lint + tests)
|
||||
/workflow:review --auto --strict
|
||||
|
||||
# Full review with all checks
|
||||
/workflow:review --auto --full
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## API CONTRACT VALIDATION DETAILS
|
||||
|
||||
The API contract validator checks:
|
||||
|
||||
### Frontend Analysis
|
||||
- **fetch()** calls with `/api/` paths
|
||||
- **axios** requests (get, post, put, delete)
|
||||
- **useSWR** data fetching hooks
|
||||
- **Custom API clients** (api.get, api.post, etc.)
|
||||
|
||||
### Backend Analysis
|
||||
- **Next.js App Router**: `app/api/*/route.ts` exports (GET, POST, PUT, DELETE)
|
||||
- **Next.js Pages Router**: `pages/api/*.ts` with req.method checks
|
||||
- **Express-style**: router.get/post/etc patterns
|
||||
|
||||
### Validation Rules
|
||||
1. **Endpoint Existence**: Every frontend call must have a matching backend route
|
||||
2. **Method Match**: GET calls must hit GET endpoints, POST to POST, etc.
|
||||
3. **Body Alignment**: POST/PUT calls should send bodies, GET should not
|
||||
4. **Unused Endpoints**: Backend routes not called by frontend (warnings)
|
||||
|
||||
---
|
||||
|
||||
## ENFORCEMENT CHECKLIST
|
||||
|
||||
Before completing this command, verify:
|
||||
- [ ] Build command executed and exit code captured
|
||||
- [ ] TypeScript check executed and exit code captured
|
||||
- [ ] API contract validation executed and exit code captured
|
||||
- [ ] All file_paths verified with ls command
|
||||
- [ ] Security scan completed
|
||||
- [ ] Structured review report output (exact format above)
|
||||
- [ ] Task status updated via workflow_manager.py
|
||||
- [ ] Next steps clearly stated
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
---
|
||||
description: Run comprehensive security audit (Security Reviewer agent)
|
||||
allowed-tools: Read, Bash, Grep, Task
|
||||
---
|
||||
|
||||
# Security Reviewer Agent - Security Audit Mode
|
||||
|
||||
**Input**: "$ARGUMENTS"
|
||||
|
||||
---
|
||||
|
||||
## CRITICAL CONSTRAINTS
|
||||
|
||||
**YOU ARE IN READ-ONLY MODE FOR ANALYSIS.**
|
||||
|
||||
### MUST DO (Non-Negotiable)
|
||||
1. **MUST** run automated security scanner
|
||||
2. **MUST** analyze all CRITICAL and HIGH findings
|
||||
3. **MUST** check dependency vulnerabilities
|
||||
4. **MUST** review security configurations
|
||||
5. **MUST** output structured security report
|
||||
6. **MUST** provide remediation guidance
|
||||
|
||||
### CANNOT DO (Strictly Forbidden)
|
||||
1. **CANNOT** modify source files
|
||||
2. **CANNOT** fix issues directly
|
||||
3. **CANNOT** approve with CRITICAL issues
|
||||
4. **CANNOT** skip any security category
|
||||
|
||||
---
|
||||
|
||||
## ARGUMENT PARSING
|
||||
|
||||
```
|
||||
IF "$ARGUMENTS" contains "--quick":
|
||||
MODE = QUICK (scanner only)
|
||||
ELSE IF "$ARGUMENTS" contains "--full":
|
||||
MODE = FULL (scanner + deep analysis + deps + config)
|
||||
ELSE:
|
||||
MODE = STANDARD (scanner + deps)
|
||||
|
||||
SEVERITY = extract from --severity [critical|high|medium|low]
|
||||
OUTPUT = extract from --json (JSON output) or text
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## EXECUTION FLOW
|
||||
|
||||
### Step 1: Run Automated Security Scanner [MANDATORY]
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/security_scan.py \
|
||||
--project-dir . \
|
||||
--severity ${SEVERITY:-LOW} \
|
||||
${OUTPUT:+--json}
|
||||
```
|
||||
|
||||
**Capture output and exit code:**
|
||||
```bash
|
||||
SCAN_EXIT=$?
|
||||
echo "SCAN_EXIT=$SCAN_EXIT"
|
||||
```
|
||||
|
||||
**Exit codes:**
|
||||
- 0 = PASS (no critical/high issues)
|
||||
- 1 = HIGH issues found
|
||||
- 2 = CRITICAL issues found
|
||||
|
||||
### Step 2: Dependency Audit [MANDATORY unless --quick]
|
||||
|
||||
```bash
|
||||
echo "=== Dependency Audit ==="
|
||||
npm audit --json 2>/dev/null || echo '{"vulnerabilities":{}}'
|
||||
```
|
||||
|
||||
**Parse npm audit results:**
|
||||
- Count critical, high, moderate, low vulnerabilities
|
||||
- List affected packages and versions
|
||||
- Note if fixes available (`npm audit fix`)
|
||||
|
||||
### Step 3: Deep Analysis [FULL mode only]
|
||||
|
||||
For each CRITICAL/HIGH finding from scanner:
|
||||
|
||||
#### 3.1 Data Flow Tracing
|
||||
Use Task agent with security-engineer subagent:
|
||||
```
|
||||
Analyze data flow for vulnerability at [file:line].
|
||||
Trace user input from source to sink.
|
||||
Identify all potential attack vectors.
|
||||
Assess exploitability and impact.
|
||||
```
|
||||
|
||||
#### 3.2 Attack Vector Analysis
|
||||
For each vulnerability type:
|
||||
- SQL Injection → Check if input reaches query without sanitization
|
||||
- XSS → Check if input reaches DOM without encoding
|
||||
- Command Injection → Check if input reaches shell without escaping
|
||||
- Path Traversal → Check if input reaches file system without validation
|
||||
|
||||
### Step 4: Configuration Review [FULL mode only]
|
||||
|
||||
#### 4.1 CORS Configuration
|
||||
```bash
|
||||
grep -rn "cors\|Access-Control" app/ src/ pages/ --include="*.ts" --include="*.tsx" --include="*.js"
|
||||
```
|
||||
|
||||
Check for:
|
||||
- Wildcard origins (`*`)
|
||||
- Credentials with permissive origins
|
||||
- Missing CORS on sensitive endpoints
|
||||
|
||||
#### 4.2 Security Headers
|
||||
```bash
|
||||
grep -rn "helmet\|Content-Security-Policy\|X-Frame-Options\|X-XSS-Protection" . --include="*.ts" --include="*.js"
|
||||
```
|
||||
|
||||
Check for:
|
||||
- Helmet middleware usage
|
||||
- CSP configuration
|
||||
- X-Frame-Options
|
||||
- X-Content-Type-Options
|
||||
|
||||
#### 4.3 Authentication Configuration
|
||||
```bash
|
||||
grep -rn "jwt\|session\|auth\|cookie" app/ src/ pages/ --include="*.ts" --include="*.tsx"
|
||||
```
|
||||
|
||||
Check for:
|
||||
- JWT algorithm (avoid 'none', prefer RS256)
|
||||
- Session configuration
|
||||
- Cookie flags (httpOnly, secure, sameSite)
|
||||
|
||||
#### 4.4 Environment Variables
|
||||
```bash
|
||||
# Check .env files are gitignored
|
||||
cat .gitignore 2>/dev/null | grep -E "\.env"
|
||||
|
||||
# Check for env var usage
|
||||
grep -rn "process\.env\." app/ src/ --include="*.ts" --include="*.tsx" | head -20
|
||||
```
|
||||
|
||||
### Step 5: Manual Review Checklist [FULL mode only]
|
||||
|
||||
Read each file modified in current workflow and verify:
|
||||
|
||||
**Input Validation**
|
||||
- [ ] All user inputs validated
|
||||
- [ ] Type checking enforced
|
||||
- [ ] Length limits applied
|
||||
- [ ] Format validation (email, URL, etc.)
|
||||
|
||||
**Output Encoding**
|
||||
- [ ] HTML encoding for DOM insertion
|
||||
- [ ] URL encoding for URLs
|
||||
- [ ] JSON encoding for API responses
|
||||
|
||||
**Database Security**
|
||||
- [ ] Parameterized queries used
|
||||
- [ ] No string concatenation in queries
|
||||
- [ ] Proper ORM usage
|
||||
|
||||
**Authentication/Authorization**
|
||||
- [ ] Auth checks on protected routes
|
||||
- [ ] Role-based access control
|
||||
- [ ] Session validation
|
||||
|
||||
**Error Handling**
|
||||
- [ ] Generic error messages to users
|
||||
- [ ] No stack traces in production
|
||||
- [ ] No sensitive data in logs
|
||||
|
||||
### Step 6: Generate Security Report [MANDATORY]
|
||||
|
||||
**MUST output this exact format:**
|
||||
|
||||
```
|
||||
+======================================================================+
|
||||
| SECURITY AUDIT REPORT |
|
||||
+======================================================================+
|
||||
| Mode: QUICK / STANDARD / FULL |
|
||||
| Date: [current date] |
|
||||
| Project: [project name from package.json] |
|
||||
+======================================================================+
|
||||
| RISK ASSESSMENT |
|
||||
+----------------------------------------------------------------------+
|
||||
| Overall Risk: CRITICAL / HIGH / MEDIUM / LOW / PASS |
|
||||
| |
|
||||
| Static Analysis: X issues (C:X H:X M:X L:X) |
|
||||
| Dependencies: X vulnerabilities |
|
||||
| Configuration: X concerns |
|
||||
+======================================================================+
|
||||
| CRITICAL ISSUES (Immediate Action Required) |
|
||||
+----------------------------------------------------------------------+
|
||||
| [1] [CATEGORY] Title |
|
||||
| Location: file:line |
|
||||
| CWE: CWE-XXX |
|
||||
| OWASP: A0X:2021-Category |
|
||||
| Evidence: [code snippet] |
|
||||
| Impact: [description of potential attack] |
|
||||
| Fix: [specific remediation steps] |
|
||||
| |
|
||||
| [2] ... |
|
||||
+======================================================================+
|
||||
| HIGH ISSUES (Fix Before Production) |
|
||||
+----------------------------------------------------------------------+
|
||||
| [3] ... |
|
||||
+======================================================================+
|
||||
| MEDIUM ISSUES (Should Fix) |
|
||||
+----------------------------------------------------------------------+
|
||||
| [4] ... |
|
||||
+======================================================================+
|
||||
| DEPENDENCY VULNERABILITIES |
|
||||
+----------------------------------------------------------------------+
|
||||
| Package Version Severity Fix Available |
|
||||
| lodash 4.17.20 HIGH npm audit fix |
|
||||
| axios 0.21.0 MEDIUM npm audit fix |
|
||||
+======================================================================+
|
||||
| CONFIGURATION CONCERNS |
|
||||
+----------------------------------------------------------------------+
|
||||
| - CORS: Wildcard origin detected in src/middleware.ts |
|
||||
| - Session: Missing httpOnly flag on auth cookie |
|
||||
| - Headers: No CSP header configured |
|
||||
+======================================================================+
|
||||
| REMEDIATION PRIORITY |
|
||||
+----------------------------------------------------------------------+
|
||||
| 1. [CRITICAL] Rotate exposed API key in src/lib/api.ts |
|
||||
| 2. [CRITICAL] Fix SQL injection in app/api/users/route.ts |
|
||||
| 3. [HIGH] Update lodash to 4.17.21 |
|
||||
| 4. [HIGH] Add input validation to user registration |
|
||||
| 5. [MEDIUM] Configure CSP headers |
|
||||
+======================================================================+
|
||||
| VERDICT |
|
||||
+----------------------------------------------------------------------+
|
||||
| FAIL - X critical issues must be fixed before deployment |
|
||||
| or |
|
||||
| PASS - No blocking security issues found |
|
||||
+======================================================================+
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## VERDICT DETERMINATION
|
||||
|
||||
### FAIL Conditions
|
||||
- Any CRITICAL issue found
|
||||
- 3+ HIGH issues found
|
||||
- Critical npm vulnerabilities without fix
|
||||
- Exposed secrets or credentials
|
||||
|
||||
### PASS WITH WARNINGS
|
||||
- Only MEDIUM/LOW issues
|
||||
- All HIGH issues have accepted risk
|
||||
- Dependencies have fixes available
|
||||
|
||||
### PASS
|
||||
- No CRITICAL/HIGH issues
|
||||
- Dependencies up to date
|
||||
- Configurations reviewed
|
||||
|
||||
---
|
||||
|
||||
## POST-AUDIT ACTIONS
|
||||
|
||||
### If FAIL:
|
||||
```
|
||||
SECURITY AUDIT FAILED
|
||||
|
||||
Blocking issues must be fixed:
|
||||
1. [List critical issues]
|
||||
|
||||
For each issue:
|
||||
/workflow:frontend <task_id> - if frontend issue
|
||||
/workflow:backend <task_id> - if backend issue
|
||||
|
||||
Then re-run: /workflow:security
|
||||
```
|
||||
|
||||
### If PASS:
|
||||
```
|
||||
SECURITY AUDIT PASSED
|
||||
|
||||
Proceed with: /workflow:review --auto
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## USAGE EXAMPLES
|
||||
|
||||
```bash
|
||||
# Quick scan (automated scanner only)
|
||||
/workflow:security --quick
|
||||
|
||||
# Standard scan (scanner + dependencies)
|
||||
/workflow:security
|
||||
|
||||
# Full audit (all checks)
|
||||
/workflow:security --full
|
||||
|
||||
# Filter by severity
|
||||
/workflow:security --severity high
|
||||
|
||||
# JSON output for CI/CD
|
||||
/workflow:security --json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## INTEGRATION WITH CI/CD
|
||||
|
||||
### Pre-commit Hook
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/security_scan.py \
|
||||
--project-dir . --severity HIGH --strict
|
||||
```
|
||||
|
||||
### GitHub Actions
|
||||
```yaml
|
||||
- name: Security Scan
|
||||
run: |
|
||||
python3 skills/guardrail-orchestrator/scripts/security_scan.py \
|
||||
--project-dir . --json > security-report.json
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Security issues found!"
|
||||
cat security-report.json
|
||||
exit 1
|
||||
fi
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ENFORCEMENT CHECKLIST
|
||||
|
||||
Before completing this command, verify:
|
||||
- [ ] Automated scanner executed
|
||||
- [ ] All categories analyzed
|
||||
- [ ] Dependencies audited (unless --quick)
|
||||
- [ ] Structured report output
|
||||
- [ ] Remediation guidance provided
|
||||
- [ ] Clear verdict stated
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,119 @@
|
|||
---
|
||||
description: Show workflow status and task summary
|
||||
allowed-tools: Read, Bash
|
||||
---
|
||||
|
||||
# Workflow Status
|
||||
|
||||
Display current workflow status and task breakdown.
|
||||
|
||||
## Steps
|
||||
|
||||
### 1. Check Active Workflow
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/workflow_manager.py status
|
||||
```
|
||||
|
||||
If active workflow exists, display workflow state.
|
||||
If no workflow, continue with manual task scan.
|
||||
|
||||
### 2. Read Project Manifest
|
||||
Check `project_manifest.json` for:
|
||||
- Current phase
|
||||
- Entity counts by status
|
||||
|
||||
### 3. Scan Tasks
|
||||
Get the version-specific tasks directory:
|
||||
```bash
|
||||
TASKS_DIR=$(python3 skills/guardrail-orchestrator/scripts/version_manager.py tasks-dir)
|
||||
```
|
||||
|
||||
Read all `$TASKS_DIR/*.yml` files and count by:
|
||||
- Status (pending, in_progress, review, approved, completed, blocked)
|
||||
- Agent (frontend, backend, reviewer)
|
||||
- Type (create, update, delete, review)
|
||||
|
||||
### 4. Display Summary
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ WORKFLOW STATUS ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Active Workflow: <workflow_id> | None ║
|
||||
║ Feature: <feature_name> ║
|
||||
║ Phase: <current_phase> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ APPROVAL GATES ║
|
||||
║ 🛑 Design: <pending|approved|rejected> ║
|
||||
║ 🛑 Implementation: <pending|approved|rejected> ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ TASKS BY STATUS ║
|
||||
║ ⏳ Pending: X ║
|
||||
║ 🔄 In Progress: X ║
|
||||
║ 🔍 Review: X ║
|
||||
║ ✅ Approved: X ║
|
||||
║ ✓ Completed: X ║
|
||||
║ 🚫 Blocked: X ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ TASKS BY AGENT ║
|
||||
║ 🎨 Frontend: X pending, X completed ║
|
||||
║ ⚙️ Backend: X pending, X completed ║
|
||||
║ 🔍 Reviewer: X pending ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ NEXT ACTIONS ║
|
||||
║ /workflow:frontend --next (X tasks available) ║
|
||||
║ /workflow:backend --next (X tasks available) ║
|
||||
║ /workflow:review --next (X tasks to review) ║
|
||||
║ /workflow:resume (continue workflow) ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
```
|
||||
|
||||
### 5. Show Design Visualization
|
||||
**If in DESIGNING or AWAITING_DESIGN_APPROVAL phase**, display visual design:
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/visualize_design.py --manifest project_manifest.json
|
||||
```
|
||||
|
||||
This shows:
|
||||
- 📱 Page flow diagram
|
||||
- 📄 Page details with components
|
||||
- 🧩 Component hierarchy
|
||||
- 🔌 API endpoints
|
||||
- 🔄 Data flow architecture
|
||||
|
||||
### 5b. Show Implementation Visualization
|
||||
**If in REVIEWING, SECURITY_REVIEW, or AWAITING_IMPL_APPROVAL phase**, display what was built:
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/visualize_implementation.py --manifest project_manifest.json
|
||||
```
|
||||
|
||||
This shows:
|
||||
- 📱 Page structure with routes
|
||||
- 🧩 Component hierarchy and relationships
|
||||
- 🔌 API endpoints with HTTP methods
|
||||
- 📊 Implementation statistics (lines, hooks, types)
|
||||
- 🌳 Component tree view
|
||||
|
||||
### 6. List Pending Tasks
|
||||
Show table of tasks ready to work on:
|
||||
|
||||
| Task ID | Type | Agent | Priority | Dependencies |
|
||||
|---------|------|-------|----------|--------------|
|
||||
|
||||
### 7. Show Approval Instructions
|
||||
|
||||
**If AWAITING_DESIGN_APPROVAL**:
|
||||
```
|
||||
🛑 Design approval required. Review the entities and tasks, then:
|
||||
- Approve: /workflow:approve design
|
||||
- Reject: /workflow:reject design "reason"
|
||||
```
|
||||
|
||||
**If AWAITING_IMPL_APPROVAL**:
|
||||
```
|
||||
🛑 Implementation approval required. Review the code, then:
|
||||
- Approve: /workflow:approve implementation
|
||||
- Reject: /workflow:reject implementation "reason"
|
||||
```
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
api_key: pk_user_f5a39cbc686d4f4e0f9e815c035b69a314fd938adecb84bd3800dc6934d8f550
|
||||
project_id: ""
|
||||
repo_id: ""
|
||||
app_id: cmjabwyo00028ms0t8ju6mtkw
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
{
|
||||
"hooks": {
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Bash",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_bash.py\" --command \"$TOOL_INPUT_COMMAND\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Task",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation task --input \"$TOOL_INPUT\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation write --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Edit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "MultiEdit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "NotebookEdit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --file \"$TOOL_INPUT_NOTEBOOK_PATH\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_NOTEBOOK_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__serena__create_text_file",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation write --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__serena__replace_content",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__serena__replace_symbol_body",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__morphllm-fast-apply__write_file",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation write --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__morphllm-fast-apply__tiny_edit_file",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__filesystem__write_file",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation write --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__filesystem__edit_file",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation edit --input \"$TOOL_INPUT\""
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__filesystem__create_directory",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation write --input \"$TOOL_INPUT\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "mcp__filesystem__move_file",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/validate_workflow.py\" --operation write --input \"$TOOL_INPUT\""
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PostToolUse": [
|
||||
{
|
||||
"matcher": "Write",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/post_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Edit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/post_write.py\" --manifest \"$CLAUDE_PROJECT_DIR/project_manifest.json\" --file \"$TOOL_INPUT_FILE_PATH\""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": "Task",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "echo '🔄 Agent task completed. Verify outputs before proceeding.'"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"Stop": [
|
||||
{
|
||||
"matcher": "",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "python3 \"$CLAUDE_PROJECT_DIR/skills/guardrail-orchestrator/scripts/workflow_manager.py\" status 2>/dev/null || echo '🛡️ Session complete (no active workflow)'"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
# Context Compaction Skill
|
||||
|
||||
## Purpose
|
||||
Manages context window by saving state before compaction and resuming after.
|
||||
Ensures workflow continuity across context compressions.
|
||||
|
||||
## Activation Triggers
|
||||
- Manual: `/compact` command
|
||||
- Manual: `/save-state` command
|
||||
- Manual: `/resume` command
|
||||
- Auto: When context usage exceeds 80%
|
||||
|
||||
## Commands
|
||||
|
||||
### /compact - Full Compaction Workflow
|
||||
Saves state and prepares for context compaction:
|
||||
|
||||
```bash
|
||||
# 1. Save current workflow state
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py save \
|
||||
--workflow-dir .workflow/versions/v001 \
|
||||
--checkpoint
|
||||
|
||||
# 2. Display resume prompt for reference
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py resume \
|
||||
--workflow-dir .workflow/versions/v001
|
||||
```
|
||||
|
||||
### /save-state - Quick State Save
|
||||
Saves state without compaction:
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py save \
|
||||
--workflow-dir .workflow/versions/v001
|
||||
```
|
||||
|
||||
### /resume - Resume After Compaction
|
||||
After context is compacted, inject resume context:
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py resume \
|
||||
--workflow-dir .workflow/versions/v001
|
||||
```
|
||||
|
||||
### /context-status - Check State
|
||||
View current context state:
|
||||
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py status \
|
||||
--workflow-dir .workflow/versions/v001
|
||||
```
|
||||
|
||||
## Auto-Detection Rules
|
||||
|
||||
When context feels heavy (many tool calls, large files read), check:
|
||||
1. Are we approaching context limit?
|
||||
2. Is there unsaved progress?
|
||||
3. Should we recommend compaction?
|
||||
|
||||
### Warning Thresholds
|
||||
- **70%**: Log warning, suggest saving state soon
|
||||
- **80%**: Auto-save state, continue working
|
||||
- **90%**: Strongly recommend compaction
|
||||
- **95%**: Force state save immediately
|
||||
|
||||
## State Files Generated
|
||||
|
||||
After `/compact` or `/save-state`:
|
||||
|
||||
```
|
||||
.workflow/versions/v001/
|
||||
├── context_state.json # Full serialized state
|
||||
├── resume_prompt.md # Human-readable resume
|
||||
└── modified_files.json # Recent file changes
|
||||
```
|
||||
|
||||
## Resume Workflow
|
||||
|
||||
After user runs `/compact` and context is cleared:
|
||||
|
||||
1. **User starts new session**
|
||||
2. **Run `/resume`** - Injects previous context
|
||||
3. **Claude reads state** - Understands where to continue
|
||||
4. **Continue work** - Pick up from next action
|
||||
|
||||
## State Contents
|
||||
|
||||
The context_state.json captures:
|
||||
|
||||
```json
|
||||
{
|
||||
"session_id": "compact_20250118_143022",
|
||||
"workflow_position": {
|
||||
"current_phase": "IMPLEMENTING",
|
||||
"active_task_id": "task_create_api_login",
|
||||
"layer": 2
|
||||
},
|
||||
"active_work": {
|
||||
"entity_id": "api_auth_login",
|
||||
"action": "implementing",
|
||||
"file_path": "app/api/auth/login/route.ts",
|
||||
"progress_notes": "Created route, need JWT generation"
|
||||
},
|
||||
"next_actions": [
|
||||
{"action": "implement", "target": "JWT token generation", "priority": 1}
|
||||
],
|
||||
"modified_files": [...],
|
||||
"decisions": [...],
|
||||
"blockers": [...]
|
||||
}
|
||||
```
|
||||
|
||||
## Integration with Workflow
|
||||
|
||||
This skill integrates with:
|
||||
- **workflow_state.yml** - Reads current phase and task status
|
||||
- **tasks/*.yml** - Identifies pending and in-progress tasks
|
||||
- **Git** - Tracks modified files, can create checkpoints
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Save frequently** - Run `/save-state` after completing major steps
|
||||
2. **Before risky operations** - Save state before large refactors
|
||||
3. **End of session** - Always save state before ending work
|
||||
4. **After compaction** - Always run `/resume` to restore context
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### No state found on resume
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py status \
|
||||
--workflow-dir .workflow/versions/v001
|
||||
```
|
||||
|
||||
### Clear stale state
|
||||
```bash
|
||||
python3 skills/guardrail-orchestrator/scripts/context_compact.py clear \
|
||||
--workflow-dir .workflow/versions/v001
|
||||
```
|
||||
|
||||
### Manual state inspection
|
||||
```bash
|
||||
cat .workflow/versions/v001/context_state.json | jq .
|
||||
cat .workflow/versions/v001/resume_prompt.md
|
||||
```
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"taskId": "workflow-v001-earn-app",
|
||||
"title": "Implement Earn-to-Play App",
|
||||
"startedAt": "2025-12-18T01:40:00Z",
|
||||
"status": "in_progress"
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"mcpServers": {
|
||||
"eureka-docs": {
|
||||
"command": "npx",
|
||||
"args": ["eureka-docs-server"],
|
||||
"env": {}
|
||||
},
|
||||
"eureka-imagen": {
|
||||
"command": "npx",
|
||||
"args": ["eureka-imagen-server"],
|
||||
"env": {
|
||||
"IMAGEROUTER_API_KEY": "${IMAGEROUTER_API_KEY}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"active_version": "v001",
|
||||
"session_id": "workflow_20251218_013734"
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "v001",
|
||||
"feature": "a complete to earn app",
|
||||
"status": "pending",
|
||||
"started_at": "2025-12-18T01:37:34.999814",
|
||||
"completed_at": null,
|
||||
"tasks_count": 0,
|
||||
"operations_count": 0
|
||||
}
|
||||
],
|
||||
"latest_version": "v001",
|
||||
"total_versions": 1
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
"session_id": "compact_20251218_021138",
|
||||
"captured_at": "2025-12-18T02:11:38.618766",
|
||||
"context_usage": {
|
||||
"tokens_used": 0,
|
||||
"tokens_max": 0,
|
||||
"percentage": 0.85,
|
||||
"threshold_triggered": 0.8
|
||||
},
|
||||
"workflow_position": {
|
||||
"workflow_id": "unknown",
|
||||
"current_phase": "UNKNOWN",
|
||||
"active_task_id": null,
|
||||
"layer": 1
|
||||
},
|
||||
"active_work": {
|
||||
"entity_id": "",
|
||||
"entity_type": "",
|
||||
"action": "pending",
|
||||
"file_path": null,
|
||||
"progress_notes": ""
|
||||
},
|
||||
"next_actions": [],
|
||||
"modified_files": [
|
||||
{
|
||||
"path": "pp/page.tsx",
|
||||
"action": "modified",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".claude/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".eureka-active-session",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".mcp.json",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".workflow/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "CLAUDE.md",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/api/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/components/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/lib/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/login/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/register/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/tasks/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "project_manifest.json",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "skills/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "start-workflow.sh",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
}
|
||||
],
|
||||
"decisions": [],
|
||||
"blockers": []
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
"task_id": "task_create_api_auth_login",
|
||||
"entity_id": "api_auth_login",
|
||||
"generated_at": "2025-12-18T01:57:52.722550",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_auth_login",
|
||||
"path": "/api/auth/login",
|
||||
"method": "POST",
|
||||
"description": "Login existing user",
|
||||
"file_path": "app/api/auth/login/route.ts",
|
||||
"status": "PENDING",
|
||||
"request_body": {
|
||||
"email": "string (required)",
|
||||
"password": "string (required)"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"user": {
|
||||
"id": "string",
|
||||
"email": "string",
|
||||
"name": "string"
|
||||
},
|
||||
"token": "string (JWT)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"error": "Invalid credentials"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/auth/login/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/auth/login returns success response",
|
||||
"verification": "curl -X POST /api/auth/login"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
"task_id": "task_create_api_auth_me",
|
||||
"entity_id": "api_auth_me",
|
||||
"generated_at": "2025-12-18T01:57:52.722632",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_auth_me",
|
||||
"path": "/api/auth/me",
|
||||
"method": "GET",
|
||||
"description": "Get current authenticated user",
|
||||
"file_path": "app/api/auth/me/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"id": "string",
|
||||
"email": "string",
|
||||
"name": "string",
|
||||
"created_at": "string (ISO date)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": 401,
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"error": "Unauthorized"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/auth/me/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "GET /api/auth/me returns success response",
|
||||
"verification": "curl -X GET /api/auth/me"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"task_id": "task_create_api_auth_register",
|
||||
"entity_id": "api_auth_register",
|
||||
"generated_at": "2025-12-18T01:57:52.722465",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_auth_register",
|
||||
"path": "/api/auth/register",
|
||||
"method": "POST",
|
||||
"description": "Create new user account",
|
||||
"file_path": "app/api/auth/register/route.ts",
|
||||
"status": "PENDING",
|
||||
"request_body": {
|
||||
"email": "string (required)",
|
||||
"password": "string (required, min 8 chars)",
|
||||
"name": "string (required)"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"status": 201,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"user": {
|
||||
"id": "string",
|
||||
"email": "string",
|
||||
"name": "string"
|
||||
},
|
||||
"token": "string (JWT)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": 400,
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"error": "string (validation error or email exists)"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/auth/register/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/auth/register returns success response",
|
||||
"verification": "curl -X POST /api/auth/register"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"task_id": "task_create_api_leaderboard",
|
||||
"entity_id": "api_leaderboard",
|
||||
"generated_at": "2025-12-18T01:57:52.723271",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_leaderboard",
|
||||
"path": "/api/leaderboard",
|
||||
"method": "GET",
|
||||
"description": "Get top users by points",
|
||||
"file_path": "app/api/leaderboard/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"query_params": {
|
||||
"limit": "integer (optional, default 100)"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"leaderboard": [
|
||||
{
|
||||
"rank": "integer",
|
||||
"user_id": "string",
|
||||
"name": "string",
|
||||
"total_points": "integer"
|
||||
}
|
||||
],
|
||||
"current_user_rank": "integer"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/leaderboard/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "GET /api/leaderboard returns success response",
|
||||
"verification": "curl -X GET /api/leaderboard"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"task_id": "task_create_api_quizzes_get",
|
||||
"entity_id": "api_quizzes_get",
|
||||
"generated_at": "2025-12-18T01:57:52.723112",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_quizzes_get",
|
||||
"path": "/api/quizzes/:taskId",
|
||||
"method": "GET",
|
||||
"description": "Get quiz questions for a task",
|
||||
"file_path": "app/api/quizzes/[taskId]/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"questions": [
|
||||
{
|
||||
"id": "string",
|
||||
"question": "string",
|
||||
"options": [
|
||||
"string"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/quizzes/taskId/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "GET /api/quizzes/:taskId returns success response",
|
||||
"verification": "curl -X GET /api/quizzes/:taskId"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"task_id": "task_create_api_quizzes_submit",
|
||||
"entity_id": "api_quizzes_submit",
|
||||
"generated_at": "2025-12-18T01:57:52.723196",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_quizzes_submit",
|
||||
"path": "/api/quizzes/:taskId/submit",
|
||||
"method": "POST",
|
||||
"description": "Submit quiz answers",
|
||||
"file_path": "app/api/quizzes/[taskId]/submit/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"request_body": {
|
||||
"answers": "object (question_id -> answer mapping)"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"score": "integer (0-100)",
|
||||
"passed": "boolean",
|
||||
"points_earned": "integer",
|
||||
"new_balance": "integer"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/quizzes/taskId/submit/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/quizzes/:taskId/submit returns success response",
|
||||
"verification": "curl -X POST /api/quizzes/:taskId/submit"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"task_id": "task_create_api_referrals_claim",
|
||||
"entity_id": "api_referrals_claim",
|
||||
"generated_at": "2025-12-18T01:57:52.723424",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_referrals_claim",
|
||||
"path": "/api/referrals/claim",
|
||||
"method": "POST",
|
||||
"description": "Claim referral bonus",
|
||||
"file_path": "app/api/referrals/claim/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"request_body": {
|
||||
"referral_code": "string (required)"
|
||||
},
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"bonus_points": "integer",
|
||||
"new_balance": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": 400,
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"error": "string (invalid code or already used)"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/referrals/claim/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/referrals/claim returns success response",
|
||||
"verification": "curl -X POST /api/referrals/claim"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"task_id": "task_create_api_referrals_create",
|
||||
"entity_id": "api_referrals_create",
|
||||
"generated_at": "2025-12-18T01:57:52.723352",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_referrals_create",
|
||||
"path": "/api/referrals",
|
||||
"method": "POST",
|
||||
"description": "Create referral code",
|
||||
"file_path": "app/api/referrals/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"referral_code": "string",
|
||||
"referral_url": "string"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/referrals/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/referrals returns success response",
|
||||
"verification": "curl -X POST /api/referrals"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"task_id": "task_create_api_tasks_checkin",
|
||||
"entity_id": "api_tasks_checkin",
|
||||
"generated_at": "2025-12-18T01:57:52.722948",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_tasks_checkin",
|
||||
"path": "/api/tasks/checkin",
|
||||
"method": "POST",
|
||||
"description": "Complete daily check-in",
|
||||
"file_path": "app/api/tasks/checkin/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"points_earned": "integer",
|
||||
"streak_days": "integer",
|
||||
"new_balance": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": 400,
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"error": "Already checked in today"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/tasks/checkin/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/tasks/checkin returns success response",
|
||||
"verification": "curl -X POST /api/tasks/checkin"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"task_id": "task_create_api_tasks_complete",
|
||||
"entity_id": "api_tasks_complete",
|
||||
"generated_at": "2025-12-18T01:57:52.723026",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_tasks_complete",
|
||||
"path": "/api/tasks/:id/complete",
|
||||
"method": "POST",
|
||||
"description": "Complete a specific task",
|
||||
"file_path": "app/api/tasks/[id]/complete/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"points_earned": "integer",
|
||||
"new_balance": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"status": 400,
|
||||
"description": "Error",
|
||||
"schema": {
|
||||
"error": "string (task not found or already completed)"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/tasks/id/complete/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "POST /api/tasks/:id/complete returns success response",
|
||||
"verification": "curl -X POST /api/tasks/:id/complete"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"task_id": "task_create_api_tasks_list",
|
||||
"entity_id": "api_tasks_list",
|
||||
"generated_at": "2025-12-18T01:57:52.722869",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_tasks_list",
|
||||
"path": "/api/tasks",
|
||||
"method": "GET",
|
||||
"description": "List all available tasks",
|
||||
"file_path": "app/api/tasks/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"tasks": [
|
||||
{
|
||||
"id": "string",
|
||||
"type": "string",
|
||||
"title": "string",
|
||||
"description": "string",
|
||||
"points_reward": "integer",
|
||||
"is_completed_today": "boolean"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/tasks/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "GET /api/tasks returns success response",
|
||||
"verification": "curl -X GET /api/tasks"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
{
|
||||
"task_id": "task_create_api_users_badges",
|
||||
"entity_id": "api_users_badges",
|
||||
"generated_at": "2025-12-18T01:57:52.722788",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_users_badges",
|
||||
"path": "/api/users/me/badges",
|
||||
"method": "GET",
|
||||
"description": "Get user earned badges",
|
||||
"file_path": "app/api/users/me/badges/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"badges": [
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"description": "string",
|
||||
"icon": "string",
|
||||
"earned_at": "string (ISO date)"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/users/me/badges/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "GET /api/users/me/badges returns success response",
|
||||
"verification": "curl -X GET /api/users/me/badges"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
"task_id": "task_create_api_users_points",
|
||||
"entity_id": "api_users_points",
|
||||
"generated_at": "2025-12-18T01:57:52.722710",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "api",
|
||||
"definition": {
|
||||
"id": "api_users_points",
|
||||
"path": "/api/users/me/points",
|
||||
"method": "GET",
|
||||
"description": "Get user points balance and transaction history",
|
||||
"file_path": "app/api/users/me/points/route.ts",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"responses": [
|
||||
{
|
||||
"status": 200,
|
||||
"description": "Success",
|
||||
"schema": {
|
||||
"balance": "integer",
|
||||
"transactions": [
|
||||
{
|
||||
"id": "string",
|
||||
"amount": "integer",
|
||||
"type": "string",
|
||||
"source": "string",
|
||||
"created_at": "string (ISO date)"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/api/users/me/points/route.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "GET /api/users/me/points returns success response",
|
||||
"verification": "curl -X GET /api/users/me/points"
|
||||
},
|
||||
{
|
||||
"criterion": "Request validation implemented",
|
||||
"verification": "Test with invalid data"
|
||||
},
|
||||
{
|
||||
"criterion": "Error responses match contract",
|
||||
"verification": "Test error scenarios"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"task_id": "task_create_component_auth_form",
|
||||
"entity_id": "component_auth_form",
|
||||
"generated_at": "2025-12-18T01:57:52.724088",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_auth_form",
|
||||
"name": "AuthForm",
|
||||
"description": "Reusable login/register form component",
|
||||
"file_path": "app/components/AuthForm.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"mode": "'login' | 'register'",
|
||||
"onSubmit": "(data: AuthData) => Promise<void>",
|
||||
"error": "string | null"
|
||||
},
|
||||
"features": [
|
||||
"Email and password inputs",
|
||||
"Name input (register mode only)",
|
||||
"Client-side validation",
|
||||
"Error display",
|
||||
"Loading state",
|
||||
"Submit button"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/AuthForm.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"task_id": "task_create_component_badge_card",
|
||||
"entity_id": "component_badge_card",
|
||||
"generated_at": "2025-12-18T01:57:52.724450",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_badge_card",
|
||||
"name": "BadgeCard",
|
||||
"description": "Display a badge or achievement",
|
||||
"file_path": "app/components/BadgeCard.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"badge": "Badge object",
|
||||
"earned": "boolean",
|
||||
"earnedAt": "Date | null"
|
||||
},
|
||||
"features": [
|
||||
"Badge icon display",
|
||||
"Badge name and description",
|
||||
"Earned/locked state",
|
||||
"Earned date (if earned)",
|
||||
"Tooltip with requirement"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/BadgeCard.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"task_id": "task_create_component_daily_checkin_button",
|
||||
"entity_id": "component_daily_checkin_button",
|
||||
"generated_at": "2025-12-18T01:57:52.724595",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_daily_checkin_button",
|
||||
"name": "DailyCheckinButton",
|
||||
"description": "Check-in button with streak display",
|
||||
"file_path": "app/components/DailyCheckinButton.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"onCheckIn": "() => Promise<void>",
|
||||
"isCheckedInToday": "boolean",
|
||||
"streakDays": "number"
|
||||
},
|
||||
"features": [
|
||||
"Large prominent button",
|
||||
"Streak counter display",
|
||||
"Disabled state if already checked in",
|
||||
"Success animation",
|
||||
"Points earned display"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/DailyCheckinButton.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
{
|
||||
"task_id": "task_create_component_dark_theme_layout",
|
||||
"entity_id": "component_dark_theme_layout",
|
||||
"generated_at": "2025-12-18T01:57:52.724806",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_dark_theme_layout",
|
||||
"name": "DarkThemeLayout",
|
||||
"description": "Root layout with dark theme",
|
||||
"file_path": "app/components/DarkThemeLayout.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"children": "React.ReactNode"
|
||||
},
|
||||
"features": [
|
||||
"Dark background colors",
|
||||
"Global dark theme CSS variables",
|
||||
"Consistent spacing and typography",
|
||||
"Tailwind CSS dark mode utilities"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/DarkThemeLayout.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"task_id": "task_create_component_leaderboard_table",
|
||||
"entity_id": "component_leaderboard_table",
|
||||
"generated_at": "2025-12-18T01:57:52.724524",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_leaderboard_table",
|
||||
"name": "LeaderboardTable",
|
||||
"description": "Rankings table",
|
||||
"file_path": "app/components/LeaderboardTable.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"entries": "LeaderboardEntry[]",
|
||||
"currentUserId": "string"
|
||||
},
|
||||
"features": [
|
||||
"Table with rank, name, points columns",
|
||||
"Highlight current user row",
|
||||
"Top 3 special styling",
|
||||
"Responsive design",
|
||||
"Dark theme table styling"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/LeaderboardTable.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"task_id": "task_create_component_navbar",
|
||||
"entity_id": "component_navbar",
|
||||
"generated_at": "2025-12-18T01:57:52.724737",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_navbar",
|
||||
"name": "Navbar",
|
||||
"description": "Main navigation bar",
|
||||
"file_path": "app/components/Navbar.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"currentPath": "string"
|
||||
},
|
||||
"features": [
|
||||
"Links to Dashboard, Tasks, Leaderboard, Profile, Referral",
|
||||
"Active link highlighting",
|
||||
"User menu with logout",
|
||||
"Points balance display",
|
||||
"Responsive mobile menu",
|
||||
"Dark theme styling"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/Navbar.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"task_id": "task_create_component_points_display",
|
||||
"entity_id": "component_points_display",
|
||||
"generated_at": "2025-12-18T01:57:52.724158",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_points_display",
|
||||
"name": "PointsDisplay",
|
||||
"description": "Display current points balance",
|
||||
"file_path": "app/components/PointsDisplay.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"balance": "number",
|
||||
"showAnimation": "boolean (optional)"
|
||||
},
|
||||
"features": [
|
||||
"Large points number display",
|
||||
"Coin/points icon",
|
||||
"Optional animation on change",
|
||||
"Dark theme styling"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/PointsDisplay.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"task_id": "task_create_component_quiz_question",
|
||||
"entity_id": "component_quiz_question",
|
||||
"generated_at": "2025-12-18T01:57:52.724372",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_quiz_question",
|
||||
"name": "QuizQuestion",
|
||||
"description": "Quiz question with multiple choice",
|
||||
"file_path": "app/components/QuizQuestion.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"question": "string",
|
||||
"options": "string[]",
|
||||
"onAnswer": "(answer: string) => void",
|
||||
"selectedAnswer": "string | null"
|
||||
},
|
||||
"features": [
|
||||
"Question text display",
|
||||
"Radio button options",
|
||||
"Highlight selected answer",
|
||||
"Dark theme styling"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/QuizQuestion.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"task_id": "task_create_component_task_card",
|
||||
"entity_id": "component_task_card",
|
||||
"generated_at": "2025-12-18T01:57:52.724228",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_task_card",
|
||||
"name": "TaskCard",
|
||||
"description": "Display a single task",
|
||||
"file_path": "app/components/TaskCard.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"task": "Task object",
|
||||
"onComplete": "() => void",
|
||||
"isCompleted": "boolean"
|
||||
},
|
||||
"features": [
|
||||
"Task title and description",
|
||||
"Points reward badge",
|
||||
"Task type icon",
|
||||
"Completion status",
|
||||
"Complete button",
|
||||
"Dark theme card styling"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/TaskCard.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"task_id": "task_create_component_task_list",
|
||||
"entity_id": "component_task_list",
|
||||
"generated_at": "2025-12-18T01:57:52.724299",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_task_list",
|
||||
"name": "TaskList",
|
||||
"description": "List of task cards with filtering",
|
||||
"file_path": "app/components/TaskList.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"tasks": "Task[]",
|
||||
"onTaskComplete": "(taskId: string) => void"
|
||||
},
|
||||
"features": [
|
||||
"Grid layout of TaskCard components",
|
||||
"Filter by task type",
|
||||
"Empty state message",
|
||||
"Loading state"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/TaskList.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
"task_id": "task_create_component_transaction_history",
|
||||
"entity_id": "component_transaction_history",
|
||||
"generated_at": "2025-12-18T01:57:52.724666",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "component",
|
||||
"definition": {
|
||||
"id": "component_transaction_history",
|
||||
"name": "TransactionHistory",
|
||||
"description": "List of points transactions",
|
||||
"file_path": "app/components/TransactionHistory.tsx",
|
||||
"status": "PENDING",
|
||||
"props": {
|
||||
"transactions": "Transaction[]"
|
||||
},
|
||||
"features": [
|
||||
"List of transactions with date, amount, source",
|
||||
"Color coding (green for earned, red for spent)",
|
||||
"Pagination or infinite scroll",
|
||||
"Empty state message",
|
||||
"Dark theme styling"
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/components/TransactionHistory.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Component renders without errors",
|
||||
"verification": "Import and render in test"
|
||||
},
|
||||
{
|
||||
"criterion": "Props are typed correctly",
|
||||
"verification": "TypeScript compilation"
|
||||
},
|
||||
{
|
||||
"criterion": "Events fire correctly",
|
||||
"verification": "Test event handlers"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"task_id": "task_create_model_badge",
|
||||
"entity_id": "model_badge",
|
||||
"generated_at": "2025-12-18T01:57:52.722103",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_badge",
|
||||
"name": "Badge",
|
||||
"description": "Available badges and achievements",
|
||||
"file_path": "app/lib/db/schema/badge.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique badge identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Badge display name"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Badge description"
|
||||
},
|
||||
{
|
||||
"name": "icon",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Badge icon identifier or URL"
|
||||
},
|
||||
{
|
||||
"name": "requirement_type",
|
||||
"type": "enum",
|
||||
"required": true,
|
||||
"description": "Type of requirement to earn badge",
|
||||
"enum_values": [
|
||||
"points_total",
|
||||
"tasks_completed",
|
||||
"streak_days",
|
||||
"referrals"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "requirement_value",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "Threshold value for requirement"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/badge.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
{
|
||||
"task_id": "task_create_model_points",
|
||||
"entity_id": "model_points",
|
||||
"generated_at": "2025-12-18T01:57:52.721807",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_points",
|
||||
"name": "Points",
|
||||
"description": "Points transaction history",
|
||||
"file_path": "app/lib/db/schema/points.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique transaction identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to User"
|
||||
},
|
||||
{
|
||||
"name": "amount",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "Points amount (positive for earned, negative for spent)"
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "enum",
|
||||
"required": true,
|
||||
"description": "Transaction type",
|
||||
"enum_values": [
|
||||
"earned",
|
||||
"spent"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "source",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Source of points (task_id, purchase_id, etc.)"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"type": "timestamp",
|
||||
"required": true,
|
||||
"description": "Transaction timestamp"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"user_id",
|
||||
"created_at"
|
||||
],
|
||||
"unique": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/points.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
{
|
||||
"task_id": "task_create_model_quiz",
|
||||
"entity_id": "model_quiz",
|
||||
"generated_at": "2025-12-18T01:57:52.722279",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_quiz",
|
||||
"name": "Quiz",
|
||||
"description": "Quiz questions for learning tasks",
|
||||
"file_path": "app/lib/db/schema/quiz.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique quiz identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "task_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to Task"
|
||||
},
|
||||
{
|
||||
"name": "question",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Quiz question text"
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "json",
|
||||
"required": true,
|
||||
"description": "Array of answer options"
|
||||
},
|
||||
{
|
||||
"name": "correct_answer",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Correct answer identifier"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"task_id"
|
||||
],
|
||||
"unique": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/quiz.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"task_id": "task_create_model_referral",
|
||||
"entity_id": "model_referral",
|
||||
"generated_at": "2025-12-18T01:57:52.722366",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_referral",
|
||||
"name": "Referral",
|
||||
"description": "Referral tracking and rewards",
|
||||
"file_path": "app/lib/db/schema/referral.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique referral identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "referrer_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to User (who referred)"
|
||||
},
|
||||
{
|
||||
"name": "referred_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to User (who was referred)"
|
||||
},
|
||||
{
|
||||
"name": "bonus_points",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "Points awarded to referrer"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"type": "timestamp",
|
||||
"required": true,
|
||||
"description": "Referral creation timestamp"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"referrer_id"
|
||||
],
|
||||
"unique": false
|
||||
},
|
||||
{
|
||||
"fields": [
|
||||
"referred_id"
|
||||
],
|
||||
"unique": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/referral.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
"task_id": "task_create_model_task",
|
||||
"entity_id": "model_task",
|
||||
"generated_at": "2025-12-18T01:57:52.721911",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_task",
|
||||
"name": "Task",
|
||||
"description": "Available tasks for earning points",
|
||||
"file_path": "app/lib/db/schema/task.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique task identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "enum",
|
||||
"required": true,
|
||||
"description": "Task category",
|
||||
"enum_values": [
|
||||
"checkin",
|
||||
"ad",
|
||||
"survey",
|
||||
"referral",
|
||||
"quiz",
|
||||
"video",
|
||||
"reading"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "title",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Task display title"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Task description"
|
||||
},
|
||||
{
|
||||
"name": "points_reward",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "Points awarded upon completion"
|
||||
},
|
||||
{
|
||||
"name": "is_active",
|
||||
"type": "boolean",
|
||||
"required": true,
|
||||
"description": "Whether task is currently available"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"type",
|
||||
"is_active"
|
||||
],
|
||||
"unique": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/task.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
{
|
||||
"task_id": "task_create_model_user",
|
||||
"entity_id": "model_user",
|
||||
"generated_at": "2025-12-18T01:57:52.721672",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_user",
|
||||
"name": "User",
|
||||
"description": "User account and authentication",
|
||||
"file_path": "app/lib/db/schema/user.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique user identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "email",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "User email address (unique)"
|
||||
},
|
||||
{
|
||||
"name": "password_hash",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Hashed password using bcrypt"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "User display name"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"type": "timestamp",
|
||||
"required": true,
|
||||
"description": "Account creation timestamp"
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"type": "timestamp",
|
||||
"required": true,
|
||||
"description": "Last update timestamp"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"email"
|
||||
],
|
||||
"unique": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/user.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
{
|
||||
"task_id": "task_create_model_user_badge",
|
||||
"entity_id": "model_user_badge",
|
||||
"generated_at": "2025-12-18T01:57:52.722194",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_user_badge",
|
||||
"name": "UserBadge",
|
||||
"description": "User earned badges",
|
||||
"file_path": "app/lib/db/schema/user_badge.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique user badge identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to User"
|
||||
},
|
||||
{
|
||||
"name": "badge_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to Badge"
|
||||
},
|
||||
{
|
||||
"name": "earned_at",
|
||||
"type": "timestamp",
|
||||
"required": true,
|
||||
"description": "Badge earned timestamp"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"user_id",
|
||||
"badge_id"
|
||||
],
|
||||
"unique": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/userbadge.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"task_id": "task_create_model_user_task",
|
||||
"entity_id": "model_user_task",
|
||||
"generated_at": "2025-12-18T01:57:52.722010",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "model",
|
||||
"definition": {
|
||||
"id": "model_user_task",
|
||||
"name": "UserTask",
|
||||
"description": "User task completion records",
|
||||
"file_path": "app/lib/db/schema/user_task.ts",
|
||||
"status": "PENDING",
|
||||
"fields": [
|
||||
{
|
||||
"name": "id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Unique completion record identifier (UUID)",
|
||||
"constraints": [
|
||||
"primary_key"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "user_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to User"
|
||||
},
|
||||
{
|
||||
"name": "task_id",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "Foreign key to Task"
|
||||
},
|
||||
{
|
||||
"name": "completed_at",
|
||||
"type": "timestamp",
|
||||
"required": true,
|
||||
"description": "Task completion timestamp"
|
||||
},
|
||||
{
|
||||
"name": "points_earned",
|
||||
"type": "integer",
|
||||
"required": true,
|
||||
"description": "Points awarded for this completion"
|
||||
}
|
||||
],
|
||||
"indexes": [
|
||||
{
|
||||
"fields": [
|
||||
"user_id",
|
||||
"task_id",
|
||||
"completed_at"
|
||||
],
|
||||
"unique": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"prisma/schema.prisma",
|
||||
"app/models/usertask.ts"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Model defined in Prisma schema",
|
||||
"verification": "Check prisma/schema.prisma"
|
||||
},
|
||||
{
|
||||
"criterion": "TypeScript types exported",
|
||||
"verification": "Import type in test file"
|
||||
},
|
||||
{
|
||||
"criterion": "Relations properly configured",
|
||||
"verification": "Check Prisma relations"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"task_id": "task_create_page_dashboard",
|
||||
"entity_id": "page_dashboard",
|
||||
"generated_at": "2025-12-18T01:57:52.723646",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_dashboard",
|
||||
"name": "Dashboard",
|
||||
"description": "Main dashboard with overview",
|
||||
"file_path": "app/page.tsx",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"components_used": [
|
||||
"PointsDisplay",
|
||||
"TaskCard",
|
||||
"DailyCheckinButton",
|
||||
"BadgeCard",
|
||||
"Navbar"
|
||||
],
|
||||
"features": [
|
||||
"Points balance display",
|
||||
"Daily check-in button with streak",
|
||||
"Quick task overview (3-5 featured tasks)",
|
||||
"Recent badges earned",
|
||||
"Navigation to other sections"
|
||||
],
|
||||
"path": "/"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app//page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /",
|
||||
"verification": "Navigate to /"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"task_id": "task_create_page_leaderboard",
|
||||
"entity_id": "page_leaderboard",
|
||||
"generated_at": "2025-12-18T01:57:52.723944",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_leaderboard",
|
||||
"name": "Leaderboard Page",
|
||||
"description": "Rankings of top users",
|
||||
"file_path": "app/leaderboard/page.tsx",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"components_used": [
|
||||
"LeaderboardTable",
|
||||
"Navbar"
|
||||
],
|
||||
"features": [
|
||||
"Top 100 users by points",
|
||||
"User rank display",
|
||||
"Current user highlight",
|
||||
"Points totals",
|
||||
"Update in real-time"
|
||||
],
|
||||
"path": "/leaderboard"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/leaderboard/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /leaderboard",
|
||||
"verification": "Navigate to /leaderboard"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"task_id": "task_create_page_login",
|
||||
"entity_id": "page_login",
|
||||
"generated_at": "2025-12-18T01:57:52.723504",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_login",
|
||||
"name": "Login Page",
|
||||
"description": "User login page",
|
||||
"file_path": "app/login/page.tsx",
|
||||
"status": "PENDING",
|
||||
"components_used": [
|
||||
"AuthForm"
|
||||
],
|
||||
"features": [
|
||||
"Email/password login form",
|
||||
"Link to register page",
|
||||
"Form validation",
|
||||
"Error display",
|
||||
"Redirect to dashboard on success"
|
||||
],
|
||||
"path": "/login"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/login/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /login",
|
||||
"verification": "Navigate to /login"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
"task_id": "task_create_page_profile",
|
||||
"entity_id": "page_profile",
|
||||
"generated_at": "2025-12-18T01:57:52.723874",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_profile",
|
||||
"name": "Profile Page",
|
||||
"description": "User profile with points history",
|
||||
"file_path": "app/profile/page.tsx",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"components_used": [
|
||||
"PointsDisplay",
|
||||
"TransactionHistory",
|
||||
"BadgeCard",
|
||||
"Navbar"
|
||||
],
|
||||
"features": [
|
||||
"User info display",
|
||||
"Total points balance",
|
||||
"Points transaction history",
|
||||
"Earned badges display",
|
||||
"Account statistics"
|
||||
],
|
||||
"path": "/profile"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/profile/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /profile",
|
||||
"verification": "Navigate to /profile"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"task_id": "task_create_page_quiz",
|
||||
"entity_id": "page_quiz",
|
||||
"generated_at": "2025-12-18T01:57:52.723794",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_quiz",
|
||||
"name": "Quiz Page",
|
||||
"description": "Quiz interface for learning tasks",
|
||||
"file_path": "app/quiz/[id]/page.tsx",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"components_used": [
|
||||
"QuizQuestion",
|
||||
"Navbar"
|
||||
],
|
||||
"features": [
|
||||
"Display quiz questions one by one",
|
||||
"Multiple choice answers",
|
||||
"Submit button",
|
||||
"Score display after completion",
|
||||
"Points earned display"
|
||||
],
|
||||
"path": "/quiz/[id]"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/quiz/[id]/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /quiz/[id]",
|
||||
"verification": "Navigate to /quiz/[id]"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"task_id": "task_create_page_referral",
|
||||
"entity_id": "page_referral",
|
||||
"generated_at": "2025-12-18T01:57:52.724017",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_referral",
|
||||
"name": "Referral Page",
|
||||
"description": "Referral code sharing",
|
||||
"file_path": "app/referral/page.tsx",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"components_used": [
|
||||
"Navbar"
|
||||
],
|
||||
"features": [
|
||||
"Generate referral code",
|
||||
"Display shareable link",
|
||||
"Copy to clipboard button",
|
||||
"Show referral statistics",
|
||||
"Bonus points display"
|
||||
],
|
||||
"path": "/referral"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/referral/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /referral",
|
||||
"verification": "Navigate to /referral"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"task_id": "task_create_page_register",
|
||||
"entity_id": "page_register",
|
||||
"generated_at": "2025-12-18T01:57:52.723574",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_register",
|
||||
"name": "Register Page",
|
||||
"description": "User registration page",
|
||||
"file_path": "app/register/page.tsx",
|
||||
"status": "PENDING",
|
||||
"components_used": [
|
||||
"AuthForm"
|
||||
],
|
||||
"features": [
|
||||
"Registration form with email, password, name",
|
||||
"Link to login page",
|
||||
"Form validation (password min 8 chars)",
|
||||
"Error display",
|
||||
"Redirect to dashboard on success"
|
||||
],
|
||||
"path": "/register"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/register/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /register",
|
||||
"verification": "Navigate to /register"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
{
|
||||
"task_id": "task_create_page_tasks",
|
||||
"entity_id": "page_tasks",
|
||||
"generated_at": "2025-12-18T01:57:52.723718",
|
||||
"workflow_version": "v001",
|
||||
"target": {
|
||||
"type": "page",
|
||||
"definition": {
|
||||
"id": "page_tasks",
|
||||
"name": "Tasks Page",
|
||||
"description": "List of all available tasks",
|
||||
"file_path": "app/tasks/page.tsx",
|
||||
"status": "PENDING",
|
||||
"auth_required": true,
|
||||
"components_used": [
|
||||
"TaskList",
|
||||
"TaskCard",
|
||||
"Navbar"
|
||||
],
|
||||
"features": [
|
||||
"List all available tasks",
|
||||
"Filter by task type",
|
||||
"Show completion status",
|
||||
"Click to complete or view task",
|
||||
"Points reward display"
|
||||
],
|
||||
"path": "/tasks"
|
||||
}
|
||||
},
|
||||
"related": {
|
||||
"models": [],
|
||||
"apis": [],
|
||||
"components": []
|
||||
},
|
||||
"dependencies": {
|
||||
"entity_ids": [],
|
||||
"definitions": []
|
||||
},
|
||||
"files": {
|
||||
"to_create": [
|
||||
"app/tasks/page.tsx"
|
||||
],
|
||||
"reference": []
|
||||
},
|
||||
"acceptance": [
|
||||
{
|
||||
"criterion": "Page renders at /tasks",
|
||||
"verification": "Navigate to /tasks"
|
||||
},
|
||||
{
|
||||
"criterion": "Data fetching works",
|
||||
"verification": "Check network tab"
|
||||
},
|
||||
{
|
||||
"criterion": "Components render correctly",
|
||||
"verification": "Visual inspection"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,628 @@
|
|||
{
|
||||
"dependency_graph": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"generated_at": "2025-12-18T01:57:52.721168",
|
||||
"generator": "validate_design.py",
|
||||
"stats": {
|
||||
"total_entities": 40,
|
||||
"total_layers": 1,
|
||||
"max_parallelism": 40,
|
||||
"critical_path_length": 1
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"layer": 1,
|
||||
"name": "Data Layer",
|
||||
"description": "Database models - no external dependencies",
|
||||
"items": [
|
||||
{
|
||||
"id": "api_auth_login",
|
||||
"type": "api",
|
||||
"name": "api_auth_login",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_auth_login",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_auth_me",
|
||||
"type": "api",
|
||||
"name": "api_auth_me",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_auth_me",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_auth_register",
|
||||
"type": "api",
|
||||
"name": "api_auth_register",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_auth_register",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_leaderboard",
|
||||
"type": "api",
|
||||
"name": "api_leaderboard",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_leaderboard",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_quizzes_get",
|
||||
"type": "api",
|
||||
"name": "api_quizzes_get",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_quizzes_get",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_quizzes_submit",
|
||||
"type": "api",
|
||||
"name": "api_quizzes_submit",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_quizzes_submit",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_referrals_claim",
|
||||
"type": "api",
|
||||
"name": "api_referrals_claim",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_referrals_claim",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_referrals_create",
|
||||
"type": "api",
|
||||
"name": "api_referrals_create",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_referrals_create",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_tasks_checkin",
|
||||
"type": "api",
|
||||
"name": "api_tasks_checkin",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_tasks_checkin",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_tasks_complete",
|
||||
"type": "api",
|
||||
"name": "api_tasks_complete",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_tasks_complete",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_tasks_list",
|
||||
"type": "api",
|
||||
"name": "api_tasks_list",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_tasks_list",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_users_badges",
|
||||
"type": "api",
|
||||
"name": "api_users_badges",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_users_badges",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "api_users_points",
|
||||
"type": "api",
|
||||
"name": "api_users_points",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_api_users_points",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_auth_form",
|
||||
"type": "component",
|
||||
"name": "AuthForm",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_auth_form",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_badge_card",
|
||||
"type": "component",
|
||||
"name": "BadgeCard",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_badge_card",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_daily_checkin_button",
|
||||
"type": "component",
|
||||
"name": "DailyCheckinButton",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_daily_checkin_button",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_dark_theme_layout",
|
||||
"type": "component",
|
||||
"name": "DarkThemeLayout",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_dark_theme_layout",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_leaderboard_table",
|
||||
"type": "component",
|
||||
"name": "LeaderboardTable",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_leaderboard_table",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_navbar",
|
||||
"type": "component",
|
||||
"name": "Navbar",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_navbar",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_points_display",
|
||||
"type": "component",
|
||||
"name": "PointsDisplay",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_points_display",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_quiz_question",
|
||||
"type": "component",
|
||||
"name": "QuizQuestion",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_quiz_question",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_task_card",
|
||||
"type": "component",
|
||||
"name": "TaskCard",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_task_card",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_task_list",
|
||||
"type": "component",
|
||||
"name": "TaskList",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_task_list",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "component_transaction_history",
|
||||
"type": "component",
|
||||
"name": "TransactionHistory",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_component_transaction_history",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_badge",
|
||||
"type": "model",
|
||||
"name": "Badge",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_badge",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_points",
|
||||
"type": "model",
|
||||
"name": "Points",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_points",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_quiz",
|
||||
"type": "model",
|
||||
"name": "Quiz",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_quiz",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_referral",
|
||||
"type": "model",
|
||||
"name": "Referral",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_referral",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_task",
|
||||
"type": "model",
|
||||
"name": "Task",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_task",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_user",
|
||||
"type": "model",
|
||||
"name": "User",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_user",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_user_badge",
|
||||
"type": "model",
|
||||
"name": "UserBadge",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_user_badge",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "model_user_task",
|
||||
"type": "model",
|
||||
"name": "UserTask",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_model_user_task",
|
||||
"agent": "backend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_dashboard",
|
||||
"type": "page",
|
||||
"name": "Dashboard",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_dashboard",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_leaderboard",
|
||||
"type": "page",
|
||||
"name": "Leaderboard Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_leaderboard",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_login",
|
||||
"type": "page",
|
||||
"name": "Login Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_login",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_profile",
|
||||
"type": "page",
|
||||
"name": "Profile Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_profile",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_quiz",
|
||||
"type": "page",
|
||||
"name": "Quiz Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_quiz",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_referral",
|
||||
"type": "page",
|
||||
"name": "Referral Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_referral",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_register",
|
||||
"type": "page",
|
||||
"name": "Register Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_register",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
},
|
||||
{
|
||||
"id": "page_tasks",
|
||||
"type": "page",
|
||||
"name": "Tasks Page",
|
||||
"depends_on": [],
|
||||
"task_id": "task_create_page_tasks",
|
||||
"agent": "frontend",
|
||||
"complexity": "medium"
|
||||
}
|
||||
],
|
||||
"requires_layers": [],
|
||||
"parallel_count": 40
|
||||
}
|
||||
],
|
||||
"dependency_map": {
|
||||
"model_user": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_points": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_task": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_user_task": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_badge": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_user_badge": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_quiz": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"model_referral": {
|
||||
"type": "model",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_auth_register": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_auth_login": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_auth_me": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_users_points": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_users_badges": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_tasks_list": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_tasks_checkin": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_tasks_complete": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_quizzes_get": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_quizzes_submit": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_leaderboard": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_referrals_create": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"api_referrals_claim": {
|
||||
"type": "api",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_login": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_register": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_dashboard": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_tasks": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_quiz": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_profile": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_leaderboard": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"page_referral": {
|
||||
"type": "page",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_auth_form": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_points_display": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_task_card": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_task_list": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_quiz_question": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_badge_card": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_leaderboard_table": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_daily_checkin_button": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_transaction_history": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_navbar": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
},
|
||||
"component_dark_theme_layout": {
|
||||
"type": "component",
|
||||
"layer": 1,
|
||||
"depends_on": [],
|
||||
"depended_by": []
|
||||
}
|
||||
},
|
||||
"task_map": []
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,156 @@
|
|||
{
|
||||
"version": "v001",
|
||||
"current_phase": "INITIALIZING",
|
||||
"created_at": "2025-12-18T02:39:33.559779",
|
||||
"updated_at": "2025-12-18T02:39:50.747171",
|
||||
"phases": {
|
||||
"INITIALIZING": {
|
||||
"status": "completed",
|
||||
"entered_at": "2025-12-18T02:39:33.559790",
|
||||
"completed_at": "2025-12-18T02:39:50.747165",
|
||||
"checkpoints": {
|
||||
"manifest_exists": {
|
||||
"status": "passed",
|
||||
"at": "2025-12-18T02:39:33.775898",
|
||||
"data": {}
|
||||
},
|
||||
"version_created": {
|
||||
"status": "passed",
|
||||
"at": "2025-12-18T02:39:50.713177",
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DESIGNING": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"design_document_created": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"design_validated": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"tasks_generated": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"AWAITING_DESIGN_APPROVAL": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"design_approved": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"IMPLEMENTING": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"all_layers_complete": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"build_passes": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"REVIEWING": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"review_script_run": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"all_files_verified": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"review_passed": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"SECURITY_REVIEW": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"security_scan_run": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"api_contract_validated": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"security_passed": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"AWAITING_IMPL_APPROVAL": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"implementation_approved": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"COMPLETING": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {
|
||||
"tasks_marked_complete": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
},
|
||||
"version_finalized": {
|
||||
"status": "pending",
|
||||
"at": null,
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"COMPLETED": {
|
||||
"status": "not_started",
|
||||
"entered_at": null,
|
||||
"completed_at": null,
|
||||
"checkpoints": {}
|
||||
}
|
||||
},
|
||||
"fix_loops": []
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
[
|
||||
{
|
||||
"path": "pp/page.tsx",
|
||||
"action": "modified",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".claude/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".eureka-active-session",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".mcp.json",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": ".workflow/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "CLAUDE.md",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/api/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/components/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/lib/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/login/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/register/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "app/tasks/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "project_manifest.json",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "skills/",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
},
|
||||
{
|
||||
"path": "start-workflow.sh",
|
||||
"action": "untracked",
|
||||
"summary": ""
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
{
|
||||
"feature": "a complete to earn app",
|
||||
"gathered_at": "2025-12-18",
|
||||
"mode": "auto",
|
||||
"requirements": {
|
||||
"earning_mechanisms": {
|
||||
"task_based": true,
|
||||
"learning_based": true,
|
||||
"game_based": false,
|
||||
"activity_based": false,
|
||||
"task_types": {
|
||||
"daily_checkins": true,
|
||||
"watch_ads": true,
|
||||
"surveys": true,
|
||||
"referrals": true
|
||||
},
|
||||
"learning_types": {
|
||||
"quizzes": true,
|
||||
"video_lessons": true,
|
||||
"reading_challenges": true,
|
||||
"flashcards": false
|
||||
}
|
||||
},
|
||||
"rewards": {
|
||||
"points_coins": true,
|
||||
"badges_achievements": true,
|
||||
"gift_cards": false,
|
||||
"cryptocurrency": false
|
||||
},
|
||||
"authentication": {
|
||||
"email_password": true,
|
||||
"social_login": false,
|
||||
"anonymous": false
|
||||
},
|
||||
"user_profile": {
|
||||
"points_balance_history": true,
|
||||
"leaderboard": true,
|
||||
"level_xp_system": false,
|
||||
"badge_showcase": false
|
||||
},
|
||||
"ui_style": "modern_dark_theme"
|
||||
},
|
||||
"acceptance_criteria": [
|
||||
"User can register with email and password",
|
||||
"User can log in and view their dashboard",
|
||||
"User can complete daily check-in to earn points",
|
||||
"User can watch video ads to earn points",
|
||||
"User can complete surveys to earn points",
|
||||
"User can refer friends and earn bonus points",
|
||||
"User can complete quiz challenges to earn points",
|
||||
"User can watch educational videos to earn points",
|
||||
"User can read articles and complete challenges to earn points",
|
||||
"User can view their points balance and transaction history",
|
||||
"User can earn badges for achievements",
|
||||
"User can see their position on the leaderboard",
|
||||
"App has modern dark theme UI"
|
||||
]
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
## Context Recovery - Resuming Previous Session
|
||||
|
||||
### Session Info
|
||||
- **Original Session**: compact_20251218_021138
|
||||
- **Captured At**: 2025-12-18T02:11:38.618766
|
||||
- **Context Usage**: 85.0%
|
||||
|
||||
### Workflow Position
|
||||
- **Phase**: UNKNOWN
|
||||
- **Active Task**: None
|
||||
- **Layer**: 1
|
||||
|
||||
### What Was Being Worked On
|
||||
- **Entity**: ()
|
||||
- **Action**: pending
|
||||
- **File**: None
|
||||
- **Progress**:
|
||||
|
||||
### Next Actions (Priority Order)
|
||||
|
||||
### Recent Changes
|
||||
- `pp/page.tsx` - modified:
|
||||
- `.claude/` - untracked:
|
||||
- `.eureka-active-session` - untracked:
|
||||
- `.mcp.json` - untracked:
|
||||
- `.workflow/` - untracked:
|
||||
- `CLAUDE.md` - untracked:
|
||||
- `app/api/` - untracked:
|
||||
- `app/components/` - untracked:
|
||||
- `app/lib/` - untracked:
|
||||
- `app/login/` - untracked:
|
||||
- `app/register/` - untracked:
|
||||
- `app/tasks/` - untracked:
|
||||
- `project_manifest.json` - untracked:
|
||||
- `skills/` - untracked:
|
||||
- `start-workflow.sh` - untracked:
|
||||
|
||||
---
|
||||
**Action Required**: Continue from the next action listed above.
|
||||
|
||||
To load full context, read the following files:
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"version": "v001",
|
||||
"feature": "a complete to earn app",
|
||||
"session_id": "workflow_20251218_013734",
|
||||
"parent_version": null,
|
||||
"status": "completed",
|
||||
"started_at": "2025-12-18T01:37:34.999814",
|
||||
"completed_at": "2025-12-18T02:16:34.986099",
|
||||
"current_phase": "COMPLETED",
|
||||
"approvals": {
|
||||
"design": {
|
||||
"status": "approved",
|
||||
"approved_by": "auto",
|
||||
"approved_at": "2025-12-18T01:55:00Z",
|
||||
"rejection_reason": null
|
||||
},
|
||||
"implementation": {
|
||||
"status": "approved",
|
||||
"approved_by": "auto",
|
||||
"approved_at": "2025-12-18T02:16:34.986102",
|
||||
"rejection_reason": null
|
||||
}
|
||||
},
|
||||
"task_sessions": [],
|
||||
"summary": {
|
||||
"total_tasks": 40,
|
||||
"tasks_completed": 40,
|
||||
"entities_created": 40,
|
||||
"entities_updated": 0,
|
||||
"entities_deleted": 0,
|
||||
"files_created": 40,
|
||||
"files_updated": 0,
|
||||
"files_deleted": 0
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"project": {
|
||||
"name": "todo-super",
|
||||
"version": "0.1.0",
|
||||
"description": "A complete earn-to-play app",
|
||||
"tech_stack": {
|
||||
"framework": "Next.js 16",
|
||||
"language": "TypeScript",
|
||||
"styling": "Tailwind CSS 4",
|
||||
"runtime": "React 19"
|
||||
}
|
||||
},
|
||||
"state": {
|
||||
"current_phase": "DESIGN_PHASE",
|
||||
"last_updated": "2025-12-18"
|
||||
},
|
||||
"entities": {
|
||||
"components": [],
|
||||
"pages": [],
|
||||
"api_endpoints": [],
|
||||
"data_models": []
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_auth_login",
|
||||
"type": "create",
|
||||
"title": "Create api_auth_login",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_auth_login",
|
||||
"entity_ids": [
|
||||
"api_auth_login"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_auth_login.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.724887"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_auth_me",
|
||||
"type": "create",
|
||||
"title": "Create api_auth_me",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_auth_me",
|
||||
"entity_ids": [
|
||||
"api_auth_me"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_auth_me.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.724946"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_auth_register",
|
||||
"type": "create",
|
||||
"title": "Create api_auth_register",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_auth_register",
|
||||
"entity_ids": [
|
||||
"api_auth_register"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_auth_register.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725003"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_leaderboard",
|
||||
"type": "create",
|
||||
"title": "Create api_leaderboard",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_leaderboard",
|
||||
"entity_ids": [
|
||||
"api_leaderboard"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_leaderboard.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725061"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_quizzes_get",
|
||||
"type": "create",
|
||||
"title": "Create api_quizzes_get",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_quizzes_get",
|
||||
"entity_ids": [
|
||||
"api_quizzes_get"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_quizzes_get.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725120"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_quizzes_submit",
|
||||
"type": "create",
|
||||
"title": "Create api_quizzes_submit",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_quizzes_submit",
|
||||
"entity_ids": [
|
||||
"api_quizzes_submit"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_quizzes_submit.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725176"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_referrals_claim",
|
||||
"type": "create",
|
||||
"title": "Create api_referrals_claim",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_referrals_claim",
|
||||
"entity_ids": [
|
||||
"api_referrals_claim"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_referrals_claim.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725232"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_referrals_create",
|
||||
"type": "create",
|
||||
"title": "Create api_referrals_create",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_referrals_create",
|
||||
"entity_ids": [
|
||||
"api_referrals_create"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_referrals_create.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725285"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_tasks_checkin",
|
||||
"type": "create",
|
||||
"title": "Create api_tasks_checkin",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_tasks_checkin",
|
||||
"entity_ids": [
|
||||
"api_tasks_checkin"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_tasks_checkin.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725338"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_tasks_complete",
|
||||
"type": "create",
|
||||
"title": "Create api_tasks_complete",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_tasks_complete",
|
||||
"entity_ids": [
|
||||
"api_tasks_complete"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_tasks_complete.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725390"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_tasks_list",
|
||||
"type": "create",
|
||||
"title": "Create api_tasks_list",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_tasks_list",
|
||||
"entity_ids": [
|
||||
"api_tasks_list"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_tasks_list.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725451"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_users_badges",
|
||||
"type": "create",
|
||||
"title": "Create api_users_badges",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_users_badges",
|
||||
"entity_ids": [
|
||||
"api_users_badges"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_users_badges.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725510"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_api_users_points",
|
||||
"type": "create",
|
||||
"title": "Create api_users_points",
|
||||
"agent": "backend",
|
||||
"entity_id": "api_users_points",
|
||||
"entity_ids": [
|
||||
"api_users_points"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/api_users_points.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725565"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_component_auth_form",
|
||||
"type": "create",
|
||||
"title": "Create AuthForm",
|
||||
"agent": "frontend",
|
||||
"entity_id": "component_auth_form",
|
||||
"entity_ids": [
|
||||
"component_auth_form"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/component_auth_form.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725622"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_component_badge_card",
|
||||
"type": "create",
|
||||
"title": "Create BadgeCard",
|
||||
"agent": "frontend",
|
||||
"entity_id": "component_badge_card",
|
||||
"entity_ids": [
|
||||
"component_badge_card"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/component_badge_card.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725677"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_component_daily_checkin_button",
|
||||
"type": "create",
|
||||
"title": "Create DailyCheckinButton",
|
||||
"agent": "frontend",
|
||||
"entity_id": "component_daily_checkin_button",
|
||||
"entity_ids": [
|
||||
"component_daily_checkin_button"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/component_daily_checkin_button.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725731"
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"id": "task_create_component_dark_theme_layout",
|
||||
"type": "create",
|
||||
"title": "Create DarkThemeLayout",
|
||||
"agent": "frontend",
|
||||
"entity_id": "component_dark_theme_layout",
|
||||
"entity_ids": [
|
||||
"component_dark_theme_layout"
|
||||
],
|
||||
"status": "pending",
|
||||
"layer": 1,
|
||||
"parallel_group": "layer_1",
|
||||
"complexity": "medium",
|
||||
"dependencies": [],
|
||||
"context": {
|
||||
"design_version": 1,
|
||||
"workflow_version": "v001",
|
||||
"context_snapshot_path": ".workflow/versions/v001/contexts/component_dark_theme_layout.yml"
|
||||
},
|
||||
"created_at": "2025-12-18T01:57:52.725786"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue