Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions docs/upstream-review-budget-and-pruning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Budget, prompt pruning, and verification reuse

This change ports the reasoning-budget selection from
[pstack #366](https://github.com/cursor/plugins/pull/366), prompt pruning from
[#414](https://github.com/cursor/plugins/pull/414) and
[#419](https://github.com/cursor/plugins/pull/419), and the shipping build-output
exception present at
[`12d587df`](https://github.com/cursor/plugins/commit/12d587dfb20741cafc376c42c696c5f6e2a64487).
It builds on the priority workflow ports. Source pins remain unchanged because
this is a selective adaptation, not a full upstream sync.

## Reasoning budget

`model-budget.mjs` previews or applies effort-suffix rewrites using a JSON array
of model names detected by the selected Harness. `unlimited` keeps current
efforts. `large`, `medium`, and `small` target `xhigh`, `high`, and `medium`.
The command preserves model stem, version, trailing `-fast`, and aliases. When
the target variant is missing, it selects the highest detected lower effort
of that exact stem, rather than substituting a different model.

The command writes only the selected Harness's overrides and budget label.
It preserves defaults, other Harnesses, and unrelated fields. Unresolved
models or duplicate reviewer entries reject the whole write. Repeating an
already-applied mapping does not rewrite the configuration. `unlimited` does
not restore an earlier effort level; choosing a larger bounded budget can
raise the effort to a detected variant.

A model without an effort suffix needs an explicit model choice or the
Harness's separate reasoning setting. Aliases are preserved, so their effort
remains under the Harness's control. The budget label is not a spending cap.
No provider defaults or automatic model-family fallback are introduced.

## Prompt pruning

The port removes repeated review, verification, sequencing, and writing
instructions identified by upstream as unnecessary for Opus 5.5. The changes
cover blast-radius, figure-it-out, interrogate references, feature and bug-fix
playbooks, refactoring, pause-safely, TDD, writing skills, and the affected
principles. Reflect's fixed finding count was removed in the priority port.

The canonical instructions are shorter for all supported Harnesses, not only
Opus. Runtime proof requirements, evidence-based findings, human authorization
boundaries, and source integrity checks remain. No behavioral evaluation of
other models establishes that the removed reminders are redundant for them;
that is a review risk of accepting this shared-tree change.

## Shipping exception

Shipping links a procedure for reusing individual lane results after changes
limited to tests, docs, or lint config. Two builds at the verdict SHA establish
noise; one at the current head establishes the comparison. Each accepted
difference needs evidence. A substantive difference in a noisy file still
requires a rerun. Dev servers, missing saved build output, runtime inputs, and
inconclusive comparisons do not qualify. CI, mergeability, and review run fresh.

Autopilot verdict language points to that rule rather than requiring an
unchanged patch ID in every case. Orchestrate's SHA-keyed ledger remains
strict; it has no build-output reuse implementation.

The exception is an agent-facing procedure, not an automatic classifier.
Repository tests prove model-budget CLI behavior and packaging integrity, not
that a model correctly classifies build noise or follows the shortened prompts.
46 changes: 46 additions & 0 deletions docs/upstream-review-priority.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Priority workflow ports

This change selectively ports workflow fixes from pstack at
[`12d587df`](https://github.com/cursor/plugins/commit/12d587dfb20741cafc376c42c696c5f6e2a64487).
The source pins remain unchanged because model defaults, prompt pruning, and
verification reuse belong to a separate review. Target digests record these
reviewed adaptations against the existing pinned sources.

## Owner lifecycle

An autopilot owner's full-lifecycle brief authorizes babysitting. Ordinary
PR-opening workers still return without starting a watch. Independent
babysitters report conflicts to the topology owner. Autopilot-full owners
control their own branches; the Autopilot-stack root controls stack topology.

A code-ready report starts independent verification while self-proof, CI, and
babysitting continue. Merge-ready or STACK-READY reports include receipts and
the exact SHA. Each patch-changing push starts a new round. Merge preparation
requires current-head CI and the verdict checks in the shipping playbook.

Owners record delegated children. Replacement work uses isolated write targets
unless the old writer's access has been revoked. Audit ticks continue until all
delegated work is finished, and chat updates report only previously unreported
changes.

## Evidence and logs

Verification results identify the commit SHAs named in the brief. Measurement
results also identify sample count, sample definition, and execution order.
Missing attribution causes one retry, then an explicit gap rather than a pass.
Workers report every proven defect.

Decision trails remain append-only across handoffs. A `start` row identifies a
new run and the preceding rows it did not write. Each run audits its own
stretches and corrects inaccurate records with a superseding row. The portable
Node logger already creates new files exclusively; the upstream Bash header
append fix does not replace it.

Reflect reviewers report evidence-backed learnings without a required count.

## Verification boundary

The repository tests validate packaging, installation, skill integrity, and
source baselines. They do not prove that a future model will follow these
instructions. Review the owner and babysitter boundary together when changing
this workflow.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"audit-context": "node scripts/audit-context.mjs",
"check-package": "node scripts/check-package.mjs",
"check-models": "node scripts/model-config.mjs",
"model-budget": "node scripts/model-budget.mjs",
"check-upstream": "node scripts/check-upstream.mjs",
"check-harness-policy": "node scripts/check-harness-policy.mjs",
"skill-baseline": "node scripts/skill-baseline.mjs",
Expand All @@ -28,7 +29,7 @@
"install-skills": "node scripts/install.mjs",
"optimize-context": "node scripts/optimize-context.mjs",
"reconcile-context": "node scripts/reconcile-context.mjs",
"test": "node scripts/validate.mjs && node scripts/skill-baseline.mjs --check && node --test scripts/install.test.mjs scripts/install-migration.test.mjs scripts/migration-integration.test.mjs scripts/skill-discovery.test.mjs scripts/harness-targets.test.mjs scripts/remote-discovery.test.mjs scripts/context.test.mjs scripts/model-config.test.mjs scripts/audit-context.test.mjs scripts/worktree-audit.test.mjs scripts/sync-upstream.test.mjs scripts/runtime.test.mjs scripts/environment.test.mjs scripts/skill-integrity.test.mjs scripts/skill-baseline.test.mjs scripts/version-integrity.test.mjs scripts/agent-format.test.mjs scripts/history.test.mjs scripts/harness-policy.test.mjs scripts/harness-project.test.mjs scripts/check-upstream-adaptations.test.mjs"
"test": "node scripts/validate.mjs && node scripts/skill-baseline.mjs --check && node --test scripts/install.test.mjs scripts/install-migration.test.mjs scripts/migration-integration.test.mjs scripts/skill-discovery.test.mjs scripts/harness-targets.test.mjs scripts/remote-discovery.test.mjs scripts/context.test.mjs scripts/model-config.test.mjs scripts/model-budget.test.mjs scripts/audit-context.test.mjs scripts/worktree-audit.test.mjs scripts/sync-upstream.test.mjs scripts/runtime.test.mjs scripts/environment.test.mjs scripts/skill-integrity.test.mjs scripts/skill-baseline.test.mjs scripts/version-integrity.test.mjs scripts/agent-format.test.mjs scripts/history.test.mjs scripts/harness-policy.test.mjs scripts/harness-project.test.mjs scripts/check-upstream-adaptations.test.mjs"
},
"bin": {
"mstack": "scripts/install.mjs",
Expand Down
Loading
Loading