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,203 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "Provider-Native Prompting"
|
|
4
|
+
aliases: ["provider-native harness", "native prompt generation"]
|
|
5
|
+
created: 2026-05-01
|
|
6
|
+
updated: 2026-05-01
|
|
7
|
+
tags: [concept, prompting, harness-design, model-adaptive]
|
|
8
|
+
status: developing
|
|
9
|
+
related:
|
|
10
|
+
- "[[model-adaptive-harness]]"
|
|
11
|
+
- "[[harness-configuration-layers]]"
|
|
12
|
+
- "[[Research: Model-Specific Prompting Guides]]"
|
|
13
|
+
- "[[openai-prompt-guidance]]"
|
|
14
|
+
- "[[anthropic-prompt-best-practices]]"
|
|
15
|
+
- "[[gemini-3-prompting-guide]]"
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Provider-Native Prompting
|
|
19
|
+
|
|
20
|
+
**Generate prompts optimized for each model provider's official conventions, not a single canonical format with strictness relaxations.**
|
|
21
|
+
|
|
22
|
+
## Problem
|
|
23
|
+
|
|
24
|
+
The current harness design principle is: "Write once for strictest model (GPT-safe defaults). Relax for forgiving models." This treats model differences as varying STRICTNESS of the same format.
|
|
25
|
+
|
|
26
|
+
Official provider guidance reveals this is wrong. Each provider specifies fundamentally DIFFERENT prompting conventions:
|
|
27
|
+
|
|
28
|
+
| Concern | OpenAI | Anthropic | Google |
|
|
29
|
+
|---------|--------|-----------|--------|
|
|
30
|
+
| Structure | XML-like sections | XML tags | Plain text sections |
|
|
31
|
+
| Constraint order | FIRST | Flexible | LAST |
|
|
32
|
+
| Density | Concise, outcome-first | General over prescriptive | Concise by default |
|
|
33
|
+
| Verification | Pre-flight/post-flight loop | Self-check at end | Split-step verify→generate |
|
|
34
|
+
| Grounding | Citation rules | Quote extraction | Explicit truth statement |
|
|
35
|
+
| Thinking | reasoning_effort param | effort param + adaptive | thinking level LOW/HIGH |
|
|
36
|
+
| Temperature | Unspecified | Removed from API | **1.0 mandatory** |
|
|
37
|
+
|
|
38
|
+
These are not relaxations of the same format. They are different formats.
|
|
39
|
+
|
|
40
|
+
## Solution: Semantic Spec → Native Renderer
|
|
41
|
+
|
|
42
|
+
The harness should separate WHAT must be communicated (semantic spec) from HOW it's communicated (provider-native renderer).
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
┌─────────────────┐ ┌──────────────────┐ ┌──────────────┐
|
|
46
|
+
│ Semantic Spec │ ──► │ Prompt Renderer │ ──► │ API Call │
|
|
47
|
+
│ (provider- │ │ ┌──────────────┐ │ │ │
|
|
48
|
+
│ agnostic) │ │ │ openai │ │ │ │
|
|
49
|
+
│ │ │ │ anthropic │ │ │ │
|
|
50
|
+
│ - Task │ │ │ google │ │ │ │
|
|
51
|
+
│ - Constraints │ │ │ fallback │ │ │ │
|
|
52
|
+
│ - Context │ │ └──────────────┘ │ │ │
|
|
53
|
+
│ - Output spec │ └──────────────────┘ └──────────────┘
|
|
54
|
+
│ - Verification │
|
|
55
|
+
│ - Tool spec │
|
|
56
|
+
└─────────────────┘
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Semantic Spec (Provider-Agnostic)
|
|
60
|
+
|
|
61
|
+
The harness internally represents every task as a structured specification, not a prompt string:
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
spec:
|
|
65
|
+
task: "Refactor the authentication module to use JWT"
|
|
66
|
+
constraints:
|
|
67
|
+
- "Must maintain backward compatibility"
|
|
68
|
+
- "Must not introduce new dependencies"
|
|
69
|
+
- "Test coverage must not decrease"
|
|
70
|
+
context:
|
|
71
|
+
- file: auth/__init__.py
|
|
72
|
+
- file: auth/tokens.py
|
|
73
|
+
- file: tests/test_auth.py
|
|
74
|
+
output:
|
|
75
|
+
format: diff
|
|
76
|
+
include_explanation: true
|
|
77
|
+
verification:
|
|
78
|
+
- run: pytest tests/test_auth.py
|
|
79
|
+
- check: git diff --stat
|
|
80
|
+
tools:
|
|
81
|
+
- read_file
|
|
82
|
+
- apply_patch # openai native
|
|
83
|
+
- text_editor # anthropic native
|
|
84
|
+
- bash
|
|
85
|
+
model: gpt-5.4
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Renderer (Provider-Native)
|
|
89
|
+
|
|
90
|
+
Each renderer converts the semantic spec into the provider's recommended format:
|
|
91
|
+
|
|
92
|
+
**OpenAI renderer** produces:
|
|
93
|
+
```
|
|
94
|
+
<code_editing_rules>
|
|
95
|
+
- Before editing, read relevant file contents for complete context
|
|
96
|
+
- Make small, testable, incremental changes
|
|
97
|
+
- Run pytest tests/test_auth.py after each change
|
|
98
|
+
- Do not add new dependencies
|
|
99
|
+
- Maintain backward compatibility
|
|
100
|
+
</code_editing_rules>
|
|
101
|
+
|
|
102
|
+
# Task
|
|
103
|
+
Refactor the authentication module to use JWT.
|
|
104
|
+
|
|
105
|
+
# Success criteria
|
|
106
|
+
- Backward compatibility maintained
|
|
107
|
+
- No new dependencies introduced
|
|
108
|
+
- Test coverage not decreased
|
|
109
|
+
- All existing tests pass
|
|
110
|
+
|
|
111
|
+
# Stop rules
|
|
112
|
+
- Do not stop until all tests pass
|
|
113
|
+
- If blocked, explain what's missing and ask
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Anthropic renderer** produces:
|
|
117
|
+
```xml
|
|
118
|
+
<instructions>
|
|
119
|
+
Refactor the authentication module to use JWT.
|
|
120
|
+
</instructions>
|
|
121
|
+
|
|
122
|
+
<context>
|
|
123
|
+
<file path="auth/__init__.py">...</file>
|
|
124
|
+
<file path="auth/tokens.py">...</file>
|
|
125
|
+
<file path="tests/test_auth.py">...</file>
|
|
126
|
+
</context>
|
|
127
|
+
|
|
128
|
+
<constraints>
|
|
129
|
+
- Maintain backward compatibility. This is important because...
|
|
130
|
+
- Do not introduce new dependencies.
|
|
131
|
+
- Test coverage must not decrease. Run tests after each change.
|
|
132
|
+
</constraints>
|
|
133
|
+
|
|
134
|
+
<verification>
|
|
135
|
+
Before you finish, run pytest tests/test_auth.py and verify all tests pass.
|
|
136
|
+
Check git diff --stat to confirm only intended files changed.
|
|
137
|
+
</verification>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Google renderer** produces:
|
|
141
|
+
```
|
|
142
|
+
You are a senior software engineer. You are refactoring the authentication module
|
|
143
|
+
to use JWT tokens. You are expected to perform calculations and logical deductions
|
|
144
|
+
based strictly on the provided code.
|
|
145
|
+
|
|
146
|
+
[Context files: auth/__init__.py, auth/tokens.py, tests/test_auth.py]
|
|
147
|
+
|
|
148
|
+
Based on the entire codebase above, refactor the authentication module to use JWT.
|
|
149
|
+
Synthesize all relevant information from the code that pertains to the refactoring.
|
|
150
|
+
|
|
151
|
+
- Maintain backward compatibility
|
|
152
|
+
- No new dependencies
|
|
153
|
+
- Test coverage must not decrease
|
|
154
|
+
- All existing tests must pass
|
|
155
|
+
|
|
156
|
+
Verify with high confidence that all tests pass before declaring done. If you cannot
|
|
157
|
+
verify, state what's blocking and STOP.
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Integration with Existing Harness Layers
|
|
161
|
+
|
|
162
|
+
Each harness layer generates a semantic spec fragment. The renderer combines them per model.
|
|
163
|
+
|
|
164
|
+
| Layer | Semantic Spec Fragment |
|
|
165
|
+
|-------|----------------------|
|
|
166
|
+
| L1 Spec Hardening | Task definition, acceptance criteria, ambiguity resolution |
|
|
167
|
+
| L2 Structured Planning | Task DAG, subtask ordering, dependency graph |
|
|
168
|
+
| L2.5 Drift Monitor | Detection strategy, thresholds, escalation rules |
|
|
169
|
+
| L3 Grounding Checkpoints | Verification steps per checkpoint |
|
|
170
|
+
| L4 Adversarial Verification | Attack vectors, falsifiable criteria |
|
|
171
|
+
| L5 Observability | Required metrics, instrumentation points |
|
|
172
|
+
| L6 Memory | Wiki read/write contract, relevant pages |
|
|
173
|
+
| L7 Orchestration | Workflow DAG, approval gates |
|
|
174
|
+
| L8 Wiki Query | Search query, context assembly strategy |
|
|
175
|
+
|
|
176
|
+
The renderer combines all fragments into a single provider-native prompt.
|
|
177
|
+
|
|
178
|
+
## Design Principles
|
|
179
|
+
|
|
180
|
+
1. **Official guidance over empirical observation.** Provider docs are the primary source. Empirical failure modes are layered on top, not the foundation.
|
|
181
|
+
|
|
182
|
+
2. **Provider-native, not strictness-relaxation.** Generate different prompts for different providers. Never generate one canonical prompt and relax.
|
|
183
|
+
|
|
184
|
+
3. **Semantic spec is the source of truth.** Prompt text is ephemeral. The spec is what gets versioned, tested, and audited.
|
|
185
|
+
|
|
186
|
+
4. **Renderer is pluggable.** New providers/models get new renderers. The spec stays stable.
|
|
187
|
+
|
|
188
|
+
5. **Validate against provider conventions.** Lint prompts against known provider rules before sending (e.g., "Gemini temperature != 1.0" = block).
|
|
189
|
+
|
|
190
|
+
## Implementation Notes
|
|
191
|
+
|
|
192
|
+
- **Phase P22b** in [[harness-implementation-plan]] adds the prompt renderer module
|
|
193
|
+
- Each renderer is a standalone module: `lib/renderers/openai.ts`, `lib/renderers/anthropic.ts`, `lib/renderers/google.ts`
|
|
194
|
+
- Fallback renderer for unknown models: conservative markdown format
|
|
195
|
+
- Renderer config stored in `.pi/harness/renderers.json`
|
|
196
|
+
- Model-to-renderer mapping in `.pi/harness/model-profiles.json`
|
|
197
|
+
|
|
198
|
+
## Source
|
|
199
|
+
|
|
200
|
+
Derived from official provider documentation:
|
|
201
|
+
- [[openai-prompt-guidance]]
|
|
202
|
+
- [[anthropic-prompt-best-practices]]
|
|
203
|
+
- [[gemini-3-prompting-guide]]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "Quality Signal (sentrux)"
|
|
4
|
+
created: 2026-05-03
|
|
5
|
+
tags:
|
|
6
|
+
- sentrux
|
|
7
|
+
- code-quality
|
|
8
|
+
- metrics
|
|
9
|
+
related:
|
|
10
|
+
- "[[Five Root Cause Metrics (sentrux)]]"
|
|
11
|
+
- "[[sentrux]]"
|
|
12
|
+
sources:
|
|
13
|
+
- "[[sentrux-docs-quality-signal]]"
|
|
14
|
+
- "[[sentrux-docs-root-cause-metrics]]"
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Quality Signal (sentrux)
|
|
18
|
+
|
|
19
|
+
A single continuous scalar score (0–10,000) computed as the geometric mean of 5 normalized root cause metrics:
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
quality_signal = (modularity × acyclicity × depth × equality × redundancy)^(1/5) × 10000
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Theoretical Basis
|
|
26
|
+
The geometric mean is chosen via the Nash Social Welfare theorem (1950): it is the unique aggregation function satisfying Pareto optimality, symmetry, and independence of irrelevant alternatives.
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
- **Ungameable:** No metric can be improved in isolation without genuine structural improvement. Adding useless edges decreases modularity. Removing files without restructuring doesn't affect modularity.
|
|
30
|
+
- **Language-agnostic:** Uses graph-theoretic properties computed from tree-sitter parse trees. Works identically across 52 languages.
|
|
31
|
+
- **Monotonic convergence:** Designed to improve monotonically under correct agent action — like gradient descent.
|
|
32
|
+
|
|
33
|
+
## Why Not Letter Grades?
|
|
34
|
+
Letter grades (A-F) collapse information. A codebase with D cyclicity but A in everything else gets the same overall grade as B across the board. Continuous score preserves resolution for incremental improvement tracking.
|
|
35
|
+
|
|
36
|
+
## Normalization
|
|
37
|
+
Each metric normalized to [0, 1] before aggregation, ensuring equal weight regardless of raw units.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "Repo Map Ranking"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
tags:
|
|
7
|
+
- agent-context
|
|
8
|
+
- graph-algorithms
|
|
9
|
+
- context-window
|
|
10
|
+
related:
|
|
11
|
+
- "[[aider-repomap-tree-sitter]]"
|
|
12
|
+
- "[[progressive-disclosure-agents]]"
|
|
13
|
+
status: developing
|
|
14
|
+
|
|
15
|
+
---# Repo Map Ranking
|
|
16
|
+
|
|
17
|
+
A graph-based algorithm for selecting the most important portions of a codebase to present to an agent within a token budget.
|
|
18
|
+
|
|
19
|
+
## Algorithm (from Aider)
|
|
20
|
+
|
|
21
|
+
1. Parse every source file with tree-sitter to extract AST
|
|
22
|
+
2. Identify all symbol definitions (classes, functions, methods, variables, types)
|
|
23
|
+
3. Identify all cross-references (where each symbol is used)
|
|
24
|
+
4. Build a dependency graph: nodes = files, edges = cross-file references
|
|
25
|
+
5. Rank nodes by a centrality measure (most-referenced symbols = most important)
|
|
26
|
+
6. Select top-ranked nodes that fit within the token budget
|
|
27
|
+
7. For each selected node, include the symbol signatures (not full implementation)
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
- **PageRank-inspired**: importance flows through the graph via references
|
|
32
|
+
- **Language-aware**: tree-sitter provides accurate AST parsing per language
|
|
33
|
+
- **Token-budgeted**: always fits in the context window
|
|
34
|
+
- **Dynamic**: can recompute for sub-trees when working on specific areas
|
|
35
|
+
|
|
36
|
+
## Why Ranking Matters
|
|
37
|
+
|
|
38
|
+
Without ranking, agents either:
|
|
39
|
+
- Get nothing beyond the current file (miss cross-file dependencies)
|
|
40
|
+
- Get everything (blows context window on large repos)
|
|
41
|
+
|
|
42
|
+
Ranking provides the "Goldilocks" middle: the most important context that fits.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
status: developing
|
|
4
|
+
tags:
|
|
5
|
+
- typescript
|
|
6
|
+
- error-handling
|
|
7
|
+
- functional-programming
|
|
8
|
+
- result-monad
|
|
9
|
+
related:
|
|
10
|
+
- "[[ts-result-error-handling-kkalamarski]]"
|
|
11
|
+
- "[[Research: TypeScript Best Practices and Codebase Structure]]"
|
|
12
|
+
created: 2026-05-02
|
|
13
|
+
updated: 2026-05-02
|
|
14
|
+
|
|
15
|
+
---# Result Monad Error Handling
|
|
16
|
+
|
|
17
|
+
A functional programming pattern for TypeScript that treats errors as **values** rather than exceptions. Instead of throwing and catching, functions return a `Result<Ok, Err>` type that is either a success (`Ok`) or failure (`Err`).
|
|
18
|
+
|
|
19
|
+
## The Pattern
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
type Result<Ok, Err> = {
|
|
23
|
+
map<O>(f: (v: Ok) => O): Result<O, Err>;
|
|
24
|
+
flatMap<O>(f: (v: Ok) => Result<O, Err>): Result<O, Err>;
|
|
25
|
+
match<O>(handlers: { Ok: (v: Ok) => O; Err: (e: Err) => O }): O;
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Core Principle: Wrap Early, Unwrap Late
|
|
30
|
+
|
|
31
|
+
1. **Wrap**: Convert fallible operations to `Result` immediately using `Ok(value)` or `Err(error)`
|
|
32
|
+
2. **Compose**: Chain transformations with `.map()` and `.flatMap()`. Operations are only applied to `Ok` values — errors propagate automatically
|
|
33
|
+
3. **Unwrap**: Only at the boundary (UI, API response) use `.match()` to handle both cases
|
|
34
|
+
|
|
35
|
+
## Benefits
|
|
36
|
+
|
|
37
|
+
- No scattered try-catch blocks
|
|
38
|
+
- Error handling is explicit in the type signature
|
|
39
|
+
- Impossible to forget to handle errors — the compiler enforces it
|
|
40
|
+
- Error information can be carried through the call chain without additional parameters
|
|
41
|
+
|
|
42
|
+
## Trade-offs
|
|
43
|
+
|
|
44
|
+
- Not idiomatic TypeScript (language uses exceptions natively)
|
|
45
|
+
- Requires team buy-in and consistency
|
|
46
|
+
- Library support: neverthrow, ts-results, fp-ts, effect-ts
|
|
47
|
+
- Adds abstraction overhead for simple cases
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
tags:
|
|
4
|
+
- safety
|
|
5
|
+
- security
|
|
6
|
+
- architecture
|
|
7
|
+
- agent-governance
|
|
8
|
+
related:
|
|
9
|
+
- "[[Agent Harness Architecture]]"
|
|
10
|
+
- "[[sources/opendev-arxiv-2603.05344v1]]"
|
|
11
|
+
- "[[sources/disler-pi-vs-claude-code]]"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Safety Defense-in-Depth
|
|
15
|
+
|
|
16
|
+
A multi-layer safety architecture where each layer independently prevents a class of harm. No single bypass compromises the system. The key principle: make unsafe operations structurally impossible rather than relying on runtime permission checks that the agent can probe or argue against.
|
|
17
|
+
|
|
18
|
+
## Five Safety Layers
|
|
19
|
+
|
|
20
|
+
### Layer 1: Prompt-Level Guardrails
|
|
21
|
+
System prompt encodes security policy, action safety rules, git workflow requirements, error recovery patterns. The first line of defense — guides model reasoning toward safe behavior.
|
|
22
|
+
|
|
23
|
+
### Layer 2: Schema-Level Tool Restrictions
|
|
24
|
+
Tools absent from the agent's schema cannot be invoked, argued about, or probed. This is more robust than runtime checks:
|
|
25
|
+
- **Plan mode**: Only read-only tools in schema. Write tools don't exist from the model's perspective.
|
|
26
|
+
- **Subagent filtering**: Each subagent receives only tools relevant to its role.
|
|
27
|
+
- **MCP discovery gating**: External tools appear only after explicit search + selection.
|
|
28
|
+
|
|
29
|
+
### Layer 3: Runtime Approval System
|
|
30
|
+
Three autonomy levels:
|
|
31
|
+
- **Manual**: Every tool call requires explicit approval
|
|
32
|
+
- **Semi-Auto**: Read-only commands auto-approved; writes prompt for confirmation
|
|
33
|
+
- **Auto**: All operations approved for trusted workflows
|
|
34
|
+
|
|
35
|
+
Rule types evaluated in priority order:
|
|
36
|
+
- **Danger**: Regex match with auto-deny (cannot be overridden). Default rules: `rm -rf /`, `rm -rf *`, `chmod 777`
|
|
37
|
+
- **Pattern**: Regex match against command string
|
|
38
|
+
- **Command**: Exact match
|
|
39
|
+
- **Prefix**: Prefix match (e.g., `git` matches `git push`)
|
|
40
|
+
|
|
41
|
+
### Layer 4: Tool-Level Validation
|
|
42
|
+
Per-tool safety checks executed during tool handling:
|
|
43
|
+
- **DANGEROUS_PATTERNS blocklist**: `rm -rf`, `sudo`, fork bombs, `curl|bash` pipes, `dd` to devices
|
|
44
|
+
- **Stale-read detection**: Rejects edits if file was modified since last read
|
|
45
|
+
- **Output truncation**: Caps at 30,000 chars with head-tail strategy
|
|
46
|
+
- **Timeouts**: 60s idle timeout, 600s absolute timeout
|
|
47
|
+
|
|
48
|
+
### Layer 5: Lifecycle Hooks
|
|
49
|
+
External scripts register for lifecycle events (PreToolUse, PostToolUse, SessionStart, Stop). Hooks can:
|
|
50
|
+
- **Block** (exit code 2): Prevent tool execution entirely
|
|
51
|
+
- **Mutate**: Modify tool arguments before execution (e.g., inject `--dry-run`)
|
|
52
|
+
- **Observe**: Async logging/auditing after execution
|
|
53
|
+
|
|
54
|
+
## Key Safety Patterns
|
|
55
|
+
|
|
56
|
+
### Schema Gating > Permission Checks
|
|
57
|
+
Removing tools from the agent's schema eliminates the entire class of attack — the model cannot reason about capabilities it doesn't know exist. Runtime permission checks let the agent argue for exceptions.
|
|
58
|
+
|
|
59
|
+
### Approval Persistence
|
|
60
|
+
Approval rules persist to disk across sessions. Without persistence, users re-approve same operations every session, leading to approval fatigue and blanket auto-approval.
|
|
61
|
+
|
|
62
|
+
### Doom-Loop Detection
|
|
63
|
+
MD5 fingerprint of `(tool_name, tool_args)` tracked in sliding window of 20 calls. Same fingerprint appearing 3+ times triggers warning → approval pause escalation.
|
|
64
|
+
|
|
65
|
+
### Resource Bounding
|
|
66
|
+
Every resource that grows with session length must have a cap: iteration limits, nudge budgets, undo history (50 ops), concurrent tool calls (5 max).
|
|
67
|
+
|
|
68
|
+
## Pi's Damage Control Extension
|
|
69
|
+
|
|
70
|
+
disler's `damage-control` extension maps to Layers 3-4:
|
|
71
|
+
- **Dangerous Commands**: Regex patterns with `ask: true` or strict block
|
|
72
|
+
- **Zero Access Paths**: `.env`, `~/.ssh/`, `*.pem`
|
|
73
|
+
- **Read-Only Paths**: `package-lock.json`, `/etc/`
|
|
74
|
+
- **No-Delete Paths**: `.git/`, `Dockerfile`, `README.md`
|
|
75
|
+
|
|
76
|
+
## Relevance to Our Harness
|
|
77
|
+
|
|
78
|
+
Current state: No safety defense-in-depth. We need:
|
|
79
|
+
- Schema-level filtering for subagents (already have `allowed-tools` concept)
|
|
80
|
+
- Runtime approval system for dangerous commands
|
|
81
|
+
- DANGEROUS_PATTERNS blocklist
|
|
82
|
+
- Stale-read detection for file edits
|
|
83
|
+
- Doom-loop detection for repeated tool calls
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
status: stub
|
|
4
|
+
created: 2026-05-02
|
|
5
|
+
updated: 2026-05-02
|
|
6
|
+
tags: [concept, sandbox, security]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Sandbox OS Enforcement
|
|
10
|
+
|
|
11
|
+
OS-level sandboxing for agent tool execution. Codex uses this as foundation with permissions as policy layer (First Principle #16). Ensures tool calls cannot escape their sandbox environment.
|
|
12
|
+
|
|
13
|
+
Contrasts with application-level sandboxing. OS-level provides stronger isolation guarantees.
|
|
14
|
+
|
|
15
|
+
## References
|
|
16
|
+
|
|
17
|
+
- [[codex-harness-innovations]]
|
|
18
|
+
- [[codex-open-source-agent-2026]]
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "Selective Debate Routing"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
status: active
|
|
7
|
+
tags:
|
|
8
|
+
- debate
|
|
9
|
+
- consensus
|
|
10
|
+
- token-efficiency
|
|
11
|
+
- multi-agent
|
|
12
|
+
related:
|
|
13
|
+
- "[[consensus-debate]]"
|
|
14
|
+
- "[[adr-011]]"
|
|
15
|
+
- "[[harness-implementation-plan]]"
|
|
16
|
+
sources:
|
|
17
|
+
- "[[fan2025-imad]]"
|
|
18
|
+
|
|
19
|
+
---# Selective Debate Routing
|
|
20
|
+
|
|
21
|
+
The practice of triggering multi-agent debate only when likely to be beneficial, rather than for every query. From iMAD (Fan et al., AAAI 2026).
|
|
22
|
+
|
|
23
|
+
## Core Insight
|
|
24
|
+
|
|
25
|
+
> Multi-Agent Debate can overturn correct single-agent answers. Always-on debate wastes tokens AND can reduce accuracy.
|
|
26
|
+
|
|
27
|
+
## iMAD Mechanism
|
|
28
|
+
|
|
29
|
+
1. Single agent produces structured self-critique response
|
|
30
|
+
2. Extract 41 linguistic/semantic features (hesitation cues):
|
|
31
|
+
- Uncertainty markers ("might", "could be", "I think")
|
|
32
|
+
- Contradictory statements
|
|
33
|
+
- Missing evidence references
|
|
34
|
+
- Low confidence indicators
|
|
35
|
+
3. Lightweight classifier (FocusCal loss) → debate or skip
|
|
36
|
+
4. Generalizes across datasets without per-task tuning
|
|
37
|
+
|
|
38
|
+
## Results
|
|
39
|
+
|
|
40
|
+
- **92% token reduction** vs always-debate
|
|
41
|
+
- **13.5% accuracy improvement** vs single-agent
|
|
42
|
+
- Works across 6 QA datasets, 5 baselines
|
|
43
|
+
|
|
44
|
+
## Impact on Our Consensus Debate (ADR-011)
|
|
45
|
+
|
|
46
|
+
Current ADR-011 design assumes:
|
|
47
|
+
- Debate always beneficial
|
|
48
|
+
- Always worth the ~13,000 token cost per subtask
|
|
49
|
+
- Always improves over single-pass review
|
|
50
|
+
|
|
51
|
+
iMAD suggests we should:
|
|
52
|
+
1. Add a **pre-debate gate**: single agent self-critiques first
|
|
53
|
+
2. If confidence is high + no hesitation cues → skip debate, save tokens
|
|
54
|
+
3. If uncertainty detected → trigger debate
|
|
55
|
+
4. This could reduce debate token cost by up to 92% on high-confidence tasks
|
|
56
|
+
|
|
57
|
+
## Implementation Sketch
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Task → Single agent self-critique → Extract hesitation features
|
|
61
|
+
├─ High confidence → Skip debate, proceed
|
|
62
|
+
└─ Uncertainty detected → Trigger consensus debate (per ADR-011)
|
|
63
|
+
└─ Consensus reached → File winning position to wiki/consensus/ (mandatory, per [[consensus-debate]])
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Open Questions
|
|
67
|
+
|
|
68
|
+
- Do hesitation cues in code review differ from QA tasks?
|
|
69
|
+
- Can a single classifier work across L1 (spec), L2 (plan), L4 (code) debates?
|
|
70
|
+
- Should the classifier be model-specific (different models show different hesitation patterns)?
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "Self-Evolving Harness"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
status: seed
|
|
7
|
+
tags:
|
|
8
|
+
- harness
|
|
9
|
+
- auto-evolution
|
|
10
|
+
- meta-learning
|
|
11
|
+
related:
|
|
12
|
+
- "[[agentic-harness]]"
|
|
13
|
+
- "[[harness-implementation-plan]]"
|
|
14
|
+
- "[[model-adaptive-harness]]"
|
|
15
|
+
sources:
|
|
16
|
+
- "[[lou2026-autoharness]]"
|
|
17
|
+
- "[[lee2026-meta-harness]]"
|
|
18
|
+
- "[[meng2026-agent-harness-survey]]"
|
|
19
|
+
|
|
20
|
+
---# Self-Evolving Harness
|
|
21
|
+
|
|
22
|
+
The concept that a harness can automatically improve itself through iterative refinement, execution traces, and outer-loop optimization — rather than requiring manual human engineering.
|
|
23
|
+
|
|
24
|
+
## Two Approaches
|
|
25
|
+
|
|
26
|
+
### AutoHarness (Lou et al., 2026)
|
|
27
|
+
- Small model generates harness code iteratively
|
|
28
|
+
- Environment provides feedback (illegal move detection, scores)
|
|
29
|
+
- LLM refines harness from failure signals
|
|
30
|
+
- Result: synthesized harness + small model beats large model bare
|
|
31
|
+
|
|
32
|
+
### Meta-Harness (Lee et al., 2026)
|
|
33
|
+
- Outer-loop system searches over harness code
|
|
34
|
+
- Agentic proposer accesses ALL prior candidates (code, traces, scores)
|
|
35
|
+
- Filesystem-based memory of experiments
|
|
36
|
+
- Surpasses hand-engineered baselines on TerminalBench-2
|
|
37
|
+
|
|
38
|
+
## What Can Evolve
|
|
39
|
+
|
|
40
|
+
From the Self-Evolving Agents Survey (Gao et al., 2026):
|
|
41
|
+
- **Models**: Fine-tuning from agent experience
|
|
42
|
+
- **Memory**: What to store, how to retrieve
|
|
43
|
+
- **Tools**: Which tools to use, how to invoke them
|
|
44
|
+
- **Architecture**: Agent topology, routing decisions
|
|
45
|
+
|
|
46
|
+
## Relevance to Our Harness
|
|
47
|
+
|
|
48
|
+
Our harness is currently static — manually designed skill files, schemas, gates. Self-evolution suggests:
|
|
49
|
+
|
|
50
|
+
1. **Token budget auto-tuning**: Actual vs. budgeted token usage per layer → adjust budgets automatically
|
|
51
|
+
2. **Gate threshold auto-tuning**: Which gates catch real issues vs. false positives → remove unnecessary gates
|
|
52
|
+
3. **Model profile auto-learning**: Instead of hand-coding model profiles (opus/gpt/gemini), learn from execution traces
|
|
53
|
+
4. **Debate routing**: Auto-decide whether a spec/plan/implementation needs debate (cf. iMAD selective debate)
|
|
54
|
+
|
|
55
|
+
## Risks
|
|
56
|
+
|
|
57
|
+
- Self-modifying harnesses can introduce bugs
|
|
58
|
+
- Auto-removing gates may remove safety-critical checks
|
|
59
|
+
- Meta-harness optimization may overfit to specific benchmarks
|
|
60
|
+
- Needs safety bounds: which components can self-evolve vs. must remain manually controlled
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "sentrux MCP Integration"
|
|
4
|
+
created: 2026-05-03
|
|
5
|
+
tags:
|
|
6
|
+
- sentrux
|
|
7
|
+
- mcp
|
|
8
|
+
- ai-agents
|
|
9
|
+
related:
|
|
10
|
+
- "[[sentrux]]"
|
|
11
|
+
- "[[Quality Signal (sentrux)]]"
|
|
12
|
+
sources:
|
|
13
|
+
- "[[sentrux-github-repo]]"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# sentrux MCP Integration
|
|
17
|
+
|
|
18
|
+
sentrux runs as a Model Context Protocol (MCP) server, giving AI coding agents real-time access to architectural health data.
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
- **Claude Code:** `/plugin marketplace add sentrux/sentrux` then `/plugin install sentrux`
|
|
22
|
+
- **Other clients (Cursor, Windsurf, OpenCode):** Add to MCP config: `{"command": "sentrux", "args": ["--mcp"]}`
|
|
23
|
+
|
|
24
|
+
## Agent Workflow
|
|
25
|
+
```
|
|
26
|
+
scan("/project") → quality_signal: 7342, files: 139, bottleneck: "modularity"
|
|
27
|
+
session_start() → Baseline saved
|
|
28
|
+
... agent writes code ...
|
|
29
|
+
session_end() → pass: false, before: 7342, after: 6891
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Available Tools (9 total)
|
|
33
|
+
`scan`, `health`, `session_start`, `session_end`, `rescan`, `check_rules`, `evolution`, `dsm`, `test_gaps`
|
|
34
|
+
|
|
35
|
+
## Key Design
|
|
36
|
+
The feedback loop closes automatically: sentrux provides the sensor (structural health), rules provide the spec (what "good" looks like), and the AI agent is the actuator (makes changes). No human intervention needed for routine quality checks.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "sentrux Rules Engine"
|
|
4
|
+
created: 2026-05-03
|
|
5
|
+
tags:
|
|
6
|
+
- sentrux
|
|
7
|
+
- architecture-governance
|
|
8
|
+
- ci
|
|
9
|
+
related:
|
|
10
|
+
- "[[sentrux]]"
|
|
11
|
+
- "[[sentrux MCP Integration]]"
|
|
12
|
+
sources:
|
|
13
|
+
- "[[sentrux-docs-rules-engine]]"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# sentrux Rules Engine
|
|
17
|
+
|
|
18
|
+
A TOML-based constraint system that defines and enforces architectural rules. Configured via `.sentrux/rules.toml` at the project root.
|
|
19
|
+
|
|
20
|
+
## Capabilities
|
|
21
|
+
- **Global constraints:** max cycles, max coupling grade, max cyclomatic complexity, god file detection
|
|
22
|
+
- **Layer definitions:** ordered dependency hierarchy (lower order = more foundational)
|
|
23
|
+
- **Boundary rules:** block specific dependency paths with human-readable reasons
|
|
24
|
+
|
|
25
|
+
## Execution Modes
|
|
26
|
+
1. **CLI:** `sentrux check .` — exit 0 (pass) or 1 (fail), CI-friendly
|
|
27
|
+
2. **MCP:** Agent calls `check_rules()` — gets structured violation list, can self-correct before human sees
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
```toml
|
|
31
|
+
[constraints]
|
|
32
|
+
max_cycles = 0
|
|
33
|
+
max_coupling = "B"
|
|
34
|
+
max_cc = 25
|
|
35
|
+
no_god_files = true
|
|
36
|
+
|
|
37
|
+
[[layers]]
|
|
38
|
+
name = "core"
|
|
39
|
+
paths = ["src/core/*"]
|
|
40
|
+
order = 0
|
|
41
|
+
|
|
42
|
+
[[boundaries]]
|
|
43
|
+
from = "src/app/*"
|
|
44
|
+
to = "src/core/internal/*"
|
|
45
|
+
reason = "App must not depend on core internals"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Integration
|
|
49
|
+
Works in CI (GitHub Actions), as pre-merge gate, and as MCP tool for AI agents. Agents receive structured violation data and can fix before committing.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: concept
|
|
3
|
+
title: "shell-pattern-compression"
|
|
4
|
+
created: 2026-04-30
|
|
5
|
+
updated: 2026-04-30
|
|
6
|
+
status: seed
|
|
7
|
+
tags: [#concept, #lean-ctx, #context-optimization]
|
|
8
|
+
related:
|
|
9
|
+
- "[[lean-ctx]]"
|
|
10
|
+
- "[[Research: context-mode vs lean-ctx]]"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# shell-pattern-compression
|
|
14
|
+
|
|
15
|
+
> [!stub] This is a stub page. See [[lean-ctx]] and [[leanctx-website]] for details.
|
|
16
|
+
|
|
17
|
+
A lean-ctx feature that recognizes 90+ command patterns (git, npm, cargo, docker, kubectl, etc.) and intelligently compresses their output. Instead of passing raw terminal output to the LLM, lean-ctx strips irrelevant lines, summarizes, and formats output for maximum information density per token.
|
|
18
|
+
|
|
19
|
+
Part of lean-ctx's broader context compression strategy alongside AST-based code compression.
|
|
20
|
+
|
|
21
|
+
## Key pages
|
|
22
|
+
|
|
23
|
+
- [[lean-ctx]] — Context Runtime for AI Agents
|
|
24
|
+
- [[leanctx-website]] — source documentation
|