用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/drmoisan/drm-copilot --skill general-unit-test命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Admit one new item into a running parallel run — preparation via a preparation-mode child orchestrator run, conflict-edge computation against all items including in-flight ones, and the admission decision that either places the item in the current cohort or defers it and recolors the unstarted subgraph. Appends exactly one mutations[] entry. In-flight items are never moved.
Execute a prepared parallel run for the parallel-orchestrator agent — cohort scheduling under a max_concurrency cap, per-item fan-out onto isolated worktrees branched from origin/main, per-item merge to main after durably confirming CI green, worktree cleanup, and the generated parallel-status.md projection. There is no integration branch and no final integration pull request.
Prepare a set of thematically unrelated items for concurrent execution before any execution begins - item intake over issue numbers and potential-entry paths, concurrent preparation-mode child orchestrator delegations, blast-radius computation and V1-V3 validation, cohort seeding with a recomputation-parity check, run-manifest and planner-checkpoint authoring, and the parallel-orchestrator kickoff artifact.
基于 SOC 职业分类
正在显示 SKILL.md
| name | general-unit-test |
| description | Cross-language unit test policy for all files. |
| paths | ["**"] |
Source: legacy Claude rule general-unit-test.
This rule file summarizes the cross-language unit test policy for this repository.
Every unit test must satisfy all five of these properties:
.agents/skills/quality-tiers.md for the full tier system.tests/) so metrics reflect application code, not tests.Protocol-only modules consumed only under TYPE_CHECKING, TypeScript interface/type-only files, and C# interface-only files. Such modules legitimately report 0% executable coverage and may be excluded from measurement. This is a clarification only; it does not lower any coverage threshold.No production file may be excluded from coverage measurement. Every production source file is in the denominator of the coverage metric, regardless of whether its lines are reachable in the test environment.
The correct response to a file that contains untestable lines is to refactor it — extract all logic into host-neutral, testable modules and leave only the thinnest possible wiring in the host-bound entry point. The entry point's uncovered lines then represent a real and visible cost in the coverage metric, which creates ongoing pressure to keep those files minimal.
Permitted exclude entries (non-production paths only):
dist/**, lib/**, lib-amd/**.**/*.test.ts, tests/**, src/test-support/**.jest.config.cjs, eslint.config.mjs, .dependency-cruiser.cjs, webpack.config.js.node_modules/**.Prohibited exclude entries:
src/ that contains production runtime code, regardless of whether it is auto-generated, host-bound, or difficult to test.Enforcement: Feature-review agents must treat any exclude entry that matches a production source path as a Blocking finding.
For each unit or behavior, tests must cover:
Organize each test into three sections:
Assertions must produce clear, actionable failure messages.
Test files must live in a tests/ directory tree that mirrors the production source structure. The test for src/foo/bar.ts belongs at tests/foo/bar.test.ts; the test for scripts/powershell/Foo.ps1 belongs at tests/scripts/powershell/Foo.Tests.ps1. Language-specific rules may add further naming conventions (framework suffix, file extension) on top of this universal layout requirement.
Colocation — placing test files alongside production source files in src/ or equivalent — is not permitted. An agent that creates or moves a test file into the production source tree has violated this rule.
The following test categories apply across the repository, with tier-dependent obligations per .agents/skills/quality-tiers.md:
fast-check (TypeScript) or hypothesis (Python) where applicable.All test code must be deterministic. The following infrastructure requirements apply uniformly:
Clock interface (TypeScript) or TimeProvider (.NET) injected into code under test. Do not read wall-clock time directly in production code under test.setTimeout, Thread.Sleep, Task.Delay, real wall-clock waits, and Date.now() outside the clock interface are prohibited in tests.FakeTimeProvider — async tests must use the framework's fake-timer facility (jest.useFakeTimers() for Jest, FakeTimeProvider for .NET) to advance simulated time deterministically.