agystack / rules
AGENTS.md58 starsChanged 3 months agoMITView on GitHub
This plugin is agystack. For any non-trivial engineering task (a bug, a feature, a refactor, an investigation, a PR, overnight or autonomous work), read and follow the poteto-mode skill before the first real step. Casual chat, a one-line answer, or an explicit opt-out skips it. Mirroring pstack in Cursor, enforce strict separation between coordination and code execution:
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository49 other files it gives its agents.
- agystackSkill
- architectSkill
- arenaSkill
- automate-meSkill
- blast-radiusSkill
- broSkill
- create-verification-skillSkill
- deslopSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- loopSkill
- maintain-verification-skillSkill
- no-commentsSkill
- Poteto ModeSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-encode-lessons-in-structureSkill
- principle-exhaust-the-design-spaceSkill
- principle-experience-firstSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-migrate-callers-then-delete-legacy-apisSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-outcome-oriented-executionSkill
- principle-prove-it-worksSkill
- principle-redesign-from-first-principlesSkill
- principle-separate-before-serializing-shared-stateSkill
- principle-sequence-verifiable-unitsSkill
- principle-subtract-before-you-addSkill
- principle-test-behavior-not-implementationSkill
- principle-type-system-disciplineSkill
- recallSkill
- reflectSkill
- setup-agystackSkill
- show-me-your-workSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- typescript-best-practicesSkill
- unslopSkill
- whySkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Blinded behavioral evaluations (
/eval): Run candidate attempts through blinded subagents. - Distinctive: line 37
Always use the most direct, deterministic tool surface for each task:
- Very specific: line 40
CLI / Runtime Tools (
run_command): Test suites, API endpoints, build/server logs, process lifecycles, and exit codes.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
agystack on Antigravity
This plugin is agystack. For any non-trivial engineering task (a bug, a feature, a refactor, an investigation, a PR, overnight or autonomous work), read and follow the poteto-mode skill before the first real step. Casual chat, a one-line answer, or an explicit opt-out skips it.
Subagent Delegation Invariant
Mirroring pstack in Cursor, enforce strict separation between coordination and code execution:
- Mandatory Subagent Delegation for Code Writes: You MUST delegate all non-trivial code modifications, feature implementations, bug fixes, and refactoring to a subagent (
invoke_subagentwithTypeName: "poteto-agent"or configured role model) in an isolated context window. The parent agent operates as coordinator: planning, reviewing the subagent's diffs, running verification, and communicating with the user using unslopped prose. Pass purely technical specs, interfaces, and test criteria to the subagent so its context remains unburdened by conversational prose guidelines. A subagent already running as a delegate, or executing in an environment where subagent spawning is disallowed (such asallow_subagents=Falsein cloud workers or subagents without nesting tools), satisfies this invariant by executing and owning the diff directly.- Non-Trivial Delegation Threshold:
- Trivial edits (permitted directly by coordinator): <= 50 lines on a single file (existing or new file creation), single flag or constant adjustments,
.gitignoreentries, markdown documentation, and scratch scripts inscratch/. - Non-trivial edits (mandatory delegation to
poteto-agent): > 50 lines on a single file, multi-file code modifications, core business logic changes. - User override: Explicit user instructions for direct execution ("do this directly", "no subagents") allow coordinator writes.
- Trivial edits (permitted directly by coordinator): <= 50 lines on a single file (existing or new file creation), single flag or constant adjustments,
- Non-Trivial Delegation Threshold:
- Mandatory Subagent Fan-Out: You MUST invoke distinct background subagents via
invoke_subagentfor:- Code reviews and adversarial interrogation (
/interrogate): Dispatch concurrent reviewers across distinct model tiers (pro,flash,inherit). Simulating reviewer personas in the parent context is strictly forbidden. - Multi-candidate design and code bakeoffs (
/arena): Dispatch parallel subagents in isolated workspaces or scratch paths. - High-volume exploration sweeps and test matrices (
/swarm): Offload large payload reads to subagents to guard the main context window. - Blinded behavioral evaluations (
/eval): Run candidate attempts through blinded subagents. - Cross-model decision audits (
/show-me-your-work): Dispatch an independent subagent on a different model family to audit the decision log.
- Code reviews and adversarial interrogation (
- Candidate Integration Invariant: Parallel candidate diffs from swarms, arenas, or subagent fan-outs must never be bulk-merged. The coordinator must evaluate candidate branches in isolation, rank them by delta, and graft winning modifications sequentially—verifying and benchmarking each change independently before attempting the next (
principle-sequence-verifiable-units). - Subagent Reactive Wakeup and Watchdog Timeout Invariant: Antigravity subagents run asynchronously in isolated background sessions. They do NOT stream chat text to the coordinator and will ONLY wake the parent when they explicitly invoke
send_message.- Mechanical Turn Yielding: Immediately after dispatching local subagents via
invoke_subagent, the coordinator MUST yield the turn by outputting a progress message with ZERO tool calls (tool_calls: []). - Continuous Busy-Wait Prohibited: The coordinator must NEVER run rapid status polling loops (
manage_subagents(list)every few seconds), must NEVER tail childtranscript.jsonlfiles during the wait phase, and must NEVER attach status tool calls to turns intended to wait. - Mandatory Global Watchdog Deadline: To guard against hung workers, host crashes, or workers that go idle without messaging, the coordinator MUST arm a single unconditional global watchdog timer before yielding:
schedule(DurationSeconds: 300..600, Prompt="Watchdog: subagents timed out", TimerCondition: "never")BecauseTimerCondition: "never"is used, incremental completions wake the coordinator reactively without cancelling the timer. - Quorum & Teardown Protocol: On incremental worker completions, record findings and yield immediately (zero tool calls) if workers remain pending. Once all workers arrive, cancel the active watchdog timer via
manage_task(Action: "kill", TaskId: <timer_task_id>)before synthesizing. - Timeout Diagnosis: The coordinator calls
manage_subagents(Action: "list")ONLY when the watchdog timer fires or an explicit failure occurs. If a worker is inerrororidlewithout messaging, terminate it (manage_subagents(Action: "kill", ConversationIds: [<id>])) and proceed with partial results. Child transcripts may only be read for post-mortem diagnostics, never while waiting. - Primitive Boundary: Active heartbeat polling (every 60-120s) applies strictly to external CLI/Cloud Run subprocesses (
run_command,cloud_dispatch.py), NEVER to local Antigravity subagents (invoke_subagent).
- Mechanical Turn Yielding: Immediately after dispatching local subagents via
- Planning and Deliverable Artifact Scoping Matrix:
- Interactive State-Changing Playbooks (
Feature,Refactoring,Multi-phase): Mandatoryimplementation_plan.mdwithRequestFeedback: truebefore coding; mandatorywalkthrough.mdwith pass receipts upon completion. - Autonomous & Hillclimb Playbooks (
Autonomous run,Hillclimb,Swarm,/goal,/loop): Unattended throughput invariant. UseRequestFeedback: false. Domain deliverables (decision_trail.md,score.json,receipts/) take precedence without interactive blocking. - Read-Only Investigation Playbooks (
Investigation,How,Why,Runtime Forensics): Producesinvestigation_report.mdwithRequestFeedback: false.
- Interactive State-Changing Playbooks (
Surface Precedence Hierarchy
Always use the most direct, deterministic tool surface for each task:
- Filesystem Tools (
view_file,grep_search,find_by_name): Ground truth for code, configs, AST, tests, and repo docs. Never use a browser or UI tools to view, search, or scroll through code or repository files. - CLI / Runtime Tools (
run_command): Test suites, API endpoints, build/server logs, process lifecycles, and exit codes. - Browser Tools (
browser_subagent/ Chrome DevTools MCP): Strictly for live UI interaction, DOM layout, CSS styles, user events, and rendered visual screenshots.
Per-role models live in agystack-models.md next to this file. /setup-agystack rewrites that file.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

