From shipyard
Captures lessons from completed phases into .shipyard/LESSONS.md: successes, surprises, pitfalls, improvements. Use after shipping, retrospectives, or reflection triggers.
npx claudepluginhub lgbarn/shipyard --plugin shipyardThis skill uses the workspace's default tool permissions.
<!-- TOKEN BUDGET: 215 lines / ~645 tokens -->
Captures learnings from sessions by reflecting on mistakes, surprises, project quirks, and patterns, appending to .learnings/LEARNINGS.md with optional hookify rules or design docs. Use for retrospectives.
Guides systematic retrospectives to capture decisions, lessons, discarded approaches, and insights from completed work, debugging sessions, or overruns.
Extracts decisions, lessons, patterns, and surprises from completed phase artifacts (PLAN.md, SUMMARY.md, etc.) into structured LEARNINGS.md. Useful post-phase reviews.
Share bugs, ideas, or general feedback.
/shipyard:ship (Step 3a)Run immediately after ship, before the next phase starts. Lessons captured 24+ hours later lose the "why" behind decisions. If you're about to start the next phase, capture lessons first.
The lessons-learned system captures discoveries, patterns, and pitfalls found during implementation and feeds them back into the project. Lessons are stored in .shipyard/LESSONS.md and optionally surfaced in CLAUDE.md so future agents benefit from past experience.
Store lessons in .shipyard/LESSONS.md using this exact structure:
# Shipyard Lessons Learned
## [YYYY-MM-DD] Phase N: {Phase Name}
### What Went Well
- {Bullet point}
### Surprises / Discoveries
- {Pattern discovered}
### Pitfalls to Avoid
- {Anti-pattern encountered}
### Process Improvements
- {Workflow enhancement}
---
New entries are prepended after the # Shipyard Lessons Learned heading so the most recent phase appears first. Each phase gets its own dated section with all four subsections.
When multiple lessons compete for a limited CLAUDE.md budget, prioritize in this order:
Present these four questions to the user during lesson capture:
Pre-populate suggested answers from build artifacts before asking (see Pre-Population below).
Before presenting prompts, extract candidate lessons from completed build summaries:
SUMMARY-*.md files in .shipyard/phases/{N}/results/.This reduces friction and ensures discoveries documented during building are not lost.
When lessons come from multiple builder agents working in parallel:
Do not skip de-duplication. Parallel agents frequently discover the same issues independently.
After the user approves lessons, optionally append to CLAUDE.md:
CLAUDE.md exists, skip entirely.## Lessons Learned section.Selection criteria for CLAUDE.md (be selective — CLAUDE.md has a token budget):
NO PHASE SHIPS WITHOUT LESSON CAPTURE
No exceptions:
Lessons must be specific, actionable, and reusable. Apply these filters:
Anti-Patterns to reject:
### Pitfalls to Avoid
- bats-core `run` captures exit code but swallows stderr -- use `2>&1` to capture both
Why it works: Names the exact tool and behavior, explains the symptom, and gives the fix.
### Surprises / Discoveries
- jq `.field // "default"` prevents null propagation in optional config values --
without the fallback, downstream commands silently receive "null" as a string
### Process Improvements
- Run `shellcheck` on test helper files, not just source scripts —
helper functions have the same quoting bugs as production code
Why it works: Identifies a concrete workflow gap and specifies exactly what to add.
### What Went Well
- Tests are important
Why it fails: Generic truism. Zero discovered knowledge.
### Pitfalls to Avoid
- Fixed a bug on line 47 of parser.py
Why it fails: Line 47 will change. Future readers cannot act on this.
### Process Improvements
- Changed variable name from x to y
Why it fails: A code change, not a reusable insight.
Called by: commands/ship.md — Step 7 for post-phase lesson capture Pairs with: shipyard:shipyard-verification — validate lesson quality before persisting Leads to: shipyard:documentation — update project docs with any discovered conventions