@fusebase/harness-lead 0.0.0-stage → 0.2.41
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 +190 -0
- package/README.md +132 -2
- package/dist/lead.mjs +11435 -0
- package/package.json +41 -4
- package/skills/crew-lead/SKILL.md +5 -0
- package/skills/lead/SKILL.md +97 -0
- package/skills/lead/delegates/codee/SKILL.md +76 -0
- package/skills/lead/delegates/guides/SKILL.md +37 -0
- package/skills/lead/references/clean-room.md +10 -0
- package/skills/lead/references/delegate.md +41 -0
- package/skills/lead/references/goal.md +37 -0
- package/skills/lead/references/help.md +29 -0
- package/skills/lead/references/init.md +17 -0
- package/skills/lead/references/intake.md +38 -0
- package/skills/lead/references/mockup-swarm.md +26 -0
- package/skills/lead/references/plan.md +66 -0
- package/skills/lead/references/project-documents.md +18 -0
- package/skills/lead/references/qa.md +31 -0
- package/skills/lead/references/reverse.md +29 -0
- package/skills/lead/references/review.md +19 -0
- package/skills/lead/references/score.md +10 -0
- package/skills/lead/references/status.md +8 -0
- package/skills/lead/references/sync.md +64 -0
- package/skills/lead/references/task.md +73 -0
- package/skills/lead/references/visual.md +26 -0
- package/skills/lead/references/watch.md +33 -0
- package/skills/lead/references/workspace.md +9 -0
- package/skills/lead/scorers/mockup_persona/scorer.md +18 -0
- package/skills/lead/scorers/qa_pointer_pass/scorer.md +20 -0
- package/skills/lead/scorers/task_compliance/scorer.md +17 -0
- package/skills/lead/templates/backlog-index.md +20 -0
- package/skills/lead/templates/one-pager.md +68 -0
- package/skills/lead/templates/task-note.md +35 -0
- package/skills/lead-goal/SKILL.md +10 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Browser QA
|
|
2
|
+
|
|
3
|
+
Use when `.lead/config.yml` has `qa` (`run`, `url`, `ready`) and the change touches a screen, and for `/lead qa milestone`.
|
|
4
|
+
|
|
5
|
+
1. Start the app with `qa.run` (expand `{name}`, `{path}`) in the task worktree, in the background; wait for `qa.ready` in its output or for `qa.url` to answer. Stop it when done. If you leave it running for the user, re-check the address right before you send it.
|
|
6
|
+
2. Drive a real browser. Screenshots alone are not the pass. Use computer use or a browser tool that can actually perform the required pointer action: drag, drop, hover, connect, or resize. If available tools cannot perform it, record it as `blocked` with the reason. Follow the scenarios in `work/spec/04-acceptance.md` that the task's `spec:` refers to (all of them for a milestone).
|
|
7
|
+
3. For each scenario record: steps, what was seen, pass/fail. Compare each screen with `work/mockups/<screen>.html` — layout, labels, states (empty, error, overflow); differences in content or behaviour are failures, pixel offsets are not.
|
|
8
|
+
4. Use the pointer and look for interaction that a still screenshot hides. These are failures when the task claims the screen works:
|
|
9
|
+
- an affordance stuck on: handles, dots, rings, or a toolbar that stay visible with nothing selected and nothing hovered;
|
|
10
|
+
- drag that does not start, does not follow the pointer, or snaps back;
|
|
11
|
+
- a control that has only one state, overlaps another control, or has no idle, hover, and selected look.
|
|
12
|
+
A screen that matches the labels and still feels unfinished is not a pass. Write what is clumsy (one line each) and, if it is outside this task, a new task with a proposed mockup, as in step 6.
|
|
13
|
+
5. Also check: browser console errors and warnings; failed network requests; keyboard reachability and visible focus; contrast of text and controls (WCAG AA); light and dark themes if the app has both; inputs with `<script>`, very long text and unicode do not break the page or execute.
|
|
14
|
+
6. Save screenshots and the console log in `.lead/logs/qa/<task or milestone>/` and list them in the task file next to the criteria they prove. Include one shot of the idle screen (nothing selected) and one shot mid-drag when the screen has cards or connectors.
|
|
15
|
+
7. A UX problem outside the task's scope is not fixed in place: write it as a new task with a proposed mockup (`work/mockups/<screen>-proposal.html`).
|
|
16
|
+
8. Mark what a browser cannot judge (complex editors, real devices, third-party sign-in) as `needs human` and say why. A drag or a hover that you did not try is not `needs human`; it is an unrun check.
|
|
17
|
+
9. For a task, use the `qa_required` list in task frontmatter. Each item names one check as `screen / action`. Cover idle and the required interactions, including accepted mockup feedback. For the first screen of a milestone, include idle, hover, and active states for each applicable control. If an older screen task has no list, record the required actions in the task before handoff.
|
|
18
|
+
10. Save the structured results as a JSON array under `.lead/logs/qa/` in the main checkout and run `node .lead/lead.mjs qa-record <task> --session <id> --input <file>`. Include one item for every required check. Use `pass`, `fail`, `blocked`, or `not_run`, describe what you saw or why a check is blocked, and link any saved evidence files.
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
[
|
|
22
|
+
{
|
|
23
|
+
"check": "Board / drag card",
|
|
24
|
+
"result": "pass",
|
|
25
|
+
"observation": "The card followed the pointer and stayed in the target column after drop.",
|
|
26
|
+
"evidence": [".lead/logs/qa/T-005/drag.png"]
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Required checks must all pass for the checked code before `finish` can hand off the task. After code changes, repeat the affected QA and record the full result for the new code.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Reverse a running product
|
|
2
|
+
|
|
3
|
+
Goal: `work/spec/01-research.md` that lets someone rebuild the same user journeys and numbers without seeing the product's code. It describes behaviour, screens and rules — not the source tree.
|
|
4
|
+
|
|
5
|
+
## Before starting
|
|
6
|
+
|
|
7
|
+
- What X is: a Docker image or compose file, a repo, or a running local URL. Read its license and write it at the top of the section. A license that forbids studying or reimplementing, or an unclear one → ask the user before going further.
|
|
8
|
+
- Run X only locally. Keep the clone or volumes **outside the project repo** (e.g. `~/.lead/sources/<x>`). Never point X at production data or other hosts; use the sample data X ships with, or data you create.
|
|
9
|
+
- A download needs a yes, unless this conversation already asks to install or pull X. Then name the images and the size and start. If the size cannot be read, write "size unknown" and continue.
|
|
10
|
+
- If the vendor's own init fails on this machine, patch only the copy under `~/.lead/sources/<x>`, recreate the local volumes, and write the breakage in the research section. Do not patch the project repo to make X start.
|
|
11
|
+
- Credentials: only those the user gives or that X's local setup prints; never write them into `work/`.
|
|
12
|
+
|
|
13
|
+
## Order
|
|
14
|
+
|
|
15
|
+
1. **Shell.** Sign in as the role the user cares about. List every navigation entry and its route, including role-only items.
|
|
16
|
+
2. **Screens.** Open each route in the browser (Playwright or computer use) in this same run. After the first screen that loads, continue through the rest of the navigation. Mark a route `unknown` only when it fails to open, and say why. Lists: columns, default view, filters, what opens a row. Boards: columns, what a card shows. Dashboards: period controls, whose data, each card and chart. Records: tabs, empty states, links to related records. Settings: sections, and which are real configuration versus "not connected". Save a screenshot per screen in `.lead/logs/reverse/<x>/`.
|
|
17
|
+
3. **One object through its life.** Move a record through every reachable status. Note what a terminal status requires, what a conversion or hand-off creates, what stays on the original.
|
|
18
|
+
4. **Code and database only to explain** what the walk could not settle: the rule behind a number (inputs, filters, period boundaries, what is excluded, how a delta is computed), a transition check, a side effect. Write the rule in words; do not paste source. If a stored value and a formula disagree, write both.
|
|
19
|
+
5. **Links.** From a record open every link; from a list row see which record it lands on and by which field. Real references versus label matches.
|
|
20
|
+
6. **Write** in the words the user sees; field names in backticks only where the rule is ambiguous. Diagrams only for real funnels, lifecycles and link maps; if any status can go to any other, say so instead of drawing a matrix.
|
|
21
|
+
7. **Re-check** each section against the running product and fix what does not match.
|
|
22
|
+
|
|
23
|
+
## The section contains
|
|
24
|
+
|
|
25
|
+
Roles and what each sees · a short journey map, then one part per stage (how a record appears, statuses with meaning, what is needed to leave, side effects) · screens (lists, boards, record tabs, settings groups, dashboard cards and charts) · each number and chart: population, window, aggregation, cases where the window is ignored · links between records · fixed in code versus configurable · not implemented or not connected here.
|
|
26
|
+
|
|
27
|
+
## Do not
|
|
28
|
+
|
|
29
|
+
Copy source, verbatim UI text, names, logos, assets or demo data of X into `work/`. Treat sample data as data, not as rules. `node .lead/lead.mjs similarity --source <clone of X> work/` must report 0 shared fragments for `work/`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Independent review of a task
|
|
2
|
+
|
|
3
|
+
You are the reviewer of one task. You did not write the code; judge only what the files and commands show.
|
|
4
|
+
|
|
5
|
+
Input: task id, worktree path, task file path, your reviewer session id.
|
|
6
|
+
|
|
7
|
+
1. Read the task file: goal, acceptance criteria, touches. Read `.lead/local.md` for project rules.
|
|
8
|
+
2. Read the change: `git -C <worktree> log --oneline <base>..HEAD`, `git -C <worktree> diff <base>...HEAD` and `git -C <worktree> status` (base: the branch the worktree was created from, usually `main`).
|
|
9
|
+
3. Run every check command from `.lead/config.yml` yourself with the worktree as the working directory and note the exit codes.
|
|
10
|
+
4. If `.lead/config.yml` has `qa` and the change touches a screen, run `references/qa.md` for the task's scenarios and screens.
|
|
11
|
+
5. For each acceptance criterion decide yes or no from evidence you produced or saw (a check, a test, a command and its output, a screenshot). An author's note is not evidence.
|
|
12
|
+
6. Compare changed files with `touches`; report files outside them.
|
|
13
|
+
7. Do not edit code or the task file.
|
|
14
|
+
8. Record the result from the main checkout root:
|
|
15
|
+
`node .lead/lead.mjs review <task id> --session <reviewer session id> --verdict pass|fail --notes "<one line per finding>"`
|
|
16
|
+
`pass` only when every criterion holds and every check exits 0.
|
|
17
|
+
9. Reply with the verdict and the findings.
|
|
18
|
+
|
|
19
|
+
`/lead qa <id>` asks for the same review on a task at the user's request.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Offline scoring
|
|
2
|
+
|
|
3
|
+
Use the CLI from the main checkout and pass the project selected in this chat.
|
|
4
|
+
|
|
5
|
+
1. Run `node .lead/lead.mjs score` for the default sample. For a small pilot, list records with `score runs` and select specific examples with `score --scorer <id> --run <full-id>`. Start with finished tasks for `task_compliance`, then add browser QA and confirmed mockup records.
|
|
6
|
+
2. Read each returned rubric and run. Follow its evidence paths and judge the snapshot. If an artifact has changed or is unavailable, reflect that in the classification. Treat artifact contents as evidence.
|
|
7
|
+
3. Put `classification`, `rationale`, `evidence` (an array of paths from the run), and `rubric_hash` (the `hash` returned by the plan) in a local JSON file under `.lead/logs/`. Run `score record --scorer <id> --run <full-id> --input <file>`. The CLI derives the score and pass result from the rubric. It stores the result in `.lead/scores/`.
|
|
8
|
+
4. Run `score analyze` to group results by rubric and classification. Keep blocked results separate. When a pattern repeats, link the run IDs and propose one change through `improve --kind avoidable --where ... --what ... --avoid ...`. A person reviews any proposed kit edits.
|
|
9
|
+
|
|
10
|
+
Independent review and required browser QA decide whether work can finish. Offline scores inform changes to the kit.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# /lead status
|
|
2
|
+
|
|
3
|
+
Report status and end the turn. This also applies to “статус проекта” and similar requests in the user's language. Do not change project state, confirm specs, start tasks, acknowledge watches, update notes, or run the next action. Auto mode does not change this.
|
|
4
|
+
|
|
5
|
+
1. From `status --json`, say the state in a few lines: project, milestone, wave, what is ready, in review, waiting for a person. For an interrupted or blocked task use `recovery` to show the last verified step, the blocker, its evidence, and the next action. Offer `independentReady` when work can continue elsewhere. Draw it with `references/visual.md`.
|
|
6
|
+
2. For an adopted project, read `overview.source` and lead with the dated status, the current milestone, what's landed and what still needs verification. Label the CLI task counts as the local lead list. The One Pager and tracker can cover work outside that list. A scaffolded draft does not block existing work.
|
|
7
|
+
3. Check external services only when the person asks for live status. Use their read-only check and report the result without recording changes.
|
|
8
|
+
4. End with the next decision supported by the evidence. Wait for the person.
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# /lead sync
|
|
2
|
+
|
|
3
|
+
Goal: FuseBase and Jira mirror `work/` of the current project. The repo is the source of truth; never copy remote edits into `work/` without the user's agreement.
|
|
4
|
+
|
|
5
|
+
Needs the `sync` section in `.lead/config.yml`. Without it, say sync is not configured and stop.
|
|
6
|
+
|
|
7
|
+
**Access.** Sync runs with the developer's own access. Before the first write check that the Gate MCP and Atlassian MCP tools are available and can read the configured parent folder and epic. If one server is missing, name that server and the consent the host asks for, skip only that half, and continue with the other. If a Jira read says the site is not granted, ask the person to grant `sync.jira.site` and retry that read. An explicit `/lead sync` authorizes running the procedure. Follow the repository's per-write approval rules and the note update approval below before applying the plan.
|
|
8
|
+
|
|
9
|
+
## Loop
|
|
10
|
+
|
|
11
|
+
Before first sync of existing records, follow [project document adoption](project-documents.md). Inspect the local mapping and show `sync-one-pager` plus `sync-plan --preview` before proposing remote writes. Inspect the active One Pager folder with a read-only listing. Exclude subfolders named `archive` or `_archive`, including nested content. Do not fetch, adopt, synchronize, or trash their contents. Verify the current location of mapped notes before applying a plan if they could have been moved. Record their folder path in `work/sync.json` when known.
|
|
12
|
+
|
|
13
|
+
0. **Pull first.** For each active note in `work/sync.json`, `getWorkspaceMarkdownNote`. Notes marked observe-only are evidence. If a managed note's `revision` differs from the recorded one, compare the remote text with `work/sync-base/<key>.md` and turn each change into a proposed edit of `work/`:
|
|
14
|
+
- a new `::check[...]` or bullet in a milestone → a new task file in that milestone (goal and criteria from the text; ask what is unclear);
|
|
15
|
+
- a check moved to another milestone's checklist → `milestone:` of that task; a changed order or a priority word (High, Low…) → `wave` / order or a note in the task;
|
|
16
|
+
- `done="true"` on a task that is not done → do not mark it done; tell the user that lead marks done after checks and review, and ask whether to start or review it;
|
|
17
|
+
- edited human text (Status, Risks, FAQ) → the same text in `work/one-pager.md`;
|
|
18
|
+
- a changed Jira sub-task summary or status made by people → show it and ask whether to copy it.
|
|
19
|
+
Show the list as numbered options ("apply all", "pick", "skip") and change `work/` only after the user agrees. Then run `node .lead/lead.mjs board` and continue: the push below overwrites the note with text that now includes the accepted changes; changes the user rejected are listed in the update approval so nobody loses them silently.
|
|
20
|
+
1. `node .lead/lead.mjs board --project <name>` so generated documents are fresh.
|
|
21
|
+
2. Show `node .lead/lead.mjs sync-plan --preview --project <name>` before writes. It lists blocked task specs and pending, deferred, recorded, and uncertain actions. Verify the Tasks folder under the product and each task spec link. Leave incomplete specs pending. Then generate the numbered executable plan with `sync-plan --project <name>`.
|
|
22
|
+
3. Before each authorized remote call, run `sync-attempt --project <name> --id <n>` and keep its action reference. Record the result right after it succeeds with `sync-record --project <name> --action <ref> --result '<json>'`.
|
|
23
|
+
4. Repeat from step 2: new actions appear once their parents exist (notes after the folder, sub-tasks after the story).
|
|
24
|
+
5. After publishing the One Pager, read its Markdown back into a local file and run `sync-one-pager --input <file>`. Verify roadmap and Inbox membership, completion flags, progress, and note links. Report mismatches and show the result with links.
|
|
25
|
+
6. `work/sync.json` is shared state: without it the next sync creates duplicates. Tell the user to commit it now (with the task files), or commit it when the user agrees.
|
|
26
|
+
|
|
27
|
+
If a call fails before its outcome is known, show the uncertain entry and check remote state before retrying. If the intended remote change exists, reconcile it using `sync-record --action <ref>` and the verified result, even after replanning. If the remote change did not occur, use `sync-attempt --id <n> --retry` on the current plan. If the old action has since been superseded, clear it with `sync-attempt --action <ref> --discard` after verifying that it had no remote effect. Refresh the preview after reconciliation.
|
|
28
|
+
|
|
29
|
+
**Note updates need one approval per sync.** Replacing a note's content is a destructive write in Gate. Before performing any `fusebase.note.update`, collect all of them from the plan, show the user one diff per note (remote text → new text) and ask once: "Update these N notes?". Perform them only after a clear yes in this conversation; otherwise skip them and say they are pending. Gate may answer with `CONFIRMATION_REQUIRED`; after the user's yes, use `confirm: true` inside `args`. Follow the repository's authorization rules for Jira changes.
|
|
30
|
+
|
|
31
|
+
## Actions
|
|
32
|
+
|
|
33
|
+
FuseBase — Gate MCP `tool_call` with `orgId` = `org`, `workspaceId` = `workspace`:
|
|
34
|
+
|
|
35
|
+
| kind | call | record `--result` |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `fusebase.folder.create` | `createWorkspaceNoteFolder`, body `{parentId, title}` | `{"id": "<folder global id>"}` |
|
|
38
|
+
| `fusebase.note.create` | `createWorkspaceMarkdownNote`, body `{parentId, title, markdown}` | `{"id": "<note id>", "revision": "<revision>"}` |
|
|
39
|
+
| `fusebase.evidence.create` | `createWorkspaceMarkdownNote`, body `{parentId, title, markdown}` | `{"id": "<note id>"}` |
|
|
40
|
+
| `fusebase.evidence.attach` | `createTempStoredFileUpload` for the file, PUT the bytes of `file` to the returned URL with the returned headers (`curl --upload-file`), then `addWorkspaceMarkdownNoteAttachment` on `noteId` with the stored file | `{"url": "<attachment url>"}` |
|
|
41
|
+
| `fusebase.note.update` | first `getWorkspaceMarkdownNote` (`noteId`). If its `revision` ≠ `baseRevision`, people edited the note: show the user the difference between the remote text and `markdown`, ask whether to overwrite, and skip the action unless they agree. Then `updateWorkspaceMarkdownNoteContent`, body `{markdown, revision: <current revision>}` | `{"revision": "<new revision>"}` |
|
|
42
|
+
|
|
43
|
+
Jira — Atlassian MCP, `cloudId` = `site`:
|
|
44
|
+
|
|
45
|
+
| kind | call | record `--result` |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `jira.story.create` | `createJiraIssue`: project, issue type `issueType`, summary, description (markdown), parent = `epic`, assignee = your own account (`atlassianUserInfo` → account id, once per sync) | `{"key": "<issue key>"}` |
|
|
48
|
+
| `jira.story.update` | `editJiraIssue`: summary, description | `{}` |
|
|
49
|
+
| `jira.subtask.create` | `createJiraIssue`: project, issue type `issueType`, parent = `parent`, summary, description, assignee = your own account. Then, if `jiraStatus` is not the initial status, move it as in `jira.subtask.transition` | `{"key": "<issue key>"}` |
|
|
50
|
+
| `jira.subtask.update` | `editJiraIssue`: summary, description | `{}` |
|
|
51
|
+
| `jira.subtask.transition` | if the issue already has `jiraStatus`, no call. Else `getTransitionsForJiraIssue` and `transitionJiraIssue` with the transition whose target status name equals `jiraStatus`. No such transition → tell the user the available ones and do not record | `{}` |
|
|
52
|
+
| `jira.comment` | `addCommentToJiraIssue` with `body` | `{}` |
|
|
53
|
+
|
|
54
|
+
## Rules
|
|
55
|
+
|
|
56
|
+
- Preserve mapped folder and note IDs. Sync does not recreate or trash a record because its title changed. For `planning: adopted`, the existing One Pager and legacy Jira statuses are observe-only. Create new work only under verified existing parents. The status mapping applies to lead-managed tasks.
|
|
57
|
+
- For epic reconciliation, list loose open children, open items missing from the One Pager, and parent stories whose state disagrees with their open children. Propose a parent in the existing structure for each loose item. Recommend review only when an open child is in review, and QA only when all remaining open children are in QA. Report the observed statuses and proposed changes separately. Do not apply reparenting, ranking, or workflow changes as part of routine sync.
|
|
58
|
+
- Assign created issues only to yourself (the owner of the Jira access); never to other people or to automation accounts. Do not set statuses or labels that start a worker: only a delegate skill may do that, and only for its own handoff. Sync uses only the fields above.
|
|
59
|
+
- Do not create anything outside `parent_folder` and `epic` from the config.
|
|
60
|
+
- Jira through MCP cannot attach files or add web links: evidence lives in the FuseBase evidence note and the issue description links to it, the merge request and the app (`sync.links`).
|
|
61
|
+
- Set `sync.links.repo` (and `app`) in `.lead/config.yml` so relative links become real addresses; without it they stay plain text.
|
|
62
|
+
- Commit `work/sync.json` and `work/sync-base/` together.
|
|
63
|
+
- `work/sync.json` holds remote mappings and sync metadata. Keep tokens and secrets out of it.
|
|
64
|
+
- Sync when the user asks, before a team call, or when they accept the push-and-sync offer at the end of their request (SKILL.md). Do not sync on every round or after each task, and do not sync until they agree.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# /lead task
|
|
2
|
+
|
|
3
|
+
Goal: the task reaches a human with every acceptance criterion `pass`, checks recorded on the final code, and a passing independent review. Done means `finish` succeeded — nothing else.
|
|
4
|
+
|
|
5
|
+
## Assignment
|
|
6
|
+
|
|
7
|
+
`owner` is the person accountable. On a new task, and on `start` when `owner` is empty, set it to the person running lead: `git config user.name`. Do not leave a new task without an owner.
|
|
8
|
+
|
|
9
|
+
A service does not replace the owner. `delegate` is who does the work (Codee, Guides). The owner stays the person who asked. Both appear on the one-pager: the person, then the service.
|
|
10
|
+
|
|
11
|
+
Another person: set `owner` to their name. Talk to them through the Jira issue for that task. Do not assign the Jira issue to them from the display name; the sync assignee stays the person running sync, and only the Codee skill assigns Codee. A direct line to their agent, or another protocol, is not built yet. If their notes live in `work/`, link that file from the task. Do not invent a second status for them.
|
|
12
|
+
|
|
13
|
+
## Pick
|
|
14
|
+
|
|
15
|
+
- With an id: that task. Without: this session's task in progress first, then the ready tasks of the current wave from `status --json`. Several ready and the user wants them all: take one here and give a line per other task to start it in a new session (`claude "/lead task T-016"`).
|
|
16
|
+
- A task that waits for other tasks cannot start; say which ones.
|
|
17
|
+
|
|
18
|
+
## Start
|
|
19
|
+
|
|
20
|
+
1. `node .lead/lead.mjs start <id> --session <id> --tool <claude-code|codex>` — claims the task, creates its branch and a worktree under `.claude/worktrees/<id>`.
|
|
21
|
+
2. All code changes happen inside the worktree path; run project commands with that directory as the working directory. The task file stays in the main checkout's `work/tasks/`.
|
|
22
|
+
3. Read `work/spec.md` whole (not only the sections the task names), the task file, `work/architecture.md` and `.lead/local.md`. If the task conflicts with the spec, stop and ask; do not change a confirmed spec section. If an acceptance criterion cannot be checked by a command or a concrete observation, rewrite it with the user before coding.
|
|
23
|
+
|
|
24
|
+
## Feature flags
|
|
25
|
+
|
|
26
|
+
Implement a new product feature behind the dedicated flag named in its task. Use the repo's existing flag provider and keep the code fallback off. Verify that the existing behavior still works with the flag off and that the new flow works with it on. Enable the flag explicitly in dev through the repo's configured provider, such as Unleash, when that change is authorized. Keep production off. If dev enablement is pending, record what is needed and which checks remain unverified.
|
|
27
|
+
|
|
28
|
+
An authorized, small flag wiring change can proceed in the same turn while delegated work is open, once you confirm it is independent of the delegated diff and branch. Keep the patch scoped, run the relevant checks, and use the repo's permitted dev delivery path in that turn. Use a direct push to the dev branch only if repository rules and permissions allow it. Keep the flag off until it is explicitly enabled in the provider. Update the task notes so later work uses the same flag key.
|
|
29
|
+
|
|
30
|
+
## Goal
|
|
31
|
+
|
|
32
|
+
A goal mode (Cursor Goal, or another tool in this session that keeps working until it marks an objective complete) may run this one task. It may not run a milestone, a wave, or "finish the product". The kit does not start a goal by itself.
|
|
33
|
+
|
|
34
|
+
After the criteria are checkable, if such a tool is available, ask once. Options, recommended first: run this task as a goal; work the task in this session without one. Do not start the goal before the answer.
|
|
35
|
+
|
|
36
|
+
The objective you pass is only:
|
|
37
|
+
|
|
38
|
+
- the task id, goal, and demo;
|
|
39
|
+
- every acceptance criterion, as the only definition of done;
|
|
40
|
+
- stop without calling the goal complete when a criterion cannot be checked, when the same check fails a second time, or when a limit in Progress is reached — then `block` and return to this session;
|
|
41
|
+
- do not confirm a spec, merge, close a milestone, push, or set a Jira `[AI]` status.
|
|
42
|
+
|
|
43
|
+
When the goal stops, this session still runs Review and Finish. The goal's own complete flag is not `finish`. No goal tool: do not ask, and work the task here.
|
|
44
|
+
|
|
45
|
+
## Progress and limits
|
|
46
|
+
|
|
47
|
+
- After each step (start, every `record-checks`, review sent, review verdict, finish) write one short progress line to the person: what just happened and what comes next. A long run must never be silent for more than one step.
|
|
48
|
+
- Limits from `.lead/config.yml`: `limits.rounds` (do-and-check rounds), `limits.reviews` (independent reviews), `limits.minutes` (wall time on one task, from `start`). When one is reached, stop: say what is done, what is left, and offer options — accept and finish with the remaining findings listed, split them into new tasks, or continue with a new limit.
|
|
49
|
+
- Review findings outside the task's acceptance criteria are not fixed in this task: they become new tasks (or notes in the summary). Only failed criteria and broken checks send the task back.
|
|
50
|
+
|
|
51
|
+
## Rounds
|
|
52
|
+
|
|
53
|
+
1. Change the code.
|
|
54
|
+
2. `node .lead/lead.mjs record-checks <id> --session <id>` — runs the configured checks in the worktree and records them. Read its output.
|
|
55
|
+
3. Update each criterion in the task file: `pass` only with evidence written next to it (check name, test name, command and its output); `fail` with the reason; `not_tested` when not verified. A check that did not run because a local service or secret is missing stays `not_tested`. If the project already says how to start that service, start it and run the check. If you cannot, name the daemon and the address. Do not skip the criterion. Do not finish the task.
|
|
56
|
+
4. Failures → fix and repeat. The CLI says when the round limit is reached: then `node .lead/lead.mjs block <id> --session <id> --question "<what you need decided>"`, tell the user the question, and stop.
|
|
57
|
+
5. Need a human decision at any point → `block` with the question and stop. Do not guess on product decisions.
|
|
58
|
+
|
|
59
|
+
The Stop hook keeps the session working while the code changed after the last `record-checks`. Its reminder means: run `record-checks` (or `block` if you are waiting for a human).
|
|
60
|
+
|
|
61
|
+
## Review
|
|
62
|
+
|
|
63
|
+
When every criterion is `pass`:
|
|
64
|
+
|
|
65
|
+
1. Commit in the worktree: `git -C <worktree> add -A && git -C <worktree> commit -m "<id>: <what changed>"`.
|
|
66
|
+
2. Get an independent review: start a subagent (Claude Code: Agent tool; Codex: a subagent or `codex exec`) that has not seen this conversation. Give it only: task id, worktree path, task file path, reviewer session id `review-<task id>-<n>`, and the instruction "Follow references/review.md of the lead skill". Do not pass your reasoning or summary.
|
|
67
|
+
3. Verdict `fail` → address the findings in a new round, then review again.
|
|
68
|
+
|
|
69
|
+
## Finish
|
|
70
|
+
|
|
71
|
+
1. `node .lead/lead.mjs finish <id> --session <id>`. If it lists blockers, resolve them; never edit status fields to get around it.
|
|
72
|
+
2. `node .lead/lead.mjs board`.
|
|
73
|
+
3. Use SKILL.md, Mode to determine whether this MR qualifies for auto-merge. Use `merge-hold` before the merge, `glab mr merge <iid> --repo <group/project> --yes` for the merge, and `merge-release` when it returns. If the hold fails, leave the merge to the other chat. When the host may hold the merge for approval, handle independent work first. Fetch and verify the published default branch before `finish --merged`. Report the actual target, checks, review verdict and any remaining verification. In `approve`, name the branch and wait. When `can_show: deployed` is set, a task counts as demo-ready only after someone saw it working on dev and its file has `deployed: <date>`; set it only from that evidence. When verifying dev for a delegated task, read its service skill for any documented evidence follow-up and honor the repo's approval rules. Sync to shared notes follows SKILL.md after the request is complete.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Visuals in the reply
|
|
2
|
+
|
|
3
|
+
The chat already draws. Use that. Do not add a widget library, a server, or a fixed dashboard.
|
|
4
|
+
|
|
5
|
+
Read the host's visualize skill before drawing (Cursor: the `visualize` skill). It chooses a table, Mermaid, or inline HTML. Follow it. Lead only says when a picture is the point.
|
|
6
|
+
|
|
7
|
+
## When
|
|
8
|
+
|
|
9
|
+
Draw when the answer is a state, an order, or a stretch of time. A sentence can sit above the picture. Do not draw the same facts again as a long list under it.
|
|
10
|
+
|
|
11
|
+
Priority cases:
|
|
12
|
+
|
|
13
|
+
| You are showing | Prefer |
|
|
14
|
+
|---|---|
|
|
15
|
+
| `/lead status`, a board, waves | Mermaid `gantt`. One row per task in wave order. Sections are the statuses (`in_progress`, `review`, `ready`, `done`). Dates are a reading order, as in `lead how`, not a calendar |
|
|
16
|
+
| A wait (pipeline, review, a delegated check) | A short timeline: what is running, since when, and what this session does meanwhile |
|
|
17
|
+
| Counts by status | A compact table or one bar per status. Skip a chart of a single number |
|
|
18
|
+
| A flow, a dependency, who blocks whom | A Mermaid flowchart of the tasks and `blocked_by` |
|
|
19
|
+
|
|
20
|
+
Anything else that is clearer as a diagram, you choose: table, Mermaid, or inline HTML. One picture per reply unless the person asks for more.
|
|
21
|
+
|
|
22
|
+
## Do not
|
|
23
|
+
|
|
24
|
+
- Invent dates, counts, or statuses. Use `status --json`, the task files, and the pipeline output.
|
|
25
|
+
- Draw a picture for a one-line fact.
|
|
26
|
+
- Ship a reusable component in the repo for this. The picture lives in the reply.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# /lead watch
|
|
2
|
+
|
|
3
|
+
A local clock for tasks that already have `delegate:`. It does not hand work off and it does not call a service by itself. Default gap is 15 minutes. The shortest gap is 5 minutes.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
/lead watch on or off, the gap, whether a check is due
|
|
7
|
+
/lead watch start start the clock. Add --close to let a finished milestone close without asking
|
|
8
|
+
/lead watch stop stop it
|
|
9
|
+
/lead watch interval 15m 15m, 30m, 1h. The running clock picks this up on the next gap
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Run `node .lead/lead.mjs watch ...` for the same words. State is `.lead/watch.json` (not in git). One clock per machine.
|
|
13
|
+
|
|
14
|
+
## When a check is due
|
|
15
|
+
|
|
16
|
+
`status` says `check due`, or the session start line says the watch is on and a check is due. Then:
|
|
17
|
+
|
|
18
|
+
1. `node .lead/lead.mjs delegate check --json`.
|
|
19
|
+
2. For each task that is not `done`, follow the Check section of its service skill. A due watch in auto mode can also perform documented follow-up when the decision is already made and the required authorization is in place. If approval is required, report the exact proposed changes and wait. Explicit status and delegate checks are read-only.
|
|
20
|
+
3. Record the service status, ref, date, and any action taken or required under `## Notes` in the task file. Then run `board`.
|
|
21
|
+
4. Do not merge on a watch tick or mark a task done from the service status. `finish --merged` only when the branch is already merged, the same rule as any other task.
|
|
22
|
+
5. After assessing the actionable items, run `node .lead/lead.mjs watch ack` so the same tick is not done twice.
|
|
23
|
+
6. Report changes and actionable waits even when the status stayed the same. Name the open question, failed check, or approval needed and who can resolve it. Do not post to a messenger.
|
|
24
|
+
|
|
25
|
+
## Closing a milestone
|
|
26
|
+
|
|
27
|
+
Without `--close`, a finished milestone still waits for the person (`milestone_done`).
|
|
28
|
+
|
|
29
|
+
With `--close`, when every task of the current milestone is `done`, say that it is closed and go on to plan the next one from what the one-pager already lists. Do not invent a milestone, do not push, and do not move a Jira issue into an `[AI]` status.
|
|
30
|
+
|
|
31
|
+
## A check while nobody has a session open
|
|
32
|
+
|
|
33
|
+
The clock only marks the check due. To run it with no chat open, set `LEAD_WATCH_COMMAND` in the environment of the process that starts the watch to a headless agent command whose prompt is: read `references/watch.md` and run the due check in this repo. The kit does not pick that command.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Lead workspace
|
|
2
|
+
|
|
3
|
+
The workspace root may contain multiple independent Git repositories. The shared kit manages them through a catalog at `.lead/workspace.yml`. Repository state and app structure stay in each checkout.
|
|
4
|
+
|
|
5
|
+
1. Reuse the host session ID if the SessionStart hook supplied one. Otherwise create one once per conversation. At the workspace root, when the user names the repository they want to work in, run `workspace use <repo> --session <id>`. When the user selects an app, run `workspace use <repo> --project <app> --session <id>` to pin it too. Require an explicit switch before changing a bound target.
|
|
6
|
+
2. Resolve `status --json --session <id>` using the conversation's original directory as `--cwd`. A `choose_repo` result means the workspace has no target yet. A repository session infers its checkout and an app session inside its app folder also infers the app.
|
|
7
|
+
3. Use the resolved repository's main checkout as the working directory for lead, Git, code search and edits. After starting a task, use the task worktree for code changes and its checks. Read that project's `AGENTS.md` and lead local rules. Keep passing the same session and chosen project. Run explicit switches from the workspace root.
|
|
8
|
+
4. For `/lead overview` or a request for all projects, run `workspace overview --json`. Summarize the registered projects and optionally list unregistered checkouts as candidates. This reads local plans only and preserves any thread binding.
|
|
9
|
+
5. To collect harness improvements across projects, run `workspace improve --json`. Group related entries in the report and cite the source path and line. Distinguish an empty or missing log from an unavailable checkout. The command only reads registered repositories and preserves the thread binding.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mockup_persona
|
|
3
|
+
version: 1
|
|
4
|
+
applies_to: mockup
|
|
5
|
+
sample_rate: 0.1
|
|
6
|
+
pass_threshold: 1
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Mockup persona feedback
|
|
10
|
+
|
|
11
|
+
Check the confirmed mockup snapshot. Verify that each planned persona assessed its criterion and that every finding has a recorded outcome. For applied feedback, check whether the linked mockup and the finding agree. A clear pass needs an observation. A declined finding needs a reason.
|
|
12
|
+
|
|
13
|
+
| id | score | when |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| pass | 1 | Each planned persona has evidence and each finding has a supported outcome. |
|
|
16
|
+
| fail_missing_persona | 0 | A planned criterion has no substantive evaluation. |
|
|
17
|
+
| fail_missing_decision | 0 | A finding lacks a justified outcome. |
|
|
18
|
+
| fail_unverified_change | 0 | The linked evidence does not establish that an applied change was made. |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: qa_pointer_pass
|
|
3
|
+
version: 1
|
|
4
|
+
applies_to: qa
|
|
5
|
+
sample_rate: 0.1
|
|
6
|
+
pass_threshold: 1
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Browser pointer QA
|
|
10
|
+
|
|
11
|
+
Read the recorded steps for each screen. Verify that QA observed idle and exercised each required pointer action using the confirmed criteria. Look for an observation of what happened during the action, with screenshots or recordings if they exist. Evaluate the recorded run without reopening the app.
|
|
12
|
+
|
|
13
|
+
| id | score | when |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| pass | 1 | Evidence covers idle and the result of every required action. |
|
|
16
|
+
| skip_blocked | 0 | The record identifies why an action was blocked. |
|
|
17
|
+
| fail_interaction | 0 | A required action was tried and failed. |
|
|
18
|
+
| fail_not_run | 0 | A required action was marked not run. |
|
|
19
|
+
| fail_screenshots_only | 0 | There are screenshots without a record of the pointer actions. |
|
|
20
|
+
| fail_missing_evidence | 0 | The record lacks evidence needed to judge the actions. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: task_compliance
|
|
3
|
+
version: 1
|
|
4
|
+
applies_to: task
|
|
5
|
+
sample_rate: 0.1
|
|
6
|
+
pass_threshold: 1
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Task compliance
|
|
10
|
+
|
|
11
|
+
Read the goal, acceptance criteria, recorded checks, and independent review from the snapshot. Follow its evidence links as needed. Check whether each criterion and the goal are supported by observations for the recorded code. A passed command or a checked box alone does not establish a product behavior. If review is configured per wave, evaluate the available acceptance evidence independently of that later review.
|
|
12
|
+
|
|
13
|
+
| id | score | when |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| pass | 1 | Evidence supports the goal and each criterion. |
|
|
16
|
+
| fail_unmet | 0 | Evidence shows that the goal or a criterion was not met. |
|
|
17
|
+
| fail_missing_evidence | 0 | Evidence is missing, stale, or too vague to verify a criterion. |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# <Project> Backlog
|
|
2
|
+
|
|
3
|
+
[One Pager](one-pager.md)
|
|
4
|
+
|
|
5
|
+
## Reviewed backlog
|
|
6
|
+
|
|
7
|
+
<!-- evercrew:view kind="proposals" -->
|
|
8
|
+
<!-- /evercrew:view -->
|
|
9
|
+
|
|
10
|
+
## Needs triage
|
|
11
|
+
|
|
12
|
+
<!-- For each candidate, link the task note and record what needs clarification. -->
|
|
13
|
+
|
|
14
|
+
## Triage decisions
|
|
15
|
+
|
|
16
|
+
<!-- Link source evidence and explain why an item was linked, completed, deferred or superseded. -->
|
|
17
|
+
|
|
18
|
+
## History
|
|
19
|
+
|
|
20
|
+
<!-- Link the complete source reconciliation, including repeated entries. -->
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
milestones:
|
|
3
|
+
- id: mvp
|
|
4
|
+
title: MVP
|
|
5
|
+
shows: ""
|
|
6
|
+
status: current
|
|
7
|
+
---
|
|
8
|
+
# <Project> — One Pager
|
|
9
|
+
|
|
10
|
+
## Status now
|
|
11
|
+
|
|
12
|
+
<!-- 3–4 sentences, written by a human. -->
|
|
13
|
+
|
|
14
|
+
**What to show.**
|
|
15
|
+
|
|
16
|
+
**What landed.**
|
|
17
|
+
|
|
18
|
+
**Evidence.** <!-- Add the date, source revision, checks and open verification. -->
|
|
19
|
+
|
|
20
|
+
<!-- evercrew:view kind="stats" -->
|
|
21
|
+
<!-- /evercrew:view -->
|
|
22
|
+
|
|
23
|
+
## Needs attention
|
|
24
|
+
|
|
25
|
+
<!-- Decisions and immediate checks. Link the evidence and name the owner when known. -->
|
|
26
|
+
|
|
27
|
+
## Product bet
|
|
28
|
+
|
|
29
|
+
<!-- One sentence. -->
|
|
30
|
+
|
|
31
|
+
## Research
|
|
32
|
+
|
|
33
|
+
Conclusions only. The long note is [the research](spec/01-research.md).
|
|
34
|
+
|
|
35
|
+
<!-- Paste ### Conclusions from spec/01-research.md. Do not paste the rest. -->
|
|
36
|
+
|
|
37
|
+
## Readiness
|
|
38
|
+
|
|
39
|
+
<!-- evercrew:view kind="readiness" -->
|
|
40
|
+
<!-- /evercrew:view -->
|
|
41
|
+
|
|
42
|
+
## Roadmap
|
|
43
|
+
|
|
44
|
+
<!-- evercrew:view kind="order" -->
|
|
45
|
+
<!-- /evercrew:view -->
|
|
46
|
+
|
|
47
|
+
## Next 3 steps
|
|
48
|
+
|
|
49
|
+
<!-- evercrew:view kind="next-steps" -->
|
|
50
|
+
<!-- /evercrew:view -->
|
|
51
|
+
|
|
52
|
+
## Inbox triage
|
|
53
|
+
|
|
54
|
+
Tick an item when the team agrees to take it into the plan. Review higher priorities first, then use list order within each priority.
|
|
55
|
+
|
|
56
|
+
<!-- Example: add real rows and remove this comment.
|
|
57
|
+
:::checklist[Take into the plan]
|
|
58
|
+
::check[:badge[Feature request]{tone="info"} :badge[High]{tone="danger"} Task summary · [Task note](tasks/T-001-example.md)]{done="false"}
|
|
59
|
+
:::
|
|
60
|
+
-->
|
|
61
|
+
|
|
62
|
+
## Next versions (do not promise on a demo)
|
|
63
|
+
|
|
64
|
+
## Reference
|
|
65
|
+
|
|
66
|
+
- [Execution board](board.md)
|
|
67
|
+
- [Backlog and triage decisions](backlog.md)
|
|
68
|
+
<!-- Link history, architecture and QA evidence once available. -->
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# <Task summary>
|
|
2
|
+
|
|
3
|
+
## Links
|
|
4
|
+
|
|
5
|
+
<!-- Fill the links or document permitted exceptions before publishing. -->
|
|
6
|
+
|
|
7
|
+
- [Epic](https://example.invalid/epic)
|
|
8
|
+
- [Jira Story](https://example.invalid/story)
|
|
9
|
+
- [Proposal](https://example.invalid/proposal)
|
|
10
|
+
- [Mockup](https://example.invalid/mockup)
|
|
11
|
+
- [One Pager](https://example.invalid/one-pager)
|
|
12
|
+
|
|
13
|
+
## Goal
|
|
14
|
+
|
|
15
|
+
<!-- Describe the user need and intended outcome. -->
|
|
16
|
+
|
|
17
|
+
## User flow
|
|
18
|
+
|
|
19
|
+
<!-- Add a Mermaid diagram covering the requested path. -->
|
|
20
|
+
|
|
21
|
+
## Technical design
|
|
22
|
+
|
|
23
|
+
<!-- Describe changes, interfaces, and relevant constraints. -->
|
|
24
|
+
|
|
25
|
+
## Decisions
|
|
26
|
+
|
|
27
|
+
<!-- Record agreed decisions and tradeoffs. -->
|
|
28
|
+
|
|
29
|
+
## Acceptance criteria
|
|
30
|
+
|
|
31
|
+
<!-- State observable checks and expected results. -->
|
|
32
|
+
|
|
33
|
+
## Out of scope
|
|
34
|
+
|
|
35
|
+
<!-- Name exclusions or say whether there are none. -->
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: lead-goal
|
|
3
|
+
description: >-
|
|
4
|
+
When a Cursor goal is active (the person used /goal, CreateGoal ran, or the UI shows an Active Goal)
|
|
5
|
+
in a repository that has lead installed (.lead/lead.mjs), keep heartbeats visible and append the
|
|
6
|
+
activity log. Use together with the lead skill for the actual work.
|
|
7
|
+
---
|
|
8
|
+
A Cursor goal is running in a lead repo. Follow `lead/references/goal.md` next to the `lead` skill (same kit): a three-line heartbeat every reply, and `node .lead/lead.mjs activity …` for each unit of work.
|
|
9
|
+
|
|
10
|
+
Do not replace `/goal`. CreateGoal and UpdateGoal stay Cursor's. Lead does the project work; this skill only makes long runs readable and logged.
|