@chankov/agent-skills 0.3.0 → 0.3.2
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/.versions/0.3.2/.claude/commands/build.md +18 -0
- package/.versions/0.3.2/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.3.2/.claude/commands/design-agent.md +14 -0
- package/.versions/0.3.2/.claude/commands/doctor-agent-skills.md +13 -0
- package/.versions/0.3.2/.claude/commands/plan.md +16 -0
- package/.versions/0.3.2/.claude/commands/prime.md +22 -0
- package/.versions/0.3.2/.claude/commands/review.md +16 -0
- package/.versions/0.3.2/.claude/commands/setup-agent-skills.md +19 -0
- package/.versions/0.3.2/.claude/commands/ship.md +17 -0
- package/.versions/0.3.2/.claude/commands/spec.md +15 -0
- package/.versions/0.3.2/.claude/commands/test.md +19 -0
- package/.versions/0.3.2/.opencode/commands/as-build.md +17 -0
- package/.versions/0.3.2/.opencode/commands/as-code-simplify.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-design-agent.md +15 -0
- package/.versions/0.3.2/.opencode/commands/as-doctor-agent-skills.md +11 -0
- package/.versions/0.3.2/.opencode/commands/as-plan.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-prime.md +22 -0
- package/.versions/0.3.2/.opencode/commands/as-review.md +15 -0
- package/.versions/0.3.2/.opencode/commands/as-setup-agent-skills.md +11 -0
- package/.versions/0.3.2/.opencode/commands/as-ship.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-spec.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-test.md +21 -0
- package/.versions/0.3.2/.pi/agents/agent-chain.yaml +49 -0
- package/.versions/0.3.2/.pi/agents/bowser.md +19 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/agent-expert.md +98 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/cli-expert.md +41 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/config-expert.md +63 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/ext-expert.md +43 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/keybinding-expert.md +134 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/prompt-expert.md +70 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/skill-expert.md +42 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/theme-expert.md +40 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/tui-expert.md +85 -0
- package/.versions/0.3.2/.pi/agents/teams.yaml +31 -0
- package/.versions/0.3.2/.pi/damage-control-rules.yaml +278 -0
- package/.versions/0.3.2/.pi/extensions/agent-skills-update-check/README.md +58 -0
- package/.versions/0.3.2/.pi/extensions/agent-skills-update-check/index.ts +161 -0
- package/.versions/0.3.2/.pi/extensions/agent-skills-update-check/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
- package/.versions/0.3.2/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
- package/.versions/0.3.2/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.3.2/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.3.2/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.3.2/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.3.2/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.3.2/.pi/extensions/package.json +9 -0
- package/.versions/0.3.2/.pi/harnesses/agent-chain/README.md +37 -0
- package/.versions/0.3.2/.pi/harnesses/agent-chain/index.ts +795 -0
- package/.versions/0.3.2/.pi/harnesses/agent-chain/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/agent-team/README.md +38 -0
- package/.versions/0.3.2/.pi/harnesses/agent-team/index.ts +732 -0
- package/.versions/0.3.2/.pi/harnesses/agent-team/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/coms/README.md +36 -0
- package/.versions/0.3.2/.pi/harnesses/coms/index.ts +1595 -0
- package/.versions/0.3.2/.pi/harnesses/coms/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/coms-net/README.md +46 -0
- package/.versions/0.3.2/.pi/harnesses/coms-net/index.ts +1637 -0
- package/.versions/0.3.2/.pi/harnesses/coms-net/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control/README.md +38 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control/index.ts +207 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control-continue/README.md +37 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control-continue/index.ts +234 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/minimal/README.md +27 -0
- package/.versions/0.3.2/.pi/harnesses/minimal/index.ts +32 -0
- package/.versions/0.3.2/.pi/harnesses/minimal/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.3.2/.pi/harnesses/package.json +9 -0
- package/.versions/0.3.2/.pi/harnesses/pi-pi/README.md +39 -0
- package/.versions/0.3.2/.pi/harnesses/pi-pi/index.ts +631 -0
- package/.versions/0.3.2/.pi/harnesses/pi-pi/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/purpose-gate/README.md +27 -0
- package/.versions/0.3.2/.pi/harnesses/purpose-gate/index.ts +82 -0
- package/.versions/0.3.2/.pi/harnesses/purpose-gate/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/session-replay/README.md +28 -0
- package/.versions/0.3.2/.pi/harnesses/session-replay/index.ts +214 -0
- package/.versions/0.3.2/.pi/harnesses/session-replay/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/subagent-widget/README.md +36 -0
- package/.versions/0.3.2/.pi/harnesses/subagent-widget/index.ts +479 -0
- package/.versions/0.3.2/.pi/harnesses/subagent-widget/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/system-select/README.md +39 -0
- package/.versions/0.3.2/.pi/harnesses/system-select/index.ts +165 -0
- package/.versions/0.3.2/.pi/harnesses/system-select/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/tilldone/README.md +35 -0
- package/.versions/0.3.2/.pi/harnesses/tilldone/index.ts +724 -0
- package/.versions/0.3.2/.pi/harnesses/tilldone/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter/README.md +31 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter/index.ts +100 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter-widget/README.md +27 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter-widget/index.ts +66 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter-widget/package.json +6 -0
- package/.versions/0.3.2/.pi/prompts/build.md +24 -0
- package/.versions/0.3.2/.pi/prompts/code-simplify.md +22 -0
- package/.versions/0.3.2/.pi/prompts/doctor-agent-skills.md +13 -0
- package/.versions/0.3.2/.pi/prompts/plan.md +16 -0
- package/.versions/0.3.2/.pi/prompts/review.md +16 -0
- package/.versions/0.3.2/.pi/prompts/setup-agent-skills.md +19 -0
- package/.versions/0.3.2/.pi/prompts/ship.md +17 -0
- package/.versions/0.3.2/.pi/prompts/spec.md +15 -0
- package/.versions/0.3.2/.pi/prompts/test.md +19 -0
- package/.versions/0.3.2/.pi/skills/bowser/SKILL.md +114 -0
- package/.versions/0.3.2/.version +1 -0
- package/.versions/0.3.2/agents/builder.md +6 -0
- package/.versions/0.3.2/agents/code-reviewer.md +93 -0
- package/.versions/0.3.2/agents/documenter.md +6 -0
- package/.versions/0.3.2/agents/plan-reviewer.md +22 -0
- package/.versions/0.3.2/agents/planner.md +6 -0
- package/.versions/0.3.2/agents/scout.md +6 -0
- package/.versions/0.3.2/agents/security-auditor.md +97 -0
- package/.versions/0.3.2/agents/test-engineer.md +89 -0
- package/.versions/0.3.2/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.3.2/hooks/hooks.json +14 -0
- package/.versions/0.3.2/hooks/session-start.sh +74 -0
- package/.versions/0.3.2/hooks/simplify-ignore-test.sh +247 -0
- package/.versions/0.3.2/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.3.2/references/accessibility-checklist.md +159 -0
- package/.versions/0.3.2/references/performance-checklist.md +121 -0
- package/.versions/0.3.2/references/prompting-patterns.md +380 -0
- package/.versions/0.3.2/references/security-checklist.md +134 -0
- package/.versions/0.3.2/references/testing-patterns.md +236 -0
- package/.versions/0.3.2/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.3.2/skills/browser-testing-with-devtools/SKILL.md +335 -0
- package/.versions/0.3.2/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.3.2/skills/code-review-and-quality/SKILL.md +347 -0
- package/.versions/0.3.2/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.3.2/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.3.2/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.3.2/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.3.2/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.3.2/skills/designing-agents/pi-harness-authoring.md +213 -0
- package/.versions/0.3.2/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.3.2/skills/frontend-ui-engineering/SKILL.md +322 -0
- package/.versions/0.3.2/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.3.2/skills/guided-workspace-setup/SKILL.md +345 -0
- package/.versions/0.3.2/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.3.2/skills/idea-refine/examples.md +238 -0
- package/.versions/0.3.2/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.3.2/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.3.2/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.3.2/skills/incremental-implementation/SKILL.md +279 -0
- package/.versions/0.3.2/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.3.2/skills/planning-and-task-breakdown/SKILL.md +237 -0
- package/.versions/0.3.2/skills/security-and-hardening/SKILL.md +349 -0
- package/.versions/0.3.2/skills/shipping-and-launch/SKILL.md +309 -0
- package/.versions/0.3.2/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.3.2/skills/spec-driven-development/SKILL.md +237 -0
- package/.versions/0.3.2/skills/test-driven-development/SKILL.md +379 -0
- package/.versions/0.3.2/skills/using-agent-skills/SKILL.md +176 -0
- package/CHANGELOG.md +36 -0
- package/bin/lib/bootstrap.js +56 -1
- package/docs/npm-install.md +30 -0
- package/package.json +1 -1
- package/skills/guided-workspace-setup/SKILL.md +16 -2
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: incremental-implementation
|
|
3
|
+
description: Delivers changes incrementally. Use when implementing any feature or change that touches more than one file. Use when you're about to write a large amount of code at once, or when a task feels too big to land in one step.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Incremental Implementation
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Build in thin vertical slices — implement one piece, test it, verify it, then expand. Avoid implementing an entire feature in one pass. Each increment should leave the system in a working, testable state. This is the execution discipline that makes large features manageable.
|
|
11
|
+
|
|
12
|
+
Each increment ends at a **user review gate**, not an auto-commit. The agent presents a standard summary and waits for explicit approval before starting the next slice. Staging and committing are the user's responsibility — the agent never runs `git add` or `git commit` on its own.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- Implementing any multi-file change
|
|
17
|
+
- Building a new feature from a task breakdown
|
|
18
|
+
- Refactoring existing code
|
|
19
|
+
- Any time you're tempted to write more than ~100 lines before testing
|
|
20
|
+
|
|
21
|
+
**When NOT to use:** Single-file, single-function changes where the scope is already minimal.
|
|
22
|
+
|
|
23
|
+
## The Increment Cycle
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
┌───────────────────────────────────────────────────┐
|
|
27
|
+
│ │
|
|
28
|
+
│ Implement ─→ Test ─→ Verify ─→ Request Review │
|
|
29
|
+
│ ▲ │ │
|
|
30
|
+
│ │ ▼ │
|
|
31
|
+
│ Revise ◄── (changes requested) ── Gate │
|
|
32
|
+
│ │ │
|
|
33
|
+
│ (approved) ───┘ │
|
|
34
|
+
│ ▼ │
|
|
35
|
+
│ Next slice │
|
|
36
|
+
│ │
|
|
37
|
+
└───────────────────────────────────────────────────┘
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
For each slice:
|
|
41
|
+
|
|
42
|
+
1. **Implement** the smallest complete piece of functionality
|
|
43
|
+
2. **Test** — run the test suite (or write a test if none exists)
|
|
44
|
+
3. **Verify** — confirm the slice works as expected (tests pass, build succeeds, manual check)
|
|
45
|
+
4. **Request review** — present the Standard Slice Summary (below) and ask the user to confirm before moving to the next slice. Use the `AskUserQuestion` tool if available; otherwise ask in chat and wait for explicit confirmation. Do **not** stage or commit — the user handles git operations manually after approval. See `git-workflow-and-versioning` for the atomic-commit guidance the user should follow when committing approved slices.
|
|
46
|
+
5. **Move to the next slice** only after explicit approval — carry forward, don't restart
|
|
47
|
+
|
|
48
|
+
## Standard Slice Summary
|
|
49
|
+
|
|
50
|
+
When requesting review, present the slice in this exact shape so the user can scan quickly:
|
|
51
|
+
|
|
52
|
+
- **Slice N: `<short title>`**
|
|
53
|
+
- **Files changed:** bulleted list, each as `path:line-range` with a 3–6 word note
|
|
54
|
+
- **What it does:** 1–2 sentences describing the behavior delivered
|
|
55
|
+
- **How it was verified:** tests run, build status, manual checks performed
|
|
56
|
+
- **Risks / things to double-check:** anything non-obvious, assumptions made, edge cases skipped
|
|
57
|
+
- **Next slice (if approved):** one-line preview of what comes next
|
|
58
|
+
|
|
59
|
+
Keep it tight. The summary is a review aid, not a report.
|
|
60
|
+
|
|
61
|
+
## Requesting Approval
|
|
62
|
+
|
|
63
|
+
Prefer the `AskUserQuestion` tool with these options:
|
|
64
|
+
|
|
65
|
+
- **Approve & continue** — slice is accepted; agent proceeds to the next slice (changes remain unstaged for the user to commit)
|
|
66
|
+
- **Request changes** — user will describe what to change; agent revises within the same slice, re-summarizes, and re-asks
|
|
67
|
+
- **Compact & continue** *(pi only, when the `compact-and-continue` extension is installed)* — call `request_compaction` with a self-contained `continuationPrompt` summarizing the remaining slices; the turn terminates, pi compacts context, then auto-resumes from the continuation prompt
|
|
68
|
+
- **Stop here** — end the session without modifying git state
|
|
69
|
+
|
|
70
|
+
If the `request_compaction` tool is not registered (e.g. running outside pi, or the extension is not installed), omit "Compact & continue" — the other three options are the universal fallback. If `AskUserQuestion` is not available, ask the same question in chat and **wait** — do not proceed on silence or ambiguous responses. On "Request changes", revise inside the current slice and re-present the summary. On "Stop here", leave the working tree untouched and end.
|
|
71
|
+
|
|
72
|
+
## Slicing Strategies
|
|
73
|
+
|
|
74
|
+
### Vertical Slices (Preferred)
|
|
75
|
+
|
|
76
|
+
Build one complete path through the stack:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
Slice 1: Create a task (DB + API + basic UI)
|
|
80
|
+
→ Tests pass, user can create a task via the UI
|
|
81
|
+
|
|
82
|
+
Slice 2: List tasks (query + API + UI)
|
|
83
|
+
→ Tests pass, user can see their tasks
|
|
84
|
+
|
|
85
|
+
Slice 3: Edit a task (update + API + UI)
|
|
86
|
+
→ Tests pass, user can modify tasks
|
|
87
|
+
|
|
88
|
+
Slice 4: Delete a task (delete + API + UI + confirmation)
|
|
89
|
+
→ Tests pass, full CRUD complete
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Each slice delivers working end-to-end functionality.
|
|
93
|
+
|
|
94
|
+
### Contract-First Slicing
|
|
95
|
+
|
|
96
|
+
When backend and frontend need to develop in parallel:
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
Slice 0: Define the API contract (types, interfaces, OpenAPI spec)
|
|
100
|
+
Slice 1a: Implement backend against the contract + API tests
|
|
101
|
+
Slice 1b: Implement frontend against mock data matching the contract
|
|
102
|
+
Slice 2: Integrate and test end-to-end
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Risk-First Slicing
|
|
106
|
+
|
|
107
|
+
Tackle the riskiest or most uncertain piece first:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Slice 1: Prove the WebSocket connection works (highest risk)
|
|
111
|
+
Slice 2: Build real-time task updates on the proven connection
|
|
112
|
+
Slice 3: Add offline support and reconnection
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
If Slice 1 fails, you discover it before investing in Slices 2 and 3.
|
|
116
|
+
|
|
117
|
+
## Implementation Rules
|
|
118
|
+
|
|
119
|
+
### Rule 0: Simplicity First
|
|
120
|
+
|
|
121
|
+
Before writing any code, ask: "What is the simplest thing that could work?"
|
|
122
|
+
|
|
123
|
+
After writing code, review it against these checks:
|
|
124
|
+
- Can this be done in fewer lines?
|
|
125
|
+
- Are these abstractions earning their complexity?
|
|
126
|
+
- Would a staff engineer look at this and say "why didn't you just..."?
|
|
127
|
+
- Am I building for hypothetical future requirements, or the current task?
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
SIMPLICITY CHECK:
|
|
131
|
+
✗ Generic EventBus with middleware pipeline for one notification
|
|
132
|
+
✓ Simple function call
|
|
133
|
+
|
|
134
|
+
✗ Abstract factory pattern for two similar components
|
|
135
|
+
✓ Two straightforward components with shared utilities
|
|
136
|
+
|
|
137
|
+
✗ Config-driven form builder for three forms
|
|
138
|
+
✓ Three form components
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Three similar lines of code is better than a premature abstraction. Implement the naive, obviously-correct version first. Optimize only after correctness is proven with tests.
|
|
142
|
+
|
|
143
|
+
### Rule 0.5: Scope Discipline
|
|
144
|
+
|
|
145
|
+
Touch only what the task requires.
|
|
146
|
+
|
|
147
|
+
Do NOT:
|
|
148
|
+
- "Clean up" code adjacent to your change
|
|
149
|
+
- Refactor imports in files you're not modifying
|
|
150
|
+
- Remove comments you don't fully understand
|
|
151
|
+
- Add features not in the spec because they "seem useful"
|
|
152
|
+
- Modernize syntax in files you're only reading
|
|
153
|
+
|
|
154
|
+
If you notice something worth improving outside your task scope, note it — don't fix it:
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
NOTICED BUT NOT TOUCHING:
|
|
158
|
+
- src/utils/format.ts has an unused import (unrelated to this task)
|
|
159
|
+
- The auth middleware could use better error messages (separate task)
|
|
160
|
+
→ Want me to create tasks for these?
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Rule 1: One Thing at a Time
|
|
164
|
+
|
|
165
|
+
Each increment changes one logical thing. Don't mix concerns:
|
|
166
|
+
|
|
167
|
+
**Bad:** One commit that adds a new component, refactors an existing one, and updates the build config.
|
|
168
|
+
|
|
169
|
+
**Good:** Three separate commits — one for each change.
|
|
170
|
+
|
|
171
|
+
### Rule 2: Keep It Compilable
|
|
172
|
+
|
|
173
|
+
After each increment, the project must build and existing tests must pass. Don't leave the codebase in a broken state between slices.
|
|
174
|
+
|
|
175
|
+
### Rule 3: Feature Flags for Incomplete Features
|
|
176
|
+
|
|
177
|
+
If a feature isn't ready for users but you need to merge increments:
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
// Feature flag for work-in-progress
|
|
181
|
+
const ENABLE_TASK_SHARING = process.env.FEATURE_TASK_SHARING === 'true';
|
|
182
|
+
|
|
183
|
+
if (ENABLE_TASK_SHARING) {
|
|
184
|
+
// New sharing UI
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
This lets you merge small increments to the main branch without exposing incomplete work.
|
|
189
|
+
|
|
190
|
+
### Rule 4: Safe Defaults
|
|
191
|
+
|
|
192
|
+
New code should default to safe, conservative behavior:
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// Safe: disabled by default, opt-in
|
|
196
|
+
export function createTask(data: TaskInput, options?: { notify?: boolean }) {
|
|
197
|
+
const shouldNotify = options?.notify ?? false;
|
|
198
|
+
// ...
|
|
199
|
+
}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
### Rule 5: Rollback-Friendly
|
|
203
|
+
|
|
204
|
+
Each increment should be independently revertable:
|
|
205
|
+
|
|
206
|
+
- Additive changes (new files, new functions) are easy to revert
|
|
207
|
+
- Modifications to existing code should be minimal and focused
|
|
208
|
+
- Database migrations should have corresponding rollback migrations
|
|
209
|
+
- Avoid deleting something in one commit and replacing it in the same commit — separate them
|
|
210
|
+
|
|
211
|
+
Rollback safety now depends on the user committing promptly after approval. If the user defers committing across multiple approved slices, they accept the risk of a larger uncommitted diff — the agent should still not stage or commit on their behalf.
|
|
212
|
+
|
|
213
|
+
## Working with Agents
|
|
214
|
+
|
|
215
|
+
When directing an agent to implement incrementally:
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
"Let's implement Task 3 from the plan.
|
|
219
|
+
|
|
220
|
+
Start with just the database schema change and the API endpoint.
|
|
221
|
+
Don't touch the UI yet — we'll do that in the next increment.
|
|
222
|
+
|
|
223
|
+
After implementing, run `npm test` and `npm run build` to verify
|
|
224
|
+
nothing is broken, then present the Standard Slice Summary and
|
|
225
|
+
wait for my approval before the next slice. Do not stage or
|
|
226
|
+
commit — I'll handle git manually after reviewing."
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Be explicit about what's in scope and what's NOT in scope for each increment.
|
|
230
|
+
|
|
231
|
+
## Increment Checklist
|
|
232
|
+
|
|
233
|
+
After each increment, verify:
|
|
234
|
+
|
|
235
|
+
- [ ] The change does one thing and does it completely
|
|
236
|
+
- [ ] All existing tests still pass (`npm test`)
|
|
237
|
+
- [ ] The build succeeds (`npm run build`)
|
|
238
|
+
- [ ] Type checking passes (`npx tsc --noEmit`)
|
|
239
|
+
- [ ] Linting passes (`npm run lint`)
|
|
240
|
+
- [ ] The new functionality works as expected
|
|
241
|
+
- [ ] The Standard Slice Summary was presented to the user
|
|
242
|
+
- [ ] Explicit user approval was received before starting the next slice
|
|
243
|
+
- [ ] The agent did not run `git add`, `git commit`, `git reset`, or `git restore` during this slice (whatever the user staged or committed between slices is preserved as-is)
|
|
244
|
+
|
|
245
|
+
## Common Rationalizations
|
|
246
|
+
|
|
247
|
+
| Rationalization | Reality |
|
|
248
|
+
|---|---|
|
|
249
|
+
| "I'll test it all at the end" | Bugs compound. A bug in Slice 1 makes Slices 2-5 wrong. Test each slice. |
|
|
250
|
+
| "It's faster to do it all at once" | It *feels* faster until something breaks and you can't find which of 500 changed lines caused it. |
|
|
251
|
+
| "These changes are too small to commit separately" | Small commits are free. Large commits hide bugs and make rollbacks painful. |
|
|
252
|
+
| "I'll add the feature flag later" | If the feature isn't complete, it shouldn't be user-visible. Add the flag now. |
|
|
253
|
+
| "This refactor is small enough to include" | Refactors mixed with features make both harder to review and debug. Separate them. |
|
|
254
|
+
| "I'll just stage it to make their life easier" | Don't. The user explicitly controls staging and commits. Do not run any git state-changing command — and do not "tidy up" by unstaging or resetting what the user staged between slices. |
|
|
255
|
+
| "They didn't answer but it's obviously fine, I'll continue" | No. Silence is not approval. Wait for an explicit response before starting the next slice. |
|
|
256
|
+
|
|
257
|
+
## Red Flags
|
|
258
|
+
|
|
259
|
+
- More than 100 lines of code written without running tests
|
|
260
|
+
- Multiple unrelated changes in a single increment
|
|
261
|
+
- "Let me just quickly add this too" scope expansion
|
|
262
|
+
- Skipping the test/verify step to move faster
|
|
263
|
+
- Build or tests broken between increments
|
|
264
|
+
- Starting the next slice without explicit user approval
|
|
265
|
+
- Staging or committing changes on the user's behalf
|
|
266
|
+
- Unstaging, resetting, restoring, or stashing changes the user staged or committed between slices ("enforcing" an unstaged working tree is not the agent's job)
|
|
267
|
+
- Building abstractions before the third use case demands it
|
|
268
|
+
- Touching files outside the task scope "while I'm here"
|
|
269
|
+
- Creating new utility files for one-time operations
|
|
270
|
+
|
|
271
|
+
## Verification
|
|
272
|
+
|
|
273
|
+
After completing all increments for a task:
|
|
274
|
+
|
|
275
|
+
- [ ] Each increment was individually tested and approved by the user
|
|
276
|
+
- [ ] The full test suite passes
|
|
277
|
+
- [ ] The build is clean
|
|
278
|
+
- [ ] The feature works end-to-end as specified
|
|
279
|
+
- [ ] The agent performed no git state changes during the task (no `git add`, `git commit`, `git reset`, `git restore`, `git stash`, etc.) — whatever the user staged or committed between slices is preserved
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: performance-optimization
|
|
3
|
+
description: Optimizes application performance. Use when performance requirements exist, when you suspect performance regressions, or when Core Web Vitals or load times need improvement. Use when profiling reveals bottlenecks that need fixing.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Performance Optimization
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Measure before optimizing. Performance work without measurement is guessing — and guessing leads to premature optimization that adds complexity without improving what matters. Profile first, identify the actual bottleneck, fix it, measure again. Optimize only what measurements prove matters.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- Performance requirements exist in the spec (load time budgets, response time SLAs)
|
|
15
|
+
- Users or monitoring report slow behavior
|
|
16
|
+
- Core Web Vitals scores are below thresholds
|
|
17
|
+
- You suspect a change introduced a regression
|
|
18
|
+
- Building features that handle large datasets or high traffic
|
|
19
|
+
|
|
20
|
+
**When NOT to use:** Don't optimize before you have evidence of a problem. Premature optimization adds complexity that costs more than the performance it gains.
|
|
21
|
+
|
|
22
|
+
## Core Web Vitals Targets
|
|
23
|
+
|
|
24
|
+
| Metric | Good | Needs Improvement | Poor |
|
|
25
|
+
|--------|------|-------------------|------|
|
|
26
|
+
| **LCP** (Largest Contentful Paint) | ≤ 2.5s | ≤ 4.0s | > 4.0s |
|
|
27
|
+
| **INP** (Interaction to Next Paint) | ≤ 200ms | ≤ 500ms | > 500ms |
|
|
28
|
+
| **CLS** (Cumulative Layout Shift) | ≤ 0.1 | ≤ 0.25 | > 0.25 |
|
|
29
|
+
|
|
30
|
+
## The Optimization Workflow
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
1. MEASURE → Establish baseline with real data
|
|
34
|
+
2. IDENTIFY → Find the actual bottleneck (not assumed)
|
|
35
|
+
3. FIX → Address the specific bottleneck
|
|
36
|
+
4. VERIFY → Measure again, confirm improvement
|
|
37
|
+
5. GUARD → Add monitoring or tests to prevent regression
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 1: Measure
|
|
41
|
+
|
|
42
|
+
Two complementary approaches — use both:
|
|
43
|
+
|
|
44
|
+
- **Synthetic (Lighthouse, DevTools Performance tab):** Controlled conditions, reproducible. Best for CI regression detection and isolating specific issues.
|
|
45
|
+
- **RUM (web-vitals library, CrUX):** Real user data in real conditions. Required to validate that a fix actually improved user experience.
|
|
46
|
+
|
|
47
|
+
**Frontend:**
|
|
48
|
+
```bash
|
|
49
|
+
# Synthetic: Lighthouse in Chrome DevTools (or CI)
|
|
50
|
+
# Chrome DevTools → Performance tab → Record
|
|
51
|
+
# Chrome DevTools MCP → Performance trace
|
|
52
|
+
|
|
53
|
+
# RUM: Web Vitals library in code
|
|
54
|
+
import { onLCP, onINP, onCLS } from 'web-vitals';
|
|
55
|
+
|
|
56
|
+
onLCP(console.log);
|
|
57
|
+
onINP(console.log);
|
|
58
|
+
onCLS(console.log);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Backend:**
|
|
62
|
+
```bash
|
|
63
|
+
# Response time logging
|
|
64
|
+
# Application Performance Monitoring (APM)
|
|
65
|
+
# Database query logging with timing
|
|
66
|
+
|
|
67
|
+
# Simple timing
|
|
68
|
+
console.time('db-query');
|
|
69
|
+
const result = await db.query(...);
|
|
70
|
+
console.timeEnd('db-query');
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Where to Start Measuring
|
|
74
|
+
|
|
75
|
+
Use the symptom to decide what to measure first:
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
What is slow?
|
|
79
|
+
├── First page load
|
|
80
|
+
│ ├── Large bundle? --> Measure bundle size, check code splitting
|
|
81
|
+
│ ├── Slow server response? --> Measure TTFB in DevTools Network waterfall
|
|
82
|
+
│ │ ├── DNS long? --> Add dns-prefetch / preconnect for known origins
|
|
83
|
+
│ │ ├── TCP/TLS long? --> Enable HTTP/2, check edge deployment, keep-alive
|
|
84
|
+
│ │ └── Waiting (server) long? --> Profile backend, check queries and caching
|
|
85
|
+
│ └── Render-blocking resources? --> Check network waterfall for CSS/JS blocking
|
|
86
|
+
├── Interaction feels sluggish
|
|
87
|
+
│ ├── UI freezes on click? --> Profile main thread, look for long tasks (>50ms)
|
|
88
|
+
│ ├── Form input lag? --> Check re-renders, controlled component overhead
|
|
89
|
+
│ └── Animation jank? --> Check layout thrashing, forced reflows
|
|
90
|
+
├── Page after navigation
|
|
91
|
+
│ ├── Data loading? --> Measure API response times, check for waterfalls
|
|
92
|
+
│ └── Client rendering? --> Profile component render time, check for N+1 fetches
|
|
93
|
+
└── Backend / API
|
|
94
|
+
├── Single endpoint slow? --> Profile database queries, check indexes
|
|
95
|
+
├── All endpoints slow? --> Check connection pool, memory, CPU
|
|
96
|
+
└── Intermittent slowness? --> Check for lock contention, GC pauses, external deps
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Step 2: Identify the Bottleneck
|
|
100
|
+
|
|
101
|
+
Common bottlenecks by category:
|
|
102
|
+
|
|
103
|
+
**Frontend:**
|
|
104
|
+
|
|
105
|
+
| Symptom | Likely Cause | Investigation |
|
|
106
|
+
|---------|-------------|---------------|
|
|
107
|
+
| Slow LCP | Large images, render-blocking resources, slow server | Check network waterfall, image sizes |
|
|
108
|
+
| High CLS | Images without dimensions, late-loading content, font shifts | Check layout shift attribution |
|
|
109
|
+
| Poor INP | Heavy JavaScript on main thread, large DOM updates | Check long tasks in Performance trace |
|
|
110
|
+
| Slow initial load | Large bundle, many network requests | Check bundle size, code splitting |
|
|
111
|
+
|
|
112
|
+
**Backend:**
|
|
113
|
+
|
|
114
|
+
| Symptom | Likely Cause | Investigation |
|
|
115
|
+
|---------|-------------|---------------|
|
|
116
|
+
| Slow API responses | N+1 queries, missing indexes, unoptimized queries | Check database query log |
|
|
117
|
+
| Memory growth | Leaked references, unbounded caches, large payloads | Heap snapshot analysis |
|
|
118
|
+
| CPU spikes | Synchronous heavy computation, regex backtracking | CPU profiling |
|
|
119
|
+
| High latency | Missing caching, redundant computation, network hops | Trace requests through the stack |
|
|
120
|
+
|
|
121
|
+
### Step 3: Fix Common Anti-Patterns
|
|
122
|
+
|
|
123
|
+
#### N+1 Queries (Backend)
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
// BAD: N+1 — one query per task for the owner
|
|
127
|
+
const tasks = await db.tasks.findMany();
|
|
128
|
+
for (const task of tasks) {
|
|
129
|
+
task.owner = await db.users.findUnique({ where: { id: task.ownerId } });
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// GOOD: Single query with join/include
|
|
133
|
+
const tasks = await db.tasks.findMany({
|
|
134
|
+
include: { owner: true },
|
|
135
|
+
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
#### Unbounded Data Fetching
|
|
139
|
+
|
|
140
|
+
```typescript
|
|
141
|
+
// BAD: Fetching all records
|
|
142
|
+
const allTasks = await db.tasks.findMany();
|
|
143
|
+
|
|
144
|
+
// GOOD: Paginated with limits
|
|
145
|
+
const tasks = await db.tasks.findMany({
|
|
146
|
+
take: 20,
|
|
147
|
+
skip: (page - 1) * 20,
|
|
148
|
+
orderBy: { createdAt: 'desc' },
|
|
149
|
+
});
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
#### Missing Image Optimization (Frontend)
|
|
153
|
+
|
|
154
|
+
```html
|
|
155
|
+
<!-- BAD: No dimensions, no format optimization -->
|
|
156
|
+
<img src="/hero.jpg" />
|
|
157
|
+
|
|
158
|
+
<!-- GOOD: Hero / LCP image — art direction + resolution switching, high priority -->
|
|
159
|
+
<!--
|
|
160
|
+
Two techniques combined:
|
|
161
|
+
- Art direction (media): different crop/composition per breakpoint
|
|
162
|
+
- Resolution switching (srcset + sizes): right file size per screen density
|
|
163
|
+
-->
|
|
164
|
+
<picture>
|
|
165
|
+
<!-- Mobile: portrait crop (8:10) -->
|
|
166
|
+
<source
|
|
167
|
+
media="(max-width: 767px)"
|
|
168
|
+
srcset="/hero-mobile-400.avif 400w, /hero-mobile-800.avif 800w"
|
|
169
|
+
sizes="100vw"
|
|
170
|
+
width="800"
|
|
171
|
+
height="1000"
|
|
172
|
+
type="image/avif"
|
|
173
|
+
/>
|
|
174
|
+
<source
|
|
175
|
+
media="(max-width: 767px)"
|
|
176
|
+
srcset="/hero-mobile-400.webp 400w, /hero-mobile-800.webp 800w"
|
|
177
|
+
sizes="100vw"
|
|
178
|
+
width="800"
|
|
179
|
+
height="1000"
|
|
180
|
+
type="image/webp"
|
|
181
|
+
/>
|
|
182
|
+
<!-- Desktop: landscape crop (2:1) -->
|
|
183
|
+
<source
|
|
184
|
+
srcset="/hero-800.avif 800w, /hero-1200.avif 1200w, /hero-1600.avif 1600w"
|
|
185
|
+
sizes="(max-width: 1200px) 100vw, 1200px"
|
|
186
|
+
width="1200"
|
|
187
|
+
height="600"
|
|
188
|
+
type="image/avif"
|
|
189
|
+
/>
|
|
190
|
+
<source
|
|
191
|
+
srcset="/hero-800.webp 800w, /hero-1200.webp 1200w, /hero-1600.webp 1600w"
|
|
192
|
+
sizes="(max-width: 1200px) 100vw, 1200px"
|
|
193
|
+
width="1200"
|
|
194
|
+
height="600"
|
|
195
|
+
type="image/webp"
|
|
196
|
+
/>
|
|
197
|
+
<img
|
|
198
|
+
src="/hero-desktop.jpg"
|
|
199
|
+
width="1200"
|
|
200
|
+
height="600"
|
|
201
|
+
fetchpriority="high"
|
|
202
|
+
alt="Hero image description"
|
|
203
|
+
/>
|
|
204
|
+
</picture>
|
|
205
|
+
|
|
206
|
+
<!-- GOOD: Below-the-fold image — lazy loaded + async decoding -->
|
|
207
|
+
<img
|
|
208
|
+
src="/content.webp"
|
|
209
|
+
width="800"
|
|
210
|
+
height="400"
|
|
211
|
+
loading="lazy"
|
|
212
|
+
decoding="async"
|
|
213
|
+
alt="Content image description"
|
|
214
|
+
/>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
#### Unnecessary Re-renders (React)
|
|
218
|
+
|
|
219
|
+
```tsx
|
|
220
|
+
// BAD: Creates new object on every render, causing children to re-render
|
|
221
|
+
function TaskList() {
|
|
222
|
+
return <TaskFilters options={{ sortBy: 'date', order: 'desc' }} />;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// GOOD: Stable reference
|
|
226
|
+
const DEFAULT_OPTIONS = { sortBy: 'date', order: 'desc' } as const;
|
|
227
|
+
function TaskList() {
|
|
228
|
+
return <TaskFilters options={DEFAULT_OPTIONS} />;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// Use React.memo for expensive components
|
|
232
|
+
const TaskItem = React.memo(function TaskItem({ task }: Props) {
|
|
233
|
+
return <div>{/* expensive render */}</div>;
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// Use useMemo for expensive computations
|
|
237
|
+
function TaskStats({ tasks }: Props) {
|
|
238
|
+
const stats = useMemo(() => calculateStats(tasks), [tasks]);
|
|
239
|
+
return <div>{stats.completed} / {stats.total}</div>;
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### Large Bundle Size
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
// Modern bundlers (Vite, webpack 5+) handle named imports with tree-shaking automatically,
|
|
247
|
+
// provided the dependency ships ESM and is marked `sideEffects: false` in package.json.
|
|
248
|
+
// Profile before changing import styles — the real gains come from splitting and lazy loading.
|
|
249
|
+
|
|
250
|
+
// GOOD: Dynamic import for heavy, rarely-used features
|
|
251
|
+
const ChartLibrary = lazy(() => import('./ChartLibrary'));
|
|
252
|
+
|
|
253
|
+
// GOOD: Route-level code splitting wrapped in Suspense
|
|
254
|
+
const SettingsPage = lazy(() => import('./pages/Settings'));
|
|
255
|
+
|
|
256
|
+
function App() {
|
|
257
|
+
return (
|
|
258
|
+
<Suspense fallback={<Spinner />}>
|
|
259
|
+
<SettingsPage />
|
|
260
|
+
</Suspense>
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### Missing Caching (Backend)
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
// Cache frequently-read, rarely-changed data
|
|
269
|
+
const CACHE_TTL = 5 * 60 * 1000; // 5 minutes
|
|
270
|
+
let cachedConfig: AppConfig | null = null;
|
|
271
|
+
let cacheExpiry = 0;
|
|
272
|
+
|
|
273
|
+
async function getAppConfig(): Promise<AppConfig> {
|
|
274
|
+
if (cachedConfig && Date.now() < cacheExpiry) {
|
|
275
|
+
return cachedConfig;
|
|
276
|
+
}
|
|
277
|
+
cachedConfig = await db.config.findFirst();
|
|
278
|
+
cacheExpiry = Date.now() + CACHE_TTL;
|
|
279
|
+
return cachedConfig;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// HTTP caching headers for static assets
|
|
283
|
+
app.use('/static', express.static('public', {
|
|
284
|
+
maxAge: '1y', // Cache for 1 year
|
|
285
|
+
immutable: true, // Never revalidate (use content hashing in filenames)
|
|
286
|
+
}));
|
|
287
|
+
|
|
288
|
+
// Cache-Control for API responses
|
|
289
|
+
res.set('Cache-Control', 'public, max-age=300'); // 5 minutes
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
## Performance Budget
|
|
293
|
+
|
|
294
|
+
Set budgets and enforce them:
|
|
295
|
+
|
|
296
|
+
```
|
|
297
|
+
JavaScript bundle: < 200KB gzipped (initial load)
|
|
298
|
+
CSS: < 50KB gzipped
|
|
299
|
+
Images: < 200KB per image (above the fold)
|
|
300
|
+
Fonts: < 100KB total
|
|
301
|
+
API response time: < 200ms (p95)
|
|
302
|
+
Time to Interactive: < 3.5s on 4G
|
|
303
|
+
Lighthouse Performance score: ≥ 90
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Enforce in CI:**
|
|
307
|
+
```bash
|
|
308
|
+
# Bundle size check
|
|
309
|
+
npx bundlesize --config bundlesize.config.json
|
|
310
|
+
|
|
311
|
+
# Lighthouse CI
|
|
312
|
+
npx lhci autorun
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## See Also
|
|
316
|
+
|
|
317
|
+
For detailed performance checklists, optimization commands, and anti-pattern reference, see `references/performance-checklist.md`.
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
## Common Rationalizations
|
|
321
|
+
|
|
322
|
+
| Rationalization | Reality |
|
|
323
|
+
|---|---|
|
|
324
|
+
| "We'll optimize later" | Performance debt compounds. Fix obvious anti-patterns now, defer micro-optimizations. |
|
|
325
|
+
| "It's fast on my machine" | Your machine isn't the user's. Profile on representative hardware and networks. |
|
|
326
|
+
| "This optimization is obvious" | If you didn't measure, you don't know. Profile first. |
|
|
327
|
+
| "Users won't notice 100ms" | Research shows 100ms delays impact conversion rates. Users notice more than you think. |
|
|
328
|
+
| "The framework handles performance" | Frameworks prevent some issues but can't fix N+1 queries or oversized bundles. |
|
|
329
|
+
|
|
330
|
+
## Red Flags
|
|
331
|
+
|
|
332
|
+
- Optimization without profiling data to justify it
|
|
333
|
+
- N+1 query patterns in data fetching
|
|
334
|
+
- List endpoints without pagination
|
|
335
|
+
- Images without dimensions, lazy loading, or responsive sizes
|
|
336
|
+
- Bundle size growing without review
|
|
337
|
+
- No performance monitoring in production
|
|
338
|
+
- `React.memo` and `useMemo` everywhere (overusing is as bad as underusing)
|
|
339
|
+
|
|
340
|
+
## Verification
|
|
341
|
+
|
|
342
|
+
After any performance-related change:
|
|
343
|
+
|
|
344
|
+
- [ ] Before and after measurements exist (specific numbers)
|
|
345
|
+
- [ ] The specific bottleneck is identified and addressed
|
|
346
|
+
- [ ] Core Web Vitals are within "Good" thresholds
|
|
347
|
+
- [ ] Bundle size hasn't increased significantly
|
|
348
|
+
- [ ] No N+1 queries in new data fetching code
|
|
349
|
+
- [ ] Performance budget passes in CI (if configured)
|
|
350
|
+
- [ ] Existing tests still pass (optimization didn't break behavior)
|