mirror of
https://github.com/openprose/prose.git
synced 2026-09-19 05:55:05 +08:00
4bc41a93bb
Get the Reactor packages mergeable + publishable and the launch surfaces coherent. CI / publish (ci-reactor-package.yml): - Drop the deleted reactor-cradle from the workflow and remove the obsolete .mjs release-gate suite (.github/scripts/*reactor*.mjs + tests) entirely. - Add per-package pack + publish jobs for @openprose/reactor, @openprose/reactor-cli, and @openprose/reactor-devtools (idempotent, version-from-package.json, reactor-v* tag-gated, provenance). The two CLI packages now have a release path. - Fix the dangling cradle reference in tools/cli build-release-tarball.mjs; regenerate pnpm-lock.yaml. Install / first-run: - reactor-cli: @openprose/reactor moved peer -> dependency (a global install now pulls the SDK); @openai/agents + zod become optional peers (keyless install stays light). - SDK README: replace non-existent *V0 imports with the real exports (verifyReceipt / LedgerReceipt / inspectReceiptProof / projectReceiptProof). - CLI README + http-server comment: correct the trigger route to POST /trigger/<node>. Front-door + taxonomy: - Promote the Reactor-forward launch README; add the technical report at docs/reactor/v0.1/report.md (replacing the stale v0.1). - Migrate SKILL.md and all packages/std + packages/co contracts off the retired taxonomy (kind: service -> function, kind: system deleted, ### Ensures -> ### Maintains, ### Criteria/### Services folded) onto the Reactor model. Prune the dead cradle-importing examples: drop flat-tokens and release-readiness/reactor-package-example (keeping release-readiness/src, which is tested). Gates: build, test:reactor:offline, test:examples (10/0), test:skill (252/252) all green offline. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
std/patterns
Reusable OpenProse patterns (kind: pattern) for coordination, flow, review, synthesis, and measurement. Patterns are instantiated at compile time by a contract that binds their slots and expanded into nodes; they are not run directly.
Instantiation
A contract instantiates a pattern with a structured YAML entry that binds its slots; Forme expands the instance into the resolved graph at compile time:
- name: reviewed-output
pattern: std/patterns/worker-critic
with:
worker: writer
critic: reviewer
config:
max_rounds: 3
pattern:names a file in this directory without the.prose.mdsuffixwith:binds slots to functions, responsibilities, or nested pattern instancesconfig:sets operational parameters such as limits, thresholds, and modes- Pattern files define
### Slots,### Config,### Invariants,### Requires,### Maintains, and### Delegation ### Delegationdescribes the pattern algorithm in fencedprose; the VM executes it only after a contract instantiates the pattern and binds its slots.
Quality Loops
| Pattern | Slots | Use when you need to... |
|---|---|---|
| worker-critic | worker, critic | Produce work, evaluate it, and retry until accepted or the round budget is exhausted |
| refine | refiner, evaluator | Improve an existing result toward a score threshold |
| ratchet | advancer, certifier | Make incremental progress while preserving every certified step |
| retry-with-learning | target | Retry the same target contract with accumulated failure history |
Parallel and Selection
| Pattern | Slots | Use when you need to... |
|---|---|---|
| fan-out | delegates | Run independent delegates in parallel and keep every raw result |
| map-reduce | mapper, reducer | Process chunks independently, then merge every mapper result |
| race | candidates | Try multiple candidates in parallel and accept the first suitable result |
| fallback-chain | chain | Try preferred delegates sequentially, advancing only after failure |
| pipeline | stages | Transform work through ordered stages with clean stage boundaries |
| guard | guard, target | Check a precondition before running an expensive or sensitive target |
Debate and Oversight
| Pattern | Slots | Use when you need to... |
|---|---|---|
| proposer-adversary | proposer, adversary | Generate a proposal and independently stress-test it |
| dialectic | thesis, antithesis | Preserve an exchange between opposing positions without forcing resolution |
| ensemble-synthesizer | ensemble_member, synthesizer | Collect independent attempts and synthesize across disagreement |
| oversight | actor, observer, arbiter | Separate action, observation, and decision across independent slots |
Measurement and Probe
| Pattern | Slots | Use when you need to measure... |
|---|---|---|
| blind-review | reviewer, comparator | Cross-tier comprehension divergence in material or instructions |
| stochastic-probe | probe, analyst | Variance across repeated runs with identical inputs |
| assumption-miner | miner, comparator | Hidden assumptions and unstated dependencies |
| coherence-probe | reader, sync_analyst | Drift between two corpora that should describe the same system |
| contrastive-probe | measurement, ranker | Which of two candidates scores better on another measurement pattern |
Choosing Similar Patterns
| If you are choosing between... | Prefer this when... |
|---|---|
fan-out and map-reduce |
Use fan-out when the caller needs every raw result; use map-reduce when one merged artifact is required |
race and fallback-chain |
Use race when parallelism is worth the cost; use fallback-chain when later candidates should run only after earlier ones fail |
retry-with-learning and fallback-chain |
Use retry-with-learning for the same contract with better context; use fallback-chain for different contracts in preference order |
retry-with-learning and refine |
Use retry-with-learning for broken or absent results; use refine for usable results that need quality improvement |
worker-critic and refine |
Use worker-critic when the critic makes an accept/reject judgment; use refine when a continuous score guides improvement |