Repository navigation
refactor(adapters): move feature usage out of the resident bootstrap - #46
Merged
Merged
Conversation
The resident bootstrap had grown about 35% since the September simplification, mostly from feature usage text that only governed or feature-specific sessions need. Keep invariants and one-line triggers in the bootstrap and move the rest to where it is read on demand: - Context index reading protocol now lives only in the mode entries; the bootstrap keeps the entry command and the post-compaction refresh rule. - Progress page usage moves to `mancode progress --help`, marked as operator-requested only. - Secrets usage moves to `mancode secret --help`; the bootstrap keeps the never-in-chat / no-plaintext invariant. The help also states that only the operator sets secrets and approves actions. - UI guidance merges into one bullet that keeps the emoji content exception, the no-emoji fallback rule and the "broad adjectives are not a selected direction" rule; details come from `mancode design context`. Add a guidance budget contract test (cl100k token caps per platform and entry) as a ratchet: growth fails until the fixture is edited explicitly. Codex bootstrap: 2530 -> 1947 tokens. Behavioural A/B on four scenarios (Claude haiku/sonnet via subagents, GPT-6 via Codex) found no regression; the baseline progress text caused one unrequested `progress init`, which the new wording removes.
1 task done
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The resident bootstrap (loaded into every agent session) grew ~35% after the September simplification, mostly from feature-specific usage text. This PR keeps invariants and one-line triggers in the bootstrap and moves the rest to where it is read on demand.
mancode progress --help, marked operator-requested only.mancode secret --help; bootstrap keeps the never-in-chat / no-plaintext invariant. Help states only the operator sets secrets and approves actions.mancode design context.tests/adapter-guidance-budget-contracts.test.tscaps cl100k tokens per platform and entry (tests/fixtures/guidance-budget.json). It is a ratchet and review trigger, not a quality metric.docs/platform-adapters.mddescribes where each kind of rule now lives.Codex bootstrap: 2530 → 1947 tokens (−23%). Mode entries: about −100 each (progress text removed). The
manentry (~7.7k) is not touched here.Behavioural check
Blind A/B of baseline (
77fb169) vs this branch on four scenarios: ordinary Solo edit, task needing a secret, "make it modern and clean" UI request, resuming an existing TaskRef. Scored mechanically from final project state and tool-call logs.CLAUDE.md): 16/16 pass.progress init/progress refresh(GPT-6, S4). This branch did not.secret --help, two reruns did not.Limits: one or two runs per cell, Claude side emulated via subagents, post-compaction behaviour not tested.
Test plan
npx tsc --noEmit,npx biome check src testsvitest run: 1744 passed. 2 failures are pre-existing onmainand unrelated:man-delivery5s timeout (~590 git subprocesses per test), and a macOS-onlysecretsexecutor bug where a secondkillreturnsEPERMand overwritesOUTPUT_LIMIT(src/secrets/run.ts). CI runs ubuntu only, so neither shows there.Notes
staleafter release and needadapter upgrade. Plan is to release this together with the upcomingmanentry slimming so users upgrade once.experiment/cli-recovery-hints(stacked on this branch, no PR yet) addserror.recoveryhints forMANCODE_TASK_REQUIRED/MANCODE_SESSION_REQUIRED. It waits on hints formigrate,upgradeandinstall.