โโโโโโโโ โโโโโโโ โโโโโโโ โโโโโโโโโโโโ โโโโ โโโโโโ โโโโ โโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโ
โโโโโโ โโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โโโ
โโโโโโ โโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโ โโโโโโ โโโโโโ โโโโโโ
โโโ โโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโ โโโโโโ โโโโโ
4-layer cognitive pipeline ยท 52 tools ยท 22 engines ยท Built-in hallucination guard
Foreman is an autonomous AI software engineer that decomposes complex tasks through a 4-layer cognitive pipeline, executes them with real tools, verifies results against ground truth, and rolls back failures automatically.
It doesn't paste code and hope for the best. It thinks in layers, verifies against reality, and catches its own hallucinations before they reach your codebase.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ YOUR TASK โ
โ "Add dark mode with system preference sync" โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฎ VISIONER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Defines the soul of the change. Not features โ the FEELING. โ
โ Emotion target, focal point, color philosophy, forbidden list. โ
โ Budget: 5% of token window ยท Confidence threshold: 0.4+ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ๏ธ STRATEGIST โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Decomposes vision into execution blocks and atomic tasks. โ
โ Each block is a milestone. Each atom is one verifiable change. โ
โ Budget: 10% of token window ยท Confidence threshold: 0.3+ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ RESEARCHER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Gathers context. Reads files, greps code, searches the web. โ
โ Builds a knowledge base for the worker to act on. โ
โ Budget: 15% of token window ยท Confidence threshold: 0.2+ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐จ WORKER โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ Executes via 8-step protocol: โ
โ read โ context โ impact โ decide โ predict โ execute โ verify โ
โ โ report โ
โ Budget: 8K tokens/atom ยท Max 20 operations/atom โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ๐ฌ REVIEWER (Independent Tribunal) โ โ
โ โ Different model reviews worker's output against vision. โ โ
โ โ Verdicts: PASS ยท REJECT ยท NEEDS_REVISION โ โ
โ โ Worker can't grade its own homework. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Most AI coding tools operate as single-turn autocomplete โ you ask, they answer, you fix their mistakes.
Foreman operates as a multi-turn autonomous engineer:
| Traditional AI Coding | Foreman |
|---|---|
| Single LLM call โ paste code | 4-layer pipeline โ verified output |
| No verification | Build/test parsing with regression detection |
| Hallucinated imports, fake APIs | Ground truth engine + fact checker |
| Manual rollback | Automatic git-based rollback (atom/block/pipeline) |
| One model, pray it works | Multi-provider routing with instant failover |
| No cost awareness | Per-model, per-phase cost tracking with budget alerts |
| Context overflow = garbage | Layer-aware token budgets with progressive compression |
โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Messaging Gateway โ
โ Telegram ยท WhatsApp โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโโ
โ Orchestrator โ
โ Pipeline Coordinator โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ โโโโโโโโผโโโโโโโ
โ Engine โ โ Cognitive โ โ Pipeline โ
โ 30+ subsys โ โ Router โ โ Observer โ
โ coordinated โ โ Multi-prov โ โ Full trace โ
โโโโโโโโฌโโโโโโโ โ load bal. โ โ JSONL logs โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ
โโโโโโโผโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ โ โ โ โ โ
โผ โผ โผ โผ โผ โผ โผ
Exec Edit Git Rollback Security Halluc. Cost
Eng. Eng. Eng. Engine Scanner Guard Tracker
โ โ โ โ โ โ โ
โผ โผ โผ โผ โผ โผ โผ
Shell File Commit Revert Scan for Ground Track
Cmds Edits Diff Changes Secrets Truth $/token
Range Branch on Fail Vulns Facts
Every engine is a standalone module with its own types, tests, and responsibility boundary.
ENGINE โ WHAT IT DOES
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ExecutionEngine โ Shell commands with security filtering, timeouts,
โ background execution, process tracking
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
EditEngine โ Surgical text replacements with context-aware
โ matching, undo history, range edits
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
GitEngine โ Commits, branches, diffs, history, merge
โ conflict detection, stash management
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
VerificationEngine โ Parse build/test output from ANY runner (Jest,
โ Vitest, node:test, Mocha, pytest). Extract errors
โ with file:line. Detect regressions across runs.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
RollbackEngine โ Git-based undo at atom, block, or pipeline level.
โ Stash guard saves WIP before rollback. Full
โ rollback history with preview before execution.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SecurityScanner โ 5-capability project scanner: secret leak
โ detection (AWS, GitHub, Stripe, etc.), dependency
โ audit, .gitignore validation, hardcoded values,
โ file permission checks.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
HallucinationGuard โ Hook-based guardrails integrated with
โ GroundTruthEngine + FactChecker. Blocks
โ fabricated commands, files, and links BEFORE
โ they reach the codebase.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
GroundTruthEngine โ Extracts VERIFIED facts from the project:
โ package.json, entry points, available commands,
โ file structure. Zero guessing.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
FactChecker โ Validates LLM output against ground truth.
โ Catches hallucinated npm packages, fake CLI
โ commands, non-existent files. Strict mode
โ blocks on ANY violation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CognitiveLoadBalancer โ Multi-provider LLM router. When Provider A
โ hits rate limits (429), instantly routes to
โ Provider B. Zero downtime. RPM tracking per
โ endpoint with cooldown windows.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CostTracker โ Per-model pricing (input/output/cache tokens),
โ phase-level cost breakdown, session-level
โ cumulative tracking, budget alerts.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
PipelineObserver โ Full pipeline observability: every phase, block,
โ atom tracked with timing. Every tool call logged.
โ JSONL files for post-mortem. Human-readable
โ summary generation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ContextIntelligence โ Layer-aware token budgets (Visioner 40%,
โ Worker 20%). Relevance-based thought retention.
โ 3-tier progressive summarization (full โ
โ condensed โ headline). Decision anchoring:
โ high-confidence thoughts never dropped.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ReviewerGate โ Independent quality tribunal. DIFFERENT model
โ reviews the Worker's output against the Vision
โ document. Verdicts: PASS / REJECT /
โ NEEDS_REVISION. Breaks echo chamber bias.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
BrowserEngine โ Headless Chrome/Firefox via Playwright.
โ Navigate, screenshot, extract content, interact
โ with elements. Screenshot โ base64 for LLM
โ vision analysis. PDF generation.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SubAgentEngine โ Spawn isolated sub-agents with their own forge
โ pipelines. Parent-child linking, concurrent
โ execution, inter-agent messaging, shared memory,
โ result aggregation, timeout + auto-kill.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
AgentRegistry (Mesh) โ Central agent lifecycle: registration, state
โ transitions, heartbeat monitoring, health
โ scoring, event-driven coordination.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
StreamingPipeline โ Real-time pipeline output: phase/block/atom
โ events, tool call streaming, token-by-token LLM
โ output, cost updates, multiple output targets.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
ApprovalEngine โ Human-in-the-loop for destructive operations.
โ Gates dangerous shell commands, maintains audit
โ log of approved/denied operations.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
CompactionEngine โ Context window management. When thought chains
โ fill up: summarize via LLM, write to
โ chain.contextSummary, use summary instead of
โ full history.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
BatchFileEngine โ Atomic multi-file writes with rollback.
โ Write 10 files at once โ if any fails, ALL
โ revert. Used by Worker for multi-file changes.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
MediaEngine โ Media file analysis: images, screenshots,
โ documents. Integrates with LLM vision models
โ for visual QA.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Every tool the LLM can invoke during execution. Each tool delegates to an engine for security and consistency.
CATEGORY โ TOOLS
โโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
๐ฅ๏ธ Shell โ bash (async, timeout, background, yield_ms)
โ list_processes ยท poll_process ยท process_log
โ kill_process ยท kill_processes
โ
๐ Filesystem โ read_file (line-range) ยท write_file ยท edit_file
โ edit_range ยท edit_undo ยท delete_file ยท list_dir
โ search_files ยท grep ยท search_in_files
โ batch_write (atomic multi-file) ยท batch_ops
โ
๐ Git โ git_status ยท git_commit ยท git_diff ยท git_log
โ
๐ Security โ security_scan
โ
โ
Verification โ verify_build ยท verify_tests
โ
๐ Web โ web_search (Brave API) ยท web_fetch
โ analyze_link ยท classify_url
โ
๐ Markdown โ parse_markdown ยท extract_code
โ
๐ Analysis โ diff_preview ยท semantic_search
โ
๐พ Memory โ memory_read ยท memory_write ยท memory_search
โ
โฐ Scheduling โ cron_list ยท cron_add ยท cron_remove
โ
๐งโ๐ป Sessions โ session_list ยท session_spawn ยท spawn_subagent
โ
๐ Browser โ browser_navigate ยท browser_screenshot
โ browser_extract ยท browser_pdf
โ
๐ฆ Media โ analyze_media ยท download_file
โ
๐ System โ cache_stats ยท approval_audit
โ
๐ฅ Pipeline โ forge_pipeline (recursive โ pipeline within pipeline)
โ
Foreman doesn't trust itself. Multiple independent systems prevent damage:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ SAFETY STACK โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 1: DANGEROUS COMMAND FILTER โ โ
โ โ Blocks: rm -rf /, sudo, fork bombs, npm publish, โ โ
โ โ git push --force, reverse shells, disk wipes โ โ
โ โ 20+ regex patterns ยท Zero false negatives โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 2: APPROVAL ENGINE โ โ
โ โ Human-in-the-loop for destructive operations. โ โ
โ โ Full audit trail of every approved/denied command. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 3: HALLUCINATION GUARD โ โ
โ โ Ground truth extraction โ fact checking โ block. โ โ
โ โ Catches fake packages, non-existent commands, โ โ
โ โ hallucinated file paths. Strict mode = zero โ โ
โ โ tolerance. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 4: VERIFICATION ENGINE โ โ
โ โ Parses real build/test output. Detects regressions โ โ
โ โ by comparing against previous runs. Fails the atom โ โ
โ โ if tests break. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 5: REVIEWER GATE โ โ
โ โ Independent LLM (different model) reviews output โ โ
โ โ against vision. Worker can't grade its own work. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 6: ROLLBACK ENGINE โ โ
โ โ If verification fails โ automatic git revert. โ โ
โ โ Atom-level, block-level, or full pipeline revert. โ โ
โ โ Stash guard preserves WIP. Full rollback history. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Layer 7: SECURITY SCANNER โ โ
โ โ Scans for leaked secrets (AWS, GitHub, Stripe), โ โ
โ โ vulnerable deps, missing .gitignore entries, โ โ
โ โ hardcoded values, bad file permissions. โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Most AI tools dump the entire chat history into the context window until it overflows. Foreman has a 5-tier system:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ CONTEXT INTELLIGENCE โ 5-TIER SYSTEM โ
โ โ
โ 1. LAYER-AWARE BUDGETS โ
โ Visioner gets 40% (needs full picture) โ
โ Strategist gets 25% โ
โ Researcher gets 15% โ
โ Worker gets 20% (tactical, focused) โ
โ โ
โ 2. RELEVANCE-BASED RETENTION โ
โ Not FIFO. A thought about "TypeScript types" stays โ
โ when working on types, drops when working on CSS. โ
โ Similarity engine scores every thought. โ
โ โ
โ 3. PROGRESSIVE SUMMARIZATION (3 tiers) โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ FULL โ โ CONDENSED โ โ HEADLINE โ โ
โ โ Recent โโ โ Medium โโ โ Old โ โ
โ โ Complete โ โ Input+Out โ โ One-line โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ
โ 4. DECISION ANCHORING โ
โ High-confidence decisions are PINNED โ never dropped โ
โ regardless of age. They anchor the entire chain. โ
โ โ
โ 5. CROSS-CHAIN CONTEXT โ
โ Worker chains get relevant parts from parent โ
โ strategist chains. Not everything โ just what matters. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Engine.callLLM()
โ
โผ
โโโโโโโโโโโโโโโโโโโ
โ Cognitive โ
โ Load Balancer โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโโโโโผโโโโโโโโโโโโโโ
โ โ โ
โโโโโโผโโโโโ โโโโโโผโโโโโ โโโโโโผโโโโโ
โ Kimi โ โ Gemini โ โAnthropicโ
โ K2.5 โ โ 3.1 Pro โ โ Claude โ
โโโโโโฌโโโโโ โโโโโโฌโโโโโ โโโโโโฌโโโโโ
โ โ โ
โ HTTP 429? โ โ
โโโโโโโโโโโโโโโถ โ
โ โ HTTP 429? โ
โ โโโโโโโโโโโโโโโถ
โ โ โ
Zero sleep. Zero downtime. Instant failover.
Supported providers: Kimi (Moonshot K2.5), Gemini (3.1 Pro), Anthropic (Claude), OpenAI (GPT-4o), Antigravity (Google)
Per-layer model preferences: Each pipeline layer can use a different default model with its own fallback chain.
Every atomic task follows this protocol โ no exceptions:
โโโโ STEP 1: READ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Read the relevant files. Know what exists. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 2: CONTEXT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Understand HOW this fits into the larger codebase. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 3: IMPACT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ What will break? What depends on what I'm changing? โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 4: DECIDE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Choose the approach. State what I WILL and WON'T do. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 5: PREDICT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ What should the output look like? Predict before doing. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 6: EXECUTE โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Write code, run commands. Through ExecutionEngine only. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 7: VERIFY โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Did it work? Run tests. Parse build output. Check diff. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโ STEP 8: REPORT โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Summary of what changed, what was verified, confidence. โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
If any step is incomplete โ retry. If retry fails โ BLOCK signal propagates up.
Every forge run produces full observability:
.foreman/observer/
โโโ pipeline-2026-03-01T19-30-00.jsonl # Every event, timestamped
โโโ pipeline-2026-03-01T19-30-00.md # Human-readable summary
โโโ ...
Summary includes:
โฆ Total phases, blocks, atoms executed
โฆ Per-atom: duration, attempts, tool calls, operations, confidence
โฆ Per-phase: token cost, elapsed time
โฆ Total pipeline cost in USD
โฆ Rejection feedback from Reviewer
โฆ Rollback events (if any)
# โโโ User Commands โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
foreman # Start (auto-activates Telegram if configured)
foreman setup # Configure API keys (interactive)
foreman init <name> # Create a new project
foreman status # System health โ memory, sessions, cache, providers
foreman run <task> # Run a task through the full forge pipeline
foreman task add # Add a task to the board
foreman task list # List tasks
foreman task show <id> # Task details
foreman task done <id> # Mark task as done
foreman board # Kanban board view
foreman doctor # System health check
foreman serve # Start Telegram/WhatsApp gateway
# โโโ Internals (debug/inspect) โโโโโโโโโโโโโโโโโโโโโโโโโโ
foreman internals thoughts # List all thoughts
foreman internals chains # List all chains
foreman internals history # State transition history
foreman internals memory # Memory entries
foreman internals sessions # Active sessions
foreman internals cache # Cache statistics
foreman internals providers # Provider statusForeman runs as a Telegram bot or WhatsApp bot.
The LLM decides when to use the full forge pipeline vs. direct tool calls based on task complexity. Conversation history persisted to disk with 24h TTL.
# Start with environment variable
export FOREMAN_TELEGRAM_TOKEN="your_bot_token"
foreman # Auto-starts Telegram gateway
# Or via CLI
foreman serve --telegram <token> --allow <user_id>Security: Sender allowlisting โ only approved user IDs can interact.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ F O R E M A N S T A T S โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโค
โ Source files โ 99 โ
โ Test files โ 53 โ
โ Total LOC โ ~57,000 โ
โ Tests passing โ 654 โ
โ LLM tools โ 52 โ
โ CLI commands โ 47 โ
โ Engines โ 22 โ
โ LLM Providers โ 5 โ
โ Commits โ 348+ โ
โ Language โ TypeScript (strict) โ
โ Runtime โ Node.js 22+ โ
โ Test framework โ node:test + assert โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโค
โ Built with โ๏ธ by @SovranAMR โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
npm install
npm test # Run all 654 tests
npx tsx src/cli.ts status # Check engine status
npx tsx src/cli.ts doctor # Full system health checkThis is the heart of Foreman. Not a wrapper around an LLM โ a cognitive execution engine with 2,830 lines of orchestration logic that turns a single task into verified, committed code.
โโโโโโโโโโโโโโโโโโโโโ
โ "Add OAuth2 โ
โ to the API" โ
โโโโโโโโโโโฌโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
โ Hallucinationโ โ Ground โ โ Rollback โ
โ Guard Init โ โ Truth โ โ Checkpoint โ
โ (strict mode)โ โ Extraction โ โ (pipeline) โ
โโโโโโโโฌโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ฎ PHASE 1: VISION โ
โ Budget: 5% of tokens โ
โ Confidence min: 0.4 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ + Project context โ
โ + Identity context โ
โ + Memory recall โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโ โ
โ โ HUMAN CHECKPOINT โ โ
โ โ (interactive mode) โ โ
โ โ Approve / Revise / โ โ
โ โ Abort the vision โ โ
โ โโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ๏ธ PHASE 2: DECOMPOSE โ
โ Budget: 5% of tokens โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Sizing rules enforced: โ
โ 1 file โ 1-2 blocks โ
โ 2-5 files โ 2-3 blocks โ
โ 5-15 files โ 3-5 blocks โ
โ Hard cap: 8 blocks max โ
โ โ
โ Dependency graph built โ
โ โ topological sort โ
โ โ execution waves โ
โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโผโโโโ FOR EACH BLOCK โโโโโ
โ โ (wave-ordered) โ
โ โโโโโโโโโโผโโโโโโโโโ โ
โ โ ๐ RESEARCH โ โ
โ โ Budget: 15% โ โ
โ โโโโโโโโโโโโโโโโโโโโค โ
โ โ โข Hot memories โ โ
โ โ โข Warm memories โ โ
โ โ โข Semantic recallโ โ
โ โ โข Embedding srch โ โ
โ โ โข Cross-chain ctxโ โ
โ โ โข Web search โ โ
โ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโผโโโโโโโโโ โ
โ โ โ๏ธ ATOMIZE โ โ
โ โ (per block) โ โ
โ โโโโโโโโโโโโโโโโโโโโค โ
โ โ 1 file โ 1-2 โ โ
โ โ 2-5 files โ 2-4 โ โ
โ โ Hard cap: 6/blockโ โ
โ โโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโผโโโโ FOR EACH ATOM โโโ โ
โ โ โ (max 3 retries) โ โ
โ โ โโโโโโโโโโผโโโโโโโโโ โ โ
โ โ โ ๐จ EXECUTE โ โ โ
โ โ โ Budget: 65% โ โ โ
โ โ โ 8K tokens/atom โ โ โ
โ โ โ 20 ops max/atom โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโค โ โ
โ โ โ โ โ โ
โ โ โ TWO MODES: โ โ โ
โ โ โ โ โ โ
โ โ โ A) Tool Mode โ โ โ
โ โ โ LLM calls 52 โ โ โ
โ โ โ tools live โ โ โ
โ โ โ (real-time) โ โ โ
โ โ โ โ โ โ
โ โ โ B) Extraction โ โ โ
โ โ โ 1 LLM call โ โ โ โ
โ โ โ post-hoc parse โ โ โ
โ โ โ + execute โ โ โ
โ โ โ โ โ โ
โ โ โ Pre-reads files โ โ โ
โ โ โ from atom desc โ โ โ
โ โ โ (zero halluc.) โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโผโโโโโโโโโ โ โ
โ โ โ ๐ฌ VERIFY โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโค โ โ
โ โ โ Build output โ โ โ
โ โ โ parsing (Jest, โ โ โ
โ โ โ Vitest, pytest) โ โ โ
โ โ โ Regression check โ โ โ
โ โ โ Code fence scan โ โ โ
โ โ โ Pattern analysis โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโผโโโโโโโโโ โ โ
โ โ โ โ๏ธ REVIEWER GATE โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโค โ โ
โ โ โ Phase 1: Quick โ โ โ
โ โ โ local check (no โ โ โ
โ โ โ LLM cost) โ โ โ
โ โ โ โ โ โ
โ โ โ Phase 2: Full โ โ โ
โ โ โ LLM review โ โ โ
โ โ โ (DIFFERENT model) โ โ โ
โ โ โ โ โ โ
โ โ โ PASS โ commit โ โ โ
โ โ โ REJECT โ rollbackโ โ โ
โ โ โ + retry w/ โ โ โ
โ โ โ feedback โ โ โ
โ โ โโโโโโโโโโฌโโโโโโโโโ โ โ
โ โ โ โ โ
โ โ โโโโโโโโโโผโโโโโโโโโ โ โ
โ โ โ โ
AUTO-COMMIT โ โ โ
โ โ โ Git commit with โ โ โ
โ โ โ chain/thought โ โ โ
โ โ โ metadata โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ ON FAILURE: โ โ โ
โ โ โ โข Git rollback to last atom โ โ โ
โ โ โ โข Inject rejection feedback โ โ โ
โ โ โ โข Retry (max 3 attempts) โ โ โ
โ โ โ โข 50%+ atoms fail โ abandon blockโ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ ๐ช REFLECTION (every 5 atoms) โ โ
โ โ Vision drift check โ are we still โ โ
โ โ building what we said we would? โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโผโโโโโโโโโโโโโโ
โ ๐ PIPELINE COMPLETE โ
โ โ
โ โข Observer summary (MD) โ
โ โข JSONL event log โ
โ โข Cost report โ
โ โข Memory persistence โ
โ โข Session close โ
โ โข Git stash restore โ
โ โข Forge bridge notify โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Every forge run triggers 17 coordinated subsystems before a single line of code is written:
STEP โ SUBSYSTEM โ WHAT HAPPENS
โโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
1 โ HallucinationGuard โ Scans project, builds ground truth map
2 โ HooksEngine โ Fires before_pipeline โ can BLOCK
3 โ RollbackEngine โ Creates pipeline-level git checkpoint
4 โ SessionManager โ Auto-starts session (user never deals with this)
5 โ MultiSessionManager โ Creates named forge session for context
6 โ SessionLifecycle โ Registers session with slug identifier
7 โ IdentityEngine โ Loads identity context from memory
8 โ PipelineResumeEngine โ Clears stale checkpoints from crashed runs
9 โ StateManager โ Resets activeChainId, transitions to idle
10 โ MemoryManager โ Cleans up expired/cold memories
11 โ CacheManager โ Purges expired cache entries
12 โ GitEngine โ Stash guard โ saves uncommitted work
13 โ GitEngine โ Creates isolated task branch
14 โ StreamingPipeline โ Announces pipeline start to all targets
15 โ ForgeBridge โ Notifies gateway about pipeline start
16 โ PipelineObserver โ Starts JSONL event logging
17 โ CostTracker โ Initializes per-phase cost tracking
The pipeline doesn't let any phase eat the budget. Hard limits enforced at runtime:
PHASE โ BUDGET โ PURPOSE
โโโโโโโโโโโโโโโชโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Vision โ 5% โ Define the soul โ must be concise
Decompose โ 5% โ Structural, not verbose
Research โ 15% โ Heavy but bounded context gathering
Execute โ 65% โ Bulk of tokens for actual work
Reflect โ 5% โ Periodic vision drift checks
Review โ 5% โ Independent tribunal calls
โโโโโโโโโโโโโโโชโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Session max โ 2M โ Hard ceiling โ pipeline stops if hit
Per atom โ 8K โ Forces focused, atomic changes
Per block โ 40K โ Prevents block sprawl
When an atom fails, Foreman doesn't just retry blindly. It rolls back, explains why it failed, and retries with that context:
Atom Attempt 1
โ
โผ
Worker writes code โโโ Reviewer REJECTS
โ "Vision says no external deps,
โ you imported lodash"
โ
โผ
โช Git rollback to pre-atom state
โ
โผ
Atom Attempt 2
(injected context):
"โ ๏ธ PREVIOUS ATTEMPT REJECTED:
Vision says no external deps,
you imported lodash.
Fix this. Do NOT repeat."
โ
โผ
Worker writes code โโโ Reviewer PASSES โ
โ
โผ
Auto-commit with metadata
After 3 failed attempts โ atom is skipped. If 50%+ atoms in a block fail โ entire block is abandoned.
MODE A: TOOL MODE (FOREMAN_TOOL_MODE=1)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
LLM calls tools in real-time. Multiple API round-trips per atom.
More powerful โ LLM can read a file, decide, write, verify, iterate.
Higher cost, rate-limit sensitive.
LLM โโcallโโโ read_file("src/auth.ts")
LLM โโresultโโ (file contents)
LLM โโcallโโโ edit_file("src/auth.ts", ...)
LLM โโresultโโ (success)
LLM โโcallโโโ bash("npm test")
LLM โโresultโโ (12 passing)
LLM โโcallโโโ git_commit("add OAuth2 middleware")
LLM โโresultโโ (abc1234)
MODE B: EXTRACTION MODE (default)
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Single LLM call. Foreman parses the response post-hoc,
extracts file writes and shell commands, executes them
through ExecutionEngine.
LLM โโsingle callโโโ (full 8-step protocol response)
โ
โผ
WorkerExecutor.extractOperations()
โโโ write_file: src/auth.ts (detected)
โโโ edit_file: src/server.ts (detected)
โโโ bash: npm test (detected)
โ
โผ
ExecutionEngine runs each operation
SecurityScanner blocks dangerous commands
ApprovalEngine gates destructive ops
Before the Worker touches anything, Foreman pre-reads the files mentioned in the atom description:
Atom: "Add rate limiting to src/middleware/auth.ts"
โ
โผ
Regex extracts: ["src/middleware/auth.ts"]
โ
โผ
Reads actual file contents (max 3 files, 50 lines preview)
โ
โผ
Injects into Worker context:
"PRE-READ FILES (real contents โ do NOT hallucinate):
[FILE: src/middleware/auth.ts] (127 lines)
import { verify } from 'jsonwebtoken';
..."
The Worker sees real code, not imagined code. This is why Foreman's edits actually work.
Each block gets 6 layers of context before execution:
SOURCE โ HOW IT WORKS
โโโโโโโโโโโโโโโโโโโโโโโโชโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Hot Memories โ Recent, frequently accessed โ FIFO top 3
Warm Memories โ Tag-matched to block keywords
Semantic Recall โ Similarity engine scores past thoughts
Embedding Search โ Vector search over project codebase
Cross-Chain Context โ Relevant insights from parallel chains
Web Search โ Brave API โ best practices for the task
Blocks aren't executed linearly. The Strategist produces a dependency graph, and Foreman computes execution waves:
Block 1: Database schema โโ
Block 2: API routes โโคโโโ Wave 0 (parallel-safe)
Block 3: Auth middleware โโ
Block 4: API integration tests โโโ Wave 1 (depends on 1,2,3)
Block 5: Frontend components โโโ Wave 1 (depends on 2)
Block 6: E2E tests โโโ Wave 2 (depends on 4,5)
Execution: W0:[1,2,3] โ W1:[4,5] โ W2:[6]
Within each wave, blocks run sequentially (shared filesystem safety). Future: parallel execution within waves.
Task: "Add a rate limiting middleware to the Express API"
Phase 1 โ ๐ฎ Vision (5% budget)
"Rate limiting protects the API from abuse. Must be transparent
(X-RateLimit headers), configurable per-route, and fail gracefully
with 429 responses. No external dependencies if possible."
Phase 2 โ โ๏ธ Strategy (10% budget)
Block 1: Create rate limiter module (sliding window algorithm)
Atom 1.1: Implement token bucket with configurable limits
Atom 1.2: Add per-route configuration support
Block 2: Integrate middleware
Atom 2.1: Wire into Express app with default limits
Atom 2.2: Add X-RateLimit-* response headers
Block 3: Verify
Atom 3.1: Write tests for edge cases (burst, reset, per-IP)
Atom 3.2: Run existing tests โ verify zero regressions
Phase 3 โ ๐ Research (15% budget)
Read: src/server.ts, src/middleware/, package.json
Grep: "rate" "limit" "throttle" across codebase
Web: IETF rate limiting headers spec (RFC 6585)
Phase 4 โ ๐จ Worker (per atom, 8-step protocol)
For each atom:
read โ context โ impact โ decide โ predict โ execute โ verify โ report
After each atom:
โ VerificationEngine parses test output
โ ReviewerGate (different model) checks against Vision
โ If REJECT โ retry with feedback
โ If tests fail โ RollbackEngine reverts to last checkpoint
Result: Rate limiter added, 12 tests passing, 0 regressions, $0.03 cost
foreman/
โโโ src/
โ โโโ orchestrator.ts # 4-layer pipeline coordinator
โ โโโ engine.ts # Core engine โ 30+ subsystems
โ โโโ tools.ts # 52 LLM tool definitions
โ โโโ types.ts # Core type system
โ โโโ prompts.ts # Layer-specific system prompts
โ โโโ parser.ts # Structured output parser
โ โโโ validators.ts # Confidence + protocol validation
โ โ
โ โโโ # โโโ Execution โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ execution-engine.ts # Shell commands + process mgmt
โ โโโ worker-executor.ts # 8-step protocol bridge
โ โโโ edit-engine.ts # Surgical text edits
โ โโโ batch-file-engine.ts # Atomic multi-file writes
โ โโโ git-engine.ts # Git operations
โ โโโ diff-engine.ts # Diff generation + summary
โ โ
โ โโโ # โโโ Intelligence โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ cognitive-router.ts # Multi-provider load balancer
โ โโโ context-intelligence.ts # 5-tier context management
โ โโโ context-compression.ts # Progressive summarization
โ โโโ context-guard.ts # Context window enforcement
โ โโโ compaction-engine.ts # LLM-based thought compression
โ โโโ similarity-engine.ts # Text similarity scoring
โ โโโ embedding-engine.ts # Embedding-based search
โ โ
โ โโโ # โโโ Safety โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ hallucination-guard.ts # Pipeline-integrated guard
โ โโโ ground-truth-engine.ts # Codebase fact extraction
โ โโโ fact-checker.ts # LLM output validation
โ โโโ ground-truth-validator.ts # Worker output validation
โ โโโ security-scanner.ts # Project security scan
โ โโโ verification-engine.ts # Build/test/server parsing
โ โโโ reviewer-gate.ts # Independent review tribunal
โ โโโ rollback-engine.ts # Git-based undo system
โ โโโ approval-engine.ts # Human-in-the-loop gate
โ โ
โ โโโ # โโโ Observability โโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ pipeline-observer.ts # Full pipeline tracing
โ โโโ streaming-pipeline.ts # Real-time event streaming
โ โโโ cost-tracker.ts # Per-model cost tracking
โ โ
โ โโโ # โโโ LLM Providers โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ provider.ts # Provider interface + registry
โ โโโ kimi-provider.ts # Moonshot Kimi K2.5
โ โโโ gemini-provider.ts # Google Gemini
โ โโโ anthropic-provider.ts # Anthropic Claude
โ โโโ openai-provider.ts # OpenAI GPT-4o
โ โโโ antigravity-provider.ts # Google Antigravity
โ โโโ model-fallback.ts # Error classification + fallback
โ โโโ model-discovery.ts # Available model detection
โ โโโ retry.ts # Retry with backoff
โ โ
โ โโโ # โโโ Multi-Agent โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ subagent-engine.ts # Sub-agent lifecycle
โ โโโ agent-mesh/ # Agent registry + health
โ โ โโโ agent-registry.ts
โ โ โโโ types.ts
โ โ โโโ index.ts
โ โ
โ โโโ # โโโ Messaging โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ messaging-gateway.ts # Central message hub
โ โโโ telegram-channel.ts # Telegram bot
โ โโโ whatsapp-channel.ts # WhatsApp (Baileys)
โ โโโ channel.ts # Channel interface
โ โ
โ โโโ # โโโ Web & Research โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ browser-engine.ts # Headless Playwright
โ โโโ web-search-engine.ts # Brave Search API
โ โโโ web-fetch-engine.ts # URL content extraction
โ โโโ research-engine.ts # Research coordination
โ โโโ link-intelligence.ts # URL classification
โ โ
โ โโโ # โโโ State & Memory โโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ state.ts # State persistence
โ โโโ memory-manager.ts # Memory CRUD
โ โโโ memory-md-bridge.ts # Memory.md sync
โ โโโ session-manager.ts # Session persistence
โ โโโ multi-session.ts # Multi-chat sessions
โ โโโ session-lifecycle.ts # Session lifecycle hooks
โ โโโ cache-manager.ts # Response cache
โ โโโ thought-manager.ts # Thought persistence
โ โโโ chain-manager.ts # Chain persistence
โ โโโ chain-repair.ts # Chain health checks
โ โ
โ โโโ # โโโ Infrastructure โโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โโโ cli.ts # 47 CLI commands
โ โโโ config.ts # ~/.foreman configuration
โ โโโ theme.ts # Forge visual theme
โ โโโ animations.ts # CLI animations
โ โโโ rate-limiter.ts # Request rate limiting
โ โโโ process-registry.ts # Background process tracking
โ โโโ command-queue.ts # Sequential command queue
โ โโโ task-manager.ts # Task board
โ โโโ task-scheduler.ts # Scheduled tasks
โ โโโ cron-engine.ts # Cron job management
โ โโโ project-detector.ts # Project type detection
โ โโโ identity-engine.ts # Agent identity
โ โโโ hooks-engine.ts # Pipeline hooks
โ โโโ onboarding.ts # First-run setup
โ โโโ errors.ts # Error types + helpers
โ โโโ markdown-intelligence.ts # Markdown parsing
โ โโโ transcript-repair.ts # Broken transcript repair
โ โโโ forge-gateway.ts # Forge bridge
โ โโโ media-engine.ts # Media analysis
โ โโโ message-actions.ts # Message action handlers
โ โโโ interactive-confirm.ts # Interactive prompts
โ โโโ pipeline-resume.ts # Checkpoint/resume
โ โโโ file-watcher.ts # File change detection
โ
โโโ bin/
โ โโโ foreman # CLI entry point
โ
โโโ foreman-showcase/
โ โโโ index.html # Product showcase page
โ
โโโ package.json
โโโ tsconfig.json
Built with โ๏ธ by @SovranAMR
"It doesn't just write code. It thinks, verifies, and takes responsibility."