Skip to content

Background and further reading ​

A large language model (LLM) generates responses from instructions and available context. A coding tool can also let it read files, edit code, and run commands. Useful collaboration means giving it a clear task and checking what it produces.

Give AI objective feedback ​

The project supplies pytest, Pylint, Black, and a small real-browser check through one prepared check command. These provide repeatable feedback about behavior, suspicious code, and formatting.

Positive and negative describe the kind of case: a valid losing move is positive; an unsupported move is negative. Unit, integration, and end-to-end describe the level being exercised. How the automatic checks work explains the examples and limits, including a worked failure. The starter README remains the single assignment path.

Why write a short spec? ​

A spec is a shared description of the intended result. A few examples make it easier to discuss an idea before changing code. Update it when you make a new decision.

This resembles approaches used in current AI development tools. GitHub's Spec Kit carries a specification through planning, tasks, implementation, and checking the result. GitHub's coding-agent guidance recommends clear, bounded tasks with explicit expected outcomes. These are examples of industry practice, not proof that one workflow always succeeds. Our exercise uses the common ideas with ordinary Markdown and GitHub. Spec Kit, GitHub guidance

You and the AI ​

In this lab, a local project chat can read your cloned folder, discuss the task, save agreed decisions, edit files, and run checks. The README uses ChatGPT desktop's Codex mode. Stay in that project through the cycle. VS Code is optional; the app's terminal and file viewer support inspection.

You bring the purpose, preferences, and decisions. AI can help clarify questions, suggest options, explain files, and implement changes. The running application and its checks give you something concrete to inspect together.

Ask for explanations and alternatives when useful. Treat confident claims as claims to check. Read the plan, try the result, and give specific feedback.

Context and tokens ​

Context is the information available for the current response: instructions, relevant conversation, files, and tool results. A context window has a finite capacity. Long or cluttered context can also make relevant details harder to use; there is no universal percentage at which errors begin. Keep current decisions in the spec and retrieve relevant files when needed. Context engineering

Tokens are units used to process and generate content. Input tokens cover supplied material; visible output includes explanations and code. Some models also use internal reasoning tokens. In OpenAI's API, reasoning tokens count toward output usage and are billed accordingly; a short visible answer can still involve substantial computation. OpenAI reasoning documentation

Planning also uses tokens. It may save work when an early clarification prevents a mistaken implementation and repeated repairs. Prose is not automatically cheaper than code, and savings are not guaranteed. Aim for a useful result you understand.

Save agreed decisions in SPEC.md even while staying in one chat. If you later need a new chat, open the same project and ask the agent to read that spec and inspect the current files. Add a short note about what works and what remains. Do not rely on an old conversation alone.

Read more when useful ​

Agree on the rules. Let AI help. Check the result.