/recoup-plugin:recoup-internal-devfrom Recoup
Writes, maintains, and implements GitHub issues in Recoup's house style — tracking-issue structure, documentation-driven delivery, TDD, PR review hygiene. Use when creating or shipping issues.
Ships in Recoup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
How we write, maintain, and ship GitHub issues at Recoup. Two halves, one loop: Part 1 writes the issue; Part 2 implements it. The bar for an issue: a teammate (or a cold agent) can read it and know exactly what's done, what's left, why each decision was made, and how to verify any claim. The bar for implementation: the docs, the API, and the live preview all tell the same story, and every claim on the PR is something you actually ran.
The two reference issues this skill is built from are chat#1747 (cutover plan) and chat#1767 (post-cutover cleanup). The gold-standard implementation slice is chat#1789 (tracking issue) -> docs-legacy#236 (contract) -> api#653 (implementation).
File every issue in recoupable/app (formerly recoupable/chat, which now redirects there), even when the code lands in api, database, or docs -- one home repo means one place to find open work. Never pick the repo by "where the diff lands"; link out to sibling-repo PRs/files by full ref instead. Wrong repo? gh issue transfer <n> recoupable/app --repo <wrong-repo> preserves body/comments and leaves a redirect.
Use these sections in this order. Drop sections that don't apply; never reorder the ones you keep.
Open -- cleanup + follow-ups, Open -- next up (in merge order), Open -- pre-existing docs gaps (low priority)). See the Open-item format below.main for some time."Any tracker coordinating more than one PR carries this table directly under ## Goal -- the one place a reader (or a cold agent) sees the whole fleet and its state without scanning prose.
Heading is ## PRs (updated <ISO date>) so staleness is visible. Columns:
## PRs (updated 2026-06-25)
| PR | Item | State |
|----|------|-------|
| [docs-legacy#251](url) | `POST /api/emails` send-email contract (OpenAPI + types + nav) | merged 2026-06-25 -- see Done |
| [api#708](url) | `POST /api/emails` endpoint + auth fix | open -- preview-verified end-to-end |
| [api#TBD](#) | rate-limit the send path | not started |
repo#TBD rows so the fleet is visible up front. (All PRs target main; there is no base-branch column.)not started, open -- <verification status>, or merged <ISO> -- see Done (the row stays; the closure note lives under ## Done).Update a row in the same session its PR changes state. Replace #TBD with the live ref the moment the PR opens -- never batch for "when they're all open"; an open PR whose row still says #TBD is drift of the same class as a merged PR without a closure note (caught in practice on chat#1841). Follow the table with a merge-sequencing blockquote when order matters; when everything is one state, say so ("all seven merged and on prod").
Mirror the tracker on the board. The issue is a board task and every row is a task (recoup-internal-board; no needs links). Add the task when you add the row, and move it in the same pass as the row's state.
Items are not closed by flipping - [ ] to - [x]. When an item ships, rewrite it into a closure note and move it under ## Done:
- [x] **chat[#1765](url) -- drop legacy useChatTransport branch + delete app/chat/[roomId]/page.tsx.**
Shipped 2026-06-03 (squash-merged to `main`).
<what actually changed, technically -- 2-4 sentences>.
Verified end-to-end on preview: new chat -> session-scoped URL, transport POSTs
/api/chat/workflow with sessionId+chatId+bearer, assistant streams, legacy route 404s.
Every Done item carries: bold lead-in + PR link, ISO ship date + merge commit, what changed, and a Verified clause stating how you confirmed it and on what (preview/prod, what you clicked, what the response showed). If a hypothesis turned out wrong, say so and link the evidence.
An open item is a mini-spec, not a one-liner. For anything non-trivial, include:
- [ ] **<bold one-line summary>.** (<PR that addresses it, if one exists>)
- **Why:** <root cause or motivation, with file:line if known>
- **Fix:** <concrete steps, numbered if multi-step>
- **Done when:** <observable acceptance criteria -- what you'd check to call it done>
Note explicit blocked-by relationships inline ("No blockers -- unblocked by #1760"). If items have a merge order, say "in merge order; pick from the top."
We follow documentation-driven development: the docs/contract is written and reviewed first, then implemented against. When a unit of work spans repos, sequence the PRs docs -> database -> api/app -- the docs OpenAPI/spec change is the contract the rest fulfills, so it leads even though it's usually independent. Within that, still honor hard dependencies (e.g. a database migration must land before the api code that reads the new table). State the order explicitly in a "Merge sequencing" block and say why each step precedes the next (contract-first vs. hard dependency).
[chat#1765](url), commits by SHA, files by path, source by line range ([source: useArtistsRoster.ts L60-86](url)). A claim without a link is a claim someone has to re-verify.2026-06-03), always.recoupable/api#605) so they resolve from any repo.SONGSTATS_API_KEY, set in Vercel"), not the value. Same for any key handed over in a thread.gh issue edit --body-file -- a file keeps the markdown intact). Manual test results generally go in PR comments, not the issue body.When the plan reverses, record the change so the old reasoning stays auditable -- don't silently rewrite history:
> blockquote under the lead): what changed, who decided + when, and the one-line rationale. Attribution + ISO date matter most for decisions that came from a discussion, not from code.Not every issue is a tracker. A bug report or single-task issue still earns its keep with: a one-line summary, steps to reproduce (or the trigger), expected vs actual, and Done when acceptance criteria. Link the suspected code with file:line. Skip the Goal/Architecture/Phase scaffolding -- that's for multi-PR efforts only. Match the weight of the issue to the weight of the work.
An issue tracks the work to be done, not the business goal that consumes it. Scope it to one layer/change and keep downstream logic that runs after the issue is solved out of scope -- it bloats the issue and muddies what "done" means.
GET /api/research/track/historic-stats", not "annualize catalog -> dashboard value".Only start when the issue is a proper spec -- it should carry a Goal, a proposed contract (endpoint, params, response shape), a merge sequencing block (docs -> api), Done-when acceptance criteria, and source references. If it doesn't, stop and write/upgrade it with Part 1 first. Implementing against a vague issue is how you ship the wrong thing.
1. Read the issue + the ground (contract, Done-when, conventions, the sibling to mirror)
2. Docs first -- the contract (OpenAPI/reference PR; merge target: main)
3. API by TDD, matching the docs (red->green->refactor; PR target: main; links the docs PR)
4. Wait for the preview deployment (poll the PR-head commit until Ready)
5. Test the PR against the preview (every Done-when criterion, against real data)
6. Reconcile docs <-> API <-> live results (live response is ground truth; fix drift)
7. Comment on the PR as you test (results table; triage bot findings)
8. Hand off in merge order (docs -> api; update the issue to Done on merge)
Run it in order. Docs-first and tests-first are not optional -- they are the method.
Keep the team's board current as you go. Load the recoup-internal-board skill alongside this one: the goal gets one thread in the board's code-review channel, and each PR opened (step 3), preview test (step 7) and merge (step 8) gets a post there, in that skill's format.
After every push that changes behavior -- including review fixes, UI tweaks, and follow-up commits on an open PR -- re-run steps 4->7 on that new commit before you say the work is done. Unit tests alone are not enough. Do not hand back "fixed" or "addressed feedback" until the preview for that SHA is Ready, exercised live, and the results (with screenshots for app and marketing UI PRs) are posted on the PR. Skipping preview after a mid-PR change is the same failure mode as shipping untested code.
WebFetch returns an empty JS shell), read it with a browser MCP -- e.g. Chrome DevTools navigate_page then evaluate_script to pull the rendered params/response -- not WebFetch.CLAUDE.md/AGENTS.md (branch rules, test/lint commands, response/validation/auth conventions).Documentation-driven development: the docs/OpenAPI change is the contract, and it merges before the code that fulfills it.
main in docs. Mirror the nearest sibling endpoint's OpenAPI block -- params, reuse existing schemas (DRY), the shared error-response schema, the reference-page frontmatter, and the nav entry (adding the page to docs.json is what surfaces it in the generated llms.txt).json.dumps(json.load(f), indent=2) vs the original); only load->add->dump if it reproduces byte-for-byte -- otherwise (common) insert the new blocks via anchored text edits at brace boundaries so the diff stays purely additive. Either way, re-validate the result parses.main). This is step 1 of the merge order.Branch from main. Mirror the sibling implementation's layering (route -> handler -> validate -> data function -> response shaping; auth; credits).
Red -> green -> refactor, one unit at a time:
__tests__/ (mock dependencies like the sibling tests do).Then: the implementation must match the documented contract exactly (params, response envelope, status codes). Run the full domain test suite (not just your files) to prove no regressions, then tsc --noEmit and lint. Commit, push, open the api PR (base main) -- link the issue and the docs PR, and state the docs->api merge order in the body.
Every time you open a PR (docs, api, or any sibling): update its row in the tracking issue's PR matrix in the same session -- replace the repo#TBD placeholder with the live ref and a open -- <verification status> state. Don't wait until all PRs are open or until merge; an open PR with a #TBD row is tracker drift. Add the PR to the goal's board thread in the same pass (recoup-internal-board).
This step is not one-and-done for the PR. Every time you push a commit that changes runtime behavior or UI, start again here for that commit's SHA -- even if you already preview-tested an earlier SHA on the same branch.
gh api repos/<owner>/<repo>/deployments?sha=<sha> -> its /statuses -> environment_url, or the Vercel CLI (vercel ls <project> --scope <team> / vercel inspect).Ready. Background the poll on long builds; don't block.Turn every Done-when criterion into a live check against the real preview URL (and re-check any criterion your latest push could have regressed -- for UI/positioning changes, measure on mobile and desktop viewports):
app and marketing preview verification; host them in the PR comment (not as commits on the feature branch).The live response is ground truth. Compare it field-by-field and code-by-code against the documented contract:
All three must agree before you call it done. This step is the entire point of the loop -- it's what prevents doc-drift.
code-review thread, with the screenshots attached (recoup-internal-board).main.recoup-internal-board).# Find + confirm the preview for the commit you pushed
gh api repos/recoupable/api/deployments?sha=<SHA> --jq '.[].id'
gh api repos/recoupable/api/deployments/<ID>/statuses --jq '[.[]|select(.state=="success")|.environment_url][0]'
# Run a single test RED->GREEN, then the whole domain + types + lint
pnpm exec vitest run lib/<domain>/__tests__/<unit>.test.ts
pnpm exec vitest run lib/<domain> && pnpm exec tsc --noEmit && pnpm exec eslint <files>
# Test the preview, then post results on the PR
curl -s -w "\nHTTP %{http_code}\n" "<preview>/api/..." -H "x-api-key: <key>"
gh pr comment <n> --repo recoupable/api --body-file results.md
## PRs matrix under ## Goal (PR | Item | State), updated <ISO> heading, every row current as of this session.## Done (PR link, ISO date, merge path, what changed, Verified) -- never a bare [x].#TBD -> live ref + status) in the same session it was opened.tsc + lint all clean.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
132 skills in this plugin
/recoup-catalog-audit-catalogAudit a music catalog's rights, registrations, identifiers, agreements and delivery assets against supplied and accessible evidence. Use for 'audit my catalog', 'check my catalog before a sale', 'find rights or registration gaps', or 'verify this catalog after a transfer'. Produces scoped findings and remediation requirements; does not submit corrections, contact counterparties or reconcile royalty payments./recoup-catalog-estimate-valueEstimate a catalog, album, or song's value from public streaming data alone — no seller files or data room required. Use for "what's this catalog worth from public data", "ballpark this catalog", or "estimate the value of [album/song]". Wider error bars than a seller-file valuation; states its assumptions. For full diligence on a real data room use recoup-catalog-review-deal./recoup-catalog-explain-contractnpx claudepluginhub recoupable/skills --plugin recoup-pluginOther plugins' skills for the same job