Documentation Index
Fetch the complete documentation index at: https://mintlify.com/thiagofinch/mega-brain/llms.txt
Use this file to discover all available pages before exploring further.
JARVIS
Just Advanced Reasoning Virtual Intelligent System JARVIS is the meta-agent orchestrator that manages workflows, preserves context, handles errors, and ensures zero information loss.Architecture
Core Principles
1. Context is Sacred
Every bit of information is preserved, categorized, and accessible.Implementation:
STATE.jsonupdated after every significant actionCONTEXT-STACK.jsonmaintains last 50 contexts- Full session logs in
SESSION-*.md
2. Errors are Opportunities
Every error becomes diagnosis, every diagnosis becomes prevention.Implementation:
- Minimum 3 retry attempts before escalation
- Error patterns logged to
PATTERNS/ERRORS.yaml - Auto-generated solutions for recurring errors
3. Autonomy with Transparency
Makes decisions independently but communicates everything clearly.Implementation:
- All decisions logged to
DECISIONS-LOG.md - Human-readable decision rationale
- Rollback support for any decision
4. Continuous Improvement
Detects patterns, creates rules, updates protocols automatically.Implementation:
- Pattern detection across sessions
- Auto-rule generation from repeated patterns
- CLAUDE.md updates when threshold reached
5. Zero Waste
No file skipped, no insight lost, no context forgotten.Implementation:
- Comprehensive file tracking
- Insight attribution to source chunks
- Cross-reference validation
STATE.json
CRITICAL file that tracks current system state. Structure:IDLE: No active workflowPROCESSING: Workflow in progressPAUSED: User-pausedERROR: Error recovery modeCOMPLETE: Workflow finished
Commands
/jarvis
Activate JARVIS and show current state./jarvis status
Detailed system state.- Full workflow state
- All pending items
- Recent decisions (last 10)
- Checkpoint history
- Error log (if any)
- Performance metrics
/jarvis resume
Continue from last checkpoint.- Loads
last_checkpointfrom STATE.json - Restores context and inputs
- Continues workflow from interruption point
- Validates integrity before proceeding
/jarvis checkpoint
Create manual snapshot.CP-{timestamp}-{label}.jsonin.claude/jarvis/CHECKPOINTS/- Full state snapshot including context
- Artifact list for rollback reference
/jarvis rollback
Restore from specific checkpoint.- Loads checkpoint state
- Restores artifacts if available
- Updates STATE.json to checkpoint state
- Logs rollback action to DECISIONS-LOG.md
/jarvis diagnose
Run complete system health check.State Integrity
State Integrity
- STATE.json valid JSON
- All referenced files exist
- No orphaned references
- Version consistency
Workflow Health
Workflow Health
- Current workflow can resume
- No stuck processes
- Checkpoint validity
- Input/output integrity
Registry Consistency
Registry Consistency
- ENTITY-REGISTRY.json valid
- AGENT-INDEX.yaml synced
- No duplicate entities
- Foreign keys valid
Artifact Completeness
Artifact Completeness
- All state files present
- Schema validation passes
- No missing chunks/insights
- Cross-references resolve
Performance
Performance
- Processing time trends
- Error rate
- Retry count
- Memory usage
/jarvis log
Show session log.- Timestamped action log
- Decisions made
- Errors encountered (with recovery)
- Checkpoints created
/jarvis decisions
List all autonomous decisions./jarvis suggest
Show improvement suggestions./jarvis pending
Show items needing resolution.Protocols
GUARDIAN
When: Before phase transition Purpose: Validate prerequisites Checks:- Previous phase completed successfully
- Required inputs present
- Quality gates passed
- No blocking errors
DETECTIVE
When: Error detected Purpose: Diagnose and resolve Process:CONTEXT-KEEPER
When: Every message Purpose: Preserve conversation context Actions:- Update CONTEXT-STACK.json
- Maintain last 50 contexts
- Cross-reference with STATE.json
- Enable perfect resume from any point
EXPANSION
When: New capability needed Purpose: Grow system organically Process:- Detect recurring pattern (5+ occurrences)
- Propose new task/workflow/agent
- Human approval required
- Implement and test
- Update documentation
SYSTEM-UPGRADE
When: Pattern becomes rule Purpose: Codify learnings Trigger: 10+ instances of same decision Actions:- Create rule in
PATTERNS/RULES.yaml - Update CLAUDE.md if necessary
- Notify user of system evolution
Anti-Patterns (Prohibited)
See Also
- Workflows - JARVIS-orchestrated workflows
- Tasks - Atomic task execution
- Slash Commands: /jarvis - Command reference
