diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.json index fcd3702..31fd8f8 100644 --- a/.github/plugin/marketplace.json +++ b/.github/plugin/marketplace.json @@ -10,7 +10,7 @@ "name": "pstack", "source": "./plugins/pstack", "description": "if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. GitHub Copilot port of pstack-claude 0.9.57. Original pstack by Lauren Tan (poteto); Claude Code port by Michael Denyer.", - "version": "1.1.0" + "version": "1.1.1" } ] } diff --git a/README.md b/README.md index 4d42b6d..cb7b148 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pstack for GitHub Copilot -[![check](https://github.com/hackernotfound/pstack-vscode/actions/workflows/check.yml/badge.svg)](https://github.com/hackernotfound/pstack-vscode/actions/workflows/check.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![version](https://img.shields.io/badge/version-1.1.0-7C3AED.svg)](https://github.com/hackernotfound/pstack-vscode/releases/tag/v1.1.0) +[![check](https://github.com/hackernotfound/pstack-vscode/actions/workflows/check.yml/badge.svg)](https://github.com/hackernotfound/pstack-vscode/actions/workflows/check.yml) [![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) [![version](https://img.shields.io/badge/version-1.1.1-7C3AED.svg)](https://github.com/hackernotfound/pstack-vscode/releases/tag/v1.1.1) **Run [pstack](https://github.com/cursor/plugins/tree/main/pstack) in the VS Code agents window with GitHub Copilot.** diff --git a/VERSION b/VERSION index 9084fa2..524cb55 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.0 +1.1.1 diff --git a/plugins/pstack/plugin.json b/plugins/pstack/plugin.json index ed1d1f0..cfe0f0c 100644 --- a/plugins/pstack/plugin.json +++ b/plugins/pstack/plugin.json @@ -1,7 +1,7 @@ { "name": "pstack", "displayName": "pstack (GitHub Copilot port)", - "version": "1.1.0", + "version": "1.1.1", "description": "if you want to go fast, go deep first. pstack helps you write less, but higher quality code. rigorous agent workflows you can parallelize with confidence. GitHub Copilot port of pstack-claude 0.9.57. Original pstack by Lauren Tan (poteto); Claude Code port by Michael Denyer.", "author": { "name": "hackernotfound", diff --git a/plugins/pstack/skills/architect/SKILL.md b/plugins/pstack/skills/architect/SKILL.md index 117940c..725f96d 100644 --- a/plugins/pstack/skills/architect/SKILL.md +++ b/plugins/pstack/skills/architect/SKILL.md @@ -5,7 +5,7 @@ description: "Sketch types, signatures, and module structure before code, then s # Architect -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Design before implementing. Sketch types, function signatures, class shapes, and module boundaries with `not implemented` bodies and pseudocode. Synthesize across multiple model perspectives, then fill in code against the chosen sketch. If implementation proves the sketch wrong, throw it out and redesign. diff --git a/plugins/pstack/skills/architect/references/rationale-template.md b/plugins/pstack/skills/architect/references/rationale-template.md index 9ccea42..29684be 100644 --- a/plugins/pstack/skills/architect/references/rationale-template.md +++ b/plugins/pstack/skills/architect/references/rationale-template.md @@ -16,7 +16,7 @@ The prose that ships alongside the type sketch. One page. Sentence-case headings ## Synthesis decision -*Filled in by [arena](../../arena/SKILL.md). Records which candidate became the base and why, what was adapted from each of the others, and what was rejected and why.* +*Filled in by arena (see `skills/arena/SKILL.md` in this plugin). Records which candidate became the base and why, what was adapted from each of the others, and what was rejected and why.* ## Tradeoffs accepted diff --git a/plugins/pstack/skills/arena/SKILL.md b/plugins/pstack/skills/arena/SKILL.md index 11f5dcd..ef7dfd0 100644 --- a/plugins/pstack/skills/arena/SKILL.md +++ b/plugins/pstack/skills/arena/SKILL.md @@ -5,7 +5,7 @@ description: "Spawn N parallel candidates at the same task, pick a base, graft t # Arena -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Fan out N parallel attempts at the same task. Read every candidate end to end. Pick the strongest as the base. Graft the best ideas from the others into it. Verify the synthesized result. diff --git a/plugins/pstack/skills/automate-me/SKILL.md b/plugins/pstack/skills/automate-me/SKILL.md index 481a7b5..8a12b73 100644 --- a/plugins/pstack/skills/automate-me/SKILL.md +++ b/plugins/pstack/skills/automate-me/SKILL.md @@ -5,7 +5,7 @@ description: "Use for \"automate me\", \"create/update/refresh my -mode skill\", # Automate me -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. A guided flow for turning the user's working conventions into a skill agents will follow. The output is one `-mode` skill tailored to them (e.g. `jay-mode`, `priya-mode`). diff --git a/plugins/pstack/skills/babysit/SKILL.md b/plugins/pstack/skills/babysit/SKILL.md index 92854bb..98118c0 100644 --- a/plugins/pstack/skills/babysit/SKILL.md +++ b/plugins/pstack/skills/babysit/SKILL.md @@ -5,11 +5,11 @@ description: Watch an open PR — fix failing CI, handle the straightforward rev # Babysit a PR -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Claude Code analog of Cursor's built-in `/babysit`. The implementation is a loop over `gh` CLI plus the Claude Code `loop` skill for pacing. -Inside poteto-mode, the **Babysit** playbook ([`../poteto-mode/playbooks/babysit.md`](../poteto-mode/playbooks/babysit.md)) supersedes this skill: it owns mode declaration, the merge frontier, stack safety, and the `watch-pr` watcher. This skill stays the standalone `/babysit` entry point for a single PR outside a poteto-mode run. +Inside poteto-mode, the **Babysit** playbook (`../poteto-mode/playbooks/babysit.md` (see `skills/poteto-mode/playbooks/babysit.md` in this plugin)) supersedes this skill: it owns mode declaration, the merge frontier, stack safety, and the `watch-pr` watcher. This skill stays the standalone `/babysit` entry point for a single PR outside a poteto-mode run. ## When to use @@ -29,7 +29,7 @@ Inside poteto-mode, the **Babysit** playbook ([`../poteto-mode/playbooks/babysit - Merge conflicts (`mergeStateStatus == DIRTY`): run the **fix-merge-conflicts** skill. Force-push only if the branch is yours and not shared. - Failing checks (`statusCheckRollup` entries with `conclusion: FAILURE`): run the **fix-ci** skill. Root-cause the failure; fix the underlying code or test; commit; push. - Review comments: run the **get-pr-comments** skill for the summary, then act only on feedback you actually agree with. When a comment has a single mechanical answer — a rename, a guard clause, a formatting nit — make the edit and quote the comment in the commit message. When it hinges on a judgement call, or you can't tell what's being asked, don't guess: leave it and reply with what you would have done. - - Review-bot comments (Bugbot and similar automation): classify fix/dismiss/ask before acting, per [`bugbot-triage.md`](../poteto-mode/references/bugbot-triage.md). Ask by default on security, data, and high-severity findings. + - Review-bot comments (Bugbot and similar automation): classify fix/dismiss/ask before acting, per `bugbot-triage.md` (see `skills/poteto-mode/references/bugbot-triage.md` in this plugin). Ask by default on security, data, and high-severity findings. 3. **Loop.** Use the Claude Code `loop` skill to pace re-checks. Pick the interval from what you're watching: - Active CI run: poll `gh pr checks --watch` (it blocks until checks finish, so no separate loop interval needed). diff --git a/plugins/pstack/skills/create-verification-skill/SKILL.md b/plugins/pstack/skills/create-verification-skill/SKILL.md index 0848c80..3854bed 100644 --- a/plugins/pstack/skills/create-verification-skill/SKILL.md +++ b/plugins/pstack/skills/create-verification-skill/SKILL.md @@ -5,7 +5,7 @@ description: "Generate a project-local verification skill that drives your app t # Create a verification skill -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Every serious project needs a scripted way to drive the real app and prove behavior: launch it, exercise a feature the way a user would, and capture evidence. This skill generates that as a project-local skill (`.claude/skills/verify/`) tailored to the repo. Name it `verify`. At the repo root a project skill by that name replaces Claude Code's bundled `/verify`, which only the user can invoke, so every playbook that names the driver skill can call the project one ([Claude Code 2.1.200 or later](https://code.claude.com/docs/en/skills#run-and-verify-your-app)). In a monorepo, write it in the touched package directory instead. You write the generator's output for the next agent, not for a human: it will be read cold, mid-task, by an agent that has never seen the app. diff --git a/plugins/pstack/skills/how/SKILL.md b/plugins/pstack/skills/how/SKILL.md index 91ff290..7dc7ba6 100644 --- a/plugins/pstack/skills/how/SKILL.md +++ b/plugins/pstack/skills/how/SKILL.md @@ -5,7 +5,7 @@ description: "Use for \"how does X work\", code walkthroughs before changing som # How -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Explore the codebase to answer "how does X work?" questions. Produce architectural explanations at the level of a senior engineer onboarding onto a subsystem, enough to build a working mental model, not so much that it reads like annotated source code. diff --git a/plugins/pstack/skills/interrogate/SKILL.md b/plugins/pstack/skills/interrogate/SKILL.md index 808d21f..ec9a587 100644 --- a/plugins/pstack/skills/interrogate/SKILL.md +++ b/plugins/pstack/skills/interrogate/SKILL.md @@ -5,7 +5,7 @@ description: "Use for \"interrogate\", \"adversarial review\", \"multi-model rev # Interrogate -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Spawn one reviewer per configured model to adversarially review code changes. Each model gets the same prompt and rubric. The adversarial signal comes from model diversity, not assigned personas. diff --git a/plugins/pstack/skills/maintain-verification-skill/SKILL.md b/plugins/pstack/skills/maintain-verification-skill/SKILL.md index 0eef40b..d616924 100644 --- a/plugins/pstack/skills/maintain-verification-skill/SKILL.md +++ b/plugins/pstack/skills/maintain-verification-skill/SKILL.md @@ -5,7 +5,7 @@ description: "Periodic pass that keeps a project's verification skill and featur # Maintain a verification skill -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. A feature map rots the moment the app changes. This skill is the upkeep loop for a skill generated by `/create-verification-skill` (or any project-local verification skill with a feature map). The unit of rigor is the feature, not every sentence: cover every feature file from source and exercise every feature live, without terminalising every bullet. diff --git a/plugins/pstack/skills/no-comments/SKILL.md b/plugins/pstack/skills/no-comments/SKILL.md index bc94d6d..89f349a 100644 --- a/plugins/pstack/skills/no-comments/SKILL.md +++ b/plugins/pstack/skills/no-comments/SKILL.md @@ -5,7 +5,7 @@ description: "Spawn the comment-sicko subagent, fix accepted findings, and offer # No comments -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Spawn comment-sicko. Act on accepted findings. diff --git a/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md b/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md index 2f7c269..3775d2b 100644 --- a/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md +++ b/plugins/pstack/skills/poteto-mode/playbooks/orchestrate.md @@ -24,7 +24,7 @@ Depth stays at coordinator, track, worker. Author the track decomposition per pr Create `~/.claude/orchestrate//`, outside the repo and outside the session. The store has to outlive this chat: the program runs for days, a session restart is expected (see Liveness and failure), and the store is the postmortem. The session scratchpad is not a candidate, however convenient. It is session-scoped and temporary, so a restart takes the program's only state with it. Every file has exactly one writer. Owners publish facts, readers aggregate at read time. Use `bun skills/poteto-mode/scripts/orch/orch.ts` under the installed plugin for bookkeeping, written below as `orch`, while its canonical plain TSV and JSON stay readable without the CLI. -- `preferences.md` is the standing-orders register: numbered lines, one constraint each (model policy, stack shape and count, verification bar, forbidden paths, escalation policy). For human rulings, retain original wording and attribution per [Claims about human decisions](../../why/references/epistemics.md#claims-about-human-decisions). Label agent interpretations and missing originals. Copies are not new decisions. Paste it verbatim into every spawn and every resume. Directives decay across resumes, and each dropped one costs a human turn. When you catch yourself restating an instruction, append the line before you act (principle-encode-lessons-in-structure). +- `preferences.md` is the standing-orders register: numbered lines, one constraint each (model policy, stack shape and count, verification bar, forbidden paths, escalation policy). For human rulings, retain original wording and attribution per Claims about human decisions (see `skills/why/references/epistemics.md` in this plugin). Label agent interpretations and missing originals. Copies are not new decisions. Paste it verbatim into every spawn and every resume. Directives decay across resumes, and each dropped one costs a human turn. When you catch yourself restating an instruction, append the line before you act (principle-encode-lessons-in-structure). - `overview.md` is the durable PR and issue DB. Append. Never rewrite wholesale per event. - `units.tsv` has one row per unit: id, track, state, branch, PR, head SHA, brief path. Update rows in place. - `frontier.json` is the computed merge frontier, per Stack safety. diff --git a/plugins/pstack/skills/poteto-mode/playbooks/session-pickup.md b/plugins/pstack/skills/poteto-mode/playbooks/session-pickup.md index 9ac2af7..f27e6e1 100644 --- a/plugins/pstack/skills/poteto-mode/playbooks/session-pickup.md +++ b/plugins/pstack/skills/poteto-mode/playbooks/session-pickup.md @@ -3,7 +3,7 @@ **You own the resume point. Read the prior trail, don't redo it.** 1. Read the project checkpoint first using [Resume storage](../references/resume-storage.md). A successful read gives the note and artifacts without requiring a path from the previous session. If the pointer is missing, locate the prior trail through a local transcript under Claude Code's per-project transcripts directory at `~/.claude/projects//*.jsonl` (where `` is the workspace cwd with `/` → `-`. Do not glob across other directories under `~/.claude/projects/`, that crosses workspace boundaries and reads private chats from unrelated projects), a cloud-agent URL, or a pushed branch. An unavailable or incomplete checkpoint needs diagnosis rather than a silent fallback. For transcript fallback, read the metadata overview and last messages first, then scan back for the decision points. Parse a long transcript in a subagent and keep the reduced timeline in the main thread (the **principle-guard-the-context-window** skill). -2. Reconstruct operational state. The branch and worktree, what already landed (`git log`, `git diff` against the base), the open todos, the decisions made. Use the prior trail to recover progress. For claims about human rulings, follow [Claims about human decisions](../../why/references/epistemics.md#claims-about-human-decisions). An agent summary is not the original ruling. +2. Reconstruct operational state. The branch and worktree, what already landed (`git log`, `git diff` against the base), the open todos, the decisions made. Use the prior trail to recover progress. For claims about human rulings, follow Claims about human decisions (see `skills/why/references/epistemics.md` in this plugin). An agent summary is not the original ruling. 3. Diff done vs pending. Compare what shipped against what was planned, name the resume point, do not re-run the prior repro or redo completed work. Recheck claims that affect the remaining work without repeating completed investigations. Read artifacts linked by the resume note, including requested questions or checklists. 4. Route the remaining work to the matching playbook and pick the verdict: continue the execution, ship a finished recommendation, ratify or override a prior conclusion, or postmortem a failed run. The pickup playbook ends here. The routed playbook owns the rest. 5. Verify the inherited claims against the original goal on the real artifact (the **principle-prove-it-works** skill). A passing prior self-report is not the proof. diff --git a/plugins/pstack/skills/poteto-mode/references/codex-tools.md b/plugins/pstack/skills/poteto-mode/references/codex-tools.md index 30b7ba8..025abc7 100644 --- a/plugins/pstack/skills/poteto-mode/references/codex-tools.md +++ b/plugins/pstack/skills/poteto-mode/references/codex-tools.md @@ -52,7 +52,7 @@ Skills name Claude defaults (a single-role default for code/prose/judgment plus ## Session routing hook -The native pstack plugin bundles the same `SessionStart` routing hook as the Claude Code plugin. Codex runs it on startup, resume, clear, and compact after the user trusts the hook through `/hooks`. The hook reads `session hook` from the Codex sheet, at the path in [setup-pstack's runtime table](../../setup-pstack/SKILL.md#other-runtimes); `session hook: off` disables injection. +The native pstack plugin bundles the same `SessionStart` routing hook as the Claude Code plugin. Codex runs it on startup, resume, clear, and compact after the user trusts the hook through `/hooks`. The hook reads `session hook` from the Codex sheet, at the path in setup-pstack's runtime table (see `skills/setup-pstack/SKILL.md` in this plugin); `session hook: off` disables injection. A skills-only installation does not include plugin hooks. Request `poteto-mode` explicitly or add a standing instruction to `AGENTS.md` in that case. diff --git a/plugins/pstack/skills/principle-attack-the-premise/SKILL.md b/plugins/pstack/skills/principle-attack-the-premise/SKILL.md index adb2776..d3bde96 100644 --- a/plugins/pstack/skills/principle-attack-the-premise/SKILL.md +++ b/plugins/pstack/skills/principle-attack-the-premise/SKILL.md @@ -10,8 +10,8 @@ When two or more fixes sharing an assumption fail the same gate, write down what Match the experiment to the hypothesis. Two timeout increases may assume requests reach the intended destination. Check the actual destination before increasing the timeout again. -When the hypothesis concerns uneven allocation, ownership, or assignment, count resources or work per actor. Measure the distribution and trace the assignment per [Fix Root Causes](../principle-fix-root-causes/SKILL.md). Recommend redistribution, rotation, or reassignment only when evidence connects that assignment to the failure. An even distribution weakens the imbalance hypothesis; it does not rule out a shared defect. Every worker can leak at the same rate. +When the hypothesis concerns uneven allocation, ownership, or assignment, count resources or work per actor. Measure the distribution and trace the assignment per Fix Root Causes (see `skills/principle-fix-root-causes/SKILL.md` in this plugin). Recommend redistribution, rotation, or reassignment only when evidence connects that assignment to the failure. An even distribution weakens the imbalance hypothesis; it does not rule out a shared defect. Every worker can leak at the same rate. -Keep a rerunnable experiment when useful, per [Build the Lever](../principle-build-the-lever/SKILL.md). Do not turn this into a mandatory census for unrelated bugs. +Keep a rerunnable experiment when useful, per Build the Lever (see `skills/principle-build-the-lever/SKILL.md` in this plugin). Do not turn this into a mandatory census for unrelated bugs. -This principle questions an assumption about the existing system. [Redesign from First Principles](../principle-redesign-from-first-principles/SKILL.md) rebuilds a design around a new requirement. +This principle questions an assumption about the existing system. Redesign from First Principles (see `skills/principle-redesign-from-first-principles/SKILL.md` in this plugin) rebuilds a design around a new requirement. diff --git a/plugins/pstack/skills/principle-build-the-lever/SKILL.md b/plugins/pstack/skills/principle-build-the-lever/SKILL.md index d1a28c6..5ed8672 100644 --- a/plugins/pstack/skills/principle-build-the-lever/SKILL.md +++ b/plugins/pstack/skills/principle-build-the-lever/SKILL.md @@ -18,6 +18,6 @@ When the work isn't trivial, build the tool that does it instead of doing it by - Applying this principle produces a file. If you cited it and there is no codemod, script, generator, or delegate skill in the diff, you didn't apply it. - Commit the lever when the work outlives the session. -**Balance:** The bar is triviality, not repetition. A one-off still earns a lever when the lever is what makes the work checkable. Per the [Laziness Protocol](../principle-laziness-protocol/SKILL.md), build the smallest script that does or proves the job, never a framework. +**Balance:** The bar is triviality, not repetition. A one-off still earns a lever when the lever is what makes the work checkable. Per the Laziness Protocol (see `skills/principle-laziness-protocol/SKILL.md` in this plugin), build the smallest script that does or proves the job, never a framework. -Distinct from [Encode Lessons in Structure](../principle-encode-lessons-in-structure/SKILL.md), which makes a recurring instruction a durable guardrail. This is throughput and reviewability on the work in front of you. For scripting the verification itself, see [Prove It Works](../principle-prove-it-works/SKILL.md). +Distinct from Encode Lessons in Structure (see `skills/principle-encode-lessons-in-structure/SKILL.md` in this plugin), which makes a recurring instruction a durable guardrail. This is throughput and reviewability on the work in front of you. For scripting the verification itself, see Prove It Works (see `skills/principle-prove-it-works/SKILL.md` in this plugin). diff --git a/plugins/pstack/skills/principle-minimize-reader-load/SKILL.md b/plugins/pstack/skills/principle-minimize-reader-load/SKILL.md index ea8b298..592a7b9 100644 --- a/plugins/pstack/skills/principle-minimize-reader-load/SKILL.md +++ b/plugins/pstack/skills/principle-minimize-reader-load/SKILL.md @@ -10,7 +10,7 @@ Maintainability is the work a reader must do to understand code. Track two axes: 1. **Layers to trace.** How many indirections sit between the question and the answer. 2. **State to hold.** How much hidden or mutable context the reader must keep in their head. -**Why:** Code is read far more than it is written. LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of [Guard the Context Window](../principle-guard-the-context-window/SKILL.md). Working memory is finite for readers too. +**Why:** Code is read far more than it is written. LOC, cyclomatic complexity, and "clean architecture" are proxies. Reader load is the thing that matters. The two axes are independent. A flat file with 50 globals can be as hard to reason about as a 6-layer adapter stack. Guard both. This is the human analog of Guard the Context Window (see `skills/principle-guard-the-context-window/SKILL.md` in this plugin). Working memory is finite for readers too. **The pattern:** - **Collapse layers** that cost more than they save: wrappers with one caller, adapters with no second implementation, speculative indirection that was never needed. Inline them. diff --git a/plugins/pstack/skills/recall/SKILL.md b/plugins/pstack/skills/recall/SKILL.md index 42bba7f..b5ed0ff 100644 --- a/plugins/pstack/skills/recall/SKILL.md +++ b/plugins/pstack/skills/recall/SKILL.md @@ -17,7 +17,7 @@ Transcripts live at `~/.claude/projects//.jsonl`, where `/pstack-models.md` | `@/pstack-models.md` in `/CLAUDE.md` | the `Agent` tool's model parameter | verified live | -| Codex | `/pstack-models.md` | model rows: paste into `/AGENTS.md`; hook setting: read by the plugin | your configured Codex models, see [codex-tools.md](../poteto-mode/references/codex-tools.md#model-names) | hook contract tested; discovery verified | -| GitHub Copilot | `/pstack-models.md`, where `` is `$COPILOT_HOME` or `~/.copilot` | model rows: paste into `/copilot-instructions.md`; hook setting: read by the plugin | slugs the runtime accepts for `task`'s `model`, see [copilot-tools.md](../poteto-mode/references/copilot-tools.md#model-names) | hook contract and dispatch verified on Copilot CLI | +| Codex | `/pstack-models.md` | model rows: paste into `/AGENTS.md`; hook setting: read by the plugin | your configured Codex models, see codex-tools.md (see `skills/poteto-mode/references/codex-tools.md` in this plugin) | hook contract tested; discovery verified | +| GitHub Copilot | `/pstack-models.md`, where `` is `$COPILOT_HOME` or `~/.copilot` | model rows: paste into `/copilot-instructions.md`; hook setting: read by the plugin | slugs the runtime accepts for `task`'s `model`, see copilot-tools.md (see `skills/poteto-mode/references/copilot-tools.md` in this plugin) | hook contract and dispatch verified on Copilot CLI | | opencode | `~/.config/opencode/pstack-models.md` | add the path to the `instructions` array in `opencode.json` | the `models` slash command in the session | from published docs, no live session | | Gemini CLI | `~/.gemini/pstack-models.md` | `@~/.gemini/pstack-models.md` in `~/.gemini/GEMINI.md` | the `model` slash command in the session | from published docs, no live session | | Prime Agent | no documented sheet path; Prime's configuration chooses models | | | no live session | diff --git a/plugins/pstack/skills/swarm/SKILL.md b/plugins/pstack/skills/swarm/SKILL.md index 2c8176f..e8158a7 100644 --- a/plugins/pstack/skills/swarm/SKILL.md +++ b/plugins/pstack/skills/swarm/SKILL.md @@ -5,7 +5,7 @@ description: "Fan out N parallel workers, drain them, and return one report. Use # Swarm -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Fan out N parallel workers. They may cover separate slices, race the same brief, or mix both. The parent waits, aggregates, and returns one report. diff --git a/plugins/pstack/skills/teach/SKILL.md b/plugins/pstack/skills/teach/SKILL.md index 7c82be6..29cd3dc 100644 --- a/plugins/pstack/skills/teach/SKILL.md +++ b/plugins/pstack/skills/teach/SKILL.md @@ -5,7 +5,7 @@ description: "Explain a body of work plainly so a person actually understands it # Teach -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. **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.** diff --git a/plugins/pstack/skills/why/SKILL.md b/plugins/pstack/skills/why/SKILL.md index 3f8b5f1..9917a80 100644 --- a/plugins/pstack/skills/why/SKILL.md +++ b/plugins/pstack/skills/why/SKILL.md @@ -5,7 +5,7 @@ description: "Use for 'why does X work this way', 'why we picked Y', design rati # Why -On Codex, read the [platform mapping](../poteto-mode/references/codex-tools.md), including its per-skill notes, before following this skill. +On Codex, read the platform mapping (see `skills/poteto-mode/references/codex-tools.md` in this plugin), including its per-skill notes, before following this skill. Investigate the motivation and intent behind code. diff --git a/tools/build.mjs b/tools/build.mjs index 24cb389..60ed61e 100755 --- a/tools/build.mjs +++ b/tools/build.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node import { execFileSync } from 'node:child_process'; import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'; -import { dirname, join } from 'node:path'; +import { dirname, join, relative, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; const root = join(dirname(fileURLToPath(import.meta.url)), '..'); @@ -81,6 +81,25 @@ function applyEdit({ file, find, replace }) { write(file, text.replace(find, () => replace)); } +function unlinkCrossSkillReferences() { + const skillsRoot = join(out, 'skills'); + const link = /\[([^\]]+)\]\(((?:\.\.\/)+)([a-z0-9-]+)\/([^)#\s]*)(#[^)\s]*)?\)/g; + let rewrites = 0; + for (const rel of readdirSync(skillsRoot, { recursive: true })) { + if (!rel.endsWith('.md')) continue; + const file = join(skillsRoot, rel); + const text = readFileSync(file, 'utf8'); + const next = text.replace(link, (match, label, ups, skill, rest) => { + const target = resolve(dirname(file), ups, skill, rest); + if (!target.startsWith(`${skillsRoot}/`) || target.startsWith(`${join(skillsRoot, rel.split('/')[0])}/`)) return match; + rewrites++; + return `${label} (see \`${relative(out, target)}\` in this plugin)`; + }); + if (next !== text) writeFileSync(file, next); + } + if (rewrites === 0) throw new Error('cross-skill links: none rewritten; upstream link style changed'); +} + function buildMandate() { const names = new Set(skillNames()); let rewrites = 0; @@ -137,6 +156,7 @@ cpSync(join(source, 'plugins/pstack'), out, { recursive: true }); for (const rel of removals) rmSync(join(out, rel), { recursive: true, force: true }); cpSync(join(root, 'overlay'), out, { recursive: true }); edits.forEach(applyEdit); +unlinkCrossSkillReferences(); buildMandate(); writeManifests(source); copyLicenses(source); diff --git a/tools/check.mjs b/tools/check.mjs index ffa532e..8c8222f 100755 --- a/tools/check.mjs +++ b/tools/check.mjs @@ -1,7 +1,7 @@ #!/usr/bin/env node import { execFileSync } from 'node:child_process'; import { existsSync, lstatSync, readFileSync, readdirSync } from 'node:fs'; -import { dirname, join } from 'node:path'; +import { dirname, join, resolve } from 'node:path'; import { fileURLToPath } from 'node:url'; const root = join(dirname(fileURLToPath(import.meta.url)), '..'); @@ -68,4 +68,15 @@ const workflows = readdirSync(join(root, '.github/workflows')).map((f) => readFi check('workflow actions pinned to full commit SHAs', workflows.every((w) => [...w.matchAll(/uses:\s*(\S+)/g)].every(([, ref]) => /@[0-9a-f]{40}$/.test(ref)))); check('workflow runners and Node versions are exact', workflows.every((w) => !/-latest\b/.test(w) && [...w.matchAll(/node-version:\s*(\S+)/g)].every(([, v]) => /^\d+\.\d+\.\d+$/.test(v)))); +const crossSkill = skills.flatMap((skill) => + readdirSync(join(out, 'skills', skill), { recursive: true }) + .filter((rel) => rel.endsWith('.md')) + .flatMap((rel) => { + const file = join(out, 'skills', skill, rel); + return [...readFileSync(file, 'utf8').matchAll(/\]\(([^)#\s]+)/g)] + .map(([, target]) => target) + .filter((target) => !/^[a-z]+:/i.test(target) && !resolve(dirname(file), target).startsWith(join(out, 'skills', skill) + '/')); + })); +check('no skill links outside its own folder (awesome-copilot vally valid-refs)', crossSkill.length === 0); + if (failures.length) process.exit(1);