@jesdi/skills 0.0.17 → 0.0.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesdi/skills",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-09-24T09:06:27.178Z",
3
+ "generatedAt": "2026-09-24T09:54:20.128Z",
4
4
  "skills": [
5
5
  {
6
6
  "name": "backlog",
@@ -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",