levi-gear 0.6.0 → 0.7.0
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/README.md +9 -8
- package/agents/designer.md +1 -0
- package/agents/developer.md +2 -1
- package/agents/pm.md +2 -1
- package/agents/qa.md +2 -1
- package/agents/teamlead.md +1 -0
- package/docs/authoring-usecases.md +2 -1
- package/docs/codex.md +14 -2
- package/docs/configuration.md +11 -8
- package/docs/team.md +6 -6
- package/docs/unattended-runs.md +2 -0
- package/docs/usecases.md +23 -12
- package/package.json +2 -2
- package/src/lib/agents.js +6 -1
- package/src/lib/desired-state.js +21 -7
- package/src/lib/tools.js +3 -2
- package/usecases/_run-rules.md +10 -1
- package/usecases/create-feature/SKILL.md +20 -15
- package/usecases/create-feature/workflow.js +49 -29
- package/usecases/design/SKILL.md +18 -3
- package/usecases/fix-bug/SKILL.md +16 -13
- package/usecases/fix-bug/workflow.js +47 -28
- package/usecases/generate-test-scenarios/SKILL.md +4 -4
- package/usecases/generate-test-scenarios/references/test-case-guide.md +1 -1
package/README.md
CHANGED
|
@@ -58,7 +58,7 @@ Every install includes the team agents from `agents/`. Usecases delegate to them
|
|
|
58
58
|
| `levi-teamlead` | Designs the architecture and picks the technology; designs the database schema and migrations; sets structure, conventions and API contracts; breaks work into tasks with estimates; reviews code (security by OWASP Top 10, performance and correctness) with a fix for every finding; owns CI/CD | `architecture.md`, `tasks.md`, `review.md`, schema, migrations, CI/CD and deployment config | `brainstorming`, `create-feature`, `fix-bug`, `code-review` |
|
|
59
59
|
| `levi-developer` | Implements tasks as designed; investigates and fixes bugs at the root cause; writes unit and integration tests; runs build, lint and tests before handing off | Application code, unit and integration tests, technical docs of the code | `create-feature`, `fix-bug` |
|
|
60
60
|
| `levi-designer` | Maps user flows and wireframes; draws screens in SVG and HTML prototypes; defines design tokens and every state; covers responsive behavior and accessibility; writes handoff notes | `docs/designs/` | `design`, `create-feature` (for UI work) |
|
|
61
|
-
| `levi-qa` | Writes test plans and test cases from the spec, without reading the code, as Markdown and Excel (only QA changes them); runs E2E tests in a headless browser; writes E2E and acceptance tests; reports bugs and gives the go or no-go | `test-plan.md`, `docs/tests/`, `test-report.md`, E2E and acceptance tests | `create-feature`, `fix-bug`, `generate-test-scenarios` |
|
|
61
|
+
| `levi-qa` | Writes test plans and test cases from the spec, without reading the code, as Markdown and Excel (only QA changes them); runs E2E tests in a headless browser when you choose to; writes E2E and acceptance tests; reports bugs and gives the go or no-go | `test-plan.md`, `docs/tests/`, `test-report.md`, E2E and acceptance tests | `create-feature`, `fix-bug`, `generate-test-scenarios` |
|
|
62
62
|
|
|
63
63
|
Each agent does only its own role's work and writes only the files it owns; work for another role is handed off. The full role descriptions are in [docs/team.md](docs/team.md).
|
|
64
64
|
|
|
@@ -106,15 +106,16 @@ agents/<role>.md # team agents shared by all usecases; frontmatter name:
|
|
|
106
106
|
agents/_*.md # partials appended to every team agent
|
|
107
107
|
```
|
|
108
108
|
|
|
109
|
-
Agent frontmatter
|
|
109
|
+
Agent frontmatter applies to both usecase and team agents.
|
|
110
110
|
|
|
111
|
-
| Field | Values | Claude Code |
|
|
112
|
-
|
|
113
|
-
| `name`, `description` | required | as is |
|
|
114
|
-
| `tools` | comma list of `read`, `edit`, `execute`, `web`; omit for the defaults | `Read, Grep, Glob` / `Edit, Write` / `Bash` / `WebFetch, WebSearch` |
|
|
115
|
-
| `model` | `strong`, `standard`, `fast`; omit to inherit | `opus` / `sonnet` / `haiku` |
|
|
111
|
+
| Field | Values | Claude Code | Codex |
|
|
112
|
+
|---|---|---|---|
|
|
113
|
+
| `name`, `description` | required | as is | `name`, `description` with a delegation note |
|
|
114
|
+
| `tools` | comma list of `read`, `edit`, `execute`, `web`; omit for the defaults | `Read, Grep, Glob` / `Edit, Write` / `Bash` / `WebFetch, WebSearch` | Uses the Codex tool configuration |
|
|
115
|
+
| `model` | `strong`, `standard`, `fast`; omit to inherit | `opus` / `sonnet` / `haiku` | Omitted. The agent inherits the Codex model |
|
|
116
|
+
| `effort` | `low`, `medium`, `high`, `xhigh`, `max`; omit to inherit | `effort:` as is | `model_reasoning_effort` (`max` maps to `xhigh`) |
|
|
116
117
|
|
|
117
|
-
|
|
118
|
+
In Claude Code, an explicit `tools` list also cuts off MCP tools, so leave it out for agents that need a browser or other MCP servers.
|
|
118
119
|
|
|
119
120
|
- Every usecase is manual-only: the installer sets `disable-model-invocation: true` in the installed `SKILL.md`, so Claude Code never triggers it by itself.
|
|
120
121
|
- The `description` in `SKILL.md` is what the `levi` entry point reads to choose between usecases, so state precisely what the usecase does and which requests it fits. English is fine; requests in other languages are matched by meaning.
|
package/agents/designer.md
CHANGED
|
@@ -3,6 +3,7 @@ name: levi-designer
|
|
|
3
3
|
description: UI/UX designer of the levi team. Designs and revises user interfaces, working mainly in SVG files and HTML prototypes - user flows, wireframes, screens, design tokens, states and handoff specs for developers.
|
|
4
4
|
tools: read, edit, web
|
|
5
5
|
model: standard
|
|
6
|
+
effort: medium
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
You are the designer. You decide how the product looks and how people move through it, and you hand developers a design they can build without guessing.
|
package/agents/developer.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: levi-developer
|
|
3
3
|
description: Fullstack developer of the levi team. Implements assigned tickets and tasks following the teamlead's architecture and conventions, and writes unit and integration tests for the code it changes.
|
|
4
|
-
model:
|
|
4
|
+
model: strong
|
|
5
|
+
effort: high
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
You are a fullstack developer. You implement the tasks you are given, the way the teamlead designed them, and you prove they work with tests.
|
package/agents/pm.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
name: levi-pm
|
|
3
3
|
description: Project manager of the levi team. Turns a request into a spec with acceptance criteria, keeps scope, progress, risks and tickets, approves plans, and accepts the product before it is delivered to the end user.
|
|
4
4
|
tools: read, edit
|
|
5
|
-
model:
|
|
5
|
+
model: strong
|
|
6
|
+
effort: xhigh
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
You are the project manager. You own the outcome: what gets built, in what order, and whether it is ready to hand to the end user. You do not write code, you do not make technical decisions, and you do not call other agents: you assign the work and the workflow carries out the assignment.
|
package/agents/qa.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: levi-qa
|
|
3
3
|
description: QA engineer of the levi team. Ensures quality independently of the developers - writes test plans and test cases from the spec, runs manual and E2E tests on the UI, writes automated tests, reports bugs, and signs off quality.
|
|
4
4
|
model: standard
|
|
5
|
+
effort: medium
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
You are the QA engineer. You check that the product does what the spec says, independently of how it was built. Your value comes from that independence.
|
|
@@ -10,7 +11,7 @@ You are the QA engineer. You check that the product does what the spec says, ind
|
|
|
10
11
|
|
|
11
12
|
- **Test plan.** Write `test-plan.md` from `spec.md` and the design: scope, approach, environments, and test cases. Each test case has an ID, the acceptance criterion it covers, preconditions, steps, and the expected result.
|
|
12
13
|
- **Coverage.** Every acceptance criterion has at least one test case. Cover the happy path, edge cases, invalid input, error states and permissions.
|
|
13
|
-
- **E2E testing.**
|
|
14
|
+
- **E2E testing.** When the workflow asks for it (browser tests are optional, and the user may have turned them off), run the test cases against the real UI, through the project's E2E runner or a browser tool when one is available.
|
|
14
15
|
- **Automation.** Write automated E2E and acceptance tests for the cases worth repeating. Developers own unit tests; you own E2E and acceptance tests.
|
|
15
16
|
- **Visual check.** Compare the UI against the files in `docs/designs/` and report mismatches. The designer confirms what is intended.
|
|
16
17
|
- **Bugs.** Report each bug in `test-report.md` with steps to reproduce, expected and actual result, severity, and evidence. Verify the fix when it lands, and rerun regression tests.
|
package/agents/teamlead.md
CHANGED
|
@@ -3,6 +3,7 @@ name: levi-teamlead
|
|
|
3
3
|
description: Teamlead and senior developer of the levi team. Owns the technical side - system design, database, project structure, conventions, task breakdown and estimates, and code review before merge.
|
|
4
4
|
tools: read, edit, execute, web
|
|
5
5
|
model: strong
|
|
6
|
+
effort: xhigh
|
|
6
7
|
---
|
|
7
8
|
|
|
8
9
|
You are the teamlead, the most senior developer on the team. You make the technical decisions and set the path the developers follow. You do not implement tickets yourself unless the workflow asks you to.
|
|
@@ -67,6 +67,7 @@ Both usecase agents and team agents use this frontmatter:
|
|
|
67
67
|
| `description` | yes | What the agent does and when it is used |
|
|
68
68
|
| `tools` | no | Comma list of `read`, `edit`, `execute`, `web`. Omit for the defaults |
|
|
69
69
|
| `model` | no | `strong`, `standard` or `fast`. Omit to inherit |
|
|
70
|
+
| `effort` | no | `low`, `medium`, `high`, `xhigh` or `max`. Omit to inherit |
|
|
70
71
|
|
|
71
72
|
How these map to Claude Code: see [Configuration and file layout](configuration.md#how-agent-fields-are-converted).
|
|
72
73
|
|
|
@@ -76,7 +77,7 @@ Rules:
|
|
|
76
77
|
- The installer appends a note to every subagent description so Claude Code delegates to it only through its usecase.
|
|
77
78
|
- A usecase id must not reuse a team role name (`pm`, `teamlead`, `developer`, `designer`, `qa`): `levi-<id>` would name both a skill and an agent.
|
|
78
79
|
- Agent names must be unique across the whole kit.
|
|
79
|
-
- `usecases/_run-rules.md` is not a usecase: it holds the run rules (ask everything first, pick instead of ask, quota guard) that the installer appends to every installed `SKILL.md`, and the installer adds `scripts/quota-check.mjs` to every skill folder for the quota guard. Do not restate those rules in a usecase; when a step asks the user, say what the question is and let the rules decide when it is asked. See [Unattended runs](unattended-runs.md).
|
|
80
|
+
- `usecases/_run-rules.md` is not a usecase: it holds the run rules (ask everything first, pick instead of ask, quota guard) that the installer appends to every installed `SKILL.md`, and the installer adds `scripts/quota-check.mjs` to every skill folder for the quota guard. Do not restate those rules in a usecase (that includes the browser-tests question: a usecase with a browser step names the step and passes `browserTests` on, and the rules say how it is asked); when a step asks the user, say what the question is and let the rules decide when it is asked. See [Unattended runs](unattended-runs.md).
|
|
80
81
|
- Files in `agents/` whose names start with `_` are not agents. They are appended to every team agent. `_team-protocol.md` is one.
|
|
81
82
|
|
|
82
83
|
## Delegating to the team
|
package/docs/codex.md
CHANGED
|
@@ -8,13 +8,25 @@ customized files.
|
|
|
8
8
|
Use `$levi <request>` to choose a usecase, or `$levi-<usecase> <request>` to
|
|
9
9
|
select one. Restart Codex if the installed skills or agents do not appear.
|
|
10
10
|
Multi-agent support and the capabilities required by the usecase must be enabled.
|
|
11
|
-
|
|
11
|
+
In `create-feature` and `fix-bug`, QA writes test cases on every run. The opening
|
|
12
|
+
round asks whether to run browser tests and accepts a limited scope. QA needs a
|
|
13
|
+
working app and an E2E runner or browser when you choose to run UI cases.
|
|
14
|
+
|
|
15
|
+
The generated agent TOML inherits the Codex model. It sets only
|
|
16
|
+
`model_reasoning_effort` when the source declares `effort`, mapping `max` to
|
|
17
|
+
`xhigh`. QA uses `high` effort to write or revise test cases and its default
|
|
18
|
+
effort to run them. The designer uses `high` to draw and correct a design when
|
|
19
|
+
it has no approved basis. For these overrides the skill passes
|
|
20
|
+
`"reasoning_effort": "high"` and `"fork_turns": "none"` to `spawn_agent`.
|
|
12
21
|
|
|
13
22
|
Codex workflows save a checkpoint under `docs/levi-runs/`. Code review saves it
|
|
14
23
|
outside the project in the system temporary directory because review must not
|
|
15
24
|
change the project. To continue an interrupted run, invoke `$levi` and give the
|
|
16
25
|
checkpoint path. If there are multiple incomplete runs, select the intended run.
|
|
17
|
-
|
|
26
|
+
On resume the skill reads the checkpoint history and the run's saved choices
|
|
27
|
+
under `docs/levi/<slug>/choices/`. It restores the browser decision and any
|
|
28
|
+
scope from `user-browser-tests.md`, reuses the opening answers, and checks the
|
|
29
|
+
working tree and any locked tests before continuing.
|
|
18
30
|
|
|
19
31
|
The checkpoint records the latest reported stage and next action. Before
|
|
20
32
|
continuing, verify the current files and any in-progress work; a checkpoint does
|
package/docs/configuration.md
CHANGED
|
@@ -45,7 +45,7 @@ Configs from early versions listed files as an array without hashes. They still
|
|
|
45
45
|
|
|
46
46
|
Codex reads the corresponding entry point and usecases from `.agents/skills/`.
|
|
47
47
|
|
|
48
|
-
A skill folder holds
|
|
48
|
+
A usecase skill folder holds its `SKILL.md`, references and scripts. Claude Code also gets `scripts/quota-check.mjs` for the [quota guard](unattended-runs.md). Codex gets `scripts/codex-checkpoint.mjs` for [checkpoint recovery](codex.md) and follows the manual steps in `SKILL.md`.
|
|
49
49
|
|
|
50
50
|
### Subagents
|
|
51
51
|
|
|
@@ -63,18 +63,21 @@ This is why the entry point reads a usecase's `SKILL.md` by path rather than cal
|
|
|
63
63
|
|
|
64
64
|
## How agent fields are converted
|
|
65
65
|
|
|
66
|
-
Usecase and team agent source files use a small neutral format. The installer converts it to Claude Code frontmatter.
|
|
66
|
+
Usecase and team agent source files use a small neutral format. The installer converts it to Claude Code frontmatter or Codex TOML.
|
|
67
67
|
|
|
68
|
-
| Field | Values | Claude Code |
|
|
69
|
-
|
|
70
|
-
| `tools` | `read`, `edit`, `execute`, `web`; omit for the defaults | `Read, Grep, Glob` / `Edit, Write` / `Bash` / `WebFetch, WebSearch` |
|
|
71
|
-
| `model` | `strong`, `standard`, `fast`; omit to inherit | `opus` / `sonnet` / `haiku` |
|
|
68
|
+
| Field | Values | Claude Code | Codex |
|
|
69
|
+
|---|---|---|---|
|
|
70
|
+
| `tools` | `read`, `edit`, `execute`, `web`; omit for the defaults | `Read, Grep, Glob` / `Edit, Write` / `Bash` / `WebFetch, WebSearch` | Uses the Codex tool configuration |
|
|
71
|
+
| `model` | `strong`, `standard`, `fast`; omit to inherit | `opus` / `sonnet` / `haiku` | Omitted. The agent inherits the Codex model |
|
|
72
|
+
| `effort` | `low`, `medium`, `high`, `xhigh`, `max`; omit to inherit | `effort:` as is | `model_reasoning_effort` (`max` maps to `xhigh`) |
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
In Claude Code, an explicit `tools` list also cuts off MCP tools. That is why `levi-developer` and `levi-qa` leave `tools` out: they may need a browser or other MCP servers.
|
|
75
|
+
|
|
76
|
+
The default effort is `xhigh` for `levi-pm` and `levi-teamlead`, `high` for `levi-developer`, and `medium` for `levi-designer` and `levi-qa`. Claude Code uses the `strong` tier for the first three roles and `standard` for the other two. When QA writes or revises test cases, or the designer draws or corrects a design without an approved basis, both targets request `high` effort for that call. Claude Code also requests the `strong` tier. Codex sets only `reasoning_effort` and inherits the model.
|
|
74
77
|
|
|
75
78
|
## Leftovers from earlier versions
|
|
76
79
|
|
|
77
|
-
Earlier versions could also install for
|
|
80
|
+
Earlier versions could also install for GitHub Copilot. `levi update` removes obsolete tracked files for targets outside the current install, including legacy Codex files in a Claude-only install. It keeps and reports files you edited.
|
|
78
81
|
|
|
79
82
|
## Work folders
|
|
80
83
|
|
package/docs/team.md
CHANGED
|
@@ -40,7 +40,7 @@ Owns the outcome: what gets built, in what order, and whether it is ready for th
|
|
|
40
40
|
- Approves a plan only when it covers every acceptance criterion; otherwise rejects it with the exact mismatch.
|
|
41
41
|
- Accepts the product only when each criterion has evidence in `test-report.md`, and writes release notes.
|
|
42
42
|
|
|
43
|
-
Tools: read, edit. Model tier:
|
|
43
|
+
Tools: read, edit. Model tier: strong, effort: xhigh.
|
|
44
44
|
|
|
45
45
|
### levi-teamlead
|
|
46
46
|
|
|
@@ -53,7 +53,7 @@ The most senior developer. Makes the technical decisions. Does not implement tic
|
|
|
53
53
|
- Reviews code for correctness, security, performance and fit, graded critical, warning or suggestion, each with a concrete fix. A critical finding blocks the merge. Every review follows the criteria of the [`code-review`](usecases.md#code-review) usecase: the OWASP Top 10, and performance and correctness. Findings go in `review.md`, or into the conversation when `code-review` runs by itself.
|
|
54
54
|
- Owns CI/CD and deployment configuration until the kit has a dedicated DevOps role.
|
|
55
55
|
|
|
56
|
-
Tools: read, edit, execute, web. Model tier: strong.
|
|
56
|
+
Tools: read, edit, execute, web. Model tier: strong, effort: xhigh.
|
|
57
57
|
|
|
58
58
|
### levi-developer
|
|
59
59
|
|
|
@@ -64,7 +64,7 @@ Implements assigned tasks the way the teamlead designed them and proves they wor
|
|
|
64
64
|
- Runs the build, linter and relevant tests before handing off, and reports real results.
|
|
65
65
|
- Does not change the architecture, schema or public API on its own, never weakens a test to make it pass, and never uses placeholder implementations.
|
|
66
66
|
|
|
67
|
-
Tools: the tool's defaults. Model tier:
|
|
67
|
+
Tools: the tool's defaults. Model tier: strong, effort: high.
|
|
68
68
|
|
|
69
69
|
### levi-designer
|
|
70
70
|
|
|
@@ -75,7 +75,7 @@ Decides how the product looks and how people move through it.
|
|
|
75
75
|
- Shows responsive behavior and meets WCAG 2.1 AA.
|
|
76
76
|
- Writes `docs/designs/<slug>/design-notes.md` as the handoff for developers.
|
|
77
77
|
|
|
78
|
-
Tools: read, edit, web. Model tier: standard.
|
|
78
|
+
Tools: read, edit, web. Model tier: standard, effort: medium. The `design` usecase calls it with the strong tier and `high` effort when it has no approved cover, preview or design to draw from (see [`design`](usecases.md#design)).
|
|
79
79
|
|
|
80
80
|
### levi-qa
|
|
81
81
|
|
|
@@ -83,12 +83,12 @@ Checks that the product does what the spec says, independently of how it was bui
|
|
|
83
83
|
|
|
84
84
|
- Writes `test-plan.md` from the spec and design, with test cases that each cover an acceptance criterion.
|
|
85
85
|
- Writes, changes and runs test cases with its role skill, [`generate-test-scenarios`](usecases.md#generate-test-scenarios): Markdown and Excel in `docs/tests/`, in every usecase. Only QA changes them.
|
|
86
|
-
- Runs E2E tests against the real UI and writes automated E2E and acceptance tests. Developers own unit tests.
|
|
86
|
+
- Runs E2E tests against the real UI when browser tests are on (they are optional, see [Browser tests](usecases.md#browser-tests-are-optional)) and writes automated E2E and acceptance tests. Developers own unit tests.
|
|
87
87
|
- Compares the UI with `docs/designs/` and reports bugs with reproduction steps, severity and evidence in `test-report.md`.
|
|
88
88
|
- Gives the PM a clear go or no-go.
|
|
89
89
|
- Writes test cases from the spec, not from the implementation, never changes application code, and reports only results it observed.
|
|
90
90
|
|
|
91
|
-
Tools: the tool's defaults. Model tier: standard.
|
|
91
|
+
Tools: the tool's defaults. Model tier: standard, effort: medium. Whenever it writes or changes test cases, the usecase calls it with the strong tier and `high` effort; running them keeps the default.
|
|
92
92
|
|
|
93
93
|
## The protocol
|
|
94
94
|
|
package/docs/unattended-runs.md
CHANGED
|
@@ -6,6 +6,8 @@ You are often not at the keyboard while a usecase runs. Every usecase follows th
|
|
|
6
6
|
|
|
7
7
|
A run starts with a cheap discovery pass: it reads the request, the matching specs, plans and designs and the project, and calls the agents that only frame or analyze. From that it builds the whole list of what is missing, unclear or contradictory, which existing spec, plan or design to reuse, and every step that cannot be undone or that others can see (deleting, publishing, pushing, deploying, spending money). It asks all of it in **one round**, then tells you that the run now continues on its own.
|
|
8
8
|
|
|
9
|
+
One question is always part of that round for the usecases that have a browser test step (`create-feature`, `fix-bug`): whether to run browser tests. It is asked even when nothing else needs asking, and the answer is recorded in `choices/` and the handoff report, so a resumed run does not ask it again. See [Browser tests are optional](usecases.md#browser-tests-are-optional).
|
|
10
|
+
|
|
9
11
|
After that round it does not ask again. A question that comes up later is parked: everything that does not depend on it goes on, and the parked questions come back together at the end, with the assumption used meanwhile.
|
|
10
12
|
|
|
11
13
|
It asks only about facts only you know, scope and acceptance criteria, irreversible or visible actions, and picks where a wrong guess would waste a large part of the work. Everything else is a choice.
|
package/docs/usecases.md
CHANGED
|
@@ -7,8 +7,8 @@ A usecase is a self-contained workflow, installed as a skill named `levi-<id>`.
|
|
|
7
7
|
| [`brainstorming`](#brainstorming) | Turns a problem or idea into an execution plan: small tasks, an owning agent and an hour estimate for each |
|
|
8
8
|
| [`spec-writing`](#spec-writing) | Writes or updates a spec with the PM: it asks about everything unclear first and writes only what you confirmed |
|
|
9
9
|
| [`design`](#design) | Draws SVG designs with the Designer from a text description, images or videos you upload, or both |
|
|
10
|
-
| [`create-feature`](#create-feature) | Builds a feature spec first and test first: the tests from the spec are locked, QA's test cases are QA's alone, and the code is fixed until the tests pass, the teamlead approves, and every test case passes end to end |
|
|
11
|
-
| [`fix-bug`](#fix-bug) | Fixes a bug in merged code: the developer clarifies it with you, then fixes it test first while QA writes scenarios; the teamlead reviews and QA tests end to end until everything passes |
|
|
10
|
+
| [`create-feature`](#create-feature) | Builds a feature spec first and test first: the tests from the spec are locked, QA's test cases are QA's alone, and the code is fixed until the tests pass, the teamlead approves, and, if you choose browser tests, every test case passes end to end |
|
|
11
|
+
| [`fix-bug`](#fix-bug) | Fixes a bug in merged code: the developer clarifies it with you, then fixes it test first while QA writes scenarios; the teamlead reviews and, if you choose browser tests, QA tests end to end until everything passes |
|
|
12
12
|
| [`code-review`](#code-review) | The teamlead reviews a pull request, a branch, commits, files or your uncommitted changes for security (OWASP Top 10), performance and correctness, and suggests a fix for every finding. Nothing is changed |
|
|
13
13
|
| [`generate-test-scenarios`](#generate-test-scenarios) | QA writes screen-level test cases from the feature specs alone, as Markdown and an Excel sheet in `docs/tests/`, and lists where the spec is unclear. Specs are never changed |
|
|
14
14
|
|
|
@@ -16,6 +16,15 @@ Four of them are also the skills of team roles, and are installed with every ins
|
|
|
16
16
|
|
|
17
17
|
To write your own, see [Authoring usecases](authoring-usecases.md).
|
|
18
18
|
|
|
19
|
+
## Browser tests are optional
|
|
20
|
+
|
|
21
|
+
Running test cases in a headless browser is slow, so `create-feature` and `fix-bug` ask you once, in the first round of questions of the run (with the other opening questions, or alone when there are none), whether to run them:
|
|
22
|
+
|
|
23
|
+
- **Do not run browser tests** (recommended): much faster. Unit and integration tests (without any test that opens a browser, in the new tests and in the suite the gate runs) and the code review still run, and QA still writes the test cases so you can run them later. The test cases stay in `docs/tests/` without a result.
|
|
24
|
+
- **Run the full E2E suite**: after the review approves, QA runs every test case in a headless browser (through the API or CLI when there is no UI) and failures go back to the developer.
|
|
25
|
+
|
|
26
|
+
You can also answer in your own words, for example to run only some cases; the run follows that and reports the others as not run. When the question is skipped because your request already says what you want, that is used. The answer is kept in `docs/levi/<slug>/choices/user-browser-tests.md` and in the handoff report, so a resumed run never asks again, and the final report says "Browser tests: not run (the user chose this)" with the list of test cases that were not run. A usecase's workflow receives the answer as `browserTests` (`true` or `false`; missing means `false`) and, for a limited run, `browserScope`. The render check of `design` is not a test and is not affected.
|
|
27
|
+
|
|
19
28
|
## brainstorming
|
|
20
29
|
|
|
21
30
|
```text
|
|
@@ -208,9 +217,9 @@ docs/designs/login-screen/
|
|
|
208
217
|
| 1. Intake | workflow | Reads your text and attachments, derives the slug. With neither text nor attachment it asks what to design. |
|
|
209
218
|
| 2. Find the context | workflow | Looks in `docs/designs/` for an existing design to update, and in `docs/specs/` for a spec to use as read-only context. |
|
|
210
219
|
| 3. Prepare the references | workflow | Images with a path are passed as they are. An image that exists only in the conversation is written down as a plain description. A video is turned into up to 12 key frames with ffmpeg. |
|
|
211
|
-
| 4. Draw | `levi-designer` | Decides the list of files, then draws them from the references, keeping one visual language across all of them. |
|
|
220
|
+
| 4. Draw | `levi-designer` | Decides the list of files, then draws them from the references, keeping one visual language across all of them. With an approved basis (a recreate image, cover or mockup, an HTML preview, or an existing design you named or confirmed) it runs with its default settings; without one it runs with the strong tier and `high` effort. |
|
|
212
221
|
| 5. Check | workflow | Runs a checker that rejects invalid SVG, raster images, external references and scripts, and renders each file to a PNG when a renderer is installed (`rsvg-convert`, `inkscape` or headless Chrome) to look for cut-off or overlapping content and for differences from the reference. |
|
|
213
|
-
| 6. Fix | `levi-designer` | One pass on the problems found. There is no second pass; what is still wrong is reported. |
|
|
222
|
+
| 6. Fix | `levi-designer` | One pass on the problems found, with the same model and effort as step 4. There is no second pass; what is still wrong is reported. |
|
|
214
223
|
| 7. Ask you | workflow | Asks the designer's questions in one round, only those that change the design. Without questions, assumptions go into the report. |
|
|
215
224
|
| 8. Clean up and report | workflow | Deletes frames, descriptions and renders. Tells you the files, assumptions and what could not be reproduced. |
|
|
216
225
|
|
|
@@ -244,7 +253,7 @@ Installing it also installs `spec-writing`, `brainstorming`, `design`, `code-rev
|
|
|
244
253
|
|
|
245
254
|
- The feature's code (and migrations, when it needs them), left uncommitted in your working tree.
|
|
246
255
|
- Unit and feature tests in the folders your test framework uses, covering every acceptance criterion of the spec.
|
|
247
|
-
- `docs/tests/<base>.md` and `.xlsx`: the test cases, in the [`generate-test-scenarios`](#generate-test-scenarios) format (IDs `TC-<FeatureID>-001` and up), each with the criteria it covers and its `PASS` or `FAIL` result with evidence from the end-to-end run.
|
|
256
|
+
- `docs/tests/<base>.md` and `.xlsx`: the test cases, in the [`generate-test-scenarios`](#generate-test-scenarios) format (IDs `TC-<FeatureID>-001` and up), each with the criteria it covers and, when browser tests ran, its `PASS` or `FAIL` result with evidence from the end-to-end run.
|
|
248
257
|
- The spec, brainstorming plan and designs, when they had to be created.
|
|
249
258
|
|
|
250
259
|
### How it works
|
|
@@ -263,12 +272,12 @@ Installing it also installs `spec-writing`, `brainstorming`, `design`, `code-rev
|
|
|
263
272
|
|---|---|---|
|
|
264
273
|
| 4. Execution plan | `levi-teamlead` | Fixes the interfaces tests and code share, the test framework and commands, how to start the app, the test groups (covering every criterion) and the implementation batches. |
|
|
265
274
|
| 5. Tests | `levi-developer`, reviewed by `levi-teamlead` | Unit and feature tests, written from the spec in parallel groups. They run once before any code exists (they should fail), then a fresh teamlead reviews them against the spec until it approves. |
|
|
266
|
-
| 5. Test cases | `levi-qa
|
|
275
|
+
| 5. Test cases | `levi-qa` (strong tier, `high` effort), reviewed by `levi-pm` | Written from the spec at the same time, without reading code or tests, with QA's test case guide. A fresh PM reviews them against the spec until it approves. |
|
|
267
276
|
| 6. Lock | workflow | Copies and hashes the tests, and snapshots the test cases. From here on they are the definition of done. |
|
|
268
277
|
| 7. Build | `levi-developer`, `levi-teamlead` | Implements the batches, tasks of a batch in parallel. |
|
|
269
278
|
| 8. Gate | workflow | Restores any locked file that was changed, runs the new tests and the whole suite. A failure goes back to the developer. |
|
|
270
279
|
| 9. Review | `levi-teamlead` | Once the tests pass, reviews the change against the spec. Critical and warning findings go back to their owner. |
|
|
271
|
-
| 10. E2E | `levi-qa` | After the review approves, undoes any change made to the test cases outside QA, starts the app and runs every case in a headless browser (through the API or CLI when there is no UI), recording PASS or FAIL. Failing cases go back to the developer, and steps 7 to 10 repeat until the review approves and every case passes. |
|
|
280
|
+
| 10. E2E | `levi-qa` | Only when you chose browser tests. After the review approves, undoes any change made to the test cases outside QA, starts the app and runs every case in a headless browser (through the API or CLI when there is no UI), recording PASS or FAIL. Failing cases go back to the developer, and steps 7 to 10 repeat until the review approves and every case passes. Without browser tests, the run is done when the review approves. |
|
|
272
281
|
|
|
273
282
|
### Tests are locked, test cases are QA's
|
|
274
283
|
|
|
@@ -285,7 +294,7 @@ The developer's tests and QA's test cases are checked against the spec by a fres
|
|
|
285
294
|
### Requirements
|
|
286
295
|
|
|
287
296
|
- A test framework the developer can run from the command line; if the project has none, the teamlead picks one and the developer sets it up.
|
|
288
|
-
- For E2E on a UI: the project's E2E runner (such as Playwright) or a browser tool the QA agent can use, and an app that starts locally.
|
|
297
|
+
- For E2E on a UI, only when you choose browser tests: the project's E2E runner (such as Playwright) or a browser tool the QA agent can use, and an app that starts locally.
|
|
289
298
|
|
|
290
299
|
### Scratch files
|
|
291
300
|
|
|
@@ -297,7 +306,7 @@ The developer's tests and QA's test cases are checked against the spec by a fres
|
|
|
297
306
|
/levi-fix-bug <what goes wrong, how to reproduce it, and screenshots or logs if you have them>
|
|
298
307
|
```
|
|
299
308
|
|
|
300
|
-
Fix a bug with the team. The developer first lists what is unclear and you confirm it; then the developer investigates and fixes it test first while QA writes the test cases, the teamlead reviews every fix, and QA tests it end to end. Tests and test cases are never changed to make them pass.
|
|
309
|
+
Fix a bug with the team. The developer first lists what is unclear and you confirm it; then the developer investigates and fixes it test first while QA writes the test cases, the teamlead reviews every fix, and, if you choose browser tests, QA tests it end to end. Tests and test cases are never changed to make them pass.
|
|
301
310
|
|
|
302
311
|
Fits requests such as "fix this bug", "X is broken" and "X shows the wrong value".
|
|
303
312
|
|
|
@@ -311,7 +320,7 @@ A bug is a defect in feature code that is already **merged into the base branch*
|
|
|
311
320
|
|
|
312
321
|
- The fix, left uncommitted in your working tree.
|
|
313
322
|
- Unit and feature tests that failed on the bug and pass now: new ones, or the existing ones when they already covered it.
|
|
314
|
-
- `docs/tests/bugs/<slug>.md` and `.xlsx`: the bug's test cases (IDs `TC-BUG-<SLUG>-001` and up), the first following the steps of your report, each with its `PASS` or `FAIL` result.
|
|
323
|
+
- `docs/tests/bugs/<slug>.md` and `.xlsx`: the bug's test cases (IDs `TC-BUG-<SLUG>-001` and up), the first following the steps of your report, each with its `PASS` or `FAIL` result when browser tests ran.
|
|
315
324
|
|
|
316
325
|
### How it works
|
|
317
326
|
|
|
@@ -326,12 +335,12 @@ A bug is a defect in feature code that is already **merged into the base branch*
|
|
|
326
335
|
|
|
327
336
|
| Step | Who | What happens |
|
|
328
337
|
|---|---|---|
|
|
329
|
-
| 3. Test cases | `levi-qa` | At the same time as step 4, without reading code: writes the test cases with its test case guide; they are snapshotted at once. Then waits for the review to approve. |
|
|
338
|
+
| 3. Test cases | `levi-qa` (strong tier, `high` effort) | At the same time as step 4, without reading code: writes the test cases with its test case guide; they are snapshotted at once. Then waits for the review to approve. |
|
|
330
339
|
| 4. Investigate, test first | `levi-developer` | Finds the root cause and makes sure unit and feature tests fail because of the bug: existing ones if they cover it, otherwise new ones. |
|
|
331
340
|
| 5. Merge check and lock | workflow | `git blame` on the root-cause lines (unmerged code stops the run), then the tests that cover the bug are locked. |
|
|
332
341
|
| 6. Fix | `levi-developer` | Fixes the root cause until the bug's tests and the whole suite pass. |
|
|
333
342
|
| 7. Review | `levi-teamlead` | Reviews the fix. Critical and warning findings go back to the developer. |
|
|
334
|
-
| 8. E2E | `levi-qa` | After the approval, undoes any change made to the test cases outside QA and runs every case in a headless browser. Failing cases go back to the developer, and steps 6 to 8 repeat until the review approves and every case passes. |
|
|
343
|
+
| 8. E2E | `levi-qa` | Only when you chose browser tests. After the approval, undoes any change made to the test cases outside QA and runs every case in a headless browser. Failing cases go back to the developer, and steps 6 to 8 repeat until the review approves and every case passes. Without browser tests, the run is done when the review approves. |
|
|
335
344
|
|
|
336
345
|
### When it stops
|
|
337
346
|
|
|
@@ -408,6 +417,8 @@ QA writes screen-level test cases from the feature specs already in your reposit
|
|
|
408
417
|
|
|
409
418
|
Fits requests such as "generate test cases for F001", "write test scenarios from the spec" and "sinh test case cho F001, F002".
|
|
410
419
|
|
|
420
|
+
Every QA call here writes or changes test cases, so it runs with the strong tier and `high` effort (the same holds for QA in `create-feature` and `fix-bug` whenever it writes or fixes test cases).
|
|
421
|
+
|
|
411
422
|
### What you get
|
|
412
423
|
|
|
413
424
|
Two files per feature in `docs/tests/`, written in the language of the spec:
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "levi-gear",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Install a software team (PM, teamlead, developer, designer, QA) as Claude Code or Codex skills and agents with test-first workflows",
|
|
5
5
|
"bin": {
|
|
6
6
|
"levi": "./bin/levi.js"
|
|
7
7
|
},
|
|
8
8
|
"scripts": {
|
|
9
|
-
"test": "node --test test/quota-check.test.mjs test/legacy-tools-cleanup.test.mjs test/codex-install.test.mjs test/codex-checkpoint.test.mjs test/lock-tests.test.mjs"
|
|
9
|
+
"test": "node --test test/quota-check.test.mjs test/legacy-tools-cleanup.test.mjs test/codex-install.test.mjs test/codex-checkpoint.test.mjs test/lock-tests.test.mjs test/agent-effort.test.mjs test/workflow-browser-tests.test.mjs"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"agents",
|
package/src/lib/agents.js
CHANGED
|
@@ -10,6 +10,7 @@ const PARTIAL = '_';
|
|
|
10
10
|
// Tool-neutral fields. The installer maps them to Claude Code in tools.js.
|
|
11
11
|
const CAPABILITIES = ['read', 'edit', 'execute', 'web'];
|
|
12
12
|
const MODEL_TIERS = ['strong', 'standard', 'fast'];
|
|
13
|
+
const EFFORTS = ['low', 'medium', 'high', 'xhigh', 'max'];
|
|
13
14
|
|
|
14
15
|
function parseList(value) {
|
|
15
16
|
return value ? value.split(',').map((s) => s.trim()).filter(Boolean) : null;
|
|
@@ -34,6 +35,9 @@ function readAgent(file, label, expectedName, owner, appendix = '') {
|
|
|
34
35
|
if (data.model && !MODEL_TIERS.includes(data.model)) {
|
|
35
36
|
throw new Error(`${label}: unknown model "${data.model}"; use ${MODEL_TIERS.join(', ')}`);
|
|
36
37
|
}
|
|
38
|
+
if (data.effort && !EFFORTS.includes(data.effort)) {
|
|
39
|
+
throw new Error(`${label}: unknown effort "${data.effort}"; use ${EFFORTS.join(', ')}`);
|
|
40
|
+
}
|
|
37
41
|
return {
|
|
38
42
|
name: data.name,
|
|
39
43
|
description: data.description,
|
|
@@ -44,6 +48,7 @@ function readAgent(file, label, expectedName, owner, appendix = '') {
|
|
|
44
48
|
owner,
|
|
45
49
|
tools,
|
|
46
50
|
model: data.model || null,
|
|
51
|
+
effort: data.effort || null,
|
|
47
52
|
};
|
|
48
53
|
}
|
|
49
54
|
|
|
@@ -59,4 +64,4 @@ function loadTeam() {
|
|
|
59
64
|
.map((f) => readAgent(path.join(TEAM_DIR, f), `agents/${f}`, PREFIX + f.slice(0, -3), null, appendix));
|
|
60
65
|
}
|
|
61
66
|
|
|
62
|
-
module.exports = { PREFIX, CAPABILITIES, MODEL_TIERS, joinSections, readAgent, loadTeam };
|
|
67
|
+
module.exports = { PREFIX, CAPABILITIES, MODEL_TIERS, EFFORTS, joinSections, readAgent, loadTeam };
|
package/src/lib/desired-state.js
CHANGED
|
@@ -95,12 +95,20 @@ function build(kit, ids, targets = ['claude']) {
|
|
|
95
95
|
skill = skill.replace(/Continue in the same session with `resumeFromRunId` and a higher `maxRounds`\./g, 'Continue from the saved work folder and increase the round limit.');
|
|
96
96
|
skill = skill.replace(/Claude Code runs `workflow\.js`\./g, 'Run the documented steps with fresh Codex subagents.');
|
|
97
97
|
skill = skill.replace(/The steps (?:the Workflow|`workflow\.js`) runs, and the ones you run when there is no Workflow tool\./g, 'Run the following steps in order.');
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
98
|
+
skill = skill.replaceAll('model `opus` and effort `high`', '`"reasoning_effort": "high"` and `"fork_turns": "none"` on `spawn_agent`');
|
|
99
|
+
skill = skill.replace('default model and effort of `levi-designer` (set in its agent file) are', 'default reasoning effort in the `levi-designer` agent file is');
|
|
100
|
+
skill = skill.replaceAll('Model and effort', 'Reasoning effort').replaceAll(/model (?:and|or) effort/g, 'reasoning effort');
|
|
101
|
+
const rules = kit.runRules.split('### Quota guard')[0]
|
|
102
|
+
.replace('among the opening answers of the handoff report', 'in the checkpoint summary for the opening round');
|
|
103
|
+
const runFolder = id === 'code-review'
|
|
104
|
+
? 'a unique directory in the operating system temporary directory, outside the project'
|
|
105
|
+
: 'a unique run folder docs/levi-runs/<slug>-<unique-id>/';
|
|
106
|
+
content = joinSections(skill, rules, '### Codex checkpoint and recovery',
|
|
107
|
+
`Before doing work, create ${runFolder} and use scripts/codex-checkpoint.mjs from this skill directory. Prepare a JSON file with {"usecase":"${id}","request":"<user request>"}, then run \`node <skill-dir>/scripts/codex-checkpoint.mjs init <run-folder>/checkpoint.json < <json-file>\`. Do not include secrets. Record the checkpoint path for the user.`,
|
|
108
|
+
'Before starting each numbered stage, and after each stage or build/review round, prepare JSON with status (running, interrupted, blocked, waiting_user, or complete), stage, summary, and next (the exact next action, including artifact and lock paths), then run `node <skill-dir>/scripts/codex-checkpoint.mjs save <run-folder>/checkpoint.json < <json-file>`. Never mark a stage complete before validating its artifacts. Preserve work, test locks and checkpoint when interrupted, blocked or waiting.',
|
|
109
|
+
'As soon as the user answers the opening questions, save the non-secret answers and the work folder path in the checkpoint summary. For a usecase with browser tests, also record the choice and any scope in `docs/levi/<slug>/choices/user-browser-tests.md` at that point.',
|
|
110
|
+
'On resume, read the checkpoint history, the work folder and the entries in `docs/levi/<slug>/choices/` for this run when present. Use `user-browser-tests.md` to restore `browserTests` and the exact wording of any `browserScope`. Reuse the opening answers without asking those questions again. Check the current git state, verify the locked tests before making changes, and continue at the recorded action without repeating completed stages. If the state is ambiguous, report it and ask rather than guessing.',
|
|
111
|
+
'Only mark complete after all gates and reports succeed. Remove temporary JSON input files and keep the checkpoint. If required subagents or tools are unavailable, record blocked and report it.');
|
|
104
112
|
}
|
|
105
113
|
if (rel === 'SKILL.md') content += '\nA running stage is not evidence that its subagent completed. On resume, first establish that the previous coordinator is no longer active. If an earlier run stopped with status running, record status interrupted; report that the cause is unknown unless there is direct evidence. Check whether every required artifact exists and was validated. If not, rerun that stage with the appropriate fresh subagent before advancing, while preserving existing user files and test locks. Never infer success from a scheduled next action. Before dispatching a subagent, checkpoint that the stage is in progress and name the subagent and its expected artifacts; only checkpoint the next stage after it finishes and its results are validated. While waiting, check the agent status with the available collaboration tools, distinguish still running from failed, and report meaningful progress. If an agent fails or cannot complete, save the error and the recovery action as blocked; do not assume success. Never start a second coordinator while the original is still active.\n';
|
|
106
114
|
if (rel === 'SKILL.md') content += '\nWhen cleaning up workflow-owned binary files such as XLSX snapshots, use a filesystem command appropriate for the platform; text patch tools cannot delete binary files. Delete only paths the workflow owns and only after the relevant gates have passed.\n';
|
|
@@ -129,7 +137,13 @@ function build(kit, ids, targets = ['claude']) {
|
|
|
129
137
|
}
|
|
130
138
|
|
|
131
139
|
function codexAgent(agent) {
|
|
132
|
-
|
|
140
|
+
const fields = [
|
|
141
|
+
`name = ${JSON.stringify(agent.name)}`,
|
|
142
|
+
`description = ${JSON.stringify(`${agent.description} Only use when a levi workflow delegates to this agent.`)}`,
|
|
143
|
+
];
|
|
144
|
+
if (agent.effort) fields.push(`model_reasoning_effort = "${agent.effort === 'max' ? 'xhigh' : agent.effort}"`);
|
|
145
|
+
fields.push(`developer_instructions = ${JSON.stringify(agent.body.trim())}`);
|
|
146
|
+
return fields.join('\n') + '\n';
|
|
133
147
|
}
|
|
134
148
|
|
|
135
149
|
module.exports = { build, usecaseGroup };
|
package/src/lib/tools.js
CHANGED
|
@@ -10,8 +10,8 @@ function agentDescription(agent) {
|
|
|
10
10
|
return `${text} Used only when ${by} delegates to it; never select it for other requests.`;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
// Tool-neutral capabilities and model tiers (see agents.js), mapped to Claude Code.
|
|
14
|
-
// `tools` keeps the defaults, including MCP servers, which an explicit list would cut off.
|
|
13
|
+
// Tool-neutral capabilities and model tiers (see agents.js), mapped to Claude Code. `effort` is passed as is.
|
|
14
|
+
// Omitting `tools` keeps the defaults, including MCP servers, which an explicit list would cut off.
|
|
15
15
|
const CLAUDE_TOOLS = { read: ['Read', 'Grep', 'Glob'], edit: ['Edit', 'Write'], execute: ['Bash'], web: ['WebFetch', 'WebSearch'] };
|
|
16
16
|
const CLAUDE_MODELS = { strong: 'opus', standard: 'sonnet', fast: 'haiku' };
|
|
17
17
|
|
|
@@ -19,6 +19,7 @@ function renderAgent(agent) {
|
|
|
19
19
|
const extra = [];
|
|
20
20
|
if (agent.tools) extra.push(`tools: ${agent.tools.flatMap((t) => CLAUDE_TOOLS[t]).join(', ')}`);
|
|
21
21
|
if (agent.model) extra.push(`model: ${CLAUDE_MODELS[agent.model]}`);
|
|
22
|
+
if (agent.effort) extra.push(`effort: ${agent.effort}`);
|
|
22
23
|
return ['---', `name: ${agent.name}`, `description: ${JSON.stringify(agentDescription(agent))}`, ...extra, '---', '', agent.body.trim(), ''].join('\n');
|
|
23
24
|
}
|
|
24
25
|
|
package/usecases/_run-rules.md
CHANGED
|
@@ -19,6 +19,15 @@ When the work yields several acceptable options and picking one can be undone ch
|
|
|
19
19
|
- Keep the rejected options reachable: files go in an `alternatives/` folder next to the deliverable; anything else is described in the entry.
|
|
20
20
|
- Before cleaning up the work folder, read `choices/`. Close the final report with the section "Choices I made for you": each choice, the pick, the alternatives, how to change it, and that the user can change any of them. Do this even when the run ends early (blocked, stalled, parked questions).
|
|
21
21
|
|
|
22
|
+
### Browser tests are optional, asked once
|
|
23
|
+
|
|
24
|
+
Any step that opens a browser to test (an E2E runner, Playwright, a browser project of Vitest, a browser tool driven by QA) is optional, because it is slow. The render check of `levi-design` is not a test and is not covered. A usecase with such a step asks the user once, in the first round of questions of the run, with the other opening questions. When nothing else needs asking the round holds this question alone: do not skip the round because there is nothing else to ask. Skip the question only when the request itself already says whether to run them. Never ask it again, not even when the run is resumed.
|
|
25
|
+
|
|
26
|
+
- **Question:** "Run browser tests?" Options: "Do not run browser tests (Recommended)", with the reason that it is much faster while unit and integration tests and the review still run and QA still writes the test cases to run later; and "Run the full E2E suite". Free text is allowed: when the user answers another way (for example, only some cases), follow it. An answer that amounts to running nothing is the first option.
|
|
27
|
+
- **Record the answer:** in `docs/levi/<slug>/choices/user-browser-tests.md`, as any other choice (the question, the pick, the alternative, how to change it), and among the opening answers of the handoff report, so that a resumed run reads it and does not ask again.
|
|
28
|
+
- **Pass it on:** when the usecase runs a workflow script, as `args.browserTests` (`true` or `false`; a missing value counts as `false`) and, when the user limited the run, `args.browserScope` with their words. A run done by hand applies it at the same steps.
|
|
29
|
+
- **When it is off:** the browser step and every step that exists only because of it (fixing what it found, running the cases again) are left out, and nothing else opens a browser either: the tests written in the run and the test suite run as a gate leave out the tests that do. QA still writes the test cases, and they stay in the deliverables without a result. The final report has the line "Browser tests: not run (the user chose this)" and lists every test case that was not run, with its ID and title. For a limited run the line says that the tests were partly run and what the user chose, and the list holds the cases left out.
|
|
30
|
+
|
|
22
31
|
### Quota guard
|
|
23
32
|
|
|
24
33
|
Applies to every run with more than one stage. Script paths are relative to this skill's folder.
|
|
@@ -29,7 +38,7 @@ Applies to every run with more than one stage. Script paths are relative to this
|
|
|
29
38
|
4. **Arming** the job, with this exact prompt: `I ran out of quota a moment ago and the run was interrupted. Please continue the process or workflow you were running.` Run `CronList` first, to avoid a duplicate; then `CronCreate` (load it with `ToolSearch` if it is deferred), recurring, cron `7 */2 * * *`, with that prompt. If `CronCreate` is not available, tell the user in your next message that the run will not resume on its own, and go on.
|
|
30
39
|
**Handoff report.** Exactly one file, `docs/breakpoints/handoff.md` (create the folder if missing). It is overwritten whole every time it is written: the previous content belongs to an earlier interruption and is replaced, except that unfinished items from it that are still unfinished must be carried into the new one. It must be enough on its own: the next session may be this same session, or another agent, and it will read only this file, with no chat history, no skills and no scheduler. So write it from scratch for a reader who knows nothing, in the user's language, with only what is true now, no filler, no references to "above" or "as discussed", and every path relative to the project root. Sections, in this order:
|
|
31
40
|
- *Status line:* the first line, `Status: interrupted | complete`, then the date, time and the usage reading (`usedPercent`, `resetsAt`).
|
|
32
|
-
- *Goal and request:* the original request in the user's words, the usecase and its arguments, and the answers given in the opening questions.
|
|
41
|
+
- *Goal and request:* the original request in the user's words, the usecase and its arguments, and the answers given in the opening questions, including the browser-tests choice and its scope when the usecase asks it.
|
|
33
42
|
- *Project context:* what the project is, the stack, the branch, how to build and test it, and the files and folders an agent must read first (specs, plans, designs, `CLAUDE.md`, the work folder).
|
|
34
43
|
- *Progress:* a stage table with status `done`, `in progress` or `not started`, each with a one-line result; for `in progress`, exactly where it stopped and what remains in it.
|
|
35
44
|
- *Done:* the deliverables made so far (path, what it is, whether it is verified), decisions taken and why, and the commands run with their result (tests, builds, checks).
|