feat: api-derived commit subjects when PR_BODY is empty #37

Merged
joshtronic merged 1 commit from feat/api-derived-commit-subject into master 2026-05-19 03:19:31 +00:00
Owner

Generic fallback subjects ("chore: discretionary website tick")
were unhelpful in PR titles. Real example: a tick fixed broken
/now page links but the PR ended up titled "chore: discretionary
website tick" because Claude didn't write a PR_BODY.md first
item the harness could use.

New tier-2 fallback: API-direct call to Haiku with the diff,
asking for a one-line conventional-commit subject. Single-shot,
no tool use, ~$0.005 per call, ~1-2s latency. Only fires when
PR_BODY.md is missing or empty -- when Claude writes a good
first item, that's still preferred (free, semantic, in his
voice).

New helper claude_complete does the API call generically:
curl POST /v1/messages, returns text. Reusable for future
in-harness thinking tasks (classification, summarization, etc.).
Model defaults to Haiku via new optional IGOR_MODEL_THINKING
env var; documented in .env.example.

Three-tier subject derivation now:

  1. PR_BODY.md first "What this PR does" item -- preferred
  2. API-generated from diff -- when PR_BODY misses
  3. Hardcoded fallback -- when API also fails

Both tier-1 and tier-3 call sites updated to pass worktree path
so the diff is accessible to the API tier.

Generic fallback subjects ("chore: discretionary website tick") were unhelpful in PR titles. Real example: a tick fixed broken /now page links but the PR ended up titled "chore: discretionary website tick" because Claude didn't write a PR_BODY.md first item the harness could use. New tier-2 fallback: API-direct call to Haiku with the diff, asking for a one-line conventional-commit subject. Single-shot, no tool use, ~$0.005 per call, ~1-2s latency. Only fires when PR_BODY.md is missing or empty -- when Claude writes a good first item, that's still preferred (free, semantic, in his voice). New helper `claude_complete` does the API call generically: curl POST /v1/messages, returns text. Reusable for future in-harness thinking tasks (classification, summarization, etc.). Model defaults to Haiku via new optional IGOR_MODEL_THINKING env var; documented in .env.example. Three-tier subject derivation now: 1. PR_BODY.md first "What this PR does" item -- preferred 2. API-generated from diff -- when PR_BODY misses 3. Hardcoded fallback -- when API also fails Both tier-1 and tier-3 call sites updated to pass worktree path so the diff is accessible to the API tier.
feat: api-derived commit subjects when PR_BODY is empty
All checks were successful
Lint / check-sync (push) Successful in 4s
Lint / check-sync (pull_request) Successful in 3s
41d83ff656
Generic fallback subjects ("chore: discretionary website tick")
were unhelpful in PR titles. Real example: a tick fixed broken
/now page links but the PR ended up titled "chore: discretionary
website tick" because Claude didn't write a PR_BODY.md first
item the harness could use.

New tier-2 fallback: API-direct call to Haiku with the diff,
asking for a one-line conventional-commit subject. Single-shot,
no tool use, ~$0.005 per call, ~1-2s latency. Only fires when
PR_BODY.md is missing or empty -- when Claude writes a good
first item, that's still preferred (free, semantic, in his
voice).

New helper `claude_complete` does the API call generically:
curl POST /v1/messages, returns text. Reusable for future
in-harness thinking tasks (classification, summarization, etc.).
Model defaults to Haiku via new optional IGOR_MODEL_THINKING
env var; documented in .env.example.

Three-tier subject derivation now:
  1. PR_BODY.md first "What this PR does" item -- preferred
  2. API-generated from diff -- when PR_BODY misses
  3. Hardcoded fallback -- when API also fails

Both tier-1 and tier-3 call sites updated to pass worktree path
so the diff is accessible to the API tier.
joshtronic deleted branch feat/api-derived-commit-subject 2026-05-19 03:19:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
joshtronic/igor!37
No description provided.