Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
lov-runtime-verification【部署与运维】Verify client runtime fixes on actual desktop builds, physical iOS/Android devices, React Native/Flutter hosts, and deployed Web/PWA browsers with comparable workloads and lifecycle checks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
验证具体客户端 App 的修复是否在真实宿主链路中减少了目标工作,同时保留正确性、恢复语义和用户体验。把源码边界、项目门禁、内部工作量、运行时指标、用户体验和宿主生命周期分别报告;缺少同负载前后对照时诚实停在较低终态。
lov-runtime-audit 建立证据。invocation: kit_only。本模块不能作为自带全部依赖的 standalone Skill 调用。KIT_DIR 必须解析为含 kit.yaml 的 App Optimizer Kit 根目录;SKILL_DIR 只指当前 skills/runtime-verification 模块。$KIT_DIR/references/* 与 $KIT_DIR/scripts/* 读取,不复制、不猜测本地替代物。$KIT_DIR/references/evidence-contract.md、$KIT_DIR/references/runtime-playbook.md、$KIT_DIR/references/platform-adapters.md、$KIT_DIR/scripts/evidence_report.py 和 $KIT_DIR/scripts/profile_store.py;缺失时输出 blocked 并列出缺口。app-runtime-evidence/v1;旧的 Electron 专用 schema 只能作为待迁移输入,不能作为新报告格式。要求至少提供或现场解析:
platform_family、runtime、App/version/build/commit、构建模式和发布渠道;框架与宿主分开记录,例如 mobile + react-native + ios、mobile + flutter + android。只有补丁和测试、没有实际 patched runtime 时,最高只能是 implemented_not_runtime_verified。已有部分真实运行证据但关键体验 A/B、目标生命周期或生产观察缺失时,最高只能是 partially_verified。
必须交付一个验收包,至少包含:
app-runtime-evidence/v1 scope,含 platform family、framework/runtime、OS、hardware/browser、build identity 与宿主模式;测试数量、编译成功、安装成功、页面可打开或一次低 CPU 截图都不能单独构成性能验收。
| Platform family | Runtime examples | Actual target required | Lifecycle seams to select from |
|---|---|---|---|
desktop | Electron、Tauri、macOS/Windows/Linux native | 实际 dev/package build,核对 executable、process tree、cwd/version/commit;含 WebView 时同时固定 engine 版本 | cold/warm launch、window create/hide/show/close/reopen、background、sleep/wake、crash/relaunch、update |
mobile | iOS/Android native、React Native、Flutter | 签名产物安装到目标物理设备,记录 device model、OS、artifact/build、native host 与 JS/Dart engine | install/upgrade、foreground/background、suspend/resume、memory pressure、OS process death、relaunch、offline/online |
web | 浏览器 Web App、PWA | 实际 deployed URL、浏览器/version/profile、deployment/build ID;PWA 还需固定 service worker 与 install mode | cold/warm navigation、route change、visible/hidden/frozen/restored、service-worker install/activate/update、cache cold/warm、offline/online、browser restart |
只测试与修复相关且预先声明的 seams,但不得用模拟器、headless-only 结果或另一个浏览器替代声称覆盖的真实 device/browser。模拟器、emulator 和 headless browser 可以作为补充回归门,必须单独标注。
inference / code-derived upper bound;与 runtime telemetry 对照时使用 comparison.quality=directional。只有两侧都是同定义的精确配置边界时才使用 implementation_bound。measurement。只有与预先声明阈值和可比 baseline 配对后,才可另立 acceptance 记录。verification_gates,不放入性能 observation。每次调用先读取 skill.yaml 声明的 user-profile/v1。按“当前验收请求 → 本次 baseline 与 patched target → skills.lov-runtime-verification.records → shared preferences → shared user/brand → 无通过结论的保守默认值”解析冲突。
只有用户直接声明并要求跨会话沿用的 acceptance budget、reference workload 或 report detail,才可通过 $KIT_DIR/scripts/profile_store.py 写入 records.<field>。写入必须带 --confirm 并回报 profile path。不得持久化现场 PID、设备标识、私有路径、遥测原文、凭据、临时 commit 或未经确认的阈值。完整契约见 $KIT_DIR/references/user-profile.md。
必须按顺序执行;先冻结身份、比较与生命周期契约,再采集 after,不得事后改口径迎合结果。
KIT_DIR 与 SKILL_DIR,读取共享 evidence contract、runtime playbook 与 $KIT_DIR/references/platform-adapters.md;涉及资源回收时再读取 reclamation policy。lov-runtime-verification Profile。platform_family、runtime、native host/engine、目标 OS/hardware/browser、artifact/deployment 与权限。对每个指标预先写明:
paired、implementation_bound 或 directional;报告器再生成对应的 paired_observation、implementation_bound 或 directional_evidence,异质证据使用 directional。不满足同口径的指标标为 contextual,不生成百分比。
verification_gates,不得写成 runtime acceptance。$KIT_DIR/scripts/evidence_report.py 归一化证据;异质 evidence 只写方向性支持,不计算虚假精确 delta。verified:真实目标上,同负载 user/runtime 与 internal-work 指标达到预设阈值,正确性和相关宿主生命周期门均通过。partially_verified:真实目标已有关键方向证据,但体验 A/B、目标生命周期、production observation 或另一热点仍缺失。implemented_not_runtime_verified:代码和门禁通过,但没有可比 live before/after。blocked:无法确认 patched build/device/browser、baseline、权限或权威 sampler。先给结论,再列通过证据、不可比项、残余风险和下一项最有判别力的测量。
Yoda 只是首个校准案例,不是其他 App 的默认规模或阈值:
platform_family=desktop,runtime=electron,目标为 Yoda desktop。measurement:8 remotes 的一个 post-fix 周期内,600 个高频进程样本观察到 15 个 unique Git subprocess;窗口约 4 秒,peak concurrency 为 5。它是运行时测量,不是 acceptance。code-derived upper bound:inventory 显示 916 条 task records、其中 33 条 active;结合修复前全量与修复后 active-only hydration 代码路径,只能推导初始 hydration eligibility 上界从 916 收敛到 33。它不是 resident TaskStore telemetry,输入使用 comparison.quality=directional,报告不计算精确下降率。verification gate:完整门禁含 3,115 tests;它证明 correctness,不证明用户体验或 runtime 性能。evidence gap:没有正式的同负载、同 build mode、同窗口和同 sampler inputLatency/RSS before/after A/B。partially_verified。下一项测量是在相同 8-remotes 周期和稳定 build 上补齐 inputLatency、event-loop 与 main/renderer RSS A/B。$KIT_DIR contracts、Profile helper 与 evidence reporter。$KIT_DIR/references/evidence-contract.md — app-runtime-evidence/v1、provenance、comparison 与 observation 契约。$KIT_DIR/references/runtime-playbook.md — 跨 desktop/mobile/web 的身份核验、同负载复测和终态规则。$KIT_DIR/references/platform-adapters.md — Electron/Tauri/native desktop、iOS/Android/RN/Flutter 与 Web/PWA 的采样和宿主 adapter。$KIT_DIR/references/reclamation-policy.md — lifecycle 回收变更的保护与恢复边界。$KIT_DIR/references/user-profile.md — Profile 读取与持久化规则。