Skip to content

chore: Flow-first policy with a Python ratchet written in Flow - #981

Merged
godofecht merged 1 commit into
mainfrom
chore/python-ratchet
Sep 27, 2026
Merged

godofecht merged 1 commit into
mainfrom
chore/python-ratchet

Conversation

@godofecht

Copy link
Copy Markdown
Contributor

New code is written in Flow. This adds a ratchet that stops tracked Python from growing.

  • scripts/python_ratchet.sh builds tools/python_ratchet/main.flow from the checked-in Stage-A bootstrap C and runs it. No Python is needed.
  • The check fails when a new .py file appears or when tracked Python grows past tools/python_ratchet/baseline.txt (480 files, 130042 lines).
  • --update rewrites the baseline, and only ever tightens it.
  • A new CI job, python-ratchet, runs it on every push.
  • .claude/settings.json adds an agent hook (tools/hooks/no_new_python.sh) that refuses to create .py files.
  • AGENTS.md gains a "Flow first" section. CONTRIBUTING.md states the same policy.

New code is written in Flow. scripts/python_ratchet.sh builds
tools/python_ratchet/main.flow from the checked-in Stage-A bootstrap C and
fails when a new .py file appears or tracked Python grows past
tools/python_ratchet/baseline.txt (480 files, 130042 lines). --update only
tightens the baseline.

CI runs it ungated with no Python installed. A committed agent hook in .claude/settings.json
refuses to create .py files. AGENTS.md and CONTRIBUTING.md state the policy.
@godofecht
godofecht merged commit 0b6d6ac into main Sep 27, 2026
24 checks passed
godofecht added a commit that referenced this pull request Sep 29, 2026
Adds the scripts and tools ported to Flow in #959, #965 and #981, notes
that flow run needs no Python since #960, and lists open pull requests
as in progress. The LSP is Python and the only server; the Flow REPL is
in open PR #987.
godofecht added a commit that referenced this pull request Sep 29, 2026
Adds the scripts and tools ported to Flow in #959, #965 and #981, notes
that flow run needs no Python since #960, and lists open pull requests
as in progress. The LSP is Python and the only server; the Flow REPL is
in open PR #987.
@godofecht
godofecht deleted the chore/python-ratchet branch October 1, 2026 12:49
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