Session M5-01 lab: Carry one issue through a Squad¶
Duration: 2 hours
Difficulty: Advanced
Prerequisites: Sessions M1-01 to M1-03, M2-01 to M2-04 and M3-02 to M3-05
Deliverable: One input-validation issue carried through assignment, implementation, tests, review, and a committed decision record
Before you start¶
Read the course safety baseline. Use synthetic data only.
Check GitHub Copilot access, Squad, the GitHub training repository, integrations, and the usage limit. If any requirement is unavailable, stop the lab. Do not improvise installation commands or replace orchestration with a tabletop simulation.
| Exercise | Work | Time |
|---|---|---|
| 1 | Prepare the project and team | 25 min |
| 2 | Assign Issue 001 | 20 min |
| 3 | Implement and test | 45 min |
| 4 | Review, decide, and monitor | 30 min |
Setup¶
- Node.js 20 or later
- Git
- Authenticated
gh, GitHub Copilot, Squad, and a training repository that you may push to
Exercise 1: Prepare the project and team (25 min)¶
Copy lab/starter/squad-project/ into a training repository. Run the baseline:
The starter suite should pass. You will add Issue 001's validation cases later.
Check the installation:
Read lab/starter/squad-init-guide.md, then initialize or inspect the team:
Initialize a Squad team for this Node.js Express API. Define role limits
for lead review, backend implementation, test results, and decision recording.
Keep one owner for the shared decision record.
Review .squad/team.md, .squad/routing.md, .squad/decisions.md, and every
charter. The backend role may edit src/routes/api.js. The tester may edit
tests/api.test.js. The lead reviews the result. The scribe is the only role that
updates the shared decision record.
| Check | Expected result |
|---|---|
| Team | Lead, backend, tester, and scribe have charters and history files. |
| Routing | Implementation, test results, review, and decision updates have one owner each. |
| Decisions | The shared record names the scribe as its editor. |
| Stop rule | Overlapping ownership, failed tests, scope growth, or an unclear data boundary pauses work. |
Checkpoint: The trainer signs off on the team boundary before Issue 001 is
assigned. Use lab/starter/work-assignments.md to check the role boundaries.
Exercise 2: Assign Issue 001 (20 min)¶
Open Issue 001 in lab/starter/sample-issues.md. It is the only issue you
implement in the required lab.
As the lead, assign it with this work order:
Assign Issue 001 to the backend role.
Implement validation for POST /api/users in src/routes/api.js.
Accept a non-empty string name up to 100 characters and a valid email shape.
Return status 400 with a descriptive error for invalid input.
Do not add dependencies, change the response envelope, or edit unrelated routes.
The tester owns focused evidence in tests/api.test.js.
The lead reviews the final packet.
Record the assignment in the live .squad/ log. It must
include the issue, owner, permitted files, non-goals, tests, reviewer, and stop
conditions.
Checkpoint: A partner compares the assignment with Issue 001. Fix any added scope before implementation starts.
Exercise 3: Implement and test (45 min)¶
Have the backend role update src/routes/api.js. Keep validation inline and add
no package.
Have the tester add focused cases to tests/api.test.js for:
- a trimmed non-empty name;
- an empty or non-string name;
- a name longer than 100 characters;
- a malformed email;
- a valid request that still returns
201.
Run:
Record the command, result, and changed files. If a test fails, return the packet to the owning role. Do not weaken the issue or delete a failing case to get a green run.
Checkpoint: All focused and existing tests pass. Compare the result with
lab/solution/squad-project/src/routes/api.js and
lab/solution/squad-project/tests/api.test.js.
Exercise 4: Review, decide, and monitor (30 min)¶
As the lead, check the implementation against every acceptance criterion. Record one outcome: approve, request changes, or pause.
The review packet must include:
- issue and assignment;
- changed files;
- test command and result;
- acceptance-criteria checks;
- lead decision;
- committed decision-record entry.
Use lab/starter/ralph-guide.md to simulate the monitor after review. The monitor
may mark Issue 001 as ready to close only after the lead approves it. A human
still closes or merges the work.
The items in lab/starter/backlog-items.md are optional discussion prompts.
Do not implement them during the required lab.
Final deliverable¶
Submit one folder or pull request containing:
- the reviewed Squad team structure;
- the Issue 001 assignment;
- the code and test changes for Issue 001;
- passing
npm testoutput; - the lead review and recorded decision.
Final checks¶
- Local prerequisites match Sessions M1-01 to M1-03, M2-01 to M2-04 and M3-02 to M3-05.
- The trainer signed off on the team boundaries before work began.
- Each file or shared record had one role responsible for edits.
- Issue 001 kept the same acceptance criteria through review.
- No dependency or unrelated route was changed.
- Existing and focused tests pass.
- The lead decision cites test results.
- The Squad run produces a complete review packet.