@jaybeeuu/agent-cortex 1.41.0 → 1.42.0
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/.github/workflows/ci.yml +5 -5
- package/CHANGELOG.md +60 -0
- package/agents/ralph-plan/agent.md +7 -3
- package/agents/ralph-plan.agent.md +7 -3
- package/claude-extras/scripts/statusline-command.sh +0 -0
- package/docs/ideas/ban-content-assertion-tests.md +3 -1
- package/docs/ideas/dedicated-review-tests-skill.md +71 -0
- package/docs/ideas/unify-the-ticket-and-task-decomposition-workflows.md +71 -0
- package/package.json +5 -2
- package/plugin.json +1 -1
- package/scripts/install-instructions.sh +0 -0
- package/scripts/sync-plugin-version.sh +0 -0
- package/skills/engineering/grill-with-docs/SKILL.md +3 -2
- package/skills/engineering/improve-codebase-architecture/REFERENCE.md +5 -0
- package/skills/engineering/improve-codebase-architecture/SKILL.md +2 -1
- package/skills/planning/create-task/REFERENCE.md +1 -1
- package/skills/planning/create-task/SKILL.md +9 -4
- package/skills/planning/create-task/scripts/create-chores.ts +8 -1
- package/skills/planning/prd-to-tasks/REFERENCE.md +2 -2
- package/skills/planning/prd-to-tasks/SKILL.md +9 -4
- package/skills/planning/request-refactor-plan/FORMAT.md +5 -0
- package/skills/planning/request-refactor-plan/SKILL.md +3 -2
- package/skills/planning/spec-to-tickets/REFERENCE.md +82 -0
- package/skills/planning/spec-to-tickets/SKILL.md +143 -0
- package/skills/planning/write-a-prd/FORMAT.md +6 -0
- package/skills/planning/write-a-prd/SKILL.md +9 -6
- package/skills/planning/write-a-ticket/EXAMPLES.md +133 -0
- package/skills/planning/write-a-ticket/SKILL.md +77 -59
- package/skills/productivity/bd-tool/SKILL.md +27 -2
- package/skills/productivity/grill-me/SKILL.md +11 -0
- package/skills/review/review-security/scripts/install-gitleaks.sh +0 -0
- package/skills/style/style-code/SKILL.md +4 -0
- package/skills/style/style-tests/EXAMPLES.md +548 -0
- package/skills/style/style-tests/SKILL.md +34 -35
- package/skills/workflow/plan/SKILL.md +20 -8
- package/skills/workflow/ralph/REFERENCE.md +3 -1
- package/skills/workflow/run-pipeline-stage/SKILL.md +6 -1
- package/skills/workflow/using-agent-skills/SKILL.md +1 -0
- package/test/create-chores.test.mjs +85 -0
- package/test/fake-bd.test.mjs +72 -0
- package/test/helpers/fake-bd.mjs +87 -0
- package/extensions/agent-guardrails/node_modules/.bin/pi +0 -21
- package/extensions/agent-guardrails/node_modules/.bin/tsc +0 -21
- package/extensions/agent-guardrails/node_modules/.bin/tsserver +0 -21
- package/extensions/agent-guardrails/node_modules/.bin/tsx +0 -21
- package/extensions/agent-modes/node_modules/.bin/pi +0 -21
- package/extensions/agent-modes/node_modules/.bin/tsc +0 -21
- package/extensions/agent-modes/node_modules/.bin/tsserver +0 -21
- package/extensions/agent-modes/node_modules/.bin/tsx +0 -21
- package/extensions/skill-stats/node_modules/.bin/pi +0 -21
- package/extensions/skill-stats/node_modules/.bin/tsc +0 -21
- package/extensions/skill-stats/node_modules/.bin/tsserver +0 -21
- package/extensions/skill-stats/node_modules/.bin/tsx +0 -21
- package/extensions/skill-stats/pnpm-lock.yaml +0 -329
- package/extensions/subagent/node_modules/.bin/pi +0 -21
- package/extensions/subagent/node_modules/.bin/pi-ai +0 -21
- package/extensions/subagent/node_modules/.bin/tsc +0 -21
- package/extensions/subagent/node_modules/.bin/tsserver +0 -21
- package/extensions/subagent/node_modules/.bin/tsx +0 -21
- package/skills/planning/create-task/scripts/node_modules/.bin/tsc +0 -21
- package/skills/planning/create-task/scripts/node_modules/.bin/tsserver +0 -21
- package/skills/planning/create-task/scripts/node_modules/.bin/tsx +0 -21
- package/skills/planning/create-task/scripts/pnpm-lock.yaml +0 -342
- package/skills/productivity/validate-agent-dir/scripts/node_modules/.bin/tsc +0 -21
- package/skills/productivity/validate-agent-dir/scripts/node_modules/.bin/tsserver +0 -21
- package/skills/productivity/validate-agent-dir/scripts/node_modules/.bin/tsx +0 -21
- package/skills/productivity/validate-agent-dir/scripts/pnpm-lock.yaml +0 -329
- package/skills/workflow/run-pipeline-stage/scripts/node_modules/.bin/tsc +0 -21
- package/skills/workflow/run-pipeline-stage/scripts/node_modules/.bin/tsserver +0 -21
- package/skills/workflow/run-pipeline-stage/scripts/node_modules/.bin/tsx +0 -21
- package/skills/workflow/run-pipeline-stage/scripts/pnpm-lock.yaml +0 -342
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Spec to Tickets — Reference
|
|
2
|
+
|
|
3
|
+
Supporting formats for `spec-to-tickets`. Load this when writing the map, drafting tickets,
|
|
4
|
+
or creating them.
|
|
5
|
+
|
|
6
|
+
## Ticket map format
|
|
7
|
+
|
|
8
|
+
Written to `.agent-cortex/tickets/<spec-slug>-map.md` at Phase 3 step 8. `.agent-cortex/*`
|
|
9
|
+
is gitignored, so the map is a local review artefact — not a committed plan file.
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# <Spec title> — ticket map
|
|
13
|
+
|
|
14
|
+
- **Source:** <link or path to the PRD/RFC/spec>
|
|
15
|
+
- **Tracker:** <Jira | GitLab | GitHub | beads>
|
|
16
|
+
- **Status:** draft | agreed | created
|
|
17
|
+
|
|
18
|
+
## Shared decisions
|
|
19
|
+
|
|
20
|
+
- <schema/API/auth decision every ticket relies on, with a link>
|
|
21
|
+
|
|
22
|
+
## Tickets
|
|
23
|
+
|
|
24
|
+
| # | Title | Intent | Touches | Depends on | Ticket ID |
|
|
25
|
+
|---|---|---|---|---|---|
|
|
26
|
+
| T1 | Add grease sampling to the monitor | Read grease levels alongside oil on each poll | `src/monitor/` | — | — |
|
|
27
|
+
| T2 | Surface grease readings in the dashboard | Show grease next to oil on the status panel | `src/web/` | T1 | — |
|
|
28
|
+
|
|
29
|
+
## Ordering
|
|
30
|
+
|
|
31
|
+
T1 -> T2, T3 (T2 and T3 can run in parallel)
|
|
32
|
+
|
|
33
|
+
## Out of scope
|
|
34
|
+
|
|
35
|
+
- <work the spec mentions that these tickets deliberately exclude>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Set `Status` to `agreed` at Phase 3, and fill `Ticket ID` as each ticket is created in Phase 6.
|
|
39
|
+
|
|
40
|
+
## Ticket draft format
|
|
41
|
+
|
|
42
|
+
Written to `.agent-cortex/tickets/<spec-slug>/<NN>-<ticket-slug>.md` at Phase 4 step 10 —
|
|
43
|
+
one file per ticket, numbered in dependency order. Drafts are the review artefact for
|
|
44
|
+
Phase 5 and the source of the created ticket body.
|
|
45
|
+
|
|
46
|
+
```markdown
|
|
47
|
+
# <Ticket title>
|
|
48
|
+
|
|
49
|
+
- **Map ref:** T1
|
|
50
|
+
- **Depends on:** T2, T3
|
|
51
|
+
- **Ticket ID:** — (filled at creation)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
<body from write-a-ticket>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Fill `Ticket ID` at Phase 6. Upload the body verbatim; record `Depends on` in the tracker's
|
|
59
|
+
own link or dependency field when it has one.
|
|
60
|
+
|
|
61
|
+
## Tracker adapters
|
|
62
|
+
|
|
63
|
+
The tracker and mechanism are chosen in Phase 1 step 2. These are illustrative examples,
|
|
64
|
+
not a fixed contract — confirm the real command or tool with the human before creating.
|
|
65
|
+
|
|
66
|
+
| Tracker | Example creation mechanism |
|
|
67
|
+
|---|---|
|
|
68
|
+
| GitHub | `gh issue create --title "<title>" --body-file <draft-body.md> --label <label>` |
|
|
69
|
+
| GitLab | `glab issue create --title "<title>" --description "<body>"` |
|
|
70
|
+
| Jira | the configured Jira CLI or MCP tool for issue creation |
|
|
71
|
+
| beads | `bd create "<title>" --description "<body>" --validate` |
|
|
72
|
+
|
|
73
|
+
Keep the approved draft verbatim — do not reformat it for the tracker. After creation,
|
|
74
|
+
copy the returned ID into the map's `Ticket ID` column, the draft's `Ticket ID` field, and
|
|
75
|
+
downstream `Depends on` cells.
|
|
76
|
+
|
|
77
|
+
## Worked run
|
|
78
|
+
|
|
79
|
+
Input: an approved RFC with eight numbered requirements and a target GitLab project.
|
|
80
|
+
Output: `.agent-cortex/tickets/checkout-v2-map.md` agreed in chat, eight drafts under
|
|
81
|
+
`.agent-cortex/tickets/checkout-v2/` reviewed as a set, then eight GitLab issues created in
|
|
82
|
+
dependency order with real IDs backfilled into the map and the drafts.
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-to-tickets
|
|
3
|
+
description: Turn a PRD, RFC, or spec into an agreed map of tickets, then draft each ticket body with the human in dependency order. Use when the user says "break this spec into tickets", "turn this RFC into tickets", or "map out the work".
|
|
4
|
+
argument-hint: "The spec to decompose (path or link) and the target tracker"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Spec to Tickets
|
|
8
|
+
|
|
9
|
+
Turn one spec into a reviewed graph of tickets. The map is agreed before any body is
|
|
10
|
+
written, the drafts are reviewed as a set, and only then are tickets created.
|
|
11
|
+
|
|
12
|
+
## When to use
|
|
13
|
+
|
|
14
|
+
- A PRD, RFC, ADR, or spec is approved and needs to become tickets in a tracker.
|
|
15
|
+
- The user says "break this spec into tickets", "turn this RFC into tickets", or "map out the work".
|
|
16
|
+
- A large change needs a dependency graph before anyone starts implementing.
|
|
17
|
+
|
|
18
|
+
## When NOT to use
|
|
19
|
+
|
|
20
|
+
- A single ticket — use `write-a-ticket` directly.
|
|
21
|
+
- Decomposition into beads for the ralph/bd loop — use `prd-to-tasks`.
|
|
22
|
+
- No spec exists yet — use `write-a-prd` or `grill-with-docs` first.
|
|
23
|
+
|
|
24
|
+
## Philosophy / rationale
|
|
25
|
+
|
|
26
|
+
- **Agree the graph before the bodies.** Granularity decisions invalidate bodies, so the human approves titles, edges, and scope first. Bodies are cheap to write once the graph is right.
|
|
27
|
+
- **Draft everything, then create once.** Drafts are reviewable artefacts; tickets in a tracker are not. The human reads the whole set before anything is uploaded.
|
|
28
|
+
- **One ticket at a time, then all at once.** Draft each body with the human so decisions stay in the open; review the finished set together so the boundary between tickets is visible.
|
|
29
|
+
- **Less is more.** Tickets stay scannable; the detail lives in the spec the ticket links to.
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
|
|
33
|
+
### Phase 1 — Ingest the spec
|
|
34
|
+
|
|
35
|
+
1. Confirm the spec is in context (file, link, or paste). If it is missing, stop and ask for it.
|
|
36
|
+
2. Identify the tracker and how tickets are created there — Jira, GitLab, GitHub, or beads, via CLI, MCP, or manual paste. Ask when unclear; the mechanism only affects Phase 6.
|
|
37
|
+
3. Explore the code the spec touches, enough to name the components each ticket will change. You cannot slice work you have not looked at.
|
|
38
|
+
4. Record the durable decisions that apply across every ticket — schema shape, API conventions, auth, shared models — so bodies link to them instead of repeating them.
|
|
39
|
+
|
|
40
|
+
### Phase 2 — Draft the ticket map
|
|
41
|
+
|
|
42
|
+
5. Slice the spec into tickets. Each ticket is a coherent unit of change one engineer can pick up and finish — not a layer, not a phase, not a week of work. Prefer more, thinner tickets.
|
|
43
|
+
6. For each ticket record a verb-first title, a one-line intent, the components it touches, and its `depends-on` edges.
|
|
44
|
+
7. Order the graph so dependencies come first, and mark the tickets that can run in parallel.
|
|
45
|
+
|
|
46
|
+
### Phase 3 — Agree the map
|
|
47
|
+
|
|
48
|
+
8. Write the map to `.agent-cortex/tickets/<spec-slug>-map.md` in the format from [REFERENCE.md](./REFERENCE.md), then present it. The map carries titles, intents, touchpoints, and edges — no bodies.
|
|
49
|
+
9. Walk the graph with the human: granularity (merge or split), ordering, parallelism, and what is out of scope entirely. Iterate until they approve. Draft no body before this gate passes.
|
|
50
|
+
|
|
51
|
+
### Phase 4 — Draft every body
|
|
52
|
+
|
|
53
|
+
10. Walk the graph in dependency order. For each ticket, draft the body with `write-a-ticket` together with the human, and write it to `.agent-cortex/tickets/<spec-slug>/<NN>-<ticket-slug>.md` in the draft format from [REFERENCE.md](./REFERENCE.md). Create nothing yet.
|
|
54
|
+
11. Settle every open question as you draft: resolve it, split a blocking spike ticket, or send the human to find the answer. A question stays open only if the human explicitly agrees — and then it is recorded under `Open questions` with an owner. Ship nothing unresolved that the human has not agreed to.
|
|
55
|
+
|
|
56
|
+
### Phase 5 — Review the drafts
|
|
57
|
+
|
|
58
|
+
12. Present the whole draft set for one read-through: titles, bodies, and edges together, so the boundary between tickets is visible.
|
|
59
|
+
13. Iterate until the human approves the set. Nothing is created before this gate passes.
|
|
60
|
+
|
|
61
|
+
### Phase 6 — Create and backfill
|
|
62
|
+
|
|
63
|
+
14. Create each ticket through the agreed mechanism, using its approved draft verbatim. [REFERENCE.md](./REFERENCE.md) lists adapter examples.
|
|
64
|
+
15. Backfill the real ID into the map, the draft file, and downstream tickets' dependency references.
|
|
65
|
+
|
|
66
|
+
### Phase 7 — Report
|
|
67
|
+
|
|
68
|
+
16. Present the created tickets with their IDs, edges, and any spikes, and note which can start immediately.
|
|
69
|
+
|
|
70
|
+
Workflow at a glance:
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
[Spec: PRD/RFC/ADR]
|
|
74
|
+
|
|
|
75
|
+
v
|
|
76
|
+
[P1: Ingest + explore code]
|
|
77
|
+
|
|
|
78
|
+
v
|
|
79
|
+
[P2: Draft the ticket map]
|
|
80
|
+
|
|
|
81
|
+
v
|
|
82
|
+
[P3: Agree the map] --(revise)--> [P2: Draft the ticket map]
|
|
83
|
+
|
|
|
84
|
+
(approved)
|
|
85
|
+
v
|
|
86
|
+
[P4: Draft every body] --(open)--> [Resolve / spike / ask]
|
|
87
|
+
|
|
|
88
|
+
(drafted)
|
|
89
|
+
v
|
|
90
|
+
[P5: Review the draft set] --(revise)--> [P4: Draft every body]
|
|
91
|
+
|
|
|
92
|
+
(approved)
|
|
93
|
+
v
|
|
94
|
+
[P6: Create + backfill IDs]
|
|
95
|
+
|
|
|
96
|
+
v
|
|
97
|
+
[P7: Report the graph]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Red Flags
|
|
101
|
+
|
|
102
|
+
- **Drafting bodies before the map is agreed.** A granularity change rewrites bodies; agree the graph first.
|
|
103
|
+
- **Creating before the draft set is reviewed.** Drafts are the review artefact; upload only what the human has read.
|
|
104
|
+
- **Layer tickets.** "All the database work" is not a unit of change — every ticket should be independently useful.
|
|
105
|
+
- **Carrying an unagreed open question into a body.** Resolve it, split a spike, or get the human's explicit agreement to leave it open.
|
|
106
|
+
- **A missing `depends-on` edge.** Ordering is the point of the map; an unmodelled dependency surfaces later as a blocked engineer.
|
|
107
|
+
- **Fat tickets.** If a ticket is a week of work, split it.
|
|
108
|
+
|
|
109
|
+
## Common Rationalizations
|
|
110
|
+
|
|
111
|
+
| Rationalization | Rebuttal |
|
|
112
|
+
|---|---|
|
|
113
|
+
| "I'll create all the tickets, then refine" | Granularity is agreed first and drafts are reviewed before creation; tickets edited in the tracker leave the map stale. |
|
|
114
|
+
| "The map is obvious — skip writing it down" | The map is the review artefact. The human approves a graph, not a scroll of bodies. |
|
|
115
|
+
| "I'll note the open question in the ticket" | Only with the human's explicit agreement. Otherwise resolve it or spike it — an unagreed question is a blocked implementer. |
|
|
116
|
+
| "One big ticket is simpler to track" | Big tickets hide scope and block parallel work. |
|
|
117
|
+
|
|
118
|
+
## Cross-skill references
|
|
119
|
+
|
|
120
|
+
- **`write-a-ticket`** — invoked for every body; owns the ticket quality bar.
|
|
121
|
+
- **`write-a-prd`** — use first when no spec exists.
|
|
122
|
+
- **`prd-to-tasks`** — use when the output is beads for the ralph/bd loop, not external tickets.
|
|
123
|
+
- **`style-comms`** — invoke when drafting the map's titles and intents.
|
|
124
|
+
|
|
125
|
+
## Phase-gate checklist
|
|
126
|
+
|
|
127
|
+
- [ ] Phase 1 complete: spec in context, tracker identified, code explored, shared decisions recorded.
|
|
128
|
+
- [ ] Phase 2 complete: map drafted with titles, intents, touchpoints, and edges.
|
|
129
|
+
- [ ] Phase 3 complete: map written to `.agent-cortex/tickets/` and approved by the human.
|
|
130
|
+
- [ ] Phase 4 complete: every body drafted with `write-a-ticket` and written to the draft directory.
|
|
131
|
+
- [ ] Phase 5 complete: the draft set was reviewed and approved as a whole.
|
|
132
|
+
- [ ] Phase 6 complete: all tickets created and IDs backfilled into the map and the drafts.
|
|
133
|
+
- [ ] Phase 7 complete: graph reported with IDs, edges, and spikes.
|
|
134
|
+
|
|
135
|
+
## Verification checklist
|
|
136
|
+
|
|
137
|
+
- [ ] No body was drafted before the map was approved.
|
|
138
|
+
- [ ] Every ticket is a coherent unit of change, not a layer or a phase.
|
|
139
|
+
- [ ] Every dependency is modelled as a `depends-on` edge in the map.
|
|
140
|
+
- [ ] Every draft exists under `.agent-cortex/tickets/<spec-slug>/` and was approved before creation.
|
|
141
|
+
- [ ] Every open question shipped was explicitly agreed by the human and has an owner.
|
|
142
|
+
- [ ] Real ticket IDs were backfilled into the map, the drafts, and downstream dependencies.
|
|
143
|
+
- [ ] The map file exists at `.agent-cortex/tickets/<spec-slug>-map.md`.
|
|
@@ -23,6 +23,12 @@ A LONG, numbered list of user stories. Each user story should be in the format o
|
|
|
23
23
|
|
|
24
24
|
This list of user stories should be extremely extensive and cover all aspects of the feature.
|
|
25
25
|
|
|
26
|
+
## Success Criteria
|
|
27
|
+
|
|
28
|
+
The high-level, verifiable outcomes that mean this feature succeeded. This is the epic's
|
|
29
|
+
`## Success Criteria` (required by `bd create --validate`) — distinct from the per-task
|
|
30
|
+
acceptance criteria that `prd-to-tasks` derives later.
|
|
31
|
+
|
|
26
32
|
## Implementation Decisions
|
|
27
33
|
|
|
28
34
|
A list of implementation decisions that were made. This can include:
|
|
@@ -14,18 +14,18 @@ description: Create a PRD through user interview, codebase exploration, and modu
|
|
|
14
14
|
## When NOT to use
|
|
15
15
|
|
|
16
16
|
- The idea is not ready to build yet — use `record-idea` to capture it to the backlog.
|
|
17
|
-
- The output targets a human team's external tracker — use `write-a-ticket
|
|
18
|
-
- A PRD already exists and needs breaking
|
|
17
|
+
- The output targets a human team's external tracker — use `write-a-ticket` for one ticket, or `spec-to-tickets` to break a spec into many.
|
|
18
|
+
- A PRD already exists and needs breaking down — use `prd-to-tasks` for beads, or `spec-to-tickets` for external tickets.
|
|
19
19
|
- The scope is a refactor needing a safe incremental plan — use `request-refactor-plan`.
|
|
20
20
|
|
|
21
21
|
## Workflow
|
|
22
22
|
|
|
23
23
|
1. **Gather the problem statement.** Ask the user for a long, detailed description of the problem and any potential solution ideas. Ask one question at a time.
|
|
24
24
|
2. **Explore the codebase.** Verify the user's assertions against the repo's current state. Explore instead of asking when the answer lives in code.
|
|
25
|
-
3. **Interview relentlessly.** Walk down each branch of the design tree, resolving dependencies between decisions one by one, until the user's understanding and yours are identical.
|
|
25
|
+
3. **Interview relentlessly.** Walk down each branch of the design tree, resolving dependencies between decisions one by one, until the user's understanding and yours are identical. The epic's required sections — `## Success Criteria` in particular — are the interview's target: it is complete only when there is enough agreed detail to fill every required section. Never invent an answer; surface it as an assumption and confirm it with the user.
|
|
26
26
|
4. **Sketch the modules.** List the major modules to build or modify, actively looking for deep modules — ones that encapsulate rich behaviour behind a simple, stable interface testable in isolation. Confirm the list with the user, plus which modules they want tests written for.
|
|
27
|
-
5. **Write the PRD.** Render the template in `FORMAT.md` (Problem Statement, Solution, User Stories, Implementation Decisions, Testing Decisions, Out of Scope, Further Notes). Make the user-story list extremely extensive so it covers all aspects of the feature.
|
|
28
|
-
6. **File the bead.** Create the epic with `bd create "<title>" --type epic --priority P1 --body-file
|
|
27
|
+
5. **Write the PRD.** Render the template in `FORMAT.md` (Problem Statement, Solution, User Stories, Success Criteria, Implementation Decisions, Testing Decisions, Out of Scope, Further Notes). Make the user-story list extremely extensive so it covers all aspects of the feature.
|
|
28
|
+
6. **File the bead.** Create the epic with `bd create "<title>" --type epic --priority P1 --body-file - --validate`, piping the rendered PRD to stdin, then run the `classify-bead` classifier (`node <this-skill-dir>/../classify-bead/scripts/classify-bead.mjs <epic-id>`, run from the target project's cwd) to label it AFK or HITL. Escalate to the `classify-bead` subagent only when the classifier reports `escalate: true`. Finally run `bd lint <epic-id>` and fix any missing sections before reporting.
|
|
29
29
|
|
|
30
30
|
Run the steps in order. Skip a step only when the user confirms it is unnecessary (e.g. the codebase is already explored).
|
|
31
31
|
|
|
@@ -52,12 +52,13 @@ Run the steps in order. Skip a step only when the user confirms it is unnecessar
|
|
|
52
52
|
|
|
53
53
|
- [ ] Gate 1 — shared understanding: every design-tree branch resolved and the user confirms the summary.
|
|
54
54
|
- [ ] Gate 2 — modules agreed: the module list and test expectations match the user's model of the solution.
|
|
55
|
-
- [ ] Gate 3 — PRD filed: the epic bead contains the rendered template
|
|
55
|
+
- [ ] Gate 3 — PRD filed: the epic bead contains the rendered template, carries an implementation-type label, and lints clean.
|
|
56
56
|
|
|
57
57
|
## Cross-skill references
|
|
58
58
|
|
|
59
59
|
- Use `record-idea` when the idea is not yet ready to build.
|
|
60
60
|
- Use `write-a-ticket` when the spec targets an external tracker rather than a bead.
|
|
61
|
+
- Use `spec-to-tickets` when an approved PRD/RFC must become a map of external tickets.
|
|
61
62
|
- Run `prd-to-tasks` on the filed epic to break the PRD into an executable backlog.
|
|
62
63
|
- Run the `classify-bead` classifier on the new epic — the repo labels every new bead AFK or HITL. Its `scripts/` directory sits next to this skill's directory in every harness, so `<this-skill-dir>/../classify-bead/scripts/classify-bead.mjs` resolves it. Escalate to its rubric subagent only when the classifier reports `escalate: true`.
|
|
63
64
|
|
|
@@ -69,6 +70,8 @@ Output: an epic bead whose description is the rendered PRD — problem, solution
|
|
|
69
70
|
## Verification checklist
|
|
70
71
|
|
|
71
72
|
- [ ] Template in `FORMAT.md` rendered fully, with no placeholder sections.
|
|
73
|
+
- [ ] `## Success Criteria` present and the epic created with `--validate`.
|
|
74
|
+
- [ ] `bd lint <epic-id>` reports no missing sections.
|
|
72
75
|
- [ ] Every user story follows "As an <actor>, I want <feature>, so that <benefit>".
|
|
73
76
|
- [ ] Codebase assertions verified against the repo before writing.
|
|
74
77
|
- [ ] Implementation Decisions contains no file paths or code snippets.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Write a Ticket — Examples
|
|
2
|
+
|
|
3
|
+
Worked before/after rewrites for the `write-a-ticket` skill.
|
|
4
|
+
|
|
5
|
+
## A whole ticket: padded vs tight
|
|
6
|
+
|
|
7
|
+
The padded version is the failure mode this skill exists to prevent: it explains the RFC,
|
|
8
|
+
prescribes an implementation, says nothing about scope, and leaves a question open. The
|
|
9
|
+
tight version points at the source material, states the behaviour, draws the boundary, and
|
|
10
|
+
gives an entry point.
|
|
11
|
+
|
|
12
|
+
### Padded
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
## Context
|
|
16
|
+
|
|
17
|
+
We are moving our billing stack to a new provider. The current provider has had several
|
|
18
|
+
outages this year, which has affected customer trust. The Q3 billing review evaluated
|
|
19
|
+
Stripe, Paddle, and Chargebee; Paddle was chosen because of EU data residency. The
|
|
20
|
+
meeting notes are attached. There was also discussion about whether to migrate in one go
|
|
21
|
+
or incrementally, and about how to handle existing subscriptions.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
We need to migrate to Paddle. This involves adding the Paddle SDK, creating a webhook
|
|
26
|
+
handler, migrating the subscription records, updating the pricing page, and changing the
|
|
27
|
+
retry logic. Step 1: install the SDK. Step 2: add a webhook handler that verifies the
|
|
28
|
+
signature. Step 3: write a migration script …
|
|
29
|
+
|
|
30
|
+
## In scope
|
|
31
|
+
|
|
32
|
+
- The migration
|
|
33
|
+
|
|
34
|
+
## Acceptance criteria
|
|
35
|
+
|
|
36
|
+
- [ ] The migration works correctly
|
|
37
|
+
- [ ] The feature is tested
|
|
38
|
+
- [ ] Payments still work
|
|
39
|
+
|
|
40
|
+
## Open questions
|
|
41
|
+
|
|
42
|
+
- Do we migrate annual subscriptions too, or only monthly?
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Tight
|
|
46
|
+
|
|
47
|
+
```markdown
|
|
48
|
+
## Context
|
|
49
|
+
|
|
50
|
+
Part of the billing migration epic (BILL-412). Approach and provider decision in
|
|
51
|
+
RFC-018 §2; retry policy in ADR-014. Depends on the Paddle webhook receiver (BILL-420).
|
|
52
|
+
|
|
53
|
+
## Description
|
|
54
|
+
|
|
55
|
+
When a Paddle webhook fails with a transient error, the handler retries with the shared
|
|
56
|
+
backoff policy. Non-transient failures are logged and acknowledged without retry. The
|
|
57
|
+
existing provider path is unchanged.
|
|
58
|
+
|
|
59
|
+
## In scope
|
|
60
|
+
|
|
61
|
+
- Retry of transient Paddle webhook failures with the shared backoff policy.
|
|
62
|
+
- Provider selection in the payment factory.
|
|
63
|
+
- Structured logging of terminal webhook failures.
|
|
64
|
+
|
|
65
|
+
## Out of scope
|
|
66
|
+
|
|
67
|
+
- Subscription record migration (BILL-421).
|
|
68
|
+
- Pricing-page changes (BILL-422).
|
|
69
|
+
- Provider cutover and production enablement.
|
|
70
|
+
|
|
71
|
+
## Acceptance criteria
|
|
72
|
+
|
|
73
|
+
- [ ] A webhook returning 503 is retried up to 3 times with exponential backoff.
|
|
74
|
+
- [ ] A webhook returning 422 is not retried and is logged with the payload.
|
|
75
|
+
- [ ] The retry counter is per webhook event, not per process.
|
|
76
|
+
- [ ] The existing Stripe retry specs pass unchanged.
|
|
77
|
+
|
|
78
|
+
## Testing approach
|
|
79
|
+
|
|
80
|
+
Integration spec in `test/webhooks/retry.spec.ts` against the Paddle sandbox, asserting
|
|
81
|
+
the 503-then-200 path and the terminal 422 path.
|
|
82
|
+
|
|
83
|
+
## Technical notes
|
|
84
|
+
|
|
85
|
+
- **Entry point:** `src/payments/paddle.ts:41` (`handleWebhook`, `shouldRetry`)
|
|
86
|
+
- `retry()` from `@acme/retry-utils`; follow `src/payments/stripe.ts` for the handler shape.
|
|
87
|
+
- `handleWebhook` becomes async — update its call site in `src/payments/index.ts:12`.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The tight version is shorter, answers the reviewer's questions, and still leaves the
|
|
91
|
+
implementation to the implementer.
|
|
92
|
+
|
|
93
|
+
## Description: states the goal vs explains the RFC
|
|
94
|
+
|
|
95
|
+
| Instead of… | Write… |
|
|
96
|
+
| "We need to migrate to Paddle. The provider was chosen after a review of Stripe, Paddle and Chargebee, and there was discussion about whether to migrate incrementally. This ticket covers the retry logic, which is important because outages cost us customers. Step 1: …" | "When a Paddle webhook fails with a transient error, the handler retries with the shared backoff policy. Non-transient failures are logged and acknowledged without retry." |
|
|
97
|
+
|
|
98
|
+
The Description states what the ticket does and the behaviour it produces. It leads into the
|
|
99
|
+
scope bullets — the RFC link and the deliberation stay in Context or the source document.
|
|
100
|
+
|
|
101
|
+
## Padded context vs linked context
|
|
102
|
+
|
|
103
|
+
| Instead of… | Write… |
|
|
104
|
+
| "We are moving to a new billing provider because the current one has outages. The provider was chosen in the Q3 billing review (attached meeting notes, see thread in #billing where we discussed Stripe vs Paddle vs Chargebee; conclusion was Paddle due to EU data residency). This ticket tracks the work agreed there." | "Part of the billing migration epic (BILL-412). Approach in RFC-018 §2. Depends on the Paddle webhook receiver (BILL-420)." |
|
|
105
|
+
|
|
106
|
+
Context is a pointer block: parent, where the approach lives, what it depends on. It does
|
|
107
|
+
not recap the deliberation.
|
|
108
|
+
|
|
109
|
+
## Vague vs verifiable acceptance criteria
|
|
110
|
+
|
|
111
|
+
| Instead of… | Write… |
|
|
112
|
+
| "The export works correctly" | "Given a workspace with 1,000 issues, the CSV export returns all rows with no truncation" |
|
|
113
|
+
| "The feature is tested" | "Unit tests cover the retry path for transient HTTP 503 responses" |
|
|
114
|
+
| "The migration runs" | "The migration completes without errors on a staging copy of the production database" |
|
|
115
|
+
|
|
116
|
+
## Technical notes: entry point vs full inventory
|
|
117
|
+
|
|
118
|
+
| Instead of… | Write… |
|
|
119
|
+
| "Step 1: install the SDK via `pnpm add @acme/paddle`. Step 2: add a webhook handler that verifies the signature and … (10 more steps)" | "- **Entry point:** `src/payments/paddle.ts:41` (`handleWebhook`, `shouldRetry`)" |
|
|
120
|
+
| "Files to change: `paddle.ts`, `index.ts`, `stripe.ts`, `retry.ts`, `types.ts`, `webhook.ts`, `config.ts`" | "- **Entry point:** `src/payments/paddle.ts:41` (`handleWebhook`, `shouldRetry`)<br>- Follow `src/payments/stripe.ts` for the handler shape." |
|
|
121
|
+
|
|
122
|
+
Technical notes lead with the entry point and then give only the facts that change how the
|
|
123
|
+
work is done — a signature, a library, a convention. They are neither an inventory of every
|
|
124
|
+
file touched nor a step-by-step guide; either of those means the ticket has become the code.
|
|
125
|
+
|
|
126
|
+
## Open questions: agreed vs smuggled
|
|
127
|
+
|
|
128
|
+
An open question is legitimate when the human has agreed to it: it goes under
|
|
129
|
+
`Open questions` with the owner of the answer. A question the human has not agreed to is a
|
|
130
|
+
red flag wherever it appears — resolve it, spike it, or ask.
|
|
131
|
+
|
|
132
|
+
| Instead of… | Write… |
|
|
133
|
+
| A question buried in `Technical notes` or a `Notes` section, with no owner and no agreement | "## Open questions<br>- Do annual subscriptions migrate too? (owner: Priya)" |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write-a-ticket
|
|
3
|
-
description: Write a
|
|
3
|
+
description: Write a clear, reviewable ticket for an external issue tracker (Jira, Linear, GitLab, GitHub Issues) that an engineer can act on without follow-up questions. Use when asked to "write a ticket", "file this in Jira", or "create a work item" — not for beads in a ralph/bd loop.
|
|
4
4
|
argument-hint: "The work to ticket: goal, epic/initiative, constraints, or paste a draft"
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -9,104 +9,122 @@ argument-hint: "The work to ticket: goal, epic/initiative, constraints, or paste
|
|
|
9
9
|
## When to use
|
|
10
10
|
|
|
11
11
|
- Asked to "write a ticket", "file this in Jira", or "create a work item".
|
|
12
|
-
- Drafting an actionable work item for a human engineering audience in an external
|
|
13
|
-
-
|
|
12
|
+
- Drafting an actionable work item for a human engineering audience in an external tracker.
|
|
13
|
+
- Reviewing an existing ticket for clarity before it goes to the team.
|
|
14
14
|
|
|
15
15
|
## When NOT to use
|
|
16
16
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
17
|
+
- Breaking a whole PRD/RFC/spec into many tickets — use `spec-to-tickets`, which calls this skill per ticket.
|
|
18
|
+
- Creating implementation tasks for the ralph/bd loop — those are beads executed by agents; use `prd-to-tasks` or `create-task`.
|
|
19
|
+
- Writing a requirements document for work that is not yet actionable — run `write-a-prd` first.
|
|
19
20
|
|
|
20
21
|
## Workflow
|
|
21
22
|
|
|
22
|
-
1. **Gather context.** Confirm the goal
|
|
23
|
+
1. **Gather context.** Confirm the goal, the parent ticket or epic, the spec it follows, the decisions already made, and the entry point in the code. Outcome: you can state what this ticket does in one sentence. If you cannot, ask before writing.
|
|
23
24
|
|
|
24
|
-
2. **
|
|
25
|
+
2. **Settle open questions.** Resolve every question with the human while drafting. When a question cannot be resolved now, split a blocking spike ticket and depend on it, or ask the human to find the answer. A question may stay in the body only when the human explicitly agrees to leave it open — record it under `Open questions` with the owner of the answer. Ship no question the human has not agreed to.
|
|
26
|
+
|
|
27
|
+
3. **Draft the body** from the template below, then check it against the format rules and the verification checklist.
|
|
28
|
+
|
|
29
|
+
4. **Hand over the draft.** Present the body for review and get the human's agreement before it is created or filed. The draft is the review artefact — nothing reaches the tracker unseen.
|
|
25
30
|
|
|
26
31
|
```markdown
|
|
27
32
|
## Context
|
|
28
33
|
|
|
29
|
-
<1–
|
|
34
|
+
<1–5 sentences of pointers: parent ticket or epic, where the approach lives
|
|
35
|
+
(RFC/ADR section), the decisions already made, and what this depends on.
|
|
36
|
+
Reference these — do not explain them.>
|
|
30
37
|
|
|
31
38
|
## Description
|
|
32
39
|
|
|
33
|
-
<
|
|
40
|
+
<2–4 sentences. What this ticket does and the behaviour it produces — the goal,
|
|
41
|
+
stated as the lead-in to the scope bullets. Leave detail to the sections below.>
|
|
34
42
|
|
|
35
|
-
##
|
|
43
|
+
## In scope
|
|
36
44
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
45
|
+
- <a distinct deliverable this ticket owns>
|
|
46
|
+
- <...>
|
|
39
47
|
|
|
40
|
-
##
|
|
48
|
+
## Out of scope
|
|
41
49
|
|
|
42
|
-
<
|
|
50
|
+
- <adjacent work explicitly not included — name the ticket that owns it where known>
|
|
43
51
|
|
|
44
|
-
##
|
|
52
|
+
## Acceptance criteria
|
|
45
53
|
|
|
46
|
-
|
|
54
|
+
- [ ] <independently verifiable check>
|
|
55
|
+
- [ ] <...>
|
|
47
56
|
|
|
48
|
-
##
|
|
57
|
+
## Testing approach
|
|
49
58
|
|
|
50
|
-
<Optional.
|
|
59
|
+
<Optional. Which specs, what they assert, and any setup gotcha. Omit when team
|
|
60
|
+
defaults apply.>
|
|
51
61
|
|
|
52
|
-
##
|
|
62
|
+
## Technical notes
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
- **Entry point:** `path/to/file.ts:42` (`symbol`, `symbol`)
|
|
65
|
+
- <a decisive fact: a signature that changes, a library or convention to follow,
|
|
66
|
+
a field injected elsewhere>
|
|
67
|
+
|
|
68
|
+
## Open questions
|
|
69
|
+
|
|
70
|
+
<Optional, and only when the human has explicitly agreed to leave a question
|
|
71
|
+
open. One bullet per question, each naming who owns the answer. Omit this
|
|
72
|
+
section when there are none.>
|
|
55
73
|
```
|
|
56
74
|
|
|
57
|
-
|
|
75
|
+
### Format rules
|
|
76
|
+
|
|
77
|
+
- **Link, don't copy.** Reference the spec by link or section; never paraphrase it. A reader who needs the rationale opens the source.
|
|
78
|
+
- **Point at the entry, not the inventory.** Technical notes lead with the entry point — 1–3 links to where the work begins — plus only the facts that change how it is done. A full list of touched files means you have written the code in prose.
|
|
79
|
+
- **Scope is the contract.** In scope and Out of scope say what the ticket owns; Technical notes only show where to begin.
|
|
80
|
+
- **Every bullet is a distinct deliverable or check.** Merge any two that restate each other, and cut any that add neither.
|
|
81
|
+
- **Bullets over paragraphs, and no tables in the body** — trackers render tables inconsistently and they are slow to scan.
|
|
82
|
+
- **Budgets are guidance, not limits.** Context ≤ 3 sentences; Description ≤ 4 sentences; In scope ≤ 8 bullets; Out of scope ≤ 6 bullets; Acceptance criteria ≤ 12 items; Technical notes ≤ 6 bullets. Extend a section when the work genuinely needs it — a larger scope, or detail that makes the goal clearer — but treat that as the exception, not the rule. Aim for the smallest body that is still complete.
|
|
58
83
|
|
|
59
84
|
## Red Flags
|
|
60
85
|
|
|
61
|
-
- Writing
|
|
86
|
+
- Writing the code in prose — listing every file touched, or stepping through the edits.
|
|
87
|
+
- A Description that explains the RFC or the deliberation instead of stating what this ticket does.
|
|
62
88
|
- Acceptance criteria that cannot be verified: "works correctly", "is tested".
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
-
|
|
89
|
+
- Padding a section to reach a budget, or exceeding one without the work to justify it.
|
|
90
|
+
- Copy-pasting spec content instead of linking to it.
|
|
91
|
+
- Leaving a question, `TBD`, or "we need to decide" in the body when the human has not agreed to it — an unagreed open question is a blocked implementer.
|
|
66
92
|
|
|
67
93
|
## Common Rationalizations
|
|
68
94
|
|
|
69
|
-
| Rationalization
|
|
70
|
-
|
|
71
|
-
| "The engineer will figure it out"
|
|
72
|
-
| "More detail is safer"
|
|
73
|
-
| "
|
|
74
|
-
| "
|
|
95
|
+
| Rationalization | Rebuttal |
|
|
96
|
+
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| "The engineer will figure it out" | Skilled engineers can — but questions are a blocked ticket. The ticket must stand alone. |
|
|
98
|
+
| "More detail is safer" | Detail helps only if it informs the implementer. Every extra sentence is noise to skim. |
|
|
99
|
+
| "The reviewer should see every file touched" | The reviewer needs the scope and somewhere to start, not an inventory. The implementer finds the rest. |
|
|
100
|
+
| "I'll flag the open question in the ticket" | Only if the human agrees to leave it open. Otherwise resolve it or split a spike — an unagreed question is a blocked implementer. |
|
|
75
101
|
|
|
76
102
|
## Philosophy / rationale
|
|
77
103
|
|
|
78
|
-
- **Write for clarity, not coverage.**
|
|
79
|
-
- **
|
|
80
|
-
- **
|
|
104
|
+
- **Write for clarity, not coverage.** Every line carries a fact; a long ticket of facts beats a short one of filler. Aim for the smallest body that is still complete, and extend a section only when the work demands it.
|
|
105
|
+
- **Scope is the contract.** In scope and Out of scope make the boundary reviewable at a glance.
|
|
106
|
+
- **Describe the behaviour, not the implementation.** The ticket owns the what and why; the implementer owns the how.
|
|
107
|
+
- **A ticket must stand alone.** Link, don't copy — readers who need the full rationale open the linked document, not a paraphrase.
|
|
81
108
|
|
|
82
109
|
## Cross-skill references
|
|
83
110
|
|
|
84
|
-
| When you need…
|
|
85
|
-
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
89
|
-
## Examples
|
|
90
|
-
|
|
91
|
-
### Vague vs verifiable acceptance criteria
|
|
92
|
-
|
|
93
|
-
| Instead of… | Write… |
|
|
94
|
-
|---|---|
|
|
95
|
-
| "The export feature works" | "Given exports enabled, selecting 'Export CSV' downloads `<account>-export-<date>.csv`" |
|
|
96
|
-
| "Adds tests for the new endpoint" | "POST /v1/orders returns 201 with the created order for valid input and 422 with field errors for schema violations" |
|
|
97
|
-
|
|
98
|
-
### Context that links vs context that copies
|
|
111
|
+
| When you need… | Use this skill |
|
|
112
|
+
| ------------------------------------------------------- | ----------------- |
|
|
113
|
+
| To break a spec into a map of tickets | `spec-to-tickets` |
|
|
114
|
+
| Tone, structure, and concision for human-facing writing | `style-comms` |
|
|
115
|
+
| A requirements document that precedes the ticket | `write-a-prd` |
|
|
99
116
|
|
|
100
|
-
|
|
101
|
-
|---|---|
|
|
102
|
-
| Four paragraphs paraphrasing the ADR | "Follows ADR-014 (token refresh). This ticket adds only the retry path — see ADR link." |
|
|
117
|
+
See [EXAMPLES.md](./EXAMPLES.md) for worked before/after rewrites.
|
|
103
118
|
|
|
104
119
|
## Verification checklist
|
|
105
120
|
|
|
106
|
-
- [ ] Context
|
|
107
|
-
- [ ] Description states the
|
|
108
|
-
- [ ]
|
|
109
|
-
- [ ]
|
|
110
|
-
- [ ]
|
|
111
|
-
- [ ]
|
|
112
|
-
- [ ]
|
|
121
|
+
- [ ] Context points at the parent, the approach, and the dependencies without explaining them
|
|
122
|
+
- [ ] Description states the goal and behaviour and leads into the scope bullets
|
|
123
|
+
- [ ] In scope and Out of scope are explicit, with every bullet a distinct deliverable
|
|
124
|
+
- [ ] Acceptance criteria are independently verifiable and none restate another
|
|
125
|
+
- [ ] Technical notes lead with the entry point and give only decisive facts
|
|
126
|
+
- [ ] Testing approach and Technical notes appear only when they add non-obvious information
|
|
127
|
+
- [ ] Every section is within its guidance budget, or the extra is justified by the work
|
|
128
|
+
- [ ] Any open question is one the human explicitly agreed to, listed under `Open questions` with an owner
|
|
129
|
+
- [ ] A skilled engineer can start immediately with zero follow-up questions
|
|
130
|
+
- [ ] The human reviewed the drafted body before it was created
|