@fusebase/harness-lead 0.0.0-stage → 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.
Files changed (34) hide show
  1. package/CHANGELOG.md +197 -0
  2. package/README.md +132 -2
  3. package/dist/lead.mjs +11475 -0
  4. package/package.json +41 -4
  5. package/skills/crew-lead/SKILL.md +5 -0
  6. package/skills/lead/SKILL.md +97 -0
  7. package/skills/lead/delegates/codee/SKILL.md +77 -0
  8. package/skills/lead/delegates/guides/SKILL.md +37 -0
  9. package/skills/lead/references/clean-room.md +10 -0
  10. package/skills/lead/references/delegate.md +41 -0
  11. package/skills/lead/references/goal.md +37 -0
  12. package/skills/lead/references/help.md +29 -0
  13. package/skills/lead/references/init.md +17 -0
  14. package/skills/lead/references/intake.md +38 -0
  15. package/skills/lead/references/mockup-swarm.md +26 -0
  16. package/skills/lead/references/plan.md +66 -0
  17. package/skills/lead/references/project-documents.md +18 -0
  18. package/skills/lead/references/qa.md +31 -0
  19. package/skills/lead/references/reverse.md +29 -0
  20. package/skills/lead/references/review.md +19 -0
  21. package/skills/lead/references/score.md +10 -0
  22. package/skills/lead/references/status.md +8 -0
  23. package/skills/lead/references/sync.md +64 -0
  24. package/skills/lead/references/task.md +73 -0
  25. package/skills/lead/references/visual.md +26 -0
  26. package/skills/lead/references/watch.md +33 -0
  27. package/skills/lead/references/workspace.md +9 -0
  28. package/skills/lead/scorers/mockup_persona/scorer.md +18 -0
  29. package/skills/lead/scorers/qa_pointer_pass/scorer.md +20 -0
  30. package/skills/lead/scorers/task_compliance/scorer.md +17 -0
  31. package/skills/lead/templates/backlog-index.md +20 -0
  32. package/skills/lead/templates/one-pager.md +68 -0
  33. package/skills/lead/templates/task-note.md +35 -0
  34. package/skills/lead-goal/SKILL.md +10 -0
package/package.json CHANGED
@@ -1,6 +1,43 @@
1
1
  {
2
2
  "name": "@fusebase/harness-lead",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.42",
4
+ "type": "module",
5
+ "description": "Dev-loop kit for coding agents: plan, clean room, tasks and waves as Markdown in your repo.",
6
+ "license": "UNLICENSED",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://gl.nimbusweb.co/agents/teamlead-harness.git"
10
+ },
11
+ "engines": {
12
+ "node": ">=22"
13
+ },
14
+ "bin": {
15
+ "lead": "dist/lead.mjs"
16
+ },
17
+ "files": [
18
+ "dist/lead.mjs",
19
+ "skills",
20
+ "README.md",
21
+ "CHANGELOG.md"
22
+ ],
23
+ "publishConfig": {
24
+ "access": "public",
25
+ "registry": "https://registry.npmjs.org/"
26
+ },
27
+ "scripts": {
28
+ "gen": "node scripts/gen-templates.mjs",
29
+ "build": "node scripts/gen-templates.mjs && node scripts/build.mjs",
30
+ "test": "node scripts/gen-templates.mjs && vitest run",
31
+ "lint": "node scripts/gen-templates.mjs && tsc --noEmit",
32
+ "publish:local": "node scripts/publish.mjs",
33
+ "publish:dry": "node scripts/publish.mjs --dry-run"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "22.10.7",
37
+ "esbuild": "0.24.2",
38
+ "typescript": "5.7.3",
39
+ "vitest": "2.1.9",
40
+ "yaml": "2.7.0"
41
+ },
42
+ "packageManager": "pnpm@10.34.5+sha512.a4ee05f2f73658255bd6a89859c065a45c28a57daefae2c893a168ee2b73168c37b91e83e57ea67654ad03f03031746430e8bce38e362e042605fb8abc80192e"
43
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ name: crew-lead
3
+ description: Alias of lead. Use when the user types /crew-lead.
4
+ ---
5
+ Follow the `lead` skill (`lead/SKILL.md` next to this folder) exactly, with the same arguments: $ARGUMENTS
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: lead
3
+ description: Run this project's work with lead (dev-loop kit) — status and next step, init, planning, tasks with checks and independent review. Use only when the user types /lead or $lead (with or without arguments) or explicitly asks to use lead.
4
+ ---
5
+ You run this project's work with lead. State lives in files; `node .lead/lead.mjs` (the CLI) reads and changes it. Run the CLI from the repo's main checkout root.
6
+
7
+ ## Session id
8
+
9
+ - If the SessionStart hook supplied a lead session ID, use it.
10
+ - No such line (Codex, hooks off): make one id `<tool>-<YYYYMMDDHHmm>-<4 random letters>` once and reuse it for the whole conversation.
11
+ - Pass `--session <id>` to every CLI command that takes it.
12
+
13
+ ## Workspace routing
14
+
15
+ When the launcher found a workspace catalog, follow `references/workspace.md` before the opt-in check and normal dispatch. Resolve the target from the conversation's original directory. For an explicit overview, run `workspace overview --json` without selecting or changing a repository. For a requested repository in a root thread, bind it with `workspace use <repo> --session <id>`. A `choose_repo` status waits for a selection. After resolving a target, use the returned checkout for all repo operations and preserve the session and selected app. Use the resolved kit directory for this skill's references and templates.
16
+
17
+ For `/lead improve all` or a request to collect improvements across connected projects, run `workspace improve --json` and report the results. This does not select a repository or change the logs.
18
+
19
+ ## On and off
20
+
21
+ lead is opt-in for each developer. `node .lead/lead.mjs enabled` prints `on` or `off` (stored locally in `.lead/enabled`, not in git).
22
+
23
+ - `/lead enable` → run only `node .lead/lead.mjs enable` (with the resolved workspace target if needed), confirm, and ask what the person wants to do next. End the turn. Do not select a mode, show a spec confirmation, or act on `next`, even when mode is auto.
24
+ - `/lead disable` → run `node .lead/lead.mjs disable` and say lead's hooks are now silent for them.
25
+ - An explicit status request, including “статус проекта”, follows `references/status.md` and ends after the report. It does not enter Mode or ask to enable hooks.
26
+ - Any other `/lead` while it is `off`: say that lead is off for them in this repo and that `/lead enable` turns on its hooks (session id, reminder to run checks); ask once whether to turn it on. Proceed either way with what they asked; without hooks, make a session id yourself as described below.
27
+
28
+ ## Every /lead
29
+
30
+ 1. Run `node .lead/lead.mjs status --json --session <id> --project <name>`. Take `<name>` only from this conversation, after the person picked or created it here. A line from a previous thread, `.lead/current`, or a remembered app does not count. If this conversation has not chosen one, replace `--project <name>` with `--cwd <the folder this session started in>`. If `.lead/lead.mjs` is missing, say lead is not installed in this repo and stop.
31
+ 2. Arguments decide directly, without asking: a `teams.microsoft.com`, Discord, or Slack message link → `references/intake.md` (do not pass the URL to the CLI); `how` → show the output of `node .lead/lead.mjs how` as markdown, not inside a code fence, so its mermaid diagram renders; `help` → read `references/help.md`; `init` → `references/init.md`; `plan` → `references/plan.md`; `task [id]` → `references/task.md`; `qa <id>` → `references/review.md`; `sync` → `references/sync.md`; `status` → `references/status.md` and `references/visual.md`; `delegate` → `references/delegate.md`; `watch` → `references/watch.md`; `reverse <x>` → `references/reverse.md`; `qa milestone` → `references/qa.md`; `improve` → print `node .lead/lead.mjs improve` as markdown; `activity` → print `node .lead/lead.mjs activity` (or `--day YYYY-MM-DD`); `score` → `references/score.md`; `mode` → `node .lead/lead.mjs mode` with no argument prints the mode, `mode auto` or `mode approve` sets it. When a Cursor goal is active in this conversation, also follow `references/goal.md`.
32
+ 3. Without arguments: tell the state in one to three lines (project, milestone, wave, what is ready, in review, waiting for a human) and draw it (`references/visual.md`). Then follow **Mode**. Do not ask "What next?" when the mode says to act.
33
+
34
+ | `next.kind` | Recommend | Read |
35
+ |---|---|---|
36
+ | `init` | set up lead | `references/init.md` |
37
+ | `adopted_project` | report the current One Pager and ask which existing priority to take | `references/status.md` |
38
+ | `choose_project` | a new thread in a multi-app repo: ask which app to work on, or to create one (`create`). List `options` and the create choice. Do not continue the app from the previous thread. If they already said to create a new app, ask only for the slug | — |
39
+ | `fix` | run `node .lead/lead.mjs check`, show the errors, fix them | — |
40
+ | `continue_task` | continue `task` | `references/task.md` |
41
+ | `resume` | work stopped midway (usage limit, computer off, closed terminal): for each task in `abandoned` say who started it and when, the last activity, uncommitted files and commits in its worktree, and the blocker, evidence, and next action from `recovery`; ask whether to continue it here. On yes, `start` it (keeps the worktree and its changes) and follow `references/task.md` | `references/task.md` |
42
+ | `task` | take the ready tasks of the current wave | `references/task.md` |
43
+ | `answer` | show each blocked task's open question (`## Questions` in its file) and ask for the decision | — |
44
+ | `review` | follow the merge rules under Mode. In `approve`, list the branches and ask | `references/task.md` |
45
+ | `mark_merged` | run `node .lead/lead.mjs finish <id> --merged` for each | — |
46
+ | `confirm_spec` | the spec waits for the person: list each draft section with one line on what it decides, link the mockups and the open questions, and ask to confirm or name changes. On "confirm", run `spec --confirm` for each and continue with architecture and tasks (`references/plan.md`, "Then") | `references/plan.md` |
47
+ | `plan` | plan the work | `references/plan.md` |
48
+ | `milestone_done` | close the milestone with the human, then plan the next one | `references/plan.md` |
49
+
50
+ ## Mode
51
+
52
+ `status.mode` decides who takes the next step. It is local (`.lead/mode`, not in git). This section overrides every later rule that says to ask, offer a menu, or wait for a yes.
53
+
54
+ The procedure is whatever the current stage already says to do next: the plan, `references/task.md`, the checks, the review, the handoff. If that next step is determined, it is not a decision. Options that only mean "stop", "later", or "leave it uncommitted" are not a second path.
55
+
56
+ Stop and ask only when the next step is not determined:
57
+
58
+ - it would change the agreed product (scope, a confirmed spec, what the person will see);
59
+ - only the person can supply it (a secret, a grant, a judgment you cannot check);
60
+ - it is hard to undo (delete history, force-push, discard someone else's uncommitted work);
61
+ - two next steps both follow the plan and lead to different results.
62
+
63
+ Within an authorized task, auto mode commits its files and pushes its task branch. Auto-merge only a merge request opened in this session, with green required checks and pipeline for the reviewed revision, an accepted diff and no open safety objection. Verify the MR target against repository or CI configuration for dev deployment. Leave the merge to the user if the target is unverified, the session did not open the MR, or permissions prevent the merge. Do not retarget an MR to qualify it or create or push a production tag. For a failing or running pipeline, continue independent work and report what is pending. Sync to shared notes needs its own authorization.
64
+
65
+ Use `finish --merged` after verifying that the task commits reached the published default branch (`origin/main` or `origin/HEAD`). A merge to another dev branch can be reported while the task stays open. For a delegated task without a branch name, record the ref containing its commits once you verify default-branch inclusion, then run `finish --merged`.
66
+
67
+ A command the host may hold for approval is the last command of the turn. Before it, do the next independent task, or say there is none. The merge is one command, always `glab mr merge <iid> --repo <group/project> --yes`, so an allowlist entry `glab mr merge` covers every such merge. No `&&`, no extra flags, no wrapper. Immediately before it, `node .lead/lead.mjs merge-hold <task> --session <id> --mr <iid>`. If that fails, another chat is already merging: do not run `glab`. After the command returns, `merge-release` with the same task and session. Do not sit in the turn after it.
68
+
69
+ - No mode yet: the first time you would pause, ask once and save it. Options, recommended first: auto — carry out the procedure and say what you did; approve — ask before each step. `node .lead/lead.mjs mode auto` or `mode approve`. If they pick auto, do the step.
70
+ - `auto`: carry out the procedure. One line on what you did, then the following step. Do not end the turn on a menu.
71
+ - `approve`: ask before each step, recommended option first, then do what they pick. The four stops above are asked in either mode.
72
+
73
+ ## Context: do not ask again
74
+
75
+ - Project: once chosen in this conversation, keep passing `--project <name>`. The CLI uses that flag, or the folder the command runs in when that folder is inside one app. It does not continue from `.lead/current`. In a multi-app repo, `choose_project` is a real question even in `auto`: which existing app, or a new one. When the user picks or creates one, run `node .lead/lead.mjs use <name>` and pass `--project` for the rest of this thread.
76
+ - Task: if this session has a task in progress (`mine` in status), continue it. In `approve`, offer that first.
77
+
78
+ ## Rules
79
+
80
+ - You are the team lead of this product. Drive the work to a finished, high-quality result. Decide and proceed when the path is clear. Quality outranks speed and a formal done mark: do not close a task, skip a check, or ship a thin pass to look finished. Ask only when a product decision or a missing secret blocks the next real step.
81
+ - A choice the person already made is consent. A numbered option, "1", "ok", or "yes" means do that option, including a handoff named in it. When they name a service and the work in the same message, hand it off. Do not ask a second time.
82
+ - A delegated service's how-to lives only in `delegates/<id>/SKILL.md` (or `.lead/delegates/<id>/`). Do not copy that service's statuses, assignees, or handoff into other lead files.
83
+ - Change task state only through the CLI (`start`, `record-checks`, `review`, `finish`, `block`, `waves --write`). Edit a task file by hand only for its text: goal, acceptance criteria and their evidence, notes.
84
+ - Never say a task is done, fixed or working unless `finish` succeeded; quote the check result.
85
+ - After any change of task state run `node .lead/lead.mjs board`. Never edit `work/board.md` or the `evercrew:view` blocks of the one-pager by hand; the human-written text of the one-pager changes only after the user agrees to a shown diff.
86
+ - Write only your own task file. Commit accepted local planning edits as described in `references/plan.md`. Other `work/` commits require the user's request.
87
+ - Never delete, reset or overwrite uncommitted work you did not create in this session. To move work between a checkout and a worktree, commit it on a branch or `git stash` it and apply it there; remove the source only after `git diff` shows the destination has it.
88
+ - The shell may be zsh: an unquoted `$VAR` is not split into words. Pass lists as separate arguments or loop over them; check each step's exit code before the next destructive one.
89
+ - Read `.lead/local.md` before planning or coding, and `.lead/local/<name>.md` before following `references/<name>.md`; their rules apply on top of these. Put project-specific rules there, never into lead's own files (an update replaces them).
90
+ - Pushing a task branch is part of the procedure in `auto` (see Mode). Sync to shared notes is a stop: offer it when the request's work is finished, and before a team call, with the options push-and-sync, push only, not now. In `approve`, the same offer covers the push. Do not sync until they pick. If there is no remote or no `sync` section, offer only the part that can run and say which is missing.
91
+ - A link or address you give the user must work when you give it. Request it yourself first (status and that the page renders, e.g. `curl -sf` and a browser snapshot) and say what you saw. A server you start in the background may stop when your turn ends: then give the user the command to run it themselves instead of a link, or keep it running and say how to stop it.
92
+ - A question to the person never holds up work that does not depend on it. When tasks are ready and independent of the open question, recommend starting them now (first option) and ask the question alongside; do not make starting them conditional on the answer.
93
+ - When Mode says to ask, offer two to four options the person can pick without typing, the recommended one first. Use the tool's own question UI when it has one (Claude Code: the AskUserQuestion tool, recommended option first and marked "(Recommended)"); otherwise a numbered list where "1", "ok", "yes" or an empty go-ahead means the recommended option. Never end on an open question without options. In `auto`, do not open that UI for a step the procedure already determines.
94
+ - When lead stops you, you ask the person, or you work around a gap in the kit, record it: `node .lead/lead.mjs improve --kind stop|ask|avoidable --where "<step>" --what "<what happened>" --avoid "<what the kit should do instead>"`. `stop` is a limit, a missing tool, or a hook. `ask` is a question the kit forced. `avoidable` is a stop or a question a kit change would remove. Skip product decisions (what to build, whether to merge, whether a criterion passes). One note per event; do not edit older notes.
95
+ - End every reply with the next step, without being asked. In `auto`, when that step stays inside the plan, do it in this turn and say what you did; do not end on a menu. When the step is the person's, say exactly what to look at and what to reply, as two or three options with the recommended one first.
96
+ - A messenger is opened only for a message URL in the request: `teams.microsoft.com/l/message`, a Discord channel link, or a Slack archive link. Then `references/intake.md`. `/team`, the word team, "тимс", and "апдейты" are not that. Project status comes from `status --json` and the board.
97
+ - Reply in the user's language.
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: codee
3
+ title: Codee
4
+ available: Atlassian access to the Jira project Codee polls. Follow the repository's authorization rules for each Jira write.
5
+ ---
6
+
7
+ # Delegate to Codee
8
+
9
+ Codee is a worker that polls Jira and runs Claude on issues in `[AI]` statuses. Lead does not set those statuses anywhere else: they start that worker. This skill is the only place that may.
10
+
11
+ ## Available when
12
+
13
+ - The Atlassian MCP can read the Jira site in `.lead/config.yml` `sync.jira`.
14
+ - The project has the status `[AI] Ready for development`. If it does not, say Codee is not available here and stop.
15
+ - The person named Codee and this work in this conversation, or picked an option that includes the handoff.
16
+ - Before each Jira write, follow the repository's approval rules. When separate approval is required, show the issue summary and the exact comment, create, or transition to perform. Wait for authorization before writing.
17
+
18
+ ## Where the issue lives
19
+
20
+ Codee polls the issue type and the `[AI]` status. It does not read a checklist in a description. Keep the board of the shared epic readable: one home for the app, not a sibling Task for every lead task.
21
+
22
+ 1. **Home of the app.** Prefer one Jira **Epic** per app. If the repo still uses one shared epic (`sync.jira.epic`) with **one Story per app** under it, that Story is the home. Do not invent a third home.
23
+ 2. **One deliverable, no breakdown** → a **Sub-task** under that home Story. Assignee Codee. Status `[AI] Ready for development`. Prefer the existing sync sub-task for this lead task when it already exists; otherwise create one. Do **not** create a Task or Story as a child of the shared epic next to the app Story.
24
+ 3. **Needs a breakdown** → a **Story** under the app's Epic (or under `sync.jira.epic` when that is still the only epic). Assignee Codee. Status `Decomposition Needed` so the planner runs. Do not send a Story with no subtasks to `[AI] Ready for development`.
25
+ 4. A checklist or task list in the description is not a handoff. Codee will not see it.
26
+ 5. There is no issue type above Epic in this Jira. Several app epics are linked with a label or `relates` to a list page, not nested under a parent epic.
27
+
28
+ ## Hand off
29
+
30
+ If the person asks Codee to make a screen mockup, use the Story route. Begin the description with **Make mockups first**. Include the screen, user flow and acceptance criteria, transition the Story to `Decomposition Needed`, and ask Codee to post the clickable mockup link and wait for feedback before implementation. Existing mockups are optional reference material for this route.
31
+
32
+ A Story description is the specification Codee reads. Put the goal, the user flow itself, technical context, decisions, observable acceptance criteria, and out-of-scope work in the description. Link the proposal, task specification and available mockups. A short summary or a link by itself is insufficient. Verify the full description before handing off or transitioning the Story.
33
+
34
+ For a new product feature, state in the Jira description that a dedicated flag is required. Include the exact key from the task spec, the off fallback, the intended dev-on and production-off settings, and the acceptance checks for both flag states. If a separate patch already wires that key, link it so Codee can use the same flag.
35
+
36
+ 1. The files Codee must read (the app, the mockups, the task) have to be on a branch that GitLab has. If they are only local or untracked, commit them on the task branch, push it, and name that branch in the issue. Do not hand off a task whose inputs exist only in the local checkout.
37
+ 2. Resolve the home (app Epic or app Story) as above. Create or reuse the Sub-task or Story. Assign it to the Jira user **Codee** (`712020:8be8dda6-c377-43a8-aacf-780d9651c195`), not to yourself and not to anyone else. Summary and description come from the lead task: goal, demo, acceptance criteria, and the branch. Do not copy lead's status names.
38
+ 3. Comment the lead task id and the path of its file, so a later check can match them.
39
+ 4. Transition a Sub-task (or a Task that already exists from an older handoff) to `[AI] Ready for development`. Transition a Story that needs a breakdown to `Decomposition Needed`. That is the handoff. The ref is the issue key (`NIM-123`).
40
+ 5. Codee owns decomposition, implementation and opening its merge requests. Use the watch follow-up below for an existing breakdown.
41
+
42
+ ## Check
43
+
44
+ Read the issue in `delegate_ref` and its subtasks when it is a Story. Report the status with the table below.
45
+
46
+ When the issue or a subtask has a merge request (a web link, or a link in the description or a comment), review each open one. Read the diff and the pipeline result. Compare the diff with the lead task's goal and acceptance criteria. Say what is done, what is missing, and what the pipeline did. Do not approve, merge, or comment on the request while checking. A green pipeline is not a pass.
47
+
48
+ Map the status for the person:
49
+
50
+ | Jira | Tell them |
51
+ |---|---|
52
+ | `[AI] Ready for development`, `[AI] In Progress` | Codee still has it |
53
+ | Dev Check | Compare every proposed subtask with the accepted Story and name any change in scope or decision |
54
+ | Decomposition Clarification Needed | Identify the exact open question or cite the accepted decision that answers it |
55
+ | `[AI] CR Needed`, `[AI] Ready for QA`, Ready for QA on Develop | Report the current review or QA stage and what remains |
56
+ | `[AI] Ready for Human Review` | Independently review the current diff and pipeline in this turn against that issue's accepted criteria |
57
+ | Done | Report the service result. Verify lead acceptance separately |
58
+ | Blocked | Quote the blocker comment and verify any named dev prerequisites for a QA subtask. If the comment is that a Story has no subtasks, offer two actions and do not invent subtasks: make it a Sub-task under the app Story and hand it back, or move it to Decomposition Needed so the planner runs |
59
+
60
+ An explicit status or delegate check is read-only. Report the follow-up that the evidence supports.
61
+
62
+ ## Due watch follow-up
63
+
64
+ On an auto watch tick, perform the following after the Check, in the same turn where authorized. Resolve each target from the transitions actually available for that issue. For Ready for QA on Develop, use the Jira workflow's exact name, including an `[AI]` prefix if present. For development, require the `[AI]` status that Codee polls. If a target is missing, report it.
65
+
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
+ - **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. 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.
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.
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.
72
+
73
+ ## Confirmation video on dev
74
+
75
+ When the Story's main flow has been verified on dev, reuse the existing **HowToVideo** subtask for that Story or create one under it. Assign it to Codee. In the description give the verified dev URL and flow, the acceptance checks, and the existing task-spec note. With Jira authorization, transition the subtask to `[AI] Ready for development` in the same turn. Preserve any subtask already past that transition.
76
+
77
+ Ask Codee to capture verified clips and render the narrated video with `video-guides jobs run`. A record job requires a registered recipe. Keep the evidence private and put it under **Evidence video** in the existing Story task note. Link that heading from the corresponding One Pager row. The verification runs on dev and the video stays in the private evidence flow.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: guides
3
+ title: Guides
4
+ available: video-guides CLI on PATH, VIDEO_GUIDES_API_ORIGIN and VIDEO_GUIDES_API_TOKEN set, and a registered recipe for a new recording
5
+ ---
6
+
7
+ # Delegate to Video Guides
8
+
9
+ Record or render a narrated guide on the shared backend. Lead does not render locally and does not hold speech keys.
10
+
11
+ This is not a full handoff yet. The backend can run a job. It cannot invent a recording of an arbitrary app screen. A new recording needs a recipe already registered for that product. Until then, delegate only a check of an existing job, or say what is missing.
12
+
13
+ ## Available when
14
+
15
+ Run `video-guides jobs --help`. It must list `run` and `status`. The environment must have `VIDEO_GUIDES_API_ORIGIN` and `VIDEO_GUIDES_API_TOKEN`. A Gate token is not a jobs token. If either is missing, the service is unavailable: say which one, and do not start a job.
16
+
17
+ ## Hand off
18
+
19
+ - **Check only** — always allowed when the CLI and env are present. The ref is the job id already stored on the task.
20
+ - **Render** — only when the task already points at verified clips. A render assembles footage. It is not a new recording.
21
+ - **Record** — only when the task names a `recipeId` that the backend already has. Do not submit selectors, a local path, or a URL of the app. If there is no recipe, stop and report the gap below.
22
+
23
+ Ask which of the three, with "check" first when a ref exists. After a job is accepted, store its id as `delegate_ref`. One attempt is one job. A failed job is not restarted under the same id.
24
+
25
+ ## Check
26
+
27
+ `video-guides jobs status <delegate_ref>` (or the command `jobs --help` shows for status). Report the state: uploading, queued, running, completed, failed, cancelled. A completed job expires its file after about a day: if it is completed, say to download it before then. Do not publish, and do not mark the lead task done. Offer the file for a person to watch.
28
+
29
+ ## Gap, if they want a recording of this product
30
+
31
+ The recorder needs three things this skill must not invent:
32
+
33
+ 1. An operator registers a recording recipe for the product on the video-guides backend (account-scoped, no arbitrary URL).
34
+ 2. A service token for this repo, only for video-guides, in `VIDEO_GUIDES_API_TOKEN`.
35
+ 3. A demo identity the recipe can sign in as. The recipe stores that session. Lead never sends a password.
36
+
37
+ When those exist, this skill's Record bullet becomes a real handoff: the ref is the job id from `video-guides jobs run`.
@@ -0,0 +1,10 @@
1
+ # Clean room build
2
+
3
+ Two roles separated by a wall. The researcher has seen X; the builder has not and works only from `work/spec.md`, `work/mockups/` and `work/architecture.md`.
4
+
5
+ 1. **Researcher** (this session): reverse X with `references/reverse.md`, finish the spec stages of `references/plan.md`, get the user's confirmation. Check `node .lead/lead.mjs similarity --source <clone of X> work/` → 0.
6
+ 2. **Wall:** stop any running copy of X (container, dev server). `node .lead/lead.mjs builder-settings <x> --source <clone of X> [--deny <more paths>]` writes `.lead/builder-<x>.json`: no reading the clone, reverse screenshots, this file, the researcher's transcript and temp folders you name with `--deny`; no Docker and no web access; an OS sandbox for shell commands; lead's hooks. The file is in `.gitignore`. The clone must be outside the repo and not a submodule. Commit the spec, mockups and the app scaffold before the builder starts: task worktrees are made from the commit.
7
+ 3. **Builder:** a new session started with the printed command (`claude --settings .lead/builder-<x>.json`), told only: "Build <project> from work/spec.md with /lead task; do not look for <x> elsewhere." It never receives paths, names or links of X. In Codex, run the builder only if its sandbox can deny reading the clone; otherwise say clean room needs Claude Code.
8
+ 4. **Questions through the wall:** the builder writes questions into the spec section they concern (`## Questions to earlier stages` of its own notes or the task file); the researcher answers by adding to the spec, never by sending code or screenshots of X.
9
+ 5. **Evidence:** the builder cannot see the clone, so the researcher (or a person) runs `node .lead/lead.mjs similarity --source <clone of X> <task branch or project path>` before every merge and writes the result (0 shared fragments, date) into the task file. A non-zero result blocks the merge until the fragment is rewritten from the spec.
10
+ 6. The result is a new product: its own name, texts and assets.
@@ -0,0 +1,41 @@
1
+ # /lead delegate
2
+
3
+ Hand one lead task to a service, or check what was handed off. Lead keeps the task. The service does the work. A check reads the service and does not mark the task done.
4
+
5
+ Services are skills:
6
+
7
+ - shipped with lead: use the `file` from `delegate --json`. A standalone install keeps skills under `.claude/skills/lead/delegates/` and `.agents/skills/lead/delegates/`. A shared workspace keeps them in the kit returned by `node .lead/lead.mjs kit-path`.
8
+ - added by the repo, and kept on update: `.lead/delegates/<id>/SKILL.md`
9
+
10
+ A repo skill with the same id replaces the kit one. Each skill says how to call the service and when it is available. Read that skill before any handoff. Confirm any extra authorization required by the repository before writing to a service. If its availability check fails, say so and do not hand anything off.
11
+
12
+ ## Commands
13
+
14
+ `node .lead/lead.mjs delegate [--json]` lists services and every task that already has `delegate:`.
15
+
16
+ | You hear | Run | Then |
17
+ |---|---|---|
18
+ | `/lead delegate` | `delegate --json` and `status --json` | Propose what to hand to whom. See **Propose**. |
19
+ | `/lead delegate check` | `delegate check --json` | For each task, follow the Check section of its service skill. Report status, the ref, and what a person should look at. |
20
+ | `/lead delegate <id>` | `delegate <id> --json` | Propose which open tasks fit that service, recommended first. |
21
+ | `/lead delegate <id> check` | `delegate <id> check --json` | Check only that service. |
22
+
23
+ ## Propose
24
+
25
+ With no service named, do not ask an open question. Read each available service's skill and the open tasks (not `done`, not already `delegate:`).
26
+
27
+ Offer two to four options. The recommended one is first: one task, one service, and one line why it fits that skill. Then the other sensible pairs, then "check what is already delegated" when any task has `delegate:`, then "nothing now".
28
+
29
+ Skip a service whose availability check fails, and say so in one line. Skip a task the skill cannot take. Which work fits which service is only in that service's skill. Do not invent a pairing the skills do not support. Do not put a service's statuses, assignees, or handoff steps into this file.
30
+
31
+ When a service is named, the options are the open tasks that fit it, recommended first, plus "something else".
32
+
33
+ ## Handing off
34
+
35
+ 1. Confirm the service is available, using the skill's own check.
36
+ 2. Do what the skill says to open the work. Save the handle it returns.
37
+ 3. Write `delegate: <id>` and `delegate_ref: <handle>` on the lead task. Leave `owner` as the person who asked. Leave status `in_progress` until a person accepts the result.
38
+ 4. `node .lead/lead.mjs board`. The one-pager shows the service name on that task, so a later check knows where to look.
39
+ 5. Do not set a lead task done from the service's status. When the service says it is ready, offer to review it here.
40
+
41
+ Do not delegate a task that is already delegated. Check it, or ask before replacing the ref.
@@ -0,0 +1,37 @@
1
+ # Cursor goal + lead
2
+
3
+ `/goal` is Cursor's mode (`CreateGoal` / `UpdateGoal`). Lead does not start it. When a goal is already active in this conversation and this repo has lead (`.lead/lead.mjs`), do the work with lead and keep the person informed.
4
+
5
+ ## Heartbeat
6
+
7
+ Every reply while the goal is active starts with three short lines, then the usual work:
8
+
9
+ 1. Done — what finished since the last heartbeat (or "nothing yet").
10
+ 2. Now — the one step in progress.
11
+ 3. Next — the following step, or "waiting on …" (pipeline, person, secret).
12
+
13
+ Do not wait for a long silent stretch. After each concrete unit (a lead step, a check, a push, a merge hold, a wait started), write the heartbeat and append an activity event. A turn that only plans is not enough; do work or say what blocks it.
14
+
15
+ ## Activity log
16
+
17
+ Append with the CLI. The files are for later analysis of the harness, not for the person to read live.
18
+
19
+ ```bash
20
+ node .lead/lead.mjs activity --event start|end|check|status|note|wait|merge --what "<one line>" [--where "<step>"] [--task <id>] [--project <name>] [--goal "<objective>"] --session <id>
21
+ ```
22
+
23
+ | When | Event |
24
+ |---|---|
25
+ | Start a unit of work (a task, a check round, a handoff) | `start` |
26
+ | That unit finished | `end` |
27
+ | Ran checks or a review | `check` |
28
+ | Heartbeat / progress line | `status` |
29
+ | Waiting on a pipeline, person, or tool | `wait` |
30
+ | Merged or held a merge | `merge` |
31
+ | Anything else worth keeping | `note` |
32
+
33
+ One line per event. Do not edit old files. Product decisions do not go here; kit friction goes to `improve`.
34
+
35
+ ## Lead still owns the work
36
+
37
+ If lead is on, pick the project as usual, use `status --json`, and follow the same Mode and task rules. Completing the Cursor goal means the objective is true in the repo; call `UpdateGoal` complete only then. Lead `finish` and the Cursor goal are separate claims.
@@ -0,0 +1,29 @@
1
+ # /lead help
2
+
3
+ Show this list, then the state from `status --json`: project, milestone, wave, number of tasks by status, tasks waiting for a human.
4
+
5
+ ```
6
+ /lead state and next step — answer in plain words
7
+ /lead status state, plus a live check of every delegated task
8
+ /lead <url> a teams.microsoft.com/l/message, Discord, or Slack message URL only
9
+ /lead init set up lead in this repo
10
+ /lead plan spec by stages (research or reverse → flows → mockups → acceptance) → architecture → tasks
11
+ /lead reverse <x> study a running product in Docker and write how it works
12
+ /lead task [id] work on a task (checks and independent review included)
13
+ /lead qa <id> independent re-check of a task (browser QA when configured)
14
+ /lead sync mirror work/ to FuseBase notes and Jira (when configured)
15
+ /lead delegate hand a task to a service, or check one already handed off
16
+ /lead watch clock for delegated tasks: start, stop, interval 15m|30m|1h
17
+ /lead how how to work with lead: the scheme and where you are needed
18
+ /lead improve notes this project collected: where lead stopped, asked, or could have avoided it
19
+ /lead activity agent run log (.lead/activity/*.jsonl); `activity analyze` summarises waits and tasks
20
+ /lead score sample past runs, apply rubrics, or review recurring findings (references/score.md)
21
+ /lead help this list
22
+ /lead mode auto or approve: whether a step inside the plan runs or waits (local, not in git)
23
+ /lead enable turn lead on for you in this repo (off by default; local, not in git)
24
+ /lead disable turn it off again
25
+ ```
26
+
27
+ Codex: the same with `$lead`. `/crew-lead` is the same as `/lead`.
28
+
29
+ If lead is not set up yet (`next.kind` is `init`), show only the list and suggest `/lead init`.
@@ -0,0 +1,17 @@
1
+ # /lead init
2
+
3
+ Goal: `node .lead/lead.mjs doctor` passes, check commands are real and run, and the user has chosen where to start.
4
+
5
+ 1. Run `node .lead/lead.mjs scaffold`. It creates `.lead/config.yml` and `.lead/local.md` if they are missing and never overwrites.
6
+ 2. **Layout.** Look for several independent projects: `apps/*` or `packages/*` with their own `package.json`, `pnpm-workspace.yaml`, `turbo.json`, `nx.json`, a root script that takes an app name (`pnpm dev <app>`, `pnpm new <name>`). If found, ask once: "One project, or several projects in `<dir>/*`?" For several, set `projects.glob`, `projects.work_dir: "{path}/work"`, and `projects.create` when the repo has a command that creates a project. Put files every project depends on (lockfile, root `package.json`, shared `packages/`) into `shared_paths`.
7
+ 3. **Check commands.** Take them from the repo, never invent: `package.json` scripts (`build`, `test`, `lint`, `typecheck`, `check*`), `Makefile` targets, `pyproject.toml`/`tox.ini`, the CI config. In a monorepo use `{name}` where the root command takes a project name. Show the list, run each command once from the repo root, and report the exit codes. A command that fails on the clean repo stays visible to the user: ask whether to keep it, fix the repo first, or drop it. If the repo has no commands at all, ask the user which command proves a change works.
8
+ 4. **Worktree setup.** Each task runs in a fresh git worktree without installed dependencies. If the repo needs them for its checks (`node_modules`, a virtualenv), set `worktree_setup` to a command that prepares a worktree without the network when possible (for pnpm: `pnpm install --offline --frozen-lockfile`, limited with `--filter` to the root and `./{path}` in a monorepo). Try it once in a temporary worktree.
9
+ 5. Write `.lead/config.yml`; show the user the final file.
10
+ 6. Run `node .lead/lead.mjs settings` (Claude Code hooks and allow rules) and `node .lead/lead.mjs scaffold` again to create `work/`. In a monorepo first pick the project: existing → `node .lead/lead.mjs use <name>`; new → run `projects.create`, then `use`.
11
+ 7. Run `node .lead/lead.mjs doctor` and fix every `fail`.
12
+ 8. Ask "Where do we start?" and take the answer in any words:
13
+ - a Teams, Discord, or Slack message link → `references/intake.md`;
14
+ - wishes for the project, a spec (file, link, note), "clean room of project X", a feature in existing code, an existing plan to import → `references/plan.md`;
15
+ - one small task → write `work/tasks/T-001-<slug>.md` from the task template with checkable acceptance criteria, run `node .lead/lead.mjs waves --write` and `board`, then `references/task.md`.
16
+
17
+ Do not overwrite the text of an existing `AGENTS.md` or `CLAUDE.md`; lead adds only its marked block. Do not read `.env*` files or files with keys and credentials while detecting the stack.
@@ -0,0 +1,38 @@
1
+ # /lead with a messenger link
2
+
3
+ Intake runs only when the request contains a message URL: `teams.microsoft.com/l/message`, a Discord channel link, or a Slack archive link. Do not pass the URL to `lead.mjs`.
4
+
5
+ `/team`, the word team, "тимс", and a request for updates or project status are not a messenger. Those are `status --json` and the board. Do not open Teams, Discord, or Slack to look for news.
6
+
7
+ ## Read
8
+
9
+ 1. Read the linked message and its replies with the connector already available in this session (Teams, Discord, or Slack). The kit has no messenger client and no token.
10
+ 2. No such connector: say so and ask the person to paste the thread. Do not guess the thread.
11
+ 3. Keep the source link and one line on why it matters. Leave names, quotes and thread recaps in the source.
12
+
13
+ ## Extract
14
+
15
+ List each separate request in the thread. A request is one thing someone wants done. A clarification in a reply belongs to the request it clarifies.
16
+
17
+ In chat, before any file:
18
+
19
+ - the source link and one line on why it matters;
20
+ - short candidate deliverables only if a choice is needed;
21
+ - for the recommended one: what in this repo already covers it, in one line, after a quick look. Skip a service whose availability check fails when the request is a handoff (`references/delegate.md`).
22
+
23
+ Recommend the request that is a concrete next step for this repo. A product idea for later is a proposal, not the recommended task.
24
+
25
+ ## Then
26
+
27
+ Offer options, recommended first. Use the tool's own question UI when it has one.
28
+
29
+ - **This request, as a plan.** No project yet: `references/init.md`, then `references/plan.md`. The thread is the source for `work/spec/01-research.md` (what was asked, what already exists, constraints, conclusions). An existing project: `references/plan.md` for that request only.
30
+ - **This request, as one task** when it is small or a fix that should not wait: write one task, `waves --write`, `board`, then `references/task.md`.
31
+ - **Another request** from the list.
32
+ - **Not now.**
33
+
34
+ Requests the person sets aside go in `work/proposals.md` (create it if missing): date, link, one line, no task id. Do not turn them into tasks.
35
+
36
+ Do not delegate from the link. After the spec or the task exists, `/lead delegate` proposes the handoff.
37
+
38
+ Do not post back to the thread.
@@ -0,0 +1,26 @@
1
+ # Mockup swarm
2
+
3
+ Run on drafted mockups before confirmation. Use project rubrics from `.lead/local/` when available. Start with two focused perspectives:
4
+
5
+ - **First-time user** reviews whether the next action is clear on each screen, including empty and error states.
6
+ - **Keyboard user** reviews whether the task can be completed using the keyboard, with explicit focus and active states.
7
+
8
+ Give each persona the flows and the same draft mockups. Ask for the screen, the observation, and the change that would resolve it. A clear pass records what the persona checked. Resolve each finding with the lead or the person. Update the mockups for applied findings and carry accepted interaction requirements into `04-acceptance.md`.
9
+
10
+ Add the requested personas and outcomes to the existing frontmatter in `work/spec/03-mockups.md`. Use repo-relative paths. For example:
11
+
12
+ ```yaml
13
+ mockup_swarm:
14
+ personas: [First-time user, Keyboard user]
15
+ findings:
16
+ - persona: First-time user
17
+ finding: The draft empty state did not show how to start.
18
+ decision: applied
19
+ files: [work/mockups/home.html]
20
+ - persona: Keyboard user
21
+ finding: The sequence and focus style are documented for every control.
22
+ decision: clear
23
+ reason: The expanded menu also shows focus returning to its trigger.
24
+ ```
25
+
26
+ For a declined finding use `decision: declined` and a reason. Show the user the decisions and revised mockups before confirmation. Confirming the mockups captures the outcomes and revisions for offline scoring.
@@ -0,0 +1,66 @@
1
+ # /lead plan
2
+
3
+ Goal: one spec in product language (`work/spec/` → `work/spec.md`), mockups for every screen that changes, `work/architecture.md` and `work/contracts/` for the technical side, and task files that reference the spec — in waves. A person confirms the spec before any code.
4
+
5
+ Read `.lead/local.md` and the repo's own instructions first; they override general habits.
6
+
7
+ ## Which case
8
+
9
+ Ask unless the conversation already says:
10
+
11
+ - **New product from wishes or a spec** → stages below, starting at research.
12
+ - **Reverse of a running product X** (study it, write how it works) → `references/reverse.md` for research, then the stages below.
13
+ - **Clean room of X** (rebuild X without its code) → reverse first, then `references/clean-room.md` for the build.
14
+ - **Adopt existing code** (a project without `work/`) → research describes the code as it is; architecture "as is"; tasks only for real gaps.
15
+ - **Feature in existing code** → research reads the affected code; only changed flows and screens.
16
+
17
+ ## Stages
18
+
19
+ Each stage writes its own section in `work/spec/` (`node .lead/lead.mjs scaffold` creates the templates). One stage at a time; for a larger product run each stage in its own subagent so it starts from the files, not from this conversation.
20
+
21
+ | Stage | Section | Writes |
22
+ |---|---|---|
23
+ | research | `01-research.md` | the long note before any design: users and the problem, what already exists, constraints, what is unknown, and a short **Conclusions** list |
24
+ | flows | `02-flows.md` | roles and visibility, journey map, stages with statuses and exit conditions, side effects, numbers (population, window, aggregation), links between records, what is configurable |
25
+ | mockups | `03-mockups.md` + `work/mockups/<screen>.html` | one static HTML per screen (no build step, real labels, empty and error states); the section lists screens and states |
26
+ | acceptance | `04-acceptance.md` | per scenario and screen: browser steps and what must be seen; `needs human` where a browser cannot judge |
27
+
28
+ Rules for every stage:
29
+
30
+ - Write only your section. Do not edit an earlier section; put questions to it under `## Questions to earlier stages` in yours.
31
+ - Product language. Technical decisions go to `work/architecture.md` and `work/contracts/`, not into the spec.
32
+ - `unknown` instead of a guess.
33
+ - After each stage run `node .lead/lead.mjs spec` and show the user the new section.
34
+
35
+ **Research first.** Fill every heading of `01-research.md` before flows, mockups, architecture or tasks. Show the conclusions (a few lines) and the link to the research file. If this request only asked for research, stop and ask to confirm it or name what is wrong. If the same request already asks for later stages (flows, data schema, mockups, tasks), draft those stages in this run and do not stop between them. Confirm a section only when the person says yes to that section. On confirm, `spec --confirm research` (and each other confirmed section), and copy only the research conclusions into the one-pager's `## Research` section, with the link to `spec/01-research.md`. Do not paste the whole research there.
36
+
37
+ **New app.** Once the person names the source product or the new app, create it with the repo's create command, `node .lead/lead.mjs use <name>`, and write the research section. Before `pnpm` (or the create command), use the Node version named in the repo engines and put that Node's `bin` first on `PATH`. Say which path you used. If that binary is missing, say so and stop.
38
+
39
+ **Mockup preview.** To show a file under `work/mockups/`, serve that folder with a local static server and open the `http` URL. Do not open `file://`.
40
+
41
+ **Deep research.** Before writing Conclusions, look for a deep-research tool already in this session: OpenAI Deep Research, Gemini Deep Research, or Perplexity Sonar Deep Research. The kit does not call one and holds no key.
42
+
43
+ If one is available, ask once, with options, recommended first. Do not start it silently: it takes minutes and spends the person's account. Recommend running it when the open questions are about competitors or products outside this repo. Otherwise recommend writing the note from this session.
44
+
45
+ - **Run deep research.** Send the open questions, not the whole repo. When it returns, file the result under the existing headings, name the tool and what was asked, and leave anything it did not check under Unknown. Its report is a source. It is not the spec and it does not go on the one-pager.
46
+ - **Write it here.** Fill the note from this session and say that deep research was offered and declined.
47
+
48
+ No such tool: do not ask. Write the note and add one line under Unknown that deep research was not available.
49
+
50
+ **Mockup swarm (optional).** When requested, follow [mockup-swarm.md](mockup-swarm.md) on the drafts before showing them for confirmation.
51
+
52
+ **Human gate.** After mockups and acceptance, do not stop silently: show what each section decides in one or two lines, link `work/spec.md` and every mockup (checked links), list the open questions, and ask to confirm or to name changes. Then `node .lead/lead.mjs spec --confirm <section>` for each confirmed section; a confirmed section changes only after `--reopen` with the user's agreement.
53
+
54
+ ## Then
55
+
56
+ 1. `work/architecture.md` — components, data, decisions with one-line reasons, out of scope; `work/contracts/` — schema, API shapes, shared types. Contracts are Wave 1 tasks.
57
+ 2. Milestones in the one-pager with `shows` (what can be demonstrated). Use the [project document guide](project-documents.md) for the One Pager, backlog and task notes.
58
+ 3. Task files from the template: goal, checkable criteria, `demo`, `blocked_by`, `touches`, and `spec:` — the sections and screens the task implements (e.g. `spec: [flows#2.3, mockups#settings]`). A task that changes a screen has a criterion "matches `work/mockups/<screen>.html`". Set `owner` to the person running lead (`git config user.name`). Set another person's name only when the plan says they do the work. See **Assignment** in `references/task.md`.
59
+ 4. For screen tasks, list the required `screen / action` browser checks in `qa_required`. Include idle and pointer checks from the accepted interaction criteria. Then run `node .lead/lead.mjs waves --write`, `check` (fix every error), and `board`.
60
+ 5. Show milestones, waves and open questions, and ask one thing: "Confirm the plan and start wave 1?" — on yes, start the ready tasks of wave 1 right away (`references/task.md`; several in parallel when the tool can). Tasks that need a person (a manual check, an access) are listed with what exactly the person should do; they do not hold up the others. Offer `/lead sync` when configured.
61
+
62
+ For each new product feature, specify its own flag key in the task and spec before implementation or delegation. Follow the repo's flag naming and configuration conventions. Record the intended states: code fallback off, dev explicitly on for verification, production off. Specify what users see with the flag off and what QA should verify with it on. Use the same key across the related tasks for that feature.
63
+
64
+ After an authorized local change to a task, plan or One Pager, commit only the Markdown edits for that change on the repo's local `main` when repository rules and checkout state allow it. Review the diff before committing and keep other changes out of the commit, including unrelated changes in a file you edited. Use the repo's allowed branch workflow if direct commits to `main` are prohibited. Preserve user changes in dirty checkouts.
65
+
66
+ Offer remote sync if configured. When the user authorizes it, run the sync procedure in the same turn and honor any per-write approvals required by the repo or service. For an observe-only One Pager, read the current revision and propose the specific row or section change against it. Routine sync keeps the remote record observe-only.
@@ -0,0 +1,18 @@
1
+ # Project documents
2
+
3
+ Use the installed [One Pager](../templates/one-pager.md), [backlog index](../templates/backlog-index.md), and [task note](../templates/task-note.md). Project overrides under `.lead/templates/` take precedence for authoring. The CLI scaffolds the default One Pager and backlog when those files are absent.
4
+
5
+ - Keep the One Pager short. Put source links, a dated status snapshot, evidence, and decisions at the top. Use one collapse with direct task rows per milestone and keep the Gantt labeled as sequence unless dates are agreed. Keep the full backlog and legacy history in linked documents.
6
+ - Use a native checklist for Inbox triage. Checking an item means accepting it into the plan. Show type and priority, and preserve list order among equal priorities.
7
+ - Keep intake proposals in the backlog and draft their notes under `work/task-notes/`. Promote an agreed item to a lead task in `work/tasks/` and move its proposal out of the active inbox. Write its full specification in `work/task-specs/<task-id>.md` from the task note template. Keep the proposal linked as source evidence.
8
+ - Publish task specifications under the product's FuseBase **Tasks** folder. Before sync, map the verified existing folder in `work/sync.json` as `fusebase.tasksFolder: {id, title}` or verify that the folder is absent. An existing mapped specification outside Tasks needs an in-place move and a verified `parentId` update before the CLI will plan a content update.
9
+ - The task spec starts with links to the epic, Jira Story, proposal, mockup and One Pager. Verify the targets before publication. For a task outside Jira, mark the Jira links `N/A — <reason>` where applicable. A task without a screen can mark the mockup the same way. All task specs require Goal, a Mermaid User flow, Technical design, Decisions, Acceptance criteria and Out of scope. Use `sync-plan --preview` to see why a spec was held back. Jira workflow status, lead acceptance, merge, QA, and deployment are separate observations.
10
+ - Put a Story's verified confirmation video under `## Evidence video` in its existing task spec. Use a link that the private note's intended readers can open. After the section is published, the generated One Pager links directly to the task note's `#evidence-video` section. For an adopted or observe-only One Pager, propose a row edit from the latest remote revision and apply only with specific approval. Check that the row opens the right heading and that the video is visible to the intended audience.
11
+ - Name the source and denominator behind every metric. Generated FuseBase metrics count completed lead task rows. A milestone with no rows shows evidence pending. Keep Jira metrics separately labeled when carrying them over from legacy documents.
12
+
13
+ ## Adopt existing records
14
+
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
+ 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 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
+ 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.