@fusebase/harness-lead 0.3.5 → 0.3.6
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 +4 -0
- package/dist/lead.mjs +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.6 — 2026-12-04
|
|
4
|
+
|
|
5
|
+
- The `AGENTS.md` block that `install` and `update` write is prettier-clean (blank line after the begin marker and before the list). A repository that runs `prettier --check` over Markdown, such as nx-frontend, failed its format check on the 0.3.x block.
|
|
6
|
+
|
|
3
7
|
## 0.3.5 — 2026-12-04
|
|
4
8
|
|
|
5
9
|
- `lead commands [--json]`: the /lead commands with their argument and options (mode auto/approve/readonly, watch start/stop/interval, delegate check, qa milestone, activity analyze) as data, for interfaces that offer them in a menu. A test keeps it equal to `references/help.md`. Allowed in readonly mode.
|
package/dist/lead.mjs
CHANGED
|
@@ -7536,7 +7536,7 @@ function validateMockupSwarm(root, workDir, input) {
|
|
|
7536
7536
|
|
|
7537
7537
|
// src/templates.gen.ts
|
|
7538
7538
|
var TEMPLATES = {
|
|
7539
|
-
"AGENTS.block.md": "<!-- lead:begin -->\n## lead (optional)\n\nThis repo can be worked with lead, a dev-loop kit. It is opt-in: ignore this section unless the person runs `/lead` (Claude Code) or `$lead` (Codex) or asks to use lead.\n\nWhen lead is used:\n- Plans and tasks live in `work/` (or `<project>/work/`); settings in `.lead/config.yml`; repo rules for lead in `.lead/local.md` and `.lead/local/`.\n- A lead task is done only when `node .lead/lead.mjs finish` succeeded.\n- Do not edit lead's own files (`.lead/lead.mjs`, `.agents/skills/lead*`, `.claude/skills/lead*`); an update replaces them.\n- A delegated service lives only in its skill (`\u2026/lead/delegates/<id>/` or `.lead/delegates/<id>/`). How it works, handoff, and check stay there; do not copy them into other lead files.\n- A Cursor `/goal` is not started by lead. When a goal is active here, follow the `lead-goal` skill: a short heartbeat every reply, and append events with `node .lead/lead.mjs activity` into `.lead/activity/` (for later harness analysis).\n<!-- lead:end -->\n",
|
|
7539
|
+
"AGENTS.block.md": "<!-- lead:begin -->\n\n## lead (optional)\n\nThis repo can be worked with lead, a dev-loop kit. It is opt-in: ignore this section unless the person runs `/lead` (Claude Code) or `$lead` (Codex) or asks to use lead.\n\nWhen lead is used:\n\n- Plans and tasks live in `work/` (or `<project>/work/`); settings in `.lead/config.yml`; repo rules for lead in `.lead/local.md` and `.lead/local/`.\n- A lead task is done only when `node .lead/lead.mjs finish` succeeded.\n- Do not edit lead's own files (`.lead/lead.mjs`, `.agents/skills/lead*`, `.claude/skills/lead*`); an update replaces them.\n- A delegated service lives only in its skill (`\u2026/lead/delegates/<id>/` or `.lead/delegates/<id>/`). How it works, handoff, and check stay there; do not copy them into other lead files.\n- A Cursor `/goal` is not started by lead. When a goal is active here, follow the `lead-goal` skill: a short heartbeat every reply, and append events with `node .lead/lead.mjs activity` into `.lead/activity/` (for later harness analysis).\n<!-- lead:end -->\n",
|
|
7540
7540
|
"config.yml": 'version: 1\n# planning: adopted # existing product with an established One Pager and tracker\n# Commands that verify a task. {name} is the project name in a monorepo.\nchecks: {}\nlimits:\n wip: 3 # tasks in progress at once\n rounds: 5 # do-and-check rounds before asking a human\n reviews: 3 # independent reviews before asking a human\n minutes: 60 # wall time on one task before stopping to report\n# projects: # uncomment for a repo with several projects\n# glob: apps/*\n# create: pnpm new {name}\n# work_dir: "{path}/work"\nshared_paths: []\n# worktree_setup: pnpm install --offline --frozen-lockfile # run once in each new task worktree\nreview: task\n# qa: # browser QA in reviews and /lead qa\n# run: pnpm dev {name}\n# url: http://localhost:5173\n# ready: Local:\n# can_show: deployed # one-pager "Can show now" needs `deployed:` on the task, not just a merge\n# sync: # /lead sync to FuseBase and Jira\n# fusebase: {org: <org id>, workspace: <workspace id>, parent_folder: <folder id>}\n# jira: {site: <site>.atlassian.net, project: <KEY>, epic: <KEY-1>}\n# links:\n# repo: https://gitlab.example.com/group/repo # web address; file links and merge requests\n# branch: main\n# app: https://dev.example.com/app # running instance, shown in the one-pager and issues\n',
|
|
7541
7541
|
"how.md": 'HOW TO WORK WITH LEAD\n\n /lead say what you want in plain words; lead shows the state and the next step\n /lead how this page /lead help all commands\n /lead enable lead is off by default for each person; this turns on its hooks for you\n\nTHE FLOW YOU (a person)\n 1 plan research or reverse \u2192 flows \u2192 mockups \u25C0\u2500\u2500 confirm the spec (flows, mockups, acceptance)\n \u2192 acceptance \u2192 architecture \u2192 tasks\n 2 build per task: worktree \u2192 code \u2192 checks\n \u2192 independent review with browser QA \u25C0\u2500\u2500 answer questions in "Needs you"\n \u2192 finish (waits for you) \u25C0\u2500\u2500 review and merge the branch\n 3 accept milestone QA in the browser \u25C0\u2500\u2500 decide "good enough": close the milestone,\n move the rest to the next one\n 4 share /lead sync \u2192 FuseBase notes, Jira \u25C0\u2500\u2500 one yes for note updates (if you have access)\n\nSTAGES\n Each bar starts when the previous stage ends. The dates are a reading order, not a plan.\n\n```mermaid\ngantt\n title Project stages\n dateFormat YYYY-MM-DD\n axisFormat %b %d\n\n section Plan\n Research :p1, 2026-01-01, 7d\n Flows :p2, after p1, 7d\n Mockups :p3, after p2, 7d\n Acceptance :p4, after p3, 7d\n Architecture :p5, after p4, 7d\n Tasks :p6, after p5, 7d\n\n section Build\n Build :b1, after p6, 7d\n Review :b2, after b1, 7d\n\n section Accept\n Milestone QA :c1, after b2, 7d\n\n section Share\n Sync :s1, after c1, 7d\n```\n\nWHERE THINGS ARE\n work/one-pager.md for the business: milestones, what can be shown, risks\n work/board.md for the team: ready, in progress, in review, needs you, waves\n work/spec.md the product, assembled from work/spec/ (do not edit spec.md itself)\n work/tasks/ one file per task: criteria, checks, review, questions\n .lead/config.yml checks, projects, sync, QA .lead/local* your rules (kept on update)\n\nRULES THAT MATTER\n \xB7 A task is done only when finish succeeded: checks recorded on the final code, every\n criterion pass, an independent review. "It works" in chat is not done.\n \xB7 A confirmed spec section changes only after you reopen it.\n \xB7 Work stopped midway (limit, computer off)? Run /lead: it offers to continue.\n \xB7 Keep work/ and .lead/config.yml in git: they are the shared state.\n',
|
|
7542
7542
|
"local-README.md": "# Project rules for lead skills\n\nFiles here are yours: `lead update` never changes them. Each adds rules on top of one lead skill reference:\n\n- `plan.md` \u2014 planning, spec stages, mockups\n- `task.md` \u2014 doing a task\n- `review.md` / `qa.md` \u2014 review and browser QA\n- `sync.md` \u2014 FuseBase / Jira sync\n- `reverse.md` \u2014 studying a running product\n\nGeneral rules for this repo go to `.lead/local.md`. Do not edit lead's own files (`.lead/lead.mjs`, `.agents/skills/lead*`, `.claude/skills/lead*`): an update replaces them.\n",
|
|
@@ -7549,7 +7549,7 @@ var TEMPLATES = {
|
|
|
7549
7549
|
"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",
|
|
7550
7550
|
"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 -->\nIf the session context already names the lead launcher and kit, use them and skip the next two steps. Otherwise find 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",
|
|
7551
7551
|
"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",
|
|
7552
|
-
"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.3.
|
|
7552
|
+
"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.3.6'], 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",
|
|
7553
7553
|
"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',
|
|
7554
7554
|
"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',
|
|
7555
7555
|
"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"
|
|
@@ -8297,7 +8297,7 @@ function ensureCodexHooks(root) {
|
|
|
8297
8297
|
}
|
|
8298
8298
|
|
|
8299
8299
|
// src/install.ts
|
|
8300
|
-
var VERSION = true ? "0.3.
|
|
8300
|
+
var VERSION = true ? "0.3.6" : "dev";
|
|
8301
8301
|
var LOCK_PATH = ".lead/kit.lock";
|
|
8302
8302
|
var SKILLS = ["lead", "crew-lead", "lead-goal"];
|
|
8303
8303
|
var SKILL_DIRS = [".agents/skills", ".claude/skills"];
|
package/package.json
CHANGED