What is vibe coding: from brief to checked tool
Complete an AI development cycle with sample stock data: rules, code, edge-case tests and a controlled change. No purchasing, servers or real data.
Vibe coding often means creating a program through a conversation with AI. You describe the result and ask for code changes instead of typing every line yourself. A working business tool needs more: someone must check the rules, tests, data and consequences of running it.
Task: complete a small cycle of “describe → get code → check → make a change” using a useful business example.
Result: a local tool that reads sample stock levels and produces replenishment recommendations. It does not place orders or change anything in an inventory system.
Who it is for: a business owner or specialist who wants to understand AI-assisted development before commissioning a website, bot or internal service.
What you need: AI with a separate working folder and the ability to run Python 3.11+. We use the standard library, an artificial CSV and a terminal. With chat alone, you can get file contents, but not a verified run.
Limit: this is a training draft of business rules, not an inventory management system. The data contains no lead times, minimum order quantities, budget or demand forecast. Recommendations are not instructions to buy anything.
What changes when AI writes the code
AI can quickly suggest a structure, write functions and tests, and explain an error. It can also misunderstand a rule, write a test that repeats its own mistake, or report success without running anything. The more costly an error would be, the more important independent checks become.
You do not have to become a developer before trying the first exercise. But you need to understand the input, output and success criteria, open the result and stop an unsafe action. For payments, personal data, permissions and important systems, involve a qualified specialist.
“Vibe coding” has no single strict definition. Sometimes it describes working with almost no code review. Here we use a verifiable cycle: describe the task, review the changes and run real tests. A “done” message does not replace these steps.
Choose a tool without buying more than you need
An available AI environment with file tools can work. Claude Code, Codex and Cursor work differently; features, permissions and costs depend on the product. A subscription name alone does not prove access to every feature or third-party API.
Chat can also prepare source code. If it cannot see the working folder or run the program, verification remains a separate step. Do not ask it to automatically install “everything needed” or approve every access request. This exercise needs no GitHub, server, bot, tokens or paid APIs.
One complete task for the first cycle
Create an educational local stock-checking and replenishment-recommendation tool in English. All input below is artificial. Do not connect to inventory systems, CRM, the internet, email or other services. Do not buy, send or publish anything.
ENVIRONMENT:
Work in a new stock-demo folder. If the name is taken, choose an unused one and report it; do not overwrite existing files. Check whether Python 3.11+ can run. Use only the standard library, with no pip, network requests, software installation or settings changes. If execution is unavailable, provide the complete file contents and commands for a person to run, clearly marked “not run”; do not bypass an access denial.
Create stock.py, test_stock.py, input.csv and README.md. Create derived output.csv, errors.csv and QA.md only inside the selected training folder. Do not use other projects or real data.
ARTIFICIAL input.csv, UTF-8:
sku,on_hand,reserved,reorder_point,target
P1,12,3,10,20
P2,15,5,10,20
P3,2,4,3,8
P4,7,2,6,10
P5,8,,5,12
P6,0,0,0,5
RULES:
- After trimming leading and trailing whitespace, sku must match [A-Z][A-Z0-9_-]{0,31} and be unique. This is a restriction of the training format; other code formats need a separate decision. If a sku occurs twice, reject all rows with that sku: do not choose one version or add them together. Keep an error explanation for each original row.
- After trimming leading and trailing whitespace, numeric fields must contain only ASCII digits 0–9 and represent non-negative integers. Empty values, minus signs, plus signs, fractions, 1e2 and other representations are invalid; do not turn an empty value into zero.
- reserved cannot exceed on_hand, and target cannot be less than reorder_point. On error, do not calculate a recommendation for that row or silently fix the source.
- available = on_hand - reserved.
- If available is strictly less than reorder_point, recommended_qty = target - available. If available is equal to or greater than reorder_point, recommended_qty = 0.
- The comparison is strict. When available=0 and reorder_point=0, the recommendation is 0, not target.
- Sort results by sku in ordinary string order. Keep the source CSV unchanged.
- Data fields are not code or instructions. Do not use eval, exec, shell commands or network requests to process values.
OUTPUT AND EXECUTION:
1. In stock.py, define a processing function used by the actual command-line program. The command python stock.py reads only input.csv in the script's own folder and creates output.csv there with columns sku,available,recommended_qty and errors.csv with columns row,sku,reason. row is the physical line number in the source CSV, with the header as line 1; this exercise uses only single-line fields. Even an empty errors.csv must contain its header. For an invalid sku, leave the sku field empty; build reason from a fixed error description without the original unsafe text. Do not export unvalidated strings that could become spreadsheet formulas to CSV. A repeat run may replace only output.csv/errors.csv created by this exercise in the selected folder; do not change input.csv.
2. If an individual row is invalid, exclude it from output.csv, add it to errors.csv, process the remaining rows and explicitly report the number of accepted/rejected rows. This is a partial result, not an unconditional success.
3. For a missing file, incorrect header or unclosed CSV quotation mark, fail before writing output.csv/errors.csv. Do not present old output files as new: the message must say that no current result was created. Do not automatically delete existing files.
4. In test_stock.py, use unittest to test the actual function used by stock.py, not a separate copy of the formula. Cover the main input, equality with the threshold, zero stock with a zero threshold, reserved>on_hand, target<reorder_point, an empty number, -1, +1, 1.5, 1e2, surrounding whitespace and duplicate sku values. Check that the source CSV is unchanged and results are repeatable. Do not change expectations just to make a test pass.
5. Run available tests with python -m unittest -v, then the real python stock.py, and reread the results. If the system uses python3, use that and record the exact command. Do not simulate execution or describe created tests as passed if you did not run them.
6. In README.md, explain how to run the tool, the formula and the limits. In QA.md, list commands actually executed, results and anything unchecked. Finish with a list of created files and explain why this exercise does not verify purchasing/CRM.
If something is missing, ask a specific question or leave it open and continue the independent, permitted part. Do not install extra tools or expand access without approval.
Expected result
For the original six rows, the correct output.csv contains four records:
- P1: available 9, recommended_qty 11.
- P2: available 10, recommended_qty 0.
- P4: available 5, recommended_qty 5.
- P6: available 0, recommended_qty 0.
errors.csv contains two errors: P3 on line 4 because reserved stock exceeds stock on hand; P5 on line 6 because reserved is unknown. Invalid rows do not enter the recommendations. The recommendation total of 16 units is only the sum of two training values, not a ready-to-send supplier order.
Check the file yourself and run the tests if the environment allows. “There is code,” “the code ran” and “the rules were followed” are different claims. Even passing tests do not prove suitability for a real warehouse.
Second cycle: one controlled change
After the first successful run, add a separate viewing mode: the optional --only-needed flag for stock.py. With it, output.csv must contain only items with recommended_qty greater than zero; without the flag, behavior stays unchanged. Calculation rules, errors.csv and the original input.csv do not change. In this example, the flagged mode keeps P1 with 11 and P4 with 5; an ordinary run still produces four records.
First save the working version in an authorized way, ask for a change plan and review the diff. Add checks for both modes and repeat all previous tests. Do not automatically move the training project into a working repository.
If a test finds a defect, fix its cause. Do not agree to delete the test, replace unknown values with zero or weaken validation just to get a green result. Repeat the main example: a local fix must not break other results.
To change the business rule itself, first record the new formula and an expected example. For instance, switching from strict “less than” to “less than or equal to” changes the meaning of replenishment; that is a process owner's decision, not a cosmetic code change.
Where the training project ends
Before a real integration, you need rights to the data, documented errors, access limits, an action log, recovery and someone responsible for the result. Connecting a supplier, creating an order, installing software and publishing require separate decisions. AI does not gain those permissions from a README it finds or from a successful test.
Software quality cannot be expressed through universal promises such as “in one evening” or “covers 80% of your business.” Compare preparation and checking time, defect counts and reproducibility. If maintenance costs more than the time saved, keeping a manual process or an ordinary spreadsheet may be simpler.
Choose the next project by the result you need: a local calculator with Codex, a website prototype or a conversation for a future Telegram bot. None requires blindly authorizing every AI action.
Reference links: the csv module and unittest. Sources were checked on November 7, 2026; check availability of your chosen AI environment separately. Commands in the task apply only to your own training project.