Skip to content

Commit f14821c

Browse files
alanbldclaude
andcommitted
docs: Add DOCX Polish Sprint context to CLAUDE.md
Document sprint pattern, completed sprints 18-21, and guidance for continuing with Sprint 22. Includes test density analysis commands and key test utilities reference. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fc9b8f3 commit f14821c

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

CLAUDE.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,49 @@ git status && git log -5 --oneline
243243
# 3. Run tests
244244
cargo test --workspace
245245
```
246+
247+
## DOCX Polish Sprints (Active)
248+
249+
**Goal:** Increase test coverage for `utf8dok-ooxml` crate systematically.
250+
251+
**Sprint Pattern:**
252+
1. Explore coverage opportunities (find files with low test density)
253+
2. Add tests for untested/undertested functions
254+
3. Run tests and fix any errors
255+
4. Commit with message: `test(ooxml): Sprint N - <description>`
256+
257+
**Completed Sprints:**
258+
259+
| Sprint | File | Tests Added | Commit |
260+
|--------|------|-------------|--------|
261+
| 18 | writer.rs | +20 (block generation) | `05e79a2` |
262+
| 19 | style_map.rs | +17 (StyleContract, enums) | `3358ef7` |
263+
| 20 | style_contract_validator.rs | +15 | `b1a22f7` |
264+
| 21 | writer.rs | +19 (comments, content types, cover) | `fc9b8f3` |
265+
266+
**Current Status (after Sprint 21):**
267+
- Total workspace tests: ~1,420
268+
- `utf8dok-ooxml` tests: 508
269+
- `writer.rs`: 72 tests / 4113 lines
270+
271+
**Next: Sprint 22**
272+
273+
To continue, run:
274+
```bash
275+
# Check test density per file
276+
for f in crates/utf8dok-ooxml/src/*.rs; do
277+
tests=$(grep -c "#\[test\]" "$f" 2>/dev/null || echo 0)
278+
lines=$(wc -l < "$f")
279+
echo "$tests tests / $lines lines - $f"
280+
done | sort -t/ -k1 -n
281+
282+
# Files with potential for more coverage:
283+
# - document.rs: 43 tests / 1944 lines (~1 per 45 lines)
284+
# - styles.rs: 34 tests / 1321 lines (~1 per 39 lines)
285+
# - relationships.rs: 26 tests / 840 lines (~1 per 32 lines)
286+
```
287+
288+
**Key test utilities:**
289+
- `crate::test_utils::create_minimal_template()` - basic template without styles
290+
- `crate::test_utils::create_template_with_styles()` - template with word/styles.xml
291+
- `crate::test_utils::extract_document_xml(&result)` - extract document.xml from DOCX bytes

0 commit comments

Comments
 (0)