pluginrsi-extend
Build new research on top of PluginRSI - write new plugins or seed harnesses, add a benchmark, or change the optimization algorithm (new search stage, selection rule, proposer instructions). Use when the user wants to implement, modify or ablate a harness-optimization method in this repository.
- License 许可
- MIT
- 所属仓库
- syr-cn/PluginRSI
- 最近更新
- 2026-10-18
- Stars
- ★ 61
- Forks
- 1
01 前言 Front Matter
- name
- pluginrsi-extend
- description
- Build new research on top of PluginRSI - write new plugins or seed harnesses, add a benchmark, or change the optimization algorithm (new search stage, selection rule, proposer instructions). Use when the user wants to implement, modify or ablate a harness-optimization method in this repository.
03 SKILL.md 正文
Extend PluginRSI
Mental model (paper §3, Algorithm 1)
A harness H(W, P) is a workflow W (seeds/agents/<task>/v0001/workflow.py) plus a set of
plugins P, chosen in harness.yaml from a plugin library L. Each iteration runs the
stages listed in PHASES (src/pluginrsi/search/loop.py):
plugin_mutation(search/mutation.py):N = offspring_per_phasebranches. Each branch samples a balanced minibatch ofb = feedback_batch_sizeheld-in tasks, and a proposer rewrites one plugin while the workflow and all other plugins stay frozen. If the paired gain over the incumbent is strictly positive, the variant is published toL.harness_recomposition(Search.harness_recomposition): a proposer picks plugins from the updatedLand rewrites the workflow. The candidate is evaluated on the full held-in set and replaces the incumbent only if its score is strictly higher.
Where things live
| Concern | File |
|---|---|
Plugin interfaces (Role, Tool, Skill, Memory) and Task / SolveResult |
src/pluginrsi/contracts.py |
| Runtime contract shown to proposers | src/pluginrsi/prompts/interfaces.md |
Plugin and harness manifests, run config (SearchOptions, EvaluationConfig) |
src/pluginrsi/schemas.py |
| Loading and validating harnesses | src/pluginrsi/loader.py |
| Optimization loop, evaluation budget, proposals, held-out report | src/pluginrsi/search/loop.py |
| Plugin mutation stage | src/pluginrsi/search/mutation.py |
| Stage instructions given to the proposer | src/pluginrsi/prompts/<stage>.md, fitness_contract.md |
| Proposer agent (tools, workspace, evidence) | search/api_proposer.py, text_proposer.py, structured_proposer.py, json_proposer.py |
| Proposal validation rules per stage | search/proposer.py::validate_proposal |
| Benchmark workers | src/pluginrsi/evaluation/worker.py, evaluation/benchmarks/*.py |
| Evaluation scheduling, retries, quality threshold | src/pluginrsi/evaluation/runner.py |
Recipes
New plugin
- Create
seeds/plugin_library/<kind>/<name>/v0001/containing__init__.py,plugin.yamlandimplementation.py. Copy an existing plugin of the same kind as a template (for exampleskill/debugging/v0001). - Fill
plugin.yaml:schema_version: 1,kind,name,version,entrypoint: implementation:<Class>,description,config_schema, andprovenance(label,sources,upstream_assets,adaptation). - Subclass the matching base class in
contracts.py. Use relative imports only, never import another plugin, and avoidhashlib(proposal validation rejects it). Files the plugin reads go next to it and are accessed viaself.services.resource_dir. - Add the plugin to a harness under an alias in
harness.yaml, then runpluginrsi validate --harness <harness_dir> --library seeds/plugin_library.
New seed harness or task
Copy seeds/agents/<task>/v0001/. The workflow class needs
async run(task, runtime, plugins) -> SolveResult; it decides when each plugin alias is
called. Point seed: in the config at the new directory.
New benchmark
- Add the name to
EvaluationConfig.benchmarkinschemas.py. - Implement
async evaluate_<name>(request) -> dictinevaluation/benchmarks/<name>.py. It must runloader.execute(...)on the candidate, write the trajectory towork_dir/trajectory.jsonl, and return{"score": float, "status": ...}.statusis one ofcompleted,solver_limit,infra_errororcandidate_error.infra_errortasks are excluded from accuracy and retried; anycandidate_errorinvalidates the whole evaluation. - Dispatch to it in
evaluation/worker.py. Add any data preparation underscripts/, ship the split ID files underdatasets/<name>/, and add a config inconfigs/. qa_transfer.pyis the simplest complete example; Harbor-based tasks useterminal_bench.py.
Change the algorithm
- New stage: append its name to
PHASES, register a coroutine for it inSearch.phase(), addprompts/<stage>.md, and teachvalidate_proposalandapi_proposer.pywhich files that stage may write. The stage count is derived fromPHASESeverywhere else. - Selection or retention rule: mutation retention is
mutation.paired; incumbent replacement isSearch.admitplusselection.top_w. - Minibatch sampling and branch setup:
mutation.balanced_batchandcreate_branches. - Proposer behaviour: edit the markdown files in
prompts/. Keepfitness_contract.mdtruthful about how candidates are actually scored. - Expose new hyperparameters as fields on
SearchOptionsand annotate them with the paper symbol they correspond to.
Invariants (do not break)
- Held-out tasks never influence selection. They are evaluated for reporting only.
- Published library plugins are immutable. Mutated plugins get the controller-assigned
version
v_<candidate_id>. - Every evaluation goes through
Search.checked_evaluate, which reserves the held-out budget againstmax_task_rollouts. - The search must be resumable. Allocate IDs before any async work, persist records with
write_jsonafter each state change, and make every stage idempotent when re-entered. - Rank candidates only after their evaluation wave finishes, so that completion order cannot decide ties.
Testing without APIs or Docker
Tests run fully offline. tests/test_full_search.py provides config_at (benchmark
fixture), a deterministic Evaluator and a file-writing Proposer. Reuse them for new
search logic and assert on runs/.../iterations/iter_*/<stage>.json. Run
python3 -m pytest -q before finishing. QA tests additionally need
scripts/prepare_hf_data.py qa_transfer to have been run.
04 同仓库更多 Skills
v0001
暂无简介
v0001
暂无简介
v0001
暂无简介
trajectory-to-lesson
Extract a bounded transferable procedure or anti-pattern from a completed trajectory.
test-output-interpretation
Turn noisy command output into a localized failure signature without overclaiming.
symbol-localization
Rank functions, classes, methods, or configuration blocks inside selected files.