@mohammadhprp/system-prompt 0.12.3 → 0.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/framework/skills/README.md +15 -0
  2. package/framework/skills/architect/SKILL.md +83 -0
  3. package/framework/skills/architect/examples.md +5 -0
  4. package/framework/skills/architect/references/design-red-flags.md +33 -0
  5. package/framework/skills/architect/references/rationale-template.md +35 -0
  6. package/framework/skills/architect/references/runner-prompt.md +20 -0
  7. package/framework/skills/arena/SKILL.md +71 -0
  8. package/framework/skills/arena/examples.md +5 -0
  9. package/framework/skills/bro/SKILL.md +7 -0
  10. package/framework/skills/bro/examples.md +5 -0
  11. package/framework/skills/changelog/SKILL.md +41 -0
  12. package/framework/skills/changelog/examples.md +5 -0
  13. package/framework/skills/commit/SKILL.md +28 -0
  14. package/framework/skills/commit/examples.md +5 -0
  15. package/framework/skills/how/SKILL.md +135 -0
  16. package/framework/skills/how/examples.md +5 -0
  17. package/framework/skills/how/references/critic-prompt.md +59 -0
  18. package/framework/skills/how/references/critique-rubric.md +58 -0
  19. package/framework/skills/how/references/explainer-prompt.md +55 -0
  20. package/framework/skills/how/references/explorer-prompt.md +52 -0
  21. package/framework/skills/merge-request/SKILL.md +40 -0
  22. package/framework/skills/merge-request/examples.md +5 -0
  23. package/framework/skills/pull-request/SKILL.md +31 -0
  24. package/framework/skills/pull-request/examples.md +5 -0
  25. package/framework/skills/release/SKILL.md +30 -0
  26. package/framework/skills/release/examples.md +5 -0
  27. package/framework/skills/review/SKILL.md +18 -0
  28. package/framework/skills/review/examples.md +5 -0
  29. package/framework/skills/tdd/SKILL.md +44 -0
  30. package/framework/skills/tdd/examples.md +5 -0
  31. package/framework/skills/unslop/SKILL.md +81 -0
  32. package/framework/skills/unslop/examples.md +5 -0
  33. package/framework/skills/why/SKILL.md +230 -0
  34. package/framework/skills/why/examples.md +5 -0
  35. package/framework/skills/why/references/epistemics.md +144 -0
  36. package/framework/skills/why/references/investigator-prompt.md +103 -0
  37. package/framework/skills/why/references/source-playbook.md +17 -0
  38. package/framework/skills/why/references/sources/code-archaeology.md +88 -0
  39. package/framework/skills/why/references/sources/databricks.md +70 -0
  40. package/framework/skills/why/references/sources/datadog.md +99 -0
  41. package/framework/skills/why/references/sources/incident-postmortem.md +15 -0
  42. package/framework/skills/why/references/sources/linear.md +48 -0
  43. package/framework/skills/why/references/sources/notion.md +55 -0
  44. package/framework/skills/why/references/sources/sentry.md +100 -0
  45. package/framework/skills/why/references/sources/slack.md +54 -0
  46. package/framework/skills/why/references/synthesizer-prompt.md +135 -0
  47. package/package.json +1 -1
  48. package/src/catalog.js +14 -1
@@ -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,135 @@
1
+ ---
2
+ name: how
3
+ description: "Use for \"how does X work\", code walkthroughs before changing something, and placement / ownership / layering questions (\"where should this live\", \"which package owns this\", \"is this the right layer\"). Explains subsystem architecture, runtime flow, onboarding mental models. Can critique architecture. Use why for motivation."
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # How
8
+
9
+ Explore the codebase to answer "how does X work?" questions. Produce clear architectural explanations at the level of a senior engineer onboarding onto a subsystem. Enough to build a working mental model, not annotated source code.
10
+
11
+ Two modes:
12
+
13
+ 1. **Explain** (default). Explore the codebase and produce a clear explanation
14
+ 2. **Critique.** Explain first, then spawn multiple models to independently identify architectural issues
15
+
16
+ ## Explain Mode
17
+
18
+ ### Step 1. Understand the Question and Assess Complexity
19
+
20
+ Parse what the user is asking about:
21
+
22
+ - "How does the rate limiter work?", a subsystem
23
+ - "How do we handle billing for on-demand usage?", a feature flow
24
+ - "How is the auth service structured?", an architectural overview
25
+ - "Walk me through what happens when a user submits a form", a runtime trace
26
+
27
+ Identify the scope. If ambiguous, state your best-guess interpretation before exploring. Don't ask. Let the user redirect if you're off.
28
+
29
+ **Assess complexity to decide the approach:**
30
+
31
+ - **Simple** (a single module, a small utility, a narrow question like "how does function X work"): skip explorer agents; the explainer explores and explains in a single pass. Go to Step 2b.
32
+ - **Complex** (a subsystem spanning multiple files/services, a cross-cutting feature, a full architectural overview): spawn parallel explorer agents first, then hand off to the explainer. Go to Step 2a.
33
+
34
+ When in doubt, lean simple. You can always spawn explorers if the explainer hits a wall.
35
+
36
+ ### Step 2a. Explore (complex questions only)
37
+
38
+ Decompose the question into 2-4 parallel exploration angles, each a distinct slice of the subsystem so explorers don't duplicate work. Example split for "how does the rate limiter work?":
39
+
40
+ - Explorer 1: data model and state management
41
+ - Explorer 2: request path and enforcement
42
+ - Explorer 3: configuration and metrics infrastructure
43
+
44
+ The right decomposition depends on the question. Use your judgment. Narrow questions: 2 explorers is fine. Broad subsystems: up to 4.
45
+
46
+ Spawn all explorers in a single message:
47
+
48
+ - `subagent_type`: `generalPurpose`
49
+ - `model`: your configured how-explorer model (default `grok-4.6-fast-xhigh`)
50
+ - `readonly`: `true`
51
+
52
+ Each explorer gets the same base prompt from `references/explorer-prompt.md` plus a specific exploration angle naming its slice. Each explorer should:
53
+ - Start broad: Glob for relevant directories, Grep for key types/interfaces/class names
54
+ - Follow the thread: from an entry point, trace the call chain (callers, callees, data flow, type definitions)
55
+ - Read the actual code, don't guess from file names
56
+ - Stop when it can describe the full path from input to output (or trigger to effect) without hand-waving any step
57
+ - Note things that are surprising, non-obvious, or that a newcomer would get wrong
58
+
59
+ Each explorer returns structured findings: components found, flow traced, files read, anything non-obvious. Overlap between explorers is fine; the explainer reconciles.
60
+
61
+ Then proceed to Step 3.
62
+
63
+ ### Step 2b. Direct Explain (simple questions)
64
+
65
+ Spawn a single Task subagent that explores and explains in one pass:
66
+
67
+ - `subagent_type`: `generalPurpose`
68
+ - `model`: your configured how-explainer model (default `claude-fable-5-1-thinking-max`)
69
+ - `readonly`: `true`
70
+
71
+ The agent does its own exploration (Glob, Grep, Read) and writes the explanation directly. Read `references/explainer-prompt.md` for the communication style and output format. Same structure, just no explorer findings as input.
72
+
73
+ Proceed to Step 4.
74
+
75
+ ### Step 3. Synthesize (complex questions only)
76
+
77
+ Once all explorers return, spawn a single Task subagent to synthesize their findings into one coherent explanation:
78
+
79
+ - `subagent_type`: `generalPurpose`
80
+ - `model`: your configured how-explainer model (default `claude-fable-5-1-thinking-max`)
81
+ - `readonly`: `true`
82
+
83
+ The explainer gets all explorers' findings and writes the human-facing explanation (output format below). Read `references/explainer-prompt.md` for the full prompt template. The explainer reconciles overlapping findings, resolves contradictions, and weaves the slices into a unified picture.
84
+
85
+ ### Step 4. Present
86
+
87
+ Present the explainer's output to the user. You may lightly edit for clarity or add context from the conversation, but don't substantially rewrite. The explainer's communication is the product.
88
+
89
+ ### Output Format
90
+
91
+ Follow this structure, adapted to the question. Not every section is needed for every question.
92
+
93
+ **Overview.** 1-2 paragraphs. What it is, what it does, why it exists. Enough to decide whether to keep reading.
94
+
95
+ **Key Concepts.** The important types, services, or abstractions. Brief definition of each. Not exhaustive, just the ones needed to understand the rest.
96
+
97
+ **How It Works.** The core of the explanation. Walk through the flow: what triggers it, what happens step by step, where data goes, the decision points. Prose, not pseudocode. Reference specific files and functions so the reader can go look, but don't dump code blocks unless a snippet is genuinely necessary.
98
+
99
+ **Where Things Live.** A brief map of the relevant files/directories. Not every file, just the ones needed to start working in this area.
100
+
101
+ **Gotchas.** Non-obvious or surprising things that would trip someone up. Historical context that explains why something looks weird. Known sharp edges.
102
+
103
+ ## Critique Mode
104
+
105
+ Triggered when the user asks for architectural issues, problems, or improvements, not just understanding.
106
+
107
+ ### Step 1. Explain First
108
+
109
+ Run the full explain flow above (Steps 1-4). You must understand the architecture before critiquing it.
110
+
111
+ ### Step 2. Spawn Critics
112
+
113
+ After the explanation is complete, spawn one architectural critic per model in your configured how-critics list (defaults `claude-fable-5-1-thinking-max`, `gpt-5.6-sol-max`, `grok-4.6-fast-xhigh`, `claude-opus-5-thinking-xhigh`), all in a single message.
114
+
115
+ For each critic:
116
+ - `subagent_type`: `generalPurpose`
117
+ - `model`: one model from the configured how-critics list. These are minimum reasoning levels. The lead should escalate any model when the architecture warrants deeper analysis.
118
+ - `readonly`: `true`
119
+
120
+ Read `references/critic-prompt.md` for the prompt template. Each critic gets:
121
+ 1. The explanation from Step 1 (so they don't re-explore)
122
+ 2. The relevant file paths (so they can read the actual code)
123
+ 3. The architectural critique rubric from `references/critique-rubric.md`
124
+
125
+ ### Step 3. Lead Judgment
126
+
127
+ Same framework as the interrogate skill. You're a pragmatic lead, not an aggregator.
128
+
129
+ Categorize findings:
130
+ - **Act on.** Architectural problems worth fixing now
131
+ - **Consider.** Real concerns, but the cost/benefit is unclear
132
+ - **Noted.** Valid observations, low priority
133
+ - **Dismissed.** Wrong, missing context, or style preference
134
+
135
+ Present the explanation first (from Step 1), then the critique verdict below it. The explanation should stand on its own; someone who just wants to understand the system shouldn't wade through critique.
@@ -0,0 +1,5 @@
1
+ # Examples
2
+
3
+ - Trace how a request moves through a subsystem and identify the key files, symbols, and decision points.
4
+ - Explain where a new piece of logic belongs and which layer should own it.
5
+ - Walk a new engineer through a complex feature, including important gotchas and runtime flow.
@@ -0,0 +1,59 @@
1
+ # Critic Prompt Template
2
+
3
+ Build each critic subagent's prompt from this template. Fill in the placeholders.
4
+
5
+ ---
6
+
7
+ You are reviewing the architecture of a codebase subsystem. An explanation of how it works has already been written. Read it to orient yourself, then read the actual code to form your own judgment.
8
+
9
+ ## Architectural Explanation
10
+
11
+ {EXPLANATION}
12
+
13
+ ## Relevant Files
14
+
15
+ {FILE_PATHS}
16
+
17
+ ## Critique Rubric
18
+
19
+ {CRITIQUE_RUBRIC_CONTENTS}
20
+
21
+ ## Instructions
22
+
23
+ Read the files listed above. Use the explanation as a map, but form your own opinions from the code itself. The explanation might miss things or frame them charitably.
24
+
25
+ Find architectural problems, not line-level bugs or style issues. Ask whether this subsystem is built well for what it needs to do and how it will need to evolve.
26
+
27
+ For each finding:
28
+
29
+ 1. **Severity**: `structural` | `concern` | `observation`
30
+ - `structural`: a fundamental architectural problem. Wrong abstraction boundary, broken data model, coupling that will block future work
31
+ - `concern`: a real issue that makes the system harder to work with or reason about, but not fundamentally broken
32
+ - `observation`: worth noting. A tradeoff that might not age well, a pattern inconsistent with the rest of the codebase, technical debt
33
+ 2. **Finding**: the architectural issue. Be specific. Name the components, the boundary, the coupling.
34
+ 3. **Evidence**: concrete code that demonstrates the problem. Don't just assert that "this is too coupled". Show the dependency chain.
35
+ 4. **Impact**: what the issue costs. Harder to test? Harder to change? Performance cliff at scale? Be concrete about the consequence.
36
+
37
+ ## What to Avoid
38
+
39
+ - Line-level code review (not your job here)
40
+ - Suggesting rewrites without demonstrating a problem with the current approach
41
+ - "This could use more abstraction" without showing what the abstraction would actually solve
42
+ - Flagging intentional tradeoffs with clear benefits as issues
43
+
44
+ If the architecture is sound, say so. An empty critique is a valid outcome.
45
+
46
+ ## Output
47
+
48
+ ```
49
+ ## Findings
50
+
51
+ ### 1. [Severity] Short title
52
+ **Components**: Which parts of the system are involved
53
+ **Finding**: What's wrong architecturally
54
+ **Evidence**: Concrete code references
55
+ **Impact**: What this costs in practice
56
+
57
+ ### 2. [Severity] Short title
58
+ ...
59
+ ```