@ecology91/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
@@ -9,29 +9,29 @@ Developing real applications is hard. Approaches like GSD, BMAD, and Spec-Kit tr
9
9
 
10
10
  These skills are designed to be small, easy to adapt, and composable. They work with any model. They're based on decades of engineering experience. Hack around with them. Make them your own. Enjoy.
11
11
 
12
- ## Quickstart For opencode
12
+ ## Quickstart
13
13
 
14
- 1. Install the skills into opencode from the fork repo:
14
+ 1. Install the skills globally from the fork repo (via [skills.sh](https://skills.sh)):
15
15
 
16
16
  ```bash
17
- npx skills@latest add ecology9191/skills -a opencode
17
+ npx skills@latest add ecology9191/skills -g
18
18
  ```
19
19
 
20
- 2. Or install the published npm package directly:
20
+ 2. Or install from a git checkout or the published npm package:
21
21
 
22
22
  ```bash
23
23
  npx --package @ecology91/skills ecology91-skills
24
24
  ```
25
25
 
26
- 3. For local development on this repo, link the checked-out skills into opencode's global skills directory:
26
+ From a git checkout this symlinks into `~/.agents/skills` so edits in the repo are live. From the published package it copies files instead.
27
27
 
28
- ```bash
29
- ./scripts/link-skills.sh
30
- ```
28
+ 3. Force a copy install from a checkout with `--copy`.
29
+
30
+ OpenCode auto-loads `~/.agents/skills` alongside its own config tree, so one global install works across harnesses.
31
31
 
32
- 4. Quit and restart opencode so it reloads the skill list.
32
+ 4. Quit and restart your agent so it reloads the skill list.
33
33
 
34
- 5. Run `/setup-agent-skills` in opencode. It will:
34
+ 5. Run `/setup-agent-skills` in your coding agent. It will:
35
35
  - Ask you which issue tracker you want to use (GitHub, GitLab, Beads, `.scratch`, or another workflow)
36
36
  - Ask you what labels you apply to issues when you triage them (`/triage` uses labels)
37
37
  - Ask you where you want to save any docs we create
@@ -156,7 +156,7 @@ Skills I use daily for code work.
156
156
  - **[tdd](./skills/engineering/tdd/SKILL.md)** — Test-driven development with a red-green-refactor loop. Builds features or fixes bugs one vertical slice at a time.
157
157
  - **[to-issues](./skills/engineering/to-issues/SKILL.md)** — Break any plan, spec, or PRD into independently-grabbable issues on the project issue tracker using vertical slices.
158
158
  - **[to-prd](./skills/engineering/to-prd/SKILL.md)** — Turn the current conversation context into a PRD and submit it to the project issue tracker. No interview — just synthesizes what you've already discussed.
159
- - **[to-qa](./skills/engineering/to-qa/SKILL.md)** — Create a local QA To Do session from completed child work under an explicit parent issue.
159
+ - **[to-qa](./skills/engineering/to-qa/SKILL.md)** — Create a local QA To Do session from completed source work under an explicit issue, including older non-parent Beads issues.
160
160
  - **[zoom-out](./skills/engineering/zoom-out/SKILL.md)** — Tell the agent to zoom out and give broader context or a higher-level perspective on an unfamiliar section of code.
161
161
  - **[prototype](./skills/engineering/prototype/SKILL.md)** — Build a throwaway prototype to flesh out a design — either a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route.
162
162
 
package/bin/install.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import { execFileSync } from "node:child_process";
2
3
  import fs from "node:fs";
3
4
  import os from "node:os";
4
5
  import path from "node:path";
@@ -7,46 +8,87 @@ import { fileURLToPath } from "node:url";
7
8
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
8
9
  const buckets = ["engineering", "productivity", "misc"];
9
10
  const args = new Set(process.argv.slice(2));
11
+ const destRoot = path.join(os.homedir(), ".agents", "skills");
12
+ const isGitCheckout = fs.existsSync(path.join(root, ".git"));
13
+ const link =
14
+ args.has("--link") || (isGitCheckout && !args.has("--copy"));
10
15
 
11
16
  if (args.has("--help") || args.has("-h")) {
12
- console.log(`Usage: npx @ecology91/skills [--dry-run]\n\nCopies promoted skills into ~/.config/opencode/skills.`);
17
+ console.log(`Usage: npx @ecology91/skills [--dry-run] [--copy] [--link]
18
+
19
+ Install promoted skills into ~/.agents/skills.
20
+
21
+ From a git checkout, symlinks by default so local edits are picked up live.
22
+ From the published npm package, copies by default.
23
+
24
+ --link Force symlinks (runs scripts/link-skills.sh)
25
+ --copy Force copies instead of symlinks`);
13
26
  process.exit(0);
14
27
  }
15
28
 
16
29
  const dryRun = args.has("--dry-run");
17
- const destRoot = path.join(os.homedir(), ".config", "opencode", "skills");
18
30
 
19
- function copySkill(src, dest) {
20
- if (dryRun) {
21
- console.log(`would install ${path.basename(src)} -> ${dest}`);
22
- return;
31
+ function collectSkills() {
32
+ const skills = [];
33
+
34
+ for (const bucket of buckets) {
35
+ const bucketDir = path.join(root, "skills", bucket);
36
+ if (!fs.existsSync(bucketDir)) continue;
37
+
38
+ for (const entry of fs.readdirSync(bucketDir, { withFileTypes: true })) {
39
+ if (!entry.isDirectory()) continue;
40
+
41
+ const src = path.join(bucketDir, entry.name);
42
+ if (!fs.existsSync(path.join(src, "SKILL.md"))) continue;
43
+
44
+ skills.push([src, path.join(destRoot, entry.name)]);
45
+ }
23
46
  }
24
47
 
25
- fs.rmSync(dest, { recursive: true, force: true });
26
- fs.mkdirSync(path.dirname(dest), { recursive: true });
27
- fs.cpSync(src, dest, { recursive: true, force: true });
28
- console.log(`installed ${path.basename(src)} -> ${dest}`);
48
+ return skills;
29
49
  }
30
50
 
31
- const skills = [];
32
-
33
- for (const bucket of buckets) {
34
- const bucketDir = path.join(root, "skills", bucket);
35
- if (!fs.existsSync(bucketDir)) continue;
51
+ function installCopy(skills) {
52
+ if (!dryRun) fs.mkdirSync(destRoot, { recursive: true });
36
53
 
37
- for (const entry of fs.readdirSync(bucketDir, { withFileTypes: true })) {
38
- if (!entry.isDirectory()) continue;
54
+ for (const [src, dest] of skills) {
55
+ if (dryRun) {
56
+ console.log(`would install ${path.basename(src)} -> ${dest}`);
57
+ continue;
58
+ }
39
59
 
40
- const src = path.join(bucketDir, entry.name);
41
- if (!fs.existsSync(path.join(src, "SKILL.md"))) continue;
60
+ fs.rmSync(dest, { recursive: true, force: true });
61
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
62
+ fs.cpSync(src, dest, { recursive: true, force: true });
63
+ console.log(`installed ${path.basename(src)} -> ${dest}`);
64
+ }
65
+ }
42
66
 
43
- skills.push([src, path.join(destRoot, entry.name)]);
67
+ function installLink(skills) {
68
+ if (dryRun) {
69
+ for (const [src, dest] of skills) {
70
+ console.log(`would link ${path.basename(src)} -> ${dest} (${src})`);
71
+ }
72
+ return;
44
73
  }
74
+
75
+ execFileSync("bash", [path.join(root, "scripts/link-skills.sh")], {
76
+ stdio: "inherit",
77
+ });
45
78
  }
46
79
 
47
- if (!dryRun) fs.mkdirSync(destRoot, { recursive: true });
80
+ const skills = collectSkills();
48
81
 
49
- for (const [src, dest] of skills) copySkill(src, dest);
82
+ if (link) {
83
+ installLink(skills);
84
+ console.log(
85
+ `${dryRun ? "Checked" : "Linked"} ${skills.length} skills to ~/.agents/skills.`,
86
+ );
87
+ } else {
88
+ installCopy(skills);
89
+ console.log(
90
+ `${dryRun ? "Checked" : "Installed"} ${skills.length} skills to ~/.agents/skills.`,
91
+ );
92
+ }
50
93
 
51
- console.log(`${dryRun ? "Checked" : "Installed"} ${skills.length} skills for opencode.`);
52
- console.log("Restart opencode to reload the skill list.");
94
+ console.log("Restart your agent (opencode, Cursor, etc.) to reload the skill list.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecology91/skills",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "opencode agent skills for real engineering workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -35,5 +35,13 @@
35
35
  ],
36
36
  "publishConfig": {
37
37
  "access": "public"
38
+ },
39
+ "scripts": {
40
+ "typecheck": "node --check bin/install.mjs && node --check scripts/verify-package-files.mjs",
41
+ "test": "node bin/install.mjs --dry-run --copy",
42
+ "link-skills": "./scripts/link-skills.sh",
43
+ "build": "node scripts/verify-package-files.mjs",
44
+ "validate:fast": "npm run typecheck && npm run test",
45
+ "validate": "npm run validate:fast && npm run build"
38
46
  }
39
47
  }
@@ -1,11 +1,11 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- # Links promoted skills in the repository to opencode's global skills
5
- # directory, so they can be used from any opencode project.
4
+ # Links promoted skills in the repository to ~/.agents/skills so they are
5
+ # available globally across agent harnesses (opencode, Cursor, etc.).
6
6
 
7
7
  REPO="$(cd "$(dirname "$0")/.." && pwd)"
8
- DEST="$HOME/.config/opencode/skills"
8
+ DEST="$HOME/.agents/skills"
9
9
 
10
10
  # If the destination is a symlink that resolves into this repo, we'd end up
11
11
  # writing the per-skill symlinks back into the repo's own skills/ tree. Detect
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import fs from "node:fs";
3
+ import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
7
+ const pkg = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
8
+
9
+ for (const entry of pkg.files) {
10
+ const target = path.join(root, entry);
11
+ if (!fs.existsSync(target)) {
12
+ console.error(`Missing packaged path: ${entry}`);
13
+ process.exit(1);
14
+ }
15
+ }
16
+
17
+ console.log(`Verified ${pkg.files.length} packaged paths.`);
@@ -11,6 +11,6 @@ Skills I use daily for code work.
11
11
  - **[tdd](./tdd/SKILL.md)** — Test-driven development with a red-green-refactor loop. Builds features or fixes bugs one vertical slice at a time.
12
12
  - **[to-issues](./to-issues/SKILL.md)** — Break any plan, spec, or PRD into independently-grabbable issues on the project issue tracker using vertical slices.
13
13
  - **[to-prd](./to-prd/SKILL.md)** — Turn the current conversation context into a PRD and submit it to the project issue tracker.
14
- - **[to-qa](./to-qa/SKILL.md)** — Create a local QA To Do session from completed child work under an explicit parent issue.
14
+ - **[to-qa](./to-qa/SKILL.md)** — Create a local QA To Do session from completed source work under an explicit issue, including older non-parent Beads issues.
15
15
  - **[zoom-out](./zoom-out/SKILL.md)** — Tell the agent to zoom out and give broader context or a higher-level perspective on an unfamiliar section of code.
16
16
  - **[prototype](./prototype/SKILL.md)** — Build a throwaway prototype to flesh out a design — either a runnable terminal app for state/business-logic questions, or several radically different UI variations toggleable from one route.
@@ -10,7 +10,7 @@
10
10
  ## Language
11
11
 
12
12
  **Order**:
13
- {A concise description of the term}
13
+ {A one or two sentence description of the term}
14
14
  _Avoid_: Purchase, transaction
15
15
 
16
16
  **Invoice**:
@@ -20,27 +20,13 @@ _Avoid_: Bill, payment request
20
20
  **Customer**:
21
21
  A person or organization that places orders.
22
22
  _Avoid_: Client, buyer, account
23
-
24
- ## Relationships
25
-
26
- - An **Order** produces one or more **Invoices**
27
- - An **Invoice** belongs to exactly one **Customer**
28
-
29
- ## Example dialogue
30
-
31
- > **Dev:** "When a **Customer** places an **Order**, do we create the **Invoice** immediately?"
32
- > **Domain expert:** "No — an **Invoice** is only generated once a **Fulfillment** is confirmed."
33
-
34
- ## Flagged ambiguities
35
-
36
- - "account" was used to mean both **Customer** and **User** — resolved: these are distinct concepts.
37
23
  ```
38
24
 
39
25
  ## Rules
40
26
 
41
27
  - **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others as aliases to avoid.
42
28
  - **Flag conflicts explicitly.** If a term is used ambiguously, call it out in "Flagged ambiguities" with a clear resolution.
43
- - **Keep definitions tight.** One sentence max. Define what it IS, not what it does.
29
+ - **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
44
30
  - **Show relationships.** Use bold term names and express cardinality where obvious.
45
31
  - **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
46
32
  - **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
@@ -0,0 +1,123 @@
1
+ # HTML Report Format
2
+
3
+ The architectural review is rendered as a single self-contained HTML file in the OS temp directory. Tailwind and Mermaid both come from CDNs. Mermaid handles graph-shaped diagrams reliably; hand-built divs and inline SVG handle the more editorial visuals (mass diagrams, cross-sections). Mix the two — don't lean on Mermaid for everything, it'll start to look generic.
4
+
5
+ ## Scaffold
6
+
7
+ ```html
8
+ <!doctype html>
9
+ <html lang="en">
10
+ <head>
11
+ <meta charset="utf-8" />
12
+ <title>Architecture review — {{repo name}}</title>
13
+ <script src="https://cdn.tailwindcss.com"></script>
14
+ <script type="module">
15
+ import mermaid from "https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs";
16
+ mermaid.initialize({ startOnLoad: true, theme: "neutral", securityLevel: "loose" });
17
+ </script>
18
+ <style>
19
+ /* small custom layer for things Tailwind doesn't cover cleanly:
20
+ dashed seam lines, hand-drawn-feeling arrow heads, etc. */
21
+ .seam { stroke-dasharray: 4 4; }
22
+ .leak { stroke: #dc2626; }
23
+ .deep { background: linear-gradient(135deg, #0f172a, #1e293b); }
24
+ </style>
25
+ </head>
26
+ <body class="bg-stone-50 text-slate-900 font-sans">
27
+ <main class="max-w-5xl mx-auto px-6 py-12 space-y-12">
28
+ <header>...</header>
29
+ <section id="candidates" class="space-y-10">...</section>
30
+ <section id="top-recommendation">...</section>
31
+ </main>
32
+ </body>
33
+ </html>
34
+ ```
35
+
36
+ ## Header
37
+
38
+ Repo name, date, and a compact legend: solid box = module, dashed line = seam, red arrow = leakage, thick dark box = deep module. No introduction paragraph — straight into the candidates.
39
+
40
+ ## Candidate card
41
+
42
+ The diagrams carry the weight. Prose is sparse, plain, and uses the glossary terms ([LANGUAGE.md](LANGUAGE.md)) without ceremony.
43
+
44
+ Each candidate is one `<article>`:
45
+
46
+ - **Title** — short, names the deepening (e.g. "Collapse the Order intake pipeline").
47
+ - **Badge row** — recommendation strength (`Strong` = emerald, `Worth exploring` = amber, `Speculative` = slate), plus a tag for the dependency category (`in-process`, `local-substitutable`, `ports & adapters`, `mock`).
48
+ - **Files** — monospaced list, `font-mono text-sm`.
49
+ - **Before / After diagram** — the centrepiece. Two columns, side by side. See patterns below.
50
+ - **Problem** — one sentence. What hurts.
51
+ - **Solution** — one sentence. What changes.
52
+ - **Wins** — bullets, ≤6 words each. e.g. "Tests hit one interface", "Pricing logic stops leaking", "Delete 4 shallow wrappers".
53
+ - **ADR callout** (if applicable) — one line in an amber-tinted box.
54
+
55
+ No paragraphs of explanation. If the diagram needs a paragraph to be understood, redraw the diagram.
56
+
57
+ ## Diagram patterns
58
+
59
+ Pick the pattern that fits the candidate. Mix them. Don't make every diagram look the same — variety is part of the point.
60
+
61
+ ### Mermaid graph (the workhorse for dependencies / call flow)
62
+
63
+ Use a Mermaid `flowchart` or `graph` when the point is "X calls Y calls Z, and look at the mess." Wrap it in a Tailwind-styled card so it doesn't feel parachuted in. Style with classDef to colour leakage edges red and the deep module dark. Sequence diagrams work well for "before: 6 round-trips; after: 1."
64
+
65
+ ```html
66
+ <div class="rounded-lg border border-slate-200 bg-white p-4">
67
+ <pre class="mermaid">
68
+ flowchart LR
69
+ A[OrderHandler] --> B[OrderValidator]
70
+ B --> C[OrderRepo]
71
+ C -.leak.-> D[PricingClient]
72
+ classDef leak stroke:#dc2626,stroke-width:2px;
73
+ class C,D leak
74
+ </pre>
75
+ </div>
76
+ ```
77
+
78
+ ### Hand-built boxes-and-arrows (when Mermaid's layout fights you)
79
+
80
+ Modules as `<div>`s with borders and labels. Arrows as inline SVG `<line>` or `<path>` elements positioned absolutely over a relative container. Reach for this when you want the "after" diagram to feel like one thick-bordered deep module with greyed-out internals — Mermaid won't render that with the right weight.
81
+
82
+ ### Cross-section (good for layered shallowness)
83
+
84
+ Stack horizontal bands (`h-12 border-l-4`) to show layers a call passes through. Before: 6 thin layers each doing nothing. After: 1 thick band labelled with the consolidated responsibility.
85
+
86
+ ### Mass diagram (good for "interface as wide as implementation")
87
+
88
+ Two rectangles per module — one for interface surface area, one for implementation. Before: interface rectangle is nearly as tall as the implementation rectangle (shallow). After: interface rectangle is short, implementation rectangle is tall (deep).
89
+
90
+ ### Call-graph collapse
91
+
92
+ Before: a tree of function calls rendered as nested boxes. After: the same tree collapsed into one box, with the now-internal calls shown faded inside it.
93
+
94
+ ## Style guidance
95
+
96
+ - Lean editorial, not corporate-dashboard. Generous whitespace. Serif optional for headings (`font-serif` works well with stone/slate).
97
+ - Colour sparingly: one accent (emerald or indigo) plus red for leakage and amber for warnings.
98
+ - Keep diagrams ~320px tall so before/after sits comfortably side by side without scrolling.
99
+ - Use `text-xs uppercase tracking-wider` for module labels inside diagrams — they should read as schematic, not as UI.
100
+ - The only scripts are the Tailwind CDN and the Mermaid ESM import. The report is otherwise static — no app code, no interactivity beyond Mermaid's own rendering.
101
+
102
+ ## Top recommendation section
103
+
104
+ One larger card. Candidate name, one sentence on why, anchor link to its card. That's it.
105
+
106
+ ## Tone
107
+
108
+ Plain English, concise — but the architectural nouns and verbs come straight from [LANGUAGE.md](LANGUAGE.md). Concision is not an excuse to drift.
109
+
110
+ **Use exactly:** module, interface, implementation, depth, deep, shallow, seam, adapter, leverage, locality.
111
+
112
+ **Never substitute:** component, service, unit (for module) · API, signature (for interface) · boundary (for seam) · layer, wrapper (for module, when you mean module).
113
+
114
+ **Phrasings that fit the style:**
115
+
116
+ - "Order intake module is shallow — interface nearly matches the implementation."
117
+ - "Pricing leaks across the seam."
118
+ - "Deepen: one interface, one place to test."
119
+ - "Two adapters justify the seam: HTTP in prod, in-memory in tests."
120
+
121
+ **Wins bullets** name the gain in glossary terms: *"locality: bugs concentrate in one module"*, *"leverage: one interface, N call sites"*, *"interface shrinks; implementation absorbs the wrappers"*. Don't write *"easier to maintain"* or *"cleaner code"* — those terms aren't in the glossary and don't earn their place.
122
+
123
+ No hedging, no throat-clearing, no "it's worth noting that…". If a sentence could be a bullet, make it a bullet. If a bullet could be cut, cut it. If a term isn't in [LANGUAGE.md](LANGUAGE.md), reach for one that is before inventing a new one.
@@ -44,20 +44,30 @@ Then use the Agent tool with `subagent_type=Explore` to walk the codebase. Don't
44
44
 
45
45
  Apply the **deletion test** to anything you suspect is shallow: would deleting it concentrate complexity, or just move it? A "yes, concentrates" is the signal you want.
46
46
 
47
- ### 2. Present candidates
47
+ ### 2. Present candidates as an HTML report
48
48
 
49
- Present a numbered list of deepening opportunities. For each candidate:
49
+ Write a self-contained HTML file to the OS temp directory so nothing lands in the repo. Resolve the temp dir from `$TMPDIR`, falling back to `/tmp` (or `%TEMP%` on Windows), and write to `<tmpdir>/architecture-review-<timestamp>.html` so each run gets a fresh file. Open it for the user — `xdg-open <path>` on Linux, `open <path>` on macOS, `start <path>` on Windows — and tell them the absolute path.
50
+
51
+ The report uses **Tailwind via CDN** for layout and styling, and **Mermaid via CDN** for diagrams where a graph/flow/sequence reliably communicates the structure. Mix Mermaid with hand-crafted CSS/SVG visuals — use Mermaid when relationships are graph-shaped (call graphs, dependencies, sequences), and hand-built divs/SVG when you want something more editorial (mass diagrams, cross-sections, collapse animations). Each candidate gets a **before/after visualisation**. Be visual.
52
+
53
+ For each candidate, the same template as before, but rendered as a card:
50
54
 
51
55
  - **Files** — which files/modules are involved
52
56
  - **Problem** — why the current architecture is causing friction
53
57
  - **Solution** — plain English description of what would change
54
- - **Benefits** — explained in terms of locality and leverage, and also in how tests would improve
58
+ - **Benefits** — explained in terms of locality and leverage, and how tests would improve
59
+ - **Before / After diagram** — side-by-side, custom-drawn, illustrating the shallowness and the deepening
60
+ - **Recommendation strength** — one of `Strong`, `Worth exploring`, `Speculative`, rendered as a badge
61
+
62
+ End the report with a **Top recommendation** section: which candidate you'd tackle first and why.
55
63
 
56
64
  **Use CONTEXT.md vocabulary for the domain, and [LANGUAGE.md](LANGUAGE.md) vocabulary for the architecture.** If `CONTEXT.md` defines "Order," talk about "the Order intake module" — not "the FooBarHandler," and not "the Order service."
57
65
 
58
- **ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly (e.g. _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
66
+ **ADR conflicts**: if a candidate contradicts an existing ADR, only surface it when the friction is real enough to warrant revisiting the ADR. Mark it clearly in the card (e.g. a warning callout: _"contradicts ADR-0007 — but worth reopening because…"_). Don't list every theoretical refactor an ADR forbids.
67
+
68
+ See [HTML-REPORT.md](HTML-REPORT.md) for the full HTML scaffold, diagram patterns, and styling guidance.
59
69
 
60
- Do NOT propose interfaces yet. Ask the user: "Which of these would you like to explore?"
70
+ Do NOT propose interfaces yet. After the file is written, ask the user: "Which of these would you like to explore?"
61
71
 
62
72
  ### 3. Grilling loop
63
73
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: to-qa
3
- description: Create a local QA To Do session from completed child work under an explicit parent issue. Use when user runs `/to-qa <parent issue>` or asks to turn completed issue work into QA checks.
3
+ description: Create a local QA To Do session from completed work under an explicit source issue, including older non-parent Beads issues. Use when user runs `/to-qa <issue>` or asks to turn completed issue work into QA checks.
4
4
  compatibility: opencode
5
5
  metadata:
6
6
  workflow: sandcastle-ralph-qa
@@ -8,16 +8,18 @@ metadata:
8
8
 
9
9
  # To QA
10
10
 
11
- Use this skill when the user runs `/to-qa <parent issue>`.
11
+ Use this skill when the user runs `/to-qa <issue>`.
12
+
13
+ For Beads, the issue can be a parent with child work, an older cumulative issue, a discovered-from source issue, or a completed standalone issue with no parent-child structure. For structured `.scratch`, the issue is normally a parent with child files.
12
14
 
13
15
  This skill reads completed implementation work from the configured issue tracker and writes a local QA session to QA To Do. It does not mutate tracker issues, pass/fail state, checklist items, evidence, archive state, or deletion state.
14
16
 
15
17
  ## Required Inputs
16
18
 
17
- - An explicit parent issue reference from the user.
19
+ - An explicit source issue reference from the user.
18
20
  - The current repository path.
19
- - A configured issue tracker workflow in `docs/agents/issue-tracker.md`, or explicit child issue references from the user.
20
- - Completed implementation child work only.
21
+ - A configured issue tracker workflow in `docs/agents/issue-tracker.md`, or explicit source issue references from the user.
22
+ - Completed implementation source work only.
21
23
  - Access to the `qa-to-do` MCP server.
22
24
 
23
25
  ## Supported Paths
@@ -25,19 +27,20 @@ This skill reads completed implementation work from the configured issue tracker
25
27
  - Prefer `qa-to-do.run_to_qa_parent` for normal `/to-qa` usage.
26
28
  - Use `qa-to-do.qa_session_create` only when you have manually built a complete, validated QA session payload.
27
29
  - `run_to_qa_parent` currently automates Beads and structured `.scratch` trackers.
30
+ - The `parentIssueId` MCP field is legacy-named. For Beads, pass the requested source issue ID even when it is cumulative or standalone rather than a literal parent.
28
31
  - For GitHub, GitLab, or custom trackers, use the repo-documented parent/child convention to gather completed child work, then call `qa_session_create` with a concrete QA session payload.
29
32
 
30
33
  ## Workflow
31
34
 
32
- 1. Inspect the explicit parent issue in the current repo.
33
- 2. Read `docs/agents/issue-tracker.md` to understand how this repo identifies child work for a parent issue.
34
- 3. Find completed source work only: closed/completed/done Beads child issues, structured `.scratch` child files, or another repo-documented completed-child convention.
35
+ 1. Inspect the explicit source issue in the current repo.
36
+ 2. Read `docs/agents/issue-tracker.md` to understand how this repo identifies completed source work.
37
+ 3. Find completed source work only: closed/completed/done Beads child issues, discovered-from issues, older cumulative or standalone Beads issues, structured `.scratch` child files, or another repo-documented convention.
35
38
  4. Exclude open, blocked, incomplete, or unrelated work and keep those exclusions as warnings for the final report.
36
39
  5. Prefer acceptance criteria, QA notes, and source issue evidence over changed-file inference when creating checks.
37
40
  6. Read commits, changed files, and implementation context only as needed to make checks concrete and human-verifiable.
38
41
  7. Create QA checks with title, runnable steps, expected result, source issue ID, source evidence, stable ID, and fingerprint.
39
42
  8. Call the `qa-to-do` MCP server to create the QA session.
40
- 9. Report the session title, source parent, item count, and warnings.
43
+ 9. Report the session title, source issue, item count, and warnings.
41
44
 
42
45
  ## MCP Usage
43
46
 
@@ -45,7 +48,7 @@ For Beads or structured `.scratch` repos, call `qa-to-do.run_to_qa_parent` with:
45
48
 
46
49
  ```json
47
50
  {
48
- "parentIssueId": "<parent issue id>",
51
+ "parentIssueId": "<requested issue id>",
49
52
  "repoPath": "<absolute repo path>",
50
53
  "repoName": "<optional repo name>",
51
54
  "tracker": "auto"
@@ -54,17 +57,19 @@ For Beads or structured `.scratch` repos, call `qa-to-do.run_to_qa_parent` with:
54
57
 
55
58
  Set `tracker` to `beads` or `scratch` only when the repo or user explicitly requires one. Use `auto` by default.
56
59
 
57
- If `run_to_qa_parent` reports that no supported tracker was detected, multiple trackers require a choice, or no completed child work exists, stop and report the issue clearly. Do not invent QA checks from unrelated closed work.
60
+ If `run_to_qa_parent` reports that no supported tracker was detected, multiple trackers require a choice, or no completed source work exists, stop and report the issue clearly. Do not invent QA checks from unrelated closed work. Do not fail only because a Beads issue has no parent-child children; older Beads issues may be cumulative or standalone.
58
61
 
59
62
  When manually calling `qa_session_create`, the payload must include only completed source work and must preserve source evidence. Do not use it to mutate existing QA To Do state.
60
63
 
61
64
  ## Beads Guidance
62
65
 
63
66
  - If the repo uses Beads and local automation is available, prefer `run_to_qa_parent` with `tracker: "auto"` or `tracker: "beads"`.
64
- - If you must inspect Beads manually, fetch the full child set with `bd list --parent <parent-id> --status all --json --limit 0`.
65
- - Include only child issues whose status is closed, completed, or done according to the repo's Beads vocabulary.
66
- - Read included children with `bd show <child-id> --json` and `bd comments <child-id> --json` when extra evidence is needed.
67
+ - If you must inspect Beads manually, start with `bd show <issue-id> --json`, then fetch parent-child candidates with `bd list --parent <issue-id> --status all --json --limit 0` when the repo supports parent structure.
68
+ - If no parent-child children exist, fetch the full Beads issue set with `bd list --status all --json --limit 0`, look for completed `discovered-from` dependencies that point to the requested issue, then fall back to the requested issue itself when it is closed, completed, or done.
69
+ - Include only source issues whose status is closed, completed, or done according to the repo's Beads vocabulary.
70
+ - Read included source issues with `bd show <issue-id> --json` and `bd comments <issue-id> --json` when extra evidence is needed.
67
71
  - Look for related implementation commits only when issue evidence is not enough to write a concrete QA check.
72
+ - Do not require parent-child relationships for Beads; older Sandcastle/RALPH Beads may be cumulative or standalone.
68
73
  - Do not create, update, label, comment on, close, or claim Beads issues during `/to-qa`.
69
74
 
70
75
  ## Scratch Guidance
@@ -77,9 +82,9 @@ When manually calling `qa_session_create`, the payload must include only complet
77
82
  ## Rules
78
83
 
79
84
  - Do not create checks from open, blocked, incomplete, review-only, or unrelated work.
80
- - Do not create checks from parent PRD text alone; checks must trace to completed implementation child work.
85
+ - Do not create checks from planning or PRD text alone; checks must trace to completed implementation source work.
81
86
  - If there is no completed source work, fail clearly and do not create a session.
82
- - If `docs/agents/issue-tracker.md` does not explain how to find completed children for the parent issue, ask the user for explicit child issue references.
87
+ - If `docs/agents/issue-tracker.md` does not explain how to find completed source work and Beads cumulative/standalone fallback does not apply, ask the user for explicit source issue references.
83
88
  - Do not write vague checks like "verify implementation" or "works as expected".
84
89
  - Do not mutate pass/fail/skip/edit/archive/delete state through MCP.
85
90
  - Do not file, close, claim, label, comment on, or update tracker issues during `/to-qa`.
@@ -4,10 +4,12 @@ description: Compact the current conversation into a handoff document for anothe
4
4
  argument-hint: "What will the next session be used for?"
5
5
  ---
6
6
 
7
- Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save it to a path produced by `mktemp -t handoff-XXXXXX.md` (read the file before you write to it).
7
+ Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
8
8
 
9
- Suggest the skills to be used, if any, by the next session.
9
+ Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
10
10
 
11
11
  Do not duplicate content already captured in other artifacts (PRDs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
12
12
 
13
+ Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
14
+
13
15
  If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.