一键导入
frontend-integrator
Implements werk-tab (Chrome MV3 extension, vanilla JS) integration with the sigil engine.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Implements werk-tab (Chrome MV3 extension, vanilla JS) integration with the sigil engine.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implements Rust backend changes for the sigil engine — werk-core, werk-sigil, werk-cli, werk-web.
Close a werk development session. Surveys the delta, builds a structured proposal for tension updates and version control, presents it for approval, then executes everything. Use at the end of any work session.
Generate a comprehensive session prompt for working on specific werk tensions. Reads the tension tree, maps code locations, grounds in the conceptual foundation, and produces a clipboard-ready prompt with theory of closure. Use when you've decided what to work on and need a thorough brief.
The Operative Instrument — a structural dynamics engine for holding the gap between desire and reality. Use this skill when helping someone work with werk: creating tensions, navigating the structure, understanding what the instrument reveals, and participating honestly in someone's structural practice.
The Operative Instrument — a structural dynamics engine for holding the gap between desire and reality. Use this skill when helping someone work with werk: creating tensions, navigating the structure, understanding what the instrument reveals, and participating honestly in someone's structural practice.
Session closing ritual. Summarize work done, update the werk tension tree, commit, and generate a handoff prompt for the next session. Use at the end of any werk development session.
| name | frontend-integrator |
| description | Implements werk-tab (Chrome MV3 extension, vanilla JS) integration with the sigil engine. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
M5 features only. werk-tab is a Chromium MV3 extension at werk-tab/
(not a Cargo workspace member). All work is JS / HTML / CSS.
agent-browser skill — required for visual verification. Load the
extension via "Load unpacked", navigate to the new tab, take screenshots,
assert DOM content.werk serve daemon must be running on port 3749 during testing.
Start with cargo run -p werk -- serve --port 3749 in the background;
stop on exit (lsof -ti :3749 | xargs kill).werk-tab/manifest.jsonwerk-tab/index.htmlwerk-tab/app.js (the existing fetch + render + SSE pattern)werk-tab/style.cssfulfills IDs.library/architecture.md "Surfaces (M4) > werk-tab (M5)" section.sigil) alongside space and
field, or a replacement of one? D11 says: third toggle.index.html: <button id="sigil-toggle">sigil</button>
in the header; <section class="sigil" id="sigil" hidden>...</section>.app.js:
sigilMode flag (alongside fieldMode).toggleSigilMode(next) (mirror of toggleFieldMode).loadSigil() fetching ${API}/api/sigil?logic=glance.renderSigil(svgText) injecting the SVG into the section.sigil_invalidated events
via es.addEventListener('sigil_invalidated', () => loadSigil()),
and route load() dispatch in the existing onmessage handler so
the active mode determines what reloads..sigil { ... } for the new section.There is no JS test harness in werk-tab. Tests are scripted manual checks
via agent-browser. Write a numbered checklist of expected behaviors
before changing code:
1. Loading the extension shows three toggle buttons in header
2. Click "sigil" toggle: sigil section appears, space/field hidden
3. Sigil section contains a single inline <svg> element
4. Triggering a tension mutation via curl POST causes sigil to refresh
within 2 seconds (verify by re-screenshot)
5. Visibility off/on triggers a single reload (no thrashing)
6. With werk serve down, sigil section shows fallback "offline" state
7. Re-toggling between modes does not double-render or break SSE
These become interactiveChecks entries in the handoff, each with
agent-browser screenshot evidence.
index.html, app.js, style.css in that order.import, top-level
const for constants, async function for I/O. No new transitive
deps.discoverApi() — do not add
new probe targets. Sigil endpoints live on the same port as /api/tensions.EventSource connection at
${API}/api/events; add a dedicated event-name listener for
sigil_invalidated. Do NOT open a second EventSource.space mode's
empty-banner pattern; do not invent new chrome.werk serve on 3749 in the background.chrome://newtab/ (or whatever the active new-tab URL
resolves to).curl -X PATCH http://localhost:3749/api/tensions/<id>/desired -H 'content-type: application/json' -d '{"value":"updated"}').werk serve.feat(werk-tab): add sigil mode rendering glance preset (M5 / werk-tab-sigil-mode){
"salientSummary": "Added werk-tab sigil mode: third toggle in header alongside space/field; renders glance preset via GET /api/sigil; refreshes on sigil_invalidated SSE events without opening a second EventSource. agent-browser checks confirm initial render, mutation-triggered refresh, and offline fallback.",
"whatWasImplemented": "werk-tab/index.html: added <button id=\"sigil-toggle\">sigil</button> in header (after field-toggle); added <section class=\"sigil\" id=\"sigil\" hidden> as a new top-level section. werk-tab/app.js: added sigilMode flag, toggleSigilMode() mirror of toggleFieldMode, loadSigil() fetches ${API}/api/sigil?logic=glance with text/svg+xml accept header and injects response into #sigil via .innerHTML (sanitization not needed since same-origin and we control the API), renderSigilOffline() shows fallback banner. SSE: added es.addEventListener('sigil_invalidated', () => { if (sigilMode) loadSigil() }). Existing es.onmessage retained, dispatches by active mode. werk-tab/style.css: added .sigil { padding: 24px; display: grid; place-items: center; } and an offline state class.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "cargo run -p werk -- serve --port 3749 (background)", "exitCode": 0, "observation": "daemon listening" },
{ "command": "lsof -ti :3749 | xargs kill (cleanup)", "exitCode": 0, "observation": "daemon stopped" }
],
"interactiveChecks": [
{ "action": "agent-browser: launched Brave with --load-extension=$REPO/werk-tab, opened chrome://newtab", "observed": "header shows three toggles: space (active), field, sigil; click sigil → sigil section visible, space hidden, single inline <svg> rendered with width 600 height 600" },
{ "action": "agent-browser: screenshotted sigil mode with 8 active tensions in fixture", "observed": "screenshot saved at /tmp/sigil-tab-initial.png; 5 outer ring nodes visible, 1 root center" },
{ "action": "curl -X PATCH http://localhost:3749/api/tensions/<id>/reality -d '{\"value\":\"changed\"}'; wait 2s; screenshot again", "observed": "screenshot at /tmp/sigil-tab-after-mutation.png shows visibly different ring composition" },
{ "action": "stop werk serve, refresh new tab", "observed": "sigil section shows 'offline — reconnecting…' banner; existing space/field modes also show offline banner (existing behavior)" }
]
},
"tests": {
"added": []
},
"discoveredIssues": [
{ "severity": "low", "description": "agent-browser cannot inject extensions automatically without a custom Brave profile dir — required wrapping in a TempDir profile per session.", "suggestedFix": "Document this in library/user-testing.md if not already." }
]
}
/api/sigil returns unexpected shapes despite the
feature description; suggests the M4 web feature was misimplemented.