---
phase: 20-book-load-testing
plan: 02
type: execute
wave: 1
depends_on: []
files_modified:
  - pmcp-book/src/ch15-testing.md
autonomous: true
requirements:
  - BKLT-04

must_haves:
  truths:
    - "Reader of Ch 15 discovers that load testing is available via cargo pmcp loadtest"
    - "Reader of Ch 15 is directed to Ch 14 for comprehensive load testing documentation"
    - "The load testing section fits naturally within Ch 15's existing structure"
  artifacts:
    - path: "pmcp-book/src/ch15-testing.md"
      provides: "Load testing cross-reference section added to existing testing chapter"
      contains: "Load Testing"
  key_links:
    - from: "pmcp-book/src/ch15-testing.md"
      to: "pmcp-book/src/ch14-performance.md"
      via: "Cross-reference link to Ch 14"
      pattern: "ch14-performance"
---

<objective>
Add a brief "Load Testing" section to Chapter 15 (Testing & Quality Assurance) that introduces load testing and cross-references Chapter 14 for full details.

Purpose: Readers browsing the testing chapter should discover that load testing tooling exists and know where to find it, without duplicating Ch 14 content.

Output: Updated `pmcp-book/src/ch15-testing.md` with new load testing section.
</objective>

<execution_context>
@./.claude/get-shit-done/workflows/execute-plan.md
@./.claude/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add Load Testing section to Ch 15</name>
  <files>pmcp-book/src/ch15-testing.md</files>
  <action>
Read `pmcp-book/src/ch15-testing.md` fully to understand the existing structure, style, and where the new section should be inserted.

The chapter's current structure:
1. Introduction
2. Testing Philosophy (with Testing Pyramid diagram)
3. Official MCP Inspector
4. mcp-tester (comprehensive section)
5. CI/CD Integration
6. Testing Best Practices
7. Troubleshooting
8. Summary

Add a new section `## Load Testing` between "CI/CD Integration" (section 5) and "Testing Best Practices" (section 6). This placement makes sense because:
- It follows CI/CD (which is related to automation)
- It precedes best practices (which can reference load testing)
- It sits within the "advanced testing" portion of the chapter

The section should be approximately 40-60 lines and include:

1. **Brief introduction** (2-3 paragraphs):
   - Why load testing matters for MCP servers (capacity planning, performance regression detection, breaking point identification)
   - What `cargo pmcp loadtest` provides at a high level (k6-inspired engine, HdrHistogram metrics, TOML-based scenarios, breaking point detection)
   - One-liner showing the basic command: `cargo pmcp loadtest run http://your-server:8080`

2. **Quick overview** of capabilities (bullet list):
   - TOML-based scenario definition with weighted MCP operations
   - Flat load and staged load execution modes
   - HdrHistogram metrics with coordinated omission correction
   - Self-calibrating breaking point detection
   - JSON reports for CI/CD integration
   - Schema discovery via `loadtest init`

3. **Cross-reference callout** (use a blockquote or admonition style matching the chapter):
   - Direct readers to Chapter 14 for the full load testing documentation
   - Use mdBook link format: `[Chapter 14: Performance & Load Testing](ch14-performance.md)`
   - Mention that Ch 14 covers CLI reference, configuration, metrics interpretation, and CI/CD workflow

4. **Update the Testing Pyramid diagram** in the Testing Philosophy section:
   - Add "Load Testing" as a layer above E2E Scenarios, or add a note below the pyramid mentioning load testing
   - Keep the existing diagram intact, just extend it

5. **Update the Summary section** at the bottom:
   - Add a bullet point about load testing: "Load Testing - Use `cargo pmcp loadtest` for performance validation and capacity planning (see Chapter 14)"
   - Add to the "Next Steps" list: "Set up load testing for performance baselines (see Chapter 14)"

Match the existing style exactly: use the same heading levels, formatting conventions, admonition patterns, and tone of voice found in Ch 15. Do NOT duplicate detailed content from Ch 14 — keep this section concise and referential.
  </action>
  <verify>
    <automated>grep -c "Load Testing" pmcp-book/src/ch15-testing.md | xargs test 3 -le</automated>
    Verify: "Load Testing" appears at least 3 times (section header + summary + next steps).
    Also verify cross-reference: grep "ch14-performance" pmcp-book/src/ch15-testing.md should return at least 1 match.
    Also verify file still has all original content: grep -c "mcp-tester" pmcp-book/src/ch15-testing.md should return 20+ matches (existing content preserved).
  </verify>
  <done>
    Ch 15 has a new "Load Testing" section that introduces the concept, lists key capabilities, and cross-references Ch 14 for full details. Existing content is fully preserved. The section matches Ch 15's existing style and structure.
  </done>
</task>

</tasks>

<verification>
1. `pmcp-book/src/ch15-testing.md` contains a `## Load Testing` section
2. Cross-reference link to `ch14-performance.md` is present
3. All existing Ch 15 content is preserved (no deletions)
4. Section is concise (40-60 lines, not duplicating Ch 14 content)
5. Style matches existing chapter conventions
6. `mdbook build pmcp-book` succeeds
</verification>

<success_criteria>
- Reader of Ch 15 discovers load testing capability and is clearly directed to Ch 14
- Existing Ch 15 content is untouched
- New section is brief, well-placed, and stylistically consistent
</success_criteria>

<output>
After completion, create `.planning/phases/20-book-load-testing/20-02-SUMMARY.md`
</output>
