pi-pstack-workflow-kit 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +146 -2
  3. package/agents/ci-watcher.md +1 -0
  4. package/agents/comment-sicko.md +1 -0
  5. package/agents/poteto-agent.md +1 -0
  6. package/agents/quality-agent.md +1 -0
  7. package/agents/worker.md +3 -0
  8. package/lib/catalog-data.json +560 -0
  9. package/lib/catalog.ts +160 -0
  10. package/lib/jobs.ts +5 -0
  11. package/lib/models.ts +125 -0
  12. package/lib/pool.ts +27 -0
  13. package/lib/state.ts +127 -0
  14. package/lib/transcript.ts +48 -0
  15. package/lib/validation.ts +16 -0
  16. package/package.json +65 -4
  17. package/reference/GAPS.md +21 -0
  18. package/reference/PARITY.md +169 -0
  19. package/reference/benny/config.example.json +12 -0
  20. package/reference/benny/repro.md +3 -0
  21. package/reference/benny/setup.md +3 -0
  22. package/reference/benny/triage.md +3 -0
  23. package/reference/parity.json +3095 -0
  24. package/reference/rules/no-inline-imports.md +3 -0
  25. package/reference/rules/typescript-exhaustive-switch.md +3 -0
  26. package/reference/source-map.json +8594 -0
  27. package/scripts/job-input.ts +190 -0
  28. package/scripts/run-job.mjs +121 -0
  29. package/skills/architect/SKILL.md +16 -0
  30. package/skills/arena/SKILL.md +16 -0
  31. package/skills/automate-me/SKILL.md +10 -0
  32. package/skills/benchmark-checklist/SKILL.md +10 -0
  33. package/skills/blast-radius/SKILL.md +10 -0
  34. package/skills/bro/SKILL.md +10 -0
  35. package/skills/check-compiler-errors/SKILL.md +10 -0
  36. package/skills/control-cli/SKILL.md +10 -0
  37. package/skills/control-ui/SKILL.md +10 -0
  38. package/skills/correct/SKILL.md +10 -0
  39. package/skills/create-formal-verification-skill/SKILL.md +16 -0
  40. package/skills/create-verification-skill/SKILL.md +16 -0
  41. package/skills/deslop/SKILL.md +10 -0
  42. package/skills/figure-it-out/SKILL.md +17 -0
  43. package/skills/fix-ci/SKILL.md +10 -0
  44. package/skills/fix-merge-conflicts/SKILL.md +10 -0
  45. package/skills/get-pr-comments/SKILL.md +10 -0
  46. package/skills/how/SKILL.md +10 -0
  47. package/skills/in-your-own-words/SKILL.md +11 -0
  48. package/skills/interrogate/SKILL.md +17 -0
  49. package/skills/ketchup/SKILL.md +10 -0
  50. package/skills/ketchup-video/SKILL.md +10 -0
  51. package/skills/loop-on-ci/SKILL.md +10 -0
  52. package/skills/maintain-formal-verification-skill/SKILL.md +16 -0
  53. package/skills/maintain-verification-skill/SKILL.md +16 -0
  54. package/skills/make-bot-ui/SKILL.md +10 -0
  55. package/skills/make-pr-easy-to-review/SKILL.md +10 -0
  56. package/skills/new-branch-and-pr/SKILL.md +10 -0
  57. package/skills/no-comments/SKILL.md +16 -0
  58. package/skills/poteto-help/SKILL.md +11 -0
  59. package/skills/poteto-mode/SKILL.md +60 -0
  60. package/skills/poteto-mode/playbooks/authoring-a-skill.md +20 -0
  61. package/skills/poteto-mode/playbooks/autonomous-run.md +20 -0
  62. package/skills/poteto-mode/playbooks/autopilot-full.md +25 -0
  63. package/skills/poteto-mode/playbooks/autopilot-stack.md +20 -0
  64. package/skills/poteto-mode/playbooks/babysit.md +21 -0
  65. package/skills/poteto-mode/playbooks/bug-fix.md +26 -0
  66. package/skills/poteto-mode/playbooks/eval.md +20 -0
  67. package/skills/poteto-mode/playbooks/feature.md +26 -0
  68. package/skills/poteto-mode/playbooks/hillclimb.md +24 -0
  69. package/skills/poteto-mode/playbooks/investigation.md +19 -0
  70. package/skills/poteto-mode/playbooks/multi-phase-plan.md +19 -0
  71. package/skills/poteto-mode/playbooks/opening-a-pr.md +20 -0
  72. package/skills/poteto-mode/playbooks/pause-safely.md +18 -0
  73. package/skills/poteto-mode/playbooks/perf-issue.md +24 -0
  74. package/skills/poteto-mode/playbooks/prototype.md +21 -0
  75. package/skills/poteto-mode/playbooks/refactoring.md +23 -0
  76. package/skills/poteto-mode/playbooks/runtime-forensics.md +20 -0
  77. package/skills/poteto-mode/playbooks/session-pickup.md +20 -0
  78. package/skills/poteto-mode/playbooks/shipping.md +24 -0
  79. package/skills/poteto-mode/playbooks/trace-forensics.md +20 -0
  80. package/skills/poteto-mode/playbooks/visual-parity.md +22 -0
  81. package/skills/poteto-mode/playbooks/worktree-cleanup.md +19 -0
  82. package/skills/pr-review-canvas/SKILL.md +10 -0
  83. package/skills/principle-attack-the-premise/SKILL.md +12 -0
  84. package/skills/principle-boundary-discipline/SKILL.md +12 -0
  85. package/skills/principle-build-the-lever/SKILL.md +12 -0
  86. package/skills/principle-encode-lessons-in-structure/SKILL.md +12 -0
  87. package/skills/principle-exhaust-the-design-space/SKILL.md +12 -0
  88. package/skills/principle-experience-first/SKILL.md +12 -0
  89. package/skills/principle-explain-the-number/SKILL.md +12 -0
  90. package/skills/principle-fix-root-causes/SKILL.md +12 -0
  91. package/skills/principle-foundational-thinking/SKILL.md +12 -0
  92. package/skills/principle-guard-the-context-window/SKILL.md +12 -0
  93. package/skills/principle-laziness-protocol/SKILL.md +12 -0
  94. package/skills/principle-make-operations-idempotent/SKILL.md +12 -0
  95. package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +12 -0
  96. package/skills/principle-minimize-reader-load/SKILL.md +12 -0
  97. package/skills/principle-model-the-domain/SKILL.md +12 -0
  98. package/skills/principle-never-block-on-the-human/SKILL.md +12 -0
  99. package/skills/principle-outcome-oriented-execution/SKILL.md +12 -0
  100. package/skills/principle-prove-it-works/SKILL.md +12 -0
  101. package/skills/principle-redesign-from-first-principles/SKILL.md +12 -0
  102. package/skills/principle-separate-before-serializing-shared-state/SKILL.md +12 -0
  103. package/skills/principle-sequence-verifiable-units/SKILL.md +12 -0
  104. package/skills/principle-subtract-before-you-add/SKILL.md +12 -0
  105. package/skills/principle-test-behavior-not-implementation/SKILL.md +12 -0
  106. package/skills/principle-type-system-discipline/SKILL.md +12 -0
  107. package/skills/recall/SKILL.md +10 -0
  108. package/skills/reflect/SKILL.md +10 -0
  109. package/skills/review-and-ship/SKILL.md +10 -0
  110. package/skills/run-smoke-tests/SKILL.md +10 -0
  111. package/skills/setup-pstack/SKILL.md +17 -0
  112. package/skills/sharpen/SKILL.md +11 -0
  113. package/skills/show-me-your-work/SKILL.md +16 -0
  114. package/skills/statechart/SKILL.md +10 -0
  115. package/skills/swarm/SKILL.md +16 -0
  116. package/skills/tdd/SKILL.md +10 -0
  117. package/skills/teach/SKILL.md +17 -0
  118. package/skills/technical-writing/SKILL.md +10 -0
  119. package/skills/thermo-nuclear-code-quality-review/SKILL.md +10 -0
  120. package/skills/typescript-best-practices/SKILL.md +10 -0
  121. package/skills/unslop/SKILL.md +10 -0
  122. package/skills/verify-this/SKILL.md +17 -0
  123. package/skills/weekly-review/SKILL.md +10 -0
  124. package/skills/what-did-i-get-done/SKILL.md +10 -0
  125. package/skills/why/SKILL.md +10 -0
  126. package/skills/workflow-from-chats/SKILL.md +10 -0
  127. package/src/catalog-ui.ts +86 -0
  128. package/src/delegate.ts +367 -0
  129. package/src/forge.ts +246 -0
  130. package/src/git.ts +28 -0
  131. package/src/index.ts +25 -0
  132. package/src/models.ts +189 -0
  133. package/src/parent-diff.ts +64 -0
  134. package/src/plan.ts +181 -0
  135. package/src/records.ts +85 -0
  136. package/src/session.ts +124 -0
  137. package/src/support.ts +47 -0
  138. package/src/worktrees.ts +188 -0
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: make-bot-ui
3
+ description: "Create a dashboard or page that wakes a Grok Bot via webhook. Use when: When you need a UI trigger for an existing Grok Bot integration."
4
+ ---
5
+
6
+ # make-bot-ui
7
+
8
+ Only when an existing Grok Bot integration is configured, inspect its webhook contract and Tailscale connectivity. Use a server-side secret, no browser-exposed sender key; build and verify a trigger UI against a safe target. Pi does not provide the bot service.
9
+
10
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: make-pr-easy-to-review
3
+ description: "Improve PR history, descriptions and guidance. Use when: When preparing a noisy PR for a reviewer."
4
+ ---
5
+
6
+ # make-pr-easy-to-review
7
+
8
+ Inspect PR history and diff. Group logical changes, write a clear why and review order. Do not rewrite or force-push shared history without approval.
9
+
10
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: new-branch-and-pr
3
+ description: "Create a branch, complete work and open a PR. Use when: When selecting Team Kit\u2019s independent branch-to-PR workflow."
4
+ ---
5
+
6
+ # new-branch-and-pr
7
+
8
+ Start from the agreed target branch in an isolated worktree, preserve unrelated work, implement and verify scope, commit and open a PR when authorized.
9
+
10
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: no-comments
3
+ description: "Remove unnecessary comments before review. Use when: After implementation and before review."
4
+ ---
5
+
6
+ # no-comments
7
+
8
+ Run `pstack_delegate` mode single, role `comment-sicko`, read-only, on the actual diff or saved diff artifact. Review findings and delete unnecessary comments; retain constraints that cannot be expressed in code. Verify behavior after changes.
9
+
10
+ ## Conditional relationships
11
+
12
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
13
+
14
+ - `agent-comment`: review comments. review comments
15
+
16
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: poteto-help
3
+ description: "Find the right pstack workflow and a prompt to use. Use when: When new to pstack or unsure which skill or playbook fits. Explicit invocation."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # poteto-help
8
+
9
+ Read the router playbook triggers using `pstack_catalog` action `routes`. Return a concrete goal and completion predicate prompt and the matching workflow; do not execute it. Mention persistent `/poteto-mode on` only when useful.
10
+
11
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: poteto-mode
3
+ description: "The main engineering workflow router. Use when: Start any nontrivial engineering task; explicitly attach the skill or use it as a Custom Mode."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # poteto-mode
8
+
9
+ The receiving Pi session owns execution. Restate the goal, name the smallest change and acceptance predicate, then select a playbook by its trigger using `pstack_catalog` with action `routes`. Call `pstack_plan` with action `start`, the selected route ID and goal. It loads the playbook and creates ordered tasks. For ambiguous, broad, cross-cutting or unattended work select `figure-it-out` instead of forcing a match. Use `pstack_plan` to start, update and finish tasks with evidence; do not mark a task done merely because a worker says so.
10
+
11
+ Read the specific principle skill before using it; name the decision it changed. Use architect for boundary changes, swarm for independent work, arena for competing designs, interrogate for disputed changes, unslop for prose, technical-writing for docs, no-comments before review, deslop before commit, control-ui or control-cli on the matching real interface, benchmark-checklist before trusting numbers and show-me-your-work for extended work. Use `pstack_delegate` for fresh direct workers. Never let a delegate become the playbook coordinator. Do not run all relationships unconditionally. Respect the user's explicit scope and approval boundaries. In a persistent session, a new task gets a new route. Read the route file in full; the graph is not the execution order.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `models`: reads role choices. When choosing a delegate model
18
+ - `agent-poteto`: direct delegate. For direct Task calls, unless routed skill sets its own type
19
+ - `worker`: kickoff contract. Each Task or Project worker starts by reading worker.md
20
+ - `principles`: trigger index. Read applicable leaf files before using the principle
21
+ - `playbooks`: selects playbook. After matching the task; receiving chat owns the steps
22
+ - `figure-it-out`: large or unmatched. When a narrower playbook does not fit
23
+ - `architect`: boundary change. When changing a function boundary
24
+ - `swarm`: fan-out. When splitting independent work
25
+ - `arena`: bakeoff. When comparing competing designs
26
+ - `interrogate`: contested design. When an important decision needs adversarial proof
27
+ - `unslop`: prose. When writing prose or replies
28
+ - `technical-writing`: docs and PRs. When writing docs or PR descriptions
29
+ - `no-comments`: before review. When preparing a diff for review
30
+ - `kit-deslop`: before commit. Direct Team Kit dependency
31
+ - `kit-control-ui`: ship UI or IDE. Direct Team Kit dependency; only when this is the real surface
32
+ - `kit-control-cli`: ship CLI / TUI. Direct Team Kit dependency; only when this is the real surface
33
+ - `benchmark-checklist`: measured number. Before trusting a measured result
34
+ - `show-me-your-work`: long run. When work is unattended or long
35
+ - `team-kit`: uses named skills. External conditional dependencies; not the entire kit
36
+ - `delegates`: delegate contract. Direct delegates read worker.md and the router
37
+ - `pb-investigation`: routes when matched. Question about mechanics, motivation or a recommendation.
38
+ - `pb-bug-fix`: routes when matched. A real defect or regression.
39
+ - `pb-perf-issue`: routes when matched. Latency, throughput or another measured slowdown.
40
+ - `pb-hillclimb`: routes when matched. Sustained scientific improvement toward a fixed metric target.
41
+ - `pb-runtime-forensics`: routes when matched. Leak, idle CPU spin or visual glitch.
42
+ - `pb-trace-forensics`: routes when matched. A trace, heap snapshot or profiling artifact.
43
+ - `pb-feature`: routes when matched. A new feature or changed behavior.
44
+ - `pb-refactoring`: routes when matched. A structural change without behavior change.
45
+ - `pb-prototype`: routes when matched. A design or empirical fork that can be settled by running something.
46
+ - `pb-visual-parity`: routes when matched. Matching two visual implementations or a migration baseline.
47
+ - `pb-authoring-a-skill`: routes when matched. A new or modified SKILL.md.
48
+ - `pb-eval`: routes when matched. Comparing variants of a skill or prompt.
49
+ - `pb-babysit`: routes when matched. PR conflicts, comments or red CI.
50
+ - `pb-shipping`: routes when matched. Explicit authorization to land a stack.
51
+ - `pb-autonomous-run`: routes when matched. A long task with a checkable exit condition.
52
+ - `pb-autopilot-full`: routes when matched. Authorized queue of independently landable PRs.
53
+ - `pb-autopilot-stack`: routes when matched. Work queue where the operator owns landing.
54
+ - `pb-session-pickup`: routes when matched. Taking over or resuming an interrupted run.
55
+ - `pb-pause-safely`: routes when matched. Pausing or handling impending context compaction.
56
+ - `pb-multi-phase-plan`: routes when matched. Large change spanning phases or stacked PRs.
57
+ - `pb-worktree-cleanup`: routes when matched. Merged or abandoned worktrees and simulator clutter.
58
+ - `pb-opening-a-pr`: routes when matched. At the end of an applicable delivery playbook.
59
+
60
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # authoring-a-skill
2
+
3
+ Trigger: A new or modified SKILL.md.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Inspect existing Pi SKILL.md and its callers; decide whether a skill is appropriate.
8
+ 2. Write or edit valid Agent Skills frontmatter and relative supporting references.
9
+ 3. Check name, description, paths, cross-skill references, and structural cases.
10
+ 4. Load the skill in fresh Pi and test representative positive and negative prompts.
11
+ 5. Prepare a ready PR when authorized.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `cli-create-skill`: use create-skill. See the playbook source for the exact trigger and sequence.
18
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # autonomous-run
2
+
3
+ Trigger: A long task with a checkable exit condition.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Write a checkable completion predicate, constraints, and stop conditions.
8
+ 2. Record baseline and choose bounded wake cadence.
9
+ 3. Make small evidence-backed changes, one hypothesis at a time.
10
+ 4. Verify each iteration and record decisions; recheck actual predicate.
11
+ 5. Stop the loop at verified completion or a real dead end; report evidence and resume state.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `cli-loop`: wake / poll. See the playbook source for the exact trigger and sequence.
18
+ - `show-me-your-work`: use show-me-your-work. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,25 @@
1
+ # autopilot-full
2
+
3
+ Trigger: Authorized queue of independently landable PRs.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Require explicit queue scope and merge authorization; identify independent PRs and dependencies.
8
+ 2. Assign one isolated owner per PR off trunk; keep verified checkpoints.
9
+ 3. Run deslop and no-comments before code-ready; obtain independent verification.
10
+ 4. Audit current-head CI and exact patch identity; use shipping policy for authorized merges only.
11
+ 5. Use bounded loop to reconcile state, stop at blockers and report actual merges.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `cli-cloud`: remote owner / verifier. See the playbook source for the exact trigger and sequence.
18
+ - `kit-deslop`: use deslop. See the playbook source for the exact trigger and sequence.
19
+ - `no-comments`: use no-comments. See the playbook source for the exact trigger and sequence.
20
+ - `swarm`: use swarm. See the playbook source for the exact trigger and sequence.
21
+ - `pb-shipping`: patch identity / landing policy. See the playbook source for the exact trigger and sequence.
22
+ - `cli-loop`: wake / poll. See the playbook source for the exact trigger and sequence.
23
+ - `forge`: PR state. See the playbook source for the exact trigger and sequence.
24
+
25
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # autopilot-stack
2
+
3
+ Trigger: Work queue where the operator owns landing.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Identify operator-owned landing and explicitly prohibit merges.
8
+ 2. Use autopilot-full ownership and independent verification policy; stack only true dependencies.
9
+ 3. Rebase or update dependent patches and repeat affected checks after each head change.
10
+ 4. Stop when all requested PRs have fresh verification and green current-head CI; hand back without merging.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `pb-autopilot-full`: base playbook with overrides. See the playbook source for the exact trigger and sequence.
17
+ - `swarm`: use swarm. See the playbook source for the exact trigger and sequence.
18
+ - `forge`: PR state. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,21 @@
1
+ # babysit
2
+
3
+ Trigger: PR conflicts, comments or red CI.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Identify forge, PR number, current head and merge base.
8
+ 2. Read current PR checks, conflicts and review comments.
9
+ 3. Investigate failures; reproduce each bot finding before fixing or dismissing.
10
+ 4. Run checks again after each patch; never equate old-head green with current green.
11
+ 5. Report merge readiness and blockers; do not merge.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `watch-pr`: use watch-pr. See the playbook source for the exact trigger and sequence.
18
+ - `cli-bugbot`: use Bugbot. See the playbook source for the exact trigger and sequence.
19
+ - `forge`: PR state. See the playbook source for the exact trigger and sequence.
20
+
21
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,26 @@
1
+ # bug-fix
2
+
3
+ Trigger: A real defect or regression.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Restate expected and actual behavior; reproduce the original failure on the real UI, CLI, or other matching surface.
8
+ 2. Trace to the earliest invalid state; use why to establish constraints.
9
+ 3. Read architect if the boundary changes; select the smallest root-cause fix.
10
+ 4. Use tdd if a cheap behavioral red test exists; delegate scoped implementation with the reproduction.
11
+ 5. Run the original reproduction and relevant regression checks; inspect worker diff.
12
+ 6. Use no-comments and deslop before the applicable ready PR flow.
13
+
14
+ ## Conditional relationships
15
+
16
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
17
+
18
+ - `why`: use why. See the playbook source for the exact trigger and sequence.
19
+ - `architect`: use architect. See the playbook source for the exact trigger and sequence.
20
+ - `agent-poteto`: delegate. See the playbook source for the exact trigger and sequence.
21
+ - `tdd`: use tdd. See the playbook source for the exact trigger and sequence.
22
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
23
+ - `kit-control-cli`: matching surface. Conditional on the selected surface; not both controls required.
24
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
25
+
26
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # eval
2
+
3
+ Trigger: Comparing variants of a skill or prompt.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Write a judge-only rubric and outcome definition.
8
+ 2. Sanitize candidate environments and remove identifying labels.
9
+ 3. Run each candidate with the same organic prompt and independent Pi sessions.
10
+ 4. Give the blinded judge actual outputs/transcripts, not summaries; verify transcript reads.
11
+ 5. Inspect every output and report method, scores and failure cases.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `arena`: use arena. See the playbook source for the exact trigger and sequence.
18
+ - `cli-subagents`: use Task / subagents. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,26 @@
1
+ # feature
2
+
3
+ Trigger: A new feature or changed behavior.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Restate new behavior and acceptance predicate; trace the existing subsystem.
8
+ 2. Use architect for caller-facing shape; model domain state before writing logic.
9
+ 3. Record implementation and verification checkpoints; delegate a scoped change.
10
+ 4. Verify on the real UI, CLI, or other matching surface.
11
+ 5. Inspect diff and order verified commits; interrogate a contested design.
12
+ 6. Apply no-comments and deslop, then prepare a ready PR when authorized.
13
+
14
+ ## Conditional relationships
15
+
16
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
17
+
18
+ - `architect`: use architect. See the playbook source for the exact trigger and sequence.
19
+ - `agent-poteto`: delegate. See the playbook source for the exact trigger and sequence.
20
+ - `principle-model-the-domain`: apply principle. See the playbook source for the exact trigger and sequence.
21
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
22
+ - `kit-control-cli`: matching surface. Conditional on the selected surface; not both controls required.
23
+ - `interrogate`: use interrogate. See the playbook source for the exact trigger and sequence.
24
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
25
+
26
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,24 @@
1
+ # hillclimb
2
+
3
+ Trigger: Sustained scientific improvement toward a fixed metric target.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Fix the workload, metric, target, and behavior constraints.
8
+ 2. Build and freeze a sensitive benchmark; validate using benchmark-checklist.
9
+ 3. Start a decision TSV; record one hypothesis at a time.
10
+ 4. Implement and measure each isolated experiment; discard regressions and noisy wins.
11
+ 5. Repeat accepted measurements and run end-to-end checks; stop at target or evidence-backed dead end.
12
+ 6. Prepare a ready PR when authorized.
13
+
14
+ ## Conditional relationships
15
+
16
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
17
+
18
+ - `benchmark-checklist`: use benchmark-checklist. See the playbook source for the exact trigger and sequence.
19
+ - `show-me-your-work`: use show-me-your-work. See the playbook source for the exact trigger and sequence.
20
+ - `principle-build-the-lever`: apply principle. See the playbook source for the exact trigger and sequence.
21
+ - `principle-laziness-protocol`: apply principle. See the playbook source for the exact trigger and sequence.
22
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
23
+
24
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,19 @@
1
+ # investigation
2
+
3
+ Trigger: Question about mechanics, motivation or a recommendation.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Restate the question and set a read-only scope.
8
+ 2. Trace actual callers, state, and control flow.
9
+ 3. Use why for historical motivation when relevant.
10
+ 4. Report facts, uncertainty, and evidence; apply unslop.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `why`: use why. See the playbook source for the exact trigger and sequence.
17
+ - `unslop`: use unslop. See the playbook source for the exact trigger and sequence.
18
+
19
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,19 @@
1
+ # multi-phase-plan
2
+
3
+ Trigger: Large change spanning phases or stacked PRs.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Define outcome, constraints, and measurable acceptance.
8
+ 2. Prototype unresolved empirical forks; settle caller-facing design.
9
+ 3. Write dependency graph and each PR scope, tests, live/perf predicates and sequencing.
10
+ 4. Stop for explicit operator authorization before execution.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `pb-prototype`: conditional playbook. See the playbook source for the exact trigger and sequence.
17
+ - `principle-sequence-verifiable-units`: apply principle. See the playbook source for the exact trigger and sequence.
18
+
19
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # opening-a-pr
2
+
3
+ Trigger: At the end of an applicable delivery playbook.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Inspect git state, target branch and worktree; preserve unrelated edits.
8
+ 2. Review diff, verify actual behavior, and apply no-comments plus deslop before committing.
9
+ 3. Create ordered commits only within authorized scope; write why, change and evidence.
10
+ 4. Use configured forge to create a ready PR when authorized; confirm URL and status.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `kit-deslop`: use deslop. See the playbook source for the exact trigger and sequence.
17
+ - `technical-writing`: use technical-writing. See the playbook source for the exact trigger and sequence.
18
+ - `forge`: PR state. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,18 @@
1
+ # pause-safely
2
+
3
+ Trigger: Pausing or handling impending context compaction.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Stop scheduled wakes; let or cancel nested work at a safe boundary.
8
+ 2. Inspect worktree state; avoid irreversible actions and do not discard changes.
9
+ 3. If appropriate and authorized, preserve a local WIP commit; otherwise preserve files.
10
+ 4. Write a resume note with goal, branch, tasks, evidence, blockers and next action.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `decision-log`: refer to existing trail. See the playbook source for the exact trigger and sequence.
17
+
18
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,24 @@
1
+ # perf-issue
2
+
3
+ Trigger: Latency, throughput or another measured slowdown.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Define the workload, metric, and threshold; capture a representative baseline on the matching surface.
8
+ 2. Use benchmark-checklist; locate the actual limiter and record the baseline.
9
+ 3. Trace the source; use architect if changing boundaries; delegate a focused fix.
10
+ 4. Capture treatment using identical conditions; repeat runs and check behavior.
11
+ 5. Compare results, explain the number, and prepare a ready PR when authorized.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `benchmark-checklist`: use benchmark-checklist. See the playbook source for the exact trigger and sequence.
18
+ - `architect`: use architect. See the playbook source for the exact trigger and sequence.
19
+ - `agent-poteto`: delegate. See the playbook source for the exact trigger and sequence.
20
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
21
+ - `kit-control-cli`: matching surface. Conditional on the selected surface; not both controls required.
22
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
23
+
24
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,21 @@
1
+ # prototype
2
+
3
+ Trigger: A design or empirical fork that can be settled by running something.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Name the decision, competing hypotheses, and evaluation criteria.
8
+ 2. Build isolated lightweight alternatives; avoid production commitments.
9
+ 3. Exercise each on the matching real surface and capture comparable evidence.
10
+ 4. Report tradeoffs and select or recommend a direction; hand the chosen design to feature only with applicable scope.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `principle-exhaust-the-design-space`: apply principle. See the playbook source for the exact trigger and sequence.
17
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
18
+ - `kit-control-cli`: matching surface. Conditional on the selected surface; not both controls required.
19
+ - `pb-feature`: handoff chosen design. See the playbook source for the exact trigger and sequence.
20
+
21
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,23 @@
1
+ # refactoring
2
+
3
+ Trigger: A structural change without behavior change.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Pin the observable behavior and test it before editing.
8
+ 2. Name the target structure with architect where needed; model domain and subtract dead weight.
9
+ 3. Move callers in individually verified slices, without unnecessary compatibility wrappers.
10
+ 4. Prove behavioral equivalence, lower reader load, and inspect the final diff.
11
+ 5. Prepare a ready PR when authorized.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `architect`: use architect. See the playbook source for the exact trigger and sequence.
18
+ - `principle-model-the-domain`: apply principle. See the playbook source for the exact trigger and sequence.
19
+ - `principle-subtract-before-you-add`: apply principle. See the playbook source for the exact trigger and sequence.
20
+ - `principle-prove-it-works`: apply principle. See the playbook source for the exact trigger and sequence.
21
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
22
+
23
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # runtime-forensics
2
+
3
+ Trigger: Leak, idle CPU spin or visual glitch.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Set read-only scope; select the real UI or CLI control method.
8
+ 2. Capture profile, heap snapshot, or trace with a repeatable scenario.
9
+ 3. Reduce large captures using read-only delegates and identify the first causal mechanism.
10
+ 4. Prove the mechanism and link the source; report evidence without changing code.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
17
+ - `kit-control-cli`: matching surface. Conditional on the selected surface; not both controls required.
18
+ - `principle-guard-the-context-window`: apply principle. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # session-pickup
2
+
3
+ Trigger: Taking over or resuming an interrupted run.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Read native Pi branch/session history, worktree state, and decision log.
8
+ 2. Reconstruct goal, branch, completed and pending tasks with evidence.
9
+ 3. Re-run critical inherited claims on the real artifact.
10
+ 4. Route remaining work through poteto-mode; do not repeat verified work needlessly.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `principle-prove-it-works`: apply principle. See the playbook source for the exact trigger and sequence.
17
+ - `principle-guard-the-context-window`: apply principle. See the playbook source for the exact trigger and sequence.
18
+ - `poteto-mode`: route remaining work. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,24 @@
1
+ # shipping
2
+
3
+ Trigger: Explicit authorization to land a stack.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Require explicit authorization for the ordered PR stack; identify forge and target heads.
8
+ 2. Independently verify each patch on its actual behavior; record head identity and evidence.
9
+ 3. Compute contiguous verified prefix; stop at first missing, stale or failed proof.
10
+ 4. Check fresh CI and current head before each authorized merge; land bottom-up.
11
+ 5. Stop at ceiling or any changed head, failed check, conflict or missing permission; report actual merge results.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `cli-cloud`: remote owner / verifier. See the playbook source for the exact trigger and sequence.
18
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
19
+ - `kit-control-cli`: matching surface. Conditional on the selected surface; not both controls required.
20
+ - `watch-pr`: use watch-pr. See the playbook source for the exact trigger and sequence.
21
+ - `cli-loop`: wake / poll. See the playbook source for the exact trigger and sequence.
22
+ - `forge`: PR state. See the playbook source for the exact trigger and sequence.
23
+
24
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,20 @@
1
+ # trace-forensics
2
+
3
+ Trigger: A trace, heap snapshot or profiling artifact.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Identify artifact format, time range, workload and question.
8
+ 2. Parse the artifact into a queryable structure; delegate bulk reads if needed.
9
+ 3. Narrow and attribute findings to actual source; compare paired captures if available.
10
+ 4. Report evidence and uncertainty; only route to bug-fix or perf-issue if the user requests a fix.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `principle-guard-the-context-window`: apply principle. See the playbook source for the exact trigger and sequence.
17
+ - `pb-bug-fix`: conditional playbook. See the playbook source for the exact trigger and sequence.
18
+ - `pb-perf-issue`: conditional playbook. See the playbook source for the exact trigger and sequence.
19
+
20
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,22 @@
1
+ # visual-parity
2
+
3
+ Trigger: Matching two visual implementations or a migration baseline.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. Capture baseline under fixed conditions and preserve the verification setup.
8
+ 2. Partition independent components into isolated worker scopes.
9
+ 3. Capture treatment and compare pixels on the real surface; retain diff images and settings.
10
+ 4. Repeat with bounded loop until exact match or evidence-backed blocker; avoid overwriting baseline.
11
+ 5. Prepare a ready PR when authorized.
12
+
13
+ ## Conditional relationships
14
+
15
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
16
+
17
+ - `kit-control-ui`: matching surface. Conditional on the selected surface; not both controls required.
18
+ - `cli-loop`: wake / poll. See the playbook source for the exact trigger and sequence.
19
+ - `principle-separate-before-serializing-shared-state`: apply principle. See the playbook source for the exact trigger and sequence.
20
+ - `pb-opening-a-pr`: open ready PR. See the playbook source for the exact trigger and sequence.
21
+
22
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->
@@ -0,0 +1,19 @@
1
+ # worktree-cleanup
2
+
3
+ Trigger: Merged or abandoned worktrees and simulator clutter.
4
+
5
+ ## Ordered steps
6
+
7
+ 1. List worktrees, branches, dirty status, and merge/ancestry evidence.
8
+ 2. Cross-check active or pinned sessions and worker records; unknown ownership is not safe.
9
+ 3. Require explicit approval of each clean, confirmed inactive and merged worktree.
10
+ 4. Remove without force and verify disk usage; preserve dirty or uncertain work.
11
+
12
+ ## Conditional relationships
13
+
14
+ These are catalog references, not a mandatory call sequence. Read related instructions with `pstack_catalog` action `node` when the condition applies.
15
+
16
+ - `audit-worktree`: use worktree-audit.sh. See the playbook source for the exact trigger and sequence.
17
+ - `principle-prove-it-works`: apply principle. See the playbook source for the exact trigger and sequence.
18
+
19
+ <!-- Generated by scripts/generate.py from scripts/catalog-source.json. Edit the source, then run `python3 scripts/generate.py`. -->