keelyard 1.0.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.
- keelyard-1.0.0/.github/ISSUE_TEMPLATE/bug_report.yml +27 -0
- keelyard-1.0.0/.github/ISSUE_TEMPLATE/config.yml +5 -0
- keelyard-1.0.0/.github/ISSUE_TEMPLATE/feature_request.yml +18 -0
- keelyard-1.0.0/.github/pull_request_template.md +7 -0
- keelyard-1.0.0/.github/workflows/ci.yml +49 -0
- keelyard-1.0.0/.github/workflows/docs.yml +14 -0
- keelyard-1.0.0/.github/workflows/publish.yml +29 -0
- keelyard-1.0.0/.gitignore +11 -0
- keelyard-1.0.0/.gitleaks.toml +7 -0
- keelyard-1.0.0/AGENTS-install.md +46 -0
- keelyard-1.0.0/BENCHMARKS.md +184 -0
- keelyard-1.0.0/CHANGELOG.md +151 -0
- keelyard-1.0.0/CODE_OF_CONDUCT.md +83 -0
- keelyard-1.0.0/CONTRIBUTING.md +27 -0
- keelyard-1.0.0/LICENSE +202 -0
- keelyard-1.0.0/NOTICE +45 -0
- keelyard-1.0.0/PKG-INFO +164 -0
- keelyard-1.0.0/README.md +136 -0
- keelyard-1.0.0/ROADMAP.md +36 -0
- keelyard-1.0.0/SECURITY.md +26 -0
- keelyard-1.0.0/bench/corpus/cargo-build.log +25 -0
- keelyard-1.0.0/bench/corpus/git-clone-progress.log +7 -0
- keelyard-1.0.0/bench/corpus/npm-install-verbose.log +133 -0
- keelyard-1.0.0/bench/corpus/pip-install-verbose.log +55 -0
- keelyard-1.0.0/bench/corpus/pytest-verbose-failing.log +131 -0
- keelyard-1.0.0/bench/corpus/pytest-verbose-passing.log +55 -0
- keelyard-1.0.0/bench/feature_matrix.py +68 -0
- keelyard-1.0.0/bench/mechanisms.json +129 -0
- keelyard-1.0.0/bench/mechanisms.py +311 -0
- keelyard-1.0.0/bench/overhead.json +36 -0
- keelyard-1.0.0/bench/overhead.py +74 -0
- keelyard-1.0.0/bench/plot_vs_rtk.py +30 -0
- keelyard-1.0.0/bench/real/noisy_test_bulk.py +7 -0
- keelyard-1.0.0/bench/real/opencode_bigpickle.json +22 -0
- keelyard-1.0.0/bench/real/opencode_bigpickle_lean.json +22 -0
- keelyard-1.0.0/bench/real/opencode_bigpickle_noisy.json +22 -0
- keelyard-1.0.0/bench/real/proof.txt +1 -0
- keelyard-1.0.0/bench/real/r6/summary.json +62 -0
- keelyard-1.0.0/bench/real/r7/summary.json +42 -0
- keelyard-1.0.0/bench/real/r8/summary.json +112 -0
- keelyard-1.0.0/bench/real/r9/summary.json +62 -0
- keelyard-1.0.0/bench/real/rewind-back.txt +12 -0
- keelyard-1.0.0/bench/real/rewind-list.txt +4 -0
- keelyard-1.0.0/bench/real/rewind-test.txt +13 -0
- keelyard-1.0.0/bench/real/status.txt +11 -0
- keelyard-1.0.0/bench/real/summarize.py +23 -0
- keelyard-1.0.0/bench/real/table.py +20 -0
- keelyard-1.0.0/bench/session/report.py +64 -0
- keelyard-1.0.0/bench/session/run.py +139 -0
- keelyard-1.0.0/bench/session/runs.jsonl +60 -0
- keelyard-1.0.0/bench/session/runs_v0.jsonl +36 -0
- keelyard-1.0.0/bench/session/runs_v1.jsonl +15 -0
- keelyard-1.0.0/bench/session/runs_v2.jsonl +18 -0
- keelyard-1.0.0/bench/session/runs_v3.jsonl +66 -0
- keelyard-1.0.0/bench/session/runs_v4.jsonl +46 -0
- keelyard-1.0.0/bench/session/tasks.py +123 -0
- keelyard-1.0.0/bench/swarm_openrouter_free.json +57 -0
- keelyard-1.0.0/bench/swarm_quality.json +168 -0
- keelyard-1.0.0/bench/swarm_quality.py +150 -0
- keelyard-1.0.0/bench/terse.json +190 -0
- keelyard-1.0.0/bench/terse.py +125 -0
- keelyard-1.0.0/bench/terse_s_qc.json +69 -0
- keelyard-1.0.0/bench/vs_rtk.py +190 -0
- keelyard-1.0.0/bench/vs_rtk_results.json +74 -0
- keelyard-1.0.0/ci/clean_env.sh +38 -0
- keelyard-1.0.0/docs/BENCHMARKS.md +219 -0
- keelyard-1.0.0/docs/assets/extra.css +19 -0
- keelyard-1.0.0/docs/assets/fonts/geist-mono.woff2 +0 -0
- keelyard-1.0.0/docs/assets/fonts/geist.woff2 +0 -0
- keelyard-1.0.0/docs/assets/logo.svg +1 -0
- keelyard-1.0.0/docs/cli.md +733 -0
- keelyard-1.0.0/docs/config.md +97 -0
- keelyard-1.0.0/docs/demo/gen_reference.py +84 -0
- keelyard-1.0.0/docs/demo/hero.cast +144 -0
- keelyard-1.0.0/docs/demo/hero.sh +49 -0
- keelyard-1.0.0/docs/demo/screens.py +145 -0
- keelyard-1.0.0/docs/feature-matrix.md +191 -0
- keelyard-1.0.0/docs/guarantees.md +77 -0
- keelyard-1.0.0/docs/guide/agents.md +47 -0
- keelyard-1.0.0/docs/guide/arena.md +22 -0
- keelyard-1.0.0/docs/guide/brain.md +57 -0
- keelyard-1.0.0/docs/guide/context.md +39 -0
- keelyard-1.0.0/docs/guide/memory.md +23 -0
- keelyard-1.0.0/docs/guide/presets.md +27 -0
- keelyard-1.0.0/docs/guide/proof.md +44 -0
- keelyard-1.0.0/docs/guide/rewind.md +35 -0
- keelyard-1.0.0/docs/guide/swarm.md +95 -0
- keelyard-1.0.0/docs/img/arena-chart.png +0 -0
- keelyard-1.0.0/docs/img/arena-report.png +0 -0
- keelyard-1.0.0/docs/img/cli-doctor.png +0 -0
- keelyard-1.0.0/docs/img/cli-doctor.svg +152 -0
- keelyard-1.0.0/docs/img/cli-error.png +0 -0
- keelyard-1.0.0/docs/img/cli-error.svg +76 -0
- keelyard-1.0.0/docs/img/cli-help.png +0 -0
- keelyard-1.0.0/docs/img/cli-help.svg +290 -0
- keelyard-1.0.0/docs/img/cli-init.png +0 -0
- keelyard-1.0.0/docs/img/cli-init.svg +80 -0
- keelyard-1.0.0/docs/img/cli-json.png +0 -0
- keelyard-1.0.0/docs/img/cli-json.svg +210 -0
- keelyard-1.0.0/docs/img/cli-rewind-show.png +0 -0
- keelyard-1.0.0/docs/img/cli-rewind-show.svg +150 -0
- keelyard-1.0.0/docs/img/cli-rewind.png +0 -0
- keelyard-1.0.0/docs/img/cli-rewind.svg +88 -0
- keelyard-1.0.0/docs/img/cli-selftest.png +0 -0
- keelyard-1.0.0/docs/img/cli-selftest.svg +265 -0
- keelyard-1.0.0/docs/img/cli-status.png +0 -0
- keelyard-1.0.0/docs/img/cli-status.svg +93 -0
- keelyard-1.0.0/docs/img/hero.gif +0 -0
- keelyard-1.0.0/docs/img/hero.png +0 -0
- keelyard-1.0.0/docs/img/proof-report.png +0 -0
- keelyard-1.0.0/docs/img/real/rewind.svg +158 -0
- keelyard-1.0.0/docs/img/real/status.svg +118 -0
- keelyard-1.0.0/docs/img/timeline-confirm.png +0 -0
- keelyard-1.0.0/docs/img/timeline-confirm.svg +176 -0
- keelyard-1.0.0/docs/img/timeline.png +0 -0
- keelyard-1.0.0/docs/img/timeline.svg +168 -0
- keelyard-1.0.0/docs/img/vs-rtk.png +0 -0
- keelyard-1.0.0/docs/index.md +34 -0
- keelyard-1.0.0/docs/json.md +25 -0
- keelyard-1.0.0/docs/landscape.md +24 -0
- keelyard-1.0.0/docs/mcp.md +173 -0
- keelyard-1.0.0/docs/quickstart.md +56 -0
- keelyard-1.0.0/docs/research/ideas.md +84 -0
- keelyard-1.0.0/docs/troubleshooting.md +24 -0
- keelyard-1.0.0/examples/arena/discount/contenders/oneshot.py +38 -0
- keelyard-1.0.0/examples/arena/discount/contenders/reference.py +14 -0
- keelyard-1.0.0/examples/arena/discount/repo/cart.py +3 -0
- keelyard-1.0.0/examples/arena/discount/repo/test_cart.py +20 -0
- keelyard-1.0.0/examples/arena/discount/results-local/results.json +223 -0
- keelyard-1.0.0/examples/arena/discount/task.local.toml +26 -0
- keelyard-1.0.0/examples/arena/discount/task.toml +26 -0
- keelyard-1.0.0/examples/demo.sh +45 -0
- keelyard-1.0.0/llms.txt +13 -0
- keelyard-1.0.0/mkdocs.yml +60 -0
- keelyard-1.0.0/pyproject.toml +56 -0
- keelyard-1.0.0/requirements-lock.txt +54 -0
- keelyard-1.0.0/src/keelyard/__init__.py +3 -0
- keelyard-1.0.0/src/keelyard/__main__.py +3 -0
- keelyard-1.0.0/src/keelyard/adapters/__init__.py +1 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/SKILL.md +41 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/agents_block.md +8 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/agents_block_lean.md +4 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/cmd_prove.md +9 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/cmd_status.md +5 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/cmd_undo.md +7 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/terse.md +1 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/workflows/debug.md +9 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/workflows/plan.md +11 -0
- keelyard-1.0.0/src/keelyard/adapters/guides/workflows/review.md +9 -0
- keelyard-1.0.0/src/keelyard/adapters/install.py +777 -0
- keelyard-1.0.0/src/keelyard/adapters/opencode_plugin.js +148 -0
- keelyard-1.0.0/src/keelyard/arena.py +253 -0
- keelyard-1.0.0/src/keelyard/assets/OFL-Geist.txt +93 -0
- keelyard-1.0.0/src/keelyard/assets/__init__.py +0 -0
- keelyard-1.0.0/src/keelyard/assets/geist-mono.woff2 +0 -0
- keelyard-1.0.0/src/keelyard/assets/geist.woff2 +0 -0
- keelyard-1.0.0/src/keelyard/bench.py +139 -0
- keelyard-1.0.0/src/keelyard/brain.py +362 -0
- keelyard-1.0.0/src/keelyard/cli.py +1085 -0
- keelyard-1.0.0/src/keelyard/codemap.py +287 -0
- keelyard-1.0.0/src/keelyard/config.py +246 -0
- keelyard-1.0.0/src/keelyard/coop.py +279 -0
- keelyard-1.0.0/src/keelyard/filters.py +358 -0
- keelyard-1.0.0/src/keelyard/hooks.py +366 -0
- keelyard-1.0.0/src/keelyard/locking.py +41 -0
- keelyard-1.0.0/src/keelyard/mcp_server.py +527 -0
- keelyard-1.0.0/src/keelyard/memory.py +306 -0
- keelyard-1.0.0/src/keelyard/proc.py +23 -0
- keelyard-1.0.0/src/keelyard/proof.py +430 -0
- keelyard-1.0.0/src/keelyard/redact.py +35 -0
- keelyard-1.0.0/src/keelyard/report.py +107 -0
- keelyard-1.0.0/src/keelyard/saver.py +187 -0
- keelyard-1.0.0/src/keelyard/selftest.py +200 -0
- keelyard-1.0.0/src/keelyard/session.py +25 -0
- keelyard-1.0.0/src/keelyard/snapshot.py +348 -0
- keelyard-1.0.0/src/keelyard/swarm.py +572 -0
- keelyard-1.0.0/src/keelyard/theme.py +83 -0
- keelyard-1.0.0/src/keelyard/trust.py +153 -0
- keelyard-1.0.0/src/keelyard/tui.py +190 -0
- keelyard-1.0.0/src/keelyard/ui.py +63 -0
- keelyard-1.0.0/src/keelyard/usage.py +137 -0
- keelyard-1.0.0/src/keelyard/workstate.py +146 -0
- keelyard-1.0.0/tests/conftest.py +25 -0
- keelyard-1.0.0/tests/corpus/cargo_test.log +35 -0
- keelyard-1.0.0/tests/corpus/eslint.log +13 -0
- keelyard-1.0.0/tests/corpus/gh_search.json +332 -0
- keelyard-1.0.0/tests/corpus/git_merge_conflict.log +3 -0
- keelyard-1.0.0/tests/corpus/go_test.log +8 -0
- keelyard-1.0.0/tests/corpus/jest_fail.log +24 -0
- keelyard-1.0.0/tests/corpus/mypy.log +6 -0
- keelyard-1.0.0/tests/corpus/node_test.log +42 -0
- keelyard-1.0.0/tests/corpus/npm_test.log +5 -0
- keelyard-1.0.0/tests/corpus/pyright.log +9 -0
- keelyard-1.0.0/tests/corpus/pytest_mixed.log +38 -0
- keelyard-1.0.0/tests/corpus/pytest_verbose.log +47 -0
- keelyard-1.0.0/tests/corpus/python_traceback.log +17 -0
- keelyard-1.0.0/tests/corpus/ruff.log +56 -0
- keelyard-1.0.0/tests/matrix.py +294 -0
- keelyard-1.0.0/tests/test_adversarial.py +474 -0
- keelyard-1.0.0/tests/test_bench_mechanisms.py +27 -0
- keelyard-1.0.0/tests/test_brain.py +166 -0
- keelyard-1.0.0/tests/test_cli_polish.py +123 -0
- keelyard-1.0.0/tests/test_codemap_usage_arena.py +111 -0
- keelyard-1.0.0/tests/test_coop.py +158 -0
- keelyard-1.0.0/tests/test_filter_corpus.py +114 -0
- keelyard-1.0.0/tests/test_filters.py +131 -0
- keelyard-1.0.0/tests/test_global.py +120 -0
- keelyard-1.0.0/tests/test_install.py +97 -0
- keelyard-1.0.0/tests/test_lean.py +171 -0
- keelyard-1.0.0/tests/test_lean_defaults.py +66 -0
- keelyard-1.0.0/tests/test_matrix.py +37 -0
- keelyard-1.0.0/tests/test_mcp_stdio.py +97 -0
- keelyard-1.0.0/tests/test_memory.py +66 -0
- keelyard-1.0.0/tests/test_navigation.py +85 -0
- keelyard-1.0.0/tests/test_opencode_db.py +67 -0
- keelyard-1.0.0/tests/test_opencode_plugin.py +101 -0
- keelyard-1.0.0/tests/test_presets.py +83 -0
- keelyard-1.0.0/tests/test_proof_hooks.py +85 -0
- keelyard-1.0.0/tests/test_redact.py +18 -0
- keelyard-1.0.0/tests/test_rename_hint.py +23 -0
- keelyard-1.0.0/tests/test_repeat_failure.py +52 -0
- keelyard-1.0.0/tests/test_saver.py +95 -0
- keelyard-1.0.0/tests/test_session_gate.py +36 -0
- keelyard-1.0.0/tests/test_snapshot.py +40 -0
- keelyard-1.0.0/tests/test_swarm.py +78 -0
- keelyard-1.0.0/tests/test_swarm2.py +144 -0
- keelyard-1.0.0/tests/test_swarm_cli.py +89 -0
- keelyard-1.0.0/tests/test_trust.py +262 -0
- keelyard-1.0.0/tests/test_tui.py +67 -0
- keelyard-1.0.0/tests/test_workstate.py +69 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Something in keelyard does not work as documented
|
|
3
|
+
labels: ["bug"]
|
|
4
|
+
body:
|
|
5
|
+
- type: dropdown
|
|
6
|
+
id: agent
|
|
7
|
+
attributes:
|
|
8
|
+
label: Agent
|
|
9
|
+
options: [Claude Code, Codex, OpenCode, CLI only, Other]
|
|
10
|
+
validations: { required: true }
|
|
11
|
+
- type: input
|
|
12
|
+
id: versions
|
|
13
|
+
attributes:
|
|
14
|
+
label: Versions
|
|
15
|
+
description: "`keelyard --version`, the agent's version, OS"
|
|
16
|
+
validations: { required: true }
|
|
17
|
+
- type: textarea
|
|
18
|
+
id: what
|
|
19
|
+
attributes:
|
|
20
|
+
label: What happened, and what did you expect?
|
|
21
|
+
validations: { required: true }
|
|
22
|
+
- type: textarea
|
|
23
|
+
id: logs
|
|
24
|
+
attributes:
|
|
25
|
+
label: Relevant lines from .keelyard/hook.log
|
|
26
|
+
description: Remove secrets and private paths first.
|
|
27
|
+
render: text
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Feature or adapter request
|
|
2
|
+
description: A new filter, agent adapter, proof check or benchmark
|
|
3
|
+
labels: ["enhancement"]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: What costs you tokens, time or trust today?
|
|
9
|
+
validations: { required: true }
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: idea
|
|
12
|
+
attributes:
|
|
13
|
+
label: Proposed behaviour
|
|
14
|
+
- type: textarea
|
|
15
|
+
id: sample
|
|
16
|
+
attributes:
|
|
17
|
+
label: A real sample (command output, transcript snippet), with secrets removed
|
|
18
|
+
render: text
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
## What and why
|
|
2
|
+
|
|
3
|
+
## How I verified it
|
|
4
|
+
- [ ] `pytest -q` and `ruff check src tests` pass
|
|
5
|
+
- [ ] New behaviour has a test (hooks: never crash the agent; filters: keep every failure/error line)
|
|
6
|
+
- [ ] Any number in docs comes from `keelyard bench` or a script in `bench/`, with machine and date
|
|
7
|
+
- [ ] No secrets, personal paths or copied third-party code (see NOTICE)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
on: [push, pull_request]
|
|
3
|
+
permissions:
|
|
4
|
+
contents: read
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ${{ matrix.os }}
|
|
8
|
+
defaults:
|
|
9
|
+
run:
|
|
10
|
+
shell: bash
|
|
11
|
+
strategy:
|
|
12
|
+
fail-fast: false
|
|
13
|
+
matrix:
|
|
14
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
15
|
+
python: ["3.11", "3.12", "3.13"]
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python }}
|
|
21
|
+
- run: pip install -e ".[dev]"
|
|
22
|
+
- run: ruff check src tests bench
|
|
23
|
+
- run: pytest -q
|
|
24
|
+
- run: keelyard selftest
|
|
25
|
+
clean-env:
|
|
26
|
+
# fresh venv + fresh HOME + non-editable install: init, doctor, selftest, uninstall leaves no trace
|
|
27
|
+
runs-on: ${{ matrix.os }}
|
|
28
|
+
defaults:
|
|
29
|
+
run:
|
|
30
|
+
shell: bash
|
|
31
|
+
strategy:
|
|
32
|
+
fail-fast: false
|
|
33
|
+
matrix:
|
|
34
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
- uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.13"
|
|
40
|
+
- run: bash ci/clean_env.sh
|
|
41
|
+
docs:
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v4
|
|
45
|
+
- uses: actions/setup-python@v5
|
|
46
|
+
with:
|
|
47
|
+
python-version: "3.13"
|
|
48
|
+
- run: pip install mkdocs-material
|
|
49
|
+
- run: mkdocs build --strict
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
name: docs
|
|
2
|
+
on: workflow_dispatch
|
|
3
|
+
permissions:
|
|
4
|
+
contents: write
|
|
5
|
+
jobs:
|
|
6
|
+
deploy:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- uses: actions/checkout@v4
|
|
10
|
+
- uses: actions/setup-python@v5
|
|
11
|
+
with:
|
|
12
|
+
python-version: "3.13"
|
|
13
|
+
- run: pip install mkdocs-material
|
|
14
|
+
- run: mkdocs gh-deploy --force
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Publishes to PyPI when a GitHub release is published, via Trusted Publishing (OIDC, no token stored).
|
|
2
|
+
# One-time setup on pypi.org: pending publisher = owner akobirjontulqinovfuture, repo keelyard,
|
|
3
|
+
# workflow "publish.yml", environment "pypi".
|
|
4
|
+
name: publish
|
|
5
|
+
on:
|
|
6
|
+
release:
|
|
7
|
+
types: [published]
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with: {python-version: "3.12"}
|
|
17
|
+
- run: python -m pip install build twine && python -m build && twine check --strict dist/*
|
|
18
|
+
- uses: actions/upload-artifact@v4
|
|
19
|
+
with: {name: dist, path: dist/}
|
|
20
|
+
publish:
|
|
21
|
+
needs: build
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
environment: pypi
|
|
24
|
+
permissions:
|
|
25
|
+
id-token: write
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/download-artifact@v4
|
|
28
|
+
with: {name: dist, path: dist/}
|
|
29
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Installing keelyard (instructions for coding agents)
|
|
2
|
+
|
|
3
|
+
This page is for a coding agent helping a user who has explicitly asked to install keelyard
|
|
4
|
+
(for example "install https://github.com/akobirjontulqinovfuture/keelyard"). If the user did not ask, do not install it.
|
|
5
|
+
|
|
6
|
+
Before running anything, show the user the commands below and the files they change, and wait for their
|
|
7
|
+
confirmation. `init --global` edits user-level config for every project, so it needs a clear yes.
|
|
8
|
+
|
|
9
|
+
1. Install the CLI (Python 3.11+ and git required):
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pipx install git+https://github.com/akobirjontulqinovfuture/keelyard
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
No pipx: `python -m pip install --user git+https://github.com/akobirjontulqinovfuture/keelyard`, and make sure the
|
|
16
|
+
scripts folder is on PATH (`keelyard --version` must work).
|
|
17
|
+
|
|
18
|
+
2. Wire every agent for every project of this user:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
keelyard init --global
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
| agent | files changed |
|
|
25
|
+
|---|---|
|
|
26
|
+
| Claude Code | `~/.claude/settings.json` (hooks), `~/.claude.json` (MCP server), `~/.claude/CLAUDE.md` (rules block), `~/.claude/skills/keelyard`, `~/.claude/commands/keelyard` |
|
|
27
|
+
| Codex | `~/.codex/config.toml` (`[mcp_servers.keelyard]` between `# keelyard:start/end`), `~/.codex/hooks.json`, `~/.codex/AGENTS.md` |
|
|
28
|
+
| OpenCode | `~/.config/opencode/opencode.json` (MCP), `~/.config/opencode/plugin/keelyard.js`, `~/.config/opencode/AGENTS.md`, `command/keelyard-*.md` |
|
|
29
|
+
|
|
30
|
+
Existing settings are merged, not replaced. The first time a file is changed, the original is kept as
|
|
31
|
+
`<file>.keelyard-backup`. Running it again is safe.
|
|
32
|
+
|
|
33
|
+
3. Verify:
|
|
34
|
+
|
|
35
|
+
```sh
|
|
36
|
+
keelyard doctor --json
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Expect `"ok": true` and one `"section": "global"` check per agent with `"state": "ok"`. Report any `bad` row's
|
|
40
|
+
`detail` to the user; it says how to fix it.
|
|
41
|
+
|
|
42
|
+
4. Let the user know to restart their agent. Each git project sets itself up on its first session
|
|
43
|
+
(`.keelyard/config.toml` plus a first snapshot). Folders that are not git repositories are left alone.
|
|
44
|
+
Codex asks once to trust new hooks (`/hooks`).
|
|
45
|
+
|
|
46
|
+
Remove: `keelyard uninstall --global` removes only keelyard's entries and leaves everything else as it was.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
|
|
2
|
+
## Whole-session tokens, keelyard lean vs none (Oct 17, 2026)
|
|
3
|
+
|
|
4
|
+
Real `opencode run` sessions (OpenCode 1.19.0, free `opencode/big-pickle`, $0) on six task types, each in a fresh
|
|
5
|
+
repo; hidden checks decide success. Total = input + cache read + cache write + output + reasoning, keelyard's brief
|
|
6
|
+
and hints included; every attempt counts. Target: ≥70% saving per task with success not lower than baseline
|
|
7
|
+
(`python bench/session/report.py bench/session/runs_v4.jsonl` exits 1 otherwise). v4 = commit 2b5e877.
|
|
8
|
+
|
|
9
|
+
| task | runs (base/lean) | baseline tokens (mean) | lean tokens (mean) | saving | correct base | correct lean | gate |
|
|
10
|
+
|---|---|---:|---:|---:|---:|---:|---|
|
|
11
|
+
| edit-heavy | 8/8 | 47,958 | 10,626 | 78% | 88% | 100% | pass |
|
|
12
|
+
| log-heavy | 3/3 | 57,614 | 10,373 | 82% | 100% | 100% | pass |
|
|
13
|
+
| qa-large | 3/3 | 20,863 | 3,053 | 85% | 100% | 100% | pass |
|
|
14
|
+
| read-heavy-large | 3/3 | 48,533 | 10,595 | 78% | 100% | 100% | pass |
|
|
15
|
+
| small-feature | 3/3 | 51,916 | 11,965 | 77% | 100% | 100% | pass |
|
|
16
|
+
| tiny-fix | 3/3 | 40,642 | 6,134 | 85% | 100% | 100% | pass |
|
|
17
|
+
| **all (sum of means)** | | 267,525 | 52,745 | 80% | | | |
|
|
18
|
+
|
|
19
|
+
edit-heavy fix (v3 → v4): in v3 one of 8 lean runs made 17 per-file read+edit calls (71k tokens) and missed a use
|
|
20
|
+
(62% saving, 88% correct). The lean brief now carries a rename hint for "rename X to Y" tasks: every tracked file
|
|
21
|
+
holding X and one `perl -pi` command over them; the lean prompt asks for one bulk command. All 8 v4 lean runs used it
|
|
22
|
+
(2–4 calls, 7–16k tokens). v4 re-ran the other tasks with 3 reps each to check for regressions (v3: 5 reps, see
|
|
23
|
+
`runs_v3.jsonl`). One model, one agent, 3–8 reps per task: indicative, not general. Claude Code and Codex are not
|
|
24
|
+
measured here.
|
|
25
|
+
|
|
26
|
+
## Terse-output rule, measured on local models (Oct 17, 2026)
|
|
27
|
+
|
|
28
|
+
`python bench/terse.py --models qwen2.5-0.5b,llama3.2-1b,qwen-coder-1.5b --seeds 1,2` (Ollama, Q4, temperature 0.3):
|
|
29
|
+
32 coding prompts x 2 seeds = 64 answers per model and rule. Tokens are Ollama's own counts, input
|
|
30
|
+
(`prompt_eval_count`, so the rule's cost is included) + output (`eval_count`). "Facts" = the answer contains
|
|
31
|
+
what the prompt needs (identifier, fix, error name). Raw numbers: `bench/terse.json`. $0, no paid calls.
|
|
32
|
+
|
|
33
|
+
| rule | total tokens (3 models) | facts (of 192) |
|
|
34
|
+
|---|---:|---:|
|
|
35
|
+
| old "Be terse: no preamble, no restating the question, no summary of what you are about to do." | 24,053 | 142 |
|
|
36
|
+
| previous rule ("Reply with results only: ... exact and complete.", ~33 tokens) | 31,870 | 150 |
|
|
37
|
+
| **shipped: "Be terse: no preamble or recap. Keep code exact."** (~12 tokens) | **23,428 (−2.6% vs old)** | **155** |
|
|
38
|
+
| "Be terse. Keep code and facts." | 27,310 | 158 |
|
|
39
|
+
| "Be terse: answer first, no preamble or recap; keep code and facts complete." | 28,827 | 155 |
|
|
40
|
+
|
|
41
|
+
Per model (total / facts): qwen2.5-0.5b old 9,444/44, shipped 8,271/45; llama3.2-1b old 6,884/45,
|
|
42
|
+
previous 10,799/52, shipped 7,022/49; qwen-coder-1.5b old 7,725/53, previous 12,342/51, shipped 8,135/61.
|
|
43
|
+
|
|
44
|
+
- The shipped rule beats the old line on total tokens and the previous rule on facts summed over three models,
|
|
45
|
+
but not on every model: on llama3.2-1b it uses 2% more tokens than the old line and keeps fewer facts than the
|
|
46
|
+
previous rule. The token margin over the old line is small. Not measured with Claude or GPT models.
|
|
47
|
+
- Lossless JSON compaction: pretty `gh search repos --json` output 2,121 → 1,236 tokens (−42%), decoded back
|
|
48
|
+
exactly (`bench/mechanisms.py`). An already-minified GitHub issue list shrank only 3%.
|
|
49
|
+
- The repeated-failure hint (about 40 tokens, only when it fires) was not measured for savings.
|
|
50
|
+
|
|
51
|
+
## Token-saving mechanisms, measured locally (Oct 16, 2026)
|
|
52
|
+
|
|
53
|
+
`python bench/mechanisms.py` (no model, no network, $0). Tokens are `chars / 4`. Fixtures: this repo,
|
|
54
|
+
the installed `httpx` package source, and the two-file `examples/arena/discount/repo`. The keelyard row shifts a little with every commit (it measures itself). Each row compares
|
|
55
|
+
keelyard with what an agent does without it, and checks the agent still gets what it needs.
|
|
56
|
+
Raw numbers: [`bench/mechanisms.json`](https://github.com/akobirjontulqinovfuture/keelyard/blob/main/bench/mechanisms.json).
|
|
57
|
+
|
|
58
|
+
| mechanism | baseline | keelyard | keelyard repo | httpx | discount (2 files) | correctness check |
|
|
59
|
+
|---|---|---|---|---|---|---|
|
|
60
|
+
| 1 find code | grep the name, read the whole defining file | ranked `find_symbol` page + outline + the definition's lines + `related` | 16,969 → 3,691 (−78%) | 54,731 → 16,717 (−69%) | 107 → 108 (**+1%**) | the definition is in the slice read |
|
|
61
|
+
| 2 re-reads | read, re-read, read after a 1-line edit (5 largest files) | full, "unchanged" notice, diff | 127,392 → 43,289 (−66%) | 146,937 → 49,689 (−66%) | 456 → 387 (−15%) | diff applied to the first read = the edited file; `force=true` returns all of it |
|
|
62
|
+
| 3 logs, real `pytest -v` | raw output | `filter_output` | 1,233 → 9 (all passed) | – | 401 → 149 (−63%, 2 failures) | every error/failure/count line kept; failing test ids kept |
|
|
63
|
+
| 3 logs, corpus (10 tools, pytest padded with 300 passes) | raw | filtered | 7,965 → 1,502 (−81%) | | | same |
|
|
64
|
+
| 4 paging | every match in one response | first page of 20 + `remaining`/`next_offset` | 8,849 → 416 (−95%) | 7,007 → 324 (−95%) | 99 → 99 (0%) | walking every page returns every result in order |
|
|
65
|
+
| 5 work state | re-read the 3 changed files after a compaction (modeled) | `work_state` render | 26,574 → 241 | 33,055 → 182 | 177 → 111 | every ref resolves to a real file line or command |
|
|
66
|
+
| 6 tool schemas per request | `core` (14 tools) | `lazy` (6 tools) | 2,319 → 927 (−60%) | | | every hidden core tool is found by `tool_search` |
|
|
67
|
+
|
|
68
|
+
What this does not show:
|
|
69
|
+
- Row 1 on a tiny repo is **one token worse**: when the file is smaller than an outline, just read it.
|
|
70
|
+
- Row 4 saves only when the answer is on the first page; reading every page costs slightly more than one dump.
|
|
71
|
+
- Row 5's baseline is a model of what an agent re-reads, not a measured session.
|
|
72
|
+
- Row 6: each on-demand tool use (search + call) adds about 309 tokens that stay in context, so `lazy` is
|
|
73
|
+
smaller only while a session uses fewer than 4 distinct hidden tools. The proof workflow alone uses about 4,
|
|
74
|
+
which is why `core` stays the default and `lazy` is opt-in.
|
|
75
|
+
- None of this was measured in a live agent session.
|
|
76
|
+
|
|
77
|
+
## Real agent run: OpenCode 2.0.22 on Windows 11 (Oct 15, 2026)
|
|
78
|
+
|
|
79
|
+
One run each, same task and same free model (`opencode/big-pickle`, cost reported by OpenCode: $0).
|
|
80
|
+
Task: fix a SAVE10 coupon, reject unknown coupons, floor `inventory.remove` at zero (3 failing of 66 tests).
|
|
81
|
+
Raw data: [`bench/real/`](bench/real/); numbers produced by `bench/real/summarize.py` from `opencode session export`.
|
|
82
|
+
|
|
83
|
+
| | baseline (no keelyard) | with keelyard |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| tests after run | 66/66 pass | 66/66 pass |
|
|
86
|
+
| model calls | 5 | 6 |
|
|
87
|
+
| input tokens, uncached | 16,436 | 13,654 |
|
|
88
|
+
| input tokens, cache read | 28,864 | 68,544 |
|
|
89
|
+
| input tokens, total | 45,300 | 82,198 |
|
|
90
|
+
| output + reasoning | 897 | 1,568 |
|
|
91
|
+
| wall time | 65 s | 122 s |
|
|
92
|
+
| proof | none | proven, 4 requirements with evidence |
|
|
93
|
+
|
|
94
|
+
Honest reading: on this small task keelyard **cost more tokens** (+81% total input), not fewer.
|
|
95
|
+
The main causes seen in the export: OpenCode 2 "code mode" injects an ~8.9k-char catalog for keelyard's
|
|
96
|
+
13 MCP tools, and the agent spent one call (19.7k chars) searching that catalog. Test output itself was
|
|
97
|
+
smaller with keelyard (`proof_run_tests`: 2,967 chars vs 7,008 + 5,789 raw `pytest -v` in the baseline),
|
|
98
|
+
but the shell-output filter did not fire because in code mode the agent never called the shell tool directly.
|
|
99
|
+
The 56k→6k savings measured earlier apply to noisy command output, which this task did not produce.
|
|
100
|
+
Rewind was verified on the same project: `rewind to 1` → 3 failed; `rewind to 2` → 66 passed
|
|
101
|
+
([screenshot](docs/img/real/rewind.svg)). Status/proof: [screenshot](docs/img/real/status.svg).
|
|
102
|
+
|
|
103
|
+
### After the lean-mode fix (commit f93dbaa), same PC, same free model, n=1 per row
|
|
104
|
+
|
|
105
|
+
keelyard no longer puts an MCP tool catalog into OpenCode's context, counts the agent's own shell test runs as
|
|
106
|
+
proof, and filters shell output. Data: `bench/real/opencode_bigpickle_lean.json`, `opencode_bigpickle_noisy.json`.
|
|
107
|
+
|
|
108
|
+
| task | run | tests after | model calls | input total (incl. cache) | input uncached | tool output chars |
|
|
109
|
+
|---|---|---|---|---|---|---|
|
|
110
|
+
| shop (66 tests) | baseline | 66/66 | 5 | 44,075 | 6,571 | 14,502 |
|
|
111
|
+
| shop (66 tests) | keelyard before fix | 66/66 | 6 | 82,198 | 13,654 | 26,746 |
|
|
112
|
+
| shop (66 tests) | **keelyard lean** | 66/66, proven | 5 | **37,493 (−15%)** | 4,021 | 2,806 (−81%) |
|
|
113
|
+
| noisy shop (1,566 tests, `pytest -v`) | baseline | 1566/1566 | 6 | 87,168 | 18,496 | 54,407 |
|
|
114
|
+
| noisy shop (1,566 tests, `pytest -v`) | **keelyard lean** | 1566/1566, proven | 5 | **37,257 (2.3× fewer)** | 7,049 (2.6× fewer) | 2,854 (19× fewer) |
|
|
115
|
+
|
|
116
|
+
What limits the ratio: OpenCode's own system prompt and tool definitions are resent on every model call
|
|
117
|
+
(about 6k tokens per call here), so five calls cost ~30k tokens before any project content. keelyard cuts
|
|
118
|
+
what it controls (tool output 19×, e.g. `pytest -v` 12,849 → 279 tokens) but cannot reach 10× on whole-session
|
|
119
|
+
tokens for short tasks. The gap grows with longer sessions and noisier output.
|
|
120
|
+
|
|
121
|
+
## Presets, measured on OpenCode 2
|
|
122
|
+
|
|
123
|
+
Windows 11, OpenCode 2.0.22, free `opencode/big-pickle` ($0), same task text, all runs ended with every test passing
|
|
124
|
+
and (keelyard runs) proof "proven". Session totals from `opencode session export`; raw summaries in
|
|
125
|
+
`bench/real/r6/summary.json` and `bench/real/r7/summary.json`. One run per row, two baseline runs per task.
|
|
126
|
+
|
|
127
|
+
| task | run | model calls | input incl. cache | uncached | output+reasoning | tool output chars |
|
|
128
|
+
|---|---|---|---|---|---|---|
|
|
129
|
+
| small (66 tests) | baseline, run A | 5 | 46,916 | 11,076 | 1,217 | 14,389 |
|
|
130
|
+
| small (66 tests) | baseline, run B | 5 | 43,849 | 6,921 | 815 | 14,512 |
|
|
131
|
+
| small (66 tests) | keelyard balanced | 7 | 51,652 | 9,801 | 1,162 | 2,502 |
|
|
132
|
+
| small (66 tests) | keelyard lean (7 tools off) | 4 | 11,851 | 3,723 | 493 | 2,654 |
|
|
133
|
+
| small (66 tests) | **keelyard lean (final, 9 tools off)** | 5 | **12,132** | 2,660 | 494 | 2,654 |
|
|
134
|
+
| noisy (1,566 tests, `pytest -v`) | baseline, run A | 8 | 101,528 | 33,122 | 1,270 | 54,887 |
|
|
135
|
+
| noisy (1,566 tests, `pytest -v`) | baseline, run B | 5 | 93,397 | 18,581 | 887 | 54,795 |
|
|
136
|
+
| noisy (1,566 tests, `pytest -v`) | keelyard balanced | 4 | 31,211 | 8,171 | 948 | 3,074 |
|
|
137
|
+
| noisy (1,566 tests, `pytest -v`) | keelyard lean (7 tools off) | 6 | 16,769 | 4,337 | 864 | 2,854 |
|
|
138
|
+
| noisy (1,566 tests, `pytest -v`) | **keelyard lean (final, 9 tools off)** | 4 | **9,995** | 1,867 | 465 | 2,570 |
|
|
139
|
+
|
|
140
|
+
Ratios against the mean of the two baselines: noisy task **9.7× fewer** input tokens (97,463 → 9,995),
|
|
141
|
+
small task **3.7× fewer** (45,383 → 12,132). Balanced mode on the small task was *above* baseline in this run
|
|
142
|
+
(7 model calls); the session-to-session spread of the same setup is large, so treat single runs as indicative.
|
|
143
|
+
Where the savings come from: the lean OpenCode agent's first request is ~1.5k tokens instead of ~5.5k
|
|
144
|
+
(prompt and tool list), and `pytest -v` output reaches the model as ~300 tokens instead of ~13k.
|
|
145
|
+
|
|
146
|
+
### Lean preset v2, repeated runs (Oct 15, 2026)
|
|
147
|
+
|
|
148
|
+
`keelyard init --preset lean` now also puts small project files and the pre-edit test result into the brief and
|
|
149
|
+
reruns the tests after each edit (result appended to the edit's output), so the agent needs no read or "before"
|
|
150
|
+
test calls. Installed through the real `keelyard init --agent opencode --preset lean` on the PC. Same task, free
|
|
151
|
+
`opencode/big-pickle`, $0. Raw data: `bench/real/r6`–`r9/summary.json`.
|
|
152
|
+
|
|
153
|
+
| task | setup | runs | input tokens incl. cache, per run | mean | model calls |
|
|
154
|
+
|---|---|---|---|---|---|
|
|
155
|
+
| small (66 tests) | baseline | 5 | 46,916 · 43,849 · 43,946 · 43,964 · 68,450 | 49,425 | 5–9 |
|
|
156
|
+
| small (66 tests) | **lean v2** | 3 | 7,884 · 8,950 · 7,973 | **8,269** | 3 |
|
|
157
|
+
| noisy (1,566 tests) | baseline | 5 | 101,528 · 93,397 · 139,837 · 94,923 · 129,229 | 111,783 | 5–11 |
|
|
158
|
+
| noisy (1,566 tests) | **lean v2** | 3 | 8,283 · 7,079 · 8,208 | **7,857** | 3 |
|
|
159
|
+
|
|
160
|
+
Mean ratio: **noisy 14.2× fewer, small 6.0× fewer** input tokens (cached + uncached together). Every counted run ended with all tests
|
|
161
|
+
passing; every lean run has proof "proven". Two lean runs from an earlier 12-way parallel batch (r8) are not
|
|
162
|
+
counted: OpenCode crashed at startup ("Standalone server exited before reporting readiness") before the agent
|
|
163
|
+
did anything.
|
|
164
|
+
|
|
165
|
+
Split by cache (same runs, means; from the same `summary.json` files):
|
|
166
|
+
|
|
167
|
+
| task | | baseline mean | lean v2 mean | ratio |
|
|
168
|
+
|---|---|---|---|---|
|
|
169
|
+
| small | input, uncached | 11,189 | 2,509 | 4.5× |
|
|
170
|
+
| small | input, cache read | 38,236 | 5,760 | 6.6× |
|
|
171
|
+
| noisy | input, uncached | 28,354 | 2,983 | 9.5× |
|
|
172
|
+
| noisy | input, cache read | 83,428 | 4,874 | 17.1× |
|
|
173
|
+
|
|
174
|
+
Read these numbers with three limits in mind:
|
|
175
|
+
- **No cost claim.** The model was free (`opencode/big-pickle`, $0 reported). On a paid model, cache reads are
|
|
176
|
+
billed far below uncached input, so the saving in money is closer to the uncached ratio than to the total.
|
|
177
|
+
- **Lean turns tools off.** The lean OpenCode build agent disables 9 built-in tools and keelyard's MCP tool list.
|
|
178
|
+
That is a large part of the saving, and it means the agent can do less (see docs/guide/presets.md).
|
|
179
|
+
- **Small n, one task family, one agent.** 5 baseline and 3 lean runs per task, OpenCode only. Claude Code and
|
|
180
|
+
Codex were not measured this way.
|
|
181
|
+
|
|
182
|
+
The small task does not reach 10×: three model calls (edit, the test run the task text asks for,
|
|
183
|
+
final reply) at ~2.2–3k tokens each are the floor we could reach; the remaining per-call cost is OpenCode's
|
|
184
|
+
tool definitions plus the brief.
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0 (Oct 28, 2026, first PyPI release)
|
|
4
|
+
|
|
5
|
+
First stable release.
|
|
6
|
+
- Published to PyPI as `keelyard` (`pip install keelyard`) by `.github/workflows/publish.yml`, using PyPI
|
|
7
|
+
Trusted Publishing (no API token stored in the repo)
|
|
8
|
+
- Timeline browser: `g` / `G` jump to the first / last step (#9)
|
|
9
|
+
- New `mypy` filter: every diagnostic line is kept whole, so the trailing `[error-code]` is no longer clipped;
|
|
10
|
+
real mypy and pyright output added to the filter corpus with a test (#1)
|
|
11
|
+
- README: PyPI install, "without vs with keelyard" table, per-agent wiring table; ROADMAP.md
|
|
12
|
+
- Version 1.0.0; no longer marked alpha (README badge, PyPI classifier `Production/Stable`)
|
|
13
|
+
- Install docs rewritten (README, `AGENTS-install.md`, `llms.txt`): human instructions first, then a labeled note
|
|
14
|
+
for AI coding agents to install only when the user explicitly asked, show the commands and get confirmation.
|
|
15
|
+
Removed the wording that told agents to run the install without the user typing it
|
|
16
|
+
- README: "What keelyard changes on your machine" + uninstall steps; SECURITY.md: reporting process and trust
|
|
17
|
+
properties; `requirements-lock.txt` (pinned, pip-audit clean)
|
|
18
|
+
- Benchmark numbers unchanged and still small-sample (5 baseline vs 3 lean runs); see BENCHMARKS.md
|
|
19
|
+
|
|
20
|
+
## 0.1.0 (pre-release)
|
|
21
|
+
|
|
22
|
+
### Lean defaults made permanent (Oct 17, 2026)
|
|
23
|
+
- Every install path ends on the lean defaults the session bench measured (~80% saving): `init`, `install <agent>`
|
|
24
|
+
(was balanced; now `--preset`, default lean), `init --global` (now adds OpenCode's lean build agent and Claude
|
|
25
|
+
Code's lean env at user level, taken back by `uninstall --global`), global first-session setup (lean config)
|
|
26
|
+
- Upgrades: on SessionStart, a lean (or pre-preset) project whose config still has the old default lines gets the
|
|
27
|
+
lean values; values set by hand are kept
|
|
28
|
+
- `keelyard doctor` warns when lean settings are overridden (project config or user-level agent config)
|
|
29
|
+
- `tests/test_lean_defaults.py`: fails on drift (prompt length, denied tools, terse rule, brief size, filter on,
|
|
30
|
+
lean config, install/global/upgrade paths) - this is the per-PR static token budget check, run in CI
|
|
31
|
+
- Lean brief: rename hint (every file + one `perl -pi` command); edit-heavy now 78% saving, 100% correct
|
|
32
|
+
- TODO: scheduled weekly/manual session-bench workflow (2 reps/task, free model, fail <70% or correctness <
|
|
33
|
+
baseline); per-session token recording (OpenCode db, Claude Code/Codex logs) with `usage`/`doctor` warning under
|
|
34
|
+
target; Codex has no lean agent-config equivalent yet; docs page for these guarantees
|
|
35
|
+
|
|
36
|
+
### Ideas from popular agent tools, rebuilt from scratch (Oct 16, 2026)
|
|
37
|
+
- Terse-output rule in every preset (CLAUDE.md, AGENTS.md); `--no-terse` / `KEELYARD_TERSE=0` to opt out;
|
|
38
|
+
`bench/terse.py` measures it on a local model. Rule shortened to ~12 tokens after a 3-model, 32-prompt x 2-seed
|
|
39
|
+
comparison (fewer total tokens than the old line, more facts than the previous rule)
|
|
40
|
+
- Lossless JSON compaction in the output filters
|
|
41
|
+
- One hint when the same test failure returns after a code change (hooks, auto-test, `proof_run_tests`)
|
|
42
|
+
- Test: the session brief is byte-stable (prompt cache)
|
|
43
|
+
- README credits inspirations; survey of 57 repos in `docs/research/ideas.md`
|
|
44
|
+
|
|
45
|
+
### Token-saving mechanisms, each with a safeguard (Oct 16, 2026)
|
|
46
|
+
- Find code: ranked `find_symbol` (exact names and source first), `refs=true` call sites, `outline(related=true)`
|
|
47
|
+
and `keelyard code related FILE` (imports, importers, tests); `keelyard code find --refs --offset --limit`
|
|
48
|
+
- Paged results: `find_symbol` and `memory_search` return `total`, `remaining` and `next_offset`; nothing is cut silently
|
|
49
|
+
- Re-reads: an "unchanged" notice is never sent when the file itself is smaller; diff exactness and `force=true` tested
|
|
50
|
+
- Log compaction: the `keelyard run` footer shows the exit code and how many lines were collapsed; `go test -v`
|
|
51
|
+
failure messages (printed before `--- FAIL`) are now kept; the corpus test checks counts and stack frames
|
|
52
|
+
- Work state: `work_state` MCP tool and `keelyard state` (decisions, open questions, changed files, requirements);
|
|
53
|
+
every decision needs a validated ref and stale refs are flagged; included in the brief after compaction
|
|
54
|
+
- `[mcp].tools = "lazy"`: 6 schemas up front plus `tool_search`/`tool_call`; falls back to `core` if not smaller
|
|
55
|
+
- `bench/mechanisms.py` measures all six on three fixture repos (see BENCHMARKS); `python -m keelyard` works
|
|
56
|
+
|
|
57
|
+
### Trust: proof and rewind (Oct 16, 2026)
|
|
58
|
+
- Proof is bound to a content hash of the worktree: any edit after the last passing test run reopens it,
|
|
59
|
+
even one made without a hook firing
|
|
60
|
+
- Evidence levels shown separately: test-verified / command-succeeded / agent-claimed (`status`, `proof`, `--json`)
|
|
61
|
+
- Proof bundles are signed (HMAC, key in the user data dir, mode 600); a hand-edited bundle is never proven.
|
|
62
|
+
Bundles written by older versions have no signature and count as edited: run `keelyard proof reset`
|
|
63
|
+
- Test weakening keeps the proof open: deleted test files, fewer tests or assertions, new skip/xfail/only,
|
|
64
|
+
test config changed or added, fewer tests run. `keelyard proof accept-tests "<why>"` acknowledges a real
|
|
65
|
+
refactor, recorded as agent-claimed and bound to those exact files
|
|
66
|
+
- The gate is never shown green when no Stop hook is wired or no agent ever called keelyard (`unhooked`/`unverified`);
|
|
67
|
+
doctor shows it too
|
|
68
|
+
- Proof writes are locked (parallel hooks and sessions); tested with 12 processes
|
|
69
|
+
- Rewind copies files snapshots cannot hold (ignored, secret, too big) aside before overwriting or deleting them;
|
|
70
|
+
an interrupted rewind is detected and `keelyard rewind recover` restores the state from just before it
|
|
71
|
+
- Secrets (`.env`, keys, credentials files, ...) are excluded from snapshots by default (`[rewind].include_secrets`,
|
|
72
|
+
`[rewind].exclude`); a file that becomes excluded is dropped from the timeline index
|
|
73
|
+
- Filter corpus of real logs; pytest keeps the warnings summary, cargo keeps warning blocks
|
|
74
|
+
- Dependencies capped at the next major version; new CI job: clean venv + clean HOME install, init, doctor,
|
|
75
|
+
selftest, uninstall leaves the project unchanged, on Linux, macOS and Windows
|
|
76
|
+
- Docs: "What keelyard guarantees and what it doesn't" with a per-agent capability table; shorter README;
|
|
77
|
+
BENCHMARKS splits cached and uncached input and states the free-model and tools-off limits
|
|
78
|
+
|
|
79
|
+
### Audit fixes, round 2 (Oct 16, 2026)
|
|
80
|
+
- Codex: opt-in `--codex-project-mcp` on `init` and `install codex` writes the MCP server to `.codex/config.toml`
|
|
81
|
+
- `--json` works before or after the action in every group command (`keelyard proof --json status`)
|
|
82
|
+
- No trailing spaces in human output; error hints are not hard-wrapped
|
|
83
|
+
- `rewind` and the timeline browser name your files and count agent setup files (`a.py (+5 agent setup)`)
|
|
84
|
+
- memory and usage read OpenCode's `opencode.db` (OpenCode 1.x+/2.x keep sessions there, not in `storage/`);
|
|
85
|
+
read-only, only the session/message/part tables; messages left over from the JSON-to-SQLite migration count once
|
|
86
|
+
- swarm: `swarm plan --json > tasks.json` feeds `swarm run tasks.json` (it failed before); an error file from
|
|
87
|
+
`plan` is refused with its hint; a missing API key is reported before any call; HTTP 401/402/404/429 and
|
|
88
|
+
unreachable servers get one-line explanations with a free-model hint; exit 3 when every call failed;
|
|
89
|
+
`--model` is honored in cooperative mode (it was ignored)
|
|
90
|
+
- arena: per-contender summary and progress in the terminal; `files_changed` no longer counts the caches
|
|
91
|
+
the check writes; no matplotlib font warnings
|
|
92
|
+
- timeline browser: tests drive it headless; a cut diff says so and how to see all of it
|
|
93
|
+
|
|
94
|
+
### Audit fixes (Oct 16, 2026)
|
|
95
|
+
- `keelyard uninstall <agent>` now restores config files byte for byte (formatting included), deletes the `{}` files
|
|
96
|
+
and empty folders keelyard created, and leaves files alone if you edited them after install
|
|
97
|
+
- `keelyard run` never makes output bigger: when filtering saves less than its own footer, the raw output is returned
|
|
98
|
+
- pytest output drops frames from site-packages and the standard library and shortens `=====` banners
|
|
99
|
+
- A failing test run is the only gap the proof gate reports (no extra "add a checklist" line while tests are red)
|
|
100
|
+
- Bare `keelyard proof` shows the status (with `--json` too); usage errors name the real command (`keelyard code`)
|
|
101
|
+
- `keelyard doctor` warns when Codex hooks are wired but `~/.codex/config.toml` has no keelyard MCP server
|
|
102
|
+
- Windows: every file and stdin is read and written as UTF-8 (non-Latin text and emoji no longer depend on cp1252)
|
|
103
|
+
|
|
104
|
+
### OpenCode 2
|
|
105
|
+
- The OpenCode plugin supports OpenCode 2.x (`setup(ctx)`: context, compaction, prompt, tool and event hooks, MCP via
|
|
106
|
+
`ctx.mcp.transform`) and 1.x (`server()`) from one file, now installed to `.opencode/plugins/keelyard.js`
|
|
107
|
+
- Fix: shell output from OpenCode (`bash`) and Codex (`shell`) was never filtered; only Claude's `Bash` was
|
|
108
|
+
|
|
109
|
+
### Cooperative swarm
|
|
110
|
+
- `keelyard.coop`: planner -> workers -> verifier with a shared blackboard, a optional peer critic, voting, cheapest-capable
|
|
111
|
+
model routing (`[swarm].ladder`), and hard token budgets (`budget_tokens`, `task_budget_tokens`) enforced by
|
|
112
|
+
reserving each call's worst case before it is sent. On by default (`cooperative = true`, `--basic` to opt out)
|
|
113
|
+
- Tested with 250 tasks and more than 200 calls in flight; token totals match exactly
|
|
114
|
+
|
|
115
|
+
### Smaller footprint, workflow pack
|
|
116
|
+
- MCP server exposes 13 core tools by default (`[mcp] tools = "core"`, or `"all"`, or a list); schemas
|
|
117
|
+
drop pydantic titles. Measured: 1,582 vs 2,401 tokens per session (`bench/overhead.py`)
|
|
118
|
+
- Workflow pack: `workflow("plan"|"debug"|"review")` MCP tool, `/keelyard:plan|debug|review` for Claude Code,
|
|
119
|
+
`keelyard-*` commands for OpenCode; installed by `init`, loaded only when asked for
|
|
120
|
+
- Compact guide block and brief rules; "be terse" rule
|
|
121
|
+
- Destructive-command check ignores text inside quotes (unless run via `bash -c`, `eval`, `ssh`) and only
|
|
122
|
+
flags SQL when a SQL client is involved
|
|
123
|
+
- Snapshots skip keelyard's own wiring files and no longer force-add ignored files in untracked folders
|
|
124
|
+
- Screens and hero GIF show `~/` paths; release workflow with PyPI trusted publishing; gitleaks allowlist for test fixtures
|
|
125
|
+
|
|
126
|
+
### Always on and stronger helpers
|
|
127
|
+
- Brief at session start and after compaction, past-session recall per prompt, outline/diff on repeat reads
|
|
128
|
+
- Snapshot before destructive commands; rate-limited hints (no tests nearby, session budget); `[brain]` config
|
|
129
|
+
- Swarm: `swarm_plan`, context packs, JSON answers, one-definition rewrites, patches tested in a copy,
|
|
130
|
+
best-of-N, retry with feedback, escalation, `subagent_tasks` for the host agent's subagents
|
|
131
|
+
- Windows CI; fixes for Windows paths, cp1252 output, CRLF diffs, racing state directory
|
|
132
|
+
|
|
133
|
+
### CLI overhaul (breaking renames)
|
|
134
|
+
- `x` → `run`, `compress` → `filter`, `timeline` → `rewind list -i`, `mem` → `memory`, `sym`/`map`/`outline` → `code find|map|outline`, `proof req` → `proof add`
|
|
135
|
+
- New `init` (detects Claude Code, Codex, OpenCode), `doctor`, `status`, `selftest`
|
|
136
|
+
- `--json` on every command, stable exit codes (0 ok, 1 error, 2 usage, 3 check failed), errors with hints
|
|
137
|
+
- Agent environment: 20 structured MCP tools, CLAUDE.md/AGENTS.md guide block, Claude Code skill and slash commands
|
|
138
|
+
- New design: Geist-based proof and arena reports, textual timeline, mkdocs-material docs site
|
|
139
|
+
- 35 bugs fixed from adversarial QA (see tests/test_adversarial.py)
|
|
140
|
+
|
|
141
|
+
### Initial
|
|
142
|
+
|
|
143
|
+
- Proof gate (Stop hook), HTML proof report
|
|
144
|
+
- Rewind: shadow-git snapshots, rewind/fork, curses timeline
|
|
145
|
+
- Helper swarm with citation and patch verification
|
|
146
|
+
- Saver: read dedupe, command-aware output filters (git, pytest, cargo/go/jest, grep, find, ruff/eslint/mypy),
|
|
147
|
+
Claude Code PostToolUse output replacement, `recall`
|
|
148
|
+
- Structure-first reading: `outline`, `project_map`, `find_symbol`
|
|
149
|
+
- Unified memory (SQLite FTS5) and usage report across Claude Code, Codex, OpenCode
|
|
150
|
+
- Arena: one task across agents/models, tokens/cost/pass rate, HTML (+PNG) report
|
|
151
|
+
- Benchmarks: compression corpus, snapshot timing, head-to-head vs rtk with fact retention
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
+
|
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behavior include:
|
|
20
|
+
|
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
22
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
23
|
+
* Public or private harassment
|
|
24
|
+
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
25
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
26
|
+
|
|
27
|
+
## Enforcement Responsibilities
|
|
28
|
+
|
|
29
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
+
|
|
31
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
36
|
+
|
|
37
|
+
## Enforcement
|
|
38
|
+
|
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at a private GitHub Security Advisory on this repository (or by contacting the maintainer listed in pyproject.toml). All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
+
|
|
41
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
42
|
+
|
|
43
|
+
## Enforcement Guidelines
|
|
44
|
+
|
|
45
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
46
|
+
|
|
47
|
+
### 1. Correction
|
|
48
|
+
|
|
49
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
50
|
+
|
|
51
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
52
|
+
|
|
53
|
+
### 2. Warning
|
|
54
|
+
|
|
55
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
56
|
+
|
|
57
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
58
|
+
|
|
59
|
+
### 3. Temporary Ban
|
|
60
|
+
|
|
61
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
62
|
+
|
|
63
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
64
|
+
|
|
65
|
+
### 4. Permanent Ban
|
|
66
|
+
|
|
67
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
68
|
+
|
|
69
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
70
|
+
|
|
71
|
+
## Attribution
|
|
72
|
+
|
|
73
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
74
|
+
|
|
75
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
76
|
+
|
|
77
|
+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
|
|
78
|
+
|
|
79
|
+
[homepage]: https://www.contributor-covenant.org
|
|
80
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
81
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
82
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
83
|
+
[translations]: https://www.contributor-covenant.org/translations
|