Просмотр исходного кода

docs(skills): fleetflow — ff-import scripts row + native import story

Add ff-import.sh to the Scripts table and a new "Importing a native Workflow
run" section: what ff-import reads (wf_*/ journal + transcripts) and writes
(prompt.txt, result.json envelope, journal records, manifest packet with
imported_from), the incomplete->respawn-candidate path, and the load-bearing
caveat — native v2: keys are not fleetflow-replayable, "native" is not a
spawnable brain, imported results are terminal facts, and ff-run resume skips
them; continuation means spawning fresh lanes. worker-contracts.md (effort
table, cache redirect, archiving paths) was already covered by ee25366.

Co-Authored-By: Claude <noreply@anthropic.com>
0xDarkMatter 2 недель назад
Родитель
Сommit
291bdd060d
1 измененных файлов с 24 добавлено и 0 удалено
  1. 24 0
      skills/fleetflow/SKILL.md

+ 24 - 0
skills/fleetflow/SKILL.md

@@ -224,6 +224,7 @@ default the script-author follows, not an option — and real runs routinely hit
 | [scripts/ff-status.sh](scripts/ff-status.sh) | run status as JSON (lane state, elapsed, commits, tools, tokens, activity, manifest summary); `--watch N --out status.json` feeds the live monitor |
 | [scripts/ff-status.sh](scripts/ff-status.sh) | run status as JSON (lane state, elapsed, commits, tools, tokens, activity, manifest summary); `--watch N --out status.json` feeds the live monitor |
 | [scripts/ff-run.sh](scripts/ff-run.sh) | `resume --run NAME` replays every manifest packet through ff-spawn in order (unchanged = cached, changed/new = live); `status --run NAME` aliases ff-status |
 | [scripts/ff-run.sh](scripts/ff-run.sh) | `resume --run NAME` replays every manifest packet through ff-spawn in order (unchanged = cached, changed/new = live); `status --run NAME` aliases ff-status |
 | [scripts/ff-clean.sh](scripts/ff-clean.sh) | `--run NAME [--force]` reclaims zero-commit lanes (worktree remove + branch -D), keeps committed lanes, removes the run's cache dirs; reports locked ACL-litter dirs |
 | [scripts/ff-clean.sh](scripts/ff-clean.sh) | `--run NAME [--force]` reclaims zero-commit lanes (worktree remove + branch -D), keeps committed lanes, removes the run's cache dirs; reports locked ACL-litter dirs |
+| [scripts/ff-import.sh](scripts/ff-import.sh) | `--wf DIR --run NAME` imports a native Claude Code Workflow run dir (`wf_*/`) — completed agents become lanes (prompt + result envelope + journal + manifest), started-only agents are flagged incomplete; native keys are terminal, not replayable |
 
 
 **Live monitor** ([assets/ff-monitor.html](assets/ff-monitor.html)): a
 **Live monitor** ([assets/ff-monitor.html](assets/ff-monitor.html)): a
 zero-dependency page reproducing the native /workflows progress surface — run
 zero-dependency page reproducing the native /workflows progress surface — run
@@ -245,6 +246,29 @@ All follow the Skill Resource Protocol: stdout is data, chatter on stderr,
 semantic exit codes (`0` ok, `2` usage, `3` cached/missing, `7` unreachable,
 semantic exit codes (`0` ok, `2` usage, `3` cached/missing, `7` unreachable,
 `10` worker failed, `12` escape detected), `--help` with EXAMPLES.
 `10` worker failed, `12` escape detected), `--help` with EXAMPLES.
 
 
+## Importing a native Workflow run
+
+`ff-import --wf <wf_*/> --run <name>` reads a native Claude Code Workflow run
+directory — its `journal.jsonl` (`started`/`result` records with `v2:` hash
+keys and `agentId`) plus per-agent `agent-<id>.jsonl` transcripts — and lands
+each completed agent as a fleetflow lane: the agent's first user-role message
+(string content or content-array-with-text-blocks, both handled) becomes
+`<id>.prompt.txt`, its native `result` object becomes `<id>.result.json`
+(`{is_error:false, result:<native-result>|tojson}`), and a `native`-brain
+packet is appended to the manifest (`imported_from: <DIR>`) for provenance.
+Agents with a `started` but no `result` get a prompt file only and are
+reported `incomplete` on stdout's TSV — respawn candidates.
+
+**Caveat — imported results are terminal facts, not a replayable cache.** The
+native `v2:` keys are content hashes of the *native* `(prompt, opts)` call, not
+fleetflow's `sha256(brain+prompt+opts)`, and `native` is not a spawnable brain
+— so `ff-run resume` **skips** native packets rather than replaying them (it
+reports each `imported` and exits 0). The native script's control flow
+(pipeline/barrier/loop) is not recovered either. To continue from an imported
+result, spawn a fresh lane with a real brain and paste the imported result into
+its packet (the hub-and-spoke handoff). Use import for salvage, provenance, and
+visual continuity in the monitor — not to resume native work in place.
+
 ## References
 ## References
 
 
 - [references/native-workflow-insights.md](references/native-workflow-insights.md)
 - [references/native-workflow-insights.md](references/native-workflow-insights.md)