Skip to content

Architecture Decision Records ​

The decisions that shape this project. Each ADR records the context, the chosen option, and the options that were considered.

ADRDecision
0001Embed codegraph in-process, not via daemon or CLI.
0002Per-worktree index, seeded from a sibling worktree.
0003Named project roots for dependency sources.
0004Context window cap via provider re-registration.
0005Quota extension refreshes the ChatGPT token itself.
0006Model router resumes a quota-halted turn with a synthetic user message.
0007Sync authenticates with the OAuth device flow and expiring tokens.
0008Usage reports are derived from session files, not a stored index.
0009Usage events are counted once, keyed by the full session line.
0010Gist names percent-encode sync paths, and empty files are absent.
0011Pruning is a request-level projection; the session file is the store.
0012Resource toggles write the native settings override patterns.
0013The skill tree tracks upstream sources with per-source pins.
0014Tool usage counts are derived from a session scan with a per-file stat-keyed cache.
0015Compression is a request-time view; the compressed form is text.
0016Dependency indexes build on first query, with streamed progress.
0017Docs screenshots render by a capture pipeline; none is taken by hand.
0018Pruning engagement is sticky for the session; it holds until a reset.
0019The fallback window self-heals via a one-shot re-resolution after the model's wake.
0020Edit assist corrects failing edit calls by mutating tool input; it never writes files.
0021/ctx shows the default base prompt as split rows: boilerplate, snippets, one row per guideline.
0022/ctx flags guidelines that largely restate a sent tool description, with a conservative substring rule.
0023Background jobs keep state on disk, per job: the exit code is written by a shell wrapper, and the tools are active by default.
0024The bash_bg tool row shows the plain command line, with no background marker.
0025The Safe branch summary replaces the built-in branch summarizer and budgets against the Effective window divided by the Inflation factor.
0026Output limits bounds tool results downward in the tool_result hook; it is one-directional and lossless or it does not cut.
0027Llama refresh heals any window drift by comparing the catalog before and after one forced refresh, at two fixed heal moments; the fallback sentinel is no longer the gate.
0028The output-starvation guard judges one request's output budget against the Effective window, keyed on pi's own clamp: it refuses a budget at pi's saturated floor (one line and the run's abort, at most once per turn), and it fits an overrunning budget to the room the Corrected estimate leaves. The guard never raises a budget.
0029Package toggles write the packages-array filter, not resource-array patterns; the old resource-array write is a no-op that heals itself on the next toggle.
0030Resource descriptions are read from the source file: frontmatter for a skill or prompt template, the leading block comment for an extension, nothing for a theme.
0031A same-model re-select is read from the transcript's model_change entry at the next turn start, with a self-guard so the extension's own re-apply never re-arms itself.
0032skill-migrate runs sequential repo-structure migrations; each target repo commits an append-only changelog that audits every completed step, and git is the rollback layer.
0033Skill command rewrites a newline-separated /skill: command to the single-space form in the input event; pi keeps owning the expansion.
0034The vendored antislop core is edited in two places only: its self-install and self-update sections are cut, and an unresolved usage mode defaults to during instead of asking.