@fro.bot/systematic 2.0.1 → 2.0.3
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/design/figma-design-sync.md +1 -1
- package/agents/document-review/coherence-reviewer.md +40 -0
- package/agents/document-review/design-lens-reviewer.md +46 -0
- package/agents/document-review/feasibility-reviewer.md +42 -0
- package/agents/document-review/product-lens-reviewer.md +50 -0
- package/agents/document-review/scope-guardian-reviewer.md +54 -0
- package/agents/document-review/security-lens-reviewer.md +38 -0
- package/agents/research/best-practices-researcher.md +2 -1
- package/agents/research/git-history-analyzer.md +1 -1
- package/agents/research/repo-research-analyst.md +164 -9
- package/agents/review/api-contract-reviewer.md +49 -0
- package/agents/review/correctness-reviewer.md +49 -0
- package/agents/review/data-migrations-reviewer.md +53 -0
- package/agents/review/maintainability-reviewer.md +49 -0
- package/agents/review/pattern-recognition-specialist.md +2 -1
- package/agents/review/performance-reviewer.md +51 -0
- package/agents/review/reliability-reviewer.md +49 -0
- package/agents/review/schema-drift-detector.md +12 -10
- package/agents/review/security-reviewer.md +51 -0
- package/agents/review/testing-reviewer.md +48 -0
- package/agents/workflow/pr-comment-resolver.md +1 -1
- package/agents/workflow/spec-flow-analyzer.md +60 -89
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/skills/agent-browser/SKILL.md +69 -48
- package/skills/ce-brainstorm/SKILL.md +2 -1
- package/skills/ce-compound/SKILL.md +26 -1
- package/skills/ce-compound-refresh/SKILL.md +11 -1
- package/skills/ce-ideate/SKILL.md +2 -1
- package/skills/ce-plan/SKILL.md +424 -414
- package/skills/ce-review/SKILL.md +12 -13
- package/skills/ce-review-beta/SKILL.md +506 -0
- package/skills/ce-review-beta/references/diff-scope.md +31 -0
- package/skills/ce-review-beta/references/findings-schema.json +128 -0
- package/skills/ce-review-beta/references/persona-catalog.md +50 -0
- package/skills/ce-review-beta/references/review-output-template.md +115 -0
- package/skills/ce-review-beta/references/subagent-template.md +56 -0
- package/skills/ce-work/SKILL.md +14 -6
- package/skills/ce-work-beta/SKILL.md +14 -8
- package/skills/claude-permissions-optimizer/SKILL.md +15 -14
- package/skills/deepen-plan/SKILL.md +348 -483
- package/skills/document-review/SKILL.md +160 -52
- package/skills/feature-video/SKILL.md +209 -178
- package/skills/file-todos/SKILL.md +72 -94
- package/skills/frontend-design/SKILL.md +243 -27
- package/skills/git-worktree/SKILL.md +37 -28
- package/skills/lfg/SKILL.md +7 -7
- package/skills/reproduce-bug/SKILL.md +154 -60
- package/skills/resolve-pr-parallel/SKILL.md +19 -12
- package/skills/resolve-todo-parallel/SKILL.md +9 -6
- package/skills/setup/SKILL.md +33 -56
- package/skills/slfg/SKILL.md +5 -5
- package/skills/test-browser/SKILL.md +69 -145
- package/skills/test-xcode/SKILL.md +61 -183
- package/skills/triage/SKILL.md +10 -10
- package/skills/ce-plan-beta/SKILL.md +0 -571
- package/skills/deepen-plan-beta/SKILL.md +0 -323
|
@@ -1,96 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: feature-video
|
|
3
|
-
description: Record a video walkthrough of a feature and add it to the PR description
|
|
4
|
-
argument-hint: '[PR number or ''current''] [optional: base URL, default localhost:3000]'
|
|
3
|
+
description: Record a video walkthrough of a feature and add it to the PR description. Use when a PR needs a visual demo for reviewers, when the user asks to demo a feature, create a PR video, record a walkthrough, show what changed visually, or add a video to a pull request.
|
|
4
|
+
argument-hint: '[PR number or ''current'' or path/to/video.mp4] [optional: base URL, default localhost:3000]'
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Feature Video Walkthrough
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Record browser interactions demonstrating a feature, stitch screenshots into an MP4 video, upload natively to GitHub, and embed in the PR description as an inline video player.
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Prerequisites
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- Local development server running (e.g., `bin/dev`, `npm run dev`, `rails server`)
|
|
14
|
+
- `agent-browser` CLI installed (load the `agent-browser` skill for details)
|
|
15
|
+
- `ffmpeg` installed (for video conversion)
|
|
16
|
+
- `gh` CLI authenticated with push access to the repo
|
|
17
|
+
- Git repository on a feature branch (PR optional -- skill can create a draft or record-only)
|
|
18
|
+
- One-time GitHub browser auth (see Step 6 auth check)
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
- Records browser interactions using agent-browser CLI
|
|
17
|
-
- Demonstrates the complete user flow
|
|
18
|
-
- Uploads the video for easy sharing
|
|
19
|
-
- Updates the PR description with an embedded video
|
|
20
|
+
## Main Tasks
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
### 1. Parse Arguments & Resolve PR
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
- Local development server running (e.g., `bin/dev`, `rails server`)
|
|
25
|
-
- agent-browser CLI installed
|
|
26
|
-
- Git repository with a PR to document
|
|
27
|
-
- `ffmpeg` installed (for video conversion)
|
|
28
|
-
- `rclone` configured (optional, for cloud upload - see rclone skill)
|
|
29
|
-
- Public R2 base URL known (for example, `https://<public-domain>.r2.dev`)
|
|
30
|
-
</requirements>
|
|
24
|
+
**Arguments:** $ARGUMENTS
|
|
31
25
|
|
|
32
|
-
|
|
26
|
+
Parse the input:
|
|
27
|
+
- First argument: PR number, "current" (defaults to current branch's PR), or path to an existing `.mp4` file (upload-only resume mode)
|
|
28
|
+
- Second argument: Base URL (defaults to `http://localhost:3000`)
|
|
29
|
+
|
|
30
|
+
**Upload-only resume:** If the first argument ends in `.mp4` and the file exists, skip Steps 2-5 and proceed directly to Step 6 using that file. Resolve the PR number from the current branch (`gh pr view --json number -q '.number'`).
|
|
31
|
+
|
|
32
|
+
If an explicit PR number was provided, verify it exists and use it directly:
|
|
33
33
|
|
|
34
|
-
**Check installation:**
|
|
35
34
|
```bash
|
|
36
|
-
|
|
35
|
+
gh pr view [number] --json number -q '.number'
|
|
37
36
|
```
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
If no explicit PR number was provided (or "current" was specified), check if a PR exists for the current branch:
|
|
39
|
+
|
|
40
40
|
```bash
|
|
41
|
-
|
|
41
|
+
gh pr view --json number -q '.number'
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
If no PR exists for the current branch, ask the user how to proceed. **Use the platform's blocking question tool** (`question` in OpenCode, `request_user_input` in Codex, `ask_user` in Gemini):
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
```
|
|
47
|
+
No PR found for the current branch.
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
1. Create a draft PR now and continue (recommended)
|
|
50
|
+
2. Record video only -- save locally and upload later when a PR exists
|
|
51
|
+
3. Cancel
|
|
52
|
+
```
|
|
49
53
|
|
|
50
|
-
|
|
54
|
+
If option 1: create a draft PR with a placeholder title derived from the branch name, then continue with the new PR number:
|
|
51
55
|
|
|
52
|
-
|
|
56
|
+
```bash
|
|
57
|
+
gh pr create --draft --title "[branch-name-humanized]" --body "Draft PR for video walkthrough"
|
|
58
|
+
```
|
|
53
59
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
60
|
+
If option 2: set `RECORD_ONLY=true`. Proceed through Steps 2-5 (record and encode), skip Steps 6-7 (upload and PR update), and report the local video path and `[RUN_ID]` at the end.
|
|
61
|
+
|
|
62
|
+
**Upload-only resume:** To upload a previously recorded video, pass an existing video file path as the first argument (e.g., `/feature-video .context/systematic/feature-video/1711234567/videos/feature-demo.mp4`). When the first argument is a path to an `.mp4` file, skip Steps 2-5 and proceed directly to Step 6 using that file for upload.
|
|
63
|
+
|
|
64
|
+
### 1b. Verify Required Tools
|
|
65
|
+
|
|
66
|
+
Before proceeding, check that required CLI tools are installed. Fail early with a clear message rather than failing mid-workflow after screenshots have been recorded:
|
|
57
67
|
|
|
58
68
|
```bash
|
|
59
|
-
|
|
60
|
-
gh pr view --json number -q '.number'
|
|
69
|
+
command -v ffmpeg
|
|
61
70
|
```
|
|
62
71
|
|
|
63
|
-
|
|
72
|
+
```bash
|
|
73
|
+
command -v agent-browser
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
command -v gh
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If any tool is missing, stop and report which tools need to be installed:
|
|
81
|
+
- `ffmpeg`: `brew install ffmpeg` (macOS) or equivalent
|
|
82
|
+
- `agent-browser`: load the `agent-browser` skill for installation instructions
|
|
83
|
+
- `gh`: `brew install gh` (macOS) or see https://cli.github.com
|
|
84
|
+
|
|
85
|
+
Do not proceed to Step 2 until all tools are available.
|
|
64
86
|
|
|
65
87
|
### 2. Gather Feature Context
|
|
66
88
|
|
|
67
|
-
|
|
89
|
+
**If a PR is available**, get PR details and changed files:
|
|
68
90
|
|
|
69
|
-
**Get PR details:**
|
|
70
91
|
```bash
|
|
71
92
|
gh pr view [number] --json title,body,files,headRefName -q '.'
|
|
72
93
|
```
|
|
73
94
|
|
|
74
|
-
**Get changed files:**
|
|
75
95
|
```bash
|
|
76
96
|
gh pr view [number] --json files -q '.files[].path'
|
|
77
97
|
```
|
|
78
98
|
|
|
79
|
-
**
|
|
99
|
+
**If in record-only mode (no PR)**, detect the default branch and derive context from the branch diff. Run both commands in a single block so the variable persists:
|
|
80
100
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
| `app/controllers/settings_controller.rb` | `/settings` |
|
|
85
|
-
| `app/javascript/controllers/*_controller.js` | Pages using that Stimulus controller |
|
|
86
|
-
| `app/components/*_component.rb` | Pages rendering that component |
|
|
101
|
+
```bash
|
|
102
|
+
DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef -q '.defaultBranchRef.name') && git diff --name-only "$DEFAULT_BRANCH"...HEAD && git log --oneline "$DEFAULT_BRANCH"...HEAD
|
|
103
|
+
```
|
|
87
104
|
|
|
88
|
-
|
|
105
|
+
Map changed files to routes/pages that should be demonstrated. Examine the project's routing configuration (e.g., `routes.rb`, `next.config.js`, `app/` directory structure) to determine which URLs correspond to the changed files.
|
|
89
106
|
|
|
90
107
|
### 3. Plan the Video Flow
|
|
91
108
|
|
|
92
|
-
<plan_flow>
|
|
93
|
-
|
|
94
109
|
Before recording, create a shot list:
|
|
95
110
|
|
|
96
111
|
1. **Opening shot**: Homepage or starting point (2-3 seconds)
|
|
@@ -99,12 +114,12 @@ Before recording, create a shot list:
|
|
|
99
114
|
4. **Edge cases**: Error states, validation, etc. (if applicable)
|
|
100
115
|
5. **Success state**: Completed action/result
|
|
101
116
|
|
|
102
|
-
|
|
117
|
+
Present the proposed flow to the user for confirmation before recording.
|
|
103
118
|
|
|
104
|
-
|
|
105
|
-
**Proposed Video Flow**
|
|
119
|
+
**Use the platform's blocking question tool when available** (`question` in OpenCode, `request_user_input` in Codex, `ask_user` in Gemini). Otherwise, present numbered options and wait for the user's reply before proceeding:
|
|
106
120
|
|
|
107
|
-
|
|
121
|
+
```
|
|
122
|
+
Proposed Video Flow for PR #[number]: [title]
|
|
108
123
|
|
|
109
124
|
1. Start at: /[starting-route]
|
|
110
125
|
2. Navigate to: /[feature-route]
|
|
@@ -116,218 +131,221 @@ Based on PR #[number]: [title]
|
|
|
116
131
|
|
|
117
132
|
Estimated duration: ~[X] seconds
|
|
118
133
|
|
|
119
|
-
|
|
120
|
-
1. Yes, start recording
|
|
134
|
+
1. Start recording
|
|
121
135
|
2. Modify the flow (describe changes)
|
|
122
136
|
3. Add specific interactions to demonstrate
|
|
123
137
|
```
|
|
124
138
|
|
|
125
|
-
|
|
139
|
+
### 4. Record the Walkthrough
|
|
126
140
|
|
|
127
|
-
|
|
141
|
+
Generate a unique run ID (e.g., timestamp) and create per-run output directories. This prevents stale screenshots from prior runs being spliced into the new video.
|
|
128
142
|
|
|
129
|
-
|
|
143
|
+
**Important:** Shell variables do not persist across separate code blocks. After generating the run ID, substitute the concrete value into all subsequent commands in this workflow. For example, if the timestamp is `1711234567`, use that literal value in all paths below -- do not rely on `[RUN_ID]` expanding in later blocks.
|
|
130
144
|
|
|
131
|
-
**Create videos directory:**
|
|
132
145
|
```bash
|
|
133
|
-
|
|
146
|
+
date +%s
|
|
134
147
|
```
|
|
135
148
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
agent-browser captures screenshots at key moments, then combine into video using ffmpeg:
|
|
149
|
+
Use the output as RUN_ID. Create the directories with the concrete value:
|
|
139
150
|
|
|
140
151
|
```bash
|
|
141
|
-
|
|
152
|
+
mkdir -p .context/systematic/feature-video/[RUN_ID]/screenshots
|
|
153
|
+
mkdir -p .context/systematic/feature-video/[RUN_ID]/videos
|
|
142
154
|
```
|
|
143
155
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
### 5. Record the Walkthrough
|
|
147
|
-
|
|
148
|
-
<record_walkthrough>
|
|
156
|
+
Execute the planned flow, capturing each step with agent-browser. Number screenshots sequentially for correct frame ordering:
|
|
149
157
|
|
|
150
|
-
Execute the planned flow, capturing each step:
|
|
151
|
-
|
|
152
|
-
**Step 1: Navigate to starting point**
|
|
153
158
|
```bash
|
|
154
159
|
agent-browser open "[base-url]/[start-route]"
|
|
155
160
|
agent-browser wait 2000
|
|
156
|
-
agent-browser screenshot
|
|
161
|
+
agent-browser screenshot .context/systematic/feature-video/[RUN_ID]/screenshots/01-start.png
|
|
157
162
|
```
|
|
158
163
|
|
|
159
|
-
**Step 2: Perform navigation/interactions**
|
|
160
164
|
```bash
|
|
161
|
-
agent-browser snapshot -i
|
|
162
|
-
agent-browser click @e1
|
|
165
|
+
agent-browser snapshot -i
|
|
166
|
+
agent-browser click @e1
|
|
163
167
|
agent-browser wait 1000
|
|
164
|
-
agent-browser screenshot
|
|
168
|
+
agent-browser screenshot .context/systematic/feature-video/[RUN_ID]/screenshots/02-navigate.png
|
|
165
169
|
```
|
|
166
170
|
|
|
167
|
-
**Step 3: Demonstrate feature**
|
|
168
171
|
```bash
|
|
169
|
-
agent-browser snapshot -i
|
|
170
|
-
agent-browser click @e2
|
|
172
|
+
agent-browser snapshot -i
|
|
173
|
+
agent-browser click @e2
|
|
171
174
|
agent-browser wait 1000
|
|
172
|
-
agent-browser screenshot
|
|
175
|
+
agent-browser screenshot .context/systematic/feature-video/[RUN_ID]/screenshots/03-feature.png
|
|
173
176
|
```
|
|
174
177
|
|
|
175
|
-
**Step 4: Capture result**
|
|
176
178
|
```bash
|
|
177
179
|
agent-browser wait 2000
|
|
178
|
-
agent-browser screenshot
|
|
180
|
+
agent-browser screenshot .context/systematic/feature-video/[RUN_ID]/screenshots/04-result.png
|
|
179
181
|
```
|
|
180
182
|
|
|
181
|
-
|
|
183
|
+
### 5. Create Video
|
|
182
184
|
|
|
183
|
-
|
|
184
|
-
# Create directories
|
|
185
|
-
mkdir -p tmp/videos tmp/screenshots
|
|
185
|
+
Stitch screenshots into an MP4 using the same `[RUN_ID]` from Step 4:
|
|
186
186
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
# -framerate 1 = 1 second per frame
|
|
190
|
-
ffmpeg -y -framerate 0.5 -pattern_type glob -i 'tmp/screenshots/*.png' \
|
|
187
|
+
```bash
|
|
188
|
+
ffmpeg -y -framerate 0.5 -pattern_type glob -i ".context/systematic/feature-video/[RUN_ID]/screenshots/*.png" \
|
|
191
189
|
-c:v libx264 -pix_fmt yuv420p -vf "scale=1280:-2" \
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
# Create low-quality GIF for preview (small file, for GitHub embed)
|
|
195
|
-
ffmpeg -y -framerate 0.5 -pattern_type glob -i 'tmp/screenshots/*.png' \
|
|
196
|
-
-vf "scale=640:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=128[p];[s1][p]paletteuse" \
|
|
197
|
-
-loop 0 tmp/videos/feature-demo-preview.gif
|
|
190
|
+
".context/systematic/feature-video/[RUN_ID]/videos/feature-demo.mp4"
|
|
198
191
|
```
|
|
199
192
|
|
|
200
|
-
|
|
201
|
-
-
|
|
202
|
-
-
|
|
193
|
+
Notes:
|
|
194
|
+
- `-framerate 0.5` = 2 seconds per frame. Adjust for faster/slower playback.
|
|
195
|
+
- `-2` in scale ensures height is divisible by 2 (required for H.264).
|
|
203
196
|
|
|
204
|
-
|
|
197
|
+
### 6. Authenticate & Upload to GitHub
|
|
205
198
|
|
|
206
|
-
|
|
199
|
+
Upload produces a `user-attachments/assets/` URL that GitHub renders as a native inline video player -- the same result as pasting a video into the PR editor manually.
|
|
207
200
|
|
|
208
|
-
|
|
201
|
+
The approach: close any existing agent-browser session, start a Chrome-engine session with saved GitHub auth, navigate to the PR page, set the video file on the comment form's hidden file input, wait for GitHub to process the upload, extract the resulting URL, then clear the textarea without submitting.
|
|
209
202
|
|
|
210
|
-
|
|
203
|
+
#### Check for existing session
|
|
211
204
|
|
|
212
|
-
|
|
213
|
-
# Check rclone is configured
|
|
214
|
-
rclone listremotes
|
|
205
|
+
First, check if a saved GitHub session already exists:
|
|
215
206
|
|
|
216
|
-
|
|
217
|
-
|
|
207
|
+
```bash
|
|
208
|
+
agent-browser close
|
|
209
|
+
agent-browser --engine chrome --session-name github open https://github.com/settings/profile
|
|
210
|
+
agent-browser get title
|
|
211
|
+
```
|
|
218
212
|
|
|
219
|
-
|
|
220
|
-
# Use --s3-no-check-bucket to avoid permission errors
|
|
221
|
-
rclone copy tmp/videos/ r2:kieran-claude/pr-videos/pr-[number]/ --s3-no-check-bucket --progress
|
|
222
|
-
rclone copy tmp/screenshots/ r2:kieran-claude/pr-videos/pr-[number]/screenshots/ --s3-no-check-bucket --progress
|
|
213
|
+
If the page title contains the user's GitHub username or "Profile", the session is still valid -- skip to "Upload the video" below. If it redirects to the login page, the session has expired or was never created -- proceed to "Auth setup".
|
|
223
214
|
|
|
224
|
-
|
|
225
|
-
rclone ls r2:kieran-claude/pr-videos/pr-[number]/
|
|
215
|
+
#### Auth setup (one-time)
|
|
226
216
|
|
|
227
|
-
|
|
228
|
-
VIDEO_URL="$PUBLIC_BASE_URL/pr-videos/pr-[number]/feature-demo.mp4"
|
|
229
|
-
PREVIEW_URL="$PUBLIC_BASE_URL/pr-videos/pr-[number]/feature-demo-preview.gif"
|
|
217
|
+
Establish an authenticated GitHub session. This only needs to happen once -- session cookies persist across runs via the `--session-name` flag.
|
|
230
218
|
|
|
231
|
-
|
|
232
|
-
curl -I "$PREVIEW_URL"
|
|
219
|
+
Close the current session and open the GitHub login page in a headed Chrome window:
|
|
233
220
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
221
|
+
```bash
|
|
222
|
+
agent-browser close
|
|
223
|
+
agent-browser --engine chrome --headed --session-name github open https://github.com/login
|
|
237
224
|
```
|
|
238
225
|
|
|
239
|
-
|
|
226
|
+
The user must log in manually in the browser window (handles 2FA, SSO, OAuth -- any login method). **Use the platform's blocking question tool** (`question` in OpenCode, `request_user_input` in Codex, `ask_user` in Gemini). Otherwise, present the message and wait for the user's reply before proceeding:
|
|
240
227
|
|
|
241
|
-
|
|
228
|
+
```
|
|
229
|
+
GitHub login required for video upload.
|
|
242
230
|
|
|
243
|
-
|
|
231
|
+
A Chrome window has opened to github.com/login. Please log in manually
|
|
232
|
+
(this handles 2FA/SSO/OAuth automatically). Reply when done.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
After login, verify the session works:
|
|
244
236
|
|
|
245
|
-
**Get current PR body:**
|
|
246
237
|
```bash
|
|
247
|
-
|
|
238
|
+
agent-browser open https://github.com/settings/profile
|
|
248
239
|
```
|
|
249
240
|
|
|
250
|
-
|
|
241
|
+
If the profile page loads, auth is confirmed. The `github` session is now saved and reusable.
|
|
251
242
|
|
|
252
|
-
|
|
243
|
+
#### Upload the video
|
|
253
244
|
|
|
254
|
-
|
|
245
|
+
Navigate to the PR page and scroll to the comment form:
|
|
255
246
|
|
|
256
|
-
```
|
|
257
|
-
|
|
247
|
+
```bash
|
|
248
|
+
agent-browser open "https://github.com/[owner]/[repo]/pull/[number]"
|
|
249
|
+
agent-browser scroll down 5000
|
|
250
|
+
```
|
|
258
251
|
|
|
259
|
-
|
|
252
|
+
Save any existing textarea content before uploading (the comment box may contain an unsent draft):
|
|
260
253
|
|
|
261
|
-
|
|
254
|
+
```bash
|
|
255
|
+
agent-browser eval "document.getElementById('new_comment_field').value"
|
|
262
256
|
```
|
|
263
257
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
```
|
|
258
|
+
Store this value as `SAVED_TEXTAREA`. If non-empty, it will be restored after extracting the upload URL.
|
|
259
|
+
|
|
260
|
+
Upload the video via the hidden file input. Use the caller-provided `.mp4` path if in upload-only resume mode, otherwise use the current run's encoded video:
|
|
268
261
|
|
|
269
|
-
**Update the PR:**
|
|
270
262
|
```bash
|
|
271
|
-
|
|
263
|
+
agent-browser upload '#fc-new_comment_field' [VIDEO_FILE_PATH]
|
|
272
264
|
```
|
|
273
265
|
|
|
274
|
-
|
|
266
|
+
Where `[VIDEO_FILE_PATH]` is either:
|
|
267
|
+
- The `.mp4` path passed as the first argument (upload-only resume mode)
|
|
268
|
+
- `.context/systematic/feature-video/[RUN_ID]/videos/feature-demo.mp4` (normal recording flow)
|
|
269
|
+
|
|
270
|
+
Wait for GitHub to process the upload (typically 3-5 seconds), then read the textarea value:
|
|
271
|
+
|
|
275
272
|
```bash
|
|
276
|
-
|
|
273
|
+
agent-browser wait 5000
|
|
274
|
+
agent-browser eval "document.getElementById('new_comment_field').value"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**Validate the extracted URL.** The value must contain `user-attachments/assets/` to confirm a successful native upload. If the textarea is empty, contains only placeholder text, or the URL does not match, do not proceed to Step 7. Instead:
|
|
277
278
|
|
|
278
|
-
|
|
279
|
+
1. Check `agent-browser get url` -- if it shows `github.com/login`, the session expired. Re-run auth setup.
|
|
280
|
+
2. If still on the PR page, wait an additional 5 seconds and re-read the textarea (GitHub processing can be slow).
|
|
281
|
+
3. If validation still fails after retry, report the failure and the local video path so the user can upload manually.
|
|
279
282
|
|
|
280
|
-
|
|
283
|
+
Restore the original textarea content (or clear if it was empty). A JSON-encoded string is also a valid JavaScript string literal, so assign it directly without `JSON.parse`:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
agent-browser eval "const ta = document.getElementById('new_comment_field'); ta.value = [SAVED_TEXTAREA_AS_JS_STRING]; ta.dispatchEvent(new Event('input', { bubbles: true }))"
|
|
281
287
|
```
|
|
282
288
|
|
|
283
|
-
|
|
289
|
+
To prepare the value: take the SAVED_TEXTAREA string and produce a JS string literal from it -- escape backslashes, double quotes, and newlines (e.g., `"text with \"quotes\" and\nnewlines"`). If SAVED_TEXTAREA was empty, use `""`. The result is embedded directly as the right-hand side of the assignment -- no `JSON.parse` call needed.
|
|
284
290
|
|
|
285
|
-
###
|
|
291
|
+
### 7. Update PR Description
|
|
286
292
|
|
|
287
|
-
|
|
293
|
+
Get the current PR body:
|
|
288
294
|
|
|
289
295
|
```bash
|
|
290
|
-
|
|
291
|
-
|
|
296
|
+
gh pr view [number] --json body -q '.body'
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
Append a Demo section (or replace an existing one). The video URL renders as an inline player when placed on its own line:
|
|
292
300
|
|
|
293
|
-
|
|
294
|
-
|
|
301
|
+
```markdown
|
|
302
|
+
## Demo
|
|
303
|
+
|
|
304
|
+
https://github.com/user-attachments/assets/[uuid]
|
|
305
|
+
|
|
306
|
+
*Automated video walkthrough*
|
|
295
307
|
```
|
|
296
308
|
|
|
297
|
-
|
|
309
|
+
Update the PR:
|
|
298
310
|
|
|
299
|
-
|
|
311
|
+
```bash
|
|
312
|
+
gh pr edit [number] --body "[updated body with demo section]"
|
|
313
|
+
```
|
|
300
314
|
|
|
301
|
-
|
|
315
|
+
### 8. Cleanup
|
|
302
316
|
|
|
303
|
-
|
|
317
|
+
Ask the user before removing temporary files. If confirmed, clean up only the current run's scratch directory (other runs may still be in progress or awaiting upload).
|
|
304
318
|
|
|
305
|
-
|
|
306
|
-
|
|
319
|
+
**If the video was successfully uploaded**, remove the entire run directory:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
rm -r .context/systematic/feature-video/[RUN_ID]
|
|
323
|
+
```
|
|
307
324
|
|
|
308
|
-
**
|
|
309
|
-
**Video:** [url or local path]
|
|
310
|
-
**Duration:** ~[X] seconds
|
|
311
|
-
**Format:** [GIF/MP4]
|
|
325
|
+
**If in record-only mode or upload failed**, remove only the screenshots but preserve the video so the user can upload later:
|
|
312
326
|
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
3. [Feature demo] - [description]
|
|
317
|
-
4. [Result] - [description]
|
|
327
|
+
```bash
|
|
328
|
+
rm -r .context/systematic/feature-video/[RUN_ID]/screenshots
|
|
329
|
+
```
|
|
318
330
|
|
|
319
|
-
|
|
320
|
-
- [x] Video section added to PR description
|
|
321
|
-
- [ ] Ready for review
|
|
331
|
+
Present a completion summary:
|
|
322
332
|
|
|
323
|
-
**Next steps:**
|
|
324
|
-
- Review the video to ensure it accurately demonstrates the feature
|
|
325
|
-
- Share with reviewers for context
|
|
326
333
|
```
|
|
334
|
+
Feature Video Complete
|
|
335
|
+
|
|
336
|
+
PR: #[number] - [title]
|
|
337
|
+
Video: [VIDEO_URL]
|
|
327
338
|
|
|
328
|
-
|
|
339
|
+
Shots captured:
|
|
340
|
+
1. [description]
|
|
341
|
+
2. [description]
|
|
342
|
+
3. [description]
|
|
343
|
+
4. [description]
|
|
344
|
+
|
|
345
|
+
PR description updated with demo section.
|
|
346
|
+
```
|
|
329
347
|
|
|
330
|
-
##
|
|
348
|
+
## Usage Examples
|
|
331
349
|
|
|
332
350
|
```bash
|
|
333
351
|
# Record video for current branch's PR
|
|
@@ -345,8 +363,21 @@ Present completion summary:
|
|
|
345
363
|
|
|
346
364
|
## Tips
|
|
347
365
|
|
|
348
|
-
-
|
|
349
|
-
-
|
|
350
|
-
-
|
|
351
|
-
-
|
|
366
|
+
- Keep it short: 10-30 seconds is ideal for PR demos
|
|
367
|
+
- Focus on the change: don't include unrelated UI
|
|
368
|
+
- Show before/after: if fixing a bug, show the broken state first (if possible)
|
|
369
|
+
- The `--session-name github` session expires when GitHub invalidates the cookies (typically weeks). If upload fails with a login redirect, re-run the auth setup.
|
|
370
|
+
- GitHub DOM selectors (`#fc-new_comment_field`, `#new_comment_field`) may change if GitHub updates its UI. If the upload silently fails, inspect the PR page for updated selectors.
|
|
371
|
+
|
|
372
|
+
## Troubleshooting
|
|
373
|
+
|
|
374
|
+
| Symptom | Cause | Fix |
|
|
375
|
+
|---|---|---|
|
|
376
|
+
| `ffmpeg: command not found` | ffmpeg not installed | Install via `brew install ffmpeg` (macOS) or equivalent |
|
|
377
|
+
| `agent-browser: command not found` | agent-browser not installed | Load the `agent-browser` skill for installation instructions |
|
|
378
|
+
| Textarea empty after upload wait | Session expired, or GitHub processing slow | Check session validity (Step 6 auth check). If valid, increase wait time and retry. |
|
|
379
|
+
| Textarea empty, URL is `github.com/login` | Session expired | Re-run auth setup (Step 6) |
|
|
380
|
+
| `gh pr view` fails | No PR for current branch | Step 1 handles this -- choose to create a draft PR or record-only mode |
|
|
381
|
+
| Video file too large for upload | Exceeds GitHub's 10MB (free) or 100MB (paid) limit | Re-encode: lower framerate (`-framerate 0.33`), reduce resolution (`scale=960:-2`), or increase CRF (`-crf 28`) |
|
|
382
|
+
| Upload URL does not contain `user-attachments/assets/` | Wrong upload method or GitHub change | Verify the file input selector is still correct by inspecting the PR page |
|
|
352
383
|
|