ultimate-pi 0.1.7 → 0.2.2

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.
Files changed (524) hide show
  1. package/.agents/skills/graphify/.graphify_version +1 -0
  2. package/.agents/skills/graphify/SKILL.md +1204 -0
  3. package/.agents/skills/wiki-autoresearch/SKILL.md +225 -97
  4. package/.agents/skills/wiki-autoresearch/references/program.md +28 -62
  5. package/.agents/skills/wiki-autoresearch/references/quality-sites.md +32 -0
  6. package/.env.example +5 -1
  7. package/.gitattributes +1 -0
  8. package/.github/workflows/publish-github-packages.yml +1 -1
  9. package/.pi/SYSTEM.md +72 -18
  10. package/.pi/agents/harness/adversary.md +32 -0
  11. package/.pi/agents/harness/evaluator.md +32 -0
  12. package/.pi/agents/harness/executor.md +34 -0
  13. package/.pi/agents/harness/meta-optimizer.md +33 -0
  14. package/.pi/agents/harness/planner.md +33 -0
  15. package/.pi/agents/harness/tie-breaker.md +35 -0
  16. package/.pi/agents/harness/trace-librarian.md +32 -0
  17. package/.pi/extensions/banner.png +0 -0
  18. package/.pi/extensions/budget-guard.ts +265 -0
  19. package/.pi/extensions/custom-footer.ts +194 -22
  20. package/.pi/extensions/custom-header.ts +47 -9
  21. package/.pi/extensions/debate-orchestrator.ts +479 -0
  22. package/.pi/extensions/harness-live-widget.ts +438 -0
  23. package/.pi/extensions/policy-gate.ts +349 -0
  24. package/.pi/extensions/review-integrity.ts +198 -0
  25. package/.pi/extensions/test-diff-integrity.ts +240 -0
  26. package/.pi/extensions/trace-recorder.ts +315 -0
  27. package/.pi/harness/README.md +23 -0
  28. package/.pi/harness/router/README.md +35 -0
  29. package/.pi/harness/router/apply-router-proposal.mjs +153 -0
  30. package/.pi/harness/router/propose-router-tuning.mjs +149 -0
  31. package/.pi/harness/specs/README.md +37 -0
  32. package/.pi/harness/specs/adversary-report.schema.json +53 -0
  33. package/.pi/harness/specs/budget-exhausted-event.schema.json +93 -0
  34. package/.pi/harness/specs/consensus-packet.schema.json +175 -0
  35. package/.pi/harness/specs/eval-verdict.schema.json +59 -0
  36. package/.pi/harness/specs/incident-record.schema.json +84 -0
  37. package/.pi/harness/specs/plan-packet.schema.json +90 -0
  38. package/.pi/harness/specs/round-result.schema.json +126 -0
  39. package/.pi/harness/specs/router-tuning-proposal.schema.json +114 -0
  40. package/.pi/harness/specs/run-trace.schema.json +107 -0
  41. package/.pi/lib/harness-ui-state.ts +311 -0
  42. package/.pi/mcp.json +4 -0
  43. package/.pi/model-router.json +93 -93
  44. package/.pi/prompts/graphify.md +23 -0
  45. package/.pi/prompts/harness-abort.md +41 -0
  46. package/.pi/prompts/harness-auto.md +83 -0
  47. package/.pi/prompts/harness-critic.md +52 -0
  48. package/.pi/prompts/harness-eval.md +51 -0
  49. package/.pi/prompts/harness-incident.md +51 -0
  50. package/.pi/prompts/harness-plan.md +64 -0
  51. package/.pi/prompts/harness-review.md +52 -0
  52. package/.pi/prompts/harness-router-tune.md +74 -0
  53. package/.pi/prompts/harness-run.md +59 -0
  54. package/.pi/prompts/harness-setup.md +316 -216
  55. package/.pi/prompts/harness-trace.md +51 -0
  56. package/.pi/prompts/wiki-autoresearch.md +9 -7
  57. package/.pi/prompts/wiki-save.md +20 -0
  58. package/.pi/skills/agent-router/SKILL.md +2 -4
  59. package/.pi/skills/ast-grep/SKILL.md +354 -0
  60. package/.pi/sounds/project-sounds.json +18 -24
  61. package/AGENTS.md +30 -0
  62. package/CHANGELOG.md +89 -0
  63. package/CONTRIBUTING.md +51 -1
  64. package/README.md +264 -20
  65. package/biome.json +8 -2
  66. package/lefthook.yml +3 -2
  67. package/node_modules/@sting8k/pi-vcc/README.md +200 -0
  68. package/node_modules/@sting8k/pi-vcc/index.ts +14 -0
  69. package/node_modules/@sting8k/pi-vcc/package.json +26 -0
  70. package/node_modules/@sting8k/pi-vcc/scripts/audit-sessions.ts +88 -0
  71. package/node_modules/@sting8k/pi-vcc/scripts/benchmark-real-sessions.ts +25 -0
  72. package/node_modules/@sting8k/pi-vcc/scripts/compare-before-after.ts +36 -0
  73. package/node_modules/@sting8k/pi-vcc/scripts/dump-branch-output.ts +20 -0
  74. package/node_modules/@sting8k/pi-vcc/src/commands/pi-vcc.ts +36 -0
  75. package/node_modules/@sting8k/pi-vcc/src/commands/vcc-recall.ts +65 -0
  76. package/node_modules/@sting8k/pi-vcc/src/core/brief.ts +381 -0
  77. package/node_modules/@sting8k/pi-vcc/src/core/build-sections.ts +79 -0
  78. package/node_modules/@sting8k/pi-vcc/src/core/content.ts +60 -0
  79. package/node_modules/@sting8k/pi-vcc/src/core/filter-noise.ts +42 -0
  80. package/node_modules/@sting8k/pi-vcc/src/core/format-recall.ts +27 -0
  81. package/node_modules/@sting8k/pi-vcc/src/core/format.ts +49 -0
  82. package/node_modules/@sting8k/pi-vcc/src/core/lineage.ts +26 -0
  83. package/node_modules/@sting8k/pi-vcc/src/core/load-messages.ts +41 -0
  84. package/node_modules/@sting8k/pi-vcc/src/core/normalize.ts +66 -0
  85. package/node_modules/@sting8k/pi-vcc/src/core/recall-scope.ts +14 -0
  86. package/node_modules/@sting8k/pi-vcc/src/core/render-entries.ts +55 -0
  87. package/node_modules/@sting8k/pi-vcc/src/core/report.ts +237 -0
  88. package/node_modules/@sting8k/pi-vcc/src/core/sanitize.ts +5 -0
  89. package/node_modules/@sting8k/pi-vcc/src/core/search-entries.ts +221 -0
  90. package/node_modules/@sting8k/pi-vcc/src/core/settings.ts +77 -0
  91. package/node_modules/@sting8k/pi-vcc/src/core/skill-collapse.ts +35 -0
  92. package/node_modules/@sting8k/pi-vcc/src/core/summarize.ts +157 -0
  93. package/node_modules/@sting8k/pi-vcc/src/core/tool-args.ts +14 -0
  94. package/node_modules/@sting8k/pi-vcc/src/details.ts +7 -0
  95. package/node_modules/@sting8k/pi-vcc/src/extract/commits.ts +69 -0
  96. package/node_modules/@sting8k/pi-vcc/src/extract/files.ts +80 -0
  97. package/node_modules/@sting8k/pi-vcc/src/extract/goals.ts +79 -0
  98. package/node_modules/@sting8k/pi-vcc/src/extract/preferences.ts +55 -0
  99. package/node_modules/@sting8k/pi-vcc/src/hooks/before-compact.ts +322 -0
  100. package/node_modules/@sting8k/pi-vcc/src/sections.ts +12 -0
  101. package/node_modules/@sting8k/pi-vcc/src/tools/recall.ts +109 -0
  102. package/node_modules/@sting8k/pi-vcc/src/types.ts +14 -0
  103. package/node_modules/@sting8k/pi-vcc/tests/before-compact-hook.test.ts +181 -0
  104. package/node_modules/@sting8k/pi-vcc/tests/before-compact.test.ts +140 -0
  105. package/node_modules/@sting8k/pi-vcc/tests/brief.test.ts +206 -0
  106. package/node_modules/@sting8k/pi-vcc/tests/build-sections.test.ts +59 -0
  107. package/node_modules/@sting8k/pi-vcc/tests/compile.test.ts +80 -0
  108. package/node_modules/@sting8k/pi-vcc/tests/content.test.ts +31 -0
  109. package/node_modules/@sting8k/pi-vcc/tests/extract-goals.test.ts +86 -0
  110. package/node_modules/@sting8k/pi-vcc/tests/extract-preferences.test.ts +30 -0
  111. package/node_modules/@sting8k/pi-vcc/tests/filter-noise.test.ts +61 -0
  112. package/node_modules/@sting8k/pi-vcc/tests/fixtures.ts +61 -0
  113. package/node_modules/@sting8k/pi-vcc/tests/format-recall.test.ts +30 -0
  114. package/node_modules/@sting8k/pi-vcc/tests/format.test.ts +62 -0
  115. package/node_modules/@sting8k/pi-vcc/tests/lineage.test.ts +33 -0
  116. package/node_modules/@sting8k/pi-vcc/tests/load-messages.test.ts +51 -0
  117. package/node_modules/@sting8k/pi-vcc/tests/normalize.test.ts +97 -0
  118. package/node_modules/@sting8k/pi-vcc/tests/real-sessions.test.ts +38 -0
  119. package/node_modules/@sting8k/pi-vcc/tests/recall-expand.test.ts +15 -0
  120. package/node_modules/@sting8k/pi-vcc/tests/recall-scope.test.ts +32 -0
  121. package/node_modules/@sting8k/pi-vcc/tests/recall-tool-scope.test.ts +67 -0
  122. package/node_modules/@sting8k/pi-vcc/tests/render-entries.test.ts +62 -0
  123. package/node_modules/@sting8k/pi-vcc/tests/report.test.ts +44 -0
  124. package/node_modules/@sting8k/pi-vcc/tests/sanitize.test.ts +24 -0
  125. package/node_modules/@sting8k/pi-vcc/tests/search-entries.test.ts +144 -0
  126. package/node_modules/@sting8k/pi-vcc/tests/support/load-session.ts +23 -0
  127. package/node_modules/@sting8k/pi-vcc/tests/support/real-sessions.ts +51 -0
  128. package/package.json +15 -4
  129. package/scripts/__pycache__/merge_graphify_corpora.cpython-314.pyc +0 -0
  130. package/scripts/index_youtube_urls.py +376 -0
  131. package/scripts/merge_graphify_corpora.py +398 -0
  132. package/scripts/regen_graphify_html.py +46 -0
  133. package/.agents/skills/defuddle/SKILL.md +0 -90
  134. package/.agents/skills/wiki/SKILL.md +0 -215
  135. package/.agents/skills/wiki/references/css-snippets.md +0 -122
  136. package/.agents/skills/wiki/references/frontmatter.md +0 -107
  137. package/.agents/skills/wiki/references/git-setup.md +0 -58
  138. package/.agents/skills/wiki/references/mcp-setup.md +0 -149
  139. package/.agents/skills/wiki/references/modes.md +0 -259
  140. package/.agents/skills/wiki/references/plugins.md +0 -96
  141. package/.agents/skills/wiki/references/rest-api.md +0 -124
  142. package/.agents/skills/wiki-fold/SKILL.md +0 -204
  143. package/.agents/skills/wiki-fold/references/fold-template.md +0 -133
  144. package/.agents/skills/wiki-ingest/SKILL.md +0 -288
  145. package/.agents/skills/wiki-lint/SKILL.md +0 -183
  146. package/.agents/skills/wiki-query/SKILL.md +0 -176
  147. package/.pi/agents/rethink.md +0 -140
  148. package/.pi/agents/wiki-ingest.md +0 -67
  149. package/.pi/agents/wiki-lint.md +0 -75
  150. package/.pi/internal/cursor-sdk-transcript-parser.ts +0 -59
  151. package/.pi/prompts/save.md +0 -16
  152. package/.pi/prompts/wiki.md +0 -23
  153. package/.pi/providers/cursor-sdk-provider.test.mjs +0 -476
  154. package/.pi/providers/cursor-sdk-provider.ts +0 -1085
  155. package/vault/AGENTS.md +0 -37
  156. package/vault/wiki/_templates/comparison.md +0 -39
  157. package/vault/wiki/_templates/concept.md +0 -40
  158. package/vault/wiki/_templates/decision.md +0 -21
  159. package/vault/wiki/_templates/entity.md +0 -32
  160. package/vault/wiki/_templates/flow.md +0 -14
  161. package/vault/wiki/_templates/module.md +0 -18
  162. package/vault/wiki/_templates/question.md +0 -31
  163. package/vault/wiki/_templates/source.md +0 -39
  164. package/vault/wiki/concepts/AST-Aware Code Chunking.md +0 -44
  165. package/vault/wiki/concepts/Build-Time Prompt Compilation.md +0 -107
  166. package/vault/wiki/concepts/Context Engine (AI Coding).md +0 -47
  167. package/vault/wiki/concepts/Context-Aware System Reminders.md +0 -61
  168. package/vault/wiki/concepts/Contextualized Text Embedding.md +0 -42
  169. package/vault/wiki/concepts/Contractor vs Employee AI Model.md +0 -55
  170. package/vault/wiki/concepts/Dual-Model Agent Architecture.md +0 -65
  171. package/vault/wiki/concepts/Late Chunking vs Early Chunking.md +0 -43
  172. package/vault/wiki/concepts/Majority Vote Ensembling.md +0 -68
  173. package/vault/wiki/concepts/Meta-Harness.md +0 -16
  174. package/vault/wiki/concepts/Multi-Agent AI Coding Architecture.md +0 -75
  175. package/vault/wiki/concepts/Prompt Enhancement.md +0 -90
  176. package/vault/wiki/concepts/Prompt Renderer.md +0 -89
  177. package/vault/wiki/concepts/Semantic Codebase Indexing.md +0 -67
  178. package/vault/wiki/concepts/additive-config-hierarchy.md +0 -16
  179. package/vault/wiki/concepts/agent-artifacts-verifiable-deliverables.md +0 -71
  180. package/vault/wiki/concepts/agent-browser-browser-automation.md +0 -99
  181. package/vault/wiki/concepts/agent-codebase-interface.md +0 -43
  182. package/vault/wiki/concepts/agent-harness-architecture.md +0 -67
  183. package/vault/wiki/concepts/agent-loop-detection-patterns.md +0 -133
  184. package/vault/wiki/concepts/agent-search-enforcement.md +0 -126
  185. package/vault/wiki/concepts/agent-skills-ecosystem.md +0 -74
  186. package/vault/wiki/concepts/agent-skills-pattern.md +0 -68
  187. package/vault/wiki/concepts/agentic-harness-context-enforcement.md +0 -91
  188. package/vault/wiki/concepts/agentic-harness.md +0 -34
  189. package/vault/wiki/concepts/agentic-orchestration-pipeline.md +0 -56
  190. package/vault/wiki/concepts/agentic-search-no-embeddings.md +0 -18
  191. package/vault/wiki/concepts/anthropic-context-engineering.md +0 -13
  192. package/vault/wiki/concepts/antigravity-agent-first-architecture.md +0 -61
  193. package/vault/wiki/concepts/ast-compression.md +0 -19
  194. package/vault/wiki/concepts/ast-truncation.md +0 -66
  195. package/vault/wiki/concepts/barrel-files.md +0 -37
  196. package/vault/wiki/concepts/browser-harness-agent.md +0 -41
  197. package/vault/wiki/concepts/browser-subagent-visual-verification.md +0 -82
  198. package/vault/wiki/concepts/codebase-intelligence-ecosystem-comparison.md +0 -192
  199. package/vault/wiki/concepts/codebase-intelligence-harness-integration.md +0 -161
  200. package/vault/wiki/concepts/codebase-to-context-ingestion.md +0 -46
  201. package/vault/wiki/concepts/codex-harness-innovations.md +0 -147
  202. package/vault/wiki/concepts/consensus-debate-flow.md +0 -17
  203. package/vault/wiki/concepts/consensus-debate.md +0 -206
  204. package/vault/wiki/concepts/content-addressed-spec-identity.md +0 -166
  205. package/vault/wiki/concepts/context-anxiety.md +0 -57
  206. package/vault/wiki/concepts/context-compression-techniques.md +0 -19
  207. package/vault/wiki/concepts/context-continuity.md +0 -22
  208. package/vault/wiki/concepts/context-drift-in-agents.md +0 -106
  209. package/vault/wiki/concepts/context-engineering.md +0 -62
  210. package/vault/wiki/concepts/context-folding.md +0 -67
  211. package/vault/wiki/concepts/context-mode.md +0 -38
  212. package/vault/wiki/concepts/cursor-harness-innovations.md +0 -107
  213. package/vault/wiki/concepts/deterministic-session-compaction.md +0 -79
  214. package/vault/wiki/concepts/drift-detection-unified.md +0 -296
  215. package/vault/wiki/concepts/execution-feedback-loop.md +0 -46
  216. package/vault/wiki/concepts/feedforward-feedback-harness.md +0 -60
  217. package/vault/wiki/concepts/five-root-cause-metrics-sentrux.md +0 -40
  218. package/vault/wiki/concepts/fork-safe-spec-storage.md +0 -89
  219. package/vault/wiki/concepts/fts5-sandbox.md +0 -19
  220. package/vault/wiki/concepts/fuzzy-edit-matching.md +0 -71
  221. package/vault/wiki/concepts/gemini-cli-architecture.md +0 -104
  222. package/vault/wiki/concepts/generator-evaluator-architecture.md +0 -64
  223. package/vault/wiki/concepts/guardian-agent-pattern.md +0 -67
  224. package/vault/wiki/concepts/harness-configuration-layers.md +0 -89
  225. package/vault/wiki/concepts/harness-control-frameworks.md +0 -155
  226. package/vault/wiki/concepts/harness-engineering-first-principles.md +0 -90
  227. package/vault/wiki/concepts/harness-h-formalism.md +0 -53
  228. package/vault/wiki/concepts/hybrid-code-search.md +0 -61
  229. package/vault/wiki/concepts/inline-post-edit-validation.md +0 -112
  230. package/vault/wiki/concepts/legendary-engineering-patterns-harness.md +0 -110
  231. package/vault/wiki/concepts/lifecycle-hooks.md +0 -94
  232. package/vault/wiki/concepts/mcp-tool-routing.md +0 -102
  233. package/vault/wiki/concepts/memory-system-of-record-vs-ephemeral-cache.md +0 -47
  234. package/vault/wiki/concepts/meta-agent-context-pruning.md +0 -151
  235. package/vault/wiki/concepts/model-adaptive-harness.md +0 -122
  236. package/vault/wiki/concepts/model-routing-agents.md +0 -101
  237. package/vault/wiki/concepts/monorepo-architecture.md +0 -45
  238. package/vault/wiki/concepts/multi-agent-specialization.md +0 -61
  239. package/vault/wiki/concepts/permission-subsystem.md +0 -16
  240. package/vault/wiki/concepts/pi-messenger-analysis.md +0 -243
  241. package/vault/wiki/concepts/pi-vscode-extension-landscape.md +0 -37
  242. package/vault/wiki/concepts/policy-engine-pattern.md +0 -78
  243. package/vault/wiki/concepts/progressive-disclosure-agents.md +0 -53
  244. package/vault/wiki/concepts/progressive-skill-disclosure.md +0 -17
  245. package/vault/wiki/concepts/provider-native-prompting.md +0 -203
  246. package/vault/wiki/concepts/quality-signal-sentrux.md +0 -37
  247. package/vault/wiki/concepts/repo-map-ranking.md +0 -42
  248. package/vault/wiki/concepts/result-monad-error-handling.md +0 -47
  249. package/vault/wiki/concepts/safety-defense-in-depth.md +0 -83
  250. package/vault/wiki/concepts/sandbox-os-enforcement.md +0 -18
  251. package/vault/wiki/concepts/selective-debate-routing.md +0 -70
  252. package/vault/wiki/concepts/self-evolving-harness.md +0 -60
  253. package/vault/wiki/concepts/sentrux-mcp-integration.md +0 -36
  254. package/vault/wiki/concepts/sentrux-rules-engine.md +0 -49
  255. package/vault/wiki/concepts/shell-pattern-compression.md +0 -24
  256. package/vault/wiki/concepts/skill-first-architecture.md +0 -166
  257. package/vault/wiki/concepts/structured-compaction.md +0 -78
  258. package/vault/wiki/concepts/subagent-orchestration.md +0 -17
  259. package/vault/wiki/concepts/subagent-worktree-isolation.md +0 -68
  260. package/vault/wiki/concepts/superpowers-methodology.md +0 -78
  261. package/vault/wiki/concepts/think-in-code.md +0 -73
  262. package/vault/wiki/concepts/ts-execution-layer.md +0 -100
  263. package/vault/wiki/concepts/typescript-strict-mode.md +0 -37
  264. package/vault/wiki/concepts/vcc-conversation-compaction-for-pi.md +0 -53
  265. package/vault/wiki/concepts/verification-drift-detection.md +0 -19
  266. package/vault/wiki/consensus/consensus-records.md +0 -58
  267. package/vault/wiki/decisions/2026-04-30-pi-lean-ctx-native.md +0 -122
  268. package/vault/wiki/decisions/2026-05-07-replace-lean-ctx-with-context-mode.md +0 -59
  269. package/vault/wiki/decisions/adr-008.md +0 -40
  270. package/vault/wiki/decisions/adr-009.md +0 -46
  271. package/vault/wiki/decisions/adr-010.md +0 -55
  272. package/vault/wiki/decisions/adr-011.md +0 -165
  273. package/vault/wiki/decisions/adr-012.md +0 -102
  274. package/vault/wiki/decisions/adr-013.md +0 -59
  275. package/vault/wiki/decisions/adr-014.md +0 -73
  276. package/vault/wiki/decisions/adr-015.md +0 -81
  277. package/vault/wiki/decisions/adr-016.md +0 -91
  278. package/vault/wiki/decisions/adr-017.md +0 -79
  279. package/vault/wiki/decisions/adr-018.md +0 -100
  280. package/vault/wiki/decisions/adr-019.md +0 -75
  281. package/vault/wiki/decisions/adr-020.md +0 -106
  282. package/vault/wiki/decisions/adr-021.md +0 -86
  283. package/vault/wiki/decisions/adr-022.md +0 -113
  284. package/vault/wiki/decisions/adr-023.md +0 -113
  285. package/vault/wiki/decisions/adr-024.md +0 -73
  286. package/vault/wiki/decisions/adr-025.md +0 -130
  287. package/vault/wiki/decisions/adr-026.md +0 -56
  288. package/vault/wiki/decisions/adr-027.md +0 -94
  289. package/vault/wiki/decisions/colocate-wiki.md +0 -34
  290. package/vault/wiki/entities/Anders Hejlsberg.md +0 -29
  291. package/vault/wiki/entities/Anthropic.md +0 -17
  292. package/vault/wiki/entities/Augment Code.md +0 -49
  293. package/vault/wiki/entities/Bjarne Stroustrup.md +0 -26
  294. package/vault/wiki/entities/Bolt.new (StackBlitz).md +0 -39
  295. package/vault/wiki/entities/Boris Cherny.md +0 -11
  296. package/vault/wiki/entities/Claude Code.md +0 -19
  297. package/vault/wiki/entities/Dennis Ritchie.md +0 -26
  298. package/vault/wiki/entities/Emergent Labs.md +0 -32
  299. package/vault/wiki/entities/Google Cloud.md +0 -16
  300. package/vault/wiki/entities/Guido van Rossum.md +0 -28
  301. package/vault/wiki/entities/Ken Thompson.md +0 -28
  302. package/vault/wiki/entities/Lee et al.md +0 -16
  303. package/vault/wiki/entities/Linus Torvalds.md +0 -28
  304. package/vault/wiki/entities/Lovable (company).md +0 -40
  305. package/vault/wiki/entities/Martin Fowler.md +0 -16
  306. package/vault/wiki/entities/Meng et al.md +0 -16
  307. package/vault/wiki/entities/OpenAI.md +0 -16
  308. package/vault/wiki/entities/Rocket.new.md +0 -38
  309. package/vault/wiki/entities/VILA-Lab.md +0 -15
  310. package/vault/wiki/entities/autodev-codebase.md +0 -18
  311. package/vault/wiki/entities/ck-tool.md +0 -59
  312. package/vault/wiki/entities/codesearch.md +0 -18
  313. package/vault/wiki/entities/disler-indydevdan.md +0 -33
  314. package/vault/wiki/entities/gsd-get-shit-done.md +0 -56
  315. package/vault/wiki/entities/javascript-runtimes.md +0 -48
  316. package/vault/wiki/entities/jesse-vincent.md +0 -38
  317. package/vault/wiki/entities/lean-ctx.md +0 -32
  318. package/vault/wiki/entities/opendev.md +0 -41
  319. package/vault/wiki/entities/ops-codegraph-tool.md +0 -18
  320. package/vault/wiki/entities/pi-coding-agent.md +0 -53
  321. package/vault/wiki/entities/sentrux.md +0 -54
  322. package/vault/wiki/entities/vgrep-tool.md +0 -57
  323. package/vault/wiki/entities/vitest.md +0 -41
  324. package/vault/wiki/flows/harness-wiki-pipeline.md +0 -204
  325. package/vault/wiki/hot.md +0 -932
  326. package/vault/wiki/index.md +0 -437
  327. package/vault/wiki/log.md +0 -422
  328. package/vault/wiki/meta/dashboard.md +0 -30
  329. package/vault/wiki/meta/lint-report-2026-04-30.md +0 -86
  330. package/vault/wiki/meta/lint-report-2026-05-02.md +0 -251
  331. package/vault/wiki/meta/overview.canvas +0 -43
  332. package/vault/wiki/modules/adversarial-verification.md +0 -57
  333. package/vault/wiki/modules/automated-observability.md +0 -54
  334. package/vault/wiki/modules/bench.md +0 -20
  335. package/vault/wiki/modules/extensions.md +0 -23
  336. package/vault/wiki/modules/grounding-checkpoints.md +0 -62
  337. package/vault/wiki/modules/harness-implementation-plan.md +0 -345
  338. package/vault/wiki/modules/harness-wiki-skill-mapping.md +0 -135
  339. package/vault/wiki/modules/harness.md +0 -86
  340. package/vault/wiki/modules/persistent-memory.md +0 -85
  341. package/vault/wiki/modules/schema-orchestration.md +0 -68
  342. package/vault/wiki/modules/skills.md +0 -27
  343. package/vault/wiki/modules/spec-hardening.md +0 -58
  344. package/vault/wiki/modules/structured-planning.md +0 -53
  345. package/vault/wiki/modules/think-in-code-enforcement.md +0 -153
  346. package/vault/wiki/modules/wiki-query-interface.md +0 -64
  347. package/vault/wiki/overview.md +0 -51
  348. package/vault/wiki/questions/Research-pi-vs-claude-code-agentic-orchestration-pipeline.md +0 -87
  349. package/vault/wiki/questions/Research-sentrux-dev.md +0 -123
  350. package/vault/wiki/questions/Research-superpowers-skill-for-agentic-coding-agents.md +0 -164
  351. package/vault/wiki/questions/Research: Augment Code Context Engine.md +0 -244
  352. package/vault/wiki/questions/Research: Automating Software Engineering - Lovable, Bolt, Emergent, Rocket.md +0 -112
  353. package/vault/wiki/questions/Research: Claude Code State-of-the-Art Harness Improvements.md +0 -209
  354. package/vault/wiki/questions/Research: Codex State-of-the-Art Harness Improvements.md +0 -99
  355. package/vault/wiki/questions/Research: Engineering Workflows of Legendary Programmers and AI Harness Mapping.md +0 -107
  356. package/vault/wiki/questions/Research: Fallow Codebase Intelligence Harness Integration.md +0 -72
  357. package/vault/wiki/questions/Research: Gemini CLI SOTA Harness Integration.md +0 -166
  358. package/vault/wiki/questions/Research: GitHub Issues as Harness Spec Storage.md +0 -188
  359. package/vault/wiki/questions/Research: Google Antigravity Harness Integration.md +0 -120
  360. package/vault/wiki/questions/Research: Meta-Agent Context Drift Detection.md +0 -236
  361. package/vault/wiki/questions/Research: Model-Adaptive Agent Harness Design.md +0 -95
  362. package/vault/wiki/questions/Research: Model-Specific Prompting Guides.md +0 -165
  363. package/vault/wiki/questions/Research: Prompt Renderer for Multi-Model Agent Harness.md +0 -216
  364. package/vault/wiki/questions/Research: Skill-First Harness Architecture.md +0 -91
  365. package/vault/wiki/questions/Research: TypeScript Best Practices and Codebase Structure.md +0 -88
  366. package/vault/wiki/questions/Research: TypeScript Execution Layer for Agent Tool Calling.md +0 -81
  367. package/vault/wiki/questions/Research: claude-mem over Obsidian for Harness Layer.md +0 -71
  368. 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 +0 -80
  369. package/vault/wiki/questions/Research: context-mode vs lean-ctx.md +0 -72
  370. package/vault/wiki/questions/Research: cursor.sh Harness Innovations.md +0 -92
  371. package/vault/wiki/questions/Research: executor.sh Harness Integration.md +0 -170
  372. package/vault/wiki/questions/Research: how GSD fits into our coding harness setup.md +0 -97
  373. 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 +0 -80
  374. package/vault/wiki/questions/Research: pi-vcc.md +0 -113
  375. package/vault/wiki/questions/Research: semantic code search tools.md +0 -69
  376. package/vault/wiki/questions/Research: vcc extension for pi coding agent.md +0 -73
  377. package/vault/wiki/questions/how-to-enable-semantic-code-search-now.md +0 -111
  378. package/vault/wiki/questions/mvp-implementation-blueprint.md +0 -552
  379. package/vault/wiki/questions/research-agent-first-codebase-exploration.md +0 -199
  380. package/vault/wiki/questions/research-agentic-coding-harness-latest-papers.md +0 -142
  381. package/vault/wiki/questions/research-gitingest-gitreverse-integration.md +0 -100
  382. package/vault/wiki/questions/research-wozcode-token-reduction.md +0 -67
  383. package/vault/wiki/questions/resolved-context-pruning-inplace-vs-restart.md +0 -95
  384. package/vault/wiki/questions/resolved-context-window-economics.md +0 -167
  385. package/vault/wiki/questions/resolved-imad-debate-gating-transfer.md +0 -126
  386. package/vault/wiki/questions/resolved-mcp-tool-preference.md +0 -112
  387. package/vault/wiki/questions/resolved-small-model-meta-agents.md +0 -107
  388. package/vault/wiki/questions/resolved-treesitter-dynamic-languages.md +0 -95
  389. package/vault/wiki/sources/Auggie Context MCP Server.md +0 -63
  390. package/vault/wiki/sources/Augment Code Codacy AI Giants.md +0 -61
  391. package/vault/wiki/sources/Augment Code MCP SiliconAngle.md +0 -49
  392. package/vault/wiki/sources/Augment Code WorkOS ERC 2025.md +0 -55
  393. package/vault/wiki/sources/Augment Context Engine Official.md +0 -71
  394. package/vault/wiki/sources/Augment SWE-bench Agent GitHub.md +0 -74
  395. package/vault/wiki/sources/Augment SWE-bench Pro Blog.md +0 -58
  396. package/vault/wiki/sources/Source: AgentBus Jinja2 Prompt Pipelines.md +0 -75
  397. package/vault/wiki/sources/Source: Arxiv /342/200/224 Don't Break the Cache.md" +0 -85
  398. package/vault/wiki/sources/Source: Augment - Harness Engineering for AI Coding Agents.md +0 -58
  399. package/vault/wiki/sources/Source: Blake Crosley Agent Architecture Guide.md +0 -100
  400. package/vault/wiki/sources/Source: Bolt.new Architecture & Case Study.md +0 -75
  401. package/vault/wiki/sources/Source: Build-Time Prompt Compilation Architecture.md +0 -107
  402. package/vault/wiki/sources/Source: Claude API Agent Skills Overview.md +0 -70
  403. package/vault/wiki/sources/Source: Gemini CLI Changelogs.md +0 -88
  404. package/vault/wiki/sources/Source: Google Blog - Gemini CLI Announcement.md +0 -57
  405. package/vault/wiki/sources/Source: Google Gemini CLI Architecture Docs.md +0 -53
  406. package/vault/wiki/sources/Source: LangChain - Anatomy of Agent Harness.md +0 -65
  407. package/vault/wiki/sources/Source: Lovable Architecture & Clone Analysis.md +0 -83
  408. package/vault/wiki/sources/Source: Martin Fowler - Harness Engineering.md +0 -70
  409. package/vault/wiki/sources/Source: OpenAI Harness Engineering Five Principles.md +0 -58
  410. package/vault/wiki/sources/Source: OpenAI Harness Engineering /342/200/224 0 Lines of Human Code.md" +0 -101
  411. package/vault/wiki/sources/Source: OpenDev /342/200/224 Building AI Coding Agents for the Terminal.md" +0 -100
  412. package/vault/wiki/sources/Source: Render AI Coding Agents Benchmark 2025.md +0 -53
  413. package/vault/wiki/sources/Source: Rocket.new /342/200/224 Vibe Solutioning Platform.md" +0 -70
  414. package/vault/wiki/sources/Source: SwirlAI Agent Skills Progressive Disclosure.md +0 -71
  415. package/vault/wiki/sources/Source: TianPan Prompt Caching Architecture.md +0 -89
  416. package/vault/wiki/sources/Source: Vercel Labs agent-browser.md +0 -155
  417. package/vault/wiki/sources/Source: browser-harness CDP Harness.md +0 -126
  418. package/vault/wiki/sources/agent-drift-academic-paper.md +0 -79
  419. package/vault/wiki/sources/aider-repomap-tree-sitter.md +0 -42
  420. package/vault/wiki/sources/anthropic-compaction-api.md +0 -58
  421. package/vault/wiki/sources/anthropic-effective-harnesses.md +0 -42
  422. package/vault/wiki/sources/anthropic-prompt-best-practices.md +0 -100
  423. package/vault/wiki/sources/anthropic2026-harness-design.md +0 -63
  424. package/vault/wiki/sources/barrel-files-tkdodo.md +0 -38
  425. package/vault/wiki/sources/birth-of-unix-kernighan-interview.md +0 -57
  426. package/vault/wiki/sources/bockeler2026-harness-engineering.md +0 -69
  427. package/vault/wiki/sources/cast-code-chunking-paper.md +0 -50
  428. package/vault/wiki/sources/ck-semantic-search.md +0 -78
  429. package/vault/wiki/sources/claude-code-architecture-karaxai-2026.md +0 -71
  430. package/vault/wiki/sources/claude-code-architecture-qubytes-2026.md +0 -50
  431. package/vault/wiki/sources/claude-code-architecture-vila-lab-2026.md +0 -64
  432. package/vault/wiki/sources/claude-code-security-architecture-penligent-2026.md +0 -70
  433. package/vault/wiki/sources/claude-context-editing-docs.md +0 -13
  434. package/vault/wiki/sources/cloudflare-codemode.md +0 -63
  435. package/vault/wiki/sources/code-chunk-library-supermemory.md +0 -63
  436. package/vault/wiki/sources/codeact-apple-2024.md +0 -62
  437. package/vault/wiki/sources/codex-dsc-rfc-8573.md +0 -41
  438. package/vault/wiki/sources/codex-open-source-agent-2026.md +0 -110
  439. package/vault/wiki/sources/coir-code-retrieval-benchmark.md +0 -51
  440. package/vault/wiki/sources/colinmcnamara-context-optimization-codemode.md +0 -48
  441. package/vault/wiki/sources/context-folding-paper.md +0 -61
  442. package/vault/wiki/sources/context-mode-website.md +0 -63
  443. package/vault/wiki/sources/cursor-agent-best-practices-2026.md +0 -62
  444. package/vault/wiki/sources/cursor-fork-29b-2025.md +0 -50
  445. package/vault/wiki/sources/cursor-harness-april-2026.md +0 -76
  446. package/vault/wiki/sources/cursor-instant-apply-2024.md +0 -45
  447. package/vault/wiki/sources/cursor-shadow-workspace-2024.md +0 -52
  448. package/vault/wiki/sources/cursor-shipped-coding-agent-2026.md +0 -53
  449. package/vault/wiki/sources/cursor-vs-antigravity-2026.md +0 -51
  450. package/vault/wiki/sources/disler-pi-vs-claude-code.md +0 -69
  451. package/vault/wiki/sources/distill-deterministic-context-compression.md +0 -53
  452. package/vault/wiki/sources/embedding-models-benchmark-supermemory-2025.md +0 -48
  453. package/vault/wiki/sources/executor-rhyssullivan.md +0 -122
  454. package/vault/wiki/sources/fallow-rs-codebase-intelligence.md +0 -125
  455. package/vault/wiki/sources/fan2025-imad.md +0 -60
  456. package/vault/wiki/sources/forgecode-gpt5-agent-improvements.md +0 -63
  457. package/vault/wiki/sources/gemini-3-prompting-guide.md +0 -78
  458. package/vault/wiki/sources/gh-cli-sub-issue-rfc.md +0 -50
  459. package/vault/wiki/sources/gh-sub-issue-extension.md +0 -72
  460. package/vault/wiki/sources/github-fork-issues-discussion.md +0 -44
  461. package/vault/wiki/sources/github-issue-dependencies-docs.md +0 -49
  462. package/vault/wiki/sources/github-sub-issues-docs.md +0 -51
  463. package/vault/wiki/sources/gitingest.md +0 -91
  464. package/vault/wiki/sources/gitreverse.md +0 -63
  465. package/vault/wiki/sources/google-antigravity-official-blog.md +0 -47
  466. package/vault/wiki/sources/google-antigravity-wikipedia.md +0 -53
  467. package/vault/wiki/sources/gsd-codecentric-deep-dive.md +0 -57
  468. package/vault/wiki/sources/gsd-github-repo.md +0 -51
  469. package/vault/wiki/sources/gsd-hn-discussion.md +0 -59
  470. package/vault/wiki/sources/guido-python-design-philosophy.md +0 -56
  471. package/vault/wiki/sources/hejlsberg-7-learnings.md +0 -48
  472. package/vault/wiki/sources/ironclaw-drift-monitor.md +0 -80
  473. package/vault/wiki/sources/langsight-loop-detection.md +0 -80
  474. package/vault/wiki/sources/leanctx-website.md +0 -69
  475. package/vault/wiki/sources/lee2026-meta-harness.md +0 -59
  476. package/vault/wiki/sources/linux-kernel-coding-workflow.md +0 -50
  477. package/vault/wiki/sources/lou2026-autoharness.md +0 -53
  478. package/vault/wiki/sources/martin-fowler-harness-engineering.md +0 -73
  479. package/vault/wiki/sources/mcp-architecture-docs.md +0 -13
  480. package/vault/wiki/sources/meng2026-agent-harness-survey.md +0 -79
  481. package/vault/wiki/sources/mindstudio-four-agent-types.md +0 -68
  482. package/vault/wiki/sources/ms-chat-history-management.md +0 -13
  483. package/vault/wiki/sources/openai-prompt-guidance.md +0 -104
  484. package/vault/wiki/sources/openclaw-session-pruning.md +0 -13
  485. package/vault/wiki/sources/opencode-dcp.md +0 -13
  486. package/vault/wiki/sources/opendev-arxiv-2603.05344v1.md +0 -79
  487. package/vault/wiki/sources/openhands-platform.md +0 -39
  488. package/vault/wiki/sources/oss-guide-codebase-exploration.md +0 -53
  489. package/vault/wiki/sources/pi-compaction-extensions-ecosystem.md +0 -102
  490. package/vault/wiki/sources/pi-context-prune-github-repo.md +0 -38
  491. package/vault/wiki/sources/pi-mono-compaction-docs.md +0 -38
  492. package/vault/wiki/sources/pi-omni-compact-github-repo.md +0 -50
  493. package/vault/wiki/sources/pi-rtk-optimizer-github-repo.md +0 -45
  494. package/vault/wiki/sources/pi-vcc-github-repo.md +0 -69
  495. package/vault/wiki/sources/pi-vscode-marketplace.md +0 -41
  496. package/vault/wiki/sources/pi-vscode-model-provider-marketplace.md +0 -39
  497. package/vault/wiki/sources/py-tree-sitter.md +0 -13
  498. package/vault/wiki/sources/sentrux-dev-landing.md +0 -40
  499. package/vault/wiki/sources/sentrux-docs-pro-architecture.md +0 -75
  500. package/vault/wiki/sources/sentrux-docs-quality-signal.md +0 -46
  501. package/vault/wiki/sources/sentrux-docs-root-cause-metrics.md +0 -57
  502. package/vault/wiki/sources/sentrux-docs-rules-engine.md +0 -58
  503. package/vault/wiki/sources/sentrux-github-repo.md +0 -56
  504. package/vault/wiki/sources/superpowers-github-repo.md +0 -56
  505. package/vault/wiki/sources/superpowers-release-blog.md +0 -54
  506. package/vault/wiki/sources/superpowers-termdock-analysis.md +0 -45
  507. package/vault/wiki/sources/swe-agent-aci.md +0 -42
  508. package/vault/wiki/sources/swe-bench.md +0 -45
  509. package/vault/wiki/sources/swe-pruner-context-pruning.md +0 -13
  510. package/vault/wiki/sources/think-in-code-blog.md +0 -48
  511. package/vault/wiki/sources/tree-sitter-docs.md +0 -13
  512. package/vault/wiki/sources/ts-best-practices-2025-devto.md +0 -42
  513. package/vault/wiki/sources/ts-folder-structure-mingyang.md +0 -58
  514. package/vault/wiki/sources/ts-monorepo-koerselman.md +0 -44
  515. package/vault/wiki/sources/ts-result-error-handling-kkalamarski.md +0 -52
  516. package/vault/wiki/sources/ts-runtimes-comparison-betterstack.md +0 -42
  517. package/vault/wiki/sources/ts-strict-mode-rishikc.md +0 -43
  518. package/vault/wiki/sources/unix-philosophy.md +0 -48
  519. package/vault/wiki/sources/vectara-chunking-vs-embedding-naacl2025.md +0 -39
  520. package/vault/wiki/sources/vectara-guardian-agents.md +0 -79
  521. package/vault/wiki/sources/vgrep-semantic-search.md +0 -76
  522. package/vault/wiki/sources/vitest-official.md +0 -41
  523. package/vault/wiki/sources/vscode-pi-community-extension.md +0 -40
  524. package/vault/wiki/sources/wozcode.md +0 -79
@@ -1,53 +0,0 @@
1
- ---
2
- type: concept
3
- status: active
4
- created: 2026-05-05
5
- updated: 2026-05-07
6
- tags:
7
- - pi-agent
8
- - vcc
9
- - compaction
10
- - memory
11
- related:
12
- - "[[pi-vcc-github-repo]]"
13
- - "[[context-continuity]]"
14
- - "[[structured-compaction]]"
15
- - "[[adr-027]]"
16
- ---
17
-
18
- # VCC Conversation Compaction for Pi
19
-
20
- ## Definition
21
-
22
- VCC in Pi context refers to transcript-preserving, deterministic compaction approach adopted by `pi-vcc`, inspired by View-oriented Conversation Compiler. It compresses sessions without calling an LLM, then adds recall over raw lineage history.
23
-
24
- ## Core Mechanics
25
-
26
- - Algorithmic extraction, not model summarization
27
- - Stable sectioned output: goal, files, commits, outstanding context, preferences
28
- - Explicit recall API (`vcc_recall`) with regex and lineage scope
29
- - High token reduction on long sessions (often 90%+)
30
-
31
- ## Practical Impact
32
-
33
- For long-running coding sessions, VCC-style compaction reduces cost and hallucination risk during summarization while preserving retrievability of older context.
34
-
35
- ## Competitive Position in Pi Ecosystem
36
-
37
- pi-vcc is the only fully deterministic (no-LLM) compaction extension. Three other Pi compaction extensions exist but all use LLM calls:
38
- - **pi-model-aware-compaction**: Per-model threshold triggers (timing control, not algorithm change)
39
- - **pi-custom-compaction**: Swap compaction model/template (still LLM-based)
40
- - **pi-agentic-compaction**: Virtual filesystem + sandboxed tools (still LLM-based)
41
-
42
- See [[pi-compaction-extensions-ecosystem]] for full comparison and [[deterministic-session-compaction]] for the broader pattern.
43
-
44
- ## Broader Pattern Validation
45
-
46
- The deterministic compaction pattern is independently validated by:
47
- - **Codex DSC RFC** (openai/codex#8573): Proposed identical approach for Codex, closed as not_planned (Source: [[codex-dsc-rfc-8573]])
48
- - **Distill** (143 stars): Deterministic context preprocessing, different layer but same no-LLM principle (Source: [[distill-deterministic-context-compression]])
49
- - **MemoSift**: 6-layer deterministic compression engine with framework adapters
50
-
51
- ## Clarification
52
-
53
- VCC here is **not** VS Code extension acronym. It is compaction method and Pi package category.
@@ -1,19 +0,0 @@
1
- ---
2
- type: concept
3
- title: "verification-drift-detection"
4
- created: 2026-04-30
5
- updated: 2026-04-30
6
- status: seed
7
- tags: [#concept, #harness, #testing]
8
- related:
9
- - "[[execution-feedback-loop]]"
10
- - "[[grounding-checkpoints]]"
11
- ---
12
-
13
- # Verification Drift Detection
14
-
15
- > [!stub] See [[grounding-checkpoints]] for the harness implementation.
16
-
17
- Detects when an agent's implementation drifts away from the spec or when verification results become stale. Part of the execution feedback loop: after each change, verify that the output still matches expected behavior. Drift detection triggers re-grounding — forcing the agent to re-read the spec before continuing.
18
-
19
- In the ultimate-pi harness, this is implemented by Layer 3 ([[grounding-checkpoints]]), which enforces smallest-verifiable-change + drift detection on every checkpoint.
@@ -1,58 +0,0 @@
1
- ---
2
- type: index
3
- title: Consensus Records
4
- created: 2026-04-30
5
- updated: 2026-04-30
6
- status: active
7
- tags: [consensus, debate, alignment, index]
8
- related:
9
- - "[[consensus-debate]]"
10
- - "[[adr-011]]"
11
- - "[[harness-implementation-plan]]"
12
- ---
13
-
14
- # Consensus Records
15
-
16
- Permanent alignment records for all agent debates. **Every debate verdict — win, lose, or deadlock — is filed here.**
17
-
18
- Future agents query this directory before forming positions. Contradicting a filed consensus triggers a harness block (L7 enforcement).
19
-
20
- ## Directory Convention
21
-
22
- - Filename: `[layer]-[topic-slug].md`
23
- - Layers: `spec` (L1), `plan` (L2), `verify` (L4)
24
- - Example: `spec-idempotency-key-design.md`
25
-
26
- ## Consensus Page Template
27
-
28
- ```markdown
29
- ---
30
- type: consensus
31
- layer: spec | plan | verify
32
- verdict: CONSENSUS_REACHED | DEADLOCK | BUDGET_EXHAUSTED | TIMEOUT
33
- date: YYYY-MM-DD
34
- participants: [agent-a, agent-b]
35
- topic: "Brief description"
36
- related: page-refs (wikilinks to related pages)
37
- ---
38
-
39
- # [Topic]
40
-
41
- ## Final Position
42
- [The winning / final agreed position]
43
-
44
- ## Key Rounds Summary
45
- | Round | Attacker | Defender | Outcome |
46
- |-------|----------|----------|---------|
47
- | 1 | ... | ... | ... |
48
-
49
- ## Evidence References
50
- - (wikilinks to evidence sources)
51
-
52
- ## Rationale
53
- Why this consensus was reached. What was settled.
54
- ```
55
-
56
- ## No records yet
57
-
58
- Consensus filing begins with Phase P19b of the [[harness-implementation-plan]].
@@ -1,122 +0,0 @@
1
- ---
2
- type: decision
3
- status: accepted
4
- created: 2026-04-30
5
- tags:
6
- - lean-ctx
7
- - pi
8
- - extensions
9
- - token-optimization
10
- - mcp
11
- related:
12
- - "[[lean-ctx]]"
13
- - "[[leanctx-website]]"
14
- - "[[Research: context-mode vs lean-ctx]]"
15
- updated: 2026-04-30
16
- title: "ADR: Adopt pi-lean-ctx Native Package, Drop Custom Extension"
17
-
18
- ---# ADR: Adopt pi-lean-ctx Native Package, Drop Custom Extension
19
-
20
- ## Context
21
-
22
- The ultimate-pi harness had a custom extension (`extensions/lean-ctx-enforce.ts`) that:
23
-
24
- - Detected lean-ctx binary availability
25
- - Wrapped `bash` commands with `lean-ctx -c` prefix
26
- - Overrode `read` to call `lean-ctx read` with simple mode selection
27
- - Registered `/lean-ctx-status` diagnostic command
28
-
29
- This custom extension was a stopgap — basic, manual wrapping, no MCP bridge, no auto mode selection, no compression stats.
30
-
31
- Meanwhile, the pi-lean-ctx npm package (v3.4.5, published by yvgude) provides a native Pi extension with full lean-ctx integration.
32
-
33
- ## Alternatives Considered
34
-
35
- 1. **Keep custom extension** — Simple, self-contained, no external npm dependency. But misses MCP bridge (48 tools), auto read-mode selection, ls/find/grep tools, compression stats, and reconnection logic.
36
-
37
- 2. **Adopt pi-lean-ctx** — npm package maintained by lean-ctx author. Full MCP integration, all 48 lean-ctx MCP tools as native Pi tools, rich read mode selection, spawnHook bash wrapping, compression stats footer, reconnect/timeout-handling.
38
-
39
- 3. **Hybrid: keep custom + add MCP manually** — Would duplicate effort. pi-lean-ctx already does everything better.
40
-
41
- ## Decision
42
-
43
- **Replace the custom `lean-ctx-enforce.ts` extension with the `pi-lean-ctx` npm package.**
44
-
45
- ## Changes Made
46
-
47
- | File | Action | Detail |
48
- |------|--------|--------|
49
- | `extensions/lean-ctx-enforce.ts` | Deleted | Replaced by pi-lean-ctx |
50
- | `.pi/settings.json` | Edited | Added `"npm:pi-lean-ctx"` to packages array |
51
- | `.pi/SYSTEM.md` | Edited | Updated skill routing line |
52
- | `package.json` | Edited | Updated `check:ts` script to dotenv-loader |
53
- | `.pi/skills/lean-ctx/SKILL.md` | Edited | Added integration note at top |
54
- | `.pi/npm/node_modules/pi-lean-ctx` | Installed | v3.4.5 + all deps |
55
-
56
- ## What pi-lean-ctx Provides
57
-
58
- ### Tool Overrides
59
-
60
- | Tool | Custom Ext | pi-lean-ctx |
61
- |------|-----------|-------------|
62
- | `bash` | Prepends `lean-ctx -c` | SpawnHook wraps `lean-ctx -c sh -lc` (preserves env, aliases). `raw=true` bypass option. |
63
- | `read` | Basic `lean-ctx read -m lines/…` | Auto mode selection: full (<8KB code), map (8KB–96KB), signatures (>96KB). Syntax highlighting. Compression stats footer. Truncation handling. |
64
- | `ls` | Not handled | Routes through `lean-ctx ls` with limit support |
65
- | `find` | Not handled | Routes through `lean-ctx find` with glob + limit |
66
- | `grep` | Not handled | Routes through `lean-ctx -c rg` with full ripgrep flags |
67
- | `cat` blocking | Not enforced | Read tool description warns: "Do NOT use bash to read files (cat/head/tail)" |
68
-
69
- ### MCP Bridge
70
-
71
- - Auto-connects to lean-ctx MCP server (stdio transport)
72
- - Registers all 48 lean-ctx MCP tools as native Pi tools
73
- - Auto-reconnect (3 attempts, exponential backoff 2s/4s/8s)
74
- - 120s tool timeout with retry for idempotent tools
75
- - Tools excluded from bridge: `ctx_read`, `ctx_multi_read`, `ctx_shell`, `ctx_search`, `ctx_tree` (already handled via Pi-native tools)
76
-
77
- ### Diagnostic Command
78
-
79
- `/lean-ctx` — Shows binary path, MCP bridge status, registered tool count, reconnect attempts, last hung/errored tool.
80
-
81
- ## Dependencies
82
-
83
- - **Runtime**: `lean-ctx` binary (v3.4.2 installed via npm/cargo)
84
- - **npm**: `pi-lean-ctx@3.4.5` with `@modelcontextprotocol/sdk@^1.29.0`
85
- - **Peer**: `@mariozechner/pi-coding-agent@>=0.50.0` (we have 0.70.x)
86
- - **Peer**: `@mariozechner/pi-tui@*` (available via pi-coding-agent)
87
- - **TypeBox alias**: pi-agent's jiti loader aliases `@sinclair/typebox` → `typebox`
88
-
89
- ## Consequences
90
-
91
- ### Positive
92
-
93
- - 48 lean-ctx MCP tools available to agent: `ctx_session`, `ctx_knowledge`, `ctx_semantic_search`, `ctx_impact`, `ctx_architecture`, `ctx_workflow`, `ctx_gain`, etc.
94
- - Richer read modes: auto mode selection based on file size + extension
95
- - Proper compression stats on every tool output
96
- - Graceful reconnection if MCP server dies
97
- - Upstream-maintained (by lean-ctx author yvgude)
98
-
99
- ### Negative
100
-
101
- - External npm dependency (mitigated: published by same author as lean-ctx, Apache 2.0)
102
- - MCP bridge adds startup latency (~200ms for tool discovery)
103
- - One more package to keep updated
104
-
105
- ### Neutral
106
-
107
- - `/lean-ctx-status` command removed; replaced by `/lean-ctx`
108
- - Skill routing in SYSTEM.md changed from "default layer" to "native Pi package" description
109
-
110
- ## Verification
111
-
112
- - `lean-ctx` binary v3.4.2 installed ✓
113
- - `pi-lean-ctx` v3.4.5 installed in `.pi/npm/node_modules` ✓
114
- - All peer dependencies satisfied ✓
115
- - `tsc` check on remaining extensions passes ✓
116
- - @sinclair/typebox aliased by jiti loader ✓
117
-
118
- ## Next
119
-
120
- - Restart pi agent; pi-lean-ctx loads at session start
121
- - Run `/lean-ctx` to verify MCP bridge connected
122
- - Monitor `lean-ctx gain` after a few sessions for token savings data
@@ -1,59 +0,0 @@
1
- ---
2
- type: decision
3
- title: "Replace pi-lean-ctx with context-mode"
4
- created: 2026-05-07
5
- updated: 2026-05-07
6
- tags:
7
- - decision
8
- - context-optimization
9
- - migration
10
- status: accepted
11
- related:
12
- - "[[context-mode]]"
13
- - "[[lean-ctx]]"
14
- - "[[agentic-harness-context-enforcement]]"
15
-
16
- ---
17
- # Replace pi-lean-ctx with context-mode
18
-
19
- ## Context
20
-
21
- ultimate-pi uses `pi-lean-ctx@3.5.1` for context compression via AST parsing, shell pattern compression, and smart read modes. User requested migration to `context-mode` (11K+ GitHub stars, 48K npm downloads/month) as the primary context optimization layer.
22
-
23
- context-mode uses intercept-and-sandbox architecture: raw tool output never enters the agent's context window. Instead, output is indexed into SQLite FTS5 with BM25 ranking, and the agent queries on demand. Claims 98-99.5% token reduction. Has native Pi Coding Agent extension support with session_start, tool_call, tool_result, and session_before_compact hooks.
24
-
25
- ## Alternatives Considered
26
-
27
- 1. **Keep pi-lean-ctx** — mature, 48 MCP tools, agent governance (profiles, budgets, SLOs), Apache 2.0. Less community adoption (924 stars vs 11K).
28
- 2. **Run both simultaneously** — wiki research notes they solve complementary halves (lean-ctx: compress input, context-mode: sandbox output). However, potential tool conflicts, complexity, and user explicitly requested removal.
29
- 3. **Replace with context-mode** — stronger community validation, native Pi extension, FTS5 sandbox, "Think in Code" paradigm, session continuity.
30
-
31
- ## Chosen
32
-
33
- Replace pi-lean-ctx with context-mode (`npm:context-mode@^1.0.111`).
34
-
35
- ## Changes Made
36
-
37
- - `.pi/settings.json`: replaced `"npm:pi-lean-ctx"` with `"npm:context-mode"`
38
- - `.pi/npm/package.json`: replaced `"pi-lean-ctx": "^3.5.1"` with `"context-mode": "^1.0.111"`
39
- - `package.json`: replaced `"lean-ctx"` keyword with `"context-mode"`
40
- - `.pi/extensions/ck-enforce.ts`: **deleted** (lean-ctx-specific grep override, no longer needed)
41
- - `CONTRIBUTING.md`: updated lean-ctx reference to context-mode
42
-
43
- ## Tradeoffs
44
-
45
- | Gained | Lost |
46
- |--------|------|
47
- | 11K+ GitHub stars, larger community | 48 MCP tools reduced to 11 |
48
- | FTS5 sandbox (output never enters context) | AST-based compression (tree-sitter, 18 languages) |
49
- | Native Pi extension with full hook lifecycle | 90+ shell pattern compression |
50
- | "Think in Code" paradigm enforcement | Smart read modes (full/map/signatures) |
51
- | Session continuity (26 events) | Agent governance (profiles, budgets, SLOs) |
52
-
53
- ## Consequences
54
-
55
- - Need to ensure context-mode's `ctx_search` and `ctx_execute` tools are integrated into the search policy
56
- - ck-enforce.ts was blocking conceptual grep searches and steering to `ck --hybrid` — this enforcement is lost; SYSTEM.md grep policy still applies but relies on agent compliance
57
- - context-mode uses ELv2 license (vs Apache 2.0) — acceptable for internal use
58
- - `npm install` in `.pi/npm/` installed 42 new packages, removed pi-lean-ctx
59
- - Wiki pages referencing `[[lean-ctx]]` should be updated to reference `[[context-mode]]` where appropriate
@@ -1,40 +0,0 @@
1
- ---
2
- type: decision
3
- title: "ADR-008: Spec-Only Black-Box QA"
4
- status: active
5
- priority: 1
6
- date: "2026-04-28"
7
- tags: [adr, qa, testing, harness, layer-4]
8
- sources:
9
- - "[[harness-implementation-plan]]"
10
- related:
11
- - "[[adversarial-verification]]"
12
- - "[[agentic-harness]]"
13
- created: 2026-04-30
14
- updated: 2026-04-30
15
- ---
16
-
17
- # ADR-008: Spec-Only Black-Box QA
18
-
19
- ## Context
20
-
21
- Layer 4 (Adversarial Verification) needs to generate tests. Where should the test specifications come from — the implementation code or the specification?
22
-
23
- ## Decision
24
-
25
- Tests are generated from the **specification only** — never from implementation code. This is black-box testing enforced at the architectural level.
26
-
27
- The prompt for the QA test writer **never includes implementation code**. The `spec_only` flag is immutable.
28
-
29
- ## Rationale
30
-
31
- - Implementation-aware tests can be gamed by the implementation itself
32
- - Spec-only tests verify behavior, not implementation details
33
- - Prevents the common failure mode where agents write tests that pass by construction
34
-
35
- ## Consequences
36
-
37
- - **Positive**: Tests are honest arbiters of correctness
38
- - **Positive**: No temptation to "test the implementation" rather than the behavior
39
- - **Negative**: May miss implementation-specific edge cases (mitigated by critic review in Layer 5)
40
- - **Negative**: Requires well-specified success criteria (enforced by Layer 1 Spec Hardening)
@@ -1,46 +0,0 @@
1
- ---
2
- type: decision
3
- title: "ADR-009: claude-obsidian Mode B for Persistent Memory"
4
- status: active
5
- priority: 1
6
- date: "2026-04-28"
7
- tags: [adr, memory, wiki, harness, layer-6, claude-obsidian]
8
- sources:
9
- - "[[harness-implementation-plan]]"
10
- related:
11
- - "[[persistent-memory]]"
12
- - "[[wiki-query-interface]]"
13
- - "[[agentic-harness]]"
14
- created: 2026-04-30
15
- updated: 2026-04-30
16
- ---
17
-
18
- # ADR-009: claude-obsidian Mode B for Persistent Memory
19
-
20
- ## Context
21
-
22
- Layer 6 (Persistent Memory) needs a knowledge base that persists across sessions, supports cross-referencing, and enables retrieval. Previous approach used a custom `WikiKnowledgeBase` class with Vectra BM25+vector search (~87MB deps).
23
-
24
- ## Decision
25
-
26
- Replace custom WikiKnowledgeBase + Vectra with **claude-obsidian skills in GitHub Mode B**. Search is LLM-native: `hot.md` → `index.md` → pages. No custom code, no embedding model.
27
-
28
- ## Comparison
29
-
30
- | Aspect | Before (ADR-007) | After (ADR-009) |
31
- |--------|-------------------|------------------|
32
- | Cross-session memory | None | hot.md ~500-word cache |
33
- | Source provenance | No tracking | .raw/ immutable sources + manifest delta |
34
- | Repository structure | Flat patterns/ dirs | Mode B: modules, components, decisions, dependencies, flows |
35
- | Search | Vectra BM25+vector (~80MB model) | LLM-native: hot.md → index.md → pages |
36
- | Lint / health | None | 8+ category checks |
37
- | Contradiction flagging | None | `> [!contradiction]` callouts |
38
- | Dependencies | ~87MB | ~50KB skills + optional ollama |
39
-
40
- ## Consequences
41
-
42
- - **Positive**: Eliminates ~87MB dependency footprint
43
- - **Positive**: LLM-native search leverages existing Claude capabilities
44
- - **Positive**: Obsidian wiki is human-readable and browseable
45
- - **Negative**: Search quality depends on LLM context management (mitigated by 3-mode depth system)
46
- - **Negative**: No semantic similarity search without optional ollama setup
@@ -1,55 +0,0 @@
1
- ---
2
- type: decision
3
- title: "ADR-010: Agentic Harness ↔ Wiki Tight-Coupling Contract"
4
- status: active
5
- priority: 1
6
- created: "2026-04-28"
7
- updated: "2026-04-28"
8
- tags: [decision, harness, wiki, integration, pipeline, adr]
9
- sources:
10
- - "[[harness]]"
11
- - "[[harness-implementation-plan]]"
12
- - "[[adr-009]]"
13
- - "[[adr-008]]"
14
- - "[[persistent-memory]]"
15
- - "[[wiki-query-interface]]"
16
- related:
17
- - "[[colocate-wiki]]"
18
- - "[[harness-wiki-skill-mapping]]"
19
- - "[[harness-wiki-pipeline]]"
20
- ---
21
-
22
- # ADR-010: Agentic Harness ↔ Wiki Tight-Coupling Contract
23
-
24
- ## Context
25
-
26
- The harness has 8 layers. Layers 6 (Persistent Memory) and 8 (Wiki Query Interface) already reference the wiki. But the other 6 layers have **no explicit read/write contract** with the wiki. This creates two failure modes:
27
-
28
- 1. **Design drift**: An agent makes a decision that contradicts an existing ADR or module spec because it never read the wiki first.
29
- 2. **Wiki staleness**: After a pipeline event changes the codebase, the wiki is not updated — decisions, patterns, and statuses go stale.
30
-
31
- [[adr-009]] replaced Vectra with LLM-native wiki search. [[colocate-wiki]] put the wiki in-repo. Now we need the **contract** that makes the harness and wiki a single synchronized system.
32
-
33
- ## Decision
34
-
35
- **Every harness layer reads relevant wiki docs before acting, and writes back to the wiki after every state transition.** The contract is enforced at the extension layer (L7 schema orchestration), not by convention.
36
-
37
- Two axioms:
38
- 1. **Read-first**: No layer acts without querying the wiki for relevant ADRs, module specs, and patterns.
39
- 2. **Write-after**: No state transition completes without a wiki write that keeps docs current.
40
-
41
- ## Rationale
42
-
43
- - **Consistency**: If ADR-008 says "black-box QA", no layer should generate implementation-coupled tests. Reading the wiki first prevents this.
44
- - **Traceability**: Every state transition produces a wiki artifact. Future sessions can reconstruct the full decision chain.
45
- - **Staleness elimination**: The wiki is the single source of truth for design decisions. If code changes, the wiki reflects it. If the wiki says something, the code respects it.
46
- - **Self-healing**: wiki-lint after every 10-15 writes catches contradictions, orphans, and stale claims before they compound.
47
-
48
- ## Consequences
49
-
50
- - **Positive**: Harness decisions are always grounded in documented architecture.
51
- - **Positive**: Wiki stays current automatically — no manual doc updates needed.
52
- - **Positive**: New sessions can pick up exactly where the last left off via hot.md.
53
- - **Negative**: Extra token cost per subtask (~500-1500 for reads, ~500-1500 for writes).
54
- - **Negative**: Requires discipline at the extension-layer hooks — must not skip wiki reads.
55
- - **Negative**: Lint runs add latency but prevent long-term decay.
@@ -1,165 +0,0 @@
1
- ---
2
- type: decision
3
- title: "ADR-011: Multi-Agent Consensus Debate in the Harness Pipeline"
4
- status: accepted
5
- priority: 1
6
- date: "2026-04-30"
7
- tags: [adr, harness, consensus, debate, multi-agent, pi-messenger, selective-routing, imad]
8
- sources:
9
- - "[[harness-implementation-plan]]"
10
- - "[[pi-messenger-analysis]]"
11
- - "[[fan2025-imad]]"
12
- related:
13
- - "[[agentic-harness]]"
14
- - "[[adversarial-verification]]"
15
- - "[[spec-hardening]]"
16
- - "[[structured-planning]]"
17
- - "[[consensus-debate]]"
18
- - "[[selective-debate-routing]]"
19
- - "[[drift-detection-unified]]"
20
- supersedes:
21
- created: 2026-04-30
22
- updated: 2026-04-30
23
- ---
24
-
25
- # ADR-011: Multi-Agent Consensus Debate with Selective Routing
26
-
27
- ## Context
28
-
29
- The current harness pipeline is single-agent sequential: one agent hardens the spec (L1), one agent plans (L2), one agent executes (L3), one critic attacks once (L4). L4 has `max_attack_rounds: 2` — a retry loop, not a debate.
30
-
31
- The best human software decisions come from back-and-forth argument: thesis → antithesis → synthesis. Single-pass review is weak because the reviewer's first objection is often shallow, and the proposer's rebuttal frequently reveals a deeper truth neither saw alone.
32
-
33
- Agents lack intuition. Multi-round argument is a substitute for intuition — each round forces the opponent to find a new attack surface, and each rebuttal forces the defender to articulate deeper justification.
34
-
35
- pi-messenger (nicobailon/pi-messenger, 532 ⭐) demonstrates that agents CAN communicate peer-to-peer via the file system — registry, inboxes, `fs.watch` for real-time delivery. No server, no daemon, just files. This is the right transport primitive for consensus debates.
36
-
37
- **UPDATE (2026-04-30)**: iMAD (Fan et al., AAAI 2026) demonstrates that debate is NOT always beneficial. Multi-agent debate can overturn correct single-agent answers. Always-on debate wastes tokens AND can reduce accuracy. Selective routing via a pre-debate gating classifier saves 92% tokens AND improves accuracy by 13.5%.
38
-
39
- ## Decision
40
-
41
- **Add a consensus debate capability to the harness pipeline. Use pi-messenger's file-based message passing as the transport layer. Strip all UI overlays. Build a consensus protocol on top. Gate debate with iMAD-style selective routing — trigger debate only when a pre-debate classifier detects hesitation/uncertainty cues in single-agent self-critique.**
42
-
43
- ### iMAD Integration: Pre-Debate Gate
44
-
45
- Before spawning a debate, the system:
46
-
47
- 1. Single agent produces structured self-critique response
48
- 2. Extract hesitation cues: uncertainty markers ("might", "could be", "I think"), contradictory statements, missing evidence references, low confidence indicators
49
- 3. Lightweight classifier → debate or skip
50
- 4. If confidence high + no hesitation → skip debate, save tokens
51
- 5. If uncertainty detected → trigger full consensus debate
52
-
53
- Expected reduction: ~92% token savings on high-confidence tasks (~80% of tasks in early estimate).
54
-
55
- ### What we adopt from pi-messenger:
56
-
57
- | Component | Purpose |
58
- |-----------|---------|
59
- | Agent registry (`.pi/messenger/registry/`) | Agent discovery, presence |
60
- | Per-agent inbox directories | Message delivery |
61
- | `fs.watch`-based message detection | Real-time delivery without polling |
62
- | JSON message format | Structured inter-agent communication |
63
- | Atomic file write patterns | Race-free message delivery |
64
- | Stale registration cleanup | Dead agent garbage collection |
65
- | Memorable name generation | Debug-friendly agent identification |
66
-
67
- ### What we strip (the "overlays"):
68
-
69
- - Chat overlay UI (`/messenger`)
70
- - Status bar indicators (●3, on fire, debugging...)
71
- - Activity feed timeline
72
- - Emoji-based status messages
73
- - Human-as-participant features
74
- - Crew orchestration (planner→worker→reviewer DAG) — L7 handles this
75
- - Swarm claim/complete — L7 handles task tracking
76
- - Message budgets (per-coordination-level) — consensus budget replaces this
77
-
78
- ### Consensus Protocol:
79
-
80
- A structured debate protocol with:
81
-
82
- 1. **DebateSession**: N agents, M rounds, defined topic/scope
83
- 2. **ConsensusBudget**: Max rounds, max tokens per round, max wall-clock time
84
- 3. **Turn protocol**: Structured messages with `{ role, round, claim, counter_to, evidence_refs }`
85
- 4. **Convergence detection**: When positions stabilize for K consecutive rounds
86
- 5. **Verdict**: `CONSENSUS_REACHED`, `DEADLOCK` (positions unchanged after N rounds), `BUDGET_EXHAUSTED`
87
-
88
- ### Integration points (selective — triggered only when pre-debate gate signals uncertainty):
89
-
90
- | Layer | Debate purpose | Agents | Budget |
91
- |-------|---------------|--------|--------|
92
- | L1 (Spec Hardening) | Argue about ambiguity resolution | Spec proposer + Spec critic | 3 rounds, ~6K tokens |
93
- | L2 (Structured Planning) | Argue about plan structure, dependencies | Planner + Plan critic | 3 rounds, ~10K tokens |
94
- | L4 (Adversarial Verification) | Multi-round attack on implementation | Defender + Attacker | 4 rounds, ~8K tokens |
95
-
96
- ## Rationale
97
-
98
- ### Why file-based messaging (not MCP, not HTTP, not in-process)?
99
-
100
- 1. **Zero infrastructure**: No server, no daemon, no port management. pi.dev extensions already have filesystem access.
101
- 2. **Process isolation**: Each debate participant is a separate LLM session. Filesystem is the natural IPC boundary.
102
- 3. **Crash safety**: Messages are files. If an agent crashes, its messages persist. Debate can resume.
103
- 4. **Observability**: Debate transcripts are files on disk. Debuggable without tooling.
104
- 5. **pi-messenger already solved this**: Registry format, inbox pattern, watcher debouncing, stale cleanup — all battle-tested.
105
-
106
- ### Why selective routing (not always-on debate)?
107
-
108
- iMAD shows that always-on debate:
109
- - Costs 92% more tokens than selective routing
110
- - Can overturn correct single-agent answers (accuracy regression)
111
- - Is only beneficial when the single agent shows hesitation/uncertainty
112
-
113
- Single agent self-critique is cheaper than full debate. Route to debate only when needed.
114
-
115
- ### Why not use pi-messenger's Crew orchestration?
116
-
117
- The harness has L7 (Schema Orchestration via Archon) for DAG execution, loop nodes, approval gates, and worktree isolation. pi-messenger's Crew (planner→worker→reviewer waves) is a competing orchestration model. Using both would create conflicting DAG executors.
118
-
119
- ### Why consensus budgets?
120
-
121
- Without budgets, debates consume unlimited tokens. A budget forces convergence — agents must prioritize their strongest arguments. This mirrors real human meetings with time limits.
122
-
123
- ## Consequences
124
-
125
- ### Positive
126
- - **Better decisions when needed**: Multi-round argument surfaces deeper issues than single-pass review
127
- - **Token-efficient**: Selective routing avoids debating settled questions
128
- - **Defense in depth**: Adversarial verification becomes genuine debate when warranted
129
- - **Spec quality**: L1 debates catch ambiguous specs before implementation
130
- - **Permanent agent alignment**: Winning consensus filed to `wiki/consensus/` — future agents query and align to resolved debates, preventing re-litigation
131
- - **Observable reasoning**: Debate transcripts are file artifacts that can be audited
132
-
133
- ### Negative
134
- - **Complexity**: New consensus protocol layer, pre-debate classifier, message schema, convergence detection
135
- - **Classifier accuracy risk**: Pre-debate gate may miss cases where debate would help (false negatives)
136
- - **Latency**: When debate IS triggered, multi-round adds wall-clock time
137
- - **Agent quality variance**: Cheap models may produce shallow arguments
138
-
139
- ### Mitigations
140
- - Debate is opt-in per layer (configurable `consensus: { enabled: true/false }`)
141
- - Pre-debate classifier is conservative: when uncertain, trigger debate
142
- - Budgets prevent runaway token consumption
143
- - **Winning consensus MUST be filed in wiki (`wiki/consensus/`)** as a permanent alignment record — NOT optional. Future agents query consensus before making decisions. Contradicting a filed consensus triggers harness block.
144
- - Hard-threshold pass/fail criteria (not narrative self-assessment) as primary L4 mechanism; debate is supplementary
145
-
146
- ## Token Budget Impact (with Selective Routing)
147
-
148
- | Activity | Always-Debate | With Selective (80% skip rate) |
149
- |----------|--------------|-------------------------------|
150
- | L1 Spec Debate | +4,000 | +800 avg |
151
- | L2 Plan Debate | +5,000 | +1,000 avg |
152
- | L4 Adversarial Debate | +4,000 | +1,200 avg |
153
- | **Total added per subtask** | **~13,000** | **~3,000 avg** |
154
-
155
- ## Implementation
156
-
157
- See [[harness-implementation-plan]] Phases P17-P19 and P2b.
158
-
159
- ## Related
160
-
161
- - [[consensus-debate]] — concept page for the consensus protocol
162
- - [[selective-debate-routing]] — iMAD concept and mechanism
163
- - [[pi-messenger-analysis]] — full analysis of pi-messenger and what we adopt/strip
164
- - [[harness-implementation-plan]] — master plan with build phases
165
- - [[drift-detection-unified]] — how consensus debate complements drift detection