跳到正文
cccskills
免费在 GitHub 公开

tutti-test-audit

Audit and improve Tutti tests by identifying the behavior each test protects and the realistic faults it should detect. Choose the appropriate test scope, check for duplicate coverage, control setup, and verify that required CI jobs execute the tests.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Audit, design, write, materially revise, or remove Tutti tests. Use whenever Codex changes or reviews unit, component, conformance, integration, regression, platform, or repository tests; enforce a protected product contract, credible failure, correct owning boundary, negative-control evidence, overlap review, deterministic setup, and an executing CI lane.

查看安装方法

适用场景

  • Reviewing whether existing tests catch meaningful failures
  • Designing regression tests for a confirmed bug
  • Consolidating duplicate or weak tests
  • Checking CI selection and native-platform test execution

包含的文件(2)

  • SKILL.md7.8 KB
  • agents/openai.yaml230 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Tutti Test Audit

Make every changed test earn its maintenance cost. A green test, a coverage increase, or a larger test count is not a quality verdict.

Read the root and closest scoped AGENTS.md, then read docs/conventions/unit-testing.md before a non-trivial test change or review. Follow docs/conventions/testing.md#validation-selection for commands and validation scope.

Establish the evidence map

Before editing, inspect:

  1. the production owner, public entry point, relevant caller and callee;
  2. sibling implementations that share the same invariant;
  3. existing tests, fixtures, conformance suites, and repository checks;
  4. the changed-aware and platform lane that will select the evidence;
  5. relevant history for a regression or a suspicious existing test.

For Agent Host lifecycle semantics, also read packages/agent/host/README.md and start with the conformance contract. Do not reimplement lifecycle tests in an adapter.

Pass the authoring gate

Answer all six questions before adding or materially rewriting a test:

  1. Protected contract: What observable behavior, invariant, compatibility promise, or prior failure matters?
  2. Credible failure: What plausible faulty implementation must make the test fail?
  3. Coverage gap: Why would existing evidence not catch that failure? Can an existing table, scenario, or fixture express it without duplication?
  4. Owner and observer: Which module owns the decision, and what is the lowest boundary that can observe the risk without mocking it away?
  5. Production seam: Does the test require an export, flag, wrapper, global, or injection hook that no production caller needs? If so, move to the real boundary or redesign the owner.
  6. Execution: Which blocking lane selects the test, and which native OS must execute it?

A missing answer means the test is not ready. “No new test” is a valid outcome when stronger existing evidence already protects the contract or the proposed assertion only restates a type, literal, implementation detail, or presentation choice.

Choose the proof shape

  • Extend an existing table or conformance scenario when it owns the same contract and fixture.
  • Add a new scenario when the behavior, failure mechanism, setup, or execution lane is independently meaningful.
  • Move upward to a component, narrow integration, conformance, or E2E boundary when a unit double would replace the semantics under test.
  • Use a repository check, not a unit test, when source structure, imports, generated artifacts, manifests, or architecture are the actual contract.
  • Keep visual styling in visual evidence unless styling changes native behavior such as pointer ownership or window dragging.

Prefer one vertical proof through the owning boundary plus narrow tests for important decision partitions over many stub-backed branch tests.

Build sensitive evidence

For a confirmed bug, capture the failing reproduction before the fix whenever possible. The regression test must fail on pre-fix behavior for the intended reason and pass after the owner-boundary repair. If the old revision cannot be run safely, temporarily inject or restore the faulty decision as a local negative control and report that limitation; never commit the mutation.

For new behavior, first demonstrate that the focused test fails because the contract is absent, not because setup, imports, or fixtures are broken.

For a read-only audit, do not edit production code merely to manufacture a negative control. Name the smallest plausible faulty implementation, determine whether the current assertions would detect it, and label that sensitivity unverified when it cannot be executed safely.

Then:

  • assert stable outcomes and important non-effects;
  • include neighboring valid, rejection, cleanup, retry, or preservation cases only when they address a credible risk;
  • use real isolated SQLite, filesystem, Git, HTTP, IPC, parser, or process boundaries when their semantics are the subject;
  • keep external doubles narrow and fail closed on unexpected calls;
  • coordinate concurrency with events, channels, barriers, or latches rather than sleeps or lucky elapsed-time bounds;
  • control clocks, IDs, randomness, ports, user state, credentials, globals, listeners, timers, processes, and temporary resources;
  • assert call counts only when count is itself a contract such as idempotency, single-flight, or at-most-once dispatch.

Apply Tutti routing

  • Session, Turn, Goal, runtime-operation, and recovery semantics start in packages/agent/host/conformance; consumers provide drivers.
  • Adapter tests own transport, DTO, authorization, query, presentation, and product-policy behavior only.
  • SQLite, filesystem, path, shell, executable, process, signal, permission, and native API behavior cross the real isolated receiver boundary.
  • UI behavior drives accessible keyboard, pointer, focus, and state transitions and observes callbacks or user-visible state.
  • HTTP, IPC, and provider protocol tests cross the real parser, middleware, or codec boundary when receiver behavior is the risk.
  • Platform-dependent behavior runs on the native platform. A serialized request shape or a skipped Linux test is not Windows proof.

Audit existing tests

Treat these as review candidates, not automatic deletions:

  • no meaningful assertion, self-comparison, or only “does not throw”;
  • copied production algorithm, catalog, defaults, or current inventory;
  • source strings or regexes presented as runtime behavior proof;
  • private call-shape or mocked call-graph assertions;
  • static render, class, style, SVG path, or incidental DOM assertions;
  • duplicate coverage weaker than an existing boundary scenario;
  • sleeps, polling delays, pass-on-retry, silent skips, or zero-selected lanes;
  • test-only production exports, wrappers, flags, globals, or dead code.

Before weakening or removing a test, identify the failure it can actually catch, its history, and the stronger evidence that remains. Preserve independent public API, protocol, config, migration, storage, security, platform, generated, release, and architecture contracts even when they are static or slow.

Classify each candidate as:

  • keep — protects an independent contract;
  • strengthen or move — right risk, wrong oracle or boundary;
  • consolidate — useful contract already has a canonical owner;
  • delete — no credible failure remains protected, including any test-only production seam it kept alive.

Validate and hand off

  1. Run the smallest owner and sibling tests that prove the contract.
  2. For authored behavior changes, demonstrate the pre-fix failure or another credible negative control. For a read-only audit, report the failure model without mutating the checkout.
  3. Apply the repository validation-selection policy; verify the intended lane selected and ran non-zero evidence.
  4. Run native-platform proof when required, or name the remaining manual gate.
  5. Inspect the final diff for duplicated setup, weakened assertions, snapshot churn, leaked resources, and unnecessary production seams.

Report this compact evidence for non-trivial test changes:

Test evidence

- Protected contract or prior failure:
- Credible faulty implementation / negative control:
- Existing coverage gap:
- Owning seam and test level:
- Observable outcomes and important non-effects:
- Blocking lane and native OS, when relevant:
- Residual risk left to integration, E2E, visual, or manual proof:

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Investigate slow interactions and rendering using performance traces, which record execution events, alongside source code. Identify the responsible code, distinguish measurements from hypotheses, and guide fixes that preserve behavior, with tests and comparable recordings for verification.

中文简介正在准备中。当前显示英语简介。

  • Investigating scroll or resize stutter
  • Finding causes of excessive React rendering
  • Auditing reported profiling results
tutti-os/tutti38462026年10月8日 更新

Build or extend a Tutti app with a web interface, server, and shared data contracts. The skill guides local agent execution, dynamic agent selection, app tools, localization checks, packaging, and release workflows.

中文简介正在准备中。当前显示英语简介。

  • Building a Tutti app with local agent execution
  • Restructuring an existing web and server app for Tutti
  • Adding agent selection and app-specific tools
tutti-os/tutti38462026年10月8日 更新

Set up and troubleshoot GitHub Actions workflows that publish Tutti apps. Covers release packaging, versioning, hosted release metadata, and catalog updates, including repairs when a published app does not appear in App Center.

中文简介正在准备中。当前显示英语简介。

  • Set up a Tutti app release workflow
  • Repair missing apps in App Center
  • Separate staging and production releases
tutti-os/tutti38462026年10月8日 更新

Review Tutti code changes or a named module for structural problems, unclear ownership, dependency direction, and duplicated event infrastructure. A planner scopes the review, supports sub-agent assignments, and helps produce actionable findings ordered by severity.

中文简介正在准备中。当前显示英语简介。

  • Reviewing the architecture of a current git diff
  • Inspecting a named module without current changes
  • Checking ownership of event infrastructure
tutti-os/tutti38462026年10月8日 更新

Run existing Tutti scenarios against a live agent provider, audit the captured session records, and replay them in a fresh isolated environment. Check evidence for each tested action, diagnose mismatches, and prepare verified recordings for publication.

中文简介正在准备中。当前显示英语简介。

  • Recording existing scenarios against a live provider
  • Diagnosing transport or session-state replay mismatches
  • Checking replay evidence for each tested action
tutti-os/tutti38462026年10月8日 更新

Reuse and maintain components in @tutti-os/ui-system, or move existing interface elements into shared components. Preserve their appearance and interactions while applying shared design rules, defining reusable interfaces, and maintaining component metadata and rendered examples.

中文简介正在准备中。当前显示英语简介。

  • Finding shared components and their metadata
  • Replacing local interface elements with shared components
  • Moving existing business UI into reusable components
tutti-os/tutti38462026年10月8日 更新

查看 tutti-os 的全部技能

报告此技能的问题