Skip to content

skills: Definition-of-done wording for packages/cli cards — owe the unit vitest tier locally, declare integration to CI (governed half of #13504) #14539

Description

@os-trump

Reader: the domain:skills seat (owner of the governed instruction surfaces: AGENTS.md, .claude/agents/os-dev.md, .claude/skills/**). Filed by the domain:cli execution seat (#6024, session session_016yfqQh2dBgPAymYd7xipza) as the cross-seat half of #13504 — that seat does not flip, enqueue or arm governed PRs. domain:* and type left for triage.

Provenance

Maintainer ruling on #13504 (director comment 5486885168, 2026-09-01): the packages/cli suite is split into a local unit tier and a CI-mandatory integration tier. The code half is PR #14536 (Part of #13504): packages/cli/vitest.config.ts gains test.projects = [unit, integration] (both extends: true), an exported INTEGRATION_FILES list (70 files, keyed on behaviour — spawns the CLI or boots a kernel/driver — not on the file name), and a partition pin packages/cli/test/vitest-tiers-partition.test.ts that reds when a test file falls in no tier or in both.

This card is the instruction half: the Definition-of-done sentence that tells a packages/cli card which tier it owes locally. Without it the split exists but no dev reads it — .claude/agents/os-dev.md "Definition of done" still says "run the affected package's pnpm test", which for packages/cli is the 17–24 minute whole suite the ruling set out to stop paying on every card.

Proposed wording (verbatim from PR #14536, section "Proposed Definition-of-done wording for packages/cli cards")

packages/cli cards owe the unit tier locally and declare the integration tier to CI. The local Definition-of-done step is pnpm --filter @objectstack/cli exec vitest run --project unit (minutes-scale; the tier is measured, not named — vitest.config.ts carries the predicate and test/vitest-tiers-partition.test.ts keeps it honest). Run --project integration locally only when the diff touches a file in that tier, a spawned entry (bin/, test/helpers/serve-process.ts) or a driver/kernel boot path, and say so in the report; otherwise state "integration tier declared to CI" — pnpm test runs both tiers there. Adding a test that spawns the CLI or boots a driver? Add it to INTEGRATION_FILES; the pin tells you when you forgot.

Where it lands is the skills seat's call — the os-dev agent's Definition-of-done list, the AGENTS.md test-step section, or both with one pointing at the other. The wording is a proposal, not a ruling; only the split itself is ruled. Language per the repo invariant (the surrounding os-dev text is Chinese; the command lines stay as they are).

Executable criterion

git grep -n -e '--project unit' origin/main -- AGENTS.md .claude/agents/os-dev.md returns at least one hit, and the hit sits in the section a packages/cli dev reads for its local test step. Read on origin/main @ 99b8faf8f937 (2026-09-02T10:3xZ): 0 hits; positive control on the same read: git grep -n -e 'Definition of done' -e 'pnpm test' origin/main -- AGENTS.md .claude/agents/os-dev.md hits .claude/agents/os-dev.md:298 (the "Definition of done" heading), :301 (the pnpm test step) and AGENTS.md:1107.

Measured numbers behind the ask

From PR #14536 (dev's host, shared verify lock, --maxWorkers=2): fast tier 159 files / 2077 tests / 4m28s wall, against 17m23s (#13872) and 23m58s (#13504) for the whole suite on the same box. The tier keeps ~8.5% of test-body time while holding 159 of 229 files.

Sequencing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions