Skip to content

Split the monolithic builder prompt into an invariant core plus named packs (workload-adaptive harness, PR 1) #1216

Description

@anandgupta42

One 230-line prompt (packages/opencode/src/altimate/prompts/builder.txt) currently governs every workload: dbt engineering, data Q&A, interactive chat, headless runs. Every workload-specific need becomes another hand-scoped section in the same file, and no section can be measured or removed per workload.

Step 1 of the migration (per the internal workload-adaptive harness design):

  • Mechanically split builder.txt into an invariant core plus named pack fragments, with a compile-time assembler whose default output is byte-for-byte identical to today's file — identity asserted in a unit test against a pinned sha256, so the default path provably cannot change behavior.
  • Add an opt-in data-qa profile: the builder prompt minus the dbt-specific packs and the Pre-Execution Protocol pack. An internal 540-trial paired prompt ablation on a public benchmark measured no score effect from removing these on data-Q&A workloads (permutation p=0.74) and a 27.6% wall-clock reduction. The profile must be strictly opt-in — nothing selects it automatically.

Later steps (separate PRs): profile routing, pack ledger, protocol flags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions