interview-reps 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/README.md +6 -0
  2. package/content/CLAUDE.md +54 -8
  3. package/content/assessments/A01-library-desk/README.md +13 -0
  4. package/content/assessments/A01-library-desk/level-1.md +17 -0
  5. package/content/assessments/A01-library-desk/level-2.md +16 -0
  6. package/content/assessments/A01-library-desk/level-3.md +16 -0
  7. package/content/assessments/A01-library-desk/level-4.md +15 -0
  8. package/content/assessments/A02-ticket-counter/README.md +16 -0
  9. package/content/assessments/A02-ticket-counter/level-1.md +18 -0
  10. package/content/assessments/A02-ticket-counter/level-2.md +16 -0
  11. package/content/assessments/A02-ticket-counter/level-3.md +16 -0
  12. package/content/assessments/A02-ticket-counter/level-4.md +16 -0
  13. package/content/assessments/REVIEW.md +70 -0
  14. package/content/behavioral/QUESTIONS.md +44 -0
  15. package/content/behavioral/REVIEW.md +92 -4
  16. package/content/design/D13-video-streaming/README.md +21 -0
  17. package/content/design/D14-ticket-booking/README.md +20 -0
  18. package/content/design/D15-ad-click-aggregator/README.md +20 -0
  19. package/content/design/D16-distributed-key-value-store/README.md +21 -0
  20. package/content/design/D17-collaborative-document-editor/README.md +20 -0
  21. package/content/design/D18-ai-assistant-on-a-budget/README.md +21 -0
  22. package/content/design/D19-going-multi-region/README.md +20 -0
  23. package/content/design/D20-checkout-at-10x-load/README.md +20 -0
  24. package/content/design/D21-webhook-delivery/README.md +20 -0
  25. package/content/design/D22-game-leaderboard/README.md +20 -0
  26. package/content/design/D23-discovery-recommendations/README.md +21 -0
  27. package/content/design/D24-splitting-a-shared-database/README.md +20 -0
  28. package/content/design/REVIEW.md +70 -0
  29. package/content/product/P21-support-reply-drafts/README.md +29 -0
  30. package/content/product/P22-receipt-categories/README.md +29 -0
  31. package/content/product/P23-pharmacy-symptom-helper/README.md +31 -0
  32. package/content/product/P24-listing-descriptions/README.md +29 -0
  33. package/content/product/P25-group-class-bookings/README.md +28 -0
  34. package/content/product/P26-home-repair-press-release/README.md +28 -0
  35. package/content/product/P27-merchant-cash-advances/README.md +30 -0
  36. package/content/product/P28-retire-the-desktop-app/README.md +28 -0
  37. package/content/product/P29-live-courier-location/README.md +28 -0
  38. package/content/product/P30-carts-across-devices/README.md +28 -0
  39. package/content/product/P31-ticket-on-sale/README.md +29 -0
  40. package/content/product/P32-transfer-status/README.md +28 -0
  41. package/content/product/P33-new-revenue-by-plan/README.md +47 -0
  42. package/content/product/P34-weekly-app-opens/README.md +46 -0
  43. package/content/product/P35-second-orders/README.md +49 -0
  44. package/content/product/P36-on-time-by-city/README.md +46 -0
  45. package/content/product/P37-trials-that-never-pay/README.md +52 -0
  46. package/content/product/P38-smaller-grocery-baskets/README.md +51 -0
  47. package/content/product/P39-clinic-bookings-abroad/README.md +52 -0
  48. package/content/product/REVIEW.md +136 -1
  49. package/dist/cli.mjs +3615 -797
  50. package/package.json +1 -1
package/README.md CHANGED
@@ -3,8 +3,10 @@
3
3
  The agent for a nextround hub. It's a small program that runs on your computer. It checks in with the hub, picks up work you ask for there and sends back the result. The hub never connects to your computer.
4
4
 
5
5
  - Reviews your design, behavioral, product and coding practice with your own Claude Code or Codex.
6
+ - Helps one small step at a time when you press "I'm stuck" on a coding problem, without writing the code for you.
6
7
  - Writes your weekly coach report and suggests gap tags from interview debriefs.
7
8
  - Reads a job link and suggests the company and role.
9
+ - Writes a company brief from the public web, using only your runner's own web search.
8
10
  - Checks your private calendar feed for interview rounds.
9
11
  - Syncs your applications with your Notion database.
10
12
 
@@ -58,3 +60,7 @@ npx interview-reps agent mcp # serve your hub to Claude Code or Code
58
60
  ```
59
61
 
60
62
  To name this computer differently on the hub, add `--label "<name>"` when you log in.
63
+
64
+ ## Publishing a new version (maintainers)
65
+
66
+ See [docs/RELEASING.md](../docs/RELEASING.md#2-publish-the-agent).
package/content/CLAUDE.md CHANGED
@@ -1,14 +1,34 @@
1
1
  # interview-reps: rules for Claude (and other AI assistants)
2
2
 
3
- The person using this repo is practising coding interviews and is solving the problems **without AI help**. Your job is to review solutions they've already written and, for maintainers, to add new problems. Never solve problems for them.
3
+ The person using this repo is practising for interviews. They solve the **practice problems** themselves: your job is to review what they've written and, for maintainers, to add new questions. Never solve their practice for them unasked.
4
+
5
+ The repo also **teaches**, so people can close a gap instead of meeting it again and again. Teaching content (lessons, worked examples on separate teaching problems, tool cards, example answers marked as examples) is allowed and lives apart from the practice set. See "Teaching content" below.
4
6
 
5
7
  ## Hard rules
6
8
 
7
- - **No solutions, no hints, no approach nudges** unless the person explicitly asks ("give me a hint", "show me the answer"). If they ask for a hint, point them to the next unopened hint in that problem's `HINTS.md` rather than inventing a bigger one.
9
+ - **No solutions, no hints, no approach nudges on their practice** unless the person asks. Asking counts when they say it ("give me a hint", "I'm stuck", "show me the answer", "teach me this") or press "I'm stuck" or "Teach me" in the app or hub.
10
+ - **When they ask for help, follow the stuck path below: the smallest useful step first.** For a plain hint request, point them to the next unopened hint in that problem's `HINTS.md` rather than inventing a bigger one. Give a full walkthrough only when they ask for it.
8
11
  - **Never edit `problems/*/solution.ts`** unless asked to. Those files are the person's own work. They are git-ignored, so they only exist on that machine.
9
12
  - **Never commit or force-add** `solution.ts`, `solution.attempt-*.ts`, `PROGRESS.md` or anything in `.reps/` to this repository.
10
13
  - When you run problem tests yourself, prefix the command with `REPS_TRACK=0`, so your runs stay out of the person's practice log.
11
- - Don't put reference solutions anywhere in this repo. Validate new tests against solutions kept in a temporary folder outside it.
14
+ - Don't put reference solutions to **practice problems** anywhere in this repo. Validate new tests against solutions kept in a temporary folder outside it. Worked examples belong only to teaching problems, which are never in the practice set.
15
+
16
+ ## "I'm stuck": the stuck path
17
+
18
+ Use this when the person asks for help on a problem they haven't solved. Go one step at a time, wait for their answer, and move on only if they're still stuck. Keep each reply to one or two questions.
19
+
20
+ 1. **Show me.** Ask for their plan or code so far. Work out the kind of stuck from it (no idea, a wrong idea, the right idea that fails, too slow, or blocked by a tool such as regex) instead of asking them to pick.
21
+ 2. **Trace it by hand.** Have them work a small example on paper, step by step, the way they'd check it by eye. Don't skip this step; it often unlocks the problem.
22
+ 3. **Test the plan on a counterexample.** Give an input that their current plan gets wrong, and ask what it returns and what it should.
23
+ 4. **Tighten the plan.** Questions on the loop's stop condition, the problem's rules, and edge cases, before any code.
24
+ 5. **Name the pattern family.**
25
+ 6. **Point to the lesson** for that family and its worked example on a teaching problem, then send them back to their own problem.
26
+ 7. **Give an outline** in plain words, no code.
27
+ 8. **Walk through a solution**, only when they ask for it.
28
+
29
+ Where to start depends on what step 1 shows: a blank page goes from tracing to the pattern and lesson early; a wrong idea starts with a counterexample; failing code starts with tracing their code. A tool blocker (regex, `slice` versus `splice`) goes to that tool's card, not up the steps. The person can jump ahead at any time by asking.
30
+
31
+ Credit a first working idea (for example reverse and compare), then help improve it. Afterwards, say which step got them unstuck, and ask them to write their own "what I learned" note in their words. A problem solved after step 5 or later counts as solved with help: suggest a redo in 3 days and a similar problem from the same family.
12
32
 
13
33
  ## "review NNN": the feedback protocol
14
34
 
@@ -19,9 +39,10 @@ Use this only after the person has written a solution.
19
39
  2. Run `REPS_TRACK=0 pnpm test NNN`. `REPS_TRACK=0` keeps your run out of their practice log.
20
40
  3. Read the previous reviews in `.reps/reviews/`, if there are any, and their latest attempt for NNN in `.reps/attempts.jsonl`.
21
41
 
22
- **Reply in this order, briefly:**
42
+ **Reply in this order, briefly.** Teach, don't only state findings: open with one or two plain sentences on how it went (the approach, and what cost the time).
23
43
 
24
44
  1. **Result**: which tests pass or fail, and what the failures mean. Also say how many tries it took: the attempt's test runs and failed runs from `.reps/attempts.jsonl`, plus any earlier attempts at this problem.
45
+ - **Between your runs** (when there were two or more runs; the hub sends each run with what changed, the local app keeps earlier code in `.reps/snapshots/NNN/`): name the runs where something changed, the result before and after, the changed lines, and what the change means. For example "runs 3 to 4: `break` became `continue`, and the 'race a car' test passed", or "logs taken out of the loop, and the timing test went from 1,420 ms to 4 ms".
25
46
  2. **Plan vs code**: did they write a plan first? Did the code follow it? Was the plan itself sound?
26
47
  3. **Correctness**: any input the tests don't cover that would break it.
27
48
  4. **Complexity, walked through their own code**: never generic. Use this problem's input sizes from its README constraints.
@@ -33,14 +54,25 @@ Use this only after the person has written a solution.
33
54
  - **Space.** Name each structure the code builds and its largest possible size for this problem's inputs. Say whether the recursion stack or the output counts.
34
55
  - **Real numbers.** Put the maximum constraint in. For example, "n = 10⁵, so O(n²) is 10¹⁰ steps: that's what the performance test caught".
35
56
  - **Their claim against the real cost**, and against the optimal. If the claim is wrong, say exactly which line they mis-counted.
36
- 5. **Code quality**: naming, clarity, TypeScript idiom (types, `const`, no needless mutation of inputs), and anything an interviewer would comment on.
57
+ 5. **Code quality, with examples**: naming, clarity, TypeScript idiom (types, `const`, no needless mutation of inputs), and anything an interviewer would comment on. Every finding that gets a gap tag (from here or steps 3 and 4) is written out in full:
58
+ - **What we saw**: their line, quoted, or what the runs showed.
59
+ - **Why it matters**: what goes wrong, and what an interviewer makes of it.
60
+ - **Before and after** on a small made-up snippet, never their solution or this problem.
61
+ - **How to practise**: a toolkit card, the lesson for the pattern, or a short drill.
62
+ - **What to say** in the interview, in one sentence.
37
63
  6. **Did last time's feedback stick?** Take the gap tags and "Next time" lines from their recent reviews. Say plainly whether this solution repeats them or shows they've been fixed.
38
64
  7. **What the interviewer asks next**: one or two follow-up questions, plus one variation worth trying.
39
65
  8. **Verdict**: *solid* (passes, no hints, within the target time), or *redo in 2–3 days*, with the one thing to fix.
40
66
 
67
+ Then three short sections, which the hub shows beside the review:
68
+
69
+ - **How you solved it**: the result (*solved alone*, *solved with questions* when help stopped at step 4 or earlier, *solved with help* from step 5 on or with any hint opened), the help step reached, the step that got them moving, hints, time and runs.
70
+ - **Gaps noted, and why**: for each gap tag, why it was given and what "fixed" looks like. Add "Not tagged:" with a tag you considered and left out, and why (for example, `pattern` when they found the technique themselves).
71
+ - **When it comes back**: the redo date and how (from a blank file, no help, the target time), a sibling problem from the same pattern family, and a short daily drill for the main gap.
72
+
41
73
  Don't rewrite the solution. Quote only the specific line(s) under discussion. If they ask for a cleaner version after the review, that's fine.
42
74
 
43
- If the solution doesn't pass yet, or they gave up, name the **kind** of gap only (for example "an edge case with empty input" or "the loop bounds"). Never name the fix or the right approach unless they ask for it.
75
+ If the solution doesn't pass yet, or they gave up, name the **kind** of gap only (for example "an edge case with empty input" or "the loop bounds"). Never name the fix or the right approach unless they ask for it. That includes the before-and-after examples: give one only for a finding the failing tests don't depend on.
44
76
 
45
77
  **Then save the review** as `.reps/reviews/NNN-YYYY-MM-DD-HHMM.md` (create the folder if needed). These header lines are read by `pnpm stats`, so keep them exactly in this form:
46
78
 
@@ -74,14 +106,19 @@ Use only these tags, so gaps can be counted over time:
74
106
  | `clarity` | Naming, structure, overlong function |
75
107
  | `planning` | No plan, or the code drifted from the plan |
76
108
  | `speed` | Correct, but well over the target time |
109
+ | `tools` | Language tools and debugging habits: `break` where `continue` was meant, logs left in a loop, regex, array methods used the wrong way |
77
110
  | `communication` | The explanation (or the interview itself) was hard to follow |
78
111
 
112
+ Why `tools` is its own tag: these slips cost minutes even when the idea is right, and they're fixed by drilling the tool, not by learning a new pattern. A slowdown caused by logs left in a loop is `tools`, not `pattern` or `complexity`: the approach was already fast enough.
113
+
79
114
  System design, behavioral and product practice use their own tags (`design:*`, `behavioral:*`, `product:*`), listed in `app/SPEC.md` and in each track's review protocol. Interview feedback logged in the app's Jobs area uses the same tags, so gaps from real interviews and from practice are counted together.
80
115
 
81
116
  ## System design, behavioral and product reviews
82
117
 
83
118
  The practice app (and, for product, the hub) writes these automatically. If you're asked to review one by hand ("review design D03", "review my answer to conflict-2", "review product P04"), follow `design/REVIEW.md`, `behavioral/REVIEW.md` or `product/REVIEW.md`, and save it in `.reps/design/reviews/`, `.reps/behavioral/reviews/` or `.reps/product/reviews/` with the header lines from `app/SPEC.md`. The same hard rules apply: never write the design, the story or the product answer for them; name the kind of gap and the question to ask themselves.
84
119
 
120
+ An online assessment project ("review assessment A01") follows `assessments/REVIEW.md` and is saved in `.reps/assessments/reviews/` as `Ann-YYYY-MM-DD-HHMM.md`. It uses the coding gap tags, so `pnpm stats` counts its gaps with the coding ones. Never rewrite the solution.
121
+
85
122
  ## Job applications and interview feedback
86
123
 
87
124
  `.reps/jobs.json` holds the person's applications, interview rounds, debriefs and the feedback they logged. It is personal: never copy it, quote company names or feedback anywhere outside this machine, or put any of it in the repo. The one exception is the app's own Notion sync, which the person turns on in Settings and which sends only company, role, status, applied date, link and source to their own database. Never read or print `.reps/secrets.json`.
@@ -108,7 +145,7 @@ Don't run any problem tests.
108
145
  2. **Last report's focus: did it work?** For each focus area the previous report set, compare its gap tags and metrics before and after that report. Call each one *fixed*, *improving* or *still open*. This is the feedback loop, so be honest.
109
146
  3. **Top 2–3 gaps now.** Rank by how recent and how frequent, across coding, system design, behavioral, product and real interview feedback. Give the evidence for each: tag counts, which problems, and failure kinds from `failedRuns` (performance failures point to `pattern`).
110
147
  4. **Where to put effort for the next 5–7 days.** Name the exact problems: due redos first, then new problems in the weakest pattern families. If an interview is scheduled, weight the plan toward that round's kind (design prompts, product prompts, behavioral competencies with no story). Add a daily target and one habit to practise from [THINKING.md](THINKING.md).
111
- 5. **Readiness and confidence.** Say how the computed `readiness` scores are trending, and whether the optional self-rated `confidence` agrees with them, in one or two plain sentences.
148
+ 5. **Readiness and confidence.** Say how the computed `readiness` scores are trending, and whether the optional self-rated `confidence` agrees with them, in one or two plain sentences. In the hub, `stats.selfAssessment` (when present) lists up to three skills where the person's own 1–5 rating disagrees with practice; mention the biggest one.
112
149
 
113
150
  Keep it short and specific, and use numbers. Never give solution hints for problems they haven't solved. Name the pattern family to practise, not how to solve a particular problem.
114
151
 
@@ -122,10 +159,19 @@ from a source, follow the matching playbook in `.claude/skills/` exactly: `add-c
122
159
  overview for people. The non-negotiables:
123
160
 
124
161
  - Write everything in your own words. A source decides what to add, never the text.
125
- - No reference solutions, designs or sample answers anywhere in the repo. Validate coding tests against
162
+ - No reference solutions, designs or sample answers for **practice** items anywhere in the repo. Validate coding tests against
126
163
  solutions kept in a scratch copy outside it, with `REPS_TRACK=0`, never in a working copy someone
127
164
  practises in.
128
165
  - Never renumber problems or prompts, and only add behavioral questions at the end of a section: ids key
129
166
  everyone's history.
130
167
  - Create items with `pnpm new` and run `pnpm check-content` (no errors) before opening the pull request.
131
168
  - Propose the list first, add what the person approves, and finish on a branch with a pull request.
169
+
170
+ ## Teaching content
171
+
172
+ Teaching content helps people learn what they're missing. It is separate from the practice set, so practice still counts.
173
+
174
+ - **What's allowed:** a lesson per skill or pattern family (what it is, how to recognise it, the shape of the code, common mistakes, a trusted link or two), worked examples on **teaching problems**, tool cards (regex, array and string methods, `Map` and `Set`), recall drills, and example answers for behavioral, design and product, each clearly marked as an example.
175
+ - **What stays answer-free:** every practice item (`problems/`, `design/`, `product/`, `behavioral/QUESTIONS.md`). A teaching problem is never also a practice problem, and a lesson never solves a practice problem.
176
+ - **Everything in your own words.** A source can decide what to cover, never supply the text.
177
+ - Teaching content goes through the same pull request flow as questions, with `pnpm check-content` passing.
@@ -0,0 +1,13 @@
1
+ # A01 · Library desk
2
+
3
+ Time: 90 min · Levels: 4
4
+
5
+ You're writing the system behind the lending desk of a small neighbourhood library: the books it holds,
6
+ the people who borrow them, and what happens when a book comes back late or someone is waiting for it.
7
+
8
+ Rules for every level:
9
+
10
+ - Everything happens through one class, `LibraryDesk`. Every method takes `at` first: the day it happens, counted in whole days since the library opened. Calls arrive in order, so `at` never goes down.
11
+ - Ids are strings you're given. A copy's id is its title's id, `#`, and its number: `dune#1`, `dune#2`…
12
+ - A method that can't do what's asked returns `false`, `null` or an empty list, as its level says. It never throws.
13
+ - Each level adds to the last. Earlier levels' tests keep running, so keep them passing as you go.
@@ -0,0 +1,17 @@
1
+ # Level 1 · Lending
2
+
3
+ The desk can add books and members, lend copies out and take them back.
4
+
5
+ ```ts
6
+ addTitle(at: number, titleId: string, copies: number): boolean
7
+ addMember(at: number, memberId: string): boolean
8
+ lend(at: number, memberId: string, titleId: string): string | null
9
+ giveBack(at: number, copyId: string): boolean
10
+ onLoan(at: number, memberId: string): string[]
11
+ ```
12
+
13
+ - `addTitle` adds a title with copies numbered from 1. It returns `false` if the title already exists or `copies` is less than 1.
14
+ - `addMember` returns `false` if the member already exists.
15
+ - `lend` lends the lowest-numbered free copy and returns its id. It returns `null` if the member or the title is unknown, no copy is free, or the member already has a copy of that title.
16
+ - `giveBack` returns `false` if the copy doesn't exist or isn't on loan.
17
+ - `onLoan` lists the copies a member has, sorted. An unknown member has none.
@@ -0,0 +1,16 @@
1
+ # Level 2 · Late fees and the overdue list
2
+
3
+ A loan is due 14 days after the day it was lent: lent on day 3, due on day 17. Bringing it back after the
4
+ due day costs a late fee.
5
+
6
+ ```ts
7
+ feesOwed(at: number, memberId: string): number | null
8
+ pay(at: number, memberId: string, amount: number): number | null
9
+ overdueReport(at: number): string[]
10
+ ```
11
+
12
+ - When a copy comes back late, the member is charged 25 for each day past the due day, at most 500 for one loan. Back on the due day or earlier costs nothing.
13
+ - `feesOwed` is what the member has been charged and not yet paid. Copies still out don't count until they come back. It returns `null` for an unknown member.
14
+ - `pay` takes up to `amount` off what's owed and returns what's left. Paying more than is owed leaves 0; the rest isn't kept. It returns `null` for an unknown member or an `amount` of 0 or less.
15
+ - A member who owes 300 or more can't borrow: `lend` returns `null` until they pay below 300.
16
+ - `overdueReport` lists every loan past its due day as `copyId,memberId,daysLate`, most days late first, then by copy id.
@@ -0,0 +1,16 @@
1
+ # Level 3 · Holds and renewals
2
+
3
+ Members can now wait for a title that has no copy free, and keep a book longer.
4
+
5
+ ```ts
6
+ placeHold(at: number, memberId: string, titleId: string): boolean
7
+ waiting(at: number, titleId: string): string[]
8
+ keptFor(at: number, copyId: string): string | null
9
+ renew(at: number, copyId: string): boolean
10
+ ```
11
+
12
+ - `placeHold` puts the member at the back of the title's queue. It returns `false` if the member or title is unknown, a copy is free right now, or the member already has a copy or is already waiting.
13
+ - When a copy comes back and someone is waiting, it is kept for the first member in the queue, who leaves the queue. It's kept for them on the day it came back and the two days after. On the third day it moves to the next member waiting, kept on the same terms, or becomes free if nobody is.
14
+ - A kept copy can only be lent to the member it's kept for. `lend` gives them that copy even if a lower-numbered one is free. Other members can still borrow the title's free copies.
15
+ - `waiting` lists the members still in the queue, first first. `keptFor` says who a copy is kept for today, or `null`.
16
+ - `renew` moves the due day 14 days later. It returns `false` if the copy isn't on loan, the loan is already overdue, anyone is waiting for the title, or it has already been renewed twice.
@@ -0,0 +1,15 @@
1
+ # Level 4 · Looking back
2
+
3
+ The library wants to answer questions about the past: who had a book on a given day, and what someone
4
+ owed then. A day's answer counts everything that happened on that day.
5
+
6
+ ```ts
7
+ loansOn(at: number, day: number, memberId: string): string[]
8
+ heldBy(at: number, day: number, copyId: string): string | null
9
+ owedOn(at: number, day: number, memberId: string): number | null
10
+ ```
11
+
12
+ - `loansOn` lists, sorted, the copies the member had at the end of `day`.
13
+ - `heldBy` says which member had the copy at the end of `day`, or `null`.
14
+ - `owedOn` is what the member owed at the end of `day`, after any fees and payments that day. It returns `null` if the member didn't exist yet.
15
+ - `day` is never after `at`. A day before the library knew a copy or member gives `null` or an empty list.
@@ -0,0 +1,16 @@
1
+ # A02 · Ticket counter
2
+
3
+ Time: 90 min · Levels: 4
4
+
5
+ You're writing the box office of a small venue that sells named seats for its shows: who sits where, what
6
+ each seat cost, seats held for a few days while someone decides, and what happens when a show moves to a
7
+ smaller room.
8
+
9
+ Rules for every level:
10
+
11
+ - Everything happens through one class, `TicketCounter`. Every method takes `at` first: the day it happens, counted in whole days since the box office opened. Calls arrive in order, so `at` never goes down.
12
+ - Show ids and buyer ids are strings you're given. All counts and prices are whole numbers.
13
+ - A show's seats are laid out in rows. Rows are lettered from `A` and seats in a row are numbered from 1, so `B7` is row B, seat 7.
14
+ - Seat order is by row letter, then by seat number as a number: `A2`, `A10`, `B1`.
15
+ - A method that can't do what's asked returns `false`, `null` or an empty list, as its level says. It never throws.
16
+ - Each level adds to the last. Earlier levels' tests keep running, so keep them passing as you go.
@@ -0,0 +1,18 @@
1
+ # Level 1 · Shows and seats
2
+
3
+ The box office can put on shows, sell named seats and take them back.
4
+
5
+ ```ts
6
+ addShow(at: number, showId: string, rows: number, seatsPerRow: number): boolean
7
+ sell(at: number, showId: string, seat: string, buyerId: string): boolean
8
+ refund(at: number, showId: string, seat: string): boolean
9
+ seatsOf(at: number, showId: string, buyerId: string): string[]
10
+ freeSeats(at: number, showId: string): number | null
11
+ ```
12
+
13
+ - `addShow` adds a show with `rows` rows of `seatsPerRow` seats each. It returns `false` if the show already exists, `rows` is below 1 or above 26, or `seatsPerRow` is below 1.
14
+ - A seat is written as its capital row letter followed by its number with no leading zero, like `B7`. A label for a row or number the show doesn't have, or written any other way (`b7`, `B07`, `A0`), isn't one of its seats.
15
+ - `sell` sells one free seat to the buyer. It returns `false` if the show is unknown, the seat isn't one of its seats, or the seat is already sold. A seat can't be sold twice, even to the same buyer.
16
+ - `refund` takes a sold seat back, and it can then be sold again. It returns `false` if the show is unknown, the seat isn't one of its seats, or the seat isn't sold.
17
+ - `seatsOf` lists the seats the buyer has for that show, in seat order. A buyer with none, or an unknown show, gets `[]`.
18
+ - `freeSeats` is how many of the show's seats are free, or `null` for an unknown show.
@@ -0,0 +1,16 @@
1
+ # Level 2 · Prices and revenue
2
+
3
+ Each row now has a price, and the venue wants to see what its shows have earned.
4
+
5
+ ```ts
6
+ setRowPrice(at: number, showId: string, row: string, price: number): boolean
7
+ revenue(at: number, showId: string): number | null
8
+ topShows(at: number, n: number): string[]
9
+ exportSales(at: number, showId: string): string[]
10
+ ```
11
+
12
+ - Every row starts at a price of 0. `setRowPrice` sets one row's price, given as its capital letter. It returns `false` for an unknown show, a row the show doesn't have, or a price below 0.
13
+ - A seat costs its row's price at the moment it's sold. Changing a price later doesn't change what earlier sales cost.
14
+ - `revenue` is the sum of what the show's currently sold seats were sold for. A refund gives back exactly what that seat was sold for, so it drops out of the revenue. It's `null` for an unknown show.
15
+ - `topShows` lists at most `n` shows as `showId(revenue)`, for example `hamlet(120)`, from the highest revenue to the lowest. Shows with equal revenue are listed in the order they were added, earliest first. Every show counts, even one with revenue 0.
16
+ - `exportSales` lists the show's sold seats in seat order, one line each as `seat,buyerId,price`, where `price` is what that seat was sold for: `A3,sam,40`. An unknown show gets `[]`.
@@ -0,0 +1,16 @@
1
+ # Level 3 · Holds
2
+
3
+ A buyer can hold a seat for a few days before paying for it.
4
+
5
+ ```ts
6
+ hold(at: number, showId: string, seat: string, buyerId: string): boolean
7
+ buyHold(at: number, showId: string, seat: string, buyerId: string): boolean
8
+ holds(at: number, showId: string): string[]
9
+ ```
10
+
11
+ - `hold` holds a free seat for the buyer. It returns `false` if the show is unknown, the seat isn't one of its seats, or the seat is sold or already held, by anyone.
12
+ - A hold placed on day `d` expires on day `d + 3`: it still holds the seat on day `d + 2`, and from day `d + 3` the seat is free again without any call.
13
+ - While a seat is held, it isn't free: `freeSeats` doesn't count it, and `sell` and `hold` return `false` for it, even for the buyer holding it.
14
+ - `buyHold` sells a held seat to the buyer holding it, at its row's price on the day they buy, and ends the hold. It returns `false` if the show is unknown or that buyer has no live hold on that seat.
15
+ - A held seat isn't sold: `refund` returns `false` for it, and it isn't in `seatsOf`, `revenue` or `exportSales`.
16
+ - `holds` lists the show's live holds in seat order, one line each as `seat,buyerId,expiryDay`: `C2,ria,8` for a hold placed on day 5. An unknown show gets `[]`.
@@ -0,0 +1,16 @@
1
+ # Level 4 · Moving to a smaller room
2
+
3
+ A show can move to a smaller seat map. People who already bought keep a seat if one is left for them, and keep paying what they paid.
4
+
5
+ ```ts
6
+ shrink(at: number, showId: string, rows: number, seatsPerRow: number): string[] | null
7
+ ```
8
+
9
+ - The new map must fit inside the old one: `rows` and `seatsPerRow` are each at least 1 and no more than the show has now. Otherwise, or for an unknown show, `shrink` returns `null` and changes nothing. A map the same size as the old one is allowed.
10
+ - All live holds on the show are cancelled by the move.
11
+ - A buyer whose seat still exists on the new map keeps that seat.
12
+ - Every other sold seat is re-seated in the order the seats were sold, earliest sale first. Each takes the lowest free seat on the new map in seat order.
13
+ - A seat's sale happens when `sell` or `buyHold` sells it. Re-seating doesn't change when it was sold, but a seat refunded and sold again counts from its new sale.
14
+ - When no free seat is left, every remaining sold seat is refunded and drops out of the revenue.
15
+ - `shrink` returns those refunds in the order the seats were sold, one line each as `seat,buyerId,price` with the seat they had before the move. It returns `[]` when everyone fits.
16
+ - A re-seated buyer keeps the price they paid, whatever their new row costs. Rows still on the map keep their prices for later sales.
@@ -0,0 +1,70 @@
1
+ # Assessment review protocol
2
+
3
+ The protocol the automatic reviewer follows after a timed assessment project (and anyone reviewing one by
4
+ hand: "review assessment A01"). The person practises without AI help. A project is one class built up over
5
+ 4 levels in 90 minutes, each level unlocking when every test so far passes. The review is about how the
6
+ code grew under the clock, not only whether it works. **Never write the solution, never show corrected or
7
+ restructured code, and never name the data structure or design that would fix a gap.** Name the KIND of
8
+ gap and the question they should ask themselves next time.
9
+
10
+ ## Before writing
11
+
12
+ 1. Read the project's README (the rules for every level) and each level's instructions up to the level
13
+ they reached.
14
+ 2. Read the code as it stood when each level was cleared, and when that was, then the final code. Compare
15
+ them: what changed between levels is where refactoring shows.
16
+ 3. Read the score, the parts per level and the last run's failing tests.
17
+
18
+ Do not run commands and do not write files: print the review only.
19
+
20
+ ## Scores
21
+
22
+ Score each dimension 1 to 5, with a one-line reason that points at their own code (quote a line or a
23
+ name where it helps, never more than a few lines).
24
+
25
+ | Score | Meaning |
26
+ |---|---|
27
+ | 1 | Missing or getting in the way: it cost them levels or points. |
28
+ | 2 | Works, but would not survive the next level without a rewrite, or an interviewer would push back. |
29
+ | 3 | Solid: clear, and later levels fitted in without fighting the earlier code. |
30
+ | 4 | Strong: clean and deliberate, with only small things an interviewer would mention. |
31
+ | 5 | What a standout candidate shows: each level's change small and safe, and nothing to add. |
32
+
33
+ - **structure**: Are the state and the methods organised so each level's rules have one obvious home?
34
+ Are names clear, helpers small, and repeated lookups or checks written once?
35
+ - **refactoring**: Between snapshots, did they reshape earlier code when a new level needed it, or bolt
36
+ special cases on? Did a refactor break an earlier level's tests on the way?
37
+ - **correctness**: Rules read carefully: boundaries (the due day itself, a cap, "at most twice"),
38
+ refusals that return `false`, `null` or an empty list instead of throwing, and order of results.
39
+ - **pace**: Minutes per level against the 90 minutes. Did they move on at the right time, or sink time
40
+ into one level? Did they reach the later, heavier levels?
41
+
42
+ ## Reply in this order, briefly
43
+
44
+ 1. **Result**: the score, levels cleared, minutes used, and what the failing tests have in common (the
45
+ kind of rule they missed, never the fix).
46
+ 2. **How the code grew**: one short paragraph per level reached, from the snapshots. Where did the
47
+ design help or fight the next level?
48
+ 3. **Correctness**: rules or inputs the tests did not catch that would break it, named as a kind.
49
+ 4. **Code quality**: naming, TypeScript idiom (types, `const`, no needless mutation of inputs), method
50
+ length, anything an interviewer reading the final code would comment on.
51
+ 5. **Pace**: where the minutes went and one concrete change for next time.
52
+ 6. **Verdict**: *solid* (reached level 3 or 4 with clean, steadily refactored code) or *redo*, with the
53
+ one thing to fix.
54
+
55
+ ## Header lines
56
+
57
+ Start with these lines, flush left (the hub reads them):
58
+
59
+ ```
60
+ # Assessment review Ann · <project name>
61
+ Project: Ann
62
+ Date: YYYY-MM-DD
63
+ Verdict: solid | redo
64
+ Scores: structure <1-5>, refactoring <1-5>, correctness <1-5>, pace <1-5>
65
+ Gaps: <comma-separated coding gap tags from CLAUDE.md, or none>
66
+ Next time: <one concrete habit for the next timed assessment>
67
+ ```
68
+
69
+ Use only the coding gap tags from CLAUDE.md. `clarity` covers structure that made the code hard to change,
70
+ `speed` covers pace, and `understanding` covers a misread rule.
@@ -9,6 +9,10 @@ end of a section rather than in the middle.
9
9
  `[product]` at the end of a line marks a question product managers are often asked. Anyone can answer it
10
10
  from their own work; the practice page can filter to these.
11
11
 
12
+ `[senior]`, `[staff]`, `[principal]` or `[manager]` at the end of a line marks a question that assumes that
13
+ scope: senior and up, staff and up, principal, or people managers. Lines without one suit every level. The
14
+ hub suggests a labelled question only to people whose target fits it; anyone can still pick it.
15
+
12
16
  ## Ownership
13
17
 
14
18
  - Tell me about a time you took responsibility for something nobody had asked you to own.
@@ -18,6 +22,11 @@ from their own work; the practice page can filter to these.
18
22
  - Describe a time you cleaned up after a problem you did not cause.
19
23
  - Tell me about something you were responsible for after it launched. What did you change once real people used it? [product]
20
24
  - Describe a time you spotted a problem users were having that nobody was tracking. What did you do? [product]
25
+ - Tell me about a system or area you owned for the long term. How did you decide what to fix and what to leave alone? [senior]
26
+ - Describe a time you set the technical direction for work that several teams depended on. [staff]
27
+ - Tell me about a problem that sat between teams for a long time before you took it on. How did you get it resolved? [staff]
28
+ - Describe a time you were accountable for a result your team delivered but you did not build yourself. [manager]
29
+ - Tell me about a product area you owned end to end, including the numbers it was judged on. [senior] [product]
21
30
 
22
31
  ## Impact
23
32
 
@@ -28,6 +37,11 @@ from their own work; the practice page can filter to these.
28
37
  - Describe a small change you made that had a bigger effect than expected.
29
38
  - Tell me about a launch you measured. What did the numbers show, and what did you do next? [product]
30
39
  - Describe a time you stopped work that was already under way. How did you decide? [product]
40
+ - Tell me about a technical decision of yours whose effect was still visible a year later. [senior]
41
+ - Describe work of yours that changed how a group beyond your own team builds or ships. [staff]
42
+ - Tell me about a multi-year bet you argued for. How did you know whether it was paying off? [principal]
43
+ - Describe how you improved your team's delivery without adding people. [manager]
44
+ - Tell me about a strategy you wrote that changed what several teams worked on. [staff] [product]
31
45
 
32
46
  ## Ambiguity
33
47
 
@@ -37,6 +51,10 @@ from their own work; the practice page can filter to these.
37
51
  - Describe a problem nobody knew how to approach. How did you get started?
38
52
  - Describe how you chose between several things people were asking for, with a recent example. [product]
39
53
  - Tell me about a time what people asked for turned out to be different from what they needed. [product]
54
+ - Tell me about a time you turned a vague goal from leadership into a plan others could carry out. [senior]
55
+ - Describe a time you had to decide what a whole area should work on for the next year. [staff]
56
+ - Tell me about a problem where the hardest part was working out which problem to solve. [principal]
57
+ - Describe a time your team's priorities were unclear because leaders above you disagreed. What did you do? [manager]
40
58
 
41
59
  ## Collaboration
42
60
 
@@ -46,6 +64,10 @@ from their own work; the practice page can filter to these.
46
64
  - Describe how you kept a group moving when people were working in different places or time zones.
47
65
  - Describe how you worked with people from other disciplines, such as design, engineering or sales, to ship something. [product]
48
66
  - Tell me about a time you had to explain a technical limit to someone non-technical, or a business need to an engineer. [product]
67
+ - Tell me about a time you designed something another team had to build on or maintain. [senior]
68
+ - Describe how you got several teams to adopt a shared technical standard that none of them owned. [staff]
69
+ - Tell me about a time you worked with a partner team whose manager had different goals from yours. [manager]
70
+ - Describe a trade-off you negotiated between engineering, design and business stakeholders. [senior] [product]
49
71
 
50
72
  ## Mentoring
51
73
 
@@ -54,6 +76,12 @@ from their own work; the practice page can filter to these.
54
76
  - Tell me about a time you onboarded someone new. What did you do to speed it up?
55
77
  - Describe a time you let someone else take the lead on something you could have done yourself.
56
78
  - Describe a time you helped someone understand how decisions get made in your area. [product]
79
+ - Describe a time you sponsored someone for a promotion or a bigger role. What case did you make, and to whom? [senior]
80
+ - Describe how you raised the technical bar of a group you did not manage. [staff]
81
+ - Tell me about a hire you made. How did you decide, and how did it turn out? [manager]
82
+ - Describe a time you managed someone who was not meeting expectations. [manager]
83
+ - Tell me about a time you built a team, or reshaped one, around a new goal. [manager]
84
+ - Describe how you helped other senior engineers grow into staff-level work. [principal]
57
85
 
58
86
  ## Learning
59
87
 
@@ -63,6 +91,9 @@ from their own work; the practice page can filter to these.
63
91
  - Describe how you keep your skills current, with a recent example.
64
92
  - Tell me about a time talking to users or customers changed your mind. [product]
65
93
  - Describe an experiment or test whose result surprised you. What did you do with it? [product]
94
+ - Describe how you decided which new technology your team should bet on, and how you checked the bet. [senior]
95
+ - Tell me about an incident after which you stopped that kind of problem across several teams, not just yours. [staff]
96
+ - Tell me about a time feedback from the people you manage changed how you manage. [manager]
66
97
 
67
98
  ## Conflict
68
99
 
@@ -73,6 +104,10 @@ from their own work; the practice page can filter to these.
73
104
  - Tell me about a time you disagreed with your manager.
74
105
  - Tell me about a time you turned down a request from a customer or another team. [product]
75
106
  - Describe a time you disagreed with what the data seemed to say. [product]
107
+ - Describe a time you pushed back on a deadline or scope set by leadership. [senior]
108
+ - Tell me about a technical disagreement between two senior people that you helped settle. [staff]
109
+ - Tell me about a time you had to explain to your team a decision you disagreed with. [manager]
110
+ - Describe a time a stakeholder wanted something you believed would hurt users or the business. [senior] [product]
76
111
 
77
112
  ## Failure
78
113
 
@@ -82,6 +117,10 @@ from their own work; the practice page can filter to these.
82
117
  - Describe a project that did not deliver what was hoped. What did you learn?
83
118
  - Tell me about a decision you made that the results later showed was wrong. [product]
84
119
  - Describe a time you shipped too early or too late. What would you change? [product]
120
+ - Tell me about a design or architecture decision of yours that did not hold up. What did it cost? [senior]
121
+ - Describe a project you led that was cancelled or failed. How did you wind it down? [staff]
122
+ - Tell me about a hiring or people decision you got wrong. What did you do once you saw it? [manager]
123
+ - Describe a strategy or roadmap bet of yours that missed. What did you change afterwards? [staff] [product]
85
124
 
86
125
  ## Influence
87
126
 
@@ -91,3 +130,8 @@ from their own work; the practice page can filter to these.
91
130
  - Describe a time you tried to persuade people and did not succeed. What did you take from it?
92
131
  - Describe a time you got several teams to agree on priorities. [product]
93
132
  - Tell me about a time you used data to change someone's mind. [product]
133
+ - Describe a time you made the case for a large investment, such as a rewrite, a migration or a new platform. [staff]
134
+ - Tell me about a time you influenced the roadmap of a team you had no part in. [staff]
135
+ - Describe how you set a technical vision that people outside your organisation adopted. [principal]
136
+ - Tell me about a time you represented your team's needs to senior leadership and changed an outcome. [manager]
137
+ - Describe a time you won support from executives for a product direction. [senior] [product]