Skip to content
All writing ‹ Part 02 of 08 · Designing Agents and Agent Loops: Split FR and NFR First
Engineering · 3 min read

Agent Design Is the FR/NFR Split

Split what an agent does into two paths: fixed steps become scripts, and only real judgment goes to the LLM. Fewer judgment paths make it cheaper and more stable.

Every morning, North needs my energy data for “the last 7 days, ending yesterday.” At first, I let North read my journal and work out the date range by itself.

Sometimes it got the range right, and sometimes it got it wrong. Then I understood: “the last 7 days, ending yesterday” is arithmetic, not judgment. If the LLM calculates it again on every run, it only gets more chances to be wrong.

Two paths

I split everything the agent does into two kinds:

  • FR (the fixed path): the steps are the same every time. Examples are fetching data, calculating dates, and running tests. These become scripts, hooks, or templates.
  • NFR (the judgment path): you cannot write the steps down in advance. For example, on a git conflict, something must read the history and decide which side to keep. Only these go to the LLM.
Intent Can it be fixed? yesFR: the fixed pathscript / hook / template noNFR: judgment paththe LLM judges log, repeatPattern? graduate to FR
Fixed steps go right to scripts. Judgment goes down to the LLM, and a repeated judgment climbs back up to FR.

What North does now

Scripts calculate the energy score, the sleep time, and the goal allocation first. North gets the answers, not the raw data. It makes only one judgment: “Is today worth a nudge to plan less?”

With fewer judgment paths, North is cheaper, more stable, and easier to debug. When something breaks, I know whether to look at a script or at the prompt.

This is not anti-AI

People ask me, “Does this not make the AI do less?” My view is that this puts AI where it is strongest. Arithmetic goes to scripts, and judgment goes to the LLM. The last step in the diagram, “graduate to FR,” is in Graduate NFR into FR. A good split needs a clear intent first, as Write the Intent Before the Prompt shows.

If it can be calculated, do not make the LLM guess.


Related: see where the last step leads in Graduate NFR into FR, revisit Write the Intent Before the Prompt, or go back to the series overview: Design an Agent.

// connect

Be brave | Be wise | Be grateful

21 BreakinCode

// elsewhere
LinkedInMedium (lang: en)Life RecordYoutube
wh:~$William Hung· © 2026 Taipei · GMT+8 · ● Available for collaboration
↑↓ navigate ↵ open esc close