pen-stack 5.7.0__tar.gz → 5.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pen_stack-5.7.0 → pen_stack-5.9.0}/CHANGELOG.md +69 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/CITATION.cff +1 -1
- {pen_stack-5.7.0 → pen_stack-5.9.0}/PKG-INFO +51 -10
- {pen_stack-5.7.0 → pen_stack-5.9.0}/README.md +50 -9
- {pen_stack-5.7.0 → pen_stack-5.9.0}/benchmarks/genome_writing_bench/SHA256SUMS +1 -1
- {pen_stack-5.7.0 → pen_stack-5.9.0}/benchmarks/genome_writing_bench/tasks.yaml +38 -1
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/oracles/scope_cards.yaml +23 -0
- pen_stack-5.9.0/docs/digital_twin.md +55 -0
- pen_stack-5.9.0/docs/generative_design.md +63 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/__init__.py +1 -1
- pen_stack-5.9.0/pen_stack/agent/orchestrator_live.py +56 -0
- pen_stack-5.9.0/pen_stack/design/__init__.py +14 -0
- pen_stack-5.9.0/pen_stack/design/generate.py +48 -0
- pen_stack-5.9.0/pen_stack/design/pareto.py +70 -0
- pen_stack-5.9.0/pen_stack/design/space.py +85 -0
- pen_stack-5.9.0/pen_stack/oracles/vcell.py +51 -0
- pen_stack-5.9.0/pen_stack/twin/__init__.py +14 -0
- pen_stack-5.9.0/pen_stack/twin/calibrate.py +61 -0
- pen_stack-5.9.0/pen_stack/twin/mechanistic.py +37 -0
- pen_stack-5.9.0/pen_stack/twin/outcome.py +84 -0
- pen_stack-5.9.0/pen_stack/validate/generative_design.py +62 -0
- pen_stack-5.9.0/pen_stack/validate/outcome_prediction.py +76 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack.egg-info/PKG-INFO +51 -10
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack.egg-info/SOURCES.txt +28 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_gen.json +8 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_mech.json +8 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_orch.json +8 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_outcome.json +8 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_pareto.json +8 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_twincal.json +8 -0
- pen_stack-5.9.0/prereg/SHA256_LOCK_ws_vcell.json +8 -0
- pen_stack-5.9.0/prereg/ws_gen.yaml +29 -0
- pen_stack-5.9.0/prereg/ws_mech.yaml +16 -0
- pen_stack-5.9.0/prereg/ws_orch.yaml +26 -0
- pen_stack-5.9.0/prereg/ws_outcome.yaml +19 -0
- pen_stack-5.9.0/prereg/ws_pareto.yaml +28 -0
- pen_stack-5.9.0/prereg/ws_twincal.yaml +20 -0
- pen_stack-5.9.0/prereg/ws_vcell.yaml +20 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pyproject.toml +1 -1
- {pen_stack-5.7.0 → pen_stack-5.9.0}/LICENSE +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/MANIFEST.in +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/bench/run.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/benchmarks/genome_writing_bench/LEADERBOARD.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/benchmarks/genome_writing_bench/README.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/benchmarks/genome_writing_bench/SUBMISSIONS.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/antipeg.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/atlas_families.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/bridge_offtarget_profile.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/capsid_epitope_oracle.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/capsid_sequences.fasta +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/cargo_polish.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/cell_types.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/datasets.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/delivery_constraints.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/delivery_rules.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/delivery_vehicles.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/gates_v3.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/genotoxicity_oracle.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/gsh_validated_heldout.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/intent_weights.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/known_unknowns.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/llm.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/monitor_queries.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/rules/delivery.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/rules/fold.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/rules/multiplex.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/rules/payload.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/rules/reachability.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/safety/hazard_registry.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/safety/policy.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/safety/probes.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/score_axes.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/seroprevalence.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/target_sites.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/universe_crosswalk.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/write_types.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/configs/wtkb_curated.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/data/curated/bridge_offtarget_energetics.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/data/curated/bridge_offtarget_profile_measured.parquet +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/data/curated/gene_coords.parquet +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/data/curated/unified_editor_universe.parquet +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/BACKLOG.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/DEPLOY.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/INFRA.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/MCP.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/RELEASING.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/REPRO.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/agent.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/alphagenome_feasibility.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/benchmark_circularity.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/biosecurity.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/cards/atlas.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/cards/durability.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/cards/safety.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/co_scientist.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/delivery.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/delivery_immunology.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/dissemination.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/environment.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/index.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/mechanistic_constraints.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/oracles.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/positioning.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/private_data_formats.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/quickstart.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/responsible_use.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/rules.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/scope.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/scorecard.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/tutorials/compare-families.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/tutorials/score-deliverability.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/tutorials/where-can-i-write.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/tutorials/which-writer-reaches-locus.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/uncertainty.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/verify.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/world_model.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/writer_verification.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/docs/wtkb.md +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/_resources.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/adapt/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/adapt/finetune.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/adapt/ingest.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/adapt/pipeline.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/adapt/recalibrate.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/adapt/report.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/cite.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/co_scientist.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/epistemic.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/guardrails.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/mcp_server.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/orchestrator.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/pen_agent.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/scope.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/agent/tools.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/build_wtkb.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/crosslink.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/expand.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/schema.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/scorecard.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/universe.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/variant_propose.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/atlas/writer_verify.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/activity.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/cli.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/fold_qc.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/guide_qc.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/ingest.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/offtarget.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/offtarget_energetics.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/ortholog_screen.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/bridge/pipeline.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/cli.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/encode.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/genome.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/ingest_chromatin.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/ingest_integration.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/ingest_safety_annot.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/data/ingest_trip.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/env/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/env/genome_writing_env.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/env/policies.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/graph/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/graph/build.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/graph/cell_types.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/graph/ingest.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/graph/query.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/graph/schema.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/mech/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/mech/classify_atlas.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/mech/whitelist.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/monitor/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/monitor/europepmc.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/monitor/run.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/monitor/triage.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/cache.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/energetics.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/genome.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/protein_design.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/rna.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/schema.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/oracles/structure.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/antipeg_oracle.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/capsid_epitope_oracle.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/cargo.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/cargo_polish.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/delivery.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/delivery_constraints.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/delivery_immunology.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/delivery_vehicles.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/genotoxicity_oracle.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/immune_profile.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/innate_sensing.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/multiplex.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/optimize.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/pipeline.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/report.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/router.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/seroprevalence_oracle.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/planner/target_site.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rag/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rag/index.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rag/llm.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rag/qa.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rules/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rules/evaluators.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rules/loader.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rules/schema.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/rules/solver.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/audit.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/gate.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/policy.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/redteam.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/registry.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/safety/screen.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/score/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/score/recalibrate.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/score/therapeutic.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/server/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/server/api.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/ui/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/ui/app.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/adapt_demo.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/agent_eval.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/bench_adversarial_tasks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/bench_coscientist_tasks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/bench_graph_tasks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/bench_rule_tasks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/bench_trust_tasks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/bench_writetype_tasks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/blind_gsh_discovery.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/cargo_directionality.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/durability_baselines.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/forward_hypotheses.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/guide_qc_demo.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/immune_calibration.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/intent_specification.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/offtarget_energetics_eval.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/out_of_scope_refusal.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/outcome_calibration.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/paper3_benchmark.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/paper4_real_validation.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/paper4_validation.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/safety_screening.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/selective_prediction.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/seq_vs_measured.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/target_site_controls.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/uncertainty_eval.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/ungrounded_baseline.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/within_locus_ranking.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/validate/writer_recovery.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/verify/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/verify/schema.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/verify/service.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/__init__.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/chromatin_seq.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/durability.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/export_tracks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/features.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/gsh_baseline.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/mesh_features.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/ood.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/providers.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/safety.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/structure3d.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/uncertainty.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack/wgenome/writability.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack.egg-info/dependency_links.txt +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack.egg-info/entry_points.txt +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack.egg-info/requires.txt +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/pen_stack.egg-info/top_level.txt +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_phase0.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_phase1_5.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_phase2.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_phase3.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_a.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_atlas.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_b.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_ba.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_ba_v33.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_ba_v45.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_bench.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_c.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_cal.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_calib.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_cite.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_crit.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_ct.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_d.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_e.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_env.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_ep.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_epitope.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_f.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_g.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_genotox.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_graph.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_h.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_immune.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_innate.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_mc.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_mon.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_o.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_peg.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_plan.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_policy.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_profile.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_r.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_redteam.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_route.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_screen.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_seroprev.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_uq.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_v.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/SHA256_LOCK_ws_wv.json +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/paper1.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/paper2.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/paper3.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/paper4.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/phase0.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_a.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_atlas.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_b.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_ba.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_ba_v33.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_ba_v45.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_bench.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_c.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_cal.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_calib.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_cite.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_crit.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_ct.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_d.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_e.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_env.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_ep.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_epitope.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_f.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_g.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_genotox.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_graph.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_h.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_immune.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_innate.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_mc.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_mon.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_o.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_peg.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_plan.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_policy.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_profile.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_r.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_redteam.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_route.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_screen.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_seroprev.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_uq.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_v.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/prereg/ws_wv.yaml +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p1_build_atlas.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p1_build_durability.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p1_export_tracks.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p1_safety_concordance.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p1_train_safety.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p1_validation_report.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p2_build_atlas.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p3_benchmark_report.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p4_genome_scan.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p52_build_genotox_oracle.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/p53_build_epitope_oracle.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/ws_b_report.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/scripts/ws_c_report.py +0 -0
- {pen_stack-5.7.0 → pen_stack-5.9.0}/setup.cfg +0 -0
|
@@ -3,6 +3,75 @@
|
|
|
3
3
|
All notable changes to PEN-STACK are documented here. This file follows
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/) and the program's phase structure.
|
|
5
5
|
|
|
6
|
+
## [5.9.0] - 2026-06-11 - v5.9 release: The Digital Twin (calibrated outcome prediction)
|
|
7
|
+
|
|
8
|
+
**Closed-Loop arc, Cycle 3 of 7.** The missing layer: *what does the cell do after the write?* — predicted with
|
|
9
|
+
calibrated honesty. The twin computes what mechanism allows, adds an in-distribution virtual-cell estimate
|
|
10
|
+
(OOD-gated), screens immune outcome from the v5.6 profile, and is explicit about its boundary at phenotype.
|
|
11
|
+
Workstreams WS-{VCELL,MECH,OUTCOME,CAL}, SHA-locked.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **WS-VCELL** — `pen_stack/oracles/vcell.py` + scope cards `state`/`scgpt`: `predict_response(cell_state,
|
|
15
|
+
perturbation, model)` wraps **Arc STATE** / **scGPT** under the v4.0 `OracleResult` contract. A
|
|
16
|
+
perturbation-response prediction is a **candidate**, OOD-gated (a context outside the documented envelope →
|
|
17
|
+
`extrapolating`), cached/deferred (value `None` when absent — never fabricated). Encodes the field's own result
|
|
18
|
+
(Arc Virtual Cell Challenge): perturbation models don't yet consistently beat naive baselines.
|
|
19
|
+
- **WS-MECH** — `pen_stack/twin/mechanistic.py`: `cassette_expression` = `promoter_strength × copy_number ×
|
|
20
|
+
accessibility` (closed-form steady state); assumptions + scope flags attached; **physics where computable, NOT
|
|
21
|
+
a phenotype**.
|
|
22
|
+
- **WS-OUTCOME** — `pen_stack/twin/outcome.py`: `predict_outcome(design, cell_state)` fuses mechanism +
|
|
23
|
+
in-distribution virtual-cell response + the v5.6 immune profile into one prediction with an interval that
|
|
24
|
+
**widens under OOD**, an immune-outcome dimension, and an explicit **phenotype / in-vivo-magnitude boundary**.
|
|
25
|
+
In-vivo durability may be **conditioned on the grounded pre-existing-NAb axis** (no invented immune numbers);
|
|
26
|
+
`output_kind="candidate"`.
|
|
27
|
+
- **WS-CAL** — `pen_stack/twin/calibrate.py`: `calibrate_outcome(...)` reports calibration **two-sided** — interval
|
|
28
|
+
coverage + a bootstrap CI on the MAE gap vs a naive mean baseline; the twin "beats" naive **only when the CI
|
|
29
|
+
excludes zero**, else the negative is reported verbatim; abstains at `N < 3`.
|
|
30
|
+
- **WS-BENCH** — bench **v0.3.5**: new `outcome_prediction` hard-gate task (`pen_stack/validate/outcome_prediction.py`)
|
|
31
|
+
— the gate is the twin's **honesty properties** (two-sided calibration + OOD widening + immune dimension +
|
|
32
|
+
phenotype out-of-scope), which an overconfident predictor fails by construction; twin-vs-naive skill is reported
|
|
33
|
+
informationally on a labelled synthetic stream (no public perturbation-outcome calibration set exists).
|
|
34
|
+
- Docs: `docs/digital_twin.md`; prereg `ws_{vcell,mech,outcome,twincal}` + SHA locks; deposit `phase_5.9/`.
|
|
35
|
+
|
|
36
|
+
### Notes
|
|
37
|
+
- The twin is a **hypothesis engine, not an oracle of truth**: predictions are candidates with intervals;
|
|
38
|
+
phenotype, in-vivo behaviour, immunogenicity *magnitude*, and durability beyond the computable stay
|
|
39
|
+
scope-flagged. The interval is a heuristic band, **not** a trained conformal interval (no public outcome
|
|
40
|
+
calibration set). Immune-outcome is sourced from v5.6, never invented.
|
|
41
|
+
|
|
42
|
+
## [5.8.0] - 2026-06-11 - v5.8 release: The Live Agent & Generative Designer
|
|
43
|
+
|
|
44
|
+
**Closed-Loop arc, Cycle 2 of 7.** PEN-STACK turns from a *checker* into a grounded *designer*: it generates
|
|
45
|
+
candidate end-to-end writing systems, keeps only those that pass safety + legality + calibration
|
|
46
|
+
(verifier-as-discriminator), and returns the **Pareto frontier** of real tradeoffs — in which immunogenicity-risk
|
|
47
|
+
is, for the first time, a **grounded** axis sourced from the v5.6 profile rather than a placeholder. Workstreams
|
|
48
|
+
WS-{ORCH,GEN,PARETO,BENCH}, SHA-locked.
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
- **WS-GEN** — `pen_stack/design/{space,generate}.py`: `generate_designs(goal|candidates)` PROPOSES candidates
|
|
52
|
+
(`candidate_space` = the validated Phase-3 planner × the compatible delivery palette) and the v3.3 `verify()`
|
|
53
|
+
— now **safety-gated (v5.7)** + legality + calibration + immune-profiled — DISPOSES. A candidate survives only
|
|
54
|
+
if **legal AND safe** (`clear`/`flag`); hazardous (`refuse`/`escalate`) and illegal proposals are **discarded,
|
|
55
|
+
never returned** (the `as_claim()` guard generalised to whole designs). Survivors carry calibrated confidence,
|
|
56
|
+
the v5.6 immune profile, the safety decision, and `output_kind="candidate"` — never asserted to work.
|
|
57
|
+
- **WS-PARETO** — `pen_stack/design/pareto.py`: `pareto_front(designs)` over `(efficiency, durability, safety,
|
|
58
|
+
deliverability, neg_immune_risk, neg_cost)`. **`neg_immune_risk` is grounded by the v5.6 profile** — the
|
|
59
|
+
worst-case per-axis in-scope score with the per-axis uncertainty carried as a band; the profile is never
|
|
60
|
+
collapsed into one number and the in-vivo magnitude stays scope-flagged (`in_vivo_magnitude_unknown`).
|
|
61
|
+
- **WS-ORCH** — `pen_stack/agent/orchestrator_live.py`: `orchestrate(goal)` — plan → generate → call an oracle
|
|
62
|
+
(cache-first/replayable) for a critique signal → dispose via `verify()` → refine. Every number is tool-sourced;
|
|
63
|
+
a seed-locked replay reproduces the trace (replay is the CI default); no fabrication.
|
|
64
|
+
- **WS-BENCH** — bench **v0.3.4**: new `generative_design` hard-gate task (`pen_stack/validate/generative_design.py`)
|
|
65
|
+
— on a frozen mixed pool (benign + hazardous ricin payload + illegal oversize/mRNA-incompatible), the grounded
|
|
66
|
+
designer returns only legal+safe+calibrated+immune-profiled survivors on a grounded-immune-axis Pareto frontier,
|
|
67
|
+
while an ungrounded generator ships hazardous/illegal designs and fails by construction.
|
|
68
|
+
- Docs: `docs/generative_design.md`; prereg `ws_{gen,pareto,orch}` + SHA locks; deposit `phase_5.8/`.
|
|
69
|
+
|
|
70
|
+
### Notes
|
|
71
|
+
- A generated output is a **candidate, never a claim**; novelty is bounded by the oracles' validity and the
|
|
72
|
+
rules' legality, and never asserted to work. The immune-risk Pareto axis is a worst-case **screen** — the
|
|
73
|
+
per-axis v5.6 profile (with its validation labels) remains authoritative; in-vivo magnitude is a known-unknown.
|
|
74
|
+
|
|
6
75
|
## [5.7.0] - 2026-06-11 - v5.7 release: The Guardian (biosecurity / dual-use safety gate)
|
|
7
76
|
|
|
8
77
|
Opens the **Closed-Loop arc (Cycle 1 of 7)**. Before PEN-STACK moves toward "build", it is made **safe by
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pen-stack
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.9.0
|
|
4
4
|
Summary: Open infrastructure for genome writing: the Writable Genome atlas, the Writer Atlas, and the Write Planner.
|
|
5
5
|
Author-email: Anees Ahmed Mahaboob Ali <ahmedaneesm@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -90,12 +90,12 @@ every design against rule-grounded mechanism, reports calibrated confidence, cit
|
|
|
90
90
|
[](https://codecov.io/gh/ahmedanees-m/pen-stack)
|
|
91
91
|
[](LICENSE)
|
|
92
92
|
[](https://www.python.org/)
|
|
93
|
-
[](CHANGELOG.md)
|
|
94
|
+
[](tests/)
|
|
95
95
|
[](https://github.com/astral-sh/ruff)
|
|
96
96
|
[](docker/)
|
|
97
97
|
[](prereg/)
|
|
98
|
-
[](benchmarks/genome_writing_bench/)
|
|
99
99
|
|
|
100
100
|
**Built on five prior, separately published repositories:**
|
|
101
101
|
|
|
@@ -134,6 +134,42 @@ Two questions gate every genome-writing project, and before PEN-STACK no resourc
|
|
|
134
134
|
Everything is built on bulk-downloadable public data, runs on a single GPU, and is validated **blind** against
|
|
135
135
|
a pre-registered, honest baseline before release.
|
|
136
136
|
|
|
137
|
+
## What is new in v5.9 — The Digital Twin (calibrated outcome prediction)
|
|
138
|
+
|
|
139
|
+
v5.9 (**Closed-Loop arc, Cycle 3 of 7**) adds the missing layer — *what does the cell do after the write?* —
|
|
140
|
+
predicted with calibrated honesty. The twin computes what mechanism allows, adds an in-distribution virtual-cell
|
|
141
|
+
estimate (OOD-gated), screens immune outcome from the v5.6 profile, and is explicit about its boundary at
|
|
142
|
+
phenotype. A **hypothesis engine, not an oracle of truth**.
|
|
143
|
+
|
|
144
|
+
| Workstream | What it adds | Result |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| **VCELL** | `oracles/vcell.py` + scope cards `state`/`scgpt` | Arc STATE / scGPT under the OracleResult contract; perturbation prediction is a **candidate**, **OOD-gated**, deferred value never fabricated |
|
|
147
|
+
| **MECH** | `twin/mechanistic.py` | `cassette_expression` = promoter × copy × accessibility (closed form); **physics where computable, NOT a phenotype** |
|
|
148
|
+
| **OUTCOME** | `twin/outcome.py` | fuses mechanism + in-dist VC + v5.6 immune; interval **widens under OOD**; in-vivo durability conditioned on the **grounded NAb axis**; phenotype/in-vivo-magnitude scope-flagged |
|
|
149
|
+
| **CAL** | `twin/calibrate.py` | calibration reported **two-sided** (coverage + MAE-gap-vs-naive bootstrap CI); beats naive **only if CI excludes 0**, else the negative is reported |
|
|
150
|
+
| **BENCH** | bench **v0.3.5** `outcome_prediction` hard gate | gate = the twin's honesty properties (two-sided cal + OOD widening + immune dim + phenotype out-of-scope); an overconfident predictor fails by construction |
|
|
151
|
+
|
|
152
|
+
The interval is a **heuristic band, not a trained conformal interval** (no public perturbation-outcome calibration
|
|
153
|
+
set; Arc's Virtual Cell Challenge shows models don't yet consistently beat naive baselines). See
|
|
154
|
+
[`docs/digital_twin.md`](docs/digital_twin.md) and `prereg/ws_{vcell,mech,outcome,twincal}.yaml`.
|
|
155
|
+
|
|
156
|
+
## What is new in v5.8 — The Live Agent & Generative Designer
|
|
157
|
+
|
|
158
|
+
v5.8 (**Closed-Loop arc, Cycle 2 of 7**) turns PEN-STACK from a *checker* into a grounded *designer*: it
|
|
159
|
+
**generates** candidate end-to-end writing systems, keeps only those that pass safety + legality + calibration
|
|
160
|
+
(**verifier-as-discriminator**), and returns the **Pareto frontier** of real tradeoffs — with immunogenicity-risk
|
|
161
|
+
now a **grounded** axis sourced from the v5.6 profile, not a placeholder.
|
|
162
|
+
|
|
163
|
+
| Workstream | What it adds | Result |
|
|
164
|
+
|---|---|---|
|
|
165
|
+
| **GEN** | `design/{space,generate}.py` | generate → `verify()` discriminates; **hazardous + illegal candidates discarded, never returned**; survivors are calibrated, immune-profiled, `output_kind="candidate"` |
|
|
166
|
+
| **PARETO** | `design/pareto.py` | non-dominated frontier over efficiency/durability/safety/deliverability/**neg_immune_risk**/neg_cost; immune axis = worst-case per-axis from v5.6 (uncertainty band carried, in-vivo magnitude flagged) |
|
|
167
|
+
| **ORCH** | `agent/orchestrator_live.py` | plan → generate → oracle critique (cache-first) → `verify()` → refine; every number tool-sourced; **seed-locked replay reproduces the trace** |
|
|
168
|
+
| **BENCH** | bench **v0.3.4** `generative_design` hard gate | grounded designer keeps only legal+safe+calibrated+immune survivors on a grounded-immune Pareto frontier; an ungrounded generator ships hazardous/illegal designs and fails by construction |
|
|
169
|
+
|
|
170
|
+
A generated output is a **candidate, never a claim**; novelty is bounded by the oracles' validity and the rules'
|
|
171
|
+
legality. See [`docs/generative_design.md`](docs/generative_design.md) and `prereg/ws_{gen,pareto,orch}.yaml`.
|
|
172
|
+
|
|
137
173
|
## What is new in v5.7 — The Guardian (biosecurity / dual-use safety gate)
|
|
138
174
|
|
|
139
175
|
v5.7 opens the **Closed-Loop arc (Cycle 1 of 7)** by making PEN-STACK **safe by construction**: every design
|
|
@@ -579,13 +615,15 @@ pen-stack/
|
|
|
579
615
|
│ │ + v5.6 immune_profile (unified per-axis immune-risk vector; never collapsed)
|
|
580
616
|
│ ├── bridge/ bridge off-target engine (Paper 4): offtarget / fold_qc / guide_qc / pipeline / cli
|
|
581
617
|
│ │ + v3.2 offtarget_energetics (position x substitution; held-out 0.88, ships)
|
|
582
|
-
│ ├── agent/ agentic platform: tools / orchestrator / pen_agent / mcp_server / guardrails; v5.0 co_scientist + cite (multi-strategy, self-critique, cited rationale, scope ledger)
|
|
618
|
+
│ ├── agent/ agentic platform: tools / orchestrator / pen_agent / mcp_server / guardrails; v5.0 co_scientist + cite (multi-strategy, self-critique, cited rationale, scope ledger); v5.8 orchestrator_live (live, cache-replayable, generate→oracle→verify→refine)
|
|
583
619
|
│ │ + v3.2 epistemic (3-tier status) / scope (known-unknowns matcher)
|
|
584
620
|
│ ├── graph/ v4.5 living world-model knowledge graph (schema/build/query/ingest/cell_types); typed provenanced edges; gated living loop (propose-only)
|
|
585
|
-
│ ├── oracles/ v4.0 L1 oracle mesh: OracleResult contract + adapters (genome/structure/protein_design/rna/energetics) over the foundation models; version-pinned cache; v5.2-5.6 delivery-immunology scope cards (delivery_genotoxicity/capsid_epitope/innate_sensing/seroprevalence/antipeg)
|
|
621
|
+
│ ├── oracles/ v4.0 L1 oracle mesh: OracleResult contract + adapters (genome/structure/protein_design/rna/energetics) over the foundation models; version-pinned cache; v5.2-5.6 delivery-immunology scope cards (delivery_genotoxicity/capsid_epitope/innate_sensing/seroprevalence/antipeg); v5.9 vcell (Arc STATE/scGPT, OOD-gated, output_kind=candidate)
|
|
586
622
|
│ ├── rules/ v3.3 machine-readable rules engine (schema/evaluators/loader/solver) over configs/rules/*.yaml
|
|
587
623
|
│ ├── verify/ v3.3 verification service: verify(design) -> Verdict (legal+reasons+confidence+scope; v4.0 writer_critique; v5.1 delivery_profile; v5.6 immune_profile per-axis vector; v5.7 safety SafetyVerdict)
|
|
588
624
|
│ ├── safety/ v5.7 the Guardian: biosecurity/dual-use gate (registry/screen/policy/gate/audit/redteam); runs first in verify(); refuse short-circuits; tamper-evident audit
|
|
625
|
+
│ ├── design/ v5.8 generative designer: space (candidate_space) / generate (verifier-as-discriminator; hazardous+illegal discarded) / pareto (frontier w/ grounded v5.6 immune axis)
|
|
626
|
+
│ ├── twin/ v5.9 digital twin: mechanistic (cassette expression, closed-form) / outcome (fuse mech+vcell+v5.6 immune; OOD widens interval; phenotype-bounded) / calibrate (honest two-sided)
|
|
589
627
|
│ ├── adapt/ local recalibration / private-data adaptation behind a gate (v3.1, WS-F)
|
|
590
628
|
│ ├── env/ v3.4 full Gymnasium environment over router+verifier (genome_writing_env + policies; [env] extra)
|
|
591
629
|
│ ├── monitor/ PEN-MONITOR living database (Europe PMC)
|
|
@@ -596,12 +634,14 @@ pen-stack/
|
|
|
596
634
|
│ │ out_of_scope_refusal / target_site_controls / offtarget_energetics_eval /
|
|
597
635
|
│ │ v3.3 bench_rule_tasks (T12) / v3.4 bench_writetype_tasks + bench_adversarial_tasks (T13-16) + outcome_calibration /
|
|
598
636
|
│ │ v5.6 immune_calibration (proxy-vs-observed; labels each axis validated-or-proxy, two-sided) /
|
|
599
|
-
│ │ v5.7 safety_screening (the Guardian hard-gate: benign 0-false-refusal · hazards refused/escalated · evasions never clear)
|
|
637
|
+
│ │ v5.7 safety_screening (the Guardian hard-gate: benign 0-false-refusal · hazards refused/escalated · evasions never clear) /
|
|
638
|
+
│ │ v5.8 generative_design (verifier-as-discriminator hard-gate: hazardous+illegal discarded; survivors calibrated+immune; grounded-immune Pareto) /
|
|
639
|
+
│ │ v5.9 outcome_prediction (digital-twin hard-gate: two-sided calibration + OOD widening + immune dim + phenotype out-of-scope)
|
|
600
640
|
│ ├── data/ ingestion (genome, chromatin, integration, TRIP, safety annotations)
|
|
601
641
|
│ ├── server/api.py FastAPI REST (atlas, crosslink, writable, plan, bridge, ask)
|
|
602
642
|
│ ├── ui/app.py Streamlit web app (16 pages; v3.2 PEN-Agent shows confidence + epistemic status)
|
|
603
643
|
│ └── cli.py unified CLI
|
|
604
|
-
├── benchmarks/genome_writing_bench/ Genome-Writing Bench v0.3.
|
|
644
|
+
├── benchmarks/genome_writing_bench/ Genome-Writing Bench v0.3.5 (T1-T16 + co_scientist + safety_screening + generative_design + outcome_prediction; tasks / harness / solvers / LEADERBOARD / SHAs)
|
|
605
645
|
├── bench/run.py one-command bench entrypoint (--agent, --verify)
|
|
606
646
|
├── scripts/ reproducible pipeline drivers (p1_*, p2_*, p4_*, p52/p53 delivery-immunology oracle builds, ws_*_report)
|
|
607
647
|
├── configs/ pinned datasets + thresholds + curation (YAML); v3.2 known_unknowns /
|
|
@@ -610,9 +650,10 @@ pen-stack/
|
|
|
610
650
|
│ seroprevalence / antipeg + oracles/scope_cards (+ v5.6 known_unknowns:
|
|
611
651
|
│ cd4_mhcii_help / preexisting_capsid_tcell / complement_carpa);
|
|
612
652
|
│ v5.7 safety/{hazard_registry,policy,probes} (Guardian; function/family/taxon-level only)
|
|
613
|
-
├── prereg/ SHA-locked success criteria (paper1..4 + ws_a..ws_h + v3.2-v5.
|
|
653
|
+
├── prereg/ SHA-locked success criteria (paper1..4 + ws_a..ws_h + v3.2-v5.9 ws_{uq,ep,mc,ba,
|
|
614
654
|
│ r,v,route,env,bench,cal,o,wv,atlas,graph,mon,ct,plan,crit,cite,immune,
|
|
615
|
-
│ genotox,epitope,innate,seroprev,peg,calib,profile,screen,policy,redteam
|
|
655
|
+
│ genotox,epitope,innate,seroprev,peg,calib,profile,screen,policy,redteam,
|
|
656
|
+
│ gen,pareto,orch,vcell,mech,outcome,twincal} + SHA256 locks)
|
|
616
657
|
├── data/curated/ small committed tables (universe, gene coords, measured bridge profile,
|
|
617
658
|
│ v3.2 bridge_offtarget_energetics.json)
|
|
618
659
|
├── data/llm_bench_cache/ 28 cached ungrounded-LLM transcripts (T7, offline/CI replay)
|
|
@@ -15,12 +15,12 @@ every design against rule-grounded mechanism, reports calibrated confidence, cit
|
|
|
15
15
|
[](https://codecov.io/gh/ahmedanees-m/pen-stack)
|
|
16
16
|
[](LICENSE)
|
|
17
17
|
[](https://www.python.org/)
|
|
18
|
-
[](CHANGELOG.md)
|
|
19
|
+
[](tests/)
|
|
20
20
|
[](https://github.com/astral-sh/ruff)
|
|
21
21
|
[](docker/)
|
|
22
22
|
[](prereg/)
|
|
23
|
-
[](benchmarks/genome_writing_bench/)
|
|
24
24
|
|
|
25
25
|
**Built on five prior, separately published repositories:**
|
|
26
26
|
|
|
@@ -59,6 +59,42 @@ Two questions gate every genome-writing project, and before PEN-STACK no resourc
|
|
|
59
59
|
Everything is built on bulk-downloadable public data, runs on a single GPU, and is validated **blind** against
|
|
60
60
|
a pre-registered, honest baseline before release.
|
|
61
61
|
|
|
62
|
+
## What is new in v5.9 — The Digital Twin (calibrated outcome prediction)
|
|
63
|
+
|
|
64
|
+
v5.9 (**Closed-Loop arc, Cycle 3 of 7**) adds the missing layer — *what does the cell do after the write?* —
|
|
65
|
+
predicted with calibrated honesty. The twin computes what mechanism allows, adds an in-distribution virtual-cell
|
|
66
|
+
estimate (OOD-gated), screens immune outcome from the v5.6 profile, and is explicit about its boundary at
|
|
67
|
+
phenotype. A **hypothesis engine, not an oracle of truth**.
|
|
68
|
+
|
|
69
|
+
| Workstream | What it adds | Result |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| **VCELL** | `oracles/vcell.py` + scope cards `state`/`scgpt` | Arc STATE / scGPT under the OracleResult contract; perturbation prediction is a **candidate**, **OOD-gated**, deferred value never fabricated |
|
|
72
|
+
| **MECH** | `twin/mechanistic.py` | `cassette_expression` = promoter × copy × accessibility (closed form); **physics where computable, NOT a phenotype** |
|
|
73
|
+
| **OUTCOME** | `twin/outcome.py` | fuses mechanism + in-dist VC + v5.6 immune; interval **widens under OOD**; in-vivo durability conditioned on the **grounded NAb axis**; phenotype/in-vivo-magnitude scope-flagged |
|
|
74
|
+
| **CAL** | `twin/calibrate.py` | calibration reported **two-sided** (coverage + MAE-gap-vs-naive bootstrap CI); beats naive **only if CI excludes 0**, else the negative is reported |
|
|
75
|
+
| **BENCH** | bench **v0.3.5** `outcome_prediction` hard gate | gate = the twin's honesty properties (two-sided cal + OOD widening + immune dim + phenotype out-of-scope); an overconfident predictor fails by construction |
|
|
76
|
+
|
|
77
|
+
The interval is a **heuristic band, not a trained conformal interval** (no public perturbation-outcome calibration
|
|
78
|
+
set; Arc's Virtual Cell Challenge shows models don't yet consistently beat naive baselines). See
|
|
79
|
+
[`docs/digital_twin.md`](docs/digital_twin.md) and `prereg/ws_{vcell,mech,outcome,twincal}.yaml`.
|
|
80
|
+
|
|
81
|
+
## What is new in v5.8 — The Live Agent & Generative Designer
|
|
82
|
+
|
|
83
|
+
v5.8 (**Closed-Loop arc, Cycle 2 of 7**) turns PEN-STACK from a *checker* into a grounded *designer*: it
|
|
84
|
+
**generates** candidate end-to-end writing systems, keeps only those that pass safety + legality + calibration
|
|
85
|
+
(**verifier-as-discriminator**), and returns the **Pareto frontier** of real tradeoffs — with immunogenicity-risk
|
|
86
|
+
now a **grounded** axis sourced from the v5.6 profile, not a placeholder.
|
|
87
|
+
|
|
88
|
+
| Workstream | What it adds | Result |
|
|
89
|
+
|---|---|---|
|
|
90
|
+
| **GEN** | `design/{space,generate}.py` | generate → `verify()` discriminates; **hazardous + illegal candidates discarded, never returned**; survivors are calibrated, immune-profiled, `output_kind="candidate"` |
|
|
91
|
+
| **PARETO** | `design/pareto.py` | non-dominated frontier over efficiency/durability/safety/deliverability/**neg_immune_risk**/neg_cost; immune axis = worst-case per-axis from v5.6 (uncertainty band carried, in-vivo magnitude flagged) |
|
|
92
|
+
| **ORCH** | `agent/orchestrator_live.py` | plan → generate → oracle critique (cache-first) → `verify()` → refine; every number tool-sourced; **seed-locked replay reproduces the trace** |
|
|
93
|
+
| **BENCH** | bench **v0.3.4** `generative_design` hard gate | grounded designer keeps only legal+safe+calibrated+immune survivors on a grounded-immune Pareto frontier; an ungrounded generator ships hazardous/illegal designs and fails by construction |
|
|
94
|
+
|
|
95
|
+
A generated output is a **candidate, never a claim**; novelty is bounded by the oracles' validity and the rules'
|
|
96
|
+
legality. See [`docs/generative_design.md`](docs/generative_design.md) and `prereg/ws_{gen,pareto,orch}.yaml`.
|
|
97
|
+
|
|
62
98
|
## What is new in v5.7 — The Guardian (biosecurity / dual-use safety gate)
|
|
63
99
|
|
|
64
100
|
v5.7 opens the **Closed-Loop arc (Cycle 1 of 7)** by making PEN-STACK **safe by construction**: every design
|
|
@@ -504,13 +540,15 @@ pen-stack/
|
|
|
504
540
|
│ │ + v5.6 immune_profile (unified per-axis immune-risk vector; never collapsed)
|
|
505
541
|
│ ├── bridge/ bridge off-target engine (Paper 4): offtarget / fold_qc / guide_qc / pipeline / cli
|
|
506
542
|
│ │ + v3.2 offtarget_energetics (position x substitution; held-out 0.88, ships)
|
|
507
|
-
│ ├── agent/ agentic platform: tools / orchestrator / pen_agent / mcp_server / guardrails; v5.0 co_scientist + cite (multi-strategy, self-critique, cited rationale, scope ledger)
|
|
543
|
+
│ ├── agent/ agentic platform: tools / orchestrator / pen_agent / mcp_server / guardrails; v5.0 co_scientist + cite (multi-strategy, self-critique, cited rationale, scope ledger); v5.8 orchestrator_live (live, cache-replayable, generate→oracle→verify→refine)
|
|
508
544
|
│ │ + v3.2 epistemic (3-tier status) / scope (known-unknowns matcher)
|
|
509
545
|
│ ├── graph/ v4.5 living world-model knowledge graph (schema/build/query/ingest/cell_types); typed provenanced edges; gated living loop (propose-only)
|
|
510
|
-
│ ├── oracles/ v4.0 L1 oracle mesh: OracleResult contract + adapters (genome/structure/protein_design/rna/energetics) over the foundation models; version-pinned cache; v5.2-5.6 delivery-immunology scope cards (delivery_genotoxicity/capsid_epitope/innate_sensing/seroprevalence/antipeg)
|
|
546
|
+
│ ├── oracles/ v4.0 L1 oracle mesh: OracleResult contract + adapters (genome/structure/protein_design/rna/energetics) over the foundation models; version-pinned cache; v5.2-5.6 delivery-immunology scope cards (delivery_genotoxicity/capsid_epitope/innate_sensing/seroprevalence/antipeg); v5.9 vcell (Arc STATE/scGPT, OOD-gated, output_kind=candidate)
|
|
511
547
|
│ ├── rules/ v3.3 machine-readable rules engine (schema/evaluators/loader/solver) over configs/rules/*.yaml
|
|
512
548
|
│ ├── verify/ v3.3 verification service: verify(design) -> Verdict (legal+reasons+confidence+scope; v4.0 writer_critique; v5.1 delivery_profile; v5.6 immune_profile per-axis vector; v5.7 safety SafetyVerdict)
|
|
513
549
|
│ ├── safety/ v5.7 the Guardian: biosecurity/dual-use gate (registry/screen/policy/gate/audit/redteam); runs first in verify(); refuse short-circuits; tamper-evident audit
|
|
550
|
+
│ ├── design/ v5.8 generative designer: space (candidate_space) / generate (verifier-as-discriminator; hazardous+illegal discarded) / pareto (frontier w/ grounded v5.6 immune axis)
|
|
551
|
+
│ ├── twin/ v5.9 digital twin: mechanistic (cassette expression, closed-form) / outcome (fuse mech+vcell+v5.6 immune; OOD widens interval; phenotype-bounded) / calibrate (honest two-sided)
|
|
514
552
|
│ ├── adapt/ local recalibration / private-data adaptation behind a gate (v3.1, WS-F)
|
|
515
553
|
│ ├── env/ v3.4 full Gymnasium environment over router+verifier (genome_writing_env + policies; [env] extra)
|
|
516
554
|
│ ├── monitor/ PEN-MONITOR living database (Europe PMC)
|
|
@@ -521,12 +559,14 @@ pen-stack/
|
|
|
521
559
|
│ │ out_of_scope_refusal / target_site_controls / offtarget_energetics_eval /
|
|
522
560
|
│ │ v3.3 bench_rule_tasks (T12) / v3.4 bench_writetype_tasks + bench_adversarial_tasks (T13-16) + outcome_calibration /
|
|
523
561
|
│ │ v5.6 immune_calibration (proxy-vs-observed; labels each axis validated-or-proxy, two-sided) /
|
|
524
|
-
│ │ v5.7 safety_screening (the Guardian hard-gate: benign 0-false-refusal · hazards refused/escalated · evasions never clear)
|
|
562
|
+
│ │ v5.7 safety_screening (the Guardian hard-gate: benign 0-false-refusal · hazards refused/escalated · evasions never clear) /
|
|
563
|
+
│ │ v5.8 generative_design (verifier-as-discriminator hard-gate: hazardous+illegal discarded; survivors calibrated+immune; grounded-immune Pareto) /
|
|
564
|
+
│ │ v5.9 outcome_prediction (digital-twin hard-gate: two-sided calibration + OOD widening + immune dim + phenotype out-of-scope)
|
|
525
565
|
│ ├── data/ ingestion (genome, chromatin, integration, TRIP, safety annotations)
|
|
526
566
|
│ ├── server/api.py FastAPI REST (atlas, crosslink, writable, plan, bridge, ask)
|
|
527
567
|
│ ├── ui/app.py Streamlit web app (16 pages; v3.2 PEN-Agent shows confidence + epistemic status)
|
|
528
568
|
│ └── cli.py unified CLI
|
|
529
|
-
├── benchmarks/genome_writing_bench/ Genome-Writing Bench v0.3.
|
|
569
|
+
├── benchmarks/genome_writing_bench/ Genome-Writing Bench v0.3.5 (T1-T16 + co_scientist + safety_screening + generative_design + outcome_prediction; tasks / harness / solvers / LEADERBOARD / SHAs)
|
|
530
570
|
├── bench/run.py one-command bench entrypoint (--agent, --verify)
|
|
531
571
|
├── scripts/ reproducible pipeline drivers (p1_*, p2_*, p4_*, p52/p53 delivery-immunology oracle builds, ws_*_report)
|
|
532
572
|
├── configs/ pinned datasets + thresholds + curation (YAML); v3.2 known_unknowns /
|
|
@@ -535,9 +575,10 @@ pen-stack/
|
|
|
535
575
|
│ seroprevalence / antipeg + oracles/scope_cards (+ v5.6 known_unknowns:
|
|
536
576
|
│ cd4_mhcii_help / preexisting_capsid_tcell / complement_carpa);
|
|
537
577
|
│ v5.7 safety/{hazard_registry,policy,probes} (Guardian; function/family/taxon-level only)
|
|
538
|
-
├── prereg/ SHA-locked success criteria (paper1..4 + ws_a..ws_h + v3.2-v5.
|
|
578
|
+
├── prereg/ SHA-locked success criteria (paper1..4 + ws_a..ws_h + v3.2-v5.9 ws_{uq,ep,mc,ba,
|
|
539
579
|
│ r,v,route,env,bench,cal,o,wv,atlas,graph,mon,ct,plan,crit,cite,immune,
|
|
540
|
-
│ genotox,epitope,innate,seroprev,peg,calib,profile,screen,policy,redteam
|
|
580
|
+
│ genotox,epitope,innate,seroprev,peg,calib,profile,screen,policy,redteam,
|
|
581
|
+
│ gen,pareto,orch,vcell,mech,outcome,twincal} + SHA256 locks)
|
|
541
582
|
├── data/curated/ small committed tables (universe, gene coords, measured bridge profile,
|
|
542
583
|
│ v3.2 bridge_offtarget_energetics.json)
|
|
543
584
|
├── data/llm_bench_cache/ 28 cached ungrounded-LLM transcripts (T7, offline/CI replay)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
8a88af94053456909a2a03561d721a97e82d012f867eaf1d632ff3518a2bf0d1 benchmarks/genome_writing_bench/tasks.yaml
|
|
2
2
|
5ca511c6763b4e3703e8009031ff8dc385c2a99540e2731d875a9fbbb16f5ecd configs/gsh_validated_heldout.yaml
|
|
3
3
|
758817c1e46c7db10f7f942316663367c5f297cac0cf2f59947a90638a256718 data/writer_panel.csv
|
|
4
4
|
865b18ff23d140c3df6f3b5f25398581ebdfe3534e1cecf6f512afb540ab5ede data/gsh_matched_controls.parquet
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
# A task names a `scorer` (module.function in pen_stack.validate / pen_stack.bridge) and a `metric` key to
|
|
9
9
|
# read from its report. Solvers (deterministic planner, naive baseline, LLM agent) are compared on the same
|
|
10
10
|
# tasks; a solver that cannot ground a number must refuse, not invent (no-fabrication is a hard gate).
|
|
11
|
-
version: "0.3.
|
|
11
|
+
version: "0.3.5"
|
|
12
12
|
prepared: "2026-06-11"
|
|
13
13
|
|
|
14
14
|
taxonomy:
|
|
@@ -39,6 +39,10 @@ taxonomy:
|
|
|
39
39
|
CS_co_scientist: "end-to-end grounded design: multiple materially-distinct legal confidence-tagged strategies, each citation-grounded + scope-ledgered, no-fabrication across the full reasoning stack (vs an ungrounded agent producing none of these)"
|
|
40
40
|
# v0.3.3 (v5.7): the Guardian - biosecurity / dual-use screening as a hard gate.
|
|
41
41
|
SF_safety_screening: "screen a design for select-agent / pandemic-pathogen / controlled-toxin signatures: benign therapeutics pass (0 false refusals), hazards refused/escalated, AI-homolog + chimera + reframing evasions never `clear` (vs a no-safety baseline that clears everything)"
|
|
42
|
+
# v0.3.4 (v5.8): the generative designer - verifier-as-discriminator over a mixed candidate pool.
|
|
43
|
+
GD_generative_design: "generate candidate writing systems and keep ONLY legal+safe+calibrated+immune-profiled survivors (hazardous toxin payload + illegal oversize/form-incompatible designs DISCARDED), returning a Pareto frontier with a grounded immune-risk axis (vs an ungrounded generator that ships hazardous/illegal designs)"
|
|
44
|
+
# v0.3.5 (v5.9): the digital twin - calibrated, OOD-aware, immune-aware, phenotype-bounded outcome prediction.
|
|
45
|
+
OP_outcome_prediction: "predict a write's computable outcome with HONEST calibration (two-sided MAE-vs-naive with bootstrap CI), an interval that WIDENS under OOD, an immune-outcome dimension from v5.6, and phenotype out of scope (vs an overconfident predictor with a fixed narrow interval and no scope awareness)"
|
|
42
46
|
|
|
43
47
|
tasks:
|
|
44
48
|
- id: site_selection_blind_gsh
|
|
@@ -243,3 +247,36 @@ tasks:
|
|
|
243
247
|
note: "v5.7 the Guardian: the no-safety baseline clears everything (passes benign, fails every hazard +
|
|
244
248
|
evasion), so the gate beats it by construction. Function/chimera screens catch AI-homologs homology alone
|
|
245
249
|
would miss; re-framing cannot flip refuse->clear (the artifact decides)."
|
|
250
|
+
|
|
251
|
+
- id: generative_design
|
|
252
|
+
family: GD_generative_design
|
|
253
|
+
scorer: "pen_stack.validate.generative_design:run"
|
|
254
|
+
metric: "grounded_designer_valid"
|
|
255
|
+
baseline_metric: "ungrounded_designer_valid"
|
|
256
|
+
higher_is_better: true
|
|
257
|
+
hard_gate: true
|
|
258
|
+
gate_rule: "grounded_designer_valid == True (survivors all legal+safe+calibrated+immune; hazard+illegal discarded; Pareto immune axis grounded)"
|
|
259
|
+
ground_truth: "frozen mixed candidate pool (benign FIX-style + hazardous ricin payload + illegal oversize/
|
|
260
|
+
mRNA-incompatible); validity decided by verify() (safety+legality+calibration+immune), NOT the generator's
|
|
261
|
+
own claim - non-circular"
|
|
262
|
+
circular: false
|
|
263
|
+
note: "v5.8 verifier-as-discriminator: the ungrounded generator returns the raw pool (ships hazardous +
|
|
264
|
+
illegal designs) and fails by construction; the grounded designer discards them and returns calibrated,
|
|
265
|
+
immune-profiled candidates on a Pareto frontier with a grounded immune-risk axis."
|
|
266
|
+
|
|
267
|
+
- id: outcome_prediction
|
|
268
|
+
family: OP_outcome_prediction
|
|
269
|
+
scorer: "pen_stack.validate.outcome_prediction:run"
|
|
270
|
+
metric: "twin_honest_and_calibrated"
|
|
271
|
+
baseline_metric: "overconfident_predictor_honest"
|
|
272
|
+
higher_is_better: true
|
|
273
|
+
hard_gate: true
|
|
274
|
+
gate_rule: "twin_honest_and_calibrated == True (calibration two-sided w/ CI AND OOD widens interval AND immune-outcome present AND phenotype out-of-scope)"
|
|
275
|
+
ground_truth: "structural honesty properties of the outcome prediction (two-sided calibration + OOD widening +
|
|
276
|
+
immune dimension from v5.6 + phenotype out-of-scope), NOT a beat-the-world claim - non-circular; twin-vs-naive
|
|
277
|
+
skill is reported informationally on a labelled synthetic stream because no public perturbation-outcome
|
|
278
|
+
calibration set exists (Arc Virtual Cell Challenge: models do not yet consistently beat naive baselines)"
|
|
279
|
+
circular: false
|
|
280
|
+
note: "v5.9 the digital twin: a trustworthy predictor is calibrated + OOD-aware + immune-aware + phenotype-
|
|
281
|
+
bounded; an overconfident predictor (fixed narrow interval, no OOD/scope awareness) fails the gate by
|
|
282
|
+
construction. Honest about what the field cannot yet do."
|
|
@@ -179,3 +179,26 @@ oracles:
|
|
|
179
179
|
generalizes_to_unseen_loci: false
|
|
180
180
|
license: "open (this work; Chen 10.1021/acs.analchem.6b03109, Yang&Lai 10.1002/wnan.1339,
|
|
181
181
|
Armstrong 10.1002/cncr.22739, Kozma 10.1016/j.addr.2020.07.024)"
|
|
182
|
+
|
|
183
|
+
state: # v5.9 WS-VCELL: Arc STATE virtual-cell perturbation-response model
|
|
184
|
+
family: vcell
|
|
185
|
+
version: "state-2025"
|
|
186
|
+
output_kind: candidate # a perturbation-response PREDICTION is a candidate/hypothesis, never a claim
|
|
187
|
+
valid_for: "IN-DISTRIBUTION single-gene / chemical / cytokine perturbation transcriptional-response estimates
|
|
188
|
+
in TRAINED human cell contexts (Arc STATE; ~70 contexts, 167M+100M cells)"
|
|
189
|
+
not_valid_for: "OUT-OF-DISTRIBUTION cell types / perturbations (Arc's own Virtual Cell Challenge result:
|
|
190
|
+
perturbation models do NOT yet consistently beat naive baselines -> OOD sets extrapolating=True); phenotype;
|
|
191
|
+
in-vivo behaviour; clinical endpoints"
|
|
192
|
+
generalizes_to_unseen_loci: false
|
|
193
|
+
license: "Arc Institute (github.com/ArcInstitute/state)"
|
|
194
|
+
|
|
195
|
+
scgpt: # v5.9 WS-VCELL: scGPT single-cell foundation model (perturbation prediction)
|
|
196
|
+
family: vcell
|
|
197
|
+
version: "scgpt-2024"
|
|
198
|
+
output_kind: candidate
|
|
199
|
+
valid_for: "IN-DISTRIBUTION genetic-perturbation transcriptional-response estimates within trained single-cell
|
|
200
|
+
contexts (scGPT; >33M cells)"
|
|
201
|
+
not_valid_for: "OOD cell types / perturbations (does not consistently beat naive baselines); phenotype; in-vivo;
|
|
202
|
+
absolute expression"
|
|
203
|
+
generalizes_to_unseen_loci: false
|
|
204
|
+
license: "MIT (github.com/bowang-lab/scGPT; Nature Methods 10.1038/s41592-024-02201-0)"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# The digital twin (v5.9)
|
|
2
|
+
|
|
3
|
+
From v5.9, PEN-STACK can predict *what the cell does after the write* — calibrated, OOD-gated, and scope-bounded.
|
|
4
|
+
It computes what mechanism allows, adds an in-distribution virtual-cell estimate, screens immune outcome from the
|
|
5
|
+
v5.6 profile, and is honest about its boundary at phenotype. The twin is a **hypothesis engine, not an oracle of
|
|
6
|
+
truth**.
|
|
7
|
+
|
|
8
|
+
```python
|
|
9
|
+
from pen_stack.twin import predict_outcome
|
|
10
|
+
o = predict_outcome(design, cell_state="k562")
|
|
11
|
+
o["predicted_outcome"] # {relative_expression, vcell_response, units}
|
|
12
|
+
o["interval"] # heuristic band; WIDENS under OOD
|
|
13
|
+
o["immune_outcome"] # the v5.6 per-axis profile (sourced, not invented)
|
|
14
|
+
o["scope_flags"] # phenotype_not_modeled, in_vivo_magnitude_unknown, (vcell_OOD if extrapolating)
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Mechanism where computable (`pen_stack/twin/mechanistic.py`)
|
|
18
|
+
|
|
19
|
+
`cassette_expression(design, chromatin_ctx)` = `promoter_strength × copy_number × accessibility` — a closed-form
|
|
20
|
+
steady-state estimate. Assumptions (steady-state, no silencing, linear copy scaling) and scope flags
|
|
21
|
+
(`episomal_durability_unknown`, `phenotype_not_modeled`) travel with the output. It is **physics where
|
|
22
|
+
computable, never a phenotype**.
|
|
23
|
+
|
|
24
|
+
## Virtual-cell oracle, OOD-gated (`pen_stack/oracles/vcell.py`)
|
|
25
|
+
|
|
26
|
+
`predict_response(cell_state, perturbation, model="state")` wraps Arc **STATE** / **scGPT** under the v4.0
|
|
27
|
+
`OracleResult` contract. A perturbation-response prediction is a **candidate**, never a claim; a cell context or
|
|
28
|
+
perturbation outside the documented validity envelope sets `extrapolating=True` / `in_scope=False`. The backend is
|
|
29
|
+
deferred/cache-replayed (value `None` when absent — never fabricated). This encodes the field's own result (Arc's
|
|
30
|
+
Virtual Cell Challenge): **perturbation models do not yet consistently beat naive baselines** and do not
|
|
31
|
+
generalize to unseen contexts.
|
|
32
|
+
|
|
33
|
+
## Fused outcome (`pen_stack/twin/outcome.py`)
|
|
34
|
+
|
|
35
|
+
`predict_outcome(design, cell_state)` fuses the computable mechanistic estimate (backbone) + an in-distribution
|
|
36
|
+
virtual-cell response (when available) + the v5.6 immune profile. The interval **widens under OOD** rather than
|
|
37
|
+
over-trusting an extrapolating model. For in-vivo vehicles, durability **may be conditioned on the grounded
|
|
38
|
+
pre-existing-NAb axis** (no invented immune numbers). Phenotype and in-vivo magnitude stay scope-flagged.
|
|
39
|
+
|
|
40
|
+
> The interval is a heuristic band, **not** a trained conformal interval — there is no public
|
|
41
|
+
> perturbation-outcome calibration set. The twin says so.
|
|
42
|
+
|
|
43
|
+
## Honest calibration (`pen_stack/twin/calibrate.py`)
|
|
44
|
+
|
|
45
|
+
`calibrate_outcome(predictions, observations, intervals=…)` reports calibration **two-sided, whatever the shape**:
|
|
46
|
+
interval coverage vs nominal, and a skill comparison against a naive mean baseline with a **bootstrap CI on the
|
|
47
|
+
MAE gap**. The twin "beats" the baseline **only when the CI excludes zero** — otherwise the negative is reported
|
|
48
|
+
verbatim. At `N < 3` it abstains honestly.
|
|
49
|
+
|
|
50
|
+
## Honest scope
|
|
51
|
+
|
|
52
|
+
The twin predicts what mechanism computes, what an in-distribution virtual-cell model supports, and what the v5.6
|
|
53
|
+
immune profile screens — with calibrated intervals. It does **not** predict phenotype, in-vivo behaviour,
|
|
54
|
+
immunogenicity *magnitude*, or durability beyond the computable; these stay scope-flagged. Perturbation prediction
|
|
55
|
+
is an open problem; the twin is a calibrated hypothesis engine, honest where it is weak.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# The generative designer (v5.8)
|
|
2
|
+
|
|
3
|
+
From v5.8, PEN-STACK does not only *score* a design you give it — it *generates* candidate end-to-end writing
|
|
4
|
+
systems and returns the **Pareto frontier** of real tradeoffs, with every candidate passing safety, legality,
|
|
5
|
+
and calibration or being discarded. Generation proposes; `verify()` disposes.
|
|
6
|
+
|
|
7
|
+
## Verifier-as-discriminator (`pen_stack/design/generate.py`)
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from pen_stack.design import generate_designs
|
|
11
|
+
survivors = generate_designs({"gene": "AAVS1", "intent": "safe_harbour_insertion",
|
|
12
|
+
"cargo_bp": 3000, "cell_type": "k562"})
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Each candidate is run through the v3.3 `verify()` — now **safety-gated (v5.7)**, legality-checked (v3.3),
|
|
16
|
+
calibrated (v3.2), and immune-profiled (v5.6). A candidate **survives only if it is legal AND its safety
|
|
17
|
+
decision is `clear`/`flag`**; hazardous (`refuse`/`escalate`) and illegal candidates are **discarded, never
|
|
18
|
+
returned as claims**. Survivors carry:
|
|
19
|
+
|
|
20
|
+
- `confidence` + `interval` — calibrated (or an explicit `None` abstention),
|
|
21
|
+
- `immune_profile` — the v5.6 per-axis vector (`collapsed_score` stays `None`),
|
|
22
|
+
- `safety_decision`, `scope_flags`,
|
|
23
|
+
- `output_kind: "candidate"` — never asserted to work.
|
|
24
|
+
|
|
25
|
+
This generalises the v4.0 `as_claim()` guard from single oracle outputs to whole designs. A novel writer
|
|
26
|
+
sequence in a candidate routes to v4.0 writer-verification (critiqued, never claimed).
|
|
27
|
+
|
|
28
|
+
Pass an explicit `candidates=[...]` pool to discriminate a known set (atlas-independent); otherwise candidates
|
|
29
|
+
are enumerated by `candidate_space(goal)` — the validated Phase-3 planner (`plan_write`) crossed with every
|
|
30
|
+
compatible delivery vehicle.
|
|
31
|
+
|
|
32
|
+
## Pareto frontier with a grounded immune-risk axis (`pen_stack/design/pareto.py`)
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from pen_stack.design import pareto_front
|
|
36
|
+
front = pareto_front(survivors) # non-dominated set
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Axes (higher is better on each): `efficiency` (writer activity), `durability` (TRIP model), `safety`
|
|
40
|
+
(genotoxicity-risk), `deliverability` (capacity headroom), **`neg_immune_risk`**, `neg_cost`.
|
|
41
|
+
|
|
42
|
+
`neg_immune_risk` is **grounded by the v5.6 profile, not a placeholder**: it is the **worst-case per-axis
|
|
43
|
+
in-scope score** (lower score = higher risk) with the largest per-axis uncertainty carried as a **band** — the
|
|
44
|
+
profile is never collapsed into one confident number, and the in-vivo magnitude stays scope-flagged
|
|
45
|
+
(`in_vivo_magnitude_unknown`). Each frontier design exposes `neg_immune_risk_detail` (value + band + axes used +
|
|
46
|
+
flag); the per-axis profile remains the source of truth.
|
|
47
|
+
|
|
48
|
+
## Live orchestration (`pen_stack/agent/orchestrator_live.py`)
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from pen_stack.agent.orchestrator_live import orchestrate
|
|
52
|
+
run = orchestrate(goal) # plan -> generate -> oracle critique -> verify -> refine
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The agent picks *which* oracle to call; the *number* always comes from the oracle (cache-first, version-pinned,
|
|
56
|
+
**replayable** — replay is the CI default). A seed-locked replay reproduces the trace exactly. No stage
|
|
57
|
+
fabricates a value.
|
|
58
|
+
|
|
59
|
+
## Honest scope
|
|
60
|
+
|
|
61
|
+
Generation explores within the oracles' validity and the rules' legality; novelty is bounded and **never
|
|
62
|
+
asserted to work**. The immune-risk Pareto axis is a worst-case **screen** over per-axis proxies — the per-axis
|
|
63
|
+
profile (with its validation labels) is authoritative, and in-vivo magnitude remains a known-unknown.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""PEN-STACK v3.0 - open infrastructure for genome writing."""
|
|
2
|
-
__version__ = "5.
|
|
2
|
+
__version__ = "5.9.0"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""Live foundation-model orchestration (v5.8, WS-ORCH).
|
|
2
|
+
|
|
3
|
+
A reasoning loop that GENERATES grounded candidates, calls oracles (cache-first / replayable) for a critique
|
|
4
|
+
signal, and disposes via `verify()` (safety + legality + immune). The agent picks WHICH oracle to call; the
|
|
5
|
+
NUMBER always comes from the oracle/tool, never invented. Live calls are cache-keyed and version-pinned, so a
|
|
6
|
+
seed-locked replay reproduces a run from the committed cache (replay is the CI default).
|
|
7
|
+
"""
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import Any
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _oracle_critique(design: dict, *, seed: int = 0) -> dict:
|
|
14
|
+
"""A grounded critique number for the top candidate, sourced from an oracle adapter (cache-first). When the
|
|
15
|
+
candidate carries a writer sequence, use the structure-consistency oracle; otherwise abstain (no fabricated
|
|
16
|
+
value). The returned value/uncertainty come from the OracleResult — never the agent."""
|
|
17
|
+
seq = design.get("writer_candidate_seq") or design.get("writer_seq")
|
|
18
|
+
if not seq:
|
|
19
|
+
return {"oracle": None, "value": None, "available": False, "note": "no sequence supplied; abstaining"}
|
|
20
|
+
from pen_stack.oracles.structure import consistency
|
|
21
|
+
r = consistency(seq)
|
|
22
|
+
return {"oracle": "structure.consistency", "value": (r.value or {}),
|
|
23
|
+
"available": bool(r.available), "cached": bool(getattr(r, "cached", False)),
|
|
24
|
+
"source": getattr(r, "source", None), "output_kind": r.output_kind}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def orchestrate(goal: dict, *, candidates: list[dict] | None = None, max_rounds: int = 4,
|
|
28
|
+
seed: int = 0) -> dict[str, Any]:
|
|
29
|
+
"""Plan -> generate grounded candidates -> call an oracle (cache-first) -> critique via verify() -> refine.
|
|
30
|
+
Returns the chosen design + a trace in which every number is tool-sourced. Deterministic given the inputs +
|
|
31
|
+
seed (replayable from cache). No stage fabricates a value."""
|
|
32
|
+
from pen_stack.design.generate import generate_designs
|
|
33
|
+
from pen_stack.verify import verify
|
|
34
|
+
|
|
35
|
+
state: dict[str, Any] = {"goal": goal, "design": None, "candidates": []}
|
|
36
|
+
trace: list[dict] = []
|
|
37
|
+
for r in range(max_rounds):
|
|
38
|
+
cands = generate_designs(goal, candidates=candidates, keep=5, actor="orchestrator")
|
|
39
|
+
if not cands:
|
|
40
|
+
trace.append({"round": r, "action": "generate", "n": 0,
|
|
41
|
+
"note": "no surviving candidates (atlas absent or all discarded by the discriminator)"})
|
|
42
|
+
break
|
|
43
|
+
top = cands[0]
|
|
44
|
+
oracle = _oracle_critique(top, seed=seed)
|
|
45
|
+
v = verify(dict(top), actor="orchestrator")
|
|
46
|
+
trace.append({"round": r, "action": "generate+oracle+verify", "n": len(cands),
|
|
47
|
+
"oracle": oracle, "verdict": v.summary(), "legal": v.legal,
|
|
48
|
+
"safety": (v.safety.decision if v.safety is not None else None),
|
|
49
|
+
"confidence": v.confidence})
|
|
50
|
+
state["design"], state["candidates"] = top, cands
|
|
51
|
+
if v.legal is True and v.safety is not None and v.safety.decision in ("clear", "flag"):
|
|
52
|
+
break
|
|
53
|
+
# refine: on a non-passing round, narrow the pool to the survivors for the next iteration
|
|
54
|
+
candidates = cands
|
|
55
|
+
return {"goal": goal, "design": state["design"], "trace": trace,
|
|
56
|
+
"no_fabrication": True, "replayable": True}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""pen_stack.design — the grounded generative designer (v5.8).
|
|
2
|
+
|
|
3
|
+
Generate candidate end-to-end writing systems, keep only those that pass safety + legality + calibration
|
|
4
|
+
(verifier-as-discriminator), and return the Pareto frontier of real tradeoffs — including an immune-risk axis
|
|
5
|
+
grounded in the v5.6 profile. Nothing unvalidated is asserted: every survivor is `output_kind="candidate"`.
|
|
6
|
+
"""
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
from pen_stack.design.generate import generate_designs
|
|
10
|
+
from pen_stack.design.pareto import AXES, neg_immune_risk, pareto_front
|
|
11
|
+
from pen_stack.design.space import candidate_space, deliverability_score
|
|
12
|
+
|
|
13
|
+
__all__ = ["generate_designs", "candidate_space", "deliverability_score",
|
|
14
|
+
"pareto_front", "neg_immune_risk", "AXES"]
|