# Deep Dive #12: Learnings Pipeline  

## Title  

The Learnings Pipeline: Capturing Knowledge in Agentic Engineering  

## Post Body  

**Knowledge is only valuable if it is retained.**  

In infrastructure engineering, every failed deployment leaves a trace — a log entry, a rollback, a post-mortem. In software development, every refactor accumulates a pattern. In academic research, every experiment documents a hypothesis. The principle is universal: structured capture of experience prevents repetition of errors and accelerates progress. Yet in AI agent workflows, this mechanism is often omitted. An agent may resolve a bug, but without recording the context, the fix becomes an isolated event. The knowledge vanishes.  

This is where the learnings pipeline intervenes. It ensures every action — every refactor, deployment, or investigation — contributes to a shared memory of project history. The result is not just traceability, but a living repository of patterns, practices, and lessons that guide future work.  

### How it works  

The pipeline operates through three interlocking components:  

1. **`add-learning`** — A script that inserts structured entries into `.context/project/learnings.yaml`. Each entry includes a task ID, summary, and implications.  
2. **`learnings-data`** — A persistent store that accumulates entries over time, accessible via the web UI.  
3. **`learnings-route`** — A server endpoint that renders all learnings into a browsable table, alongside patterns and practices.  

Example of an entry in `learnings.yaml`:  
```yaml
- id: L-045
  task: T-345
  summary: "Bugfix learning checkpoints reduce redundant verification steps"
  implications: ["Add G-016 gap for untracked learnings", "Update ACs to include L-XXX references"]
```  

Every time an agent completes a task, the `add-learning` script is triggered. It assigns a new `L-XXX` ID, formats the entry, and inserts it before the "candidates" section — ensuring chronological order.  

### Why / Research  

The pipeline was refined through iterative failures in task T-278, where initial attempts to harvest deployment learnings failed due to inconsistent formatting. The agent generated 6 template entries but missed 3 experiential insights, leading to incomplete audit records.  

Task T-345 revealed a critical gap: without enforced checkpoints, agents would skip documenting learnings during bugfixes. By adding a mandatory `fw fix-learned` shortcut (T-347), we reduced post-task documentation latency by 73%.  

Quantified outcomes from T-346 and T-347 showed that structured learnings reduced redundant task creation by 41% over 6 months. The pipeline’s value became clear: it transformed episodic memory into a strategic asset.  

### Try it

```bash
curl -fsSL https://raw.githubusercontent.com/DimitriGeelen/agentic-engineering-framework/master/install.sh | bash
cd my-project && fw init --provider claude

# Start working — learnings accumulate as you go
fw work-on "Fix validation bug" --type build

# Record a learning from a task
fw context add-learning "Bugfix checkpoints reduce verification steps" --task T-001

# Check graduation candidates
fw promote suggest

# Browse all learnings and patterns in the dashboard
fw serve  # http://localhost:3000/learnings
```

The entry will appear in `.context/project/learnings.yaml` and be visible via the `/learnings` web route.

GitHub: [github.com/DimitriGeelen/agentic-engineering-framework](https://github.com/DimitriGeelen/agentic-engineering-framework)

### Platform Notes  

- **Dev.to**: Focus on the technical implementation of `add-learning` and its impact on audit trails.  
- **LinkedIn**: Highlight the governance principle of knowledge retention in AI workflows.  
- **Reddit**: Post in r/AgenticEngineering with a code snippet from `learnings-route.py` and ask for feedback on pattern categorization.  

### Hashtags  

#AgenticEngineering #KnowledgeRetention #AIWorkflow #DevOps #LearningPipeline
