feat: harness-driven discretionary dispatch -- read | post | site-work #65

Merged
joshtronic merged 1 commit from feat/discretionary-split-dispatch into master 2026-05-21 23:08:39 +00:00
Owner

Replaces the IGOR_HARNESS_READING_RATE env knob (which only knew
about reading vs not-reading) with a three-way split that lives
in brain at memories/preferences/discretionary-split.md. The
harness reads the weights at the start of each discretionary tick,
samples a mode, and dispatches:

reading -> bin/discretionary-read.sh (existing)
post -> bin/discretionary-post.sh (NEW)
site-work -> claude code with site-work-only directive

If the sampled mode's executor fails (post mode: cooldown active,
reading mode: every source offline/already-read), we fall through
to the next mode in a fixed order rather than failing the tick.

New scripts:

  • bin/agent-post.sh ""
    Direct-API post drafter. Takes a blog idea string, returns JSON
    {title, slug, description, tags, body, pr_body, date, iso}. Loads
    identity.md + website CLAUDE.md for voice and format context.
    Strict-JSON output enforced.

  • bin/discretionary-post.sh
    Orchestrator. Picks a random idea from brain/blog-ideas.md,
    calls agent-post, writes the post file at
    src/posts/YYYY/YYYY-MM-DD-.md with YAML front matter,
    writes .igor/PR_BODY.md with the two-checklist format (so the
    MANDATORY PR_BODY.md warning doesn't fire), and removes the
    used idea from blog-ideas.md so it can't ship twice.

tick.sh dispatch:

  • Removed USED_HARNESS_READING / IGOR_HARNESS_READING_RATE logic.
  • Parses discretionary-split.md, samples mode by weight, builds
    a fallback order, iterates.
  • When falling through to claude code (mode site-work or
    catastrophic harness failure), prefixes the user message with
    "MODE: SITE-WORK" header to constrain Claude away from picking
    shape b or c.
  • When post mode succeeds, sets W_NEW_POST=1 so posts_mark_shipped
    fires (cooldown gets recorded).

Companion brain PR: feat/discretionary-split (already pushed)
ships the split file.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Replaces the IGOR_HARNESS_READING_RATE env knob (which only knew about reading vs not-reading) with a three-way split that lives in brain at memories/preferences/discretionary-split.md. The harness reads the weights at the start of each discretionary tick, samples a mode, and dispatches: reading -> bin/discretionary-read.sh (existing) post -> bin/discretionary-post.sh (NEW) site-work -> claude code with site-work-only directive If the sampled mode's executor fails (post mode: cooldown active, reading mode: every source offline/already-read), we fall through to the next mode in a fixed order rather than failing the tick. New scripts: - bin/agent-post.sh "<idea>" Direct-API post drafter. Takes a blog idea string, returns JSON {title, slug, description, tags, body, pr_body, date, iso}. Loads identity.md + website CLAUDE.md for voice and format context. Strict-JSON output enforced. - bin/discretionary-post.sh <worktree> Orchestrator. Picks a random idea from brain/blog-ideas.md, calls agent-post, writes the post file at src/posts/YYYY/YYYY-MM-DD-<slug>.md with YAML front matter, writes .igor/PR_BODY.md with the two-checklist format (so the MANDATORY PR_BODY.md warning doesn't fire), and removes the used idea from blog-ideas.md so it can't ship twice. tick.sh dispatch: - Removed USED_HARNESS_READING / IGOR_HARNESS_READING_RATE logic. - Parses discretionary-split.md, samples mode by weight, builds a fallback order, iterates. - When falling through to claude code (mode site-work or catastrophic harness failure), prefixes the user message with "MODE: SITE-WORK" header to constrain Claude away from picking shape b or c. - When post mode succeeds, sets W_NEW_POST=1 so posts_mark_shipped fires (cooldown gets recorded). Companion brain PR: feat/discretionary-split (already pushed) ships the split file. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat: harness-driven discretionary dispatch -- read | post | site-work
All checks were successful
Lint / check-sync (push) Successful in 4s
Lint / check-sync (pull_request) Successful in 4s
9826f32d63
Replaces the IGOR_HARNESS_READING_RATE env knob (which only knew
about reading vs not-reading) with a three-way split that lives
in brain at memories/preferences/discretionary-split.md. The
harness reads the weights at the start of each discretionary tick,
samples a mode, and dispatches:

  reading    -> bin/discretionary-read.sh   (existing)
  post       -> bin/discretionary-post.sh   (NEW)
  site-work  -> claude code with site-work-only directive

If the sampled mode's executor fails (post mode: cooldown active,
reading mode: every source offline/already-read), we fall through
to the next mode in a fixed order rather than failing the tick.

New scripts:

- bin/agent-post.sh "<idea>"
  Direct-API post drafter. Takes a blog idea string, returns JSON
  {title, slug, description, tags, body, pr_body, date, iso}. Loads
  identity.md + website CLAUDE.md for voice and format context.
  Strict-JSON output enforced.

- bin/discretionary-post.sh <worktree>
  Orchestrator. Picks a random idea from brain/blog-ideas.md,
  calls agent-post, writes the post file at
  src/posts/YYYY/YYYY-MM-DD-<slug>.md with YAML front matter,
  writes .igor/PR_BODY.md with the two-checklist format (so the
  MANDATORY PR_BODY.md warning doesn't fire), and removes the
  used idea from blog-ideas.md so it can't ship twice.

tick.sh dispatch:

- Removed USED_HARNESS_READING / IGOR_HARNESS_READING_RATE logic.
- Parses discretionary-split.md, samples mode by weight, builds
  a fallback order, iterates.
- When falling through to claude code (mode site-work or
  catastrophic harness failure), prefixes the user message with
  "MODE: SITE-WORK" header to constrain Claude away from picking
  shape b or c.
- When post mode succeeds, sets W_NEW_POST=1 so posts_mark_shipped
  fires (cooldown gets recorded).

Companion brain PR: feat/discretionary-split (already pushed)
ships the split file.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
joshtronic deleted branch feat/discretionary-split-dispatch 2026-05-21 23:08:39 +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!65
No description provided.