@runweave/server-linux-x64 0.1.8 → 0.1.9
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/manifest.json +1482 -151
- package/native.tar.gz +0 -0
- package/package.json +1 -1
- package/payload/.agents/plugins/marketplace.json +20 -0
- package/payload/app-server/build-info.json +3 -3
- package/payload/app-server/index.cjs +1 -1
- package/payload/backend/build-info.json +4 -4
- package/payload/backend/index.cjs +45 -9
- package/payload/backend/ios-simulators/pool.py +3 -3
- package/payload/frontend/dist/assets/{_baseUniq-vo4uuhMd.js → _baseUniq-qHFga5V8.js} +1 -1
- package/payload/frontend/dist/assets/{access-_jCu7Rgu.js → access-DgHvmn15.js} +1 -1
- package/payload/frontend/dist/assets/{advanced-CqOhObYj.js → advanced-C1Fh14vw.js} +1 -1
- package/payload/frontend/dist/assets/{appearance-CrrD5gzC.js → appearance-Bs7cSXqO.js} +1 -1
- package/payload/frontend/dist/assets/{arc-dbfyHSF0.js → arc-E3iYHQG_.js} +1 -1
- package/payload/frontend/dist/assets/{architectureDiagram-Q4EWVU46-CntSCAsO.js → architectureDiagram-Q4EWVU46-DgpYpTb9.js} +1 -1
- package/payload/frontend/dist/assets/{blockDiagram-DXYQGD6D-Chp0D4qy.js → blockDiagram-DXYQGD6D-CfFOEKZ7.js} +1 -1
- package/payload/frontend/dist/assets/{c4Diagram-AHTNJAMY-CF91pOuW.js → c4Diagram-AHTNJAMY-BxlHBUj3.js} +1 -1
- package/payload/frontend/dist/assets/channel-amxyNKnk.js +1 -0
- package/payload/frontend/dist/assets/{chunk-4BX2VUAB-B1gxlVu2.js → chunk-4BX2VUAB-xWocgDo8.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-4TB4RGXK-Cxt3mj9b.js → chunk-4TB4RGXK-Bl1cNICf.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-55IACEB6-BJT6qNik.js → chunk-55IACEB6-DVtE836u.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-EDXVE4YY-yI59bCa0.js → chunk-EDXVE4YY-Dbd3tDCr.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-FMBD7UC4-CDvncKKJ.js → chunk-FMBD7UC4-MPJaTsyN.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-OYMX7WX6-BblOIU57.js → chunk-OYMX7WX6-D3LuudlW.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-QZHKN3VN-rODzNdO0.js → chunk-QZHKN3VN-Dn1aF6iQ.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-YZCP3GAM-B6D4wQwk.js → chunk-YZCP3GAM-jZYbHnCw.js} +1 -1
- package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-B8cTijjT.js +1 -0
- package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-B8cTijjT.js +1 -0
- package/payload/frontend/dist/assets/clone-xzI2eGRI.js +1 -0
- package/payload/frontend/dist/assets/connection-V2iI-6rM.js +12 -0
- package/payload/frontend/dist/assets/{connections-DqDmxS-O.js → connections-G_Q7342g.js} +1 -1
- package/payload/frontend/dist/assets/{cose-bilkent-S5V4N54A-BvwVWp29.js → cose-bilkent-S5V4N54A-75FLD3RS.js} +1 -1
- package/payload/frontend/dist/assets/{dagre-KV5264BT-h_K1TH11.js → dagre-KV5264BT-DEm-DpJL.js} +1 -1
- package/payload/frontend/dist/assets/{desktop-BQ3kGtKG.js → desktop-g5JC-CQd.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-5BDNPKRD-B8g2SV6L.js → diagram-5BDNPKRD-BV6P2UTy.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-G4DWMVQ6-BOEnrqYm.js → diagram-G4DWMVQ6-DuCK-MM2.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-MMDJMWI5-DlaN_z71.js → diagram-MMDJMWI5-D5_GlPgO.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-TYMM5635-C_pSKftn.js → diagram-TYMM5635-QRbOYR1P.js} +1 -1
- package/payload/frontend/dist/assets/{erDiagram-SMLLAGMA-C2dL-h3I.js → erDiagram-SMLLAGMA-DefCheAw.js} +1 -1
- package/payload/frontend/dist/assets/{flowDiagram-DWJPFMVM-BmXhKWFj.js → flowDiagram-DWJPFMVM-DVzyWIso.js} +1 -1
- package/payload/frontend/dist/assets/{ganttDiagram-T4ZO3ILL-D_Odnssf.js → ganttDiagram-T4ZO3ILL-BJaClUEF.js} +1 -1
- package/payload/frontend/dist/assets/{gitGraphDiagram-UUTBAWPF-DcQdcwKZ.js → gitGraphDiagram-UUTBAWPF-BLfbApNz.js} +1 -1
- package/payload/frontend/dist/assets/{graph-C_XsxefA.js → graph-C-YqFh68.js} +1 -1
- package/payload/frontend/dist/assets/{image-D3hgVr8O.js → image-CZo_2Awc.js} +1 -1
- package/payload/frontend/dist/assets/{index-CEUsFFQq.js → index-6q2aeqkt.js} +95 -105
- package/payload/frontend/dist/assets/{infoDiagram-42DDH7IO-C6TnRyMi.js → infoDiagram-42DDH7IO-BakVOutT.js} +1 -1
- package/payload/frontend/dist/assets/{ishikawaDiagram-UXIWVN3A-BL7rfALJ.js → ishikawaDiagram-UXIWVN3A-D_1Oa5Dc.js} +1 -1
- package/payload/frontend/dist/assets/{journeyDiagram-VCZTEJTY-C_6407GW.js → journeyDiagram-VCZTEJTY-Y8TVFv6B.js} +1 -1
- package/payload/frontend/dist/assets/{kanban-definition-6JOO6SKY-CK61Fd0p.js → kanban-definition-6JOO6SKY-DxeNhTIB.js} +1 -1
- package/payload/frontend/dist/assets/{layout-DVn6JKbl.js → layout-5cMeOTAp.js} +1 -1
- package/payload/frontend/dist/assets/{linear-DyWskq8H.js → linear-Bnc3ev5g.js} +1 -1
- package/payload/frontend/dist/assets/main-3TPtEl66.js +706 -0
- package/payload/frontend/dist/assets/main-D4_uoZQa.css +33 -0
- package/payload/frontend/dist/assets/{min-apbLpSJ3.js → min-BRXKkrS8.js} +1 -1
- package/payload/frontend/dist/assets/{mindmap-definition-QFDTVHPH-MVHZZbma.js → mindmap-definition-QFDTVHPH-RYZO_BEr.js} +1 -1
- package/payload/frontend/dist/assets/{monitoring-BApsVez_.js → monitoring-Fv7kZ4s6.js} +1 -1
- package/payload/frontend/dist/assets/{notifications-CjxSNLU1.js → notifications-BzrYqyMH.js} +1 -1
- package/payload/frontend/dist/assets/{pieDiagram-DEJITSTG-Dhbb0AYU.js → pieDiagram-DEJITSTG-Bzw0dhjz.js} +1 -1
- package/payload/frontend/dist/assets/{quadrantDiagram-34T5L4WZ-Yk6LOF0S.js → quadrantDiagram-34T5L4WZ-CQJY_msa.js} +1 -1
- package/payload/frontend/dist/assets/{record-content-BCJ80KS5.js → record-content-B7-6olQt.js} +1 -1
- package/payload/frontend/dist/assets/{requirementDiagram-MS252O5E-BUhS0PEq.js → requirementDiagram-MS252O5E-DuP8hAV8.js} +1 -1
- package/payload/frontend/dist/assets/{sankeyDiagram-XADWPNL6-D2sdxz14.js → sankeyDiagram-XADWPNL6-D-fQnCZZ.js} +1 -1
- package/payload/frontend/dist/assets/{sequenceDiagram-FGHM5R23-CRere4Fy.js → sequenceDiagram-FGHM5R23-DaZNEccV.js} +1 -1
- package/payload/frontend/dist/assets/{stateDiagram-FHFEXIEX-_pk-OMlm.js → stateDiagram-FHFEXIEX-CkOLt5R1.js} +1 -1
- package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-atg1K4nB.js +1 -0
- package/payload/frontend/dist/assets/{status-Dk5rRVQF.js → status-CIIPajZp.js} +1 -1
- package/payload/frontend/dist/assets/suiji-C453W-Sg.js +1 -0
- package/payload/frontend/dist/assets/{svg-X7YkMMvx.js → svg-BUqAWGtg.js} +1 -1
- package/payload/frontend/dist/assets/{tabs-BmKbcPVh.js → tabs-Cwlp1Meu.js} +1 -1
- package/payload/frontend/dist/assets/{timeline-definition-GMOUNBTQ-BPsI2pMC.js → timeline-definition-GMOUNBTQ-BOKDMwHS.js} +1 -1
- package/payload/frontend/dist/assets/{vennDiagram-DHZGUBPP-BNJkZ1Az.js → vennDiagram-DHZGUBPP-fSZjDS41.js} +1 -1
- package/payload/frontend/dist/assets/{wardley-RL74JXVD-CVcYeATS.js → wardley-RL74JXVD-D1KIsvoD.js} +1 -1
- package/payload/frontend/dist/assets/{wardleyDiagram-NUSXRM2D-BpLJ0alk.js → wardleyDiagram-NUSXRM2D-FMe67dwE.js} +1 -1
- package/payload/frontend/dist/assets/{xychartDiagram-5P7HB3ND-BdsYYk4M.js → xychartDiagram-5P7HB3ND-B9AM9_9w.js} +1 -1
- package/payload/frontend/dist/build-info.json +4 -4
- package/payload/frontend/dist/companion.html +1 -1
- package/payload/frontend/dist/index.html +3 -3
- package/payload/packages/agent-bridge/src/install-pi.mjs +81 -0
- package/payload/plugins/pi/dist/SKILL.md +22 -0
- package/payload/plugins/pi/dist/bridge/app-server-client.cjs +82 -0
- package/payload/plugins/pi/dist/bridge/feishu_stop_notify.sh +169 -0
- package/payload/plugins/pi/dist/bridge/runweave-hook-bridge.cjs +583 -0
- package/payload/plugins/pi/dist/bridge/runweave-hook-completion.cjs +42 -0
- package/payload/plugins/pi/dist/bridge/runweave-hook-payload.cjs +578 -0
- package/payload/plugins/pi/dist/bridge/runweave-task-supervision.cjs +167 -0
- package/payload/plugins/pi/dist/runweave.js +316 -0
- package/payload/plugins/toolkit/.codex-plugin/plugin.json +31 -0
- package/payload/plugins/toolkit/README.md +185 -0
- package/payload/plugins/toolkit/hooks/AGENTS.md +6 -0
- package/payload/plugins/toolkit/hooks/app-server-client.cjs +82 -0
- package/payload/plugins/toolkit/hooks/feishu_stop_notify.sh +169 -0
- package/payload/plugins/toolkit/hooks/runweave-hook-bridge.cjs +583 -0
- package/payload/plugins/toolkit/hooks/runweave-hook-completion.cjs +42 -0
- package/payload/plugins/toolkit/hooks/runweave-hook-dispatch.cjs +123 -0
- package/payload/plugins/toolkit/hooks/runweave-hook-payload.cjs +578 -0
- package/payload/plugins/toolkit/hooks/runweave-task-supervision.cjs +167 -0
- package/payload/plugins/toolkit/hooks.json +108 -0
- package/payload/plugins/toolkit/skills/acceptance/SKILL.md +70 -0
- package/payload/plugins/toolkit/skills/acceptance/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/acceptance/references/capture.md +38 -0
- package/payload/plugins/toolkit/skills/acceptance/references/delivery.md +54 -0
- package/payload/plugins/toolkit/skills/acceptance/references/gallery-contract.md +84 -0
- package/payload/plugins/toolkit/skills/acceptance/references/gallery-copy.md +34 -0
- package/payload/plugins/toolkit/skills/acceptance/references/video.md +52 -0
- package/payload/plugins/toolkit/skills/acceptance/scripts/capture.py +137 -0
- package/payload/plugins/toolkit/skills/acceptance/scripts/common.py +63 -0
- package/payload/plugins/toolkit/skills/acceptance/scripts/gallery.py +353 -0
- package/payload/plugins/toolkit/skills/acceptance/scripts/preview.py +109 -0
- package/payload/plugins/toolkit/skills/acceptance/scripts/video.py +283 -0
- package/payload/plugins/toolkit/skills/acceptance/templates/reader.css +576 -0
- package/payload/plugins/toolkit/skills/acceptance/templates/reader.html +63 -0
- package/payload/plugins/toolkit/skills/acceptance/templates/reader.js +326 -0
- package/payload/plugins/toolkit/skills/acceptance/templates/viewer.css +55 -0
- package/payload/plugins/toolkit/skills/acceptance-gallery/SKILL.md +8 -0
- package/payload/plugins/toolkit/skills/acceptance-gallery/agents/openai.yaml +6 -0
- package/payload/plugins/toolkit/skills/acceptance-gallery/references/capture-and-copy.md +3 -0
- package/payload/plugins/toolkit/skills/acceptance-gallery/references/content-contract.md +3 -0
- package/payload/plugins/toolkit/skills/acceptance-gallery/scripts/gallery.py +9 -0
- package/payload/plugins/toolkit/skills/acceptance-video/SKILL.md +8 -0
- package/payload/plugins/toolkit/skills/acceptance-video/agents/openai.yaml +6 -0
- package/payload/plugins/toolkit/skills/acceptance-video/references/input-and-capture.md +3 -0
- package/payload/plugins/toolkit/skills/acceptance-video/references/mobile-review.md +3 -0
- package/payload/plugins/toolkit/skills/acceptance-video/scripts/capture.py +9 -0
- package/payload/plugins/toolkit/skills/acceptance-video/scripts/video.py +9 -0
- package/payload/plugins/toolkit/skills/agent-device/SKILL.md +86 -0
- package/payload/plugins/toolkit/skills/agent-device/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/agent-device/references/ios-setup.md +36 -0
- package/payload/plugins/toolkit/skills/agent-device/scripts/device.py +398 -0
- package/payload/plugins/toolkit/skills/agent-device/scripts/resources.py +248 -0
- package/payload/plugins/toolkit/skills/architecture-flow-prototyping/SKILL.md +128 -0
- package/payload/plugins/toolkit/skills/architecture-flow-prototyping/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/architecture-flow-prototyping/references/architecture-flow-checklist.md +59 -0
- package/payload/plugins/toolkit/skills/architecture-flow-prototyping/references/architecture-flow-guide.md +135 -0
- package/payload/plugins/toolkit/skills/architecture-flow-prototyping/references/architecture-flow-handoff-template.md +57 -0
- package/payload/plugins/toolkit/skills/ask-first/SKILL.md +81 -0
- package/payload/plugins/toolkit/skills/brainstorming/SKILL.md +41 -0
- package/payload/plugins/toolkit/skills/browse-record/SKILL.md +35 -0
- package/payload/plugins/toolkit/skills/browse-record/references/app-usage.md +19 -0
- package/payload/plugins/toolkit/skills/browse-record/references/daily-reporting.md +115 -0
- package/payload/plugins/toolkit/skills/browse-record/references/zhihu.md +33 -0
- package/payload/plugins/toolkit/skills/browse-record/scripts/app_usage.py +110 -0
- package/payload/plugins/toolkit/skills/browse-record/scripts/browse_job.py +385 -0
- package/payload/plugins/toolkit/skills/browse-record/scripts/zhihu-read.js +126 -0
- package/payload/plugins/toolkit/skills/browse-record/scripts/zhihu_http.py +273 -0
- package/payload/plugins/toolkit/skills/clear-technical-explanations/LICENSE +21 -0
- package/payload/plugins/toolkit/skills/clear-technical-explanations/SKILL.md +103 -0
- package/payload/plugins/toolkit/skills/code-grounded-requirements/SKILL.md +54 -0
- package/payload/plugins/toolkit/skills/daily-doc-maintenance/SKILL.md +151 -0
- package/payload/plugins/toolkit/skills/daily-record/SKILL.md +63 -0
- package/payload/plugins/toolkit/skills/daily-record/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/daily-record/references/browser-history.md +6 -0
- package/payload/plugins/toolkit/skills/daily-record/references/feishu.md +90 -0
- package/payload/plugins/toolkit/skills/daily-record/references/scheduled-reporting.md +144 -0
- package/payload/plugins/toolkit/skills/daily-record/references/scheduled-task.template.json +15 -0
- package/payload/plugins/toolkit/skills/daily-record/references/suiji-work-records.md +57 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/feishu.py +280 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job.py +416 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job_browser.py +77 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job_facts.py +132 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job_isolation.py +69 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job_materials.py +154 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job_screen.py +77 -0
- package/payload/plugins/toolkit/skills/daily-record/scripts/job_state.py +309 -0
- package/payload/plugins/toolkit/skills/daily-refactor/SKILL.md +101 -0
- package/payload/plugins/toolkit/skills/daily-refactor/scripts/compare-architecture-reports.mjs +168 -0
- package/payload/plugins/toolkit/skills/debugging-strategies/SKILL.md +38 -0
- package/payload/plugins/toolkit/skills/debugging-strategies/resources/implementation-playbook.md +520 -0
- package/payload/plugins/toolkit/skills/diagnostic-log-debugging/SKILL.md +79 -0
- package/payload/plugins/toolkit/skills/doc-coauthoring/SKILL.md +64 -0
- package/payload/plugins/toolkit/skills/eli5/LICENSE +21 -0
- package/payload/plugins/toolkit/skills/eli5/SKILL.md +18 -0
- package/payload/plugins/toolkit/skills/experience/SKILL.md +71 -0
- package/payload/plugins/toolkit/skills/experience/package.json +13 -0
- package/payload/plugins/toolkit/skills/git-advanced-workflows/SKILL.md +457 -0
- package/payload/plugins/toolkit/skills/github-pr/SKILL.md +109 -0
- package/payload/plugins/toolkit/skills/github-pr/scripts/github-access.mjs +292 -0
- package/payload/plugins/toolkit/skills/github-pr/scripts/preflight.mjs +191 -0
- package/payload/plugins/toolkit/skills/github-pr/scripts/source-worktree.mjs +354 -0
- package/payload/plugins/toolkit/skills/grill-with-docs/SKILL.md +66 -0
- package/payload/plugins/toolkit/skills/grill-with-docs/agents/openai.yaml +6 -0
- package/payload/plugins/toolkit/skills/grilling/SKILL.md +14 -0
- package/payload/plugins/toolkit/skills/handoff/SKILL.md +98 -0
- package/payload/plugins/toolkit/skills/karpathy-guidelines/SKILL.md +73 -0
- package/payload/plugins/toolkit/skills/playwright-cli/SKILL.md +562 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/element-attributes.md +23 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/request-mocking.md +87 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/running-code.md +240 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/session-management.md +226 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/spec-driven-testing.md +312 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/storage-state.md +275 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/test-generation.md +138 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/tracing.md +142 -0
- package/payload/plugins/toolkit/skills/playwright-cli/references/video-recording.md +157 -0
- package/payload/plugins/toolkit/skills/playwright-cli/templates/standalone.config.json +7 -0
- package/payload/plugins/toolkit/skills/product-exploration/SKILL.md +64 -0
- package/payload/plugins/toolkit/skills/product-exploration/agents/openai.yaml +5 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/SKILL.md +134 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/README.md +88 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/app.js +145 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/index.html +229 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/mock-state.json +60 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/references/implementation-plan-handoff-template.md +61 -0
- package/payload/plugins/toolkit/skills/prototype-first-development/references/prototype-workflow-checklist.md +64 -0
- package/payload/plugins/toolkit/skills/publish-runweave-server/SKILL.md +64 -0
- package/payload/plugins/toolkit/skills/publish-runweave-server/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/react-best-practices/AGENTS.md +3227 -0
- package/payload/plugins/toolkit/skills/react-best-practices/README.md +127 -0
- package/payload/plugins/toolkit/skills/react-best-practices/SKILL.md +143 -0
- package/payload/plugins/toolkit/skills/react-best-practices/metadata.json +15 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/advanced/event-handler-refs.md +55 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/advanced/init-once.md +42 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/advanced/use-latest.md +39 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/async/api-routes.md +38 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/async/defer-await.md +80 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/async/dependencies.md +52 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/async/parallel.md +28 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/async/suspense-boundaries.md +99 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/barrel-imports.md +59 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/conditional.md +37 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/defer-third-party.md +49 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/dynamic-imports.md +35 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/bundle/preload.md +46 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/client/event-listeners.md +78 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/client/localstorage-schema.md +77 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/client/passive-event-listeners.md +48 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/client/swr-dedup.md +56 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/batch-dom-css.md +110 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/cache-function-results.md +80 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/cache-property-access.md +28 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/cache-storage.md +70 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/combine-iterations.md +32 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/early-exit.md +50 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/flatmap-filter.md +55 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/hoist-regexp.md +45 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/index-maps.md +37 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/length-check-first.md +50 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/min-max-loop.md +82 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/set-map-lookups.md +24 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/js/tosorted-immutable.md +57 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/meta/sections.md +46 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/meta/template.md +28 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/activity.md +26 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/animate-svg-wrapper.md +38 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/conditional-render.md +32 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/content-visibility.md +38 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/hoist-jsx.md +36 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/hydration-no-flicker.md +72 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/hydration-suppress-warning.md +26 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/resource-hints.md +89 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/script-defer-async.md +71 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/svg-precision.md +28 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rendering/usetransition-loading.md +75 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/defer-reads.md +39 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/dependencies.md +45 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/derived-state-no-effect.md +40 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/derived-state.md +29 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/functional-setstate.md +77 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/lazy-state-init.md +58 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/memo-with-default-value.md +36 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/memo.md +44 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/move-effect-to-event.md +45 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/no-inline-components.md +83 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/simple-expression-in-memo.md +35 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/transitions.md +40 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/rerender/use-ref-transient-values.md +73 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/after-nonblocking.md +74 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/auth-actions.md +96 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/cache-lru.md +41 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/cache-react.md +76 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/dedup-props.md +65 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/hoist-static-io.md +139 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/parallel-fetching.md +83 -0
- package/payload/plugins/toolkit/skills/react-best-practices/rules/server/serialization.md +38 -0
- package/payload/plugins/toolkit/skills/recorded-browser-mcp-verification/SKILL.md +8 -0
- package/payload/plugins/toolkit/skills/recorded-browser-mcp-verification/agents/openai.yaml +6 -0
- package/payload/plugins/toolkit/skills/reproduce-before-fix/SKILL.md +93 -0
- package/payload/plugins/toolkit/skills/reproduce-before-fix/agents/openai.yaml +7 -0
- package/payload/plugins/toolkit/skills/review-only/SKILL.md +72 -0
- package/payload/plugins/toolkit/skills/review-with-runtime-evidence/SKILL.md +134 -0
- package/payload/plugins/toolkit/skills/review-with-runtime-evidence/agents/openai.yaml +7 -0
- package/payload/plugins/toolkit/skills/review-with-runtime-evidence/references/contracts.md +114 -0
- package/payload/plugins/toolkit/skills/review-with-runtime-evidence/scripts/classify-runtime-verdict.mjs +140 -0
- package/payload/plugins/toolkit/skills/review-with-runtime-evidence/scripts/run-static-review.mjs +389 -0
- package/payload/plugins/toolkit/skills/review-with-runtime-evidence/scripts/static-review-contract.mjs +243 -0
- package/payload/plugins/toolkit/skills/run-test-cases/SKILL.md +63 -0
- package/payload/plugins/toolkit/skills/runweave-change-validation/SKILL.md +196 -0
- package/payload/plugins/toolkit/skills/runweave-change-validation/agents/openai.yaml +7 -0
- package/payload/plugins/toolkit/skills/runweave-change-validation/scripts/assert-dev-session-status.mjs +181 -0
- package/payload/plugins/toolkit/skills/runweave-dev-session/SKILL.md +126 -0
- package/payload/plugins/toolkit/skills/runweave-dev-session/agents/openai.yaml +7 -0
- package/payload/plugins/toolkit/skills/runweave-management/SKILL.md +47 -0
- package/payload/plugins/toolkit/skills/scheduled-task/SKILL.md +35 -0
- package/payload/plugins/toolkit/skills/shadcn/SKILL.md +245 -0
- package/payload/plugins/toolkit/skills/shadcn/agents/openai.yml +5 -0
- package/payload/plugins/toolkit/skills/shadcn/assets/shadcn-small.png +0 -0
- package/payload/plugins/toolkit/skills/shadcn/assets/shadcn.png +0 -0
- package/payload/plugins/toolkit/skills/shadcn/cli.md +276 -0
- package/payload/plugins/toolkit/skills/shadcn/customization.md +209 -0
- package/payload/plugins/toolkit/skills/shadcn/evals/evals.json +47 -0
- package/payload/plugins/toolkit/skills/shadcn/mcp.md +94 -0
- package/payload/plugins/toolkit/skills/shadcn/rules/base-vs-radix.md +310 -0
- package/payload/plugins/toolkit/skills/shadcn/rules/composition.md +197 -0
- package/payload/plugins/toolkit/skills/shadcn/rules/forms.md +198 -0
- package/payload/plugins/toolkit/skills/shadcn/rules/icons.md +101 -0
- package/payload/plugins/toolkit/skills/shadcn/rules/styling.md +163 -0
- package/payload/plugins/toolkit/skills/suiji/SKILL.md +54 -0
- package/payload/plugins/toolkit/skills/suiji/references/api.md +72 -0
- package/payload/plugins/toolkit/skills/suiji/references/source-adapter.md +40 -0
- package/payload/plugins/toolkit/skills/suiji/references/work-records.md +36 -0
- package/payload/plugins/toolkit/skills/suiji/scripts/source_adapter.py +46 -0
- package/payload/plugins/toolkit/skills/suiji/scripts/suiji.py +358 -0
- package/payload/plugins/toolkit/skills/suiji/scripts/work_records.py +328 -0
- package/payload/plugins/toolkit/skills/suiji/scripts/work_reports.py +75 -0
- package/payload/plugins/toolkit/skills/sync-branch-hard-reset/SKILL.md +59 -0
- package/payload/plugins/toolkit/skills/update-runweave-backend/SKILL.md +90 -0
- package/payload/plugins/toolkit/skills/update-runweave-backend/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/update-runweave-backend/references/npm-update.md +68 -0
- package/payload/plugins/toolkit/skills/update-runweave-backend/references/systemd.md +34 -0
- package/payload/plugins/toolkit/skills/update-runweave-desktop/SKILL.md +102 -0
- package/payload/plugins/toolkit/skills/update-runweave-ios/SKILL.md +16 -0
- package/payload/plugins/toolkit/skills/update-runweave-ios/references/ios-wireless-recovery.md +54 -0
- package/payload/plugins/toolkit/skills/using-rw/SKILL.md +265 -0
- package/payload/plugins/toolkit/skills/write-plan/SKILL.md +72 -0
- package/payload/plugins/toolkit/skills/write-test-cases/SKILL.md +100 -0
- package/payload/plugins/toolkit/skills/write-test-cases/assets/test-plan-template.yaml +15 -0
- package/payload/plugins/toolkit/skills/write-test-cases/references/coverage-checklist.md +75 -0
- package/payload/plugins/toolkit/skills/write-test-cases/references/design-techniques.md +91 -0
- package/payload/plugins/toolkit/skills/youtube-reading/SKILL.md +35 -0
- package/payload/plugins/toolkit/skills/youtube-reading/agents/openai.yaml +4 -0
- package/payload/plugins/toolkit/skills/youtube-reading/assets/runtime-lock.json +92 -0
- package/payload/plugins/toolkit/skills/youtube-reading/references/content-contract.md +52 -0
- package/payload/plugins/toolkit/skills/youtube-reading/references/setup.md +70 -0
- package/payload/plugins/toolkit/skills/youtube-reading/requirements.lock +9 -0
- package/payload/plugins/toolkit/skills/youtube-reading/scripts/artifacts.py +206 -0
- package/payload/plugins/toolkit/skills/youtube-reading/scripts/runtime.py +424 -0
- package/payload/plugins/toolkit/skills/youtube-reading/scripts/youtube_reading.py +314 -0
- package/payload/plugins/toolkit-release.json +1 -0
- package/payload/scripts/toolkit/codex-state.mjs +75 -0
- package/payload/scripts/toolkit/release.mjs +210 -0
- package/payload/scripts/toolkit/sync-runtime.mjs +108 -0
- package/payload/scripts/toolkit/sync.mjs +585 -0
- package/payload/frontend/dist/assets/channel-Bf3IeONI.js +0 -1
- package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-CFsG2SvG.js +0 -1
- package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-CFsG2SvG.js +0 -1
- package/payload/frontend/dist/assets/clone-CeQXm2YN.js +0 -1
- package/payload/frontend/dist/assets/connection-XriXysSc.js +0 -12
- package/payload/frontend/dist/assets/main-Cg6Oo1xK.css +0 -33
- package/payload/frontend/dist/assets/main-H5R-3_w1.js +0 -696
- package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-CzpdUl_0.js +0 -1
- package/payload/frontend/dist/assets/suiji-CO_L5W1X.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Cross-Request LRU Caching
|
|
3
|
+
impact: HIGH
|
|
4
|
+
impactDescription: caches across requests
|
|
5
|
+
tags: server, cache, lru, cross-request
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Cross-Request LRU Caching
|
|
9
|
+
|
|
10
|
+
`React.cache()` only works within one request. For data shared across sequential requests (user clicks button A then button B), use an LRU cache.
|
|
11
|
+
|
|
12
|
+
**Implementation:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { LRUCache } from "lru-cache";
|
|
16
|
+
|
|
17
|
+
const cache = new LRUCache<string, any>({
|
|
18
|
+
max: 1000,
|
|
19
|
+
ttl: 5 * 60 * 1000, // 5 minutes
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export async function getUser(id: string) {
|
|
23
|
+
const cached = cache.get(id);
|
|
24
|
+
if (cached) return cached;
|
|
25
|
+
|
|
26
|
+
const user = await db.user.findUnique({ where: { id } });
|
|
27
|
+
cache.set(id, user);
|
|
28
|
+
return user;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Request 1: DB query, result cached
|
|
32
|
+
// Request 2: cache hit, no DB query
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Use when sequential user actions hit multiple endpoints needing the same data within seconds.
|
|
36
|
+
|
|
37
|
+
**With Vercel's [Fluid Compute](https://vercel.com/docs/fluid-compute):** LRU caching is especially effective because multiple concurrent requests can share the same function instance and cache. This means the cache persists across requests without needing external storage like Redis.
|
|
38
|
+
|
|
39
|
+
**In traditional serverless:** Each invocation runs in isolation, so consider Redis for cross-process caching.
|
|
40
|
+
|
|
41
|
+
Reference: [https://github.com/isaacs/node-lru-cache](https://github.com/isaacs/node-lru-cache)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Per-Request Deduplication with React.cache()
|
|
3
|
+
impact: MEDIUM
|
|
4
|
+
impactDescription: deduplicates within request
|
|
5
|
+
tags: server, cache, react-cache, deduplication
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Per-Request Deduplication with React.cache()
|
|
9
|
+
|
|
10
|
+
Use `React.cache()` for server-side request deduplication. Authentication and database queries benefit most.
|
|
11
|
+
|
|
12
|
+
**Usage:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { cache } from "react";
|
|
16
|
+
|
|
17
|
+
export const getCurrentUser = cache(async () => {
|
|
18
|
+
const session = await auth();
|
|
19
|
+
if (!session?.user?.id) return null;
|
|
20
|
+
return await db.user.findUnique({
|
|
21
|
+
where: { id: session.user.id },
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Within a single request, multiple calls to `getCurrentUser()` execute the query only once.
|
|
27
|
+
|
|
28
|
+
**Avoid inline objects as arguments:**
|
|
29
|
+
|
|
30
|
+
`React.cache()` uses shallow equality (`Object.is`) to determine cache hits. Inline objects create new references each call, preventing cache hits.
|
|
31
|
+
|
|
32
|
+
**Incorrect (always cache miss):**
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
const getUser = cache(async (params: { uid: number }) => {
|
|
36
|
+
return await db.user.findUnique({ where: { id: params.uid } });
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Each call creates new object, never hits cache
|
|
40
|
+
getUser({ uid: 1 });
|
|
41
|
+
getUser({ uid: 1 }); // Cache miss, runs query again
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Correct (cache hit):**
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
const getUser = cache(async (uid: number) => {
|
|
48
|
+
return await db.user.findUnique({ where: { id: uid } });
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
// Primitive args use value equality
|
|
52
|
+
getUser(1);
|
|
53
|
+
getUser(1); // Cache hit, returns cached result
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If you must pass objects, pass the same reference:
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
const params = { uid: 1 };
|
|
60
|
+
getUser(params); // Query runs
|
|
61
|
+
getUser(params); // Cache hit (same reference)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Next.js-Specific Note:**
|
|
65
|
+
|
|
66
|
+
In Next.js, the `fetch` API is automatically extended with request memoization. Requests with the same URL and options are automatically deduplicated within a single request, so you don't need `React.cache()` for `fetch` calls. However, `React.cache()` is still essential for other async tasks:
|
|
67
|
+
|
|
68
|
+
- Database queries (Prisma, Drizzle, etc.)
|
|
69
|
+
- Heavy computations
|
|
70
|
+
- Authentication checks
|
|
71
|
+
- File system operations
|
|
72
|
+
- Any non-fetch async work
|
|
73
|
+
|
|
74
|
+
Use `React.cache()` to deduplicate these operations across your component tree.
|
|
75
|
+
|
|
76
|
+
Reference: [React.cache documentation](https://react.dev/reference/react/cache)
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Avoid Duplicate Serialization in RSC Props
|
|
3
|
+
impact: LOW
|
|
4
|
+
impactDescription: reduces network payload by avoiding duplicate serialization
|
|
5
|
+
tags: server, rsc, serialization, props, client-components
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Avoid Duplicate Serialization in RSC Props
|
|
9
|
+
|
|
10
|
+
**Impact: LOW (reduces network payload by avoiding duplicate serialization)**
|
|
11
|
+
|
|
12
|
+
RSC→client serialization deduplicates by object reference, not value. Same reference = serialized once; new reference = serialized again. Do transformations (`.toSorted()`, `.filter()`, `.map()`) in client, not server.
|
|
13
|
+
|
|
14
|
+
**Incorrect (duplicates array):**
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
// RSC: sends 6 strings (2 arrays × 3 items)
|
|
18
|
+
<ClientList usernames={usernames} usernamesOrdered={usernames.toSorted()} />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Correct (sends 3 strings):**
|
|
22
|
+
|
|
23
|
+
```tsx
|
|
24
|
+
// RSC: send once
|
|
25
|
+
<ClientList usernames={usernames} />;
|
|
26
|
+
|
|
27
|
+
// Client: transform there
|
|
28
|
+
("use client");
|
|
29
|
+
const sorted = useMemo(() => [...usernames].sort(), [usernames]);
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Nested deduplication behavior:**
|
|
33
|
+
|
|
34
|
+
Deduplication works recursively. Impact varies by data type:
|
|
35
|
+
|
|
36
|
+
- `string[]`, `number[]`, `boolean[]`: **HIGH impact** - array + all primitives fully duplicated
|
|
37
|
+
- `object[]`: **LOW impact** - array duplicated, but nested objects deduplicated by reference
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
// string[] - duplicates everything
|
|
41
|
+
usernames={['a','b']} sorted={usernames.toSorted()} // sends 4 strings
|
|
42
|
+
|
|
43
|
+
// object[] - duplicates array structure only
|
|
44
|
+
users={[{id:1},{id:2}]} sorted={users.toSorted()} // sends 2 arrays + 2 unique objects (not 4)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Operations breaking deduplication (create new references):**
|
|
48
|
+
|
|
49
|
+
- Arrays: `.toSorted()`, `.filter()`, `.map()`, `.slice()`, `[...arr]`
|
|
50
|
+
- Objects: `{...obj}`, `Object.assign()`, `structuredClone()`, `JSON.parse(JSON.stringify())`
|
|
51
|
+
|
|
52
|
+
**More examples:**
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
// ❌ Bad
|
|
56
|
+
<C users={users} active={users.filter(u => u.active)} />
|
|
57
|
+
<C product={product} productName={product.name} />
|
|
58
|
+
|
|
59
|
+
// ✅ Good
|
|
60
|
+
<C users={users} />
|
|
61
|
+
<C product={product} />
|
|
62
|
+
// Do filtering/destructuring in client
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
**Exception:** Pass derived data when transformation is expensive or client doesn't need original.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Hoist Static I/O to Module Level
|
|
3
|
+
impact: HIGH
|
|
4
|
+
impactDescription: avoids repeated file/network I/O per request
|
|
5
|
+
tags: server, io, performance, next.js, route-handlers, og-image
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Hoist Static I/O to Module Level
|
|
9
|
+
|
|
10
|
+
**Impact: HIGH (avoids repeated file/network I/O per request)**
|
|
11
|
+
|
|
12
|
+
When loading static assets (fonts, logos, images, config files) in route handlers or server functions, hoist the I/O operation to module level. Module-level code runs once when the module is first imported, not on every request. This eliminates redundant file system reads or network fetches that would otherwise run on every invocation.
|
|
13
|
+
|
|
14
|
+
**Incorrect: reads font file on every request**
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
// app/api/og/route.tsx
|
|
18
|
+
import { ImageResponse } from 'next/og'
|
|
19
|
+
|
|
20
|
+
export async function GET(request: Request) {
|
|
21
|
+
// Runs on EVERY request - expensive!
|
|
22
|
+
const fontData = await fetch(
|
|
23
|
+
new URL('./fonts/Inter.ttf', import.meta.url)
|
|
24
|
+
).then(res => res.arrayBuffer())
|
|
25
|
+
|
|
26
|
+
const logoData = await fetch(
|
|
27
|
+
new URL('./images/logo.png', import.meta.url)
|
|
28
|
+
).then(res => res.arrayBuffer())
|
|
29
|
+
|
|
30
|
+
return new ImageResponse(
|
|
31
|
+
<div style={{ fontFamily: 'Inter' }}>
|
|
32
|
+
<img src={logoData} />
|
|
33
|
+
Hello World
|
|
34
|
+
</div>,
|
|
35
|
+
{ fonts: [{ name: 'Inter', data: fontData }] }
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Correct: loads once at module initialization**
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
// app/api/og/route.tsx
|
|
44
|
+
import { ImageResponse } from 'next/og'
|
|
45
|
+
|
|
46
|
+
// Module-level: runs ONCE when module is first imported
|
|
47
|
+
const fontData = fetch(
|
|
48
|
+
new URL('./fonts/Inter.ttf', import.meta.url)
|
|
49
|
+
).then(res => res.arrayBuffer())
|
|
50
|
+
|
|
51
|
+
const logoData = fetch(
|
|
52
|
+
new URL('./images/logo.png', import.meta.url)
|
|
53
|
+
).then(res => res.arrayBuffer())
|
|
54
|
+
|
|
55
|
+
export async function GET(request: Request) {
|
|
56
|
+
// Await the already-started promises
|
|
57
|
+
const [font, logo] = await Promise.all([fontData, logoData])
|
|
58
|
+
|
|
59
|
+
return new ImageResponse(
|
|
60
|
+
<div style={{ fontFamily: 'Inter' }}>
|
|
61
|
+
<img src={logo} />
|
|
62
|
+
Hello World
|
|
63
|
+
</div>,
|
|
64
|
+
{ fonts: [{ name: 'Inter', data: font }] }
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Alternative: synchronous file reads with Node.js fs**
|
|
70
|
+
|
|
71
|
+
```typescript
|
|
72
|
+
// app/api/og/route.tsx
|
|
73
|
+
import { ImageResponse } from 'next/og'
|
|
74
|
+
import { readFileSync } from 'fs'
|
|
75
|
+
import { join } from 'path'
|
|
76
|
+
|
|
77
|
+
// Synchronous read at module level - blocks only during module init
|
|
78
|
+
const fontData = readFileSync(
|
|
79
|
+
join(process.cwd(), 'public/fonts/Inter.ttf')
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
const logoData = readFileSync(
|
|
83
|
+
join(process.cwd(), 'public/images/logo.png')
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
export async function GET(request: Request) {
|
|
87
|
+
return new ImageResponse(
|
|
88
|
+
<div style={{ fontFamily: 'Inter' }}>
|
|
89
|
+
<img src={logoData} />
|
|
90
|
+
Hello World
|
|
91
|
+
</div>,
|
|
92
|
+
{ fonts: [{ name: 'Inter', data: fontData }] }
|
|
93
|
+
)
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**General Node.js example: loading config or templates**
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// Incorrect: reads config on every call
|
|
101
|
+
export async function processRequest(data: Data) {
|
|
102
|
+
const config = JSON.parse(await fs.readFile("./config.json", "utf-8"));
|
|
103
|
+
const template = await fs.readFile("./template.html", "utf-8");
|
|
104
|
+
|
|
105
|
+
return render(template, data, config);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Correct: loads once at module level
|
|
109
|
+
const configPromise = fs.readFile("./config.json", "utf-8").then(JSON.parse);
|
|
110
|
+
const templatePromise = fs.readFile("./template.html", "utf-8");
|
|
111
|
+
|
|
112
|
+
export async function processRequest(data: Data) {
|
|
113
|
+
const [config, template] = await Promise.all([
|
|
114
|
+
configPromise,
|
|
115
|
+
templatePromise,
|
|
116
|
+
]);
|
|
117
|
+
|
|
118
|
+
return render(template, data, config);
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**When to use this pattern:**
|
|
123
|
+
|
|
124
|
+
- Loading fonts for OG image generation
|
|
125
|
+
- Loading static logos, icons, or watermarks
|
|
126
|
+
- Reading configuration files that don't change at runtime
|
|
127
|
+
- Loading email templates or other static templates
|
|
128
|
+
- Any static asset that's the same across all requests
|
|
129
|
+
|
|
130
|
+
**When NOT to use this pattern:**
|
|
131
|
+
|
|
132
|
+
- Assets that vary per request or user
|
|
133
|
+
- Files that may change during runtime (use caching with TTL instead)
|
|
134
|
+
- Large files that would consume too much memory if kept loaded
|
|
135
|
+
- Sensitive data that shouldn't persist in memory
|
|
136
|
+
|
|
137
|
+
**With Vercel's [Fluid Compute](https://vercel.com/docs/fluid-compute):** Module-level caching is especially effective because multiple concurrent requests share the same function instance. The static assets stay loaded in memory across requests without cold start penalties.
|
|
138
|
+
|
|
139
|
+
**In traditional serverless:** Each cold start re-executes module-level code, but subsequent warm invocations reuse the loaded assets until the instance is recycled.
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Parallel Data Fetching with Component Composition
|
|
3
|
+
impact: CRITICAL
|
|
4
|
+
impactDescription: eliminates server-side waterfalls
|
|
5
|
+
tags: server, rsc, parallel-fetching, composition
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Parallel Data Fetching with Component Composition
|
|
9
|
+
|
|
10
|
+
React Server Components execute sequentially within a tree. Restructure with composition to parallelize data fetching.
|
|
11
|
+
|
|
12
|
+
**Incorrect (Sidebar waits for Page's fetch to complete):**
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
export default async function Page() {
|
|
16
|
+
const header = await fetchHeader();
|
|
17
|
+
return (
|
|
18
|
+
<div>
|
|
19
|
+
<div>{header}</div>
|
|
20
|
+
<Sidebar />
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async function Sidebar() {
|
|
26
|
+
const items = await fetchSidebarItems();
|
|
27
|
+
return <nav>{items.map(renderItem)}</nav>;
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Correct (both fetch simultaneously):**
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
async function Header() {
|
|
35
|
+
const data = await fetchHeader();
|
|
36
|
+
return <div>{data}</div>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async function Sidebar() {
|
|
40
|
+
const items = await fetchSidebarItems();
|
|
41
|
+
return <nav>{items.map(renderItem)}</nav>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default function Page() {
|
|
45
|
+
return (
|
|
46
|
+
<div>
|
|
47
|
+
<Header />
|
|
48
|
+
<Sidebar />
|
|
49
|
+
</div>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Alternative with children prop:**
|
|
55
|
+
|
|
56
|
+
```tsx
|
|
57
|
+
async function Header() {
|
|
58
|
+
const data = await fetchHeader();
|
|
59
|
+
return <div>{data}</div>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async function Sidebar() {
|
|
63
|
+
const items = await fetchSidebarItems();
|
|
64
|
+
return <nav>{items.map(renderItem)}</nav>;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function Layout({ children }: { children: ReactNode }) {
|
|
68
|
+
return (
|
|
69
|
+
<div>
|
|
70
|
+
<Header />
|
|
71
|
+
{children}
|
|
72
|
+
</div>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default function Page() {
|
|
77
|
+
return (
|
|
78
|
+
<Layout>
|
|
79
|
+
<Sidebar />
|
|
80
|
+
</Layout>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Minimize Serialization at RSC Boundaries
|
|
3
|
+
impact: HIGH
|
|
4
|
+
impactDescription: reduces data transfer size
|
|
5
|
+
tags: server, rsc, serialization, props
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Minimize Serialization at RSC Boundaries
|
|
9
|
+
|
|
10
|
+
The React Server/Client boundary serializes all object properties into strings and embeds them in the HTML response and subsequent RSC requests. This serialized data directly impacts page weight and load time, so **size matters a lot**. Only pass fields that the client actually uses.
|
|
11
|
+
|
|
12
|
+
**Incorrect (serializes all 50 fields):**
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
async function Page() {
|
|
16
|
+
const user = await fetchUser(); // 50 fields
|
|
17
|
+
return <Profile user={user} />;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
("use client");
|
|
21
|
+
function Profile({ user }: { user: User }) {
|
|
22
|
+
return <div>{user.name}</div>; // uses 1 field
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Correct (serializes only 1 field):**
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
async function Page() {
|
|
30
|
+
const user = await fetchUser();
|
|
31
|
+
return <Profile name={user.name} />;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
("use client");
|
|
35
|
+
function Profile({ name }: { name: string }) {
|
|
36
|
+
return <div>{name}</div>;
|
|
37
|
+
}
|
|
38
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: recorded-browser-mcp-verification
|
|
3
|
+
description: 兼容 recorded-browser-mcp-verification 旧名称,将浏览器录屏取证请求转到 toolkit:acceptance。仅用于旧名称兼容;新请求使用统一入口。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 旧名称兼容
|
|
7
|
+
|
|
8
|
+
读取[统一验收材料 Skill](../acceptance/SKILL.md),按用户本次范围执行。旧名称表示本次偏好原始录屏,不扩大授权,不额外制作用户未要求的产物。原有脚本路径转发到统一实现。
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: reproduce-before-fix
|
|
3
|
+
description: 仅供显式调用:对给定或执行中发现的问题,先通过真实业务入口和生产代码路径复现,再决定是否修复或优化;无法复现、只能由 mock 或伪造状态触发、或确认处于不支持边界时停止修改。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 真实复现后修复
|
|
7
|
+
|
|
8
|
+
坚持一个顺序:**先复现,再解决,再优化**。问题描述、测试结论和 P0/P1/P2 标签都是待验证输入,不是问题已经成立的证据。
|
|
9
|
+
|
|
10
|
+
## 调用边界
|
|
11
|
+
|
|
12
|
+
本技能只允许通过 `$toolkit:reproduce-before-fix` 显式调用,不根据普通的“修复问题”“测试失败”或“优化性能”等请求自动触发。
|
|
13
|
+
|
|
14
|
+
显式调用代表执行复现门槛,不代表承诺修复。处理用户提供的问题,也处理本次任务中发现的新问题;每个问题都独立经过同一门槛。
|
|
15
|
+
|
|
16
|
+
需要通过新增、录制和分析 AI 诊断日志逐步定位时,显式组合使用 `$toolkit:diagnostic-log-debugging`。该技能负责日志采集与定位方法;本技能仍负责判断真实复现是否成立、是否允许进入修复和优化。
|
|
17
|
+
|
|
18
|
+
复现需要实际规划、启动、查询、打开或停止 Dev Session 时,同时使用 `$toolkit:runweave-dev-session`;本技能负责复现门槛和 Before 证据,该技能负责准确的 Session 生命周期。
|
|
19
|
+
|
|
20
|
+
## 什么是真实复现
|
|
21
|
+
|
|
22
|
+
使用真实产品入口、当前生产代码路径和实际运行中的进程、接口、存储、事件流或传输层,观察真实可见结果。尽量还原报告中的用户角色、操作顺序、数据规模、环境和时序。
|
|
23
|
+
|
|
24
|
+
可以用脚本或浏览器自动化驱动真实系统,但自动化只能代替人工操作,不能代替被验证的系统。以下内容可以帮助形成假设,但不能单独算作复现:
|
|
25
|
+
|
|
26
|
+
- mock、stub、fake transport 或伪造响应;
|
|
27
|
+
- 只构造 fixture、内存对象或虚假业务数据;
|
|
28
|
+
- 绕过产品入口直接调用内部类、私有函数或测试专用接口;
|
|
29
|
+
- 只阅读代码后推断“应该会发生”;
|
|
30
|
+
- 只让单元测试或模拟环境失败。
|
|
31
|
+
|
|
32
|
+
## 执行流程
|
|
33
|
+
|
|
34
|
+
### 1. 把结论还原成可观察问题
|
|
35
|
+
|
|
36
|
+
先写清触发条件、操作入口、预期结果和实际症状。区分报告原话、当前事实和待验证推测。优先级只影响处理顺序和响应速度,不得跳过复现。
|
|
37
|
+
|
|
38
|
+
如果描述缺少细节,先从代码、测试记录、日志和实际产品入口补齐;只有缺失信息会实质改变复现路径时才向用户确认。
|
|
39
|
+
|
|
40
|
+
### 2. 在修改前执行真实复现
|
|
41
|
+
|
|
42
|
+
记录代码基线、运行环境、真实入口、完整步骤和观察证据。证据按问题选择,可以是页面行为、DOM、网络消息、真实接口响应、日志、存储结果、事件序列、截图、录屏或性能数字。
|
|
43
|
+
|
|
44
|
+
在安全且成本合理时重复执行,排除偶发环境噪声。性能问题必须先记录基线、规模和可判断的数字;没有测到问题,就不进入性能优化。
|
|
45
|
+
|
|
46
|
+
在 Runweave 中预期后续组合 `$toolkit:runweave-change-validation` 时,复现阶段同时建立交接记录:
|
|
47
|
+
|
|
48
|
+
- 默认让第一次 `dev:session start` 自动生成 ID,并立即从 JSON 结果捕获为 `validationSessionId`;如果必须在启动前建立证据目录或映射,使用 `rcv-YYYYMMDD-<hash6>`,其中 `hash6` 固定取 `SHA-256("<baselineRevision>\n<scenarioId>")` 前 6 位小写十六进制,禁止 `Math.random`、UUID、裸时间戳、随意截 commit 或任意标题;
|
|
49
|
+
- 选定稳定的 `scenarioId`;`validationSessionId` 一旦捕获或生成,本次任务内不得更换;
|
|
50
|
+
- 将代码 revision、完整步骤、输入数据、target surface、关键身份和证据写入同一证据根目录的 `before/`;
|
|
51
|
+
- 若修复前使用 Dev Session,使用该 `validationSessionId`,并在 `dev:stop` 前归档 `dev:status`、`dev:open` 和 manifest 关键字段;后续修复验证必须复用同一 ID;
|
|
52
|
+
- 若问题来自不可替换的既有用户 session,不改名或迁移该 session;记录 `sourceSessionId → validationSessionId` 映射及不能复用的原因,这是唯一允许不同 ID 的情形。
|
|
53
|
+
|
|
54
|
+
### 3. 通过门槛决定动作
|
|
55
|
+
|
|
56
|
+
只允许以下结论:
|
|
57
|
+
|
|
58
|
+
| 结论 | 判断依据 | 动作 |
|
|
59
|
+
| ------------ | -------------------------------------------------------- | -------------------------------------- |
|
|
60
|
+
| 已复现 | 真实入口稳定出现报告症状,并有可回查证据 | 定位已证实机制,进入最小修复 |
|
|
61
|
+
| 未复现 | 已覆盖可信路径,但真实系统没有出现症状 | 停止,不修改代码,记录尝试与证据 |
|
|
62
|
+
| 边界情形 | 超出支持契约,或只能靠伪造内部状态、不可达时序等方式触发 | 停止,不为该情形扩展实现 |
|
|
63
|
+
| 环境阻塞 | 缺少设备、权限、服务、数据或必要版本,无法完成真实路径 | 停止修改,报告阻塞;不要写成“未复现” |
|
|
64
|
+
| 实际问题不同 | 真实复现暴露了不同症状、范围或根因 | 以证据重述问题;范围实质变化时先行对齐 |
|
|
65
|
+
|
|
66
|
+
低频不自动等于边界情形。只要受支持的真实用户可以从正常入口触发,即使概率低,也属于有效问题。反过来,一旦契约和真实入口已经证明某情形不可达,就不要继续扩大输入空间来制造复现。
|
|
67
|
+
|
|
68
|
+
### 4. 只修复已证实的机制
|
|
69
|
+
|
|
70
|
+
改动必须直接对应复现证据和已定位机制,不顺手处理相邻推测、未复现风险或其它优先级问题。若同时拿到 P0、P1、P2,分别建立结论;若只拿到 P2,也按同一流程处理,不补造更高优先级任务。
|
|
71
|
+
|
|
72
|
+
### 5. 用同一真实场景验证修复
|
|
73
|
+
|
|
74
|
+
先原样重跑修复前的复现场景,确认实际症状消失且预期结果成立,再执行受影响路径的回归。静态检查、代码阅读或 mock 测试不能替代这一轮验证。
|
|
75
|
+
|
|
76
|
+
在 Runweave 仓库修改代码后,必须组合使用 `$toolkit:runweave-change-validation`。向它交接 `validationSessionId`、`scenarioId`、修复前 revision、原样复现步骤和 `before/` 证据。由该技能基于真实 diff 和 Dev Session 决定修复后场景的 target profile、服务 ownership 和 CDP surface,并把修复证据写入同一证据根目录的 `after/`。不要手工启动 Backend/App Server、修改全局运行时或使用 ambient CDP 代替 Dev Session。
|
|
77
|
+
|
|
78
|
+
只有正确性问题已经解决且真实测量仍显示可优化空间时,才进入优化。优化后继续使用同一基线和规模比较,不用主观描述代替数字。
|
|
79
|
+
|
|
80
|
+
## 交付结果
|
|
81
|
+
|
|
82
|
+
按问题给出简洁、可审计的结果:
|
|
83
|
+
|
|
84
|
+
- 问题与原始优先级;
|
|
85
|
+
- 真实环境和复现步骤;
|
|
86
|
+
- 预期、实际与证据;
|
|
87
|
+
- 门槛结论;
|
|
88
|
+
- 是否修改代码及修改范围;
|
|
89
|
+
- 修复后同场景结果;
|
|
90
|
+
- `validationSessionId`、必要的 source session 映射,以及 Before/After 并列证据;
|
|
91
|
+
- 未处理原因或环境阻塞。
|
|
92
|
+
|
|
93
|
+
不要把“尝试修复”“理论上修复”或“测试应该通过”写成完成。没有真实复现,就没有修复。
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review-only
|
|
3
|
+
description: 当识别到用户想要做评审(计划评审或代码评审)、只评审不改代码时使用。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 仅评审
|
|
7
|
+
|
|
8
|
+
只评审,不改代码。先判断评审对象是「计划」还是「代码」,切换到对应角色。
|
|
9
|
+
|
|
10
|
+
## 触发与约束
|
|
11
|
+
|
|
12
|
+
- 识别到用户的评审意图时即可使用(无需用户点名技能名)。
|
|
13
|
+
- 只读:不编辑被评审的源码、配置、测试、文档,不做格式化/代码生成,不改 git 状态。
|
|
14
|
+
- 默认只在对话中回复;需要归档时,唯一允许的写操作是按下方规则保存评审报告。
|
|
15
|
+
- 不用「顺手实现」代替评审结论。
|
|
16
|
+
- 下结论前,用阅读/命令验证可疑点,基于证据而非猜测。
|
|
17
|
+
|
|
18
|
+
## 角色判定
|
|
19
|
+
|
|
20
|
+
- 评审对象是设计文档、方案、计划、RFC、PRD → 用 **计划评审**。
|
|
21
|
+
- 评审对象是源码、diff、PR、配置/脚本 → 用 **代码评审**。
|
|
22
|
+
- 二者混合时分别评审,结论里分两部分。
|
|
23
|
+
|
|
24
|
+
## 计划评审(重点:方案是否成立)
|
|
25
|
+
|
|
26
|
+
判断这个计划该不该这么做,而不是抠措辞。关注:
|
|
27
|
+
|
|
28
|
+
- 问题定义:解决的是不是真问题?目标和成功标准是否清晰。
|
|
29
|
+
- 方案合理性:路径能否达成目标,关键假设是否站得住。
|
|
30
|
+
- 更简方案:是否有更简单或复用现有平台/能力的做法(自研 vs 复用)。
|
|
31
|
+
- 可行性与风险:工作量、依赖、迁移/回滚、未覆盖的边界。
|
|
32
|
+
- 缺口:被忽略的关键场景、监控、运维、成本。
|
|
33
|
+
|
|
34
|
+
至少给出一个「更简单或复用现有能力」的替代方向并对比权衡。
|
|
35
|
+
|
|
36
|
+
## 代码评审(重点:全维度)
|
|
37
|
+
|
|
38
|
+
按需覆盖以下维度,只报有真实风险的问题:
|
|
39
|
+
|
|
40
|
+
- 正确性与回归:逻辑错误、边界、并发、错误处理、副作用。
|
|
41
|
+
- 架构与边界:耦合/内聚、分层、契约/协议变更的影响面。
|
|
42
|
+
- 安全:鉴权、注入、敏感信息、输入校验。
|
|
43
|
+
- 性能:明显的复杂度、N+1、资源泄漏。
|
|
44
|
+
- 测试:关键路径覆盖盲区。
|
|
45
|
+
- 可维护性:可读性、命名、归属清晰度;以及「能否删掉而非新增」。
|
|
46
|
+
|
|
47
|
+
## 输出格式
|
|
48
|
+
|
|
49
|
+
按严重级别排序输出,简洁直接。每条一行核心 + 必要细节:
|
|
50
|
+
|
|
51
|
+
- **P0 阻断**:必须改,否则不可上线(数据/安全/线上故障/方案根本性错误)。
|
|
52
|
+
- **P1 严重**:应尽快改(正确性缺陷、重大回归风险、架构错误方向)。
|
|
53
|
+
- **P2 一般**:建议改(可维护性、次要风险、更优方案)。
|
|
54
|
+
- **P3 提示**:可选优化、风格、待确认项。
|
|
55
|
+
|
|
56
|
+
每条发现包含:
|
|
57
|
+
|
|
58
|
+
- 一句话标题
|
|
59
|
+
- 为什么是风险(影响)
|
|
60
|
+
- `文件:行号` 定位(计划评审引用章节)
|
|
61
|
+
- 修复方向(不实现)
|
|
62
|
+
|
|
63
|
+
无重大问题时明确说明,并列出残余风险/待确认项。
|
|
64
|
+
|
|
65
|
+
## 按需归档
|
|
66
|
+
|
|
67
|
+
- 普通评审直接在对话中给出结论、证据和建议,不创建报告文件,也不额外询问是否留档。
|
|
68
|
+
- 仅当用户要求留档,或已约定的正式交付、交接需要报告文件时,保存 Markdown 报告。
|
|
69
|
+
- 保存位置优先遵循用户指定路径;未指定时使用 `docs/review/YYYY-MM-DD-<主题>.review.md`,仅在需要保存时创建目录。主题用小写连字符;同名不覆盖,加递增后缀。
|
|
70
|
+
- 保存的报告与回复结论一致,可补充检查范围、命令输出摘要和残余风险;实际保存后,最终回复给出报告路径。
|
|
71
|
+
|
|
72
|
+
!!! 必须用中文回复
|