Skip to content

Fix setuptools build failure; add /auto-research ratchet loop#2

Open
tetiioo wants to merge 2 commits into
fjfok:mainfrom
tetiioo:add-auto-research-loop
Open

Fix setuptools build failure; add /auto-research ratchet loop#2
tetiioo wants to merge 2 commits into
fjfok:mainfrom
tetiioo:add-auto-research-loop

Conversation

@tetiioo

@tetiioo tetiioo commented Jul 4, 2026

Copy link
Copy Markdown

Summary

  • Fixes a real uv run/uv sync build failure: setuptools saw both data/ and rest_sim/ as top-level packages under flat-layout discovery and refused to build. Added [tool.setuptools.packages.find] include = ["rest_sim*"] to pyproject.toml and committed the resulting uv.lock.
  • Adds .claude/commands/auto-research.md, a Karpathy-style AutoResearch ratchet loop adapted to this repo: the sole mutable artifact is .claude/agents/restaurant-manager.md (analogous to train.py in the original ML version), the frozen harness is rest_sim/* + /play-month, and the ratchet metric is end-of-month net profit (total_net_profit_eur) gated by hard constraints — mean_reputation >= 4.0 and mean_satisfaction >= 0.75 — rather than the engine's own smooth-penalty score_eur. Each iteration edits the prompt, plays a fixed-seed month via the restaurant-manager subagent, pulls a fresh scorecard, and keeps the commit only if profit improves without violating either constraint.
  • results.tsv (append-only ratchet log) is now gitignored, matching the pattern used for the untracked game/* runtime files.

Test plan

  • uv run python -m rest_sim --help succeeds (previously failed with "Multiple top-level packages discovered in a flat-layout")
  • uv run --with pytest pytest -q — 47/47 tests pass
  • /auto-research run on a clean checkout (not yet run end-to-end — each iteration is a full ~30-day subagent playthrough, so this is a heavier loop than the ML version; worth a maintainer sanity pass before relying on it)

fateme and others added 2 commits July 4, 2026 21:10
uv run/uv sync failed because setuptools saw both data/ and rest_sim/
as top-level packages with no discovery config to disambiguate. Scope
package discovery to rest_sim explicitly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adapts the Karpathy-style AutoResearch ratchet pattern to this repo:
the only mutable artifact is .claude/agents/restaurant-manager.md
(analogous to train.py), the frozen harness is rest_sim/* plus
/play-month, and the ratchet metric is end-of-month net profit
gated by hard constraints (mean_reputation >= 4.0, mean_satisfaction
>= 0.75) instead of the engine's own smooth-penalty score_eur.

Results are logged to an untracked, append-only results.tsv.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant