SuperAPI AI Directory

dev-pipeline

Agents & models

View repository

Updated 10-15 21:36

About this skill

Dev Pipeline v4

Full cycle: audit → plan → code → review → fix → result. Each phase -- status to user. They see what is happening.

When to use

  • The Prince gave a coding task (feature, bug, refactoring)
  • Task >5 lines of code
  • An audit is needed before changes

Roles

Role Who Model
Coordinator Sylvanas (me) Opus 4.6
Auditor Codex CLI GPT-5.5
Planner Codex CLI GPT-5.5
Coder Coder subagent Opus 4.6
Reviewer 1 Sylvanas Opus 4.6
Reviewer 2 Codex CLI GPT-5.5

Pipeline

Phase 1: AUDIT (Codex)

Status to user: [1/5] Аудит -- Codex анализирует текущее состояние

cd <git-repo-dir> && codex exec --model gpt-5.5 "Audit the current state of <target>. Report: architecture, dependencies, potential issues, risks." 2>&1

If not a git-repo -- pass the contents via stdin. Show the user brief findings (3-5 points).

Phase 2: PLAN (Codex)

Status to user: [2/5] План -- Codex проектирует решение

cd <git-repo-dir> && codex exec --model gpt-5.5 "Based on audit: <findings>. Task: <description>. Write implementation plan: files, changes, tests, risks." 2>&1

Show the plan to the user. Wait for approval. If they make adjustments -- update it.

Phase 3: CODE (Coder subagent)

Status to user: [3/5] Код -- Coder (Opus) реализует план

Agent(subagent_type="coder", prompt="<полное ТЗ с планом, файлами, конвенциями>")

If there are several independent tasks -- in parallel (max 5). Show the user: which subagents are launched, what they are doing.

Phase 4: CROSS-REVIEW (Claude + Codex)

Status to user: [4/5] Ревью -- Claude + Codex проверяют код

Claude: bugs, security, compliance with the plan, conventions. Codex: codex review --uncommitted or diff via stdin. Show the user: findings table.

Phase 5: FIX (if needed)

Status to user: [5/5] Фикс -- Coder исправляет N замечаний

Critical/warning: Agent(subagent_type="coder", prompt="Fix: <findings>") Info only: skip.

RESULT

Status to user: Готово

Final report: task, files, audit, review (critical/warning/info), tests, what to check.

Rules

  1. Status [N/5] at each phase
  2. Audit is mandatory
  3. Show the plan to the user, wait for approval
  4. Coder != reviewer
  5. Two reviewers (Claude + Codex) always
  6. Fix via coder, not myself
  7. Micro-fixes (<5 lines) -- without pipeline

Fast mode (1 file, <30 lines)

  1. I read the file myself (audit)
  2. Coder writes
  3. Claude review
  4. Done

Integration

Phase Superpowers skill
Plan writing-plans
Code (>3 tasks) subagent-driven-development
Code test-driven-development
Review requesting-code-review
Verification verification-before-completion
Merge finishing-a-development-branch
Debug systematic-debugging

Safe Deploy (mandatory contract as of 2026-04-17)

Reason: incident 2026-04-17 — HTML in cache referenced deleted chunks → 404 → Caddy in prod served them with max-age=31536000, immutable → the page is dead for a year in the student's browser.

Server side (Caddy)

For ANY site where there is handle /_next/static/* с header_down Cache-Control "...immutable":

# Ошибки НИКОГДА не immutable. Без defer Caddy пишет заголовок до статуса.
@errors status 4xx 5xx
header @errors Cache-Control "no-store, no-cache, must-revalidate" {
    defer
}

# HTML: всегда revalidate (свежие имена чанков)
@html_response header Content-Type "text/html*"
header @html_response Cache-Control "private, no-cache, must-revalidate" {
    defer
}

Hard rule: after any Caddy deploy — curl -I to a nonexistent static path. Expectation: no-store. If immutable — roll back immediately.

Client side (Next.js)

  1. app/global-error.tsx — catches ChunkLoadError, sessionStorage-guard against a loop, window.location.reload(). One reload per session.
  2. next.config.ts — deploymentId: process.env.EDGELAB_BUILD_ID. With Next 14.1.4, hard-nav on version mismatch.

deploy.sh (releases + symlink)

No rsync on top of current. Only:

  • releases/<sha>/ where we pour the build
  • ln -sfn releases/<sha> current.new && mv -T current.new current — atomic switch via rename(2)
  • pm2 reload (requires wait_ready в ecosystem.config.js)
  • We keep the last 5 releases: ls -1dt releases/* | tail -n +6 | xargs -r rm -rf
  • Rollback = one ln -sfn

Template: core/artifacts/deploy-safe.sh.

Rollout order

  1. Staging autonomously. Check smoke + curl -I for errors.
  2. Double review (Opus + Codex GPT-5.5).
  3. Prod — ONLY with an explicit “yes, to prod” from the user. Before deploy: restic snapshot to DO Spaces.
  4. After prod: check /, /dashboard, /auto-login?t=test, a nonexistent static — everything responds correctly and is cached according to the rules.