@ethlete/agent-rules 0.1.0-next.6 → 0.1.0-next.60
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/AGENTS.md +28 -0
- package/CHANGELOG.md +841 -0
- package/CLAUDE.md +1 -0
- package/README.md +244 -36
- package/THIRD-PARTY-LICENSES.md +35 -0
- package/content/defaults.json +1 -1
- package/content/hooks/away-mode.py +410 -0
- package/content/hooks/background-commands.py +177 -0
- package/content/hooks/builder-idle-check.py +529 -0
- package/content/hooks/context-warning.py +666 -134
- package/content/hooks/git-safety.py +213 -0
- package/content/hooks/human-wait-check.py +167 -0
- package/content/hooks/subagent-model-policy.py +261 -0
- package/content/mods/.claude-plugin/marketplace.json +26 -0
- package/content/mods/plugins/codex-runs/.claude-plugin/plugin.json +6 -0
- package/content/mods/plugins/codex-runs/hooks/agent-runs.ts +310 -0
- package/content/mods/plugins/codex-runs/hooks/hooks.json +1 -0
- package/content/mods/plugins/codex-runs/hooks/progress.ts +130 -0
- package/content/mods/plugins/codex-runs/hooks/register.tsx +283 -0
- package/content/mods/plugins/codex-runs/tests/pane.test.ts +21 -0
- package/content/mods/plugins/codex-runs/tsconfig.json +4 -0
- package/content/mods/plugins/codex-runs/types/index.d.ts +37 -0
- package/content/mods/plugins/e2e-progress/.claude-plugin/plugin.json +6 -0
- package/content/mods/plugins/e2e-progress/hooks/hooks.json +1 -0
- package/content/mods/plugins/e2e-progress/hooks/progress.ts +205 -0
- package/content/mods/plugins/e2e-progress/hooks/register.tsx +498 -0
- package/content/mods/plugins/e2e-progress/tsconfig.json +3 -0
- package/content/mods/plugins/e2e-progress/types/index.d.ts +27 -0
- package/content/mods/plugins/status-line/.claude-plugin/plugin.json +6 -0
- package/content/mods/plugins/status-line/hooks/hooks.json +1 -0
- package/content/mods/plugins/status-line/hooks/line.ts +74 -0
- package/content/mods/plugins/status-line/hooks/register.tsx +141 -0
- package/content/mods/plugins/status-line/types/index.d.ts +5 -0
- package/content/mods/plugins/usage-line/.claude-plugin/plugin.json +6 -0
- package/content/mods/plugins/usage-line/hooks/codex.ts +52 -0
- package/content/mods/plugins/usage-line/hooks/format.ts +24 -0
- package/content/mods/plugins/usage-line/hooks/hooks.json +1 -0
- package/content/mods/plugins/usage-line/hooks/rate-limits.ts +23 -0
- package/content/mods/plugins/usage-line/hooks/register.tsx +83 -0
- package/content/mods/plugins/usage-line/tsconfig.json +4 -0
- package/content/mods/plugins/usage-line/types/index.d.ts +5 -0
- package/content/output-styles/ste-clarity.md +131 -0
- package/content/rules/agent-sessions-wake-up.md +11 -0
- package/content/rules/app-styling.md +66 -0
- package/content/rules/comments.md +4 -1
- package/content/rules/lint-and-format.md +7 -5
- package/content/rules/nx-layout.md +53 -0
- package/content/rules/reactive-state.md +1 -1
- package/content/rules/styling.md +19 -10
- package/content/rules/subagent-models.md +42 -0
- package/content/rules/waiting-on-the-human.md +17 -0
- package/content/skills/agent-sessions/SKILL.md +101 -0
- package/content/skills/agent-sessions/agent-sessions.mjs +1462 -0
- package/content/skills/angular-patterns/SKILL.md +31 -7
- package/content/skills/api-source/SKILL.md +156 -0
- package/content/skills/app-testing/SKILL.md +141 -0
- package/content/skills/codex-subagent/SKILL.md +102 -0
- package/content/skills/codex-subagent/codex-agent.mjs +260 -0
- package/content/skills/codex-subagent/codex-limit.mjs +106 -0
- package/content/skills/design-exploration/SKILL.md +121 -0
- package/content/skills/design-exploration/check-story.mjs +139 -0
- package/content/skills/design-exploration/reference-shots.md +15 -0
- package/content/skills/design-exploration/shoot-template.mjs +61 -0
- package/content/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
- package/content/skills/domain-modeling/SKILL.md +71 -0
- package/content/skills/e2e-triage/SKILL.md +80 -0
- package/content/skills/figma-export/SKILL.md +16 -18
- package/content/skills/git-commit/SKILL.md +21 -7
- package/content/skills/git-flow/SKILL.md +9 -5
- package/content/skills/grill-with-docs/SKILL.md +13 -0
- package/content/skills/grilling/SKILL.md +52 -0
- package/content/skills/handoff/SKILL.md +30 -72
- package/content/skills/handoff/save.md +189 -0
- package/content/skills/query/SKILL.md +165 -74
- package/content/skills/report/SKILL.md +26 -0
- package/content/skills/rxjs-signals/SKILL.md +33 -4
- package/content/skills/sdk-docs/SKILL.md +50 -14
- package/content/skills/sdk-local-build/SKILL.md +26 -8
- package/content/skills/sdk-local-build/sdk-local-baseline.mjs +64 -0
- package/content/skills/sdk-source/SKILL.md +37 -34
- package/content/skills/sdk-update/SKILL.md +103 -0
- package/content/skills/story-styling/SKILL.md +12 -10
- package/content/skills/styleguide/SKILL.md +13 -8
- package/content/skills/styleguide/assets.md +54 -0
- package/content/skills/styleguide/changesets.md +17 -0
- package/content/skills/styleguide/file-structure.md +73 -0
- package/content/skills/styleguide/lint-rule-lookup.md +52 -0
- package/content/skills/styleguide/storybook-structure.md +25 -0
- package/content/skills/theming/SKILL.md +76 -49
- package/content/skills/verify-in-app/SKILL.md +107 -0
- package/content/skills/verify-in-storybook/SKILL.md +1 -1
- package/content/skills/verify-on-apple-devices/SKILL.md +100 -0
- package/content/skills/verify-on-apple-devices/apple-remote.sh +421 -0
- package/content/skills/verify-on-apple-devices/sim-edge-back.m +159 -0
- package/migrations/list-state-query-form.md +20 -0
- package/migrations/nx-layout.md +29 -0
- package/migrations/sdk-components-over-hand-built-ui.md +27 -0
- package/migrations/search-query-field.md +52 -0
- package/migrations/studio-claude-plugin.md +27 -0
- package/migrations.json +47 -0
- package/package.json +8 -3
- package/src/index.js +84 -28
- package/src/index.js.map +1 -1
- package/src/lib/cli-args.d.ts +9 -0
- package/src/lib/cli-args.js +48 -0
- package/src/lib/cli-args.js.map +1 -0
- package/src/lib/commitlint.d.ts +10 -0
- package/src/lib/commitlint.js +51 -0
- package/src/lib/commitlint.js.map +1 -0
- package/src/lib/config.d.ts +53 -22
- package/src/lib/config.js +128 -12
- package/src/lib/config.js.map +1 -1
- package/src/lib/filter.d.ts +3 -0
- package/src/lib/filter.js +7 -5
- package/src/lib/filter.js.map +1 -1
- package/src/lib/frontmatter.d.ts +2 -0
- package/src/lib/frontmatter.js +33 -5
- package/src/lib/frontmatter.js.map +1 -1
- package/src/lib/git-flow/config.js +1 -1
- package/src/lib/git-flow/config.js.map +1 -1
- package/src/lib/git-flow/index.d.ts +1 -0
- package/src/lib/git-flow/index.js +20 -6
- package/src/lib/git-flow/index.js.map +1 -1
- package/src/lib/git-flow/parse.js +38 -12
- package/src/lib/git-flow/parse.js.map +1 -1
- package/src/lib/git-flow/rename.d.ts +24 -0
- package/src/lib/git-flow/rename.js +70 -0
- package/src/lib/git-flow/rename.js.map +1 -0
- package/src/lib/git-flow/start.d.ts +27 -0
- package/src/lib/git-flow/start.js +34 -1
- package/src/lib/git-flow/start.js.map +1 -1
- package/src/lib/git-flow-command.js +10 -2
- package/src/lib/git-flow-command.js.map +1 -1
- package/src/lib/git-flow-repair.d.ts +1 -1
- package/src/lib/git-flow-repair.js +30 -15
- package/src/lib/git-flow-repair.js.map +1 -1
- package/src/lib/git-flow-start.d.ts +1 -1
- package/src/lib/git-flow-start.js +25 -32
- package/src/lib/git-flow-start.js.map +1 -1
- package/src/lib/git.d.ts +37 -0
- package/src/lib/git.js +85 -3
- package/src/lib/git.js.map +1 -1
- package/src/lib/gitlab.js +24 -6
- package/src/lib/gitlab.js.map +1 -1
- package/src/lib/index.d.ts +2 -0
- package/src/lib/index.js +26 -11
- package/src/lib/index.js.map +1 -1
- package/src/lib/migrate.js +8 -2
- package/src/lib/migrate.js.map +1 -1
- package/src/lib/output-style-command.d.ts +3 -0
- package/src/lib/output-style-command.js +69 -0
- package/src/lib/output-style-command.js.map +1 -0
- package/src/lib/output-style.d.ts +38 -0
- package/src/lib/output-style.js +134 -0
- package/src/lib/output-style.js.map +1 -0
- package/src/lib/owned-paths.js +8 -2
- package/src/lib/owned-paths.js.map +1 -1
- package/src/lib/package-runner.d.ts +4 -0
- package/src/lib/package-runner.js +86 -0
- package/src/lib/package-runner.js.map +1 -0
- package/src/lib/plain-text.d.ts +9 -0
- package/src/lib/plain-text.js +22 -0
- package/src/lib/plain-text.js.map +1 -0
- package/src/lib/plan.d.ts +6 -6
- package/src/lib/plan.js +153 -40
- package/src/lib/plan.js.map +1 -1
- package/src/lib/prettier.d.ts +21 -0
- package/src/lib/prettier.js +51 -0
- package/src/lib/prettier.js.map +1 -0
- package/src/lib/prompt.js +10 -2
- package/src/lib/prompt.js.map +1 -1
- package/src/lib/render.d.ts +14 -1
- package/src/lib/render.js +23 -5
- package/src/lib/render.js.map +1 -1
- package/src/lib/report-command.d.ts +34 -0
- package/src/lib/report-command.js +322 -0
- package/src/lib/report-command.js.map +1 -0
- package/src/lib/sessions-command.d.ts +4 -0
- package/src/lib/sessions-command.js +16 -0
- package/src/lib/sessions-command.js.map +1 -0
- package/src/lib/sync.d.ts +1 -2
- package/src/lib/sync.js +37 -17
- package/src/lib/sync.js.map +1 -1
- package/src/lib/targets/agents-skills.js +1 -1
- package/src/lib/targets/agents-skills.js.map +1 -1
- package/src/lib/targets/claude-hooks.d.ts +5 -0
- package/src/lib/targets/claude-hooks.js +27 -4
- package/src/lib/targets/claude-hooks.js.map +1 -1
- package/src/lib/targets/claude-mods.d.ts +20 -0
- package/src/lib/targets/claude-mods.js +47 -0
- package/src/lib/targets/claude-mods.js.map +1 -0
- package/src/lib/targets/claude.js +2 -3
- package/src/lib/targets/claude.js.map +1 -1
- package/src/lib/targets/codex-hooks.js +4 -2
- package/src/lib/targets/codex-hooks.js.map +1 -1
- package/src/lib/targets/codex.js +4 -4
- package/src/lib/targets/codex.js.map +1 -1
- package/src/lib/targets/copilot.js +4 -4
- package/src/lib/targets/copilot.js.map +1 -1
- package/src/lib/targets/cursor.js +3 -3
- package/src/lib/targets/cursor.js.map +1 -1
- package/src/lib/targets/git-hooks.d.ts +1 -1
- package/src/lib/targets/git-hooks.js +6 -5
- package/src/lib/targets/git-hooks.js.map +1 -1
- package/src/lib/targets/hooks-shared.d.ts +34 -5
- package/src/lib/targets/hooks-shared.js +132 -36
- package/src/lib/targets/hooks-shared.js.map +1 -1
- package/src/lib/targets/mcp.d.ts +25 -0
- package/src/lib/targets/mcp.js +114 -0
- package/src/lib/targets/mcp.js.map +1 -0
- package/src/lib/targets/shared.d.ts +1 -9
- package/src/lib/targets/shared.js +4 -8
- package/src/lib/targets/shared.js.map +1 -1
- package/src/lib/timetrack.d.ts +16 -0
- package/src/lib/timetrack.js +149 -0
- package/src/lib/timetrack.js.map +1 -0
- package/content/skills/styleguide/STYLEGUIDE.md +0 -520
- package/src/lib/jira.d.ts +0 -28
- package/src/lib/jira.js +0 -83
- package/src/lib/jira.js.map +0 -1
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Screenshot one Storybook story, with optional forced pseudo-states.
|
|
3
|
+
*
|
|
4
|
+
* Copy to the repository root - Node resolves `playwright` from the working directory.
|
|
5
|
+
*
|
|
6
|
+
* node shoot.mjs <story-id> [width] [height] [out.png]
|
|
7
|
+
*
|
|
8
|
+
* To hold :hover / :focus-visible / :active open at the same time, fill FORCED below with
|
|
9
|
+
* one entry per element. A CSS selector is matched inside the story's document.
|
|
10
|
+
*/
|
|
11
|
+
import { chromium } from 'playwright';
|
|
12
|
+
|
|
13
|
+
const BASE = process.env.SB_URL ?? 'http://localhost:4400';
|
|
14
|
+
|
|
15
|
+
/** @type {{ selector: string, states: ('hover'|'focus'|'focus-visible'|'active')[] }[]} */
|
|
16
|
+
const FORCED = [
|
|
17
|
+
// { selector: '[data-state="hover"] .the-band', states: ['hover'] },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const [id, width = '1100', height = '760', out = 'shot.png'] = process.argv.slice(2);
|
|
21
|
+
|
|
22
|
+
if (!id) {
|
|
23
|
+
console.error('usage: node shoot.mjs <story-id> [width] [height] [out.png]');
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const browser = await chromium.launch();
|
|
28
|
+
const page = await browser.newPage({
|
|
29
|
+
viewport: { width: Number(width), height: Number(height) },
|
|
30
|
+
deviceScaleFactor: 2,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
await page.goto(`${BASE}/iframe.html?id=${id}&viewMode=story`, { waitUntil: 'domcontentloaded' });
|
|
34
|
+
await page.waitForSelector('#storybook-root > *', { timeout: 15000 });
|
|
35
|
+
|
|
36
|
+
const overlays = await page.locator('#webpack-dev-server-client-overlay, vite-error-overlay').count();
|
|
37
|
+
if (overlays > 0) {
|
|
38
|
+
console.error('compile error overlay is present - the image would lie');
|
|
39
|
+
await browser.close();
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (FORCED.length > 0) {
|
|
44
|
+
const cdp = await page.context().newCDPSession(page);
|
|
45
|
+
await cdp.send('DOM.enable');
|
|
46
|
+
await cdp.send('CSS.enable');
|
|
47
|
+
const { root } = await cdp.send('DOM.getDocument', { depth: -1 });
|
|
48
|
+
|
|
49
|
+
for (const { selector, states } of FORCED) {
|
|
50
|
+
const { nodeIds } = await cdp.send('DOM.querySelectorAll', { nodeId: root.nodeId, selector });
|
|
51
|
+
for (const nodeId of nodeIds) {
|
|
52
|
+
await cdp.send('CSS.forcePseudoState', { nodeId, forcedPseudoClasses: states });
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
await page.waitForTimeout(400);
|
|
58
|
+
await page.screenshot({ path: out });
|
|
59
|
+
await browser.close();
|
|
60
|
+
|
|
61
|
+
console.log(out);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# CONTEXT.md Format
|
|
2
|
+
|
|
3
|
+
## Structure
|
|
4
|
+
|
|
5
|
+
```md
|
|
6
|
+
# {Context Name}
|
|
7
|
+
|
|
8
|
+
{One or two sentence description of what this context is and why it exists.}
|
|
9
|
+
|
|
10
|
+
## Language
|
|
11
|
+
|
|
12
|
+
**Order**:
|
|
13
|
+
{A one or two sentence description of the term}
|
|
14
|
+
_Avoid_: Purchase, transaction
|
|
15
|
+
|
|
16
|
+
**Invoice**:
|
|
17
|
+
A request for payment sent to a customer after delivery.
|
|
18
|
+
_Avoid_: Bill, payment request
|
|
19
|
+
|
|
20
|
+
**Customer**:
|
|
21
|
+
A person or organization that places orders.
|
|
22
|
+
_Avoid_: Client, buyer, account
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- **Be opinionated.** When multiple words exist for the same concept, pick the best one and list the others under `_Avoid_`.
|
|
28
|
+
- **Keep definitions tight.** One or two sentences max. Define what it IS, not what it does.
|
|
29
|
+
- **Only include terms specific to this project's context.** General programming concepts (timeouts, error types, utility patterns) don't belong even if the project uses them extensively. Before adding a term, ask: is this a concept unique to this context, or a general programming concept? Only the former belongs.
|
|
30
|
+
- **Group terms under subheadings** when natural clusters emerge. If all terms belong to a single cohesive area, a flat list is fine.
|
|
31
|
+
|
|
32
|
+
## Single vs multi-context repos
|
|
33
|
+
|
|
34
|
+
**Single context (most repos):** One `CONTEXT.md` at the repo root.
|
|
35
|
+
|
|
36
|
+
**Multiple contexts:** A `CONTEXT-MAP.md` at the repo root lists the contexts, where they live, and how they relate to each other:
|
|
37
|
+
|
|
38
|
+
```md
|
|
39
|
+
# Context Map
|
|
40
|
+
|
|
41
|
+
## Contexts
|
|
42
|
+
|
|
43
|
+
- [Ordering](./src/ordering/CONTEXT.md): receives and tracks customer orders
|
|
44
|
+
- [Billing](./src/billing/CONTEXT.md): generates invoices and processes payments
|
|
45
|
+
- [Fulfillment](./src/fulfillment/CONTEXT.md): manages warehouse picking and shipping
|
|
46
|
+
|
|
47
|
+
## Relationships
|
|
48
|
+
|
|
49
|
+
- **Ordering → Fulfillment**: Ordering emits `OrderPlaced` events; Fulfillment consumes them to start picking
|
|
50
|
+
- **Fulfillment → Billing**: Fulfillment emits `ShipmentDispatched` events; Billing consumes them to generate invoices
|
|
51
|
+
- **Ordering ↔ Billing**: Shared types for `CustomerId` and `Money`
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The skill infers which structure applies:
|
|
55
|
+
|
|
56
|
+
- If `CONTEXT-MAP.md` exists, read it to find contexts
|
|
57
|
+
- If only a root `CONTEXT.md` exists, single context
|
|
58
|
+
- If neither exists, create a root `CONTEXT.md` lazily when the first term is resolved
|
|
59
|
+
|
|
60
|
+
When multiple contexts exist, infer which one the current topic relates to. If unclear, ask.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: domain-modeling
|
|
3
|
+
description: Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a CONTEXT.md, or recording a design decision.
|
|
4
|
+
kind: skill
|
|
5
|
+
scope: both
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Domain Modeling
|
|
9
|
+
|
|
10
|
+
Actively build and sharpen the project's domain model as you design. This is the _active_ discipline: challenging terms, inventing edge-case scenarios, and writing the glossary down and turning decisions into tests the moment they crystallise. (Merely _reading_ `CONTEXT.md` for vocabulary is not this skill: that's a one-line habit any skill can do. This skill is for when you're changing the model, not just consuming it.)
|
|
11
|
+
|
|
12
|
+
## File structure
|
|
13
|
+
|
|
14
|
+
Most repos have a single context:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/
|
|
18
|
+
├── CONTEXT.md
|
|
19
|
+
└── src/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
If a `CONTEXT-MAP.md` exists at the root, the repo has multiple contexts. The map points to where each one lives:
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
/
|
|
26
|
+
├── CONTEXT-MAP.md
|
|
27
|
+
└── src/
|
|
28
|
+
├── ordering/
|
|
29
|
+
│ └── CONTEXT.md
|
|
30
|
+
└── billing/
|
|
31
|
+
└── CONTEXT.md
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Create files lazily: only when you have something to write. If no `CONTEXT.md` exists, create one when the first term is resolved.
|
|
35
|
+
|
|
36
|
+
## During the session
|
|
37
|
+
|
|
38
|
+
### Challenge against the glossary
|
|
39
|
+
|
|
40
|
+
When the user uses a term that conflicts with the existing language in `CONTEXT.md`, call it out immediately. "Your glossary defines 'cancellation' as X, but you seem to mean Y. Which is it?"
|
|
41
|
+
|
|
42
|
+
### Sharpen fuzzy language
|
|
43
|
+
|
|
44
|
+
When the user uses vague or overloaded terms, propose a precise canonical term. "You're saying 'account': do you mean the Customer or the User? Those are different things."
|
|
45
|
+
|
|
46
|
+
### Discuss concrete scenarios
|
|
47
|
+
|
|
48
|
+
When domain relationships are being discussed, stress-test them with specific scenarios. Invent scenarios that probe edge cases and force the user to be precise about the boundaries between concepts.
|
|
49
|
+
|
|
50
|
+
### Cross-reference with code
|
|
51
|
+
|
|
52
|
+
When the user states how something works, check whether the code agrees. If you find a contradiction, surface it: "Your code cancels entire Orders, but you just said partial cancellation is possible. Which is right?"
|
|
53
|
+
|
|
54
|
+
### Update CONTEXT.md inline
|
|
55
|
+
|
|
56
|
+
When a term is resolved, update `CONTEXT.md` right there. Don't batch these up: capture them as they happen. Use the format in {%resource:CONTEXT-FORMAT.md%}.
|
|
57
|
+
|
|
58
|
+
`CONTEXT.md` should be totally devoid of implementation details. Do not treat `CONTEXT.md` as a spec, a scratch pad, or a repository for implementation decisions. It is a glossary and nothing else.
|
|
59
|
+
|
|
60
|
+
### Record a decision as a test or a tool
|
|
61
|
+
|
|
62
|
+
Never write an ADR. A decision becomes one of these, in the same change:
|
|
63
|
+
|
|
64
|
+
1. **A test** that fails when the code goes against the decision, with a one-sentence comment that states the decision.
|
|
65
|
+
2. **A tool**: a live check that runs while the agent writes, or a generator for the base the agent then extends.
|
|
66
|
+
|
|
67
|
+
A decision that fits neither is not settled yet: keep asking. Existing ADRs stay until a cleanup pass turns each one into a test or deletes it.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
Vendored from [mattpocock/skills](https://github.com/mattpocock/skills) at `3cca18b`, MIT (Copyright (c) 2026 Matt Pocock).
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: e2e-triage
|
|
3
|
+
description: Work through a failed Playwright e2e run - read the failures file the @ethlete/cli failure reporter writes, group the failures by error, fix the largest group first, and re-run only the specs that failed. Read when an e2e run fails with more than a few tests, when an `e2e-failures.jsonl` file is present, or before you start a full e2e run after a change.
|
|
4
|
+
kind: skill
|
|
5
|
+
scope: consumer
|
|
6
|
+
requires: ['@ethlete/cli']
|
|
7
|
+
vars: [docsBaseUrl]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Triage a failed e2e run
|
|
11
|
+
|
|
12
|
+
Many failed tests rarely mean many bugs. In one real run, a single change in a shared pipe failed 61
|
|
13
|
+
tests. After the fix, 158 of the first 159 retried tests passed. So find the shared cause first, and
|
|
14
|
+
never fix failures one test at a time from the top of the log.
|
|
15
|
+
|
|
16
|
+
## Before the run
|
|
17
|
+
|
|
18
|
+
1. Check that `playwright.config.ts` lists `@ethlete/cli/playwright/failure-reporter` in `reporter`.
|
|
19
|
+
If not, add it next to the reporter that is there: `[['list'], ['@ethlete/cli/playwright/failure-reporter']]`.
|
|
20
|
+
The reporter writes one JSON line per failed attempt while the run goes on. The guide is
|
|
21
|
+
{%docsBaseUrl%}/cli/e2e.
|
|
22
|
+
2. Run the specs of the files you changed first. Start the full suite only when they pass. A full
|
|
23
|
+
run takes long, and one broken shared file fails it everywhere.
|
|
24
|
+
|
|
25
|
+
## Read the failures
|
|
26
|
+
|
|
27
|
+
The file is `e2e-failures.jsonl` next to `playwright.config.ts`, unless `E2E_FAILURES_FILE` or the
|
|
28
|
+
`outputFile` option of the reporter names another path. You can read it while the run goes on.
|
|
29
|
+
|
|
30
|
+
Each line has `test`, `location`, `project`, `status`, `retry`, `seconds`, `error`, `detail` and `context`.
|
|
31
|
+
`error` holds the first lines of the message. `detail` holds the first later line with a URL, for errors whose first lines do not name it, or `null`. `context` is the path of Playwright's
|
|
32
|
+
`error-context.md`, which holds the page snapshot at the failure.
|
|
33
|
+
|
|
34
|
+
Do not parse the console log of the run. It mixes the output of parallel workers, and it has no end
|
|
35
|
+
line if the run stops.
|
|
36
|
+
|
|
37
|
+
## Group, then fix the largest group
|
|
38
|
+
|
|
39
|
+
1. Normalize the `error` text of each line. Remove line and column numbers, timeouts in ms, ids,
|
|
40
|
+
hashes and dates. Keep the matcher, the locator and the expected value.
|
|
41
|
+
2. Group the lines by the normalized text. Count the distinct spec files per group, not only the lines.
|
|
42
|
+
A group that spans many spec files points at shared code: a component, a pipe, a fixture or a
|
|
43
|
+
test helper.
|
|
44
|
+
3. Take the largest group. Read one `context` file of it, then the code the error points at. Find
|
|
45
|
+
one cause that explains the whole group.
|
|
46
|
+
4. Fix that cause. Then re-run only the spec files of that group.
|
|
47
|
+
|
|
48
|
+
A group whose errors are a connection refused (`ERR_CONNECTION_REFUSED`, `ECONNREFUSED`) on a local mock or
|
|
49
|
+
`webServer` port is an infrastructure group, not a test verdict. Check that the server is still up,
|
|
50
|
+
restart it, and re-run those tests before you read them as failures.
|
|
51
|
+
|
|
52
|
+
Small groups that differ only in a locator often have the same cause. Check them after the large group
|
|
53
|
+
is fixed, because a fix often clears them too.
|
|
54
|
+
|
|
55
|
+
## Re-run only what failed
|
|
56
|
+
|
|
57
|
+
Take the spec file from `location`, without the `:line`. Collect each file once, then run:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
npx playwright test <file> <file> --project=<project> --no-deps
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- Pass each file as its own argument. In zsh, an unquoted `$files` is one argument, and Playwright
|
|
64
|
+
then finds no tests.
|
|
65
|
+
- `--no-deps` skips the setup projects. Leave it out if the failure is in a setup project, or if the
|
|
66
|
+
setup state is gone.
|
|
67
|
+
- `--project` comes from the `project` field. Run one call per project.
|
|
68
|
+
|
|
69
|
+
## Retries and flaky tests
|
|
70
|
+
|
|
71
|
+
With `retries` on, a test that fails each attempt has one line per attempt (`retry` 0, 1, and so on).
|
|
72
|
+
A test with a line for `retry` 0 and no line for the last retry passed on a later attempt: it is flaky.
|
|
73
|
+
Report a flaky test, but fix the stable failures first.
|
|
74
|
+
|
|
75
|
+
## Rules
|
|
76
|
+
|
|
77
|
+
- Never skip a failed test, or mark it with `test.fail()` or `test.fixme()`, to make a run pass.
|
|
78
|
+
- Never change an assertion to match the wrong value the app shows now. A failed e2e test is a
|
|
79
|
+
signal first. If you think the test is wrong, say why, and ask before you change it.
|
|
80
|
+
- Report per group: the cause, the fix, the spec files you re-ran, and what still fails.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: figma-export
|
|
3
|
-
description: Reconcile a component against a Figma export
|
|
3
|
+
description: Reconcile a component against a Figma export (.svg frame, "copy as CSS" dump) and measure the render against it. Use whenever a design export is dropped next to a component to be matched.
|
|
4
4
|
kind: skill
|
|
5
5
|
scope: both
|
|
6
6
|
---
|
|
@@ -15,18 +15,15 @@ Three things arrive from Figma, and each answers a different question:
|
|
|
15
15
|
| **`.css`** (Copy as CSS) | Named layers, auto-layout properties, typography metrics, design-token names | Any hierarchy at all — the dump is flat |
|
|
16
16
|
| **`.png`** (a screenshot) | Figma's own blue measurement overlays, and what the designer chose to frame | Nothing machine-readable |
|
|
17
17
|
|
|
18
|
-
**Ask for the `.svg` and the `.css` together
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
**Ask for the `.svg` and the `.css` together.** That pair is the preferred complete input:
|
|
19
|
+
the SVG is the export you can look at and measure, and the CSS names layers and records
|
|
20
|
+
type. A PNG earns its place only when it is a _screenshot_ carrying dev-mode annotations.
|
|
21
|
+
Exports expose rendered color values, but they do not identify the authoritative semantic
|
|
22
|
+
theme token.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`17px` you inferred from a 12px outlined glyph is worse than an open question, because it
|
|
28
|
-
survives review as though it had been specified. If the pair genuinely cannot be produced, say
|
|
29
|
-
in the write-up which numbers are therefore guesses.
|
|
24
|
+
If one artifact is missing, inspect the existing code and the artifact you do have. List
|
|
25
|
+
the exact facts that remain unknown and do not invent their measurements. Ask before a
|
|
26
|
+
structural choice or an untraceable numeric value, not before useful read-only inspection.
|
|
30
27
|
|
|
31
28
|
## 1. Read the export before touching code
|
|
32
29
|
|
|
@@ -126,8 +123,8 @@ it; the SVG has the tree but no names. The image is what disambiguates:
|
|
|
126
123
|
- **Authoritative:** geometry and typography metrics — widths, padding, gaps, `flex-grow`,
|
|
127
124
|
border radius, font size / weight / line-height / letter-spacing, and the breakpoints at
|
|
128
125
|
which the layout changes.
|
|
129
|
-
- **Never authoritative: colour.** Backgrounds, text, borders and
|
|
130
|
-
from the
|
|
126
|
+
- **Never authoritative: semantic colour choice.** Backgrounds, text, borders and
|
|
127
|
+
interaction states resolve from the repository's theme tokens. A hex in the
|
|
131
128
|
export is information about the _designer's_ palette, not a value to paste. Where the
|
|
132
129
|
export's colour and the token disagree, keep the token and note the delta for the design
|
|
133
130
|
review; the export can be wrong about contrast in a way the tokens are not. This holds
|
|
@@ -181,13 +178,14 @@ Harness gotchas, each of which will cost you an hour:
|
|
|
181
178
|
~1px wide of reality, so a label that wraps in the harness may well fit in the app. Check
|
|
182
179
|
before calling a wrap a defect.
|
|
183
180
|
- Playwright is CommonJS and unresolvable from a scratch directory — `createRequire` against
|
|
184
|
-
the repo root, as the template does.
|
|
185
|
-
|
|
181
|
+
the repo root, as the template does. When driving a story, follow the repository's
|
|
182
|
+
installed Storybook verification guidance if present.
|
|
186
183
|
|
|
187
184
|
## 5. Close the loop
|
|
188
185
|
|
|
189
186
|
Report the measured numbers next to the export's, per width — not "matches the design". Say
|
|
190
187
|
explicitly which parts of the export you deliberately did **not** implement and why (colour
|
|
191
188
|
kept as tokens, a label the product decided never to render, a field the API lacks). Then
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
report that the export files are no longer needed. Delete only artifacts this workflow
|
|
190
|
+
created and only when the workflow or user explicitly authorizes cleanup; otherwise let the
|
|
191
|
+
user decide whether supplied exports remain useful records.
|
|
@@ -1,23 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: git-commit
|
|
3
|
-
description: How to write git commits in this repo -
|
|
3
|
+
description: How to write git commits in this repo - conventional format (type(scope): Subject), lean messages, no trailers. Read before committing anything (e.g. the user says "commit this").
|
|
4
4
|
kind: skill
|
|
5
5
|
scope: both
|
|
6
|
-
vars: [commitScopes]
|
|
6
|
+
vars: [commitScopes, commitRuleSource, commitValidation]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Git commits
|
|
10
10
|
|
|
11
|
-
Commits are **lean** and follow
|
|
12
|
-
(conventional commits with a required scope):
|
|
11
|
+
Commits are **lean** and follow {%commitRuleSource%}:
|
|
13
12
|
|
|
14
|
-
- **Format: `type(scope): Subject`** - one line
|
|
13
|
+
- **Format: `type(scope): Subject`** - one line, all three parts required:
|
|
15
14
|
- `type` ∈ `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`,
|
|
16
15
|
`build`, `ci`, `chore`, `revert`
|
|
17
|
-
- `scope`
|
|
16
|
+
- `scope` ∈ {%commitScopes%}
|
|
18
17
|
- Subject is **sentence-case** ("Add the search filter", not
|
|
19
18
|
"add the search filter")
|
|
20
|
-
-
|
|
19
|
+
- {%commitValidation%}
|
|
21
20
|
- Add a short body only when the change genuinely needs context that the diff
|
|
22
21
|
can't convey.
|
|
23
22
|
- **No trailers.** Never append `Co-Authored-By`, `Claude-Session`, or similar
|
|
@@ -26,4 +25,19 @@ Commits are **lean** and follow the **commitlint rules** in `commitlint.config.j
|
|
|
26
25
|
- **Stage only what belongs to the change.** The working tree often carries
|
|
27
26
|
unrelated in-progress work - `git add` the specific files, never `git add -A`
|
|
28
27
|
blindly.
|
|
28
|
+
- **In a checkout that other sessions share**, commit with
|
|
29
|
+
`git commit -- <paths>`, so their staged files stay out. `git commit -- <path>`
|
|
30
|
+
refuses an untracked file: run `git add -N <that file>` for that one path
|
|
31
|
+
first. Pass a formatter or `eslint --fix` the exact paths you changed, never a
|
|
32
|
+
list from `git diff` or `git status` - that list holds other sessions' files.
|
|
33
|
+
- **Few commits.** One commit per finished slice of work: the code, its specs, its
|
|
34
|
+
changeset and its plan note ("as built") go in together. Fix format, lint and
|
|
35
|
+
review findings before that commit, not in a follow-up commit.
|
|
36
|
+
- **Notes are not commits of their own.** A plan, finding or status note rides
|
|
37
|
+
with the slice it belongs to; a note-only session commits once per finished
|
|
38
|
+
round, never once per finding or status line.
|
|
39
|
+
- **Sketches:** one commit per finished round and one per merge.
|
|
40
|
+
- **Never rewrite shared history.** No rebase, no `--fixup`, no `--amend` in a
|
|
41
|
+
checkout that other sessions share: it rewrites their commits too.
|
|
42
|
+
- Brief every subagent with these commit rules.
|
|
29
43
|
- Don't push unless asked.
|
|
@@ -16,16 +16,20 @@ what gets deployed to a test environment and, once accepted, merged into
|
|
|
16
16
|
**Never name a branch by hand - `start` does it from the grammar:**
|
|
17
17
|
|
|
18
18
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
{%packageRunner%} ethlete-agents git-flow start FIP-2178 # reads the issue, names it, branches off the right base
|
|
20
|
+
{%packageRunner%} ethlete-agents git-flow check # is the current branch conforming?
|
|
21
|
+
{%packageRunner%} ethlete-agents git-flow explain <branch> # what the parser sees, and what it expects
|
|
22
|
+
{%packageRunner%} ethlete-agents git-flow repair <branch> # rename a non-conforming one, retarget its MRs
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
`start` prints its plan (branch, base, MR target) and asks before writing anything; add
|
|
26
26
|
`--dry-run` to see the plan alone. It refuses on a dirty working tree, and a Task nests under
|
|
27
27
|
its parent Story's branch, so that branch has to exist first.
|
|
28
28
|
|
|
29
|
+
It reads the issue through the running Timetrack app, which holds this machine's only Jira
|
|
30
|
+
credentials. If it reports that the app is not running, ask the
|
|
31
|
+
user to start it. `--subject <text>` names a branch without reading Jira at all.
|
|
32
|
+
|
|
29
33
|
## The five shapes
|
|
30
34
|
|
|
31
35
|
| Shape | Issue | Branch from | MR targets |
|
|
@@ -80,4 +84,4 @@ legitimately target it. Leave a live one alone.
|
|
|
80
84
|
## Commit messages are a separate thing
|
|
81
85
|
|
|
82
86
|
Commits stay conventional (`feat(platform): Prefer a player's common name`) and carry **no
|
|
83
|
-
issue key** - the branch already has it.
|
|
87
|
+
issue key** - the branch already has it. Follow the repository's commit-message guidance.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grill-with-docs
|
|
3
|
+
description: A relentless interview to sharpen a plan or design, which also updates the glossary and turns each decision into a test as we go.
|
|
4
|
+
kind: skill
|
|
5
|
+
scope: both
|
|
6
|
+
modelInvocation: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Call the Skill tool twice, for {%skill:grilling%} and {%skill:domain-modeling%}.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
Vendored from [mattpocock/skills](https://github.com/mattpocock/skills) at `3cca18b`, MIT (Copyright (c) 2026 Matt Pocock).
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: grilling
|
|
3
|
+
description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
|
|
4
|
+
kind: skill
|
|
5
|
+
scope: both
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Interview the user relentlessly until you reach a shared understanding. Map this as a **design tree**: every decision branches into the decisions that hang off it.
|
|
9
|
+
|
|
10
|
+
Work the tree in **rounds**. The **frontier** is every decision whose prerequisites are already settled: the questions you can ask _now_ without guessing at answers you haven't heard yet. Ask the whole frontier in one round: number each question and give your recommended answer. Then wait for the user's answers before the next round.
|
|
11
|
+
|
|
12
|
+
Format a round like so:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
❓ **Q1** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
|
|
16
|
+
|
|
17
|
+
➡️ <your recommended answer>
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
❓ **Q2** - **<question title>**: <question body, might be multiple paragraphs, including multiple choices>
|
|
22
|
+
|
|
23
|
+
➡️ <your recommended answer>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Each round the user answers reshapes the tree: settled decisions push the frontier outward and unblock questions that depended on them. Recompute the frontier and ask the next round. A question whose answer depends on another question still open in this round belongs to a _later_ round, not this one.
|
|
27
|
+
|
|
28
|
+
Finding _facts_ is your job, never the user's. When a frontier question needs a fact from the environment (filesystem, tools, etc.), dispatch a sub-agent to find it; don't ask the user for anything you could look up yourself. Don't block on it: a running exploration is an unsettled prerequisite, so only the questions downstream of it wait for the sub-agent to report; ask the rest of the frontier now. The _decisions_ are the user's: put each to them and wait.
|
|
29
|
+
|
|
30
|
+
The session is done when the frontier is empty: every branch of the design tree visited, nothing left silently assumed. Do not act on it until the user confirms you have reached a shared understanding.
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
Vendored from [mattpocock/skills](https://github.com/mattpocock/skills) at `3cca18b`, MIT (Copyright (c) 2026 Matt Pocock).
|
|
35
|
+
|
|
36
|
+
## Local addition: write each question so it reads alone
|
|
37
|
+
|
|
38
|
+
This section is ours, not upstream.
|
|
39
|
+
|
|
40
|
+
- **One question, one situation.** Say what the thing is and why the decision matters, in plain
|
|
41
|
+
words, before the choices. The user must understand it without the earlier rounds.
|
|
42
|
+
- **No reference chains.** Never lean on other question numbers, ADR numbers, slice numbers or
|
|
43
|
+
plan shorthand ("as Q6 settled", "per ADR 07"). Name the actual thing instead.
|
|
44
|
+
- **Remind the user of a concept** when a round starts a new topic: one or two sentences, with a
|
|
45
|
+
concrete example ("a sketch is a draft with several variants of one part, for example three
|
|
46
|
+
headers").
|
|
47
|
+
- **Check the facts before you recommend.** A recommendation built on an assumed file format or
|
|
48
|
+
an assumed existing tool is worse than none. Look it up first, and say in the round when a
|
|
49
|
+
look-up proved an earlier recommendation wrong.
|
|
50
|
+
- **Decide technical questions yourself.** Put only product and UX questions to the user.
|
|
51
|
+
- **Close with the shared state.** When the frontier is empty, list every decision in one short
|
|
52
|
+
summary and ask the user to confirm it before you write it anywhere.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: handoff
|
|
3
|
-
description: Save the current work state to a handoff file so a fresh session can continue
|
|
3
|
+
description: Save the current work state to a handoff file so a fresh session can continue, or resume from one. Use when context is large, a work chunk is done, or on "handoff", "wrap up", "continue in a new session".
|
|
4
4
|
kind: skill
|
|
5
5
|
scope: both
|
|
6
6
|
vars: [handoffDir]
|
|
@@ -15,88 +15,46 @@ continue in a fresh session. Two modes:
|
|
|
15
15
|
- **save** ("handoff", "wrap up") - write a handoff file.
|
|
16
16
|
- **resume** ("continue from the handoff") - read one and continue the work.
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Text after the slug or the name is an instruction from the user, in both modes. In save mode it is
|
|
19
|
+
for the session that resumes, so it must reach that session word for word. In resume mode it wins
|
|
20
|
+
over the Next steps of the file where the two conflict. A trailing `[typed by agent-sessions]` is the restart's marker, not an instruction.
|
|
21
|
+
|
|
22
|
+
Name one invocation form to the user - your own - and never both. The skill is
|
|
23
|
+
installed as `ethlete-handoff`, so under Claude Code the commands are
|
|
24
|
+
`/ethlete-handoff` and `/ethlete-handoff resume [name]`; there is no `/handoff`.
|
|
25
|
+
Codex has no slash commands, so there the same two are plain prompts without the
|
|
26
|
+
leading `/`.
|
|
21
27
|
|
|
22
28
|
Handoff files live in `{%handoffDir%}/` (gitignored - they are personal,
|
|
23
29
|
ephemeral working state, not team docs).
|
|
24
30
|
|
|
25
|
-
## Save mode
|
|
26
|
-
|
|
27
|
-
Write `{%handoffDir%}/<slug>.md` where `<slug>` is a short kebab-case name for
|
|
28
|
-
the task (use the user-provided slug if they gave one). If the file exists,
|
|
29
|
-
overwrite it - a handoff always describes the _current_ state.
|
|
30
|
-
|
|
31
|
-
**Write for a reader with zero context.** The next session sees none of this
|
|
32
|
-
conversation. No "as discussed above", no shorthand invented mid-session. Every
|
|
33
|
-
claim must be verifiable from the repo: exact file paths, exact commands.
|
|
34
|
-
|
|
35
|
-
Template:
|
|
36
|
-
|
|
37
|
-
```markdown
|
|
38
|
-
# Handoff: <task title>
|
|
39
|
-
|
|
40
|
-
Branch: <git branch> · Last commit: <short sha> <subject>
|
|
41
|
-
Working tree: <clean | summary of uncommitted changes>
|
|
42
|
-
|
|
43
|
-
## Goal
|
|
44
|
-
|
|
45
|
-
What the overall task is and why. One paragraph max.
|
|
46
|
-
|
|
47
|
-
## State
|
|
48
|
-
|
|
49
|
-
- Done: <what is finished and verified, with file paths>
|
|
50
|
-
- In progress: <what is half-done, and exactly where it stands>
|
|
51
|
-
- Not started: <known remaining work>
|
|
52
|
-
|
|
53
|
-
## Key files
|
|
54
|
-
|
|
55
|
-
- `path/to/file.ts` - why it matters here
|
|
56
|
-
|
|
57
|
-
## Decisions & constraints
|
|
58
|
-
|
|
59
|
-
Choices already made (and why) that the next session must not re-litigate.
|
|
60
|
-
User-stated constraints verbatim.
|
|
61
|
-
|
|
62
|
-
## Gotchas / dead ends
|
|
63
|
-
|
|
64
|
-
Things that looked right but weren't. Approaches already tried and rejected,
|
|
65
|
-
and why - this is the most valuable section, don't skip it.
|
|
66
|
-
|
|
67
|
-
## Next steps
|
|
68
|
-
|
|
69
|
-
1. Concrete, ordered, actionable steps. Each should name files/commands.
|
|
70
|
-
|
|
71
|
-
## Verify
|
|
72
|
-
|
|
73
|
-
Commands to check the work (lint, storybook story ids, test commands).
|
|
74
|
-
|
|
75
|
-
## Follow-ups owed
|
|
76
|
-
|
|
77
|
-
Changeset written? Docs page updated? Whatever this repo treats as part of a
|
|
78
|
-
change rather than optional.
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Before writing, actually check `git status`, `git log -1`, and the branch - do
|
|
82
|
-
not describe state from memory. Keep the file under ~150 lines; a handoff is a
|
|
83
|
-
map, not a transcript.
|
|
31
|
+
## Save and handoff mode
|
|
84
32
|
|
|
85
|
-
|
|
86
|
-
resume from it.
|
|
33
|
+
Before you save, or when the `context-warning` hook names handoff mode, read {%resource:save.md%}: it holds save mode, handoff mode (the budget tiers), ending a turn over the budget, and clearing and resuming on your own. A resume needs none of it.
|
|
87
34
|
|
|
88
35
|
## Resume mode
|
|
89
36
|
|
|
90
37
|
1. List `{%handoffDir%}/`. Pick the file matching the given name, or the most
|
|
91
38
|
recently modified one if no name was given. If the directory is empty, say so
|
|
92
39
|
and stop.
|
|
93
|
-
2. Read the file fully.
|
|
40
|
+
2. Read the file fully. If its first line starts with `Restarted because:`, show that line to the
|
|
41
|
+
user first, then delete it from the file.
|
|
42
|
+
Then show each question under `## Open questions` to the user in full. It stays open until
|
|
43
|
+
the user answers it.
|
|
94
44
|
3. Verify reality still matches: current branch, `git status`, last commit. If
|
|
95
45
|
they diverge from the handoff (e.g. someone committed in between), say what
|
|
96
|
-
changed and adapt - the repo is the truth, the handoff is the guide.
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
46
|
+
changed and adapt - the repo is the truth, the handoff is the guide. Read each
|
|
47
|
+
result file in `.claude/handoffs/agent-results/` that the handoff names, act on it,
|
|
48
|
+
then delete it. A named agent without a result file still runs.
|
|
49
|
+
4. **Read only what you are about to change.** The handoff already carries the decisions,
|
|
50
|
+
the constraints and the dead ends, so do not re-read the plan files it summarises, and do
|
|
51
|
+
not survey the directory. Open a source file when you are going to edit it, and load a
|
|
52
|
+
focused guidance file only when the work needs one.
|
|
53
|
+
5. If the handoff name starts with a role prefix (`builder-`, `doc-agent-`) and a skill
|
|
54
|
+
of that name exists (`builder-agent`, `doc-agent`), load that skill now. Do it yourself;
|
|
55
|
+
do not wait for a line in the handoff that asks for it.
|
|
56
|
+
6. Continue with the **Next steps** section. Don't redo work listed under
|
|
100
57
|
_Done_; don't re-open questions under _Decisions_.
|
|
101
|
-
|
|
102
|
-
|
|
58
|
+
7. When every next step is complete, decide whether the handoff can be removed. Delete it
|
|
59
|
+
only if this workflow created it and the save workflow or user authorized cleanup.
|
|
60
|
+
Otherwise report that it is no longer needed and let the user decide.
|