Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
944170b
fix(gamestate): use localize for voucher effect descriptions
S1M0N38 Feb 24, 2026
20f53cc
feat(api): add suggested actions to error messages
S1M0N38 Feb 24, 2026
6458f3d
test(lua.endpoints): fix test for vouchers effect
S1M0N38 Feb 25, 2026
c8e28c8
refactor(lua.endpoints): us the SMODS.add_voucher_to_shop for add vou…
S1M0N38 Feb 25, 2026
a979279
feat: add support for Tags
S1M0N38 Feb 25, 2026
a83203b
test(lua.endpoints): add test for tags support
S1M0N38 Feb 25, 2026
0bcd069
docs(lua.utils): fix the description of the enums tags
S1M0N38 Feb 25, 2026
02af872
docs(api): add documentation for tags
S1M0N38 Feb 25, 2026
f7fda7b
fix: allow to sell jokers when a Buffoon pack is open
S1M0N38 Feb 25, 2026
2a0b9bb
test(lua.endpoints): fix the assertion for the tags tests
S1M0N38 Feb 28, 2026
b0fd730
chore(repo): replace Claude/CLI tooling with agent-agnostic config
S1M0N38 May 27, 2026
adffe20
chore(repo): slim down .gitignore to project-relevant entries
S1M0N38 May 27, 2026
9e27f4e
chore(build): move mdformat flags from .mdformat.toml to Makefile
S1M0N38 May 27, 2026
ee3c105
chore(build): bump ruff to 0.15.14 and ty to 0.0.40
S1M0N38 May 27, 2026
fad4f90
chore(tests): remove integration marker plumbing
S1M0N38 May 27, 2026
165506e
chore(docs): exclude adr/ directory from mkdocs site
S1M0N38 May 27, 2026
e16cc85
fix(tests): use ty: ignore directive for type suppression
S1M0N38 May 27, 2026
6373afa
ci: align mdformat flags with Makefile
S1M0N38 May 27, 2026
c1ee258
refactor(cli): rename manager.py to instance.py
S1M0N38 May 28, 2026
631bc60
feat(pool): add BalatroPool for managing N BalatroInstance instances
S1M0N38 May 28, 2026
570c69a
feat(state): add StateFile for filesystem-based instance discovery
S1M0N38 May 28, 2026
5b3698a
feat(serve): use BalatroPool and StateFile in serve command
S1M0N38 May 28, 2026
97e6b73
feat(cli): add list command to show running instances
S1M0N38 May 28, 2026
a83d7e9
feat(api): add instance discovery to api command
S1M0N38 May 28, 2026
2d49995
refactor(tests): use InstanceInfo in Lua and CLI test fixtures
S1M0N38 May 28, 2026
c964109
feat: export BalatroPool, InstanceInfo, and StateFile from public API
S1M0N38 May 28, 2026
c7ce926
refactor: replace UUID session IDs with timestamps
S1M0N38 May 29, 2026
4943eb9
feat(serve): drop --host/--port options, validate --num-instances
S1M0N38 May 29, 2026
fc88ad3
fix(api): require --host and --port together
S1M0N38 May 29, 2026
6c47781
fix(state): guard pool cleanup on state file write failure
S1M0N38 May 29, 2026
2efc7d2
fix(list): show session start time instead of PID
S1M0N38 May 29, 2026
7fb9ccb
test: update and add regression tests for CLI refactoring
S1M0N38 May 29, 2026
092862b
feat(cli): expose log_path in InstanceInfo and list output
S1M0N38 May 29, 2026
21367ec
docs(skills): rewrite balatrobot SKILL.md
S1M0N38 May 29, 2026
742e8d4
refactor(instance): add InstanceDiedError and check_alive method
S1M0N38 May 29, 2026
bbf4858
refactor(pool): add check_alive, remove context manager
S1M0N38 May 29, 2026
d1a011c
refactor(state): convert StateFile to static utility class
S1M0N38 May 29, 2026
f34931a
refactor(serve): introduce Server class owning serve lifecycle
S1M0N38 May 29, 2026
fc58920
test: update tests for Server refactoring
S1M0N38 May 29, 2026
ae88e9d
refactor: trim __all__ to public API surface
S1M0N38 May 29, 2026
e7cf13d
fix(serve): guard signal handler for Windows and clean up on exit
S1M0N38 May 29, 2026
7757af4
docs(pool): update docstring to remove context-manager mention
S1M0N38 May 29, 2026
abaaa23
test(server): add Windows signal-handler guard test
S1M0N38 May 29, 2026
1b66787
style: use parenthesized with-statements
S1M0N38 May 29, 2026
5420999
feat(cli): add stop command to gracefully shut down server
S1M0N38 May 29, 2026
ab06c31
test(server): add SIGTERM handler and clean shutdown tests
S1M0N38 May 29, 2026
787ea32
chore(gitignore): add antigravitycli and review skill to gitignore
S1M0N38 May 29, 2026
c849078
refactor: apply code review fixes from branch review
S1M0N38 May 29, 2026
dcef72d
style: format long lines and add class spacing
S1M0N38 May 29, 2026
2aed776
docs(skill): add stop command to balatrobot skill
S1M0N38 May 29, 2026
7682c64
chore(skills): add git-commit skill
S1M0N38 Jun 9, 2026
a604521
refactor(lua): overhall logging levels and rename BB_LOGGER to BB_FORMAT
S1M0N38 Jun 9, 2026
23253cc
feat(lua): add JSONL request/response recording
S1M0N38 Jun 9, 2026
cde7516
feat(cli): add replay mode to api command
S1M0N38 Jun 9, 2026
145f504
docs(skill): document JSONL traces and replay mode
S1M0N38 Jun 9, 2026
1785b3f
fix(pack): handle return to BLIND_SELECT after tag-reward packs
S1M0N38 Jun 9, 2026
c8ec29e
feat(lua): add boss parameter to set endpoint
S1M0N38 Jun 9, 2026
7121ecb
docs(lua): add descriptions to Blind.Key enum values
S1M0N38 Jun 9, 2026
5800c4c
test: add `key` field to expected blinds in test_blinds_structure_ext…
S1M0N38 Jun 9, 2026
b096965
fix(play,discard): reject plays/discards missing Cerulean Bell forced…
S1M0N38 Jun 9, 2026
77bab0c
test(fixtures): add Cerulean Bell boss blind fixture for play and dis…
S1M0N38 Jun 9, 2026
f7dbf2c
test(play,discard): add Cerulean Bell forced-card validation tests
S1M0N38 Jun 9, 2026
09d9e20
style: trim trailing whitespace in tables, wrap long line
S1M0N38 Jun 9, 2026
b430b9a
docs: add ADR 0001 for settings redesign and update glossary
S1M0N38 Jun 10, 2026
e0944f5
fix(load): wait for STOP_USE to clear before declaring load complete
S1M0N38 Jun 10, 2026
4a39334
refactor(config): replace individual CLI flags with settings profile …
S1M0N38 Jun 10, 2026
6f864c0
refactor(settings): profile-based Lua settings with BalatroBot profil…
S1M0N38 Jun 10, 2026
b5293a0
test(config): update tests for settings profile and render mode API
S1M0N38 Jun 10, 2026
3ef66fa
docs: update CLI reference for profile-based settings and render modes
S1M0N38 Jun 10, 2026
a633550
fix(config): validate render mode in __post_init__ instead of CLI layer
S1M0N38 Jun 10, 2026
8e2b0b8
refactor(settings): trim Lua env var header, rename settings_path to …
S1M0N38 Jun 10, 2026
c3b8e00
test(config): replace TestRenderChoices with meaningful validation tests
S1M0N38 Jun 10, 2026
6636231
docs(cli): mark --num as CLI-only, no env var equivalent
S1M0N38 Jun 10, 2026
55c898a
feat(mod): add bundled settings profiles (default, fast, headless)
S1M0N38 Jun 10, 2026
8173c9f
refactor(mod): resolve settings profiles by name instead of absolute …
S1M0N38 Jun 10, 2026
34e7e2f
feat(cli): validate --settings as bare profile name
S1M0N38 Jun 10, 2026
94e829b
docs: update all docs for bundled name-based settings profiles
S1M0N38 Jun 10, 2026
5127eb8
fix(mod): validate settings profile name and wire verbose flag
S1M0N38 Jun 10, 2026
e4406e5
refactor(mod): normalize env var names and render comments
S1M0N38 Jun 10, 2026
eb19b82
fix(mod): use windowed mode in default settings profile
S1M0N38 Jun 10, 2026
d72cda7
docs: update contributing guide env var examples
S1M0N38 Jun 10, 2026
08dd3b8
refactor(mod): replace headless profile with turbo and light
S1M0N38 Jun 10, 2026
8720133
docs: update profile references from headless to turbo/light
S1M0N38 Jun 10, 2026
066f197
refactor(mod): update profile name examples in code comments
S1M0N38 Jun 10, 2026
7e36ca9
feat(cli): remove --port flag, make port allocation ephemeral
S1M0N38 Jun 10, 2026
54cf911
chore: fix ADR tree formatting and update deprecated env var in test
S1M0N38 Jun 10, 2026
d98a40e
fix(mod): validate render mode in Lua and abort on invalid values
S1M0N38 Jun 10, 2026
c689d43
refactor(config): remove BOOL_FIELDS frozenset, inline field check
S1M0N38 Jun 10, 2026
73138e8
feat(profiles): tune settings for bot operation
S1M0N38 Jun 10, 2026
004d27f
feat(settings): force English locale and disable achievements in bot …
S1M0N38 Jun 10, 2026
23f5c6b
fix(lua): widen types, localize setup, clean up gamestate
S1M0N38 Jun 10, 2026
89945c4
fix(makefile): correct lua-language-server --check flag
S1M0N38 Jun 10, 2026
60d5d1f
chore(lua): remove stale undefined-global diagnostic suppressions
S1M0N38 Jun 10, 2026
75a5f55
docs(contributing): update .luarc.json docs for gitignored setup
S1M0N38 Jun 10, 2026
12fcf3d
docs(skill): update balatrobot skill for turbo profile and clarify usage
S1M0N38 Jun 11, 2026
38fd4e4
docs(skill): fix double space in balatrobot skill
S1M0N38 Jun 11, 2026
0f0f54d
test(lua): add type annotation to test_concurrent_requests param
S1M0N38 Jun 11, 2026
687731a
feat(skill): add triage-issue skill for reproducing GitHub issues
S1M0N38 Jun 11, 2026
ee22cc1
test(lua): add regression test for selling Invisible Joker
S1M0N38 Jun 11, 2026
dfe0f65
fix(lua.endpoints): use card.removed instead of count check in sell
S1M0N38 Jun 11, 2026
c286969
feat(lua): migrate Enhancement enum from ALL-CAPS to m_* keys
S1M0N38 Jun 12, 2026
4f7a451
feat(lua): migrate Edition enum from ALL-CAPS to e_* keys
S1M0N38 Jun 12, 2026
6aba790
feat(lua): migrate Seal enum from ALL-CAPS to Capitalized keys
S1M0N38 Jun 12, 2026
2736fd6
feat(lua): migrate Deck enum from ALL-CAPS to b_* keys
S1M0N38 Jun 12, 2026
acad583
fix(make): update `make fixtures` to use StateFile discovery
S1M0N38 Jun 12, 2026
6fc1c46
feat(lua): migrate Stake enum from ALL-CAPS to stake_* keys
S1M0N38 Jun 12, 2026
fcb0879
test(lua): update Stake enum values in tests and fixtures
S1M0N38 Jun 12, 2026
bd376a0
style(tests): reformat start() call in test_pack.py
S1M0N38 Jun 12, 2026
4ac4068
docs(skill): rewrite balatrobot skill for quick workflow reference
S1M0N38 Jun 12, 2026
a3a8ac1
docs(CONTEXT.md): document test fixture key naming convention
S1M0N38 Jun 12, 2026
1b0104f
fix(lua): handle thin deck hang when buying packs
S1M0N38 Jun 12, 2026
fcad581
test(lua): add regression test for thin deck pack buy hang
S1M0N38 Jun 12, 2026
d14210e
fix(lua.endpoints): use draw_hand flag for pack hand detection
S1M0N38 Jun 13, 2026
66c2bff
fix(lua.endpoints): dismiss win overlay so endless mode stays responsive
S1M0N38 Jun 13, 2026
e6793ac
test(lua): add endless-mode win overlay regression tests
S1M0N38 Jun 13, 2026
7e7299a
docs(skill): shorten balatrobot serve startup wait
S1M0N38 Jun 13, 2026
c27477c
feat(api): expose paused field in GameState
S1M0N38 Jun 15, 2026
a64f996
test(lua): assert paused field instead of timing in endless play
S1M0N38 Jun 15, 2026
ec95a7b
docs(ci): version docs with mike for main, tags, and dev
S1M0N38 Jun 17, 2026
822ad82
docs(terminology): disambiguate profile terminology in CONTEXT.md
S1M0N38 Jun 24, 2026
c18d2c0
docs(skill): simplify commit command example in git-commit skill
S1M0N38 Jun 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .agents/skills/balatrobot/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
name: balatrobot
description: Launch Balatro with the BalatroBot mod and interact via the CLI. Use when you need to manually test, reproduce issues, or inspect game state through the JSON-RPC API.
---

# BalatroBot CLI

Four commands: `serve`, `api`, `list`, `stop`. Explore any with `--help`.

## Workflow

```bash
# Start server in background (ports are ephemeral, auto-allocated)
nohup balatrobot serve --render headless --settings turbo --debug > /tmp/bb.log 2>&1 &
sleep 5
balatrobot api health # auto-discovers port via state file — no --host/--port

# Call endpoints or replay a trace
balatrobot api gamestate
balatrobot api --requests path/to/trace.req.jsonl # --requests also auto-discovers

balatrobot stop # always use stop, never kill/pkill
```

## `serve`

```bash
balatrobot serve --render headless --settings turbo --debug
```

Key flags: `--render [headfull|headless|ondemand]` (default headfull), `--settings` (default "default"), `--debug`, `--num`. Blocks until Ctrl+C — background it with `&`/`nohup` before running other commands.

## `api`

```bash
balatrobot api <method> [JSON_PARAMS] # params default {}
balatrobot api --requests PATH # replay JSONL trace
balatrobot api --requests PATH --responses PATH # verify against recorded
```

Reads the running instance from the state file — **never pass `--host`/`--port` manually** (ports are ephemeral). For multi-instance, use `-i`/`--index`.

```bash
balatrobot api health
balatrobot api start '{"deck":"RED","stake":"WHITE"}'
balatrobot api play '{"cards":[0,1,2,3,4]}'
balatrobot api buy '{"pack": 0}'
balatrobot api gamestate | jq '.state'
```

See `docs/api.md` for methods, params, and state machine.

## `list`

```bash
balatrobot list # human-readable
balatrobot list --json | jq '.instances[0].port' # extract port/log_path
```

## `stop`

```bash
balatrobot stop # SIGTERM + 5s poll, cleans state file
```

## Logs

Session directory `logs/<timestamp>/` contains `<port>.log`, `<port>.req.jsonl`, `<port>.res.jsonl`. Find paths via `balatrobot list --json`.
36 changes: 36 additions & 0 deletions .agents/skills/git-commit/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: git-commit
description: 'Conventional commit creator with auto-staging and message generation.'
license: MIT
allowed-tools: Bash
---

# Git Commit

1. **Context:** `git log -n 5` to match repo style.

2. **Review:** `git status` and `git diff`.

3. **Stage & Group:** If many files changed, group them into **multiple logical commits** (`git add <files>`). No secrets.

4. **Message:** ALL commits should be multiline. (No `!` for breaking changes because we are still in early alpha). Format:

```text
<type>(<scope>): <title>

<body>
```

where `<title>` ≤ 72 characters (ideal ≤ 50) and `body` wrap at 72 characters. The best commit messages help someone six months later answer "Why was this change made?".

5. **Commit:** Execute using heredoc:

```bash
git commit -F - <<'EOF'
<message here>
EOF
```

6. **Iterate:** Repeat steps 3-5 until all logical groups are committed.

7. **Safety:** No `--force`, `reset --hard`, config changes, or `--no-verify`.
61 changes: 61 additions & 0 deletions .agents/skills/triage-issue/REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# HTML Report Reference

## Palette (Tokyo Night)

Include this `<style>` block in the report. It provides a dark theme with semantic color variables. Compose the rest of the report freely — choose whatever sections, layout, and HTML elements best explain the issue.

```css
:root {
--bg: #1a1b26; --surface: #24283b; --border: #3b4261;
--text: #c0caf5; --muted: #565f89; --accent: #7aa2f7;
--green: #9ece6a; --red: #f7768e; --yellow: #e0af68; --purple: #bb9af7;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
background: var(--bg); color: var(--text); line-height: 1.65;
padding: 2.5rem; max-width: 860px; margin: 0 auto; font-size: 0.9rem;
}
h2 { color: var(--accent); margin: 2rem 0 0.5rem; }
code { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 0.1rem 0.35rem; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; overflow-x: auto; font-size: 0.82rem; }
a { color: var(--accent); }
hr { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
```

## Verdict badges

```css
.badge { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.badge-green { background: rgba(158,206,106,0.15); color: var(--green); border: 1px solid rgba(158,206,106,0.3); }
.badge-red { background: rgba(247,118,142,0.15); color: var(--red); border: 1px solid rgba(247,118,142,0.3); }
.badge-yellow { background: rgba(224,175,104,0.15); color: var(--yellow); border: 1px solid rgba(224,175,104,0.3); }
```

| Verdict | Class | Color |
|---------|-------|-------|
| Reproduced / bug confirmed | `badge-red` | `--red` |
| Already fixed / no action needed | `badge-green` | `--green` |
| Needs manual review / inconclusive | `badge-yellow` | `--yellow` |

## Required header

Every report must start with:

```html
<h1>{issue title}</h1>
<p class="meta">
<code>{scope}</code> &middot;
<a href="https://github.com/coder/balatrobot/issues/{NNN}">#{NNN}</a> &middot;
coder/balatrobot &middot;
<span class="badge badge-{color}">{VERDICT}</span>
</p>
```

The link to the original issue on GitHub is mandatory.

## Guidelines

- **Compose freely.** The LLM decides which sections (`<h2>`) to include based on what best explains the issue. There is no fixed template beyond the header.
- **Use the palette variables** for all colors. Use `--red`/`--green` for diff highlights, `--accent` for headings and links, `--muted` for secondary text.
- **Keep it simple.** Plain HTML. No frameworks, no JavaScript. The report is a static file opened in a browser.
- **Save to** `/tmp/balatrobot/issues/{NNN}/report.html`
77 changes: 77 additions & 0 deletions .agents/skills/triage-issue/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
name: triage-issue
description: Triage and reproduce GitHub issues for the coder/balatrobot repo. Fetches issue data, downloads attachments, creates a branch, reproduces the bug, and generates an HTML investigation report. Use when the user says "/triage-issue NNN" or asks to reproduce a specific issue by number.
---

# Triage Issue

Reproduce and investigate a GitHub issue end-to-end, producing an HTML report.

## Quick start

User provides a GitHub issue URL. Extract the issue number and run the full workflow below.

## Workflow

### 1. Fetch & download

```bash
mkdir -p /tmp/balatrobot/issues/NNN
gh issue view NNN --repo coder/balatrobot --json title,body,comments,labels,state \
| tee /tmp/balatrobot/issues/NNN/issue.json
```

Extract attachment URLs from body + comments and download:
```bash
gh issue view NNN --repo coder/balatrobot --json body,comments -q '.body, (.comments[].body)' \
| grep -oE 'https://github.com/user-attachments/files/[^ )]+' \
| xargs -I{} curl -sLo /tmp/balatrobot/issues/NNN/$(basename {}) '{}'
```

### 2. Read before executing

**Before running anything**, read all downloaded files:
- **`script.py`** — reproduction script. Read fully before running.
- **`*.req.jsonl`** — replayable via `balatrobot api --requests`.
- **`*.res.jsonl`** — response log for comparison.
- **`*.log`** — Balatro log output for error context.

Choose reproduction method: `script.py` if present (adapt port), else replay `.req.jsonl`.

### 3. Create branch

Derive prefix from issue title (`fix(...)` → `fix/`, `feat(...)` → `feat/`, etc., fallback `fix/`):
```bash
git checkout <current-active-branch>
git checkout -b <prefix>/issue-NNN
```

### 4. Reproduce

```bash
balatrobot serve --render headless --settings turbo --debug
```

Wait for ready, then reproduce using the chosen method. Run **≥3 times** to confirm consistency.

### 5. Report & cleanup

Generate HTML report at `/tmp/balatrobot/issues/NNN/report.html`. See [REFERENCE.md](REFERENCE.md) for template. Must include: issue title, verdict badge (`REPRODUCED`/`ALREADY FIXED`/`NEEDS MANUAL REVIEW`), summary, reproduction steps, results table, analysis, conclusion.

Then:
- `balatrobot stop`
- If already fixed → delete branch, switch back.
- If reproducible → keep branch.
- `open /tmp/balatrobot/issues/NNN/report.html`

## Checklist

Before reporting done, verify:
- [ ] Issue data fetched and saved to `/tmp/balatrobot/issues/NNN/`
- [ ] All attachments downloaded
- [ ] Attachments read and understood before execution
- [ ] Branch created from active branch
- [ ] Issue reproduced (or confirmed already fixed) with ≥3 runs
- [ ] HTML report generated at `/tmp/balatrobot/issues/NNN/report.html`
- [ ] Report opened in browser
- [ ] Server stopped, branch cleaned up if no fix needed
26 changes: 0 additions & 26 deletions .claude/settings.json

This file was deleted.

Loading
Loading