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.
Pipeline stages:
- 1. Strategy: Codebase evaluation, architecture analysis, and complexity assessment before a line is written.
- 2. Requirements: Every feature is documented with explicit acceptance criteria and data-testid selectors before implementation begins.
- 3. Requirements Audit (Quality Gate): A dedicated auditor agent reviews the requirements document. No implementation starts until status is APPROVED.
- 4. Implementation: Test-driven development with Vitest. Tests are written first; implementation follows the red-green-refactor cycle.
- 5. Implementation Audit (Quality Gate): The implementation auditor reviews all code changes. Codex CLI runs automated quality analysis. Must reach 10/10 before testing.
- 6. Testing: Playwright E2E tests for every user-visible change. 100% pass rate required — partial passes are not accepted.
- 7. Pull Request: PR created via Bitbucket API after all gates pass. Pipeline checkpoint verification runs before the branch is submitted.
Codebase evaluation, architecture analysis, and complexity assessment before a line is written.
Every feature is documented with explicit acceptance criteria and data-testid selectors before implementation begins.
A dedicated auditor agent reviews the requirements document. No implementation starts until status is APPROVED.
Test-driven development with Vitest. Tests are written first; implementation follows the red-green-refactor cycle.
The implementation auditor reviews all code changes. Codex CLI runs automated quality analysis. Must reach 10/10 before testing.
Playwright E2E tests for every user-visible change. 100% pass rate required — partial passes are not accepted.
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.
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.
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.
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.
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.
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.
Full quality-gate workflow for production features.
Use when: building any new feature or significant change
Rapid iteration without full gates.
Use when: prototyping, quick fixes, UI polish with low risk
Analysis and investigation, no code changes.
Use when: exploring options before committing to implementation
Emergency production fix with minimal pipeline stages.
Use when: production is down or critically impaired
Structured bug fix with full audit trail.
Use when: fixing a documented defect in a non-emergency context
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.
Complete design system from brand DNA to built prototype
Use when: New project or full visual direction change
Visual refresh of existing design
Use when: Aesthetic update with existing component structure
Add component to existing design system
Use when: New UI element that must match existing system
Update design tokens only
Use when: Color palette or typography update without structural changes
Art Director
Aesthetic direction
Design System Architect
Design tokens and systems
Layout Architect
Page-level structure
Responsive Strategist
Breakpoint behavior
Component Designer
UI component specs
Animation Choreographer
Motion and transitions
Voice Strategist
UX writing and microcopy
Visualization Architect
Data visualization design
Design Auditor
Design artifact review
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.
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.
Flag: api_changes: true
Condition: API endpoint changes detected
Agent: API Contract Designer
Role: OpenAPI specification, endpoint versioning
Flag: db_changes: true
Condition: Database schema changes detected
Agent: Database Architect
Role: Schema design, migration planning
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.
Audit Rejection Loop
- CONDITIONAL/REJECTED received from audit
- Extract CRITICAL/HIGH issues from audit report JSON
- Delegate fix to Implementation Agent with specific file paths
- Re-audit after fixes applied
- Repeat up to 3 iterations
- Escalate to human after max iterations
CI Failure Remediation
- CI fails post-merge to staging
- Trigger file written to .prism/remediation/pending/
- Strategy Agent analyzes root cause
- Implementation Agent applies targeted fix
- Tests re-run to verify resolution
Session Recovery
- Context compaction occurs mid-pipeline
- Resume script reads disk state from PIPELINES.json
- Pipeline continues from last checkpoint
- 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.
Pipeline runs against real codebases, generating lifecycle events at every stage from strategy through PR creation.
Lifecycle events, timing data, and audit results are captured in structured JSON and committed alongside the code they describe.
Pattern analysis across all projects identifies recurring failures, common refactoring targets, and high-confidence best practices.
High-confidence patterns auto-create TECH-DEBT entries, memory-file updates, and agent-configuration refinements without manual intervention.
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.
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.