Files
xls_doc/docs/superpowers/plans/2026-06-18-docfill-p0.5-delivery.md
2026-06-18 20:03:47 +08:00

50 lines
2.0 KiB
Markdown

# Docfill P0.5 Delivery Implementation Plan
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
**Goal:** Make the existing P0 CLI easier to hand to digital employees by adding delivery hygiene, runnable examples, a smoke script, and minimal Word split-placeholder support.
**Architecture:** Keep one `docfill run` command and the existing internal package. Add only test fixture helpers and examples around the current API; do not add a template engine, web UI, or multi-command workflow.
**Tech Stack:** Go, `excelize`, `modernc.org/sqlite`, standard shell for smoke testing.
---
### Task 1: Delivery Hygiene
**Files:**
- Create: `.gitignore`
- Modify: `README.md`
- [ ] Ignore local OS files, compiled binaries, test binaries, and example outputs.
- [ ] Keep README focused on run/build/test/smoke usage.
### Task 2: Word Split Placeholders
**Files:**
- Modify: `internal/docfill/docfill.go`
- Modify: `internal/docfill/docfill_test.go`
- [ ] Add a failing test for a Word placeholder split across adjacent `<w:t>` nodes in one paragraph.
- [ ] Implement minimal rendering for split placeholders inside Word text nodes.
- [ ] Keep existing contiguous placeholder behavior passing.
### Task 3: Runnable Examples
**Files:**
- Create: `examples/README.md`
- Create: `examples/excel-to-word/task.json`
- Create: `examples/sqlite-to-excel/task.json`
- Create: `scripts/smoke-fixtures/main.go`
- Create: `scripts/smoke.sh`
- [ ] Add two small configs that mirror real employee daily-report workflows.
- [ ] Generate temporary fixture files from Go during smoke tests instead of storing binary Office files in git.
- [ ] Smoke test builds the CLI, copies examples to a temp dir, generates fixtures, runs both example configs, and runs `go test -count=1 ./...`.
### Task 4: Verify
- [ ] Run `go test -count=1 ./...`.
- [ ] Run `bash scripts/smoke.sh`.
- [ ] Run `go build -o /tmp/docfill-p05 ./cmd/docfill`.