You are a senior code reviewer preparing to review code changes.

## Code Changes

```diff
diff --git a/expert_build/prompts.py b/expert_build/prompts.py
index 2526135..d3685da 100644
--- a/expert_build/prompts.py
+++ b/expert_build/prompts.py
@@ -28,6 +28,39 @@
 {content}
 """
 
+SUMMARIZE_CODE = """\
+You are an expert technical writer creating structured notes from source code.
+
+Given the following source code file, create a concise summary focused on how \
+this code is used in practice. Structure your output as:
+
+## <Descriptive Title>
+Start with a short, specific title that names the module or component (e.g., \
+"CLI Entry Point", "PDF Chunker", "LLM Invocation Layer"). Then one paragraph \
+summarizing what this code does and its role in the project.
+
+## Usage Patterns
+How this code is meant to be called or used — entry points, key functions, \
+typical invocations. Include code snippets where helpful.
+
+## API and Configuration
+Key parameters, options, environment variables, config files, or arguments \
+this code accepts.
+
+## Key Behaviors
+Important behaviors, error handling, edge cases, or gotchas a user should know about.
+
+## Relationships
+How this code connects to other components — what it imports, what calls it, \
+what services or systems it interacts with.
+
+---
+
+SOURCE CODE:
+
+{content}
+"""
+
 PROPOSE_BELIEFS = """\
 You are extracting factual claims from study notes to build a belief registry.
 
diff --git a/expert_build/summarize.py b/expert_build/summarize.py
index 5fb718c..e0d6e0b 100644
--- a/expert_build/summarize.py
+++ b/expert_build/summarize.py
@@ -6,7 +6,7 @@
 from pathlib import Path
 
 from .llm import check_model_available, invoke_sync
-from .prompts import SUMMARIZE
+from .prompts import SUMMARIZE, SUMMARIZE_CODE
 
 
 def cmd_summarize(args):
@@ -24,9 +24,12 @@ def cmd_summarize(args):
         print("Install claude CLI or specify --model")
         sys.exit(1)
 
-    sources = sorted(input_dir.glob("*.md"))
+    sources = sorted(
+        [*input_dir.glob("*.md"), *input_dir.glob("*.py")],
+        key=lambda p: p.name,
+    )
     if not sources:
-        print(f"No .md files in {input_dir}")
+        print(f"No .md or .py files in {input_dir}")
         return
 
     if args.limit:
@@ -70,9 +73,17 @@ def cmd_summarize(args):
 
         # Truncate very long documents
         if len(content) > 30000:
+            original_len = len(content)
             content = content[:30000] + "\n\n[Truncated — original was longer]"
+            if source_path.suffix == ".pdf":
+                print(f"  WARN: truncated from {original_len} to 30000 chars. "
+                      f"Consider: expert-build chunk-pdf {source_path}")
+            else:
+                print(f"  WARN: truncated from {original_len} to 30000 chars. "
+                      f"Large documents may lose tail content.")
 
-        prompt = SUMMARIZE.format(content=content)
+        template = SUMMARIZE_CODE if source_path.suffix == ".py" else SUMMARIZE
+        prompt = template.format(content=content)
 
         try:
             summary = invoke_sync(prompt, model=args.model)

```

## Your Task

Analyze the diff and identify what additional information you need to render confident verdicts.
Do NOT render verdicts yet. Only request observations.

## Available Observation Tools

| Tool | Purpose | When to use |
|------|---------|-------------|
| `exception_hierarchy` | Show exception MRO and subclasses | Retry logic, exception handling |
| `raises_analysis` | What exceptions a function raises | New function calls, error paths |
| `call_graph` | What a function calls | Impact analysis |
| `find_usages` | Where a symbol is used (with prod/test split) | Quick integration lookup |
| `find_callers` | Caller analysis with prod/test split and calling context | Method signature changes, return type changes, constructor modifications, integration verification |
| `test_coverage` | Find tests for a file (uses coverage-map if available) | Test coverage claims |
| `coverage_map_tests` | Find tests covering a file (from coverage-map.json) | Precise test coverage from actual execution |
| `coverage_map_files` | Find files covered by tests matching a pattern | Impact analysis for test changes |
| `function_body` | Full source of a function/method | Need complete function context beyond diff hunks |
| `file_imports` | Extract imports from a file | Verify import changes, check dependencies |
| `project_dependencies` | Get pyproject.toml/requirements.txt | Verify new imports have dependencies |
| `related_test_files` | Find test files for a source file | Discover tests by naming, imports, and coverage map |
| `class_hierarchy` | Show base classes and their `__init__` signatures | Class changes its parent, modifies `__init__`, or uses `super()` |
| `symbol_migration` | Check if a rename is complete across the repo | Symbol renamed in diff — verify old name is fully removed |
| `generator_info` | Report whether a function uses `yield` | Function might be a generator — affects return value semantics |

## What to Look For

1. **Exception handling**: Any `retry_if_exception_type`, `except`, or exception class references
2. **New dependencies**: Calls to external libraries where you don't know the error behavior
3. **Behavioral changes**: Modified logic where you need to verify callers/callees
4. **Test claims**: References to tests you can't see in the diff
5. **Inheritance changes**: Class definition changes, new base classes, `super()` calls
6. **Renames**: Symbols that appear to have been renamed in the diff
7. **Factory methods**: Calls to `@classmethod` / `@staticmethod` constructors (e.g. `Result.error(...)`) — request `function_body` to see their implementation

## Output Format

Output a JSON array of observation requests:

```json
[
  {"name": "descriptive_name", "tool": "tool_name", "params": {"param": "value"}},
  ...
]
```

If you don't need any observations (simple changes, all context is in the diff), output:

```json
[]
```

## Examples

For a diff containing `retry_if_exception_type((OSError, httpx.TransportError))`:
```json
[
  {"name": "oserror_subclasses", "tool": "exception_hierarchy", "params": {"class_name": "builtins.OSError"}},
  {"name": "transport_errors", "tool": "exception_hierarchy", "params": {"class_name": "httpx.TransportError"}}
]
```

For a diff adding a new function that calls `oauth_client.get_access_token()`:
```json
[
  {"name": "oauth_exceptions", "tool": "raises_analysis", "params": {"file_path": "src/auth/oauth.py", "function_name": "get_access_token"}}
]
```

For a diff modifying a method but you need the full function to verify:
```json
[
  {"name": "full_getattr", "tool": "function_body", "params": {"file_path": "src/proxy.py", "function_name": "__getattr__"}}
]
```

For a diff changing a method signature or return type (verify all callers):
```json
[
  {"name": "handle_request_callers", "tool": "find_callers", "params": {"symbol": "handle_request"}}
]
```

For a diff adding new imports (e.g., `import httpx`):
```json
[
  {"name": "file_imports", "tool": "file_imports", "params": {"file_path": "src/client.py"}},
  {"name": "project_deps", "tool": "project_dependencies", "params": {}}
]
```

For a diff calling a factory method like `ModuleResult.error_result(msg)`:
```json
[
  {"name": "error_result_body", "tool": "function_body", "params": {"file_path": "src/models.py", "function_name": "error_result"}}
]
```

For a diff where a class changes its parent class:
```json
[
  {"name": "client_hierarchy", "tool": "class_hierarchy", "params": {"class_name": "MyClient", "file_path": "src/client.py"}}
]
```

For a diff that renames a symbol (e.g., `OldClient` to `NewClient`):
```json
[
  {"name": "client_rename", "tool": "symbol_migration", "params": {"old_name": "OldClient", "new_name": "NewClient"}}
]
```

For a diff modifying a function that might be a generator:
```json
[
  {"name": "process_gen", "tool": "generator_info", "params": {"file_path": "src/pipeline.py", "function_name": "process_items"}}
]
```

Now analyze the diff above and output your observation requests as JSON:
