Learning guides / AI coding courses

Coding practice · about 25 minutes

Write a repository context brief an agent can use

Build a concise project brief with verified commands, file scope and an acceptance check; validate its structure with an offline worksheet.

Is this the next skill you need?

Choose this when repeated assistant sessions forget the same repository details. A lesson on context and project instructions should help you name evidence, commands and boundaries; a longer prompt is not automatically better.

Preparation: You can read a README and distinguish an instruction from an observed result. Node.js 20 or newer runs the optional structure checker.

The time is our planning estimate for this small exercise, not a measured course completion time. If setup takes your whole session, save the command and error, then return after practicing the basics.

Your task and starter files

The fictional repository is a local-only receipt calculator. Its README gives a test command; task.mjs owns calculation. An old note claims there is a deployment script, but the supplied files contain none. Your brief should keep that unsupported claim out.

Download the original exercise ZIP

2,244 bytes · README, source, checks and reference answer. Extract the ZIP into one folder. Run the commands from that folder. No npm install or paid tool is needed.

node --test task.test.mjs

Expected initial result: All supplied code tests pass; complete the separate JSON worksheet.

The examples are invented for learning. They are independent of provider courses and can be attempted without an AI assistant. If you use one, keep the requirement and supplied checks visible, then review its actual changes.

Work through it

  1. Read the README and listed files in the ZIP. Separate current commands from the old note.
  2. Complete brief.json with goal, editFiles, checkCommand and excludedAction. Use task.mjs as the edit scope and the exact provided test command.
  3. Run node check.mjs brief.json. The checker verifies this small fixture contract; review clarity yourself.
  4. Add a short paragraph explaining how you would confirm a new project command before putting it into persistent instructions.

Check your result

Open the worked answer after your attempt

The brief names the receipt calculation goal, task.mjs, node --test task.test.mjs and no deployment. The reference JSON is one compact solution. Keep transient test results in a session record and revise stable instructions when the repository changes.

The ZIP includes a reference implementation or reference JSON. Use it to compare your reasoning after an attempt; a copied answer does not show that you can perform the task independently.

Keep as evidence: the original observation, your changed code or completed worksheet, the exact command and output, and a short explanation of the decision. When tests begin with one failure, the same unchanged tests should all pass after the repair. For the refactor, checks should pass both before and after.

Scope: A structural check cannot prove a natural-language brief is useful. Do not copy private production credentials or raw customer data into instructions; this fictional exercise contains neither.

Choose a lesson from the gap you found

If the exercise was hard because you could not run the code, work on language and command-line basics first. If running it was easy but explaining the change was hard, focus on the matching workflow lesson and repeat with fresh inputs.

Cursor Learn has official material on understanding code, developing changes, debugging, and reviewing work. Claude Code 101 covers agent context and a structured coding workflow. Use those lessons for instruction and this independent fixture to check your own result.

Public lesson access and tool usage are separate. Check current pricing, account requirements and usage limits before using either tool. A paid course is most useful when its assignments address the specific step you could not complete.

Find courses for a coding-assistant workflow →

Check the starting skills · Check free and paid access · Choose Claude Code or Cursor first

Sources and authorship

Original AI Course Rank tasks and editorial learning recommendations, published 11 November 2026. Official learning topics checked on that date: Cursor Learn, Claude Academy. The Node.js test-runner documentation explains the built-in testing command. These small tasks are practice evidence, not validated assessments or tool performance comparisons.