Skip to content
joinery / docs
629 words ยท updated 6 hours agoinfrastructure/scripts/src/issue/README.md

๐Ÿ“ issue

Three commands over gh: add files an issue from the terminal, pick branches off one, and brief prints an issue with everything it points at. Ctrl+C at any prompt exits without side effects.

pnpm issue:add                       # four prompts, then gh issue create
pnpm issue:pick                      # choose from the board, branch, assign, move to In Progress
pnpm issue:pick 288 --type=feature   # no prompts โ€” the form agents use
pnpm issue:brief 288                 # or no number, on that issue's branch

Structure

index.ts         dispatches add | pick | brief
add.ts           the filing flow
pick.ts          the pick-and-branch flow
brief.ts         the brief
adapters/        gh, git, files, prompts
domain/          branch names, search matching, pick options, the brief's layout, live-vs-cache choice

The generic gh() wrapper, the file cache and the cancel helper live in ../shared/.

pnpm issue:add

StepWhat it does
ProjectOpen boards plus none. Skipped when there's exactly one
LabelSearchable by name or description, plus none
Title, descriptionOne line each; the description is the whole body
ConfirmYes files it and prints the URL
Pick?Only when on master: yes runs pick for the new issue

No templates, on purpose: this is for issues that would otherwise never get written. The github-issue skill has the templated shapes.

pnpm issue:pick

StepWhat it does
ProjectSkipped when there's exactly one open board
IssueThe board's open issues, searchable by number, title or label
ResumeIf a branch for that issue exists, yes checks it out and stops
Branch type, titlefeature/fix/hotfix/release, and a title pre-filled from the issue
Thengh issue develop (linked on the issue), assign @me, move to In Progress
  • Branches are <type>/<area>/<number>-<slug>. The area is the first app:, package: or infra: label without its prefix, else repo.
  • An open blocked-by link stops the pick; --force skips the check.
  • Assigning and moving the card only warn on failure; the branch stays.
  • When gh is unreachable, pick browses the cached projects and issues, then fails at the branch step.

Picking by number

pnpm issue:pick <number> asks nothing:

FlagDefault
--type=<feature|fix|hotfix|release>From the label: enhancement โ†’ feature, bug โ†’ fix. Otherwise required
--title=<text>The issue title
--project=<board title>The issue's first board
--forceBranch even with an open blocker

Flags take the --name=value form only.

pnpm issue:brief

Prints the issue's state, labels, assignees, board column, body and every comment, then:

SectionFound by
BlockersEvery #n on a Blocked by line, with title and state
Decisionsdocs/decisions/*.md whose issue: is this issue or one the thread mentions, plus ADR 0028-style mentions
Projectsapp:/package:/infra: labels, the branch's area and paths in the text, each with its CLAUDE.md
Docs mentionedPaths under docs/ or .claude/ that exist

With no number, it reads the one in the branch name.

Caching

Projects and labels are cached for 24 h under node_modules/.cache/@joinery/scripts/; --refresh bypasses it. The issue list is always fetched live and cached only as the offline fallback.

Requirements

gh logged in with the project scope (gh auth refresh -s project). Without it add loses the project prompt and pick can't run. Assigning needs repo write access; moving the card needs project write access and the default "Status" / "In Progress" field names.