Workflows
Workflows orchestrate tasks into complete processing pipelines. All workflows are defined in YAML and executed by JARVIS.
Workflow Structure
Available Workflows
wf-pipeline-full
Complete 5-phase processing pipeline.
ID: wf-pipeline-full
Purpose: Transform raw content into structured knowledge, dossiers, and agent memories.
Stages:
Tasks:
TSK-001: Split content into semantic chunks (500-1500 words)
TSK-002: Generate chunk embeddings (Voyage)
TSK-003: Write CHUNKS-STATE.json
Output: /processing/chunks/{source-id}.jsonQuality Gate: QG-001
- Minimum 1 chunk
- No chunk > 2000 words
- Valid JSON schema
Show Stage 2: Entity Resolution
Tasks:
TSK-008: Normalize persons
TSK-012: Detect roles
TSK-015: Analyze themes
TSK-009: Update CANONICAL-MAP.json
Output: /processing/canonical/CANONICAL-MAP.jsonQuality Gate: QG-002
- All entities canonicalized
- No unresolved aliases
- Registry updated
Show Stage 3: Insight Extraction
Tasks:
TSK-018: Extract DNA layers (L1-L5)
TSK-019: Classify by priority (HIGH/MEDIUM/LOW)
TSK-020: Write INSIGHTS-STATE.json
Output: /processing/insights/INSIGHTS-STATE.jsonQuality Gate: QG-003
- Minimum 5 insights per person
- All insights have priority
- Source attribution complete
Show Stage 4: Narrative Synthesis
Tasks:
TSK-022: Synthesize person narratives
TSK-023: Synthesize theme narratives
TSK-024: Identify tensions and open loops
TSK-025: Write NARRATIVES-STATE.json
Output: /processing/narratives/NARRATIVES-STATE.jsonQuality Gate: QG-004
- Coherent narrative per person
- Patterns identified
- Tensions documented
Tasks:
TSK-028: Update agent memories
TSK-029: Create/update dossiers
TSK-030: Populate knowledge base
TSK-031: Update entity registry
TSK-032: Validate cascade completeness
Outputs:
/knowledge/dossiers/persons/{person}.md
/knowledge/dossiers/themes/{theme}.md
/knowledge/SOURCES/{source}/{category}/{topic}.md
/agents/{category}/{agent}/MEMORY.md
Quality Gate: QG-005
- All artifacts created
- Cross-references valid
- No orphaned data
Checkpoints:
- Created after each stage
- Stored in
/.claude/jarvis/CHECKPOINTS/
- Format:
CP-{timestamp}-{workflow-id}-{stage-id}.json
Resume:
Rollback:
Source: core/workflows/wf-pipeline-full.yaml:1-xxx
wf-ingest
Ingest new material into inbox.
ID: wf-ingest
Purpose: Download, transcribe, and organize external content.
Stages:
Show Stage 1: Acquisition
Tasks:
TSK-101: Download from URL (YouTube, Drive, etc.)
TSK-102: Copy local files to inbox
TSK-103: Generate source hash
Supported Sources:
- YouTube (video/audio)
- Google Drive (docs/folders)
- Local files (.txt, .md, .pdf, .docx, .mp3, .wav)
Show Stage 2: Transcription
Tasks:
TSK-110: Transcribe audio (Whisper)
TSK-111: Extract text from PDF/DOCX
TSK-112: Save as .txt in inbox
Requirements:
OPENAI_API_KEY for Whisper
Show Stage 3: Organization
Tasks:
TSK-120: Detect person from filename/content
TSK-121: Classify content type
TSK-122: Standardize filename (UPPERCASE)
TSK-123: Move to {PERSON}/{TYPE}/
TSK-124: Register in INBOX-REGISTRY.md
Filename Pattern: TOPIC-NAME [youtube-id].txt
Output: Organized file in inbox/{PERSON}/{TYPE}/{filename}.txt
Source: core/workflows/wf-ingest.yaml:1-xxx
Extract DNA from narratives and assign to agent.
ID: wf-extract-dna
Purpose: Create cognitive DNA structure (5 layers) for mind clones.
Stages:
Show Stage 1: DNA Extraction
Task: TSK-020 (extract-dna)Input: NARRATIVES-STATE.json for specific personOutput: DNA-CONFIG.yaml with 5 layers
Show Stage 2: Agent Assignment
Task: TSK-140 (trigger-agent)Checks:
- Does agent exist for this person?
- If yes: Update DNA reference
- If no: Check creation threshold
Threshold:
weighted_score >= 10
sources >= 2
Show Stage 3: Agent Creation (if triggered)
Task: TSK-141 (create-agent)Creates:
agents/minds/{person}/AGENT.md
agents/minds/{person}/SOUL.md
agents/minds/{person}/MEMORY.md
agents/minds/{person}/DNA-CONFIG.yaml
Updates:
agents/AGENT-INDEX.yaml
ENTITY-REGISTRY.json (has_agent: true)
Source: core/workflows/wf-extract-dna.yaml:1-xxx
wf-conclave
Multi-agent deliberation workflow.
ID: wf-conclave
Purpose: Constitutional decision-making with critic, advocate, and synthesizer.
Stages:
Show Stage 0: Constitutional Foundation
Task: TSK-200 (invoke-constitution)Principles:
- Empiricism (data over opinions)
- Pareto (80/20 leverage)
- Inversion (what causes failure?)
- Antifragility (benefit from volatility)
Task: TSK-201 (run-debate)Agents: Auto-selected by query relevance
- Financial question → CFO, CRO
- Sales question → CRO, CMO, Sales-Lead
- Operations → COO, CTO
Output: Structured debate log with positions
Task: TSK-202 (apply-critic)Agent: critico-metodologicoScoring (0-100):
- Premissas declaradas: /20
- Evidencias rastreaveis: /20
- Logica consistente: /20
- Cenarios alternativos: /20
- Conflitos resolvidos: /20
Output: Quality score + gaps identified
Show Stage 3: Devil's Advocate
Task: TSK-203 (apply-advocate)Agent: advogado-do-diaboOutputs:
- Weakest premise identified
- Undiscussed risk
- Regret scenario (12 months)
- Ignored alternative
Task: TSK-204 (synthesize-decision)Agent: sintetizadorOutputs:
- Unified recommendation
- Confidence score (0-100%)
- Residual risks + mitigations
- Next steps with owners
- Reversal criteria
Decision Logic:
- Confidence ≥ 60%: Recommend action
- Confidence < 60%: Escalate to human
Anti-loop Rule: Council runs once per query. No recursive re-runs.
Source: core/workflows/wf-conclave.yaml:1-xxx
Workflow Execution
Via JARVIS
Via Slash Command
Programmatic
Checkpointing
Automatic Checkpoints
Created after each stage:
Manual Checkpoints
Checkpoint Retention
- Last 10 checkpoints per workflow kept
- Older checkpoints archived to
.claude/jarvis/CHECKPOINTS/archive/
- Critical checkpoints (marked) never deleted
Error Handling
Retry Strategy
Failure Handlers
Rollback on Failure
Quality Gates
Each stage can define quality gates:
Failure Actions:
rollback: Restore from last checkpoint
retry: Retry stage up to max_attempts
skip: Skip stage and continue
abort: Abort entire workflow
Creating Workflows
Workflow Template
Validation
Registration
Add to core/workflows/README.md:
See Also