@jiroamato/pstack 0.0.0-stage → 0.16.0
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 +21 -0
- package/README.md +79 -2
- package/bin/pstack.js +95 -0
- package/lib/install.js +121 -0
- package/lib/prompt.js +77 -0
- package/lib/targets.js +43 -0
- package/package.json +38 -5
- package/pstack/.claude-plugin/plugin.json +26 -0
- package/pstack/.codex-plugin/plugin.json +36 -0
- package/pstack/LICENSE +21 -0
- package/pstack/LICENSE-cursor-team-kit +21 -0
- package/pstack/NOTICE +8 -0
- package/pstack/README.md +307 -0
- package/pstack/agents/comment-sicko.md +34 -0
- package/pstack/agents/poteto-agent.md +10 -0
- package/pstack/automations/benny/FOR_AGENTS.md +92 -0
- package/pstack/automations/benny/README.md +28 -0
- package/pstack/automations/benny/skills/reproduce-and-fix-issues/SKILL.md +313 -0
- package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/control-adapter.md +169 -0
- package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/feature-map.example.md +205 -0
- package/pstack/automations/benny/skills/reproduce-and-fix-issues/references/verify-existing-fix.md +93 -0
- package/pstack/automations/benny/skills/setup-benny/SKILL.md +271 -0
- package/pstack/automations/benny/skills/triage-issue-reports/SKILL.md +240 -0
- package/pstack/automations/benny/skills/triage-issue-reports/references/routing.example.md +61 -0
- package/pstack/automations/benny/templates/configuration.example.yaml +84 -0
- package/pstack/automations/benny/templates/reproduce-automation-prompt.md +33 -0
- package/pstack/automations/benny/templates/triage-automation-prompt.md +39 -0
- package/pstack/codex/agents/comment-sicko.toml +36 -0
- package/pstack/codex/agents/poteto-agent.toml +11 -0
- package/pstack/docs/guide/01-setup.md +80 -0
- package/pstack/docs/guide/02-poteto-mode.md +131 -0
- package/pstack/docs/guide/03-understand.md +79 -0
- package/pstack/docs/guide/04-design.md +133 -0
- package/pstack/docs/guide/05-build-and-clean.md +83 -0
- package/pstack/docs/guide/06-verify-and-ship.md +130 -0
- package/pstack/docs/guide/07-overnight.md +120 -0
- package/pstack/docs/guide/08-principles.md +72 -0
- package/pstack/docs/guide/09-make-it-yours.md +100 -0
- package/pstack/docs/guide/10-recipes-and-pitfalls.md +156 -0
- package/pstack/docs/guide/README.md +38 -0
- package/pstack/skills/architect/SKILL.md +85 -0
- package/pstack/skills/architect/agents/openai.yaml +2 -0
- package/pstack/skills/architect/references/design-red-flags.md +57 -0
- package/pstack/skills/architect/references/rationale-template.md +35 -0
- package/pstack/skills/architect/references/runner-prompt.md +20 -0
- package/pstack/skills/arena/SKILL.md +75 -0
- package/pstack/skills/arena/agents/openai.yaml +2 -0
- package/pstack/skills/automate-me/SKILL.md +104 -0
- package/pstack/skills/automate-me/agents/openai.yaml +2 -0
- package/pstack/skills/benchmark-checklist/SKILL.md +39 -0
- package/pstack/skills/benchmark-checklist/agents/openai.yaml +2 -0
- package/pstack/skills/blast-radius/SKILL.md +52 -0
- package/pstack/skills/blast-radius/agents/openai.yaml +2 -0
- package/pstack/skills/bro/SKILL.md +7 -0
- package/pstack/skills/bro/agents/openai.yaml +2 -0
- package/pstack/skills/control-cli/SKILL.md +55 -0
- package/pstack/skills/control-cli/agents/openai.yaml +2 -0
- package/pstack/skills/control-ui/SKILL.md +72 -0
- package/pstack/skills/control-ui/agents/openai.yaml +2 -0
- package/pstack/skills/correct/SKILL.md +34 -0
- package/pstack/skills/correct/agents/openai.yaml +2 -0
- package/pstack/skills/create-verification-skill/SKILL.md +47 -0
- package/pstack/skills/create-verification-skill/agents/openai.yaml +2 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/README.md +47 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/create-note.md +39 -0
- package/pstack/skills/create-verification-skill/references/feature-map-example/search.md +45 -0
- package/pstack/skills/deslop/SKILL.md +30 -0
- package/pstack/skills/deslop/agents/openai.yaml +2 -0
- package/pstack/skills/figure-it-out/SKILL.md +55 -0
- package/pstack/skills/figure-it-out/agents/openai.yaml +2 -0
- package/pstack/skills/how/SKILL.md +58 -0
- package/pstack/skills/how/agents/openai.yaml +2 -0
- package/pstack/skills/how/references/explainer-prompt.md +55 -0
- package/pstack/skills/how/references/explorer-prompt.md +52 -0
- package/pstack/skills/interrogate/SKILL.md +111 -0
- package/pstack/skills/interrogate/agents/openai.yaml +2 -0
- package/pstack/skills/interrogate/references/code-quality-review.md +47 -0
- package/pstack/skills/interrogate/references/lead-judgment.md +58 -0
- package/pstack/skills/interrogate/references/reviewer-prompt.md +70 -0
- package/pstack/skills/interrogate/references/rubric.md +77 -0
- package/pstack/skills/kiss/SKILL.md +90 -0
- package/pstack/skills/kiss/agents/openai.yaml +2 -0
- package/pstack/skills/kiss/references/assess.md +110 -0
- package/pstack/skills/kiss/references/principles.md +138 -0
- package/pstack/skills/maintain-verification-skill/SKILL.md +41 -0
- package/pstack/skills/maintain-verification-skill/agents/openai.yaml +2 -0
- package/pstack/skills/make-bot-ui/SKILL.md +289 -0
- package/pstack/skills/make-bot-ui/agents/openai.yaml +2 -0
- package/pstack/skills/no-comments/SKILL.md +24 -0
- package/pstack/skills/no-comments/agents/openai.yaml +2 -0
- package/pstack/skills/poteto-help/SKILL.md +156 -0
- package/pstack/skills/poteto-help/agents/openai.yaml +2 -0
- package/pstack/skills/poteto-help/references/prompting.md +51 -0
- package/pstack/skills/poteto-help/references/recipes.md +47 -0
- package/pstack/skills/poteto-mode/SKILL.md +143 -0
- package/pstack/skills/poteto-mode/agents/openai.yaml +2 -0
- package/pstack/skills/poteto-mode/playbooks/authoring-a-skill.md +12 -0
- package/pstack/skills/poteto-mode/playbooks/autonomous-run.md +13 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-full.md +13 -0
- package/pstack/skills/poteto-mode/playbooks/autopilot-stack.md +16 -0
- package/pstack/skills/poteto-mode/playbooks/babysit.md +29 -0
- package/pstack/skills/poteto-mode/playbooks/bug-fix.md +15 -0
- package/pstack/skills/poteto-mode/playbooks/eval.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/feature.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/hillclimb.md +21 -0
- package/pstack/skills/poteto-mode/playbooks/investigation.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/multi-phase-plan.md +155 -0
- package/pstack/skills/poteto-mode/playbooks/opening-a-pr.md +38 -0
- package/pstack/skills/poteto-mode/playbooks/orchestrate.md +114 -0
- package/pstack/skills/poteto-mode/playbooks/pause-safely.md +10 -0
- package/pstack/skills/poteto-mode/playbooks/perf-issue.md +25 -0
- package/pstack/skills/poteto-mode/playbooks/prototype.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/refactoring.md +16 -0
- package/pstack/skills/poteto-mode/playbooks/runtime-forensics.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/session-pickup.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/shipping.md +17 -0
- package/pstack/skills/poteto-mode/playbooks/trace-forensics.md +14 -0
- package/pstack/skills/poteto-mode/playbooks/visual-parity.md +11 -0
- package/pstack/skills/poteto-mode/playbooks/worktree-cleanup.md +14 -0
- package/pstack/skills/poteto-mode/references/bugbot-triage.md +142 -0
- package/pstack/skills/poteto-mode/scripts/bootstrap.ts +62 -0
- package/pstack/skills/poteto-mode/scripts/bun.lock +67 -0
- package/pstack/skills/poteto-mode/scripts/check-plan.mjs +185 -0
- package/pstack/skills/poteto-mode/scripts/orch/orch.test.ts +634 -0
- package/pstack/skills/poteto-mode/scripts/orch/orch.ts +578 -0
- package/pstack/skills/poteto-mode/scripts/orch/store.ts +1607 -0
- package/pstack/skills/poteto-mode/scripts/package.json +16 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.test.ts +224 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/cli.ts +223 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/fakes.test-helper.ts +118 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.test.ts +306 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/github.ts +699 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.test.ts +420 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/policy.ts +832 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/render.ts +169 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/tsconfig.json +13 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.compile.ts +93 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/types.ts +401 -0
- package/pstack/skills/poteto-mode/scripts/watch-pr/watch-pr +6 -0
- package/pstack/skills/poteto-mode/scripts/worktree-audit.sh +92 -0
- package/pstack/skills/principle-attack-the-premise/SKILL.md +23 -0
- package/pstack/skills/principle-attack-the-premise/agents/openai.yaml +2 -0
- package/pstack/skills/principle-boundary-discipline/SKILL.md +34 -0
- package/pstack/skills/principle-boundary-discipline/agents/openai.yaml +2 -0
- package/pstack/skills/principle-build-the-lever/SKILL.md +23 -0
- package/pstack/skills/principle-build-the-lever/agents/openai.yaml +2 -0
- package/pstack/skills/principle-encode-lessons-in-structure/SKILL.md +31 -0
- package/pstack/skills/principle-encode-lessons-in-structure/agents/openai.yaml +2 -0
- package/pstack/skills/principle-exhaust-the-design-space/SKILL.md +21 -0
- package/pstack/skills/principle-exhaust-the-design-space/agents/openai.yaml +2 -0
- package/pstack/skills/principle-experience-first/SKILL.md +19 -0
- package/pstack/skills/principle-experience-first/agents/openai.yaml +2 -0
- package/pstack/skills/principle-explain-the-number/SKILL.md +23 -0
- package/pstack/skills/principle-explain-the-number/agents/openai.yaml +2 -0
- package/pstack/skills/principle-fix-root-causes/SKILL.md +23 -0
- package/pstack/skills/principle-fix-root-causes/agents/openai.yaml +2 -0
- package/pstack/skills/principle-foundational-thinking/SKILL.md +21 -0
- package/pstack/skills/principle-foundational-thinking/agents/openai.yaml +2 -0
- package/pstack/skills/principle-guard-the-context-window/SKILL.md +16 -0
- package/pstack/skills/principle-guard-the-context-window/agents/openai.yaml +2 -0
- package/pstack/skills/principle-laziness-protocol/SKILL.md +18 -0
- package/pstack/skills/principle-laziness-protocol/agents/openai.yaml +2 -0
- package/pstack/skills/principle-make-operations-idempotent/SKILL.md +24 -0
- package/pstack/skills/principle-make-operations-idempotent/agents/openai.yaml +2 -0
- package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md +22 -0
- package/pstack/skills/principle-migrate-callers-then-delete-legacy-apis/agents/openai.yaml +2 -0
- package/pstack/skills/principle-minimize-reader-load/SKILL.md +23 -0
- package/pstack/skills/principle-minimize-reader-load/agents/openai.yaml +2 -0
- package/pstack/skills/principle-model-the-domain/SKILL.md +26 -0
- package/pstack/skills/principle-model-the-domain/agents/openai.yaml +2 -0
- package/pstack/skills/principle-never-block-on-the-human/SKILL.md +20 -0
- package/pstack/skills/principle-never-block-on-the-human/agents/openai.yaml +2 -0
- package/pstack/skills/principle-outcome-oriented-execution/SKILL.md +21 -0
- package/pstack/skills/principle-outcome-oriented-execution/agents/openai.yaml +2 -0
- package/pstack/skills/principle-prove-it-works/SKILL.md +22 -0
- package/pstack/skills/principle-prove-it-works/agents/openai.yaml +2 -0
- package/pstack/skills/principle-redesign-from-first-principles/SKILL.md +16 -0
- package/pstack/skills/principle-redesign-from-first-principles/agents/openai.yaml +2 -0
- package/pstack/skills/principle-separate-before-serializing-shared-state/SKILL.md +16 -0
- package/pstack/skills/principle-separate-before-serializing-shared-state/agents/openai.yaml +2 -0
- package/pstack/skills/principle-sequence-verifiable-units/SKILL.md +17 -0
- package/pstack/skills/principle-sequence-verifiable-units/agents/openai.yaml +2 -0
- package/pstack/skills/principle-subtract-before-you-add/SKILL.md +21 -0
- package/pstack/skills/principle-subtract-before-you-add/agents/openai.yaml +2 -0
- package/pstack/skills/principle-test-behavior-not-implementation/SKILL.md +25 -0
- package/pstack/skills/principle-test-behavior-not-implementation/agents/openai.yaml +2 -0
- package/pstack/skills/principle-type-system-discipline/SKILL.md +31 -0
- package/pstack/skills/principle-type-system-discipline/agents/openai.yaml +2 -0
- package/pstack/skills/pstack-harness/SKILL.md +67 -0
- package/pstack/skills/recall/SKILL.md +35 -0
- package/pstack/skills/recall/agents/openai.yaml +2 -0
- package/pstack/skills/reflect/SKILL.md +76 -0
- package/pstack/skills/reflect/agents/openai.yaml +2 -0
- package/pstack/skills/reflect/references/divergent-reviewer.md +43 -0
- package/pstack/skills/reflect/references/judgment-reviewer.md +42 -0
- package/pstack/skills/reflect/references/synthesizer.md +56 -0
- package/pstack/skills/reflect/references/tooling-reviewer.md +55 -0
- package/pstack/skills/setup-pstack/SKILL.md +110 -0
- package/pstack/skills/show-me-your-work/SKILL.md +82 -0
- package/pstack/skills/show-me-your-work/agents/openai.yaml +2 -0
- package/pstack/skills/show-me-your-work/references/decision-log-template.tsv +1 -0
- package/pstack/skills/show-me-your-work/scripts/log.sh +42 -0
- package/pstack/skills/swarm/SKILL.md +48 -0
- package/pstack/skills/swarm/agents/openai.yaml +2 -0
- package/pstack/skills/tdd/SKILL.md +44 -0
- package/pstack/skills/tdd/agents/openai.yaml +2 -0
- package/pstack/skills/teach/SKILL.md +21 -0
- package/pstack/skills/teach/agents/openai.yaml +2 -0
- package/pstack/skills/technical-writing/SKILL.md +106 -0
- package/pstack/skills/technical-writing/agents/openai.yaml +2 -0
- package/pstack/skills/typescript-best-practices/SKILL.md +31 -0
- package/pstack/skills/typescript-best-practices/agents/openai.yaml +2 -0
- package/pstack/skills/typescript-best-practices/references/patterns.md +324 -0
- package/pstack/skills/unslop/SKILL.md +67 -0
- package/pstack/skills/unslop/agents/openai.yaml +2 -0
- package/pstack/skills/why/SKILL.md +158 -0
- package/pstack/skills/why/agents/openai.yaml +2 -0
- package/pstack/skills/why/references/epistemics.md +144 -0
- package/pstack/skills/why/references/investigator-prompt.md +103 -0
- package/pstack/skills/why/references/source-playbook.md +17 -0
- package/pstack/skills/why/references/sources/code-archaeology.md +88 -0
- package/pstack/skills/why/references/sources/databricks.md +70 -0
- package/pstack/skills/why/references/sources/datadog.md +99 -0
- package/pstack/skills/why/references/sources/incident-postmortem.md +15 -0
- package/pstack/skills/why/references/sources/linear.md +48 -0
- package/pstack/skills/why/references/sources/notion.md +55 -0
- package/pstack/skills/why/references/sources/sentry.md +100 -0
- package/pstack/skills/why/references/sources/slack.md +54 -0
- package/pstack/skills/why/references/synthesizer-prompt.md +135 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-pstack
|
|
3
|
+
description: Configure which models pstack uses per role and at what reasoning budget, on Claude Code or Codex. Detects your available models, writes the pstack models file that overrides the skill defaults, and on Codex installs the poteto-agent and comment-sicko agents. Use for /setup-pstack, "configure pstack models", "pstack budget", or changing pstack's model choices.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Setup pstack
|
|
7
|
+
|
|
8
|
+
Write `~/.pstack/models.md`, the file that sets pstack's model per role, with one section per harness. On Codex, also install pstack's two agents into `~/.codex/agents/`.
|
|
9
|
+
|
|
10
|
+
Read the **pstack-harness** skill first and detect the harness. Every step below says what differs.
|
|
11
|
+
|
|
12
|
+
## Steps
|
|
13
|
+
|
|
14
|
+
### 1. Detect available models
|
|
15
|
+
|
|
16
|
+
- **Claude Code.** The `Agent` tool's `model` field accepts `opus`, `sonnet`, `haiku`, `fable`, or a full model id. Those aliases are the dependable set. Prefer the aliases over full ids so the file survives model releases. The aliases `inherit-parent` and `auto` are always valid.
|
|
17
|
+
- **Codex.** Read `~/.codex/config.toml` for `model` and `model_reasoning_effort`, and read the model list the `spawn_agent` tool description names when it exposes one. If neither tells you which models the user can run, ask the user to paste the model ids from their `/model` picker. Never write a real model id you have not confirmed is available. The aliases `inherit-parent` and `auto` are always valid.
|
|
18
|
+
|
|
19
|
+
### 2. Load current state
|
|
20
|
+
|
|
21
|
+
The default role-to-model mapping is the file shape shown in step 5. If `~/.pstack/models.md` already exists, read it. Treat its `# budget` line and the role values in the section for the current harness as the current choices. Leave the other harness's section untouched. Otherwise start from the defaults. A line whose role is not in step 5, such as `how critics`, is from a retired role. Drop it.
|
|
22
|
+
|
|
23
|
+
### 3. Budget, map, and confirm
|
|
24
|
+
|
|
25
|
+
**(a) Ask for a budget.** Prefer the harness **ask** tool over free text. Offer these four options with these exact labels, and name the current budget when the file records one. With no file, say that `large` matches the skill defaults.
|
|
26
|
+
|
|
27
|
+
- `unlimited — max reasoning`
|
|
28
|
+
- `large — xhigh reasoning`
|
|
29
|
+
- `medium — high reasoning`
|
|
30
|
+
- `small — medium reasoning`
|
|
31
|
+
|
|
32
|
+
**(b) Apply it.** Build the working table from the skill defaults, and on a re-run keep any role you changed by model, list, or alias (`inherit-parent`, `auto`).
|
|
33
|
+
|
|
34
|
+
- **Codex.** A role value is `<model>@<effort>`. `unlimited`, `large`, `medium`, and `small` set the effort of every real value, panel entries included, to `max`, `xhigh`, `high`, or `medium`. Every current Codex model accepts those four levels. `inherit-parent` and `auto` do not change. So `unlimited` turns `gpt-6-astra@xhigh` into `gpt-6-astra@max`, and `small` turns `gpt-6-luna@xhigh` into `gpt-6-luna@medium`.
|
|
35
|
+
- **Claude Code.** Effort is session-wide, not per spawn, so a role value is a bare model alias and the budget does not rewrite the roles. Instead, record the budget and tell the user the matching session setting: `/effort max`, `/effort xhigh`, `/effort high`, or `/effort medium` in an interactive session, or `"effortLevel"` in `~/.claude/settings.json` to make it stick. Do not write settings.json yourself.
|
|
36
|
+
|
|
37
|
+
**(c) Show the roles and confirm.** Show every role with its model, marking any real model not in the detected set as needing a choice. Also list each line step 2 dropped. Ask whether to accept as-is or change specific roles, offering the detected models plus `inherit-parent` and `auto` (both mean: this role runs on the parent chat model) as the options. Prefer the harness **ask** tool over free text. For panel roles (arena runners, architect runners, interrogate reviewers) the value is a list, and one subagent runs per entry, alias entries included, so the list length sets the count. `arena cross-judge pool` is also a list, but Arena selects one value from it whose model differs from the parent's when possible. `swarm workers` is the default model for every worker unless a race or comparison assigns another model per arm.
|
|
38
|
+
|
|
39
|
+
### 4. Validate
|
|
40
|
+
|
|
41
|
+
Every real model written must be in the detected set. `inherit-parent` and `auto` always pass. If a chosen real model is not available, stop and ask again.
|
|
42
|
+
|
|
43
|
+
### 5. Write the file
|
|
44
|
+
|
|
45
|
+
Write `~/.pstack/models.md`. Create the directory when it is missing. Rewrite the section for the current harness in full so re-runs stay idempotent, and keep the other section as it was, or write its defaults when the file is new. Shape:
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
# pstack model configuration. One line per role under each harness section. Delete a line to fall back to the skill default.
|
|
49
|
+
# `inherit-parent` or `auto` as a value: the role runs on the parent chat model (omit `model`). Alias entries in a panel list still count toward its fan-out.
|
|
50
|
+
# budget: large (xhigh)
|
|
51
|
+
|
|
52
|
+
## claude-code
|
|
53
|
+
# Values: opus, sonnet, haiku, fable, a full model id, or inherit-parent. Effort is session-wide on Claude Code (/effort).
|
|
54
|
+
feature, refactoring: sonnet
|
|
55
|
+
bug-fix: sonnet
|
|
56
|
+
perf-issue: sonnet
|
|
57
|
+
hillclimb: sonnet
|
|
58
|
+
judgment and prose: opus
|
|
59
|
+
hardest tasks: opus
|
|
60
|
+
how explorer: sonnet
|
|
61
|
+
how explainer: opus
|
|
62
|
+
why investigators: sonnet
|
|
63
|
+
why synthesizer: opus
|
|
64
|
+
reflect tooling: sonnet
|
|
65
|
+
reflect judgment, divergent, synthesizer: opus
|
|
66
|
+
arena runners: opus, sonnet
|
|
67
|
+
arena cross-judge pool: opus, sonnet
|
|
68
|
+
swarm workers: sonnet
|
|
69
|
+
architect runners: opus, sonnet
|
|
70
|
+
interrogate reviewers: opus, sonnet
|
|
71
|
+
|
|
72
|
+
## codex
|
|
73
|
+
# Values: <model>@<effort> or inherit-parent. Effort is low, medium, high, xhigh, or max.
|
|
74
|
+
feature, refactoring: gpt-6-luna@xhigh
|
|
75
|
+
bug-fix: gpt-6-luna@xhigh
|
|
76
|
+
perf-issue: gpt-6-luna@xhigh
|
|
77
|
+
hillclimb: gpt-6-luna@xhigh
|
|
78
|
+
judgment and prose: gpt-6-astra@xhigh
|
|
79
|
+
hardest tasks: gpt-6-astra@xhigh
|
|
80
|
+
how explorer: gpt-6-luna@xhigh
|
|
81
|
+
how explainer: gpt-6-astra@xhigh
|
|
82
|
+
why investigators: gpt-6-luna@xhigh
|
|
83
|
+
why synthesizer: gpt-6-astra@xhigh
|
|
84
|
+
reflect tooling: gpt-6-luna@xhigh
|
|
85
|
+
reflect judgment, divergent, synthesizer: gpt-6-astra@xhigh
|
|
86
|
+
arena runners: gpt-6-astra@xhigh, gpt-6-luna@xhigh
|
|
87
|
+
arena cross-judge pool: gpt-6-astra@xhigh, gpt-6-luna@xhigh
|
|
88
|
+
swarm workers: gpt-6-luna@xhigh
|
|
89
|
+
architect runners: gpt-6-astra@xhigh, gpt-6-luna@xhigh
|
|
90
|
+
interrogate reviewers: gpt-6-astra@xhigh, gpt-6-luna@xhigh
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 6. Install the Codex agents (Codex only)
|
|
94
|
+
|
|
95
|
+
Codex plugins cannot ship agent definitions, so install pstack's two agents by hand. Which steps apply depends on the install (harness **Detect the install**):
|
|
96
|
+
|
|
97
|
+
1. **Plugin install** (`../../codex/agents/` exists relative to this file). Copy `../../codex/agents/poteto-agent.toml` and `../../codex/agents/comment-sicko.toml` to `~/.codex/agents/`. Create the directory when it is missing. Overwrite an existing copy of either file. Then replace `<setup-pstack fills this in>` on the `poteto-mode path:` line of `poteto-agent.toml` with the absolute path of `../poteto-mode/SKILL.md` relative to this file.
|
|
98
|
+
**Copied install** (`npx @jiroamato/pstack`, no `../../codex/agents/`). The installer already placed both files in `.codex/agents/` (project) or `~/.codex/agents/` (global), next to the skills directory holding this file, with the path filled in. Edit them in place.
|
|
99
|
+
2. In each file, uncomment `model` and `model_reasoning_effort` and fill them from the `hardest tasks` line for `poteto-agent` and the `judgment and prose` line for `comment-sicko`. For `inherit-parent` or `auto`, delete both lines instead.
|
|
100
|
+
3. Say that the agents load in new Codex sessions.
|
|
101
|
+
|
|
102
|
+
On Claude Code, skip this step. The plugin ships `agents/poteto-agent.md` and `agents/comment-sicko.md`, available as `pstack:poteto-agent` and `pstack:comment-sicko`; a copied install puts the same two files in `.claude/agents/` or `~/.claude/agents/`, available as `poteto-agent` and `comment-sicko`.
|
|
103
|
+
|
|
104
|
+
### 7. Confirm
|
|
105
|
+
|
|
106
|
+
Tell the user the file was written and that it applies to new sessions. Re-running this skill updates it.
|
|
107
|
+
|
|
108
|
+
### 8. Offer a verification skill (optional)
|
|
109
|
+
|
|
110
|
+
Check whether the project has a way to drive the real app for proof (a `verify-*` skill, or an existing harness). If not, offer once: "want a project-local verification skill, so agents can drive the app the way a user does and prove changes work? I can generate one with /create-verification-skill." On yes, invoke `/create-verification-skill` (harness **skill** row). On no, move on without pushing.
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: show-me-your-work
|
|
3
|
+
description: "Keep a reviewable decision trail for long-running or unattended work: a TSV log with one row per decision (what, why, evidence, result). Local by default; commit it when a reviewer needs the trail to trust the result. Use for /show-me-your-work, autonomous or multi-phase runs, or work a human reviews after stepping away."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Show me your work
|
|
8
|
+
|
|
9
|
+
Keep one canonical log.
|
|
10
|
+
|
|
11
|
+
## The format
|
|
12
|
+
|
|
13
|
+
A single TSV file, one row per decision. Cells stay single-line. Evidence is a pointer, not prose.
|
|
14
|
+
|
|
15
|
+
Copy `references/decision-log-template.tsv` (the header row) to start a clean log. Columns:
|
|
16
|
+
|
|
17
|
+
- **ts.** ISO8601 timestamp.
|
|
18
|
+
- **phase.** The phase or workstream.
|
|
19
|
+
- **decision.** What was chosen or done, one line.
|
|
20
|
+
- **why.** The reason in plain words. If a principle drove it, say it plainly, not as a jargon tag.
|
|
21
|
+
- **evidence.** A link or path that proves it: commit SHA, PR number, `file:line`, or an artifact, trace, or screenshot path. Never a paragraph.
|
|
22
|
+
- **result.** The outcome or predicate state: `tests green`, `reverted`, `pixel-diff 0`, `INCONCLUSIVE`, `open`.
|
|
23
|
+
|
|
24
|
+
An example, plain-spoken so a reviewer reads it at a glance.
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
ts phase decision why evidence result
|
|
28
|
+
2026-05-24T09:02:00Z frame counted the work first, about 100 components and roughly 75 hours wanted to know the size before starting a long run commit 3a9f1c2 found 5 things to sort out before starting
|
|
29
|
+
2026-05-24T09:40:00Z harness took screenshots of the old version before changing anything so we can compare old against new and catch any visual change scripts/snapshot.sh, baseline/ saved 120 reference screenshots
|
|
30
|
+
2026-05-24T11:15:00Z widget moved the widget styles over without changing how it looks keep the change small and the result identical commit 7c21e0a, pixel-diff 0 looks identical, tests pass
|
|
31
|
+
2026-05-24T12:30:00Z widget threw out a helper's work because its screenshots were blank checked the real files instead of trusting its summary worktree reset reverted, tightened the instructions for next time
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Logging a row
|
|
35
|
+
|
|
36
|
+
Write each entry the way you'd tell a teammate what you did. Plain words, concrete actions, no AI speak or abstract jargon (the **unslop** skill applies to log text too).
|
|
37
|
+
|
|
38
|
+
Use the helper `scripts/log.sh <logfile> <phase> <decision> <why> <evidence> <result>`. It stamps `ts`, writes the header on first use, strips stray tabs/newlines, and prefixes any cell starting with `=`, `+`, `-`, or `@` with a single quote. A bare `printf` appending a row works too, but mind those same bytes if cells come from generated or user-supplied text.
|
|
39
|
+
|
|
40
|
+
Log decision points and checkpoints, not every action: a fork chosen, a unit completed with its verification result, a pivot or revert with its trigger, a blocker surfaced, a gate fixed. For loop runs, one row per iteration. Skip the trivial and self-evident.
|
|
41
|
+
|
|
42
|
+
A run is one agent conversation, including its later turns and any summary of it. A pickup, a replacement agent, or a new chat starts a new run. When a run adds to a log that already has rows, its first row has phase `start`, and so does its first row after another run's `start` row. So a run that comes back to a log in a later turn first reads the log's last rows to see whether another run wrote since. A `start` row names the `ts` range of the rows before it that this run did not write, and its evidence names this run, such as its agent id. Use phase `start` for nothing else.
|
|
43
|
+
|
|
44
|
+
## Where it lives
|
|
45
|
+
|
|
46
|
+
By default the log is a working artifact, not committed. Keep it at `decisions.tsv` in the work dir, or `.audit/<task-slug>.tsv` when several efforts run at once, and leave it out of git.
|
|
47
|
+
|
|
48
|
+
Commit it only when the work is ambitious enough that a reviewer needs the trail to trust the result.
|
|
49
|
+
|
|
50
|
+
## Rules
|
|
51
|
+
|
|
52
|
+
- Append-only. A wrong call gets a new row that supersedes it. Never edit or delete history.
|
|
53
|
+
- Prefer evidence produced by committed scripts over hand-made one-offs (the **encode-lessons-in-structure** principle skill).
|
|
54
|
+
|
|
55
|
+
## Audit the log against the transcript
|
|
56
|
+
|
|
57
|
+
At the end of the run, before handing back, check the log told the truth. Read this run's transcript from the active workspace's transcript directory (harness **transcripts** row). Stay inside that workspace. Other workspaces' transcripts are unrelated private chats. Walk this run's rows against what actually happened. Each stretch of them begins at one of this run's `start` rows, or at the first row if this run created the log, and ends at the next `start` row of another run:
|
|
58
|
+
|
|
59
|
+
- Check that every row maps to a real decision or action.
|
|
60
|
+
- Check that each row's evidence resolves and shows what the row claims.
|
|
61
|
+
- A fork, pivot, or abandoned approach that shaped the work but isn't logged is a gap. Add it.
|
|
62
|
+
|
|
63
|
+
Correct the log, not the story. The audit never edits or removes a row, even an invented one. When a row records neither a real decision nor a real action, or its claim or evidence is wrong, add a row that supersedes it with what actually happened and a pointer that resolves. This audit does not check rows outside this run's stretches. If this run's own work shows one of them is wrong, supersede it like any wrong call.
|
|
64
|
+
|
|
65
|
+
## Cross-model review of the trail
|
|
66
|
+
|
|
67
|
+
Before handing back, spawn a subagent on a different model family from the one that did the work. Self-review is not a substitute. The subagent reads the audit trail and the run's transcript, then flags what the user should pay attention to. Not a redo of the work, a scan for what's suboptimal or risky.
|
|
68
|
+
|
|
69
|
+
- Decisions logged with weak or absent evidence.
|
|
70
|
+
- Verification steps skipped or claimed without proof in the transcript.
|
|
71
|
+
- Choices that look risky in hindsight (premature, scope-creeping, papering over a symptom).
|
|
72
|
+
- Gaps the user would otherwise miss on a casual skim.
|
|
73
|
+
|
|
74
|
+
Every reply for a run that produced a trail ends with an "Attention" section. Lead with the reviewer's model on its own line (`reviewed by <model>`), then list each flag pointing to specific rows or moments. "No flags" is a valid value. The model name is not.
|
|
75
|
+
|
|
76
|
+
## Reviewing the trail
|
|
77
|
+
|
|
78
|
+
Read top to bottom, follow the evidence pointers, spot-check. GitHub renders a committed TSV as a table. `column -s$'\t' -t decisions.tsv` renders it in a terminal.
|
|
79
|
+
|
|
80
|
+
## Composing this skill
|
|
81
|
+
|
|
82
|
+
Other skills route their audit trail here instead of inventing one. Reference it by name and let it own the format. Don't restate the columns.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ts phase decision why evidence result
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Append a well-formed row to a show-me-your-work decision log (TSV).
|
|
3
|
+
# Usage: log.sh <logfile> <phase> <decision> <why> <evidence> <result>
|
|
4
|
+
set -euo pipefail
|
|
5
|
+
|
|
6
|
+
if [ "$#" -ne 6 ]; then
|
|
7
|
+
printf 'usage: log.sh <logfile> <phase> <decision> <why> <evidence> <result>\n' >&2
|
|
8
|
+
exit 1
|
|
9
|
+
fi
|
|
10
|
+
|
|
11
|
+
logfile="$1"
|
|
12
|
+
shift
|
|
13
|
+
|
|
14
|
+
logdir="$(dirname "$logfile")"
|
|
15
|
+
if [ -n "$logdir" ] && [ "$logdir" != "." ] && [ ! -d "$logdir" ]; then
|
|
16
|
+
mkdir -p "$logdir"
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
# Use `>>` here, never `>`. A network mount can fail this test for a log
|
|
20
|
+
# that exists. Then the cost is one stray header line, not the rows.
|
|
21
|
+
if [ ! -s "$logfile" ]; then
|
|
22
|
+
printf 'ts\tphase\tdecision\twhy\tevidence\tresult\n' >> "$logfile"
|
|
23
|
+
fi
|
|
24
|
+
|
|
25
|
+
ts="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
|
26
|
+
# Strip tabs/newlines/CR so cells stay on one line, and prefix any cell
|
|
27
|
+
# whose first char a spreadsheet would parse as a formula (=, +, -, @)
|
|
28
|
+
# with a single quote. The skill expects this log to be read in
|
|
29
|
+
# spreadsheets, so attacker-controlled evidence (PR titles, filenames,
|
|
30
|
+
# generated text) must not become formula execution when a reviewer
|
|
31
|
+
# opens the file.
|
|
32
|
+
clean() {
|
|
33
|
+
local v
|
|
34
|
+
v=$(printf '%s' "$1" | tr '\t\n\r' ' ')
|
|
35
|
+
case "$v" in
|
|
36
|
+
=*|+*|-*|@*) printf "'%s" "$v" ;;
|
|
37
|
+
*) printf '%s' "$v" ;;
|
|
38
|
+
esac
|
|
39
|
+
}
|
|
40
|
+
printf '%s\t%s\t%s\t%s\t%s\t%s\n' \
|
|
41
|
+
"$ts" "$(clean "$1")" "$(clean "$2")" "$(clean "$3")" "$(clean "$4")" "$(clean "$5")" \
|
|
42
|
+
>> "$logfile"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: swarm
|
|
3
|
+
description: "Fan out N parallel workers, drain them, and return one report. Use for /swarm, 'swarm this', or parallel coverage, races, gauntlets, and exploration."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Swarm
|
|
8
|
+
|
|
9
|
+
Fan out N parallel isolated workers. They may cover separate slices, race the same brief, or mix both. The parent waits, aggregates, and returns one report.
|
|
10
|
+
|
|
11
|
+
## Start
|
|
12
|
+
|
|
13
|
+
Open a todolist with one entry per phase before launching anything.
|
|
14
|
+
|
|
15
|
+
1. Frame
|
|
16
|
+
2. Fan out
|
|
17
|
+
3. Aggregate
|
|
18
|
+
4. Report
|
|
19
|
+
|
|
20
|
+
## Phase A: Frame
|
|
21
|
+
|
|
22
|
+
1. State the done predicate and the artifact or report the swarm must return.
|
|
23
|
+
2. Choose the shape. Partition into slices, race N workers on identical briefs, or mix both. For a race or mixed shape, declare `first pass`, `rank all`, or `best-of` before spawning.
|
|
24
|
+
3. Set N from the user or derive it from the shape. N is total workers, not the harness's concurrency limit.
|
|
25
|
+
4. Pick the worker model from the `swarm workers` line in `~/.pstack/models.md` (harness **models file** row). If the file or that line is missing, use the code tier default (harness **tiers** row). For `auto` or `inherit-parent`, omit `model` so the workers run on the parent model. If the spawn rejects a model, use the default and say so. If it rejects the default, use the closest valid model of the same family from its error message. For a model race, name each arm's model up front.
|
|
26
|
+
5. Give each worker its own writable output when it writes. When workers verify or measure commits, each brief names the exact SHAs. A measurement brief also names the method (sample count, what one sample is, order). The worker records both in its result.
|
|
27
|
+
|
|
28
|
+
## Phase B: Fan out
|
|
29
|
+
|
|
30
|
+
Spawn all N workers in one message (harness **spawn** row) with `subagent_type: general-purpose` (harness **default agent** row), isolation per the harness **isolation** row, `run_in_background: true`, and the step 4 model, left unset for `auto` or `inherit-parent`. Skip isolation only when the worker needs shared state on the user's machine, such as a running dev server.
|
|
31
|
+
|
|
32
|
+
When a worker must start from a non-default pushed branch, name that branch in its brief (harness **isolation** row).
|
|
33
|
+
|
|
34
|
+
Every brief stands alone. Include the goal, scope, exact slice or race arm, how to verify, and what to report. Reports use `PASS`, `ISSUES`, or `BLOCKED` with evidence. A worker that can prove a defect reports `ISSUES` and lists every issue it can prove, not only the first.
|
|
35
|
+
|
|
36
|
+
For a code-writing worker, include a call to load [`deslop`](../deslop/SKILL.md) before each commit and its final code handoff. For workers that drive web, IDE, or Electron behavior, include [`control-ui`](../control-ui/SKILL.md); for CLI/TUI driving, [`control-cli`](../control-cli/SKILL.md). Use the harness **skill** and **verification harness** rows, and include any project verification skill. Read-only workers do not clean or commit the target diff.
|
|
37
|
+
|
|
38
|
+
If a worker drops out, proceed with N-1 and note it.
|
|
39
|
+
|
|
40
|
+
## Phase C: Aggregate
|
|
41
|
+
|
|
42
|
+
Read the terminal results. Drop a result that does not record the SHAs and method its brief names, and respawn that worker once. After a second miss, record a gap. A gap does not count as a pass. For coverage, every required slice needs a result. For a race, apply the selection rule declared up front. Use first pass, rank all, or best-of. Do not paste raw worker dumps.
|
|
43
|
+
|
|
44
|
+
Keep a compact result table, one-line evidenced issues, and explicit gaps or dropouts.
|
|
45
|
+
|
|
46
|
+
## Phase D: Report
|
|
47
|
+
|
|
48
|
+
Return one consolidated in-chat report with the table, issue one-liners, gaps or dropouts, and the race rule when used.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd
|
|
3
|
+
description: "Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TDD Bug Fix
|
|
8
|
+
|
|
9
|
+
When fixing a bug with a clear, cheap test path, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it.
|
|
10
|
+
|
|
11
|
+
Do not force a test when it would be impractical. If the available test would require broad harness setup, brittle mocks, slow end-to-end infrastructure, production-only state, vague reproduction steps, or large unrelated fixture churn, skip adding a new test and use the closest useful verification instead.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. **Understand the bug.** Identify the intended behavior, current behavior, affected path, and smallest observable reproduction.
|
|
16
|
+
For a web, IDE, or Electron repro, load [`control-ui`](../control-ui/SKILL.md); for CLI/TUI, load [`control-cli`](../control-cli/SKILL.md). Read [`pstack-harness`](../pstack-harness/SKILL.md) for invocation and use any project verification skill for app-specific steps. A unit test supplements the affected user flow.
|
|
17
|
+
2. **Choose the narrowest executable check.** Prefer the closest unit, component, integration, or regression test already used for that codepath. If no practical test path is obvious, do not create one from scratch just to satisfy the workflow.
|
|
18
|
+
3. **Write the failing test first.** Add the smallest focused test that would have caught the bug. The test should encode intended behavior, not mirror the current implementation.
|
|
19
|
+
4. **Run the new test before fixing.** Confirm it fails for the intended reason. If it passes or fails for an unrelated reason, correct the test or reproduction before editing the implementation.
|
|
20
|
+
5. **Fix the bug.** Make the smallest production change that satisfies the intended behavior while preserving nearby contracts.
|
|
21
|
+
6. **Rerun the regression test.** Confirm the test now passes.
|
|
22
|
+
7. **Clean and verify the final diff.** Load [`deslop`](../deslop/SKILL.md) before committing or handing back the fix. Rerun the affected test after cleanup and repeat the original UI or CLI/TUI repro with the same loaded driver.
|
|
23
|
+
|
|
24
|
+
## If a Failing Test Is Impractical
|
|
25
|
+
|
|
26
|
+
Use the closest executable regression check instead: a targeted script, manual reproduction command, browser automation, snapshot comparison, log assertion, or focused integration check.
|
|
27
|
+
|
|
28
|
+
Prefer no new test over a bad test. A bad test is one that mostly tests mocks, encodes current implementation details, depends on timing or unrelated global state, needs expensive infrastructure for a small fix, or would be deleted immediately after proving the fix.
|
|
29
|
+
|
|
30
|
+
## Guardrails
|
|
31
|
+
|
|
32
|
+
- Do not change tests merely to match a wrong implementation.
|
|
33
|
+
- Do not weaken existing assertions unless the expected behavior has genuinely changed and the reason is clear.
|
|
34
|
+
- Keep the regression test focused on the bug. Avoid broad fixture churn or unrelated coverage expansion.
|
|
35
|
+
- If the bug is flaky, make the test deterministic where possible and document the signal being locked down.
|
|
36
|
+
- If the bug exposes a broader class of failures, first land the focused regression path, then consider additional sibling coverage.
|
|
37
|
+
|
|
38
|
+
## Final Response
|
|
39
|
+
|
|
40
|
+
Report the evidence, not just the outcome:
|
|
41
|
+
|
|
42
|
+
- Name the failing-before test or executable check and the failure it produced.
|
|
43
|
+
- Name the passing-after test run and any nearby validation performed.
|
|
44
|
+
- If failing-before evidence could not be demonstrated, state why and describe the closest regression check used instead.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: teach
|
|
3
|
+
description: "Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Teach
|
|
8
|
+
|
|
9
|
+
**You explain what a thing is, how it works, and why it's built that way, in one plain account at the person's pace. The goal is that they understand it, not that you change anything.**
|
|
10
|
+
|
|
11
|
+
Teach sits on top of `how` and `why`. Get your bearings on what the work is and what it touches, then run `how` for how it works and `why` for why it's that way. Those are real skill invocations that do their own digging. Blend what they find into one plain explanation, lead with what matters to the person, and go deeper when they ask. Reword freely for teaching, with one exception. Keep `why`'s confidence language intact (its hedges are findings, not style).
|
|
12
|
+
|
|
13
|
+
1. Decide the few things they should walk away understanding. Choose them from why they're asking (about to change it, reviewing it, debugging it, new to it) and what they already know, both read from the conversation, not quizzed out of them. Skip what they plainly already know. Put the depth where their question is.
|
|
14
|
+
2. Let `how` and `why` do the work, don't redo it. Read the code yourself to get oriented, then run `how` for how it works and `why` for why. Run them in parallel and combine the results. Match the size to the question. Run both for a subsystem, maybe one is enough for a small change. Keep `why` narrow by default since its full sweep is slow. Put the narrowing in the ask itself (a scoped question, git plus a source or two) so `why` records the skipped categories per its own contract, and widen it only when the reasons are the point.
|
|
15
|
+
3. Start with a plain definition. Name the thing and say what it is in general terms, the way a senior engineer would say it out loud, with its common name if it has one. Then tie it to the case in front of you ("in X, we use this to ...") and build from there: how it works, the deeper reasons, the edge cases. For each part, explain the idea so it clicks: the problem it solves and how it actually works. Walk through what happens as the person does the thing (opens a long chat, scrolls up) when that is what makes it land. Listing functions and constants is reference, not teaching. Don't print framing labels ("the one idea to hold onto", "the thing to walk away with", "the key insight", "at its core", "TL;DR"). Give the smallest complete answer first, a sentence or two, not a dense paragraph, then stop. Add layers when they ask. Never a wall of text.
|
|
16
|
+
4. Keep it a conversation, not a lecture or a performance. Offer to go deeper or move on, and follow their lead. No quizzes. No pacing theater. Don't print "Pause", don't ask them to say it back, don't announce "the sentence to nail", and don't flag a part as important or hard ("here is the part worth slowing down on", "this is the tricky part", "here is where it gets interesting"). Just say it. When you would pause, stop and let them respond. Running one-shot with no live human, deliver it cleanly and put any offer to go deeper at the end.
|
|
17
|
+
5. Show, don't only tell, and build the picture up diagram by diagram. Open the diff, the code, or the debugger when that is the fastest way to land it. Draw when a picture lands faster than words. For anything with three or more moving parts, do not draw one diagram with all of them at once. Draw a short series instead, where each diagram redraws the last and adds a single part, so the reader watches the system assemble. A single all-at-once diagram, especially one saved for the end, is a reference, not teaching. Concretely, to teach a flow from A to B to C, draw it three times. First A to B. Then redraw and add C. Then redraw and add the return edge or the next piece. Match the medium to the idea, and use both kinds when both help. A mermaid diagram fits a flow or structure where the labels carry the meaning. When the idea is spatial, like layout, overlap, scroll position, or a before and after, reach for the image-generation tool and draw it marker-on-whiteboard style with a few short labels, since image models garble long text. Generate that picture, don't settle for describing it in words. The build-up rule holds for generated images too. A single simple point needs no figure.
|
|
18
|
+
|
|
19
|
+
Write every response through the **unslop** skill, in plain spoken English, the way you'd explain it to a colleague. Be tight, not terse. Cut filler and hedging, keep the part that makes it click. State the concrete mechanism, not a metaphor, a framing, or a preview of what is coming. This is the target density: "Virtualization runs in two parts, one for rendering and one for loading from disk. When an item scrolls out past the buffer, both its DOM node and its in-memory data are evicted." Normal sentence case, not all-lowercase. No em dashes. Prefer periods over commas. Keep each sentence to one or two commas. If clauses pile up, split them into separate sentences. Give each concept one name and keep it. Avoid mirror sentences ("A without B, or B without A") and tidy closers ("the rest follows", "it all falls out"). The words in these steps are directions to you, not labels to print. Don't echo the structure as headers or stock phrases.
|
|
20
|
+
|
|
21
|
+
**Reply:** the explanation itself, never a report about what you did or delivered. Lead with the main point, then the plain account of what it is, how it works, and why, and the threads worth chasing with `how` or `why`.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: technical-writing
|
|
3
|
+
description: "Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for /technical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Technical writing
|
|
8
|
+
|
|
9
|
+
The goal is writing a tired engineer understands on the first read. Four layers get you there, one question each: what kind of document is this, how do sentences address the reader, how much does each sentence carry, and can any sentence be read two ways. Apply all four.
|
|
10
|
+
|
|
11
|
+
Three rules sit above the layers:
|
|
12
|
+
|
|
13
|
+
- **Cut every word that does no work.** If the sentence survives without a word, the word goes. "In order to" is "to". "It is important to note that" is nothing.
|
|
14
|
+
- **Use the short, everyday word.** "Use", not "utilize". "Help", not "facilitate". "Do", not "perform". A long word has to buy its length with precision.
|
|
15
|
+
- **When a rule makes a sentence worse, fix the sentence another way or leave it alone.** The rules serve the reader. A sentence that follows every rule and sounds like a machine wrote it has failed.
|
|
16
|
+
|
|
17
|
+
The codebase is the word list. Write the real symbol, file, flag, or command name, not a synonym or a description of it.
|
|
18
|
+
|
|
19
|
+
Don't invent jargon. Use the words a developer would say out loud: "move", "delete", "a budget that only decreases", not "evacuate", "ratchet", or "endgame". A named pattern is fine when the doc says what it means the first time. Propose a new offender and its replacement as an addition to `unslop`'s abstract-metaphor rule in your reply, with the diff. Don't edit that skill.
|
|
20
|
+
|
|
21
|
+
## Vary the rhythm
|
|
22
|
+
|
|
23
|
+
The layers decide what a document says and how much each sentence carries. A doc can obey all of them and still read machine-written: every sentence clipped short, no view anywhere, nothing specific.
|
|
24
|
+
|
|
25
|
+
- Mix sentence lengths on purpose. Short sentences land a point. Longer ones that take their time carry a fact with its condition or consequence.
|
|
26
|
+
- One thought per sentence does not mean one length per sentence. Split the sentence that carries two thoughts. Keep the long sentence that carries one.
|
|
27
|
+
- Have a view where the mode allows it. Explanation weighs trade-offs, so say what you make of them instead of listing pros and cons. Reference stays dry.
|
|
28
|
+
- Be specific over sterile. Not "schema changes can cause issues" but "a column rename fails the build".
|
|
29
|
+
|
|
30
|
+
## Pick the mode first (Diátaxis)
|
|
31
|
+
|
|
32
|
+
One document, one mode. Two questions pick it: does the content inform action (doing) or understanding (thinking), and does it serve learning or work?
|
|
33
|
+
|
|
34
|
+
- Action + learning: **tutorial**.
|
|
35
|
+
- Action + work: **how-to**.
|
|
36
|
+
- Understanding + work: **reference**.
|
|
37
|
+
- Understanding + learning: **explanation**.
|
|
38
|
+
|
|
39
|
+
Use the compass on a whole document or on one sentence.
|
|
40
|
+
|
|
41
|
+
**Tutorial: learning by doing.** You are the teacher. The learner's success is your job, not theirs. Open by saying what the learner will build, not what they will "learn". Every step produces a visible result, early and often. Tell them what they should see: the expected output, the prompt change, the log line. Cut explanation to one clause and a link. Teaching pauses break the lesson. Stay concrete. Write as "we", in commands: "First, do x. Now, do y."
|
|
42
|
+
|
|
43
|
+
**How-to: steps to a goal.** Solve a problem a person has, not an operation the machine can perform. Assume competence. Skip teaching. Action only: no digressions, no background, no completeness for its own sake. Link those instead. Allow forks and judgment: "If you want x, do y." Name the guide by the task: "How to calibrate the radar array", not "Radar array calibration".
|
|
44
|
+
|
|
45
|
+
**Reference: facts for lookup.** Describe. Only describe. No instruction, no persuasion, no opinion. Be dry, complete, and sure. State facts, options, limits, and errors with no hedging. Mirror the structure of the thing described, so code and docs can be navigated together. Put material where readers expect it. Generate from code where possible, so it stays true.
|
|
46
|
+
|
|
47
|
+
**Explanation: understanding and why.** One bounded topic, readable away from the product. Each title should tolerate an implicit "About..." in front. Anchor on a real why question. Give context: design decisions, history, constraints, alternatives. Opinion is allowed here and nowhere else.
|
|
48
|
+
|
|
49
|
+
Don't mix modes: no reference tables inside a tutorial, no tutorial hand-holding inside reference, no arguing inside a how-to. Split and link instead.
|
|
50
|
+
|
|
51
|
+
## Write sentences to the reader (Google developer style)
|
|
52
|
+
|
|
53
|
+
- Talk to the reader as "you", in the present tense. "Will" only for things that genuinely happen later.
|
|
54
|
+
- Say who does what: "the compiler checks", not "is checked". Passive is fine only when the actor is unknown or beside the point.
|
|
55
|
+
- Write instructions as commands: "Click Submit." State facts plainly. Never "should be done".
|
|
56
|
+
- Put the condition before the instruction: "To delete the document, click Delete." The reader skips what does not apply.
|
|
57
|
+
- Put the common case first. Exceptions after.
|
|
58
|
+
- Sound like a knowledgeable friend. No buzzwords, no figurative language, no "please" in instructions, and never "simply", "easy", or "quickly" in a procedure. If it were simple, the reader would not be here.
|
|
59
|
+
- Don't pre-announce ("we will soon support...") and don't start consecutive sentences with the same phrase.
|
|
60
|
+
- Link with words that say where the link goes: the page title or a short description. Never "click here". Prefer a sentence of context on the page over a link off it.
|
|
61
|
+
- Headings carry the point, not just the topic ("Pick the mode first", not "Modes"). Sentence case. A task heading is a bare verb phrase ("Create an instance"). A concept heading is a noun phrase. One h1 per page, no skipped levels.
|
|
62
|
+
- Numbered lists for sequences, bullets for everything else. Introduce a list with a complete sentence. Keep items parallel.
|
|
63
|
+
- Code goes in code font. UI elements go in bold. Use serial commas. Drop "etc." and say up front that a list is partial.
|
|
64
|
+
|
|
65
|
+
## Make statements load one at a time (STE rules)
|
|
66
|
+
|
|
67
|
+
- One instruction per sentence. One thought per sentence everywhere else.
|
|
68
|
+
- Split instructions longer than about 20 words and other sentences longer than about 25.
|
|
69
|
+
- Put the warning or condition before the step it guards: "If hot oil touches your skin, injuries can occur."
|
|
70
|
+
- Keep "the" and "a": "Remove backup file" reads two ways. "Remove the backup file" reads one.
|
|
71
|
+
- Give each word one meaning and one job, then keep it. If "check" means inspect, don't also use it for restrain.
|
|
72
|
+
- Pick one word per action and stick to it: "start", not "start" here and "initiate" there.
|
|
73
|
+
- Write procedures as direct commands, never as narration and never in the passive: "Install the component", not "the component must be installed".
|
|
74
|
+
- Avoid "-ing" words where you can. They take too many grammatical jobs and breed misreadings.
|
|
75
|
+
|
|
76
|
+
## Leave no sentence open to two readings (Global English)
|
|
77
|
+
|
|
78
|
+
- Keep words like "only" and "not" next to the word they change: "only fails on growth" and "fails only on growth" say different things.
|
|
79
|
+
- Break up long noun strings: "the proto import budget check script" becomes "the script that checks the proto-import budget".
|
|
80
|
+
- Make every "it", "they", and "this" point at one obvious thing. Repeat the noun when in doubt. Never use "this" or "which" to point at a whole clause.
|
|
81
|
+
- Don't drop verbs: "Phase 1 moves the converters and Phase 2 the runtime" leaves Phase 2 without one. Give it one.
|
|
82
|
+
- Keep the small words that show structure. "Ensure that the switch is off" keeps "that" because it makes the sentence parse one way. Never trade clarity for word count.
|
|
83
|
+
- Repeat the article in a series when it prevents a misread: "the client and the host", not "the client and host", when they are two things.
|
|
84
|
+
- Say which parts "and" or "or" joins when a sentence can group two ways. "Both...and", "either...or", and "if...then" are free disambiguators.
|
|
85
|
+
- Use periods, not semicolons. Replace an em dash with a new sentence.
|
|
86
|
+
- Make text in parentheses a full grammatical unit or its own sentence. Never form plurals with "(s)".
|
|
87
|
+
- No slashes: write "a, b, or both" instead of "a/b" or "and/or".
|
|
88
|
+
- Call each thing by one name, everywhere. A doc that says "the gate", "the ratchet", and "the budget check" for one thing teaches three things. Rewording an unchanged sentence between edits costs the same way. Don't churn what didn't change.
|
|
89
|
+
- Skip idioms, colloquialisms, Latin abbreviations, and metaphors. A non-native reader, a translator, and an agent all parse plain constructions best.
|
|
90
|
+
|
|
91
|
+
## Voice and repo specifics
|
|
92
|
+
|
|
93
|
+
- Apply the **unslop** skill to every doc this skill touches. That skill owns the slop-pattern catalog: AI vocabulary, filler, hedging, formatting tells.
|
|
94
|
+
- PR descriptions and commit messages are writing too. Every layer except Diátaxis applies to them. A PR body is a briefing that a reviewer can read in under a minute. Do not paste swarm logs, SHA lists, or metric tables. Link them.
|
|
95
|
+
- Product UI strings are not documentation. Use your product's copy guidelines for those.
|
|
96
|
+
- Indent code snippets with tabs. Write real paths and real symbols. Make every count or tree claim true at the commit that lands it, and include the command that regenerates it.
|
|
97
|
+
|
|
98
|
+
## Worked example
|
|
99
|
+
|
|
100
|
+
Before:
|
|
101
|
+
|
|
102
|
+
> Configuration of the proto import ratchet budget script parameters is performed via budget.json. Note that it's important to remember that running with --write, which updates the committed budget to reflect the current count, should only be done when lowering it. If exceeded, CI fails.
|
|
103
|
+
|
|
104
|
+
After:
|
|
105
|
+
|
|
106
|
+
> `budget.mjs` reads the committed budget from `budget.json` and counts the files that import protos. If the count exceeds the budget, CI fails. Run `budget.mjs --write` only to lower the budget.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: typescript-best-practices
|
|
3
|
+
description: TypeScript best practices. Use when reading or editing any .ts or .tsx file.
|
|
4
|
+
paths: ["**/*.ts", "**/*.tsx"]
|
|
5
|
+
disable-model-invocation: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# TypeScript best practices
|
|
9
|
+
|
|
10
|
+
Apply the **type-system-discipline** principle skill first.
|
|
11
|
+
|
|
12
|
+
| Rule | Summary |
|
|
13
|
+
|------|---------|
|
|
14
|
+
| Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |
|
|
15
|
+
| Branded types | Brand primitives with `& { readonly __brand: "X" }` so they can't be mixed up. Validate once at the boundary. |
|
|
16
|
+
| Constructive modeling | Build the shape so the illegal value can't be constructed. `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |
|
|
17
|
+
| Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to `NonEmpty<T>` only where the loose type forces `!`, a cast, or a "should never happen" throw. |
|
|
18
|
+
| `unknown` over `any` | External data is `unknown`. |
|
|
19
|
+
| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as `z.infer`. |
|
|
20
|
+
| No `as` casts | Every `as` is a runtime crash waiting. Cast only after validation. |
|
|
21
|
+
| Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`/`instanceof` > user-defined type guard > `as`. |
|
|
22
|
+
| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |
|
|
23
|
+
| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |
|
|
24
|
+
| `satisfies` over `as` | Validates the value without widening literal types. |
|
|
25
|
+
| Boundary validation | Parse where data crosses in, into a named domain type. `Record<string, unknown>` (however spelled) stops at that parse. Trust types inside. See the **boundary-discipline** principle skill. |
|
|
26
|
+
| Schema-derived types | Reach for `Pick`/`Omit`/`Parameters`/`ReturnType`/`Awaited`/`typeof` before declaring a new interface. |
|
|
27
|
+
| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |
|
|
28
|
+
| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak/disposable checks, and verify UI in a running build. Mock only what you can't run locally. |
|
|
29
|
+
| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |
|
|
30
|
+
|
|
31
|
+
Examples: `references/patterns.md`.
|