← Back to Prism

Under the Hood

The technical architecture of Prism: pipeline modes, cross-project learning, observability, and 75 slash commands.

How It Works

The pipeline that runs under every project we build

Every feature we build for clients runs through the same structured pipeline. There are no shortcuts for ‘simple’ features. There are no skipped stages when timelines get tight. The gates exist because production failures are more expensive than the time gates save.

1Strategy

Codebase evaluation, architecture analysis, and complexity assessment before a line is written.

2Requirements

Every feature is documented with explicit acceptance criteria and data-testid selectors before implementation begins.

3Requirements Audit

A dedicated auditor agent reviews the requirements document. No implementation starts until status is APPROVED.

4Implementation

Test-driven development with Vitest. Tests are written first; implementation follows the red-green-refactor cycle.

5Implementation Audit

The implementation auditor reviews all code changes. Codex CLI runs automated quality analysis. Must reach 10/10 before testing.

6Testing

Playwright E2E tests for every user-visible change. 100% pass rate required — partial passes are not accepted.

7Pull Request

PR created via Bitbucket API after all gates pass. Pipeline checkpoint verification runs before the branch is submitted.

Quality gates are not optional. There are no flags to skip them. No ‘docs-only’ exceptions. No ‘pre-existing issue’ carve-outs. Code that fails an audit gets fixed before it ships.

Quality Enforcement

9/10 is a rejection. Here is why.

Prism’s audit scoring rubric is automated and enforced by Codex CLI. No agent can override it. No human can bypass it. The only path to APPROVED is fixing every issue.

1.

10/10 APPROVED Requires Zero Issues

Any CRITICAL, HIGH, or MEDIUM issue prevents APPROVED status. The scoring rubric is deterministic: if Codex finds issues, the audit cannot pass regardless of subjective assessment.

2.

No Bypass Flags Exist

SKIP_QUALITY_GATES=1 does not exist. There is no --no-verify escape hatch. There is no “docs-only” exception. The only path forward is fixing the issue.

3.

CONDITIONAL is Not a Pass

CONDITIONAL with CRITICAL or HIGH issues triggers the same remediation loop as REJECTED. Only MEDIUM/LOW-only CONDITIONAL allows user deferral to TECH-DEBT.md.

4.

Codex CLI is Mandatory

Every audit must report CODEX_RAN: true. If Codex is unavailable, the audit returns STATUS: BLOCKED — not APPROVED. Audits without the mandatory field are auto-rejected.

Issue Severity
Status
Score Range

CRITICAL or HIGH present

REJECTED or CONDITIONAL

≤ 7/10

MEDIUM present (no CRITICAL/HIGH)

CONDITIONAL

8–9/10

Zero issues at all levels

APPROVED

10/10

Quality gates are not optional. There are no flags to skip them. No ‘docs-only’ exceptions. No ‘pre-existing issue’ carve-outs. Code that fails an audit gets fixed before it ships.

Operating Modes

Six modes. One framework.

Prism adapts to every development scenario — from full quality-gate pipelines to rapid prototyping and emergency hotfixes.

Pipeline

Full quality-gate workflow for production features.

Use when: building any new feature or significant change

Vibe

Rapid iteration without full gates.

Use when: prototyping, quick fixes, UI polish with low risk

Research

Analysis and investigation, no code changes.

Use when: exploring options before committing to implementation

Hotfix

Emergency production fix with minimal pipeline stages.

Use when: production is down or critically impaired

Bugfix

Structured bug fix with full audit trail.

Use when: fixing a documented defect in a non-emergency context

Scoped Project

Multi-REQ sequential pipeline driven by req-sequence.json.

Use when: implementing a predefined set of requirements in order

Design System

Design has its own pipeline. Separate from code.

Design is a first-class pipeline track in Prism. Nine specialist agents collaborate through up to 10 stages — from brand DNA extraction to built prototype — with dedicated audit gates before any frontend code is written.

9specialists
4modes
10stages max
FULL_DESIGN10 stages

Complete design system from brand DNA to built prototype

Use when: New project or full visual direction change

REDESIGN8 stages

Visual refresh of existing design

Use when: Aesthetic update with existing component structure

COMPONENT_ONLY5 stages

Add component to existing design system

Use when: New UI element that must match existing system

TOKEN_REFRESH2 stages

Update design tokens only

Use when: Color palette or typography update without structural changes

AD

Art Director

Aesthetic direction

DS

Design System Architect

Design tokens and systems

LA

Layout Architect

Page-level structure

RE

Responsive Strategist

Breakpoint behavior

CD

Component Designer

UI component specs

AN

Animation Choreographer

Motion and transitions

VS

Voice Strategist

UX writing and microcopy

VA

Visualization Architect

Data visualization design

DU

Design Auditor

Design artifact review

D7

Pre-Implementation Spec Audit

All design specs are audited before any frontend code is written. The Design Auditor validates token completeness, component spec coverage, and brand guide compliance.

D9

Two-Step Post-Implementation Audit

Testing Agent runs Playwright runtime verification against the built prototype, then the Design Auditor performs a full compliance audit incorporating runtime findings.

Adaptive Architecture

The pipeline reshapes itself around each task.

The Strategy Agent outputs structured trigger flags after analyzing each feature. The Orchestrator reads these flags to invoke specialist agents only when needed — keeping the pipeline lean for simple tasks and comprehensive for complex ones.

1

Flag: api_changes: true

Condition: API endpoint changes detected

Agent: API Contract Designer

Role: OpenAPI specification, endpoint versioning

2

Flag: db_changes: true

Condition: Database schema changes detected

Agent: Database Architect

Role: Schema design, migration planning

3

Flag: frontend_affected: true + needs_css_selectors: true

Condition: Frontend components with interactive elements detected (both flags must be true)

Agent: CSS Selector Documentation

Role: data-testid inventory for E2E tests

When none of these flags are true, those agents are not invoked. The pipeline stays lean.

Automated Recovery

When tests fail, Prism fixes before it escalates.

Prism has structured recovery paths for CI failures, audit rejections, deployment issues, and network interruptions. Each scenario follows a deterministic sequence before involving a human.

1

Audit Rejection Loop

  1. CONDITIONAL/REJECTED received from audit
  2. Extract CRITICAL/HIGH issues from audit report JSON
  3. Delegate fix to Implementation Agent with specific file paths
  4. Re-audit after fixes applied
  5. Repeat up to 3 iterations
  6. Escalate to human after max iterations
2

CI Failure Remediation

  1. CI fails post-merge to staging
  2. Trigger file written to .prism/remediation/pending/
  3. Strategy Agent analyzes root cause
  4. Implementation Agent applies targeted fix
  5. Tests re-run to verify resolution
3

Session Recovery

  1. Context compaction occurs mid-pipeline
  2. Resume script reads disk state from PIPELINES.json
  3. Pipeline continues from last checkpoint
  4. No user intervention required

3-iteration maximum. Then it escalates to a human.

Cross-Project Learning

Every pipeline run makes the next one smarter

Prism captures structured metrics from every pipeline execution across all active projects. Patterns that emerge in one codebase propagate as actionable guidance to every other project in the portfolio.

1
Execute

Pipeline runs against real codebases, generating lifecycle events at every stage from strategy through PR creation.

2
Collect

Lifecycle events, timing data, and audit results are captured in structured JSON and committed alongside the code they describe.

3
Detect

Pattern analysis across all projects identifies recurring failures, common refactoring targets, and high-confidence best practices.

4
Generate

High-confidence patterns auto-create TECH-DEBT entries, memory-file updates, and agent-configuration refinements without manual intervention.

5
Apply

Agents incorporate detected patterns into future sessions, adjusting code generation, audit criteria, and testing strategy based on cross-project intelligence.

N+1 Query Detection

Recurring N+1 query patterns detected across 3 projects → auto-generated TECH-DEBT.md entry with fix suggestion

Estimate Tracking

Actual vs. estimated implementation time tracked across 220+ requirements → timeline accuracy improvements over time

Failure Classification

Common audit rejection reasons classified and fed back into agent instructions to prevent recurrence

Code Intelligence

17 audit scripts. One mandatory standard.

Codex CLI is the automated code analysis layer underneath every Prism audit. It runs specialized scripts against each type of work — security, consistency, implementation quality, requirements, design, performance, and tech debt. The audit cannot succeed without it.

Audit Type
Script

Security audit

codex-security-review.sh

Pattern coherence

codex-consistency-check.sh

Implementation quality

codex-review.sh

Requirements quality

codex-audit-requirements.sh

Design compliance

codex-design-audit.sh

Performance baseline

codex-performance-review.sh

Tech debt assessment

codex-tech-debt-scan.sh

CODEX_RAN: true

CODEX_ISSUES: { CRITICAL: n, HIGH: n, MEDIUM: n, LOW: n }

STATUS: APPROVED | CONDITIONAL | REJECTED | BLOCKED

Missing any mandatory field triggers automatic audit rejection.

Real-Time Observability

Monitor active sessions, cost per hour, and pipeline health at a glance.

75 Skills. One Command Away.

The full Prism command library

Every development workflow has a slash command. From spinning up a full quality-gate pipeline to deploying across eight platforms, Prism’s skill library turns complex multi-step processes into single invocations.

/pipeline/vibe/research/bugfix/hotfix/scoped-project/start-feature/audit/verify-local/quality-gates/test/lint/design/design-token/component/design-audit/responsive/deploy/deploy-portainer/deploy-vercel/deploy-railway/docker/ci-bitbucket/git-workflow/bitbucket-pr/bitbucket-auth/branch-guard/memory/tech-stack/roadmap/readme/scope-doc/blog-write/client-comms/meeting-process