✨ feat: P-19 onboard copies the process-rules template Project

Merged
AT
1mo ago
+586-73

Slice: #66

A client's owner runs process-rules onboard, names the owner and the agent, and does nothing by hand on the board. GitHub's API cannot group a view or make a workflow, but it can copy a Project with all of that. So onboard now copies the product's public process-rules template, which the product's owner sets up once.

  • A new Project is a copy of the template (copyProjectV2). onboard waits for the copy's fields, which GitHub adds a few seconds after the copy returns, then links it to the repo. No fields or views questions, and no by-hand checklist.
  • A Project made before the template (its views not grouped) is offered a move to a copy. Its open items, drafts included, move with their Status, Step, Decision and Review date, matching options in any case. The old Project is closed as "
  • A fallback covers GitHub refusing the copy and an owner who keeps the old Project. onboard builds or keeps the Project as P-16 does and prints only the grouping and auto-archive. The Board's columns line is gone, since a new board view already has columns by Status.

Proven live on the sandbox client, as the agent (only the owner-login check stood in for), with the template as it is now:

? "process-rules-sandbox work" lacks what only the process-rules template sets (the views' grouping, the workflows). Replace it with a copy of the template, moving its 3 open items with their Status, Step, Decision and Review date, and close it as "process-rules-sandbox work (old)"? y
✓ moved 3 items to the copy; closed the old Project as "process-rules-sandbox work (old)": https://github.com/orgs/athya-hq/projects/1
✓ Project "process-rules-sandbox work": https://github.com/orgs/athya-hq/projects/5
✓ fields: Step, Decision, Review date
✓ views: Needs you, Board, Work items, Decisions, Reviews due

Read back from the API:

  • Project 5 is linked to the sandbox repo, and its views carry the filters, with Work items grouped by Step and Decisions by Decision.
  • Issue 19 kept Status "In Progress" and Step Build. Issue 20 kept Decision "Needs owner" and Review date 2026-11-07. The draft moved with Status Todo.
  • Project 1 is closed as "(old)".
  • A rerun asked nothing.

Earlier copies (on #66) showed that a copy keeps grouping, views, fields and enabled workflows, including into another owner's account. Marking a Project as a template turned its workflows off, so the template is a plain public Project.

Not proven yet:

  • the template with its workflows turned on (the owner turns them on once) giving copies with them on;
  • a copy made by an owner outside the product's organisation.

Bumps package.json to 0.7.0 and the README's install line. docs/decisions.md records the owner's words and the decision on #22.

pnpm check: 523 tests pass; board.ts 100% lines.

🤖 Generated with Claude Code