Skip to content

sync: port upstream pstack c49b37a..4382e68 (Cursor to Hermes) - #6

Open
KennyUMN wants to merge 1 commit into
Cloeille:mainfrom
KennyUMN:sync/upstream-4382e68
Open

KennyUMN wants to merge 1 commit into
Cloeille:mainfrom
KennyUMN:sync/upstream-4382e68

Conversation

@KennyUMN

Copy link
Copy Markdown

Why

The fork last synced upstream at c49b37a (Oct 12). poteto has since landed 27 commits on cursor/plugins through 4382e68 (the /create-formal-verification-skill PR, #709). This ports what carries over to Hermes.

What changed

  • New skills: ketchup, sharpen, in-your-own-words, correct, create-formal-verification-skill, arena, poteto-help (with references/recipes.md).
  • Rewritten principles: attack-the-premise, fix-root-causes, make-operations-idempotent, migrate-callers-then-delete-legacy-apis, test-behavior-not-implementation, type-system-discipline, plus the poteto-mode principle index.
  • typescript-best-practices: a brand comes from a verifying type guard, never as.
  • shipping and both autopilot playbooks: upstream's verification economy is now "a verdict covers one patch, green CI covers one head", so a full swarm runs once at the code-ready head and later heads get a fresh verdict under the patch-id rule. Replies end with pstack:ketchup.
  • opening-a-pr: move a child PR onto trunk as its parent merges.
  • README skill table extended; plugin.yaml bumped 0.2.0 to 0.3.0.

Scope

Deliberately left out, because they have no Hermes counterpart:

  • The upstream "pick each subagent's reasoning level and fast or standard speed" sentences. delegate_task has no per-task model or effort field; both are config-level (delegation.model, delegation.reasoning_effort). The fork's own why skill already documents this.
  • Cursor-only machinery: cloud-VM owner lifecycle, Origin/Graphite (gt) forge commands, /loop, agent-transcripts/ paths, per-worktree candidate dirs.
  • make-bot-ui, which needs Cursor's routine webhook trigger, SendToUser secret cards, and [routine] wake envelopes.

Verification

  • python3 scripts/check_refs.py passes: 108 markdown files, 55 skills.
  • python3 scripts/check_version.py main passes.
  • Loaded through the real plugin registry: 55 skills register and serve, 55 /pstack:* slash commands.

Tradeoffs

arena implements model-family diversity by pinning delegation.model per batch and calling delegate_task once per family, restoring the pin at the end. The cleaner shape is a per-task model field on delegate_task; that is a Hermes core change, not a plugin one.

New skills: ketchup, sharpen, in-your-own-words, correct,
create-formal-verification-skill, arena, poteto-help (+ references).
Principle rewrites: attack-the-premise, fix-root-causes,
make-operations-idempotent, migrate-callers, test-behavior,
type-system-discipline. poteto-mode principle index updated.
ts-best-practices: brand via type guard. shipping + both autopilot
playbooks: verification economy and ketchup replies. opening-a-pr:
child retarget after parent merge.
Skipped as Cursor-only: per-subagent model/effort knobs, cloud VM
handling, /loop, Origin/gt machinery.
Version 0.2.0 -> 0.3.0.
Copilot AI balanced review requested due to automatic review settings October 18, 2026 08:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Cloeille Cloeille left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the careful port. The Scope section is good: dropping the per-subagent effort sentences and make-bot-ui is the right call for Hermes. This can't merge as is, though, because main moved under it.

Blocking

1. main already contains most of this sync, and resolving the conflicts naively would regress it.
While this PR was open, main got f828c1e (sync c49b37a..d457567) and 4f77c7d (bump to 0.3.0). That covers a newer upstream range than this PR (d457567 is past 4382e68). Against current main this branch has 4 conflicts (sharpen, in-your-own-words, principle-migrate-callers-then-delete-legacy-apis, principle-type-system-discipline). Because it branches from fe017f6, the diff against main also:

  • deletes skills/maintain-formal-verification-skill/SKILL.md,
  • removes step 9 of setup-pstack (the formal verification offer),
  • rewrites create-formal-verification-skill without the coverage record and sync commit, which maintain-formal-verification-skill reads (its steps 1, 3 and 6 depend on them), and points the hand-off at create-verification-skill instead.

Please rebase onto main and keep only what main lacks: arena, correct, ketchup, poteto-help (+ recipes), the shipping / autopilot-* / opening-a-pr playbook changes, the typescript-best-practices brand rule, the poteto-mode index lines, and the README rows. Keep main's versions of the principles and the formal verification skills unless upstream changed them after d457567.

2. Version check fails. python3 scripts/check_version.py origin/main → 0.3.0 must be greater than 0.3.0. New skills make it a minor bump, 0.4.0. Note that #7 also targets 0.4.0, so whichever lands second takes 0.5.0.

3. arena mutates profile-wide config mid-run. hermes config set delegation.model writes the profile config, which the gateway, cron jobs and any other session on the same profile also read. During an arena, their delegates silently switch model. If the run dies between Phase A and Phase F, the pin is never restored. The "loader invalidates its config cache on file change" claim is also not verified in the PR. Options, simplest first:

  • default to one family (same model N times, which the skill already allows) and make cross-family an explicit opt-in that warns about the shared config,
  • or keep the mechanism but require the restore to happen even on failure, and state the shared-profile side effect in the skill.

Either way, please show one real delegate_task run picking up a changed pin in the same session, or drop the cache sentence.

Non-blocking

  • arena uses /tmp/arena-<slug>/. Hermes gives each profile a scratch dir via TMPDIR; $TMPDIR/arena-<slug>/ avoids collisions between profiles.
  • Good catch fixing the ---name: first line in the files you touched. The same broken first line (---name: x instead of --- then name: x) is on almost every SKILL.md on main. That is a separate fix, not for this PR.
  • CI shows action_required (first-time contributor workflow approval), so no checks have run yet. A maintainer needs to approve the run after the rebase.

Checked: check_refs.py passes on the branch (108 files, 55 skills), descriptions are ≤60 chars, no em dashes in added lines, docs/guide/* links in poteto-help resolve.

🤖 AI Agent: Madeleine

@Cloeille

Copy link
Copy Markdown
Owner

Follow-up after a second, independent pass. One correction to my first review, then the additions.

Correction. The arena sentence "the loader invalidates its config cache on file change" holds on Hermes v0.21.5: the config read is keyed on the file's mtime/size/inode, so a pin set mid-session is picked up by the next delegate_task. Keep it. The shared-config concern stands, and it is wider than I said: a top-level delegate_task runs in the background in chat and gateway sessions, so the agent ends its turn between phases and the foreign pin sits in the profile's config.yaml across turns. Children read the model at spawn time, so the fix is pin, spawn, restore right after the call returns (and config unset when the original value was empty).

Rebase scope grew. main is now 0.3.1 (#8, #9 landed). Against current main there are 10 conflicts, including plugin.yaml and 5 principle-* files. #8 also fixed the ---name: frontmatter, so keep main's frontmatter everywhere.

Content to fix after the rebase

  • arena Phase B: "Run foreground (the default) so the call blocks" is false for interactive and gateway sessions. Say: end the turn, resume on the completion message, don't poll.
  • arena: hermes model is an interactive picker, not a listing. Read hermes config get model or the provider's model list instead. Use $TMPDIR/arena-<slug>/, not /tmp.
  • poteto-help: routes to things that don't exist in this fork: "Pause safely", "the Prototype playbook", "The Playbooks section of poteto-mode" (the section is PLAYBOOK ROUTING and lists 6 of 17 playbooks). "There is no /loop" is wrong on current Hermes, which has /loop. "There is no bare /how command" is wrong when skills.external_dirs is set, as the same file instructs.
  • shipping step 5 / autopilot: "cronjob in dynamic mode" doesn't exist. Use an interval schedule with a self-contained prompt, armed by the root (children can't call cronjob).
  • Autopilot "each tick re-reads this playbook from trunk": the playbook is a plugin file, not in the user's trunk. Use skill_view(name='pstack:poteto-mode', file_path='playbooks/<name>.md').
  • The PR body says Origin commands were left out, but origin pr … is still in shipping, opening-a-pr and autopilot-stack. Either prune or fix the body.
  • opening-a-pr.md still has bare /no-comments, /technical-writing, /unslop and a Cursor "Multiple Task calls … git worktree" line. AGENTS.md wants pstack:<name>.

Pre-existing on main, not this PR's job: babysit.md references scripts/watch-pr/watch-pr and ../references/bugbot-triage.md, which don't exist. check_refs.py doesn't catch it.

🤖 AI Agent: Madeleine

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.

4 participants