Build your first feature with an AI Agent

Build a small order feature: sign in, view orders, add one, and change its amount. Store the data in the application database so it survives a browser refresh.

Describe this round of work

Finish creating the application, keep development running, and start a new AI Agent session in the application root. You can use this prompt:

Read the project's AGENTS.md and relevant development guidance first.

Add a simple order-management feature:
- Signed-in users can open an order list from the menu, create orders, and edit them.
- Each order has an order number, customer name, and amount. Amounts cannot be negative and order numbers must be unique.
- Save to the application database so the data survives a browser refresh.
- Do not add approvals, notifications, or complex roles in this round.
- Use the project's components and English/Chinese translations. Protect the API as well.

Verify creation, editing, and refresh persistence. Report changed files and actual check results.

Implement this feature in the application. It does not need a separately published plugin.

Review the changed files

Review the changes in these locations:

LocationPurpose
database/main/migrations/Create the order table with a unique order number
server/routes/orders.tsRead, create, and update orders; check authentication, access, and input
server/routes/index.tsRegister the order API
client/pages/orders.tsxDisplay the list and create/edit form
client/routes.tsAdd the page and menu entry
client/locales/en-US.ts, zh-CN.tsAdd interface translations
package.json, pnpm-lock.yamlRecord server dependencies and versions

You do not need to understand every line first. Check that the changes match the task, then use the feature. client/ contains browser pages, server/ contains server endpoints, and database/ records schema changes.

Create an order

Sign in as the administrator used in the previous page. Open “Orders” and select “New order”. Enter:

FieldExample
Order numberORD-001
Customer青禾商贸
Amount (CNY)1280

Order form; interface shown in Chinese

Save and confirm the order appears. Refresh the browser and check it again. This catches implementations that only update the interface without saving to the database.

Edit and check the result

Select “Edit order”, change the amount to 1380, and save. Refresh again: the updated amount should remain.

Order amount after editing and refreshing; interface shown in Chinese

Also try creating another ORD-001 and entering a negative amount. Both must be rejected. Server validation must enforce the rules as well as the form.

Keep working when a check fails

Tell the AI Agent what you did, what you expected, and what actually happened, then check again after it fixes the cause. See Return specific feedback for how to describe the problem.

What comes next

This page walked through one complete collaboration cycle: describe a requirement, change code, check the result, and request corrections. Build later features the same way: keep each round bounded and checkable before widening the scope. Pick a page by the problem you run into:

Problem you are facingRead
The feature does not match what you wantedWrite requirements
The AI Agent says it is done and you do not know how to checkReview AI Agent output
One requirement spans many pages and rulesBuild complex features
You keep repeating the same project rulesAdd team conventions