@mohammadhprp/system-prompt 0.12.3 → 0.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/framework/commands/review.md +5 -20
  2. package/framework/skills/README.md +15 -0
  3. package/framework/skills/architect/SKILL.md +83 -0
  4. package/framework/skills/architect/examples.md +5 -0
  5. package/framework/skills/architect/references/design-red-flags.md +33 -0
  6. package/framework/skills/architect/references/rationale-template.md +35 -0
  7. package/framework/skills/architect/references/runner-prompt.md +20 -0
  8. package/framework/skills/arena/SKILL.md +71 -0
  9. package/framework/skills/arena/examples.md +5 -0
  10. package/framework/skills/bro/SKILL.md +7 -0
  11. package/framework/skills/bro/examples.md +5 -0
  12. package/framework/skills/changelog/SKILL.md +41 -0
  13. package/framework/skills/changelog/examples.md +5 -0
  14. package/framework/skills/commit/SKILL.md +28 -0
  15. package/framework/skills/commit/examples.md +5 -0
  16. package/framework/skills/gh/SKILL.md +157 -0
  17. package/framework/skills/gh/examples.md +10 -0
  18. package/framework/skills/how/SKILL.md +135 -0
  19. package/framework/skills/how/examples.md +5 -0
  20. package/framework/skills/how/references/critic-prompt.md +59 -0
  21. package/framework/skills/how/references/critique-rubric.md +58 -0
  22. package/framework/skills/how/references/explainer-prompt.md +55 -0
  23. package/framework/skills/how/references/explorer-prompt.md +52 -0
  24. package/framework/skills/merge-request/SKILL.md +40 -0
  25. package/framework/skills/merge-request/examples.md +5 -0
  26. package/framework/skills/ponytail/SKILL.md +145 -0
  27. package/framework/skills/ponytail/references/ponytail-audit.md +18 -0
  28. package/framework/skills/ponytail/references/ponytail-debt.md +21 -0
  29. package/framework/skills/ponytail/references/ponytail-gain.md +25 -0
  30. package/framework/skills/ponytail/references/ponytail-help.md +18 -0
  31. package/framework/skills/ponytail/references/ponytail-mode.md +33 -0
  32. package/framework/skills/ponytail/references/ponytail-review.md +27 -0
  33. package/framework/skills/ponytail/references/ponytail-rules.md +31 -0
  34. package/framework/skills/ponytail/references/principle-boundary-discipline.md +7 -0
  35. package/framework/skills/ponytail/references/principle-encode-lessons-in-structure.md +13 -0
  36. package/framework/skills/ponytail/references/principle-fix-root-causes.md +17 -0
  37. package/framework/skills/ponytail/references/principle-make-operations-idempotent.md +12 -0
  38. package/framework/skills/ponytail/references/principle-model-the-domain.md +7 -0
  39. package/framework/skills/ponytail/references/principle-prove-it-works.md +27 -0
  40. package/framework/skills/ponytail/references/principle-sequence-verifiable-units.md +7 -0
  41. package/framework/skills/pull-request/SKILL.md +31 -0
  42. package/framework/skills/pull-request/examples.md +5 -0
  43. package/framework/skills/release/SKILL.md +30 -0
  44. package/framework/skills/release/examples.md +5 -0
  45. package/framework/skills/review/SKILL.md +113 -0
  46. package/framework/skills/review/examples.md +6 -0
  47. package/framework/skills/review/scripts/render_review.py +95 -0
  48. package/framework/skills/review/scripts/resolve_spec_context.py +723 -0
  49. package/framework/skills/review/scripts/validate_review_json.py +348 -0
  50. package/framework/skills/tdd/SKILL.md +44 -0
  51. package/framework/skills/tdd/examples.md +5 -0
  52. package/framework/skills/unslop/SKILL.md +81 -0
  53. package/framework/skills/unslop/examples.md +5 -0
  54. package/framework/skills/why/SKILL.md +230 -0
  55. package/framework/skills/why/examples.md +5 -0
  56. package/framework/skills/why/references/epistemics.md +144 -0
  57. package/framework/skills/why/references/investigator-prompt.md +103 -0
  58. package/framework/skills/why/references/source-playbook.md +17 -0
  59. package/framework/skills/why/references/sources/code-archaeology.md +88 -0
  60. package/framework/skills/why/references/sources/databricks.md +70 -0
  61. package/framework/skills/why/references/sources/datadog.md +99 -0
  62. package/framework/skills/why/references/sources/incident-postmortem.md +15 -0
  63. package/framework/skills/why/references/sources/linear.md +48 -0
  64. package/framework/skills/why/references/sources/notion.md +55 -0
  65. package/framework/skills/why/references/sources/sentry.md +100 -0
  66. package/framework/skills/why/references/sources/slack.md +54 -0
  67. package/framework/skills/why/references/synthesizer-prompt.md +135 -0
  68. package/package.json +1 -1
  69. package/src/catalog.js +17 -2
@@ -1,24 +1,9 @@
1
1
  ---
2
- description: Perform comprehensive code quality review
2
+ description: Review local, GitHub, or GitLab changes and write review.json
3
3
  agent: plan
4
4
  ---
5
5
 
6
- Review $ARGUMENTS
7
-
8
- Perform comprehensive code quality review.
9
-
10
- ## Process
11
-
12
- 1. **Review conversation and diff** - Read conversation history, run `git diff` for staged/unstaged changes, identify the problem being solved and the behavior being modified. Read related standards: [`references/standards/naming.md`](../references/standards/naming.md), [`references/standards/testing.md`](../references/standards/testing.md), [`references/standards/security.md`](../references/standards/security.md), [`references/standards/performance.md`](../references/standards/performance.md).
13
-
14
- 2. **Check correctness** - Edge cases, concurrency, error handling, state transitions, backward compatibility. Read contracts and interfaces before implementation.
15
-
16
- 3. **Check maintainability** - Naming reflects business meaning, structure matches project conventions, comments explain why not what.
17
-
18
- 4. **Check testing** - Do tests prove the behavior change? Missing edge cases or failure paths? Tests should verify behavior, not mirror implementation.
19
-
20
- 5. **Check performance** - N+1 queries, unbounded loops, unnecessary allocations, caching opportunities.
21
-
22
- 6. **Check security** - Input validation, authentication enforcement, secrets exposure, least privilege.
23
-
24
- 7. **Present findings** - Distinguish blockers from suggestions, explain reasoning for each, summarize overall risk and production readiness.
6
+ Review `$ARGUMENTS` using the `review` skill. Select local changes, a GitHub
7
+ pull request, or a GitLab merge request from the arguments. Use `gh` or `glab`
8
+ for read-only remote inspection, never publish comments, and write the required
9
+ `review.json` artifact.
@@ -9,7 +9,12 @@ This catalog is framework-agnostic: each skill defines when to activate, a step-
9
9
  | Skill | Purpose | Best fit |
10
10
  | --- | --- | --- |
11
11
  | [agent-browser](./agent-browser/SKILL.md) | Automate browser and Electron workflows for navigation, testing, screenshots, and data extraction. | Website interaction, browser automation, exploratory testing, QA, and Electron desktop app workflows. |
12
+ | [architect](./architect/SKILL.md) | Sketch architecture and module boundaries before implementation. | Non-trivial design and implementation work. |
13
+ | [arena](./arena/SKILL.md) | Compare parallel candidate solutions and synthesize the strongest result. | Non-trivial artifacts and design alternatives. |
12
14
  | [backend-best-practices](./backend-best-practices/SKILL.md) | Consolidated backend engineering practices for API design, architecture, data, security, testing, observability, performance, debugging, and refactoring. | Any backend task that benefits from structured domain guidance across multiple backend disciplines. |
15
+ | [bro](./bro/SKILL.md) | Restate the last message in plain human language without jargon. | Simplifying technical explanations. |
16
+ | [changelog](./changelog/SKILL.md) | Create or update `CHANGELOG.md` entries. | Release notes and unreleased changes. |
17
+ | [commit](./commit/SKILL.md) | Create atomic Git commits with conventional messages. | Committing reviewed changes. |
13
18
  | [diagram-design](./diagram-design/SKILL.md) | Create technical and product diagrams as standalone HTML files with inline SVG and an opinionated editorial design system. | Architecture, data, process, and other diagrams that communicate more clearly than prose or tables. |
14
19
  | [docs-writer](./docs-writer/SKILL.md) | Write, review, and edit documentation files with consistent structure, tone, and technical accuracy. | Creating docs, reviewing markdown files, writing READMEs, or updating `/docs` directories. |
15
20
  | [effective-html](./effective-html/SKILL.md) | Create self-contained HTML artifacts with routed guidance for design, wireframes, prototypes, plans, and diagrams. | Standalone HTML reports, explainers, interfaces, wireframes, prototypes, plans, and diagrams. |
@@ -18,7 +23,14 @@ This catalog is framework-agnostic: each skill defines when to activate, a step-
18
23
  | [glab](./glab/SKILL.md) | Use the GitLab CLI (glab) to manage merge requests, issues, pipelines, and repositories from the command line. | Any project hosted on GitLab (SaaS or self-hosted). |
19
24
  | [humanizer](./humanizer/SKILL.md) | Remove signs of AI-generated writing from text — inflated importance, promotional language, em dash overuse, rule of three, AI vocabulary, and filler phrases. | Editing or reviewing prose to make it sound more natural and human-written. |
20
25
  | [improve](./improve/SKILL.md) | Audit repositories as a read-only senior advisor and produce prioritized implementation plans for another agent. | Repository-wide audits, improvement roadmaps, and implementation handoffs. |
26
+ | [how](./how/SKILL.md) | Explain subsystem architecture, runtime flow, ownership, and layering. | Code walkthroughs and architecture questions. |
21
27
  | [jira-cli](./jira-cli/SKILL.md) | Use the Jira CLI (jira) to manage issues, sprints, epics, comments, transitions, and worklogs from the command line. | Any project using Jira (Cloud or self-hosted) for issue tracking. |
28
+ | [commit](./commit/SKILL.md) | Create atomic Git commits with conventional messages. | Committing reviewed changes. |
29
+ | [pull-request](./pull-request/SKILL.md) | Create or update GitHub pull requests (PRs). | GitHub contribution workflows. |
30
+ | [merge-request](./merge-request/SKILL.md) | Create GitLab merge requests (MRs). | GitLab contribution workflows. |
31
+ | [review](./review/SKILL.md) | Perform comprehensive code quality reviews. | Diff reviews and production-readiness checks. |
32
+ | [changelog](./changelog/SKILL.md) | Create or update `CHANGELOG.md` entries. | Release notes and unreleased changes. |
33
+ | [release](./release/SKILL.md) | Prepare and tag semantic-versioned releases. | Release management. |
22
34
  | [laravel-best-practices](./laravel-best-practices/SKILL.md) | Apply Laravel PHP patterns for Eloquent, validation, security, testing, caching, and architecture. | Writing, reviewing, or refactoring Laravel PHP code. |
23
35
  | [perf-web-optimization](./perf-web-optimization/SKILL.md) | Optimize web performance: bundle size, images, caching, lazy loading, and overall page speed. | A slow site, large bundles, layout shifts, poor Time to Interactive, or low Lighthouse scores. |
24
36
  | [security-best-practices](./security-best-practices/SKILL.md) | Perform language- and framework-specific security best-practice reviews and suggest improvements, with support for Python, JavaScript/TypeScript, and Go. | Explicit security reviews or reports, secure-by-default coding, or auditing existing code for major vulnerabilities. |
@@ -27,6 +39,9 @@ This catalog is framework-agnostic: each skill defines when to activate, a step-
27
39
  | [skill-creator](./skill-creator/SKILL.md) | Create new skills, modify and improve existing skills, and measure skill performance. | Designing new skills, optimizing existing skills, or running evals. |
28
40
  | [tlc-spec-driven](./tlc-spec-driven/SKILL.md) | Feature planning and implementation with adaptive phases, EARS testable requirements, atomic Conventional Commits, and independent verification. | Planning features, implementing with verification and atomic commits, or validating an implementation against a spec. |
29
41
  | [taste](./taste/SKILL.md) | Unified design-quality skill spanning anti-slop frontend design, image generation and image-to-code, brand kits, minimalist and industrial UI, redesigns, and Google Stitch design systems. | Landing pages, portfolios, redesigns, website/mobile/brand imagery, or any UI that must not look AI-generated. |
42
+ | [tdd](./tdd/SKILL.md) | Drive clear bug fixes with focused failing regression tests. | Explicit TDD and regression-test workflows. |
43
+ | [unslop](./unslop/SKILL.md) | Remove AI writing patterns and restore a natural human voice. | Editing prose to remove generic or artificial phrasing. |
44
+ | [why](./why/SKILL.md) | Investigate the evidence and rationale behind code and design decisions. | Historical design-reasoning and motivation investigations. |
30
45
 
31
46
  ## How Skills Are Organized
32
47
 
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: architect
3
+ description: "Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in. Use for /architect, 'architect this', 'design this', or non-trivial work where jumping to code would lock in the wrong shape."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Architect
8
+
9
+ 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.
10
+
11
+ ## Start
12
+
13
+ Open a todolist with one entry per phase before starting. Autonomous mode without checkpoints needs the list to show phase position and keep phases from silently disappearing.
14
+
15
+ 1. Ground
16
+ 2. Sketch
17
+ 3. Agree
18
+ 4. Implement
19
+ 5. Scrap
20
+
21
+ ## Phase A: Ground the problem
22
+
23
+ Build a real mental model of every system the new code touches. Run the **how** skill over the relevant subsystems. Critique mode if existing structure is the constraint or the design must push back on it.
24
+
25
+ Naming a file isn't grounding. Produce the traced model `how` prescribes. If the design redefines ownership or layering, also run the **why** skill on the existing shape so the rationale becomes a constraint, not a guess.
26
+
27
+ Skip Phase A only when the work is genuinely greenfield with no surrounding system to integrate.
28
+
29
+ ## Phase B: Sketch
30
+
31
+ Run the **arena** skill with the design-sketch task and the Phase A grounding artifacts. Pass `references/runner-prompt.md` as each runner's prompt. Each candidate produces a design package shaped per `references/rationale-template.md`: the caller's usage written first, then the type sketch, function signatures, module map, and prose rationale derived from it.
32
+
33
+ Use your configured architect runners (defaults `claude-fable-5-1-thinking-max`, `gpt-5.6-sol-max`, `grok-4.6-fast-xhigh`, `claude-opus-5-thinking-xhigh`).
34
+
35
+ Design it twice. Require at least two structurally distinct candidates before synthesis, even when the first looks sufficient. This is the **exhaust-the-design-space** principle skill made concrete. Whole-shape alternatives, not point fixes inside one shape.
36
+
37
+ Screen every candidate against [`references/design-red-flags.md`](references/design-red-flags.md) before synthesis. Reject or revise shallow modules, information leakage, temporal decomposition, and pass-through methods.
38
+
39
+ Compare viable candidates on interface depth. Prefer the design that hides more complexity behind a smaller, simpler public surface. A rich interface can keep call chains short by concentrating capability instead of scattering it across layers.
40
+
41
+ Arena returns one synthesized design package. The synthesis decision populates the rationale's "Synthesis decision" section.
42
+
43
+ ## Phase C: Agree (opt-in)
44
+
45
+ Default: proceed directly to implementation with the synthesized design. No human checkpoint.
46
+
47
+ Opt in to a checkpoint when the invoker explicitly asks: "/architect with checkpoint," "stop and show me before implementing," or similar. Then surface the synthesized design and pause for sign-off.
48
+
49
+ The synthesis can ship as its own commit either way. That's the "scaffold first" mode of the **foundational-thinking** principle skill; subsequent commits read as filling in bodies against a stable contract. Planned and scoped breakage during fill-in is fine, per the **outcome-oriented-execution** principle skill. For adversarial pressure on the design before implementing, run the **interrogate** skill on the synthesized sketch.
50
+
51
+ If the human pushes back on the shape (in a checkpoint or after the fact), treat that as Phase A evidence. Re-ground and re-run Phase B before writing more code.
52
+
53
+ ## Phase D: Implement against the sketch
54
+
55
+ Replace `not implemented` bodies with code, pseudocode with logic. The synthesized sketch is the contract.
56
+
57
+ Deviations from the sketch are signal worth surfacing, not friction to absorb silently. If a function needs a parameter the sketch didn't anticipate, ask whether the sketch was wrong, the requirement was missed, or the implementation is overreaching. Surface it; don't bolt it on.
58
+
59
+ ## Phase E: Scrap when the architecture is wrong
60
+
61
+ If implementation keeps producing friction the sketch can't absorb, throw the sketch out. Don't bolt fixes onto a wrong design, per the **redesign-from-first-principles** and **fix-root-causes** principle skills.
62
+
63
+ The signal is a *pattern*, not single instances. Tells:
64
+
65
+ - The same shape of workaround appearing repeatedly across unrelated code.
66
+ - Multiple unrelated edge cases that all need special-case branches.
67
+ - Types that need escape hatches (`any`, casts, optional fields always set in practice) to compile.
68
+ - The "we need a lock" reflex when the sketch said the state wasn't shared.
69
+ - Callers having to know the abstraction's internal rules to use it.
70
+ - Two or more independent Phase D deviations of the same shape across the implementation. Surfacing deviations is Phase D's job; a repeated pattern of them is Phase E's trigger.
71
+
72
+ Use judgment. A few edge cases don't condemn an architecture. Some problems are legitimately complex; complexity in the data is not complexity in the design. The rewrite signal is repeated friction of the same shape, not single hard cases.
73
+
74
+ When you scrap:
75
+
76
+ 1. Re-run the **how** skill over what's been built. The implementation lessons enter the new design as inputs, not vibes.
77
+ 2. Redesign as if the new constraints had been day-one assumptions, per redesign-from-first-principles.
78
+ 3. Subtract before adding, per the **subtract-before-you-add** principle skill. The new sketch should be smaller than the old one before it grows.
79
+ 4. Return to Phase B and re-run arena.
80
+
81
+ ## Outputs
82
+
83
+ The caller's usage is written first and the type sketch derived from it. One file with new types and signatures for small changes; module map plus type definitions for larger work. The rationale ships alongside, shaped per `references/rationale-template.md`, including the usage sketch and the synthesis decision.
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ - Sketch the types, signatures, and module boundaries for a non-trivial feature before implementation.
4
+ - Ground an architectural proposal in the existing codebase, then compare multiple design candidates before choosing one.
5
+ - Revisit and redesign the sketch when implementation repeatedly needs workarounds that the original shape cannot absorb.
@@ -0,0 +1,33 @@
1
+ # Design red flags
2
+
3
+ Screen every candidate before synthesis. A red flag is a reason to revise or reject the shape.
4
+
5
+ ## Shallow module
6
+
7
+ A shallow module exposes a large interface while hiding little complexity. Judge depth by the capability and policy hidden behind the public surface relative to the size of that surface. Prefer a simple interface backed by substantial behavior.
8
+
9
+ Do not confuse a deep module with a deep call chain. A deep call chain scatters understanding across layers. A deep module concentrates capability behind one interface.
10
+
11
+ Look for these signs:
12
+
13
+ - Callers coordinate several methods to complete one operation.
14
+ - Public options expose internal stages or implementation choices.
15
+ - Learning the interface does not save the caller from learning the implementation.
16
+
17
+ ## Information leakage
18
+
19
+ Information leakage makes multiple modules depend on the same internal decision. A representation, policy, or protocol detail appears in more than one place, so changing it requires coordinated edits.
20
+
21
+ Public re-exports of transport or wire types are leakage. Parse external data into domain types behind the interface. Keep storage schemas, framework objects, and protocol details private.
22
+
23
+ ## Temporal decomposition
24
+
25
+ Temporal decomposition organizes modules by execution order instead of the knowledge they own. Separate load, validate, transform, and save stages often repeat one representation and its invariants across several boundaries.
26
+
27
+ Group code around domain knowledge and ownership. Methods that run at different times can still belong to one module when they protect the same decisions.
28
+
29
+ ## Pass-through method
30
+
31
+ A pass-through method forwards the same arguments to another method with the same shape. It adds a layer without hiding complexity.
32
+
33
+ Remove it or move responsibility to the module that can complete the operation. Keep a forwarding boundary only when it adds policy, adaptation, or a distinct abstraction.
@@ -0,0 +1,35 @@
1
+ # Rationale template
2
+
3
+ The prose that ships alongside the type sketch. One page. Sentence-case headings, no boilerplate. Replace the italic notes with actual content.
4
+
5
+ ## Problem
6
+
7
+ *One paragraph. What we're trying to do, and what about the existing system or constraints makes the shape non-obvious. If [Phase A](../SKILL.md#phase-a-ground-the-problem) surfaced constraints the design must honor (existing types to interop with, callers we can't break, invariants that crossed our boundary), name them here so the reader sees the same constraints you saw.*
8
+
9
+ ## Usage (caller's view)
10
+
11
+ *Write this first, before the type sketch. Show the README or quickstart the consumer reads, plus two or three realistic call sites in their own code. What they import, what they call, what comes back. The type sketch in [Shape](#shape) is derived from this. The two must agree; when they diverge, reconcile the sketch to the usage, not the reverse. The caller's experience is the spec. The types serve it.*
12
+
13
+ ## Shape
14
+
15
+ *The recommended architecture. Data structures first; then how data flows through the signatures. Name the load-bearing decisions. State which invariants are encoded in types, where validation lives, and what the system deliberately does not do. Judge interface depth explicitly. State what complexity the public surface hides, what remains exposed to callers, and why the interface is no larger than needed. Cite the principle behind each decision (e.g., `per boundary-discipline`); don't restate it.*
16
+
17
+ ## Synthesis decision
18
+
19
+ *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.*
20
+
21
+ ## Tradeoffs accepted
22
+
23
+ *One bullet per tradeoff the chosen shape makes. Form: "we accept X in exchange for Y." Name anything a future reader might mistake for an oversight, including things that look like premature optimization or premature simplification.*
24
+
25
+ ## Alternatives considered
26
+
27
+ *Required. Name at least one concrete alternative shape, with one line on why it lost. Judge each alternative on interface depth, not implementation simplicity alone. Name the complexity it exposes to callers and the complexity it hides. Two or three alternatives belong here when the design space had real contenders. One is fine when the constraints forced the answer, with the conclusion phrased as "this was the only viable shape because..." Avoid listing flavors of the same shape. This section covers design alternatives the chosen shape considered and rejected, not other runner candidates.*
28
+
29
+ ## Open questions and risks
30
+
31
+ *Things you noticed during the sketch that the human needs to weigh in on, and risks worth flagging before implementation starts. Phrase as questions, not assertions, so the human's answer is the resolution rather than a comment.*
32
+
33
+ ## Next implementation step
34
+
35
+ *The first thing to build against the sketch. One sentence. What you'd start writing immediately after synthesis (or after Phase D sign-off, if a checkpoint was opted into).*
@@ -0,0 +1,20 @@
1
+ # Architect runner prompt
2
+
3
+ The orchestrator passes this file through to every parallel candidate runner during Phase B and fills in the variable inputs around it: the task, the Phase A grounding artifacts, the isolated working directory, and the path to write outputs. The working directory is a git worktree when available, otherwise a per-runner subdirectory under the sketch dir; what matters is independence between candidates.
4
+
5
+ You are producing one candidate design in architect's parallel exploration. Read the **architect** skill in full first; that's the workflow you're inside. Output a candidate design package: type sketch, function signatures, module map, and prose rationale shaped per [`rationale-template.md`](rationale-template.md).
6
+
7
+ Apply the following discipline. The orchestrator compares candidates on these axes to pick a base.
8
+
9
+ - Caller's usage first. Write the README-style usage and two or three real call sites before the types, then derive the type sketch from them. The usage is the spec; the two must agree, so reconcile the sketch to the usage, not the reverse.
10
+ - Data structures first. Get the core types right and the code becomes obvious. Trace each dominant access pattern through the proposed structure; if the answer is "we'll add a map / index / cache later," the structure is wrong.
11
+ - Interface depth. Compare the capability hidden behind the public surface relative to the size of that surface. Prefer a simple interface that pulls complexity into the callee, even when the implementation becomes less simple. Do not put transport or wire types on the public surface; parse into domain types behind the interface.
12
+ - Shared state: if two actors might both write, ask "what happens?" If the answer isn't "nothing," default to per-actor state with a merge at the read boundary, per the **separate-before-serializing-shared-state** principle skill.
13
+ - Make boundaries visible. `not implemented` errors for bodies, `// TODO` pseudocode for tricky logic, doc comments stating intent and invariants. A reader should trace data from input to output by reading types and signatures alone.
14
+ - Encode invariants in types: hard-to-misuse types > runtime checks > prose comments, per the **encode-lessons-in-structure** principle skill.
15
+ - Validate at boundaries, trust types inside, per the **boundary-discipline** principle skill. Business logic as pure functions; the shell stays thin.
16
+ - Single source of truth per invariant. Derive instead of sync.
17
+ - Idempotent state transitions where applicable, per the **make-operations-idempotent** principle skill. Ask what happens if the operation runs twice or crashes halfway.
18
+ - Short call chains. If tracing the flow needs more than three files, flatten the hierarchy, per the **laziness-protocol** and **minimize-reader-load** principle skills.
19
+
20
+ You are one of several runners, each on a different model. Produce the best design your model can make; don't hedge against the others. Differences between candidates are the signal used to pick a base and graft. Converging on a safe-looking middle defeats the exploration.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: arena
3
+ description: "Spawn N parallel candidates at the same task, pick a base, graft the strongest parts of the losers into it. Use for /arena, 'arena this', 'throw it in the arena', or when one attempt at a non-trivial artifact would lock in the wrong shape."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Arena
8
+
9
+ 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.
10
+
11
+ ## Start
12
+
13
+ Open a todolist with one entry per phase before launching anything. The arena runs autonomously and the list keeps phases from silently disappearing.
14
+
15
+ 1. Frame
16
+ 2. Fan out
17
+ 3. Cross-judge
18
+ 4. Pick
19
+ 5. Graft
20
+ 6. Verify
21
+
22
+ ## Phase A: Frame
23
+
24
+ The N candidates will receive the same prompt, so the prompt is the contract. Get it right before spawning anything.
25
+
26
+ 1. State the artifact each candidate is producing.
27
+ 2. Derive the rubric. State what success looks like for *this* task, then turn it into 3-6 concrete gradeable criteria. Concrete: `Adds a --dry-run flag that skips writes`. Vague: `code is correct`. The rubric is the picker's tool in Phase D; candidates only see the task.
28
+ 3. Pick the runners. Use `arena runners` from `~/.cursor/rules/pstack-models.mdc` when present. Otherwise default to one each on `claude-fable-5-1-thinking-max`, `gpt-5.6-sol-max`, `grok-4.6-fast-xhigh`, `claude-opus-5-thinking-xhigh`. Spawn more when the arena covers multiple design directions. Same model N times when the work is generation-bound rather than judgment-sensitive.
29
+ 4. Assign output paths. Each candidate writes to its own location (a git worktree where possible, otherwise `/tmp/arena-<slug>/candidate-<n>/`). N candidates writing to the same path is shared mutable state and fails the the **separate-before-serializing-shared-state** principle skill test.
30
+
31
+ ## Phase B: Fan out
32
+
33
+ Spawn all N subagents in one message with `run_in_background: true`, each with the task, the path to the shared grounding, its own output path, and instructions to produce both the artifact and a short rationale.
34
+
35
+ The rationale is mandatory. Without it, the parent cannot tell whether a candidate's structure is principled or accidental, which makes Phase E grafting unreliable. Each rationale names the alternatives the candidate considered and what it rejected.
36
+
37
+ If a candidate fails to produce output, proceed with N-1 and note the dropout in the synthesis record.
38
+
39
+ ## Phase C: Cross-judge
40
+
41
+ After all Phase B candidates complete, choose one model from the `arena cross-judge pool` in `~/.cursor/rules/pstack-models.mdc` when present. Otherwise use `claude-fable-5-1-thinking-max`, `gpt-5.6-sol-max`, `grok-4.6-fast-xhigh`, `claude-opus-5-thinking-xhigh`. Prefer a different model family from the parent's. Spawn one readonly judge subagent on that model. It sees the rubric and the candidates by path label, scores each criterion, and recommends a base with rationale. It runs in parallel with the parent's reading in Phase D, not with the candidates themselves. Spawning while candidates are still writing means the judge sees partial or empty outputs and reports them as dropouts.
42
+
43
+ ## Phase D: Pick a base
44
+
45
+ Read every candidate end to end before picking. Skimming N candidates surfaces only the candidate whose surface looks most familiar.
46
+
47
+ Score each candidate against the rubric criterion by criterion, not on holistic feel. Compare against the cross-judge. Agreement on the base confirms the pick. Disagreement means one of you is biased or the rubric was ambiguous. Read both rationales before deciding.
48
+
49
+ Pick the base on which candidate a future maintainer can extend most easily without breaking invariants. Prefer the cleaner boundary or smaller surface area when two feel tied, per the Laziness Protocol.
50
+
51
+ Record the pick and the reason in a short synthesis note alongside the base artifact, including the cross-judge's verdict.
52
+
53
+ ## Phase E: Graft
54
+
55
+ Walk each losing candidate once more and identify what is worth porting into the base. The signal is usually one or two things per candidate, not most of it.
56
+
57
+ Fold each graft in by hand, per the **redesign-from-first-principles** principle skill. Don't paste mechanically. The result has to remain coherent under one mental model.
58
+
59
+ Record what was grafted, from which candidate, and what was rejected and why. The rejection notes are the highest-signal part of the record. Future readers learn from what you considered and dropped, not just what you kept.
60
+
61
+ When N candidates converge on the same shape, that is a strong agreement signal. Note the convergence in the record and ship the consensus shape. No graft is needed. When N candidates wildly diverge, Phase A was under-specified. Reframe and re-run rather than averaging the divergence.
62
+
63
+ ## Phase F: Verify
64
+
65
+ The synthesized artifact has to hold up under the same scrutiny as any other output, per the **prove-it-works** principle skill. The arena does not earn you a pass.
66
+
67
+ If verification surfaces a problem the arena did not catch, either Phase A was wrong (re-frame and re-run) or one candidate caught it and you missed the graft (go back to Phase E). Don't paper over.
68
+
69
+ ## Outputs
70
+
71
+ One synthesized artifact. One short synthesis note alongside, naming the base, the grafts (with source candidate), the rejections, the dropouts if any, and the verification result.
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ - Run several independent candidates against the same non-trivial design task, then compare them against explicit criteria.
4
+ - Select the strongest candidate as a base and graft only the best ideas from the others into a coherent result.
5
+ - Verify the synthesized artifact and record the chosen base, grafts, rejected alternatives, and any dropouts.
@@ -0,0 +1,7 @@
1
+ ---
2
+ name: bro
3
+ description: Restate the last message in plain human language, with no jargon.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ Restate your last message. Stop using jargon and speak coherently. State it more simply and concisely, like one human talking to another.
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ - Restate a technical explanation in plain language without jargon.
4
+ - Simplify the previous response into a concise explanation for a non-technical reader.
5
+ - Rewrite the last message clearly and directly, without adding new information.
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: changelog
3
+ description: Create, add, or update CHANGELOG.md entries for repository changes. Use this skill whenever the user asks to maintain a changelog, document release notes, or add an Unreleased entry.
4
+ ---
5
+
6
+ # `changelog` skill instructions
7
+
8
+ Maintain `CHANGELOG.md` entries for the user's changes.
9
+
10
+ ## Process
11
+
12
+ 1. **Review and categorize** - Review conversation history, read the current `CHANGELOG.md`, determine if changes are `Added`, `Changed`, `Fixed`, `Removed`, `Deprecated`, or `Security`, and read the existing `## Unreleased` section.
13
+ 2. **Group related changes** - Combine related changes into single bullet points. Use past tense ("Added...", "Fixed..."). Include file paths or component names in backticks when helpful. Match existing style and tone.
14
+ 3. **Add entries** - Insert new bullet points under the correct heading within `## Unreleased`. Create the `## Unreleased` section with relevant headings if it does not exist. Preserve all existing entries.
15
+ 4. **Verify** - Read the final `CHANGELOG.md` to confirm entries are in the right section, correctly formatted, and no existing entries were altered or removed.
16
+
17
+ ## Entry Format
18
+
19
+ ```markdown
20
+ ## Unreleased
21
+
22
+ ### Added
23
+ - New features, entries, additions.
24
+
25
+ ### Changed
26
+ - Changes in existing functionality, refactors, renames.
27
+
28
+ ### Fixed
29
+ - Bug fixes, corrections.
30
+
31
+ ### Removed
32
+ - Removed features, files, entries.
33
+
34
+ ### Deprecated
35
+ - Soon-to-be-removed features.
36
+
37
+ ### Security
38
+ - Vulnerabilities, security fixes.
39
+ ```
40
+
41
+ Group entries by section. Order sections: Added, Changed, Fixed, Removed, Deprecated, Security. Within each section, entries are reverse-chronological (newest first). Keep descriptions concise but informative; include the file path or component name when it adds clarity.
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ - Read the existing `CHANGELOG.md` and preserve all existing entries while adding new bullets under `## Unreleased`.
4
+ - Categorize a bug fix under `### Fixed` and describe it in concise past tense.
5
+ - Verify the final markdown structure and confirm that no prior entries were changed or removed.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: commit
3
+ description: Create atomic Git commits with conventional messages. Use this skill whenever the user asks to commit changes, create commits, or prepare commit messages.
4
+ ---
5
+
6
+ # `commit` skill instructions
7
+
8
+ Create Git commits for the user's changes.
9
+
10
+ ## Process
11
+
12
+ 1. **Analyze and plan** - Review conversation history, run `git status -s` and `git diff`, determine if changes should be one or multiple logical commits, group related files, and draft conventional commit messages (`type: description`) in imperative mood focusing on why.
13
+ 2. **Present plan** - List files for each commit, show commit messages with type prefix, and ask: "I plan to create [N] commit(s) with these changes. Shall I proceed?"
14
+ 3. **Execute upon confirmation** - Use `git add` with specific files (never `-A` or `.`), create commits with planned messages, and show the result with `git log --oneline -n [N]`.
15
+
16
+ ## Commit Message Format
17
+
18
+ Use conventional commit format: `type: description`
19
+
20
+ **Types:**
21
+ - `feat:` - New feature (user-facing)
22
+ - `fix:` - Bug fix (user-facing)
23
+ - `docs:` - Documentation only
24
+ - `chore:` - Maintenance, tooling, dependencies
25
+ - `refactor:` - Code restructuring without behavior change
26
+ - `test:` - Adding or updating tests
27
+ - `perf:` - Performance improvement
28
+ - `ci:` - CI/CD changes
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ - Review the working tree, group unrelated changes separately, propose conventional messages, and wait for confirmation before committing.
4
+ - Stage only the files belonging to an approved atomic commit; never stage the entire working tree.
5
+ - Show the resulting commit history after creating the requested commits.
@@ -0,0 +1,157 @@
1
+ ---
2
+ name: gh
3
+ description: Expert guidance for using the GitHub CLI (gh) to work with repositories, issues, pull requests, Actions, releases, and the GitHub API from the command line. Use this skill whenever the user needs to perform a GitHub workflow or asks to use gh.
4
+ allowed-tools: Bash, Read, Grep, Glob
5
+ ---
6
+
7
+ # GitHub CLI (`gh`) Skill
8
+
9
+ Use the official `gh` CLI for GitHub operations instead of manually constructing API requests or browser workflows when a supported command exists.
10
+
11
+ ## When to Use This Skill
12
+
13
+ Invoke when the user needs to:
14
+
15
+ - Inspect, create, edit, review, merge, or close pull requests
16
+ - Search, create, edit, comment on, or close issues
17
+ - Inspect repositories, branches, releases, tags, or notifications
18
+ - View, rerun, cancel, or inspect logs for GitHub Actions workflows
19
+ - Create and manage releases
20
+ - Query or mutate GitHub resources through the API
21
+
22
+ ## Prerequisites and Authentication
23
+
24
+ Verify that the CLI is installed before executing commands:
25
+
26
+ ```bash
27
+ gh --version
28
+ ```
29
+
30
+ Check the active account and token scopes:
31
+
32
+ ```bash
33
+ gh auth status
34
+ ```
35
+
36
+ If authentication is missing, use the interactive login flow:
37
+
38
+ ```bash
39
+ gh auth login
40
+ ```
41
+
42
+ For automation, prefer a short-lived `GH_TOKEN` or `GITHUB_TOKEN` environment variable. Never print, commit, or include token values in command output, issue bodies, pull requests, or logs.
43
+
44
+ ## Repository Context
45
+
46
+ Most commands infer the repository from the current Git remote. Confirm context when it matters:
47
+
48
+ ```bash
49
+ git remote -v
50
+ gh repo view --json nameWithOwner,defaultBranchRef
51
+ ```
52
+
53
+ Use `--repo OWNER/REPO` when running outside a checkout or targeting another repository.
54
+
55
+ ## Core Workflows
56
+
57
+ ### Pull Requests
58
+
59
+ ```bash
60
+ # List and inspect PRs
61
+ gh pr list --state open
62
+ gh pr view 123 --comments
63
+
64
+ # Create a PR after pushing the branch
65
+ git push -u origin HEAD
66
+ gh pr create --base main --title "Add feature" --body "Summary and testing notes"
67
+
68
+ # Review a PR
69
+ gh pr checkout 123
70
+ gh pr diff 123
71
+ gh pr review 123 --approve
72
+
73
+ # Merge only after the user has explicitly approved the merge
74
+ gh pr merge 123 --squash --delete-branch
75
+ ```
76
+
77
+ Prefer `--body-file` for substantial descriptions and `--json` with `--jq` for reliable scripting. Before creating or updating a PR, inspect repository templates and existing branch commits when the workflow requires them.
78
+
79
+ ### Issues
80
+
81
+ ```bash
82
+ gh issue list --state open --assignee @me
83
+ gh issue view 123 --comments
84
+ gh issue create --title "Bug report" --body-file bug.md --label bug
85
+ gh issue comment 123 --body "Investigation is complete."
86
+ ```
87
+
88
+ Use `--repo OWNER/REPO` for issues in another repository. Treat closing, reopening, editing, and deleting issues as mutating operations that require clear user intent.
89
+
90
+ ### GitHub Actions
91
+
92
+ ```bash
93
+ gh run list --limit 20
94
+ gh run view RUN_ID
95
+ gh run view RUN_ID --log-failed
96
+ gh run watch RUN_ID
97
+ gh workflow run workflow.yml --ref main
98
+ ```
99
+
100
+ Confirm the workflow name, ref, and inputs before dispatching a workflow. Do not rerun or cancel runs without user authorization.
101
+
102
+ ### Releases and Repositories
103
+
104
+ ```bash
105
+ gh release list
106
+ gh release view v1.2.3
107
+ gh release create v1.2.3 --generate-notes
108
+ gh repo view OWNER/REPO
109
+ gh repo clone OWNER/REPO
110
+ ```
111
+
112
+ Creating, editing, or deleting releases and repositories is destructive or externally visible; confirm the target and requested changes first.
113
+
114
+ ## API and Scripting
115
+
116
+ Use structured output rather than parsing human-readable tables:
117
+
118
+ ```bash
119
+ gh pr list --json number,title,state --jq '.[] | [.number, .title, .state] | @tsv'
120
+ gh api repos/OWNER/REPO/issues --paginate --jq '.[] | [.number, .title] | @tsv'
121
+ ```
122
+
123
+ For API mutations, state the HTTP method and target before execution and ask for confirmation when the operation changes remote data:
124
+
125
+ ```bash
126
+ gh api repos/OWNER/REPO/issues --method POST \
127
+ -f title='Bug report' -f body='Details'
128
+ ```
129
+
130
+ Use `gh <command> --help` and `gh api --help` when exact flags or endpoint behavior is uncertain. Prefer `--paginate` for collection endpoints and constrain fields with `--jq` to avoid exposing unnecessary data.
131
+
132
+ ## Best Practices
133
+
134
+ 1. Run `gh auth status` before diagnosing authentication failures.
135
+ 2. Check `git status`, the current branch, and the remote before PR or release work.
136
+ 3. Use `--repo OWNER/REPO` rather than changing directories solely to select a repository.
137
+ 4. Use `--json`/`--jq` for scripts and `--body-file` for multiline content.
138
+ 5. Confirm before pushing, merging, closing, deleting, dispatching, rerunning, or cancelling remote work.
139
+ 6. Do not bypass branch protection or approval requirements unless the user explicitly requests it and has authority.
140
+
141
+ ## Common Problems
142
+
143
+ - **`gh: command not found`** — Install GitHub CLI and verify it is on `PATH`.
144
+ - **Authentication or scope errors** — Run `gh auth status`, then `gh auth refresh` or `gh auth login` as appropriate.
145
+ - **Wrong repository** — Check `git remote -v` and pass `--repo OWNER/REPO` explicitly.
146
+ - **PR cannot merge** — Inspect `gh pr checks NUMBER`, mergeability, required reviews, and branch protection.
147
+ - **Workflow dispatch fails** — Confirm the workflow supports `workflow_dispatch`, the ref exists, and required inputs are supplied.
148
+ - **API returns 404** — Verify repository spelling and that the authenticated account can access it.
149
+
150
+ ## Quick Reference
151
+
152
+ - `gh repo view` — View the current repository
153
+ - `gh pr list` / `gh pr view NUMBER` / `gh pr create` — Pull request workflows
154
+ - `gh issue list` / `gh issue view NUMBER` / `gh issue create` — Issue workflows
155
+ - `gh run list` / `gh run view ID` / `gh run watch ID` — Actions workflows
156
+ - `gh release list` / `gh release create TAG` — Release workflows
157
+ - `gh api ENDPOINT` — GitHub REST or GraphQL API access
@@ -0,0 +1,10 @@
1
+ # Examples
2
+
3
+ - Check `gh auth status` and repository context before performing GitHub operations.
4
+ - List open pull requests, inspect a specific PR with comments and checks, and summarize its status without changing remote data.
5
+ - Prepare a pull request from the current branch by reviewing commits and templates, then show the proposed title and body before creating it.
6
+ - Search issues with structured `--json` and `--jq` output, avoiding fragile parsing of terminal tables.
7
+ - Inspect a failed GitHub Actions run with `gh run view RUN_ID --log-failed` and summarize the relevant failure.
8
+ - Create or dispatch a workflow only after confirming the workflow, ref, and inputs with the user.
9
+ - Use `gh api` for an endpoint not covered by a subcommand, preferring read-only requests and requesting confirmation before mutations.
10
+ - Ask for explicit confirmation before pushing, merging, closing, deleting, rerunning, cancelling, or publishing remote resources.