@aayushchugh/skills 0.1.2 → 0.1.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/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Replace `no-slop` with any id below.
|
|
|
29
29
|
|
|
30
30
|
- `no-slop` — No slop. Write the smallest readable code that reuses existing code, installed utilities, and repo patterns, and fixes bugs at the root cause.
|
|
31
31
|
- `plain-paper` — Plain paper. Write a spec or other documentation from the request, the code, and relevant sources.
|
|
32
|
-
- `cases-to-run` — Cases to run.
|
|
32
|
+
- `cases-to-run` — Cases to run. List the cases to verify by hand, or name the code tests for `no-slop` to write when asked.
|
|
33
33
|
- `open-doors` — Open doors. Review application code, APIs, dependencies, secrets, and deploy config for injection, web attacks, and DDoS controls.
|
|
34
34
|
- `one-shape` — One shape. Audit a repo for duplication, divergent flows, dead code, over-engineering, waste, and standards drift, then apply approved steps.
|
|
35
35
|
- `red-pen` — Red pen. Review a diff or pull request for bugs, regressions, broken callers, missing tests, and unmet requirements.
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cases-to-run
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
List cases to verify by hand, or name the code tests for no-slop when
|
|
5
|
+
asked. Use when the user asks for test cases or to test a flow. Do not edit
|
|
6
|
+
code or audit security.
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Cases to run
|
|
10
10
|
|
|
11
11
|
## Scope
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Do not edit code. `no-slop` is the only skill that writes. Do not write anything until asked. Cover a security requirement or access rule the source already states. Do not invent controls.
|
|
14
14
|
|
|
15
15
|
Write the smallest set that would catch a real failure. Skip a case that does not change the outcome.
|
|
16
16
|
|
|
@@ -26,41 +26,38 @@ Ask what would change the expected behavior, data, environment, limits, or permi
|
|
|
26
26
|
- Code or a diff: the changed behavior, its contract, its callers, and the conditions that changed. Stop at the affected path.
|
|
27
27
|
- A bug report: the shortest reproduction, expected versus actual behavior, and the environment when it changes the result.
|
|
28
28
|
|
|
29
|
-
If the repository already tests a behavior,
|
|
29
|
+
If the repository already tests a behavior, say so. Do not ask `no-slop` to add a second copy, and do not repeat it as a manual case.
|
|
30
30
|
|
|
31
31
|
## Which cases
|
|
32
32
|
|
|
33
33
|
Cover the relevant happy path, failure, boundary, state change, permission, and regression. Use one representative value per equivalence class. A boundary is the edge: the last allowed value and the first rejected value.
|
|
34
34
|
|
|
35
|
-
Test one invalid condition at a time. Combine inputs only when they change the outcome together. One behavior is one case, even when the spec and the code both mention it.
|
|
35
|
+
Test one invalid condition at a time. Combine inputs only when they change the outcome together. One behavior is one case, even when the spec and the code both mention it.
|
|
36
36
|
|
|
37
|
-
Skip a behavior the spec lists as a non-goal. A missing
|
|
37
|
+
Skip a behavior the spec lists as a non-goal. A missing behavior that loses data, money, access, or the main flow gets a case, or an open question that says why it cannot be tested yet.
|
|
38
38
|
|
|
39
|
-
A bug gets one
|
|
39
|
+
A bug gets one case: it fails now and passes once the expected behavior is true. A flow gets the valid path plus the invalid steps a person can actually try.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
These rules stay inside the skill. Do not print them as labels on a case.
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
## The list
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
- P1: a common failure or a boundary.
|
|
47
|
-
- P2: a rare edge.
|
|
45
|
+
Each case has these parts, in this order, in plain language a person can follow without the codebase:
|
|
48
46
|
|
|
49
|
-
|
|
47
|
+
- **Case:** a short name of the behavior.
|
|
48
|
+
- **Prerequisites:** only when the case needs a starting state. Leave this out when there is none.
|
|
49
|
+
- **Description:** one or two sentences of what should happen, including the result a person can see.
|
|
50
|
+
- **Steps to verify:** numbered actions. The last step says what to look at and what should be true.
|
|
50
51
|
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
- Test data
|
|
57
|
-
- Steps: actions only. Do not repeat the expected result.
|
|
58
|
-
- Expected result: only what a person can see, including the error, the resulting state, and data that must stay unchanged
|
|
59
|
-
- Tags: `happy`, `failure`, `boundary`, `permission`, or `regression`. Use one only when it applies. Use no other tag.
|
|
52
|
+
No priority, no tags, no source line, and no separate test-data or expected-result field. Do not use a word such as journal or handler unless the product shows that word on screen.
|
|
53
|
+
|
|
54
|
+
## Code tests
|
|
55
|
+
|
|
56
|
+
Write code tests only when the user asks for them. Name the behaviors. `no-slop` writes the test in the repo's existing style. If the repo has no test runner, ask once before `no-slop` adds one.
|
|
60
57
|
|
|
61
58
|
## Summary
|
|
62
59
|
|
|
63
|
-
|
|
60
|
+
Say what is still uncovered. Do not claim complete coverage when the source is ambiguous.
|
|
64
61
|
|
|
65
62
|
## Replies
|
|
66
63
|
|
|
@@ -11,7 +11,7 @@ description: >-
|
|
|
11
11
|
|
|
12
12
|
Read the diff, the test results, the migrations, the feature flags, the dependency changes, the deploy config, and the known risks. Do not deploy, change production, or create a release until the user explicitly approves that step.
|
|
13
13
|
|
|
14
|
-
No-go when a
|
|
14
|
+
No-go when a migration check or a rollback is missing. A failed or missing test result is a no-go only when the repo already has test code. A repo with no test code skips that check. Do not talk the release into a go.
|
|
15
15
|
|
|
16
16
|
## Before writing
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ Ask the target environment, the migrations included, and the checks already run.
|
|
|
22
22
|
## The check
|
|
23
23
|
|
|
24
24
|
- What changed, in one line per user-facing change. Leave out internal refactors.
|
|
25
|
-
- Tests: which ran, which failed, and which did not run.
|
|
25
|
+
- Tests, when the repo has test code: which ran, which failed, and which did not run. A repo with no test code skips this check.
|
|
26
26
|
- Migrations and backfills. Each one needs the current state (table, row count, rows touched), the forward change, a rollback or the data that would be lost, steps that are safe to re-run, batching for a large table, and a check that proves the result. A migration missing any of these is a no-go.
|
|
27
27
|
- Feature flags and dependency changes.
|
|
28
28
|
- Known risks, each with the check that would catch it.
|
|
@@ -35,7 +35,7 @@ Ask the target environment, the migrations included, and the checks already run.
|
|
|
35
35
|
- The rollback steps, in the order to run them.
|
|
36
36
|
- A short note of what changed for users.
|
|
37
37
|
|
|
38
|
-
A
|
|
38
|
+
A migration missing any item above, or an unknown rollback, is a no-go. A missing test result is a no-go only when the repo has test code. Do not invent a test result.
|
|
39
39
|
|
|
40
40
|
## Replies
|
|
41
41
|
|
package/skills/no-slop/SKILL.md
CHANGED
|
@@ -27,7 +27,7 @@ Ask only what would change the requested files, behavior, API, or approach. Leav
|
|
|
27
27
|
3. Prefer, in order: do nothing, existing code, the standard library, a native platform feature, an already-installed dependency. If that dependency exports the function, call it. Do not rewrite date-fns, lodash, or any other installed package.
|
|
28
28
|
4. Make the smallest readable change that finishes the requested behavior. A bug report names a symptom. Find the source and fix that. A shared-function fix keeps existing callers working, unless their current behavior is the bug.
|
|
29
29
|
5. Keep trust-boundary validation and error handling that prevents data loss.
|
|
30
|
-
6. Run the
|
|
30
|
+
6. Run the existing test for the changed path when one exists. If the project has no test code, do not add one and do not block. Write a test only when `cases-to-run` or the user asks.
|
|
31
31
|
|
|
32
32
|
## Rules
|
|
33
33
|
|
|
@@ -54,11 +54,11 @@ Mark each step's effort and risk as low, medium, or high.
|
|
|
54
54
|
|
|
55
55
|
Order the steps: delete dead code, then replace reimplemented code, then fix standards drift, then unify flows, then simplify what is left. A formatting-only change is its own step and uses the repo's formatter. Never mix it with a logic change.
|
|
56
56
|
|
|
57
|
-
Each step is small, keeps behavior the same, ships on its own, names its files, and names the test that checks it
|
|
57
|
+
Each step is small, keeps behavior the same, ships on its own, names its files, and names the test that checks it when one exists. A repo with no test code does not block a step. A merge keeps every current caller's output the same. If any caller's output would change, that needs its own approved step. On a big repo, the user approves one batch at a time.
|
|
58
58
|
|
|
59
59
|
Stop after the report. Edit nothing until the user approves a batch.
|
|
60
60
|
|
|
61
|
-
1. Before the first step, run the repo's lint, typecheck, and tests, and record what already fails.
|
|
61
|
+
1. Before the first step, run the repo's lint, typecheck, and tests when the repo has them, and record what already fails.
|
|
62
62
|
2. Apply one approved step at a time with `no-slop`. Each step stays its own diff.
|
|
63
63
|
3. After each step, run the same checks. If a new failure appears, revert that step, stop, and report.
|
|
64
64
|
4. After a batch, re-check the remaining steps, then wait for the next approval.
|
package/skills/red-pen/SKILL.md
CHANGED
|
@@ -14,7 +14,7 @@ Read the diff, the request it was meant to satisfy, every caller of a changed fu
|
|
|
14
14
|
|
|
15
15
|
Report a bug, a regression, or a missed requirement. A style comment is not a finding.
|
|
16
16
|
|
|
17
|
-
A security finding gets one line pointing to `open-doors`. A structure or duplication finding gets one line pointing to `one-shape`. A missing test gets one line pointing to `cases-to-run
|
|
17
|
+
A security finding gets one line pointing to `open-doors`. A structure or duplication finding gets one line pointing to `one-shape`. A missing test is a finding only where the project already tests that kind of path. A project with no tests gets one line pointing to `cases-to-run`, not a finding per file.
|
|
18
18
|
|
|
19
19
|
## Before writing
|
|
20
20
|
|
|
@@ -24,7 +24,7 @@ Ask what would change whether a finding is real.
|
|
|
24
24
|
|
|
25
25
|
## Findings
|
|
26
26
|
|
|
27
|
-
Report a correctness bug, a regression, a break in an API a caller depends on, a missing test
|
|
27
|
+
Report a correctness bug, a regression, a break in an API a caller depends on, a missing test where the project already tests that kind of path, or a requirement the change did not meet.
|
|
28
28
|
|
|
29
29
|
Each finding has: ID, Title, Severity, File and line, Evidence, Impact, Fix in one or two lines.
|
|
30
30
|
|
|
@@ -34,7 +34,7 @@ One finding per root cause. The same bug in several callers is one finding: name
|
|
|
34
34
|
|
|
35
35
|
- Critical: the change loses data, breaks a primary flow, or breaks callers that are already in use.
|
|
36
36
|
- High: a real bug on a common path, or a requirement the change missed.
|
|
37
|
-
- Medium: a bug that needs another condition, or a missing test on a non-trivial branch.
|
|
37
|
+
- Medium: a bug that needs another condition, or a missing test on a non-trivial branch where the project already has tests.
|
|
38
38
|
|
|
39
39
|
## Summary
|
|
40
40
|
|
|
@@ -23,7 +23,7 @@ Read the chosen skill and follow it. Do not restate its rules here.
|
|
|
23
23
|
| --- | --- |
|
|
24
24
|
| Implement, fix, or review code | `no-slop` |
|
|
25
25
|
| PRD, engineering spec, flow, API reference, runbook, guide, or README | `plain-paper` |
|
|
26
|
-
|
|
|
26
|
+
| Manual test cases, or code tests for `no-slop` when asked | `cases-to-run` |
|
|
27
27
|
| Security audit | `open-doors` |
|
|
28
28
|
| Refactor or clean up a repo | `one-shape` |
|
|
29
29
|
| Review a diff or pull request | `red-pen` |
|