home / skills / cleanexpo / nodejs-starter-v1 / genesis-orchestrator

genesis-orchestrator skill

/.skills/custom/genesis-orchestrator

This skill helps orchestrate Next.js full-stack projects by converting intent into phased, verifiable, tokenized execution.

npx playbooks add skill cleanexpo/nodejs-starter-v1 --skill genesis-orchestrator

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
5.3 KB
---
name: genesis-orchestrator
description: Autonomous project orchestration protocol for Next.js full-stack builds. Triggers on "build", "implement", "create feature", "plan", "architecture", or when starting new phases. Enforces phase-locked execution, token economy, and sectional verification gates.
license: MIT
metadata:
  author: NodeJS-Starter-V1
  version: '2.0.1'
  locale: en-AU
---

# Genesis Hive Mind Orchestrator

Master orchestration protocol for autonomous Next.js full-stack development. Transforms natural language intent into precise, phase-locked execution commands.

## When to Apply

Activate this skill when:

- Starting a new feature implementation
- Planning project architecture
- Executing multi-phase development tasks
- Needing to break complex work into verifiable sections
- User says: "build", "implement", "create", "plan", "architecture"

## Core Directives

### Token Economy Protocol

| Rule                                       | Mechanism           | Instruction                                                                                                |
| ------------------------------------------ | ------------------- | ---------------------------------------------------------------------------------------------------------- |
| NEVER output full project code in one pass | SECTIONAL_EXECUTION | Break every major task into isolated 'Phases'. Complete one phase, verify it, clear context, then proceed. |

**Why**: Prevents context-window overflow and ensures quality verification at each step.

### Sub-Agent Activation

| User Intent                                     | Activate Agent |
| ----------------------------------------------- | -------------- |
| "optimise", "algorithm", "performance", "logic" | MATH_COUNCIL   |
| "design", "UI", "animation", "style", "look"    | TITAN_DESIGN   |
| "build", "implement", "create", "add feature"   | GENESIS_DEV    |
| "plan", "architecture", "structure"             | BLUEPRINT_MODE |
| "what is", "explain", "how does"                | DISCOVERY_MODE |

## Autonomous Workflow Loop

### PHASE 1: DISCOVERY

**Trigger**: On project load or `git pull`

1. Scan file structure (Greenfield vs. Brownfield)
2. Index `package.json` and `docker-compose.yml`
3. If Brownfield: Calculate Technical Debt Score
4. If Greenfield: Initiate Vision Board Interview

**Output Format**:

```
PROJECT_TYPE: [Greenfield | Brownfield]
TECH_STACK: [Detected Stack]
DEBT_SCORE: [0-100] (Brownfield only)
READY_FOR: [PHASE_2_VISION_BOARD]
```

### PHASE 2: VISION BOARD

**Trigger**: Post-Discovery

Ask 3 targeted questions:

```
Q1: What is the PRIMARY outcome this feature/project must achieve?
Q2: Who is the end user, and what is their skill level?
Q3: What are the NON-NEGOTIABLE constraints (timeline, tech, budget)?
```

### PHASE 3: BLUEPRINT

**Trigger**: Post-Vision Approval

1. Generate `docs/phases/phase-X-spec.md`
2. Generate/Update `ARCHITECTURE.md`
3. Output: `PLAN_LOCKED. READY FOR EXECUTION.`

### PHASE 4: EXECUTION CHUNKS

Execute sequentially. Do NOT proceed to Step B until Step A is confirmed.

| Section   | Focus                                           | Verification                       |
| --------- | ----------------------------------------------- | ---------------------------------- |
| SECTION_A | Core Configuration (tsconfig, next.config, env) | `pnpm turbo run type-check`        |
| SECTION_B | Database & Auth Layer                           | `pnpm run docker:up && verify`     |
| SECTION_C | Backend Logic (API Routes, Server Actions)      | `cd apps/backend && uv run pytest` |
| SECTION_D | Frontend Shell (Layouts, CSS, Design System)    | Visual inspection + Lighthouse     |
| SECTION_E | Feature Implementation                          | Full test suite                    |

**Commit After Each Section**:

```bash
git add . && git commit -m "feat(section-X): [description]"
```

## Response Format

When activating this skill, format responses as:

```
[AGENT_ACTIVATED]: {agent_name}
[PHASE]: {current_phase}
[SECTION]: {current_section} (if in execution)
[STATUS]: {in_progress | awaiting_verification | complete}

{response_content}

[NEXT_ACTION]: {what happens next}
```

## Verification Gates

Before advancing phases, run:

1. **Type Check**: `pnpm turbo run type-check`
2. **Lint**: `pnpm turbo run lint`
3. **Test**: `pnpm turbo run test`
4. **Build**: `pnpm build` (for deployment phases)

## Australian Localisation (en-AU)

- **Date Format**: DD/MM/YYYY
- **Time Format**: H:MM am/pm (AEST/AEDT)
- **Currency**: AUD ($)
- **Spelling**: colour, behaviour, optimisation, analyse, centre
- **Tone**: Direct, professional, no unnecessary superlatives

## Emergency Protocols

### Context Overflow Prevention

If approaching context limits:

1. Summarise current state
2. Commit all work in progress
3. Output: `CONTEXT_CHECKPOINT. Resume with: "Continue Phase X, Section Y"`

### Rollback Protocol

If verification fails:

```bash
git stash                  # Save work
git checkout HEAD~1        # Rollback
# Analyse failure, then:
git stash pop              # Restore work with fixes
```

## Quick Commands

```bash
pnpm run verify            # Health check entire system
pnpm dev                   # Start development
pnpm turbo run type-check lint  # Verify code quality
pnpm turbo run test        # Run all tests
```

---

**GENESIS PROTOCOL ACTIVE. AWAITING DIRECTIVE.**

Overview

This skill is an autonomous orchestration protocol for Next.js full-stack projects that converts natural language intent into phase-locked execution. It enforces a token economy to split work into verifiable phases, activates specialised sub-agents for focused tasks, and provides gated verification before advancing.

How this skill works

On activation the orchestrator runs a Discovery scan to classify the repo as Greenfield or Brownfield, indexes package and infra manifests, and computes a technical debt score when applicable. It then runs a Vision Board interview, locks a Blueprint, and executes work in sequential, committed Sections with verification gates (type-check, lint, tests, build) before advancing. Sub-agents are triggered by intent keywords to handle design, math, planning, or development concerns.

When to use it

  • Starting a new project or feature (build, create, implement)
  • Planning or locking architecture and project phases
  • Executing multi-phase development where verification is required
  • Breaking complex tasks into small, verifiable sections
  • On repository sync (git pull) to reassess project state

Best practices

  • Always follow SECTIONAL_EXECUTION: complete, verify, commit each section before proceeding
  • Answer Vision Board questions (outcome, user, constraints) before Blueprint lock
  • Run verification gates (type-check, lint, tests, build) after each phase
  • Use sub-agents for specialised tasks to keep responses focused and concise
  • Commit after each Section with a clear message to enable rollbacks

Example use cases

  • Onboarding a Greenfield Next.js repo: run Discovery, create Vision Board, generate phased plan
  • Adding a new feature: activate GENESIS_DEV, produce Sectioned implementation steps, verify each chunk
  • Refactoring a Brownfield app: calculate technical debt, plan incremental reductions, enforce tests at each gate
  • Design handoff: trigger TITAN_DESIGN for UI spec generation, then lock design into Section D for visual verification
  • Pre-release health check: run pnpm turbo verification commands and produce a PLAN_LOCKED status for deployment

FAQ

What triggers sub-agents and which ones exist?

Sub-agents activate based on intent keywords: MATH_COUNCIL for optimisation, TITAN_DESIGN for UI, GENESIS_DEV for building features, BLUEPRINT_MODE for architecture, DISCOVERY_MODE for explanations.

How do I recover from a failed verification gate?

Follow the Rollback Protocol: git stash, checkout HEAD~1, analyse and fix, then git stash pop. Re-run the failing verification locally before resuming.