Write an agent brief with a goal, constraints, and a definition of done. See weak versus strong tasks for Pi, Hermes, Cursor, and other coding agents.
Manage the Agent. Do Not Script It.
A chat prompt can be a paragraph. An agent brief is a job ticket. If you paste a 40-step script, the agent will follow the script even when the repo disagrees. If you paste a goal with no fences, it will wander.
You are the manager: goal, constraints, definition of done. The agent picks the steps. That is the whole skill — and it assumes the agent is already calling the Gab AI API with your key, not OpenAI or Anthropic.
The Four Parts of a Brief
Write these four every time. Skip one, and the loop fills the gap with a guess.
Scope Beats Ambition
"Build the app" is not a first job. Neither is "refactor everything." Give the agent a slice you could review in five minutes. When that slice is done, start a new loop for the next slice — with a fresh brief, not an endless thread that has forgotten the original goal.
If the agent asks a clarifying question, answer it. That is cheaper than letting it invent a product decision.
Steering mid-run
Interrupt when it is in the wrong directory — do not wait for a 40-file diff
"Stop. Revert the last change. Only touch X." is a valid message
If it is thrashing on the same error, tighten the constraint or take the step yourself
Save a brief that worked into a custom Gab AI agent or a repo AGENTS.md so the next run starts smarter
Do not paste secrets into the brief
API keys, .env files, and production credentials do not belong in the prompt. The agent can use your Gab AI key from the CLI config. If a task needs a secret, tell it which env var to read — not the value.
Goal — one sentence — What will be true when this is over? "The empty-email login case returns 400." Not "look at auth."
Context — where to look, not a novel — Point at paths, failing tests, or URLs. Let the agent read the files. Pasting the whole repo into the prompt wastes the context window and goes stale the moment the agent edits something.
Constraints — what not to touch — Directories, dependencies, public APIs, coding style, "do not commit," "do not push," "do not delete fixtures." Agents are more dangerous than chats because they can actually do those things.
Definition of done — a check the agent can run — A test command, a file that should exist, a grep that should match, a screenshot criterion. If done is a vibe, the loop never ends.
Do not paste secrets into the brief
API keys, .env files, and production credentials do not belong in the prompt. The agent can use your Gab AI key from the CLI config. If a task needs a secret, tell it which env var to read — not the value.
A brief is a job ticket: goal, where to look, constraints, and a checkable definition of done.
Point at files and commands. Do not paste the repo, and do not write a 40-step script the agent must obey blindly.
Scope to a slice you can review. Start a new loop for the next slice.
Steer early. "Stop and revert" is cheaper than cleaning up a wander.