Documentation contents03 / 20

Getting started03 / 20

From one sentence of intent to understanding the code

On this page

This walkthrough takes one renewal rule of a subscription service through a full round: write one sentence of intent, have the Agent implement or explain it, read its explanation and evidence, write a new decision back into the document, and finally read the turn's changes by intent.

You need Noea with an Agent that is ready, and a local project you are happy to keep developing. If your project has nothing to do with subscriptions, swap the example for one of its own rules that is just as concrete.

Open your code folder

Click “Open Folder…” at the top of the sidebar, or choose File → Open Implementation Folder…, and select the folder that holds your code.

The first time you open the folder, Noea sets up a project for it to hold your Intent Documents and chats; if a project already exists, it opens it. The main area then shows a new chat, with an Intent coverage card that is still empty. For other ways to open a project, see Open and manage projects.

Write one sentence of intent

Click “New Intent” in the sidebar and name it “Renewal”. Noea adds the .noea.md extension and opens the document. Write:

# Renewal

## Grace period

After a renewal charge fails, the subscription keeps a 7-day grace period and the charge is retried every 2 days; one success returns it to normal.

Press ⌘S (Ctrl+S on Windows and Linux) to save. You don't need every edge case yet; write down what you have already decided.

Once saved, the document says “This document has no explanations yet” under its title, and a control bar appears at the bottom with what you can do next. Later, when you add text to a document that already has explanations, a green bar appears to its left to mark it as new and not yet explained.

Have the Agent implement or explain

From here there are two cases.

If the code doesn't have this rule yet, click “Implement 1” on the control bar. Noea opens a new chat and has the Agent change the code to match the paragraph. You can follow its thinking, tool calls and file edits in the chat; at the end, the reply closes with a change card such as “Changed 4 files”.

If the code already has a grace period and you want to know whether it really works as the sentence says, click “Explain 1” on the control bar. Or hover over the paragraph and click “Investigation” on its left to check just this one. Explain and Investigation only read code and write explanations; they don't change code.

After an implementation finishes, Noea starts Explain on its own by default, so you don't need to click again. While it runs, the paragraph shows that it is being investigated.

Read the explanation

When Explain is done, click the empty space around the paragraph. Its note opens with the “Overall explanation”, in three parts:

  • Realization: which function starts the grace period, where the deadline is stored, and how the daily job picks the subscriptions to retry.
  • Evidence: which code was read, which tests were run and with what result. Folded by default; open it to read.
  • Attention: the implementation choices, gaps, risks and suggestions the Agent lists itself.

Now rest the pointer on the sentence. Faint dashes appear under phrases like “7-day grace period” and “retried every 2 days”. Click one, and the note switches to that phrase's own explanation, for instance exactly how the 7 days are counted.

Say the attention list includes this implementation choice:

The 7 days run from the moment of failure, 168 hours in all, not by calendar day. Whether to count calendar days in the team's time zone is yours to decide.

That is a decision the Agent made for you. Your intent didn't say, so it picked one.

Check the evidence

Open “Evidence”. Code locations in the explanation appear as chips with a file name and line numbers, such as grace.ts:6-18; function names mentioned mid-sentence can be clicked too. Click one and the code panel opens on the right at those lines. Check that the calculation the explanation describes is really there.

The grace-period paragraph with its evidence open: the code read, the tests run and their result, and a screenshot left by the implementation. Clicking a code location opens the code panel on the right.

Then look at the tests. The evidence usually says which tests ran, whether they passed, and which cases were not verified. Test code existing doesn't mean it ran this time, and tests that ran prove only the cases they cover. For more, see Check the evidence.

Write the decision back into intent

Once you decide the grace period should follow the team's time zone, hover over the paragraph and click “Ask about this” on its left. The document and a chat open side by side, with a reference to the paragraph already in the message box. Write:

Count the grace period in calendar days in the team's time zone: the day of the failure is day 1, and the team is downgraded only if the charge still hasn't succeeded by the end of day 7. Draft the intent first; I'll review it before you implement.

The Agent's reply ends with a proposal card, and the document opens on the left in review mode: added text on a green background, replaced text struck through in red. If you don't like the wording, edit it right there; once you do, the button becomes “Accept My Edits”.

Click “Accept”. The Intent Document is updated, the Agent changes the code to match in the same chat, and Explain runs when it's done. For all the ways to handle a proposal, see Write what you settled into intent.

Read this turn's changes by intent

When the implementation finishes, click the change card at the end of the reply. The code panel opens on the right with every file the turn changed. Once Explain is done, the changes are grouped by the intent they answer: what was changed for the grace-period sentence, and, listed last under “Other changes”, whatever answers no intent.

A change that answers no intent isn't necessarily wrong; it may just be a test helper. But it is worth a look. See Read changes by intent.

Check what this round left you

Before you finish, try answering four questions in your own words:

  1. How is the grace period implemented now, and what evidence supports that?
  2. Which choice wasn't in your intent and was made by the Agent for you?
  3. Did you accept that choice, or write it back into the intent?
  4. Next time you want 10 days instead of 7, which sentence do you change?

If you can't answer one, go back to that paragraph and keep asking. You don't need to write every rule the first time. When the next decision worth keeping comes along, add it the same way.

Next, read Read an explanation and Write down the intent you care about.