[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7C08M68DA99AH4MZ1WH1HEE":3,"skill-same:01M7C08M68DA99AH4MZ1WH1HEE":44},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7C08M68DA99AH4MZ1WH1HEE","test-suite-analysis",null,"Layer 1 skill for extracting behavioral intelligence from test suites. Framework detection, test code reading strategy, test execution strategy, behavioral claim extraction with Given\u002FWhen\u002FThen mapping, e2e vs unit value classification. Loaded by the analyzer agent during Layer 1.","zak-keown\u002Fmoe","zak-keown","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F320717241?v=4","01M7BZFXME0NW6TQX0H7AZM2KS","01M7BZFXN32VR0JN5AATRD53H4",0,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe-backstory\u002F.cursor-plugin\u002Fskills\u002Ftest-suite-analysis\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: test-suite-analysis\ndescription: Layer 1 skill for extracting behavioral intelligence from test suites. Framework detection, test code reading strategy, test execution strategy, behavioral claim extraction with Given\u002FWhen\u002FThen mapping, e2e vs unit value classification. Loaded by the analyzer agent during Layer 1.\n---\n\n# Test Suite Analysis Methodology\n\nExtract behavioral intelligence from test suites. Tests are executable specifications -- they encode what the system MUST do in a form that can be verified. A passing test is a confirmed behavioral contract.\n\n## When to Use This Mode\n\nTest suite analysis activates when:\n- The target repository contains test files\n- The discovery inventory identifies test files in the project\n- Other modes discover test directories during analysis\n\nThis mode runs independently of all other intelligence sources. All output is **RAW** (test code references internal implementation details).\n\n## Why Tests Are High-Value Intelligence\n\nTests are the only source type that is simultaneously:\n- **Behavioral** -- they describe what the system does, not how it's built\n- **Executable** -- they can be run to confirm the behavior still holds\n- **Specific** -- they provide exact inputs, expected outputs, and edge cases\n- **Maintained** -- failing tests get fixed, so they track current behavior\n\nA single end-to-end test is worth more than a page of documentation because the test is verified by CI on every commit.\n\n## Framework Detection\n\nIdentify the test framework(s) in use before analyzing test code. Different frameworks use different assertion styles, test organization, and execution models.\n\n| Framework | Language | Detection Signals |\n|-----------|----------|-------------------|\n| Jest | JavaScript\u002FTypeScript | `jest.config.*`, `describe(` \u002F `it(` \u002F `expect(` in `__tests__\u002F` or `*.test.*`, `@jest\u002Fglobals` imports |\n| Playwright | JavaScript\u002FTypeScript | `playwright.config.*`, `@playwright\u002Ftest` imports, `page.goto(` \u002F `page.click(` |\n| Cypress | JavaScript\u002FTypeScript | `cypress.config.*`, `cypress\u002F` directory, `cy.visit(` \u002F `cy.get(` |\n| pytest | Python | `conftest.py`, `pytest.ini` \u002F `pyproject.toml` with `[tool.pytest]`, files named `test_*.py` \u002F `*_test.py`, `assert` statements |\n| Go testing | Go | `*_test.go` files, `testing.T` \u002F `testing.B` parameters, `go test` in CI config |\n| RSpec | Ruby | `.rspec`, `spec\u002F` directory, `spec_helper.rb`, `describe` \u002F `it` \u002F `expect` blocks |\n| JUnit | Java\u002FKotlin | `@Test` annotations, `src\u002Ftest\u002F` directory, `assertEquals` \u002F `assertThat` calls |\n| XCTest | Swift\u002FObjective-C | `XCTestCase` subclasses, `func test*()` methods, `XCTAssert*` calls |\n| Catch2 | C++ | `#include \u003Ccatch2\u002Fcatch.hpp>`, `TEST_CASE(` \u002F `SECTION(` \u002F `REQUIRE(` macros |\n\n### Detection Strategy\n\n```bash\n# Check for test configuration files\nls -la jest.config.* playwright.config.* cypress.config.* .rspec pytest.ini 2>\u002Fdev\u002Fnull\n\n# Check pyproject.toml for pytest config\ngrep -l '\\[tool\\.pytest' pyproject.toml 2>\u002Fdev\u002Fnull\n\n# Find test directories\nfind . -maxdepth 3 -type d \\( -name \"__tests__\" -o -name \"test\" -o -name \"tests\" -o -name \"spec\" -o -name \"cypress\" \\) 2>\u002Fdev\u002Fnull\n\n# Find test files by naming convention\nfind . -maxdepth 4 -type f \\( -name \"*.test.*\" -o -name \"*.spec.*\" -o -name \"test_*\" -o -name \"*_test.*\" \\) 2>\u002Fdev\u002Fnull | head -50\n\n# Count test files per pattern\necho \"Jest\u002FMocha-style:\" && find . -name \"*.test.*\" -o -name \"*.spec.*\" 2>\u002Fdev\u002Fnull | wc -l\necho \"Python-style:\" && find . -name \"test_*.py\" -o -name \"*_test.py\" 2>\u002Fdev\u002Fnull | wc -l\necho \"Go-style:\" && find . -name \"*_test.go\" 2>\u002Fdev\u002Fnull | wc -l\necho \"JUnit-style:\" && find . -path \"*\u002Fsrc\u002Ftest\u002F*\" -name \"*.java\" 2>\u002Fdev\u002Fnull | wc -l\n```\n\nWrite detection results to `workspace\u002Fraw\u002Ftest-evidence\u002Ftest-inventory.md`.\n\n## Strategy 1: Read Test Code\n\nRead test files directly and extract behavioral claims. This strategy always works -- it requires no working environment, no dependencies, and no execution.\n\n### 1.1 Test File Inventory\n\n```bash\n# Build complete inventory of test files with metadata\nfind . -type f \\( -name \"*.test.*\" -o -name \"*.spec.*\" -o -name \"test_*\" -o -name \"*_test.*\" -o -name \"*_test.go\" \\) 2>\u002Fdev\u002Fnull | while read f; do\n  lines=$(wc -l \u003C \"$f\")\n  echo \"$lines $f\"\ndone | sort -rn\n```\n\n### 1.2 Assertion Extraction\n\nFor each test file, extract the assertions -- these are the behavioral contracts:\n\n```bash\n# Jest\u002FMocha assertions\ngrep -n \"expect\\|assert\\|should\\|toBe\\|toEqual\\|toContain\\|toThrow\\|toHaveBeenCalled\" \"$TEST_FILE\"\n\n# pytest assertions\ngrep -n \"assert \\|assert_\\|assertEqual\\|assertRaises\\|pytest.raises\" \"$TEST_FILE\"\n\n# Go test assertions\ngrep -n \"t\\.Error\\|t\\.Fatal\\|t\\.Log\\|assert\\.\\|require\\.\" \"$TEST_FILE\"\n\n# RSpec assertions\ngrep -n \"expect\\|should\\|is_expected\\|eq(\\|include(\\|raise_error\" \"$TEST_FILE\"\n```\n\n### 1.3 Given\u002FWhen\u002FThen Extraction\n\nTransform test code into behavioral claims using Given\u002FWhen\u002FThen structure:\n\nFor each test case (`it(`, `test(`, `func Test*`, `def test_*`), extract:\n\n- **Given** (setup\u002Fpreconditions): fixture creation, mock configuration, state initialization\n- **When** (action): the function call, API request, or user action being tested\n- **Then** (assertions): the expected outcomes encoded in assertions\n\n```markdown\n## Test: \"should reject expired tokens\"\n\n**Given:** A token with expiry date in the past\n**When:** The token is validated via `checkPermissions()`\n**Then:**\n- Returns false\n- Sets error to \"TOKEN_EXPIRED\"\n- Does not call the downstream service\n\n**Source:** `auth.test.ts:45-62`\n**Confidence:** confirmed (test assertion is an explicit behavioral contract)\n```\n\n### 1.4 E2E vs Unit Value Classification\n\nNot all tests carry equal behavioral intelligence value:\n\n| Test Type | Detection Signals | Behavioral Value |\n|-----------|-------------------|-----------------|\n| End-to-end (e2e) | Browser automation, HTTP requests to running server, multi-service interaction | **High** -- tests the system as a user experiences it |\n| Integration | Database connections, external service calls, multi-module interaction | **High** -- tests behavioral contracts between components |\n| Functional | Single module tested with real dependencies | **Medium** -- tests module-level behavioral contracts |\n| Unit | Mocked dependencies, isolated function tests | **Lower** -- tests implementation contracts, not user-visible behavior |\n| Snapshot | `toMatchSnapshot()`, `toMatchInlineSnapshot()` | **Low** -- captures output format, not behavioral intent |\n\nFocus extraction effort on e2e and integration tests first. Unit tests fill in details after the behavioral surface is mapped.\n\n### 1.5 Edge Case Mining\n\nTests are the richest source of edge case documentation. Look for:\n\n```bash\n# Boundary value tests\ngrep -n \"boundary\\|limit\\|max\\|min\\|overflow\\|underflow\\|zero\\|empty\\|null\\|undefined\" \"$TEST_FILE\" -i\n\n# Error condition tests\ngrep -n \"error\\|fail\\|reject\\|throw\\|invalid\\|unauthorized\\|forbidden\\|timeout\" \"$TEST_FILE\" -i\n\n# Concurrency tests\ngrep -n \"concurrent\\|parallel\\|race\\|deadlock\\|lock\\|mutex\\|async\\|await\" \"$TEST_FILE\" -i\n\n# Special character and encoding tests\ngrep -n \"unicode\\|utf\\|encoding\\|escape\\|special\\|whitespace\" \"$TEST_FILE\" -i\n```\n\nWrite behavioral claims to `workspace\u002Fraw\u002Ftest-evidence\u002Fbehavioral-claims.md`.\nWrite e2e flow documentation to `workspace\u002Fraw\u002Ftest-evidence\u002Fe2e-flows.md`.\nWrite edge case documentation to `workspace\u002Fraw\u002Ftest-evidence\u002Fedge-cases.md`.\n\n## Strategy 2: Run Test Suite\n\nExecute the test suite and observe its behavior. This strategy requires a working environment with all dependencies installed. It produces higher-confidence claims but has higher setup cost.\n\n### 2.1 Prerequisites\n\nBefore attempting test execution:\n- Verify the container has all dependencies installed\n- Check for required environment variables or config files\n- Look for test setup scripts (`beforeAll`, `setUp`, fixtures, factories)\n- Identify tests that require external services (databases, APIs)\n\n### 2.2 Execute with Maximum Verbosity\n\n```bash\n# Jest\nnpx jest --verbose --no-coverage 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n\n# pytest\npython -m pytest -v --tb=long 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n\n# Go\ngo test -v .\u002F... 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n\n# RSpec\nbundle exec rspec --format documentation 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n```\n\n### 2.3 Observe Runtime Behavior\n\nDuring test execution, capture:\n\n- **Network calls** -- tests that make HTTP requests reveal API contracts\n- **File I\u002FO** -- tests that read\u002Fwrite files reveal data format contracts\n- **Timing** -- slow tests may indicate external dependency interaction\n- **Failures** -- failed tests reveal behavioral regressions or environment-specific behavior\n- **Warnings** -- deprecation warnings and lint output reveal upcoming behavioral changes\n\n```bash\n# Capture network activity during tests (if strace\u002Fdtrace available)\nstrace -e trace=network -f npx jest 2> workspace\u002Fraw\u002Ftest-evidence\u002Fnetwork-trace.txt\n\n# Capture file I\u002FO during tests\nstrace -e trace=file -f npx jest 2> workspace\u002Fraw\u002Ftest-evidence\u002Ffile-trace.txt\n```\n\n### 2.4 Failure Analysis\n\nFailed tests are behavioral intelligence:\n- A failing test documents a behavioral contract that is currently violated\n- The expected value in the assertion documents what the behavior SHOULD be\n- The actual value documents what the behavior currently IS\n- The gap between expected and actual is a behavioral specification\n\nRecord every failure with:\n- Test name and location\n- Expected behavior (from the assertion)\n- Actual behavior (from the error output)\n- Whether this appears to be a genuine regression or an environment issue\n\n## Provenance Rules\n\n### Source Type\n\nAll claims from test suite analysis use `source=test-suite`:\n\n```markdown\n- Expired tokens are rejected with a TOKEN_EXPIRED error\n  \u003C!-- cite: source=test-suite, ref=src\u002Fauth\u002F__tests__\u002Fauth.test.ts:45-62, confidence=confirmed, agent=test-analyzer -->\n```\n\n### Confidence Levels\n\n- **confirmed** -- the test assertion explicitly encodes the behavioral claim AND the test passes (or the claim is directly readable from the test code regardless of execution)\n- **inferred** -- the behavioral claim is derived from test setup, fixture data, or mock configuration rather than direct assertion\n- **assumed** -- the behavioral claim is derived from test naming, file organization, or structural patterns rather than assertion content\n\n### Test Code Assertions Are Confirmed\n\nUnlike source code analysis (where claims are typically `inferred`), behavioral claims extracted directly from test assertions are `confirmed`. A test assertion is an explicit, executable behavioral contract. The developer who wrote `expect(result).toBe(42)` is asserting that this behavior is required.\n\n### Cite As You Go\n\nEvery behavioral claim gets an inline citation immediately after the claim. The `ref` field should be `\u003Cfile-path>:\u003Cline-range>`.\n\n## Output Structure\n\n```\nworkspace\u002Fraw\u002Ftest-evidence\u002F\n    test-inventory.md          # Framework detection, test file inventory, classification\n    behavioral-claims.md       # Behavioral claims in Given\u002FWhen\u002FThen format\n    e2e-flows.md               # End-to-end flow documentation from e2e\u002Fintegration tests\n    edge-cases.md              # Edge cases, boundary conditions, error handling from tests\n    run-output.txt             # Raw test execution output (if Strategy 2 was used)\n```\n\n## Rules\n\n1. **Test code is RAW** -- test files reference internal implementation details. All output goes to `workspace\u002Fraw\u002F`.\n2. **Assertions are behavioral contracts** -- treat every assertion as a confirmed behavioral claim. The developer is stating that this behavior is required.\n3. **E2E tests first** -- prioritize end-to-end and integration tests over unit tests. They encode user-visible behavior.\n4. **Do not test mocked behavior** -- a test that asserts a mock was called proves nothing about the system's actual behavior. Skip mock-only tests when extracting behavioral claims.\n5. **Failed tests are data** -- a failing test documents both the expected behavior (from the assertion) and the actual behavior (from the error). Record both.\n6. **Strategy 1 always works** -- reading test code requires no environment. Always perform Strategy 1. Strategy 2 is additive and optional.\n7. **Cite as you go** -- every behavioral claim gets an inline `\u003C!-- cite: -->` comment immediately after the claim. Never defer citation to a later step.\n8. **Map the full surface** -- do not stop after the first interesting test file. Build a complete inventory before deep-diving into individual files.\n","# Test Suite Analysis Methodology\n\nExtract behavioral intelligence from test suites. Tests are executable specifications -- they encode what the system MUST do in a form that can be verified. A passing test is a confirmed behavioral contract.\n\n## When to Use This Mode\n\nTest suite analysis activates when:\n- The target repository contains test files\n- The discovery inventory identifies test files in the project\n- Other modes discover test directories during analysis\n\nThis mode runs independently of all other intelligence sources. All output is **RAW** (test code references internal implementation details).\n\n## Why Tests Are High-Value Intelligence\n\nTests are the only source type that is simultaneously:\n- **Behavioral** -- they describe what the system does, not how it's built\n- **Executable** -- they can be run to confirm the behavior still holds\n- **Specific** -- they provide exact inputs, expected outputs, and edge cases\n- **Maintained** -- failing tests get fixed, so they track current behavior\n\nA single end-to-end test is worth more than a page of documentation because the test is verified by CI on every commit.\n\n## Framework Detection\n\nIdentify the test framework(s) in use before analyzing test code. Different frameworks use different assertion styles, test organization, and execution models.\n\n| Framework | Language | Detection Signals |\n|-----------|----------|-------------------|\n| Jest | JavaScript\u002FTypeScript | `jest.config.*`, `describe(` \u002F `it(` \u002F `expect(` in `__tests__\u002F` or `*.test.*`, `@jest\u002Fglobals` imports |\n| Playwright | JavaScript\u002FTypeScript | `playwright.config.*`, `@playwright\u002Ftest` imports, `page.goto(` \u002F `page.click(` |\n| Cypress | JavaScript\u002FTypeScript | `cypress.config.*`, `cypress\u002F` directory, `cy.visit(` \u002F `cy.get(` |\n| pytest | Python | `conftest.py`, `pytest.ini` \u002F `pyproject.toml` with `[tool.pytest]`, files named `test_*.py` \u002F `*_test.py`, `assert` statements |\n| Go testing | Go | `*_test.go` files, `testing.T` \u002F `testing.B` parameters, `go test` in CI config |\n| RSpec | Ruby | `.rspec`, `spec\u002F` directory, `spec_helper.rb`, `describe` \u002F `it` \u002F `expect` blocks |\n| JUnit | Java\u002FKotlin | `@Test` annotations, `src\u002Ftest\u002F` directory, `assertEquals` \u002F `assertThat` calls |\n| XCTest | Swift\u002FObjective-C | `XCTestCase` subclasses, `func test*()` methods, `XCTAssert*` calls |\n| Catch2 | C++ | `#include \u003Ccatch2\u002Fcatch.hpp>`, `TEST_CASE(` \u002F `SECTION(` \u002F `REQUIRE(` macros |\n\n### Detection Strategy\n\n```bash\n# Check for test configuration files\nls -la jest.config.* playwright.config.* cypress.config.* .rspec pytest.ini 2>\u002Fdev\u002Fnull\n\n# Check pyproject.toml for pytest config\ngrep -l '\\[tool\\.pytest' pyproject.toml 2>\u002Fdev\u002Fnull\n\n# Find test directories\nfind . -maxdepth 3 -type d \\( -name \"__tests__\" -o -name \"test\" -o -name \"tests\" -o -name \"spec\" -o -name \"cypress\" \\) 2>\u002Fdev\u002Fnull\n\n# Find test files by naming convention\nfind . -maxdepth 4 -type f \\( -name \"*.test.*\" -o -name \"*.spec.*\" -o -name \"test_*\" -o -name \"*_test.*\" \\) 2>\u002Fdev\u002Fnull | head -50\n\n# Count test files per pattern\necho \"Jest\u002FMocha-style:\" && find . -name \"*.test.*\" -o -name \"*.spec.*\" 2>\u002Fdev\u002Fnull | wc -l\necho \"Python-style:\" && find . -name \"test_*.py\" -o -name \"*_test.py\" 2>\u002Fdev\u002Fnull | wc -l\necho \"Go-style:\" && find . -name \"*_test.go\" 2>\u002Fdev\u002Fnull | wc -l\necho \"JUnit-style:\" && find . -path \"*\u002Fsrc\u002Ftest\u002F*\" -name \"*.java\" 2>\u002Fdev\u002Fnull | wc -l\n```\n\nWrite detection results to `workspace\u002Fraw\u002Ftest-evidence\u002Ftest-inventory.md`.\n\n## Strategy 1: Read Test Code\n\nRead test files directly and extract behavioral claims. This strategy always works -- it requires no working environment, no dependencies, and no execution.\n\n### 1.1 Test File Inventory\n\n```bash\n# Build complete inventory of test files with metadata\nfind . -type f \\( -name \"*.test.*\" -o -name \"*.spec.*\" -o -name \"test_*\" -o -name \"*_test.*\" -o -name \"*_test.go\" \\) 2>\u002Fdev\u002Fnull | while read f; do\n  lines=$(wc -l \u003C \"$f\")\n  echo \"$lines $f\"\ndone | sort -rn\n```\n\n### 1.2 Assertion Extraction\n\nFor each test file, extract the assertions -- these are the behavioral contracts:\n\n```bash\n# Jest\u002FMocha assertions\ngrep -n \"expect\\|assert\\|should\\|toBe\\|toEqual\\|toContain\\|toThrow\\|toHaveBeenCalled\" \"$TEST_FILE\"\n\n# pytest assertions\ngrep -n \"assert \\|assert_\\|assertEqual\\|assertRaises\\|pytest.raises\" \"$TEST_FILE\"\n\n# Go test assertions\ngrep -n \"t\\.Error\\|t\\.Fatal\\|t\\.Log\\|assert\\.\\|require\\.\" \"$TEST_FILE\"\n\n# RSpec assertions\ngrep -n \"expect\\|should\\|is_expected\\|eq(\\|include(\\|raise_error\" \"$TEST_FILE\"\n```\n\n### 1.3 Given\u002FWhen\u002FThen Extraction\n\nTransform test code into behavioral claims using Given\u002FWhen\u002FThen structure:\n\nFor each test case (`it(`, `test(`, `func Test*`, `def test_*`), extract:\n\n- **Given** (setup\u002Fpreconditions): fixture creation, mock configuration, state initialization\n- **When** (action): the function call, API request, or user action being tested\n- **Then** (assertions): the expected outcomes encoded in assertions\n\n```markdown\n## Test: \"should reject expired tokens\"\n\n**Given:** A token with expiry date in the past\n**When:** The token is validated via `checkPermissions()`\n**Then:**\n- Returns false\n- Sets error to \"TOKEN_EXPIRED\"\n- Does not call the downstream service\n\n**Source:** `auth.test.ts:45-62`\n**Confidence:** confirmed (test assertion is an explicit behavioral contract)\n```\n\n### 1.4 E2E vs Unit Value Classification\n\nNot all tests carry equal behavioral intelligence value:\n\n| Test Type | Detection Signals | Behavioral Value |\n|-----------|-------------------|-----------------|\n| End-to-end (e2e) | Browser automation, HTTP requests to running server, multi-service interaction | **High** -- tests the system as a user experiences it |\n| Integration | Database connections, external service calls, multi-module interaction | **High** -- tests behavioral contracts between components |\n| Functional | Single module tested with real dependencies | **Medium** -- tests module-level behavioral contracts |\n| Unit | Mocked dependencies, isolated function tests | **Lower** -- tests implementation contracts, not user-visible behavior |\n| Snapshot | `toMatchSnapshot()`, `toMatchInlineSnapshot()` | **Low** -- captures output format, not behavioral intent |\n\nFocus extraction effort on e2e and integration tests first. Unit tests fill in details after the behavioral surface is mapped.\n\n### 1.5 Edge Case Mining\n\nTests are the richest source of edge case documentation. Look for:\n\n```bash\n# Boundary value tests\ngrep -n \"boundary\\|limit\\|max\\|min\\|overflow\\|underflow\\|zero\\|empty\\|null\\|undefined\" \"$TEST_FILE\" -i\n\n# Error condition tests\ngrep -n \"error\\|fail\\|reject\\|throw\\|invalid\\|unauthorized\\|forbidden\\|timeout\" \"$TEST_FILE\" -i\n\n# Concurrency tests\ngrep -n \"concurrent\\|parallel\\|race\\|deadlock\\|lock\\|mutex\\|async\\|await\" \"$TEST_FILE\" -i\n\n# Special character and encoding tests\ngrep -n \"unicode\\|utf\\|encoding\\|escape\\|special\\|whitespace\" \"$TEST_FILE\" -i\n```\n\nWrite behavioral claims to `workspace\u002Fraw\u002Ftest-evidence\u002Fbehavioral-claims.md`.\nWrite e2e flow documentation to `workspace\u002Fraw\u002Ftest-evidence\u002Fe2e-flows.md`.\nWrite edge case documentation to `workspace\u002Fraw\u002Ftest-evidence\u002Fedge-cases.md`.\n\n## Strategy 2: Run Test Suite\n\nExecute the test suite and observe its behavior. This strategy requires a working environment with all dependencies installed. It produces higher-confidence claims but has higher setup cost.\n\n### 2.1 Prerequisites\n\nBefore attempting test execution:\n- Verify the container has all dependencies installed\n- Check for required environment variables or config files\n- Look for test setup scripts (`beforeAll`, `setUp`, fixtures, factories)\n- Identify tests that require external services (databases, APIs)\n\n### 2.2 Execute with Maximum Verbosity\n\n```bash\n# Jest\nnpx jest --verbose --no-coverage 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n\n# pytest\npython -m pytest -v --tb=long 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n\n# Go\ngo test -v .\u002F... 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n\n# RSpec\nbundle exec rspec --format documentation 2>&1 | tee workspace\u002Fraw\u002Ftest-evidence\u002Frun-output.txt\n```\n\n### 2.3 Observe Runtime Behavior\n\nDuring test execution, capture:\n\n- **Network calls** -- tests that make HTTP requests reveal API contracts\n- **File I\u002FO** -- tests that read\u002Fwrite files reveal data format contracts\n- **Timing** -- slow tests may indicate external dependency interaction\n- **Failures** -- failed tests reveal behavioral regressions or environment-specific behavior\n- **Warnings** -- deprecation warnings and lint output reveal upcoming behavioral changes\n\n```bash\n# Capture network activity during tests (if strace\u002Fdtrace available)\nstrace -e trace=network -f npx jest 2> workspace\u002Fraw\u002Ftest-evidence\u002Fnetwork-trace.txt\n\n# Capture file I\u002FO during tests\nstrace -e trace=file -f npx jest 2> workspace\u002Fraw\u002Ftest-evidence\u002Ffile-trace.txt\n```\n\n### 2.4 Failure Analysis\n\nFailed tests are behavioral intelligence:\n- A failing test documents a behavioral contract that is currently violated\n- The expected value in the assertion documents what the behavior SHOULD be\n- The actual value documents what the behavior currently IS\n- The gap between expected and actual is a behavioral specification\n\nRecord every failure with:\n- Test name and location\n- Expected behavior (from the assertion)\n- Actual behavior (from the error output)\n- Whether this appears to be a genuine regression or an environment issue\n\n## Provenance Rules\n\n### Source Type\n\nAll claims from test suite analysis use `source=test-suite`:\n\n```markdown\n- Expired tokens are rejected with a TOKEN_EXPIRED error\n  \u003C!-- cite: source=test-suite, ref=src\u002Fauth\u002F__tests__\u002Fauth.test.ts:45-62, confidence=confirmed, agent=test-analyzer -->\n```\n\n### Confidence Levels\n\n- **confirmed** -- the test assertion explicitly encodes the behavioral claim AND the test passes (or the claim is directly readable from the test code regardless of execution)\n- **inferred** -- the behavioral claim is derived from test setup, fixture data, or mock configuration rather than direct assertion\n- **assumed** -- the behavioral claim is derived from test naming, file organization, or structural patterns rather than assertion content\n\n### Test Code Assertions Are Confirmed\n\nUnlike source code analysis (where claims are typically `inferred`), behavioral claims extracted directly from test assertions are `confirmed`. A test assertion is an explicit, executable behavioral contract. The developer who wrote `expect(result).toBe(42)` is asserting that this behavior is required.\n\n### Cite As You Go\n\nEvery behavioral claim gets an inline citation immediately after the claim. The `ref` field should be `\u003Cfile-path>:\u003Cline-range>`.\n\n## Output Structure\n\n```\nworkspace\u002Fraw\u002Ftest-evidence\u002F\n    test-inventory.md          # Framework detection, test file inventory, classification\n    behavioral-claims.md       # Behavioral claims in Given\u002FWhen\u002FThen format\n    e2e-flows.md               # End-to-end flow documentation from e2e\u002Fintegration tests\n    edge-cases.md              # Edge cases, boundary conditions, error handling from tests\n    run-output.txt             # Raw test execution output (if Strategy 2 was used)\n```\n\n## Rules\n\n1. **Test code is RAW** -- test files reference internal implementation details. All output goes to `workspace\u002Fraw\u002F`.\n2. **Assertions are behavioral contracts** -- treat every assertion as a confirmed behavioral claim. The developer is stating that this behavior is required.\n3. **E2E tests first** -- prioritize end-to-end and integration tests over unit tests. They encode user-visible behavior.\n4. **Do not test mocked behavior** -- a test that asserts a mock was called proves nothing about the system's actual behavior. Skip mock-only tests when extracting behavioral claims.\n5. **Failed tests are data** -- a failing test documents both the expected behavior (from the assertion) and the actual behavior (from the error). Record both.\n6. **Strategy 1 always works** -- reading test code requires no environment. Always perform Strategy 1. Strategy 2 is additive and optional.\n7. **Cite as you go** -- every behavioral claim gets an inline `\u003C!-- cite: -->` comment immediately after the claim. Never defer citation to a later step.\n8. **Map the full surface** -- do not stop after the first interesting test file. Build a complete inventory before deep-diving into individual files.\n",{"name":5,"description":7},"main","728894f3f85fbd4e788f015ddfd72bb6155d5dd5","plugins\u002Fmoe-backstory\u002F.cursor-plugin\u002Fskills\u002Ftest-suite-analysis",1,"https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe","https:\u002F\u002Fgithub.com\u002Fzak-keown","2026-09-05 06:29:06",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add zak-keown\u002Fmoe --skill test-suite-analysis",{"tool":36,"command":37},"bunx","bunx skills add zak-keown\u002Fmoe --skill test-suite-analysis",{"tool":39,"command":40},"pnpm","pnpm dlx skills add zak-keown\u002Fmoe --skill test-suite-analysis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe-backstory\u002F.cursor-plugin\u002Fskills\u002Ftest-suite-analysis\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":18},"01M7C1Z5362Y8NVRZ69HWP0ZD0","write-skill","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-skill\u002FSKILL.md",[],[],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":18},"01M7C1YZ9966WK9R6ZRPCGWF3G","write-plan","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-plan\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":18},"01M7C1YMR4SJD7BPBBPXZCVGVH","write-clearly","Apply Strunk's timeless writing rules to ANY prose humans will read—documentation, commit messages, error messages, explanations, reports, or UI text. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwrite-clearly\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":18},"01M7C1YH9805YSM0N20VQAVSXF","windows-vm","Create, manage, or connect to a headless Windows 11 VM running in Docker with SSH access. Use when the user wants to spin up, stop, restart, or SSH into a Windows VM.","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fwindows-vm\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":18},"01M7C1YD87SCNEJ2C9B8HFR2NQ","verify-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating MRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fverify-completion\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":18},"01M7C1YARDEHT0TJ9BRG30ZCF4","using-moe","Use when starting any conversation - establishes how to find and use skills, requiring skill invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Fzak-keown\u002Fmoe\u002Fblob\u002Fmain\u002Fplugins\u002Fmoe\u002Fskills\u002Fusing-moe\u002FSKILL.md",[],[]]