Poo-Code is a fork of Zoo-Code which is a fork of Roo-Code which is a fork of Cline.
Release v3.58.8 — Bulk Mode API Config: assign API profiles to all modes at once with optimistic UI (see Changelog below)
(The truth is I am too lazy to chunk it into smaller commits — the full pile lives in the selfimproving branch)
⚠ EXPERIMENTAL — This fork adds a full self-improving AI layer + parallel execution engine + codebase intelligence + verification system on top of Zoo-Code. All new features are gated behind experiment toggles. Enable at your own risk. Source: selfimproving branch.
- I can't sleep well because of anxiety due to the wrong decisions it made by always selecting the first choice as the answer.
- It ruined my morning because when I woke up I found it having an unauthorized day off during a busy day (silently stuck because of an error).
The ultimate goal is to totally replace you, so you can be permanently "Ooo" (Out of Office) and jobless like I am.
This fork adds ~31,000 lines of new infrastructure across 230+ files, all behind experiment toggles. Every new feature is gated — Zoo-Code main's behaviour is preserved with everything off.
| Feature | Poo-Code (this branch) | Zoo-Code main |
|---|---|---|
| Self-improving loop | SelfImprovingManager — background review pass every N turns/tool calls. Learns from mistakes, curates skills, suggests optimizations. |
❌ No automated self-review |
| Pattern analysis | PatternAnalyzer — detects recurring tool-use patterns, error signatures, and skill gaps from execution history. |
❌ No pattern detection |
| Curator service | CuratorService — tar.gz-backed skill store (backup/rollback). Decides when to create/update/merge skills from learned patterns. |
❌ Manual skill authoring only |
| Skill automation | ActionExecutor + ImprovementApplier — auto-creates and updates skills from reviewed patterns. |
❌ No auto skill creation |
| Insights engine | InsightsEngine — generates project-level insights (dead code, stale configs, architecture notes). |
❌ No project insights |
| Resilience | ResilienceService — streaming backoff, tool error healer, auto-retry with learned recovery strategies. Separate streaming failure counter prevents cross-contamination. |
❌ Basic retry only |
| Question evaluation | QuestionEvaluatorService — evaluates user questions for clarity/completeness; auto-selects best answer when choices are offered. |
❌ Always picks first choice |
| Trust service | TrustService — learns tool-approval patterns over time. Full-trust mode auto-approves known-safe tools. |
❌ Static auto-approval rules |
| Review team | ReviewTeamService — multi-agent review (innovator + critic + decider) scores every learned pattern before applying it. |
❌ No pre-apply validation |
| Agent memory | AgentMemoryAdapter + MemoryStore + MemoryBackendFactory — pluggable memory backend (SQLite default, configurable). Bounded context injection via memory.ts types. |
❌ No persistent agent memory |
| Learning store | LearningStore — stores/retrieves learned patterns with confidence scoring. Schema-versioned for forward compat. |
❌ No learning storage |
| Transcript recall | TranscriptRecall — retrieves past conversation context for pattern learning. |
❌ No historical context |
| Skill usage tracking | SkillUsageStore — tracks which skills fire, success rate, frequency. Feeds curator decisions. |
❌ No usage metrics |
| Auto-mode orchestrator | AutoModeOrchestrator — automatically switches between VS Code modes based on task type. |
❌ Manual mode switching |
| Mode factory | ModeFactoryService — generates custom modes from learned workflows. |
❌ Fixed mode set |
| Feature | Poo-Code | Zoo-Code |
|---|---|---|
| Parallel execution | ExecuteParallelSubtaskTool + ExecuteParallelChildTaskTool — DAG-based parallel task execution with dependency resolution, lock-aware scheduling, and blackboard communication between subtasks. Real child agent spawning via SubtaskExecutor callback. |
❌ No parallel execution |
| Parallel orchestrator | ParallelSubtaskOrchestrator — topological DAG wave scheduling, cycle detection, subtask heartbeat monitoring, automatic retry/failure handling, resume/skip/cancel controls. |
❌ No orchestrator |
| Parallel dashboard UI | Slide-in overlay panel with tabbed views (Subtasks, Child Tasks, DAG, Logs). Live DAG visualization, subtask cards with status/duration/deps, intervention controls (pause/resume/cancel/retry/skip), agent thought stream, system log stream. Auto-opens on parallel task start; closeable via Escape/backdrop/X. | ❌ No UI |
| Log forwarding | Live log streaming from orchestrator to webview via onLog callback. Every subtask lifecycle event (start, complete, fail) pushed to dashboard in real-time. | ❌ No equivalent |
| Feature | Poo-Code | Zoo-Code |
|---|---|---|
| Requirements extraction | RequirementsVerifier — parses user prompts for bullet points, numbered lists, and narrative action verbs. Splits "Create a login page with auth and session management" into 3+ granular requirements. |
❌ No requirement tracking |
| Auto-verification | Cross-references requirements against actual tool_use blocks in API conversation history. Marks requirements as verified when matching file paths found, failed when no corresponding file changes. | ❌ No equivalent |
| File-changes gate | VerificationEngine runs git diff --diff-filter=ACMRTD at completion time to verify files were actually modified (not just claimed). |
❌ No file-change validation |
| Content volume check | Parses git diff --stat to count lines inserted+deleted. Warns when <5 lines changed across all files (suggests stubs/placeholders). |
❌ No equivalent |
| Stub detection | Scans modified files for TODO, FIXME, HACK, throw new Error('not implemented'), @ts-ignore, @ts-nocheck. Flags files where >5% of lines match. |
❌ No stub scanning |
| Build config integrity | SHA256-hashes 15 build config files (package.json, Cargo.toml, pyproject.toml, etc.) at task start. Re-checks at completion — fails if agent tampered with build scripts. | ❌ No integrity check |
| Claim cross-reference | Extracts file names from the agent's attempt_completion result text. Blocks completion when >50% of claimed files were not actually modified by tool calls. |
❌ No claim validation |
| Result substance check | Rejects empty or evasion-language result text. Minimum 20 meaningful characters, blocks "nothing/failed/unable to" patterns under 80 chars. | ❌ No validation |
| Test coverage gate | Supports coverageCommand + minCoverage config. Parses XX% from coverage tool output (matches last occurrence for total). Auto-detects coverage command per language. |
❌ No coverage check |
| Escalation | After 5 consecutive verification failures across any gate, prompts user to bypass, retry, or cancel. Cross-call tracking persists across attempt_completion retries. |
❌ No escalation |
| Bypass mode | Single verificationLevel: "bypass" skips ALL 5 gate sections (requirements, auto-verify, claim check, substance check, code quality). Opt-out from verification. |
❌ No equivalent |
| Child task scoping | Aggregates tool call files from delegated children into parent's verification. Children store files under direct parent taskId; no sibling pollution. Cleaned up on delegation completion/denied/error. | ❌ No equivalent |
| Gate consistency | vLevel resolved once, enforced uniformly across all 5 checks. No gate runs when bypassed. |
❌ No equivalent |
| Feature | Poo-Code | Zoo-Code |
|---|---|---|
| Codebase mapping | @zoo-code/codebase-mapping package — AST parsing via web-tree-sitter, dependency graph with circular detection, symbol extraction, token compression for LLM context, multi-format serialization (JSON/Mermaid/Markdown/DOT), security layer (PII/secret scanning), AST cache with TTL. 3 VS Code commands: refresh/show/export map. |
❌ No equivalent |
| Prompt compression | compressPrompt() — lossless compression for child agent prompts (verbose phrase shortening, whitespace optimization, markdown stripping, JSON compaction, file path shortening). Prevents child agent context overload. |
❌ No compression |
| i18n translation | All 18 locales fully translated for parallel UI (dashboard, subtask cards, intervention controls, resume panel, detail panel, DAG labels). Languages: ca, de, en, es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi, zh-CN, zh-TW. Fixed defaultNS: "common" so dashboard renders labels instead of raw keys. |
❌ Partial EN-only |
| Feature | Poo-Code | Zoo-Code |
|---|---|---|
| ONE-SHOT Orchestrator | Autonomous 8-phase sequential build agent — handles entire projects from requirements to verification in a single pass | ❌ No equivalent |
| KAIZEN Orchestrator | Continuous improvement agent with 7-step iteration loop (Analyze → Identify → Fix → Verify → Enhance → Git Push → Re-evaluate) and self-evolving mini-goals | ❌ No equivalent |
| Proactive Error Prevention | Pre-execution tool call validation, structured error classification (12 categories), cascading failure detection, and prevention hint injection — catches errors BEFORE they happen | ❌ No equivalent |
| Git Auto-Push | KAIZEN mode auto-commits and pushes every cycle, enabling CI/CD pipelines to apply changes to staging/production automatically | ❌ No equivalent |
| Self-Evolving Mini-Goals | Mini-goals automatically evolve upward as each is achieved, with healing that reverts to fixing regressions first | ❌ No equivalent |
| Feature | Poo-Code | Zoo-Code |
|---|---|---|
| Skill name validation | Validates skill name format (1-64 chars, lowercase alphanumeric/hyphens) in SkillManageTool (create/update/delete/merge) and ActionExecutor. Hash-truncated names pass validation with safe fallback. |
❌ No validation |
| MemoryManager init | Calls initialize() before consolidate() in F3 cycle — prevents silent init failures on cold start. |
❌ No equivalent |
| ConfidenceScorer wiring | Fixed: only scores when patterns exist; passes proper typed args to calculateScore(). |
❌ No equivalent |
| Always-available tools | list_files + read_file promoted to always-available tools (available in any mode). |
❌ Gated per mode |
| Streaming failure resilience | Separate streamingFailureCount counter so consecutive tool mistakes don't exhaust streaming retry budget. |
❌ Single counter |
| Verification ON by default | Verification engines created on extension activation. Opt-out with experiments.disableVerification: true. Previously required opt-in. |
❌ No default |
| Toggle | Enables |
|---|---|
selfImproving |
Master switch — enables the entire learning loop |
selfImprovingAutoSkills |
Auto-create/update/merge skills from learned patterns |
selfImprovingAutoMode |
Auto-switch VS Code modes based on task |
selfImprovingReviewTeam |
Multi-agent review before applying learned patterns |
selfImprovingFullTrust |
Auto-approve tools that TrustService considers safe |
selfImprovingQuestionEvaluation |
Evaluate user questions for clarity; auto-select best answer |
oneShotOrchestrator |
Enable ONE-SHOT Orchestrator mode for autonomous project builds |
kaizenOrchestrator |
Enable KAIZEN Orchestrator mode for continuous improvement |
proactiveErrorPrevention |
Enable pre-execution tool call validation and cascade detection |
gitAutoPush |
Enable auto-commit and push in KAIZEN mode |
selfEvolvingMiniGoals |
Enable self-evolving mini-goals with regression healing |
fullUICoverage |
Enable full UI coverage for all self-improving services |
parallelExecution |
Enable DAG-based parallel task execution |
structuredOutputParsing |
Enable structured output parsing for model responses |
dependencyGraph |
Enable dependency graph analysis for task ordering |
multiRootWorkspace |
Enable multi-root workspace support |
parallelSubtask |
Enable parallel subtask execution with blackboard communication |
disableVerification |
Disable ALL verification gates (verification ON by default) |
Scenario: You need to build a complete REST API server from scratch.
- Switch to ONE-SHOT Orchestrator mode
- Describe your requirements: "Build a FastAPI REST API with PostgreSQL backend, JWT auth, and CRUD endpoints for users and products"
- The agent autonomously executes 8 phases:
- Requirements analysis → Architecture design → Project scaffolding → Core implementation → Integration → Testing → Bug fixing → Verification
- Result: A fully tested, production-ready API server with zero manual intervention
Scenario: You need to update multiple independent files simultaneously.
- Enable Parallel Execution in Experimental Settings
- The agent splits your request into DAG-ordered subtasks:
- Subtask A: Update API schema (no deps) ✓
- Subtask B: Update backend logic (depends on A) ⟳
- Subtask C: Update frontend types (depends on A) ⟳
- Subtask D: Update tests (depends on B, C) ○
- The Parallel Dashboard shows live progress, DAG visualization, logs, and agent thoughts
- Each subtask spawns a real child agent via
waitForCompletion()— parent awaits real completion - Result: Structurally parallel execution with dependency-safe ordering
Scenario: You have an existing codebase with technical debt and want continuous improvement.
- Switch to KAIZEN Orchestrator mode
- Set your initial mini-goal: "Fix all TypeScript strict mode errors"
- The agent enters the Kaizen loop:
- Cycle 1: Analyzes errors → Fixes 3 type errors → Runs tests → Git push → Re-evaluates
- Cycle 2: Fixes 5 more errors → Runs tests → Git push → Evolves mini-goal
- Cycle N: Continues until mini-goal achieved, then evolves upward
- Each cycle is one atomic change, verified, and pushed to CI/CD
- Result: Continuous, safe improvement without regressions
Scenario: You're working on a large codebase and the model keeps hitting tool errors.
- Enable Prevention Engine and Cascade Tracker in Experimental Settings
- Before each tool call, the system validates parameters:
read_filewith directory path → warns to uselist_filesinsteadlist_files recursive=truewithout ripgrep → suggestsfind/lsfallback- Long
execute_command→ warns about shell limits
- After errors, the system classifies them and tracks cascading failures
- If 2+ errors occur within 30 seconds, a cascade warning is injected suggesting an approach change
- Result: Fewer wasted tool calls, faster task completion, lower API costs
Scenario: A production deployment has regressions and needs immediate attention.
- Switch to KAIZEN Orchestrator mode
- The agent analyzes logs and test results
- Detects regressions → mini-goal auto-reverts to fixing those first
- Each fix is verified, committed with
kaizen: fix regression in X, and pushed - CI/CD pipeline auto-deploys each fix to staging/production
- Once regressions are resolved, mini-goal evolves upward to the next improvement
- Result: Self-healing deployment with zero manual intervention
Scenario: You inherit a large unfamiliar codebase and need to understand its structure.
- Enable Codebase Mapping (via
zoo-code.refreshCodebaseMapcommand) - The system scans all files, parses ASTs, builds a dependency graph
- Use
zoo-code.showCodebaseMapto see file count, edges, dead symbols, cache hit rate - Use
zoo-code.exportCodebaseMapto export Mermaid diagram for documentation - Result: Instant codebase understanding without manual tracing
Scenario: You want to ensure the agent actually implements what it claims before marking work as done.
- Verification runs automatically at
attempt_completion(no manual toggle needed) - The system checks:
- File-changes: Were files actually modified? (
git diff --diff-filter=ACMRTD) - Build config: Was
package.jsontampered with? (SHA256 snapshot comparison) - Claims: Do the files mentioned in the result text match actual tool calls?
- Stubs: Are there TODO/FIXME patterns in the modified files?
- Content volume: Were at least ~5 lines changed? (anti-stub)
- Build/Lint/Types: Do auto-detected project commands pass?
- Requirements: Was each extracted requirement addressed by a file change?
- Substance: Is the completion result non-empty and non-evasive?
- File-changes: Were files actually modified? (
- Failures block
attempt_completionwith detailed error messages - After 5 consecutive failures, user is prompted to bypass or retry
- Result: Honest completion results with verifiable evidence
Projects generated: Countless
Monthly cost: LLM & electric bills
Non-refundable cost: My soul
Revenue generated so far: 0 and still counting zero
Don't star this repo. It will just get me excited to drag you into the jobless community
Any issue not related to self-learning, submit at https://github.com/Zoo-Code-Org/Zoo-Code/issues as they know more than me (no cap)
Backend:
ProviderSettingsManager.setModeApiConfigs()— bulk-replaces the entire mode→config map in one atomic write under lockProviderSettingsManager.removeModeConfig()— removes a single mode's config assignment (used on mode delete)- Config ID validation —
setModeApiConfigsverifies every config ID exists inapiConfigsbefore saving, rejects stale/deleted IDs with a clear error
Webview:
"bulkModeApiConfig"message type + handler inwebviewMessageHandler.ts- Error path calls
vscode.window.showErrorMessage()(native toast) instead of ignored webview state message - Error path re-pushes state so optimistic UI rolls back on failure
- Auto-populate: new custom modes receive the first available config ID automatically
UI:
- "Set for all modes" button — assigns the currently selected API profile to all modes at once
- "Clear default overrides" — removes only entries matching the default profile, preserving actual per-mode overrides
- Optimistic UI —
optimisticModeApiConfigslocal state updates instantly, syncs back when backend state arrives - Disabled guard — "Set for all modes" is greyed out when no API profile is selected, with tooltip explaining why
- Per-mode override indicators — shows assigned profile name or "(default)" for each mode, with X button to clear individual override
setModeApiConfigssetter added toExtensionStateContext
Cleanup:
- Orphan prevention —
deleteCustomModehandler callsremoveModeConfig()to clean up stale entries inmodeApiConfigs
Complete implementation of all 17 stubs across 6 files in @zoo-code/codebase-mapping, plus 30+ bug fixes across 4 audit rounds.
All stubs implemented:
Serializer: Mermaid, Graphviz, ASCII, HTML, Markdown format generators — full data-driven output with dead code sections, HTML escaping, edge stylesTokenCompressor: L0 summary, L1 signatures, L2 declarations, line-based diff — all 4 LODs now produce real contentSecurityLayer:checkComplianceBoundaries()— glob-to-regex matching against gitignore, rooignore, custom deny/allow patternsDocGenerator: Template-based JSDoc/TSDoc generation with kind detection, existing doc extraction, stale doc detectionCodebaseMappingService:getDelta()(added/deleted/modified),getConfigLinks()(13 config types),getImplicitFlows()(event/middleware/callback),getGitMetadata()(git log + blame)SymbolExtractor:resolveReferences()— cross-references imports against local declarations
Performance (6 fixes):
getImplicitFlows()O(n³) → O(n) with reference index mapgetConfigLinks()O(n²) → O(n) with cached directory indexgetSymbol()O(n) → O(1) with_symbolByNameindexgetSymbols(kind)O(n) → O(1) with_symbolsByKindindexserialize()caches format-independent payload — no recompute on format switchgetDocUpdates()sequential await → batchedPromise.allat concurrency 50
Memory leaks (8 fixes):
_cachedRawContentcleared on reset, dispose, scan, incremental update_previousFileHashescleared on resetScanState and dispose_symbolByName/_symbolsByKindcleared on dispose_cachedSerializationData/_cachedSerializationPayload/_cachedDirIndex/_cachedRefIndexinvalidated on all lifecycle events
Data integrity (5 fixes):
getDocUpdates()no longer overwrites real docs with TODO stubs — only generates for symbols without existing docs_symbolByNamechanged fromMap<name, ExtractedSymbol>toMap<name, ExtractedSymbol[]>— duplicate names no longer silently overwrittengetConfigLinks()reads raw file content for JSON parsing, not secret-masked AST textgetDelta()snapshots hashes even on failed scan — delta detection always has a baselinegetDocUpdates()stale detection bounded bylimit * 2—watchDocFilesflag now has real behavior
Dead code removed (5 fixes):
buildSerializationData()unused_graphparameter removedresolveReferences()no-op replaced with real implementationwatchDocFilesconfig flag wired as stale-check capast-parser.tsinitialize()JSDoc explains it's intentionally a no-opimport("./types.js").ParseResult/DependencyEdge/CacheStatstype imports cleaned up
Settings UI toggle — disableMemoryBank experiment now appears in
the Experimental Settings panel under "Memory" category. Turn off to
remove memory bank from system prompt and hide the update_memory_bank
tool. i18n entries added to English locale.
Auto-initialization — exists() now auto-creates template files on
first check if the memory-bank directory doesn't exist. No need to
manually run zoo-code.initMemoryBank anymore.
.gitignore management — initialize() adds memory-bank/ entry
to .gitignore automatically. Creates .gitignore if it doesn't exist.
Prevents session-specific state from being committed to version control.
File truncation — Append-only files (decisionLog.md, progress.md) are automatically truncated when they exceed 100KB. Keeps the header and the most recent entries. Old entries are replaced with a notice. Prevents unbounded growth that wastes context window.
Workspace switch cleanup — MemoryBankManager.resetAllInstances()
called on workspace change via ClineProvider.updateCodeIndexStatusSubscription().
Stale cached instances are cleared when switching projects.
New feature inspired by roo-code-memory-bank methodology — structured markdown files that preserve project context across sessions.
MemoryBankManager service (src/services/memory-bank/)
- Creates
memory-bank/directory at project root with 5 template files:productContext.md,activeContext.md,decisionLog.md,systemPatterns.md,progress.md - Append-mode files (decisionLog, progress) timestamp new entries
updateFile()handles both append and full-replace modes
Session-start context injection
getMemoryBankSection()added to system prompt generation- Reads all 5 files at every task start and injects into the LLM prompt
- Agent sees project goals, decisions, and progress immediately without being told
update_memory_bank native tool
- Agent calls it anytime: arch decisions → decisionLog.md, new task → progress.md, focus change → activeContext.md, pattern discovered → systemPatterns.md
- Always available to all modes
- Append mode by default (except productContext/activeContext)
VS Code commands
zoo-code.initMemoryBank— creates 5 template files with placeholder sectionszoo-code.openMemoryBank— revealsmemory-bank/in the file explorer
Complete rewrite of codebase mapping status system across 8 files.
Real scan status — Previously always showed green "Ready" with zero stats.
- Service:
_scanStatus(idle→scanning→completed) properly mapped to UI (idle→scanning→ready→error) - All 3 status senders (
ClineProvider._sendCodebaseMappingStatus,requestCodebaseMappingStatus,refreshCodebaseMap) now read real status instead of hardcoding"ready" - Empty graph (null currentGraph) no longer falsely reported as "ready" with zeros
Live progress indicator — No feedback during long scans.
_filesScanned/_totalFilesToScancounters emit batched progress every 50 files- Progress bar in popover (CSS, shows percentage when
totalFileCountknown) - Live edge count (
_accumulatedEdges) during scan instead of 0 until graph build - Scan message shows
Scanning... 234/1500 files, 890 edges
Precise stats — Files: 0 Edges: 0 Cache hit rate: 0.0%.
scanWorkspace()checks cache before parse (getAST()/getSymbols()first) so cache hits accumulate on re-scan- Cache hit rate now correctly >0% on subsequent scans after file saves
totalFileCount?: numberadded toCodebaseMappingStatustype, populated in all status payloads
Concurrency & safety — Scan corruption, stuck status, handler leaks.
_scanInProgressguard prevents overlapping scans (save watcher + folder change + manual refresh)_pendingRescanflag: if a save/delete/folder-change arrives during scan, it's queued and re-triggered infinally- Full try/catch/finally: critical disk errors don't leave status stuck on "scanning"
offEvent()added to service + interface; progress handlers properly unregistered on re-subscribe and dispose- Dispose resets
_scanStatus,_scanInProgress,_pendingRescan refreshCodebaseMaphandler wrapped in try/catch — no silent hangs on scan failure
Performance — Double filesystem walk removed.
_rootFileCachecachesdiscoverFiles()results from pre-count pass for reuse in scan loop- Saves ~50K
stat()calls per scan on large monorepos
Install compatibility — "Invalid extension detected".
engines.nodechanged from exact"20.20.2"to range">=20.20.2"— VS Code 1.124 snap bundles different Node patch version
- Wire codebase mapping service to webview status updates
- Fix
defaultNS: "common"for webview dashboard i18n - Various self-improving and orchestrator bug fixes
Q: What is your day job?
A: Jobless
Q: What is your night job?
A: Sleep
Q: Ooo... Can I buy you coffee?
A: No. I have insomnia.
Q: Can I...?
A: This is end of conversation.