Commit Graph

24 Commits

Author SHA1 Message Date
irl-dan d3d28297db docs(reactor-cli): make docs-synthesis gateway/classifier inputs explicit
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>
2026-06-07 21:28:30 -07:00
irl-dan f0c71e4d41 fix(reactor-cli): give docs-synthesis accumulators unique facet names
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>
2026-06-07 20:58:41 -07:00
irl-dan 11e87f6ad9 feat(reactor-cli): make docs-synthesis actuator target concrete
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>
2026-06-07 20:47:08 -07:00
irl-dan f3c2d5200b feat(reactor-cli): add docs-synthesis example (merged PRs → docs PR)
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>
2026-06-07 15:08:40 -07:00
irl-dan 04ea91bc8b chore: remove the legacy prose CLI and the separate ### Criteria section
Completes the prose-CLI scrub the spec already documents as shipped: deletes tools/cli (the @openprose/prose-cli Oclif binary + eval harnesses), drops tools/cli from the workspace and lockfile, and removes the separately-authored `### Criteria` section from the reactor and reactor-cli contract loaders (postconditions live solely in `### Maintains`). Updates the accompanying skill tests, changelog, and release docs. Verified green: reactor SDK 458/0/10, reactor-cli 186/1 (pre-existing doctor test), devtools 96/0, skill 413/0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 13:49:49 -07:00
dan d9a7f21eb4 feat(reactor-devtools): re-skin the replay viewer to the OpenProse machine surface (#121)
Re-skin the keyless DevTools replay SPA onto the apps/run design system's
"Reactor monitor" machine surface (DESIGN.md §1/§4 name it as a sanctioned dark
machine surface): a flat charcoal ground, single-voice self-hosted JetBrains
Mono, gold as the one brand accent, 1px hairlines + small radii + one soft
shadow framing, three-dot window chrome, and always-labeled status.

- Machine palette (variable NAMES preserved so app.js + every selector keep
  working; only values changed): --bg #1a1c22 flat (radial gradient removed,
  per "no gradients"), machine-bar chrome bars, machine-fg/dim text, white-alpha
  hairlines.
- Disposition + wake-cause hues mapped to the machine signal palette, kept
  distinct AND labeled (never colour-only): render = machine-ok green,
  active/lit path + per-facet edge-light + cost-fresh + external-wake =
  machine-gold, memo-skip = machine-dim grey, fail = machine red (deepened for
  AA on charcoal), self-tick = labeled violet.
- Self-host JetBrains Mono (400/500/700 woff2, latin subset, ~65KB) under
  src/public/fonts so the machine surface is the real face, offline + keyless.
- Fix copy:public to recurse (fs.cpSync) so the new fonts/ subdir builds and
  ships (the old non-recursive copy threw ENOTSUP on a subdir).

Scope: CSS + index.html + fonts only. No app.js logic changes; all class names
and animation hooks preserved, so replay/scrub/animation behaviour is identical.
Verified: pnpm build + typecheck pass and the built server serves /app.css and
/fonts/*.woff2 (200).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:52:45 -07:00
dan f16f9bf317 feat(examples): cost-tiered agent-observatory + eval-harness Anthropic judge (#119)
A Claude-Code session scanner piped into domain world-state. A cheap classifier
(session-signal) fans per-domain signals into four maintained truths
(decisions-log, eng-backlog, use-case-guide, attention-queue) and a coalesced
dashboard, so cost scales with surprise: a session moves only the domains it
touches; the rest memo-skip.

- 7 contracts + reactor.yml (OpenAI gpt-5.4-mini renders, gpt-5.4 compile),
  inline-flow static fixtures, opt-in real scanner (connectors.cjs.example),
  README + PIPELINE-DESIGN.md.
- Committed replay/ from a captured run (11 rendered, 2 skipped, 0 failed,
  ~38k fresh tokens) so the reactor eval-harness is reproducible.
- eval-harness: additive, env-gated Anthropic judge (JUDGE_PROVIDER=anthropic
  + JUDGE_MODEL, default claude-opus-4-8) via the CLI's native-Anthropic provider
  builder. Default OpenRouter behavior unchanged; REACTOR_OFFLINE still forces
  judges off. Eval result: 2/2 grade A (deterministic + opus judge).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 14:36:59 -07:00
dan 6b49de5221 feat(reactor-cli): route provider: anthropic through native Messages API (#113)
Anthropic's OpenAI-compat endpoint is documented as testing-only and ignores
response_format, so it rejects Reactor's JSON-schema structured outputs with
400 response_format.json_schema.strict. That made `provider: anthropic` a
footgun for the structured compile/render path (compile + render are both
structured, and renders drive tools).

Route the built-in `anthropic` provider through the official @openai/agents
AI-SDK adapter over @ai-sdk/anthropic (native Messages API), where structured
outputs and tools both work. Mechanism:

- ProviderPlan gains a keyless `transport` discriminator (openai-compat |
  anthropic-native); the anthropic built-in resolves to anthropic-native. The
  module stays keyless, so the offline boundary holds.
- live-provider builds an AI-SDK-backed ModelProvider for that transport; every
  other vendor keeps the scoped OpenAIProvider compat path. Both are scoped (no
  global mutation). The compile/run/serve call sites are unchanged.
- doctor --live smokes the native provider for an anthropic project.
- A new gated live test drives a structured render + tool through the native
  adapter (proven live: structured output parsed + tool called); it offline-skips
  like every live test. The reactor BYO live test notes the compat subtest is
  plain-text reachability only.

Bundles @openai/agents-extensions, ai, @ai-sdk/anthropic as CLI deps so an
installed reactor needs no extra setup. reactor-cli 0.2.1 -> 0.2.2.
2026-06-03 12:12:45 -07:00
dan 0061ca35f1 feat(reactor-cli): configurable LLM provider + accurate cost labels (#109)
Reactor was hard-wired to OpenRouter on the CLI (only OPENROUTER_API_KEY was
ever read), stranding users holding OpenAI / Anthropic / Google keys. The SDK
already supported a scoped provider; this makes it real and elegant at the CLI.

reactor-cli (0.2.0 -> 0.2.1):
- reactor.yml model.provider now switches the live provider; built-ins
  openrouter|openai|anthropic|google resolve their endpoint + key env, and any
  OpenAI-compatible vendor works via model.base_url + model.api_key_env.
- A keyless ProviderPlan resolver + a model-bearing OpenAIProvider factory
  (reached only past the dynamic-import offline boundary), threaded into compile
  sessions and the run/serve render (incl. the configured render_model, which
  the run phase previously ignored).
- doctor reports the configured provider's key (not only OPENROUTER_API_KEY) and
  doctor --live smokes the configured endpoint; a missing key fails non-zero with
  the exact env var (never misdirects to OpenRouter, never exits 0).
- Tests: ProviderPlan resolver + a hermetic missing-key compile.

reactor (0.3.0 -> 0.3.1):
- Receipt Cost now reports the real provider + model instead of a hardcoded
  openrouter / gemini-3.5-flash (cost-only labels, never fingerprinted). New
  optional RunProjectRender.providerLabel + CostLabels.
- Tests: cost-labels + a key-gated bring-your-own-provider live smoke.

Build: each reactor package cleans its output dir before tsc, so local
incremental builds cannot accumulate orphaned dist test artifacts.

Known limitation: Anthropic's direct OpenAI-compat endpoint rejects our
structured-output response_format unless strict:true; route Anthropic models
through OpenRouter today (documented).
2026-06-02 23:15:00 -07:00
dan 288dd83780 feat(reactor-cli): anonymous opt-out CLI-only telemetry (#107)
CLI-only, content-free, opt-out telemetry reusing the live POST /analytics backend (context.library + reactor.* discriminator). Zero SDK changes, zero new deps. 174 tests pass.
2026-06-02 19:02:14 -07:00
irl-dan 8280b06db5 fix(release): add repository field to reactor-cli + reactor-devtools
npm --provenance validates package.json repository.url against the GitHub repo
from the OIDC attestation; these two lacked the field (reactor had it), so
publish failed E422 after reactor@0.3.0 already published. Additive metadata only.
2026-06-02 14:13:14 -07:00
dan f12dcda4d8 Release: the OpenProse Reactor harness (engine + CLI + devtools) — 0.3.0 ideal API surface (#106)
Ships @openprose/reactor 0.3.0, @openprose/reactor-cli 0.2.0, @openprose/reactor-devtools 0.2.0: the Reactor harness (compile-once-intelligent then dumb reconciler, content-addressed receipts, cost scales with surprise) with the distilled ideal public API — curated front door, full @openai/agents passthrough, one typed handle, one Substrate, unified observe, branded ids, and additive forward seams for the fixpoint.
2026-06-02 14:06:56 -07:00
dan 52724edc11 chore: prepare reactor 0.1.0 release (#98) 2026-05-22 19:29:03 -07:00
dan ecc230dd73 chore: cut reactor rc2 release
Prepare the Reactor packages for the interim 0.1.0-rc.2 release.

Narrow the package publish workflow to reactor-v* tags, bump Reactor and Cradle package versions, refresh the Cradle package pin for the rc.2 tarball, and update release-candidate evidence helpers and package docs.
2026-05-22 17:38:16 -07:00
dan 854aad4ec5 docs: sharpen reactor rc2 front door
Sharpen the Reactor front door for the rc.2 cut by adding the flat-tokens 46-vs-92 memoization contrast and updating the repo/package READMEs to lead with the surprise-not-clock hook.
2026-05-22 17:31:46 -07:00
dan 4603db9b19 fix: close reactor rc validation gaps
Closes the five approved post-PR-92 Phase 3 fixes: N13 invariant-6 fail-safe judging, N14 write-ahead fulfillment intent, N2b same-unit Cradle cost control, N17 compile nonzero failures, and N1 Reactor-forward front-door docs.

Verification:
- pnpm --filter @openprose/reactor test -> 154/154 green
- pnpm --filter @openprose/reactor-cradle test -> 121/121 green
- pnpm --filter @openprose/prose-cli test -> 284/284 green
- release verifier node --test suite -> 35/35 green
- pnpm build -> pass
- CI on PR #93 -> green
2026-05-21 22:17:36 -07:00
dan 5cfbac8048 fix: harden reactor rc onboarding and edges
Implements the approved Reactor v0.1 rc hardening set: adoption contract docs, standalone flat-tokens install, runnable SDK snippet, quickstart prereqs/build fix, Cradle scenario export, stable synthetic payload hashes, concurrency-safe pressure writes, and dropped-route diagnostics.
2026-05-21 17:16:50 -07:00
irl-dan 5b4b42be8b Add the OpenProse Reactor harness (v0.1.0)
The Reactor is an evented reconciliation harness for AI-maintained
world state. Cost scales with surprise, not time.

This adds:
- @openprose/reactor — the runtime: content-addressed receipt
  kernel, memoization, dual-clock forecast scheduling, model-authored
  policy compile/recompile/rollback, composition with cycle
  detection, two adapter seams.
- @openprose/reactor-cradle — the deterministic evaluation harness.
- The prose CLI wired to the Reactor (prose compile / serve / status).
- Bundled examples that run end-to-end from a clean checkout.
- The OIDC trusted-publishing CI workflow.

Measured cost thesis (deterministic Cradle scenarios):
  static 24h world  — Reactor 46 fresh : 46 reused / 2 model calls
                      no-memo control  92 : 0
                      naive loop      256 : 0
  event-changing    — Reactor 74 : 74 / 2 model calls
                      no-memo control 148 : 0
                      naive loop      148 : 0

Spec: index/spec/02-ReactorHarness.md (openprose/index).
2026-05-20 22:03:48 -07:00
Raymond Weitekamp f524eefec9 Add prose write authoring workflow (#86)
* std: add prose author workflow

* cli: refresh brace-expansion lockfile

* std: tighten prose author planning

* cli: make prose write self-contained

* cli: align harness smoke with bundled bootstrap

* Make prose write interactive in host

---------

Co-authored-by: irl-dan <97565471+irl-dan@users.noreply.github.com>
2026-05-19 00:20:56 -04:00
dan 2cb079a995 std: add prose contributor program (#75) 2026-05-13 14:26:27 -07:00
dan 012650a201 [codex] Prepare OpenProse 0.12.0 responsibility runtime release (#57)
* Document native runtime skill semantics

* Rename native runtime to responsibility runtime

* Add responsibility runtime compiler skeleton

* Add responsibility compilation IR

* Compile Forme manifests into repository IR

* Serve static repository IR

* Tighten responsibility runtime review gaps

* Introduce OpenProse root model

* Harden OpenProse root resolution

* Add responsibility judge activation

* Add responsibility pressure fulfillment path

* Add repository status inspection

* Make triggers concrete gateway registrations

* Add live responsibility trigger adapters

* Refine responsibility runtime validation

* Harden responsibility runtime freshness

* Tighten responsibility runtime guardrails

* docs: replace skill examples with native repositories

* chore: release v0.12.0

* fix: tighten release review gaps
2026-05-04 09:26:26 -07:00
dan 624e75ad89 Refresh OpenProse skill conventions (#51)
* Refresh OpenProse skill conventions

* Align OpenProse skill with service system conventions

* Fix OpenProse PR review inconsistencies

* Clarify OpenProse state backend loading

* Enforce OpenProse smoke run state gate
2026-05-01 15:06:40 -04:00
irl-dan 2de0b5e7d7 feat(co): add agent-readiness as safe first-run demo program
Narrow intake a founder can run in under a minute. Three prompts, one
WebFetch batch across a fixed set of well-known paths, one screenshot-ready
markdown report written to ~/prose-<company>/agent-readiness.md.

Scores four dimensions (discoverability, parseability, structure,
api-readiness) 0-100 and surfaces exactly three concrete, file-path-level
fixes. No JavaScript execution, no fetches outside the target origin, no
writes outside the per-company workspace.

Built for the "claude \"prose run co/programs/agent-readiness\"" first
experience: all probes are static well-known paths, so it never fails on
a live JS-wall or a missing API.

Paired eval protects the demo: every finding must ground in a Raw Probe
Results row, every top_fix must name an exact file path, and any
JavaScript execution or cross-origin fetch fails the eval.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 15:27:11 -07:00
irl-dan 63c8ce4b23 Migrate std and co into packages/ monorepo layout
Move the standard library (previously `github.com/openprose/std`) and
the company-as-prose library (previously local dir
`/Users/sl/code/openprose/company-as-prose`) into this repository
under `packages/std/` and `packages/co/` respectively.

Motivation: concentrate attention on one repository so stars,
discussions, and issues aggregate. `openprose/std` was a genuinely
useful asset nobody could find because ~50 stars on its own repo
told a much worse story than 1,106 stars on `openprose/prose`
would have. Same logic applies to co.

Layout choice: `packages/{std,co}/` rather than `std/` + `co/` at
the repo root. Root siblings accumulate over time, and a flat
top-level made future libraries (hub, kit, dev, etc.) compete with
spec infrastructure. `packages/` is bounded — new libraries land
there without cluttering root. Matches pnpm/Deno/monorepo tooling
conventions.

Changes:

- New: `packages/std/` (copied from openprose/std, `.git` excluded)
- New: `packages/co/` (copied from company-as-prose, README updated
  for new name and location)
- `packages/std/README.md`: updated shorthand expansion reference
- `packages/co/README.md`: renamed "company-as-prose" to "co" in
  self-references, added std-vs-co split heuristic, updated
  `prose run` examples to use `co/` shorthand
- `skills/open-prose/deps.md`:
  - `std/` shorthand now expands to
    `github.com/openprose/prose/packages/std/`
  - `co/` shorthand added, expands to
    `github.com/openprose/prose/packages/co/`
  - Both shorthands resolve into the same clone of
    `openprose/prose` under `.deps/github.com/openprose/prose/`;
    `packages/std/` and `packages/co/` are sibling subdirectories
  - `prose.lock` format row updated to `host/owner/repo sha`
    (matches the explicit-host resolution that landed in #35)
  - `.deps/` directory structure example redrawn to show the
    `{host}/{owner}/{repo}/packages/{std,co}/...` shape
  - Error message and Interaction tables refreshed accordingly
  - Resolution Algorithm step 1 now documents both shorthands
- `skills/open-prose/forme.md`: Step 2 resolution list updated to
  include co/ shorthand and the host-keyed `.deps/` layout
- `skills/open-prose/help.md`: Q&A "How do dependencies work?"
  rewritten to name both shorthands and the new explicit-host model
- `skills/open-prose/state/filesystem.md`: `.deps/` directory
  tree re-drawn to include the `{host}/` layer with std/co as
  sibling packages inside the clone
- `skills/open-prose/guidance/patterns.md`,
  `skills/open-prose/guidance/antipatterns.md`: examples now use
  the `std/` shorthand or explicit `github.com/...` rather than
  the deprecated bare `openprose/std/` form
- `skills/open-prose/examples/registry-import/index.md`: sample
  service reference switched to `std/evals/inspector`
- `README.md`: Stdlib badge replaced with internal `packages/std/`
  link plus new `packages/co/` link; "Standard Library" section
  rewritten as "Libraries" with both packages described

Out of scope for this PR (deliberately):
- Tooling changes to `prose install` and Forme's `.deps/` writer
  to adopt the `{host}/{owner}/{repo}/` layout in practice — this
  PR is spec-only. Existing tooling continues to work against
  whatever layout it currently implements; the spec now describes
  the target.
- Retiring the `openprose/std` GitHub repo. Delete that repo
  separately after this merges.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 14:14:31 -07:00