Extract reusable patterns from a completed narrative visualization. Use niwashi-06-harvest after a narrative passes review, when wrapping up a narrative project, when the user says 'harvest', 'extract patterns', 'what did we learn', 'save what worked', 'document patterns', or when sections-checklist.json shows review_approved: true. This skill reads the full build history and produces a pattern document that future RESEARCH phases can actually use.
実り (Minori) — Gather fruit, save seeds for next season.
You are closing the loop. After a narrative passes REVIEW, you read everything that happened — the spec, the rework history, the git log — and distill it into a pattern document. This pattern doc lives in niwashi_docs/patterns/ where future RESEARCH phases will find it and adapt it instead of starting from scratch.
A pattern doc is only valuable if it is specific enough to reuse. "Nice animations" is useless. "Scroll-triggered fade with 200ms ease-in on section transitions" is useful. You will self-check against the quality guide and revise until the pattern meets the bar.
Before starting, verify:
sections-checklist.json exists and has review_approved: truenarrative-spec.md exists (your primary source)If any prerequisite is missing, tell the user what's needed and stop.
Read these artifacts in order:
The full specification: concept, audience, narrative arc, visual language, wireframes.
Read: niwashi_docs/<narrative>/narrative-spec.md
Extract:
- Concept type (e.g., optimization-algorithm, neural-network)
- Audience definition
- Narrative arc: section titles, ordering, "aha moment" placement
- Visual language: color palette, typography, key motifs
- Interaction designs from wireframes
The build state tracker reveals which sections needed rework and how many iterations they took.
Read: niwashi_docs/<narrative>/sections-checklist.json
Extract:
- Which sections passed on first attempt (these patterns are strongest)
- Which sections needed rework (these go in "What Didn't Work")
- Number of rework cycles per section
- Any calibration notes from early sections
The commit history shows what actually changed during BUILD.
Run: git log --oneline --all -- . | head -40
Also: git log --stat --all -- "src/components/" | head -80 (if React app exists)
Extract:
- Major refactors or approach changes
- Components that were rewritten vs stable from first commit
- Any reverted commits (strong signal of what didn't work)
If niwashi_docs/<narrative>/progress.md exists, scan it for session notes about difficulties, pivots, or decisions made during the workflow.
Produce one file:
niwashi_docs/patterns/<concept-type>.md
Where <concept-type> is derived from the narrative's concept (e.g., optimization-algorithm.md, data-pipeline.md, neural-network.md). Use kebab-case.
If a pattern file for this concept type already exists (from a prior narrative on the same topic), merge — add a new dated section rather than overwriting.
Read all inputs listed above. Do this in parallel where possible:
narrative-spec.mdsections-checklist.jsonprogress.md if it existsFor each category below, extract specific, concrete patterns:
Narrative Arc:
Interaction Patterns:
Visual Approaches:
What Didn't Work:
sections-checklist.json for sections that needed reworkReuse Recommendations:
Use the template from references/pattern-template.md. Fill every section with the specific patterns extracted in Step 2.
Create: niwashi_docs/patterns/<concept-type>.md
Write the YAML frontmatter first:
concept_type: kebab-case concept identifierdate: today's date (YYYY-MM-DD)narrative: name of the completed narrative (matches the niwashi_docs/<narrative>/ directory name)Then write each section. Every bullet point must pass the specificity test:
Can another agent reading this pattern reproduce the approach without guessing?
If the answer is no, the pattern is too vague.
After writing the pattern doc, read skills/niwashi-06-harvest/references/pattern-quality-guide.md and evaluate your output against its criteria.
Check each section:
| Section | Specific enough? | Example of passing | Example of failing |
|---|---|---|---|
| Narrative Arc | Names sections, positions aha moment | "Aha at section 3/5, after constraint setup" | "Good flow" |
| Interactions | Names the mechanism + observed effect | "Slider for λ parameter, range 0-1, step 0.01" | "Interactive controls" |
| Visual Approaches | Reproducible values | "bg-slate-950, text-slate-50, accent amber-500" | "Dark theme" |
| What Didn't Work | Names the problem + what replaced it | "Pie chart → horizontal bar (better for comparison)" | "Had to fix some things" |
| Reuse Recs | States when to use AND when not to | "For ≤7 variables; beyond that, use matrix view" | "Reuse when appropriate" |
If any section fails: Revise that section with more specific content. Check again.
Maximum 2 revision cycles. If a section is still vague after 2 revisions (typically because the source material itself lacks detail), add a callout:
> ⚠️ **Needs enrichment:** This section lacks specificity because [reason].
> A human should review and add concrete details from their experience with this narrative.
After the pattern doc passes the quality check:
Commit the pattern file:
git add niwashi_docs/patterns/<concept-type>.md
git commit -m "harvest(<concept-type>): extract patterns from <narrative>"
Log to progress.md:
## Session YYYY-MM-DD HH:MM
Phase: HARVEST
Action: Extracted patterns to niwashi_docs/patterns/<concept-type>.md
Quality: [all sections passed / N sections flagged for enrichment]
Tell the user:
If niwashi_docs/patterns/<concept-type>.md already exists from a prior narrative:
## From: <narrative> (YYYY-MM-DD)Reuse Recommendations if the new narrative revealed different conditionsIf sections-checklist.json shows all sections passed on the first attempt:
If the narrative was built without git commits (edge case):
sections-checklist.json and progress.mdnarrative-spec.md, sections-checklist.json, or any BUILD artifactsThis is the last phase. The pattern doc you produce feeds back into the workflow:
HARVEST produces → niwashi_docs/patterns/<concept-type>.md
RESEARCH reads → niwashi_docs/patterns/ (Step 1: check for prior art)
When a future narrative covers a similar concept, RESEARCH will find your pattern doc and adapt it — skipping rediscovery of what already works. The quality of that shortcut depends entirely on how specific your patterns are.
Write patterns you'd want to find if you were starting the next narrative.