Skip to main content

Architecture & Concepts

Understand JARFIS core architecture: orchestration model, 11 agents, 9-phase pipeline, 3 human gates, state management, and the learning system.

Last updated: Sun Mar 15 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

How JARFIS orchestrates AI agents through structured phases — from triage to retrospective — with human oversight at every critical juncture.

The JARFIS Philosophy

JARFIS is built on a foundational set of principles that govern every design decision, from agent behavior to phase transitions. These principles aren't abstract ideals — they are enforced constraints embedded in the system.

Principle Zero
"Philosophy Over Implementation"

The Nine Principles

Nine core principles that guide every design decision in the system:

P1
Orchestration for All

Core
P2
Token Austerity

Quality
P3
Self-Evolution

Evolution
P4
Dialectic Quality

Quality
P5
AI-Native Artifacts

Evolution
P6
Abstraction over Memorization

Evolution
P7
Deterministic Foundation

Quality
P8
Human Gate, AI Execute

Core
P9
Resilient Continuity

Resilience

Productive Tensions

Intentional tensions exist between principles. This balance keeps the system healthy:

P3 Self-Evolution
P8 Human Gate
Autonomous evolution vs. human control points
P2 Token Austerity
P3 Self-Evolution
Token conservation vs. investment in learning
P4 Dialectic Quality
P1 Orchestration for All
Critical quality vs. accessibility simplification

The Orchestration Model

JARFIS follows a phase-gated orchestration model. Work flows through sequential phases, with human gates at critical decision points. The orchestrator manages state transitions and agent activation.

TriagePre-flightDiscoveryGate 1ArchUXGate 2ImplOpsReviewGate 3Retro

Key properties of the orchestration model:

  • Sequential phases — each phase must complete before the next begins
  • Conditional execution — Phase 3 (UX) only runs when UI changes are needed; Phase 4.5 (Ops) only for infrastructure changes
  • Type-based routing — Type A (simple fixes) skip directly to Phase 4; Type B (medium) start at Phase 1; Type C (complex) go through full pipeline
  • Gate reversibility — humans can send work back to earlier phases at any gate

The 11 Agent Roles

Each agent is a specialized role with defined responsibilities, activated only when the current phase requires its expertise. Agents are organized into four categories:

Planning & Design Agents

PO
Product Owner
Reverse-questions to clarify intent, Working Backwards press release, PRD authoring, scope negotiation
AR
Architect
Feasibility evaluation, impact analysis, architecture design, ADR (Architecture Decision Records)
TL
Tech Lead
API spec review, task breakdown, code review lead, retrospective facilitation
UX
UX Designer
Screen design, interaction design, SVG asset creation, design tokens (conditional — only when UI is needed)

Implementation Agents

BE
Backend Engineer
Server-side implementation, database schema, API endpoints, business logic
FE
Frontend Engineer
Client-side implementation, components, state management, UX implementation
DO
DevOps/SRE
Infrastructure, CI/CD pipelines, deployment configuration, monitoring setup

Quality & Review Agents

QA
QA Engineer
Test strategy, test implementation, QA verification, coverage analysis
SE
Security Engineer
Threat modeling, pre-review security analysis, security review, compliance checks

Dialectic Agents

ADV
Advocate
Argues for proposed solutions, defends trade-off decisions, presents benefits
CRT
Critic
Challenges assumptions, identifies risks and weaknesses, proposes alternatives

The 9-Phase Pipeline

The complete pipeline with phase responsibilities and gate positions:

T
Triage
Classify the request into Type A (simple), B (medium), or C (complex). Determines which phases to execute.
0
Pre-flight
Git sync, branch creation, load learning files (global learnings + project context), validate environment.
1
Discovery
PO runs reverse-questions, creates Working Backwards doc, writes PRD. Architect assesses feasibility.
Gate 1
Approve / Revise / Abort
2
Architecture & Planning
Impact analysis, architecture design, API spec, task breakdown, test strategy. ADV/CRT dialectic on key decisions.
3
UX Design
Screen design, SVG assets, design tokens. Conditional — only executes when UI changes are needed.
Gate 2
Approve / Revise / Abort
4
Implementation
BE/FE/DevOps parallel implementation. Each agent works within its domain, following API contracts from Phase 2.
4.5
Operational Readiness
Deployment strategy, rollback plan, monitoring, ops documentation. Conditional — only for infrastructure changes.
5
Review & QA
API contract verification, TL code review, QA testing, SE security review. All reviews must pass.
Gate 3
Approve / Revise & re-review / Abort / Revisit design
6
Retrospective
TL facilitates retrospective. Learnings are saved to global learnings and project context for future workflows.

State Management

JARFIS maintains workflow state through a structured state file that tracks:

  • Current phase — which phase is currently executing
  • Phase outputs — artifacts produced by each completed phase
  • Gate decisions — human decisions at each gate with timestamps
  • Agent activations — which agents have been activated and their outputs
  • Recovery checkpoints — snapshots for resuming interrupted workflows

State is persisted as JSON files in the .jarfis/ directory within your project. This enables workflow recovery after interruptions — you can resume exactly where you left off.

The Learning System

JARFIS implements a 3-block learning architecture that enables continuous improvement:

  • Global Learnings — cross-project patterns, best practices, and anti-patterns. Loaded in Phase 0 and updated in Phase 6.
  • Project Context — project-specific conventions, tech stack decisions, architectural patterns. Persists across workflows within the same project.
  • Workflow Memory — current workflow state, decisions made, and rationale. Ephemeral — lives only for the duration of the workflow.

This architecture means JARFIS gets better over time — it learns from past mistakes and successes, adapting its recommendations to your specific project context.

Next Steps