/claude-harness:lot-startfrom claude-harness
Starts a lot: updates the repository's plugin, resolves the repository, re-reads the project references, synchronises the lots file status table with develop, computes the candidate lot, asks every ambiguity in one batch and creates the lot branch, then waits for the user to type `lot-start confirm N`; closes the development by amending the project memory docs/memory.md. Use before any lot development, when the user says "develop the next lot" or names a lot, after the user confirms with `lot-start confirm N`, and once the lot's code is complete or on `lot-start close N`.
Ships in claude-harness. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
[lot-start] → development → [close] → lot-test → lot-review → lot-audit → lot-ship
Two hooks back this skill:
lot-lock-guard.py denies every Edit/Write on a feat/lot-* branch until
.claude/current-lot names that branch.lot-confirm.sh writes that lock only when the user submits
lot-start confirm N (or /claude-harness:lot-start confirm N) as the whole
prompt, on a feat/lot-N-* branch. You never write the lock; the guard denies
it.Part A runs when a lot is to be started, Part B once the user has
confirmed (lot-start confirm N in the prompt, or this skill invoked with
confirm N). Its Step B3 closes the development (lot-start close N, or on
your own once the code is complete).
The session runs the installed copy of the plugin: update the repository's own installation before reading anything (ASK-2 pre-authorises the command).
LOT_REPO=$(git rev-parse --show-toplevel)
jq -e --arg p "$LOT_REPO" 'any(.plugins["claude-harness@claude-harness"][]?; .scope == "project" and .projectPath == $p)' "${CLAUDE_CONFIG_DIR:-$HOME/.claude}/plugins/installed_plugins.json"
claude plugin update claude-harness@claude-harness --scope project --json
Run the update only when jq prints true, that is when the repository has a
project-scope installation of its own: elsewhere the CLI updates the
installation of another project instead of failing, even in a repository
whose .claude/settings.json enables the plugin. Run it from $LOT_REPO (the
session opens there; cd to it first otherwise), verbatim and alone: no
subshell, no &&, so that it matches the autopilot's allowlist entry. Read the
JSON line:
| Result | What you do |
|---|---|
updateOutcome up_to_date | Go on with Step A1 |
oldVersion ≠ newVersion | Stop: this session still runs the old copy. Tell the user the plugin went from oldVersion to newVersion, to reopen the session and run lot-start again; under the autopilot, end blocked, the reason saying to rerun the autopilot |
| The command fails | Report its message and go on: the SessionStart freshness warning stays the guard (PLUG-1) |
LOT_REPO=$(git rev-parse --show-toplevel)
git -C "$LOT_REPO" branch --show-current
$LOT_REPO/CLAUDE.md must carry a ## Gate parameters section. If it does not,
or the user named a lot of another repository, stop and tell the user to
reopen the session there. Every command below is scoped with -C "$LOT_REPO".
CLAUDE.md: the Gate parameters, Skills and Project documents sections.docs/memory.md, the project memory (MEM-1), once, if it exists: working
notes, not the truth. Check a note against the code before it guides a
write.Lots file: the status table, then only the candidate lot's section once
Step A4 names it.CLAUDE.md (.claude/skills/<name>/SKILL.md),
if any.CONVENTIONS.md is read only by an agent that does not load it (START-1).
git -C "$LOT_REPO" fetch --quiet origin
rtk proxy git -C "$LOT_REPO" log --first-parent --oneline -15 origin/develop
python3 <this skill's base directory>/sync-status.py "$LOT_REPO"
Agents that load no plugin run the script from the harness clone:
~/ENV/projets/claude-harness/plugins/claude-harness/skills/lot-start/sync-status.py.
The script maps every merge on develop to its lot by branch name, or, for a
rebase or squash merge, by its audit commit docs(N): add the lot audit report,
and prints JSON. A row that lists its sub-lots (3.1 ✅, 3.3 🔄) has each landed
sub-lot marked, and turns ✅ once the last one landed.
| Field | Meaning |
|---|---|
updates | Lots merged on develop whose row is not ✅ yet |
sub_updates | Sub-lots listed in a 🔄 row whose audit commit is on develop |
stops | What you must ask, never decide |
in_progress | Rows marked 🔄 |
candidate | First ⬜ row in file order, ⏸️ and ❄️ skipped, after the updates |
changed | Whether --apply modified the lots file |
A merge is mapped automatically only when it designates exactly one lot. Every
other case is in stops, and the script exits 3:
kind | Situation | What you do |
|---|---|---|
ambiguous | Sub-lots on one flat feat/lot-2-* branch, or a branch shared by several open rows | Ask which lots the merge completes |
unlisted-subticket | A row is about to close while the lots file names a sub-lot (Ticket LOT-5.3) the row does not list | Ask which sub-lots are done, then list them in the row (5.1 ✅, 5.3 🔄) |
done-without-merge | A row is ✅ but develop has neither its merge nor a commit scoped to it | Ask whether the status is wrong or the lot shipped another way |
merge-without-lot | A lot-shaped branch was merged but no row maps to it | Ask which row it belongs to |
scope-already-merged | The candidate is ⬜ but develop already carries commits scoped to it | Ask whether it is done, partly done, or mislabelled |
Any stop ends the turn with the questions, in one batch laid out as in
Step A5 (LOT-2): no branch,
no lot picked, no table edit to make the stop go away. Once the user has
answered, record the answer in the lots file (the rows the merge completed, and a
note citing the merge or commit SHA in backticks, e.g. merge abc1234) and commit
it with the sync in Part B. A cited SHA no longer raises a stop.
Exit 2: the repository is not harnessed, or has no status table, or no develop. Report it and stop.
Do not run --apply in Part A: the working tree stays clean until the user
confirms.
candidate.candidate (LOT-1).in_progress not empty → a lot is still open: say so, and start a new one only
if the user says to (LOT-6).candidate is null → nothing is left to do; report and stop.Read the candidate's section of the Lots file, and nothing else of it. Its
range comes from lotfile.py section "$LOT_REPO" N (the hooks directory of
the plugin, ../../hooks/lotfile.py from this skill's base directory); then a
single Read of that range, offsets included.
Restate the lot's acceptance criteria, then ask every ambiguous point in one batch, the lot's own "points to settle" included, or write « no ambiguity » (LOT-4).
Ask the questions in French, whatever the language of the lots file or of the
session. Lay the batch out for a terminal: each question numbered (1., 2., …) on
its own line, a blank line between two questions, and each option of a
question on its own indented line (a), b), …), the recommended one first.
Never two questions in one paragraph. The stops of Step A3 and the question of
Step B2 take the same layout.
git -C "$LOT_REPO" switch --no-track -c feat/lot-N-<slug> origin/develop
--no-track is required: a branch tracking develop sends a bare git push
to develop, and a bare gh pr view to the pull request whose head is
develop. lot-ship sets the upstream with its first git push -u.
N is the lot ID without sub-version: lot 2.1 works on feat/lot-2-<slug>.
Use the branch name of the lots file's Branche column when it gives one.
End the turn with exactly, in the user's language:
Lot candidat : N — confirmer avec
lot-start confirm N
Then stop.
The hook has written .claude/current-lot and said so in the context. If it
blocked the prompt instead (wrong branch checked out), repeat Step A6 and stop.
python3 <this skill's base directory>/sync-status.py "$LOT_REPO" --apply --start N
git -C "$LOT_REPO" status --short
Exit 3 → develop changed since Part A: go back to Step A3.
changed: true → commit the lots file alone, as the first commit of the lot
branch:
git -C "$LOT_REPO" add <Lots file>
git -C "$LOT_REPO" commit -m "docs: sync lots file status"
changed: false → no commit; never an empty one.
Report in three lines: lot confirmed, what the sync changed (or « table already
up to date »), the first development step. Then start that step in the same
turn. Development follows LOT-5, GATE-1 to GATE-3 and CODE-6 (the smallest
complete change, the ponytail skill), and ends with Step B3.
A criterion the lot says to verify by hand is run once, in this session: the
command and its result go into the body of the feat(N) commit, or the reason
it could not be run. lot-ship reuses that result in the pull request; it
never runs the manual verification again.
The one exception is a question the confirmation did not settle: ask it, and stop.
Run it on your own as soon as the lot's code and its tests (GATE-3) are complete
and the Validation command is green on the tree (GATE-1): one green run
covers the code, the bump and the memory commits cut from that tree.
lot-start close N (the prompt, or this skill invoked with close N) is its
explicit entry point. This session is the only one that still holds the lot's
reasoning: lot-test opens in a new session, under any profile, and starts
from the memory and the lots file.
docs/memory.md missing → create it from the harness template, header kept
verbatim, and add it to the ## Project documents census of CLAUDE.md,
copied to AGENTS.md (DOC-1):
git -C ~/ENV/projets/claude-harness fetch -q origin main
mkdir -p "$LOT_REPO/docs"
git -C ~/ENV/projets/claude-harness show origin/main:templates/project/docs/memory.md > "$LOT_REPO/docs/memory.md"
Amend it with what the next session would otherwise pay to rediscover:
| Section | What goes in |
|---|---|
## Code map | Files and modules the lot created or moved: role, entry point |
## Decisions | Fact, reason, origin lot: a decision without its reason is not kept |
## Pitfalls | What cost this session time, and how to avoid it |
## Open questions | What the lot left unsettled |
Rewrite or delete the notes the lot made wrong or obsolete; never append a
lot journal. The header stays as is, and the close leaves the file within
5000 characters (wc -m), removing notes before adding any: the
6000-character cap of MEM-1 keeps the margin for the lot-review fixes.
The file changed → commit it alone, with its census entry when it is new.
The tree is the one the gate left green; a memory-only change does not
rerun the Validation command (GATE-2):
git -C "$LOT_REPO" add docs/memory.md # plus CLAUDE.md AGENTS.md when new
git -C "$LOT_REPO" commit -m "docs(N): update the project memory"
Unchanged → no commit; never an empty one.
Stop. Report the lot's last commit and tell the user to open a new
session for lot-test (LOT-7).
.claude/current-lot.sync-status.py: ask.rtk proxy git log.$LOT_REPO.Bash; using Bash to get
around the lock violates this skill.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub selimlbouraya/claude-harness --plugin claude-harness12 skills in this plugin
/bootstrap-projectGenerates a harnessed repository from templates/project: documents, gate parameters, plugin declaration, CI caller and dependabot, then verifies the result against harness-invariants. Use when starting a new project, or when bringing an existing repository under the harness for the first time./dep-updateChecks and updates a project's dependencies, applying patch and minor bumps and proposing majors, then validating the build before commit. Use when the user asks for a dependency update, wants to know what is outdated, or before writing a lot PR./harness-syncDetects and fixes drift between a repository's harness documentation and the reality of its code, settings and lots. Use after editing CLAUDE.md or a skill, when the stack, conventions or lot scope evolved, after a lot, or when the user asks to refresh, check or improve the harness./i-have-adhdShape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time estimates, make wins visible. Invoke with /i-have-adhd; stays on until "stop adhd mode"./integration-checkRuns the smoke test of a frontend against its real backend, by hand or through the repo's Integration command, and writes docs/audits/lot-0-integration.md, which every frontend PR requires. Use before the first frontend PR, when the API contract changed, or when the user mentions integration, the real backend, end-to-end or the contract./lot-auditAudits a lot branch for security, performance and architecture before the PR is opened, fixes its findings, and writes the consolidated report docs/audits/lot-N.md. Use after lot-review, at the end of a lot, or when the user asks for an audit, a security review or an architecture review of lot work.