brindle 0.5.5__tar.gz → 0.5.7__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.
- {brindle-0.5.5 → brindle-0.5.7}/.gitignore +2 -0
- {brindle-0.5.5 → brindle-0.5.7}/PKG-INFO +49 -17
- {brindle-0.5.5 → brindle-0.5.7}/README.md +48 -16
- {brindle-0.5.5 → brindle-0.5.7}/pyproject.toml +1 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/agents.py +90 -15
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/autopilot.py +27 -1
- brindle-0.5.7/src/brindle/builtin_rules/analysis/doc.md +10 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/bus.py +3 -2
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/cli.py +156 -6
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/company_identity.py +1 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/company_login.py +7 -3
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/api-schema.json +123 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/app.py +4 -1
- brindle-0.5.7/src/brindle/daemon/pty_view.py +778 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/routes_actions.py +244 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/routes_read.py +140 -3
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/db.py +125 -3
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/doctor.py +31 -6
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/kb.py +43 -8
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/mcp_server.py +99 -9
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/permissions.py +1 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/runner.py +20 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/picker.py +3 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pipeline.py +28 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/preflight.py +1 -2
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/account.py +46 -1
- brindle-0.5.7/src/brindle/pro/analysis_brief.py +256 -0
- brindle-0.5.7/src/brindle/pro/analysis_docs.py +691 -0
- brindle-0.5.7/src/brindle/pro/analysis_imports.py +664 -0
- brindle-0.5.7/src/brindle/pro/analysis_policy.py +102 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/auth.py +43 -12
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/dto.py +3 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/inbox.py +80 -4
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/tasks.py +6 -2
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/tmux.py +3 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/upgrade.py +6 -1
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/workspaces.py +2 -0
- {brindle-0.5.5 → brindle-0.5.7}/LICENSE +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/SCHEDULE-A +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/__main__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/account.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/airgap.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/antigravity.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/assembler.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/assets/braid_dark.png +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/assets/braid_light.png +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/budget.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/backend-auditor.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/coordinator.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-codex.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-fable.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-gemini.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-heavy.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-light.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-local.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-opencode.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer-sonnet.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/developer.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/qa.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/reviewer-codex.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/reviewer-gemini.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/reviewer-local.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/reviewer-opencode.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/reviewer.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/subagent.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_agents/supervisor.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_rules/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_rules/security/backend.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_rules/style/minimal-diff.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/builtin_rules/tests/only.md +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/check_scope.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/ci_adapters.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/ci_client.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/ci_federation.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/ci_hosts.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/clone.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/cloud_credential.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/cloud_login.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/codemap.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/codemap_docs.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/codex_hook.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/config.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/conflicts.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/connections.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/coordinator.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/cost.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/cost_estimate.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/cull.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/auth.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/events.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/holds.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/lifecycle.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/peer.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/routes_org_permissions.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/schema.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/session_review.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/daemon/terminal.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/debuglog.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/demo.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/detect.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/entry.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/escapes.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/events.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/gates.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/git.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/guardrails.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/history.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/identity_lock.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/inbox.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/key_check.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/keys_cmds.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/keystore.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/knowledge.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/launch_health.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/learned_rules.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/learning.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/legacy.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/local_setup.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/login_pause.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/model_access.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/model_availability.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/catalog.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/client.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/loop.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/lsp.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/serve.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/native/tools.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/opencode.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/org_permissions.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pane_auth.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/permission_asks.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/permission_grants.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/permission_groups.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/permission_routing.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/permissions.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/plugins.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/policy.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pool.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pricing.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/_files.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/audit_chain.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/audit_export.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/brief_learning.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/cost_centers.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/credentials.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/features.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/keys.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/learning.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/license.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/loopback.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/managed_models.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/org_profiles.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/orgkey.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/rollout.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/route_health.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/settings_sync.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/status.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/team_events.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/pro/team_policy.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/procs.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/profiles.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/prompt_answer.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/provider_homes.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/providers.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/providers_install.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/quota.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/repo_cmds.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/repos.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/rewind.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/rule_checks.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/savings.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/scratch.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/secrets.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/self_serve.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/errors.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/permissions.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/routing.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/service/sessions.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/services.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/sessions.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/sidebar_follow.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/sidebar_logo.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/signin_pause.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/status_cache.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/updates.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/usage.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/view.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/wake.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/watch.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/watch_costs.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/__init__.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/chat.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/dashboard.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/diff.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/server.py +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/static/app.js +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/web/static/index.html +0 -0
- {brindle-0.5.5 → brindle-0.5.7}/src/brindle/worker_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: brindle
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.7
|
|
4
4
|
Summary: Run coding agents in parallel, each on its own git branch, with a supervisor that delegates, reviews, and merges
|
|
5
5
|
Project-URL: Homepage, https://pawdelta.com/brindle/
|
|
6
6
|
Project-URL: Documentation, https://pawdelta.com/brindle/docs/recommended-use
|
|
@@ -32,9 +32,6 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
# brindle
|
|
34
34
|
|
|
35
|
-
*[pawdelta.com/brindle](https://pawdelta.com/brindle/) · Published on PyPI as `brindle`; the command is `brindle`. This project is
|
|
36
|
-
unrelated to the Brindle desktop app at brindle.dev.*
|
|
37
|
-
|
|
38
35
|
A supervisor for your coding agents that won't call work done until it's proven.
|
|
39
36
|
brindle runs Claude Code, Codex and open-weight models side by side, each in its own
|
|
40
37
|
git worktree. A supervisor agent splits up the work and hands it out. Each branch
|
|
@@ -42,28 +39,52 @@ merges only after a reviewer approves
|
|
|
42
39
|
that exact commit and your checks pass. A goal is done only when its check commands
|
|
43
40
|
exit 0.
|
|
44
41
|
|
|
42
|
+
**Who it's for:** developers who already use Claude Code, Codex or Google Antigravity
|
|
43
|
+
and want several agents working in parallel on one repo, with a review and a test
|
|
44
|
+
gate before anything merges. For a one-line fix, plain `claude` is quicker
|
|
45
|
+
([Recommended use](#recommended-use)).
|
|
46
|
+
|
|
47
|
+
**What it adds over running the CLI directly:** a worktree and branch per worker,
|
|
48
|
+
merges gated on a reviewer's approval of the exact commit plus your checks, goals
|
|
49
|
+
that count as done only when their check commands exit 0, and a session that keeps
|
|
50
|
+
going, pauses at your usage limit and resumes after the reset, until those checks pass.
|
|
51
|
+
|
|
45
52
|
```sh
|
|
46
|
-
curl -fsSL pawdelta.com/brindle/install | sh # installs uv and tmux if missing, then brindle
|
|
53
|
+
curl -fsSL pawdelta.com/brindle/install | sh # installs uv (and tmux on macOS) if missing, then brindle
|
|
47
54
|
# or, if you already have uv and tmux:
|
|
48
55
|
uv tool install brindle
|
|
49
56
|
|
|
50
57
|
brindle demo # watch it finish a practice repo in a few minutes
|
|
51
58
|
```
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
macOS, Linux, or Windows through WSL2. You need tmux and at least one agent CLI,
|
|
61
|
+
installed and signed in ([Install](#install)).
|
|
62
|
+
|
|
63
|
+
**License:** source-available, not open source. brindle is free to use, including at
|
|
64
|
+
work, under the [brindle License 1.0](LICENSE): you may install and run it, but not
|
|
65
|
+
modify it (beyond the changes the license permits) or redistribute it, or use it to
|
|
66
|
+
build a competing service ([details](#license)).
|
|
67
|
+
|
|
68
|
+
**Free and paid:** the core workflow is free, with no plan limit on agents, workers or
|
|
69
|
+
sessions (by default up to 5 workers at once per session, set by `max_agents`), and
|
|
70
|
+
Free needs no account. brindle Pro is $20/month; brindle Team is $40/seat/month,
|
|
71
|
+
up to 20 seats ([what each adds](#brindle-pro-and-team),
|
|
72
|
+
[pricing](https://pawdelta.com/brindle/pricing/)).
|
|
56
73
|
|
|
57
74
|

|
|
58
75
|
|
|
59
76
|
*`brindle demo`, recorded on brindle 0.4.1 (sped up about 2.7×, 20 seconds): two workers in parallel, each branch reviewed and merged, both milestones verified by their check commands.*
|
|
60
77
|
|
|
78
|
+
Website: [pawdelta.com/brindle](https://pawdelta.com/brindle/) · Published on PyPI as
|
|
79
|
+
`brindle`; the command is `brindle`.
|
|
80
|
+
|
|
61
81
|
- **Done means a command passed.** A goal is split into milestones, each with a
|
|
62
82
|
check command that brindle runs itself. A milestone is verified when its check exits
|
|
63
83
|
0, re-run after later merges to catch regressions, never when a model says so.
|
|
64
84
|
- **Reviewed before it merges.** A reviewer approves the exact sha, then
|
|
65
|
-
pre-commit and your `checks` run.
|
|
66
|
-
|
|
85
|
+
pre-commit and your `checks` run. The default reviewer is Claude; set
|
|
86
|
+
`review_profile` to `reviewer-codex` or `reviewer-local` for a second model's
|
|
87
|
+
view. Nothing reaches your default branch on its own.
|
|
67
88
|
- **Parallel agents, no collisions.** Every worker gets its own worktree and
|
|
68
89
|
branch, cut from a freshly fetched base, with its own block of ports and
|
|
69
90
|
optional per-worktree databases (brindle Pro).
|
|
@@ -85,8 +106,10 @@ service ([details](#license)).
|
|
|
85
106
|
curl -fsSL pawdelta.com/brindle/install | sh
|
|
86
107
|
```
|
|
87
108
|
|
|
88
|
-
The script ([scripts/install.sh](scripts/install.sh)) installs uv
|
|
89
|
-
|
|
109
|
+
The script ([scripts/install.sh](scripts/install.sh)) installs uv if it's missing
|
|
110
|
+
and tmux if it's missing (with Homebrew on macOS; elsewhere it prints the command to
|
|
111
|
+
run), then brindle (Python 3.11 or newer, which uv fetches if needed), then runs
|
|
112
|
+
`brindle doctor`. Run it again to upgrade.
|
|
90
113
|
Session starts check PyPI at most once a day and show available updates in the status
|
|
91
114
|
bar and `brindle doctor`; set `"auto_update": true` in `~/.brindle/config.json` to
|
|
92
115
|
upgrade in the background (restart to use it). Checks skip local and editable
|
|
@@ -99,12 +122,15 @@ uv tool install brindle
|
|
|
99
122
|
uv tool install --editable ~/Projects/brindle # or from a local checkout
|
|
100
123
|
```
|
|
101
124
|
|
|
102
|
-
brindle drives
|
|
125
|
+
brindle drives the agent CLIs you already use, so you need at least one installed and
|
|
126
|
+
signed in. Claude Code is the default for the supervisor, workers and reviewer
|
|
127
|
+
(`npm install -g @anthropic-ai/claude-code`, then `claude auth login`); Codex
|
|
128
|
+
(`brindle -s codex` makes it the supervisor) and Google Antigravity work too.
|
|
103
129
|
|
|
104
|
-
There's also a free brindle desktop app for macOS
|
|
130
|
+
There's also a free brindle desktop app for macOS and Linux (on Windows, use the CLI inside WSL2). It's a download from the brindle website and runs on the same engine; the CLI keeps working alongside it. `brindle app` opens the app, or prints the download link if it isn't installed. `brindle daemon` runs the local API the app talks to: over a Unix socket by default, or on `--tcp` at 127.0.0.1 for WSL. Over `--tcp` the daemon can't check whether a caller is an agent, so its token is the only gate: keep TCP for the WSL client.
|
|
105
131
|
|
|
106
132
|
`brindle --version` prints the installed version; the tmux status bar of every brindle
|
|
107
|
-
session shows it too (`brindle 0.
|
|
133
|
+
session shows it too (`brindle 0.5.7`). A session started before an upgrade keeps
|
|
108
134
|
running the old code, and shows the old number, until you restart it.
|
|
109
135
|
|
|
110
136
|
## Quick start
|
|
@@ -1068,7 +1094,9 @@ brindle is complete on its own. brindle Pro adds hosted learning (which profile
|
|
|
1068
1094
|
to use for which kind of task; per person on Pro, per organization on Team,
|
|
1069
1095
|
and kept private) and brindle Team adds org policies (allowed providers
|
|
1070
1096
|
and models, human review before merges) and an audit feed of what brindle did.
|
|
1071
|
-
|
|
1097
|
+
Free needs no account. brindle Pro is $20/month and brindle Team $40/seat/month, up
|
|
1098
|
+
to 20 seats; brindle Enterprise is by contact. Plans and prices:
|
|
1099
|
+
https://pawdelta.com/brindle/pricing/.
|
|
1072
1100
|
|
|
1073
1101
|
Run `brindle account` to see every paid feature, which ones your plan includes,
|
|
1074
1102
|
how to use them, and the next step to get the rest:
|
|
@@ -2370,6 +2398,10 @@ The pre-push hook that ran these before every push is off for now
|
|
|
2370
2398
|
## License
|
|
2371
2399
|
|
|
2372
2400
|
brindle is source-available, not open source: you may install and use it under the
|
|
2373
|
-
[brindle License 1.0](LICENSE), which does not allow changing
|
|
2401
|
+
[brindle License 1.0](LICENSE), which does not allow changing it (beyond the
|
|
2402
|
+
permitted changes it lists: contributions, configuration and plugins, private fixes)
|
|
2403
|
+
or redistributing it,
|
|
2374
2404
|
using it for the competing services listed in [SCHEDULE-A](SCHEDULE-A), or getting
|
|
2375
2405
|
around paid-feature checks.
|
|
2406
|
+
|
|
2407
|
+
This project is unrelated to the Brindle desktop app at brindle.dev.
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
# brindle
|
|
2
2
|
|
|
3
|
-
*[pawdelta.com/brindle](https://pawdelta.com/brindle/) · Published on PyPI as `brindle`; the command is `brindle`. This project is
|
|
4
|
-
unrelated to the Brindle desktop app at brindle.dev.*
|
|
5
|
-
|
|
6
3
|
A supervisor for your coding agents that won't call work done until it's proven.
|
|
7
4
|
brindle runs Claude Code, Codex and open-weight models side by side, each in its own
|
|
8
5
|
git worktree. A supervisor agent splits up the work and hands it out. Each branch
|
|
@@ -10,28 +7,52 @@ merges only after a reviewer approves
|
|
|
10
7
|
that exact commit and your checks pass. A goal is done only when its check commands
|
|
11
8
|
exit 0.
|
|
12
9
|
|
|
10
|
+
**Who it's for:** developers who already use Claude Code, Codex or Google Antigravity
|
|
11
|
+
and want several agents working in parallel on one repo, with a review and a test
|
|
12
|
+
gate before anything merges. For a one-line fix, plain `claude` is quicker
|
|
13
|
+
([Recommended use](#recommended-use)).
|
|
14
|
+
|
|
15
|
+
**What it adds over running the CLI directly:** a worktree and branch per worker,
|
|
16
|
+
merges gated on a reviewer's approval of the exact commit plus your checks, goals
|
|
17
|
+
that count as done only when their check commands exit 0, and a session that keeps
|
|
18
|
+
going, pauses at your usage limit and resumes after the reset, until those checks pass.
|
|
19
|
+
|
|
13
20
|
```sh
|
|
14
|
-
curl -fsSL pawdelta.com/brindle/install | sh # installs uv and tmux if missing, then brindle
|
|
21
|
+
curl -fsSL pawdelta.com/brindle/install | sh # installs uv (and tmux on macOS) if missing, then brindle
|
|
15
22
|
# or, if you already have uv and tmux:
|
|
16
23
|
uv tool install brindle
|
|
17
24
|
|
|
18
25
|
brindle demo # watch it finish a practice repo in a few minutes
|
|
19
26
|
```
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
macOS, Linux, or Windows through WSL2. You need tmux and at least one agent CLI,
|
|
29
|
+
installed and signed in ([Install](#install)).
|
|
30
|
+
|
|
31
|
+
**License:** source-available, not open source. brindle is free to use, including at
|
|
32
|
+
work, under the [brindle License 1.0](LICENSE): you may install and run it, but not
|
|
33
|
+
modify it (beyond the changes the license permits) or redistribute it, or use it to
|
|
34
|
+
build a competing service ([details](#license)).
|
|
35
|
+
|
|
36
|
+
**Free and paid:** the core workflow is free, with no plan limit on agents, workers or
|
|
37
|
+
sessions (by default up to 5 workers at once per session, set by `max_agents`), and
|
|
38
|
+
Free needs no account. brindle Pro is $20/month; brindle Team is $40/seat/month,
|
|
39
|
+
up to 20 seats ([what each adds](#brindle-pro-and-team),
|
|
40
|
+
[pricing](https://pawdelta.com/brindle/pricing/)).
|
|
24
41
|
|
|
25
42
|

|
|
26
43
|
|
|
27
44
|
*`brindle demo`, recorded on brindle 0.4.1 (sped up about 2.7×, 20 seconds): two workers in parallel, each branch reviewed and merged, both milestones verified by their check commands.*
|
|
28
45
|
|
|
46
|
+
Website: [pawdelta.com/brindle](https://pawdelta.com/brindle/) · Published on PyPI as
|
|
47
|
+
`brindle`; the command is `brindle`.
|
|
48
|
+
|
|
29
49
|
- **Done means a command passed.** A goal is split into milestones, each with a
|
|
30
50
|
check command that brindle runs itself. A milestone is verified when its check exits
|
|
31
51
|
0, re-run after later merges to catch regressions, never when a model says so.
|
|
32
52
|
- **Reviewed before it merges.** A reviewer approves the exact sha, then
|
|
33
|
-
pre-commit and your `checks` run.
|
|
34
|
-
|
|
53
|
+
pre-commit and your `checks` run. The default reviewer is Claude; set
|
|
54
|
+
`review_profile` to `reviewer-codex` or `reviewer-local` for a second model's
|
|
55
|
+
view. Nothing reaches your default branch on its own.
|
|
35
56
|
- **Parallel agents, no collisions.** Every worker gets its own worktree and
|
|
36
57
|
branch, cut from a freshly fetched base, with its own block of ports and
|
|
37
58
|
optional per-worktree databases (brindle Pro).
|
|
@@ -53,8 +74,10 @@ service ([details](#license)).
|
|
|
53
74
|
curl -fsSL pawdelta.com/brindle/install | sh
|
|
54
75
|
```
|
|
55
76
|
|
|
56
|
-
The script ([scripts/install.sh](scripts/install.sh)) installs uv
|
|
57
|
-
|
|
77
|
+
The script ([scripts/install.sh](scripts/install.sh)) installs uv if it's missing
|
|
78
|
+
and tmux if it's missing (with Homebrew on macOS; elsewhere it prints the command to
|
|
79
|
+
run), then brindle (Python 3.11 or newer, which uv fetches if needed), then runs
|
|
80
|
+
`brindle doctor`. Run it again to upgrade.
|
|
58
81
|
Session starts check PyPI at most once a day and show available updates in the status
|
|
59
82
|
bar and `brindle doctor`; set `"auto_update": true` in `~/.brindle/config.json` to
|
|
60
83
|
upgrade in the background (restart to use it). Checks skip local and editable
|
|
@@ -67,12 +90,15 @@ uv tool install brindle
|
|
|
67
90
|
uv tool install --editable ~/Projects/brindle # or from a local checkout
|
|
68
91
|
```
|
|
69
92
|
|
|
70
|
-
brindle drives
|
|
93
|
+
brindle drives the agent CLIs you already use, so you need at least one installed and
|
|
94
|
+
signed in. Claude Code is the default for the supervisor, workers and reviewer
|
|
95
|
+
(`npm install -g @anthropic-ai/claude-code`, then `claude auth login`); Codex
|
|
96
|
+
(`brindle -s codex` makes it the supervisor) and Google Antigravity work too.
|
|
71
97
|
|
|
72
|
-
There's also a free brindle desktop app for macOS
|
|
98
|
+
There's also a free brindle desktop app for macOS and Linux (on Windows, use the CLI inside WSL2). It's a download from the brindle website and runs on the same engine; the CLI keeps working alongside it. `brindle app` opens the app, or prints the download link if it isn't installed. `brindle daemon` runs the local API the app talks to: over a Unix socket by default, or on `--tcp` at 127.0.0.1 for WSL. Over `--tcp` the daemon can't check whether a caller is an agent, so its token is the only gate: keep TCP for the WSL client.
|
|
73
99
|
|
|
74
100
|
`brindle --version` prints the installed version; the tmux status bar of every brindle
|
|
75
|
-
session shows it too (`brindle 0.
|
|
101
|
+
session shows it too (`brindle 0.5.7`). A session started before an upgrade keeps
|
|
76
102
|
running the old code, and shows the old number, until you restart it.
|
|
77
103
|
|
|
78
104
|
## Quick start
|
|
@@ -1036,7 +1062,9 @@ brindle is complete on its own. brindle Pro adds hosted learning (which profile
|
|
|
1036
1062
|
to use for which kind of task; per person on Pro, per organization on Team,
|
|
1037
1063
|
and kept private) and brindle Team adds org policies (allowed providers
|
|
1038
1064
|
and models, human review before merges) and an audit feed of what brindle did.
|
|
1039
|
-
|
|
1065
|
+
Free needs no account. brindle Pro is $20/month and brindle Team $40/seat/month, up
|
|
1066
|
+
to 20 seats; brindle Enterprise is by contact. Plans and prices:
|
|
1067
|
+
https://pawdelta.com/brindle/pricing/.
|
|
1040
1068
|
|
|
1041
1069
|
Run `brindle account` to see every paid feature, which ones your plan includes,
|
|
1042
1070
|
how to use them, and the next step to get the rest:
|
|
@@ -2338,6 +2366,10 @@ The pre-push hook that ran these before every push is off for now
|
|
|
2338
2366
|
## License
|
|
2339
2367
|
|
|
2340
2368
|
brindle is source-available, not open source: you may install and use it under the
|
|
2341
|
-
[brindle License 1.0](LICENSE), which does not allow changing
|
|
2369
|
+
[brindle License 1.0](LICENSE), which does not allow changing it (beyond the
|
|
2370
|
+
permitted changes it lists: contributions, configuration and plugins, private fixes)
|
|
2371
|
+
or redistributing it,
|
|
2342
2372
|
using it for the competing services listed in [SCHEDULE-A](SCHEDULE-A), or getting
|
|
2343
2373
|
around paid-feature checks.
|
|
2374
|
+
|
|
2375
|
+
This project is unrelated to the Brindle desktop app at brindle.dev.
|
|
@@ -338,9 +338,11 @@ plan is approved; if it comes back with feedback, revise it and call
|
|
|
338
338
|
|
|
339
339
|
def decorate_worker_prompt(task: str, agent_id: str, ws: Workspace, done_when: str | None,
|
|
340
340
|
provider, headless: bool, plan_first: bool = False,
|
|
341
|
-
decisions: str = "", chunks: str = "", report_only: bool = False
|
|
341
|
+
decisions: str = "", chunks: str = "", report_only: bool = False,
|
|
342
|
+
analysis: str = "") -> str:
|
|
342
343
|
"""The prompt actually sent to a handoff/assign worker's CLI: the raw
|
|
343
|
-
``task``, the ``decisions`` block that covers its files,
|
|
344
|
+
``task``, the ``decisions`` block that covers its files, the ``analysis``
|
|
345
|
+
doc rule and brief (large work only), its finish line,
|
|
344
346
|
the WORKER_FOOTER reminder to report, and (for an interactive Claude
|
|
345
347
|
worker with a finish line) the ``/goal`` wrapper. Used at spawn time, and
|
|
346
348
|
again by ``resume`` to rebuild it (decisions from the brief's receipt)
|
|
@@ -348,7 +350,7 @@ def decorate_worker_prompt(task: str, agent_id: str, ws: Workspace, done_when: s
|
|
|
348
350
|
from brindle import autopilot as pilot
|
|
349
351
|
|
|
350
352
|
prompt = assemble([Block(TASK_AND_RULES, task), Block(DECISIONS, decisions),
|
|
351
|
-
Block(DOCUMENT_CHUNKS, chunks)])
|
|
353
|
+
Block(DOCUMENT_CHUNKS, chunks), Block(DOCUMENT_CHUNKS, analysis)])
|
|
352
354
|
if done_when:
|
|
353
355
|
prompt += f"\n\nFinish line: {done_when.strip()}"
|
|
354
356
|
if plan_first:
|
|
@@ -383,18 +385,23 @@ def spawn(
|
|
|
383
385
|
claim_goals: bool = True,
|
|
384
386
|
files: list[str] | None = None,
|
|
385
387
|
weight: str | None = None,
|
|
388
|
+
analysis_doc: bool = False,
|
|
386
389
|
) -> Agent:
|
|
387
390
|
"""Start an agent in ``ws``. ``weight`` is the weight its task was routed
|
|
388
391
|
as, kept on the agent so the owner's per-kind effort and instructions apply
|
|
389
392
|
from the first launch. Workers (handoff/assign) given a ``done_when``
|
|
390
393
|
finish line run it as a Claude Code ``/goal``; their brief carries the
|
|
391
|
-
accepted decisions covering ``files
|
|
392
|
-
|
|
394
|
+
accepted decisions covering ``files``, and for large work (heavy/advanced,
|
|
395
|
+
or ``analysis_doc`` asked for) the analysis-doc rule and brief. An
|
|
396
|
+
interactive root always drives toward a goal (see brindle.autopilot);
|
|
393
397
|
with ``claim_goals`` it claims a hand-written ``.brindle/goals.md``."""
|
|
394
398
|
from brindle import autopilot as pilot
|
|
395
399
|
from brindle import identity_lock
|
|
396
400
|
|
|
397
401
|
identity_lock.ensure_workspace(db, ws) # no new agent in another identity's worktree
|
|
402
|
+
session_root = pilot.root_of(db, parent_id) if parent_id else None
|
|
403
|
+
if session_root:
|
|
404
|
+
db.set_workspace_session_root(ws.id, session_root)
|
|
398
405
|
profile = load_profile(profile_name, ws.repo_root)
|
|
399
406
|
if (profile.name == "coordinator") != (mode == "coordinator"):
|
|
400
407
|
# Only the sweep starts a coordinator (brindle.coordinator.wake).
|
|
@@ -414,6 +421,14 @@ def spawn(
|
|
|
414
421
|
# wrapper), but the fully decorated prompt for a subagent (that text IS
|
|
415
422
|
# what's handed to the supervisor's own Agent tool) or a reviewer.
|
|
416
423
|
raw_task = prompt
|
|
424
|
+
analysis = ""
|
|
425
|
+
if mode in ("handoff", "assign"):
|
|
426
|
+
from brindle.pro import analysis_brief
|
|
427
|
+
|
|
428
|
+
analysis = analysis_brief.brief_context(
|
|
429
|
+
db, ws.repo_root, ws.branch, agent_id, prompt or "", files,
|
|
430
|
+
large=analysis_brief.large_work(weight, requested=analysis_doc),
|
|
431
|
+
**({"session_id": session_root} if session_root else {}))
|
|
417
432
|
if not provider.launches_process:
|
|
418
433
|
if mode not in ("handoff", "assign"):
|
|
419
434
|
raise AgentError(
|
|
@@ -429,7 +444,7 @@ def spawn(
|
|
|
429
444
|
guardrails.scope_prompt(guardrails.effective(profile))) if p)
|
|
430
445
|
tuned = _with_overrides(profile, _weight_kind(weight), ws.repo_root)
|
|
431
446
|
full = f"{tuned.prompt.strip()}\n\n{rules}".strip() if rules else tuned.prompt
|
|
432
|
-
prompt = raw_task = subagent_prompt(full, prompt or "", ws, done_when)
|
|
447
|
+
prompt = raw_task = subagent_prompt(full, prompt or "", ws, done_when, analysis)
|
|
433
448
|
elif prompt and mode in ("handoff", "assign"):
|
|
434
449
|
from brindle import codemap
|
|
435
450
|
prompt = decorate_worker_prompt(prompt, agent_id, ws, done_when, provider, headless,
|
|
@@ -437,7 +452,8 @@ def spawn(
|
|
|
437
452
|
report_only=is_review_profile(profile.name, ws.repo_root),
|
|
438
453
|
decisions=knowledge.brief_decisions(db, ws.repo_root, agent_id, files),
|
|
439
454
|
chunks=knowledge.brief_chunks(db, ws.repo_root, agent_id, prompt, files,
|
|
440
|
-
codemap.graph_path(ws))
|
|
455
|
+
codemap.graph_path(ws)),
|
|
456
|
+
analysis=analysis)
|
|
441
457
|
elif prompt and mode == "review":
|
|
442
458
|
prompt = raw_task = prompt + REVIEW_FOOTER.format(agent_id=agent_id, branch=ws.branch)
|
|
443
459
|
|
|
@@ -1589,12 +1605,17 @@ def _fresh_start_prompt(db: DB, a: Agent, ws: Workspace, provider, note: str) ->
|
|
|
1589
1605
|
# start needs the same decoration it got the first time. A row
|
|
1590
1606
|
# from before this change stored the already-decorated text, so
|
|
1591
1607
|
# it gets decorated a second time here; harmless, if redundant.
|
|
1608
|
+
from brindle.pro import analysis_brief
|
|
1609
|
+
|
|
1592
1610
|
return decorate_worker_prompt(
|
|
1593
1611
|
a.task, a.id, ws, a.done_when, provider, bool(a.headless),
|
|
1594
1612
|
plan_first=bool(a.plan_first) and a.plan_state != "approved",
|
|
1595
1613
|
report_only=is_review_profile(a.profile, ws.repo_root),
|
|
1596
1614
|
decisions=knowledge.replay_decisions(db, a.id),
|
|
1597
|
-
chunks=knowledge.replay_chunks(db, a.id)
|
|
1615
|
+
chunks=knowledge.replay_chunks(db, a.id),
|
|
1616
|
+
analysis=analysis_brief.brief_context(
|
|
1617
|
+
db, ws.repo_root, ws.branch, a.id, a.task, None,
|
|
1618
|
+
large=analysis_brief.got_context(db, a.id))) + note
|
|
1598
1619
|
return (a.task + note) if a.task else None
|
|
1599
1620
|
|
|
1600
1621
|
|
|
@@ -2203,9 +2224,10 @@ def _paste_blocked(agent: Agent) -> bool:
|
|
|
2203
2224
|
# -- subagent provider -------------------------------------------------------------
|
|
2204
2225
|
|
|
2205
2226
|
|
|
2206
|
-
def subagent_prompt(profile_prompt: str, task: str, ws: Workspace, done_when: str | None
|
|
2227
|
+
def subagent_prompt(profile_prompt: str, task: str, ws: Workspace, done_when: str | None,
|
|
2228
|
+
analysis: str = "") -> str:
|
|
2207
2229
|
"""What the supervisor passes to its Agent tool for a subagent worker."""
|
|
2208
|
-
parts = [profile_prompt.strip(), "Task:\n" + task.strip()]
|
|
2230
|
+
parts = [profile_prompt.strip(), "Task:\n" + task.strip(), analysis]
|
|
2209
2231
|
if done_when:
|
|
2210
2232
|
parts.append(f"Finish line: {done_when.strip()}")
|
|
2211
2233
|
body = "\n\n".join(p for p in parts if p)
|
|
@@ -2262,12 +2284,14 @@ def condense(head: str, *body: str) -> str:
|
|
|
2262
2284
|
|
|
2263
2285
|
|
|
2264
2286
|
def report_result(db: DB, agent_id: str, result: str, forward: bool = True,
|
|
2265
|
-
removed: tuple[Agent, Workspace] | None = None) -> str:
|
|
2287
|
+
removed: tuple[Agent, Workspace] | None = None, docs_checked: bool = False) -> str:
|
|
2266
2288
|
"""Record a worker's or reviewer's result. A piped worker's report goes
|
|
2267
2289
|
to the pipeline (which reviews and merges the branch); otherwise, and
|
|
2268
2290
|
with ``forward``, it's sent to the parent as a message. ``removed`` is a
|
|
2269
2291
|
reviewer and workspace the pipeline has just removed, loaded before that:
|
|
2270
|
-
the result is then only recorded in the history.
|
|
2292
|
+
the result is then only recorded in the history. A first result waits
|
|
2293
|
+
while an analysis doc the agent read has a newer version it hasn't read
|
|
2294
|
+
(unless the caller already checked: ``docs_checked``)."""
|
|
2271
2295
|
from brindle import history, pipeline, pricing, usage as usage_mod
|
|
2272
2296
|
|
|
2273
2297
|
if removed and db.get_agent(agent_id) is None:
|
|
@@ -2276,6 +2300,10 @@ def report_result(db: DB, agent_id: str, result: str, forward: bool = True,
|
|
|
2276
2300
|
agent = get(db, agent_id)
|
|
2277
2301
|
ws = db.get_workspace(agent.workspace_id)
|
|
2278
2302
|
first = agent.result is None
|
|
2303
|
+
if first and not removed and not docs_checked:
|
|
2304
|
+
stale = stale_analysis_docs(db, agent.id)
|
|
2305
|
+
if stale:
|
|
2306
|
+
return stale
|
|
2279
2307
|
db.set_result(agent.id, result)
|
|
2280
2308
|
if ws:
|
|
2281
2309
|
bus.publish_agent(db, "agent.reported", agent.id, workspace_id=ws.id,
|
|
@@ -2420,7 +2448,7 @@ def submit_review(db: DB, caller_id: str, approved: bool, summary: str) -> str:
|
|
|
2420
2448
|
return "Only a reviewer started with request_review can submit a review."
|
|
2421
2449
|
if is_auditor: # the completion audit, not a branch review
|
|
2422
2450
|
text = autopilot.record_audit(db, root_id, approved, summary)
|
|
2423
|
-
report_result(db, caller.id, text, forward=False)
|
|
2451
|
+
report_result(db, caller.id, text, forward=False, docs_checked=True) # the audit is recorded
|
|
2424
2452
|
try:
|
|
2425
2453
|
send_message(db, root_id, text, sender_id=caller.id)
|
|
2426
2454
|
except (AgentError, tmux.TmuxError):
|
|
@@ -2431,6 +2459,9 @@ def submit_review(db: DB, caller_id: str, approved: bool, summary: str) -> str:
|
|
|
2431
2459
|
# whatever the verdict set off is done.
|
|
2432
2460
|
if caller.result is not None:
|
|
2433
2461
|
return "Your review was already recorded. You're done."
|
|
2462
|
+
stale = stale_analysis_docs(db, caller.id)
|
|
2463
|
+
if stale:
|
|
2464
|
+
return stale
|
|
2434
2465
|
# Recorded without the branch's merge lock: a merge holds it while the
|
|
2435
2466
|
# repo's checks run, for minutes, and a verdict waiting on it left the
|
|
2436
2467
|
# reviewer's call hanging until its CLI gave up on it, never recorded.
|
|
@@ -2657,8 +2688,10 @@ def delegate(
|
|
|
2657
2688
|
start: str | None = None,
|
|
2658
2689
|
files: list[str] | None = None,
|
|
2659
2690
|
weight: str | None = None,
|
|
2691
|
+
analysis_doc: bool = False,
|
|
2660
2692
|
) -> tuple[Agent, Workspace]:
|
|
2661
|
-
"""Start a worker. ``weight`` is the weight its task was routed as
|
|
2693
|
+
"""Start a worker. ``weight`` is the weight its task was routed as;
|
|
2694
|
+
``analysis_doc`` asks for an analysis doc whatever the weight.
|
|
2662
2695
|
``plan_first`` (None: the repo's ``plan_first`` config)
|
|
2663
2696
|
makes it get a plan approved before it may edit; ``files`` picks the
|
|
2664
2697
|
decisions its brief carries. With ``isolate``, the worker gets a new worktree whose
|
|
@@ -2692,7 +2725,7 @@ def delegate(
|
|
|
2692
2725
|
return spawn(
|
|
2693
2726
|
db, ws, profile, prompt=task, parent_id=caller.id if caller else None, mode=mode,
|
|
2694
2727
|
done_when=done_when, background_setup=True, plan_first=bool(plan_first), files=files,
|
|
2695
|
-
weight=weight,
|
|
2728
|
+
weight=weight, analysis_doc=analysis_doc,
|
|
2696
2729
|
)
|
|
2697
2730
|
|
|
2698
2731
|
if isolate:
|
|
@@ -2717,6 +2750,7 @@ def delegate(
|
|
|
2717
2750
|
created = workspaces.create(
|
|
2718
2751
|
db, caller_ws.path, branch, base, fetch=False, start=start,
|
|
2719
2752
|
apply_prefix=False, reuse_registered=True,
|
|
2753
|
+
session_root=pilot.root_of(db, caller.id) if caller else None,
|
|
2720
2754
|
)
|
|
2721
2755
|
if created.setup and not created.setup.ok:
|
|
2722
2756
|
raise AgentError(f"workspace setup failed:\n{created.setup.log}")
|
|
@@ -3259,6 +3293,17 @@ def _request_review(db: DB, caller: Agent | None, ws: Workspace, profile: str |
|
|
|
3259
3293
|
task += f"\n\nIts finish line: {worker_done_when.strip()}"
|
|
3260
3294
|
task += _review_context(db, ws, worker, worker_files)
|
|
3261
3295
|
|
|
3296
|
+
from brindle.pro import analysis_brief
|
|
3297
|
+
|
|
3298
|
+
try:
|
|
3299
|
+
changed = git.paths(["diff", "--name-only", f"{ws.base_branch}...HEAD"], ws.path) if ws.base_branch else []
|
|
3300
|
+
except git.GitError:
|
|
3301
|
+
changed = []
|
|
3302
|
+
covering, cited = analysis_brief.review_context(db, ws.repo_root, (worker.task or "") if worker else "",
|
|
3303
|
+
list(dict.fromkeys([*worker_files, *changed])))
|
|
3304
|
+
if covering:
|
|
3305
|
+
task += f"\n\n{covering}"
|
|
3306
|
+
|
|
3262
3307
|
if check_summary:
|
|
3263
3308
|
task += (f"\n\nThe repo's checks have already run on this commit:\n\n{check_summary}\n\n"
|
|
3264
3309
|
"Take these results into account; don't run the whole suite yourself.")
|
|
@@ -3307,6 +3352,9 @@ def _request_review(db: DB, caller: Agent | None, ws: Workspace, profile: str |
|
|
|
3307
3352
|
# replace that verdict in the same role (gates.standing_reviews).
|
|
3308
3353
|
if reviewer is not None:
|
|
3309
3354
|
db.update_agent(reviewer.id, review_slot=profile if second else "")
|
|
3355
|
+
if cited: # the docs its brief cites, pinned at the versions it got
|
|
3356
|
+
knowledge.record_receipt(db, reviewer.id, cited)
|
|
3357
|
+
analysis_brief.record_session_citations(db, reviewer.id, cited)
|
|
3310
3358
|
bus.publish_agent(db, "review.started", reviewer.id, workspace_id=ws.id,
|
|
3311
3359
|
repo_root=ws.repo_root, sha=sha) # the stage_timings rollup
|
|
3312
3360
|
return reviewer
|
|
@@ -4152,6 +4200,7 @@ def handle_hook(db: DB, agent_id: str, event: str, payload: dict) -> dict | None
|
|
|
4152
4200
|
# The turn is over: a worker's worktree is snapshotted (brindle.rewind)
|
|
4153
4201
|
# before anything below could start its next turn.
|
|
4154
4202
|
snapshot_turn(db, agent)
|
|
4203
|
+
analysis_docs_turn(db, agent)
|
|
4155
4204
|
|
|
4156
4205
|
# Claude Code shows any blocked stop as "Stop hook error" in the chat.
|
|
4157
4206
|
# Where a person watches (an interactive agent), brindle lets the stop
|
|
@@ -4187,6 +4236,7 @@ def handle_hook(db: DB, agent_id: str, event: str, payload: dict) -> dict | None
|
|
|
4187
4236
|
if payload.get("type") == "agent-turn-complete":
|
|
4188
4237
|
db.set_status(agent_id, "idle")
|
|
4189
4238
|
snapshot_turn(db, agent)
|
|
4239
|
+
analysis_docs_turn(db, agent)
|
|
4190
4240
|
if agent.mode == "interactive" and not db.pending_count(agent_id):
|
|
4191
4241
|
# What the Stop hook does for Claude Code: an autopilot
|
|
4192
4242
|
# supervisor that stops short is told to keep going (capped
|
|
@@ -4329,6 +4379,31 @@ def snapshot_turn(db: DB, agent: Agent) -> int | None:
|
|
|
4329
4379
|
return None
|
|
4330
4380
|
|
|
4331
4381
|
|
|
4382
|
+
def stale_analysis_docs(db: DB, agent_id: str) -> str | None:
|
|
4383
|
+
"""Why ``agent_id``'s result can't be accepted yet: analysis docs it read
|
|
4384
|
+
have newer versions it hasn't read (brindle.pro.analysis_docs). None to
|
|
4385
|
+
go ahead. Never raises."""
|
|
4386
|
+
try:
|
|
4387
|
+
from brindle.pro import analysis_docs
|
|
4388
|
+
|
|
4389
|
+
return analysis_docs.stale_before_result(db, agent_id)
|
|
4390
|
+
except Exception: # noqa: BLE001
|
|
4391
|
+
log.exception("brindle: couldn't check %s's analysis docs", agent_id)
|
|
4392
|
+
return None
|
|
4393
|
+
|
|
4394
|
+
|
|
4395
|
+
def analysis_docs_turn(db: DB, agent: Agent) -> None:
|
|
4396
|
+
"""At the end of a turn: tell the agent about analysis docs it read that
|
|
4397
|
+
have changed since, and settle drafts its session still owes the server
|
|
4398
|
+
(brindle.pro.analysis_docs). Never raises."""
|
|
4399
|
+
try:
|
|
4400
|
+
from brindle.pro import analysis_docs
|
|
4401
|
+
|
|
4402
|
+
analysis_docs.on_turn(db, agent)
|
|
4403
|
+
except Exception: # noqa: BLE001
|
|
4404
|
+
log.exception("brindle: couldn't check %s's analysis docs", agent.id)
|
|
4405
|
+
|
|
4406
|
+
|
|
4332
4407
|
def agent_for_session(db: DB, session_id: object) -> str | None:
|
|
4333
4408
|
"""The newest agent whose CLI session is ``session_id``, if any."""
|
|
4334
4409
|
if not session_id:
|
|
@@ -668,6 +668,11 @@ def set_goal(db: DB, root_id: str, goal: str,
|
|
|
668
668
|
_adopt_legacy(db, root_id)
|
|
669
669
|
old = {(m.title, m.check_cmd): m for m in db.milestones(root_id)}
|
|
670
670
|
ap = db.get_autopilot(root_id)
|
|
671
|
+
from brindle.pro import analysis_brief
|
|
672
|
+
|
|
673
|
+
# A goal that becomes large work (new, or grown to 2+ milestones) gets the
|
|
674
|
+
# server's brief once, whichever way it was set.
|
|
675
|
+
briefed = analysis_brief.large_work(milestones=len(old)) and ap is not None and ap.goal == goal.strip()
|
|
671
676
|
fields: dict[str, object] = {}
|
|
672
677
|
if ap is None or ap.goal != goal.strip():
|
|
673
678
|
fields["audit_history"] = None
|
|
@@ -690,6 +695,26 @@ def set_goal(db: DB, root_id: str, goal: str,
|
|
|
690
695
|
write_goals_file(db, root_id)
|
|
691
696
|
knowledge.note(db, root_id, knowledge.INTENT,
|
|
692
697
|
{"summary": "\n".join([goal.strip(), *(m[0] for m in milestones)]), "paths": []})
|
|
698
|
+
if analysis_brief.large_work(milestones=len(milestones)) and not briefed:
|
|
699
|
+
brief = analysis_brief.server_brief(db, root_id, "\n".join([goal.strip(), *(m[0] for m in milestones)]), [])
|
|
700
|
+
if brief:
|
|
701
|
+
db.enqueue(root_id, brief, None)
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
def _goal_doc_rule(db: DB, root_id: str) -> str:
|
|
705
|
+
"""For a goal of 2+ milestones, now reached: the rule to leave its analysis doc."""
|
|
706
|
+
from brindle.pro import analysis_brief
|
|
707
|
+
|
|
708
|
+
try:
|
|
709
|
+
root = db.get_agent(root_id)
|
|
710
|
+
ws = db.get_workspace(root.workspace_id) if root else None
|
|
711
|
+
if ws is None or not analysis_brief.large_work(milestones=len(db.milestones(root_id))):
|
|
712
|
+
return ""
|
|
713
|
+
return ("This goal had 2+ milestones: before you tell the user, leave its analysis doc.\n\n"
|
|
714
|
+
+ analysis_brief.doc_rule(db, ws.repo_root, ws.branch))
|
|
715
|
+
except Exception: # noqa: BLE001 - extra guidance, never a reason to lose the verdict
|
|
716
|
+
log.info("goal analysis doc rule not added", exc_info=True)
|
|
717
|
+
return ""
|
|
693
718
|
|
|
694
719
|
|
|
695
720
|
CLI_FOR_PROVIDER = {"claude": "claude", "codex": "codex", "antigravity": "agy", "opencode": "opencode"}
|
|
@@ -1604,9 +1629,10 @@ def record_audit(db: DB, root_id: str, approved: bool, summary: str) -> str:
|
|
|
1604
1629
|
db.update_autopilot(root_id, state="done", note=None, audit_ok=1, auditor_id=None,
|
|
1605
1630
|
audit_history=new_history)
|
|
1606
1631
|
db.bump_progress(root_id)
|
|
1632
|
+
rule = _goal_doc_rule(db, root_id)
|
|
1607
1633
|
return (f"[brindle] Completion audit of {sha}: APPROVED. Every milestone passes and the "
|
|
1608
1634
|
f"auditor found the goal fully delivered: the goal is reached. Tell the user."
|
|
1609
|
-
f"\n\n{summary}")
|
|
1635
|
+
f"\n\n{summary}" + (f"\n\n{rule}" if rule else ""))
|
|
1610
1636
|
audit_fails = new_history.count("(gaps found)")
|
|
1611
1637
|
if audit_fails >= MAX_AUDIT_PASSES:
|
|
1612
1638
|
db.update_autopilot(root_id, state="blocked", note=summary.strip()[:4000], audit_ok=0,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: analysis/doc
|
|
3
|
+
description: Leave an analysis doc for large work
|
|
4
|
+
---
|
|
5
|
+
This is large work: before you report, write a short analysis doc in Markdown,
|
|
6
|
+
in whatever shape serves the work best. Cover what was built, the decisions
|
|
7
|
+
made and the alternatives rejected, how it was verified and what wasn't, known
|
|
8
|
+
gaps, and follow-ups. Write it in the docs folder named below, never inside the
|
|
9
|
+
repo, and don't commit it. To update a living doc you read instead, use
|
|
10
|
+
edit_analysis_doc; snapshot docs aren't edited, a new doc supersedes them.
|
|
@@ -125,11 +125,12 @@ def _rollup(c, cutoff: float) -> None:
|
|
|
125
125
|
old = c.execute("SELECT samples FROM stage_timings WHERE day=? AND repo_root=? AND stage=?",
|
|
126
126
|
(day, repo, stage)).fetchone()
|
|
127
127
|
values = (json.loads(old["samples"]) if old else []) + new
|
|
128
|
-
c.execute("INSERT OR REPLACE INTO stage_timings
|
|
128
|
+
c.execute("INSERT OR REPLACE INTO stage_timings (day, repo_root, stage, n, median_s, p90_s, samples)"
|
|
129
|
+
" VALUES (?, ?, ?, ?, ?, ?, ?)",
|
|
129
130
|
(day, repo, stage, len(values), statistics.median(values),
|
|
130
131
|
_percentile(sorted(values), 0.9), json.dumps(values)))
|
|
131
132
|
c.execute("DELETE FROM stage_open")
|
|
132
|
-
c.executemany("INSERT INTO stage_open VALUES (?, ?, ?, ?)",
|
|
133
|
+
c.executemany("INSERT INTO stage_open (workspace_id, stage, who, ts) VALUES (?, ?, ?, ?)",
|
|
133
134
|
[(*k, v) for k, v in open_at.items()])
|
|
134
135
|
|
|
135
136
|
|