@ziamana/bruine 0.1.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.
Files changed (107) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +315 -0
  3. package/THIRD_PARTY_NOTICES.md +24 -0
  4. package/cordis.patch.yml +166 -0
  5. package/dist/bin.js +5358 -0
  6. package/dist/compat.js +40 -0
  7. package/dist/plugins/approval.js +147 -0
  8. package/dist/plugins/headless.js +236 -0
  9. package/dist/plugins/herdr.js +470 -0
  10. package/dist/plugins/mcp.js +275 -0
  11. package/dist/plugins/modes.js +850 -0
  12. package/dist/plugins/render.js +3723 -0
  13. package/dist/plugins/repl.js +9589 -0
  14. package/dist/plugins/silence.js +234 -0
  15. package/dist/plugins/startup.js +42 -0
  16. package/dist/plugins/web-search.js +138 -0
  17. package/package.json +93 -0
  18. package/skills/code-review/SKILL.md +30 -0
  19. package/skills/git-workflow/SKILL.md +31 -0
  20. package/skills/impeccable/LICENSE +191 -0
  21. package/skills/impeccable/NOTICE.md +11 -0
  22. package/skills/impeccable/SKILL.md +87 -0
  23. package/skills/impeccable/reference/adapt.md +318 -0
  24. package/skills/impeccable/reference/adapt.native.md +58 -0
  25. package/skills/impeccable/reference/android.md +46 -0
  26. package/skills/impeccable/reference/animate.md +89 -0
  27. package/skills/impeccable/reference/audit.md +137 -0
  28. package/skills/impeccable/reference/audit.native.md +139 -0
  29. package/skills/impeccable/reference/bolder.md +33 -0
  30. package/skills/impeccable/reference/clarify.md +94 -0
  31. package/skills/impeccable/reference/colorize.md +86 -0
  32. package/skills/impeccable/reference/component-review.md +63 -0
  33. package/skills/impeccable/reference/craft-floor.md +44 -0
  34. package/skills/impeccable/reference/craft.md +5 -0
  35. package/skills/impeccable/reference/critique.md +806 -0
  36. package/skills/impeccable/reference/degraded/asset-producer.md +42 -0
  37. package/skills/impeccable/reference/degraded/documenter.md +24 -0
  38. package/skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
  39. package/skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
  40. package/skills/impeccable/reference/delight.md +70 -0
  41. package/skills/impeccable/reference/distill.md +111 -0
  42. package/skills/impeccable/reference/doctor.md +54 -0
  43. package/skills/impeccable/reference/document.md +416 -0
  44. package/skills/impeccable/reference/extract.md +69 -0
  45. package/skills/impeccable/reference/generate.md +101 -0
  46. package/skills/impeccable/reference/harden.md +345 -0
  47. package/skills/impeccable/reference/hooks.md +113 -0
  48. package/skills/impeccable/reference/init.md +131 -0
  49. package/skills/impeccable/reference/ios.md +51 -0
  50. package/skills/impeccable/reference/layout.md +84 -0
  51. package/skills/impeccable/reference/live-setup.md +104 -0
  52. package/skills/impeccable/reference/live.md +325 -0
  53. package/skills/impeccable/reference/mode-operate.md +21 -0
  54. package/skills/impeccable/reference/mode-persuade.md +19 -0
  55. package/skills/impeccable/reference/mode-read.md +21 -0
  56. package/skills/impeccable/reference/new-work.md +154 -0
  57. package/skills/impeccable/reference/onboard.md +234 -0
  58. package/skills/impeccable/reference/operate.md +61 -0
  59. package/skills/impeccable/reference/optimize.md +258 -0
  60. package/skills/impeccable/reference/overdrive.md +127 -0
  61. package/skills/impeccable/reference/polish.md +105 -0
  62. package/skills/impeccable/reference/quieter.md +99 -0
  63. package/skills/impeccable/reference/region-map.md +26 -0
  64. package/skills/impeccable/reference/routing.md +24 -0
  65. package/skills/impeccable/reference/shape.md +59 -0
  66. package/skills/impeccable/reference/typeset.md +80 -0
  67. package/skills/impeccable/reference/visualize.md +46 -0
  68. package/skills/impeccable/scripts/VERSION +1 -0
  69. package/skills/impeccable/scripts/command-metadata.json +98 -0
  70. package/skills/impeccable/scripts/data/font-index-failures.json +121 -0
  71. package/skills/impeccable/scripts/data/font-index.json +1 -0
  72. package/skills/impeccable/scripts/impeccable +206 -0
  73. package/skills/impeccable/scripts/impeccable.cmd +214 -0
  74. package/skills/impeccable/scripts/live-browser-dom.js +167 -0
  75. package/skills/impeccable/scripts/live-browser-ignores.js +242 -0
  76. package/skills/impeccable/scripts/live-browser-session.js +148 -0
  77. package/skills/impeccable/scripts/live-browser.js +13510 -0
  78. package/skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
  79. package/skills/make-interfaces-feel-better/LICENSE +21 -0
  80. package/skills/make-interfaces-feel-better/SKILL.md +187 -0
  81. package/skills/make-interfaces-feel-better/agents/openai.yaml +3 -0
  82. package/skills/make-interfaces-feel-better/animations.md +403 -0
  83. package/skills/make-interfaces-feel-better/icons.md +63 -0
  84. package/skills/make-interfaces-feel-better/performance.md +88 -0
  85. package/skills/make-interfaces-feel-better/surfaces.md +256 -0
  86. package/skills/make-interfaces-feel-better/typography.md +157 -0
  87. package/skills/playwright-cli/LICENSE +201 -0
  88. package/skills/playwright-cli/SKILL.md +489 -0
  89. package/skills/playwright-cli/references/element-attributes.md +23 -0
  90. package/skills/playwright-cli/references/playwright-tests.md +39 -0
  91. package/skills/playwright-cli/references/pr-attachments.md +60 -0
  92. package/skills/playwright-cli/references/request-mocking.md +87 -0
  93. package/skills/playwright-cli/references/running-code.md +245 -0
  94. package/skills/playwright-cli/references/session-management.md +227 -0
  95. package/skills/playwright-cli/references/storage-state.md +275 -0
  96. package/skills/playwright-cli/references/test-generation.md +433 -0
  97. package/skills/playwright-cli/references/tracing.md +139 -0
  98. package/skills/playwright-cli/references/video-recording.md +216 -0
  99. package/skills/remotion/SKILL.md +42 -0
  100. package/skills/systematic-debugging/SKILL.md +26 -0
  101. package/skills/thermo-nuclear-code-quality-review/LICENSE +21 -0
  102. package/skills/thermo-nuclear-code-quality-review/SKILL.md +192 -0
  103. package/skills/write-tests/SKILL.md +35 -0
  104. package/skills/youtube-transcript/LICENSE +21 -0
  105. package/skills/youtube-transcript/SKILL.md +41 -0
  106. package/skills/youtube-transcript/package.json +8 -0
  107. package/skills/youtube-transcript/transcript.js +44 -0
@@ -0,0 +1,139 @@
1
+ # Tracing
2
+
3
+ Capture detailed execution traces for debugging and analysis. Traces include DOM snapshots, screenshots, network activity, and console logs.
4
+
5
+ ## Basic Usage
6
+
7
+ ```bash
8
+ # Start trace recording
9
+ playwright-cli tracing-start
10
+
11
+ # Perform actions
12
+ playwright-cli open https://example.com
13
+ playwright-cli click e1
14
+ playwright-cli fill e2 "test"
15
+
16
+ # Stop trace recording
17
+ playwright-cli tracing-stop
18
+ ```
19
+
20
+ ## Trace Output Files
21
+
22
+ When you start tracing, Playwright creates a `.playwright-cli/traces/` directory with several files:
23
+
24
+ ### `trace-{timestamp}.trace`
25
+
26
+ **Action log** - The main trace file containing:
27
+ - Every action performed (clicks, fills, navigations)
28
+ - DOM snapshots before and after each action
29
+ - Screenshots at each step
30
+ - Timing information
31
+ - Console messages
32
+ - Source locations
33
+
34
+ ### `trace-{timestamp}.network`
35
+
36
+ **Network log** - Complete network activity:
37
+ - All HTTP requests and responses
38
+ - Request headers and bodies
39
+ - Response headers and bodies
40
+ - Timing (DNS, connect, TLS, TTFB, download)
41
+ - Resource sizes
42
+ - Failed requests and errors
43
+
44
+ ### `resources/`
45
+
46
+ **Resources directory** - Cached resources:
47
+ - Images, fonts, stylesheets, scripts
48
+ - Response bodies for replay
49
+ - Assets needed to reconstruct page state
50
+
51
+ ## What Traces Capture
52
+
53
+ | Category | Details |
54
+ |----------|---------|
55
+ | **Actions** | Clicks, fills, hovers, keyboard input, navigations |
56
+ | **DOM** | Full DOM snapshot before/after each action |
57
+ | **Screenshots** | Visual state at each step |
58
+ | **Network** | All requests, responses, headers, bodies, timing |
59
+ | **Console** | All console.log, warn, error messages |
60
+ | **Timing** | Precise timing for each operation |
61
+
62
+ ## Use Cases
63
+
64
+ ### Debugging Failed Actions
65
+
66
+ ```bash
67
+ playwright-cli tracing-start
68
+ playwright-cli open https://app.example.com
69
+
70
+ # This click fails - why?
71
+ playwright-cli click e5
72
+
73
+ playwright-cli tracing-stop
74
+ # Open trace to see DOM state when click was attempted
75
+ ```
76
+
77
+ ### Analyzing Performance
78
+
79
+ ```bash
80
+ playwright-cli tracing-start
81
+ playwright-cli open https://slow-site.com
82
+ playwright-cli tracing-stop
83
+
84
+ # View network waterfall to identify slow resources
85
+ ```
86
+
87
+ ### Capturing Evidence
88
+
89
+ ```bash
90
+ # Record a complete user flow for documentation
91
+ playwright-cli tracing-start
92
+
93
+ playwright-cli open https://app.example.com/checkout
94
+ playwright-cli fill e1 "4111111111111111"
95
+ playwright-cli fill e2 "12/25"
96
+ playwright-cli fill e3 "123"
97
+ playwright-cli click e4
98
+
99
+ playwright-cli tracing-stop
100
+ # Trace shows exact sequence of events
101
+ ```
102
+
103
+ ## Trace vs Video vs Screenshot
104
+
105
+ | Feature | Trace | Video | Screenshot |
106
+ |---------|-------|-------|------------|
107
+ | **Format** | .trace file | .webm video | .png/.jpeg image |
108
+ | **DOM inspection** | Yes | No | No |
109
+ | **Network details** | Yes | No | No |
110
+ | **Step-by-step replay** | Yes | Continuous | Single frame |
111
+ | **File size** | Medium | Large | Small |
112
+ | **Best for** | Debugging | Demos | Quick capture |
113
+
114
+ ## Best Practices
115
+
116
+ ### 1. Start Tracing Before the Problem
117
+
118
+ ```bash
119
+ # Trace the entire flow, not just the failing step
120
+ playwright-cli tracing-start
121
+ playwright-cli open https://example.com
122
+ # ... all steps leading to the issue ...
123
+ playwright-cli tracing-stop
124
+ ```
125
+
126
+ ### 2. Clean Up Old Traces
127
+
128
+ Traces can consume significant disk space:
129
+
130
+ ```bash
131
+ # Remove traces older than 7 days
132
+ find .playwright-cli/traces -mtime +7 -delete
133
+ ```
134
+
135
+ ## Limitations
136
+
137
+ - Traces add overhead to automation
138
+ - Large traces can consume significant disk space
139
+ - Some dynamic content may not replay perfectly
@@ -0,0 +1,216 @@
1
+ # Video Recording
2
+
3
+ Capture browser automation sessions as video for debugging, documentation, or verification. Produces WebM (VP8/VP9 codec).
4
+
5
+ ## Basic Recording
6
+
7
+ ```bash
8
+ # Open browser first
9
+ playwright-cli open
10
+
11
+ # Start recording, --cursor renders an animated mouse cursor that travels to each action point
12
+ # and paces actions by 800ms so that it has time to travel
13
+ playwright-cli video-start demo.webm --cursor --fps=60
14
+
15
+ # Add a chapter marker for section transitions
16
+ playwright-cli video-chapter "Getting Started" --description="Opening the homepage" --duration=2000
17
+
18
+ # Navigate and perform actions
19
+ playwright-cli goto https://example.com
20
+ playwright-cli snapshot
21
+ playwright-cli click e1
22
+
23
+ # Add another chapter
24
+ playwright-cli video-chapter "Filling Form" --description="Entering test data" --duration=2000
25
+ playwright-cli fill e2 "test input"
26
+
27
+ # Stop and save
28
+ playwright-cli video-stop
29
+ ```
30
+
31
+ ## Cursor, Target Highlight and Click Point
32
+
33
+ Three decorations can be drawn for each action: the mouse **cursor**, a **highlight** box around the
34
+ target element and a **point** marker at the click point. A **title** callout naming the action comes
35
+ with `video-show-actions`. The cursor is the only one `video-start --cursor` turns on; the rest are
36
+ opt-in and styled with plain CSS declarations, so they look exactly the way you want.
37
+
38
+ ```bash
39
+ # Cursor only, nothing else on screen
40
+ playwright-cli video-start demo.webm --cursor
41
+
42
+ # Action callout, plus a red click point and a dark frame around the target
43
+ playwright-cli video-show-actions --duration=800 --position=top-right \
44
+ --point-style="width: 20px; height: 20px; border-radius: 50%; background: rgba(255,0,0,.7)" \
45
+ --highlight-style="outline: 2px solid #333; background: rgba(0,128,255,.15)" \
46
+ --title-style="font-size: 16px"
47
+
48
+ # Stop annotating actions
49
+ playwright-cli video-hide-actions
50
+ ```
51
+
52
+ The same options are available programmatically, which is the better choice for hero scripts:
53
+
54
+ ```js
55
+ await page.screencast.showActions({
56
+ // 'pointer' (default) animates the cursor from the previous action point, 'none' hides it.
57
+ cursor: 'pointer',
58
+ // How long decorations stay on screen. Actions are paced by this delay, 500ms by default.
59
+ duration: 800,
60
+ // Where the action title goes: top-left, top, top-right, bottom-left, bottom, bottom-right.
61
+ position: 'top-right',
62
+ style: {
63
+ // Marker at the click point. The element is zero-sized and centered on the point,
64
+ // so give it a size, or draw around the point with box-shadow. Hidden when omitted.
65
+ point: 'width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 0, 0, .7)',
66
+ // Box that covers the target element. Hidden when omitted.
67
+ // Prefer `outline` over `border`, it does not shrink the box.
68
+ highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)',
69
+ // The action title. Use 'display: none' to keep the cursor but drop the callout.
70
+ title: 'font-size: 16px',
71
+ },
72
+ });
73
+ ```
74
+
75
+ Notes:
76
+ - All decorations fade out over `duration`. Override `animation` in a style to do something else.
77
+ - The cursor stays on screen at the last action point between actions and across navigations,
78
+ and travels along a slightly curved path, so it reads as a hand moving a mouse.
79
+ - Call `page.screencast.hideActions()` to stop annotating and hide the cursor.
80
+
81
+ ## Best Practices
82
+
83
+ ### 1. Use Descriptive Filenames
84
+
85
+ ```bash
86
+ # Include context in filename
87
+ playwright-cli video-start recordings/login-flow-2024-01-15.webm
88
+ playwright-cli video-start recordings/checkout-test-run-42.webm
89
+ ```
90
+
91
+ ### 2. Record entire hero scripts.
92
+
93
+ When recording a video for the user or as a proof of work, it is best to create a code snippet and execute it with run-code.
94
+ It allows inserting appropriate pauses between the actions and annotating the video. There are new Playwright APIs for that.
95
+
96
+ 1) Perform scenario using CLI and take note of all locators and actions. You'll need those locators to request their bounding boxes for highlight.
97
+ 2) Create a file with the intended script for video (below). Use pressSequentially w/ delay for nice typing, make reasonable pauses.
98
+ 3) Use playwright-cli run-code --filename your-script.js
99
+
100
+ **Important**: Overlays are `pointer-events: none` — they do not interfere with page interactions. You can safely keep sticky overlays visible while clicking, filling, or performing any actions on the page.
101
+
102
+ ```js
103
+ async page => {
104
+ await page.screencast.start({ path: 'video.webm', size: { width: 1280, height: 800 }, fps: 60 });
105
+ // Show the cursor and mark the click point, and pace actions by 800ms.
106
+ await page.screencast.showActions({
107
+ duration: 800,
108
+ style: {
109
+ point: 'width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 0, 0, .7)',
110
+ title: 'display: none',
111
+ },
112
+ });
113
+ await page.goto('https://demo.playwright.dev/todomvc');
114
+
115
+ // Show a chapter card — blurs the page and shows a dialog.
116
+ // Blocks until duration expires, then auto-removes.
117
+ // Use this for simple use cases, but always feel free to hand-craft your own beautiful
118
+ // overlay via await page.screencast.showOverlay().
119
+ await page.screencast.showChapter('Adding Todo Items', {
120
+ description: 'We will add several items to the todo list.',
121
+ duration: 2000,
122
+ });
123
+
124
+ // Perform action
125
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Walk the dog', { delay: 60 });
126
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
127
+ await page.waitForTimeout(1000);
128
+
129
+ // Show next chapter
130
+ await page.screencast.showChapter('Verifying Results', {
131
+ description: 'Checking the item appeared in the list.',
132
+ duration: 2000,
133
+ });
134
+
135
+ // Add a sticky annotation that stays while you perform actions.
136
+ // Overlays are pointer-events: none, so they won't block clicks.
137
+ const annotation = await page.screencast.showOverlay(`
138
+ <div style="position: absolute; top: 8px; right: 8px;
139
+ padding: 6px 12px; background: rgba(0,0,0,0.7);
140
+ border-radius: 8px; font-size: 13px; color: white;">
141
+ ✓ Item added successfully
142
+ </div>
143
+ `);
144
+
145
+ // Perform more actions while the annotation is visible
146
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).pressSequentially('Buy groceries', { delay: 60 });
147
+ await page.getByRole('textbox', { name: 'What needs to be done?' }).press('Enter');
148
+ await page.waitForTimeout(1500);
149
+
150
+ // Remove the annotation when done
151
+ await annotation.dispose();
152
+
153
+ // You can also highlight relevant locators and provide contextual annotations.
154
+ const bounds = await page.getByText('Walk the dog').boundingBox();
155
+ await page.screencast.showOverlay(`
156
+ <div style="position: absolute;
157
+ top: ${bounds.y}px;
158
+ left: ${bounds.x}px;
159
+ width: ${bounds.width}px;
160
+ height: ${bounds.height}px;
161
+ border: 1px solid red;">
162
+ </div>
163
+ <div style="position: absolute;
164
+ top: ${bounds.y + bounds.height + 5}px;
165
+ left: ${bounds.x + bounds.width / 2}px;
166
+ transform: translateX(-50%);
167
+ padding: 6px;
168
+ background: #808080;
169
+ border-radius: 10px;
170
+ font-size: 14px;
171
+ color: white;">Check it out, it is right above this text
172
+ </div>
173
+ `, { duration: 2000 });
174
+
175
+ await page.screencast.stop();
176
+ }
177
+ ```
178
+
179
+ Embrace creativity, overlays are powerful.
180
+
181
+ ### Overlay API Summary
182
+
183
+ | Method | Use Case |
184
+ |--------|----------|
185
+ | `page.screencast.showChapter(title, { description?, duration?, styleSheet? })` | Full-screen chapter card with blurred backdrop — ideal for section transitions |
186
+ | `page.screencast.showOverlay(html, { duration? })` | Custom HTML overlay — use for callouts, labels, highlights |
187
+ | `disposable.dispose()` | Remove a sticky overlay added without duration |
188
+ | `page.screencast.hideOverlays()` / `page.screencast.showOverlays()` | Temporarily hide/show all overlays |
189
+ | `page.screencast.showActions({ cursor, duration, position, style })` | Cursor, click point, target highlight and action title |
190
+ | `page.screencast.hideActions()` | Stop annotating actions and hide the cursor |
191
+
192
+ ### 3. Attach the recording to the pull request
193
+
194
+ A hero script recording is the best proof of work for a user-facing change. GitHub accepts WebM as is, so once the recording looks right, attach it with `gh` 2.99+ instead of describing the flow in words:
195
+
196
+ ```bash
197
+ gh pr create --title "feat(todo): add items inline" --body-file body.md --attach ./demo.webm
198
+ gh pr comment 123 --body "Walkthrough of the new flow." --attach ./demo.webm
199
+ gh issue comment 456 --body "Recording of the repro steps." --attach ./repro.webm
200
+ ```
201
+
202
+ `gh` appends unreferenced attachments to the end of the body, which is the right place for a walkthrough. Videos are limited to 10 MB on free plans and 100 MB on paid plans, so keep the script focused, record at a modest size such as 1280x800 and drop chapters that do not add to the story. See [pr-attachments.md](pr-attachments.md) for the full set of commands, including attaching test artifacts from CI.
203
+
204
+ ## Tracing vs Video
205
+
206
+ | Feature | Video | Tracing |
207
+ |---------|-------|---------|
208
+ | Output | WebM file | Trace file (viewable in Trace Viewer) |
209
+ | Shows | Visual recording | DOM snapshots, network, console, actions |
210
+ | Use case | Demos, documentation | Debugging, analysis |
211
+ | Size | Larger | Smaller |
212
+
213
+ ## Limitations
214
+
215
+ - Recording adds slight overhead to automation
216
+ - Large recordings can consume significant disk space
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: remotion
3
+ description: Create videos and motion design with Remotion and React: animated titles, transitions, compositions, previews, and exports.
4
+ ---
5
+
6
+ # Remotion motion design
7
+
8
+ Use this skill when the user wants a video, animated title, motion graphic, or a Remotion composition.
9
+
10
+ ## Start with the project
11
+
12
+ - Inspect the existing project, package scripts, Remotion version, compositions, and assets. Preserve the user's edits and match the project's conventions.
13
+ - For a new project, read the current official creation guide before scaffolding. Ask only for missing choices that materially affect the video, such as aspect ratio, duration, or intended audience.
14
+ - Reuse supplied images, fonts, logos, and audio. Make deliberate choices for typography, hierarchy, pacing, and transitions.
15
+
16
+ ## Build the animation
17
+
18
+ - Read the relevant official documentation before choosing APIs or installing packages. Use the version already installed when a project exists.
19
+ - Drive animation from Remotion's frame clock. Use frame-based interpolation or springs so seeking and rendering produce the same result.
20
+ - Keep duration, frame rate, and composition dimensions explicit. Use sequences to organize scenes and reusable React components for repeated visuals.
21
+ - Avoid wall-clock timers, nondeterministic randomness, and CSS animations for rendered motion. Seed any procedural effects.
22
+ - Keep text readable, respect safe margins, and test long copy. Balance quiet holds with motion; avoid making every element move at once.
23
+ - Load assets and fonts using the supported Remotion APIs. Verify their availability before rendering and handle asynchronous loading correctly.
24
+
25
+ ## Preview and deliver
26
+
27
+ - Start Remotion Studio using the project's existing script or local CLI. Open the preview when browser tools are available.
28
+ - Inspect scene boundaries, the first and last frames, typography, cropping, audio synchronization, and motion at multiple playback positions.
29
+ - Run the project's relevant checks. Fix visual or timing issues before claiming the video is ready.
30
+ - Render a video or still when the user requests an export. Confirm the resulting file exists and give its path, dimensions, duration, and format.
31
+ - Do not install extra tools or render a full video merely to explain an idea.
32
+
33
+ ## Official references
34
+
35
+ - [Remotion documentation](https://www.remotion.dev/docs/)
36
+ - [Creating a project](https://www.remotion.dev/docs/)
37
+ - [Animation fundamentals](https://www.remotion.dev/docs/animating-properties)
38
+ - [Remotion Studio](https://www.remotion.dev/docs/preview)
39
+ - [Rendering](https://www.remotion.dev/docs/render)
40
+ - [Official agent skills](https://www.remotion.dev/docs/ai/skills)
41
+
42
+ This is Bruine's own optional guide. The upstream agent skill collection is maintained at `remotion-dev/skills`; consult it when a task requires more specialized guidance.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: systematic-debugging
3
+ description: Debug by evidence, not vibes: reproduce, shrink, isolate, fix the cause, prove it stayed fixed.
4
+ ---
5
+
6
+ # Systematic debugging
7
+
8
+ Use this skill whenever something is broken: a failing test, wrong output, crash, hang, or behavior that "should work".
9
+
10
+ ## Rules
11
+ 1. **Reproduce first.** Do not theorize about a bug you cannot make happen. A minimal, deterministic reproduction is half the fix.
12
+ 2. **Read the actual error.** Stack traces, exit codes, log lines, the exact request bytes. Guessing while the error message is unread is wasted time.
13
+ 3. **Shrink it.** Remove inputs, files, flags until the bug disappears. The last removed piece is your suspect.
14
+ 4. **One variable at a time.** Change exactly one thing, run the reproduction, record the result. Batched changes prove nothing.
15
+ 5. **Fix the cause, not the symptom.** A retry that hides a race, or a null-check that hides a missing wire-up, is a bug with a job.
16
+ 6. **Prove it.** The failing reproduction must now pass, and the project's tests must stay green. Add the regression test near the seam where the bug lived.
17
+
18
+ ## When stuck
19
+ - State out loud what you have ruled out and what still explains the evidence.
20
+ - Look at the boundary, not the middle: what entered the function? What changed since it last worked?
21
+ - Re-read the docs/source of the component you suspect. Half of "weird behavior" is a misread contract.
22
+
23
+ ## Never
24
+ - No speculative refactors while a reproduction is failing.
25
+ - No "it works on my machine". The reproduction either passes here or you keep digging.
26
+ - No closing a debug session without saying: root cause, the change that fixes it, and the test that pins it.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cursor
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,192 @@
1
+ ---
2
+ name: thermo-nuclear-code-quality-review
3
+ description: Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a thermo-nuclear code quality review, thermonuclear review, deep code quality audit, or especially harsh maintainability review.
4
+ disable-model-invocation: true
5
+ ---
6
+
7
+ # Thermo-Nuclear Code Quality Review
8
+
9
+ Use this skill for an unusually strict review focused on implementation quality, maintainability, abstraction quality, and codebase health.
10
+
11
+ Above all, this skill should push the reviewer to be **ambitious** about code structure. Do not merely identify local cleanup opportunities. Actively search for "code judo" moves: restructurings that preserve behavior while making the implementation dramatically simpler, smaller, more direct, and more elegant.
12
+
13
+ ## Core Prompt
14
+
15
+ Start from this baseline:
16
+
17
+ > Perform a deep code quality audit of the current branch's changes.
18
+ > Rethink how to structure / implement the changes to meaningfully improve code quality without impacting behavior.
19
+ > Work to improve abstractions, modularity, reduce Spaghetti code, improve succinctness and legibility.
20
+ > Be ambitious, if there is a clear path to improving the implementation that involves restructuring some of the codebase, go for it.
21
+ > Be extremely thorough and rigorous. Measure twice, cut once.
22
+
23
+ ## Non-Negotiable Additional Standards
24
+
25
+ Apply the baseline prompt above, plus these explicit review rules:
26
+
27
+ 0. **Be ambitious about structural simplification.**
28
+ - Do not stop at "this could be a bit cleaner."
29
+ - Look for opportunities to reframe the change so that whole branches, helpers, modes, conditionals, or layers disappear entirely.
30
+ - Prefer the solution that makes the code feel inevitable in hindsight.
31
+ - Assume there is often a "code judo" move available: a re-organization that uses the existing architecture more effectively and makes the change dramatically simpler and more elegant.
32
+ - If you see a path to delete complexity rather than rearrange it, push hard for that path.
33
+
34
+ 1. **Do not let a PR push a file from under 1k lines to over 1k lines without a very strong reason.**
35
+ - Treat this as a strong code-quality smell by default.
36
+ - Prefer extracting helpers, subcomponents, modules, or local abstractions instead of letting a file sprawl past 1000 lines.
37
+ - If the diff crosses that threshold, explicitly ask whether the code should be decomposed first.
38
+ - Only waive this if there is a compelling structural reason and the resulting file is still clearly organized.
39
+
40
+ 2. **Do not allow random spaghetti growth in existing code.**
41
+ - Be highly suspicious of new ad-hoc conditionals, scattered special cases, or one-off branches inserted into unrelated flows.
42
+ - If a change adds "weird if statements in random places", treat that as a design problem, not a stylistic nit.
43
+ - Prefer pushing the logic into a dedicated abstraction, helper, state machine, policy object, or separate module instead of tangling an existing path.
44
+ - Call out changes that make the surrounding code harder to reason about, even if they technically work.
45
+
46
+ 3. **Bias toward cleaning the design, not just accepting working code.**
47
+ - If behavior can stay the same while the structure becomes meaningfully cleaner, push for the cleaner version.
48
+ - Do not rubber-stamp "it works" implementations that leave the codebase messier.
49
+ - Strongly prefer simplifications that remove moving pieces altogether over refactors that merely spread the same complexity around.
50
+
51
+ 4. **Prefer direct, boring, maintainable code over hacky or magical code.**
52
+ - Treat brittle, ad-hoc, or "magic" behavior as a code-quality problem.
53
+ - Be skeptical of generic mechanisms that hide simple data-shape assumptions.
54
+ - Flag thin abstractions, identity wrappers, or pass-through helpers that add indirection without buying clarity.
55
+
56
+ 5. **Push hard on type and boundary cleanliness when they affect maintainability.**
57
+ - Question unnecessary optionality, `unknown`, `any`, or cast-heavy code when a clearer type boundary could exist.
58
+ - Prefer explicit typed models or shared contracts over loosely-shaped ad-hoc objects.
59
+ - If a branch relies on silent fallback to paper over an unclear invariant, ask whether the boundary should be made explicit instead.
60
+
61
+ 6. **Keep logic in the canonical layer and reuse existing helpers.**
62
+ - Call out feature logic leaking into shared paths or implementation details leaking through APIs.
63
+ - Prefer existing canonical utilities/helpers over bespoke one-offs.
64
+ - Push code toward the right package, service, or module instead of normalizing architectural drift.
65
+
66
+ 7. **Treat unnecessary sequential orchestration and non-atomic updates as design smells when the cleaner structure is obvious.**
67
+ - If independent work is serialized for no good reason, ask whether the flow should run in parallel instead.
68
+ - If related updates can leave state half-applied, push for a more atomic structure.
69
+ - Do not over-index on micro-optimizations, but do flag avoidable orchestration complexity that makes the implementation more brittle.
70
+
71
+ ## Primary Review Questions
72
+
73
+ For every meaningful change, ask:
74
+
75
+ - Is there a "code judo" move that would make this dramatically simpler?
76
+ - Can this change be reframed so fewer concepts, branches, or helper layers are needed?
77
+ - Does this improve or worsen the local architecture?
78
+ - Did the diff add branching complexity where a better abstraction should exist?
79
+ - Did a previously cohesive module become more coupled, more stateful, or harder to scan?
80
+ - Is this logic living in the right file and layer?
81
+ - Did this change enlarge a file or component past a healthy size boundary?
82
+ - Are there repeated conditionals that signal a missing model or missing helper?
83
+ - Is the implementation direct and legible, or does it rely on special cases and incidental control flow?
84
+ - Is this abstraction actually earning its keep, or is it just a wrapper?
85
+ - Did the diff introduce casts, optionality, or ad-hoc object shapes that obscure the real invariant?
86
+ - Is this logic living in the canonical layer, or did the diff leak details across a boundary?
87
+ - Is this orchestration more sequential or less atomic than it needs to be?
88
+
89
+ ## What to Flag Aggressively
90
+
91
+ Escalate findings when you see:
92
+
93
+ - A complicated implementation where a cleaner reframing could delete whole categories of complexity.
94
+ - Refactors that move code around but fail to reduce the number of concepts a reader must hold in their head.
95
+ - A file crossing 1000 lines due to the PR, especially if the new code could be split out.
96
+ - New conditionals bolted onto unrelated code paths.
97
+ - One-off booleans, nullable modes, or flags that complicate existing control flow.
98
+ - Feature-specific logic leaking into general-purpose modules.
99
+ - Generic "magic" handling that hides simple structure and makes the code harder to reason about.
100
+ - Thin wrappers or identity abstractions that add indirection without simplifying anything.
101
+ - Unnecessary casts, `any`, `unknown`, or optional params that muddy the real contract.
102
+ - Copy-pasted logic instead of extracted helpers.
103
+ - Narrow edge-case handling implemented in the middle of an already busy function.
104
+ - Refactors that technically pass tests but make the code less modular or less readable.
105
+ - "Temporary" branching that is likely to become permanent debt.
106
+ - Bespoke helpers where the codebase already has a canonical utility for the job.
107
+ - Logic added in the wrong layer/package when it should live somewhere more central.
108
+ - Sequential async flow where obviously independent work could stay simpler and clearer with parallel execution.
109
+ - Partial-update logic that leaves state less atomic than necessary.
110
+
111
+ ## Preferred Remedies
112
+
113
+ When you identify a code-quality problem, prefer suggestions like:
114
+
115
+ - Delete a whole layer of indirection rather than polishing it.
116
+ - Reframe the state model so conditionals disappear instead of getting centralized.
117
+ - Change the ownership boundary so the feature becomes a natural extension of an existing abstraction.
118
+ - Turn special-case logic into a simpler default flow with fewer exceptions.
119
+ - Extract a helper or pure function.
120
+ - Split a large file into smaller focused modules.
121
+ - Move feature-specific logic behind a dedicated abstraction.
122
+ - Replace condition chains with a typed model or explicit dispatcher.
123
+ - Separate orchestration from business logic.
124
+ - Collapse duplicate branches into a single clearer flow.
125
+ - Delete wrappers that do not meaningfully clarify the API.
126
+ - Reuse the existing canonical helper instead of introducing a near-duplicate.
127
+ - Make type boundaries more explicit so the control flow gets simpler.
128
+ - Move the logic to the package/module/layer that already owns the concept.
129
+ - Parallelize independent work when that also simplifies the orchestration.
130
+ - Restructure related updates into a more atomic flow when partial state would be harder to reason about.
131
+
132
+ Do not be satisfied with "maybe rename this" feedback when the real issue is structural.
133
+ Do not be satisfied with a merely cleaner version of the same messy idea if there is a plausible path to a much simpler idea.
134
+
135
+ ## Review Tone
136
+
137
+ Be direct, serious, and demanding about quality.
138
+ Do not be rude, but do not soften major maintainability issues into mild suggestions.
139
+ If the code is making the codebase messier, say so clearly.
140
+ If the implementation missed an opportunity for a dramatic simplification, say that clearly too.
141
+
142
+ Good phrases:
143
+
144
+ - `this pushes the file past 1k lines. can we decompose this first?`
145
+ - `this adds another special-case branch into an already busy flow. can we move this behind its own abstraction?`
146
+ - `this works, but it makes the surrounding code more spaghetti. let's keep the behavior and restructure the implementation.`
147
+ - `this feels like feature logic leaking into a shared path. can we isolate it?`
148
+ - `this abstraction seems unnecessary. can we just keep the direct flow?`
149
+ - `why does this need a cast / optional here? can we make the boundary more explicit instead?`
150
+ - `this looks like a bespoke helper for something we already have elsewhere. can we reuse the canonical one?`
151
+ - `i think there's a code-judo move here that makes this much simpler. can we reframe this so these branches disappear?`
152
+ - `this refactor moves complexity around, but doesn't really delete it. is there a way to make the model itself simpler?`
153
+
154
+ ## Output Expectations
155
+
156
+ Prioritize findings in this order:
157
+
158
+ 1. Structural code-quality regressions
159
+ 2. Missed opportunities for dramatic simplification / code-judo restructuring
160
+ 3. Spaghetti / branching complexity increases
161
+ 4. Boundary / abstraction / type-contract problems that make the code harder to reason about
162
+ 5. File-size and decomposition concerns
163
+ 6. Modularity and abstraction issues
164
+ 7. Legibility and maintainability concerns
165
+
166
+ Do not flood the review with low-value nits if there are larger structural issues.
167
+ Prefer a smaller number of high-conviction comments over a long list of cosmetic notes.
168
+
169
+ ## Approval Bar
170
+
171
+ Do not approve merely because behavior seems correct.
172
+ The bar for approval is:
173
+
174
+ - no clear structural regression
175
+ - no obvious missed opportunity to make the implementation dramatically simpler when such a path is visible
176
+ - no unjustified file-size explosion
177
+ - no obvious spaghetti-growth from special-case branching
178
+ - no obviously hacky or magical abstraction that makes the code harder to reason about
179
+ - no unnecessary wrapper/cast/optionality churn obscuring the real design
180
+ - no clear architecture-boundary leak or avoidable canonical-helper duplication
181
+ - no missed opportunity for an obvious decomposition that would materially improve maintainability
182
+
183
+ Treat these as presumptive blockers unless the author can justify them clearly:
184
+
185
+ - the PR preserves a lot of incidental complexity when there is a plausible code-judo move that would delete it
186
+ - the PR pushes a file from below 1000 lines to above 1000 lines
187
+ - the PR adds ad-hoc branching that makes an existing flow more tangled
188
+ - the PR solves a local problem by scattering feature checks across shared code
189
+ - the PR adds an unnecessary abstraction, wrapper, or cast-heavy contract that makes the design more indirect
190
+ - the PR duplicates an existing helper or puts logic in the wrong layer when there is a clear canonical home
191
+
192
+ If those conditions are not met, leave explicit, actionable feedback and push for a cleaner decomposition.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: write-tests
3
+ description: Write tests that catch regressions, not implementations: fast, deterministic, named after behavior.
4
+ ---
5
+
6
+ # Writing tests
7
+
8
+ Use this skill whenever you add or change behavior, and whenever you fix a bug.
9
+
10
+ ## First question
11
+ What did the old code get wrong that a test can now forbid? Write that test first. It must fail before the fix and pass after it. A bug fix without a failing-first test is a rumor.
12
+
13
+ ## Shape
14
+ - Name the behavior, not the method: "plan mode denies mutations in every access mode", not "testDecide3".
15
+ - Arrange-Act-Assert, one behavior per test. If a test needs "and" in its name, split it.
16
+ - Test through the public seam; reach into internals only for pure logic.
17
+ - Table-drive when the same shape repeats (command → verdict, input → output): pairs read better than copy-pasted blocks.
18
+
19
+ ## Determinism
20
+ - No sleeps waiting for async. Await the state, or inject the clock/timer.
21
+ - No shared mutable files, ports, or env between tests; use a fresh temp dir and random ports per test.
22
+ - Clean up what you create (servers, temp homes); a green suite must leave `git status` clean.
23
+
24
+ ## Coverage that matters
25
+ - Boundaries and failure paths (empty input, refused connection, canceled signal), not just the happy line count.
26
+ - For security gates: every bypass example you can think of becomes a row in the table. If it is provable with a pure function, it is unit-testable. Do that before any e2e.
27
+
28
+ ## Anti-patterns
29
+ - Asserting a snapshot of strings that change every release.
30
+ - Testing the mock instead of the system (the test passes because the fake said so).
31
+ - Turning off a flaky test instead of finding its race.
32
+ - 100% coverage of getters and 0% of the timeout path.
33
+
34
+ ## Before finishing
35
+ Run the whole suite, not just your file. And never commit with a test you skipped or edited because it "should not apply". If a test that should fail passes, you have two bugs.