feat(reactor-cli): add docs-synthesis example (merged PRs → docs PR) - #131
Open
irl-dan wants to merge 4 commits into
Open
feat(reactor-cli): add docs-synthesis example (merged PRs → docs PR)#131irl-dan wants to merge 4 commits into
irl-dan wants to merge 4 commits into
Conversation
A cost-tiered Reactor example, parallel to agent-observatory, that watches a code repo's merged PRs and opens one PR against the public docs site to keep it current. It is the worked example of the Cost and Context Discipline authoring guidance (the PR→docs shape that guidance was written for): - repo-changes (gateway): folds merged-PR deltas (changed-path list + diffstat, never the full diff). - change-signal (cheap classifier): maps each PR's inline changed paths to per-section doc-impact signals, faceted so an unrelated PR wakes nobody. - five section accumulators (cli/sdk/reactor/reactor-devtools/openprose): each subscribes to its one signal facet and accumulates pending edits (page + why + cited PR); memo-skips at zero cost otherwise. - docs-pr (coalesced actuator): the one effectful node — reads only the pages it edits, drafts the .mdx changes, and opens one PR (git + gh). Dry under REACTOR_OFFLINE or DOCS_SYNTH_DRY_RUN, which is how the replay is produced. Ships static PR fixtures (offline demo) and a git-log connectors.cjs.example (live opt-in). Compile-check passes keyless. The committed replay/ + eval-harness validation is a follow-up keyed run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
docs-pr now operates on the docs clone at $DOCS_SYNTH_DOCS_REPO with explicit git/gh steps (branch docs-synthesis/prs-<cited-PRs>, edit named pages, push, gh pr create). Generic and runnable; the dry-run guard is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
All five section accumulators exposed a facet literally named `pending-edits`, so docs-pr's five requires were ambiguous and the *-pending -> docs-pr edges failed to wire. Rename to cli-pending / sdk-pending / reactor-pending / devtools-pending / openprose-pending (the same distinct-naming discipline agent-observatory uses for unambiguous wiring) and point docs-pr at each. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…icit Point repo-changes at its upstream `inbox.json` (the phantom ingress producer) and forbid git/filesystem inspection; point change-signal at the upstream `changes` records and their `files` field. Clarifies the intended data path — the connector stages PRs into the gateway's ingress, the gateway folds them, the classifier routes by changed path. NOTE (live-run finding): in the current CLI/SDK build the staged ingress inbox does NOT surface as a readable upstream to the gateway render (a render's readable upstream = its mounted inbound edges; the ingress is an unmounted producer), so an LLM gateway cannot actually fold connector arrivals. The canonical agent-observatory example exhibits the same empty result. Filed as feedback; this wording is the correct intent for when that path is wired. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new cost-tiered Reactor example at
packages/reactor-cli/examples/docs-synthesis/, parallel toagent-observatory. It watches a code repo's merged PRs and opens one PR against the public docs site (openprose/docs) to keep it current — the worked example of the Cost and Context Discipline authoring guidance (#126), i.e. the PR→docs shape that guidance was written for.The pipeline
Each of the five public-docs sections subscribes to its own signal facet, so a PR touching only
packages/reactor-cli/**moves#cli-signalonly —cli-docsrenders, the other four memo-skip at zero cost. A test/CI-only PR emits no signal at all. Cost scales with surprise, not with the clock.How it maps to the discipline
change-signalis a narrow classifier (paths → signals), not a summarizer.### Invariantsforbid running git / reading the repo. They emit pointers, not diffs. Each accumulator carries its section's fixed page list in-contract.docs-pris the one render whose job is to act (the Tenet-2 caveat): it may read the specific pages it edits and the cited PRs, still bounded, and fires only when a pending-edit facet moved.replay/+ eval-harness (deterministic selective-wake check + opt-in judge panel).Section → source mapping
#cli-signalcli/packages/reactor-cli/**#sdk-signalsdk/packages/reactor/**public API surface#reactor-signalreactor/packages/reactor/**harness behavior + concepts#devtools-signalreactor-devtools/packages/reactor-devtools/**#openprose-signalopenprose/skills/open-prose/**,references/*.mdInput
reactor.ymlchosen to exercise selective wake — CLI-only (docs(examples): add top-level forwarding README so /tree/main/examples resolves #101), CLI+SDK (feat(evals): reactor harness evaluation suite (phase 1b) #102), openprose (docs: v0.1 launch surface — article, technical report, tagline qualifier #103), and a test-only no-op (feat(packaging): v0.1 npm headline demo — exports + example [parked: needs RC-verification update] #104).connectors.cjs.examplereadsgit log --first-parenton the watched repo (no GitHub token), keyedgithub.Status / follow-up
reactor compile --checkpasses keyless; all contracts and the connector fixtures parse.examples.test.tsfake-provider gate (that single-facet seam doesn't fit a multi-node pipeline) — validation is the committedreplay/+ eval-harness.replay/requires a one-time keyed run (compile+servewithDOCS_SYNTH_DRY_RUN=1so the actuator stays dry). Not included here — a guarded follow-up.🤖 Generated with Claude Code