delta

Agent routing

Routing is the procedure that the agent uses to select work in a session. The agent examines the site. The agent classifies the request. The agent then loads one skill for the current step.

The operator does not configure routing. The theme defines the procedure. This document states the terms, the principles, and the sequence.

Terms

Term Definition
Site state The design and content that the site has at the start of the session.
New build A session on a site that still has the default design and no designed pages.
Subsequent request A request that changes or inspects work that already exists.
Intake skill The first skill on a new build. The intake skill matches the form of the input.
Step skill A skill for one stage of work. Examples: design, chrome, build, finish.

A new chat is not a new build. A new chat on a site that already has a design is a subsequent request.

Principles

  1. The agent must read site state before it writes.
  2. The agent must load one skill at a time.
  3. The agent must select the intake skill from the form of the input. It must not select a skill from a word in the request.
  4. The agent must not load an intake skill on a subsequent request.
  5. The agent must not list all skills or all abilities at the start of a session.

Example for principle 3. The request “build a blog” does not load a skill because it contains the word “blog”. The agent loads blog-and-conditions when the session reaches the build step for archives and singles.

Classification of site state

The agent reads site state first.

Condition Classification
Default design. No designed pages. New build
Design tokens, chrome, or designed pages already exist. Subsequent request

New build

The intake skill is a function of input form. It is not a function of subject matter.

Form of the input Intake skill
Written prompt or brief build-from-prompt
Screenshot, mockup, or Figma export build-from-visual
Live URL clone-from-url

After intake, the agent proceeds by step. It loads a step skill only when that step starts.

Step Skill Condition
1. Design design The site has the default design, or the request asks for a new design.
2. Chrome site-foundation The site needs a name, header, footer, or menus.
3. Content model content-types The request needs custom post types or fields.
4. Build blog-and-conditions, or pages directly Always. Use blog-and-conditions for archives and singles.
5. Finish polish-and-verify Always. The agent must complete this step before it reports that the work is done.

Shop, forms, and components are not steps. The agent loads woocommerce, contact-forms, or components during the build step when the work requires those skills.

Subsequent requests

A subsequent request must stay on one layer.

Request Step skill
Change the header. site-foundation
Add a call to action on posts. blog-and-conditions
Change a color. design
Report a defect on a page. troubleshooting

If the intent of the request is not clear, the agent loads session-router first. session-router selects the step skill. session-router does not start a new build.

The intake skills build-from-prompt, build-from-visual, and clone-from-url apply only to a new build. The agent must not load those skills for a subsequent request.

Criteria of a correct path

A session follows the procedure if all of these statements are true:

  1. The agent read site state before the first write.
  2. The agent loaded one skill, then the next skill. It did not load all skills at the start.
  3. The agent did not list the full set of abilities.
  4. The agent did not change the full design when the request asked for one page or one template.
  5. The agent read the result of each write before it reported completion.

If a subsequent request starts a new homepage as a new build, the path is not correct. Stop the agent. State the layer that the request requires.

Related