Skip to main content

The agent handoff

Every skillgendev command is run by an AI agent (Claude Code through /skillgendev, or another), never by a person at a terminal that waits. So no command prompts or waits for input.

Two kinds of decision follow from that:

  1. Replacing existing output is the one decision that stops a command before any work. It takes a flag for the answer: generate --overwrite.
  2. Anything else the developer must do (give an address, sign in, allow a download, name the button that opens a form) never throws work away. The run does all it can from the code, then says what is needed. The agent asks the developer in chat and runs the command again; analysis is reused while the code is unchanged.

The next object​

When a route cannot finish, its result has status needs (or exists), a next object, and the process exits with code 3.

{
"route": "/campaigns/42/edit",
"skill": "campaign-edit",
"status": "needs",
"next": {
"action": "ask",
"need": "login",
"reason": "The page showed a sign-in page.",
"ask": "This page asks you to sign in before x/y can be measured. Open a browser window so you can sign in now?",
"run": "skillgendev login --url http://localhost:3000/login",
"then": "skillgendev generate --route /campaigns/42/edit --name campaign-edit --xy --overwrite",
"prompt": "",
"write": ""
}
}

The values above are illustrative; the field names and meanings are exact (src/skillgen/schema/cli/generate.schema.json).

FieldMeaning
actionanalyse: the agent reads the code itself. ask: only the developer can decide or act
needWhat is missing (table below)
reasonWhy the run stopped, in one sentence
askThe question for the developer; empty for analyse
runThe command to run after a yes; empty when the developer acts themselves
thenThe command that continues the work
promptFor analyse: the prompt file to follow
writeFor analyse: where to write the page analysis

then is the same command line again, with --overwrite added when the skill was written and the right flag added for the answer. Placeholders <url> and <label> in then are replaced by the developer's answer.

Needs​

needActionWhenWhat the agent does
analysisanalyseskillgendev could not ask Claude Code (not installed, not signed in)Reads prompt and its files read-only, writes write, runs then
limitaskThe AI's own usage limit is reachedTells the developer when it resets and stops; does not analyse by hand
urlask--xy but no dev addressAsks for the address, puts it in place of <url>
probeaskThe probe extra is not installedAsks the developer to reinstall with it
chromiumaskChromium is not downloadedAsks to download it (about 150 MB); run is doctor --fix
serveraskNothing answers at the dev addressAsks the developer to start the dev server
loginaskThe page showed a sign-in formAsks to open a sign-in window; run is login --url …
openaskNo field showed, even after trying the code's own open clicksAsks which button opens the form, puts it in place of <label>
overwriteaskThe skill already exists (status exists)Asks whether to recreate it; then adds --overwrite

For every --xy need except open and login, the problem is found before any work, x/y is switched off for that run, and the skill is still written from the code.

The loop​

Why reruns are cheap​

Each analysis is fingerprinted from everything it was given: the rendered prompt (route, skill, app context, probe summary, Graphify connections), the answer schema, and the bytes of every file in the page's slice. It is reused while that fingerprint holds, so asking the developer something and running then costs no new analysis. An analysis the agent wrote after the last request is accepted too. Recorded analyses (replay) are never reused.