fix(conductor): self-heal missing harness config via lh init --yes
conductor previously jumped straight to lh host, which succeeds even without .agents/harness.config.json, then silently hit a hard failure later reading .agents/memory/INDEX.md (lh doctor confirms: config not initialised). New projects had no automatic recovery path — lh init was documented as a manual step users had to remember. - conductor now runs lh doctor first; if config is missing it runs lh init --yes (non-interactive defaults) and re-checks, before lh host - still stops and reports the exact failing check if lh doctor finds something it can't self-heal (e.g. no verify commands configured) - README/QUICKSTART updated: lh init/lh doctor documented as optional manual pre-flight, not a required step, since conductor self-heals Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+12
-9
@@ -172,17 +172,20 @@ subcommand, who calls it, and when.
|
||||
| `lh lane create/status/merge` | `conductor`, `builder`, `integrator` | Automatically, before a write lane starts and when it merges |
|
||||
| `lh memory get/put/scan` | `interrogator`, `architect`, `builder`, `scribe` | Automatically, to pull relevant shards before work and record facts/failures after |
|
||||
| `lh graph` | `verifier` (always), plus `architect`/`splitter`/`conductor`/`reviewer`/`scout`/`integrator` at their own checkpoints | Automatically — it's exit criterion #3, never skipped |
|
||||
| `lh init` | You (or `scripts/onboard.mjs` on your behalf) | Once per repo, at setup, or to repair a missing `.agents/` baseline |
|
||||
| `lh doctor` | You | Whenever you want to check the environment yourself — before starting, after upgrading Node/git/the plugin, or to diagnose a stuck run. Also run once automatically right after `lh init` |
|
||||
| `lh doctor` | `conductor` (first thing, before `lh host`), also you whenever you want to check the environment yourself | Automatically at the start of every pipeline run — `conductor`'s step 1 |
|
||||
| `lh init --yes` | `conductor`, automatically, only if `lh doctor` reports `config not initialised` | Self-heals a missing `.agents/` baseline with non-interactive defaults, then re-runs `lh doctor` |
|
||||
| `lh report <run-id>` | You | After a run, when you want a human-readable markdown summary instead of raw NDJSON. No agent generates this for you |
|
||||
|
||||
So the only commands you are expected to type by hand in everyday use are `lh init` (setup),
|
||||
`lh doctor` (diagnostics), and `lh report` (reading a past run's summary). Everything else —
|
||||
`lh index`, `lh host`, `lh run`, `lh lane`, `lh memory`, `lh graph` — is invoked by the agents
|
||||
as a scripted, mandatory step in their own instructions. You'd only run one of those manually
|
||||
if you're debugging outside the agent flow (e.g. `lh graph` on its own to check structure
|
||||
before opening Copilot at all, or `lh memory get --shard failures` to read what the harness has
|
||||
learned).
|
||||
So in everyday use you don't have to type `lh init` or `lh doctor` by hand at all —
|
||||
`conductor` runs `lh doctor` first, and if that reports the repo isn't initialised, it runs
|
||||
`lh init --yes` for you (defaults, no prompts) and re-checks before doing anything else. It
|
||||
still stops and reports the exact failing check if `lh doctor` finds something it can't
|
||||
self-heal (for example no verify commands configured yet in a brand-new, empty repo).
|
||||
`lh init`/`lh doctor` remain available for you to run by hand too — useful before starting
|
||||
(to pre-flight a repo), after upgrading Node/git/the plugin, or to diagnose a stuck run outside
|
||||
the agent flow. The only command with no agent equivalent at all is `lh report` (reading a past
|
||||
run's summary). Everything else — `lh index`, `lh host`, `lh run`, `lh lane`, `lh memory`,
|
||||
`lh graph` — is invoked by the agents as a scripted, mandatory step in their own instructions.
|
||||
|
||||
## 5. Know when it's actually done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user