Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

superspec-ai-workflow β€” AI-Driven Development Blueprint

AI-Assisted Monorepo Development Workflow
Blueprint for building multi-platform applications using OpenCode + OMO + OpenSpec + Superpowers

Projects β€’ Tech Stack β€’ Features β€’ Quick Start β€’ Architecture β€’ AI Workflow


Overview

This repository demonstrates an AI-assisted development workflow for building multi-platform applications as a monorepo containing:

  • Mobile App β€” Cross-platform React Native app for end-users
  • Web Dashboard β€” Next.js admin panel
  • REST API β€” Go backend with Clean Architecture
  • API Collection β€” Bruno API testing collection (YAML-based, git-friendly)

The workflow itself β€” powered by OpenCode, OMO agent orchestration, OpenSpec change management, and Superpowers skills β€” is the main artifact. Fork this repo to bootstrap your own AI-driven development pipeline.


Projects

Project Technology Description
{project-name}-mobile React Native + TypeScript Mobile app for iOS/Android with role-based access
{project-name}-frontend Next.js + Tailwind CSS Web admin dashboard
{project-name}-backend Go + Gin + GORM REST API with Clean Architecture
{project-name}-bruno Bruno (YAML) API testing collection
{project-name}-regional Go Regional data service

Tech Stack

Backend

Component Technology
Language Go
Framework Gin
ORM GORM
Database PostgreSQL
Cache Redis
Search Typesense
Auth JWT (golang-jwt)
Push Firebase FCM
Storage AWS S3 / DigitalOcean Spaces / SeaweedFS

Mobile

Component Technology
Framework React Native CLI
Language TypeScript
UI React Native Paper
State Jotai (client) + TanStack Query (server)
Navigation React Navigation
Forms React Hook Form + Zod
Storage MMKV
Maps React Native Maps
Camera Vision Camera

Frontend

Component Technology
Framework Next.js
Language TypeScript
Styling Tailwind CSS
Components shadcn/ui (Radix UI)
State Redux Toolkit + RTK Query
Forms React Hook Form + Zod
Charts Chart.js
Testing Jest + Playwright

Features

AI-Assisted Development Workflow

Capability Tooling Benefit
Intent-Based Planning Prometheus agent + OpenSpec propose Specs written before code
Parallel Research Explore + Librarian agents 3-5 parallel codebase searches
Skill-Guided Execution Superpowers (TDD, debugging, etc.) Repeatable quality
Evidence-Based Verification Build + test + manual QA No claims without proof
Change Audit Trail OpenSpec archive Every change documented
Token Optimization RTK + OMNI + Caveman stack 60-90% context savings

AI Workflow Roles

Role Agent Responsibility
Orchestrator Sisyphus Decompose, delegate, verify β€” never executes directly
Strategic Planner Prometheus Interview, explore, produce detailed plans
Master Executor Atlas Execute verified plans with checkpoints
Research Explore / Librarian Codebase grep, external reference search
Reviewer Momus / Metis / Oracle Plan validation, code review, gap analysis
Deep Worker Hephaestus End-to-end for architectural work

Quick Start

Prerequisites

  • Node.js >= 18
  • Go >= 1.25
  • PostgreSQL >= 14
  • Redis >= 7
  • Docker (optional, for local services)
  • OpenCode (or Claude Code) β€” AI coding agent
  • OpenSpec CLI β€” change management

1. Clone & Fork

git clone <repository-url>
cd {project-name}

2. Install AI Workflow Tooling

# OpenCode
npm install -g @opencode/cli

# OpenSpec
npm install -g openspec

# Verify
opencode --version
openspec --version

3. Initialize Project-Specific Skills

# Bootstrap AI workflow configuration
# Modify .agents/skills/ and .agents/rules/ for your project

# See AGENTS.md for full setup guide

4. Setup Backend

cd {project-name}-backend

# Copy environment
cp env.example .env

# Install dependencies
go mod download

# Run with Docker Compose (PostgreSQL + Redis + Typesense)
docker-compose -f docker-compose.local.yml up -d

# Run migrations
./scripts/migrate-local.sh

# Run seeders
./scripts/seeder-local.sh

# Start server
./scripts/run-local.sh

5. Setup Mobile

cd {project-name}-mobile

# Install dependencies
yarn install

# iOS setup (macOS only)
cd ios && bundle exec pod install && cd ..

# Create environment
cp .env.example .env

# Start Metro
yarn start

# Run on Android
yarn android

# Run on iOS
yarn ios

6. Setup Frontend

cd {project-name}-frontend

# Install dependencies
npm install

# Create environment
cp .env.development .env.local

# Run development server
npm run dev

7. API Testing (Bruno)

# Install Bruno
brew install --cask bruno  # macOS

# Open collection
bruno open {project-name}-bruno

Architecture

Backend (Clean Architecture)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      cmd/                                   β”‚
β”‚  β”œβ”€β”€ server/     # Main API server                          β”‚
β”‚  β”œβ”€β”€ migrator/   # Database migrations                      β”‚
β”‚  └── seeder/     # Database seeders                         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    internal/                                β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚  handler/   β”‚  β”‚  service/   β”‚  β”‚ repository/ β”‚         β”‚
β”‚  β”‚  (HTTP)     │──│  (Business) │──│  (Data)     β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚         β”‚                β”‚                β”‚                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚   dto/      β”‚  β”‚   domain/   β”‚  β”‚ middleware/ β”‚         β”‚
β”‚  β”‚ (Requests)  β”‚  β”‚  (Models)   β”‚  β”‚  (Auth/RBAC)β”‚         β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Mobile (Feature-Based)

src/
β”œβ”€β”€ core/                    # Infrastructure & shared code
β”‚   β”œβ”€β”€ libs/               # Third-party setups
β”‚   β”œβ”€β”€ services/           # API services
β”‚   β”œβ”€β”€ states/             # Jotai + TanStack Query
β”‚   └── styles/             # Design tokens
β”‚
└── features/               # Domain modules
    β”œβ”€β”€ auth/              # Authentication
    β”œβ”€β”€ main-module/       # Primary domain
    β”œβ”€β”€ billing/           # Finance
    └── ...                # Feature modules

Frontend (App Router)

app/
β”œβ”€β”€ (auth)/                # Auth routes (no sidebar)
β”œβ”€β”€ dashboard/            # Role-based dashboard
β”œβ”€β”€ module-one/           # Module group
β”œβ”€β”€ module-two/           # Module group
└── ...                   # Feature modules

API Documentation

Swagger UI

Interactive API docs available at:

http://localhost:8080/swagger/index.html

API Versions

Version Base Path Purpose
v1 /api/v1/* Web dashboard endpoints
Mobile v1 /api/mobile/v1/* Mobile-optimized endpoints

Documentation

Project Documentation

Document Location Description
Backend README {project-name}-backend/README.md Backend development guide
Mobile README {project-name}-mobile/README.md Mobile development guide
Frontend README {project-name}-frontend/README.md Web dashboard guide
Bruno README {project-name}-bruno/README.md API testing guide

AI Development Guidelines

AI Workflow Architecture

This project uses an AI-driven development workflow powered by OpenCode + OMO + OpenSpec + Superpowers:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    AI WORKFLOW STACK                        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚  β”‚   User      │───→│  Sisyphus   │───→│   Plan      β”‚     β”‚
β”‚  β”‚  Request    β”‚    β”‚  (Orchestrator)   β”‚  Agent      β”‚     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                              β”‚                  β”‚            β”‚
β”‚                              β–Ό                  β–Ό            β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚
β”‚                    β”‚    Intent Classification          β”‚     β”‚
β”‚                    β”‚    Skill Loading (mandatory)      β”‚     β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚
β”‚                              β”‚                               β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚
β”‚              β–Ό               β–Ό               β–Ό               β”‚
β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚
β”‚      β”‚ Research β”‚   β”‚  Plan    β”‚   β”‚ Execute  β”‚            β”‚
β”‚      β”‚ (explore)β”‚   β”‚ (Prometheus)β”‚  β”‚(Sisyphus-β”‚            β”‚
β”‚      β”‚(librarian)β”‚  β”‚          β”‚   β”‚  Junior) β”‚            β”‚
β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜            β”‚
β”‚                          β”‚              β”‚                   β”‚
β”‚                          β–Ό              β–Ό                   β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚              β”‚    Parallel Task Delegation          β”‚       β”‚
β”‚              β”‚    category + skills per task        β”‚       β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚                              β”‚                               β”‚
β”‚                              β–Ό                               β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚              β”‚    Evidence-Based Verification       β”‚       β”‚
β”‚              β”‚    Build β†’ Test β†’ Manual QA          β”‚       β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚                              β”‚                               β”‚
β”‚                              β–Ό                               β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”       β”‚
β”‚              β”‚    OpenSpec Archive                  β”‚       β”‚
β”‚              β”‚    Change finalized & documented     β”‚       β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜       β”‚
β”‚                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Workflow Steps

Step Tool Purpose
1. Propose /opsx:propose (OpenSpec) Structured change proposal with specs, design, task decomposition
2. Explore task(subagent_type="explore") Parallel codebase research (3-5 agents)
3. Plan task(subagent_type="plan") (Prometheus) Task decomposition with dependency graph
4. Apply /opsx:apply (OpenSpec) Delegated execution via category + skills
5. Verify verification-before-completion skill Build + test + manual QA evidence
6. Archive /opsx:archive (OpenSpec) Change finalized with audit trail

Example Outputs

Token Optimization Stack

Three-layer optimization keeps context efficient:

Layer Tool Savings
RTK rtk <cmd> 60-90% on CLI I/O
OMNI Output filtering Strips noise, keeps signal
Caveman Compressed prose ~75% on AI communication

Development Commands

Backend

cd {project-name}-backend

# Run server
./scripts/run-local.sh

# Run migrations
./scripts/migrate-local.sh

# Run seeders
./scripts/seeder-local.sh

# Build binary
go build -o server ./cmd/server

Mobile

cd {project-name}-mobile

# Start Metro
yarn start

# Run Android
yarn android

# Run iOS
yarn ios

# Build APK
yarn build:apk

# Lint
yarn lint

Frontend

cd {project-name}-frontend

# Dev server
npm run dev

# Build
npm run build

# Lint
npm run lint

# Test
npm test

Project Structure

{project-name}/
β”œβ”€β”€ {project-name}-backend/       # Go REST API
β”‚   β”œβ”€β”€ cmd/                 # Entry points
β”‚   β”œβ”€β”€ internal/            # Application code
β”‚   β”œβ”€β”€ migrations/          # SQL migrations
β”‚   β”œβ”€β”€ scripts/             # Dev scripts
β”‚   └── docs/                # API docs
β”‚
β”œβ”€β”€ {project-name}-mobile/       # React Native app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ core/           # Infrastructure
β”‚   β”‚   └── features/       # Domain modules
β”‚   β”œβ”€β”€ ios/                # iOS native
β”‚   └── android/            # Android native
β”‚
β”œβ”€β”€ {project-name}-frontend/     # Next.js web dashboard
β”‚   β”œβ”€β”€ app/                # App Router
β”‚   β”œβ”€β”€ components/         # React components
β”‚   β”œβ”€β”€ lib/                # Utilities
β”‚   └── data/               # Configurations
β”‚
β”œβ”€β”€ {project-name}-bruno/        # Bruno API collection
β”‚   β”œβ”€β”€ environments/       # API environments
β”‚   β”œβ”€β”€ auth/               # Auth endpoints
β”‚   └── Mobile App/         # Mobile endpoints
β”‚
β”œβ”€β”€ {project-name}-regional/  # Regional data service
β”‚
β”œβ”€β”€ .agents/                 # AI development rules & skills
β”‚   β”œβ”€β”€ rules/              # Coding constraints
β”‚   └── skills/             # Task templates
β”‚
β”œβ”€β”€ notes/                   # Project documentation
β”‚   β”œβ”€β”€ docs/               # Reference docs
β”‚   └── archives/           # Legacy docs
β”‚
└── README.md               # This file

Docker Services

Local Development

cd {project-name}-backend

# Start all services
docker-compose -f docker-compose.local.yml up -d

# Services started:
# - PostgreSQL (port 5432)
# - Redis (port 6379)
# - Typesense (port 8108)
# - SeaweedFS (port 8333)

Production

# Backend
docker-compose up -d

# Frontend
cd {project-name}-frontend
docker-compose -f docker-compose-prd.yml up -d

Adapting This Blueprint

This repository is a workflow blueprint, not a fixed product. To adapt it for your own project:

  1. Replace {project-name} throughout with your project's identifier
  2. Update .agents/rules/ β€” coding constraints for your tech stack
  3. Update .agents/skills/ β€” skill definitions for your domain
  4. Modify AGENTS.md β€” agent directives for your architecture
  5. Swap example docs in docs/ with your own OpenSpec changes
  6. Keep the AI workflow infrastructure β€” it's the main value

The AI workflow (OMO + OpenSpec + Superpowers) is framework-agnostic. It works for any language, any stack, any team size.


License

MIT β€” See LICENSE for details.


superspec-ai-workflow β€” AI-Driven Development Blueprint
Built with OpenCode β€’ OMO β€’ OpenSpec β€’ Superpowers

About

πŸš€ AI-driven development workflow blueprint for multi-platform monorepos. Powered by OpenCode, OMO, OpenSpec, and Superpowers.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors