drop dead LLM pass-2 interface, refresh stale docs, add public-release plan
estimate_physics was abstract on LLMProvider and implemented by every provider, but pass 2 has been estimator-only for a while -- nothing called it. Removed it along with PHYSICS_ESTIMATION_PROMPT, format_metrics_for_prompt and parse_metric_json. STATUS.md and the original IMPLEMENTATION_PLAN.md described a project that no longer exists; replaced with a phased plan for making the repo and a hosted demo safe and presentable. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
17
CLAUDE.md
17
CLAUDE.md
@@ -9,7 +9,7 @@ PhysCom (Physical Combinatorics) — innovation discovery engine that generates
|
||||
## Commands
|
||||
|
||||
- **Install**: `pip install -e ".[dev,web]"` (editable install with test and web deps)
|
||||
- **Tests (all)**: `python -m pytest tests/ -q` (134 tests, ~2 min). Run after every change.
|
||||
- **Tests (all)**: `python -m pytest tests/ -q` (~130 tests, ~2 min). Run after every change.
|
||||
- **Single test file**: `python -m pytest tests/test_scorer.py -q`
|
||||
- **Single test**: `python -m pytest tests/test_scorer.py::test_score_combination -q`
|
||||
- **Web dev server**: `python -m physcom_web`
|
||||
@@ -27,17 +27,20 @@ src/physcom/ # Core library (no web dependency)
|
||||
engine/combinator.py # Cartesian product of entities across dimensions
|
||||
engine/constraint_resolver.py # Pass 1: requires/excludes/mutex/range/force checks
|
||||
engine/scorer.py # Pass 3: log-normalize raw→0-1, weighted geometric mean composite
|
||||
engine/formula.py # Safe AST evaluator for domain-authored pass-2 formulas
|
||||
engine/pipeline.py # Orchestrator: combo-first loop, incremental saves, resume, cancel
|
||||
llm/base.py # LLMProvider ABC (estimate_physics, review_plausibility)
|
||||
llm/providers/mock.py # MockLLMProvider for tests
|
||||
seed/transport_example.py # 9 platforms + 9 power sources, 2 domains
|
||||
llm/base.py # LLMProvider ABC (review_plausibility — pass 4 only)
|
||||
llm/registry.py # build_llm_provider() from LLM_PROVIDER env / web form
|
||||
llm/providers/ # gemini.py, ollama.py, mock.py (tests)
|
||||
seed/transport_example.py # 11 platforms × 15 actuators × 18 energy storages, 5 domains
|
||||
|
||||
src/physcom_web/ # Flask web UI
|
||||
app.py # App factory, get_repo(), DB path resolution
|
||||
routes/pipeline.py # Background thread pipeline execution, HTMX status/cancel endpoints
|
||||
routes/results.py # Results browse, detail view, human review submission
|
||||
routes/entities.py # Entity CRUD
|
||||
routes/domains.py # Domain listing
|
||||
routes/domains.py # Domain CRUD: metrics, free variables, formulas
|
||||
routes/admin.py # Reseed, wipe, JSON snapshot export/import
|
||||
templates/ # Jinja2, extends base.html, uses HTMX for polling
|
||||
static/style.css # Single stylesheet
|
||||
|
||||
@@ -62,12 +65,12 @@ tests/ # pytest, uses seeded_repo fixture from conftest.py
|
||||
1. **Pass 1 — Constraints**: `ConstraintResolver.resolve()` → blocked/conditional/valid. Blocked combos get a result row and `continue`.
|
||||
2. **Pass 2 — Estimation**: `_estimate_physics()` (deterministic physics engine; estimator-only, no LLM) → raw metric values. Saved immediately via `save_raw_estimates()` (normalized_score=NULL).
|
||||
3. **Pass 3 — Scoring**: `Scorer.score_combination()` → log-normalized scores + weighted geometric mean composite. Saves via `save_scores()` + `save_result()`.
|
||||
4. **Pass 4 — LLM Review**: Only for above-threshold combos with an LLM provider. No real provider yet (only `MockLLMProvider`).
|
||||
4. **Pass 4 — LLM Review**: Only for above-threshold combos with an LLM provider (Gemini or Ollama, via `llm/registry.py`).
|
||||
5. **Pass 5 — Human Review**: Manual via web UI results page.
|
||||
|
||||
## Testing
|
||||
|
||||
- Tests use `seeded_repo` fixture (in-memory SQLite with transport seed data: 9 platforms, 9 power sources, 2 domains). There's also a bare `repo` fixture for tests that seed their own data.
|
||||
- Tests use `seeded_repo` fixture (in-memory SQLite with the transport seed data). There's also a bare `repo` fixture for tests that seed their own data.
|
||||
- Individual entity fixtures (walking, bicycle, spaceship, solar_sail, etc.) are defined in `conftest.py`.
|
||||
|
||||
## Conventions
|
||||
|
||||
Reference in New Issue
Block a user