@osfactory/har 1.1.0 → 1.2.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.
package/dist/index.js CHANGED
@@ -71274,7 +71274,7 @@ async function handleAgentSkills(options) {
71274
71274
  const shouldPrompt = !options.autoYes && !(mode === "maintain" && alreadyScaffolded);
71275
71275
  if (shouldPrompt) {
71276
71276
  const accepted = await askYesNo(
71277
- `Scaffold agent skills (/setup-har, /har-wt, /har-maintain) for: ${targets.join(", ")}? [Y/n]`
71277
+ `Scaffold agent skills (/setup-har, /har-wt, /har-maintain, /factory-line) for: ${targets.join(", ")}? [Y/n]`
71278
71278
  );
71279
71279
  if (!accepted) {
71280
71280
  info("Skipped agent skills");
@@ -71319,7 +71319,7 @@ function resolveTargets(argv, repoPath) {
71319
71319
  }
71320
71320
  var agentsCommand = {
71321
71321
  command: "agents <subcommand>",
71322
- describe: "Manage scaffolded agent skills (/setup-har, /har-wt, /har-maintain)",
71322
+ describe: "Manage scaffolded agent skills (/setup-har, /har-wt, /har-maintain, /factory-line)",
71323
71323
  builder: (yargs) => yargs.command(
71324
71324
  "install",
71325
71325
  "Scaffold agent skills into this repo (Claude/Cursor) and globally (Codex)",
@@ -0,0 +1,96 @@
1
+ # Run a factory line
2
+
3
+ Execute **one station** of a declared multi-station program:
4
+
5
+ sync → wave plan → parallel HAR slots → cumulative gate → human handoff.
6
+
7
+ The program lives in a **line template** (a `*.line.json` the user points at,
8
+ or `.har/line.json` when that file exists). This workflow is the orchestrator.
9
+ Station-specific how-to lives in other skills the template lists.
10
+
11
+ HAR already has the primitives — work units, isolated slots, stages, plugins,
12
+ validation records. A line is composition plus a manifest. Do not invent a
13
+ second runner, a stack-specific MCP tool, or GitHub-shaped stations.
14
+
15
+ This workflow is the same on Claude Code (`/factory-line`), Cursor
16
+ (`.cursor/commands/factory-line`), and Codex (`har-factory-line`).
17
+
18
+ ## Inputs
19
+
20
+ Resolve these before doing anything (ask only if not inferable):
21
+
22
+ 1. **Line file** — path to a `*.line.json`. If the repo has no line file and
23
+ the user did not name one, stop and say so. Do not invent GitHub issue
24
+ numbers or a fixture repo.
25
+ 2. **Station id** — default: the first station whose bound work is not all
26
+ done / whose gate has not passed.
27
+ 3. **Slot budget** — `har env status` first. One slot per concurrent agent.
28
+ Occupied slots always block.
29
+
30
+ ## Contract (minimum)
31
+
32
+ A line file is JSON with `contractVersion: 1`. Required:
33
+
34
+ - `id`, `stations[]` (ordered; each has `id` + `title`)
35
+ - `gate.cumulative` must be `true`
36
+ - `handoff.autonomousShip` must be `false`
37
+
38
+ Optional: `skills[]` and `mcp[]` (declarations + install hints — HAR does not
39
+ vendor third-party skill packs or add core MCP tools), `plugins[]`,
40
+ `gate.stages[]` with `fromStation` (that stage stays required from this
41
+ station **on**), `extraStages[]`, `traveler`, `stations[].work` / `waves`.
42
+
43
+ `work.source` is `github`, `linear`, `none`, or a free string — the tracker
44
+ is data on the station, not the type of the station. If `waves` is omitted,
45
+ the station is one sequential cell.
46
+
47
+ A QA station is never removed. Adding a station must not drop earlier
48
+ `gate.stages`. When a review finds a new class of defect, add a stage or
49
+ doctor question and tag `fromStation` — that is how the ratchet grows.
50
+
51
+ ## What this workflow must not bake in
52
+
53
+ Stacked PRs, a long-lived integration branch, a named fixture repo, `M0..M5`,
54
+ and "one issue = one PR = one slot" are **instance tactics**. If the template
55
+ does not declare them, do not do them.
56
+
57
+ ## 0. Load and preflight
58
+
59
+ 1. Read the line file. Confirm `gate.cumulative` and `handoff.autonomousShip`.
60
+ 2. Skills and MCP: confirm required ones are present. Missing optional:
61
+ skip those steps and say so. Do not install third-party packs yourself.
62
+ 3. Print: line id, station id, waves, slot plan, and every gate stage whose
63
+ `fromStation` is this station or an earlier one.
64
+
65
+ ## 1. Wave plan
66
+
67
+ Print `stations[].waves` (or a single cell). One HAR slot per group in a
68
+ wave. Never share a slot between two concurrent groups.
69
+
70
+ ## 2. Execute waves
71
+
72
+ For each wave, one subagent per group, in parallel. Each:
73
+
74
+ 1. Checks the slot is free. Occupied → complete/teardown that slot, or pick
75
+ a free slot in budget.
76
+ 2. `har env launch <slot>` with `--work-id` / `--work-source` / `--work-url`
77
+ / `--work-title` when work is bound. Skip tracker flags when source is
78
+ `none`.
79
+ 3. Edits **only** in the returned work dir.
80
+ 4. Full verify in-slot until green. If this station made a new gate question
81
+ askable, add it — never remove an earlier station's stages.
82
+ 5. Reports back. Subagents never push, PR, complete, or teardown on their own.
83
+
84
+ ## 3. Gate
85
+
86
+ Run every gate stage whose `fromStation` ≤ current station. If
87
+ `gate.optInEnv` is set, export it as `1` so the opt-in jig actually runs.
88
+
89
+ Red gate → fix, re-run. Never hand off a red gate. Never bypass
90
+ (`HAR_SKIP_GATE`, `--no-verify`).
91
+
92
+ ## 4. Handoff
93
+
94
+ Update the `traveler` the template names. Then **stop and wait**. Do not
95
+ merge, push to the default branch, complete a slot, or release. Present a
96
+ session handoff (summary, session branch, preview URLs, gate evidence).
@@ -43,6 +43,19 @@
43
43
  },
44
44
  "cursor": { "command": true },
45
45
  "codex": { "promptName": "har-maintain" }
46
+ },
47
+ {
48
+ "id": "factory-line",
49
+ "body": "factory-line.md",
50
+ "title": "Run one station of a factory line",
51
+ "claude": {
52
+ "frontmatter": {
53
+ "name": "factory-line",
54
+ "description": "Execute one station of a declared multi-station program (*.line.json): parallel HAR slots, cumulative gate, human handoff. Use when asked to run a factory line, the next station, or a milestone program."
55
+ }
56
+ },
57
+ "cursor": { "command": true },
58
+ "codex": { "promptName": "har-factory-line" }
46
59
  }
47
60
  ]
48
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osfactory/har",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "HAR: open agent harness CLI and MCP server for coding agents, isolated worktrees, and software-factory workflows",
5
5
  "keywords": [
6
6
  "har",