Build your first feature¶
In this tutorial, we will build a small command-line greeter with Loom. We start with one sentence and end with commits. We use the first two phases of the Loom flow, Plan and Build.
flowchart LR
A[Set up the repo] --> B[Plan: interview]
B --> C[Plan: spec]
C --> D[Plan: tickets]
D --> E[Build: one ticket]
E --> F[Commit]
F -->|next ticket| E
We need two things before we start:
- A coding agent with Loom installed. Install has the lines for each agent. This tutorial shows Claude Code.
git.
The agent words its replies differently on every run. Expect your replies to look like the examples, with other words.
1. Make an empty repo¶
We start from nothing, so that every file in the repo comes from this tutorial.
mkdir greeter
cd greeter
git init
claude
The last line starts Claude Code in the new folder. We type every later step into this session.
2. Set up the repo for Loom¶
The planning skills write the spec and the tickets to an issue tracker. We tell Loom which tracker to use.
/setup-loom
The agent checks the repo and offers the missing parts one group at a time. We pick one part and decline the rest.
For the issue tracker, we pick local files. The spec and the tickets become Markdown files in the repo, so we need no account.
When the agent finishes, the repo has an AGENTS.md that points at ai-docs/agents/issue-tracker.md. If that file is missing, run /setup-loom again and pick the issue tracker.
How to set up a repo for Loom describes the other parts.
3. Plan: let the agent interview us¶
We give the agent one sentence and let it ask for the rest.
/grill-with-docs I want a command that greets a person by name, in a language they pick.
The agent answers with a round of numbered questions. Each question comes with the answer that the agent recommends:
❓ Q1 - Which languages does the greeter support at first?
➡️ English, Dutch and Spanish
We answer every question in the round, and the agent asks the next round. To accept a recommendation, we answer "yes". When the agent has no question left, it asks us to confirm the plan. That ends the interview.
The agent writes the terms we settled to GLOSSARY.md and the decisions to ai-docs/adr/. After a short interview, both may be absent.
4. Plan: write the spec¶
/to-spec
The agent shows where it plans to test the feature. We confirm, or we say what to change. Then the agent writes the spec to ai-docs/plans/<feature>/PRD.md, where <feature> is a short name that the agent picks.
We open the file and read the user stories. If a story is wrong, we say so in the session, and the agent corrects the spec.
5. Plan: split the spec into tickets¶
/to-tickets
The agent proposes a numbered list of tickets. Each ticket has a title, the tickets that block it, and what it delivers:
1. Greet in English
Blocked by: none
Delivers: `greet Ada` prints "Hello, Ada!"
Each ticket delivers something we can run. We approve the list, and the agent writes one file for each ticket to ai-docs/plans/<feature>/issues/, numbered from 01.
6. Build: implement the first ticket¶
/implement
The agent takes the first ticket that nothing blocks. It works in three stages, and it waits for us after the first:
- A design. The agent draws the change as a diagram and waits. We approve it, or we say what to change.
- Tests first, then code. Where a test helps, the agent writes a failing test first, then the code that makes the test pass.
- A code review. The agent reviews its own change and reports what it found.
When the agent reports that the ticket is done, we run the greeter ourselves. The agent tells us the command. We should see the greeting that the ticket promised.
If the greeting is wrong, we tell the agent what we saw. It fixes the code and runs the tests again.
7. Commit the ticket¶
/commit
The agent commits at once. Its message says what changed for someone who uses the greeter:
feat(greeter): greet a person by name in English
We check the result:
git log --oneline
The log shows one commit with that message.
8. Build the next ticket¶
Build is a loop. We type /implement again, and the agent takes the next ticket. We repeat steps 6 and 7 until /implement reports that no ticket is left.
What we built¶
We now have a greeter that works and a commit for each ticket. The spec and the tickets that led to it are in ai-docs/plans/.
We planned the feature with /grill-with-docs, /to-spec and /to-tickets. We built it with /implement and /commit.
The flow has two more phases, Harden and Release. Build a feature with it lists every skill in order, and the skills reference says what each one does.