com um clique
cdp-dev-cycle
# Dev Cycle Protocol: CDP Shell Sovereignty (v2.5.1)
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
# Dev Cycle Protocol: CDP Shell Sovereignty (v2.5.1)
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Protocol for high-density, symmetrical shorthand logging in VS Code extensions.
Protocol for local session metadata persistence in the Virgo extension.
Architectural map and development guidelines for the Virgo extension. Mandatory reference for all agent modifications.
Protocol for high-integrity conversational AI injections and sensory parity in the Virgo extension.
Governance protocol and automated scripts for packaging and publishing the Virgo MCP standalone server to the public NPM registry. Enforces safety gates and clean extraction logic.
Unified Release Authority — Single Source of Truth for all release lifecycle actions. Merges release_prestige and version_sentinel into one sovereign skill covering: semantic versioning rules, authorization gates, pipeline execution, artifact verification, git history auditing, SemVer enforcement, and post-release validation.
| name | cdp_dev_cycle |
| description | null |
[!IMPORTANT] THE PRIME DIRECTIVE All agent-driven development cycle verification MUST occur exclusively within the Extension Development Host. Accidental execution or discovery in the Main IDE is a critical failure.
[!CAUTION] The agent MUST execute this reflex autonomously before ANY lifecycle audit session. Do NOT wait for the user to prompt
restart. Auditing against warm/stale boot state produces meaningless results. Skipping this pre-flight is a protocol violation equivalent to operating blind.
Before any CDP-driven audit (T-009, T-010, T-011, T-012, or any future lifecycle observation):
$cursor = (Get-Item diagnostics_agent.log).Length
npm run cdp:shell
🟢 Dev Host already open — connected.launch + wait-for-ready before dropping to prompt.✅ SYSTEM READY before issuing any audit commands.$cursor as the start offset — never read the full log.[!NOTE] After the shell opens, always run
statusfirst.
✅ SYSTEM READY→ proceed directly, no launch needed.- Host found but webview not hydrated →
wait-for-ready.- No host found →
launch→wait-for-ready. Only userestartwhen the task explicitly requires observing cold-boot behavior. Do not use by default.
[Extension Development Host] — The primary target for verification.[Main Editor] — PROTECTED. Authorized ONLY for meta-commands (launch).[virgo] — The isolated execution context. Often nested and requires specific targeting.[!IMPORTANT] Shell Sovereignty — The Only Interface.
npm run cdp:shellis the agent's sole interface to the extension. All operations — status checks, evals, dispatches, audits — are issued as shell inputs inside the running session. Never bypass the shell by runningnode scripts/cdp-controller.mjs <cmd>as a one-shot CLI call. If you find yourself doing that, you are off-protocol.
To maintain high-integrity state awareness, keep a single cdp:shell open for the duration of the session.
Controller location:
.agent/skills/cdp_dev_cycle/cdp-controller.mjs— invoked vianpm run cdp:shell. Do not call the script directly.
npm run cdp:shell.status: Assess the current environment.
✅ SYSTEM READY → proceed directly.wait-for-ready.launch → wait-for-ready.wait-for-ready only if needed per step 2.
✅ SYSTEM READY, the UI is fully hydrated and ready for commands.Once initialized, NEVER close the Dev Host unless necessary. Use this cycle:
src/.npm run watch (or equivalent) completes the rebuild.dispatch workbench.action.reloadWindow to the active shell — this fully restarts the extension host.verify-state to confirm Redux store hydration.[!CAUTION] Only use this path when the task explicitly requires observing cold-boot behavior (e.g., boot timing, startup sequence audit). Do not use by default.
A reload restarts the extension in-place. For a true cold-boot audit, you need a full process restart:
(Get-Item diagnostics_agent.log).Lengthrestart to the shell — this runs: close-host → 2s wait → launch → wait-for-ready.[!IMPORTANT]
exitcloses the shell script AND the Dev Host — it is a full cleanup ritual. It stops any running playback first, then gracefully closes the Dev Host, then exits. To close the Dev Host without exiting the shell: useclose-host.
DISPATCH-AUDIT MIRROR: Every dispatch (or exec) action MUST be followed by a state verification.
dispatch Virgo: Play -> wait-for-ready (or manual poll) -> verify-state.Default end-of-session: use close-host
Full teardown: use exit (only when shell process also needs to die)
[!CAUTION] Always use
close-hostorexitto terminate — never Ctrl+C or kill the process.
What exit does automatically:
btn-stop in the webview (stops any running playback)gracefulClose to shut down the Extension Development Host.cdp_shell.lock fileIf the Dev Host is already closed (e.g. crashed), the exit ritual handles it gracefully and still exits cleanly.
To prevent cross-pollution, always audit the field before acting.
status: Full situation report (Host status, Webview hydration, Active PIDs).targets: Lists all active CDP pages and their frame counts. Essential for locating the active webview.scan: Quick list of active [Extension Development Host] windows and their PIDs.frames: Provides a recursive dump of all accessible frames. Use this if find fails.When closing the dev host, the script follows a polite 3-tier ladder:
workbench.action.closeWindow. SAFEST way to exit.Target.closeTarget fallback for unresponsive UI.taskkill /T (without /F) for clean process termination.| Goal | Command | Output / Expectation |
|---|---|---|
| Inventory | targets | List all pages and frame counts |
| SitRep | status | Full environment health check & PIDs |
| Wake Host | launch | Smart F5 launch protocol |
| Ready Up | wait-for-ready | Polls for system hydration signal |
| Reload Ext | dispatch workbench.action.reloadWindow | Restarts extension host in-place |
| Close Host | close-host | Gracefully closes Dev Host window + PIDs |
| Smart Restart | restart | close-host (if open) → launch → wait-for-ready |
| State Dump | verify-state | Dumps the current Redux store |
| Dispatch | dispatch <cmd> | Atomic command triggering |
| Eval | eval <expr> | JS execution in webview context |
| Audit Dump | audit | Dumps live __debug state: hydration, gesture gate, playback intent, audio element |
| Click Play | click-play | DOM-clicks btn-play — satisfies browser gesture gate (use for first-run tests) |
| Visual Audit | screenshot [file] | Take a screenshot of the Dev Host to file (default: screenshot.png) |
| Full Exit | exit | Stop playback + close Dev Host + exit shell |
eval <expr>runs JavaScript inside the live webview context of the running shell session. It is not a standalone script runner — it requires an open shell with a hydrated webview. Useauditfor structured state inspection; useevalonly for one-off queries.Event Probing Pattern (for DOM/interaction audits — e.g. mouseenter, gesture gates):
eval document.addEventListener('mouseenter', () => window.__PROBE_COUNT = (window.__PROBE_COUNT||0)+1) // move mouse over panel, then: eval JSON.stringify({ count: window.__PROBE_COUNT }) // cleanup: eval (() => { window.__PROBE_COUNT = undefined; })(); 'PROBE_REMOVED'Use this to verify event propagation across the webview boundary before wiring production handlers.
status shows Webview: ❌, run dispatch ...show-dashboard. Webviews are lazily loaded.scan to find the culprit PID and close it gracefully.wait-for-ready to synchronize.[!TIP] Checkbox Sovereignty: Always verify build success in the "Tasks" terminal before running
refresh. If the builder is red, the reload will serve stale code.
To enable visual audits of the Extension Development Host when running in headless or background states, the agent can capture screenshots of the active workbench window.
screenshot [file.png] (saves to the specified path, defaults to screenshot.png)node .agent/skills/cdp_dev_cycle/cdp-controller.mjs screenshot [file.png] (can be run directly if the lock is not held)Use this command to verify command palette overlays, sidebar visibility, theme alignment, or layout regressions.
To prevent regressions in live synchronization, UI interaction logic, and state management, persistent integration tests using raw CDP (Chrome DevTools Protocol) are maintained under tests/integration/.
Every CDP integration test must adhere to these four architectural principles:
Dynamic Active Session / Workspace Resolution:
diagnostics_agent.log for logs such as [MCP_WATCHER] External fs.watch active on or falling back to environment-relative paths under antigravity and antigravity-ide).const activeSessionId = await webviewFrame.evaluate(() => {
return window.__debug.store.getState().activeSessionId;
});
Conditional Active Port Skipping:
describe.runIf(isCdpActive) or similar Vitest/Jest conditional gates:
const checkCdpPort = (): Promise<boolean> => {
return new Promise((resolve) => {
const req = http.get("http://localhost:9222/json/version", (res) => {
resolve(res.statusCode === 200);
});
req.on('error', () => resolve(false));
req.setTimeout(1000, () => { req.destroy(); resolve(false); });
});
};
User Interaction Simulation:
await webviewFrame.evaluate(() => {
const event = new MouseEvent('mousedown', { view: window, bubbles: true, cancelable: true });
document.dispatchEvent(event);
});
Resource Lifecycle Integrity:
afterAll to close connections (browser.close()) and clean up any injected test artifacts (e.g. unlinking temp files like *.cdp_test.md).${Date.now()}.cdp_test.md).