Skip to content

fix(hooks): make pstack opt-in on Claude Code - #19

Merged
thisguymartin merged 1 commit into
mainfrom
fix/pstack-opt-in
Oct 2, 2026
Merged

thisguymartin merged 1 commit into
mainfrom
fix/pstack-opt-in

Conversation

@thisguymartin

Copy link
Copy Markdown
Owner

Closes #18

What changed

  • plugins/pstack/hooks/session-start-context.md replaces the auto-fire mandate with an opt-in gate. Claude invokes a pstack:* skill only when the user types /pstack:<name>, names pstack or one of its skills, or keeps a standing CLAUDE.md or AGENTS.md instruction for it. A pstack skill the user started keeps routing to the skills it needs, and dispatched subagents follow their dispatch prompt.
  • The gate also covers skills whose descriptions ask for automatic use (unslop, typescript-best-practices). It does not add disable-model-invocation, which would block poteto-mode from invoking them.
  • Docs: README.md, docs/reference.md, docs/USAGE.md, NOTICE.md, CHANGES.md, and UPSTREAM-FLEX.md describe the opt-in behavior, the CLAUDE.md line that restores always-on routing, and the new fork-owned conflict surface.
  • Codex has no plugin hook runtime, so only its docs change.

Verification

  • Bun tests, strict typecheck, static invariants, and plugin validation pass.
  • The exact candidate is installed in every affected harness.
  • The changed behavior passes from each real user surface.
  • The installed version, action, and observed result appear below.

Local gate: bun run test 198 pass, 0 fail. bun run typecheck clean. Manifest JSON parse ok. PSTACK_STATIC_ONLY=1 bash tests/skill-collision-repro.sh all ok. claude plugin validate plugins/pstack passed.

Pre-install headless probes (claude -p, Claude Code 2.1.287, scratch repo with a total() that ignores qty):

Plugin Prompt First pstack Skill call
Installed 1.4.1 (old mandate) Fix the qty bug, add a test pstack:tdd
This branch via --plugin-dir Same none; edited cart.ts directly
This branch via --plugin-dir Add discount codes (2 runs) none in either run
This branch via --plugin-dir "Use pstack for this." + qty bug pstack:poteto-mode, then read playbooks/bug-fix.md

Live evidence:

Pending.

A pull request without live evidence remains a draft. Do not merge, tag, release, or roll it out.

Replace the SessionStart mandate that routed every non-trivial task
into poteto-mode with an opt-in gate. Claude invokes a pstack skill
only when the user types /pstack:<name>, names pstack or one of its
skills, or keeps a standing CLAUDE.md or AGENTS.md instruction. A
started pstack skill keeps routing internally, and dispatched
subagents follow their dispatch prompt.

Closes #18
@thisguymartin
thisguymartin marked this pull request as ready for review October 2, 2026 04:04
@thisguymartin
thisguymartin merged commit 7a8d534 into main Oct 2, 2026
1 check passed
@thisguymartin
thisguymartin deleted the fix/pstack-opt-in branch October 3, 2026 19:51
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.

Make pstack opt-in on Claude Code instead of auto-firing poteto-mode

1 participant