ultimate-pi 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/ck-search/SKILL.md +99 -0
- package/.agents/skills/defuddle/SKILL.md +90 -0
- package/.agents/skills/find-skills/SKILL.md +142 -0
- package/.agents/skills/firecrawl/SKILL.md +150 -0
- package/.agents/skills/firecrawl/rules/install.md +82 -0
- package/.agents/skills/firecrawl/rules/security.md +26 -0
- package/.agents/skills/firecrawl-agent/SKILL.md +57 -0
- package/.agents/skills/firecrawl-build-interact/SKILL.md +67 -0
- package/.agents/skills/firecrawl-build-onboarding/SKILL.md +102 -0
- package/.agents/skills/firecrawl-build-onboarding/references/auth-flow.md +39 -0
- package/.agents/skills/firecrawl-build-onboarding/references/project-setup.md +20 -0
- package/.agents/skills/firecrawl-build-onboarding/references/sdk-installation.md +17 -0
- package/.agents/skills/firecrawl-build-scrape/SKILL.md +68 -0
- package/.agents/skills/firecrawl-build-search/SKILL.md +68 -0
- package/.agents/skills/firecrawl-crawl/SKILL.md +58 -0
- package/.agents/skills/firecrawl-download/SKILL.md +69 -0
- package/.agents/skills/firecrawl-interact/SKILL.md +83 -0
- package/.agents/skills/firecrawl-map/SKILL.md +50 -0
- package/.agents/skills/firecrawl-parse/SKILL.md +61 -0
- package/.agents/skills/firecrawl-scrape/SKILL.md +68 -0
- package/.agents/skills/firecrawl-search/SKILL.md +59 -0
- package/.agents/skills/obsidian-bases/SKILL.md +299 -0
- package/.agents/skills/obsidian-markdown/SKILL.md +237 -0
- package/.agents/skills/posthog-analyst/SKILL.md +306 -0
- package/.agents/skills/posthog-analyst/evals/evals.json +23 -0
- package/.agents/skills/wiki/SKILL.md +215 -0
- package/.agents/skills/wiki/references/css-snippets.md +122 -0
- package/.agents/skills/wiki/references/frontmatter.md +107 -0
- package/.agents/skills/wiki/references/git-setup.md +58 -0
- package/.agents/skills/wiki/references/mcp-setup.md +149 -0
- package/.agents/skills/wiki/references/modes.md +259 -0
- package/.agents/skills/wiki/references/plugins.md +96 -0
- package/.agents/skills/wiki/references/rest-api.md +124 -0
- package/.agents/skills/wiki-autoresearch/SKILL.md +211 -0
- package/.agents/skills/wiki-autoresearch/references/program.md +75 -0
- package/.agents/skills/wiki-fold/SKILL.md +204 -0
- package/.agents/skills/wiki-fold/references/fold-template.md +133 -0
- package/.agents/skills/wiki-ingest/SKILL.md +288 -0
- package/.agents/skills/wiki-lint/SKILL.md +183 -0
- package/.agents/skills/wiki-query/SKILL.md +176 -0
- package/.agents/skills/wiki-save/SKILL.md +128 -0
- package/.ckignore +41 -0
- package/.env.example +9 -0
- package/.github/workflows/lint.yml +33 -0
- package/.github/workflows/publish-github-packages.yml +35 -0
- package/.github/workflows/publish-npm.yml +1 -1
- package/.pi/SYSTEM.md +107 -40
- package/.pi/agents/pi-pi/agent-expert.md +205 -0
- package/.pi/agents/pi-pi/cli-expert.md +47 -0
- package/.pi/agents/pi-pi/config-expert.md +67 -0
- package/.pi/agents/pi-pi/ext-expert.md +53 -0
- package/.pi/agents/pi-pi/keybinding-expert.md +123 -0
- package/.pi/agents/pi-pi/pi-orchestrator.md +103 -0
- package/.pi/agents/pi-pi/prompt-expert.md +83 -0
- package/.pi/agents/pi-pi/skill-expert.md +52 -0
- package/.pi/agents/pi-pi/theme-expert.md +46 -0
- package/.pi/agents/pi-pi/tui-expert.md +100 -0
- package/.pi/agents/rethink.md +140 -0
- package/.pi/agents/wiki-ingest.md +67 -0
- package/.pi/agents/wiki-lint.md +75 -0
- package/.pi/auto-commit.json +20 -0
- package/.pi/extensions/banner.png +0 -0
- package/.pi/extensions/ck-enforce.ts +216 -0
- package/.pi/extensions/custom-footer.ts +308 -0
- package/.pi/extensions/custom-header.ts +116 -0
- package/.pi/extensions/dotenv-loader.ts +170 -0
- package/.pi/internal/cursor-sdk-transcript-parser.ts +59 -0
- package/.pi/model-router.json +95 -0
- package/.pi/npm/.gitignore +2 -0
- package/.pi/prompts/git-sync.md +124 -0
- package/.pi/prompts/harness-setup.md +509 -0
- package/.pi/prompts/save.md +16 -0
- package/.pi/prompts/wiki-autoresearch.md +19 -0
- package/.pi/prompts/wiki.md +23 -0
- package/.pi/providers/cursor-sdk-provider.test.mjs +476 -0
- package/.pi/providers/cursor-sdk-provider.ts +1085 -0
- package/.pi/settings.json +14 -4
- package/.pi/skills/agent-router/SKILL.md +174 -0
- package/.pi/sounds/alert/1-kaching-track.mp3 +0 -0
- package/.pi/sounds/error/1-ksi-wth-track.mp3 +0 -0
- package/.pi/sounds/error/2-smash-track.mp3 +0 -0
- package/.pi/sounds/error/3-buzzer-track.mp3 +0 -0
- package/.pi/sounds/notification/1-soft-notification-track.mp3 +0 -0
- package/.pi/sounds/project-sounds.json +25 -0
- package/.pi/sounds/reminder/1-soft-notification-track.mp3 +0 -0
- package/.pi/sounds/success/1-tada-track.mp3 +0 -0
- package/.pi/sounds/success/2-jobs-done-track.mp3 +0 -0
- package/.pi/sounds/success/3-yay-track.mp3 +0 -0
- package/CONTRIBUTING.md +116 -0
- package/README.md +32 -39
- package/biome.json +34 -0
- package/firecrawl/.env.template +58 -0
- package/firecrawl/README.md +49 -0
- package/firecrawl/docker-compose.yaml +201 -0
- package/firecrawl/searxng/searxng.env +3 -0
- package/firecrawl/searxng/settings.yml +85 -0
- package/lefthook.yml +8 -0
- package/package.json +55 -24
- package/vault/AGENTS.md +37 -0
- package/vault/wiki/_templates/comparison.md +39 -0
- package/vault/wiki/_templates/concept.md +40 -0
- package/vault/wiki/_templates/decision.md +21 -0
- package/vault/wiki/_templates/entity.md +32 -0
- package/vault/wiki/_templates/flow.md +14 -0
- package/vault/wiki/_templates/module.md +18 -0
- package/vault/wiki/_templates/question.md +31 -0
- package/vault/wiki/_templates/source.md +39 -0
- package/vault/wiki/concepts/AST-Aware Code Chunking.md +44 -0
- package/vault/wiki/concepts/Build-Time Prompt Compilation.md +107 -0
- package/vault/wiki/concepts/Context Engine (AI Coding).md +47 -0
- package/vault/wiki/concepts/Context-Aware System Reminders.md +61 -0
- package/vault/wiki/concepts/Contextualized Text Embedding.md +42 -0
- package/vault/wiki/concepts/Contractor vs Employee AI Model.md +55 -0
- package/vault/wiki/concepts/Dual-Model Agent Architecture.md +65 -0
- package/vault/wiki/concepts/Late Chunking vs Early Chunking.md +43 -0
- package/vault/wiki/concepts/Majority Vote Ensembling.md +68 -0
- package/vault/wiki/concepts/Meta-Harness.md +16 -0
- package/vault/wiki/concepts/Multi-Agent AI Coding Architecture.md +75 -0
- package/vault/wiki/concepts/Prompt Enhancement.md +90 -0
- package/vault/wiki/concepts/Prompt Renderer.md +89 -0
- package/vault/wiki/concepts/Semantic Codebase Indexing.md +67 -0
- package/vault/wiki/concepts/additive-config-hierarchy.md +16 -0
- package/vault/wiki/concepts/agent-artifacts-verifiable-deliverables.md +71 -0
- package/vault/wiki/concepts/agent-browser-browser-automation.md +99 -0
- package/vault/wiki/concepts/agent-codebase-interface.md +43 -0
- package/vault/wiki/concepts/agent-harness-architecture.md +67 -0
- package/vault/wiki/concepts/agent-loop-detection-patterns.md +133 -0
- package/vault/wiki/concepts/agent-search-enforcement.md +126 -0
- package/vault/wiki/concepts/agent-skills-ecosystem.md +74 -0
- package/vault/wiki/concepts/agent-skills-pattern.md +68 -0
- package/vault/wiki/concepts/agentic-harness-context-enforcement.md +91 -0
- package/vault/wiki/concepts/agentic-harness.md +34 -0
- package/vault/wiki/concepts/agentic-orchestration-pipeline.md +56 -0
- package/vault/wiki/concepts/agentic-search-no-embeddings.md +18 -0
- package/vault/wiki/concepts/anthropic-context-engineering.md +13 -0
- package/vault/wiki/concepts/antigravity-agent-first-architecture.md +61 -0
- package/vault/wiki/concepts/ast-compression.md +19 -0
- package/vault/wiki/concepts/ast-truncation.md +66 -0
- package/vault/wiki/concepts/barrel-files.md +37 -0
- package/vault/wiki/concepts/browser-harness-agent.md +41 -0
- package/vault/wiki/concepts/browser-subagent-visual-verification.md +82 -0
- package/vault/wiki/concepts/codebase-intelligence-ecosystem-comparison.md +192 -0
- package/vault/wiki/concepts/codebase-intelligence-harness-integration.md +161 -0
- package/vault/wiki/concepts/codebase-to-context-ingestion.md +46 -0
- package/vault/wiki/concepts/codex-harness-innovations.md +147 -0
- package/vault/wiki/concepts/consensus-debate-flow.md +17 -0
- package/vault/wiki/concepts/consensus-debate.md +206 -0
- package/vault/wiki/concepts/content-addressed-spec-identity.md +166 -0
- package/vault/wiki/concepts/context-anxiety.md +57 -0
- package/vault/wiki/concepts/context-compression-techniques.md +19 -0
- package/vault/wiki/concepts/context-continuity.md +22 -0
- package/vault/wiki/concepts/context-drift-in-agents.md +106 -0
- package/vault/wiki/concepts/context-engineering.md +62 -0
- package/vault/wiki/concepts/context-folding.md +67 -0
- package/vault/wiki/concepts/context-mode.md +38 -0
- package/vault/wiki/concepts/cursor-harness-innovations.md +107 -0
- package/vault/wiki/concepts/deterministic-session-compaction.md +79 -0
- package/vault/wiki/concepts/drift-detection-unified.md +296 -0
- package/vault/wiki/concepts/execution-feedback-loop.md +46 -0
- package/vault/wiki/concepts/feedforward-feedback-harness.md +60 -0
- package/vault/wiki/concepts/five-root-cause-metrics-sentrux.md +40 -0
- package/vault/wiki/concepts/fork-safe-spec-storage.md +89 -0
- package/vault/wiki/concepts/fts5-sandbox.md +19 -0
- package/vault/wiki/concepts/fuzzy-edit-matching.md +71 -0
- package/vault/wiki/concepts/gemini-cli-architecture.md +104 -0
- package/vault/wiki/concepts/generator-evaluator-architecture.md +64 -0
- package/vault/wiki/concepts/guardian-agent-pattern.md +67 -0
- package/vault/wiki/concepts/harness-configuration-layers.md +89 -0
- package/vault/wiki/concepts/harness-control-frameworks.md +155 -0
- package/vault/wiki/concepts/harness-engineering-first-principles.md +90 -0
- package/vault/wiki/concepts/harness-h-formalism.md +53 -0
- package/vault/wiki/concepts/hybrid-code-search.md +61 -0
- package/vault/wiki/concepts/inline-post-edit-validation.md +112 -0
- package/vault/wiki/concepts/legendary-engineering-patterns-harness.md +110 -0
- package/vault/wiki/concepts/lifecycle-hooks.md +94 -0
- package/vault/wiki/concepts/mcp-tool-routing.md +102 -0
- package/vault/wiki/concepts/memory-system-of-record-vs-ephemeral-cache.md +47 -0
- package/vault/wiki/concepts/meta-agent-context-pruning.md +151 -0
- package/vault/wiki/concepts/model-adaptive-harness.md +122 -0
- package/vault/wiki/concepts/model-routing-agents.md +101 -0
- package/vault/wiki/concepts/monorepo-architecture.md +45 -0
- package/vault/wiki/concepts/multi-agent-specialization.md +61 -0
- package/vault/wiki/concepts/permission-subsystem.md +16 -0
- package/vault/wiki/concepts/pi-messenger-analysis.md +243 -0
- package/vault/wiki/concepts/pi-vscode-extension-landscape.md +37 -0
- package/vault/wiki/concepts/policy-engine-pattern.md +78 -0
- package/vault/wiki/concepts/progressive-disclosure-agents.md +53 -0
- package/vault/wiki/concepts/progressive-skill-disclosure.md +17 -0
- package/vault/wiki/concepts/provider-native-prompting.md +203 -0
- package/vault/wiki/concepts/quality-signal-sentrux.md +37 -0
- package/vault/wiki/concepts/repo-map-ranking.md +42 -0
- package/vault/wiki/concepts/result-monad-error-handling.md +47 -0
- package/vault/wiki/concepts/safety-defense-in-depth.md +83 -0
- package/vault/wiki/concepts/sandbox-os-enforcement.md +18 -0
- package/vault/wiki/concepts/selective-debate-routing.md +70 -0
- package/vault/wiki/concepts/self-evolving-harness.md +60 -0
- package/vault/wiki/concepts/sentrux-mcp-integration.md +36 -0
- package/vault/wiki/concepts/sentrux-rules-engine.md +49 -0
- package/vault/wiki/concepts/shell-pattern-compression.md +24 -0
- package/vault/wiki/concepts/skill-first-architecture.md +166 -0
- package/vault/wiki/concepts/structured-compaction.md +78 -0
- package/vault/wiki/concepts/subagent-orchestration.md +17 -0
- package/vault/wiki/concepts/subagent-worktree-isolation.md +68 -0
- package/vault/wiki/concepts/superpowers-methodology.md +78 -0
- package/vault/wiki/concepts/think-in-code.md +73 -0
- package/vault/wiki/concepts/ts-execution-layer.md +100 -0
- package/vault/wiki/concepts/typescript-strict-mode.md +37 -0
- package/vault/wiki/concepts/vcc-conversation-compaction-for-pi.md +51 -0
- package/vault/wiki/concepts/verification-drift-detection.md +19 -0
- package/vault/wiki/consensus/consensus-records.md +58 -0
- package/vault/wiki/decisions/2026-04-30-pi-lean-ctx-native.md +122 -0
- package/vault/wiki/decisions/adr-008.md +40 -0
- package/vault/wiki/decisions/adr-009.md +46 -0
- package/vault/wiki/decisions/adr-010.md +55 -0
- package/vault/wiki/decisions/adr-011.md +165 -0
- package/vault/wiki/decisions/adr-012.md +102 -0
- package/vault/wiki/decisions/adr-013.md +59 -0
- package/vault/wiki/decisions/adr-014.md +73 -0
- package/vault/wiki/decisions/adr-015.md +81 -0
- package/vault/wiki/decisions/adr-016.md +91 -0
- package/vault/wiki/decisions/adr-017.md +79 -0
- package/vault/wiki/decisions/adr-018.md +100 -0
- package/vault/wiki/decisions/adr-019.md +75 -0
- package/vault/wiki/decisions/adr-020.md +106 -0
- package/vault/wiki/decisions/adr-021.md +86 -0
- package/vault/wiki/decisions/adr-022.md +113 -0
- package/vault/wiki/decisions/adr-023.md +113 -0
- package/vault/wiki/decisions/adr-024.md +73 -0
- package/vault/wiki/decisions/adr-025.md +130 -0
- package/vault/wiki/decisions/adr-026.md +56 -0
- package/vault/wiki/decisions/colocate-wiki.md +34 -0
- package/vault/wiki/entities/Anders Hejlsberg.md +29 -0
- package/vault/wiki/entities/Anthropic.md +17 -0
- package/vault/wiki/entities/Augment Code.md +49 -0
- package/vault/wiki/entities/Bjarne Stroustrup.md +26 -0
- package/vault/wiki/entities/Bolt.new (StackBlitz).md +39 -0
- package/vault/wiki/entities/Boris Cherny.md +11 -0
- package/vault/wiki/entities/Claude Code.md +19 -0
- package/vault/wiki/entities/Dennis Ritchie.md +26 -0
- package/vault/wiki/entities/Emergent Labs.md +32 -0
- package/vault/wiki/entities/Google Cloud.md +16 -0
- package/vault/wiki/entities/Guido van Rossum.md +28 -0
- package/vault/wiki/entities/Ken Thompson.md +28 -0
- package/vault/wiki/entities/Lee et al.md +16 -0
- package/vault/wiki/entities/Linus Torvalds.md +28 -0
- package/vault/wiki/entities/Lovable (company).md +40 -0
- package/vault/wiki/entities/Martin Fowler.md +16 -0
- package/vault/wiki/entities/Meng et al.md +16 -0
- package/vault/wiki/entities/OpenAI.md +16 -0
- package/vault/wiki/entities/Rocket.new.md +38 -0
- package/vault/wiki/entities/VILA-Lab.md +15 -0
- package/vault/wiki/entities/autodev-codebase.md +18 -0
- package/vault/wiki/entities/ck-tool.md +59 -0
- package/vault/wiki/entities/codesearch.md +18 -0
- package/vault/wiki/entities/disler-indydevdan.md +33 -0
- package/vault/wiki/entities/gsd-get-shit-done.md +56 -0
- package/vault/wiki/entities/javascript-runtimes.md +48 -0
- package/vault/wiki/entities/jesse-vincent.md +38 -0
- package/vault/wiki/entities/lean-ctx.md +32 -0
- package/vault/wiki/entities/opendev.md +41 -0
- package/vault/wiki/entities/ops-codegraph-tool.md +18 -0
- package/vault/wiki/entities/pi-coding-agent.md +53 -0
- package/vault/wiki/entities/sentrux.md +54 -0
- package/vault/wiki/entities/vgrep-tool.md +57 -0
- package/vault/wiki/entities/vitest.md +41 -0
- package/vault/wiki/flows/harness-wiki-pipeline.md +204 -0
- package/vault/wiki/hot.md +932 -0
- package/vault/wiki/index.md +437 -0
- package/vault/wiki/log.md +418 -0
- package/vault/wiki/meta/dashboard.md +30 -0
- package/vault/wiki/meta/lint-report-2026-04-30.md +86 -0
- package/vault/wiki/meta/lint-report-2026-05-02.md +251 -0
- package/vault/wiki/meta/overview.canvas +43 -0
- package/vault/wiki/modules/adversarial-verification.md +57 -0
- package/vault/wiki/modules/automated-observability.md +54 -0
- package/vault/wiki/modules/bench.md +20 -0
- package/vault/wiki/modules/extensions.md +23 -0
- package/vault/wiki/modules/grounding-checkpoints.md +62 -0
- package/vault/wiki/modules/harness-implementation-plan.md +345 -0
- package/vault/wiki/modules/harness-wiki-skill-mapping.md +135 -0
- package/vault/wiki/modules/harness.md +86 -0
- package/vault/wiki/modules/persistent-memory.md +85 -0
- package/vault/wiki/modules/schema-orchestration.md +68 -0
- package/vault/wiki/modules/skills.md +27 -0
- package/vault/wiki/modules/spec-hardening.md +58 -0
- package/vault/wiki/modules/structured-planning.md +53 -0
- package/vault/wiki/modules/think-in-code-enforcement.md +153 -0
- package/vault/wiki/modules/wiki-query-interface.md +64 -0
- package/vault/wiki/overview.md +51 -0
- package/vault/wiki/questions/Research-pi-vs-claude-code-agentic-orchestration-pipeline.md +87 -0
- package/vault/wiki/questions/Research-sentrux-dev.md +123 -0
- package/vault/wiki/questions/Research-superpowers-skill-for-agentic-coding-agents.md +164 -0
- package/vault/wiki/questions/Research: Augment Code Context Engine.md +244 -0
- package/vault/wiki/questions/Research: Automating Software Engineering - Lovable, Bolt, Emergent, Rocket.md +112 -0
- package/vault/wiki/questions/Research: Claude Code State-of-the-Art Harness Improvements.md +209 -0
- package/vault/wiki/questions/Research: Codex State-of-the-Art Harness Improvements.md +99 -0
- package/vault/wiki/questions/Research: Engineering Workflows of Legendary Programmers and AI Harness Mapping.md +107 -0
- package/vault/wiki/questions/Research: Fallow Codebase Intelligence Harness Integration.md +72 -0
- package/vault/wiki/questions/Research: Gemini CLI SOTA Harness Integration.md +166 -0
- package/vault/wiki/questions/Research: GitHub Issues as Harness Spec Storage.md +188 -0
- package/vault/wiki/questions/Research: Google Antigravity Harness Integration.md +120 -0
- package/vault/wiki/questions/Research: Meta-Agent Context Drift Detection.md +236 -0
- package/vault/wiki/questions/Research: Model-Adaptive Agent Harness Design.md +95 -0
- package/vault/wiki/questions/Research: Model-Specific Prompting Guides.md +165 -0
- package/vault/wiki/questions/Research: Prompt Renderer for Multi-Model Agent Harness.md +216 -0
- package/vault/wiki/questions/Research: Skill-First Harness Architecture.md +91 -0
- package/vault/wiki/questions/Research: TypeScript Best Practices and Codebase Structure.md +88 -0
- package/vault/wiki/questions/Research: TypeScript Execution Layer for Agent Tool Calling.md +81 -0
- package/vault/wiki/questions/Research: claude-mem over Obsidian for Harness Layer.md +71 -0
- package/vault/wiki/questions/Research: claude-mem over obsidian wiki as the knowledge base for our agentic harness pipeline. think from first principles. does this replace or complement our current setup? no hard feelings about previous decisions. gimme accurate points.md +80 -0
- package/vault/wiki/questions/Research: context-mode vs lean-ctx.md +72 -0
- package/vault/wiki/questions/Research: cursor.sh Harness Innovations.md +92 -0
- package/vault/wiki/questions/Research: executor.sh Harness Integration.md +170 -0
- package/vault/wiki/questions/Research: how GSD fits into our coding harness setup.md +97 -0
- package/vault/wiki/questions/Research: how claude-mem fits into our workflow. and whether it should replace obsidian in the codebase. no hard feelings about previous actions, rethink from first principles always.md +80 -0
- package/vault/wiki/questions/Research: pi-vcc.md +113 -0
- package/vault/wiki/questions/Research: semantic code search tools.md +69 -0
- package/vault/wiki/questions/Research: vcc extension for pi coding agent.md +73 -0
- package/vault/wiki/questions/how-to-enable-semantic-code-search-now.md +111 -0
- package/vault/wiki/questions/mvp-implementation-blueprint.md +552 -0
- package/vault/wiki/questions/research-agent-first-codebase-exploration.md +199 -0
- package/vault/wiki/questions/research-agentic-coding-harness-latest-papers.md +142 -0
- package/vault/wiki/questions/research-gitingest-gitreverse-integration.md +100 -0
- package/vault/wiki/questions/research-wozcode-token-reduction.md +67 -0
- package/vault/wiki/questions/resolved-context-pruning-inplace-vs-restart.md +95 -0
- package/vault/wiki/questions/resolved-context-window-economics.md +167 -0
- package/vault/wiki/questions/resolved-imad-debate-gating-transfer.md +126 -0
- package/vault/wiki/questions/resolved-mcp-tool-preference.md +112 -0
- package/vault/wiki/questions/resolved-small-model-meta-agents.md +107 -0
- package/vault/wiki/questions/resolved-treesitter-dynamic-languages.md +95 -0
- package/vault/wiki/sources/Auggie Context MCP Server.md +63 -0
- package/vault/wiki/sources/Augment Code Codacy AI Giants.md +61 -0
- package/vault/wiki/sources/Augment Code MCP SiliconAngle.md +49 -0
- package/vault/wiki/sources/Augment Code WorkOS ERC 2025.md +55 -0
- package/vault/wiki/sources/Augment Context Engine Official.md +71 -0
- package/vault/wiki/sources/Augment SWE-bench Agent GitHub.md +74 -0
- package/vault/wiki/sources/Augment SWE-bench Pro Blog.md +58 -0
- package/vault/wiki/sources/Source: AgentBus Jinja2 Prompt Pipelines.md +75 -0
- package/vault/wiki/sources/Source: Arxiv /342/200/224 Don't Break the Cache.md" +85 -0
- package/vault/wiki/sources/Source: Augment - Harness Engineering for AI Coding Agents.md +58 -0
- package/vault/wiki/sources/Source: Blake Crosley Agent Architecture Guide.md +100 -0
- package/vault/wiki/sources/Source: Bolt.new Architecture & Case Study.md +75 -0
- package/vault/wiki/sources/Source: Build-Time Prompt Compilation Architecture.md +107 -0
- package/vault/wiki/sources/Source: Claude API Agent Skills Overview.md +70 -0
- package/vault/wiki/sources/Source: Gemini CLI Changelogs.md +88 -0
- package/vault/wiki/sources/Source: Google Blog - Gemini CLI Announcement.md +57 -0
- package/vault/wiki/sources/Source: Google Gemini CLI Architecture Docs.md +53 -0
- package/vault/wiki/sources/Source: LangChain - Anatomy of Agent Harness.md +65 -0
- package/vault/wiki/sources/Source: Lovable Architecture & Clone Analysis.md +83 -0
- package/vault/wiki/sources/Source: Martin Fowler - Harness Engineering.md +70 -0
- package/vault/wiki/sources/Source: OpenAI Harness Engineering Five Principles.md +58 -0
- package/vault/wiki/sources/Source: OpenAI Harness Engineering /342/200/224 0 Lines of Human Code.md" +101 -0
- package/vault/wiki/sources/Source: OpenDev /342/200/224 Building AI Coding Agents for the Terminal.md" +100 -0
- package/vault/wiki/sources/Source: Render AI Coding Agents Benchmark 2025.md +53 -0
- package/vault/wiki/sources/Source: Rocket.new /342/200/224 Vibe Solutioning Platform.md" +70 -0
- package/vault/wiki/sources/Source: SwirlAI Agent Skills Progressive Disclosure.md +71 -0
- package/vault/wiki/sources/Source: TianPan Prompt Caching Architecture.md +89 -0
- package/vault/wiki/sources/Source: Vercel Labs agent-browser.md +155 -0
- package/vault/wiki/sources/Source: browser-harness CDP Harness.md +126 -0
- package/vault/wiki/sources/agent-drift-academic-paper.md +79 -0
- package/vault/wiki/sources/aider-repomap-tree-sitter.md +42 -0
- package/vault/wiki/sources/anthropic-compaction-api.md +58 -0
- package/vault/wiki/sources/anthropic-effective-harnesses.md +42 -0
- package/vault/wiki/sources/anthropic-prompt-best-practices.md +100 -0
- package/vault/wiki/sources/anthropic2026-harness-design.md +63 -0
- package/vault/wiki/sources/barrel-files-tkdodo.md +38 -0
- package/vault/wiki/sources/birth-of-unix-kernighan-interview.md +57 -0
- package/vault/wiki/sources/bockeler2026-harness-engineering.md +69 -0
- package/vault/wiki/sources/cast-code-chunking-paper.md +50 -0
- package/vault/wiki/sources/ck-semantic-search.md +78 -0
- package/vault/wiki/sources/claude-code-architecture-karaxai-2026.md +71 -0
- package/vault/wiki/sources/claude-code-architecture-qubytes-2026.md +50 -0
- package/vault/wiki/sources/claude-code-architecture-vila-lab-2026.md +64 -0
- package/vault/wiki/sources/claude-code-security-architecture-penligent-2026.md +70 -0
- package/vault/wiki/sources/claude-context-editing-docs.md +13 -0
- package/vault/wiki/sources/cloudflare-codemode.md +63 -0
- package/vault/wiki/sources/code-chunk-library-supermemory.md +63 -0
- package/vault/wiki/sources/codeact-apple-2024.md +62 -0
- package/vault/wiki/sources/codex-dsc-rfc-8573.md +41 -0
- package/vault/wiki/sources/codex-open-source-agent-2026.md +110 -0
- package/vault/wiki/sources/coir-code-retrieval-benchmark.md +51 -0
- package/vault/wiki/sources/colinmcnamara-context-optimization-codemode.md +48 -0
- package/vault/wiki/sources/context-folding-paper.md +61 -0
- package/vault/wiki/sources/context-mode-website.md +63 -0
- package/vault/wiki/sources/cursor-agent-best-practices-2026.md +62 -0
- package/vault/wiki/sources/cursor-fork-29b-2025.md +50 -0
- package/vault/wiki/sources/cursor-harness-april-2026.md +76 -0
- package/vault/wiki/sources/cursor-instant-apply-2024.md +45 -0
- package/vault/wiki/sources/cursor-shadow-workspace-2024.md +52 -0
- package/vault/wiki/sources/cursor-shipped-coding-agent-2026.md +53 -0
- package/vault/wiki/sources/cursor-vs-antigravity-2026.md +51 -0
- package/vault/wiki/sources/disler-pi-vs-claude-code.md +69 -0
- package/vault/wiki/sources/distill-deterministic-context-compression.md +53 -0
- package/vault/wiki/sources/embedding-models-benchmark-supermemory-2025.md +48 -0
- package/vault/wiki/sources/executor-rhyssullivan.md +122 -0
- package/vault/wiki/sources/fallow-rs-codebase-intelligence.md +125 -0
- package/vault/wiki/sources/fan2025-imad.md +60 -0
- package/vault/wiki/sources/forgecode-gpt5-agent-improvements.md +63 -0
- package/vault/wiki/sources/gemini-3-prompting-guide.md +78 -0
- package/vault/wiki/sources/gh-cli-sub-issue-rfc.md +50 -0
- package/vault/wiki/sources/gh-sub-issue-extension.md +72 -0
- package/vault/wiki/sources/github-fork-issues-discussion.md +44 -0
- package/vault/wiki/sources/github-issue-dependencies-docs.md +49 -0
- package/vault/wiki/sources/github-sub-issues-docs.md +51 -0
- package/vault/wiki/sources/gitingest.md +91 -0
- package/vault/wiki/sources/gitreverse.md +63 -0
- package/vault/wiki/sources/google-antigravity-official-blog.md +47 -0
- package/vault/wiki/sources/google-antigravity-wikipedia.md +53 -0
- package/vault/wiki/sources/gsd-codecentric-deep-dive.md +57 -0
- package/vault/wiki/sources/gsd-github-repo.md +51 -0
- package/vault/wiki/sources/gsd-hn-discussion.md +59 -0
- package/vault/wiki/sources/guido-python-design-philosophy.md +56 -0
- package/vault/wiki/sources/hejlsberg-7-learnings.md +48 -0
- package/vault/wiki/sources/ironclaw-drift-monitor.md +80 -0
- package/vault/wiki/sources/langsight-loop-detection.md +80 -0
- package/vault/wiki/sources/leanctx-website.md +69 -0
- package/vault/wiki/sources/lee2026-meta-harness.md +59 -0
- package/vault/wiki/sources/linux-kernel-coding-workflow.md +50 -0
- package/vault/wiki/sources/lou2026-autoharness.md +53 -0
- package/vault/wiki/sources/martin-fowler-harness-engineering.md +73 -0
- package/vault/wiki/sources/mcp-architecture-docs.md +13 -0
- package/vault/wiki/sources/meng2026-agent-harness-survey.md +79 -0
- package/vault/wiki/sources/mindstudio-four-agent-types.md +68 -0
- package/vault/wiki/sources/ms-chat-history-management.md +13 -0
- package/vault/wiki/sources/openai-prompt-guidance.md +104 -0
- package/vault/wiki/sources/openclaw-session-pruning.md +13 -0
- package/vault/wiki/sources/opencode-dcp.md +13 -0
- package/vault/wiki/sources/opendev-arxiv-2603.05344v1.md +79 -0
- package/vault/wiki/sources/openhands-platform.md +39 -0
- package/vault/wiki/sources/oss-guide-codebase-exploration.md +53 -0
- package/vault/wiki/sources/pi-compaction-extensions-ecosystem.md +102 -0
- package/vault/wiki/sources/pi-context-prune-github-repo.md +38 -0
- package/vault/wiki/sources/pi-mono-compaction-docs.md +38 -0
- package/vault/wiki/sources/pi-omni-compact-github-repo.md +50 -0
- package/vault/wiki/sources/pi-rtk-optimizer-github-repo.md +45 -0
- package/vault/wiki/sources/pi-vcc-github-repo.md +69 -0
- package/vault/wiki/sources/pi-vscode-marketplace.md +41 -0
- package/vault/wiki/sources/pi-vscode-model-provider-marketplace.md +39 -0
- package/vault/wiki/sources/py-tree-sitter.md +13 -0
- package/vault/wiki/sources/sentrux-dev-landing.md +40 -0
- package/vault/wiki/sources/sentrux-docs-pro-architecture.md +75 -0
- package/vault/wiki/sources/sentrux-docs-quality-signal.md +46 -0
- package/vault/wiki/sources/sentrux-docs-root-cause-metrics.md +57 -0
- package/vault/wiki/sources/sentrux-docs-rules-engine.md +58 -0
- package/vault/wiki/sources/sentrux-github-repo.md +56 -0
- package/vault/wiki/sources/superpowers-github-repo.md +56 -0
- package/vault/wiki/sources/superpowers-release-blog.md +54 -0
- package/vault/wiki/sources/superpowers-termdock-analysis.md +45 -0
- package/vault/wiki/sources/swe-agent-aci.md +42 -0
- package/vault/wiki/sources/swe-bench.md +45 -0
- package/vault/wiki/sources/swe-pruner-context-pruning.md +13 -0
- package/vault/wiki/sources/think-in-code-blog.md +48 -0
- package/vault/wiki/sources/tree-sitter-docs.md +13 -0
- package/vault/wiki/sources/ts-best-practices-2025-devto.md +42 -0
- package/vault/wiki/sources/ts-folder-structure-mingyang.md +58 -0
- package/vault/wiki/sources/ts-monorepo-koerselman.md +44 -0
- package/vault/wiki/sources/ts-result-error-handling-kkalamarski.md +52 -0
- package/vault/wiki/sources/ts-runtimes-comparison-betterstack.md +42 -0
- package/vault/wiki/sources/ts-strict-mode-rishikc.md +43 -0
- package/vault/wiki/sources/unix-philosophy.md +48 -0
- package/vault/wiki/sources/vectara-chunking-vs-embedding-naacl2025.md +39 -0
- package/vault/wiki/sources/vectara-guardian-agents.md +79 -0
- package/vault/wiki/sources/vgrep-semantic-search.md +76 -0
- package/vault/wiki/sources/vitest-official.md +41 -0
- package/vault/wiki/sources/vscode-pi-community-extension.md +40 -0
- package/vault/wiki/sources/wozcode.md +79 -0
- package/.agents/skills/compress/SKILL.md +0 -111
- package/.agents/skills/compress/scripts/__init__.py +0 -9
- package/.agents/skills/compress/scripts/__main__.py +0 -3
- package/.agents/skills/compress/scripts/benchmark.py +0 -78
- package/.agents/skills/compress/scripts/cli.py +0 -73
- package/.agents/skills/compress/scripts/compress.py +0 -227
- package/.agents/skills/compress/scripts/detect.py +0 -121
- package/.agents/skills/compress/scripts/validate.py +0 -189
- package/.agents/skills/emil-design-eng/SKILL.md +0 -679
- package/.agents/skills/lean-ctx/SKILL.md +0 -149
- package/.agents/skills/lean-ctx/scripts/install.sh +0 -95
- package/.agents/skills/scrapling-official/LICENSE.txt +0 -28
- package/.agents/skills/scrapling-official/SKILL.md +0 -390
- package/.agents/skills/scrapling-official/examples/01_fetcher_session.py +0 -26
- package/.agents/skills/scrapling-official/examples/02_dynamic_session.py +0 -26
- package/.agents/skills/scrapling-official/examples/03_stealthy_session.py +0 -26
- package/.agents/skills/scrapling-official/examples/04_spider.py +0 -58
- package/.agents/skills/scrapling-official/examples/README.md +0 -45
- package/.agents/skills/scrapling-official/references/fetching/choosing.md +0 -78
- package/.agents/skills/scrapling-official/references/fetching/dynamic.md +0 -352
- package/.agents/skills/scrapling-official/references/fetching/static.md +0 -432
- package/.agents/skills/scrapling-official/references/fetching/stealthy.md +0 -255
- package/.agents/skills/scrapling-official/references/mcp-server.md +0 -214
- package/.agents/skills/scrapling-official/references/migrating_from_beautifulsoup.md +0 -86
- package/.agents/skills/scrapling-official/references/parsing/adaptive.md +0 -212
- package/.agents/skills/scrapling-official/references/parsing/main_classes.md +0 -586
- package/.agents/skills/scrapling-official/references/parsing/selection.md +0 -494
- package/.agents/skills/scrapling-official/references/spiders/advanced.md +0 -344
- package/.agents/skills/scrapling-official/references/spiders/architecture.md +0 -94
- package/.agents/skills/scrapling-official/references/spiders/getting-started.md +0 -164
- package/.agents/skills/scrapling-official/references/spiders/proxy-blocking.md +0 -235
- package/.agents/skills/scrapling-official/references/spiders/requests-responses.md +0 -196
- package/.agents/skills/scrapling-official/references/spiders/sessions.md +0 -205
- package/PLAN.md +0 -11
- package/extensions/lean-ctx-enforce.ts +0 -166
- package/skills-lock.json +0 -35
- package/wiki/README.md +0 -19
- package/wiki/decisions/0001-establish-project-wiki-and-decision-record-format.md +0 -25
- package/wiki/decisions/0002-add-project-banner-to-readme.md +0 -26
- package/wiki/decisions/0003-remove-redundant-readme-title-heading.md +0 -26
- package/wiki/decisions/0004-publish-package-to-npm-as-ultimate-pi.md +0 -26
- package/wiki/decisions/0005-automate-npm-publish-with-github-actions.md +0 -27
- package/wiki/decisions/0006-switch-to-npm-trusted-publishing.md +0 -26
- package/wiki/decisions/0007-use-absolute-banner-url-for-npm-readme-rendering.md +0 -26
- package/wiki/decisions/0008-rename-banner-asset-for-cache-busting.md +0 -26
- package/wiki/decisions/0009-force-oidc-path-by-clearing-node-auth-token-in-publish-step.md +0 -25
- package/wiki/decisions/0010-simplify-setup-node-for-npm-trusted-publishing.md +0 -26
- package/wiki/decisions/0011-add-noop-workflow-change-to-force-fresh-publish-run.md +0 -25
- package/wiki/decisions/0012-align-workflow-runtime-with-npm-trusted-publishing-requirements.md +0 -26
- package/wiki/decisions/0013-add-package-repository-url-for-provenance-validation.md +0 -25
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: synthesis
|
|
3
|
+
title: "Research: Agent-First Codebase Exploration Strategies"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
tags:
|
|
7
|
+
- research
|
|
8
|
+
- agent-architecture
|
|
9
|
+
- codebase-exploration
|
|
10
|
+
- harness-design
|
|
11
|
+
status: developing
|
|
12
|
+
related:
|
|
13
|
+
- "[[oss-guide-codebase-exploration]]"
|
|
14
|
+
- "[[aider-repomap-tree-sitter]]"
|
|
15
|
+
- "[[swe-agent-aci]]"
|
|
16
|
+
- "[[swe-bench]]"
|
|
17
|
+
- "[[openhands-platform]]"
|
|
18
|
+
- "[[agent-codebase-interface]]"
|
|
19
|
+
- "[[progressive-disclosure-agents]]"
|
|
20
|
+
- "[[repo-map-ranking]]"
|
|
21
|
+
- "[[execution-feedback-loop]]"
|
|
22
|
+
- "[[harness]]"
|
|
23
|
+
- "[[grounding-checkpoints]]"
|
|
24
|
+
- "[[structured-planning]]"
|
|
25
|
+
sources:
|
|
26
|
+
- "[[oss-guide-codebase-exploration]]"
|
|
27
|
+
- "[[aider-repomap-tree-sitter]]"
|
|
28
|
+
- "[[swe-agent-aci]]"
|
|
29
|
+
- "[[swe-bench]]"
|
|
30
|
+
- "[[openhands-platform]]"
|
|
31
|
+
|
|
32
|
+
---# Research: Rethinking OSS Codebase Exploration for AI Coding Agents
|
|
33
|
+
|
|
34
|
+
## Overview
|
|
35
|
+
|
|
36
|
+
The OSS Guide by Parth Parikh et al. (2020) is a human-centric manual for exploring large codebases. Every technique assumes a human developer with visual cortex, intuition, unlimited working memory, and gradual learning curves. AI coding agents have none of these. This synthesis maps each human technique to an agent-equivalent strategy — and identifies where the agent can actually do better.
|
|
37
|
+
|
|
38
|
+
The core finding: humans and agents need fundamentally different interfaces to the same codebase. The Agent-Codebase Interface (ACI) concept from SWE-agent formalizes this gap. Our harness must implement agent-native exploration strategies, not emulate human workflows.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Key Findings
|
|
43
|
+
|
|
44
|
+
### 1. "Use the project" → "Map the project" (Source: [[oss-guide-codebase-exploration]], [[aider-repomap-tree-sitter]])
|
|
45
|
+
|
|
46
|
+
**Human strategy**: Build something with the project to learn its breadth through experiential exposure.
|
|
47
|
+
|
|
48
|
+
**Agent equivalent**: Construct a structured repo map — AST-parsed symbol definitions with cross-references, ranked by importance within token budget. Agents learn from structured information, not experiential use. Aider's repo map approach (tree-sitter + graph ranking) is the canonical implementation.
|
|
49
|
+
|
|
50
|
+
**Agent advantage**: Can ingest the entire symbol structure of a 100K-line codebase in ~2K tokens. A human would need days of exploration.
|
|
51
|
+
|
|
52
|
+
**Agent disadvantage**: Cannot form intuitive mental models. Every dependency must be explicitly represented.
|
|
53
|
+
|
|
54
|
+
### 2. "Check earliest commits" → "Check architectural spec" (Source: [[oss-guide-codebase-exploration]])
|
|
55
|
+
|
|
56
|
+
**Human strategy**: Read initial commits to understand the project's founding goals and core architecture.
|
|
57
|
+
|
|
58
|
+
**Agent equivalent**: Parse the current architecture, not historical commits. Agents don't benefit from evolutionary understanding — they need the current dependency graph. Architectural decision records (ADRs), SPEC.md files, and module-level docstrings are more valuable. Earliest commits may contain code that no longer exists or has been refactored beyond recognition.
|
|
59
|
+
|
|
60
|
+
**Verdict**: Skip for agents. Read current architecture docs instead.
|
|
61
|
+
|
|
62
|
+
### 3. "Test cases as documentation" → "Test cases as ground truth" (Source: [[oss-guide-codebase-exploration]], [[execution-feedback-loop]])
|
|
63
|
+
|
|
64
|
+
**Human strategy**: Read tests to understand expected behavior.
|
|
65
|
+
|
|
66
|
+
**Agent equivalent**: Execute tests as verification checkpoints in the feedback loop. Tests serve dual purpose: (a) documentation of expected behavior, (b) runtime verification of changes. Agents should extract test assertions as behavioral contracts and use failing tests as precision navigation (test output + stack trace → exact file:line of failure).
|
|
67
|
+
|
|
68
|
+
**Agent advantage**: Can run the entire test suite, extract structured failure data, and correlate failures to specific edits — all in seconds. Humans can't match this speed.
|
|
69
|
+
|
|
70
|
+
**Agent disadvantage**: Cannot visually "see" test patterns or infer missing test coverage without explicit tooling.
|
|
71
|
+
|
|
72
|
+
### 4. "Git log trick (80/20 rule)" → "Graph centrality ranking" (Source: [[oss-guide-codebase-exploration]], [[repo-map-ranking]])
|
|
73
|
+
|
|
74
|
+
**Human strategy**: `git log --name-only | sort | uniq -c | sort -rg` to find most-edited files — the 20% of files doing 80% of the work.
|
|
75
|
+
|
|
76
|
+
**Agent equivalent**: AST-based dependency graph with PageRank-style centrality. Most-referenced symbols = most important. This is more accurate than edit frequency because: (a) some core files rarely change (stable), (b) some frequently-edited files are just config/tests. Graph centrality captures structural importance, not historical churn.
|
|
77
|
+
|
|
78
|
+
**Implementation for harness**: tree-sitter parse → extract definitions + references → build file-to-file edge graph → rank by in-degree (reference count) → select top-k within token budget.
|
|
79
|
+
|
|
80
|
+
### 5. "Don't try to understand everything" → "Progressive disclosure" (Source: [[oss-guide-codebase-exploration]], [[progressive-disclosure-agents]])
|
|
81
|
+
|
|
82
|
+
**Human strategy**: Narrow scope to the relevant subsystem; treat everything else as a black box.
|
|
83
|
+
|
|
84
|
+
**Agent equivalent**: Identical principle, but implemented through [[progressive-disclosure-agents]] — a layered information architecture (L0: project map, L1: symbol map, L2: file context, L3: deep context). Agent starts with L0 always available, queries deeper layers on demand.
|
|
85
|
+
|
|
86
|
+
**Key difference**: Humans scope down through intuition. Agents scope down through structured queries — "show me all callers of function X" or "show me all implementations of interface Y." The tooling must support these queries efficiently.
|
|
87
|
+
|
|
88
|
+
### 6. "Paper Cut Principle" → "Coverage-driven exploration" (Source: [[oss-guide-codebase-exploration]])
|
|
89
|
+
|
|
90
|
+
**Human strategy**: Many small fixes across the codebase build deep understanding over time.
|
|
91
|
+
|
|
92
|
+
**Agent equivalent**: Agents don't learn over time (stateless across sessions unless persisted). Instead, they should ingest coverage information upfront: which files touch which subsystems, what the dependency boundaries are, where the hot paths live. A single comprehensive map is better than incremental learning. For persistent agents, store codebase understanding in the [[persistent-memory]] wiki layer.
|
|
93
|
+
|
|
94
|
+
**Recommendation**: Build the full repo map once (cached). Refresh on new sessions by diffing against cached map. Don't rely on gradual learning.
|
|
95
|
+
|
|
96
|
+
### 7. "Reproduce the issue" → "Automated reproduction + test capture" (Source: [[oss-guide-codebase-exploration]], [[execution-feedback-loop]])
|
|
97
|
+
|
|
98
|
+
**Human strategy**: Manually reproduce the bug to understand it, then write a failing test.
|
|
99
|
+
|
|
100
|
+
**Agent equivalent**: Automate reproduction when possible (script the steps). Generate a minimal failing test from the issue description. The test becomes the verification checkpoint. This is a core capability already in the [[grounding-checkpoints]] layer of our harness.
|
|
101
|
+
|
|
102
|
+
### 8. "Structured theorizing" → "Multi-hypothesis search" (Source: [[oss-guide-codebase-exploration]])
|
|
103
|
+
|
|
104
|
+
**Human strategy**: Brainstorm potential causes, verify each.
|
|
105
|
+
|
|
106
|
+
**Agent equivalent**: Generate multiple candidate fix locations based on error signatures, stack traces, and symbol maps. Verifying each through targeted code inspection. This is effectively what the [[adversarial-verification]] layer does — critic agents propose alternative hypotheses.
|
|
107
|
+
|
|
108
|
+
### 9. "Feedback from mentors" → "Adversarial verification" (Source: [[oss-guide-codebase-exploration]], [[adversarial-verification]])
|
|
109
|
+
|
|
110
|
+
**Human strategy**: Rubber duck debugging, mentor review, explain to someone else.
|
|
111
|
+
|
|
112
|
+
**Agent equivalent**: [[adversarial-verification]] — a separate critic agent reviews the proposed change, checks for edge cases, verifies against specifications, and either approves or sends back with specific failure reasons. This replaces the human mentor role.
|
|
113
|
+
|
|
114
|
+
### 10. "Hack it, then get it right" → "Iterative refinement with verification gates" (Source: [[oss-guide-codebase-exploration]])
|
|
115
|
+
|
|
116
|
+
**Human strategy**: Get a proof of concept working first, then polish.
|
|
117
|
+
|
|
118
|
+
**Agent equivalent**: This maps directly to the harness pipeline: [[structured-planning]] → [[grounding-checkpoints]] (smallest verifiable change) → execute → verify → iterate. The key difference: agents must pass verification at every checkpoint, not just at the end. Each iteration must produce a verifiable state.
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## Agent-Superior Capabilities
|
|
123
|
+
|
|
124
|
+
Areas where agents outperform humans on codebase exploration:
|
|
125
|
+
|
|
126
|
+
| Capability | Why Agents Win |
|
|
127
|
+
|------------|---------------|
|
|
128
|
+
| Symbol-space ingestion | Can parse and index 100K+ symbols in seconds across entire codebase |
|
|
129
|
+
| Cross-reference tracking | Tree-sitter + graph algorithms find all callers/callees instantly |
|
|
130
|
+
| Multi-file correlation | Can hold 50+ files in context simultaneously (if within window) |
|
|
131
|
+
| Test execution speed | Can run thousands of tests, parse results, and correlate to changes |
|
|
132
|
+
| Pattern matching at scale | grep/semgrep/ast-grep across entire codebase in milliseconds |
|
|
133
|
+
|
|
134
|
+
## Agent-Weak Areas
|
|
135
|
+
|
|
136
|
+
Areas where agents need explicit tooling to compensate:
|
|
137
|
+
|
|
138
|
+
| Weakness | Mitigation |
|
|
139
|
+
|----------|-----------|
|
|
140
|
+
| No visual pattern recognition | Need explicit AST representations, not visual layouts |
|
|
141
|
+
| No intuition or mental models | Need explicit dependency graphs and data flow diagrams |
|
|
142
|
+
| Fixed context window | Need ranking and progressive disclosure to stay within budget |
|
|
143
|
+
| No learning across sessions | Need persistent memory ([[persistent-memory]] wiki layer) |
|
|
144
|
+
| Can't "skim" or scan | Need structured search with precise queries |
|
|
145
|
+
| No physical debugging | Need execution feedback loop with structured output |
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Implementation Recommendations for Our Harness
|
|
150
|
+
|
|
151
|
+
### Must-Have (L1-L3 integration)
|
|
152
|
+
|
|
153
|
+
1. **Repo Map Generator**: Integrate tree-sitter parsing into L3 ([[grounding-checkpoints]]) or as a pre-flight step. Produce ranked symbol map on every harness invocation.
|
|
154
|
+
|
|
155
|
+
2. **Progressive Disclosure API**: L0 always injected into context. L1 queryable by agent. L2/L3 available on explicit request.
|
|
156
|
+
|
|
157
|
+
3. **Execution Feedback Loop**: Every code change must trigger relevant test subset. Output must be structured (JSON error format with file:line:message).
|
|
158
|
+
|
|
159
|
+
4. **Persistent Codebase Understanding**: Cache repo maps in [[persistent-memory]]. Diff against cache on each session to identify changes.
|
|
160
|
+
|
|
161
|
+
### Should-Have (medium priority)
|
|
162
|
+
|
|
163
|
+
5. **Call Graph Queries**: "Show me all callers of X" / "Show me all implementations of interface Y" — implemented via tree-sitter reference tracking.
|
|
164
|
+
|
|
165
|
+
6. **Symbol-Level Diffs**: When a file changes, show which symbols were added/removed/modified — not just which lines changed.
|
|
166
|
+
|
|
167
|
+
7. **Test Impact Analysis**: Determine which tests are affected by a code change. Only run those. Essential for keeping the feedback loop fast.
|
|
168
|
+
|
|
169
|
+
### Nice-to-Have
|
|
170
|
+
|
|
171
|
+
8. **Architecture Diagram Generation**: Auto-generate module dependency diagrams from import graphs.
|
|
172
|
+
|
|
173
|
+
9. **Hotspot Detection**: Identify files/symbols with high churn + high reference count = high risk.
|
|
174
|
+
|
|
175
|
+
10. **Semantic Chunking**: Split files into semantically meaningful chunks (functions, classes, logical blocks) for more efficient context loading than raw line-based chunking.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Contradictions
|
|
180
|
+
|
|
181
|
+
- [[oss-guide-codebase-exploration]] recommends "use the project" as the first step. [[aider-repomap-tree-sitter]] and [[swe-agent-aci]] show that structured mapping is superior for agents. Resolution: Use the project only to extract behavioral contracts (API surface, expected inputs/outputs), not for broad familiarization.
|
|
182
|
+
|
|
183
|
+
- [[oss-guide-codebase-exploration]] recommends checking earliest commits. Our analysis finds this ineffective for agents — architectural drift makes historical commits misleading. Resolution: Parse current architecture via AST, not git history.
|
|
184
|
+
|
|
185
|
+
## Open Questions
|
|
186
|
+
|
|
187
|
+
- How to handle dynamic languages (Python, JS) where tree-sitter can't resolve all references statically? (e.g., `getattr`, dynamic imports)
|
|
188
|
+
- What is the optimal token allocation between repo map vs. file contents vs. conversation history?
|
|
189
|
+
- How to handle monorepos where a single repo map would exceed even the largest context windows?
|
|
190
|
+
- Can we pre-compute and cache agent-specific codebase representations (embeddings, graphs) to avoid re-parsing on every invocation?
|
|
191
|
+
- How does the agent decide when to expand context (L0→L1→L2) vs. when to work with what it has?
|
|
192
|
+
|
|
193
|
+
## Sources
|
|
194
|
+
|
|
195
|
+
- [[oss-guide-codebase-exploration]]: Human-centric codebase exploration guide (2020)
|
|
196
|
+
- [[aider-repomap-tree-sitter]]: Tree-sitter + graph ranking for LLM code context (2023)
|
|
197
|
+
- [[swe-agent-aci]]: Agent-Computer Interfaces concept and SWE-agent system (2024)
|
|
198
|
+
- [[swe-bench]]: Benchmark for real-world software engineering tasks (2023)
|
|
199
|
+
- [[openhands-platform]]: Open platform for AI software developer agents (2024)
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: synthesis
|
|
3
|
+
title: "Research: Agentic Coding Harness — Latest Papers & Pipeline Improvements"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
tags:
|
|
7
|
+
- research
|
|
8
|
+
- harness
|
|
9
|
+
- agentic-coding
|
|
10
|
+
- pipeline
|
|
11
|
+
status: developing
|
|
12
|
+
related:
|
|
13
|
+
- "[[harness-implementation-plan]]"
|
|
14
|
+
- "[[agentic-harness]]"
|
|
15
|
+
- "[[model-adaptive-harness]]"
|
|
16
|
+
- "[[consensus-debate]]"
|
|
17
|
+
- "[[adr-011]]"
|
|
18
|
+
- "[[adversarial-verification]]"
|
|
19
|
+
- "[[harness-h-formalism]]"
|
|
20
|
+
- "[[feedforward-feedback-harness]]"
|
|
21
|
+
- "[[generator-evaluator-architecture]]"
|
|
22
|
+
- "[[self-evolving-harness]]"
|
|
23
|
+
- "[[selective-debate-routing]]"
|
|
24
|
+
- "[[context-anxiety]]"
|
|
25
|
+
sources:
|
|
26
|
+
- "[[meng2026-agent-harness-survey]]"
|
|
27
|
+
- "[[anthropic2026-harness-design]]"
|
|
28
|
+
- "[[bockeler2026-harness-engineering]]"
|
|
29
|
+
- "[[lou2026-autoharness]]"
|
|
30
|
+
- "[[lee2026-meta-harness]]"
|
|
31
|
+
- "[[fan2025-imad]]"
|
|
32
|
+
|
|
33
|
+
---# Research: Agentic Coding Harness — Latest Papers & Pipeline Improvements
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
Researched 9 key sources (2 surveys, 5 papers, 2 production engineering blogs) from 2025-2026 on agentic coding harnesses. The field has crystallized around a consensus: **the harness — not the model — is the primary determinant of agent reliability at scale.** 2026 is "the year of the harness." Our pipeline plan is well-aligned with the state of the art but has specific actionable improvements.
|
|
38
|
+
|
|
39
|
+
## Key Findings
|
|
40
|
+
|
|
41
|
+
### 1. The Harness Has a Formal Model (Source: [[meng2026-agent-harness-survey]])
|
|
42
|
+
The survey formalizes the harness as **H = (E, T, C, S, L, V)**: Execution Loop, Tool Registry, Context Manager, State Store, Lifecycle Hooks, Evaluation Interface. No system achieves production reliability without all six. Our 8-layer pipeline maps cleanly but lacks explicit lifecycle hooks (L) and systematic evaluation trajectory tracking (V).
|
|
43
|
+
|
|
44
|
+
**Action**: Add explicit H=(E,T,C,S,L,V) mapping to our harness documentation. Consider formal component contracts.
|
|
45
|
+
|
|
46
|
+
### 2. Self-Evaluation Is Fundamentally Broken (Source: [[anthropic2026-harness-design]])
|
|
47
|
+
When agents evaluate their own work, they "confidently praise mediocre outputs." Separating generator from evaluator is essential. The evaluator needs explicit tuning to be skeptical — out of the box, Claude "talks itself out of flagging real issues."
|
|
48
|
+
|
|
49
|
+
**Action**: Strengthen L4 adversarial verification with explicit pass/fail grading criteria and hard thresholds, not just narrative feedback. Add sprint contracts (agree on "done" before code) at L2.
|
|
50
|
+
|
|
51
|
+
### 3. Harness Simplification Is Ongoing Practice (Source: [[anthropic2026-harness-design]])
|
|
52
|
+
"Every component in a harness encodes an assumption about what the model can't do on its own — and those assumptions are worth stress testing." As Opus 4.6 improved, Anthropic removed sprint decomposition and made the evaluator conditional. The space of harness combinations "doesn't shrink as models improve — it moves."
|
|
53
|
+
|
|
54
|
+
**Action**: Add a "harness simplification" review gate after each model upgrade. Which components became unnecessary? Which new capabilities enable removing old scaffolding?
|
|
55
|
+
|
|
56
|
+
### 4. Feedforward + Feedback Control Framework (Source: [[bockeler2026-harness-engineering]])
|
|
57
|
+
Martin Fowler team formalizes harness controls as: Feedforward (guides: AGENTS.md, skills, LSP) and Feedback (sensors: linters, tests, AI review). Both computational (deterministic) and inferential (probabilistic). The behavioural harness — functional correctness verification — remains unsolved.
|
|
58
|
+
|
|
59
|
+
**Action**: Audit our pipeline against the feedforward/feedback framework. Are we missing computational sensors that could run cheaply per-edit? Our Phase 12 (inline syntax) is correct but could expand to structural tests (ArchUnit equivalents).
|
|
60
|
+
|
|
61
|
+
### 5. Harnesses Can Self-Evolve (Sources: [[lou2026-autoharness]], [[lee2026-meta-harness]])
|
|
62
|
+
AutoHarness: small model synthesizes harness code from environment feedback. 78% of chess losses were illegal moves → harness eliminates all illegal moves. Meta-Harness: outer-loop optimization over harness code, surpasses hand-engineered baselines on TerminalBench-2.
|
|
63
|
+
|
|
64
|
+
**Action**: Add Phase 17 (future): Harness Auto-Optimization. Auto-tune token budgets from execution traces. Learn model profiles instead of hand-coding them. Auto-remove unnecessary gates.
|
|
65
|
+
|
|
66
|
+
### 6. Debate Should Be Selective, Not Always-On (Source: [[fan2025-imad]])
|
|
67
|
+
iMAD: Selective debate via lightweight classifier saves 92% tokens AND improves accuracy by 13.5% vs always-debate. Debate can overturn correct answers — it's not always beneficial.
|
|
68
|
+
|
|
69
|
+
**Action**: Modify ADR-011 consensus debate design. Add a pre-debate gating classifier. Single agent self-critiques first; only trigger debate when hesitation cues detected. This could reduce projected ~13,000 token debate overhead to ~1,000 tokens in high-confidence cases.
|
|
70
|
+
|
|
71
|
+
### 7. Context Anxiety Is Real (Source: [[anthropic2026-harness-design]])
|
|
72
|
+
Models rush to finish as context fills. Sonnet 4.5 exhibited strong context anxiety requiring full context resets. Opus 4.5+ largely fixed. GPT/strict models may still be vulnerable.
|
|
73
|
+
|
|
74
|
+
**Action**: Add context anxiety detection to long-running harness sessions. For GPT models, consider context resets between rounds with structured handoff artifacts.
|
|
75
|
+
|
|
76
|
+
## Key Entities
|
|
77
|
+
|
|
78
|
+
- **[[anthropic2026-harness-design]]**: Leading production harness engineering. GAN-inspired multi-agent architecture. Published definitive harness design guide.
|
|
79
|
+
- **[[meng2026-agent-harness-survey]]**: Authored the first comprehensive harness survey (110+ papers, 23 systems). Formalized H=(E,T,C,S,L,V).
|
|
80
|
+
- **[[bockeler2026-harness-engineering]]**: Feedforward/feedback control framework for harness engineering.
|
|
81
|
+
- **[[lee2026-meta-harness]]**: Meta-Harness: automated harness optimization via outer-loop search.
|
|
82
|
+
|
|
83
|
+
## Key Concepts
|
|
84
|
+
|
|
85
|
+
- [[harness-h-formalism]]: H = (E, T, C, S, L, V) formal model
|
|
86
|
+
- [[feedforward-feedback-harness]]: Guides + sensors, computational + inferential
|
|
87
|
+
- [[generator-evaluator-architecture]]: GAN-inspired separation with sprint contracts
|
|
88
|
+
- [[self-evolving-harness]]: Auto-synthesis and meta-optimization of harness code
|
|
89
|
+
- [[selective-debate-routing]]: Trigger debate only when beneficial (iMAD)
|
|
90
|
+
- [[context-anxiety]]: Models rush as context fills
|
|
91
|
+
|
|
92
|
+
## Pipeline Improvement Recommendations
|
|
93
|
+
|
|
94
|
+
### Immediate (integrate into existing phases)
|
|
95
|
+
|
|
96
|
+
| # | Change | Affected Phase | Source |
|
|
97
|
+
|---|--------|---------------|--------|
|
|
98
|
+
| 1 | Add explicit pass/fail grading criteria with hard thresholds to L4 critics | Phase 5-6 | Anthropic harness design |
|
|
99
|
+
| 2 | Add sprint contract negotiation at L2 (agree on "done" before L3) | Phase 3-4 | Anthropic harness design |
|
|
100
|
+
| 3 | Add pre-debate gating classifier to ADR-011 consensus debate | Phase 14-15 | iMAD |
|
|
101
|
+
| 4 | Add H=(E,T,C,S,L,V) mapping to harness documentation | Phase 0 | Harness survey |
|
|
102
|
+
| 5 | Audit feedforward/feedback controls: missing computational sensors? | All phases | Martin Fowler |
|
|
103
|
+
|
|
104
|
+
### Future Phases (new)
|
|
105
|
+
|
|
106
|
+
| # | Phase | Description | Source |
|
|
107
|
+
|---|-------|-------------|--------|
|
|
108
|
+
| 17 | Harness Auto-Optimization | Auto-tune token budgets, learn model profiles, auto-remove unnecessary gates | Meta-Harness, AutoHarness |
|
|
109
|
+
| 18 | Behaviour Harness | Functional correctness verification — the unsolved problem | Martin Fowler |
|
|
110
|
+
| 19 | Context Anxiety Guard | Detect and mitigate context anxiety in long-running sessions | Anthropic harness design |
|
|
111
|
+
|
|
112
|
+
### Revised Token Budget (with improvements)
|
|
113
|
+
|
|
114
|
+
| Layer | Current | After Improvements | Mechanism |
|
|
115
|
+
|-------|---------|-------------------|-----------|
|
|
116
|
+
| L1 Spec hardening | ~2,000 | ~2,000 | No change |
|
|
117
|
+
| L2 Planning + review | ~5,000 | ~7,500 | Sprint contracts add overhead |
|
|
118
|
+
| L4 Adversarial | ~4,000 | ~4,500 | Hard-threshold criteria |
|
|
119
|
+
| Consensus debate | ~13,000 | ~3,000 | Selective routing (92% token savings on ~80% of tasks) |
|
|
120
|
+
| **Total per subtask** | **~30,500-33,500** | **~24,000-26,000** | Net savings ~20% |
|
|
121
|
+
|
|
122
|
+
## Contradictions
|
|
123
|
+
|
|
124
|
+
- **Always-debate vs selective debate**: Our ADR-011 assumes debate always improves outcomes. iMAD shows debate can overturn correct answers. Resolution: adopt selective routing. (Confidence: medium — iMAD tested on QA, not code review. Transferability needs verification.)
|
|
125
|
+
- **Harness complexity vs simplification**: Full harness costs 20x more (Anthropic). Meta-Harness finds simpler harnesses automatically. Resolution: complexity is justified until models improve enough to make components unnecessary. Regular simplification audits required.
|
|
126
|
+
|
|
127
|
+
## Open Questions
|
|
128
|
+
|
|
129
|
+
- Do iMAD's hesitation cues generalize from QA tasks to code review (our L4 debate domain)?
|
|
130
|
+
- Can a single debate-gating classifier work across L1 (spec), L2 (plan), and L4 (implementation)?
|
|
131
|
+
- What is the right cadence for harness simplification audits? Every model upgrade? Monthly?
|
|
132
|
+
- How do we measure harness coverage/quality? (No existing methodology — identified as open problem by both surveys)
|
|
133
|
+
- Should the evaluator always use a different model than the generator for genuine adversarial diversity?
|
|
134
|
+
|
|
135
|
+
## Sources
|
|
136
|
+
|
|
137
|
+
- [[meng2026-agent-harness-survey]]: Meng et al., April 2026. H=(E,T,C,S,L,V), 110+ papers, 23 systems.
|
|
138
|
+
- [[anthropic2026-harness-design]]: Rajasekaran, March 2026. GAN-inspired generator-evaluator architecture.
|
|
139
|
+
- [[bockeler2026-harness-engineering]]: Böckeler/Fowler, April 2026. Feedforward/feedback control framework.
|
|
140
|
+
- [[lou2026-autoharness]]: Lou et al., February 2026. Automatic harness synthesis from environment feedback.
|
|
141
|
+
- [[lee2026-meta-harness]]: Lee et al., March 2026. Outer-loop harness optimization over code.
|
|
142
|
+
- [[fan2025-imad]]: Fan et al., AAAI 2026. Selective multi-agent debate with 92% token savings.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: synthesis
|
|
3
|
+
title: "Research: GitIngest and GitReverse Integration"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
tags:
|
|
7
|
+
- research
|
|
8
|
+
- tool-evaluation
|
|
9
|
+
- codebase-ingestion
|
|
10
|
+
status: complete
|
|
11
|
+
related:
|
|
12
|
+
- "[[gitingest]]"
|
|
13
|
+
- "[[gitreverse]]"
|
|
14
|
+
- "[[codebase-to-context-ingestion]]"
|
|
15
|
+
- "[[lean-ctx]]"
|
|
16
|
+
sources:
|
|
17
|
+
- "[[gitingest]]"
|
|
18
|
+
- "[[gitreverse]]"
|
|
19
|
+
|
|
20
|
+
---# Research: GitIngest and GitReverse Integration
|
|
21
|
+
|
|
22
|
+
## Overview
|
|
23
|
+
|
|
24
|
+
Evaluated two codebase-to-LLM services for integration into the ultimate-pi harness: **Gitingest** (codebase → structured text) and **GitReverse** (repo → synthetic user prompt). Gitingest is a strong fit. GitReverse is not.
|
|
25
|
+
|
|
26
|
+
## Key Findings
|
|
27
|
+
|
|
28
|
+
- **Gitingest converts entire codebases into LLM-ready structured text** (Source: [[gitingest]]). Output includes summary, directory tree, and all file contents with clear delimiters. No LLM dependency — deterministic and fast.
|
|
29
|
+
- **GitReverse generates user prompts FROM repos** using LLM inference on metadata only (Source: [[gitreverse]]). It does NOT read source code. This is useful for users who want to "reverse engineer" what prompt created a project, but it doesn't help an agent ingest codebases.
|
|
30
|
+
- **The harness currently lacks bulk codebase ingestion** (Source: [[lean-ctx]] handles file-by-file reading only). Gitingest fills this gap directly.
|
|
31
|
+
- **Gitingest has a Python package** (`pip install gitingest`) with a clean API: `from gitingest import ingest` returns `(summary, tree, content)`. Can be wrapped as a skill or called via bash.
|
|
32
|
+
- **Gitingest has an `/llms.txt` endpoint** providing machine-readable documentation for LLM agents to self-integrate.
|
|
33
|
+
|
|
34
|
+
## Critical Evaluation: Gitingest
|
|
35
|
+
|
|
36
|
+
### Will it help the harness right now? **YES**
|
|
37
|
+
|
|
38
|
+
| Need | Current State | With Gitingest |
|
|
39
|
+
|------|--------------|----------------|
|
|
40
|
+
| Understand external repo | File-by-file via lean-ctx | Bulk ingestion in one operation |
|
|
41
|
+
| Research dependencies | Manual web fetch | Structured codebase dump |
|
|
42
|
+
| Ingest docs repos into wiki | Manual per-page | Single pipeline step |
|
|
43
|
+
| Cross-reference implementations | Not possible | Compare codebases side-by-side |
|
|
44
|
+
|
|
45
|
+
### Why integrate
|
|
46
|
+
|
|
47
|
+
1. **Fills a capability gap**: The harness has no mechanism to ingest entire external codebases as context
|
|
48
|
+
2. **Low integration cost**: Python package with clean API, trivially wrappable as a skill
|
|
49
|
+
3. **No LLM dependency**: Deterministic output, no cost, no latency risk
|
|
50
|
+
4. **Complementary to lean-ctx**: lean-ctx for local files, Gitingest for external repos
|
|
51
|
+
5. **Already optimized for LLM context**: Output format has clear delimiters and structure
|
|
52
|
+
|
|
53
|
+
### How to integrate
|
|
54
|
+
|
|
55
|
+
**Recommended: Skill wrapper around Python package**
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Skill: /gitingest
|
|
59
|
+
└── Calls: gitingest <url> -o -
|
|
60
|
+
└── Options: --include/--exclude patterns, --max-size, --branch
|
|
61
|
+
└── Output: pipes to agent context or files to wiki
|
|
62
|
+
└── Private repos: reads GITHUB_TOKEN from .env (already loaded by dotenv-loader extension)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Integration steps:
|
|
66
|
+
1. Add `gitingest` to optional dependencies in `package.json` (as a `pip` dependency note) or document as prerequisite
|
|
67
|
+
2. Create skill at `.pi/skills/gitingest/SKILL.md` that wraps `gitingest` CLI or Python API
|
|
68
|
+
3. Skill handles: URL validation, output formatting, wiki filing (via wiki-ingest), error cases (rate limits, private repos without token, large repos)
|
|
69
|
+
4. Register in skills-lock.json
|
|
70
|
+
|
|
71
|
+
**Alternative: Direct bash integration**
|
|
72
|
+
Simpler but less polished: just document that agent can run `gitingest <url>` via bash. No skill needed. This is the MVP approach.
|
|
73
|
+
|
|
74
|
+
## Critical Evaluation: GitReverse
|
|
75
|
+
|
|
76
|
+
### Will it help the harness right now? **NO**
|
|
77
|
+
|
|
78
|
+
- GitReverse generates prompts FROM repos — the harness receives prompts, it doesn't need to generate them
|
|
79
|
+
- It only reads metadata, not code. The harness needs code-level understanding
|
|
80
|
+
- It uses LLM inference (cost + latency) for something the harness doesn't need
|
|
81
|
+
- The output is a natural language prompt, not structured code context
|
|
82
|
+
|
|
83
|
+
> [!gap] Could GitReverse be useful for wiki content generation? If the harness needs to generate natural language descriptions of repos for wiki pages, GitReverse could help. But this is not a current need.
|
|
84
|
+
|
|
85
|
+
## Contradictions
|
|
86
|
+
|
|
87
|
+
None identified between sources. Both tools are complementary products from different authors targeting different use cases. GitReverse's README explicitly credits Gitingest as inspiration.
|
|
88
|
+
|
|
89
|
+
## Open Questions
|
|
90
|
+
|
|
91
|
+
- How does Gitingest handle repos larger than context window? Does it truncate? (Source: [[gitingest]] supports file size limits but repo-level truncation behavior unclear)
|
|
92
|
+
- Can Gitingest's output be further compressed by lean-ctx's tree-sitter AST mode for additional token savings?
|
|
93
|
+
- Should we also evaluate Repomix (npm alternative mentioned in Gitingest README) as a Node.js-native alternative?
|
|
94
|
+
- What's the GitHub API rate limit impact of frequent Gitingest usage? The web service may have its own caching.
|
|
95
|
+
|
|
96
|
+
## Recommendation
|
|
97
|
+
|
|
98
|
+
**Integrate Gitingest now.** Create a `/gitingest` skill (renamed from `/ingest` to avoid clash with `wiki-ingest`). Ship as MVP via direct bash wrapping, then iterate to Python API integration if needed.
|
|
99
|
+
|
|
100
|
+
**Skip GitReverse.** No current use case in the harness. Revisit if wiki auto-description becomes a feature requirement.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: synthesis
|
|
3
|
+
title: "Research: WOZCODE Token-Reduction Architecture"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
tags:
|
|
7
|
+
- research
|
|
8
|
+
- token-reduction
|
|
9
|
+
- agent-architecture
|
|
10
|
+
- wozcode
|
|
11
|
+
status: developing
|
|
12
|
+
related:
|
|
13
|
+
- "[[wozcode]]"
|
|
14
|
+
- "[[ast-truncation]]"
|
|
15
|
+
- "[[fuzzy-edit-matching]]"
|
|
16
|
+
- "[[model-routing-agents]]"
|
|
17
|
+
- "[[inline-post-edit-validation]]"
|
|
18
|
+
- "[[harness-implementation-plan]]"
|
|
19
|
+
- "[[agentic-harness]]"
|
|
20
|
+
sources:
|
|
21
|
+
- "[[wozcode]]"
|
|
22
|
+
|
|
23
|
+
---# Research: WOZCODE Token-Reduction Architecture
|
|
24
|
+
|
|
25
|
+
## Overview
|
|
26
|
+
|
|
27
|
+
WOZCODE is a Claude Code plugin that reduces token spend by 25–55% through three reinforcing levers: smarter code exploration (fewer input tokens), batched fuzzy edits (fewer output tokens), and an inline quality loop (fewer retries). It runs 100% locally with zero cloud code exposure. Its architecture — AST truncation, Haiku subagent routing, and post-edit syntax validation — represents a fundamentally different approach to agentic coding that our harness should adopt.
|
|
28
|
+
|
|
29
|
+
## Key Findings
|
|
30
|
+
|
|
31
|
+
- **AST truncation cuts input tokens by returning function signatures, not bodies** (Source: [[wozcode]]). Smarter search returns ranked snippets instead of full-file grep dumps. This is complementary to our planned [[repo-map-ranking]] but more aggressive: it stubs content at the AST level rather than just selecting files.
|
|
32
|
+
- **Fuzzy edit matching eliminates retry round-trips** (Source: [[wozcode]]). Tolerates whitespace drift, indentation changes, curly vs straight quotes, em-dashes. Near-misses still land — the edit tool self-corrects formatting differences instead of failing.
|
|
33
|
+
- **Post-edit syntax validation catches errors before the model retries** (Source: [[wozcode]]). TS compiler, JSON/YAML/HTML parsers, SQL linter run after every edit. Errors caught before the next turn — fewer turns = less spend.
|
|
34
|
+
- **Haiku subagents handle ~40% of coding work (exploration) at ~15× cheaper than Opus** (Source: [[wozcode]]). Read-only exploration routed to Haiku automatically; frontier model reserved for code generation.
|
|
35
|
+
- **SQL dialect auto-fix rewrites common mistakes before they reach the model** (Source: [[wozcode]]). Backtick identifiers, unquoted reserved aliases, `COUNT(DISTINCT a, b)`, `date_trunc("month", col)`.
|
|
36
|
+
- **Real savings from live API usage fields, not theoretical baselines** (Source: [[wozcode]]). Every percentage claim is measured from Anthropic's actual API usage fields.
|
|
37
|
+
|
|
38
|
+
## Key Entities
|
|
39
|
+
|
|
40
|
+
- **WOZCODE (WithWoz, Inc.)**: Claude Code plugin, founded 2025-2026. Patent-pending token-reduction technology. [[wozcode]]
|
|
41
|
+
- **Haiku (Anthropic)**: Cheapest Claude model used for read-only exploration subagents. ~15× cheaper than Opus.
|
|
42
|
+
- **Anthropic Claude Code**: The base agentic coding tool that WOZCODE wraps.
|
|
43
|
+
|
|
44
|
+
## Key Concepts
|
|
45
|
+
|
|
46
|
+
- [[ast-truncation]]: Stubbing function bodies at the AST level, returning only signatures + relevant snippets
|
|
47
|
+
- [[fuzzy-edit-matching]]: Diff algorithm that tolerates formatting drift to land near-miss edits
|
|
48
|
+
- [[model-routing-agents]]: Dispatching subtasks to different models based on operation type (explore vs generate)
|
|
49
|
+
- [[inline-post-edit-validation]]: Running compilers/linters/parsers immediately after each edit, before the model sees the result
|
|
50
|
+
- [[repo-map-ranking]]: Existing concept — graph centrality for selecting important codebase symbols
|
|
51
|
+
|
|
52
|
+
## Contradictions
|
|
53
|
+
|
|
54
|
+
- WOZCODE claims "100% local, zero-cloud" — but their privacy page reveals they send aggregated anonymous session stats to Supabase and use Stripe for billing. The code (files, paths, prompts, API keys) never leaves the machine, but metadata does. This is reasonable for a commercial product but worth noting.
|
|
55
|
+
- WOZCODE's comparison with "graph-based explorers" (SDL-MCP) is accurate for exploration-only tools but understates what SDL-MCP can do with full repository indexing. SDL-MCP does cover some editing workflows if properly configured.
|
|
56
|
+
|
|
57
|
+
## Open Questions
|
|
58
|
+
|
|
59
|
+
- How does WOZCODE's AST truncation handle dynamically-typed languages (Python, JavaScript) where tree-sitter can't resolve all types statically? [gap: need to test on dynamic language codebases]
|
|
60
|
+
- What is the actual performance overhead of running post-edit syntax validation after every edit? WOZCODE claims savings but doesn't disclose validation latency.
|
|
61
|
+
- Can Haiku subagents be applied to code review / adversarial verification (our L4), or only to exploration? The architecture suggests exploration-only but the pattern could extend.
|
|
62
|
+
- How does WOZCODE handle multi-file atomic edits where fuzzy matching on one file could create inconsistencies with another? [gap: need to investigate interaction between fuzzy matching and multi-edit batching]
|
|
63
|
+
- The patent-pending status means implementation details are intentionally obscured. Reverse-engineering the fuzzy diff algorithm would require access to the plugin binary.
|
|
64
|
+
|
|
65
|
+
## Sources
|
|
66
|
+
|
|
67
|
+
- [[wozcode]]: Primary source — wozcode.com/how-it-works, docs, security pages (2026)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: resolution
|
|
3
|
+
title: "Resolved: In-Place Context Pruning vs Session Restart"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
tags:
|
|
7
|
+
- resolution
|
|
8
|
+
- context-pruning
|
|
9
|
+
- meta-agent
|
|
10
|
+
- drift-detection
|
|
11
|
+
status: resolved
|
|
12
|
+
resolves:
|
|
13
|
+
- "[[meta-agent-context-pruning]] Open Questions #1-4"
|
|
14
|
+
- "[[drift-detection-unified]] Open Questions #1-3"
|
|
15
|
+
related:
|
|
16
|
+
- "[[meta-agent-context-pruning]]"
|
|
17
|
+
- "[[drift-detection-unified]]"
|
|
18
|
+
- "[[context-drift-in-agents]]"
|
|
19
|
+
sources:
|
|
20
|
+
- "[[claude-context-editing-docs]]"
|
|
21
|
+
- "[[opencode-dcp]]"
|
|
22
|
+
- "[[openclaw-session-pruning]]"
|
|
23
|
+
- "[[ms-chat-history-management]]"
|
|
24
|
+
- "[[agent-drift-academic-paper]]"
|
|
25
|
+
|
|
26
|
+
---# Resolved: In-Place Context Pruning vs Session Restart
|
|
27
|
+
|
|
28
|
+
## Resolution
|
|
29
|
+
|
|
30
|
+
**Both in-place editing and session restart exist in production. In-place editing (server-side context clearing) is the preferred pattern when the LLM provider supports it. Session restart (compaction/summarization) is the fallback for providers without in-place support.**
|
|
31
|
+
|
|
32
|
+
## Evidence
|
|
33
|
+
|
|
34
|
+
### In-Place Editing (Production Pattern)
|
|
35
|
+
|
|
36
|
+
Three major implementations confirm in-place context editing as the dominant production pattern:
|
|
37
|
+
|
|
38
|
+
1. **Claude API Context Editing** (Anthropic, 2025): Server-side strategies `clear_tool_uses_20250919` and `clear_thinking_20251015`. Content is cleared server-side before the prompt reaches Claude. The client maintains the full, unmodified conversation history. Placeholder text replaces cleared content so the model knows it was removed. (Source: [[claude-context-editing-docs]])
|
|
39
|
+
|
|
40
|
+
2. **OpenCode DCP** (2.5k stars, April 2026): "Your session history is never modified — DCP replaces pruned content with placeholders before sending requests to your LLM." Uses compress tool, deduplication, and purge-errors strategies. Cache hit rate: ~85% with DCP vs ~90% without. (Source: [[opencode-dcp]])
|
|
41
|
+
|
|
42
|
+
3. **OpenClaw Session Pruning**: "Pruning only targets toolResult messages. It never modifies your actual user messages or the assistant's responses." Two modes: soft-trim (keep start+end, remove middle) and hard-clear (placeholder replacement). (Source: [[openclaw-session-pruning]])
|
|
43
|
+
|
|
44
|
+
### Session Restart (Compaction/Summarization)
|
|
45
|
+
|
|
46
|
+
Available as fallback:
|
|
47
|
+
|
|
48
|
+
- **Claude SDK Compaction**: When token threshold exceeded, Claude generates structured summary, entire history replaced. Summary includes: Task Overview, Current State, Important Discoveries, Next Steps, Context to Preserve. (Source: [[claude-context-editing-docs]])
|
|
49
|
+
- **Microsoft Semantic Kernel**: "Summarizing Older Messages" strategy — summarizes chat history, sends system message + summary + recent messages. Supports using small models (SLM) for summarization. (Source: [[ms-chat-history-management]])
|
|
50
|
+
|
|
51
|
+
## Specific Questions Resolved
|
|
52
|
+
|
|
53
|
+
### Q1: Can context be pruned in-place or must it always restart?
|
|
54
|
+
|
|
55
|
+
**In-place. Always in-place for supported providers.** Claude API, OpenCode DCP, and OpenClaw all implement in-place editing — content is cleared before sending to the LLM but client-side history is never modified. Session restart is only needed for providers that lack server-side context editing APIs.
|
|
56
|
+
|
|
57
|
+
### Q2: Minimum context that must survive pruning?
|
|
58
|
+
|
|
59
|
+
**Production systems keep: system message, last 3-5 assistant turns (configurable `keepLastAssistants`), all user messages, any tool results containing images, and protected tools (task, skill, write, edit by default).** Everything else is eligible for clearing. The OpenClaw default `keepLastAssistants: 3` is a reasonable starting point.
|
|
60
|
+
|
|
61
|
+
### Q3: Does pruning break chain-of-thought coherence?
|
|
62
|
+
|
|
63
|
+
**In-place pruning preserves more coherence than restart.** Since in-place editing only clears old tool results (not assistant reasoning), chain-of-thought is preserved. Session restart (compaction) replaces everything with a summary, which loses fine-grained reasoning. Claude's thinking block clearing strategy (`clear_thinking_20251015`) explicitly controls how many turns of thinking to keep for coherence.
|
|
64
|
+
|
|
65
|
+
**Recommendation**: Use in-place tool result clearing for routine context management. Reserve restart/compaction for extreme cases (>100k tokens accumulated).
|
|
66
|
+
|
|
67
|
+
### Q4: How does pruning interact with prompt caching?
|
|
68
|
+
|
|
69
|
+
**In-place clearing invalidates cache from the clearing point forward, but subsequent requests reuse the newly cached prefix.** The trade-off is quantified: OpenCode DCP reports ~85% cache hit rate with pruning vs ~90% without — a 5% cache hit reduction for significant token savings. Claude API's `clear_at_least` parameter ensures enough tokens are cleared to make cache invalidation worthwhile.
|
|
70
|
+
|
|
71
|
+
**For the harness**: Configure `clear_at_least` to clear minimum 5000 tokens per operation. This ensures the token savings outweigh the cache write cost.
|
|
72
|
+
|
|
73
|
+
### Q5: Can Haiku/Flash serve as meta-agent drift detector?
|
|
74
|
+
|
|
75
|
+
**Yes, for rule-based detection with near-zero overhead. For LLM-based semantic drift detection, Haiku/Flash adds ~200-500 tokens per check (every 10-15 steps).** See [[resolved-small-model-meta-agents]] for full resolution.
|
|
76
|
+
|
|
77
|
+
### Q6: Does the meta-agent itself need drift monitoring? (Infinite regress)
|
|
78
|
+
|
|
79
|
+
**No.** The meta-agent uses rule-based detection (hash comparison + counters = 0 LLM tokens). There is no agentic loop to drift. If LLM-based detection is used (every 10-15 steps), it's a single inference, not an agentic session — no regress.
|
|
80
|
+
|
|
81
|
+
## Harness Implementation
|
|
82
|
+
|
|
83
|
+
For the ultimate-pi harness Layer 2.5 (Runtime Drift Monitor):
|
|
84
|
+
|
|
85
|
+
| Strategy | When to Use | Implementation |
|
|
86
|
+
|----------|------------|----------------|
|
|
87
|
+
| **In-place clearing** | Primary (Claude API available) | Use `clear_tool_uses_20250919` with trigger at 30k tokens, keep 5 recent tool uses |
|
|
88
|
+
| **Soft-trim** | Large tool results | Trim middle of oversized results, keep start+end |
|
|
89
|
+
| **Hard-clear** | Stale tool results | Replace with `[Content cleared: tool result from step N]` |
|
|
90
|
+
| **Compaction/restart** | Fallback (non-Claude providers) | Generate structured summary, restart session |
|
|
91
|
+
| **Rule-based detection** | Always-on | 6 pattern signatures, 0 tokens |
|
|
92
|
+
|
|
93
|
+
## Confidence
|
|
94
|
+
|
|
95
|
+
**High.** Three independent production systems (Anthropic Claude API, OpenCode DCP, OpenClaw) all implement the same pattern: in-place editing that never modifies client-side history. The pattern is consistent and well-documented.
|