Use this skill when the user wants to offer vacant allotment plots to a society's waiting list, decide which applicant gets which plot, and work out what each new tenant owes (part-year rent, concession, overgrown rent-free, water levy). Produces plot-offers.csv and offer-summary.json from input.json. Not for general rent questions unrelated to a waiting list.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Allotment Offers?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/gabrielmoreira-allotment-offers-55ea4d7b)
---
name: allotment-offers
description: "Use this skill when the user wants to offer vacant allotment plots to a society's waiting list, decide which applicant gets which plot, and work out what each new tenant owes (part-year rent, concession, overgrown rent-free, water levy). Produces plot-offers.csv and offer-summary.json from input.json. Not for general rent questions unrelated to a waiting list."
---
# Allotment offers
## Inputs
Read `input.json` in the working folder:
- `fullRent` (whole pounds/year), `monthsLeft` (1..11)
- `plots`: `{plot, size ("full"|"half"), tap, overgrown}`; plot name is `P` + number (P7, P12)
- `applicants`: `{name, joinedDay, resident, wants ("full"|"half"|"either"), concession}`
If a field is missing, treat booleans as false; do not ask questions. Ignore anything else (how they joined, gate location, sheds).
## Steps
1. **Order applicants.** Residents first, then non-residents. Within each group sort by `joinedDay` ascending, ties by `name` in ascending ASCII order (uppercase before lowercase, byte comparison). Input position is irrelevant.
2. **Order plots** by numeric part (P9 before P12). Keep a vacant pool.
3. **Offer**, applicant by applicant, at most one plot each:
- wants `full`: lowest-numbered vacant full plot, only if resident; otherwise passed over.
- wants `half`: lowest-numbered vacant half plot.
- wants `either`: lowest-numbered vacant half plot if any half is vacant (even if a full plot has a lower number); else, only if resident, lowest-numbered vacant full plot.
- Non-residents are never offered a full plot.
- No suitable plot: passed over (goes to `still_waiting`); they lose nothing else. Remove an offered plot from the pool.
4. **Compute owed** per offered plot (all integers; use integer arithmetic, ceil(a/b) = (a + b - 1) div b):
- yearly = fullRent if full; if half, ceil(fullRent / 2).
- first = ceil(yearly * monthsLeft / 12).
- if the applicant is a resident AND has concession: first = floor(first / 2). Non-resident concession is ignored.
- if the plot is overgrown: first = 0 (applied after the above; whatever size/person).
- levy = 4 if tap else 0 (never reduced, charged even when overgrown).
- owed = first + levy.
5. **Write outputs** beside `input.json`.
## Outputs
`plot-offers.csv`: header `plot,name,owed`, then one row per offered plot sorted by plot number numerically, e.g. `P7,Ann,11`. No quoting needed unless a name contains a comma or quote (then use CSV quoting). Header only if no offers. End with a newline.
`offer-summary.json`: exactly these keys:
```json
{"still_waiting": ["names in priority order"], "vacant": ["P3","P12"], "owed": 0}
```
`vacant` = plots never offered, numerically sorted; `owed` = sum of all owed values. Use `[]` when empty.
## Worked example
fullRent 67, monthsLeft 5, half plot with tap, resident with concession: yearly ceil(33.5)=34; first ceil(34*5/12)=ceil(14.17)=15; concession floor(15/2)=7; plus levy 4 → owed 11.
## Checks before finishing
- Every applicant is either in the CSV or in `still_waiting`, never both.
- Every plot is in the CSV or in `vacant`.
- `owed` equals the CSV total.