Skip to content

refactor(skills): port pstack's token distill pass - #17

Merged
phob merged 1 commit into
mainfrom
refactor/distill-from-pstack
Oct 11, 2026
Merged

phob merged 1 commit into
mainfrom
refactor/distill-from-pstack

Conversation

@phob

@phob phob commented Oct 11, 2026

Copy link
Copy Markdown
Owner

Ports upstream's "distill skill prompts to cut tokens" pass (cursor/plugins#538) to the 35 matching p3-stack files: 690 lines out, 376 in. Upstream merged sentences, folded bullet lists into prose, cut restatements, and shortened descriptions. Rules stay the same. Biggest cuts: why 155→97 lines, interrogate 105→70, arena 70→47, the why epistemics reference 144→71.

How it was merged. Our files had drifted from upstream through the T3 port and #5–#14, so a plain patch wouldn't apply. I ran git merge-file against upstream's before and after versions of each file:

  • 18 files merged cleanly. 12 of them were still byte-identical to upstream's before-version.
  • 8 small conflicts I resolved by hand. I kept the T3 wording where upstream's text named Cursor tools.
  • 9 large conflicts went to Opus workers, one file each. Each worker got upstream's before-and-after versions, the merged file with its conflicts, and the list of T3 rules to keep.

Deliberate differences from upstream:

  • figure-it-out stays model-invocable. Upstream flagged it typed-only, but p3-mode routes to it through the Skill tool, which refuses flagged skills.
  • architect and the why synthesizer prompt keep the parts of their briefs that inline file content. A T3 child agent gets only its brief and can't resolve a relative path.
  • p3-mode's principle index now uses upstream's rule: the file is the title in kebab case, unless the entry names its file. All 24 principles resolve under that rule.

Proof:

  • Preservation check. A script compared every file against its pre-distill version. Every T3 tool name, p3-models.md role line, references/ path, and principle link survived. The one exception is the explain-the-number link in benchmark-checklist, which upstream dropped too.
  • Rule phrases. The phrases from fix(p3-mode): drain delegates on wake, not by polling task_status #5–fix(swarm): never swap a rejected model-race arm #14 are still in p3-mode: stale-key warning, own every wake, inbox honest, render what prose can't carry, and plan-mode read-only.
  • Hygiene. No conflict markers, no CRLF line endings, no Cursor terms.
  • Gate. scripts/verify-routing.ps1 -StaticOnly passes.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ca14bd31-f21c-42d2-b7d4-7b81dfb57f85

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@phob
phob merged commit c8427ec into main Oct 11, 2026
@phob
phob deleted the refactor/distill-from-pstack branch October 11, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant