✨ feat: an ask reaches the owner as a page, and needs-owner keeps itself

Merged
AT
25d ago
+1402-28

Slice: #99

Builds State #176 of P-40. The owner approved this as athya_mono 0156 S-2 (athya-hq/athya_mono#3303) by labelling Work item athya-hq/athya_mono#3301 approved on 2026-11-07; decision 3 of the spec page (version 6) puts "the GitHub comment check and the label job" here. Since 24 Oct, 41 of 43 Proposal: comments in athya_mono linked no page.

What changes

  • process-rules guard reads each comment an agent session posts or edits through gh: gh issue comment, gh pr comment, and gh api on a comments endpoint or in a GraphQL comment mutation. The body can be inline, a heredoc, $(cat file), --body-file, -F body=@file or --input. A body that asks the owner is refused, with the rule and the fix, if it links no https://claude.ai/artifact/… or https://claude.ai/code/artifact/… page or runs over 500 characters. A body asks the owner when it opens with Needs you: or Proposal: (Markdown emphasis before the word is ignored) or names an owner login. A body the guard can't fully read, such as a variable, is judged by the part it spells out. It's refused only when that part asks the owner or the body opens with the unknown part.
  • process-rules propose is left alone. It posts its own generated text through GitHub's API, not through gh, so the guard never sees it.
  • process-rules needs-owner is a new command, and checks.yml gets a new needs-owner job that runs it:
    • An agent comment opening with Needs you: or Proposal: labels its issue needs-owner.
    • The owner's approved label or Decision: comment takes the label off at once.
    • An hourly sweep (41 * * * *, or a run by hand) takes it off where the owner šŸ‘'d the latest agent ask after its last edit, or wrote Decision: after it.
    • Issues with no agent ask, such as undo issues, are left alone.
  • onboard adds process-rules-asks to a three-job client workflow. That covers the issue_comment and issues triggers, the hourly cron and the job itself. Its if: lets only comments that contain an opening word, the approved label and the hourly cron start a run. The weekly job, and decisions in checks.yml, skip the hourly cron.
  • README and docs/decisions.md record it.

Evidence

pnpm check: 993 tests pass, coverage 99.42% lines and 97.47% branches. Tests that prove the done criteria:

  • src/guard.test.ts, "refuses a long ask that links no page, naming the rule and the fix".
  • src/asks.test.ts, "takes the label off at the owner's Decision: comment, and at their approved label" and the hourly sweep test (šŸ‘ after the last edit clears; an older ask, someone else's šŸ‘ or an edit after the šŸ‘ does not).

The version is not bumped here. The release follows in its own PR.

šŸ¤– Generated with Claude Code


Summary by cubic

An ask to the owner must now arrive as a published claude.ai artifact page of 500 characters or fewer, and a needs-owner label keeps itself on issues where the agent asks the owner.

Guard

  • Reads the comment bodies gh posts (inline, heredoc, $(cat file), --body-file, gh api fields, --input, and a GraphQL body in $name from the field gh passes) via a small shell reader, plus commands inside $(…), backquotes and bash -lc, and refuses one that asks the owner — opening with Needs you: or Proposal:, or naming an owner login — with no artifact link or over 500 characters.
  • Heredoc delimiters are taken as written, inline GraphQL bodies are judged by their body string, a joined --body=$X counts as opening with an unknown part, and gh flags before the subcommand are skipped. A body it can't read in full is judged by what's spelled out; only an ask or a body opening with the unknown part is refused. A comment with no body (editor, prompt, --web) is refused as unreadable; --delete-last posts none. propose posts through the API and is unaffected.

needs-owner

  • New needs-owner command and process-rules-asks job: agent asks label their issue, review-comment asks included; the owner's approved label or Decision: comment takes it off at once.
  • An hourly sweep (and runs by hand) clears it where the owner šŸ‘'d the latest ask after its last edit or wrote Decision: after it; issues with no agent ask are left alone.
  • onboard adds the job, its comment and label triggers, and the hourly cron to three-job workflows; the weekly and decisions jobs skip that cron. A decisions schedule of 41 * * * * is refused.

The version isn't bumped here; the release follows in its own PR.