Repository navigation
Description
Destination
Replace /token-burden's flat section model (Base prompt, AGENTS, Skills, Metadata, Tool definitions) with the locked Combined token burden taxonomy: two top-level surfaces — Combined System Prompt and Combined Tool Definitions — each decomposed into source-attributed child rows, with additive accounting (children sum to parents) and honest source attribution. The map is done when every decision needed to implement this test-first is resolved and the way to a TDD handoff is clear.
Notes
- Locked inputs — do not re-litigate: taxonomy in
docs/plans/2026-07-08-combined-token-burden-taxonomy.md; primary-source research indocs/research/pi-base-prompt-extension-contributions.md; domain language inCONTEXT.md(Combined System Prompt, Combined Tool Definitions, Budget Section, Source Trace). "Base prompt" / "Preamble" must not appear as user-facing taxonomy. - Skills every session should consult:
/grilling+/domain-modelingfor HITL tickets;tddfor the implementation handoff;codegraphbefore broad grep/read. - TDD is critical. Implementation is test-first. Tests currently lock the old labels (
Base prompt,Skills (N),Metadata (...),Tool definitions (...),SYSTEM.md / APPEND_SYSTEM.md) — seesrc/parser.test.ts,src/budget-table.test.ts,src/report-view.test.ts,src/e2e/*. - Additive accounting: counted child rows must sum to their parent;
totalTokens= Combined System Prompt + Combined Tool Definitions. - Honesty: if a source cannot be proven, use an honest fallback label; never guess. Provider
before_provider_requestrewrites are NOT visible viactx.getSystemPrompt()— out of scope. - Separate surfaces: tool prompt text (
promptSnippet/promptGuidelines) and tool schemas are different model-facing surfaces; never merge them. - Decision-depth delegation: for implementation-detail questions comparable to trace anchoring, internal naming, or evidence-bucket mapping, proceed with the agent’s evidence-backed recommendation without repeated confirmation. Continue to ask Will about user-facing behavior and product trade-offs.
Confirmed during charting (orientation; detail lives in the research tickets)
pi.getAllTools(): ToolInfo[]returnssourceInfoon every tool;sourceInfo.sourceisbuiltin(pi core),sdk(SDK/custom), orpackage/local/etc. (extensions). → Pi Core / SDK-Custom / Extension tool rows are computable exactly now. (Formalized in the "Confirm pi tool sourceInfo → row mapping" ticket.)pi.getActiveTools(): string[]returns active tool names → Inactive Available Tools computable now.- Tool prompt text is measurable from the literal prompt ("Available tools:" + "Guidelines:" bullets);
src/base-trace/base-lines.tsalready extracts these lines.
Decisions so far
-
Extension Prompt Additions accounting — use an honest non-counted Extension Prompt Additions row labeled Not separately measurable; 0 counted tokens; text is included in Pi Core Prompt upper bound rather than guessed.
-
Confirm pi tool sourceInfo → Combined Tool Definitions row mapping —
source === "builtin"→ Pi Core,=== "sdk"→ SDK/Custom, else → Extension Tools;sourceInfoalready on everyToolInfo; active = name ∈getActiveTools()(no active flag onsourceInfo). -
Baseline prompt / before_agent_start visibility for Extension Prompt Additions — not exactly measurable: baseline string is internal (no ctx accessor), per-extension deltas not exposed (full-replacement chain), no markers; before_provider_request confirmed separate. Extension Prompt Additions accounting should use an honest non-counted row; exact measurement needs a subprocess baseline-diff. Lever for Combined taxonomy data model and Base-span decomposition & DRY with trace:
ctx.getSystemPromptOptions()exposes structured baseline inputs. -
Combined taxonomy data model — use recursive
PromptSection.children?: PromptSection[],ParsedPrompt.surfacesfor the two top-level Budget Sections, preserveToolInfo["sourceInfo"]for tool grouping, and keep Tool Prompt Text separate from tool schemas with additive reconciliation invariants. -
Brute-force extension burden analysis — support optional deep extension analysis, but lead with structured source attribution; brute-force subprocess diffs are an explicit cached fallback for unexplained deltas, not the default foundation.
-
Base-span decomposition & DRY with trace — share literal prompt span extraction in a neutral module; measure Tool Prompt Text from exact prompt spans, Pi Core Prompt as the remainder, and reconcile with Prompt boundary overhead.
-
Two-surface drilldown & stacked-bar UX — use Variant A: overview stacked bar has only the two top-level surfaces; contributor bars appear inside surface drilldown; tools and skill-toggle become row capabilities in one recursive drilldown model.
-
Tool Envelope Overhead placement — show measurable schema tokens per tool, plus one separate counted Tool Envelope Overhead leaf under Combined Tool Definitions; never invent per-tool or per-source overhead allocations.
-
Trace repointing & Base→Combined rename boundary — Source Trace is a Tool Prompt Text row capability; internals use Source Trace naming; buckets preserve Pi Core, SDK/custom, per-extension, shared, and unattributed evidence honestly.
-
Label-coupling migration strategy — use a required semantic section-kind enum with centralized labels/capabilities; keep taxonomy labels stable, migrate through one temporary compatibility bridge, and deliver the redesign in eight confirmed vertical TDD slices.
-
Inactive Available Tools grouping — group inactive tools by the same non-empty Pi Core / Extension / SDK-Custom source taxonomy; reconcile schema-only counterfactual totals additively and exclude the entire branch from counted burden.
Not yet specified
None — all decisions required for the TDD handoff are resolved.
Out of scope
- Provider
before_provider_requestrewrites — not measurable viactx.getSystemPrompt(). (locked) - The "Actionable insights" milestone (trim suggestions when the budget is tight) — separate effort.
- TUI chrome / visual redesign beyond what the taxonomy requires.
Activity
Whamp commentedon Jul 9, 2026
🛑 Blocked-stop report (goal stalled on #12)
Per the goal's Blocked-stop clause, reporting the stall. No code changed. Goal stays active, not complete (2/8 closed).
Exact blocker
#12 (Combined taxonomy data model) is a HITL
wayfinder:grillingticket — its Q1–Q4 type decisions (hierarchy representation,sourceInfothreading, Tool Prompt Text separation, reconciliation invariants) are yours to make. You've been absent 53m / ~30 re-fires with zero engagement via any channel (issues, PRs, commits, comments — verified repo-wide). #13 is also HITL; #14–#17 are HITL and blocked-by-#12. No rule-compliant autonomous path exists.Attempted paths
PromptSection) in-session.Evidence gathered (research closed)
sourceInfo.source === "builtin"→ Pi Core Tools;=== "sdk"→ SDK/Custom Tools; any other value → Extension Tools. Active = names inpi.getActiveTools(); inactive = the rest. (sourceis free-form, not a closed enum.)before_agent_start) are not separately measurable — the baseline string is internal, per-extension deltas aren't exposed, no markers delimit extension text, andbefore_provider_requestmutates a separate payload (out of scope). Lever for Combined taxonomy data model #12/Base-span decomposition & DRY with trace #14:ctx.getSystemPromptOptions()exposes structured baseline inputs mapping to taxonomy rows.ToolInfois exported from pi's package root;SourceInfois not directly exported (type asToolInfo["sourceInfo"]). CurrentPromptSection.childrenis a non-recursiveChildRow[];TableItem.childrenis already recursive.Required input to unblock (any one)
PromptSection) to resume normal grilling → #12.2to authorize provisional-advance — relax grilling + blocked-stop so I decide Combined taxonomy data model #12–Label-coupling migration strategy #17 with evidence-backed agent choices you can override on return (types-only, cheap to revise).3to authorize closing the goal as blocked (2/8 closed).Recommendation: (a) if you're available now; otherwise (b) so progress can continue in your absence. I will not take (b)/(c) without your explicit authorization — the grilling skill and the blocked-stop clause reserve those to you.
Status
2/8 closed (#10, #11). Goal active, not complete. Holding with minimal one-line re-fire acknowledgements to bound token burn; periodic GitHub re-checks to catch your engagement.
Whamp commentedon Jul 10, 2026
Decision corpus published
Merged PR #31 checks in the previously omitted Wayfinder artifacts:
The checked-in corpus reconciles the early files with final decisions from #13, #14, #16, #18, #19, and #20. This does not implement or close map #9; the TDD implementation handoff remains open.
Whamp commentedon Jul 10, 2026
Wayfinding complete
The destination is reached: every decision required for the test-first implementation handoff is resolved, all eleven decision tickets are closed, Not yet specified is empty, and the checked-in decision corpus provides the implementation inputs.
Handoff:
Implementation itself remains outside this planning map and should begin through the repository's TDD workflow.