An AI-generated edit is not finished when the model says it is correct. The developer needs to see what changed, why it changed, and what evidence supports it. Nerva’s planned code workflow should make the diff the center of approval.
The proposed edit should answer four questions
Before writing, Nerva can show:
- Which files will change?
- Which lines will be added, removed, or moved?
- Why does the task require this change?
- Which test or check will run afterward?
This is more useful than a broad prompt such as “allow Nerva to edit this project.” A narrow approval keeps the scope understandable and protects uncommitted work.
Never hide a dirty workspace
If a developer already changed src/worker.ts, Nerva should show that state before proposing a patch. It should not overwrite, reset, or silently merge changes to make its own edit easier. The user can choose a new file, ask for a patch only, or stop the task.
The same principle applies after the write. Nerva should compare the expected diff with the actual diff and explain any unexpected change. A test passing does not prove that only the intended lines changed.
For backend work, this creates a natural review loop:
inspect -> propose diff -> approve -> write -> test -> inspect final diff
That loop makes Nerva useful for real engineering while keeping the human review point clear.
The useful design question
The useful question here is not whether an AI agent can produce an impressive demo. It is whether the workflow stays understandable when the task is incomplete, the repository is messy, or the model is wrong. For this part of Nerva, the focus is making code review the normal unit of agentic editing. That means each state should have a visible owner, a small input, and a result that another part of the system can inspect.
A concrete scenario
Consider showing a focused diff before a worker retry policy is changed. A good Nerva run would first state the scope, identify the files or operation it needs, and show the next proposed step. It would keep the original request separate from model-generated instructions. If an action needs approval, the user would see what will happen before it happens. Afterward, the task history would retain the command, result, and verification status instead of reducing everything to a confident paragraph.
This approach also makes a failure useful. A denied permission, unavailable provider, missing package, or changed file is information about the task state. Nerva should preserve it and explain the smallest recovery option. It should not silently broaden the request, retry a side effect, or claim completion because a model supplied plausible-looking text.
What I would test first
For an early implementation, I would test three paths: a normal successful run, a denied action, and an interrupted run resumed after the workspace changes. The key test is whether tests and the diff still describe the requested scope. In each path, the interface should make clear what Nerva knows, what it proposed, what actually ran, and what remains unverified.
Useful acceptance checks include:
- the user can inspect the selected context before model execution;
- sensitive paths and credentials are excluded or redacted;
- every side effect has a narrow permission decision;
- failures remain attached to the step that caused them;
- a final answer links to evidence instead of implying that unrun work succeeded.
Nerva is still an upcoming project, so these are design and implementation goals rather than claims that a finished product already provides them. That distinction matters: a trustworthy agent should earn confidence through observable behavior, not through a feature list.
A small review checklist
A practical review should end with a small decision, not a vague promise. Write down the scope, the expected result, the permission required, and the check that will confirm it. Then try the same flow with a refusal or missing dependency. If the interface explains that case clearly, the design is ready for a more realistic prototype; if it hides the problem, adding another feature will only make the workflow harder to trust.
The design is informed by the boundaries I have had to think through in CryptoEx and SentinelFi: backend work becomes easier to review when context, permissions, side effects, and verification are explicit.
Discussion
What would you try, change, or challenge after reading this guide? Specific results and errors help the next reader.
Comments will load as you reach this section.