Glossary
106 terms from Coding with AI Assistants, in plain words, each with the chapter that teaches it.
#
- .gitignore
- A file listing, one per line, what Git should never track, such as `.venv/`, `__pycache__/` and `.env`.
A
- Agent
- An assistant that you give a task and that then edits files and runs commands itself, such as running the tests, before reporting back. Claude Code, Copilot's Agent mode and Cursor's Agent are examples.
- agent loop
- The cycle an agent repeats: read files, plan, edit, run a command, read the result, and go back to editing if a test fails. It stops and reports when the tests pass.
- AGENTS.md
- A Markdown instruction file in the project folder that Claude Code, Copilot and Cursor can all read. Kettle & Crane uses it to tell assistants to use Decimal for money, write tests first and keep secrets out of code.
- AI coding assistant
- A program that writes, explains and changes code when you ask in plain English, using a large language model inside. It comes as code completion, chat or agent.
- allow and deny rules
- Rules in `.claude/settings.json` that list single commands the agent may run without asking (allow) or may never run (deny). Deny rules are checked first and always win, and Claude Code itself enforces them.
- API key
- A long secret string that a service, such as a shipping carrier, gives you so its computers know a request comes from you. Anyone who has it can use it and you pay the bill.
- assert
- A Python statement that checks something is true. Nothing happens if it is; if it isn't, the test fails and pytest shows what came back and what was expected.
- AttributeError
- A Python error raised when you use a method or attribute that an object doesn't have, such as `Decimal.round`. It is a common sign of a hallucination.
B
- Basic Git commands (init, add, commit, status, log)
- `git init` turns a folder into a repository; `git add .` marks every file for the next commit; `git commit -m "message"` saves the snapshot; `git status` shows what changed or is untracked; `git log --oneline` lists commits one per line.
- boilerplate
- Code that is nearly the same in every project. Assistants are usually good at writing it.
- Boundary
- The exact value where behavior changes, such as $100.00 where Kettle & Crane shipping becomes free. Bugs gather there, so you test both sides (like $99.99 and $100.00).
- Branch
- A separate line of commits, so your main line stays as it was while you try work such as an agent task or the discount-codes feature. You can merge it back or delete it.
- breakpoint()
- A Python call that starts the built-in debugger and pauses the program on that line so you can inspect every variable.
C
- Characterization test
- A test that records what code does right now, odd cases included, so you notice if a refactor changes it. It doesn't judge whether the output is right.
- Chat
- A panel where you ask an assistant questions and get explanations and code you can copy.
- Claude Code
- Anthropic's coding assistant, a terminal agent that you start with `claude` inside your project. It needs a paid Claude plan.
- CLAUDE.md
- The instruction file Claude Code reads from the project folder. If it's missing, Claude Code reads AGENTS.md instead, and a CLAUDE.md can start with `@AGENTS.md` to include it.
- CLI
- Command-line interface: a program you use by typing commands in the terminal instead of clicking buttons. Claude Code is one.
- Cloud agent
- An agent that works on a task in a copy of your repository running somewhere other than your computer, then opens a pull request for you to review.
- Code completion
- Gray text that appears as you type, suggesting the rest of a line or function. You press Tab to accept it or keep typing to ignore it.
- Commit
- A saved Git snapshot of your files with a message saying what changed. You commit before asking an assistant for anything so one `git restore` can undo what it does.
- Container
- A throwaway computer inside your own, made by a tool such as Docker. It's the only safe place for an agent to run with `bypassPermissions` or unattended.
- Context
- Everything the assistant can see when it answers: your message, the chat so far, and the files you open or name. It can't see the business rules in your head.
- Copilot CLI
- GitHub's terminal version of Copilot, which works much like Claude Code and is included in every Copilot plan.
- Copyleft license
- A license, such as the GPL, that requires software built on the code to be shared under the same terms, which a company shop usually can't do.
- CSV
- A plain text file where each line is a row and commas separate the values, like Sam's `orders.csv` or `codes.csv`. Every value read from it is text.
- csv.DictReader
- A class in Python's `csv` module that reads the first line as a header and turns each other row into a dict keyed by the header names. All values arrive as text.
- Cursor
- A separate editor built on VS Code with AI built in, including Tab completions, an Agent side panel and Ctrl+K inline edits. It has a free plan.
D
- Decimal
- A Python type for exact decimal numbers, used for money at Kettle & Crane because a float can drift. Build one from text, such as `Decimal("55.00")`.
- Decorator
- A line starting with `@` just above a `def` that changes how the function is used without changing its code, like `@pytest.mark.parametrize`.
- Dependency
- A package your code needs that you install with pip. Check any dependency an assistant suggests before installing it.
- Diff
- A listing of the lines added (`+`) and removed (`-`) between two versions of files. `git diff` shows your uncommitted changes, and assistants show their edits as diffs.
- Docstring
- A triple-quoted string on the first line inside a function that describes what it does. Editors show it on hover and it doesn't change how the code runs.
E
- Edge case
- An unusual input the code must handle, such as an empty list, zero, a negative subtotal or a typo.
- Environment variable
- A named value your terminal hands to every program it starts, used to keep secrets like SHIP_API_KEY out of code. Python reads it with `os.environ.get()`, which returns `None` if it isn't set.
- eval()
- A Python function that runs text as code. On user input it is dangerous because a user can type code that deletes files or sends data; convert with `int()` or `Decimal()` instead.
- Extension
- An add-on that gives an editor new features, such as the GitHub Copilot extension for VS Code.
- extract a function
- A refactoring step that moves repeated code into a new, named function, like `format_line` in `receipt.py`.
F
- f-string
- A Python string starting with `f` that fills in values inside `{}`. Codes after a colon control layout, such as `{x:<20}` to left-align in 20 characters or `{x:>7.2f}` for a right-aligned number with 2 decimals.
- Formatter
- A tool that rewrites code into one standard layout so spacing never distracts you in a diff. ruff is both a linter and a formatter.
G
- Git
- A program that records snapshots of your project so you can compare and undo changes. It is the undo button for assistant mistakes.
- git restore
- Throws away uncommitted changes to a file, putting it back to the last commit. It's the one-command undo for what an assistant did.
- git switch
- `git switch -c NAME` creates a branch and moves onto it, `git switch -` returns to the previous branch, and `git branch -D NAME` deletes a branch.
- GitHub Copilot
- GitHub's assistant, built into VS Code, with inline suggestions, chat and Ask, Plan and Agent modes. It has a free plan.
H
- Hallucination
- Confident output that is made up, such as a method that doesn't exist like `Decimal.round` or a package that doesn't exist. It can look exactly as sure as correct code.
- Hook
- A command of your own that an assistant runs at a fixed point, such as running the tests after every edit.
- Hunk
- One block of changes in a diff, starting with an `@@` line like `@@ -10,6 +10,8 @@` that gives the old and new line ranges.
I
- IDE
- Integrated development environment: an editor with tools for running and checking code built in, such as VS Code or Cursor.
- if __name__ == "__main__":
- A Python check whose indented code runs only when you run the file directly, not when another file imports it. Assistants use it for demos and start-up code.
- Instruction file
- A short Markdown file of project rules and commands that the assistant reads at the start of every session, such as `AGENTS.md` or `CLAUDE.md`. It is advice, not a lock.
J
- JSON
- A text format for settings and data where curly braces hold `"key": value` pairs and square brackets hold lists, much like a Python dict and list. Claude Code's `.claude/settings.json` uses it.
K
- KeyError
- A Python error raised when you look up a dict key that isn't there, such as an unknown SKU like `blue-mugs` in PRICES.
L
- Large language model (LLM)
- A program trained on huge amounts of code and writing that predicts the most likely next piece of text. Assistants use one to produce code, so its output can look right but be wrong.
- License
- The author's terms for reusing their code. Permissive and copyleft licenses differ in what you must do when you reuse it.
- Linter
- A tool that reads code without running it and reports likely mistakes, such as an unused import. `ruff check` is an example.
- List comprehension
- A one-line way to build a list, such as `[line_total(sku, q) for sku, q in lines]`. It can end with an `if` to filter.
M
- Manual mode
- The permission mode where the agent asks before every edit and almost every command. It's a good choice while you're learning.
- Markdown
- Plain text with simple marks, such as `#` for headings and `-` for list items. Instruction files are written in it.
- MCP
- The Model Context Protocol, a standard way for AI agents to connect to other tools and data sources.
- Minimal reproduction
- The smallest code that still shows the bug, such as `Decimal("55.00") * "4"`. It removes everything that doesn't matter for you and the assistant.
- Model
- The particular trained LLM an assistant sends your request to. Most assistants let you pick one.
P
- Package
- Code someone else wrote and published that you install and import, such as pytest.
- parametrize
- A pytest decorator that runs one test function once per tuple of inputs, such as several subtotals for `shipping`. The report names each failing case, like `test_shipping[100.00-0.00]`.
- Permission mode
- A Claude Code setting that decides what the agent may do without asking: `default` (Manual) asks for edits and almost every command, `acceptEdits` also allows file edits and simple file commands in your project, `plan` only reads, `auto` runs everything with a background safety check, and `bypassPermissions` runs everything unchecked (only for a throwaway container). Shift+Tab cycles through default, acceptEdits and plan.
- Permissive license
- A license such as MIT, BSD or Apache 2.0 that lets you reuse code if you keep the copyright notice.
- pip
- Python's installer for packages. It downloads them from PyPI, the public package index, and is usually run as `python -m pip install`.
- Plan mode
- A Claude Code mode that only reads files and proposes a plan; nothing changes until you approve it. Start it with `claude --permission-mode plan`.
- Prompt
- The message you type to an assistant asking for something. A good one states the Goal, Context, Rules and Done when.
- Prompt injection
- Instructions hidden in a file, web page or error message, such as a README comment telling AI assistants to upload your settings. An agent can mistake them for your orders, so stop it if it suddenly wants to do something you didn't ask.
- prompt template
- A four-part way of writing a request to an assistant: Goal, Context, Rules and Done when. It says what to do, where, what to avoid and how you'll check the result.
- Pull request
- A request on a site such as GitHub to merge your branch into the main code, where teammates read the diff, comment and approve. At Kettle & Crane it also carries the AI-help disclosure.
- PyPI
- The public package index that pip installs from. Check a package's page there before installing something an assistant suggests.
- pytest
- The most common Python test tool. It runs every `test_` function in files named `test_*.py` and reports failures.
- pytest.raises
- A pytest helper used in a `with` block that passes only if the code inside raises the named error, like `ValueError` for an unknown SKU.
Q
- quantize
- A `Decimal` method that rounds to a set number of places; `price.quantize(Decimal("0.01"))` rounds to cents.
R
- raise
- A Python statement that stops the function and reports an error, such as `raise ValueError("Unknown SKU: blue-mugs")`.
- random module
- Python's module for random numbers, fine for games but predictable, so it must not be used for discount codes or tokens. Use `secrets` instead.
- Refactoring
- Changing how code is written without changing what it does, so it's easier to read and change. Do it in small steps with tests running after each.
- Regression
- A bug in something that used to work, or a fixed bug that returns. Keeping old tests is how you catch one.
- REPL
- Python's interactive prompt (`>>>`), where you type code and see results at once. It is handy for checking claims an assistant makes.
- Repository
- A project folder whose history Git records.
- Review checklist
- The seven questions to ask of every change before you keep it: does it do what you asked, did anything else change, can you explain every line, are edge cases right, are errors handled, any new packages, do the tests pass.
- Revoke
- To switch off a leaked key at the service so it no longer works, then make a new one. Deleting the line from code is not enough.
- ruff
- A tool you install with pip that is both a linter (`ruff check`) and a formatter (`ruff format`). A clean run doesn't prove the code is correct.
S
- Sandbox
- A limit on which files and internet hosts an agent's commands can reach. In Claude Code, `/sandbox` turns one on.
- Secret
- A password, token or key that lets someone act as you or your company. Keep secrets out of code, prompts and Git.
- secrets module
- A standard-library module made for unguessable codes, tokens and passwords; `secrets.token_hex(4)` gives 8 random hex characters. It's the safe alternative to `random`.
- SKU
- Stock-keeping unit: a short code that names a product, such as `blue-mug`. In `pricing.py` it is the key of the PRICES dict.
- Slopsquatting
- Publishing a harmful package under a name that assistants tend to invent, so someone running the suggested `pip install` gets the attacker's code.
- standard library
- The modules that come built in with Python, such as `csv`, `decimal` and `secrets`, so they need no installing. Sticking to them avoids adding outside dependencies.
T
- Team policy
- Agreed rules for the people on a team who use AI help: approved tools, what may be shared, review by a person, author ownership, disclosing AI help in the pull request, and watching cost.
- Terminal
- The text window where you type commands. In examples, a line starting with `$` is a command to type, without the `$`.
- Terminal commands (cd, ls, mkdir)
- `cd` moves into a folder (`cd ..` goes back up), `ls` lists files in the working folder (`dir` on Windows; `ls -a` also shows hidden names like `.venv`), and `mkdir` makes a new folder.
- Test
- A small function that runs your code and checks the result with `assert`. Tests are the guardrail for AI-written code.
- Traceback
- The error report Python prints when code crashes. Read it from the bottom up: the error, where it happened, then the path of calls that led there.
- tuple unpacking
- Splitting a tuple into separate names, as in `for sku, quantity in lines`, where each `(sku, quantity)` pair becomes two variables.
- Type hint
- A note on a parameter or result's type, such as `sku: str` or `-> Decimal`. Python doesn't check it, so read it as documentation.
- TypeError
- A Python error raised when a value is the wrong type for an operation, such as multiplying a `Decimal` by the text `"4"`. It often appears when CSV quantities are text rather than numbers.
U
- Untracked file
- A file Git can see in the folder but isn't saving yet, listed by `git status` until you `git add` and commit it.
- Usage limit
- The amount of assistant use a plan allows before you hit a cap that resets weekly or monthly. Agent tasks use far more than a quick chat question.
V
- ValueError
- A Python error for a value that has the right type but unsuitable content, such as an unknown SKU or an expired discount code. Code can raise it deliberately, and tests can check for it with `pytest.raises`.
- Virtual environment (venv)
- A private folder of Python and packages for one project, so projects can't break each other. Create it with `python3 -m venv .venv`, then activate it in each new terminal with `source .venv/bin/activate` (macOS/Linux) or `.venv\Scripts\activate` (Windows); `deactivate` turns it off.
- VS Code
- A free code editor (an IDE) that Copilot runs in and that Cursor is built on.
W
- Working folder
- The folder the terminal is in right now; commands act on files there.
- Write tests first
- Writing the tests that describe the behavior before asking the assistant for code that passes them. Never let the assistant change those tests to make them pass.