@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.
- 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/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/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 +18 -0
- package/framework/skills/review/examples.md +5 -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 +14 -1
|
@@ -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,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pull-request
|
|
3
|
+
description: Create or update a GitHub pull request (PR) for the current branch using the gh CLI. Use this skill whenever the user asks to open, create, update, or prepare a GitHub PR or pull request.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `pull-request` skill instructions
|
|
7
|
+
|
|
8
|
+
Create or update a pull request for the current branch using `gh` CLI.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
1. **Collect information**
|
|
13
|
+
- Get the current branch name: `git branch --show-current`
|
|
14
|
+
- Read the PR template from `.github/pull_request_template.md` if it exists.
|
|
15
|
+
|
|
16
|
+
2. **Format PR 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 PR?" Push the changes if the user says yes.
|
|
30
|
+
|
|
31
|
+
6. **Create upon confirmation** - Use `gh pr create --title "<title>" --body "<body>" --base <target>` and show the resulting URL.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
- Build a PR title and concise summary from the current branch and commits, then show the complete body before asking for confirmation.
|
|
4
|
+
- Preserve an existing `.github/pull_request_template.md` checklist while replacing only its summary content.
|
|
5
|
+
- Push and create the GitHub PR only after the user approves the displayed plan.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: Create a software release by reviewing commits, determining the semantic version, updating the changelog and package versions, committing release metadata, and tagging the result. Use this skill whenever the user asks to cut, prepare, publish, or tag a release.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `release` skill instructions
|
|
7
|
+
|
|
8
|
+
Create a release from the current branch state.
|
|
9
|
+
|
|
10
|
+
## Process
|
|
11
|
+
|
|
12
|
+
1. **Review recent commits** - Run `git fetch --tags`, `git describe --tags --abbrev=0` to find the latest tag. Run `git log <latest-tag>..HEAD --oneline --format="%s"` to collect all conventional commits since the last release. Read any existing `CHANGELOG.md`.
|
|
13
|
+
2. **Categorize commits** - Group commits by conventional commit type:
|
|
14
|
+
- `feat!:` or `BREAKING CHANGE:` → breaking change
|
|
15
|
+
- `feat:` → minor feature
|
|
16
|
+
- `fix:` → patch fix
|
|
17
|
+
- `perf:`, `refactor:`, `test:` → patch (if no features)
|
|
18
|
+
- `chore:`, `docs:`, `ci:` → filtered from changelog
|
|
19
|
+
3. **Determine next version** - Based on the [`commit` skill](../commit/SKILL.md) semver convention:
|
|
20
|
+
- Breaking changes → increment major version (e.g., `1.2.3` → `2.0.0`)
|
|
21
|
+
- New features → increment minor version (e.g., `1.2.3` → `1.3.0`)
|
|
22
|
+
- Only fixes/refactors → increment patch version (e.g., `1.2.3` → `1.2.4`)
|
|
23
|
+
- If no previous tag exists, propose `0.1.0`
|
|
24
|
+
4. **Present release plan** - Show the current version, new version, categorized changelog entries, and ask: "Shall I create this release (tag vX.Y.Z and update CHANGELOG.md)?"
|
|
25
|
+
5. **Execute on confirmation**:
|
|
26
|
+
- Update `CHANGELOG.md`: create a new `## [vX.Y.Z]` section under `## Unreleased`, move categorized entries (excluding chore/docs/ci) into it, add the release date, and keep the `## Unreleased` section empty for future work.
|
|
27
|
+
- Update project version metadata such as `package.json` and `package-lock.json` when present.
|
|
28
|
+
- Run `git add CHANGELOG.md package.json package-lock.json` for files that exist and commit with `chore: release vX.Y.Z`.
|
|
29
|
+
- Run `git tag -a vX.Y.Z -m "vX.Y.Z"`.
|
|
30
|
+
6. **Verify** - Run `git log --oneline -n 3` and `git tag --list --sort=-v:refname -n5` to confirm the release tag and commit are in place.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
- Inspect tags and conventional commits, propose the next semantic version, and show the release plan before changing files.
|
|
4
|
+
- Move categorized entries from `Unreleased` into a dated version section while leaving a clean `Unreleased` section.
|
|
5
|
+
- Update available package version metadata, commit the release files, create the annotated tag, and verify both afterward.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Perform a comprehensive code quality review of changes. Use this skill whenever the user asks to review code, inspect a diff, find bugs, assess production readiness, or perform a code review.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# `review` skill instructions
|
|
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
|
+
2. **Check correctness** - Edge cases, concurrency, error handling, state transitions, and backward compatibility. Read contracts and interfaces before implementation.
|
|
14
|
+
3. **Check maintainability** - Naming reflects business meaning, structure matches project conventions, and comments explain why rather than what.
|
|
15
|
+
4. **Check testing** - Do tests prove the behavior change? Identify missing edge cases or failure paths. Tests should verify behavior, not mirror implementation.
|
|
16
|
+
5. **Check performance** - Look for N+1 queries, unbounded loops, unnecessary allocations, and caching opportunities.
|
|
17
|
+
6. **Check security** - Check input validation, authentication enforcement, secrets exposure, and least privilege.
|
|
18
|
+
7. **Present findings** - Distinguish blockers from suggestions, explain the reasoning for each, and summarize overall risk and production readiness.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
- Review the staged and unstaged diff, then report findings ordered by severity with file and line references.
|
|
4
|
+
- Check correctness, tests, performance, security, and maintainability rather than only formatting.
|
|
5
|
+
- End with an overall risk and production-readiness summary.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd
|
|
3
|
+
description: "Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# TDD Bug Fix
|
|
8
|
+
|
|
9
|
+
When fixing a bug with a clear, cheap test path, make the broken behavior executable before changing production code. The goal is a focused regression test that fails before the fix and passes after it.
|
|
10
|
+
|
|
11
|
+
Do not force a test when it would be impractical. If the available test would require broad harness setup, brittle mocks, slow end-to-end infrastructure, production-only state, vague reproduction steps, or large unrelated fixture churn, skip adding a new test and use the closest useful verification instead.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. **Understand the bug.** Identify the intended behavior, current behavior, affected path, and smallest observable reproduction.
|
|
16
|
+
2. **Choose the narrowest executable check.** Prefer the closest unit, component, integration, or regression test already used for that codepath. If no practical test path is obvious, do not create one from scratch just to satisfy the workflow.
|
|
17
|
+
3. **Write the failing test first.** Add the smallest focused test that would have caught the bug. The test should encode intended behavior, not mirror the current implementation.
|
|
18
|
+
4. **Run the new test before fixing.** Confirm it fails for the intended reason. If it passes or fails for an unrelated reason, correct the test or reproduction before editing the implementation.
|
|
19
|
+
5. **Fix the bug.** Make the smallest production change that satisfies the intended behavior while preserving nearby contracts.
|
|
20
|
+
6. **Rerun the regression test.** Confirm the test now passes.
|
|
21
|
+
7. **Run nearby validation.** Run relevant adjacent tests, type checks, lint, or scenario checks when the change has broader risk.
|
|
22
|
+
|
|
23
|
+
## If a Failing Test Is Impractical
|
|
24
|
+
|
|
25
|
+
Do not silently skip the regression step. Before fixing, explicitly explain why a failing test is impossible or not worth the cost, then choose the closest executable regression check available. Examples include a targeted script, manual reproduction command, browser automation, snapshot comparison, log assertion, or focused integration check.
|
|
26
|
+
|
|
27
|
+
Prefer no new test over a bad test. A bad test is one that mostly tests mocks, encodes current implementation details, depends on timing or unrelated global state, needs expensive infrastructure for a small fix, or would be deleted immediately after proving the fix.
|
|
28
|
+
|
|
29
|
+
## Guardrails
|
|
30
|
+
|
|
31
|
+
- Do not change tests merely to match a wrong implementation.
|
|
32
|
+
- Do not weaken existing assertions unless the expected behavior has genuinely changed and the reason is clear.
|
|
33
|
+
- Keep the regression test focused on the bug; avoid broad fixture churn or unrelated coverage expansion.
|
|
34
|
+
- Do not add tests when the practical signal is weak; use manual or scripted verification and say why.
|
|
35
|
+
- If the bug is flaky, make the test deterministic where possible and document the signal being locked down.
|
|
36
|
+
- If the bug exposes a broader class of failures, first land the focused regression path, then consider additional sibling coverage.
|
|
37
|
+
|
|
38
|
+
## Final Response
|
|
39
|
+
|
|
40
|
+
Report the evidence, not just the outcome:
|
|
41
|
+
|
|
42
|
+
- Name the failing-before test or executable check and the failure it produced.
|
|
43
|
+
- Name the passing-after test run and any nearby validation performed.
|
|
44
|
+
- If failing-before evidence could not be demonstrated, state why and describe the closest regression check used instead.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
- Reproduce a bug with a focused failing regression test before changing the implementation.
|
|
4
|
+
- Use the narrowest practical test path, then run the regression test and relevant nearby validation after the fix.
|
|
5
|
+
- Explain why a failing test is impractical and use the closest reliable executable check instead.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unslop
|
|
3
|
+
description: Cut AI tells from any writing. Must always apply.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Unslop
|
|
8
|
+
|
|
9
|
+
Edit text to remove AI patterns and add human voice.
|
|
10
|
+
|
|
11
|
+
## Process
|
|
12
|
+
|
|
13
|
+
1. Scan for the patterns below.
|
|
14
|
+
2. Rewrite. Preserve meaning, match intended tone.
|
|
15
|
+
3. Add soul (see next section).
|
|
16
|
+
4. Self-audit: "What makes this obviously AI generated?" Fix remaining tells.
|
|
17
|
+
|
|
18
|
+
## Adding soul
|
|
19
|
+
|
|
20
|
+
Removing patterns is half the job. Sterile, voiceless writing is just as obvious.
|
|
21
|
+
|
|
22
|
+
- **Have opinions.** React to facts instead of neutrally listing pros and cons.
|
|
23
|
+
- **Vary rhythm.** Short sentences. Then longer ones that take their time. Mix it up.
|
|
24
|
+
- **Acknowledge complexity.** "Impressive but also kind of unsettling" beats "impressive."
|
|
25
|
+
- **Use "I" when it fits.** First person isn't unprofessional.
|
|
26
|
+
- **Let some mess in.** Perfect structure looks machine-made.
|
|
27
|
+
- **Be specific.** Not "this is concerning" but "there's something unsettling about agents churning away at 3am."
|
|
28
|
+
|
|
29
|
+
## Patterns to detect and fix
|
|
30
|
+
|
|
31
|
+
### Content
|
|
32
|
+
|
|
33
|
+
1. **Puffery.** "pivotal moment", "testament to", "evolving landscape", "setting the stage for", "indelible mark", "deeply rooted". Cut puffery, state what happened.
|
|
34
|
+
2. **Name-dropping.** Listing media outlets without context. Pick one, say what was said.
|
|
35
|
+
3. **Superficial -ing phrases.** "highlighting...", "ensuring...", "reflecting...", "showcasing...", "fostering...". Delete or expand with real sources.
|
|
36
|
+
4. **Promotional language.** "nestled", "vibrant", "breathtaking", "groundbreaking", "renowned", "stunning", "must-visit". Use neutral descriptions.
|
|
37
|
+
5. **Vague attributions.** "Experts believe", "Industry reports suggest", "Some critics argue". Name the source or delete.
|
|
38
|
+
6. **Formulaic challenges.** "Despite challenges... continues to thrive." Replace with specific facts.
|
|
39
|
+
|
|
40
|
+
### Language
|
|
41
|
+
|
|
42
|
+
7. **AI vocabulary.** Additionally, crucial, delve, enduring, enhance, fostering, garner, interplay, intricate, landscape (abstract), pivotal, showcase, tapestry (abstract), testament, underscore, vibrant. Replace with plain words.
|
|
43
|
+
8. **Fancy ways to say "is".** "serves as", "stands as", "boasts", "features". Just say "is" or "has".
|
|
44
|
+
9. **"Not just X, but Y."** State the point directly instead.
|
|
45
|
+
10. **Rule of three.** Forcing ideas into groups of three. Use the natural number.
|
|
46
|
+
11. **Synonym cycling.** Protagonist, main character, central figure, hero all in one paragraph. Pick one, repeat it.
|
|
47
|
+
12. **False ranges.** "from X to Y" where X and Y aren't on a meaningful scale. List topics directly.
|
|
48
|
+
|
|
49
|
+
### Style
|
|
50
|
+
|
|
51
|
+
13. **Em dash overuse.** Avoid em dashes entirely. Use periods or commas only (no parentheses, no en dashes, no hyphen-as-dash substitutes). Em dashes are an AI tell, and reaching for parentheses instead just trades one tell for another. If a thought needs separation, end the sentence or use a comma.
|
|
52
|
+
14. **Colon overuse.** Colons are fine before a list or example. Not as mid-sentence connectors. "If you're coming from traditional automation: instead of registering event handlers, you describe conditions" adds nothing with the colon. Rewrite to let the point stand on its own without comparison framing. "Describing when the scheduler should fire works best as plain English." Same meaning, no crutch punctuation.
|
|
53
|
+
15. **Boldface overuse.** Don't bold every proper noun or acronym.
|
|
54
|
+
16. **Inline-header lists.** The tell is a bold label and colon that restates the line: "**Performance:** Performance improved...". Convert those to prose. A bold lead-in that ends in a period, names the item, and is followed by genuinely new detail ("**Schema in TypeScript.** Tables live in one file.") is fine, not a tell.
|
|
55
|
+
17. **Title case headings.** Use sentence case.
|
|
56
|
+
18. **Decorative emojis.** Remove from headings and bullets.
|
|
57
|
+
19. **Curly quotes.** Replace with straight quotes.
|
|
58
|
+
|
|
59
|
+
### Communication artifacts
|
|
60
|
+
|
|
61
|
+
20. **Chatbot phrases.** "I hope this helps!", "Let me know if...", "Of course!", "Certainly!", "Found the smoking gun!" Remove.
|
|
62
|
+
21. **Cutoff disclaimers.** "While specific details are limited..." Find sources or remove.
|
|
63
|
+
22. **Sycophantic tone.** "Great question! You're absolutely right!" Respond directly.
|
|
64
|
+
|
|
65
|
+
### Filler
|
|
66
|
+
|
|
67
|
+
23. **Filler phrases.** "In order to" becomes "To". "Due to the fact that" becomes "Because". "It is important to note that" gets deleted.
|
|
68
|
+
24. **Excessive hedging.** "could potentially possibly be argued that it might" becomes "may".
|
|
69
|
+
25. **Generic conclusions.** "The future looks bright." State specific plans or facts.
|
|
70
|
+
|
|
71
|
+
### Jargon
|
|
72
|
+
|
|
73
|
+
26. **Abstract metaphor nouns.** Substrate, wedge, vector, locus, vantage, nexus, primitive (as noun), harness (as metaphor), surface (as in "API surface"), bedrock, scaffolding (as metaphor), modality, paradigm, gold-plating, ratchet (as metaphor), evacuate (for moving code), endgame, north star, flywheel. These read as technical but usually have a plainer concrete word. "Substrate" becomes "base". "Wedge in" becomes "add". "Vector" becomes "way" or "method". "Gold-plating" becomes "more than the job needs". "Ratchet" becomes the mechanism's real name or "a limit that only tightens". "Evacuate" becomes "move out". "Endgame" becomes "the last phase". Pick the concrete word.
|
|
74
|
+
|
|
75
|
+
### Plain speech
|
|
76
|
+
|
|
77
|
+
27. **Say what it does, not how it feels.** "the database stays close at hand", "SQL you can read", "types that follow your schema" name a feeling. The fix names the mechanism or a number: "`.toSQL()` returns the exact string sent to the database", "a column rename fails the build". Ask what the sentence tells the reader to do or know, then write that. If you can't restate it as a concrete instruction, fact, or number, cut it. One more check: if the sentence could appear unchanged in another project's docs, it says nothing about this one. Cut it.
|
|
78
|
+
28. **Shorten or split dense sentences.** If the reader has to backtrack to parse a sentence, break it in two or drop clauses. One idea per sentence.
|
|
79
|
+
29. **Active voice.** Prefer it. Catch "is/are/was/were + past participle" and name the actor: "queries are validated" becomes "the compiler validates queries", "the file is parsed by the loader" becomes "the loader parses the file". Passive is fine only when the actor is unknown or genuinely doesn't matter.
|
|
80
|
+
30. **Cut adverbs, or use a stronger verb.** "runs quickly" becomes "is fast" or the number. "significantly improves" becomes the measured delta. An adverb propping up a weak verb means the verb is wrong.
|
|
81
|
+
31. **Prefer the plain word.** "utilize" becomes "use", "leverage" becomes "use", "facilitate" becomes "help", "numerous" becomes "many", "in the event that" becomes "if". The fancier synonym is rarely clearer.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
- Rewrite release notes to remove inflated claims, filler, and generic AI phrasing while preserving meaning.
|
|
4
|
+
- Edit technical prose for plain language, varied rhythm, active voice, and a natural human tone.
|
|
5
|
+
- Scan a document for em-dash overuse, formulaic transitions, vague claims, and unnecessary jargon before rewriting it.
|