@fusebase/harness-lead 0.2.41 → 0.2.42

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.42 — 2026-12-03
4
+
5
+ - `finish --merged` refuses a task that was not handed off. A freshly started branch counted as merged, so an untouched task could be closed and its worktree removed. Delegated tasks are not affected.
6
+ - Resume a parent Story when it holds a required child in development, with the repository's Jira approval rules.
7
+ - Link published Board rows to stable FuseBase task notes, including tasks without Jira.
8
+ - Show stored adoption mappings and observed legacy statuses in the read-only sync preview, and exclude archived note URLs from Jira descriptions.
9
+
3
10
  ## 0.2.41 — 2026-12-02
4
11
 
5
12
  - Publish to npmjs and preserve project-specific registries for other packages.
package/dist/lead.mjs CHANGED
@@ -8209,7 +8209,7 @@ var TEMPLATES = {
8209
8209
  "workspace-crew.md": "---\nname: crew-lead\ndescription: Run the lead workflow. Use only when the user invokes /crew-lead or $crew-lead.\n---\n<!-- evercrew:workspace-entry -->\nFollow the adjacent `../lead/SKILL.md` entry point as if the user invoked lead. Pass through the request and its arguments.\n",
8210
8210
  "workspace-entry.md": "---\nname: lead\ndescription: Run lead for this project or show the workspace overview. Use when the user types /lead or $lead, asks to use lead, or asks for an overview of all workspace projects.\n---\n<!-- evercrew:workspace-entry -->\nFind the nearest `.lead/lead.mjs` from the directory this conversation started in. Preserve that starting directory as `--cwd` on the first call. Run `node <launcher> kit-path`, then read `skills/lead/SKILL.md` from the returned kit directory and follow it. References are relative to that kit directory. Keep the same session ID throughout this conversation. The launcher and kit path are local setup, not product state.\n",
8211
8211
  "workspace-goal.md": "---\nname: lead-goal\ndescription: Record lead activity and keep the heartbeat for an active Cursor goal.\n---\n<!-- evercrew:workspace-entry -->\nRun `node .lead/lead.mjs kit-path` from the lead workspace or target checkout, then read `skills/lead-goal/SKILL.md` from the returned kit directory. Use the same repository scope and session ID as lead.\n",
8212
- "workspace-launcher.mjs": "#!/usr/bin/env node\n// evercrew:workspace-entry\n// Portable entry point. The runtime belongs to the workspace or to the user's npm cache.\nimport { spawnSync } from 'node:child_process';\nimport { existsSync, mkdirSync, realpathSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst args = process.argv.slice(2);\nconst here = dirname(dirname(fileURLToPath(import.meta.url)));\nconst hook = args[0] === 'stop-check' || args[0] === 'session-start';\nconst cwdFlag = args.indexOf('--cwd');\nconst cwd = cwdFlag >= 0 && args[cwdFlag + 1] ? resolve(args[cwdFlag + 1]) : process.cwd();\nconst cli = (kit) => join(kit, 'dist/lead.mjs');\n\nfunction workspaceKit(start) {\n let dir = realpathSync(start);\n while (true) {\n if (existsSync(join(dir, '.lead/workspace.yml'))) {\n const kit = join(dir, '.lead/workspace-kit');\n if (existsSync(cli(kit))) return kit;\n if (hook) return;\n throw new Error(`The lead workspace at ${dir} has no runtime. Deploy its kit first.`);\n }\n if (dirname(dir) === dir) return;\n dir = dirname(dir);\n }\n}\n\nfunction run(bin, argv, diagnosticsOnly = false) {\n const result = spawnSync(bin, argv, { stdio: diagnosticsOnly ? ['inherit', 2, 2] : 'inherit', env: bin === 'npm' ? { ...process.env, 'npm_config_@fusebase:registry': 'https://registry.npmjs.org/' } : process.env });\n if (result.error) throw result.error;\n return result.status ?? 1;\n}\n\nfunction main() {\n const shared = workspaceKit(cwd) ?? workspaceKit(here);\n const installed = join(here, 'node_modules/@fusebase/harness-lead');\n const cache = join(process.env.XDG_CACHE_HOME || join(homedir(), '.cache'), 'harness-lead', 'standalone');\n const cached = join(cache, 'node_modules/@fusebase/harness-lead');\n let kit = shared ?? (existsSync(cli(cached)) ? cached : installed);\n if (!shared && (args[0] === 'update' || !existsSync(cli(kit)))) {\n if (hook) return 0;\n if (args[0] === 'update' && args.length > 1) throw new Error('Standalone launcher update refreshes the user cache. Run the chosen kit directly for an explicit source.');\n mkdirSync(cache, { recursive: true });\n const status = run('npm', ['install', '--prefix', cache, '--no-save', '--no-package-lock', '--ignore-scripts', '--no-audit', '--no-fund',\n args[0] === 'update' ? '@fusebase/harness-lead@latest' : '@fusebase/harness-lead@0.2.41'], true);\n if (status || !existsSync(cli(cached))) return status || 1;\n kit = cached;\n if (args[0] === 'update') return run(process.execPath, [cli(kit), 'version']);\n }\n if (args[0] === 'kit-path') {\n console.log(realpathSync(kit));\n return 0;\n }\n return run(process.execPath, [cli(kit), ...args]);\n}\n\ntry { process.exitCode = main(); }\ncatch (error) {\n if (!hook) console.error(`lead: ${error.message}`);\n process.exitCode = hook ? 0 : 1;\n}\n",
8212
+ "workspace-launcher.mjs": "#!/usr/bin/env node\n// evercrew:workspace-entry\n// Portable entry point. The runtime belongs to the workspace or to the user's npm cache.\nimport { spawnSync } from 'node:child_process';\nimport { existsSync, mkdirSync, realpathSync } from 'node:fs';\nimport { homedir } from 'node:os';\nimport { dirname, join, resolve } from 'node:path';\nimport { fileURLToPath } from 'node:url';\n\nconst args = process.argv.slice(2);\nconst here = dirname(dirname(fileURLToPath(import.meta.url)));\nconst hook = args[0] === 'stop-check' || args[0] === 'session-start';\nconst cwdFlag = args.indexOf('--cwd');\nconst cwd = cwdFlag >= 0 && args[cwdFlag + 1] ? resolve(args[cwdFlag + 1]) : process.cwd();\nconst cli = (kit) => join(kit, 'dist/lead.mjs');\n\nfunction workspaceKit(start) {\n let dir = realpathSync(start);\n while (true) {\n if (existsSync(join(dir, '.lead/workspace.yml'))) {\n const kit = join(dir, '.lead/workspace-kit');\n if (existsSync(cli(kit))) return kit;\n if (hook) return;\n throw new Error(`The lead workspace at ${dir} has no runtime. Deploy its kit first.`);\n }\n if (dirname(dir) === dir) return;\n dir = dirname(dir);\n }\n}\n\nfunction run(bin, argv, diagnosticsOnly = false) {\n const result = spawnSync(bin, argv, { stdio: diagnosticsOnly ? ['inherit', 2, 2] : 'inherit', env: bin === 'npm' ? { ...process.env, 'npm_config_@fusebase:registry': 'https://registry.npmjs.org/' } : process.env });\n if (result.error) throw result.error;\n return result.status ?? 1;\n}\n\nfunction main() {\n const shared = workspaceKit(cwd) ?? workspaceKit(here);\n const installed = join(here, 'node_modules/@fusebase/harness-lead');\n const cache = join(process.env.XDG_CACHE_HOME || join(homedir(), '.cache'), 'harness-lead', 'standalone');\n const cached = join(cache, 'node_modules/@fusebase/harness-lead');\n let kit = shared ?? (existsSync(cli(cached)) ? cached : installed);\n if (!shared && (args[0] === 'update' || !existsSync(cli(kit)))) {\n if (hook) return 0;\n if (args[0] === 'update' && args.length > 1) throw new Error('Standalone launcher update refreshes the user cache. Run the chosen kit directly for an explicit source.');\n mkdirSync(cache, { recursive: true });\n const status = run('npm', ['install', '--prefix', cache, '--no-save', '--no-package-lock', '--ignore-scripts', '--no-audit', '--no-fund',\n args[0] === 'update' ? '@fusebase/harness-lead@latest' : '@fusebase/harness-lead@0.2.42'], true);\n if (status || !existsSync(cli(cached))) return status || 1;\n kit = cached;\n if (args[0] === 'update') return run(process.execPath, [cli(kit), 'version']);\n }\n if (args[0] === 'kit-path') {\n console.log(realpathSync(kit));\n return 0;\n }\n return run(process.execPath, [cli(kit), ...args]);\n}\n\ntry { process.exitCode = main(); }\ncatch (error) {\n if (!hook) console.error(`lead: ${error.message}`);\n process.exitCode = hook ? 0 : 1;\n}\n",
8213
8213
  "backlog-index.md": '# <Project> Backlog\n\n[One Pager](one-pager.md)\n\n## Reviewed backlog\n\n<!-- evercrew:view kind="proposals" -->\n<!-- /evercrew:view -->\n\n## Needs triage\n\n<!-- For each candidate, link the task note and record what needs clarification. -->\n\n## Triage decisions\n\n<!-- Link source evidence and explain why an item was linked, completed, deferred or superseded. -->\n\n## History\n\n<!-- Link the complete source reconciliation, including repeated entries. -->\n',
8214
8214
  "one-pager.md": '---\nmilestones:\n - id: mvp\n title: MVP\n shows: ""\n status: current\n---\n# <Project> \u2014 One Pager\n\n## Status now\n\n<!-- 3\u20134 sentences, written by a human. -->\n\n**What to show.**\n\n**What landed.**\n\n**Evidence.** <!-- Add the date, source revision, checks and open verification. -->\n\n<!-- evercrew:view kind="stats" -->\n<!-- /evercrew:view -->\n\n## Needs attention\n\n<!-- Decisions and immediate checks. Link the evidence and name the owner when known. -->\n\n## Product bet\n\n<!-- One sentence. -->\n\n## Research\n\nConclusions only. The long note is [the research](spec/01-research.md).\n\n<!-- Paste ### Conclusions from spec/01-research.md. Do not paste the rest. -->\n\n## Readiness\n\n<!-- evercrew:view kind="readiness" -->\n<!-- /evercrew:view -->\n\n## Roadmap\n\n<!-- evercrew:view kind="order" -->\n<!-- /evercrew:view -->\n\n## Next 3 steps\n\n<!-- evercrew:view kind="next-steps" -->\n<!-- /evercrew:view -->\n\n## Inbox triage\n\nTick an item when the team agrees to take it into the plan. Review higher priorities first, then use list order within each priority.\n\n<!-- Example: add real rows and remove this comment.\n:::checklist[Take into the plan]\n::check[:badge[Feature request]{tone="info"} :badge[High]{tone="danger"} Task summary \xB7 [Task note](tasks/T-001-example.md)]{done="false"}\n:::\n-->\n\n## Next versions (do not promise on a demo)\n\n## Reference\n\n- [Execution board](board.md)\n- [Backlog and triage decisions](backlog.md)\n<!-- Link history, architecture and QA evidence once available. -->\n',
8215
8215
  "task-note.md": "# <Task summary>\n\n## Links\n\n<!-- Fill the links or document permitted exceptions before publishing. -->\n\n- [Epic](https://example.invalid/epic)\n- [Jira Story](https://example.invalid/story)\n- [Proposal](https://example.invalid/proposal)\n- [Mockup](https://example.invalid/mockup)\n- [One Pager](https://example.invalid/one-pager)\n\n## Goal\n\n<!-- Describe the user need and intended outcome. -->\n\n## User flow\n\n<!-- Add a Mermaid diagram covering the requested path. -->\n\n## Technical design\n\n<!-- Describe changes, interfaces, and relevant constraints. -->\n\n## Decisions\n\n<!-- Record agreed decisions and tradeoffs. -->\n\n## Acceptance criteria\n\n<!-- State observable checks and expected results. -->\n\n## Out of scope\n\n<!-- Name exclusions or say whether there are none. -->\n"
@@ -8287,7 +8287,7 @@ function ensureCodexHooks(root) {
8287
8287
  }
8288
8288
 
8289
8289
  // src/install.ts
8290
- var VERSION = true ? "0.2.41" : "dev";
8290
+ var VERSION = true ? "0.2.42" : "dev";
8291
8291
  var LOCK_PATH = ".lead/kit.lock";
8292
8292
  var SKILLS = ["lead", "crew-lead", "lead-goal"];
8293
8293
  var SKILL_DIRS = [".agents/skills", ".claude/skills"];
@@ -8581,13 +8581,14 @@ function currentWave(tasks) {
8581
8581
  return waves.length ? Math.min(...waves) : void 0;
8582
8582
  }
8583
8583
  var byOrder = (a, b) => (a.wave ?? 1e9) - (b.wave ?? 1e9) || a.id.localeCompare(b.id);
8584
+ var taskLink = (task) => `[${task.id}](${task.file.split("/").slice(-2).join("/")})`;
8584
8585
  function renderBoard({ projectName: projectName2, tasks, onePager, config }) {
8585
8586
  const byId = new Map(tasks.map((t) => [t.id, t]));
8586
8587
  const ms = currentMilestone(onePager?.milestones ?? [], tasks);
8587
8588
  const scope = ms ? tasks.filter((t) => t.milestone === ms.id) : tasks;
8588
8589
  const wave = currentWave(scope);
8589
8590
  const wip = tasks.filter((t) => t.status === "in_progress").length;
8590
- const line = (t, extra = "") => `- ${t.id} ${t.title}${t.owner ? ` \xB7 ${t.owner}` : ""}${t.delegate ? ` \u2192 ${t.delegate}${t.delegate_ref ? ` ${t.delegate_ref}` : ""}` : ""}${extra}`;
8591
+ const line = (t, extra = "") => `- ${taskLink(t)} ${t.title}${t.owner ? ` \xB7 ${t.owner}` : ""}${t.delegate ? ` \u2192 ${t.delegate}${t.delegate_ref ? ` ${t.delegate_ref}` : ""}` : ""}${extra}`;
8591
8592
  const section2 = (title, items) => [`## ${title}`, "", ...items.length ? items : ["- none"], ""];
8592
8593
  const head = [
8593
8594
  "<!-- Generated by lead. Do not edit: run `lead board`. -->",
@@ -8625,7 +8626,6 @@ function renderOnePagerBlocks(tasks, milestones, isMerged, showRule = "merged")
8625
8626
  const byId = new Map(tasks.map((t) => [t.id, t]));
8626
8627
  const ms = currentMilestone(milestones, tasks);
8627
8628
  const msIndex = ms ? milestones.indexOf(ms) : -1;
8628
- const link = (t) => `[${t.id}](${t.file.split("/").slice(-2).join("/")})`;
8629
8629
  const shown = (t) => t.status === "done" && !!t.branch && isMerged(t.branch) && (showRule === "merged" || !!t.deployed);
8630
8630
  const stats = milestones.map((m) => {
8631
8631
  const scope2 = tasks.filter((t) => t.milestone === m.id);
@@ -8636,8 +8636,8 @@ function renderOnePagerBlocks(tasks, milestones, isMerged, showRule = "merged")
8636
8636
  const basis = crit.length ? `${passed}/${crit.length} criteria` : `${scope2.filter((t) => t.status === "done").length}/${scope2.length} tasks`;
8637
8637
  return `- ${m.title}: ${pct}% (${basis})`;
8638
8638
  });
8639
- const canShow = tasks.filter(shown).sort(byOrder).map((t) => `- ${showText(t)} (${link(t)})`);
8640
- const blocks = ms ? tasks.filter((t) => t.milestone === ms.id && !shown(t)).sort(byOrder).map((t) => `- ${showText(t)} (${link(t)})`) : [];
8639
+ const canShow = tasks.filter(shown).sort(byOrder).map((t) => `- ${showText(t)} (${taskLink(t)})`);
8640
+ const blocks = ms ? tasks.filter((t) => t.milestone === ms.id && !shown(t)).sort(byOrder).map((t) => `- ${showText(t)} (${taskLink(t)})`) : [];
8641
8641
  const after = milestones.slice(msIndex + 1).filter((m) => m.status !== "done").map((m) => {
8642
8642
  const n = tasks.filter((t) => t.milestone === m.id).length;
8643
8643
  return `- ${m.title}: ${m.shows || "not described"}${n ? ` (${n} task${n === 1 ? "" : "s"})` : ""}`;
@@ -9171,6 +9171,9 @@ function finishBlockers(ctx, t) {
9171
9171
  }
9172
9172
  function finishTask(ctx, t, opts) {
9173
9173
  if (opts.merged) {
9174
+ if (!t.delegate && t.status !== "review" && t.status !== "done") {
9175
+ return { ok: false, message: `${t.id} is ${t.status}: hand it off (lead finish) before marking merged` };
9176
+ }
9174
9177
  if (!t.branch || !(opts.isMerged?.(t.branch) ?? false)) return { ok: false, message: `${t.branch ?? t.id} is not merged yet` };
9175
9178
  if (t.qa_required?.length && !runs(ctx.root).some((r) => r.kind === "task" && r.subject.project === ctx.project?.name && r.subject.task === t.id && r.subject.tree === t.checks_run?.commit && JSON.stringify(r.evidence.qa?.checks.map((c) => c.check)) === JSON.stringify(t.qa_required))) {
9176
9179
  return { ok: false, message: "required browser QA needs a successful task handoff (lead finish) before marking merged" };
@@ -9464,6 +9467,38 @@ var NOTE_FILES = {
9464
9467
  };
9465
9468
  var isTaskNote = (key) => key.startsWith("tasks/") || key.startsWith("task-notes/");
9466
9469
  var inArchive = (path) => /(?:^|[/\\])_?archive(?:[/\\]|$)/i.test(path);
9470
+ function activeNote(state, key) {
9471
+ const note = state.fusebase?.notes[key];
9472
+ return note && !inArchive(key) && !inArchive(note.path ?? "") ? note : void 0;
9473
+ }
9474
+ function adoptionMapping(ctx) {
9475
+ if (!ctx.project || ctx.config.planning !== "adopted") return [];
9476
+ const cfg = ctx.config.sync;
9477
+ const state = readSyncState(ctx.project.workDir);
9478
+ const rows = [];
9479
+ if (cfg?.fusebase) {
9480
+ const folder = state.fusebase?.folder;
9481
+ rows.push(folder && !inArchive(folder.title) ? `FuseBase product folder: ${folder.title} (${folder.id})` : "FuseBase product folder: no active mapping");
9482
+ if (!activeNote(state, "one-pager")) rows.push("FuseBase One Pager: no active mapping");
9483
+ for (const key of Object.keys(state.fusebase?.notes ?? {}).sort()) {
9484
+ const note = activeNote(state, key);
9485
+ if (note) rows.push(`FuseBase ${key}: ${note.title} (${note.id}, revision ${note.revision}) \u2014 ${key === "one-pager" || note.observeOnly ? "observe-only" : "managed"}`);
9486
+ }
9487
+ }
9488
+ if (cfg?.jira) {
9489
+ const story = state.jira?.story;
9490
+ rows.push(story ? `Jira Story (${story.key}) \u2014 ${story.observeOnly || !story.managed ? "observe-only" : "managed"}` : "Jira Story: unmapped");
9491
+ const tasks = new Map(ctx.tasks.map((task) => [task.id, task]));
9492
+ for (const [id, issue] of Object.entries(state.jira?.tasks ?? {}).sort(([a], [b]) => a.localeCompare(b))) {
9493
+ const task = tasks.get(id);
9494
+ const milestone = ctx.onePager?.milestones.find((m) => m.id === task?.milestone);
9495
+ const access = issue.observeOnly || !issue.managed ? "observe-only" : "managed";
9496
+ const observed = access === "observe-only" && issue.status ? ` \xB7 source status: ${issue.status}` : "";
9497
+ rows.push(`Jira ${task?.title ?? id} (${issue.key}) \u2014 ${access}${observed} \xB7 ${task ? `milestone: ${milestone?.title ?? task.milestone} \xB7 lead status: ${task.status}` : "no local task"}`);
9498
+ }
9499
+ }
9500
+ return rows;
9501
+ }
9467
9502
  function fileUrl(links, path) {
9468
9503
  if (!links?.repo) return void 0;
9469
9504
  const p = posix.normalize(path).replace(/^\.\//, "");
@@ -9476,8 +9511,8 @@ function mergeRequestUrl(repo, branch) {
9476
9511
  }
9477
9512
  function remoteMarkdown(text, state, site, notes, links) {
9478
9513
  const noteUrl2 = (key) => {
9479
- const id = state.fusebase?.notes[key]?.id;
9480
- return id && notes && !inArchive(key) && !inArchive(state.fusebase?.notes[key]?.path ?? "") ? `https://${notes.host}/space/${notes.workspace}/document/${id}` : void 0;
9514
+ const id = activeNote(state, key)?.id;
9515
+ return id && notes ? `https://${notes.host}/space/${notes.workspace}/document/${id}` : void 0;
9481
9516
  };
9482
9517
  return text.replace(/^---\n[\s\S]*?\n---\n/, "").replace(/<!--[\s\S]*?-->\n?/g, "").replace(/\[(T-\d+)\]\([^)]*\)/g, (_m, id) => {
9483
9518
  const taskNote = noteUrl2(`tasks/${id}`);
@@ -9666,10 +9701,10 @@ function taskSpecs(ctx, state) {
9666
9701
  } catch {
9667
9702
  }
9668
9703
  }
9669
- const onePager = state.fusebase?.notes["one-pager"];
9704
+ const onePager = activeNote(state, "one-pager");
9670
9705
  const defaults = {
9671
9706
  Epic: cfg.jira ? `https://${cfg.jira.site}/browse/${cfg.jira.epic}` : void 0,
9672
- "One Pager": onePager && !inArchive(onePager.path ?? "") ? noteUrl(f, onePager.id) : fileUrl(cfg.links, posix.join(workDir, "one-pager.md"))
9707
+ "One Pager": onePager ? noteUrl(f, onePager.id) : fileUrl(cfg.links, posix.join(workDir, "one-pager.md"))
9673
9708
  };
9674
9709
  const linkLines = SPEC_LINKS.flatMap((label) => {
9675
9710
  const url = links.get(label.toLowerCase()) ?? defaults[label];
@@ -9722,8 +9757,8 @@ function remoteOnePager(ctx, d, state, cfg) {
9722
9757
  site: cfg.jira?.site,
9723
9758
  keys: Object.fromEntries(Object.entries(state.jira?.tasks ?? {}).map(([id, t]) => [id, t.key]))
9724
9759
  }, Object.fromEntries(ctx.tasks.flatMap((task) => {
9725
- const note = state.fusebase?.notes[`tasks/${task.id}`];
9726
- return note && !inArchive(note.path ?? "") && cfg.fusebase ? [[task.id, { url: noteUrl(cfg.fusebase, note.id), evidenceVideo: note.evidenceVideo }]] : [];
9760
+ const note = activeNote(state, `tasks/${task.id}`);
9761
+ return note && cfg.fusebase ? [[task.id, { url: noteUrl(cfg.fusebase, note.id), evidenceVideo: note.evidenceVideo }]] : [];
9727
9762
  })));
9728
9763
  let text = replaceBlocks(d.text, (k) => blocks[k]);
9729
9764
  if (!text.includes("```mermaid") && blocks.gantt) {
@@ -9812,9 +9847,12 @@ ${ev.map(([p, url]) => `- [${basename(p)}](${url})`).join("\n")}` : "",
9812
9847
  ].filter(Boolean).join("\n\n");
9813
9848
  }
9814
9849
  function storyDescription(ctx, state, cfg) {
9815
- const status2 = ctx.onePager ? section(ctx.onePager.text, "Status") : "";
9850
+ const status2 = ctx.onePager ? section(ctx.onePager.text, "Status now") || section(ctx.onePager.text, "Status") : "";
9816
9851
  const f = cfg.fusebase;
9817
- const note = (k) => f && state.fusebase?.notes[k] ? noteUrl(f, state.fusebase.notes[k].id) : void 0;
9852
+ const note = (key) => {
9853
+ const mapped = activeNote(state, key);
9854
+ return f && mapped ? noteUrl(f, mapped.id) : void 0;
9855
+ };
9818
9856
  const work = ctx.project.path === "." ? "work" : `${ctx.project.path}/work`;
9819
9857
  const links = [
9820
9858
  note("one-pager") ? `[OnePager](${note("one-pager")})` : "",
@@ -9873,7 +9911,8 @@ function syncPlan(ctx) {
9873
9911
  const actions = [];
9874
9912
  const adopted = ctx.config.planning === "adopted";
9875
9913
  const f = cfg.fusebase;
9876
- const onePagerUrl = f && state.fusebase?.notes["one-pager"] ? noteUrl(f, state.fusebase.notes["one-pager"].id) : void 0;
9914
+ const onePager = activeNote(state, "one-pager");
9915
+ const onePagerUrl = f && onePager ? noteUrl(f, onePager.id) : void 0;
9877
9916
  if (cfg.jira) {
9878
9917
  const j = cfg.jira;
9879
9918
  const story = state.jira?.story;
@@ -11038,6 +11077,7 @@ start the builder with: ${r.launch}`);
11038
11077
  const plan = syncPlan(ctx);
11039
11078
  const journal = readSyncJournal(ctx.root, ctx.project.name);
11040
11079
  const groups = {
11080
+ ...ctx.config.planning === "adopted" ? { mapping: adoptionMapping(ctx) } : {},
11041
11081
  blocked: taskSyncBlockers(ctx),
11042
11082
  recorded: Object.values(journal).filter((entry) => entry.done).map((entry) => entry.label),
11043
11083
  pending: plan.filter((action) => journal[syncActionKey(action)]?.done !== false).map(syncLabel),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fusebase/harness-lead",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "type": "module",
5
5
  "description": "Dev-loop kit for coding agents: plan, clean room, tasks and waves as Markdown in your repo.",
6
6
  "license": "UNLICENSED",
@@ -65,7 +65,8 @@ On an auto watch tick, perform the following after the Check, in the same turn w
65
65
 
66
66
  - **Decomposition Clarification Needed.** If the accepted Story or documented decisions answer all outstanding questions, comment the answers with their sources and return the Story to `Decomposition Needed` so the planner can resume. If an answer is still missing, name the exact question and who needs to answer it.
67
67
  - **Dev Check.** If every subtask matches the accepted Story, comment the approval and transition to `[AI] Ready for development`. A service naming constraint alone does not change scope. If a subtask adds scope or changes a decision, cite the affected subtask, the difference, and the decision needed.
68
- - **`[AI] Ready for Human Review`.** Move a passing issue to Ready for QA on Develop after reviewing the diff and seeing green required checks for the current revision. For shared MRs, record the verdict against each issue's own criteria. Return only the issue whose own acceptance fails to `[AI] Ready for development`, with the unmet criterion and evidence. Keep the parent Story in review while any required child is blocked or fails. A running pipeline or inconclusive evidence is a named blocker. Leave the merge to the separate merge workflow.
68
+ - **`[AI] Ready for Human Review`.** Move a passing issue to Ready for QA on Develop after reviewing the diff and seeing green required checks for the current revision. A parent Story can pass after its required children pass. For shared MRs, record the verdict against each issue's own criteria. Return only the child whose own acceptance fails to `[AI] Ready for development`, with the unmet criterion and evidence. A running pipeline or inconclusive evidence is a named blocker. Leave the merge to the separate merge workflow.
69
+ - **Story in human review with a required child back in development.** Check the current statuses of the Story and its required children, including after any child transition on this tick. If a required child is in `[AI] Ready for development` or `[AI] In Progress` while the parent remains in human review, Codee may wait on the parent. Report the child's summary and request any required approval to transition the parent to `[AI] Ready for development`. Recheck both statuses before applying the approved transition. Leave passing siblings and any blocked QA subtask in their current states. If a child is only blocked or its evidence is inconclusive, report the blocker and keep the Story in review.
69
70
  - **QA subtask blocked on named dev merges.** Read the blocker and the current state of every dependency it names. For each required merge, verify that the merged commit is reachable from the repository's actual dev deployment branch and that a successful pipeline on that branch includes that commit. If deployment is a separate step, verify the dev deployment also includes it. If a named dependency is back in development, a merge or pipeline is missing, or another blocker remains, leave QA blocked and report the specific dependency and evidence.
70
71
  - Once all of that QA subtask's prerequisites are satisfied, prepare a Jira comment with the verified branch, commit and pipeline links for each dependency. Request any required approval for the comment and the exact `[AI] Ready for QA` transition. When authorized, post the evidence and transition only that still-blocked QA subtask in the same turn. Recheck its current status before writing. If the comment already exists after a partial attempt, reuse it and request approval for the remaining write as required.
71
72
 
@@ -14,5 +14,5 @@ Use the installed [One Pager](../templates/one-pager.md), [backlog index](../tem
14
14
 
15
15
  1. Inventory the current One Pager, issue tracker, design notes, incoming requests and evidence. Keep every source occurrence, including duplicates. Record what moves to a milestone, backlog or existing task, and why anything stays in history or was deferred. Preserve items without a Jira key.
16
16
  2. Set `planning: adopted` for a running product with an existing roadmap. Show the proposed mapping before applying it. Reuse verified IDs in `work/sync.json`: the active FuseBase folder and notes need their existing IDs and titles, and notes need their current revision and location. Skip `archive` and `_archive` subtrees. Use `observeOnly: true` for any other mapped records that should stay read-only. Task note keys are `tasks/T-001`, etc. For Jira, use the known story and task keys, and preserve legacy workflow states as observations. Never infer local completion from an issue status.
17
- 3. Keep the original note or full inventory linked as history. Render `sync-one-pager` and inspect `sync-plan --preview` before any remote write. Review every proposed create, update and replacement against the mapping. If there are unmapped records, resolve them before publishing.
17
+ 3. Keep the original note or full inventory linked as history. Render `sync-one-pager` and inspect the `mapping` and pending actions in `sync-plan --preview` before any remote write. Compare the stored mappings with the source inventory, including old Jira issues without a local task and incoming items without a Jira issue. Give each unmapped occurrence a disposition before publishing. The mapping reflects local records, so verify their current location and status against the source.
18
18
  4. After publication, read back the One Pager and run `sync-one-pager --input <markdown-file>`. Verify the rendered widgets and links in FuseBase when browser access is available.