@kendoo.agentdesk/agentdesk 0.4.6 → 0.4.7

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 (2) hide show
  1. package/package.json +1 -1
  2. package/prompts/team.md +64 -32
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kendoo.agentdesk/agentdesk",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "AI team orchestrator for Claude Code — run collaborative agent sessions from your terminal",
5
5
  "type": "module",
6
6
  "bin": {
package/prompts/team.md CHANGED
@@ -121,38 +121,70 @@ When a task involves UI changes, the team MUST capture screenshots of the affect
121
121
 
122
122
  **How to capture screenshots:**
123
123
 
124
- 1. Start the dev server in the background:
125
- ```bash
126
- echo "Starting dev server for screenshots..."
127
- npm run dev &
128
- DEV_PID=$!
129
- sleep 5 # Wait for server to start
130
- ```
131
-
132
- 2. Take screenshots using the agentdesk screenshot utility:
133
- ```bash
134
- # Desktop + mobile (default)
135
- node node_modules/@kendoo.agentdesk/agentdesk/cli/screenshot.mjs http://localhost:3000/affected-route --out screenshots
136
-
137
- # Desktop only
138
- node node_modules/@kendoo.agentdesk/agentdesk/cli/screenshot.mjs http://localhost:3000/route --viewports desktop
139
-
140
- # Mobile only
141
- node node_modules/@kendoo.agentdesk/agentdesk/cli/screenshot.mjs http://localhost:3000/route --viewports mobile
142
- ```
143
-
144
- If the utility is not available, use a manual approach:
145
- ```bash
146
- npx --yes puppeteer-cli screenshot http://localhost:3000/route --viewport 1280x800 --output desktop.png
147
- npx --yes puppeteer-cli screenshot http://localhost:3000/route --viewport 375x812 --output mobile.png
148
- ```
149
-
150
- 3. Stop the dev server when done:
151
- ```bash
152
- kill $DEV_PID 2>/dev/null
153
- ```
154
-
155
- 4. Upload screenshots to the task tracker (see upload instructions below).
124
+ Bart writes and executes a project-specific puppeteer script for each screenshot session. This handles auth, navigation, and viewport sizing in one shot.
125
+
126
+ **Step 1 Prepare:** Before writing the script, Bart MUST:
127
+ - Read the project's login/auth flow (check auth pages, middleware, `.env` for test credentials)
128
+ - Identify the dev server port (from `package.json` scripts, `.env`, or framework defaults)
129
+ - Get the list of routes and viewports from Luna's screenshot plan
130
+
131
+ **Step 2 — Start the dev server:**
132
+ ```bash
133
+ echo "Starting dev server for screenshots..."
134
+ npm run dev &
135
+ DEV_PID=$!
136
+ sleep 8 # Wait for server to start
137
+ ```
138
+
139
+ **Step 3 — Write and run a puppeteer script** that handles the project's auth and captures all required views:
140
+ ```bash
141
+ npx --yes puppeteer@latest node -e "
142
+ const puppeteer = require('puppeteer');
143
+ (async () => {
144
+ const browser = await puppeteer.launch({ headless: 'new' });
145
+ const page = await browser.newPage();
146
+
147
+ // --- AUTH: Adapt this to the project's login flow ---
148
+ // Read .env or config for test credentials
149
+ // Navigate to login page, fill form, submit
150
+ // Example:
151
+ // await page.goto('http://localhost:3000/login');
152
+ // await page.type('input[name=email]', process.env.TEST_EMAIL || 'test@example.com');
153
+ // await page.type('input[name=password]', process.env.TEST_PASSWORD || 'password');
154
+ // await page.click('button[type=submit]');
155
+ // await page.waitForNavigation();
156
+
157
+ // --- CAPTURE: Take screenshots per Luna's plan ---
158
+ const routes = ['/affected-route']; // From Luna's plan
159
+ const viewports = [
160
+ { name: 'desktop', width: 1280, height: 800 },
161
+ { name: 'mobile', width: 375, height: 812 },
162
+ ];
163
+
164
+ for (const route of routes) {
165
+ for (const vp of viewports) {
166
+ await page.setViewport({ width: vp.width, height: vp.height });
167
+ await page.goto('http://localhost:3000' + route, { waitUntil: 'networkidle0' });
168
+ await new Promise(r => setTimeout(r, 1000));
169
+ const filename = 'screenshots/' + route.replace(/\\//g, '-').slice(1) + '-' + vp.name + '.png';
170
+ await page.screenshot({ path: filename, fullPage: true });
171
+ console.log('Captured: ' + filename);
172
+ }
173
+ }
174
+
175
+ await browser.close();
176
+ })();
177
+ "
178
+ ```
179
+
180
+ IMPORTANT: Bart MUST adapt the auth section to the specific project. Do NOT use a generic/placeholder login — read the actual auth code, find real dev/test credentials from `.env`, seed files, or test fixtures, and write the login flow to match the project's actual login page (selectors, fields, OAuth flow, etc.). If the project uses OAuth only and has no test credentials, Bart should note this and skip screenshots with an explanation.
181
+
182
+ **Step 4 — Stop the dev server:**
183
+ ```bash
184
+ kill $DEV_PID 2>/dev/null
185
+ ```
186
+
187
+ **Step 5 — Upload** screenshots to the task tracker (see upload instructions below).
156
188
 
157
189
  **When to capture:**
158
190
  - After ALL code changes, reviews, and fixes are complete (during Bart's review step)