Lessons Learned as a Practice

Lessons Learned as a Practice

The Lesson

Systematically extracting lessons from project work — and writing them as standalone documents — turns ephemeral experience into a durable knowledge base. The practice is most valuable when it is automated enough to be low-friction (discovery from git history) but requires human judgment for what actually matters (selecting which lessons to write, ensuring they generalize beyond the source project).

Context

A development team had completed dozens of features, migrations, code reviews, and bug fixes across a multi-provider web application. The decisions and patterns behind that work existed only in commit messages, design docs, and the memories of the people involved. When similar situations arose in other projects, the same mistakes were repeated because the knowledge was locked in the original project's git history.

What Happened

  1. A manual review of 73 commits identified 23 distinct lessons spanning data quality, architecture, process, testing, and data engineering
  2. Each lesson was written as a standalone markdown document with a consistent structure: a general principle (The Lesson), project context (Context), a narrative of what happened (What Happened), and reusable observations (Key Insights)
  3. An index grouped lessons into five categories with one-line descriptions, making the collection browsable
  4. A template was created to standardize future lessons and provide inline authoring guidance for each section
  5. The template and index were combined into a skill specification (/lessons) with four modes: discover new candidates from git history, write a specific lesson, list the index, and audit existing lessons for completeness
  6. The skill was deployed as a reusable Claude Code slash command, available across all projects

Key Insights

Examples

Good lesson statement vs. bad

Quality Example
Good "When hints contain the exact text of the correct answer, they short-circuit learning. This is invisible in manual review but easy to detect programmatically."
Bad "We found that 45 H1 hints in 28 XML files contained verbatim answer text and fixed them with fix_verbatim_h1.py."

The good version states a general principle anyone can apply. The bad version is a project status update.

Good insight vs. bad

Quality Example
Good "Equivalence tests are temporary by design." Once the migration is complete and the old format is retired, the equivalence tests can be deleted. They exist only to bridge the migration.
Bad "We wrote a lot of tests." The equivalence test suite had 5,101 assertions.

The good version is actionable — it tells you when to create and when to delete this type of test. The bad version is a metric with no guidance.

Applicability

This practice applies to any team or individual that:

It is less valuable when:

Related Lessons