rigorloop 0.1.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.
- rigorloop-0.1.0/.claude/settings.json +9 -0
- rigorloop-0.1.0/.github/ISSUE_TEMPLATE/bug_report.md +22 -0
- rigorloop-0.1.0/.github/ISSUE_TEMPLATE/feature_request.md +18 -0
- rigorloop-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +10 -0
- rigorloop-0.1.0/.github/dependabot.yml +17 -0
- rigorloop-0.1.0/.github/workflows/ci.yml +105 -0
- rigorloop-0.1.0/.github/workflows/release.yml +60 -0
- rigorloop-0.1.0/.gitignore +223 -0
- rigorloop-0.1.0/.pre-commit-config.yaml +24 -0
- rigorloop-0.1.0/CHANGELOG.md +30 -0
- rigorloop-0.1.0/CLAUDE.md +39 -0
- rigorloop-0.1.0/CODING_STYLE.md +210 -0
- rigorloop-0.1.0/CONTRIBUTING.md +78 -0
- rigorloop-0.1.0/LICENSE +21 -0
- rigorloop-0.1.0/PACKAGING_PLAN.md +292 -0
- rigorloop-0.1.0/PKG-INFO +224 -0
- rigorloop-0.1.0/PLAN.md +535 -0
- rigorloop-0.1.0/README.md +200 -0
- rigorloop-0.1.0/SECURITY.md +26 -0
- rigorloop-0.1.0/examples/contact-cards/examples.jsonl +24 -0
- rigorloop-0.1.0/examples/contact-cards/rigorloop.toml +28 -0
- rigorloop-0.1.0/examples/contact-cards/task.md +12 -0
- rigorloop-0.1.0/justfile +23 -0
- rigorloop-0.1.0/pyproject.toml +92 -0
- rigorloop-0.1.0/scripts/live-smoke.sh +30 -0
- rigorloop-0.1.0/src/rigorloop/__init__.py +18 -0
- rigorloop-0.1.0/src/rigorloop/_version.py +24 -0
- rigorloop-0.1.0/src/rigorloop/core/__init__.py +1 -0
- rigorloop-0.1.0/src/rigorloop/core/config_calcs.py +302 -0
- rigorloop-0.1.0/src/rigorloop/core/dataset_calcs.py +193 -0
- rigorloop-0.1.0/src/rigorloop/core/prompt_calcs.py +329 -0
- rigorloop-0.1.0/src/rigorloop/core/report_calcs.py +194 -0
- rigorloop-0.1.0/src/rigorloop/core/scoring_calcs.py +264 -0
- rigorloop-0.1.0/src/rigorloop/core/strategy_calcs.py +507 -0
- rigorloop-0.1.0/src/rigorloop/core/types.py +649 -0
- rigorloop-0.1.0/src/rigorloop/py.typed +0 -0
- rigorloop-0.1.0/src/rigorloop/shell/__init__.py +1 -0
- rigorloop-0.1.0/src/rigorloop/shell/agent_calls.py +120 -0
- rigorloop-0.1.0/src/rigorloop/shell/cli.py +1111 -0
- rigorloop-0.1.0/src/rigorloop/shell/io_actions.py +497 -0
- rigorloop-0.1.0/tests/__init__.py +0 -0
- rigorloop-0.1.0/tests/conftest.py +194 -0
- rigorloop-0.1.0/tests/test_agent_calls.py +137 -0
- rigorloop-0.1.0/tests/test_cli.py +124 -0
- rigorloop-0.1.0/tests/test_config_calcs.py +266 -0
- rigorloop-0.1.0/tests/test_dataset_calcs.py +193 -0
- rigorloop-0.1.0/tests/test_e2e.py +289 -0
- rigorloop-0.1.0/tests/test_io_actions.py +216 -0
- rigorloop-0.1.0/tests/test_leakage.py +138 -0
- rigorloop-0.1.0/tests/test_prompt_calcs.py +196 -0
- rigorloop-0.1.0/tests/test_report_calcs.py +168 -0
- rigorloop-0.1.0/tests/test_scoring_calcs.py +257 -0
- rigorloop-0.1.0/tests/test_strategy_calcs.py +443 -0
- rigorloop-0.1.0/uv.lock +570 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Something misbehaved
|
|
4
|
+
labels: bug
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What happened
|
|
8
|
+
|
|
9
|
+
<!-- What did you run, what did you expect, what happened instead? -->
|
|
10
|
+
|
|
11
|
+
## Reproduction
|
|
12
|
+
|
|
13
|
+
- `rigorloop --version`:
|
|
14
|
+
- OS:
|
|
15
|
+
- `rigorloop.toml` (redact anything sensitive):
|
|
16
|
+
- Command and full output:
|
|
17
|
+
|
|
18
|
+
## Run artifacts
|
|
19
|
+
|
|
20
|
+
If the failure happened mid-run, the contents of `runs/<run_id>/` (especially
|
|
21
|
+
`state.json` and the relevant `loops/<n>/` directory) are the most useful
|
|
22
|
+
thing you can attach — minus anything confidential in your examples.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Propose an improvement
|
|
4
|
+
labels: enhancement
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## The problem
|
|
8
|
+
|
|
9
|
+
<!-- What are you trying to do that RigorLoop makes hard? -->
|
|
10
|
+
|
|
11
|
+
## Proposed behavior
|
|
12
|
+
|
|
13
|
+
<!-- What would you like to happen? Config sketch welcome. -->
|
|
14
|
+
|
|
15
|
+
## Statistical implications (if any)
|
|
16
|
+
|
|
17
|
+
<!-- RigorLoop's core promise is honest evaluation. If your proposal touches
|
|
18
|
+
splits, peeks, selection, or reporting, say how it keeps that promise. -->
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Summary
|
|
2
|
+
|
|
3
|
+
<!-- What does this PR change, and why? -->
|
|
4
|
+
|
|
5
|
+
## Checklist
|
|
6
|
+
|
|
7
|
+
- [ ] `just check` passes locally (ruff, mypy --strict, pytest with coverage gates)
|
|
8
|
+
- [ ] New logic lives in the functional core where possible (see `CODING_STYLE.md`)
|
|
9
|
+
- [ ] Leakage guarantees untouched, or their tests extended
|
|
10
|
+
- [ ] `CHANGELOG.md` updated if `src/` changed
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "uv"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
groups:
|
|
8
|
+
python-dev:
|
|
9
|
+
patterns: ["*"]
|
|
10
|
+
|
|
11
|
+
- package-ecosystem: "github-actions"
|
|
12
|
+
directory: "/"
|
|
13
|
+
schedule:
|
|
14
|
+
interval: "weekly"
|
|
15
|
+
groups:
|
|
16
|
+
actions:
|
|
17
|
+
patterns: ["*"]
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ci-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
with:
|
|
21
|
+
fetch-depth: 0
|
|
22
|
+
- uses: astral-sh/setup-uv@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
enable-cache: true
|
|
26
|
+
- run: uv sync --locked
|
|
27
|
+
- run: uv run ruff check .
|
|
28
|
+
- run: uv run ruff format --check .
|
|
29
|
+
|
|
30
|
+
typecheck:
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
steps:
|
|
33
|
+
- uses: actions/checkout@v4
|
|
34
|
+
with:
|
|
35
|
+
fetch-depth: 0
|
|
36
|
+
- uses: astral-sh/setup-uv@v5
|
|
37
|
+
with:
|
|
38
|
+
python-version: "3.12"
|
|
39
|
+
enable-cache: true
|
|
40
|
+
- run: uv sync --locked
|
|
41
|
+
- run: uv run mypy
|
|
42
|
+
|
|
43
|
+
test:
|
|
44
|
+
strategy:
|
|
45
|
+
fail-fast: false
|
|
46
|
+
matrix:
|
|
47
|
+
python: ["3.12", "3.13", "3.14"]
|
|
48
|
+
os: [ubuntu-latest, macos-latest]
|
|
49
|
+
runs-on: ${{ matrix.os }}
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v4
|
|
52
|
+
with:
|
|
53
|
+
fetch-depth: 0
|
|
54
|
+
- uses: astral-sh/setup-uv@v5
|
|
55
|
+
with:
|
|
56
|
+
python-version: ${{ matrix.python }}
|
|
57
|
+
enable-cache: true
|
|
58
|
+
- run: uv sync --locked
|
|
59
|
+
- run: uv run pytest --cov --cov-report=term >> "$GITHUB_STEP_SUMMARY"
|
|
60
|
+
- run: uv run coverage report --include='*/rigorloop/core/*' --fail-under=95
|
|
61
|
+
|
|
62
|
+
build:
|
|
63
|
+
runs-on: ubuntu-latest
|
|
64
|
+
steps:
|
|
65
|
+
- uses: actions/checkout@v4
|
|
66
|
+
with:
|
|
67
|
+
fetch-depth: 0
|
|
68
|
+
- uses: astral-sh/setup-uv@v5
|
|
69
|
+
with:
|
|
70
|
+
python-version: "3.12"
|
|
71
|
+
enable-cache: true
|
|
72
|
+
- run: uv build
|
|
73
|
+
- run: uvx twine check --strict dist/*
|
|
74
|
+
- name: Smoke-test the built wheel in a fresh venv
|
|
75
|
+
run: |
|
|
76
|
+
uv venv /tmp/wheel-venv
|
|
77
|
+
VIRTUAL_ENV=/tmp/wheel-venv uv pip install dist/*.whl
|
|
78
|
+
/tmp/wheel-venv/bin/rigorloop --version
|
|
79
|
+
/tmp/wheel-venv/bin/python -c "import rigorloop"
|
|
80
|
+
- uses: actions/upload-artifact@v4
|
|
81
|
+
with:
|
|
82
|
+
name: dist
|
|
83
|
+
path: dist/
|
|
84
|
+
|
|
85
|
+
changelog-reminder:
|
|
86
|
+
if: github.event_name == 'pull_request'
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
steps:
|
|
89
|
+
- uses: actions/checkout@v4
|
|
90
|
+
with:
|
|
91
|
+
fetch-depth: 0
|
|
92
|
+
- name: Warn when src/ changes without a CHANGELOG entry (advisory)
|
|
93
|
+
run: |
|
|
94
|
+
git fetch origin "${{ github.base_ref }}" --depth=1
|
|
95
|
+
changed=$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD)
|
|
96
|
+
if echo "$changed" | grep -q '^src/' && ! echo "$changed" | grep -q '^CHANGELOG.md'; then
|
|
97
|
+
echo "::warning::This PR touches src/ without updating CHANGELOG.md"
|
|
98
|
+
fi
|
|
99
|
+
|
|
100
|
+
ci-ok:
|
|
101
|
+
# The single required status check for branch protection (matrix-proof).
|
|
102
|
+
needs: [lint, typecheck, test, build]
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
steps:
|
|
105
|
+
- run: echo "all green"
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v[0-9]+.[0-9]+.[0-9]+*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
# Rebuild from the tag; never reuse CI artifacts.
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
- uses: astral-sh/setup-uv@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
- run: uv build
|
|
23
|
+
- run: uvx twine check --strict dist/*
|
|
24
|
+
- uses: actions/upload-artifact@v4
|
|
25
|
+
with:
|
|
26
|
+
name: dist
|
|
27
|
+
path: dist/
|
|
28
|
+
|
|
29
|
+
publish-pypi:
|
|
30
|
+
needs: build
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment: pypi
|
|
33
|
+
permissions:
|
|
34
|
+
id-token: write # OIDC Trusted Publishing; no API token exists
|
|
35
|
+
steps:
|
|
36
|
+
# Download-and-publish only: no project code runs with the OIDC token.
|
|
37
|
+
- uses: actions/download-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: dist
|
|
40
|
+
path: dist/
|
|
41
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
42
|
+
|
|
43
|
+
github-release:
|
|
44
|
+
needs: publish-pypi
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
permissions:
|
|
47
|
+
contents: write
|
|
48
|
+
steps:
|
|
49
|
+
- uses: actions/checkout@v4
|
|
50
|
+
- uses: actions/download-artifact@v4
|
|
51
|
+
with:
|
|
52
|
+
name: dist
|
|
53
|
+
path: dist/
|
|
54
|
+
- name: Create GitHub Release with notes and artifacts
|
|
55
|
+
env:
|
|
56
|
+
GH_TOKEN: ${{ github.token }}
|
|
57
|
+
run: |
|
|
58
|
+
gh release create "$GITHUB_REF_NAME" dist/* \
|
|
59
|
+
--title "$GITHUB_REF_NAME" \
|
|
60
|
+
--generate-notes
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
219
|
+
|
|
220
|
+
# RigorLoop additions
|
|
221
|
+
src/rigorloop/_version.py
|
|
222
|
+
runs/
|
|
223
|
+
.uv-cache/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v5.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: end-of-file-fixer
|
|
6
|
+
- id: trailing-whitespace
|
|
7
|
+
- id: check-toml
|
|
8
|
+
- id: check-yaml
|
|
9
|
+
|
|
10
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
11
|
+
rev: v0.8.4
|
|
12
|
+
hooks:
|
|
13
|
+
- id: ruff
|
|
14
|
+
args: [--fix]
|
|
15
|
+
- id: ruff-format
|
|
16
|
+
|
|
17
|
+
- repo: local
|
|
18
|
+
hooks:
|
|
19
|
+
- id: mypy
|
|
20
|
+
name: mypy (strict)
|
|
21
|
+
entry: uv run mypy
|
|
22
|
+
language: system
|
|
23
|
+
types: [python]
|
|
24
|
+
pass_filenames: false
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file, following
|
|
4
|
+
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
5
|
+
[SemVer](https://semver.org/) (`0.x`: minor = features/breaking, patch = fixes).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [0.1.0] - 2026-07-08
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Initial implementation of the full RigorLoop protocol:
|
|
14
|
+
- `rigorloop init | check | run | report` CLI.
|
|
15
|
+
- Deterministic dev/validation/test splitting with content-hash manifests,
|
|
16
|
+
exact-duplicate collapsing, and statistical power warnings.
|
|
17
|
+
- Strategy agent / executor agent loop over the `claude` CLI (headless,
|
|
18
|
+
tool-less), with strict output contracts, reformat retries, and a
|
|
19
|
+
fallback path for malformed strategy replies.
|
|
20
|
+
- Checks: exact/normalized/JSON/regex/numeric matching, custom Python
|
|
21
|
+
checkers, and n-sample majority-vote LLM judges.
|
|
22
|
+
- Statistics: Wilson intervals, seeded bootstrap CIs, exact McNemar paired
|
|
23
|
+
tests; CI-band-gated champion selection, budgeted validation peeks, and
|
|
24
|
+
a one-shot final test evaluation with a selection-bias caveat in the
|
|
25
|
+
report.
|
|
26
|
+
- Solution kinds: executable Python scripts, agent skills (SKILL.md), and
|
|
27
|
+
guidance markdown (AGENTS.md/CLAUDE.md style).
|
|
28
|
+
- Resumable run directories (`runs/<run_id>/`) with split-drift protection.
|
|
29
|
+
- Type-level and test-level leakage guards keeping holdout data out of all
|
|
30
|
+
agent-context prompts.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# CLAUDE.md for RigorLoop
|
|
2
|
+
|
|
3
|
+
## Project overview
|
|
4
|
+
|
|
5
|
+
This a is statistically-sound agentic build framework that employs agentic loops to create code artifacts (whether a script, a skill markdown file, etc). Crucially, it splits verification data into the classic data science-like dev, validation, and final test sets to avoid overfitting.
|
|
6
|
+
|
|
7
|
+
This framework IS NOT meant to be used when someone wants to create an agentic engineering loop to produce a simple, deterministic script that will pass a series of simple unit tests. Instead, it is meant to be used for data science-like efforts like when the user needs to create a coding solution to take a set of inputs (structured or unstructured text data) and convert it into a set of structured outputs. The user would provide this frame with a (hopefully) large set of gold-standard, correct example inputs and outputs, and this agentic framework attempts to create a coding solution through statistically-rigorous loops and verifications.
|
|
8
|
+
|
|
9
|
+
The "coding solution" can take a number of forms:
|
|
10
|
+
|
|
11
|
+
- a set of executable scripts
|
|
12
|
+
- a "skill" for an agentic coding harness (e.g. Claude Skills)
|
|
13
|
+
- a markdown file to guide agents (e.g. AGENTS.md, CLAUDE.md, etc.)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Requirements
|
|
17
|
+
|
|
18
|
+
* A strict splitting of a "development", "validation", and "final test" set must be made out of the input data the user provides.
|
|
19
|
+
* The user must provide structured input text with the expected output too. The user must provide a set of either deterministic or probablistic verifications/checks of the proposed solutions. This framework must flexibly allow for whatever the user provides (within realistic bounds and with guidelines). The examples the user provides should be highly-representative of the universe of inputs and outputs they might encounter.
|
|
20
|
+
* The framework will generate a series of solutions that iteratively improve through a series of loops.
|
|
21
|
+
* The framework will employ a strategy agent (with its own prompt) and a series of execution agents (with their own prompts). The strategy agent will review each iterations results on the "development" set, and periodically spin up an agent to test the best approach on the "validation" set. Each execution agent will only be able to see the current loop's strategy and not know about prior loops. The one sanctioned exception: the strategy agent may embed the current champion solution's *content* in a directive as a refinement starting point — solution content only, never scores, mistakes, or per-example failures from prior loops.
|
|
22
|
+
* Protection must be taken to prevent data leakage among the agents: e.g. an execution agent sees all mistakes from prior loops. Again, the idea is that the strategy agent understands what works and doesn't work, loop-to-loop, keeps a log for itself, and farms out the pure execution to a set of concurrent executor agents. This leakage guarantee applies to *agent-context* prompts (strategy and executor). *Evaluation* prompts — running a solution-under-test or an LLM judge on a single example — necessarily embed that example (whatever its split) and are a separate, sanctioned channel whose outputs return only to the harness as scores.
|
|
23
|
+
* The final loop will produce the best performing coding solution, which should be able to be copied by the user, used outside of this framework, and produce good results for them on new input data.
|
|
24
|
+
* Claude will be called in headless model and without tools (`claude -p --tools ""`) to spin up the above agents.
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## Comprehensive implementation plan
|
|
28
|
+
|
|
29
|
+
See the plan in `PLAN.md`
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
## Coding style
|
|
33
|
+
|
|
34
|
+
See the rules and guidelines described in `CODING_STYLE.md`
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## Packaging as an open source release
|
|
38
|
+
|
|
39
|
+
See the `PACKAGING_PLAN.md` file for instructions on how to setup the packaging around this framework. Includes details on dependencies, the `pyproject.toml` file, linting, testing, and deploying to PyPi.
|