โœจ feat: propose posts a short pointer to a published page

Merged
AT
24d ago
+213-78

Slice: #99
State: #236

Builds State #236 of P-40: propose posts a short pointer to a published page, by the guard's own rule for asks. The owner approved it with a ๐Ÿ‘ (page https://claude.ai/artifact/UKSecSCvue9yfwcbA9nHGP).

What changes

  • niyam propose <issue>โ€ฆ --page <url> (or --page=<url>, once per run) posts each Proposal: as three lines: the one-line proposal, Page: <url>, and the owner mention with how to answer (the Approvals batch included where the settings name one). The first #N still names the issue, so ๐Ÿ‘ matching is unchanged.
  • Each body is checked with askProblem (src/asks.ts) before any is posted; a title long enough to push it over 500 characters is refused, naming it.
  • Without --page, a proposal still to be posted is refused, posting nothing, with the command to run: niyam propose N --page <page url>. A --page that is not a whole claude.ai/artifact/โ€ฆ or claude.ai/code/artifact/โ€ฆ link is refused before GitHub is asked anything.
  • Unchanged: no double posts, the needs-owner label and its removal, the batch line, the printed comment URLs. A rerun that only links proposals already posted needs no page.
  • Hints that print niyam propose N add --page <page url>. The guard's comment, the README and docs/decisions.md say the same.

Proved: pnpm typecheck, pnpm test (1162 pass, 0 fail; 99.50% lines, 97.47% branches), pnpm build, pnpm smoke. New tests: both kinds' three-line bodies pass askProblem; refusal without --page (one and two waiting); refusal of four non-page links with no request made; a 450-character title refused; a no-page rerun that only links; --page argument parsing (six bad forms, exit 2).

๐Ÿค– Generated with Claude Code


Summary by cubic

Posts each propose proposal as a short pointer to a published page instead of the full proposal body, matching the guard's rule for owner asks.

  • Each comment is three lines: the proposal, Page: <url> from the new required --page <url> argument (optional in help and hints, since a rerun that only links needs none), and how to answer; the first #N still names the issue, so ๐Ÿ‘ matching is unchanged.
  • Bodies are checked with the guard's own askProblem before posting; a proposal that would exceed 500 characters is refused, posting nothing.
  • Without --page, or with a link that is not a claude.ai/artifact/โ€ฆ or claude.ai/code/artifact/โ€ฆ page, proposals are refused; a missing page prints the command to run, a bad page is refused on its own before GitHub is asked anything.
  • The guard comment, README and docs/decisions.md document the same rule.