factory-line
Skill133 starsChanged 3 months agoApache-2.0View on GitHub
Factory line for executing one station of a declared multi-station program — read the installed line bundle (har line status), plan parallel work into isolated HAR slots, run the cumulative gate with har line gate, and hand off for human review. Use when asked to "run a factory line", "run the next station", "execute a milestone program", or when a repo has an installed line and you need to advance it. Not limited to the HAR v1.0.0 migration.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- control/AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- .cursor/rules/har-workflow.mdcCursor rule
- new-pluginSkill
- v1-milestoneSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 46
If the user says "run the next v1 milestone", load examples/v1-milestone.line.json and prefer the existing v1-milestone playbook for …
- Very specific: line 123
Run both: full verify for the harness contract, har line gate for the station.
- Very specific: line 137
Update the traveler the template names (issue comment, ledger file, PR body).
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Factory line
Execute one station of a declared program end-to-end:
sync → wave plan → parallel slots → cumulative gate → human handoff.
The program lives in an installed line bundle, not in this skill. Find it
with har line status: installed lines live at .har/lines/<id>/line.json and
are recorded in .har/lines.json. This skill is the orchestrator;
station-specific how-to lives in other skills the program lists.
*.line.json files under examples/ are authoring templates, not the
installed program. Read one to learn the shape or to seed a new bundle
(har line create <id>); do not run a station off a loose file when a line is
installed.
HAR already has the primitives. Work units, isolated slots, stages with quick/full tiers, validation records, the commit gate, plugins, Mission Control. A line is composition plus a manifest. Do not invent a second runner, a stack-specific MCP tool, or GitHub-shaped stations.
Contract: LINE.schema.md. Instances: examples/.
Inputs
Resolve these before doing anything (ask only if not inferable):
- Line — run
har line status(or MCPhar_line_status). One installed line: use it. Several: ask which. None installed: stop and offerhar line create <id>(scaffold) orhar line add <spec>(install a published bundle, e.g.github:os-factory/har-line). Authoring templates live inexamples/:v1-milestone.line.json,new-plugin.line.json,docs-milestone.line.json— seeds, not installed programs. - Station id — default: the first station whose bound work is not all
closed / whose gate has not passed. Must be an id in
stations[]. - Slot budget — how many concurrent HAR slots you may occupy (check
har env statusfirst). One slot per concurrent agent. Occupied slots always block — that is a feature.
If the user says "run the next v1 milestone", load examples/v1-milestone.line.json
and prefer the existing v1-milestone playbook for
station tactics (it remains the executable instance until 1.0 ships). This
skill still owns the loop.
What this skill must not bake in
These showed up on the HAR 1.0.0 line. They are instance tactics. If the template does not declare them, do not do them:
- GitHub issues as the unit of a station (use
stations[].work) - Stacked PRs / a long-lived integration branch
- A named fixture repo (car-app) or
HAR_FIXTURE_MILESTONE=M0..M5 - "One issue = one PR = one slot"
- Assuming the product of the line is a HAR migration
Phase 0 — Load and preflight
har line status [id]and read the program it names (.har/lines/<id>/line.json). ConfirmcontractVersion,gate.cumulative === true,handoff.autonomousShip === false. The status output already reports which stations are green and which is next.- Skills. For each root
skills[]entry, confirm the skill is present (repo path or the agent's skill list). HAR does not install third-party packs — ifinstallis an upstream URL, tell the user how to install it. Missing optional skills: skip those station steps and say so. - MCP. For each
mcp[]entry withrequired: true, confirm the server is available. If a required server is missing, stop. Ifrequired: false, skip tracker-dependent steps (issue comments, PRs) and keep the rest. - Plugins / extra stages. Note what the gate needs. Do not
add-pluginunless the user asked and the template lists it. - Pick the station. Print: line id, station id, waves, slot plan, gate stages
that will run (every
gate.stages[]whosefromStationis this station or an earlier one).
Phase 1 — Wave plan
Print the wave plan from stations[].waves (or a single cell if waves is
omitted). For each group: work id, suggested branch, HAR slot, stack notes
only if the template's prototypeNotes say this line stacks PRs.
Adjust for work already done. Never share a slot between two concurrent groups.
Phase 2 — Execute waves
For each wave, spawn one subagent per group, in parallel. Each subagent:
- Checks the slot is free (
har env status). Occupied → complete/teardown that slot first, or pick a free slot in budget. Never share. - Launches from the intended base:
har env launch <slot> --work-id <workId> --work-source <work.source> --work-url <url> --work-title <title>when work is bound. Skip tracker flags whenwork.sourceisnone. - Edits only in the returned work dir.
- Follows station skills listed on the station / line.
- Runs full verify in-slot until green. If this station made a new gate question askable, extend the cumulative gate (add a stage / assert tagged from this station). Never remove an earlier station's stages.
- Reports back: branch, commits, verify result, deviations. Subagents never push, PR, complete, or teardown on their own.
The orchestrator reviews, resolves cross-branch conflicts, and only then starts the next wave.
Phase 3 — Gate
From a slot launched off the integrated result of this station:
har line gate <station> --line <id> --agent <slot>That runs every gate stage whose fromStation ≤ current station — the
cumulative set, from data, through the normal stage runner. Pass --force
when the program sets gate.optInEnv and you want the opt-in jig to run
anyway.
Line gate stages are deliberately not part of har env verify --full.
Run both: full verify for the harness contract, har line gate for the
station.
Red gate → fix in-station, re-run. Never hand off a red gate. Never bypass
(HAR_SKIP_GATE, --no-verify).
The prototype of a real-product gate (not mocks) is this repo's
.har/stages/fixture-e2e.sh: freshly built CLI, clone of a real repo, two
modes (adapted harness + fresh env init), opt-in so routine verifies stay
fast. Copy the properties when a line needs a jig; do not copy car-app
paths or the milestone_asserts case.
Phase 4 — Traveler and handoff
Update the traveler the template names (issue comment, ledger file, PR
body). The traveler has to survive this repo's merge policy — squash-merge
drops per-commit BREAKING CHANGE: footers.
Then stop and wait. Do not merge, push to the default branch, complete a slot, or release. Present a session handoff (summary, session branch, preview URLs, gate evidence).
Growing the ratchet
A gate only tests the questions you thought to ask. After six green
milestones, HAR 1.0 still missed #291 (shim × stale CLI fork bomb),
#297/#299 (scripts migrated, prose and attach.sh did not), and #298 (CI
tested the published pre-1.0 package). When a review finds a new class of
defect, add a stage or doctor question and tag it onto the line — that is
how the ratchet earns the next station.
See LINE.schema.md "Growing the ratchet."
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

