Help us improve
Share bugs, ideas, or general feedback.
From agentops
Installs AGY-native rules, workflows, goal, and schedule controls for the AgentOps loop. Use when bootstrapping or repairing an AGY node to enforce invariant laws and operating loop trajectory.
npx claudepluginhub boshu2/agentops --plugin agentopsHow this skill is triggered — by the user, by Claude, or both
Slash command
/agentops:agy-rules-workflowsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Land the flywheel's invariant **laws** and its **operating loop** as Google Antigravity (`agy`) native Rules and Workflows — so an AGY agent crank obeys the same membrane as the Claude and Codex turnouts, expressed in AGY's own primitives rather than ported wrappers.
Drives the AgentOps loop (claim→work→validate→close→persist) on Google's Antigravity CLI harness (AGY), supporting Gemini, Claude, and GPT models through AGY's plugin/skill/subagent architecture.
Provides the full ADK agent development lifecycle: scaffold, build, evaluate, deploy, publish, and observe. Guides model selection, code preservation, and troubleshooting.
Validates, runs, and debugs multi-agent YAML workflows. Use when orchestrating AI agents, configuring routing, or setting up human-in-the-loop gates.
Share bugs, ideas, or general feedback.
Land the flywheel's invariant laws and its operating loop as Google Antigravity (agy) native Rules and Workflows — so an AGY agent crank obeys the same membrane as the Claude and Codex turnouts, expressed in AGY's own primitives rather than ported wrappers.
The flywheel runs the same five laws on every harness; only the skin changes per vendor. On Claude that skin is operating-loop-workflow + bead-crank + hooks; on AGY it is markdown Rules (invariant law, always-active) + a markdown slash Workflow (the loop trajectory) + BeforeTool/AfterTool hooks (mechanical guardrails) + dynamic subagents (author!=judge). Use this skill when you are bootstrapping or repairing the AGY node and need those four surfaces to carry the laws below.
The agy CLI is real and headless-capable: agy -p "<prompt>" (or --print) runs one prompt non-interactively; agy plugin {list,import,install,validate} packages skills/rules/hooks/subagents; config lives under ~/.gemini/ (Antigravity's on-disk root — settings.json for hooks/permissions, skills/ for skills, antigravity-cli/{brain,knowledge}/ for durable memory). Project rules live in .agents/rules/; loop workflows in .agents/workflows/ invoked as slash commands.
AGY also exposes two native loop controls the contract targets: the AGY goal command pins a durable objective the agent steers toward across turns (the loop's north-star — set it to the bead/epic intent), and the AGY schedule command registers a recurring tick so the loop self-cranks headless without an external cron. Express the trajectory as the agy-loop workflow, set the objective with the goal command, and drive the cadence with the schedule command — these three AGY-native primitives replace the gemini-cli wrappers the legacy lane used.
These five are the laws — they MUST become always-active AGY Rules, not advisory prose:
.agents/ratchet/, an AGY artifact). Why: an ephemeral agent's knowledge dies with its context unless it is published to the system.Mechanical enforcement: encode Rules 1/3 as subagent-dispatch policy, Rules 2/5 as an AfterTool close-guard hook, and Rule 4 as a pre-commit scope check. Rules are the law; hooks are the immune system.
Confirm the harness before writing law into it.
command -v agy && agy plugin list
ls ~/.gemini/settings.json ~/.gemini/skills 2>/dev/null
Checkpoint: agy resolves and ~/.gemini/ exists. If not, stop — the AGY image is not installed; this skill has nothing to enforce against.
Materialize each law as an always-active markdown rule at project scope. Create .agents/rules/flywheel-laws.md:
# Flywheel Laws (always active)
1. Author != Judge — the writer of a change never closes its own bead; close runs in a clean-context subagent.
2. Evidence-gated close — close only when every Given/When/Then maps to a captured proof surface.
3. No self-grade — report, never self-verdict; a separate judge decides; ties -> tie-break subagent.
4. Scoped commits — commit only the bead's declared write scope; no drive-by edits.
5. Persist before done — write evidence + learning to the bead, .agents/ratchet/, and an AGY artifact before closing the turn.
Checkpoint: the rules file exists and reads as imperative law (not advice). Confirm AGY loads project rules from .agents/rules/; if your install uses a different rules path, write there instead and note it.
Create .agents/workflows/agy-loop.md — a slash workflow expressing claim->work->validate->close->persist (the seven-move operating loop in AGY skin). See references/agy-loop-workflow.md for the full workflow body to paste. The trajectory:
br ready / bd ready, pick one bead, claim it (--claim). One bead per turn..agents/ratchet/ + an AGY artifact, then commit the scoped change (Rule 5).Bind the trajectory to AGY's native controls: set the durable objective with the goal command so every turn steers toward the same north-star, and register the recurring tick with the schedule command (e.g. agy -p "/schedule agy-loop --every 15m") so the turnout self-cranks headless instead of relying on an external cron. The goal command carries the what, the Workflow carries the how, and the schedule command carries the when.
Checkpoint: the workflow is invocable as agy-loop or via agy -p "/agy-loop <intent>", the goal command holds the loop's objective, the schedule command is registered for the tick, and its steps name a separate validator agent — re-read it and confirm the author never appears as the judge.
Add close/scope guards to ~/.gemini/settings.json under hooks (the file already carries a BeforeTool dcg guard — extend, do not clobber). Add an AfterTool hook that blocks a bd close/br close lacking captured evidence, and a BeforeTool run_shell_command matcher that rejects commits outside the bead scope. See references/agy-loop-workflow.md for the hook stanza. This skill ships the two guards as executable stubs — scripts/scope-guard.sh (Rule 4) and scripts/close-guard.sh (Rules 2/5) — wired and safe (they no-op until you implement the marked tracker-read section, then they ENFORCE).
Checkpoint: agy plugin validate (or a dry run) passes and the existing dcg hook is intact.
Optionally bundle Rules + Workflow + hooks + subagents as an AGY plugin (plugin.json) for agy plugin install. Smoke one bead end-to-end headless:
agy -p "/agy-loop run one ready bead end-to-end; STOP after persist"
Checkpoint: the smoke run claimed one bead, validated via a separate subagent, and closed only with evidence. If the author closed its own bead, Rule 1 is not wired — return to Phase 2/3.
Format: markdown rules + markdown workflow + JSON hook stanza. Filenames / paths:
.agents/rules/flywheel-laws.md — the five invariant laws (always-active rule)..agents/workflows/agy-loop.md — the claim->work->validate->close->persist slash workflow.~/.gemini/settings.json — extended hooks block (close-guard + scope-guard), dcg preserved.plugin.json — AGY plugin manifest bundling the above.Returns: the list of paths written, the rule/workflow IDs, and the smoke-run verdict (which bead, who judged it, evidence captured).
~/.gemini/settings.json extends hooks without clobbering the existing dcg BeforeTool guard.agy -p "/agy-loop <intent>; STOP after one bead" as the AGY turnout's tick.agy -p "/goal '<epic intent>'" then agy -p "/schedule agy-loop --every 15m" — the loop steers toward the goal and cranks itself on AGY's native scheduler (no external cron).| Problem | Cause | Solution |
|---|---|---|
| Author closes its own bead | Validate step runs in-context, not a subagent | Rewrite Phase 3 step 3 to dispatch a clean-context AGY subagent; encode Rule 1 |
| Bead closes with no evidence | Close-guard hook missing | Add the AfterTool close-guard from references/agy-loop-workflow.md |
dcg guard stopped firing | settings.json hooks block clobbered | Restore the BeforeTool dcg entry; merge, don't overwrite |
| Rules ignored | Wrong rules path for this install | Verify AGY's project rules dir locally; write the rule there and note it |
agy -p hangs | Print-mode timeout | Pass --print-timeout; scope the prompt to one bead with an explicit STOP |
references/agy-loop-workflow.md — full agy-loop.md workflow body + the hook stanza + subagent definitions to paste.scripts/scope-guard.sh, scripts/close-guard.sh — the shipped Rule-4 / Rule-2+5 hook stubs (wire into ~/.gemini/settings.json; implement the marked tracker-read to enforce).scripts/validate.sh — self-check (frontmatter + spine + line budget + refs + artifacts); run before staging.operating-loop-workflow (Claude turnout of the same seven-move loop) and bead-crank (Claude bead loop) — the sibling skins.beads-br — the br/bd bead primitives the loop cranks.~/.agents/research/agy-native-harness-2026-06-06.md.