agyloop 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agyloop-0.1.0/.agent/rules/agyloop-agent-sdk.md +23 -0
- agyloop-0.1.0/.agent/rules/agyloop-architecture.md +29 -0
- agyloop-0.1.0/.agent/rules/agyloop-docs.md +26 -0
- agyloop-0.1.0/.agent/rules/agyloop-domain-model.md +33 -0
- agyloop-0.1.0/.agent/rules/agyloop-quality-gates.md +28 -0
- agyloop-0.1.0/.agent/rules/agyloop-releasing.md +29 -0
- agyloop-0.1.0/.agent/rules/agyloop-rest-surface.md +14 -0
- agyloop-0.1.0/.agent/rules/agyloop-router.md +13 -0
- agyloop-0.1.0/.agent/rules/agyloop-testing.md +25 -0
- agyloop-0.1.0/.agents/skills/agyloop-agent-sdk/SKILL.md +26 -0
- agyloop-0.1.0/.agents/skills/agyloop-architecture/SKILL.md +32 -0
- agyloop-0.1.0/.agents/skills/agyloop-docs/SKILL.md +29 -0
- agyloop-0.1.0/.agents/skills/agyloop-domain-model/SKILL.md +36 -0
- agyloop-0.1.0/.agents/skills/agyloop-quality-gates/SKILL.md +31 -0
- agyloop-0.1.0/.agents/skills/agyloop-releasing/SKILL.md +32 -0
- agyloop-0.1.0/.agents/skills/agyloop-rest-surface/SKILL.md +17 -0
- agyloop-0.1.0/.agents/skills/agyloop-testing/SKILL.md +28 -0
- agyloop-0.1.0/.claude/skills/agyloop-agent-sdk/SKILL.md +26 -0
- agyloop-0.1.0/.claude/skills/agyloop-architecture/SKILL.md +32 -0
- agyloop-0.1.0/.claude/skills/agyloop-docs/SKILL.md +29 -0
- agyloop-0.1.0/.claude/skills/agyloop-domain-model/SKILL.md +36 -0
- agyloop-0.1.0/.claude/skills/agyloop-quality-gates/SKILL.md +31 -0
- agyloop-0.1.0/.claude/skills/agyloop-releasing/SKILL.md +32 -0
- agyloop-0.1.0/.claude/skills/agyloop-rest-surface/SKILL.md +17 -0
- agyloop-0.1.0/.claude/skills/agyloop-testing/SKILL.md +28 -0
- agyloop-0.1.0/.cursor/rules/agyloop-agent-sdk.mdc +27 -0
- agyloop-0.1.0/.cursor/rules/agyloop-architecture.mdc +33 -0
- agyloop-0.1.0/.cursor/rules/agyloop-docs.mdc +30 -0
- agyloop-0.1.0/.cursor/rules/agyloop-domain-model.mdc +37 -0
- agyloop-0.1.0/.cursor/rules/agyloop-quality-gates.mdc +32 -0
- agyloop-0.1.0/.cursor/rules/agyloop-releasing.mdc +33 -0
- agyloop-0.1.0/.cursor/rules/agyloop-rest-surface.mdc +18 -0
- agyloop-0.1.0/.cursor/rules/agyloop-router.mdc +58 -0
- agyloop-0.1.0/.cursor/rules/agyloop-testing.mdc +29 -0
- agyloop-0.1.0/.editorconfig +22 -0
- agyloop-0.1.0/.gitattributes +8 -0
- agyloop-0.1.0/.github/CODEOWNERS +2 -0
- agyloop-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +76 -0
- agyloop-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- agyloop-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +29 -0
- agyloop-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +12 -0
- agyloop-0.1.0/.github/dependabot.yml +25 -0
- agyloop-0.1.0/.github/workflows/ci.yml +117 -0
- agyloop-0.1.0/.github/workflows/docs.yml +46 -0
- agyloop-0.1.0/.github/workflows/publish-to-pypi.yml +97 -0
- agyloop-0.1.0/.github/workflows/release-please.yml +25 -0
- agyloop-0.1.0/.gitignore +42 -0
- agyloop-0.1.0/.pre-commit-config.yaml +68 -0
- agyloop-0.1.0/.release-please-manifest.json +3 -0
- agyloop-0.1.0/AGENTS.md +59 -0
- agyloop-0.1.0/CHANGELOG.md +18 -0
- agyloop-0.1.0/CLAUDE.md +59 -0
- agyloop-0.1.0/CODE_OF_CONDUCT.md +68 -0
- agyloop-0.1.0/CONTRIBUTING.md +150 -0
- agyloop-0.1.0/GEMINI.md +46 -0
- agyloop-0.1.0/LICENSE +21 -0
- agyloop-0.1.0/PKG-INFO +164 -0
- agyloop-0.1.0/README.md +114 -0
- agyloop-0.1.0/SECURITY.md +123 -0
- agyloop-0.1.0/docs/architecture/decisions/0001-onion-architecture.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0002-sdk-primary-gateway.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0003-five-member-capacity-state.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0004-quota-aware-probes.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0005-bounded-in-process-retry.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0006-defer-genai-rest.md +110 -0
- agyloop-0.1.0/docs/architecture/decisions/0007-deny-ask-question-with-guidance.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0008-never-skip-permissions-with-sandbox.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0009-budgets-are-token-denominated.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0010-conversation-id-fsync.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0011-doctor-never-guesses-auth-lane.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0012-classifier-patterns-are-versioned.md +17 -0
- agyloop-0.1.0/docs/architecture/decisions/0015-generated-gemini-rest-with-drift-gate.md +50 -0
- agyloop-0.1.0/docs/contributing/development.md +83 -0
- agyloop-0.1.0/docs/contributing/harness-patch.md +59 -0
- agyloop-0.1.0/docs/contributing/release-process.md +93 -0
- agyloop-0.1.0/docs/getting-started/configuration.md +121 -0
- agyloop-0.1.0/docs/getting-started/installation.md +48 -0
- agyloop-0.1.0/docs/getting-started/quickstart.md +43 -0
- agyloop-0.1.0/docs/guides/never-blocking.md +12 -0
- agyloop-0.1.0/docs/guides/rate-limits-and-credits.md +18 -0
- agyloop-0.1.0/docs/guides/rest-api-surface.md +25 -0
- agyloop-0.1.0/docs/index.md +38 -0
- agyloop-0.1.0/docs/plans/_shared-transplant-outline.md +72 -0
- agyloop-0.1.0/docs/plans/architecture-and-roadmap.md +831 -0
- agyloop-0.1.0/docs/plans/research-notes.md +1279 -0
- agyloop-0.1.0/docs/security.md +18 -0
- agyloop-0.1.0/docs/superpowers/plans/2026-08-13-agyloop-implementation.md +209 -0
- agyloop-0.1.0/docs/usage.md +166 -0
- agyloop-0.1.0/mkdocs.yml +95 -0
- agyloop-0.1.0/pyproject.toml +130 -0
- agyloop-0.1.0/release-please-config.json +13 -0
- agyloop-0.1.0/src/agyloop/__init__.py +3 -0
- agyloop-0.1.0/src/agyloop/application/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/application/dto.py +42 -0
- agyloop-0.1.0/src/agyloop/application/ports.py +167 -0
- agyloop-0.1.0/src/agyloop/application/runner.py +1575 -0
- agyloop-0.1.0/src/agyloop/application/usecases/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/application/usecases/doctor.py +121 -0
- agyloop-0.1.0/src/agyloop/application/usecases/list_sessions.py +10 -0
- agyloop-0.1.0/src/agyloop/application/usecases/resume_session.py +30 -0
- agyloop-0.1.0/src/agyloop/application/usecases/run_control.py +122 -0
- agyloop-0.1.0/src/agyloop/application/usecases/run_plan.py +45 -0
- agyloop-0.1.0/src/agyloop/bootstrap.py +630 -0
- agyloop-0.1.0/src/agyloop/cli/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/cli/app.py +98 -0
- agyloop-0.1.0/src/agyloop/cli/asyncio.py +23 -0
- agyloop-0.1.0/src/agyloop/cli/commands/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/cli/commands/attach_cmd.py +51 -0
- agyloop-0.1.0/src/agyloop/cli/commands/config_cmd.py +18 -0
- agyloop-0.1.0/src/agyloop/cli/commands/doctor.py +75 -0
- agyloop-0.1.0/src/agyloop/cli/commands/logs.py +28 -0
- agyloop-0.1.0/src/agyloop/cli/commands/model_cmd.py +23 -0
- agyloop-0.1.0/src/agyloop/cli/commands/preset_cmd.py +23 -0
- agyloop-0.1.0/src/agyloop/cli/commands/prompt.py +45 -0
- agyloop-0.1.0/src/agyloop/cli/commands/reset.py +30 -0
- agyloop-0.1.0/src/agyloop/cli/commands/resume.py +135 -0
- agyloop-0.1.0/src/agyloop/cli/commands/run.py +189 -0
- agyloop-0.1.0/src/agyloop/cli/commands/runs.py +26 -0
- agyloop-0.1.0/src/agyloop/cli/commands/savepoints.py +33 -0
- agyloop-0.1.0/src/agyloop/cli/commands/sessions.py +33 -0
- agyloop-0.1.0/src/agyloop/cli/commands/snapshot_cmd.py +40 -0
- agyloop-0.1.0/src/agyloop/cli/commands/status.py +23 -0
- agyloop-0.1.0/src/agyloop/cli/commands/stop.py +34 -0
- agyloop-0.1.0/src/agyloop/cli/commands/unwind.py +32 -0
- agyloop-0.1.0/src/agyloop/cli/commands/watch.py +48 -0
- agyloop-0.1.0/src/agyloop/cli/render.py +43 -0
- agyloop-0.1.0/src/agyloop/domain/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/domain/budget.py +77 -0
- agyloop-0.1.0/src/agyloop/domain/capacity.py +74 -0
- agyloop-0.1.0/src/agyloop/domain/chatter.py +54 -0
- agyloop-0.1.0/src/agyloop/domain/classify.py +283 -0
- agyloop-0.1.0/src/agyloop/domain/completion.py +122 -0
- agyloop-0.1.0/src/agyloop/domain/control.py +210 -0
- agyloop-0.1.0/src/agyloop/domain/errors.py +43 -0
- agyloop-0.1.0/src/agyloop/domain/loop.py +229 -0
- agyloop-0.1.0/src/agyloop/domain/model_policy.py +69 -0
- agyloop-0.1.0/src/agyloop/domain/model_profile.py +172 -0
- agyloop-0.1.0/src/agyloop/domain/permission.py +42 -0
- agyloop-0.1.0/src/agyloop/domain/plan.py +73 -0
- agyloop-0.1.0/src/agyloop/domain/pricing.py +67 -0
- agyloop-0.1.0/src/agyloop/domain/quota.py +21 -0
- agyloop-0.1.0/src/agyloop/domain/savepoint.py +33 -0
- agyloop-0.1.0/src/agyloop/domain/savepoint_message.py +57 -0
- agyloop-0.1.0/src/agyloop/domain/session.py +64 -0
- agyloop-0.1.0/src/agyloop/domain/slash.py +55 -0
- agyloop-0.1.0/src/agyloop/domain/snapshot.py +62 -0
- agyloop-0.1.0/src/agyloop/domain/stop_summary.py +54 -0
- agyloop-0.1.0/src/agyloop/domain/waiting.py +246 -0
- agyloop-0.1.0/src/agyloop/infrastructure/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/autonomy.py +156 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/catalog.py +49 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/cli_argv.py +141 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/gateway.py +233 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/gateway_cli.py +125 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/gemini_rewrite.py +197 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/harness_logs.py +58 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/harness_retarget.py +376 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/options.py +114 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/policies.py +45 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/probe.py +111 -0
- agyloop-0.1.0/src/agyloop/infrastructure/agent/translate.py +143 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/__init__.py +1 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/binder.py +145 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/discover.py +71 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/gateway.py +172 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/registry.py +20 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/surface_baseline.json +599 -0
- agyloop-0.1.0/src/agyloop/infrastructure/api/vertex_baseline.json +243 -0
- agyloop-0.1.0/src/agyloop/infrastructure/config.py +123 -0
- agyloop-0.1.0/src/agyloop/infrastructure/control.py +138 -0
- agyloop-0.1.0/src/agyloop/infrastructure/doctor_env.py +151 -0
- agyloop-0.1.0/src/agyloop/infrastructure/events.py +71 -0
- agyloop-0.1.0/src/agyloop/infrastructure/git_savepoints.py +209 -0
- agyloop-0.1.0/src/agyloop/infrastructure/logging.py +142 -0
- agyloop-0.1.0/src/agyloop/infrastructure/notify.py +24 -0
- agyloop-0.1.0/src/agyloop/infrastructure/redact.py +37 -0
- agyloop-0.1.0/src/agyloop/infrastructure/resources.py +152 -0
- agyloop-0.1.0/src/agyloop/infrastructure/rundir.py +197 -0
- agyloop-0.1.0/src/agyloop/infrastructure/snapshot.py +180 -0
- agyloop-0.1.0/src/agyloop/infrastructure/state_bus.py +49 -0
- agyloop-0.1.0/src/agyloop/infrastructure/stream_ui.py +208 -0
- agyloop-0.1.0/src/agyloop/py.typed +1 -0
- agyloop-0.1.0/tests/__init__.py +0 -0
- agyloop-0.1.0/tests/application/__init__.py +0 -0
- agyloop-0.1.0/tests/application/fakes.py +361 -0
- agyloop-0.1.0/tests/application/test_control_coverage.py +814 -0
- agyloop-0.1.0/tests/application/test_ops_surface_runner.py +220 -0
- agyloop-0.1.0/tests/application/test_run_control.py +36 -0
- agyloop-0.1.0/tests/application/test_runner.py +948 -0
- agyloop-0.1.0/tests/application/test_snapshot_runner.py +139 -0
- agyloop-0.1.0/tests/application/test_usecases.py +197 -0
- agyloop-0.1.0/tests/conftest.py +43 -0
- agyloop-0.1.0/tests/domain/test_budget.py +104 -0
- agyloop-0.1.0/tests/domain/test_capacity.py +32 -0
- agyloop-0.1.0/tests/domain/test_classify.py +369 -0
- agyloop-0.1.0/tests/domain/test_classify_fixtures.py +22 -0
- agyloop-0.1.0/tests/domain/test_completion.py +94 -0
- agyloop-0.1.0/tests/domain/test_control.py +183 -0
- agyloop-0.1.0/tests/domain/test_loop.py +312 -0
- agyloop-0.1.0/tests/domain/test_model_profile.py +318 -0
- agyloop-0.1.0/tests/domain/test_plan.py +67 -0
- agyloop-0.1.0/tests/domain/test_pricing.py +28 -0
- agyloop-0.1.0/tests/domain/test_savepoint_message.py +33 -0
- agyloop-0.1.0/tests/domain/test_session.py +50 -0
- agyloop-0.1.0/tests/domain/test_snapshot.py +53 -0
- agyloop-0.1.0/tests/domain/test_waiting.py +463 -0
- agyloop-0.1.0/tests/fixtures/errors/bare-429.json +11 -0
- agyloop-0.1.0/tests/fixtures/errors/quota-exceeded.json +12 -0
- agyloop-0.1.0/tests/fixtures/errors/rpm-metric.json +12 -0
- agyloop-0.1.0/tests/fixtures/errors/spend-based.json +10 -0
- agyloop-0.1.0/tests/fixtures/errors/unauthenticated.json +10 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_autonomy.py +99 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_catalog.py +80 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_cli_argv.py +120 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_gateway.py +358 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_gateway_cli.py +157 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_gemini_rewrite.py +70 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_harness_retarget.py +133 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_options.py +145 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_probe.py +97 -0
- agyloop-0.1.0/tests/infrastructure/agent/test_translate.py +193 -0
- agyloop-0.1.0/tests/infrastructure/test_api_drift.py +44 -0
- agyloop-0.1.0/tests/infrastructure/test_api_gateway.py +86 -0
- agyloop-0.1.0/tests/infrastructure/test_doctor_env.py +145 -0
- agyloop-0.1.0/tests/infrastructure/test_file_run_control.py +36 -0
- agyloop-0.1.0/tests/infrastructure/test_git_savepoints.py +101 -0
- agyloop-0.1.0/tests/infrastructure/test_notify.py +13 -0
- agyloop-0.1.0/tests/infrastructure/test_ops_sinks.py +49 -0
- agyloop-0.1.0/tests/infrastructure/test_redact.py +18 -0
- agyloop-0.1.0/tests/infrastructure/test_rundir.py +104 -0
- agyloop-0.1.0/tests/infrastructure/test_snapshot_builder.py +36 -0
- agyloop-0.1.0/tests/live/test_live_harness.py +22 -0
- agyloop-0.1.0/tests/system/__init__.py +0 -0
- agyloop-0.1.0/tests/system/conftest.py +36 -0
- agyloop-0.1.0/tests/system/harness.py +82 -0
- agyloop-0.1.0/tests/system/test_scripted_complete.py +32 -0
- agyloop-0.1.0/tests/test_bootstrap.py +54 -0
- agyloop-0.1.0/tests/test_cli.py +687 -0
- agyloop-0.1.0/tests/test_forbidden_dependencies.py +29 -0
- agyloop-0.1.0/tests/test_ops_cli.py +103 -0
- agyloop-0.1.0/tests/test_version.py +5 -0
- agyloop-0.1.0/uv.lock +2594 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# agyloop-agent-sdk (Antigravity mirror of `.claude/skills/agyloop-agent-sdk/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop + google-antigravity
|
|
5
|
+
|
|
6
|
+
`infrastructure/agent/` is the only place `google.antigravity` may be
|
|
7
|
+
imported.
|
|
8
|
+
|
|
9
|
+
- Default gateway is the SDK (`Agent` + `LocalAgentConfig`). `--gateway cli`
|
|
10
|
+
shells out to `agy`.
|
|
11
|
+
- Autonomy: `policy.allow_all()` plus workspace/destructive scopes.
|
|
12
|
+
Interactive hooks are never registered. `ask_question` is denied with
|
|
13
|
+
guidance.
|
|
14
|
+
- `--unsafe-skip-permissions` is refused on the SDK path.
|
|
15
|
+
- Live config pins `mcp_servers=[]` (OAuth cannot complete unattended).
|
|
16
|
+
- Additive `system_instructions` only — never `CustomSystemInstructions`.
|
|
17
|
+
- Input detection in Go `localharness` hardcodes withdrawn
|
|
18
|
+
`gemini-2.5-flash-lite`. agyloop retargets via env + extra `ModelTarget`,
|
|
19
|
+
then a copy-patch (`ANTIGRAVITY_HARNESS_PATH`), then monkeypatch /
|
|
20
|
+
site-packages backup / localhost rewrite proxy. See
|
|
21
|
+
`docs/contributing/harness-patch.md`.
|
|
22
|
+
- Empty drain + 404 / `NOT_FOUND` / "no longer available to new users" in
|
|
23
|
+
harness logs → `AgentConfigError`, not Available.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# agyloop-architecture (Antigravity mirror of `.claude/skills/agyloop-architecture/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop architecture
|
|
5
|
+
|
|
6
|
+
Dependencies point inward. `import-linter` enforces this in CI.
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
src/agyloop/
|
|
10
|
+
├── domain/ # PURE. stdlib only. No I/O, no async, no third-party.
|
|
11
|
+
├── application/ # Protocol ports + use cases. Imports domain + stdlib.
|
|
12
|
+
├── infrastructure/ # Adapters. ONLY layer that may import google.antigravity.
|
|
13
|
+
├── cli/ # Typer. Calls application via bootstrap.
|
|
14
|
+
└── bootstrap.py # Composition root — the ONE module that sees every layer.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Where does new code go?
|
|
18
|
+
|
|
19
|
+
1. Touches FS, network, clock, or an SDK? → `infrastructure/`, behind a
|
|
20
|
+
`Protocol` in `application/ports.py`. Never `import google.antigravity`
|
|
21
|
+
elsewhere.
|
|
22
|
+
2. Pure decision, zero I/O? → `domain/`. Examples: `classify.py`,
|
|
23
|
+
`waiting.py`, `completion.py`, `loop.py`.
|
|
24
|
+
3. Orchestration (port → domain → port)? → `application/`.
|
|
25
|
+
4. Argument parsing / terminal formatting? → `cli/`.
|
|
26
|
+
|
|
27
|
+
When in doubt, push logic inward. `lint-imports` names the broken contract.
|
|
28
|
+
|
|
29
|
+
See ADR 0001.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# agyloop-docs (Antigravity mirror of `.claude/skills/agyloop-docs/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop documentation
|
|
5
|
+
|
|
6
|
+
| Content | Goes in |
|
|
7
|
+
|---|---|
|
|
8
|
+
| Always-true facts | `CLAUDE.md`, `AGENTS.md`, `GEMINI.md` (short routers) |
|
|
9
|
+
| Procedures | `.claude/skills/`, `.cursor/rules/`, `.agents/skills/`, `.agent/rules/` |
|
|
10
|
+
| User how-to | `docs/getting-started/`, `docs/guides/` |
|
|
11
|
+
| One hard decision | `docs/architecture/decisions/` |
|
|
12
|
+
| Contributor process | `docs/contributing/` |
|
|
13
|
+
|
|
14
|
+
README is what PyPI renders: **absolute** URLs only for docs, repo,
|
|
15
|
+
security, contributing, changelog. Relative `docs/*.md` links break on PyPI.
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install -e ".[docs]"
|
|
19
|
+
mkdocs serve
|
|
20
|
+
mkdocs build --strict
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`edit_uri` stays `edit/main/docs/` — the published site tracks `main`.
|
|
24
|
+
|
|
25
|
+
When a procedure changes, update Claude + Cursor + Codex + Antigravity in
|
|
26
|
+
the same PR.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# agyloop-domain-model (Antigravity mirror of `.claude/skills/agyloop-domain-model/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop domain model
|
|
5
|
+
|
|
6
|
+
`src/agyloop/domain/` is stdlib-only. Frozen dataclasses / closed unions.
|
|
7
|
+
|
|
8
|
+
## CapacityState (ADR 0003 — five members)
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
Available | WindowExhausted | TransientThrottle | CreditsExhausted | AuthenticationFailed
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
`CreditsExhausted` has **no** `resets_at`. Never add one. Credits ≠ window.
|
|
15
|
+
|
|
16
|
+
`TransientThrottle` is a short waitable (503 / UNAVAILABLE / RetryInfo).
|
|
17
|
+
|
|
18
|
+
## classify.py
|
|
19
|
+
|
|
20
|
+
Ladder over `TurnSignals`. Operator cancel (exception type **or**
|
|
21
|
+
`context canceled` / `context cancelled` / `manage_task` in the message)
|
|
22
|
+
is Available **before** the throttle ladder. Do not match a bare
|
|
23
|
+
`canceled`. 404 / withdrawn-model is **not** a sixth state — the adapter
|
|
24
|
+
raises `AgentConfigError`.
|
|
25
|
+
|
|
26
|
+
## completion.py
|
|
27
|
+
|
|
28
|
+
Structured `{complete, remaining_work, blocked_on, summary}`. Capacity
|
|
29
|
+
rejection outranks a Done claim.
|
|
30
|
+
|
|
31
|
+
## loop.py
|
|
32
|
+
|
|
33
|
+
Pure state machine. No I/O. The runner only performs the Decision.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# agyloop-quality-gates (Antigravity mirror of `.claude/skills/agyloop-quality-gates/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop quality gates
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
ruff check src tests
|
|
8
|
+
ruff format --check src tests
|
|
9
|
+
mypy --strict src/agyloop
|
|
10
|
+
pytest
|
|
11
|
+
pytest -m system
|
|
12
|
+
lint-imports
|
|
13
|
+
bandit -q -r src/agyloop
|
|
14
|
+
pip-audit
|
|
15
|
+
mkdocs build --strict
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
| Gate | Fix |
|
|
19
|
+
|---|---|
|
|
20
|
+
| `ruff check` | `ruff check --fix src tests` |
|
|
21
|
+
| `ruff format` | `ruff format src tests` |
|
|
22
|
+
| `mypy` | Annotate. No bare `Any` without a reason. |
|
|
23
|
+
| `lint-imports` | Move code to the correct layer (architecture skill). |
|
|
24
|
+
| `bandit` | Fix, or `# nosec Bxxx` with *why*. |
|
|
25
|
+
| `pip-audit` | Bump the dependency. |
|
|
26
|
+
| `mkdocs` | Broken link or missing nav entry. |
|
|
27
|
+
|
|
28
|
+
`pre-commit run --all-files` runs the hook subset. Python 3.12–3.13 in CI.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# agyloop-releasing (Antigravity mirror of `.claude/skills/agyloop-releasing/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop releasing
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
main ← always releasable; release-please target-branch: main
|
|
8
|
+
▲ merge commit
|
|
9
|
+
develop ← default GitHub branch; feature PRs squash here
|
|
10
|
+
▲ squash-merge
|
|
11
|
+
feature/* ← branch from develop, never from main
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Never implement on `main`.
|
|
15
|
+
|
|
16
|
+
Commit: `<type>[scope]: <description>`. Hook `--strict`. Types: feat, fix,
|
|
17
|
+
docs, style, refactor, perf, test, build, ci, chore, revert.
|
|
18
|
+
|
|
19
|
+
First public tag is **v0.1.0** (already in pyproject / manifest). Later:
|
|
20
|
+
release-please PR on `main`, then `publish-to-pypi.yml` (filename
|
|
21
|
+
load-bearing) with OIDC environments `testpypi` / `pypi` (manual approve).
|
|
22
|
+
|
|
23
|
+
TestPyPI:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ agyloop
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
See `docs/contributing/release-process.md`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# agyloop-rest-surface (Antigravity mirror of `.claude/skills/agyloop-rest-surface/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop REST surface (generated)
|
|
5
|
+
|
|
6
|
+
`agyloop api` is generated from Gemini REST discovery with a CI drift gate
|
|
7
|
+
(ADR 0015). Do not hand-write individual endpoints or the gate is meaningless.
|
|
8
|
+
|
|
9
|
+
- Developer lane: `GOOGLE_API_KEY` as a query parameter. Treat it as secret.
|
|
10
|
+
- Vertex lane is separate; doctor never guesses when both look possible.
|
|
11
|
+
- Baseline JSON lives under `src/agyloop/infrastructure/api/`.
|
|
12
|
+
- `--json` / file inlining for request bodies.
|
|
13
|
+
|
|
14
|
+
See `docs/guides/rest-api-surface.md`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# agyloop (Antigravity router)
|
|
2
|
+
|
|
3
|
+
Facts only. Procedures are the other files in this directory (mirrors of
|
|
4
|
+
`.claude/skills/`).
|
|
5
|
+
|
|
6
|
+
- Never block on a human. Credits ≠ window. domain/ is stdlib-only.
|
|
7
|
+
- Capacity rejection outranks completion. Conventional Commits.
|
|
8
|
+
- Never implement on `main`; squash into `develop`.
|
|
9
|
+
- Developer auth: `GOOGLE_API_KEY`. Do not set `GOOGLE_GENAI_USE_VERTEXAI`
|
|
10
|
+
on that lane.
|
|
11
|
+
- `google.antigravity` imports stay in `infrastructure/`.
|
|
12
|
+
|
|
13
|
+
See root `GEMINI.md`, `CLAUDE.md`, `AGENTS.md`.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# agyloop-testing (Antigravity mirror of `.claude/skills/agyloop-testing/SKILL.md`)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
# agyloop testing
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
tests/domain/ # pure unit + Hypothesis
|
|
8
|
+
tests/application/ # fakes for every port (fakes.py)
|
|
9
|
+
tests/infrastructure/ # adapters
|
|
10
|
+
tests/system/ # marker: system — real FS/git + scripted agent
|
|
11
|
+
tests/live/ # marker: live — real Google account, opt-in
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pytest # skips live + system
|
|
16
|
+
pytest -m system
|
|
17
|
+
pytest -m live # needs GOOGLE_API_KEY
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- **Fakes over mocks.** Implement the `Protocol`; `mypy --strict` checks it.
|
|
21
|
+
- **No `time.sleep` in tests.** `FakeClock` / `FakeSleeper`.
|
|
22
|
+
- Hypothesis for numeric / time-based invariants.
|
|
23
|
+
- `# pragma: no cover` needs a reason.
|
|
24
|
+
- Unit tests set `AGYLOOP_SKIP_HARNESS_RETARGET=1` (autouse) so they do not
|
|
25
|
+
copy the 99MB bundled `localharness`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-agent-sdk
|
|
3
|
+
description: google-antigravity Agent + LocalAgentConfig, never-block policies, harness retarget. Consult before editing infrastructure/agent/.
|
|
4
|
+
allowed-tools: Read Grep Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop + google-antigravity
|
|
8
|
+
|
|
9
|
+
`infrastructure/agent/` is the only place `google.antigravity` may be
|
|
10
|
+
imported.
|
|
11
|
+
|
|
12
|
+
- Default gateway is the SDK (`Agent` + `LocalAgentConfig`). `--gateway cli`
|
|
13
|
+
shells out to `agy`.
|
|
14
|
+
- Autonomy: `policy.allow_all()` plus workspace/destructive scopes.
|
|
15
|
+
Interactive hooks are never registered. `ask_question` is denied with
|
|
16
|
+
guidance.
|
|
17
|
+
- `--unsafe-skip-permissions` is refused on the SDK path.
|
|
18
|
+
- Live config pins `mcp_servers=[]` (OAuth cannot complete unattended).
|
|
19
|
+
- Additive `system_instructions` only — never `CustomSystemInstructions`.
|
|
20
|
+
- Input detection in Go `localharness` hardcodes withdrawn
|
|
21
|
+
`gemini-2.5-flash-lite`. agyloop retargets via env + extra `ModelTarget`,
|
|
22
|
+
then a copy-patch (`ANTIGRAVITY_HARNESS_PATH`), then monkeypatch /
|
|
23
|
+
site-packages backup / localhost rewrite proxy. See
|
|
24
|
+
`docs/contributing/harness-patch.md`.
|
|
25
|
+
- Empty drain + 404 / `NOT_FOUND` / "no longer available to new users" in
|
|
26
|
+
harness logs → `AgentConfigError`, not Available.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-architecture
|
|
3
|
+
description: Onion layers for agyloop (domain, application, infrastructure, cli), import-linter, and where new code belongs. Use before adding a module under src/agyloop/.
|
|
4
|
+
allowed-tools: Read Grep Glob Bash(lint-imports)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop architecture
|
|
8
|
+
|
|
9
|
+
Dependencies point inward. `import-linter` enforces this in CI.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
src/agyloop/
|
|
13
|
+
├── domain/ # PURE. stdlib only. No I/O, no async, no third-party.
|
|
14
|
+
├── application/ # Protocol ports + use cases. Imports domain + stdlib.
|
|
15
|
+
├── infrastructure/ # Adapters. ONLY layer that may import google.antigravity.
|
|
16
|
+
├── cli/ # Typer. Calls application via bootstrap.
|
|
17
|
+
└── bootstrap.py # Composition root — the ONE module that sees every layer.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Where does new code go?
|
|
21
|
+
|
|
22
|
+
1. Touches FS, network, clock, or an SDK? → `infrastructure/`, behind a
|
|
23
|
+
`Protocol` in `application/ports.py`. Never `import google.antigravity`
|
|
24
|
+
elsewhere.
|
|
25
|
+
2. Pure decision, zero I/O? → `domain/`. Examples: `classify.py`,
|
|
26
|
+
`waiting.py`, `completion.py`, `loop.py`.
|
|
27
|
+
3. Orchestration (port → domain → port)? → `application/`.
|
|
28
|
+
4. Argument parsing / terminal formatting? → `cli/`.
|
|
29
|
+
|
|
30
|
+
When in doubt, push logic inward. `lint-imports` names the broken contract.
|
|
31
|
+
|
|
32
|
+
See ADR 0001.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-docs
|
|
3
|
+
description: Where content belongs (routers vs skills vs docs), MkDocs strict build, PyPI-safe absolute README links.
|
|
4
|
+
allowed-tools: Read Grep Glob Bash(mkdocs *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop documentation
|
|
8
|
+
|
|
9
|
+
| Content | Goes in |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Always-true facts | `CLAUDE.md`, `AGENTS.md`, `GEMINI.md` (short routers) |
|
|
12
|
+
| Procedures | `.claude/skills/`, `.cursor/rules/`, `.agents/skills/`, `.agent/rules/` |
|
|
13
|
+
| User how-to | `docs/getting-started/`, `docs/guides/` |
|
|
14
|
+
| One hard decision | `docs/architecture/decisions/` |
|
|
15
|
+
| Contributor process | `docs/contributing/` |
|
|
16
|
+
|
|
17
|
+
README is what PyPI renders: **absolute** URLs only for docs, repo,
|
|
18
|
+
security, contributing, changelog. Relative `docs/*.md` links break on PyPI.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install -e ".[docs]"
|
|
22
|
+
mkdocs serve
|
|
23
|
+
mkdocs build --strict
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`edit_uri` stays `edit/main/docs/` — the published site tracks `main`.
|
|
27
|
+
|
|
28
|
+
When a procedure changes, update Claude + Cursor + Codex + Antigravity in
|
|
29
|
+
the same PR.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-domain-model
|
|
3
|
+
description: CapacityState, TurnSignals, completion verdicts, waiting, and the run loop. Consult before editing domain/classify.py, waiting.py, completion.py, or loop.py.
|
|
4
|
+
allowed-tools: Read Grep Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop domain model
|
|
8
|
+
|
|
9
|
+
`src/agyloop/domain/` is stdlib-only. Frozen dataclasses / closed unions.
|
|
10
|
+
|
|
11
|
+
## CapacityState (ADR 0003 — five members)
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Available | WindowExhausted | TransientThrottle | CreditsExhausted | AuthenticationFailed
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`CreditsExhausted` has **no** `resets_at`. Never add one. Credits ≠ window.
|
|
18
|
+
|
|
19
|
+
`TransientThrottle` is a short waitable (503 / UNAVAILABLE / RetryInfo).
|
|
20
|
+
|
|
21
|
+
## classify.py
|
|
22
|
+
|
|
23
|
+
Ladder over `TurnSignals`. Operator cancel (exception type **or**
|
|
24
|
+
`context canceled` / `context cancelled` / `manage_task` in the message)
|
|
25
|
+
is Available **before** the throttle ladder. Do not match a bare
|
|
26
|
+
`canceled`. 404 / withdrawn-model is **not** a sixth state — the adapter
|
|
27
|
+
raises `AgentConfigError`.
|
|
28
|
+
|
|
29
|
+
## completion.py
|
|
30
|
+
|
|
31
|
+
Structured `{complete, remaining_work, blocked_on, summary}`. Capacity
|
|
32
|
+
rejection outranks a Done claim.
|
|
33
|
+
|
|
34
|
+
## loop.py
|
|
35
|
+
|
|
36
|
+
Pure state machine. No I/O. The runner only performs the Decision.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-quality-gates
|
|
3
|
+
description: How to run and fix ruff, mypy --strict, pytest, lint-imports, bandit, pip-audit, mkdocs. Consult when a gate fails.
|
|
4
|
+
allowed-tools: Bash(ruff *) Bash(mypy *) Bash(pytest *) Bash(lint-imports) Bash(bandit *) Bash(pip-audit *) Bash(pre-commit *) Bash(mkdocs *) Read
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop quality gates
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ruff check src tests
|
|
11
|
+
ruff format --check src tests
|
|
12
|
+
mypy --strict src/agyloop
|
|
13
|
+
pytest
|
|
14
|
+
pytest -m system
|
|
15
|
+
lint-imports
|
|
16
|
+
bandit -q -r src/agyloop
|
|
17
|
+
pip-audit
|
|
18
|
+
mkdocs build --strict
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| Gate | Fix |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `ruff check` | `ruff check --fix src tests` |
|
|
24
|
+
| `ruff format` | `ruff format src tests` |
|
|
25
|
+
| `mypy` | Annotate. No bare `Any` without a reason. |
|
|
26
|
+
| `lint-imports` | Move code to the correct layer (architecture skill). |
|
|
27
|
+
| `bandit` | Fix, or `# nosec Bxxx` with *why*. |
|
|
28
|
+
| `pip-audit` | Bump the dependency. |
|
|
29
|
+
| `mkdocs` | Broken link or missing nav entry. |
|
|
30
|
+
|
|
31
|
+
`pre-commit run --all-files` runs the hook subset. Python 3.12–3.13 in CI.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-releasing
|
|
3
|
+
description: gitflow, Conventional Commits, release-please, Trusted Publishing. Consult before branching, committing, or cutting a release.
|
|
4
|
+
allowed-tools: Bash(git *) Read
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop releasing
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
main ← always releasable; release-please target-branch: main
|
|
11
|
+
▲ merge commit
|
|
12
|
+
develop ← default GitHub branch; feature PRs squash here
|
|
13
|
+
▲ squash-merge
|
|
14
|
+
feature/* ← branch from develop, never from main
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Never implement on `main`.
|
|
18
|
+
|
|
19
|
+
Commit: `<type>[scope]: <description>`. Hook `--strict`. Types: feat, fix,
|
|
20
|
+
docs, style, refactor, perf, test, build, ci, chore, revert.
|
|
21
|
+
|
|
22
|
+
First public tag is **v0.1.0** (already in pyproject / manifest). Later:
|
|
23
|
+
release-please PR on `main`, then `publish-to-pypi.yml` (filename
|
|
24
|
+
load-bearing) with OIDC environments `testpypi` / `pypi` (manual approve).
|
|
25
|
+
|
|
26
|
+
TestPyPI:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ agyloop
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
See `docs/contributing/release-process.md`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-rest-surface
|
|
3
|
+
description: Generated agyloop api command tree from Gemini REST discovery, drift gate. Consult before hand-writing api commands.
|
|
4
|
+
allowed-tools: Read Grep Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop REST surface (generated)
|
|
8
|
+
|
|
9
|
+
`agyloop api` is generated from Gemini REST discovery with a CI drift gate
|
|
10
|
+
(ADR 0015). Do not hand-write individual endpoints or the gate is meaningless.
|
|
11
|
+
|
|
12
|
+
- Developer lane: `GOOGLE_API_KEY` as a query parameter. Treat it as secret.
|
|
13
|
+
- Vertex lane is separate; doctor never guesses when both look possible.
|
|
14
|
+
- Baseline JSON lives under `src/agyloop/infrastructure/api/`.
|
|
15
|
+
- `--json` / file inlining for request bodies.
|
|
16
|
+
|
|
17
|
+
See `docs/guides/rest-api-surface.md`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-testing
|
|
3
|
+
description: Fakes over mocks, FakeClock/FakeSleeper, Hypothesis, pytest markers. Consult before adding tests or mocks.
|
|
4
|
+
allowed-tools: Read Grep Glob Bash(pytest *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop testing
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
tests/domain/ # pure unit + Hypothesis
|
|
11
|
+
tests/application/ # fakes for every port (fakes.py)
|
|
12
|
+
tests/infrastructure/ # adapters
|
|
13
|
+
tests/system/ # marker: system — real FS/git + scripted agent
|
|
14
|
+
tests/live/ # marker: live — real Google account, opt-in
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pytest # skips live + system
|
|
19
|
+
pytest -m system
|
|
20
|
+
pytest -m live # needs GOOGLE_API_KEY
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- **Fakes over mocks.** Implement the `Protocol`; `mypy --strict` checks it.
|
|
24
|
+
- **No `time.sleep` in tests.** `FakeClock` / `FakeSleeper`.
|
|
25
|
+
- Hypothesis for numeric / time-based invariants.
|
|
26
|
+
- `# pragma: no cover` needs a reason.
|
|
27
|
+
- Unit tests set `AGYLOOP_SKIP_HARNESS_RETARGET=1` (autouse) so they do not
|
|
28
|
+
copy the 99MB bundled `localharness`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-agent-sdk
|
|
3
|
+
description: google-antigravity Agent + LocalAgentConfig, never-block policies, harness retarget. Consult before editing infrastructure/agent/.
|
|
4
|
+
allowed-tools: Read Grep Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop + google-antigravity
|
|
8
|
+
|
|
9
|
+
`infrastructure/agent/` is the only place `google.antigravity` may be
|
|
10
|
+
imported.
|
|
11
|
+
|
|
12
|
+
- Default gateway is the SDK (`Agent` + `LocalAgentConfig`). `--gateway cli`
|
|
13
|
+
shells out to `agy`.
|
|
14
|
+
- Autonomy: `policy.allow_all()` plus workspace/destructive scopes.
|
|
15
|
+
Interactive hooks are never registered. `ask_question` is denied with
|
|
16
|
+
guidance.
|
|
17
|
+
- `--unsafe-skip-permissions` is refused on the SDK path.
|
|
18
|
+
- Live config pins `mcp_servers=[]` (OAuth cannot complete unattended).
|
|
19
|
+
- Additive `system_instructions` only — never `CustomSystemInstructions`.
|
|
20
|
+
- Input detection in Go `localharness` hardcodes withdrawn
|
|
21
|
+
`gemini-2.5-flash-lite`. agyloop retargets via env + extra `ModelTarget`,
|
|
22
|
+
then a copy-patch (`ANTIGRAVITY_HARNESS_PATH`), then monkeypatch /
|
|
23
|
+
site-packages backup / localhost rewrite proxy. See
|
|
24
|
+
`docs/contributing/harness-patch.md`.
|
|
25
|
+
- Empty drain + 404 / `NOT_FOUND` / "no longer available to new users" in
|
|
26
|
+
harness logs → `AgentConfigError`, not Available.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-architecture
|
|
3
|
+
description: Onion layers for agyloop (domain, application, infrastructure, cli), import-linter, and where new code belongs. Use before adding a module under src/agyloop/.
|
|
4
|
+
allowed-tools: Read Grep Glob Bash(lint-imports)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop architecture
|
|
8
|
+
|
|
9
|
+
Dependencies point inward. `import-linter` enforces this in CI.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
src/agyloop/
|
|
13
|
+
├── domain/ # PURE. stdlib only. No I/O, no async, no third-party.
|
|
14
|
+
├── application/ # Protocol ports + use cases. Imports domain + stdlib.
|
|
15
|
+
├── infrastructure/ # Adapters. ONLY layer that may import google.antigravity.
|
|
16
|
+
├── cli/ # Typer. Calls application via bootstrap.
|
|
17
|
+
└── bootstrap.py # Composition root — the ONE module that sees every layer.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Where does new code go?
|
|
21
|
+
|
|
22
|
+
1. Touches FS, network, clock, or an SDK? → `infrastructure/`, behind a
|
|
23
|
+
`Protocol` in `application/ports.py`. Never `import google.antigravity`
|
|
24
|
+
elsewhere.
|
|
25
|
+
2. Pure decision, zero I/O? → `domain/`. Examples: `classify.py`,
|
|
26
|
+
`waiting.py`, `completion.py`, `loop.py`.
|
|
27
|
+
3. Orchestration (port → domain → port)? → `application/`.
|
|
28
|
+
4. Argument parsing / terminal formatting? → `cli/`.
|
|
29
|
+
|
|
30
|
+
When in doubt, push logic inward. `lint-imports` names the broken contract.
|
|
31
|
+
|
|
32
|
+
See ADR 0001.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-docs
|
|
3
|
+
description: Where content belongs (routers vs skills vs docs), MkDocs strict build, PyPI-safe absolute README links.
|
|
4
|
+
allowed-tools: Read Grep Glob Bash(mkdocs *)
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop documentation
|
|
8
|
+
|
|
9
|
+
| Content | Goes in |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Always-true facts | `CLAUDE.md`, `AGENTS.md`, `GEMINI.md` (short routers) |
|
|
12
|
+
| Procedures | `.claude/skills/`, `.cursor/rules/`, `.agents/skills/`, `.agent/rules/` |
|
|
13
|
+
| User how-to | `docs/getting-started/`, `docs/guides/` |
|
|
14
|
+
| One hard decision | `docs/architecture/decisions/` |
|
|
15
|
+
| Contributor process | `docs/contributing/` |
|
|
16
|
+
|
|
17
|
+
README is what PyPI renders: **absolute** URLs only for docs, repo,
|
|
18
|
+
security, contributing, changelog. Relative `docs/*.md` links break on PyPI.
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install -e ".[docs]"
|
|
22
|
+
mkdocs serve
|
|
23
|
+
mkdocs build --strict
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`edit_uri` stays `edit/main/docs/` — the published site tracks `main`.
|
|
27
|
+
|
|
28
|
+
When a procedure changes, update Claude + Cursor + Codex + Antigravity in
|
|
29
|
+
the same PR.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-domain-model
|
|
3
|
+
description: CapacityState, TurnSignals, completion verdicts, waiting, and the run loop. Consult before editing domain/classify.py, waiting.py, completion.py, or loop.py.
|
|
4
|
+
allowed-tools: Read Grep Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop domain model
|
|
8
|
+
|
|
9
|
+
`src/agyloop/domain/` is stdlib-only. Frozen dataclasses / closed unions.
|
|
10
|
+
|
|
11
|
+
## CapacityState (ADR 0003 — five members)
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Available | WindowExhausted | TransientThrottle | CreditsExhausted | AuthenticationFailed
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`CreditsExhausted` has **no** `resets_at`. Never add one. Credits ≠ window.
|
|
18
|
+
|
|
19
|
+
`TransientThrottle` is a short waitable (503 / UNAVAILABLE / RetryInfo).
|
|
20
|
+
|
|
21
|
+
## classify.py
|
|
22
|
+
|
|
23
|
+
Ladder over `TurnSignals`. Operator cancel (exception type **or**
|
|
24
|
+
`context canceled` / `context cancelled` / `manage_task` in the message)
|
|
25
|
+
is Available **before** the throttle ladder. Do not match a bare
|
|
26
|
+
`canceled`. 404 / withdrawn-model is **not** a sixth state — the adapter
|
|
27
|
+
raises `AgentConfigError`.
|
|
28
|
+
|
|
29
|
+
## completion.py
|
|
30
|
+
|
|
31
|
+
Structured `{complete, remaining_work, blocked_on, summary}`. Capacity
|
|
32
|
+
rejection outranks a Done claim.
|
|
33
|
+
|
|
34
|
+
## loop.py
|
|
35
|
+
|
|
36
|
+
Pure state machine. No I/O. The runner only performs the Decision.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-quality-gates
|
|
3
|
+
description: How to run and fix ruff, mypy --strict, pytest, lint-imports, bandit, pip-audit, mkdocs. Consult when a gate fails.
|
|
4
|
+
allowed-tools: Bash(ruff *) Bash(mypy *) Bash(pytest *) Bash(lint-imports) Bash(bandit *) Bash(pip-audit *) Bash(pre-commit *) Bash(mkdocs *) Read
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop quality gates
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ruff check src tests
|
|
11
|
+
ruff format --check src tests
|
|
12
|
+
mypy --strict src/agyloop
|
|
13
|
+
pytest
|
|
14
|
+
pytest -m system
|
|
15
|
+
lint-imports
|
|
16
|
+
bandit -q -r src/agyloop
|
|
17
|
+
pip-audit
|
|
18
|
+
mkdocs build --strict
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
| Gate | Fix |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `ruff check` | `ruff check --fix src tests` |
|
|
24
|
+
| `ruff format` | `ruff format src tests` |
|
|
25
|
+
| `mypy` | Annotate. No bare `Any` without a reason. |
|
|
26
|
+
| `lint-imports` | Move code to the correct layer (architecture skill). |
|
|
27
|
+
| `bandit` | Fix, or `# nosec Bxxx` with *why*. |
|
|
28
|
+
| `pip-audit` | Bump the dependency. |
|
|
29
|
+
| `mkdocs` | Broken link or missing nav entry. |
|
|
30
|
+
|
|
31
|
+
`pre-commit run --all-files` runs the hook subset. Python 3.12–3.13 in CI.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agyloop-releasing
|
|
3
|
+
description: gitflow, Conventional Commits, release-please, Trusted Publishing. Consult before branching, committing, or cutting a release.
|
|
4
|
+
allowed-tools: Bash(git *) Read
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agyloop releasing
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
main ← always releasable; release-please target-branch: main
|
|
11
|
+
▲ merge commit
|
|
12
|
+
develop ← default GitHub branch; feature PRs squash here
|
|
13
|
+
▲ squash-merge
|
|
14
|
+
feature/* ← branch from develop, never from main
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Never implement on `main`.
|
|
18
|
+
|
|
19
|
+
Commit: `<type>[scope]: <description>`. Hook `--strict`. Types: feat, fix,
|
|
20
|
+
docs, style, refactor, perf, test, build, ci, chore, revert.
|
|
21
|
+
|
|
22
|
+
First public tag is **v0.1.0** (already in pyproject / manifest). Later:
|
|
23
|
+
release-please PR on `main`, then `publish-to-pypi.yml` (filename
|
|
24
|
+
load-bearing) with OIDC environments `testpypi` / `pypi` (manual approve).
|
|
25
|
+
|
|
26
|
+
TestPyPI:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ agyloop
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
See `docs/contributing/release-process.md`.
|