✨ feat: P-05 onboard sets up the work board

Merged
AL
1mo ago
+501-13

Roadmap P-05, board setup.

onboard now sets up the client's work board through the owner's gh login, after the workflow step and before the test commit. It adds only what is missing, and every change waits for a yes:

  • Issue types, organisation-wide: Work item, Slice, State, Decision, Brief. A personal repository is skipped, since GitHub has issue types for organisations only.
  • Labels on the repo: approved, needs-owner, mechanical, veto, expiring, cannot-run-here. The owner's label is needs-owner, so the product names no person.
  • A Project " work", linked to the repo.
  • Fields on that Project: Step (Frame, Specify, Slice, Build), Decision (Needs owner, Tripped, Decided by the routine) and Review date.
  • A views checklist: Needs you, Board, Work items, Decisions. GitHub's API cannot make Project views.

onboard stops with a named fix in two cases:

  • gh is signed in as someone other than the owner;
  • the gh login lacks project (and admin:org in an organisation). It then prints the exact gh auth refresh command.

Proven in the sandbox repo, run by the owner:

  • all five issue types added to the organisation;
  • six labels added;
  • Project "process-rules-sandbox work" created and linked;
  • three fields added;
  • views checklist printed;
  • test commit "verified: true (valid)" with the agent as committer.

pnpm check: 230 tests pass; coverage 98% lines and branches. The roadmap marks P-05 shipped.

🤖 Generated with Claude Code


Summary by cubic

onboard now sets up the client's work board through the owner's gh login, after the workflow step and before the test commit. It creates only what is missing, with a yes prompt per change, preserves and links a same-titled Project that exists but is not linked to the repo, and marks P-05 shipped.

  • Adds the organisation's issue types (Work item, Slice, State, Decision, Brief; skipped for a personal repository), the repo's labels (approved, needs-owner, mechanical, veto, expiring, cannot-run-here), and a Project " work" linked to the repo with the fields Step, Decision, and Review date.
  • Reads issue types, labels, and Projects across every page, so it never duplicates what a later page holds.
  • Prints a views checklist, since GitHub's API cannot make Project views.
  • Stops with the exact gh auth refresh command when gh is signed in as someone other than the owner or lacks the project (and admin:org in an organisation) scope; a declined step leaves everything from it on unchanged.