feat: enhance classic and native dashboard performance and layout support - #263
Conversation
…ize tests Native verify now reports a structured verification-receipt-binding-mismatch finding naming each stale receipt, its acceptance, and the diverging field instead of an opaque 'binding is invalid' error, and adds 'comet native receipt refresh --apply' to re-issue stale manual receipts at the current revision in one step. Also aligns the Classic layout test with the beta.13 root-reuse behavior, fixes the Classic 0.3.9 differential contract on Windows path separators, and hardens the shared CLI build lock under parallel test fan-out.
…nd dashboard cleanup - fix(update): restore default `comet update` to upgrade the Comet package alongside assets; the package self-update had been silently skipped for every invocation unless --self-update was passed, breaking the documented update contract - fix(cli): validate --port range at parse time so out-of-range values report the correct message immediately instead of failing later with a misleading error - fix(update): keep Superpowers status/reason consistent so an 'installed' result no longer carries a '...skipped' reason from leftover plugin-managed targets - refactor(dashboard): remove ~299 lines of dead pre-Antd components (Sidebar, WorkflowSwitch, SunIcon, MoonIcon, SummaryCards, SummaryCard, ChangesExplorer, ChangeCard, ChangeDetail) superseded by their Ant variants - refactor(dashboard): drop redundant inspectProtectedProjectPath calls in collector.ts - fix(dashboard): clamp archived Native acceptance 'missing' count at zero to avoid negative values from legacy evidence envelopes - refactor(native): drop unused NativeReadableVerificationEvidenceEnvelope import - test: update affected update.test.ts and web-source.test.ts assertions to match the restored/fixed behavior
Rewrite the beta.13 entry from a commit-log translation into a release-facing view measured against the 0.4.0-beta.12 tag. - Remove the self-update regression entry: beta.12 shipped the correct behavior and the regression was introduced and fixed within this branch, so an upgrading user would never observe it. - Condense granular dashboard follow-ups (discovery, workflow, empty state, evidence previews, archived coverage) into compact user-facing descriptions. - Keep #256/#257 and port validation as real fixes for issues present in beta.12, and keep receipt refresh + Antd workbench as genuine new capabilities confirmed absent from beta.12.
Add a process-local read cache (platform/process/hook-read-cache.ts) that the hook-router entry activates for the duration of one Hook decision. The router and the delegated Classic/Native Guard then share one read of the project config, current selection, active-change enumeration, and git branch probe instead of each re-opening the same files and re-forking git. Also extends the cache to the Ambient Resume probe so config and project-root discovery run once per invocation instead of 2-3 times across entry resolution and per-workflow probing. Closes #239
CLI: every command handler is now imported inside its `.action()` instead of at module load, so running `comet status` no longer pulls in the dashboard, eval, creator, bundle, and @inquirer/prompts modules. `comet --version` cold start drops from ~435ms to ~85ms. Version reading is also memoized lazily so importing the CLI no longer opens package.json at load. Classic runtime: each command launcher (comet-state, comet-guard, …) is now a self-contained esbuild bundle built from its own entry instead of a thin forwarder to a single 707KB shared runtime, so running one command only loads that command's dependency graph. comet-hook-guard cold start drops ~25%. Closes #239
Adds scripts/benchmark/runtime-coldstart-benchmark.mjs to measure Node cold-start latency for the high-frequency entry points (hook-router, classic launchers, native runtime, CLI). Supports --record (write baseline) and --check (regression detection at +30%). Baseline file is gitignored as machine-specific. Documents the performance improvements in the 0.4.0-beta.13 changelog. Closes #239
Native content snapshots no longer re-hash the entire project source tree on every receipt, check, and archive operation. Each snapshot now records the Git blob object id of tracked files alongside their Comet hash; subsequent snapshots reuse the baseline hash for files whose Git object id is unchanged and whose working-tree content is not modified (detected via git ls-files --modified), re-hashing only the files that actually changed. The resulting snapshot projection is byte-for-byte identical to a full scan (same entries => same projection hash => same receipt binding). A change that touches 3 files out of 10000 now hashes 3 files instead of 10000. Legacy baselines without the recorded object id and non-Git projects fall back to the full-scan path unchanged. Closes #239
…y all runtimes Bundle size and cold-start were dominated by loading the full Native domain (hook-guard, archive, check, receipt, doctor, ...) on every invocation, even though each command only needs its own dependency graph. This mirrors the Classic per-command split and enables esbuild minify across all three runtime families. - Extract shared CLI helpers (arg parsing, errorResult, render, USAGE) into native-cli-shared.ts so every command handler shares one implementation - Split the 600-line native-cli.ts dispatch chain into 15 independent handler modules, each importing only the domain code it needs - Rewrite native-cli.ts as a thin handler lookup table; runNativeCli keeps its public signature so the CLI facade and existing tests are unchanged - Add native-script-entry.ts (mirrors classic-script-entry.ts) plus 15 thin per-command entry files, and register them in repository-layout.json - Rebuild build-native-runtime.mjs to iterate entries like the Classic builder, producing one self-contained bundle per command - Enable minify:true in all three build scripts (classic/native/entry) Results (minified, on this machine): - comet-native-hook-guard.mjs: 1.2MB (via shared runtime) -> 182KB (-85%) - comet-native-runtime.mjs: 1.2MB -> 641KB (-48%) - comet-hook-router.mjs: 446KB -> 211KB (-53%) - native hook-guard cold start: 126ms -> 105ms (-17%)
Classic Changes Explorer status tags used a single undifferentiated Ant Tag, so 待验证 and 验证失败 looked identical. Swap the list-row and detail-header tags for the existing Pill with VERIFY_TONE so they match the Native panel: pending=amber, failed=red, passed=green, archived/unknown=neutral.
…docs The `comet native` / `comet state` CLI shell pays commander registration and module-loading overhead (~150ms) on every call, while the per-command bundles (comet-native-*.mjs / comet-*.mjs) skip that layer entirely. Update all skill documents to instruct agents to invoke bundles directly via cached $COMET_* path variables, keeping the CLI as a fallback. Native (new bootstrap): - Add a Script bootstrap section to comet-native SKILL.md that locates the scripts dir once and caches $COMET_NATIVE_SCRIPTS_DIR - Convert all `comet native <cmd>` references across SKILL.md, commands.md, artifacts.md, recovery.md to `node "$COMET_NATIVE_SCRIPTS_DIR/comet-native-<cmd>.mjs"` Classic (reverse existing bootstrap priority): - Rewrite comet/reference/scripts.md to promote direct bundle invocation as the everyday default instead of "legacy/recovery only" - Convert `comet state/guard/handoff/archive` references across 8 classic skills (classic, open, design, build, verify, archive, hotfix, tweak), phase-guard rules, and reference docs to `node "$COMET_STATE/GUARD/..."` - Sync all changes to assets/skills-zh/ (Chinese mirrors) Each language: 40 native + 156-182 classic command references converted. Arguments are identical to the CLI subcommands (only the leading keyword differs), so no behavioral change — only which entry point the agent loads.
There was a problem hiding this comment.
Sorry @benym, your pull request is larger than the review limit of 150000 diff characters
|
👋 Thanks for opening your first PR to Comet, @benym. Before review, please make sure the PR title follows Conventional Commits, for example 🧪 The most useful local checks are: pnpm build
pnpm lint
pnpm format:check
pnpm test🧰 If your change touches ✨ We appreciate the contribution and will take a look as soon as we can. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThe release updates runtime bundling, lazy CLI loading, workflow lifecycle operations, Native receipt and snapshot handling, Dashboard discovery and UI, public CLI guidance, tests, benchmarks, and release metadata. ChangesRuntime, workflow, Native, and Dashboard updates
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile Summary此 PR 重构 Dashboard 的布局、主题和项目发现能力,并扩展选择性 workflow 卸载、Native receipt 刷新及自包含 Runtime 命令。
Confidence Score: 5/5当前修订已解决两个既有问题,未发现仍会阻止合并的故障。 公开 Skill 引导不再搜索或执行工作区 bundle,卸载流程也会跨目标计算仍保留的 workflow,从而避免删除其他目标继续使用的状态、配置和共享资产;没有阻塞性故障仍然存在。
|
| Filename | Overview |
|---|---|
| assets/skills/comet/reference/scripts.md | 改为仅使用公开 CLI,并明确禁止搜索 Skill 路径或直接执行内部 bundle,已消除先前报告的不可信回退执行路径。 |
| app/commands/uninstall.ts | 新增跨目标 workflow 保留状态汇总,混合卸载选择不再误触发项目级完整清理。 |
| domains/skill/uninstall.ts | 清理辅助函数支持按 workflow 删除工作目录和托管 Skills,调用语义与上层汇总结果一致。 |
| domains/dashboard/web/src/main.jsx | Dashboard 前端升级为支持项目切换、workflow 导航和响应式详情展示的工作区布局。 |
| domains/comet-native/native-receipt-refresh.ts | 增加 Native verification receipt 的预览与受控刷新能力。 |
Reviews (11): Last reviewed commit: "test(native): improve PR patch coverage" | Re-trigger Greptile
Reviewer's GuideRefreshes the Comet dashboard UI and theme, refactors dashboard components to Ant Design, and extends uninstall behavior and tests to support per-workflow/native/classic skill removal and Superpowers skills cleanup. Sequence diagram for native verification evidence inspection with receipt binding mismatch handlingsequenceDiagram
actor Agent
participant inspectNativeVerificationEvidence
participant validateCurrentReceiptGraph
participant validateTypedReceipt
participant compareNativeReceiptBindings
participant NativeVerificationReceiptBindingError
Agent->>inspectNativeVerificationEvidence: inspectNativeVerificationEvidence(options)
inspectNativeVerificationEvidence->>validateCurrentReceiptGraph: validateCurrentReceiptGraph(paths,state,result,...)
loop for each requiredReceiptRef
validateCurrentReceiptGraph->>validateTypedReceipt: validateTypedReceipt(ref,role,expectedBindings,...)
validateTypedReceipt->>compareNativeReceiptBindings: compareNativeReceiptBindings(receipt,expectedBindings)
compareNativeReceiptBindings-->>validateTypedReceipt: mismatches
alt binding or role or acceptanceId mismatch
validateTypedReceipt-->>NativeVerificationReceiptBindingError: throw NativeVerificationReceiptBindingError(details)
validateCurrentReceiptGraph-->>validateCurrentReceiptGraph: collect failures
else valid receipt
validateTypedReceipt-->>validateCurrentReceiptGraph: receipt
end
end
alt collectedFailures not empty
validateCurrentReceiptGraph-->>NativeVerificationReceiptBindingError: throw NativeVerificationReceiptBindingError(collectedFailures)
inspectNativeVerificationEvidence-->>inspectNativeVerificationEvidence: catch NativeVerificationReceiptBindingError
inspectNativeVerificationEvidence-->>Agent: NativeVerificationPreparation {ready:false,findingCodes:['verification-receipt-binding-mismatch'],receiptBindingFailures}
else graph valid
validateCurrentReceiptGraph-->>inspectNativeVerificationEvidence: ok
inspectNativeVerificationEvidence-->>Agent: NativeVerificationPreparation {ready:true,...}
end
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Actionable comments posted: 19
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
domains/comet-native/native-snapshot.ts (1)
2982-3019: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift最终探测未复核本次新绑定的
gitObjectId。第 2986 行在
workingTreeModified不含该路径时把 index 的 objectId 绑定到从磁盘读取的 hash 上。workingTreeModified只在捕获开始前探测一次。如果文件在该探测之后、fs.lstat(target)之前被改成未 staged 的内容,captureFile的 before/after stat 比较不会发现变化,于是 entry 记录的是工作区内容 hash,但携带的是 index objectId。该错误绑定会在后续快照中造成错误复用:当用户把工作区恢复为 index 内容后,该文件不再出现在
git ls-files --modified中,且 objectId 与 baseline 一致,于是第 2977 行会复用一个属于脏内容的 hash,导致内容变更被判定为“未变更”。第 2997-3019 行的最终探测只复核
reusedTrackedPaths。建议同时复核本次新绑定 objectId 的条目:如果最终 modified 集合包含它们,删除其gitObjectId字段(保留 hash 与 entry,不需要作废)。🐛 建议修复
+ const boundObjectIdPaths = new Set<string>(); for (const relative of selectionPaths(gitSelection)) { @@ - await captureFile( - target, - relative, - before, - gitObjectIdsTrusted && !workingTreeModified.has(relative) ? currentObjectId : undefined, - ); + const boundObjectId = + gitObjectIdsTrusted && !workingTreeModified.has(relative) ? currentObjectId : undefined; + await captureFile(target, relative, before, boundObjectId); + if (boundObjectId !== undefined) boundObjectIdPaths.add(relative); } @@ - if (reusedTrackedPaths.size > 0) { + if (reusedTrackedPaths.size > 0 || boundObjectIdPaths.size > 0) { @@ for (const relative of reusedTrackedPaths) { if (!finalWorkingTreeModified.has(relative)) continue; const entry = entries.find((candidate) => candidate.path === relative); invalidateCapturedEntry(relative, { path: relative, size: entry?.size ?? null, type: 'file', reason: 'changed-during-read', }); } + for (const relative of boundObjectIdPaths) { + if (!finalWorkingTreeModified.has(relative)) continue; + const entry = entries.find((candidate) => candidate.path === relative); + if (entry) delete entry.gitObjectId; + } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-snapshot.ts` around lines 2982 - 3019, Extend the final working-tree revalidation after revalidateCapturedEntries to also track entries newly bound to an index gitObjectId during this capture, not only reusedTrackedPaths. For each such entry whose path appears in finalWorkingTreeModified, remove its gitObjectId while preserving the captured hash and entry; keep the existing invalidation behavior for reusedTrackedPaths unchanged.
🟡 Minor comments (24)
assets/skills/comet-archive/SKILL.md-24-29 (1)
24-29: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win将入口说明与实际命令保持一致。
Line 24 仍要求使用稳定的
cometCLI,但 Lines 27-29 已改为直接调用 Node bundle。该说明会引导用户使用与本 Skill 不一致的入口。请改为使用scripts.md中解析出的 bundle 路径。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills/comet-archive/SKILL.md` around lines 24 - 29, Update the entry instructions in SKILL.md to consistently invoke the Node bundle path resolved from comet/reference/scripts.md instead of directing users to the stable comet CLI, while preserving the existing recovery check commands and flow.assets/skills/comet/reference/scripts.md-17-21 (1)
17-21: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win让 Bash 引导脚本的失败路径正确退出。
return 1只能用在函数或被source的脚本中。直接执行这段脚本时,Bash 会报告return: can only 'return' from a function or sourced script,然后继续执行并尝试用空的COMET_ENV调用 Node。明确说明需要 source 该脚本,或在独立脚本中改用exit 1。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills/comet/reference/scripts.md` around lines 17 - 21, Update the failure branch guarding COMET_ENV in the Bash bootstrap script: ensure the script is explicitly documented or structured for sourcing, or replace return 1 with exit 1 when it is intended to run directly, so execution stops before node "$COMET_ENV" is invoked.assets/skills/comet/reference/scripts.md-44-44 (1)
44-44: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win统一
comet-handoff-script的文档调用形式。
comet-handoff.mjs的实际命令必须为<change-name> design -- write [--full];当前参考文档缺少必要模式参数。
assets/skills/comet/reference/scripts.md#L44-L44改为node "<comet-handoff-script>" <change-name> design --write [...options]。assets/skills/comet/rules/comet-phase-guard.en.md#L67-L67和#L81-L81已使用design --write,无需修改。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills/comet/reference/scripts.md` at line 44, Update the comet-handoff-script invocation in assets/skills/comet/reference/scripts.md at line 44 to include the required design --write mode and preserve the optional [--full] argument. The existing design --write invocations in assets/skills/comet/rules/comet-phase-guard.en.md at lines 67 and 81 require no direct changes.test/app/uninstall.test.ts-2111-2114 (1)
2111-2114: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win验证
workflows列表也会删除已卸载的工作流。当前断言只验证
default_workflow和工作流配置节。若workflows列表仍保留已删除的工作流,测试仍会通过,但配置仍会声明该工作流已启用。
test/app/uninstall.test.ts#L2111-L2114: 断言 YAML 不再包含classic工作流列表项。test/app/uninstall.test.ts#L2163-L2166: 断言 YAML 不再包含native工作流列表项。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/app/uninstall.test.ts` around lines 2111 - 2114, Update the uninstall assertions in test/app/uninstall.test.ts at lines 2111-2114 and 2163-2166 to also verify that the YAML workflows list no longer contains the uninstalled classic and native workflow entries, respectively, while preserving the existing default_workflow and configuration-section assertions.test/domains/comet-classic/comet-scripts.test.ts-166-173 (1)
166-173: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win拒绝全部共享 Runtime 引用。
Line 173 只拒绝
from './comet-runtime.mjs'。副作用 import、双引号 import 或动态 import 仍可通过。由于 Line 169 要求该文件不存在,这类 bundle 会在运行时失败。检查 source 中是否包含
comet-runtime.mjs,而不是只检查一种 import 语法。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-classic/comet-scripts.test.ts` around lines 166 - 173, Update the source validation in the test around the Object.values(sources) loop to reject any occurrence of “comet-runtime.mjs”, regardless of import syntax or quoting, while preserving the existing shebang assertion and shared runtime existence check.test/domains/comet-classic/classic-layout.test.ts-122-134 (1)
122-134: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win验证备用根目录未被修改。
当前断言只验证返回的
docs/openspec路径。它不验证备用openspec/根目录保持不变。若实现创建、删除或修改备用根目录中的文件,此测试仍会通过。在调用前写入备用根目录的标记文件,并在调用后断言其内容未变。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-classic/classic-layout.test.ts` around lines 122 - 134, 增强测试“allows initialization to use its selected root without mutating an alternate root”,在调用 assertClassicLayoutWritable 前于备用 openspec 根目录写入标记文件,并在调用后断言该文件仍存在且内容未改变;保留现有对返回 artifactLayout 和 openSpecRoot 的断言。test/app/dashboard-command.test.ts-71-78 (1)
71-78: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win清理
captured的无用初始赋值。ESLint 报告 Line 72 的
let captured = '';是无用赋值。captured只在try块成功执行后才会被读取(Line 80)。如果dashboardCommand抛出异常,函数会直接向上抛出,不会读取captured的初始值。移除多余的初始化,避免 lint 报错。🧹 建议修复
const log = vi.spyOn(console, 'log').mockImplementation(() => undefined); - let captured = ''; + let captured: string; try { await dashboardCommand(nested, { json: true }); captured = log.mock.calls.map((call) => call.join(' ')).join('\n'); } finally { log.mockRestore(); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/app/dashboard-command.test.ts` around lines 71 - 78, Remove the unnecessary empty-string initializer from captured in the dashboardCommand test, while preserving its assignment after the successful dashboardCommand call and its later use.Source: Linters/SAST tools
test/domains/comet-classic/classic-contract.test.ts-177-179 (1)
177-179: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win将路径归一化限制在路径片段内。
normalizeOutput对整段捕获输出执行.replaceAll('\\', '/')。差异契约测试需要暴露 frozen 0.3.9 与当前 Runtime 的真实输出差异。如果输出包含非路径字面反斜杠,如错误信息、正则片段或转义内容,全局替换会覆盖真实差异并导致假阳性通过。将归一化限定为 Windows 路径片段更稳妥。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-classic/classic-contract.test.ts` around lines 177 - 179, 将 normalizeOutput 中针对整段输出的全局反斜杠替换改为仅归一化 Windows 路径片段;路径中的分隔符仍转换为 POSIX 形式,但错误信息、正则片段及其他非路径反斜杠必须保持原样,以保留 frozen 0.3.9 与当前 Runtime 的真实差异。test/domains/comet-native/native-receipt-refresh.test.ts-454-456 (1)
454-456: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win将空断言替换为对错误结构的实际校验。
expect(NativeVerificationReceiptBindingError).toBeDefined()只验证导入成功,不验证任何行为。改为断言NativeVerificationReceiptBindingError使用receiptBindingFailures构造后暴露details与摘要信息,可覆盖native-verification-runtime.ts中的诊断契约。💚 建议的修改
const failure = preparation.receiptBindingFailures![0]; expect(failure.mismatches.some((m) => m.includes('sourceRevision'))).toBe(true); - expect(NativeVerificationReceiptBindingError).toBeDefined(); + const error = new NativeVerificationReceiptBindingError(preparation.receiptBindingFailures!); + expect(error.details).toEqual(preparation.receiptBindingFailures); + expect(error.message).toContain(failure.ref);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-native/native-receipt-refresh.test.ts` around lines 454 - 456, Replace the import-existence assertion for NativeVerificationReceiptBindingError with behavioral checks that instantiate the error using preparation.receiptBindingFailures and verify its exposed details and summary information, while retaining the existing sourceRevision mismatch assertion.test/repository/repository-layout.test.ts-28-35 (1)
28-35: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win同步
nativeRuntime的 TS 映射契约。此测试已要求
nativeRuntime.entries.hookGuard和nativeRuntime.outputs.hookGuard,但platform/paths/repository-layout.ts仍只声明了runtime;而config/repository-layout.json已包含对应的 native hook guard 条目。在测试或运行时读取这两个路径前,补充类型契约即可。该检查不需要展开其他资产/测试,因为资产测试已覆盖
comet-native-hook-guard.mjs,且该脚本在assets/manifest.json中已被skills收录。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/repository/repository-layout.test.ts` around lines 28 - 35, 同步 nativeRuntime 的 TypeScript 映射契约:更新 platform/paths/repository-layout.ts 中 nativeRuntime 的类型声明,在 entries 和 outputs 中补充 hookGuard 字段,并与 config/repository-layout.json 及现有测试中的路径保持一致。Source: Coding guidelines
domains/comet-native/native-script-entry.ts-31-42 (1)
31-42: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win修正
--分隔符后的参数拼接方式。
commandTail = argv.slice(separator)会把字面量'--'保留在dispatchArgs中,后续requiredPositional(args, ...)会拒绝以--开头的值,导致显式包含分隔符的调用解析失败。使用argv.slice(separator + 1)只保留分隔符之后的参数。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-script-entry.ts` around lines 31 - 42, Update the commandTail construction in the native script entry flow to slice from separator + 1, excluding the literal -- delimiter while retaining all following arguments for dispatchArgs and positional parsing.domains/comet-native/native-continuation.ts-153-169 (1)
153-169: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win将 receipt refresh 限制为 verify 阶段,并补齐 archive 分支的测试覆盖。
refreshNativeVerificationReceipts只在state.phase === 'verify'时执行;非verify阶段会抛出Native receipt refresh requires Verify, got ...。该分支在archive判断前路由到comet native receipt refresh ... --apply,会使 archive 阶段中因refresh-verification-receipts触发的 continuation 先发出失败命令,然后从blocked / none变为continue / work-phase。将判断限定为非 archive 仅不足以保证 phase 匹配,应按实现限制为options.state.phase === 'verify',并为 archive +refresh-verification-receipts的分支补充相关测试覆盖。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-continuation.ts` around lines 153 - 169, 将 receipt refresh 路由条件限定为 options.state.phase === 'verify',避免 archive 阶段进入 comet native receipt refresh 命令分支;保留其他 actionableFindings 处理逻辑不变,并在相关 continuation 测试中补充 archive 阶段包含 refresh-verification-receipts 时的覆盖,验证其不会返回 continue/work-phase 或发出 refresh 命令。assets/skills/comet/scripts/comet-archive.mjs-2-4 (1)
2-4: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win同步注册
comet-hook-routerbundle 到 Manifest、Layout 和 Runtime 资产测试。
assets/skills/comet/scripts/comet-hook-router.mjs已生成,清单和布局里有hookRouter/comet-hook-router.mjs注册,但test/domains/comet-classic/comet-scripts.test.ts的beforeEach拷贝列表未包含comet-hook-router.mjs,需要补入该命令 bundle。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills/comet/scripts/comet-archive.mjs` around lines 2 - 4, 在 comet-scripts.test.ts 的 beforeEach 资产拷贝列表中加入 comet-hook-router.mjs,使其与 Manifest、Layout 及 Runtime 资产注册保持一致;不要修改其他 bundle 或测试逻辑。Source: Coding guidelines
domains/comet-native/native-doctor-command.ts-16-33 (1)
16-33: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win当
--strategy单独使用时应拒绝该参数。
doctorNativeProject仅在repair为true时才读取并执行recoveryStrategy;没有--repair时这个参数会被静默忽略,可能让用户误以为已选择恢复策略。显式报错可以让输入失败更清晰,例如--strategy requires --repair。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-doctor-command.ts` around lines 16 - 33, Update the argument validation in the native doctor command around recoveryStrategy and repair so using --strategy without --repair throws a NativeUsageError, with a clear message such as “--strategy requires --repair”. Preserve the existing validation for unsupported strategy values and pass recoveryStrategy only when applicable.app/commands/update.ts-1856-1892 (1)
1856-1892: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
superpowersReason会跨 scope 残留,产生installed加 “skipped” 原因的组合。循环先处理
project,再处理global。如果projectscope 只有 plugin 目标,第 1862 行把superpowersReason设为'plugin-managed Superpowers installation skipped'。随后globalscope 安装成功时,第 1889 行只更新superpowersStatus,不清除superpowersReason。第 2039 行于是输出status: 'installed'加上该 “skipped” 原因,正是第 1858-1860 行注释想要避免的情形。🐛 建议修复:安装成功时清除残留原因
} else if (status === 'installed' && superpowersStatus !== 'failed') { superpowersStatus = 'installed'; - // A successful install is the truth; do not overwrite the reason with a - // plugin-managed skip note from this scope's leftover plugin targets. + // A successful install is the truth; clear any plugin-managed skip note + // recorded by an earlier scope so the status and reason stay consistent. + superpowersReason = undefined; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/commands/update.ts` around lines 1856 - 1892, Update the successful-install branch in the scope loop around installSuperpowersForPlatforms so a status of installed also clears any prior plugin-managed skipped value in superpowersReason. Preserve the existing failed-status precedence and ensure the final installed result cannot retain a skipped reason from an earlier scope.app/commands/update.ts-1268-1268 (1)
1268-1268: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win同步默认更新默认路径的注释与实际策略
当前注释说默认 project/global
comet update会刷新资产,但代码路径要求显式--self-update才会计算updateClassicDependencies,从而跳过默认更新的 OpenSpec/Superpowers 目标发现、经典产物根刷新和项目专用 OpenSpec 刷新。修正注释与文档,或保留现有策略并调整注释。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@app/commands/update.ts` at line 1268, Align the documentation/comments describing default project/global comet update behavior with the actual updateClassicDependencies condition in updateClassicDependencies: either document that classic dependency and asset refresh requires explicit --self-update, or change the strategy so default updates perform those refreshes. Ensure references to OpenSpec, Superpowers, classic artifact roots, and project-specific OpenSpec refresh accurately reflect the implemented path.assets/skills/comet-native/SKILL.md-32-35 (1)
32-35: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win让 Bash 引导片段可靠失败。
assets/skills/comet-native/SKILL.md第 34 行在顶层 Bash 使用return 1。如果该块作为普通 shell 命令执行,不在函数中且未被 sourced,return会报错为非法语法;使用exit 1会更可靠地终止执行,或把整段逻辑放入函数再调用。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills/comet-native/SKILL.md` around lines 32 - 35, Update the COMET_NATIVE_STATUS validation block in SKILL.md to use exit 1 instead of return 1 when comet-native scripts are unavailable, so the top-level Bash snippet reliably terminates with failure.assets/skills-zh/comet-verify/SKILL.md-21-28 (1)
21-28: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win统一入口验证说明与实际调用方式。
The changed examples invoke
node "<comet-state-script>", but the surrounding text still says to use the stablecometCLI. This presents two competing invocation contracts. Describe the step as resolving and invoking the state bundle. Keep thecometCLI only as the documented fallback.
assets/skills-zh/comet-verify/SKILL.md#L21-L28: 将“使用稳定cometCLI”改为“按scripts.md定位脚本并执行入口验证”。assets/skills/comet-build/SKILL.md#L22-L24: 同步更新英文说明,使其明确使用已解析的 state bundle。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet-verify/SKILL.md` around lines 21 - 28, Update the entry-verification guidance in assets/skills-zh/comet-verify/SKILL.md lines 21-28 to instruct resolving the script via scripts.md and invoking the state bundle, while documenting the stable comet CLI only as a fallback. Synchronize the English guidance in assets/skills/comet-build/SKILL.md lines 22-24 to explicitly use the resolved state bundle.assets/skills-zh/comet/reference/scripts.md-11-21 (1)
11-21: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win在搜索前清空
COMET_ENV。如果调用环境继承了
COMET_ENV,且所有候选目录都不存在,每次循环都会在continue处跳过赋值。旧路径会继续存在,脚本可能调用过期或错误的 bundle。+COMET_ENV= for root in "$PWD/../.claude/skills" "$HOME/.claude/skills" "$HOME/.codex/skills" "$HOME/.agents/skills" "$HOME/.config" "$HOME/.gemini" .; do🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet/reference/scripts.md` around lines 11 - 21, 在搜索候选目录前清空 COMET_ENV,确保其不会继承调用环境中的旧值;保留现有循环、找不到文件时的错误处理,以及成功找到 comet-env.mjs 后再执行 node "$COMET_ENV" 的流程。domains/dashboard/project-directory.ts-46-56 (1)
46-56: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
fs.access未指定 mode,无法验证可读性。
fs.access(projectPath)不传mode时默认等价于fs.constants.F_OK,只检测路径是否存在。前一行fs.stat已经确认路径存在,因此这次调用没有新增实际校验。如果目的是区分“路径存在但不可读”(对应
unreadable状态)与“路径缺失”(对应missing状态),应显式传入fs.constants.R_OK。🛠️ 建议修复
try { const stat = await fs.stat(projectPath); if (!stat.isDirectory()) return 'missing'; - await fs.access(projectPath); + await fs.access(projectPath, fs.constants.R_OK); return 'available';🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/project-directory.ts` around lines 46 - 56, Update availabilityOf so its fs.access call explicitly uses fs.constants.R_OK, allowing the existing catch mapping to distinguish unreadable project paths from missing paths while preserving the current stat and return behavior.domains/dashboard/web/src/main.jsx-266-270 (1)
266-270: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win复制 Change 名称失败时仍显示“已复制”。 根因是回调在
catch中吞掉错误并返回 resolved promise,下游只依据then切换图标状态。
domains/dashboard/web/src/main.jsx#L266-L270:在catch中提示错误后重新抛出该错误。domains/dashboard/web/src/native-workflow-panel.jsx#L333-L338:为复制链补catch,失败时保持copied为 false,并避免未处理的 promise rejection。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/main.jsx` around lines 266 - 270, Ensure copy failures do not trigger the success state: in domains/dashboard/web/src/main.jsx lines 266-270, update the onCopyChangeName copyText catch to show the error toast and rethrow the error; in domains/dashboard/web/src/native-workflow-panel.jsx lines 333-338, add a catch to the copy promise chain that keeps copied false and handles the rejection.domains/dashboard/web/src/markdown-preview.js-88-99 (1)
88-99: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win空数组会渲染“全部验收项已通过”。
[].every(isPlainObject)返回 true。当证据块内容为[]时,摘要显示 0 个验收项,并给出“全部验收项已通过。”的结论。请在没有条目时保留原始区块或改用中性文案。🐛 建议修复
function renderNativeAcceptanceEvidenceSummary(entries) { - if (!Array.isArray(entries) || !entries.every(isPlainObject)) return null; + if (!Array.isArray(entries) || entries.length === 0 || !entries.every(isPlainObject)) return null;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/markdown-preview.js` around lines 88 - 99, Update renderNativeAcceptanceEvidenceSummary to handle an empty entries array before calculating the passed/failed counts, preserving the original block or returning neutral wording instead of claiming all acceptance items passed; keep the existing summary behavior for non-empty valid entries.domains/dashboard/web/src/styles.css-57-78 (1)
57-78: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winStylelint 会在此块报 error。
静态检查给出
value-keyword-case(第 60、63、66、77 行的Inter、paperMono、Menlo、Monaco、Consolas、optimizeLegibility)和declaration-empty-line-before(第 67 行)。这些是 error 级别,会导致 lint 失败。给字体名加引号可消除字体相关告警,font-family声明前补空行可消除排版告警。🔧 建议修复
--font-ui: - 'Segoe UI Variable Text', 'Segoe UI Variable', Inter, 'SF Pro Text', 'PingFang SC', + 'Segoe UI Variable Text', 'Segoe UI Variable', 'Inter', 'SF Pro Text', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; --font-display: - 'Segoe UI Variable Display', 'Segoe UI Variable', Inter, 'SF Pro Display', 'PingFang SC', + 'Segoe UI Variable Display', 'Segoe UI Variable', 'Inter', 'SF Pro Display', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif; --font-mono: - paperMono, ui-monospace, 'SFMono-Regular', Menlo, Monaco, 'Cascadia Mono', Consolas, monospace; + 'paperMono', ui-monospace, 'SFMono-Regular', 'Menlo', 'Monaco', 'Cascadia Mono', 'Consolas', + monospace; + font-family: var(--font-ui);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/styles.css` around lines 57 - 78, 更新 :root 中的字体栈声明,为 Inter、paperMono、Menlo、Monaco 和 Consolas 等字体名称添加引号以通过 value-keyword-case 检查;同时在 font-family 声明前补充空行,消除 declaration-empty-line-before 错误,保持现有字体顺序和其他样式不变。Source: Linters/SAST tools
domains/dashboard/web/src/main.jsx-134-159 (1)
134-159: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win手动刷新被自动刷新中止后,
loading不会复位。
refresh(true)先设置loading = true。随后 30 秒轮询调用refresh(false),该调用会abort()手动请求并覆盖snapshotRequestRef.current。此时手动调用的finally中snapshotRequestRef.current === controller为 false,setLoading(false)不执行,刷新按钮的 loading 状态一直保留。请把
loading复位与“是否为当前请求”解耦。🐛 建议修复
} finally { - if (snapshotRequestRef.current === controller) { - snapshotRequestRef.current = null; - if (manual) setLoading(false); - } + if (snapshotRequestRef.current === controller) { + snapshotRequestRef.current = null; + } + if (manual) setLoading(false); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/main.jsx` around lines 134 - 159, Update the refresh callback so manual refreshes always reset loading in their own finally path, even when a later automatic refresh replaces or aborts their controller. Keep snapshotRequestRef cleanup conditional on the controller still being current, but decouple the manual setLoading(false) from that identity check in refresh.
🧹 Nitpick comments (21)
scripts/benchmark/runtime-coldstart-benchmark.mjs (1)
83-114: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win校验
spawnSync的退出状态,避免快速失败被误计为"更快的冷启动"。
measureOne只测量耗时,不检查result.status、result.error或result.signal。如果某个目标脚本因缺失依赖、导入失败或权限问题而快速退出,这次快速失败会被当作正常的冷启动样本计入median与samples。这会削弱基准测试的可信度:入口点彻底损坏时,基准反而可能显示"性能提升",而不是暴露错误。建议在测量后校验退出状态,失败时抛出异常或输出明确诊断信息。
♻️ 建议的修复
function measureOne(script, args) { const start = process.hrtime.bigint(); - spawnSync(process.execPath, [script, ...args], { + const result = spawnSync(process.execPath, [script, ...args], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'], timeout: 15000, env: { ...process.env, COMET_SKIP_UPDATE_CHECK: '1' }, }); - return Number(process.hrtime.bigint() - start) / 1e6; + const elapsedMs = Number(process.hrtime.bigint() - start) / 1e6; + if (result.error || result.signal || result.status !== 0) { + throw new Error( + `Cold-start probe failed for ${script}: status=${result.status} signal=${result.signal} error=${result.error?.message ?? ''}`, + ); + } + return elapsedMs; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/benchmark/runtime-coldstart-benchmark.mjs` around lines 83 - 114, Update measureOne to retain the spawnSync result and validate result.error, result.signal, and a successful result.status before returning the elapsed time. On any execution failure, throw an error with clear diagnostic details instead of recording the sample; ensure measureAll and the warm-up run cannot silently treat failed scripts as valid measurements.test/domains/comet-native/native-receipt-refresh.test.ts (1)
312-329: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value删除未使用的
acceptanceRef参数。
replaceAcceptanceReceiptInReport不使用acceptanceRef。第 329 行的void acceptanceRef;只用于抑制未使用变量。调用点(第 417 行)传入占位字符串'unused',降低可读性。删除该参数更清晰。♻️ 建议的重构
async function replaceAcceptanceReceiptInReport( - acceptanceRef: string, boundRevision: number, kind: 'manual' | 'automated', ): Promise<void> { @@ - void acceptanceRef; const preparation = await prepareNativeVerificationEvidence({调用点同步修改:
- await replaceAcceptanceReceiptInReport('unused', 2, 'automated'); + await replaceAcceptanceReceiptInReport(2, 'automated');🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-native/native-receipt-refresh.test.ts` around lines 312 - 329, Remove the unused acceptanceRef parameter and the trailing void acceptanceRef statement from replaceAcceptanceReceiptInReport, then update every call site to stop passing the placeholder 'unused' argument while preserving the remaining arguments and behavior.test/domains/comet-native/native-snapshot.test.ts (2)
236-241: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value将逐字段断言扩展到全部 entry。
当前只比较
entries[0]。如果清单包含多个 entry,暂存对其他 entry 的影响不会被检出。按 path 建索引比较全部 entry,可保持"仅 Git 元数据变化"的意图并覆盖完整清单。♻️ 建议的重构
expect(afterStaging.entries).toHaveLength(beforeStaging.entries.length); - expect(afterStaging.entries[0]!.path).toBe(beforeStaging.entries[0]!.path); - expect(afterStaging.entries[0]!.hash).toBe(beforeStaging.entries[0]!.hash); - expect(afterStaging.entries[0]!.size).toBe(beforeStaging.entries[0]!.size); + const contentOf = (manifest: typeof afterStaging) => + manifest.entries + .map((entry) => ({ path: entry.path, hash: entry.hash, size: entry.size })) + .sort((a, b) => a.path.localeCompare(b.path)); + expect(contentOf(afterStaging)).toEqual(contentOf(beforeStaging));🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-native/native-snapshot.test.ts` around lines 236 - 241, Extend the staging assertions around afterStaging and beforeStaging to compare every entry, indexing entries by path rather than only checking entries[0]. Verify each matching entry preserves its path, hash, and size while allowing only the git metadata to differ, and retain the existing entry-count assertion.
1675-1679: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win为临时 Git 仓库补充隔离配置,避免受全局配置影响。
initGitRepo只设置user.email与user.name。如果开发者的全局配置启用了commit.gpgsign、core.hooksPath或自定义模板目录,git commit会失败或阻塞,导致整个增量快照套件不稳定。建议显式关闭签名并固定默认分支。♻️ 建议的重构
async function initGitRepo(): Promise<void> { - await execFileAsync('git', ['init'], { cwd: projectRoot }); + await execFileAsync('git', ['init', '--initial-branch=main', '--template='], { + cwd: projectRoot, + }); await execFileAsync('git', ['config', 'user.email', 'test@example.com'], { cwd: projectRoot }); await execFileAsync('git', ['config', 'user.name', 'Test'], { cwd: projectRoot }); + await execFileAsync('git', ['config', 'commit.gpgsign', 'false'], { cwd: projectRoot }); + await execFileAsync('git', ['config', 'core.hooksPath', ''], { cwd: projectRoot }); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-native/native-snapshot.test.ts` around lines 1675 - 1679, 更新 initGitRepo,确保临时仓库不受全局 Git 配置影响:初始化时显式固定默认分支并禁用自定义模板目录,随后在该仓库的本地配置中关闭 commit.gpgsign、清空 core.hooksPath,并保留现有 user.email 与 user.name 配置。AGENTS.md (2)
232-234: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value修正 Dashboard 规范段落的文案。
“采用使用”重复,且标题与正文中英文之间缺少空格。建议统一为“Comet Dashboard 规范”和“Comet Dashboard 实现时应尽量采用 Ant Design React 组件”。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@AGENTS.md` around lines 232 - 234, 更新 AGENTS.md 中 Comet Dashboard 规范段落的标题和正文:将标题统一为“Comet Dashboard 规范”,删除“采用使用”重复表述,并在中英文之间补充空格,使正文为“Comet Dashboard 实现时应尽量采用 Ant Design React 组件”。
93-105: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win补全 Classic 命令 bundle 映射。
映射块列出了
comet-state.mjs、comet-guard.mjs、comet-handoff.mjs、comet-archive.mjs、comet-yaml-validate.mjs和comet-hook-guard.mjs,但缺少config/repository-layout.json中已注册的intent与resume-probe两个 entry 及其生成物。请补齐,避免文档与布局配置漂移。♻️ 建议补充
comet-hook-guard.mjs ← domains/comet-classic/classic-hook-guard-entry.ts (不直接安装为平台 Hook) +comet-intent.mjs ← domains/comet-classic/classic-intent-entry.ts +comet-resume-probe.mjs ← domains/comet-classic/classic-resume-probe-entry.ts comet-native-runtime.mjs ← domains/comet-native/*🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@AGENTS.md` around lines 93 - 105, 补全 AGENTS.md 中 Classic 命令 bundle 映射,新增 config/repository-layout.json 已注册的 intent 与 resume-probe entry,并分别指向对应的 domains/comet-classic 入口及生成的 comet-intent.mjs、comet-resume-probe.mjs,保持现有映射格式一致。scripts/build/build-classic-runtime.mjs (2)
81-99: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win可并行执行各命令 bundle 构建以缩短构建时间。
每个
bundledRuntime(entry)调用相互独立,且使用write:false,不会产生输出竞争。当前实现串行await,构建时间随命令数量线性增长。建议并行执行。♻️ 建议改为并行构建
-const outputs = [ - { - outputRelative: runtimeOutput, - outputFile: resolveRepositoryPath(runtimeOutput), - output: Buffer.from(await bundledRuntime(runtimeEntry)), - }, -]; - -for (const [name, entry] of commandEntries) { - const outputRelative = commandOutputByName.get(name); - if (!outputRelative) { - throw new Error(`Classic runtime entry '${name}' has no matching output`); - } - outputs.push({ - outputRelative, - outputFile: resolveRepositoryPath(outputRelative), - output: Buffer.from(await bundledRuntime(entry)), - }); -} +const outputPlan = [['runtime', runtimeEntry], ...commandEntries].map(([name, entry]) => { + const outputRelative = name === 'runtime' ? runtimeOutput : commandOutputByName.get(name); + if (!outputRelative) { + throw new Error(`Classic runtime entry '${name}' has no matching output`); + } + return { name, entry, outputRelative }; +}); + +const outputs = await Promise.all( + outputPlan.map(async ({ entry, outputRelative }) => ({ + outputRelative, + outputFile: resolveRepositoryPath(outputRelative), + output: Buffer.from(await bundledRuntime(entry)), + })), +);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/build/build-classic-runtime.mjs` around lines 81 - 99, Update the command-entry loop around bundledRuntime to start all independent command bundle builds concurrently and await their combined results, while preserving each entry’s outputRelative/outputFile mapping and the existing missing-output error. Keep the initial runtime bundle and output ordering behavior unchanged.
17-22: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value建议同时检测 outputs 中多余的键。
当前逻辑只在 entry 缺少 output 时抛错。如果
outputs中存在没有对应 entry 的键(例如重命名 entry 后遗留旧键),构建会静默跳过该生成物,--check也不会检查它。建议在构建前对两侧键集合做一次一致性断言。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/build/build-classic-runtime.mjs` around lines 17 - 22, 在构建前为 classicRuntime 的 entries 与 outputs 键集合增加双向一致性校验,确保 outputs 中每个键都对应一个 entry,同时保留现有的 entry 缺少 output 校验;使用 commandEntries 和 commandOutputByName 相关逻辑复用现有键集合,并让不匹配时立即抛出明确错误,避免孤立 output 被静默跳过或绕过 --check。domains/comet-native/native-next-command.ts (1)
44-60: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win建议以
!== undefined判断选项是否提供。
takeOption会把--allow-partial-scope ''之类的空字符串当作已提供的值。此时第 39 行的配对校验通过,但第 44、47、55、58 行的真值判断会跳过 hash 格式校验、--confirmed依赖校验和--result互斥校验,第 68、72 行也会把该字段从 evidence 中省略。结果是命令带着不完整的 evidence 继续执行,而不是给出明确的用法错误。建议对这些校验统一使用!== undefined。♻️ 建议修改
- if (allowPartialScopeHash && !/^[a-f0-9]{64}$/u.test(allowPartialScopeHash)) { + if (allowPartialScopeHash !== undefined && !/^[a-f0-9]{64}$/u.test(allowPartialScopeHash)) { throw new NativeUsageError('--allow-partial-scope must be a SHA-256 hash'); } - if (allowPartialScopeHash && !confirmed) { + if (allowPartialScopeHash !== undefined && !confirmed) { throw new NativeUsageError('--allow-partial-scope requires --confirmed'); } @@ - if (repairOverrideSignature && !/^[a-f0-9]{64}$/u.test(repairOverrideSignature)) { + if (repairOverrideSignature !== undefined && !/^[a-f0-9]{64}$/u.test(repairOverrideSignature)) { throw new NativeUsageError('--override-repair must be a SHA-256 hash'); } - if (repairOverrideSignature && verificationResult !== undefined) { + if (repairOverrideSignature !== undefined && verificationResult !== undefined) { throw new NativeUsageError('--override-repair cannot be combined with --result'); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-next-command.ts` around lines 44 - 60, 将 allowPartialScopeHash 和 repairOverrideSignature 相关校验中的真值判断统一改为 !== undefined,以便空字符串等已提供的选项仍执行哈希格式、confirmed 依赖、result 互斥等校验;同时检查同一命令中 evidence 构建逻辑对这些字段的存在判断,改为按是否为 undefined 处理,确保无效输入不会被省略并继续执行。domains/comet-native/native-snapshot.ts (1)
2831-2837: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win该 catch 会吞掉预算超时错误。
本文件其他 Git 调用都会先重抛超时,例如第 2912 行的
if (isNativeGitSnapshotTimeout(error)) throw error;。此处的空 catch 把超时也降级为“对象 id 不可信”,掩盖了预算耗尽这一条件,使快照在超时后仍继续执行文件捕获。建议保持一致:先重抛超时,其它错误再降级。♻️ 建议修改
- } catch { + } catch (error) { + if (isNativeGitSnapshotTimeout(error)) throw error; // The snapshot can still be captured safely from disk, but neither // baseline reuse nor new object-id bindings are trustworthy. incrementalEnabled = false; gitObjectIdsTrusted = false; baselineByPath.clear(); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-snapshot.ts` around lines 2831 - 2837, Update the catch block around the snapshot Git operation to accept the caught error, check it with isNativeGitSnapshotTimeout, and rethrow timeout errors before applying the existing incrementalEnabled, gitObjectIdsTrusted, and baselineByPath fallback state for other failures.scripts/build/build-native-runtime.mjs (1)
32-46: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win为 Native runtime 构建添加
preserveSymlinks: true。
build-entry-runtime.mjs已设置preserveSymlinks: true,但build-native-runtime.mjs的esbuildOptions未设置该选项。使用 pnpm 等符号链接工作区时,缺少此选项会改变 esbuild 解析依赖路径的行为;除非有意区别两个 runtime 的打包策略,应保持一致。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/build/build-native-runtime.mjs` around lines 32 - 46, 在 build-native-runtime.mjs 的 esbuildOptions 配置中添加 preserveSymlinks: true,与 build-entry-runtime.mjs 保持一致;不要修改其他 Native runtime 打包选项。domains/comet-native/native-archive-command.ts (1)
60-65: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value可用显式收窄替代非空断言。
第 30-32 行已保证非 dry-run 分支中
expectedPreflightHash有值,所以第 64 行的!在运行时是安全的。但显式收窄可以让类型系统自行证明该不变量,避免后续调整校验顺序时静默失去保护。♻️ 建议的重构
- if (!dryRun && !expectedPreflightHash) { - throw new NativeUsageError('archive requires --dry-run or --expect-preflight <sha256>'); - } - if (expectedPreflightHash && !/^[a-f0-9]{64}$/u.test(expectedPreflightHash)) { - throw new NativeUsageError('--expect-preflight must be a SHA-256 hash'); - } + if (!dryRun) { + if (!expectedPreflightHash) { + throw new NativeUsageError('archive requires --dry-run or --expect-preflight <sha256>'); + } + if (!/^[a-f0-9]{64}$/u.test(expectedPreflightHash)) { + throw new NativeUsageError('--expect-preflight must be a SHA-256 hash'); + } + }随后第 64 行可写为
expectedPreflightHash,(在该分支内类型已是string)。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-archive-command.ts` around lines 60 - 65, 在非 dry-run 分支中调整 expectedPreflightHash 的控制流,使前置校验显式收窄其类型为 string,并在 archiveNativeChange 调用中移除 expectedPreflightHash! 非空断言,直接传递 expectedPreflightHash;保持现有校验顺序和归档行为不变。domains/comet-native/native-receipt-refresh.ts (2)
255-262: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win说明
failed条目的过期引用不会被刷新。当
trace.status === 'failed'时代码保留原条目。如果该条目的evidence_refs含过期引用,刷新后仍然过期,下一次next会再次报告绑定不一致。请在NativeReceiptRefreshResult的文档或返回字段中记录这一限制,让调用方知道 failed 验收需要人工处理。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-receipt-refresh.ts` around lines 255 - 262, 在处理 trace.status === 'failed' 的 NativeReceiptRefreshResult 返回路径中,补充文档或返回字段说明:failed 条目的 evidence_refs 不会被刷新,可能保留过期引用,需调用方人工处理。保持现有 rebuilt.push(existing) 行为不变,并将限制说明放在 NativeReceiptRefreshResult 的定义或对应返回字段附近。
230-237: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win在返回结果中说明仍需重跑 Verify。
--apply只重写了verification.md中的验收证据块。state.verification_evidence仍指向旧 envelope,其reportHash绑定旧的报告内容。因此在用户重新执行comet native next --result pass之前,freshness 检查仍会判定报告过期。请在结果中加入下一步命令(例如
nextCommand),让 Agent 可以按机器可读字段继续,而不依赖 CLI 文本。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/comet-native/native-receipt-refresh.ts` around lines 230 - 237, 更新 native receipt refresh 的返回结果对象,在 `verificationReport` 等字段旁加入机器可读的 `nextCommand`,值应指向用户重新执行 `comet native next --result pass` 的下一步操作;保持现有 `requiresRerun`、`requiresCheck` 和 `applied` 字段行为不变。assets/skills-zh/comet-archive/SKILL.md (1)
20-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUpdate stale "使用稳定
cometCLI" wording to match direct bundle invocation.两处 Step 0 入口验证说明仍保留"按
comet/reference/scripts.md使用稳定cometCLI,然后执行入口验证"的措辞,但紧随其后的命令示例改成了直接调用node "<comet-state-script>" select/check,不再经过cometCLI。comet-classic/SKILL.md(第 33 行、第 270-272 行)和comet-design/SKILL.md(第 21 行)已经把同类说明改成"完成脚本定位",并说明直连 bundle 调用比cometCLI 外壳更快。这两处遗留措辞与实际命令不一致,会让读者误以为该步骤仍经过 CLI 外壳。
assets/skills-zh/comet-archive/SKILL.md#L20-L29: 把第 24 行的"按comet/reference/scripts.md使用稳定cometCLI,然后执行入口验证"改为与comet-classic/SKILL.md一致的"完成脚本定位"表述。assets/skills-zh/comet-build/SKILL.md#L17-L24: 把第 19 行同样的"使用稳定cometCLI"表述改为"完成脚本定位"表述,使其与第 22-24 行的<comet-state-script>命令一致。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet-archive/SKILL.md` around lines 20 - 29, 更新 assets/skills-zh/comet-archive/SKILL.md 第 20-29 行,将入口验证说明中“按 comet/reference/scripts.md 使用稳定 comet CLI”改为与“完成脚本定位”一致的表述。同步更新 assets/skills-zh/comet-build/SKILL.md 第 17-24 行的相同措辞;保留后续通过 <comet-state-script> 直接调用 select/check 的命令不变。domains/dashboard/project-directory.ts (1)
32-35: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win将
canonicalKey复用到平台路径工具层。
canonicalKey与platform/install/project-registry.ts的键生成逻辑相同,都在处理 Windows 路径大小写。把它抽到platform/的路径工具中,然后让 dashboard 和 registry 复用,避免领域代码直接散落平台差异分支。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/project-directory.ts` around lines 32 - 35, 将 canonicalKey 从 dashboard 项目目录模块抽取到 platform 路径工具层,保留其 path.resolve 规范化及 Windows 平台转小写行为;更新 dashboard 与 platform/install/project-registry.ts 的键生成逻辑,统一复用该工具并移除重复实现。Source: Coding guidelines
domains/dashboard/web/src/main.jsx (2)
432-439: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winClassic 与 Native 面板重复实现同一批展示组件。 根因是两侧各自复制了
SectionHead与摘要卡片,而不是共用一个模块。
domains/dashboard/web/src/main.jsx#L432-L439:把SectionHead与AntSummaryCard(第 1488-1513 行)抽取到共享模块并导入使用。domains/dashboard/web/src/native-workflow-panel.jsx#L162-L171:删除本地SectionHead与NativeSummaryCard(第 224-249 行),改为导入共享组件。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/main.jsx` around lines 432 - 439, Extract SectionHead and AntSummaryCard from domains/dashboard/web/src/main.jsx into a shared module, then import and use them in main.jsx. In domains/dashboard/web/src/native-workflow-panel.jsx, remove the local SectionHead and NativeSummaryCard implementations and import the shared components instead, preserving their existing display behavior.
1381-1381: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value建议把
createRoot(...).render()移到文件末尾。当前该语句位于组件声明之间。函数声明会提升,所以现在可用。但如果后续在其下方新增
const(例如常量或memo包装组件),渲染时会命中 TDZ。把入口语句放到文件末尾可以消除这一风险。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/main.jsx` at line 1381, 将 createRoot(document.getElementById('root')).render(<App />) 从组件声明之间移到 main.jsx 文件末尾,确保所有 const、memo 包装组件及其他初始化声明完成后再启动渲染。domains/dashboard/web/src/use-animated-number.js (1)
21-31: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value数值变化时会先回跳到 0。
from固定为 0。当target从 5 变为 6 时,显示值先跳回 0 再滚动到 6。若希望在自动刷新后平滑过渡,可用 ref 记录当前值作为起点,仅在resetKey变化时从 0 开始。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/use-animated-number.js` around lines 21 - 31, Update the animation setup in the hook around the `from`, `diff`, and `setValue(0)` logic to use a ref holding the currently displayed value as the animation start point. Preserve resetting the start value to 0 only when `resetKey` changes, and update the ref as animation frames progress so successive target changes transition smoothly without jumping back to zero.test/domains/dashboard/web-source.test.ts (1)
24-36: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoff源码字符串断言较脆弱。
断言依赖
className的精确文本与类名顺序。Prettier 重排或类名调整都会使测试失败,而测试并不验证实际布局结果。容器查询部分可保留 CSS 断言,组件布局部分建议逐步迁移到test/domains/dashboard/dashboard-browser.spec.ts的行为断言。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/dashboard/web-source.test.ts` around lines 24 - 36, 更新 web-source.test.ts 中 uses the change-detail width... 测试,移除依赖精确 className 文本、类名顺序及 TaskProgress 源码结构的断言;将组件布局验证迁移到 dashboard-browser.spec.ts,通过实际浏览器行为断言堆叠与双列布局切换。保留 readDashboardStyles 相关的容器查询和 grid-template-columns CSS 断言。domains/dashboard/web/src/styles.css (1)
1442-1478: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift同一选择器存在三层覆盖,亮暗表现已出现分叉。
.dashboard-priority-banner在第 178、1370、1442 行定义三次,.dashboard-priority-title在第 188、1378、1454 行定义三次。第 1454 行把标题背景改为transparent,但第 214-218 行的:root[data-theme='dark'] .dashboard-priority-title特异性更高,暗色下仍保留--color-accent-soft底色,与亮色设计不一致。.dashboard-workbench与.dashboard-content-shell也存在同类重复定义。建议把每个组件的样式收敛到单一区块,并用主题变量替换硬编码颜色字面值。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@domains/dashboard/web/src/styles.css` around lines 1442 - 1478, 收敛 .dashboard-priority-banner 和 .dashboard-priority-title 的重复定义为单一区块,确保亮色与暗色主题使用一致的样式,并调整高特异性的 :root[data-theme='dark'] .dashboard-priority-title 覆盖规则。同步合并 .dashboard-workbench 与 .dashboard-content-shell 的重复样式定义,使用现有主题变量替换硬编码颜色值。
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Around line 24-26: Update the Security entry in CHANGELOG.md to describe only
the security fixes actually delivered in beta.12, removing or revising the
unsupported Dashboard CSS dependency/source-map claim. Ensure the resulting
changelog accurately reflects the available dependency and implementation
changes without implying unverified remediation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (5)
assets/skills-zh/comet-tweak/SKILL.md (1)
109-109: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win修正提交信息类型。
这里要求使用
tweak: <简述变更>。仓库约定的提交类型不包括tweak。改用允许的类型,例如feat:、fix:或chore:。Based on learnings:提交信息必须使用
<type>: <summary>或<type>(<scope>): <summary>格式。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet-tweak/SKILL.md` at line 109, 更新 SKILL.md 中的提交信息要求,移除不符合仓库约定的 tweak 类型,改为允许的 feat、fix 或 chore 等类型,并明确遵循 <type>: <summary> 或 <type>(<scope>): <summary> 格式。Source: Learnings
assets/skills-zh/comet-hotfix/SKILL.md (1)
56-56: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win工作流文档不应无条件调用 Superpowers。
仓库规则要求用户明确同意后才能使用 Superpowers Skill。
assets/skills-zh/comet-hotfix/SKILL.md#L56-L56: 将using-git-worktrees改为需要用户明确授权后才能加载。assets/skills/comet-tweak/SKILL.md#L70-L70: 将using-git-worktrees改为需要用户明确授权后才能加载。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet-hotfix/SKILL.md` at line 56, 更新 assets/skills-zh/comet-hotfix/SKILL.md 第56行:仅在用户明确授权后加载 Superpowers 的 using-git-worktrees 技能;未获授权时不得无条件调用。同步更新 assets/skills/comet-tweak/SKILL.md 第70行,采用相同的授权前置要求。Sources: Coding guidelines, Learnings
assets/skills/comet/rules/comet-phase-guard.en.md (1)
81-84: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win统一 Design 阶段的操作顺序。
两个规则文件都把 handoff 定义为第一个脚本操作,但
assets/skills-zh/comet-design/SKILL.md#L21-L26要求先选择 change 并完成入口检查。
assets/skills/comet/rules/comet-phase-guard.en.md#L81-L84: 改为入口验证完成后生成 handoff。assets/skills/comet/rules/comet-phase-guard.md#L81-L84: 同步中文规则,保持相同顺序。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills/comet/rules/comet-phase-guard.en.md` around lines 81 - 84, 统一 Design 阶段的操作顺序:在 assets/skills/comet/rules/comet-phase-guard.en.md 第81-84行,先完成 change 选择和入口验证,再执行 handoff 生成;在 assets/skills/comet/rules/comet-phase-guard.md 第81-84行同步相同调整,确保中英文规则一致,其余 brainstorming、Design Doc 和 guard 顺序保持不变。assets/skills-zh/comet/reference/subagent-dispatch.md (1)
147-148: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win为
task-checkoff参数加引号。
<plan-task-text>和<openspec-task-text>可能包含空格。未加引号时,Shell 会拆分任务文本,task-checkoff无法读取完整任务。-comet state task-checkoff <plan-file> <plan-task-text> -comet state task-checkoff <classic-change-dir>/tasks.md <openspec-task-text> +comet state task-checkoff "<plan-file>" "<plan-task-text>" +comet state task-checkoff "<classic-change-dir>/tasks.md" "<openspec-task-text>"🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet/reference/subagent-dispatch.md` around lines 147 - 148, 为 task-checkoff 的两个命令示例中的任务文本参数加引号,分别更新 <plan-task-text> 和 <openspec-task-text> 的用法,确保包含空格的完整任务文本作为单个参数传递;保留现有 <plan-file> 和 <classic-change-dir>/tasks.md 参数结构不变。assets/skills-zh/comet/reference/context-recovery.md (1)
9-13: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win为 Native 恢复路径增加命令分流。
当前恢复协议声明为 comet 子 skill 共享,但固定使用
comet state check <change-name> <phase> --recover;而 Native 的启动/恢复流程使用comet native status/show/select。按 workflow 先区分 Native 和 Classic,再分别执行对应恢复检查,或修改并同步英文版本以排除 Native。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@assets/skills-zh/comet/reference/context-recovery.md` around lines 9 - 13, 更新 context recovery 协议,先区分 Native 与 Classic workflow:Classic 继续使用 `comet state check <change-name> <phase> --recover`,Native 改用 `comet native status/show/select` 对应的启动或恢复检查流程;同步调整英文版本,确保两种 workflow 的命令分流一致,并保留进入子 Skill 前确认公开 CLI 可用的步骤。
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@assets/skills-zh/comet-native/reference/commands.md`:
- Around line 129-133: 更新 receipt refresh --apply 的 manual receipt 处理逻辑,仅在
compareNativeReceiptBindings() 发现唯一不一致字段为 sourceRevision 时自动按当前 revision
重签。contractHash、scopeHash、snapshotHash 或 artifactHash 任一变化时,禁止覆盖旧
receipt,改为要求重新执行人工观察并生成新的 receipt manual;同步更新 Runtime 实现及覆盖这些绑定变化场景的测试。
---
Outside diff comments:
In `@assets/skills-zh/comet-hotfix/SKILL.md`:
- Line 56: 更新 assets/skills-zh/comet-hotfix/SKILL.md 第56行:仅在用户明确授权后加载
Superpowers 的 using-git-worktrees 技能;未获授权时不得无条件调用。同步更新
assets/skills/comet-tweak/SKILL.md 第70行,采用相同的授权前置要求。
In `@assets/skills-zh/comet-tweak/SKILL.md`:
- Line 109: 更新 SKILL.md 中的提交信息要求,移除不符合仓库约定的 tweak 类型,改为允许的 feat、fix 或 chore
等类型,并明确遵循 <type>: <summary> 或 <type>(<scope>): <summary> 格式。
In `@assets/skills-zh/comet/reference/context-recovery.md`:
- Around line 9-13: 更新 context recovery 协议,先区分 Native 与 Classic workflow:Classic
继续使用 `comet state check <change-name> <phase> --recover`,Native 改用 `comet native
status/show/select` 对应的启动或恢复检查流程;同步调整英文版本,确保两种 workflow 的命令分流一致,并保留进入子 Skill
前确认公开 CLI 可用的步骤。
In `@assets/skills-zh/comet/reference/subagent-dispatch.md`:
- Around line 147-148: 为 task-checkoff 的两个命令示例中的任务文本参数加引号,分别更新 <plan-task-text>
和 <openspec-task-text> 的用法,确保包含空格的完整任务文本作为单个参数传递;保留现有 <plan-file> 和
<classic-change-dir>/tasks.md 参数结构不变。
In `@assets/skills/comet/rules/comet-phase-guard.en.md`:
- Around line 81-84: 统一 Design 阶段的操作顺序:在
assets/skills/comet/rules/comet-phase-guard.en.md 第81-84行,先完成 change 选择和入口验证,再执行
handoff 生成;在 assets/skills/comet/rules/comet-phase-guard.md
第81-84行同步相同调整,确保中英文规则一致,其余 brainstorming、Design Doc 和 guard 顺序保持不变。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9c042284-368e-44f2-8edc-178195eefa4d
📒 Files selected for processing (43)
CHANGELOG.mdassets/skills-zh/comet-build/SKILL.mdassets/skills-zh/comet-classic/SKILL.mdassets/skills-zh/comet-design/SKILL.mdassets/skills-zh/comet-hotfix/SKILL.mdassets/skills-zh/comet-native/SKILL.mdassets/skills-zh/comet-native/reference/commands.mdassets/skills-zh/comet-native/reference/recovery.mdassets/skills-zh/comet-tweak/SKILL.mdassets/skills-zh/comet/SKILL.mdassets/skills-zh/comet/reference/context-recovery.mdassets/skills-zh/comet/reference/scripts.mdassets/skills-zh/comet/reference/subagent-dispatch.mdassets/skills/comet-build/SKILL.mdassets/skills/comet-classic/SKILL.mdassets/skills/comet-hotfix/SKILL.mdassets/skills/comet-native/SKILL.mdassets/skills/comet-native/reference/commands.mdassets/skills/comet-native/reference/recovery.mdassets/skills/comet-tweak/SKILL.mdassets/skills/comet/SKILL.mdassets/skills/comet/reference/context-recovery.mdassets/skills/comet/reference/scripts.mdassets/skills/comet/reference/subagent-dispatch.mdassets/skills/comet/rules/comet-phase-guard.en.mdassets/skills/comet/rules/comet-phase-guard.mdassets/skills/comet/scripts/comet-hook-guard.mjsassets/skills/comet/scripts/comet-hook-router.mjsassets/skills/comet/scripts/comet-runtime.mjsbin/comet.jsbin/fast-runtime-router.jsconfig/repository-layout.jsondomains/comet-classic/classic-hook-guard.tsscripts/benchmark/runtime-coldstart-benchmark.mjsscripts/release/package-e2e.mjstest/app/fast-runtime-router.test.tstest/domains/comet-classic/classic-hook-guard.test.tstest/domains/comet-classic/comet-scripts.test.tstest/domains/comet-entry/comet-entry-skill.test.tstest/domains/comet-native/native-skill.test.tstest/domains/skill/skills.test.tstest/repository/native-runtime-assets.test.tstest/repository/repository-layout.test.ts
💤 Files with no reviewable changes (1)
- domains/comet-classic/classic-hook-guard.ts
🚧 Files skipped from review as they are similar to previous changes (8)
- test/repository/repository-layout.test.ts
- scripts/benchmark/runtime-coldstart-benchmark.mjs
- CHANGELOG.md
- assets/skills/comet-native/reference/recovery.md
- assets/skills/comet/scripts/comet-hook-guard.mjs
- assets/skills/comet/scripts/comet-hook-router.mjs
- config/repository-layout.json
- assets/skills/comet-build/SKILL.md
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
test/domains/comet-classic/comet-scripts.test.ts (1)
154-173: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win让 self-contained bundle 测试覆盖完整依赖边界。
测试名称已改为验证自包含 bundle,但 Lines 166-173 只检查 Runtime 文件存在、Node shebang 和不导入
comet-runtime.mjs。脚本仍可通过别名或其他本地文件导入而通过测试。请检查所有静态和动态本地导入,或验证 bundle 依赖图;否则该测试不能保护每命令独立 bundle 的发布契约。As per coding guidelines:
assets/skills/comet/scripts/**/*.mjs中每个 Classic 命令必须是独立、自包含的.mjsbundle。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/domains/comet-classic/comet-scripts.test.ts` around lines 154 - 173, Expand the self-contained bundle assertions in the test “keeps all Classic command scripts as self-contained bundles” to validate the complete dependency boundary: inspect or resolve every static and dynamic local import for each script in `sources`, rejecting aliases and imports of other local files, or verify the equivalent bundle dependency graph. Preserve the existing shebang and `comet-runtime.mjs` checks while enforcing that each Classic command under the scripts directory is independently runnable.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@assets/skills/comet-build/SKILL.md`:
- Line 228: Restore the mandatory Skill-loading wording in both
subagent-driven-development entries: in assets/skills/comet-build/SKILL.md at
lines 228-228, append “Skipping this step is prohibited.” after “Immediately
execute”; in assets/skills-zh/comet-build/SKILL.md at lines 228-228, add the
corresponding “禁止跳过此步骤。” wording.
In `@domains/comet-classic/classic-state-command.ts`:
- Around line 1130-1131: 在
test/domains/comet-classic/comet-scripts-recovery.test.ts 中补充
subagent-driven-development 且 subagent_dispatch 为 null 的三个回归用例:build_pause 为
plan-ready 且存在待办任务、tasks.md 存在待办任务、Superpowers plan 存在待办任务。每个用例都断言恢复输出包含 “Run
comet state set <change-name> subagent_dispatch confirmed, then continue from
the first unchecked task through subagent execution.”,并保持现有 confirmed 与常规恢复用例不变。
---
Nitpick comments:
In `@test/domains/comet-classic/comet-scripts.test.ts`:
- Around line 154-173: Expand the self-contained bundle assertions in the test
“keeps all Classic command scripts as self-contained bundles” to validate the
complete dependency boundary: inspect or resolve every static and dynamic local
import for each script in `sources`, rejecting aliases and imports of other
local files, or verify the equivalent bundle dependency graph. Preserve the
existing shebang and `comet-runtime.mjs` checks while enforcing that each
Classic command under the scripts directory is independently runnable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 6306de80-ad5c-45c3-bfed-31f42a66ce95
📒 Files selected for processing (40)
CHANGELOG.mdassets/skills-zh/comet-archive/SKILL.mdassets/skills-zh/comet-build/SKILL.mdassets/skills-zh/comet-classic/SKILL.mdassets/skills-zh/comet-design/SKILL.mdassets/skills-zh/comet-hotfix/SKILL.mdassets/skills-zh/comet-native/SKILL.mdassets/skills-zh/comet-tweak/SKILL.mdassets/skills-zh/comet-verify/SKILL.mdassets/skills-zh/comet/SKILL.mdassets/skills-zh/comet/reference/comet-yaml-fields.mdassets/skills-zh/comet/reference/context-recovery.mdassets/skills-zh/comet/reference/decision-point.mdassets/skills-zh/comet/reference/scripts.mdassets/skills-zh/comet/reference/subagent-dispatch.mdassets/skills/comet-archive/SKILL.mdassets/skills/comet-build/SKILL.mdassets/skills/comet-classic/SKILL.mdassets/skills/comet-design/SKILL.mdassets/skills/comet-hotfix/SKILL.mdassets/skills/comet-native/SKILL.mdassets/skills/comet-tweak/SKILL.mdassets/skills/comet-verify/SKILL.mdassets/skills/comet/SKILL.mdassets/skills/comet/reference/comet-yaml-fields.mdassets/skills/comet/reference/context-recovery.mdassets/skills/comet/reference/decision-point.mdassets/skills/comet/reference/scripts.mdassets/skills/comet/reference/subagent-dispatch.mdassets/skills/comet/rules/comet-phase-guard.en.mdassets/skills/comet/rules/comet-phase-guard.mdassets/skills/comet/scripts/comet-guard.mjsassets/skills/comet/scripts/comet-runtime.mjsassets/skills/comet/scripts/comet-state.mjsdomains/comet-classic/classic-guard.tsdomains/comet-classic/classic-state-command.tstest/domains/comet-classic/comet-scripts-recovery.test.tstest/domains/comet-classic/comet-scripts.test.tstest/domains/skill/skills.test.tswebsite
🚧 Files skipped from review as they are similar to previous changes (16)
- assets/skills/comet-native/SKILL.md
- assets/skills-zh/comet/SKILL.md
- website
- assets/skills-zh/comet/reference/context-recovery.md
- assets/skills-zh/comet/reference/scripts.md
- CHANGELOG.md
- assets/skills/comet/SKILL.md
- assets/skills/comet/reference/context-recovery.md
- assets/skills/comet/rules/comet-phase-guard.en.md
- assets/skills/comet/rules/comet-phase-guard.md
- assets/skills-zh/comet-classic/SKILL.md
- assets/skills/comet/reference/subagent-dispatch.md
- assets/skills-zh/comet-native/SKILL.md
- assets/skills/comet/scripts/comet-state.mjs
- assets/skills/comet/scripts/comet-guard.mjs
- assets/skills/comet/reference/scripts.md
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #263 +/- ##
==========================================
+ Coverage 74.33% 74.82% +0.49%
==========================================
Files 198 235 +37
Lines 21396 22117 +721
Branches 6834 7040 +206
==========================================
+ Hits 15905 16550 +645
- Misses 2852 2855 +3
- Partials 2639 2712 +73
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
✨ Summary
🎯 Scope
init,status,doctor,update)assets/skills/,assets/skills-zh/)assets/skills/comet/scripts/)🧪 Testing
pnpm buildpnpm lintpnpm run lint:architecturepnpm format:checkpnpm testpnpm test -- test/domains/comet-classic/comet-scripts.test.ts✅ Checklist
fix: handle project-scope initREADME.md,README-zh.md, orCONTRIBUTING.mdCHANGELOG.mdis updated when behavior changesassets/manifest.jsonand relevant tests👀 Notes for Reviewers
Summary by Sourcery
Refresh dashboard UI with a new layout and theme, extend uninstall behavior to selectively remove Classic/Native/Superpowers skills, and tighten dashboard project discovery and snapshot behavior with supporting tests.
New Features:
Enhancements:
Tests:
Summary by CodeRabbit