@greenrenge/skills 0.1.0 → 0.3.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/README.md +84 -23
- package/bin/cli.mjs +414 -123
- package/bin/lib/onboard.mjs +1179 -0
- package/bin/lib/probe.mjs +782 -0
- package/bin/lib/recipes/index.mjs +57 -0
- package/bin/lib/recipes/security-cron.mjs +1140 -0
- package/catalog.json +501 -51
- package/package.json +10 -8
- package/skills/security-remediation-epic/prompt-template.md +87 -20
- package/skills/ticket-orchestrator/SKILL.md +349 -0
- package/skills/ticket-orchestrator/references/proving-the-gates.md +63 -0
- package/skills/ticket-scheme/SKILL.md +144 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ticket-scheme
|
|
3
|
+
description: "Structured PRD → spec → decision-complete ticket planning overlay for orchestrated runs: applies [<epic>] B<batch>/<NN> parallel-batch title prefixes, Base/Agent branch footers on specs and subtickets, a standardised Way-of-work kickoff block on subtickets only, and a decision-completeness gate over to-spec and to-tickets. Use when planning an epic or feature ticket queue for t3-ticket-orchestrator, or when asked to plan batched decision-complete tickets from a PRD or spec."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
version: "1.0"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Ticket Scheme: Spec → Decision-Complete Batched Tickets
|
|
10
|
+
|
|
11
|
+
A repo-agnostic overlay on `to-spec` and `to-tickets` that produces a deterministic,
|
|
12
|
+
parallel-runnable ticket queue ready for `t3-ticket-orchestrator` (or manual execution).
|
|
13
|
+
|
|
14
|
+
Run `to-spec` first to produce the spec, then `to-tickets` for the breakdown under that spec.
|
|
15
|
+
Both stand unchanged except for the five rules below; where they conflict, these rules win.
|
|
16
|
+
|
|
17
|
+
## Repo & Run Contract Slots
|
|
18
|
+
|
|
19
|
+
Read repo-specific values from the invoking prompt, the target repo's `AGENTS.md`, or a
|
|
20
|
+
Run Contract rule (`~/.agents/rules/<repo>-contract.md` / `docs/agents/orchestrator-contract.md`):
|
|
21
|
+
|
|
22
|
+
| Slot | Default when omitted |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `target_branch` | `main` |
|
|
25
|
+
| `implement_command` | `implement` skill |
|
|
26
|
+
| `verify_targets` | Repo's full PR-gating lint / build / test suite |
|
|
27
|
+
| `env_flags` | *(none)* |
|
|
28
|
+
| `triage_labels_doc` | *(none — do not invent labels)* |
|
|
29
|
+
|
|
30
|
+
## Rule 1: Bracket & Batch Prefix on Every Issue Title
|
|
31
|
+
|
|
32
|
+
Every issue title carries `[<epic>] <title>` — both the spec issue and every subticket.
|
|
33
|
+
|
|
34
|
+
- `<epic>` is the planning branch minus the `epic/` prefix (`epic/auth-v2` → `[auth-v2]`),
|
|
35
|
+
or the PRD short slug when no `epic/` branch exists. A child kit planned under
|
|
36
|
+
`epic/<epic>-<kit>` keeps the parent epic's name. Never invent an unrelated name.
|
|
37
|
+
- Every **subticket** title (never the spec's) carries its execution batch before the stable
|
|
38
|
+
ticket number: `[<epic>] B<batch>/<NN>: <title>` (for example,
|
|
39
|
+
`[auth-v2] B2/05: Token refresh middleware`).
|
|
40
|
+
- `B1` holds every ticket with no blockers.
|
|
41
|
+
- A ticket sits in `B<n>` when every direct blocker is in an earlier batch and at least one
|
|
42
|
+
blocker is in `B(n-1)`.
|
|
43
|
+
- One batch is one round of parallel work: every ticket in `B<n>` may run simultaneously
|
|
44
|
+
once `B(n-1)` has merged.
|
|
45
|
+
- `<NN>` is the ticket's stable identifier (its file name and agent-branch slug): if
|
|
46
|
+
re-blocked, a ticket changes its batch number, never `<NN>`.
|
|
47
|
+
|
|
48
|
+
## Rule 2: Standardised Way-of-Work Kickoff on Subtickets Only
|
|
49
|
+
|
|
50
|
+
Every **subticket** ends with the block below (filling in the repo's `verify_targets` /
|
|
51
|
+
`env_flags` from the Run Contract when defined). It is placed immediately after the Rule 4
|
|
52
|
+
branch footer — nothing follows it.
|
|
53
|
+
|
|
54
|
+
The **spec never carries this block.** A spec states what to build, not how an implementer
|
|
55
|
+
runs a ticket.
|
|
56
|
+
|
|
57
|
+
```markdown
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
# Way of work
|
|
61
|
+
1. Load the `implement` skill (`implement_command` from the Run Contract if specified).
|
|
62
|
+
2. Read this ticket file + its referenced spec sections + repo README + `AGENTS.md` rules.
|
|
63
|
+
3. Handle one ticket per session.
|
|
64
|
+
4. Apply `tdd` at pre-agreed seams.
|
|
65
|
+
5. Run the repo's full verify suite (`verify_targets`, with any required `env_flags` from the Run Contract) before finishing.
|
|
66
|
+
6. Run the `code-review` skill on the finished diff.
|
|
67
|
+
7. OCR gate, when `command -v ocr` finds it: run `ocr review --from origin/<Base Branch above> --to HEAD --audience agent --background "<this ticket's title>"`. Fix each finding or record its rejection reason in the handoff, then re-run once. If every LLM request fails (rate limit, auth), report `"OCR gate: not run — <reason>"`; the gate passes only on a completed run.
|
|
68
|
+
8. If the repo defines doc-reconciliation or comment-trimming skills, run them last on the finished diff so docs and comments match the reviewed code.
|
|
69
|
+
9. Finish with the `handoff` skill summarizing commits, verification evidence, and any follow-ups.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Operational Constraints
|
|
74
|
+
- Unless the Run Contract explicitly enables GitHub operations for worker sessions, keep tickets local and do not call `gh` or GitHub APIs from worker sessions (an orchestrator handles tracker updates and the final PR).
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Rule 3: Branch Footer on the Spec
|
|
78
|
+
|
|
79
|
+
Append this footer to the spec (and nothing else — no `# Way of work`):
|
|
80
|
+
|
|
81
|
+
```markdown
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
Base Branch: <base branch>
|
|
85
|
+
Agent Branch: <planning branch>
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- `<base branch>`: the branch this planning branch is cut from (`target_branch` for a
|
|
89
|
+
first-generation epic; the parent `epic/<name>` branch for a child kit).
|
|
90
|
+
- `<planning branch>`: the branch this kit is planned on (`epic/<name>`, or
|
|
91
|
+
`epic/<epic>-<kit-slug>` for a child kit). Cut or verify the branch name before writing
|
|
92
|
+
the footer so no stale branch name is ever copied across kits.
|
|
93
|
+
|
|
94
|
+
## Rule 4: Branch Footer on Every Subticket
|
|
95
|
+
|
|
96
|
+
Every subticket carries this footer immediately before the Rule 2 kickoff block:
|
|
97
|
+
|
|
98
|
+
```markdown
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
Base Branch: <planning branch>
|
|
102
|
+
Agent Branch: agent-<main-spec-name>/<NN>-<slug>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
- `Base Branch` must equal the spec's `Agent Branch`.
|
|
106
|
+
- `Agent Branch` uses `<main-spec-name>` from the parent spec, `<NN>` from the ticket id,
|
|
107
|
+
and `<slug>` from the ticket title.
|
|
108
|
+
|
|
109
|
+
## Rule 5: Decision-Complete Tickets — Always, No Detail Knob
|
|
110
|
+
|
|
111
|
+
Every ticket closes every decision it touches. An undecided detail is silently decided
|
|
112
|
+
mid-flight by a worker thread — drift with extra steps. Trivial tickets naturally stay
|
|
113
|
+
short without needing a "lightweight mode".
|
|
114
|
+
|
|
115
|
+
A ticket is decision-complete when:
|
|
116
|
+
|
|
117
|
+
- Every quantity is pinned: defaults, bounds, thresholds, env var names, file formats, and
|
|
118
|
+
each format's failure modes.
|
|
119
|
+
- Every state set is enumerated: state machines, alive/terminal sets, key derivations, and
|
|
120
|
+
mode rules.
|
|
121
|
+
- Every transitional state names the ticket that removes it.
|
|
122
|
+
- Acceptance criteria cover the negative space — what must *not* exist afterwards (removed
|
|
123
|
+
seams, dead identifiers, prose-only diffs).
|
|
124
|
+
- Any decision that cannot be closed at planning time is explicitly out of scope in the spec
|
|
125
|
+
or split into its own ticket — never left as an open question inside an implementation
|
|
126
|
+
ticket.
|
|
127
|
+
|
|
128
|
+
**Publication test:** Read each ticket as its implementer and ask *"can I make even one
|
|
129
|
+
silently-arguable choice?"* Every "yes" is a hole to close before publishing.
|
|
130
|
+
|
|
131
|
+
## Publish Mode
|
|
132
|
+
|
|
133
|
+
Default to **local-files mode**: write the spec and subtickets under
|
|
134
|
+
`.scratch/<feature-slug>/issues/<NN>-<slug>.md` with every rule above applied verbatim
|
|
135
|
+
(bracket prefixes, batch tags, branch footers, kickoff block) so a later tracker push needs
|
|
136
|
+
zero reformatting. Never invent issue labels outside the repo's documented label set.
|
|
137
|
+
|
|
138
|
+
Publish to GitHub Issues only when **both** hold:
|
|
139
|
+
|
|
140
|
+
1. The user explicitly asks to publish to GitHub in this session, and
|
|
141
|
+
2. `gh` (or a GitHub API token) is available and authenticated.
|
|
142
|
+
|
|
143
|
+
Verify availability before promising a push. If either condition is missing, stay in local
|
|
144
|
+
mode and state why.
|