neko-quality-review
Use after non-trivial code changes in Neko Suite, when reviewing PRs, or when asked to run a repository quality review. Applies the Neko code review and quality gates ADR to classify risk, inspect architecture boundaries, choose validation commands, and produce review findings with verification and residual risk.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-07-16
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- neko-quality-review
- description
- Use after non-trivial code changes in Neko Suite, when reviewing PRs, or when asked to run a repository quality review. Applies the Neko code review and quality gates ADR to classify risk, inspect architecture boundaries, choose validation commands, and produce review findings with verification and residual risk.
03 SKILL.md 正文
Neko Quality Review
Use this skill after implementing or modifying code in this repository, and whenever the user asks for code review, quality review, PR readiness, CI readiness, UX/performance review, or architecture gate checks.
Source of truth:
docs/architecture/adr-code-review-quality-gates.mdAGENTS.mdARCHITECTURE_CN.mdCONTRIBUTING_CN.md/CONTRIBUTING.md
Workflow
-
Inspect the change set:
git diff --name-only git diff --stat -
Classify risk:
L0: docs, copy, low-risk single-file fix.L1: local component, hook, service, or state logic.L2: Webview/Extension messaging, shared packages,EngineClient, imports/exports, public types.L3: Rust engine, Proto, media streams, rendering, project formats, AI workflow, packaging.L4: release, install/packaging, major UX, core creative workflow.
-
Review architecture before implementation details:
- Does it fit the existing architecture?
- How does it reduce coupling?
- Is it easy to extend and test?
- Is the complexity proportional to a local VSCode client plus local Rust Engine?
- Does defensive code protect real boundaries instead of hiding development errors?
- Do code defects and contract violations fail visibly instead of falling back, defaulting, or no-oping?
-
For multi-module changes or new functionality, apply the five-layer analysis:
- Responsibility: who owns data, behavior, and lifecycle?
- Dependency: are L0/L1/L2 and Webview/Extension/Rust boundaries respected?
- Interface: are types, messages, schemas, and Proto contracts minimal and stable?
- Extension: will the next similar feature avoid broad edits or duplication?
- Testing: what is covered by unit, integration, CLI smoke, Webview runtime smoke, VSCode debugger Skill smoke, or explicit residual risk?
-
Run or recommend validation by impact:
pnpm ci:localFor Rust changes:
pnpm ci:local:rustFor Proto changes:
pnpm ci:local:protoIf a narrower package command is enough, prefer the smallest reliable command and state why.
For residual/debt and redundancy checks:
pnpm check:legacy-debt pnpm check:unusedFor integration smoke checks:
pnpm smoke:engine pnpm smoke:webview pnpm smoke:webview:runtimeFor Agent Evaluation platform, scenario, debug automation protocol, or exported fact-contract changes, run the key-free harness gate documented by the platform. This is not real Agent behavior acceptance. If the change can alter prompt or Skill behavior, capability/tool registration or routing, provider/model selection, AgentSession multi-turn/queue/async/recovery behavior, or TUI Agent event projection, use
neko-agent-evaluationto produce focused path-level evidence. Review the recorded blocking condition and residual risk when a real case could not run. Do not infer that scenario assertions passed unless the current runner executed an evaluator for them.For Extension Webview visual, layout, interaction, focus, CSP, media preview, or lifecycle changes, use
pnpm smoke:webview:runtimeor an equivalentvscode-extension-debuggerSkill run. Do not use Chrome, the generic Browser plugin, Playwright, or a Vite localhost page as the default validation path unless the user explicitly asks for browser-compatibility testing.Treat VS Code container-level Webview warnings as known benign runtime noise when the stack points to VS Code Workbench
webviewElement/overlayWebviewcreation, especially:Unrecognized feature: 'local-network-access' An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.These warnings are not Neko Webview HTML/CSP/media/save failures. Continue investigating Neko logger output, CSP violations,
preview:*,media:*, Engine file-access,Failed to save NK*, or project-file-io diagnostics.
Review Checklist
Always check:
- No new production
any, unsafeas Type, or formal logging viaconsole.log. - No circular dependency or broken layer direction.
- No overdesign for the local-client/local-engine product boundary: avoid speculative interfaces, factories, registries, strategies, plugin hooks, feature flags, config layers, protocol layers, or generic platform scaffolding without a current caller, real external provider, release, or trust boundary.
- No overdefense that hides defects: broad
try/catch, silent defaults, fallback success, repeated validation, no-op guards, retries, caches, or circuit-breaker-style logic must protect a real VSCode/Webview, local file, Engine process, media, external provider, user-data, release, or security boundary and fail visibly for development errors. - Fail-visible defect handling is enforced: missing new implementations, contract mismatches, unreachable states, illegal messages, unknown schema/version values, bad configuration, missing dependencies, or unregistered handlers/renderers/adapters throw, return typed diagnostics, or fail tests visibly instead of returning empty data, success defaults, no-ops, silent degradation, or old compatibility behavior.
- Webview code does not import
vscode. - Extension host code does not import React/ReactDOM.
- TypeScript does not duplicate Rust engine authoritative computation.
- Paths are relative or
${VAR}/path, not hard-coded absolute paths. - File/document/media/model/thumbnail/preview/proxy/import/export/transfer changes use the owning shared boundary: content access, resource cache, local resource access, EngineClient/file access, path resolver, ingest, or project-file service. Feature packages provide provider/adapter/domain semantics; they do not create package-local cache managers, path resolvers, Webview URI projectors, Engine file-token policies, or cache manifest readers.
- Cache is transparent and rebuildable: business logic, Agent tools, Webviews, Canvas nodes, Storyboard rows, composite artifacts, clipboard payloads, and cross-plugin transfer payloads must not use
.neko/.cachelayout, cache manifests, materialized cache paths,cachePath,runtimePath,cacheResourceRef, Webview URI, blob/object URL, Engine token, preview token, or scratch/temp paths as durable identity. - Webview-safe URIs are produced only by
LocalResourceAccessServiceorResourceCacheService.project()after authorization. Projection failure returns typed diagnostics, omits renderable projection, or fails closed; it does not fall back to raw local/cache/source paths. - Content-path acceptance is path-level acceptance: tests should assert the canonical service/provider/message/adapter was hit and prove direct fs reads, cache-path lookup, legacy field fallback, package-local path conversion, or Webview URI fallback did not produce a successful result.
- Async flows handle errors, cancellation, resource disposal, and races.
- Public contracts include tests or clear validation evidence.
- Residual/debt terms are scanned and classified:
legacy,fallback,deprecated,compat,shim,dirty,hack,temporary,workaround,dead code,unused, andduplicate. New matches are removed, renamed, or recorded in the appropriate debt ledger with owner, replacement, validation, and removal criteria. - Redundant code is checked within the package and across adjacent packages: unused exports/files, duplicated helpers, repeated adapters, repeated protocol/message handlers, duplicated components, copied tests, and package-local implementations that should be shared.
- Cross-cutting behavior includes shared foundation audit evidence: style/theme/i18n/logger/error/config/path/file IO/resource/cache/DTO changes reused or updated
@neko/shared,@neko/ui,@neko/neko-client,@neko/proto, entity/search services, project-file-io, resource cache, or a domain service before adding package-local logic. - No package-local parallel design system, theme token set, i18n runtime, logger/error taxonomy, project file IO, cache manager, path resolver, Engine HTTP/WS client, or shared DTO copy unless the owning boundary, extraction criteria, and validation command are documented.
- Reusable package capability patterns include cross-package reuse audit evidence: checked adjacent packages and shared layers for providers, registries, bridges, protocols, message routers, status bars, tree views, file decorations, history, selection, recent items, projectors, facades, command routers, capability providers, store slices, workflow adapters, or reusable tests before adding package-local capability code.
- No copied implementation from another feature package and no direct import of another feature package's internals; reuse goes through shared packages, public subpaths, command/API facades, ports, provider registries, or domain services.
- New Webview/React components include component reuse audit evidence: checked
@neko/ui, owning-package components/hooks/shared modules, adjacent domains, and tests; explained why enhancing an existing component would be unsafe or too coupled. - Prelaunch breaking changes identify what breaks, the old-data strategy, and why compatibility shims are removed. New canonical paths delete or isolate legacy adapters, fallback branches, dual-read/dual-write paths, old field mappings, and legacy command aliases unless they protect valuable data or published/trust boundaries.
- Prelaunch refactors enforce cleanup order inside the scoped replacement boundary: old successful call chains are disconnected, deleted, isolated, or fail-closed before the new design/contract is wired and accepted.
- Review does not reward continued old-path bug fixing when the selected replacement boundary should already be moving to the new canonical path.
- Development and validation defaults disable compatibility fallback for new paths. A legacy-path hit during new-path development or validation must throw, return a fail-closed diagnostic, or emit assertable telemetry/log failure instead of returning a legacy success result.
- Only migration, rejection, or diagnostic tests may intentionally observe retained legacy paths; new-path acceptance tests must assert that retained legacy paths cannot return success or mask new-path failure.
- New-path acceptance is path-level acceptance, not result-only acceptance. Tests must assert the canonical path, new handler, new renderer, new adapter, or new contract was hit, and prove retained legacy paths did not participate with a spy, counter, log assertion, or poisoned legacy path that throws.
- Retained compatibility paths have owner, replacement, validation command, removal condition, expiry task, and tests proving they cannot mask new-path failure.
- Docs are updated when behavior, architecture, config, package entry points, or public contracts change.
Add domain checks as needed:
- Webview/UX: component reuse audit, layout, theme, focus, keyboard, i18n, and runtime evidence from
pnpm smoke:webview:runtimeor an equivalent VS Code debugger Skill run; Chrome/Browser/Playwright screenshots do not count as default VS Code Webview acceptance evidence. - Engine/media:
cargo test, CLI smoke,serveintegration, performance before/after when relevant. - Proto/shared: generated types are synchronized and callers are migrated.
- Agent/AI: tool contracts, permissions, Journal/traceability, failure recovery, and whether the change triggers
neko-agent-evaluation. When triggered, check focused canonical-path evidence, forbidden-fallback evidence, assertion support in the current runner, and either a real TUI debug automation result or an explicit blocking condition with residual risk. Protocol-only, mock-only, or final-text-only results do not count as Agent behavior acceptance. - Content access/cache/path: intent-aware access, transparent resource cache, path variable resolution, Engine-backed binary/media reads, Host text/project-file reads, authorized Webview projection, and stable
ResourceRef/source-ref transfer. - Assets/market: manifest/schema compatibility, path safety, cache invalidation, trust boundaries.
Output Format
For review findings, lead with issues:
Findings
- Blocking: [file:line] Problem. Impact. Suggested fix.
- Suggestion: [file:line] Problem. Impact. Suggested fix.
Verification
- Ran: ...
- Not run: ... (reason)
Residual Risk
- ...
If there are no findings, say so clearly and still report test gaps or residual risk.
For post-implementation self-review, summarize:
- Risk level and affected areas.
- Key architecture/contract decisions.
- Validation performed.
- Remaining follow-up, especially engine CLI smoke,
serveintegration, Webview runtime smoke, UX evidence, or performance baselines.
04 同仓库更多 Skills
vscode-extension-debugger
This skill enables debugging VS Code extensions and their webviews through Chrome DevTools Protocol (CDP). It should be used when: - Debugging VS Code extension webviews (custom editors, panels, sidebars) - Inspecting DOM structure of extension webviews - Taking screenshots of VS Code windows or webviews - Executing JavaScript in extension webviews - Monitoring console output from extensions Triggers on: "debug extension", "inspect webview", "extension screenshot", "webview DOM", "VS Code debugging"
review
Review functional Home artifacts.
eval-existing-target-skill
暂无简介
evaluation-artifact-author
Author a deterministic portable Skill package when the user requests evaluation artifact evidence.
openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.