@jesdi/skills 0.0.17 → 0.0.19
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/package.json +1 -1
- package/skills/implement-spec/SKILL.md +4 -4
- package/skills/red-team-data-model/SKILL.md +50 -0
- package/skills/to-openspec/SKILL.md +64 -0
- package/skills/to-openspec/templates/design.md +19 -0
- package/skills/to-openspec/templates/proposal.md +18 -0
- package/skills/to-openspec/templates/spec.md +22 -0
- package/skills/to-openspec/templates/tasks.md +9 -0
- package/skills-manifest.json +15 -3
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ Changes: a model tier per subagent; a context-isolated test-writer commits
|
|
|
11
11
|
locked acceptance tests at the ticket's Seam, the implementer turns them green
|
|
12
12
|
with /tdd and reports to a contract; per-ticket review before merge, fix loop
|
|
13
13
|
capped at 4 rounds with escalation; a ruling ledger and four stop conditions;
|
|
14
|
-
|
|
14
|
+
a per-ticket gate (check command + crap-gate) before DONE, re-run by the reviewer; check command after each merge; final /review-diff on the most capable model, one
|
|
15
15
|
fixer; closes tickets only if they are issues. Review loop and ledger adapt
|
|
16
16
|
superpowers' subagent-driven-development (obra/superpowers, MIT).
|
|
17
17
|
-->
|
|
@@ -40,11 +40,11 @@ Run ticket subagents in the background where possible for **maximum concurrency*
|
|
|
40
40
|
|
|
41
41
|
4. Each ticket gets its own worktree and branch. For a ticket with behavioral criteria, a **test-writer subagent** goes first. It sees ONLY the spec, the ticket, CONTEXT.md/ADRs and the public interface of the ticket's **Seam** line (pointers, not summaries), never the implementer's plan or code. It writes one black-box acceptance test per criterion through that interface (defining the interface if it doesn't exist yet), confirms each fails for the right reason (missing behavior, not an import or syntax error), commits them red, and reports the SHA and files. Those files are now **locked**. A ticket with no behavioral criteria (Seam: `none — refactor`) skips this: its existing tests are the contract, unmodified.
|
|
42
42
|
|
|
43
|
-
5. An **implementer subagent** starts from that commit and makes the locked tests green, using /tdd vertical slices for anything internal. It never edits locked files and never dispatches subagents. It reports: status (DONE, DONE_WITH_CONCERNS, NEEDS_CONTEXT or BLOCKED), commits, red→green evidence for locked tests and its own slices, files touched, concerns. If a locked test contradicts the spec or ticket, it reports BLOCKED with evidence; you rule, and either send the test-writer a correction or overrule the implementer. Handle any BLOCKED by changing something: more context, a stronger model, a split ticket, or a ruling. Never retry unchanged.
|
|
43
|
+
5. An **implementer subagent** starts from that commit and makes the locked tests green, using /tdd vertical slices for anything internal. It never edits locked files and never dispatches subagents. Before reporting DONE it runs the **gate** in its worktree: the repo's check command (lint, typecheck, full test suite: `make check`, or what AGENTS.md documents) and, when the repo has `.crap-gate.json`, crap-gate scoped to the ticket (`run.sh --base <PR branch>`, or the repo's `make crap-gate` wrapper). DONE means both are green; a gate it can't turn green is BLOCKED, with the output. It reports: status (DONE, DONE_WITH_CONCERNS, NEEDS_CONTEXT or BLOCKED), commits, red→green evidence for locked tests and its own slices, the gate's final lines, files touched, concerns. If a locked test contradicts the spec or ticket, it reports BLOCKED with evidence; you rule, and either send the test-writer a correction or overrule the implementer. Handle any BLOCKED by changing something: more context, a stronger model, a split ticket, or a ruling. Never retry unchanged.
|
|
44
44
|
|
|
45
|
-
6. On DONE, a **reviewer subagent** checks the diff against the ticket and spec, then for quality. It also checks that `git diff <test-writer-sha>..HEAD -- <locked files>` is empty and that every criterion has a locked test. Critical or Important findings start a fix loop of at most 4 rounds, each a fix plus a re-review scoped to that fix: rounds 1-2 resume the implementer; rounds 3-4 go to a fresh implementer one tier up. After round 4, rule on each open finding in the ledger and move on. Minor findings go to the ledger for the final review.
|
|
45
|
+
6. On DONE, a **reviewer subagent** re-runs the gate first (a red gate is a Critical finding; don't trust the report), then checks the diff against the ticket and spec, then for quality. It also checks that `git diff <test-writer-sha>..HEAD -- <locked files>` is empty and that every criterion has a locked test. Critical or Important findings start a fix loop of at most 4 rounds, each a fix plus a re-review scoped to that fix: rounds 1-2 resume the implementer; rounds 3-4 go to a fresh implementer one tier up. After round 4, rule on each open finding in the ledger and move on. Minor findings go to the ledger for the final review.
|
|
46
46
|
|
|
47
|
-
7. Once a ticket passes review, a **merger subagent** merges it to the PR branch and runs the full
|
|
47
|
+
7. Once a ticket passes review, a **merger subagent** merges it to the PR branch and runs the repo's check command (lint, typecheck, full suite). If it fails, an implementer fixes the PR branch before the next merge.
|
|
48
48
|
|
|
49
49
|
8. If this changes the **frontier** of available tickets, start the next tickets. This allows for maximum concurrency.
|
|
50
50
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: red-team-data-model
|
|
3
|
+
description: >-
|
|
4
|
+
Attack a proposed or existing data model for the ways it breaks under real
|
|
5
|
+
conditions — concurrency, time windows, money, permissions — without
|
|
6
|
+
proposing a redesign. Use right after sketching a data model, before
|
|
7
|
+
writing the spec, so the top failure scenarios shape the spec's
|
|
8
|
+
requirements and tests instead of getting discovered mid-build. Trigger on
|
|
9
|
+
"red-team my data model", "what breaks in this schema", or "/red-team".
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Red-team the data model
|
|
13
|
+
|
|
14
|
+
## Rule
|
|
15
|
+
|
|
16
|
+
Don't improve or redesign. Attack it. The output is a list of ways it fails, not a fix.
|
|
17
|
+
|
|
18
|
+
## Prompt
|
|
19
|
+
|
|
20
|
+
Given the tables/fields (from `design.md` or a sketch), produce:
|
|
21
|
+
|
|
22
|
+
**Top 5 failure scenarios**, ranked worst-consequence-first. Each one:
|
|
23
|
+
|
|
24
|
+
- **Table/field** — exactly which part of the model is implicated.
|
|
25
|
+
- **Scenario** — the concrete sequence of events that breaks it (two users, two
|
|
26
|
+
requests, a clock, a race — be specific, not "concurrency issues could
|
|
27
|
+
occur").
|
|
28
|
+
- **Consequence** — what actually goes wrong in business terms (double-sold
|
|
29
|
+
stock, a refund that never happens, a stranger seeing another customer's
|
|
30
|
+
order, money debited twice).
|
|
31
|
+
|
|
32
|
+
## Focus areas, in this order
|
|
33
|
+
|
|
34
|
+
1. **Concurrency** — two actors racing the same row (two checkouts, one unit
|
|
35
|
+
of stock; two edits, one record).
|
|
36
|
+
2. **Time windows** — expiry, deadlines, "usually ready within X", reminder
|
|
37
|
+
timing, what happens exactly at the boundary and one tick after it.
|
|
38
|
+
3. **Money** — partial payments, refund correctness, rounding, double-charge
|
|
39
|
+
on retry, what happens if a webhook never arrives.
|
|
40
|
+
4. **Permissions** — who can see or mutate what; staff vs. customer vs. owner
|
|
41
|
+
boundaries; what an authenticated-but-wrong-role request can still reach.
|
|
42
|
+
|
|
43
|
+
## What NOT to do
|
|
44
|
+
|
|
45
|
+
- Don't suggest schema changes, indexes, or constraints — that's the design
|
|
46
|
+
session's job, after this list exists.
|
|
47
|
+
- Don't hedge with "it depends" — pick the worst plausible interpretation and
|
|
48
|
+
state its consequence.
|
|
49
|
+
- Don't produce more than 5. Rank and cut; the top failure matters more than
|
|
50
|
+
a complete list.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: to-openspec
|
|
3
|
+
description: >-
|
|
4
|
+
Turn settled discovery notes and a sketched data model into a spec folder
|
|
5
|
+
in openspec shape (proposal, spec, design, tasks) under specs/<slug>/.
|
|
6
|
+
Runs in two stages with a human review between them. No interview, just
|
|
7
|
+
synthesis of decisions already made. Trigger on "write the spec",
|
|
8
|
+
"to-openspec", or "/to-openspec <slug> [stage 2]".
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# To openspec
|
|
12
|
+
|
|
13
|
+
Synthesize, don't decide. Every decision comes from `discovery.md`, the design sketch, or the
|
|
14
|
+
conversation. If one is missing, list it under **Open questions** at the end of your reply
|
|
15
|
+
instead of inventing it. Never invent prices, policies, deadlines, or permissions.
|
|
16
|
+
|
|
17
|
+
## Input
|
|
18
|
+
|
|
19
|
+
- `<slug>`: kebab-case, becomes `specs/<slug>/`. Derive one from the goal if not given.
|
|
20
|
+
- Sources: `discovery.md` (verdicts, non-goals, open questions), the data-model sketch, and the
|
|
21
|
+
conversation.
|
|
22
|
+
- Shape: read every file in the repo's `specs/_template/`, or in this skill's `templates/` when
|
|
23
|
+
the repo has none. Keep the headings exactly; write "None." rather than dropping a section.
|
|
24
|
+
- Check command: the one the repo documents (`make check`, or what AGENTS.md names).
|
|
25
|
+
|
|
26
|
+
## Stage 1: what and why
|
|
27
|
+
|
|
28
|
+
Write `specs/<slug>/proposal.md` and `specs/<slug>/spec.md`.
|
|
29
|
+
|
|
30
|
+
- **Goal** is one or two sentences. Every later task links back to it.
|
|
31
|
+
- **Non-goals** carry over every "later" or "never" verdict from discovery.
|
|
32
|
+
- **Requirements** cover the v1 slice only: the smallest set that meets the goal. Each one is
|
|
33
|
+
testable and maps to at least one scenario.
|
|
34
|
+
- **Scenarios** are Given/When/Then with concrete values (quantities, amounts, times, roles).
|
|
35
|
+
Every invariant (overselling, expiry, refund permissions, and so on) gets a scenario for the
|
|
36
|
+
boundary and one for the violation.
|
|
37
|
+
|
|
38
|
+
Then **stop**. Print the requirement list and any open questions so the human can cut or correct
|
|
39
|
+
the spec before the design is written. Don't write code.
|
|
40
|
+
|
|
41
|
+
## Stage 2: how
|
|
42
|
+
|
|
43
|
+
Run only when asked (for example "/to-openspec <slug> stage 2"), after the human has reviewed
|
|
44
|
+
stage 1. Re-read `proposal.md` and `spec.md` first; the human may have edited them.
|
|
45
|
+
|
|
46
|
+
1. Run the `red-team-data-model` skill against the data model. Print the top 5; don't write them
|
|
47
|
+
to a file.
|
|
48
|
+
2. Write `specs/<slug>/design.md`:
|
|
49
|
+
- **Decisions**: one line each with its tradeoff. Include the ones the red-team findings force.
|
|
50
|
+
- **Data model**: every invariant a DB constraint can enforce (`CHECK`, `UNIQUE`, `NOT NULL`,
|
|
51
|
+
FK, conditional `UPDATE ... WHERE`) goes in the table, not only in app code.
|
|
52
|
+
- **Seams**: the endpoint, function, or command the tests drive through, marked existing or
|
|
53
|
+
new. Prefer one high seam.
|
|
54
|
+
3. Write `specs/<slug>/tasks.md`: vertical slices, each small enough for one commit and one green
|
|
55
|
+
check command. Tests come first in each slice.
|
|
56
|
+
- Every task has its `_Goal:_` line, its **Seam** (one of the seams from `design.md`, precise
|
|
57
|
+
enough to write a black-box test against) and its **Blocked by** (task IDs, or none). That
|
|
58
|
+
makes the list a task graph `implement-spec` can run directly.
|
|
59
|
+
- A slice adds only the tables and columns its own scenarios need, not the whole model up front.
|
|
60
|
+
- No standalone "run the checks" task: every task already ends with the check command green.
|
|
61
|
+
|
|
62
|
+
Print the task list, then **Open questions**: every red-team finding the design leaves
|
|
63
|
+
unresolved, and every input the design assumes but the sources don't provide. Then stop. Don't
|
|
64
|
+
write code.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# <Feature title> — Design
|
|
2
|
+
|
|
3
|
+
## Decisions
|
|
4
|
+
|
|
5
|
+
One line each: the decision and its tradeoff.
|
|
6
|
+
|
|
7
|
+
- **<decision>** — <tradeoff, one line>.
|
|
8
|
+
|
|
9
|
+
## Data model
|
|
10
|
+
|
|
11
|
+
Tables/fields touched or added, and the invariants that go in DB constraints (not just app code).
|
|
12
|
+
|
|
13
|
+
| Table | Field | Constraint | Why |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| | | | |
|
|
16
|
+
|
|
17
|
+
## Seams
|
|
18
|
+
|
|
19
|
+
Where tests drive through: module, function, command, or endpoint. Mark each existing or new.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# <Feature title>
|
|
2
|
+
|
|
3
|
+
## Why
|
|
4
|
+
|
|
5
|
+
What problem this solves, from the user's perspective. One paragraph.
|
|
6
|
+
|
|
7
|
+
## For whom
|
|
8
|
+
|
|
9
|
+
The actor(s) this serves (e.g. customer, staff, owner).
|
|
10
|
+
|
|
11
|
+
## Goal
|
|
12
|
+
|
|
13
|
+
What "done" looks like for this slice. One or two sentences — this is what every task links back
|
|
14
|
+
to.
|
|
15
|
+
|
|
16
|
+
## Non-goals
|
|
17
|
+
|
|
18
|
+
Explicitly out of scope for this slice, so nobody re-litigates it mid-build.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# <Feature title> — Spec
|
|
2
|
+
|
|
3
|
+
## Requirements
|
|
4
|
+
|
|
5
|
+
Numbered, testable requirements. Each one should map to at least one scenario below.
|
|
6
|
+
|
|
7
|
+
1. ...
|
|
8
|
+
|
|
9
|
+
## Scenarios
|
|
10
|
+
|
|
11
|
+
Given/When/Then, one per requirement (or per edge case of a requirement). These are what the
|
|
12
|
+
tests get written from.
|
|
13
|
+
|
|
14
|
+
### Scenario: <name>
|
|
15
|
+
|
|
16
|
+
- **Given** ...
|
|
17
|
+
- **When** ...
|
|
18
|
+
- **Then** ...
|
|
19
|
+
|
|
20
|
+
## Out of scope
|
|
21
|
+
|
|
22
|
+
Carried over from proposal.md's non-goals if relevant to a reader who only opens this file.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# <Feature title> — Tasks
|
|
2
|
+
|
|
3
|
+
Each task links to the goal in proposal.md. Work the frontier (tasks whose blockers are done);
|
|
4
|
+
commit per task with its ID.
|
|
5
|
+
|
|
6
|
+
- [ ] **T1** — <task>. _Goal: <one line, why this task serves proposal.md's goal>._
|
|
7
|
+
Seam: <endpoint / function / command from design.md>. Blocked by: none.
|
|
8
|
+
- [ ] **T2** — <task>. _Goal: ..._
|
|
9
|
+
Seam: .... Blocked by: T1.
|
package/skills-manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-09-
|
|
3
|
+
"generatedAt": "2026-09-24T15:29:01.254Z",
|
|
4
4
|
"skills": [
|
|
5
5
|
{
|
|
6
6
|
"name": "backlog",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "implement-spec",
|
|
49
|
-
"version": "0.1.
|
|
50
|
-
"hash": "sha256-
|
|
49
|
+
"version": "0.1.1",
|
|
50
|
+
"hash": "sha256-678f3481bce18448d0d27ef33c096d4b64faf8dd7254dd8d0bc73f8c134a7f58",
|
|
51
51
|
"description": "Implement a specification in code."
|
|
52
52
|
},
|
|
53
53
|
{
|
|
@@ -62,12 +62,24 @@
|
|
|
62
62
|
"hash": "sha256-211e0e116ff6efbc4589ea7264835855b9495ba535f242733af913903fe7707d",
|
|
63
63
|
"description": "Build a throwaway prototype to answer a design question, delivered as one self-contained HTML file. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like."
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
"name": "red-team-data-model",
|
|
67
|
+
"version": "0.1.0",
|
|
68
|
+
"hash": "sha256-3c7a00bbb05190a431ea101db79b6e27bbfc6c8b24b14b0fe560a82a201afdb9",
|
|
69
|
+
"description": "Attack a proposed or existing data model for the ways it breaks under real conditions — concurrency, time windows, money, permissions — without proposing a redesign. Use right after sketching a data model, before writing the spec, so the top failure scenarios shape the spec's requirements and tests instead of getting discovered mid-build. Trigger on \"red-team my data model\", \"what breaks in this schema\", or \"/red-team\"."
|
|
70
|
+
},
|
|
65
71
|
{
|
|
66
72
|
"name": "review-diff",
|
|
67
73
|
"version": "0.1.0",
|
|
68
74
|
"hash": "sha256-f1efdffdad0abf536777a3afcc733b2612ed51abad0b1a04d24f280bf2f223d3",
|
|
69
75
|
"description": "Review a branch before merge: first a gate (the repo's check command plus crap-gate), then three independent reviewers in parallel — spec (did we build what was asked, no more, no less), correctness via Codex (races, idempotency, money, time, authz, indexes, N+1, migrations, error paths, test quality) and structure (deep-quality-review). `--quick` runs only spec and correctness, shortened, for a live interview. Use when the user says \"/review-diff\", \"review this branch\", \"review this slice\", \"review before merge\", or before closing out a spec task."
|
|
70
76
|
},
|
|
77
|
+
{
|
|
78
|
+
"name": "to-openspec",
|
|
79
|
+
"version": "0.1.0",
|
|
80
|
+
"hash": "sha256-c3c66a08fe27afa1f530989b77c7b4fd2d6a379cc844a9ca5f55072bede9b64a",
|
|
81
|
+
"description": "Turn settled discovery notes and a sketched data model into a spec folder in openspec shape (proposal, spec, design, tasks) under specs/<slug>/. Runs in two stages with a human review between them. No interview, just synthesis of decisions already made. Trigger on \"write the spec\", \"to-openspec\", or \"/to-openspec <slug> [stage 2]\"."
|
|
82
|
+
},
|
|
71
83
|
{
|
|
72
84
|
"name": "to-spec",
|
|
73
85
|
"version": "0.1.0",
|