xiaohongshu
xiaohongshu
ln-630-test-auditor
Test suite audit coordinator (L2). Delegates to 5 workers (Business Logic, E2E, Value, Coverage, Isolation). Aggregates results, creates Linear task in Epic 0.
Full skill instructions
Coordinates comprehensive test suite audit across 6 quality categories using 5 specialized workers.
"Write tests. Not too many. Mostly integration." — Kent Beck "Test based on risk, not coverage." — ISO 29119
Key Principles:
Inputs: Codebase root directory
Actions:
**/*.test.* (Jest, Vitest)**/*.spec.* (Mocha, Jasmine)**/__tests__/**/* (Jest convention)Output: testFilesMetadata — list of test files with basic stats
Goal: Gather testing best practices context ONCE, share with all workers
Actions:
contextStore with:
Output: contextStore — shared context for all workers
Key Benefit: Context gathered ONCE → passed to all workers → token-efficient
Purpose: Detect project domains from production code folder structure for domain-aware coverage analysis.
Algorithm: (same as ln-360-codebase-auditor)
Priority 1: Explicit domain folders
src/domains/*/, src/features/*/, src/modules/*/packages/*/, libs/*/, apps/*/Priority 2: Top-level src/ folders*
src/users/, src/orders/, src/payments/utils, shared, common, lib, helpers, config, types, interfaces, constants, middleware, infrastructure, corePriority 3: Fallback to global mode
domain_mode = "global"Heuristics for domain detection:
| Heuristic | Indicator | Example |
|---|---|---|
| File count | >5 files in folder | src/users/ with 12 files |
| Structure | controllers/, services/, models/ present | MVC/Clean Architecture |
| Barrel export | index.ts/index.js exists | Module pattern |
| README | README.md describes domain | Domain documentation |
Output:
{
"domain_mode": "domain-aware",
"all_domains": [
{"name": "users", "path": "src/users", "file_count": 45},
{"name": "orders", "path": "src/orders", "file_count": 32},
{"name": "shared", "path": "src/shared", "file_count": 15, "is_shared": true}
]
}
Shared folder handling:
shared, common, utils, lib, core → mark is_shared: trueCRITICAL: All delegations use Task tool with
subagent_type: "general-purpose"for context isolation.
Prompt template:
Task(description: "Test audit via ln-63X",
prompt: "Execute ln-63X-{worker}. Read skill from ln-63X-{worker}/SKILL.md. Context: {contextStore}",
subagent_type: "general-purpose")
Anti-Patterns:
Global workers scan entire test suite (not domain-aware):
| # | Worker | Category | What It Audits |
|---|---|---|---|
| 1 | ln-631-test-business-logic-auditor | Business Logic Focus | Framework/Library tests (Prisma, Express, bcrypt, JWT, axios, React hooks) → REMOVE |
| 2 | ln-632-test-e2e-priority-auditor | E2E Priority | E2E baseline (2/endpoint), Pyramid validation, Missing E2E tests |
| 3 | ln-633-test-value-auditor | Risk-Based Value | Usefulness Score = Impact × Probability<br>Decisions: ≥15 KEEP, 10-14 REVIEW, <10 REMOVE |
| 5 | ln-635-test-isolation-auditor | Isolation + Anti-Patterns | Isolation (6 categories), Determinism, Anti-Patterns (6 types) |
Invocation (4 workers in PARALLEL):
FOR EACH worker IN [ln-631, ln-632, ln-633, ln-635]:
Task(description: "Test audit via " + worker,
prompt: "Execute " + worker + ". Read skill. Context: " + JSON.stringify(contextStore),
subagent_type: "general-purpose")
Domain-aware worker runs once per domain:
| # | Worker | Category | What It Audits |
|---|---|---|---|
| 4 | ln-634-test-coverage-auditor | Coverage Gaps | Missing tests for critical paths per domain (Money 20+, Security 20+, Data 15+, Core Flows 15+) |
Invocation:
IF domain_mode == "domain-aware":
FOR EACH domain IN all_domains:
domain_context = {
...contextStore,
domain_mode: "domain-aware",
current_domain: { name: domain.name, path: domain.path }
}
Skill(skill="ln-634-test-coverage-auditor", args=JSON.stringify(domain_context))
ELSE:
// Fallback: invoke once for entire codebase (global mode)
Skill(skill="ln-634-test-coverage-auditor", args=JSON.stringify(contextStore))
Parallelism strategy:
Each worker returns structured JSON:
{
"category": "Business Logic Focus",
"score": 7,
"total_issues": 12,
"findings": [
{
"severity": "MEDIUM",
"test_file": "auth.test.ts",
"test_name": "bcrypt hashes password",
"decision": "REMOVE",
"usefulness_score": 3,
"reason": "Tests library behavior, not OUR code",
"effort": "S"
}
]
}
Goal: Merge all worker results into unified Test Suite Audit Report with domain grouping
Actions:
Findings grouping:
## Test Suite Audit Report - [DATE]
### Executive Summary
[2-3 sentences: test suite health, major issues, key recommendations]
### Test Count by Decision
| Decision | Count | % |
|----------|-------|---|
| KEEP | X | X% |
| REVIEW | X | X% |
| REMOVE | X | X% |
| **Total** | **X** | |
### Compliance Score
| Category | Score | Notes |
|----------|-------|-------|
| Business Logic Focus | X/10 | X framework tests found |
| E2E Priority | X/10 | X E2E, X Integration, X Unit |
| Risk-Based Value | X/10 | X tests with Priority <10 |
| Coverage Gaps | X/10 | X critical paths untested |
| Test Isolation | X/10 | X isolation issues |
| Anti-Patterns | X/10 | X anti-patterns found |
| **Overall** | **X/10** | |
### Domain Coverage Summary (NEW - if domain_mode="domain-aware")
| Domain | Critical Paths | Tested | Coverage % | Gaps |
|--------|---------------|--------|------------|------|
| users | 8 | 6 | 75% | 2 |
| orders | 12 | 8 | 67% | 4 |
| payments | 6 | 5 | 83% | 1 |
| **Total** | **26** | **19** | **73%** | **7** |
### Audit Findings
| Severity | Location | Issue | Violated Principle | Recommendation | Effort |
|----------|----------|-------|-------------------|----------------|--------|
| **CRITICAL** | - | Missing E2E for payment with discount | #3: E2E for critical paths only (Money Priority 25) | Add E2E test: successful payment + discount edge cases | M |
| **HIGH** | auth.test.ts:45 | Test "bcrypt hashes password" (Score 3) | #1: Test business logic, not frameworks | Delete — bcrypt already tested by maintainers | S |
| **HIGH** | db.test.ts:78 | Test "Prisma findMany returns array" (Score 4) | #1: Test business logic, not frameworks | Delete — Prisma ORM already tested | S |
| **HIGH** | - | Missing Unit test for tax calculation edge cases | #5: Every test must justify existence (Impact 5 × Probability 4 = 20) | Add Unit tests for country-specific tax rules | M |
| **MEDIUM** | utils.test.ts:23 | Test "validateEmail returns true" (Score 12) | #4: Usefulness over quantity | Review: if E2E login covers → DELETE; else KEEP | S |
| **MEDIUM** | order.test.ts:200-350 | Giant test (>100 lines) | Anti-pattern: The Giant | Split into focused tests (one scenario per test) | M |
| **MEDIUM** | test.ts:45 | No assertions in test | Anti-pattern: The Liar | Add specific assertions or delete test | S |
| **LOW** | auth.test.ts | Only positive login scenarios | Anti-pattern: Happy Path Only | Add negative tests (invalid credentials, expired tokens) | M |
### Coverage Gaps by Domain (if domain_mode="domain-aware")
#### Domain: users (src/users/)
| Severity | Category | Missing Test | Location | Priority | Effort |
|----------|----------|--------------|----------|----------|--------|
| CRITICAL | Money | E2E: processRefund() | services/user.ts:120 | 20 | M |
| HIGH | Security | Unit: validatePermissions() | middleware/auth.ts:45 | 18 | S |
#### Domain: orders (src/orders/)
| Severity | Category | Missing Test | Location | Priority | Effort |
|----------|----------|--------------|----------|----------|--------|
| CRITICAL | Money | E2E: applyDiscount() | services/order.ts:45 | 25 | M |
| HIGH | Data | Integration: orderTransaction() | repositories/order.ts:78 | 16 | M |
Each worker:
contextStore with testing best practicestestFilesMetadata with test file listToken Efficiency:
Workers:
Reference:
Version: 4.0.0 Last Updated: 2025-12-23
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience