Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

indie-agents

Two agents that any Indie Box app can use:

  1. The feedback judge (judge/, a service on a droplet). An app sends a person's report to it. The judge looks the app up in the Indie Box registry, reads that app's code read-only, decides whether the report describes a real problem, and files a GitHub issue for the real ones. Each issue is written so a fix can be reproduced and proven.
  2. The implementation agent (.github/actions/implement, a GitHub Action an app repo's workflow uses). Labelling an issue implement-agent in an app repo runs it, in that repo's Actions. It writes a test that reproduces the problem, fixes it, PROVES the fix (the test fails without it and passes with it, the checks and the whole suite pass, and an independent check confirms every acceptance criterion), and only then opens a draft pull request.
 app (e.g. indie-chat)          judge (droplet)                    app repo on GitHub
 "Send feedback" ──POST──▶ /feedback ─▶ registry: app → repo
                                      ─▶ read the code, judge
                                      ─▶ valid: issue (format below) ──▶ issue
                                                                         │ maintainer adds
                                                                         ▼ `implement-agent`
                                  the app repo's Actions: .github/actions/implement
                                              reproduce ▸ fix ▸ prove ▸ check ▸ draft PR

Integrating an app: see docs/integration.md: how to send feedback to the judge (endpoint, payload, answers, examples) and how to use the implementation agent in an app repository.

Contracts

  • contract/feedback-v1.md: what an app posts.
  • contract/issue-format.md: the sections every filed issue has.
  • contract/indie-agents.yml: the config file an app repo adds.

The judge

  • Which app: the payload names it (app, the registry id). The judge reads registry/registry.json.in from brainbot-com/indie-box (id → source.repo), refreshed every 10 minutes. An override file wins over it, for example to test on a fork. An unknown id is refused.
  • Apps built on others: if an app's Dockerfile builds FROM another registry app's image (crefo-chat on indie-chat), that app's code is mounted too, and the issue is filed where the cause lives.
  • Safety: the model runs in a throwaway container with only read, grep, find and ls, a read-only root, no capabilities, no token, and the sender's identity never in the prompt.
  • Screen recordings: a report may carry one video (MP4, MOV or WebM, at most 25 MB). The model cannot play it, so ffmpeg, in a container of the runner image without network, takes at most 12 still frames from the first 3 minutes and the model reads those in time order. The video stays on the judge.
  • Filing: a valid verdict needs confidence ≥ 0.7 and a second independent run that agrees (at ≥ 0.5). A person reviews the issue before labelling it. The issue must be in the format, or the report is kept as unclear.
  • Deploying: see deploy/README.md (Docker Compose, Caddy, a subdomain).
  • Running locally: npm install, a judge/.env (see deploy/.env.example), npm run judge. The runner image is built with docker build -f judge/Dockerfile.runner -t indie-feedback-runner judge.

The implementation agent

In an app repo:

  1. Add .indie-agents.yml (see contract/indie-agents.yml) and a test that shows how the repo tests, for example one that boots the server with a stand-in model.
  2. Add examples/caller.yml as .github/workflows/implement.yml, with COMMIT replaced by the indie-agents commit to run (the full hash).
  3. The secret CLAUDE_CODE_OAUTH_TOKEN (from claude setup-token, the subscription the agent runs on).
  4. Settings → Actions → General: "Read and write permissions" and "Allow GitHub Actions to create and approve pull requests". Create the label implement-agent.

While indie-agents is private, its Settings → Actions → General → Access must allow the app repos (repositories owned by the same user, or in the same organisation). The runner then fetches the action, and with it all of indie-agents at that commit, by itself: no token. The job runs in the app repo's Actions, with its secrets and its minutes.

What a run does (implement/run.mjs):

  1. Check first (Claude Code, Sonnet, read-only): is the problem still in the current code, is the issue actionable, is it a safe change for one pull request? Any no: a comment on the issue saying why, and nothing is written.
  2. Implement (Claude Code, Opus): write the test from the issue's "Reproduction test" section, see it fail, fix, run the checks. The agent has file tools and only the commands in .indie-agents.yml. It has no git push and no GitHub token, and the subscription token is scrubbed from what its commands see.
  3. Prove (the workflow itself, implement/core.mjs):
    • nothing protected was touched, and a new test exists under tests.dir;
    • the test FAILS with the source changes taken out, and PASSES with them;
    • the checks and the whole suite pass.
  4. Check (Claude Code, Sonnet, read-only plus running a test): does the test exercise the reported problem, and is each ACn met?
  5. One retry with the failure details. If the fix is still not proven, the issue gets a comment saying why, and nothing is pushed.
  6. End to end (only if .indie-agents.yml has e2e): the repo's own tests against real services, in a separate step with only the secrets the config names. A required one that fails means no PR.
  7. Proven: one commit on implement/issue-<n> and a draft PR whose body carries the proof table, the end-to-end result and the check's verdict for each criterion.

Only code-level tests for now: a problem only visible in a browser needs a repo that can test it without one, or a headless browser added to its setup later.

Development

npm test runs the unit tests: the payload, the registry and the upstream detection, the issue format, the config file, and the proof against throwaway git repos.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages