@shiwenbin1617/pstack 0.14.4
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.
- package/LICENSE +28 -0
- package/README.md +332 -0
- package/adapters/claude-code/overrides/setup-pstack/SKILL.md +48 -0
- package/adapters/claude-code.md +29 -0
- package/adapters/codex/agents/comment-sicko.toml +7 -0
- package/adapters/codex/agents/poteto-agent.toml +7 -0
- package/adapters/codex/overrides/setup-pstack/SKILL.md +40 -0
- package/adapters/codex.md +34 -0
- package/agents/comment-sicko.md +32 -0
- package/agents/poteto-agent.md +9 -0
- package/automations/benny/FOR_AGENTS.md +89 -0
- package/automations/benny/README.md +23 -0
- package/automations/benny/skills/reproduce-and-fix-issues/SKILL.md +310 -0
- package/automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md +169 -0
- package/automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md +205 -0
- package/automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md +93 -0
- package/automations/benny/skills/setup-benny/SKILL.md +266 -0
- package/automations/benny/skills/triage-issue-reports/SKILL.md +240 -0
- package/automations/benny/skills/triage-issue-reports/references/routing.example.md +61 -0
- package/automations/benny/templates/configuration.example.yaml +84 -0
- package/automations/benny/templates/reproduce-automation-prompt.md +33 -0
- package/automations/benny/templates/triage-automation-prompt.md +39 -0
- package/bin/pstack.mjs +331 -0
- package/package.json +48 -0
- package/scripts/build.mjs +218 -0
- package/scripts/host-adapters.mjs +128 -0
- package/scripts/lib.mjs +181 -0
- package/scripts/test.mjs +106 -0
- package/skills/architect/SKILL.md +83 -0
- package/skills/architect/references/design-red-flags.md +33 -0
- package/skills/architect/references/rationale-template.md +35 -0
- package/skills/architect/references/runner-prompt.md +20 -0
- package/skills/arena/SKILL.md +71 -0
- package/skills/automate-me/SKILL.md +109 -0
- package/skills/blast-radius/SKILL.md +50 -0
- package/skills/bro/SKILL.md +7 -0
- package/skills/create-verification-skill/SKILL.md +44 -0
- package/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/skills/figure-it-out/SKILL.md +55 -0
- package/skills/how/SKILL.md +134 -0
- package/skills/how/references/critic-prompt.md +59 -0
- package/skills/how/references/critique-rubric.md +58 -0
- package/skills/how/references/explainer-prompt.md +55 -0
- package/skills/how/references/explorer-prompt.md +52 -0
- package/skills/interrogate/SKILL.md +113 -0
- package/skills/interrogate/references/code-quality-review.md +47 -0
- package/skills/interrogate/references/lead-judgment.md +58 -0
- package/skills/interrogate/references/reviewer-prompt.md +72 -0
- package/skills/interrogate/references/rubric.md +77 -0
- package/skills/maintain-verification-skill/SKILL.md +39 -0
- package/skills/no-comments/SKILL.md +24 -0
- package/skills/poteto-mode/SKILL.md +140 -0
- package/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/skills/poteto-mode/playbooks/babysit.md +27 -0
- package/skills/poteto-mode/playbooks/bug-fix.md +17 -0
- package/skills/poteto-mode/playbooks/eval.md +27 -0
- package/skills/poteto-mode/playbooks/feature.md +21 -0
- package/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/skills/poteto-mode/playbooks/opening-a-pr.md +29 -0
- package/skills/poteto-mode/playbooks/orchestrate.md +113 -0
- package/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/skills/poteto-mode/playbooks/perf-issue.md +24 -0
- package/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/skills/poteto-mode/playbooks/session-pickup.md +13 -0
- package/skills/poteto-mode/playbooks/shipping.md +20 -0
- package/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/skills/poteto-mode/scripts/bootstrap.ts +30 -0
- package/skills/poteto-mode/scripts/bun.lock +67 -0
- package/skills/poteto-mode/scripts/check-plan.mjs +186 -0
- package/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
- package/skills/poteto-mode/scripts/orch/orch.ts +578 -0
- package/skills/poteto-mode/scripts/orch/store.ts +1607 -0
- package/skills/poteto-mode/scripts/package.json +16 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
- package/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
- package/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
- package/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
- package/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
- package/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
- package/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
- package/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
- package/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/skills/poteto-mode/scripts/worktree-audit.sh +89 -0
- package/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/skills/principle-build-the-lever/SKILL.md +23 -0
- package/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
- package/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/skills/principle-experience-first/SKILL.md +19 -0
- package/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/skills/principle-guard-the-context-window/SKILL.md +17 -0
- package/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/skills/principle-minimize-reader-load/SKILL.md +23 -0
- package/skills/principle-model-the-domain/SKILL.md +26 -0
- package/skills/principle-never-block-on-the-human/SKILL.md +23 -0
- package/skills/principle-outcome-oriented-execution/SKILL.md +22 -0
- package/skills/principle-prove-it-works/SKILL.md +33 -0
- package/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/skills/principle-sequence-verifiable-units/SKILL.md +22 -0
- package/skills/principle-subtract-before-you-add/SKILL.md +22 -0
- package/skills/principle-type-system-discipline/SKILL.md +31 -0
- package/skills/recall/SKILL.md +35 -0
- package/skills/reflect/SKILL.md +77 -0
- package/skills/reflect/references/divergent-reviewer.md +43 -0
- package/skills/reflect/references/judgment-reviewer.md +42 -0
- package/skills/reflect/references/synthesizer.md +56 -0
- package/skills/reflect/references/tooling-reviewer.md +57 -0
- package/skills/setup-pstack/SKILL.md +106 -0
- package/skills/show-me-your-work/SKILL.md +82 -0
- package/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/skills/show-me-your-work/scripts/log.sh +40 -0
- package/skills/swarm/SKILL.md +46 -0
- package/skills/tdd/SKILL.md +44 -0
- package/skills/teach/SKILL.md +21 -0
- package/skills/technical-writing/SKILL.md +130 -0
- package/skills/typescript-best-practices/SKILL.md +28 -0
- package/skills/typescript-best-practices/references/patterns.md +292 -0
- package/skills/unslop/SKILL.md +80 -0
- package/skills/why/SKILL.md +229 -0
- package/skills/why/references/epistemics.md +144 -0
- package/skills/why/references/investigator-prompt.md +103 -0
- package/skills/why/references/source-playbook.md +17 -0
- package/skills/why/references/sources/code-archaeology.md +88 -0
- package/skills/why/references/sources/databricks.md +70 -0
- package/skills/why/references/sources/datadog.md +99 -0
- package/skills/why/references/sources/incident-postmortem.md +15 -0
- package/skills/why/references/sources/linear.md +48 -0
- package/skills/why/references/sources/notion.md +55 -0
- package/skills/why/references/sources/sentry.md +100 -0
- package/skills/why/references/sources/slack.md +54 -0
- package/skills/why/references/synthesizer-prompt.md +135 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
# Feature-map example
|
|
2
|
+
|
|
3
|
+
Map every user-facing feature Benny may reproduce. Read the relevant section before driving the app. Keep this map at the user point of view. Discover internals and current code paths at runtime instead of freezing them here.
|
|
4
|
+
|
|
5
|
+
Copy this file outside `.claude/automations/benny/`, for example to `.claude/benny/feature-map.md`, and set `control.feature_map_path` to the copy. Pack refreshes must not overwrite it.
|
|
6
|
+
|
|
7
|
+
## Per-feature template
|
|
8
|
+
|
|
9
|
+
### `<feature name>`
|
|
10
|
+
|
|
11
|
+
`<one-line user-visible purpose>`
|
|
12
|
+
|
|
13
|
+
#### How a user gets there
|
|
14
|
+
|
|
15
|
+
- Click path: `<screen> -> <menu, tab, or panel> -> <control>`
|
|
16
|
+
- Keyboard shortcut: `<shortcut or none>`
|
|
17
|
+
|
|
18
|
+
#### How the control adapter drives it
|
|
19
|
+
|
|
20
|
+
- `<adapter action>` with `<inputs>` should `<visible result>`.
|
|
21
|
+
- Reset: `<how the adapter returns to a fresh state>`.
|
|
22
|
+
|
|
23
|
+
#### Stable selectors
|
|
24
|
+
|
|
25
|
+
- `<role and accessible name>`
|
|
26
|
+
- `<ARIA relationship>`
|
|
27
|
+
- `<data-component or purpose-named data attribute>`
|
|
28
|
+
|
|
29
|
+
Never use generated CSS or StyleX classes, dynamic hashes, child indexes, or brittle DOM position.
|
|
30
|
+
|
|
31
|
+
#### States to exercise
|
|
32
|
+
|
|
33
|
+
- Default, hover, focus-visible, active, disabled
|
|
34
|
+
- Loading, empty, error
|
|
35
|
+
- Selected, open, expanded
|
|
36
|
+
- `<relevant feature-specific variants>`
|
|
37
|
+
|
|
38
|
+
Mark states that do not apply.
|
|
39
|
+
|
|
40
|
+
#### Preconditions and setup
|
|
41
|
+
|
|
42
|
+
- Auth: `<account state>`
|
|
43
|
+
- Data: `<fixture>`
|
|
44
|
+
- Permissions: `<role>`
|
|
45
|
+
- Flags: `<flag or none>`
|
|
46
|
+
- Services: `<required availability>`
|
|
47
|
+
|
|
48
|
+
#### Evidence and cross-check
|
|
49
|
+
|
|
50
|
+
- Screenshot: `<app identity, feature, and discriminating state>`
|
|
51
|
+
- Video: `<entry path, interaction, and final state>`
|
|
52
|
+
- Cross-check: `<read-only state or value that confirms the UI>`
|
|
53
|
+
|
|
54
|
+
#### Gotchas
|
|
55
|
+
|
|
56
|
+
- `<known dead end or wrong surface>`
|
|
57
|
+
- `<safe environment translation>`
|
|
58
|
+
|
|
59
|
+
## Fictional example
|
|
60
|
+
|
|
61
|
+
These features belong to a fictional task app. They are examples, not required Benny features.
|
|
62
|
+
|
|
63
|
+
### Sign in
|
|
64
|
+
|
|
65
|
+
Lets a user enter the task app.
|
|
66
|
+
|
|
67
|
+
#### How a user gets there
|
|
68
|
+
|
|
69
|
+
- Open the app and choose `Sign in`. No shortcut.
|
|
70
|
+
|
|
71
|
+
#### How the control adapter drives it
|
|
72
|
+
|
|
73
|
+
- `open_app`, `click Sign in`, `fill credentials`, and `click Continue` should open the item list.
|
|
74
|
+
- Reset by signing out and clearing the disposable session.
|
|
75
|
+
|
|
76
|
+
#### Stable selectors
|
|
77
|
+
|
|
78
|
+
- Button `Sign in`, textboxes `Email` and `Password`, `data-component="sign-in-form"`
|
|
79
|
+
|
|
80
|
+
#### States to exercise
|
|
81
|
+
|
|
82
|
+
- Default, focus-visible, submitting, disabled, loading, error
|
|
83
|
+
|
|
84
|
+
#### Preconditions and setup
|
|
85
|
+
|
|
86
|
+
- Disposable account and available authentication service
|
|
87
|
+
|
|
88
|
+
#### Evidence and cross-check
|
|
89
|
+
|
|
90
|
+
- Record landing page through item list. Check read-only session state.
|
|
91
|
+
|
|
92
|
+
#### Gotchas
|
|
93
|
+
|
|
94
|
+
- A marketing page is the wrong surface. A missing auth service is a block.
|
|
95
|
+
|
|
96
|
+
### Item list and detail
|
|
97
|
+
|
|
98
|
+
Lets a user browse items and open one.
|
|
99
|
+
|
|
100
|
+
#### How a user gets there
|
|
101
|
+
|
|
102
|
+
- Open the `Items` tab, then choose a row.
|
|
103
|
+
|
|
104
|
+
#### How the control adapter drives it
|
|
105
|
+
|
|
106
|
+
- `select_tab Items` and `click <fixture item>` should open its detail.
|
|
107
|
+
- Reset by closing the detail and clearing selection.
|
|
108
|
+
|
|
109
|
+
#### Stable selectors
|
|
110
|
+
|
|
111
|
+
- Tab and list named `Items`, fixture-named row, `data-component="item-detail"`
|
|
112
|
+
|
|
113
|
+
#### States to exercise
|
|
114
|
+
|
|
115
|
+
- Loading, empty, error, selected, open, expanded
|
|
116
|
+
|
|
117
|
+
#### Preconditions and setup
|
|
118
|
+
|
|
119
|
+
- Named fixture items, read permission, available item service
|
|
120
|
+
|
|
121
|
+
#### Evidence and cross-check
|
|
122
|
+
|
|
123
|
+
- Show selection and matching detail title. Check selected-item ID.
|
|
124
|
+
|
|
125
|
+
#### Gotchas
|
|
126
|
+
|
|
127
|
+
- Search results may look similar but use a different path.
|
|
128
|
+
|
|
129
|
+
### Item editor
|
|
130
|
+
|
|
131
|
+
Lets a user create or edit an item.
|
|
132
|
+
|
|
133
|
+
#### How a user gets there
|
|
134
|
+
|
|
135
|
+
- Choose `Edit` from detail or `New item` from the list.
|
|
136
|
+
|
|
137
|
+
#### How the control adapter drives it
|
|
138
|
+
|
|
139
|
+
- `click Edit`, `fill <field>`, and `click Save` should update detail.
|
|
140
|
+
- Reset by restoring the fixture.
|
|
141
|
+
|
|
142
|
+
#### Stable selectors
|
|
143
|
+
|
|
144
|
+
- Buttons `Edit`, `New item`, `Save`, form `Item editor`, label-linked fields
|
|
145
|
+
|
|
146
|
+
#### States to exercise
|
|
147
|
+
|
|
148
|
+
- Default, focus-visible, dirty, validating, disabled, saving, error, success
|
|
149
|
+
|
|
150
|
+
#### Preconditions and setup
|
|
151
|
+
|
|
152
|
+
- Editable fixture, write permission, available save service
|
|
153
|
+
|
|
154
|
+
#### Evidence and cross-check
|
|
155
|
+
|
|
156
|
+
- Show field change through updated detail. Check the stored item value read-only.
|
|
157
|
+
|
|
158
|
+
#### Gotchas
|
|
159
|
+
|
|
160
|
+
- Do not inject form state. A read-only detail field is not the editor.
|
|
161
|
+
|
|
162
|
+
### Settings
|
|
163
|
+
|
|
164
|
+
Lets a user change personal preferences.
|
|
165
|
+
|
|
166
|
+
#### How a user gets there
|
|
167
|
+
|
|
168
|
+
- Open the profile menu, then choose `Settings`.
|
|
169
|
+
|
|
170
|
+
#### How the control adapter drives it
|
|
171
|
+
|
|
172
|
+
- `open_menu Profile`, `click Settings`, and `toggle <preference>` should update the control.
|
|
173
|
+
- Reset by restoring the starting preference.
|
|
174
|
+
|
|
175
|
+
#### Stable selectors
|
|
176
|
+
|
|
177
|
+
- Button `Profile`, menu item `Settings`, region `Settings`, purpose-named preference attribute
|
|
178
|
+
|
|
179
|
+
#### States to exercise
|
|
180
|
+
|
|
181
|
+
- Closed, open, selected, focus-visible, disabled, loading, error
|
|
182
|
+
|
|
183
|
+
#### Preconditions and setup
|
|
184
|
+
|
|
185
|
+
- Signed-in test account, known preferences, available preference service
|
|
186
|
+
|
|
187
|
+
#### Evidence and cross-check
|
|
188
|
+
|
|
189
|
+
- Show the menu path and final control state. Check the preference value read-only.
|
|
190
|
+
|
|
191
|
+
#### Gotchas
|
|
192
|
+
|
|
193
|
+
- Operating-system settings are a different surface.
|
|
194
|
+
|
|
195
|
+
## Completeness checklist
|
|
196
|
+
|
|
197
|
+
- Every reproducible user-facing feature has a section.
|
|
198
|
+
- Every section names a user path, adapter actions, and reset.
|
|
199
|
+
- Selectors use roles, names, ARIA, stable component markers, or purpose-named attributes.
|
|
200
|
+
- No selector uses generated classes or DOM position.
|
|
201
|
+
- Relevant interaction, loading, empty, error, selected, and expanded states are covered.
|
|
202
|
+
- Auth, fixtures, permissions, flags, and services are explicit.
|
|
203
|
+
- Screenshot, video, and underlying cross-check requirements are explicit.
|
|
204
|
+
- Wrong surfaces, dead ends, and safe environment translations are listed.
|
|
205
|
+
- Implementation details remain runtime discoveries.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Verify an existing fix
|
|
2
|
+
|
|
3
|
+
Use this mode when an open pull request or merged commit plausibly fixes the report.
|
|
4
|
+
|
|
5
|
+
The existing artifact owns the fix. Verify it. Do not edit it, author a competing patch, or open another pull request.
|
|
6
|
+
|
|
7
|
+
## Qualify the artifact
|
|
8
|
+
|
|
9
|
+
Require one concrete artifact:
|
|
10
|
+
|
|
11
|
+
- An open pull request with code changes that address the symptom
|
|
12
|
+
- A merged pull request
|
|
13
|
+
- A merged commit with matching code and intent
|
|
14
|
+
|
|
15
|
+
A thread claim, tracker status, branch name, or cause hypothesis without a pull request or commit is not enough.
|
|
16
|
+
|
|
17
|
+
When several artifacts exist, choose the one linked from the source thread or tracker. Otherwise choose the closest match to the affected code and state why.
|
|
18
|
+
|
|
19
|
+
## Protect the working tree
|
|
20
|
+
|
|
21
|
+
Use an isolated worktree or another clean checkout when the repository supports it. Do not overwrite user changes.
|
|
22
|
+
|
|
23
|
+
Record:
|
|
24
|
+
|
|
25
|
+
- Baseline revision
|
|
26
|
+
- Patched revision
|
|
27
|
+
- Pull request or commit URL
|
|
28
|
+
- Build and environment inputs shared by both runs
|
|
29
|
+
|
|
30
|
+
Use regular `github.com` pull request links.
|
|
31
|
+
|
|
32
|
+
## Measure the baseline
|
|
33
|
+
|
|
34
|
+
For an open pull request, use its base branch as the baseline.
|
|
35
|
+
|
|
36
|
+
For a merged fix, use the revision immediately before the fix when that revision builds and represents the old behavior.
|
|
37
|
+
|
|
38
|
+
Through the configured control adapter:
|
|
39
|
+
|
|
40
|
+
1. Bring up the baseline app.
|
|
41
|
+
2. Confirm the correct app and environment.
|
|
42
|
+
3. Run the reported path through real UI actions.
|
|
43
|
+
4. Observe the discriminating symptom.
|
|
44
|
+
5. Reset and repeat it.
|
|
45
|
+
6. Capture baseline recording, screenshot, and state check.
|
|
46
|
+
|
|
47
|
+
If the symptom does not appear twice on the baseline, there is no baseline. Do not claim that the fix works.
|
|
48
|
+
|
|
49
|
+
## Measure the patched build
|
|
50
|
+
|
|
51
|
+
Build and run the pull request or fix commit with the same environment and data.
|
|
52
|
+
|
|
53
|
+
1. Run the same UI path.
|
|
54
|
+
2. Repeat it twice.
|
|
55
|
+
3. Confirm that the broken state is gone.
|
|
56
|
+
4. Confirm the expected state appears.
|
|
57
|
+
5. Capture after recording, screenshot, and the same state check.
|
|
58
|
+
|
|
59
|
+
Do not stop at compilation or tests. The after result must come from a running patched app.
|
|
60
|
+
|
|
61
|
+
## Outcomes
|
|
62
|
+
|
|
63
|
+
### Confirmed
|
|
64
|
+
|
|
65
|
+
The baseline reproduces twice and the patched build resolves it twice.
|
|
66
|
+
|
|
67
|
+
- Mark operations status as verified.
|
|
68
|
+
- Link the artifact.
|
|
69
|
+
- Post one concise source-thread reply after the source preflight.
|
|
70
|
+
- Include the before and after result.
|
|
71
|
+
- Open no pull request.
|
|
72
|
+
|
|
73
|
+
### Insufficient fix
|
|
74
|
+
|
|
75
|
+
The symptom appears on both baseline and patched builds.
|
|
76
|
+
|
|
77
|
+
- Mark operations status as reproduced but not fixed.
|
|
78
|
+
- Link the artifact and say it did not resolve the symptom.
|
|
79
|
+
- Post the normal confirmed-repro source update if the run has not already used it.
|
|
80
|
+
- Open no competing pull request.
|
|
81
|
+
|
|
82
|
+
### Inconclusive
|
|
83
|
+
|
|
84
|
+
The baseline does not reproduce, the patched app cannot run, or the evidence does not show the discriminating state.
|
|
85
|
+
|
|
86
|
+
- Do not claim success.
|
|
87
|
+
- State which half could not be measured.
|
|
88
|
+
- Keep the result in the operations thread or run output.
|
|
89
|
+
- Post nothing in the source thread unless a direct question requires an answer.
|
|
90
|
+
|
|
91
|
+
## Cleanup
|
|
92
|
+
|
|
93
|
+
Stop both builds, remove temporary profiles and captures according to retention policy, and return the repository to its prior state without discarding user work.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-benny
|
|
3
|
+
description: Configure Benny and prepare its triage and repro automations. Use when installing Benny or changing its Slack, tracker, repository, routing, control, model, or budget settings.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Set up Benny
|
|
8
|
+
|
|
9
|
+
Benny ships as a dormant automation pack inside pstack. The plugin manifest exposes only pstack's normal skill root; this file and the two operational files are not slash skills.
|
|
10
|
+
|
|
11
|
+
The human enters setup by pointing their agent at the pack's `FOR_AGENTS.md`. The bootstrap flow copies the whole pack into the target repository, then reads this file directly at `.claude/automations/benny/skills/setup-benny/SKILL.md`.
|
|
12
|
+
|
|
13
|
+
Benny needs external configuration and two live scheduled automations. On Claude Code create them with the `schedule` skill (cron routines); on Codex use `~/.codex/automations`. Both need a Slack MCP server connected for the channel side.
|
|
14
|
+
|
|
15
|
+
Do not create or update an automation until the user explicitly asks. Never put a secret value in plugin files, prompts, or committed configuration.
|
|
16
|
+
|
|
17
|
+
## 1. Copy the pack and enable shared pstack skills
|
|
18
|
+
|
|
19
|
+
Do this before asking for Benny configuration and before invoking the built-in `/automate` skill.
|
|
20
|
+
|
|
21
|
+
Ask which repository will run the automations. The source pack is the directory containing `FOR_AGENTS.md`. The destination is `<target-repository>/.claude/automations/benny/`.
|
|
22
|
+
|
|
23
|
+
Merge the entire source pack into the destination:
|
|
24
|
+
|
|
25
|
+
1. Create the destination when it is absent.
|
|
26
|
+
2. Copy every source file to the same relative path.
|
|
27
|
+
3. Preserve destination-only files. Never delete unrelated files during install or refresh.
|
|
28
|
+
4. Keep user-owned configuration, feature maps, and routing maps outside the destination. Never overwrite them.
|
|
29
|
+
5. When an existing source-managed file differs, inspect the diff and merge without discarding local edits. If ownership is ambiguous, stop and ask before replacing it.
|
|
30
|
+
6. Verify that the destination contains `FOR_AGENTS.md`, this setup file, both operational files, their references, and the templates.
|
|
31
|
+
|
|
32
|
+
If this file is already being read from the target destination, treat the copy as complete and run the same verification before continuing.
|
|
33
|
+
|
|
34
|
+
Add pstack to the target repository's `.claude/settings.json`. If the file or `.claude` directory does not exist, create it.
|
|
35
|
+
|
|
36
|
+
Merge this entry into the existing JSON or JSONC:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"plugins": {
|
|
41
|
+
"pstack": { "enabled": true }
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Preserve every unrelated top-level setting and every other plugin entry. If `plugins.pstack` already exists, change only its `enabled` value. Preserve comments and valid JSONC syntax when the file uses JSONC. Validate the file after editing it.
|
|
47
|
+
|
|
48
|
+
Reload the target project or start a fresh agent rooted there. Verify that these shared pstack skills resolve from project scope:
|
|
49
|
+
|
|
50
|
+
- `how`
|
|
51
|
+
- `why`
|
|
52
|
+
- `tdd`
|
|
53
|
+
- `unslop`
|
|
54
|
+
- `principle-separate-before-serializing-shared-state`
|
|
55
|
+
- `principle-minimize-reader-load`
|
|
56
|
+
- `principle-guard-the-context-window`
|
|
57
|
+
- `principle-sequence-verifiable-units`
|
|
58
|
+
- `principle-fix-root-causes`
|
|
59
|
+
- `principle-prove-it-works`
|
|
60
|
+
|
|
61
|
+
Do not count a skill loaded from the current session or a user-scoped plugin. The check must show that a fresh agent in the target repository receives pstack through project settings.
|
|
62
|
+
|
|
63
|
+
If project-scoped plugin installation is unavailable or any shared dependency does not resolve, stop and explain the failure.
|
|
64
|
+
|
|
65
|
+
The Benny files are read directly from `.claude/automations/benny/`. Do not add that directory to a plugin manifest or expect its `SKILL.md` files to appear in the slash-skill list.
|
|
66
|
+
|
|
67
|
+
Tell the user that `.claude/settings.json`, `.claude/automations/benny/`, and any referenced secret-free configuration must be committed before either automation is enabled. Do not commit them unless the user asks.
|
|
68
|
+
|
|
69
|
+
Once this check passes, live automation prompts may read the committed operational files by their stable repository-relative paths. They must not embed a plugin cache path or copy the file contents.
|
|
70
|
+
|
|
71
|
+
## 2. Adapt the configuration
|
|
72
|
+
|
|
73
|
+
Open these copied examples:
|
|
74
|
+
|
|
75
|
+
- `../../templates/configuration.example.yaml`
|
|
76
|
+
- `../reproduce-and-fix-issues/references/feature-map.example.md`
|
|
77
|
+
|
|
78
|
+
Create user-owned copies outside `.claude/automations/benny/`. These are configuration files, not pack files. Example locations:
|
|
79
|
+
|
|
80
|
+
- Project config, such as `.claude/benny/configuration.yaml`
|
|
81
|
+
- Project feature map, such as `.claude/benny/feature-map.md`
|
|
82
|
+
- Project routing map, such as `.claude/benny/routing.md`
|
|
83
|
+
- User config, such as `~/.config/benny/configuration.yaml`
|
|
84
|
+
- User feature map, such as `~/.config/benny/feature-map.md`
|
|
85
|
+
|
|
86
|
+
Fill one feature-map section for every user-facing feature the automation may reproduce. Keep it at the user point of view. Do not freeze implementation details or current code paths in the map.
|
|
87
|
+
|
|
88
|
+
Do not edit the copied examples. Pack refreshes may update source-managed files after conflict review, but they must never touch the user-owned copies.
|
|
89
|
+
|
|
90
|
+
Prefer committed, secret-free files in the target repository when a fresh automation checkout must read them. Otherwise paraphrase the required values into the live prompt. Reference a repository file only after the built-in `/automate` skill confirms that the file is committed in the repository where the automation runs.
|
|
91
|
+
|
|
92
|
+
Use stable repository-relative paths for committed pack and configuration files. Never reference the plugin source directory or a plugin cache path from a live automation.
|
|
93
|
+
|
|
94
|
+
## 3. Fill the required choices
|
|
95
|
+
|
|
96
|
+
Ask for or confirm:
|
|
97
|
+
|
|
98
|
+
- Source Slack channel ID
|
|
99
|
+
- Optional operations or status channel ID
|
|
100
|
+
- Repository URL and default branch
|
|
101
|
+
- Triage identity or Slack user ID
|
|
102
|
+
- Issue tracker type, team, project, labels, and intake status
|
|
103
|
+
- Tracker adapter skill or MCP actions
|
|
104
|
+
- Optional routing map path
|
|
105
|
+
- Required control skill name
|
|
106
|
+
- Required user-facing feature-map path
|
|
107
|
+
- Status emoji strings
|
|
108
|
+
- Pull request URL format
|
|
109
|
+
- Polling and effort budgets
|
|
110
|
+
- Model slug for triage, repro, code work, and media review
|
|
111
|
+
|
|
112
|
+
Use only model values the `Agent` tool's `model` enum accepts in this session. Do not guess a value and do not carry over a private default.
|
|
113
|
+
|
|
114
|
+
The source channel, triage identity, repository, tracker adapter, control skill, and feature map must be explicit. Fail setup if any required value stays ambiguous.
|
|
115
|
+
|
|
116
|
+
Use pstack's `unslop` skill on the final automation names, descriptions, and prompt shims before saving them.
|
|
117
|
+
|
|
118
|
+
## 4. Check integration capabilities
|
|
119
|
+
|
|
120
|
+
The triage automation needs:
|
|
121
|
+
|
|
122
|
+
- Read access to the configured source Slack channel and its threads
|
|
123
|
+
- Thread-reply access in that channel
|
|
124
|
+
- Attachment metadata and file download access when reports include media
|
|
125
|
+
- Search, read, create, and update access through the configured issue-tracker adapter
|
|
126
|
+
|
|
127
|
+
The repro automation needs:
|
|
128
|
+
|
|
129
|
+
- Read access to the source thread
|
|
130
|
+
- Thread-reply access in the source channel
|
|
131
|
+
- Optional post and edit access in the configured operations channel
|
|
132
|
+
- Repository read and history access
|
|
133
|
+
- A pull request action that can open a draft pull request
|
|
134
|
+
- The configured control-adapter skill
|
|
135
|
+
|
|
136
|
+
Prefer a connected Slack MCP server's actions for reads and posts. The optional `BENNY_SLACK_BOT_TOKEN` may fill a narrow gap such as editing one operations status message or downloading an attachment. Store the value in a secret manager or environment, not in YAML.
|
|
137
|
+
|
|
138
|
+
Do not use undocumented integration endpoints.
|
|
139
|
+
|
|
140
|
+
## 5. Prepare the routing map
|
|
141
|
+
|
|
142
|
+
If the user wants reroutes or owner pings:
|
|
143
|
+
|
|
144
|
+
1. Copy `../triage-issue-reports/references/routing.example.md` outside `.claude/automations/benny/`.
|
|
145
|
+
2. Replace every placeholder with public or organization-local values.
|
|
146
|
+
3. Keep owner pings off by default.
|
|
147
|
+
4. Allow a ping only for a configured feature owner or a confirmed likely regression author.
|
|
148
|
+
|
|
149
|
+
If no routing map is configured, triage may classify a report but must not guess a destination or owner.
|
|
150
|
+
|
|
151
|
+
## 6. Verify the control adapter
|
|
152
|
+
|
|
153
|
+
Read `../reproduce-and-fix-issues/references/control-adapter.md` and the user's completed feature map.
|
|
154
|
+
|
|
155
|
+
Confirm that the named skill can:
|
|
156
|
+
|
|
157
|
+
- Bring up the target app
|
|
158
|
+
- Navigate every mapped feature through the real UI
|
|
159
|
+
- Exercise mapped states through declared adapter actions
|
|
160
|
+
- Inspect state without forcing the result
|
|
161
|
+
- Capture screenshots
|
|
162
|
+
- Start and stop a recording
|
|
163
|
+
- Clean up its processes and temporary data
|
|
164
|
+
|
|
165
|
+
If any capability is missing, leave the repro automation disabled. It must fail closed rather than claim a reproduction it did not perform.
|
|
166
|
+
|
|
167
|
+
## 7. Prepare the live automations
|
|
168
|
+
|
|
169
|
+
Ask whether this is first-time creation or configuration of existing automations.
|
|
170
|
+
|
|
171
|
+
Read `../../FOR_AGENTS.md` from the copied pack as the primary user-intent source for either path. Use it to understand the two triggers, tools, instructions, outcomes, and shared rules.
|
|
172
|
+
|
|
173
|
+
### First-time creation
|
|
174
|
+
|
|
175
|
+
Create one automation at a time.
|
|
176
|
+
|
|
177
|
+
For each automation:
|
|
178
|
+
|
|
179
|
+
1. Read the matching copied prompt template as secondary internal source material.
|
|
180
|
+
2. Turn `FOR_AGENTS.md`, the finished Benny configuration, and the template intent into a complete natural-language request.
|
|
181
|
+
3. Tell the live prompt to read and follow its exact committed operational file under `.claude/automations/benny/`.
|
|
182
|
+
4. Use the stable repository-relative path, not a plugin source or cache path. Do not copy the operational file contents into the live prompt.
|
|
183
|
+
5. Read and follow the built-in `automate` skill.
|
|
184
|
+
6. Let `automate` discover Slack channels, the repository, and connected integrations.
|
|
185
|
+
7. Let `automate` confirm that the copied pack and any referenced configuration files are committed in the same repository where the automation will run.
|
|
186
|
+
8. Let `automate` show its draft table, obtain approval, ask readiness, and open the Automations editor.
|
|
187
|
+
9. Finish the editor handoff for this automation before starting the next one.
|
|
188
|
+
|
|
189
|
+
Give `automate` this complete triage intent, filled from configuration:
|
|
190
|
+
|
|
191
|
+
- Name `benny-triage`.
|
|
192
|
+
- Read and follow `.claude/automations/benny/skills/triage-issue-reports/SKILL.md` for every run.
|
|
193
|
+
- Trigger on each new top-level report in the configured source Slack channel.
|
|
194
|
+
- Read the triggering thread and reply only inside it.
|
|
195
|
+
- Use the configured issue-tracker integration.
|
|
196
|
+
- Classify, inspect evidence, trace cause, dedupe, and create only clear new bugs.
|
|
197
|
+
- End one thread-only verdict with the configured `[benny:bug]`, `[benny:performance]`, or `[benny:other]` marker and optional tracker URL.
|
|
198
|
+
- Never post a source-channel root message.
|
|
199
|
+
|
|
200
|
+
After the triage editor handoff is complete, give `automate` this complete repro and fix intent:
|
|
201
|
+
|
|
202
|
+
- Name `benny-reproduce`.
|
|
203
|
+
- Read and follow `.claude/automations/benny/skills/reproduce-and-fix-issues/SKILL.md` for every run.
|
|
204
|
+
- Trigger on the same new top-level reports in the configured source Slack channel.
|
|
205
|
+
- Use the configured repository and default branch.
|
|
206
|
+
- Read the source thread and reply only inside it.
|
|
207
|
+
- Include pull request creation and the configured tracker, control-adapter, and feature-map requirements. Paraphrase mapped user paths and states unless `automate` confirms an eligible committed file in the same repository.
|
|
208
|
+
- Wait for a trusted triage marker before acting.
|
|
209
|
+
- Reproduce the exact symptom twice through the mapped real UI and capture evidence.
|
|
210
|
+
- Verify an existing fix without authoring over it.
|
|
211
|
+
- Attempt an optional bounded fix only after confirmed repro, then open a draft pull request when proof and checks pass.
|
|
212
|
+
- Never post a source-channel root message.
|
|
213
|
+
|
|
214
|
+
Do not duplicate `automate`'s Slack, repository, integration, completeness, authentication, draft-review, approval, readiness, or editor-handoff work.
|
|
215
|
+
|
|
216
|
+
### Existing automations
|
|
217
|
+
|
|
218
|
+
The built-in `automate` skill is creation-only. Do not use it to search for, inspect, or update existing automations.
|
|
219
|
+
|
|
220
|
+
Finish configuration, routing, control-adapter, and feature-map validation. Then give the user this concise editor checklist.
|
|
221
|
+
|
|
222
|
+
For the existing triage automation, update:
|
|
223
|
+
|
|
224
|
+
- Name and description
|
|
225
|
+
- Direct instruction to read `.claude/automations/benny/skills/triage-issue-reports/SKILL.md`
|
|
226
|
+
- New top-level Slack report trigger and source channel
|
|
227
|
+
- Slack thread read and reply capabilities
|
|
228
|
+
- Issue-tracker integration
|
|
229
|
+
- Paraphrased triage instructions, thread-only rule, and Benny verdict markers
|
|
230
|
+
|
|
231
|
+
For the existing repro automation, update:
|
|
232
|
+
|
|
233
|
+
- Name and description
|
|
234
|
+
- Direct instruction to read `.claude/automations/benny/skills/reproduce-and-fix-issues/SKILL.md`
|
|
235
|
+
- Matching Slack trigger and source channel
|
|
236
|
+
- Repository and default branch
|
|
237
|
+
- Slack thread read and reply capabilities
|
|
238
|
+
- Pull request action
|
|
239
|
+
- Tracker, control-adapter, and feature-map requirements
|
|
240
|
+
- Paraphrased marker wait, evidence, verification, and bounded-fix instructions
|
|
241
|
+
|
|
242
|
+
Ask the user to update each existing automation directly in its Automations editor. Do not create replacements or duplicates.
|
|
243
|
+
|
|
244
|
+
### Creation boundary
|
|
245
|
+
|
|
246
|
+
Never call a direct automation backend service or backend automation tool, and never build or open an editor protocol deep link. For new automations, the only finish path is the host's own reviewed automation editor: the `schedule` skill on Claude Code, `~/.codex/automations` on Codex.
|
|
247
|
+
|
|
248
|
+
Do not enable either automation until the thread-safety test passes after the editor save.
|
|
249
|
+
|
|
250
|
+
## 8. Test thread safety
|
|
251
|
+
|
|
252
|
+
Use a test channel or a harmless test report.
|
|
253
|
+
|
|
254
|
+
Before testing, confirm that the target repository's `.claude/settings.json`, `.claude/automations/benny/`, and every referenced secret-free configuration file are committed on the branch used by the automation checkout. Confirm that both live prompts point at their exact committed operational files. If any check fails, stop. Tell the user that the automation cannot be enabled yet.
|
|
255
|
+
|
|
256
|
+
Verify:
|
|
257
|
+
|
|
258
|
+
1. Triage stores the root `thread_ts` and posts exactly one verdict as a reply.
|
|
259
|
+
2. The verdict contains one configured marker.
|
|
260
|
+
3. Repro accepts the marker only from the configured triage identity.
|
|
261
|
+
4. Repro keeps the same immutable source coordinates.
|
|
262
|
+
5. No source-channel root message appears.
|
|
263
|
+
6. A delegated worker cannot use any Slack write action.
|
|
264
|
+
7. Missing coordinates, a deleted parent, or a failed preflight produces no post and no tracker issue.
|
|
265
|
+
|
|
266
|
+
Enable normal traffic only after all seven checks pass.
|