@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.
- package/framework/commands/review.md +5 -20
- package/framework/skills/README.md +15 -0
- package/framework/skills/architect/SKILL.md +83 -0
- package/framework/skills/architect/examples.md +5 -0
- package/framework/skills/architect/references/design-red-flags.md +33 -0
- package/framework/skills/architect/references/rationale-template.md +35 -0
- package/framework/skills/architect/references/runner-prompt.md +20 -0
- package/framework/skills/arena/SKILL.md +71 -0
- package/framework/skills/arena/examples.md +5 -0
- package/framework/skills/bro/SKILL.md +7 -0
- package/framework/skills/bro/examples.md +5 -0
- package/framework/skills/changelog/SKILL.md +41 -0
- package/framework/skills/changelog/examples.md +5 -0
- package/framework/skills/commit/SKILL.md +28 -0
- package/framework/skills/commit/examples.md +5 -0
- package/framework/skills/gh/SKILL.md +157 -0
- package/framework/skills/gh/examples.md +10 -0
- package/framework/skills/how/SKILL.md +135 -0
- package/framework/skills/how/examples.md +5 -0
- package/framework/skills/how/references/critic-prompt.md +59 -0
- package/framework/skills/how/references/critique-rubric.md +58 -0
- package/framework/skills/how/references/explainer-prompt.md +55 -0
- package/framework/skills/how/references/explorer-prompt.md +52 -0
- package/framework/skills/merge-request/SKILL.md +40 -0
- package/framework/skills/merge-request/examples.md +5 -0
- package/framework/skills/ponytail/SKILL.md +145 -0
- package/framework/skills/ponytail/references/ponytail-audit.md +18 -0
- package/framework/skills/ponytail/references/ponytail-debt.md +21 -0
- package/framework/skills/ponytail/references/ponytail-gain.md +25 -0
- package/framework/skills/ponytail/references/ponytail-help.md +18 -0
- package/framework/skills/ponytail/references/ponytail-mode.md +33 -0
- package/framework/skills/ponytail/references/ponytail-review.md +27 -0
- package/framework/skills/ponytail/references/ponytail-rules.md +31 -0
- package/framework/skills/ponytail/references/principle-boundary-discipline.md +7 -0
- package/framework/skills/ponytail/references/principle-encode-lessons-in-structure.md +13 -0
- package/framework/skills/ponytail/references/principle-fix-root-causes.md +17 -0
- package/framework/skills/ponytail/references/principle-make-operations-idempotent.md +12 -0
- package/framework/skills/ponytail/references/principle-model-the-domain.md +7 -0
- package/framework/skills/ponytail/references/principle-prove-it-works.md +27 -0
- package/framework/skills/ponytail/references/principle-sequence-verifiable-units.md +7 -0
- package/framework/skills/pull-request/SKILL.md +31 -0
- package/framework/skills/pull-request/examples.md +5 -0
- package/framework/skills/release/SKILL.md +30 -0
- package/framework/skills/release/examples.md +5 -0
- package/framework/skills/review/SKILL.md +113 -0
- package/framework/skills/review/examples.md +6 -0
- package/framework/skills/review/scripts/render_review.py +95 -0
- package/framework/skills/review/scripts/resolve_spec_context.py +723 -0
- package/framework/skills/review/scripts/validate_review_json.py +348 -0
- package/framework/skills/tdd/SKILL.md +44 -0
- package/framework/skills/tdd/examples.md +5 -0
- package/framework/skills/unslop/SKILL.md +81 -0
- package/framework/skills/unslop/examples.md +5 -0
- package/framework/skills/why/SKILL.md +230 -0
- package/framework/skills/why/examples.md +5 -0
- package/framework/skills/why/references/epistemics.md +144 -0
- package/framework/skills/why/references/investigator-prompt.md +103 -0
- package/framework/skills/why/references/source-playbook.md +17 -0
- package/framework/skills/why/references/sources/code-archaeology.md +88 -0
- package/framework/skills/why/references/sources/databricks.md +70 -0
- package/framework/skills/why/references/sources/datadog.md +99 -0
- package/framework/skills/why/references/sources/incident-postmortem.md +15 -0
- package/framework/skills/why/references/sources/linear.md +48 -0
- package/framework/skills/why/references/sources/notion.md +55 -0
- package/framework/skills/why/references/sources/sentry.md +100 -0
- package/framework/skills/why/references/sources/slack.md +54 -0
- package/framework/skills/why/references/synthesizer-prompt.md +135 -0
- package/package.json +1 -1
- package/src/catalog.js +17 -2
|
@@ -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
|
+
```
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Architectural Critique Rubric
|
|
2
|
+
|
|
3
|
+
Review through whichever of these lenses are relevant. Not every lens applies to every subsystem.
|
|
4
|
+
|
|
5
|
+
## Abstraction Fit
|
|
6
|
+
|
|
7
|
+
Are the abstractions pulling their weight?
|
|
8
|
+
|
|
9
|
+
- Does each abstraction represent a real concept, or is it an indirection layer "in case we need it"?
|
|
10
|
+
- Are the boundaries in the right place? Do they separate things that change independently?
|
|
11
|
+
- Is there accidental coupling where components share implementation details they shouldn't need to know about?
|
|
12
|
+
- Is business logic entangled with framework wiring, or cleanly separated?
|
|
13
|
+
|
|
14
|
+
Over-abstraction is as much a problem as under-abstraction. A flat, simple design is fine when the domain is simple.
|
|
15
|
+
|
|
16
|
+
## Data Model
|
|
17
|
+
|
|
18
|
+
Do the data structures fit the actual usage patterns?
|
|
19
|
+
|
|
20
|
+
- Are the data models designed for how data is actually accessed, or for how it was conceptually modeled?
|
|
21
|
+
- Are there impedance mismatches, places where code constantly reshapes data because the model doesn't match the access pattern?
|
|
22
|
+
- Are types honest? Do they represent what data actually looks like at runtime, or claim more structure than exists?
|
|
23
|
+
|
|
24
|
+
## Boundary Discipline
|
|
25
|
+
|
|
26
|
+
Are system boundaries clean and well-placed?
|
|
27
|
+
|
|
28
|
+
- Is validation concentrated at entry points, or scattered through internal code?
|
|
29
|
+
- Are errors handled at boundaries and propagated cleanly, or caught and re-thrown at every layer?
|
|
30
|
+
- Does data cross boundaries in well-typed shapes, or as bags of optional fields?
|
|
31
|
+
- Could this subsystem be tested in isolation, or does it require the entire system to be running?
|
|
32
|
+
|
|
33
|
+
## Evolution Readiness
|
|
34
|
+
|
|
35
|
+
How well will this architecture handle likely changes?
|
|
36
|
+
|
|
37
|
+
- If the most probable next requirement landed tomorrow, how much would change? "One file" or "everything"?
|
|
38
|
+
- Are there hardcoded assumptions that would need to be relaxed?
|
|
39
|
+
- Is the design bolted-on (integrated as an afterthought) or integrated (looks like it was always part of the plan)?
|
|
40
|
+
- Are legacy paths preserved for compatibility that no one depends on?
|
|
41
|
+
|
|
42
|
+
Don't penalize for not handling hypothetical changes. Focus on changes plausible given the codebase's trajectory.
|
|
43
|
+
|
|
44
|
+
## Complexity vs. Value
|
|
45
|
+
|
|
46
|
+
Is the complexity budget spent wisely?
|
|
47
|
+
|
|
48
|
+
- Is complexity concentrated in the parts that need it (core logic, tricky invariants) or in accidental places (boilerplate, unnecessary indirection, configuration)?
|
|
49
|
+
- Are there simpler ways to achieve the same behavior?
|
|
50
|
+
- Does every component earn its existence, or are there vestigial pieces from an earlier design?
|
|
51
|
+
|
|
52
|
+
## Consistency
|
|
53
|
+
|
|
54
|
+
Does this subsystem follow the patterns established elsewhere in the codebase?
|
|
55
|
+
|
|
56
|
+
- Are similar problems solved the same way here as elsewhere, or does this area invent its own patterns?
|
|
57
|
+
- If the patterns differ, is there a good reason, or did it just evolve independently?
|
|
58
|
+
- Inconsistency isn't automatically bad. But unexplained inconsistency is a maintenance burden.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Explainer Prompt Template
|
|
2
|
+
|
|
3
|
+
Build the explainer subagent's prompt from this template. Fill in the placeholders.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are writing an architectural explanation for a senior engineer. Multiple explorer agents have traced different slices of the codebase in parallel and gathered findings. Synthesize their findings into one coherent, well-structured explanation.
|
|
8
|
+
|
|
9
|
+
## Original Question
|
|
10
|
+
|
|
11
|
+
> {QUESTION}
|
|
12
|
+
|
|
13
|
+
## Explorer Findings
|
|
14
|
+
|
|
15
|
+
{EXPLORER_FINDINGS_ALL}
|
|
16
|
+
|
|
17
|
+
## Instructions
|
|
18
|
+
|
|
19
|
+
The explorers each investigated a different angle of the same subsystem. Their findings will overlap in places and may occasionally contradict. Reconcile them. Merge overlapping descriptions, resolve contradictions by checking the code yourself, and weave the separate slices into a unified picture.
|
|
20
|
+
|
|
21
|
+
Write an explanation a senior engineer unfamiliar with this area could read and walk away with a solid mental model, understanding the architecture well enough to start working in it confidently.
|
|
22
|
+
|
|
23
|
+
You have read-only access to the codebase to check anything, clarify a detail, or fill a gap. Use Read, Grep, and Glob as needed. The explorers did the heavy lifting, so you shouldn't need to re-explore from scratch.
|
|
24
|
+
|
|
25
|
+
## Output Format
|
|
26
|
+
|
|
27
|
+
Use this structure, adapted to what makes sense for the question. Not every section is needed for every question.
|
|
28
|
+
|
|
29
|
+
### Overview
|
|
30
|
+
1-2 paragraphs. What is this thing, what does it do, why does it exist. Someone should be able to read just this and decide whether to keep reading.
|
|
31
|
+
|
|
32
|
+
### Key Concepts
|
|
33
|
+
The important types, services, or abstractions needed to follow the rest. Brief definitions, not exhaustive.
|
|
34
|
+
|
|
35
|
+
### How It Works
|
|
36
|
+
The core of the explanation, and the longest section. Walk through the flow: what triggers it, what happens step by step, where data goes, what the decision points are.
|
|
37
|
+
|
|
38
|
+
Use prose, not pseudocode. Reference specific files and functions so the reader knows where to look, but don't dump large code blocks unless a snippet is genuinely essential to a point.
|
|
39
|
+
|
|
40
|
+
When the flow involves multiple components talking to each other, or data transforming through stages, include a diagram. Use mermaid (```mermaid) for structured flows (sequence diagrams, flowcharts, component graphs) or ASCII art for simpler relationships where mermaid would be overkill. Use your judgment. A diagram should clarify, not decorate. If prose covers the flow, skip the diagram.
|
|
41
|
+
|
|
42
|
+
### Where Things Live
|
|
43
|
+
A brief file/directory map. Just the ones someone would need to start working here.
|
|
44
|
+
|
|
45
|
+
### Gotchas
|
|
46
|
+
Non-obvious things, surprising behavior, historical context, sharp edges. Skip this section if there's nothing worth calling out.
|
|
47
|
+
|
|
48
|
+
## Communication Style
|
|
49
|
+
|
|
50
|
+
- Use concrete language, not abstractions-about-abstractions
|
|
51
|
+
- Say "the `UserService` calls `AuthClient.refresh()`" not "the service delegates to the client"
|
|
52
|
+
- When something is complex, explain why it's complex. Don't just describe the complexity
|
|
53
|
+
- When something is simple, don't pad it out
|
|
54
|
+
- If there's a helpful analogy, use it; if there isn't, don't force one
|
|
55
|
+
- If the explorers flagged open questions or gaps, acknowledge them honestly rather than papering over them
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Explorer Prompt Template
|
|
2
|
+
|
|
3
|
+
Build each explorer subagent's prompt from this template. Fill in the placeholders.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are exploring a codebase to understand how something works. Gather facts: trace code paths, read implementations, map components. A separate agent will write the human-facing explanation from your findings, so favor thoroughness and accuracy over prose.
|
|
8
|
+
|
|
9
|
+
Other explorers are investigating different slices of the same subsystem in parallel. Don't try to cover everything. Focus on your assigned angle and go deep.
|
|
10
|
+
|
|
11
|
+
## Question
|
|
12
|
+
|
|
13
|
+
> {QUESTION}
|
|
14
|
+
|
|
15
|
+
## Your Exploration Angle
|
|
16
|
+
|
|
17
|
+
{EXPLORATION_ANGLE}
|
|
18
|
+
|
|
19
|
+
## Exploration Instructions
|
|
20
|
+
|
|
21
|
+
Start by finding the relevant code. Use Glob to find directories and files, Grep to find key symbols, Read to understand the actual implementation. Don't guess from names. Read the code.
|
|
22
|
+
|
|
23
|
+
Follow this pattern:
|
|
24
|
+
1. **Find the entry point.** What triggers this behavior? A user action, an API call, a scheduled job? Find where it starts.
|
|
25
|
+
2. **Trace the flow.** Follow the call chain from the entry point. Read each function. Understand what data flows through and how it transforms.
|
|
26
|
+
3. **Map the key abstractions.** What types, interfaces, services, or classes are central? Read their definitions. Understand what they represent and why they exist.
|
|
27
|
+
4. **Find the boundaries.** Where does this subsystem interface with others? What goes in, what comes out?
|
|
28
|
+
5. **Look for the non-obvious.** Anything surprising? Anything that looks like a historical artifact? Anything a newcomer would misunderstand?
|
|
29
|
+
|
|
30
|
+
Keep exploring until you can describe the full picture without hand-waving. If you hit a part you can't trace, say so explicitly. "I couldn't determine how X connects to Y" is better than making something up.
|
|
31
|
+
|
|
32
|
+
## Output
|
|
33
|
+
|
|
34
|
+
Return your findings in this structure. Be factual and specific. Reference exact file paths, function names, type names, and line numbers where relevant.
|
|
35
|
+
|
|
36
|
+
### Components Found
|
|
37
|
+
The key types, services, classes, and abstractions. For each: name, file path, and a one-sentence description of what it does.
|
|
38
|
+
|
|
39
|
+
### Flow
|
|
40
|
+
The execution flow step by step. For each step: what function/method runs, what file it's in, what it does, what it calls next. Include the data that flows between steps.
|
|
41
|
+
|
|
42
|
+
### Files Read
|
|
43
|
+
Every file you read during exploration, so the explainer can reference them.
|
|
44
|
+
|
|
45
|
+
### Boundaries
|
|
46
|
+
Where this subsystem connects to other parts of the codebase. The inputs and outputs.
|
|
47
|
+
|
|
48
|
+
### Non-Obvious Things
|
|
49
|
+
Anything surprising, historically motivated, or easy to get wrong. Things that look like they should work one way but actually work another.
|
|
50
|
+
|
|
51
|
+
### Open Questions
|
|
52
|
+
Anything you couldn't fully trace or understand. Be honest about gaps.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merge-request
|
|
3
|
+
description: Create a GitLab merge request (MR) for the current branch using the glab CLI. Use this skill whenever the user asks to open, create, update, or prepare a GitLab MR or merge request.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `merge-request` skill instructions
|
|
7
|
+
|
|
8
|
+
Create a merge request for the current branch.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
1. **Collect information**
|
|
13
|
+
- Get the current branch name: `git branch --show-current`
|
|
14
|
+
- Read the MR template from `.gitlab/merge_request_templates/default.md` if it exists.
|
|
15
|
+
|
|
16
|
+
2. **Format MR title**
|
|
17
|
+
- Take the branch name, replace all `-` with spaces, and capitalize the first character.
|
|
18
|
+
|
|
19
|
+
3. **Collect commits and build summary**
|
|
20
|
+
- List commits on the branch that are not on `develop`: `git log develop..HEAD --oneline`
|
|
21
|
+
- Read each commit message and convert it to a bullet list summarizing user-facing changes.
|
|
22
|
+
- Merge/squash related commits (for example, multiple commits for the same change).
|
|
23
|
+
- Keep the summary concise, with one bullet per logical change.
|
|
24
|
+
|
|
25
|
+
4. **Fill template**
|
|
26
|
+
- Set Summary to the bullet list from step 3.
|
|
27
|
+
- Keep the Checklist section as-is.
|
|
28
|
+
|
|
29
|
+
5. **Present plan and confirm** - Show the source branch, target branch (`develop`), title, and filled description. Ask: "Shall I create this MR?" Push the changes if the user says yes.
|
|
30
|
+
|
|
31
|
+
6. **Create upon confirmation** - Use `glab mr create` with:
|
|
32
|
+
- `--source-branch`: Current branch
|
|
33
|
+
- `--target-branch`: `develop`
|
|
34
|
+
- `--title`: Prepend `Draft: ` to the formatted branch name
|
|
35
|
+
- `--description`: Filled template content
|
|
36
|
+
- `--assignee`: `1`
|
|
37
|
+
- `--squash`
|
|
38
|
+
- `--remove-source-branch`
|
|
39
|
+
|
|
40
|
+
7. **Show the resulting URL.**
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
- Read the GitLab MR template and current branch history before drafting the request.
|
|
4
|
+
- Summarize related commits into concise user-facing bullets while leaving the checklist unchanged.
|
|
5
|
+
- Display the complete MR plan and wait for approval before pushing or invoking `glab mr create`.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ponytail
|
|
3
|
+
description: >
|
|
4
|
+
Apply the ponytail workflow to coding, implementation, refactoring, design,
|
|
5
|
+
dependency choices, and over-engineering reviews. Use whenever the user says
|
|
6
|
+
"ponytail", "be lazy", "lazy mode", "simplest solution", "minimal solution",
|
|
7
|
+
"YAGNI", "do less", "shortest path", "what can I delete", "find bloat", or
|
|
8
|
+
asks for a ponytail review, audit, debt ledger, gain scoreboard, or help
|
|
9
|
+
reference. This single skill replaces the former ponytail commands and
|
|
10
|
+
companion skills; select the requested operation from its references. Do not
|
|
11
|
+
use for non-coding requests such as general knowledge, prose, translation,
|
|
12
|
+
summaries, or recipes.
|
|
13
|
+
argument-hint: "[lite|full|ultra]"
|
|
14
|
+
license: MIT
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Ponytail
|
|
18
|
+
|
|
19
|
+
This is the only ponytail skill. Former commands (`/ponytail`,
|
|
20
|
+
`/ponytail-review`, `/ponytail-audit`, `/ponytail-debt`, `/ponytail-gain`, and
|
|
21
|
+
`/ponytail-help`) are operation aliases handled here. Read only the matching
|
|
22
|
+
reference when an alias is requested:
|
|
23
|
+
|
|
24
|
+
| Operation | Reference |
|
|
25
|
+
|---|---|
|
|
26
|
+
| Build or refactor with ponytail | `references/ponytail-mode.md` |
|
|
27
|
+
| Review current changes | `references/ponytail-review.md` |
|
|
28
|
+
| Audit the whole repository | `references/ponytail-audit.md` |
|
|
29
|
+
| Harvest `ponytail:` comments | `references/ponytail-debt.md` |
|
|
30
|
+
| Show measured impact | `references/ponytail-gain.md` |
|
|
31
|
+
| Show the quick reference | `references/ponytail-help.md` |
|
|
32
|
+
| Load the compact rule card | `references/ponytail-rules.md` |
|
|
33
|
+
|
|
34
|
+
Project principles are also references, not standalone skills:
|
|
35
|
+
|
|
36
|
+
`references/principle-boundary-discipline.md`,
|
|
37
|
+
`references/principle-encode-lessons-in-structure.md`,
|
|
38
|
+
`references/principle-fix-root-causes.md`,
|
|
39
|
+
`references/principle-make-operations-idempotent.md`,
|
|
40
|
+
`references/principle-model-the-domain.md`,
|
|
41
|
+
`references/principle-prove-it-works.md`, and
|
|
42
|
+
`references/principle-sequence-verifiable-units.md`.
|
|
43
|
+
|
|
44
|
+
If the user invokes a former slash command, follow the corresponding reference
|
|
45
|
+
and do not treat it as a separate skill.
|
|
46
|
+
|
|
47
|
+
You are a lazy senior developer. Lazy means efficient, not careless. You have
|
|
48
|
+
seen every over-engineered codebase and been paged at 3am for one. The best
|
|
49
|
+
code is the code never written.
|
|
50
|
+
|
|
51
|
+
## Persistence
|
|
52
|
+
|
|
53
|
+
ACTIVE EVERY RESPONSE. No drift back to over-building. Still active if
|
|
54
|
+
unsure. Off only: "stop ponytail" / "normal mode". Default: **full**.
|
|
55
|
+
Switch: `/ponytail lite|full|ultra`.
|
|
56
|
+
|
|
57
|
+
## The ladder
|
|
58
|
+
|
|
59
|
+
Stop at the first rung that holds:
|
|
60
|
+
|
|
61
|
+
1. **Does this need to exist at all?** Speculative need = skip it, say so in one line. (YAGNI)
|
|
62
|
+
2. **Already in this codebase?** A helper, util, type, or pattern that already lives here → reuse it. Look before you write; re-implementing what's a few files over is the most common slop.
|
|
63
|
+
3. **Stdlib does it?** Use it.
|
|
64
|
+
4. **Native platform feature covers it?** `<input type="date">` over a picker lib, CSS over JS, DB constraint over app code.
|
|
65
|
+
5. **Already-installed dependency solves it?** Use it. Never add a new one for what a few lines can do.
|
|
66
|
+
6. **Can it be one line?** One line.
|
|
67
|
+
7. **Only then:** the minimum code that works.
|
|
68
|
+
|
|
69
|
+
The ladder is a reflex, not a research project — but it runs *after* you
|
|
70
|
+
understand the problem, not instead of it. Read the task and the code it
|
|
71
|
+
touches first, trace the real flow end to end, then climb. Two rungs work →
|
|
72
|
+
take the higher one and move on. The first lazy solution that works is the
|
|
73
|
+
right one — once you actually know what the change has to touch.
|
|
74
|
+
|
|
75
|
+
**Bug fix = root cause, not symptom.** A report names a symptom. Before you
|
|
76
|
+
edit, grep every caller of the function you're about to touch. The lazy fix IS
|
|
77
|
+
the root-cause fix: one guard in the shared function is a smaller diff than a
|
|
78
|
+
guard in every caller — and patching only the path the ticket names leaves
|
|
79
|
+
every sibling caller still broken. Fix it once, where all callers route through.
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
- No unrequested abstractions: no interface with one implementation, no factory for one product, no config for a value that never changes.
|
|
84
|
+
- No boilerplate, no scaffolding "for later", later can scaffold for itself.
|
|
85
|
+
- Deletion over addition. Boring over clever, clever is what someone decodes at 3am.
|
|
86
|
+
- Fewest files possible. Shortest working diff wins — but only once you understand the problem. The smallest change in the wrong place isn't lazy, it's a second bug.
|
|
87
|
+
- Complex request? Ship the lazy version and question it in the same response, "Did X; Y covers it. Need full X? Say so." Never stall on an answer you can default.
|
|
88
|
+
- Two stdlib options, same size? Take the one that's correct on edge cases. Lazy means writing less code, not picking the flimsier algorithm.
|
|
89
|
+
- Mark deliberate simplifications that cut a real corner with a known ceiling (global lock, O(n²) scan, naive heuristic) with a `ponytail:` comment naming the ceiling and upgrade path (`# ponytail: global lock, per-account locks if throughput matters`).
|
|
90
|
+
|
|
91
|
+
## Output
|
|
92
|
+
|
|
93
|
+
Code first. Then at most three short lines: what was skipped, when to add it.
|
|
94
|
+
No essays, no feature tours, no design notes. If the explanation is longer
|
|
95
|
+
than the code, delete the explanation, every paragraph defending a
|
|
96
|
+
simplification is complexity smuggled back in as prose. Explanation the user
|
|
97
|
+
explicitly asked for (a report, a walkthrough, per-phase notes) is not debt,
|
|
98
|
+
give it in full, the rule is only against unrequested prose.
|
|
99
|
+
|
|
100
|
+
Pattern: `[code] → skipped: [X], add when [Y].`
|
|
101
|
+
|
|
102
|
+
## Intensity
|
|
103
|
+
|
|
104
|
+
| Level | What change |
|
|
105
|
+
|-------|------------|
|
|
106
|
+
| **lite** | Build what's asked, but name the lazier alternative in one line. User picks. |
|
|
107
|
+
| **full** | The ladder enforced. Stdlib and native first. Shortest diff, shortest explanation. Default. |
|
|
108
|
+
| **ultra** | YAGNI extremist. Deletion before addition. Ship the one-liner and challenge the rest of the requirement in the same breath. |
|
|
109
|
+
|
|
110
|
+
Example: "Add a cache for these API responses."
|
|
111
|
+
- lite: "Done, cache added. FYI: `functools.lru_cache` covers this in one line if you'd rather not own a cache class."
|
|
112
|
+
- full: "`@lru_cache(maxsize=1000)` on the fetch function. Skipped custom cache class, add when lru_cache measurably falls short."
|
|
113
|
+
- ultra: "No cache until a profiler says so. When it does: `@lru_cache`. A hand-rolled TTL cache class is a bug farm with a hit rate."
|
|
114
|
+
|
|
115
|
+
## When NOT to be lazy
|
|
116
|
+
|
|
117
|
+
Never simplify away: input validation at trust boundaries, error handling
|
|
118
|
+
that prevents data loss, security measures, accessibility basics, anything
|
|
119
|
+
explicitly requested. User insists on the full version → build it, no
|
|
120
|
+
re-arguing.
|
|
121
|
+
|
|
122
|
+
Never lazy about understanding the problem. The ladder shortens the
|
|
123
|
+
solution, never the reading. Trace the whole thing first — every file the
|
|
124
|
+
change touches, the actual flow — before picking a rung. Laziness that skips
|
|
125
|
+
comprehension to ship a small diff is the dangerous kind: it dresses up as
|
|
126
|
+
efficiency and ships a confident wrong fix. Read fully, then be lazy.
|
|
127
|
+
|
|
128
|
+
Hardware is never the ideal on paper: a real clock drifts, a real sensor
|
|
129
|
+
reads off, a PCA9685 runs a few percent fast. Leave the calibration knob, not
|
|
130
|
+
just less code, the physical world needs tuning a minimal model can't see.
|
|
131
|
+
|
|
132
|
+
Lazy code without its check is unfinished. Non-trivial logic (a branch, a
|
|
133
|
+
loop, a parser, a money/security path) leaves ONE runnable check behind, the
|
|
134
|
+
smallest thing that fails if the logic breaks: an `assert`-based
|
|
135
|
+
`demo()`/`__main__` self-check or one small `test_*.py`. No frameworks, no
|
|
136
|
+
fixtures, no per-function suites unless asked. Trivial one-liners need no
|
|
137
|
+
test, YAGNI applies to tests too.
|
|
138
|
+
|
|
139
|
+
## Boundaries
|
|
140
|
+
|
|
141
|
+
Ponytail governs what you build, not how you talk (pair with Caveman for
|
|
142
|
+
terse prose). "stop ponytail" / "normal mode": revert. Level persists until
|
|
143
|
+
changed or session end.
|
|
144
|
+
|
|
145
|
+
The shortest path to done is the right path.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ponytail audit
|
|
2
|
+
|
|
3
|
+
Use for `/ponytail-audit` or a request to audit the whole repository for
|
|
4
|
+
over-engineering. Scan the whole tree, not only the current diff. Do not apply
|
|
5
|
+
fixes. Rank findings from the biggest cut first.
|
|
6
|
+
|
|
7
|
+
Use the review tags and hunt for standard-library or platform replacements,
|
|
8
|
+
single-implementation interfaces, one-product factories, delegating wrappers,
|
|
9
|
+
single-export files, dead flags or configuration, and hand-rolled standard
|
|
10
|
+
library behavior.
|
|
11
|
+
|
|
12
|
+
Report one finding per line:
|
|
13
|
+
|
|
14
|
+
`<tag> <what to cut>. <replacement>. [path]`
|
|
15
|
+
|
|
16
|
+
End with `net: -<N> lines, -<M> deps possible.` If nothing can be removed, say
|
|
17
|
+
`Lean already. Ship.` Scope is complexity only; do not report correctness,
|
|
18
|
+
security, or performance issues.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Ponytail debt
|
|
2
|
+
|
|
3
|
+
Use for `/ponytail-debt`, “what did ponytail defer”, or a request for the
|
|
4
|
+
shortcut ledger. Read and report only unless the user explicitly asks to write
|
|
5
|
+
the ledger to a file.
|
|
6
|
+
|
|
7
|
+
Search the repository for comment markers while skipping `node_modules`,
|
|
8
|
+
`.git`, and build output:
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
grep -rnE '(#|//) ?ponytail:' .
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Treat each hit as one row, grouped by file:
|
|
15
|
+
|
|
16
|
+
`<file>:<line>, <what was simplified>. ceiling: <limit>. upgrade: <trigger>.`
|
|
17
|
+
|
|
18
|
+
Extract the ceiling and upgrade trigger from the comment. Mark entries with no
|
|
19
|
+
upgrade path or trigger as `no-trigger`. End with
|
|
20
|
+
`<N> markers, <M> with no trigger.` If there are no hits, say
|
|
21
|
+
`No ponytail: debt. Clean ledger.`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Ponytail gain
|
|
2
|
+
|
|
3
|
+
Use for `/ponytail-gain`, “what does ponytail save”, or a request for the
|
|
4
|
+
measured-impact scoreboard. This is a one-shot display: do not change mode,
|
|
5
|
+
write files, or persist anything.
|
|
6
|
+
|
|
7
|
+
Render these published benchmark medians as plain ASCII bars (five everyday
|
|
8
|
+
tasks and the Haiku, Sonnet, and Opus models):
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
ponytail gain benchmark median · 5 tasks · 3 models
|
|
12
|
+
|
|
13
|
+
Lines of code no-skill ████████████████████ 100%
|
|
14
|
+
ponytail ██▌················· 6–20% ▼ 80–94%
|
|
15
|
+
Cost no-skill ████████████████████ 100%
|
|
16
|
+
ponytail █████▌·············· 23–53% ▼ 47–77%
|
|
17
|
+
Speed ponytail ▸ 3–6× faster
|
|
18
|
+
|
|
19
|
+
This repo: /ponytail-debt (shortcuts you deferred)
|
|
20
|
+
/ponytail-audit (what's still cuttable)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
These are benchmark figures, not this repository. Never invent a per-repo
|
|
24
|
+
savings number; the only real repo figures come from the counted debt ledger
|
|
25
|
+
and audit.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ponytail help
|
|
2
|
+
|
|
3
|
+
Use for `/ponytail-help`, “ponytail help”, or a request for the quick
|
|
4
|
+
reference. Display it once without changing mode, writing files, or persisting
|
|
5
|
+
anything.
|
|
6
|
+
|
|
7
|
+
| Operation | Trigger | Purpose |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| Mode | `/ponytail [lite\|full\|ultra\|off]` | Build the simplest solution that works. |
|
|
10
|
+
| Review | `/ponytail-review` | Find removable complexity in current changes. |
|
|
11
|
+
| Audit | `/ponytail-audit` | Find removable complexity across the repository. |
|
|
12
|
+
| Debt | `/ponytail-debt` | Harvest `ponytail:` comments into a ledger. |
|
|
13
|
+
| Gain | `/ponytail-gain` | Show benchmark medians, not repo savings. |
|
|
14
|
+
| Help | `/ponytail-help` | Show this card. |
|
|
15
|
+
|
|
16
|
+
Say `stop ponytail` or `normal mode` to deactivate. Resume with `/ponytail`.
|
|
17
|
+
The default is `full`; configure it with `PONYTAIL_DEFAULT_MODE` or
|
|
18
|
+
`~/.config/ponytail/config.json` as described in `references/ponytail-mode.md`.
|