Skip to content

Commit beba4e6

Browse files
committed
Initial public snapshot
0 parents  commit beba4e6

494 files changed

Lines changed: 67676 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.py]
10+
indent_style = space
11+
indent_size = 4
12+
13+
[*.{json,yml,yaml,md}]
14+
indent_style = space
15+
indent_size = 2
16+
17+
[Makefile]
18+
indent_style = tab
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: Bug report
3+
about: Validator, schema, or CLI behaves incorrectly
4+
title: "[bug] "
5+
labels: ["bug"]
6+
---
7+
8+
## What happened
9+
10+
What did `ferm-doe validate` (or another command) return that you didn't expect?
11+
12+
## What you expected
13+
14+
What should it have done instead?
15+
16+
## Reproduction
17+
18+
Minimal manifest or shell session. Use synthetic / public-safe data only; do not paste private process data, strain details, or unpublished sequences. If the bug only reproduces with private data, describe the shape, not the contents.
19+
20+
```bash
21+
ferm-doe validate <campaign_dir> --summary
22+
```
23+
24+
```json
25+
{ ... minimal manifest ... }
26+
```
27+
28+
## Environment
29+
30+
- `biosymphony-ferm-doe` version (or commit SHA):
31+
- Python version:
32+
- OS:
33+
- Agent harness (Claude Code / OpenAI Agents / Codex / generic / standalone):
34+
35+
## Additional context
36+
37+
Profile(s) declared, claim_level, anything else useful.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Feature request
3+
about: Propose new validator behavior, schema slot, or CLI affordance
4+
title: "[feature] "
5+
labels: ["enhancement"]
6+
---
7+
8+
## Problem
9+
10+
What does a long-running agent (or scientist) need to do today that the skill makes harder than it should?
11+
12+
## Proposed change
13+
14+
What would the schema, validator, or CLI look like after the change? Be specific.
15+
16+
## Alternatives considered
17+
18+
Including: doing nothing, doing it in the agent's own code instead of the skill, or punting to a future profile.
19+
20+
## Public-safety considerations
21+
22+
Does the change require new public-safety rules (e.g., a new `claim_level` value)? New input categories?
23+
24+
## Non-goals
25+
26+
What this change should *not* do. Helps keep scope tight.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: New DoE family
3+
about: Propose a new design family
4+
title: "[family] "
5+
labels: ["family-proposal"]
6+
---
7+
8+
## Family name
9+
10+
Snake_case (`d_optimal_with_blocks`, `mixture_process_combined`, etc.).
11+
12+
## When to use
13+
14+
What problem does this family solve that the current set does not?
15+
16+
## Reference
17+
18+
Standard reference (Montgomery, Jones & Nachtsheim, Cornell, Box-Hunter-Hunter, etc.). DOI or canonical link.
19+
20+
## Minimum-runs formula
21+
22+
Closed form if computable; "user_declared" if it depends on parameters the schema does not carry.
23+
24+
## Required structural fields
25+
26+
Resolution? Alias structure? Mixture components? Hard-to-change factors? Previous wave reference?
27+
28+
## Replication / center-point expectations
29+
30+
What does a well-formed instance of this family include?
31+
32+
## Statistical claim level
33+
34+
What `doe.claim` value should default for this family: `exact`, `adapter_backed`, `approximate`, or `heuristic`?
35+
36+
## Validator behavior
37+
38+
What checks would the validator run against a manifest declaring this family? Each check id and severity (warning vs error).
39+
40+
## Adapter
41+
42+
If a DoE adapter (statsmodels, pyDOE3, custom) generates this family today, link it. If not, note that.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: New profile
3+
about: Propose a new campaign profile
4+
title: "[profile] "
5+
labels: ["profile-proposal"]
6+
---
7+
8+
## Profile name
9+
10+
Snake_case, descriptive, verb-or-noun-shaped (`scale_down_qualification`, `sequential_augmentation`, `confirmation`).
11+
12+
## When to use
13+
14+
Concrete scenarios. At least three.
15+
16+
## Required blocks
17+
18+
What manifest blocks become errors when absent under this profile? Keep this list short; required blocks should reflect structural inability to do what the profile claims.
19+
20+
## Advised blocks
21+
22+
What blocks emit warnings when absent? Most things go here.
23+
24+
## Advised inputs
25+
26+
What input files does this profile expect to consume?
27+
28+
## Advised expected artifacts
29+
30+
What outputs should the agent produce by default?
31+
32+
## Default DoE families
33+
34+
Which design families fit this profile? List 2-4.
35+
36+
## Profile-specific structural requirements
37+
38+
Anything else unique to this profile? E.g., `factor_hard_to_change_required`, `recapitulation_criterion_required`, `previous_wave_ref_required`.
39+
40+
## Public demo
41+
42+
Do you intend to ship a `examples/demo-<profile>-public/` campaign with this profile? If yes, sketch what it would show.
43+
44+
## Why not extend an existing profile
45+
46+
Why is this a new profile rather than a variant of `screening`, `optimization_rsm`, or `custom`?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## What changed
2+
3+
One-line summary.
4+
5+
## Why
6+
7+
The user-visible problem this PR solves. Link issues / discussions.
8+
9+
## Public-safety checklist
10+
11+
- [ ] No private strain details, sequences, customer data, or confidential formulations.
12+
- [ ] No API keys, tokens, or credentials.
13+
- [ ] No private workstation paths or private issue/team identifiers.
14+
- [ ] Synthetic / public-source rows are clearly labeled.
15+
- [ ] `make release-check` passes.
16+
- [ ] `make secret-scan` passes (or gracefully reports gitleaks not installed).
17+
18+
## Validator / schema impact
19+
20+
- [ ] No schema change.
21+
- [ ] Schema change is backwards-compatible (adds optional fields only).
22+
- [ ] Schema change is breaking; `CHANGELOG.md` updated under a clearly-labeled breaking-changes section.
23+
24+
## Demo impact
25+
26+
- [ ] No demo changes.
27+
- [ ] Existing demos still validate to expected verdicts.
28+
- [ ] New demo added under `examples/demo-<name>-public/`.
29+
30+
## Long-running agent impact
31+
32+
- [ ] No agent-facing change.
33+
- [ ] `SKILL.md` / `agents/*.md` updated where the loop, refuse-vs-warn, or hand-off behavior changes.

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12", "3.13"]
18+
steps:
19+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
20+
with:
21+
persist-credentials: false
22+
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install package
26+
run: python -m pip install -e .
27+
- name: Run public release gate
28+
run: make release-check
29+
30+
secret-scan:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
34+
with:
35+
fetch-depth: 0
36+
persist-credentials: false
37+
- name: Install gitleaks
38+
env:
39+
GITLEAKS_VERSION: "8.30.0"
40+
run: |
41+
set -euo pipefail
42+
curl -fsSL "https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz" -o /tmp/gitleaks.tar.gz
43+
tar -xzf /tmp/gitleaks.tar.gz -C /tmp gitleaks
44+
sudo install -m 0755 /tmp/gitleaks /usr/local/bin/gitleaks
45+
gitleaks version
46+
- name: Run gitleaks
47+
run: make secret-scan-required

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
.DS_Store
2+
__pycache__/
3+
*.py[cod]
4+
.pytest_cache/
5+
.mypy_cache/
6+
.ruff_cache/
7+
.venv/
8+
venv/
9+
.env
10+
.runtime/
11+
.nox/
12+
.coverage
13+
htmlcov/
14+
.ipynb_checkpoints/
15+
dist/
16+
build/
17+
*.egg-info/
18+
ferm-doe-dossier/
19+
ferm-doe-dossier-*/
20+
.aws-sam/
21+
samconfig.toml
22+
samconfig.*.toml
23+
packaged.yaml
24+
packaged-template.yaml
25+
deploy/aws-lambda/.aws-sam/
26+
deploy/aws-lambda/packaged*.yaml
27+
deploy/aws-lambda/*-packaged.yaml
28+
.serverless/

AGENTS.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# BioSymphony Ferm DoE Public Repo Agent Guide
2+
3+
Public workspace for BioSymphony Ferm DoE.
4+
5+
## Mission
6+
7+
Help users and their agents drive long-horizon, multi-agent bioprocess design campaigns from intake through Wave 2. The repo is a skill any agent harness can pick up: Symphony with Linear, Claude Code workers with Linear, Codex CLI, OpenAI Agents SDK, or a custom orchestrator, running on a laptop, in CI, or behind AWS Lambda or Modal. The agent and the human share one durable artifact (`campaign_manifest.json`), pause, resume, hand off, and converge on a fermentation campaign that is worth running.
8+
9+
The repo ships:
10+
11+
- profile registry (screening, optimization_rsm, mixture, split_plot_fed_batch, scale_up_bridge, scale_down_qualification, confirmation, sequential_augmentation, custom)
12+
- scale_context block (multi-criterion: kLa, P/V, tip_speed, mix_time, DO, OUR, RQ, VVM, geometric_similarity, custom)
13+
- multi-arm (`arms[]`) campaigns
14+
- per-axis readiness state (responses, factors, arms, scale_context, doe, decision_rules, evidence, feasibility)
15+
- decision_rules / stop_rules / risk_register / assumptions blocks
16+
- DoE family taxonomy with minimum-runs guidance
17+
- a curated 37-tool BO/DoE registry with documented adapter routing (`docs/TOOL_REGISTRY.md`, `docs/tool-registry.json`)
18+
- BoFire, ENTMOOT v2, OMLT, TabPFN, BoTorch, pyDOE3, SALib, scipy, PubMed MCP adapters that degrade cleanly when the optional extra is absent
19+
- a cumulative dossier pattern (per-corpus swarm plus integrator plus harvester) backed by `provenance.py` and `rocrate_retrofit.py`
20+
- a cost-model honesty stack (simulator, bulk reagent, fully-loaded COGS, CMO, range)
21+
- JSON Schema for the manifest plus Frictionless table contracts for CSV inputs
22+
- issue-pack and task-request contracts that let an orchestrator fan work across parallel sub-agents and converge results
23+
- AWS Lambda and Modal scaffolds so the same commands run from a laptop, from CI, or behind a stateless cloud endpoint
24+
- public-safety audit and validators
25+
26+
## Public Safety Rules
27+
28+
Do not add:
29+
30+
- private strain details
31+
- unpublished sequences
32+
- customer batch records
33+
- confidential media formulations
34+
- API keys or provider credentials
35+
- private workstation paths
36+
- private issue-tracker / team / project identifiers
37+
- raw private campaign artifacts
38+
39+
Use synthetic or public-source examples only, label synthetic data clearly.
40+
41+
## Current State
42+
43+
- README plus workflow images
44+
- public-safe `SKILL.md` with long-agent loop
45+
- canonical `NON_CLAIMS.md`
46+
- profile registry (9 profiles), scale_bridge framework, DoE family taxonomy (14 families), JSON Schema, table contracts
47+
- adapters for BoFire, ENTMOOT v2, OMLT, TabPFN, BoTorch, pyDOE3, SALib, scipy, PubMed MCP
48+
- public demos: twelve campaign-shaped demos covering screening (xylanase, PB screening, warnings-walkthrough), scale_down_qualification (scale-bridge), split_plot_fed_batch, BoFire routes (media cost, shakeflask-to-2L), ENTMOOT NChooseK smoke, multi-arm scale transfer, reference DOE custom design, public-paper starter (xylanase-wxz1-2012), and product-class starter (yeast-isoprenoid-2L-fedbatch); plus the `adaptive-backend-eval` and `starter-studies` auxiliary fixtures
49+
- reference docs: GLOSSARY, CLI_REFERENCE, ADAPTER_MAP, DOE_FAMILY_RECIPES, WAVE2_BOTORCH, ISSUE_PACK_GENERATION, BACKEND_EVAL_FINDINGS, ADAPTER_DESIGN_NOTES
50+
- Python package scaffold (stdlib-only at runtime; optional extras route through adapters)
51+
- AWS Lambda and Modal deploy scaffolds in `deploy/`
52+
- public-safety tests, per-validator tests, adapter tests, dossier provenance tests; 455 tests pass with 38 expected skips
53+
54+
## Long-Agent Loop
55+
56+
See `skills/biosymphony-ferm-doe/SKILL.md`. Summary: intake, readiness gate, factor framing, scale framing, DoE selection, run packet, Wave 2 review. Refuse on missing required blocks for declared profiles, missing assayed-response contracts, and public-safety violations. Warn on profile-advised gaps and DoE family minimum-runs shortfalls.
57+
58+
## Key Pattern And Convention
59+
60+
- Treat public examples as synthetic contract fixtures, not campaign records.
61+
- Keep campaign routing explicit through `task_request` contracts; do not activate heavy campaign workflows for ordinary validation or docs tasks.
62+
- Keep issue packs tracker-neutral until a private campaign maps pack-local IDs to a tracker.
63+
- Preserve arm scope in DOE artifacts: per-arm executable CSVs are authoritative; horizontal DOE tables are review surfaces.
64+
- Prefer stdlib/offline code paths in the public package; optional scientific dependencies must degrade cleanly.
65+
- Bounded workers (parallel sub-agents, swarm corpora, integrator and harvester roles) are coordinated through `task_request` contracts and the cumulative-dossier pattern, not ad-hoc dispatch.
66+
- One coherent dossier per campaign (`CITATIONS.json`, `NOTES.md`, `SOURCES.bib`, per-corpus `EVIDENCE.csv`), not N isolated reports.
67+
68+
## Risks To Watch
69+
70+
- Do not turn public demos into implied lab-validation or production-readiness claims.
71+
- Watch for accidental private paths, provider IDs, issue-tracker IDs, private biological details, or copied article tables before release.
72+
- Keep scale-transfer wording at planning or qualification status unless executed bridge evidence is present.
73+
- Keep warnings deterministic so public demos remain useful regression fixtures.
74+
- When BoFire's `SoboStrategy` plus `NChooseK` is requested, route to ENTMOOT v2 or enforce cardinality post-hoc; upstream issue #450 stalls indefinitely.
75+
- When the simulator drives the planner, declare `simulator.fidelity_level` on the manifest and run the literature pressure-test template before sealing a campaign.
76+
77+
## Next Best Work
78+
79+
1. Keep all demos complete, deterministic, and clearly synthetic; the diagnostic walkthrough should continue to surface intentional guidance warnings.
80+
2. Extend validators only with public-safe logic and fixtures.
81+
3. Keep `make release-check` passing before any public push.
82+
4. Add new demos under public-safe artifact folders when more profiles see use.
83+
5. Re-run history and tree scans before first remote publication.
84+
6. When new DoE adapters land, label their claim level and route reason in the tool registry.
85+
86+
## Claim Boundaries
87+
88+
This repo validates measurement readiness, manifest structure, and profile fit before lab work. It does not validate actual lab measurements unless result rows are ingested with provenance and QC evidence.
89+
90+
Do not claim optimized, validated, production-ready, or GxP-ready behavior.

0 commit comments

Comments
 (0)