Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Enable an AI agent to iteratively improve its own skills and instructions based on task feedback.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/examples.md
1# Entry Examples23Concrete examples of well-formatted entries with all fields.45## Learning: Correction67```markdown8## [LRN-20250115-001] correction910**Logged**: 2025-01-15T10:30:00Z11**Priority**: high12**Status**: pending13**Area**: tests1415### Summary16Incorrectly assumed pytest fixtures are scoped to function by default1718### Details19When writing test fixtures, I assumed all fixtures were function-scoped.20User corrected that while function scope is the default, the codebase21convention uses module-scoped fixtures for database connections to22improve test performance.2324### Suggested Action25When creating fixtures that involve expensive setup (DB, network),26check existing fixtures for scope patterns before defaulting to function scope.2728### Metadata29- Source: user_feedback30- Related Files: tests/conftest.py31- Tags: pytest, testing, fixtures3233---34```3536## Learning: Knowledge Gap (Resolved)3738```markdown39## [LRN-20250115-002] knowledge_gap4041**Logged**: 2025-01-15T14:22:00Z42**Priority**: medium43**Status**: resolved44**Area**: config4546### Summary47Project uses pnpm not npm for package management4849### Details50Attempted to run `npm install` but project uses pnpm workspaces.51Lock file is `pnpm-lock.yaml`, not `package-lock.json`.5253### Suggested Action54Check for `pnpm-lock.yaml` or `pnpm-workspace.yaml` before assuming npm.55Use `pnpm install` for this project.5657### Metadata58- Source: error59- Related Files: pnpm-lock.yaml, pnpm-workspace.yaml60- Tags: package-manager, pnpm, setup6162### Resolution63- **Resolved**: 2025-01-15T14:30:00Z64- **Commit/PR**: N/A - knowledge update65- **Notes**: Added to CLAUDE.md for future reference6667---68```6970## Learning: Promoted to CLAUDE.md7172```markdown73## [LRN-20250115-003] best_practice7475**Logged**: 2025-01-15T16:00:00Z76**Priority**: high77**Status**: promoted78**Promoted**: CLAUDE.md79**Area**: backend8081### Summary82API responses must include correlation ID from request headers8384### Details85All API responses should echo back the X-Correlation-ID header from86the request. This is required for distributed tracing. Responses87without this header break the observability pipeline.8889### Suggested Action90Always include correlation ID passthrough in API handlers.9192### Metadata93- Source: user_feedback94- Related Files: src/middleware/correlation.ts95- Tags: api, observability, tracing9697---98```99100## Learning: Promoted to AGENTS.md101102```markdown103## [LRN-20250116-001] best_practice104105**Logged**: 2025-01-16T09:00:00Z106**Priority**: high107**Status**: promoted108**Promoted**: AGENTS.md109**Area**: backend110111### Summary112Must regenerate API client after OpenAPI spec changes113114### Details115When modifying API endpoints, the TypeScript client must be regenerated.116Forgetting this causes type mismatches that only appear at runtime.117The generate script also runs validation.118119### Suggested Action120Add to agent workflow: after any API changes, run `pnpm run generate:api`.121122### Metadata123- Source: error124- Related Files: openapi.yaml, src/client/api.ts125- Tags: api, codegen, typescript126127---128```129130## Error Entry131132```markdown133## [ERR-20250115-A3F] docker_build134135**Logged**: 2025-01-15T09:15:00Z136**Priority**: high137**Status**: pending138**Area**: infra139140### Summary141Docker build fails on M1 Mac due to platform mismatch142143### Error144```145error: failed to solve: python:3.11-slim: no match for platform linux/arm64146```147148### Context149- Command: `docker build -t myapp .`150- Dockerfile uses `FROM python:3.11-slim`151- Running on Apple Silicon (M1/M2)152153### Suggested Fix154Add platform flag: `docker build --platform linux/amd64 -t myapp .`155Or update Dockerfile: `FROM --platform=linux/amd64 python:3.11-slim`156157### Metadata158- Reproducible: yes159- Related Files: Dockerfile160161---162```163164## Error Entry: Recurring Issue165166```markdown167## [ERR-20250120-B2C] api_timeout168169**Logged**: 2025-01-20T11:30:00Z170**Priority**: critical171**Status**: pending172**Area**: backend173174### Summary175Third-party API timeout during request processing176177### Error178```179TimeoutError: Request to api.example.com timed out after 30000ms180```181182### Context183- Command: POST /api/process184- Timeout set to 30s185- Occurs during peak hours (lunch, evening)186187### Suggested Fix188Implement retry with exponential backoff. Consider circuit breaker pattern.189190### Metadata191- Reproducible: yes (during peak hours)192- Related Files: src/services/api-client.ts193- See Also: ERR-20250115-X1Y, ERR-20250118-Z3W194195---196```197198## Feature Request199200```markdown201## [FEAT-20250115-001] export_to_csv202203**Logged**: 2025-01-15T16:45:00Z204**Priority**: medium205**Status**: pending206**Area**: backend207208### Requested Capability209Export analysis results to CSV format210211### User Context212User runs weekly reports and needs to share results with non-technical213stakeholders in Excel. Currently copies output manually.214215### Complexity Estimate216simple217218### Suggested Implementation219Add `--output csv` flag to the analyze command. Use standard csv module.220Could extend existing `--output json` pattern.221222### Metadata223- Frequency: recurring224- Related Features: analyze command, json output225226---227```228229## Feature Request: Resolved230231```markdown232## [FEAT-20250110-002] dark_mode233234**Logged**: 2025-01-10T14:00:00Z235**Priority**: low236**Status**: resolved237**Area**: frontend238239### Requested Capability240Dark mode support for the dashboard241242### User Context243User works late hours and finds the bright interface straining.244Several other users have mentioned this informally.245246### Complexity Estimate247medium248249### Suggested Implementation250Use CSS variables for colors. Add toggle in user settings.251Consider system preference detection.252253### Metadata254- Frequency: recurring255- Related Features: user settings, theme system256257### Resolution258- **Resolved**: 2025-01-18T16:00:00Z259- **Commit/PR**: #142260- **Notes**: Implemented with system preference detection and manual toggle261262---263```264265## Learning: Promoted to Skill266267```markdown268## [LRN-20250118-001] best_practice269270**Logged**: 2025-01-18T11:00:00Z271**Priority**: high272**Status**: promoted_to_skill273**Skill-Path**: skills/docker-m1-fixes274**Area**: infra275276### Summary277Docker build fails on Apple Silicon due to platform mismatch278279### Details280When building Docker images on M1/M2 Macs, the build fails because281the base image doesn't have an ARM64 variant. This is a common issue282that affects many developers.283284### Suggested Action285Add `--platform linux/amd64` to docker build command, or use286`FROM --platform=linux/amd64` in Dockerfile.287288### Metadata289- Source: error290- Related Files: Dockerfile291- Tags: docker, arm64, m1, apple-silicon292- See Also: ERR-20250115-A3F, ERR-20250117-B2D293294---295```296297## Extracted Skill Example298299When the above learning is extracted as a skill, it becomes:300301**File**: `skills/docker-m1-fixes/SKILL.md`302303```markdown304---305name: docker-m1-fixes306description: "Fixes Docker build failures on Apple Silicon (M1/M2). Use when docker build fails with platform mismatch errors."307---308309# Docker M1 Fixes310311Solutions for Docker build issues on Apple Silicon Macs.312313## Quick Reference314315| Error | Fix |316|-------|-----|317| `no match for platform linux/arm64` | Add `--platform linux/amd64` to build |318| Image runs but crashes | Use emulation or find ARM-compatible base |319320## The Problem321322Many Docker base images don't have ARM64 variants. When building on323Apple Silicon (M1/M2/M3), Docker attempts to pull ARM64 images by324default, causing platform mismatch errors.325326## Solutions327328### Option 1: Build Flag (Recommended)329330Add platform flag to your build command:331332\`\`\`bash333docker build --platform linux/amd64 -t myapp .334\`\`\`335336### Option 2: Dockerfile Modification337338Specify platform in the FROM instruction:339340\`\`\`dockerfile341FROM --platform=linux/amd64 python:3.11-slim342\`\`\`343344### Option 3: Docker Compose345346Add platform to your service:347348\`\`\`yaml349services:350app:351platform: linux/amd64352build: .353\`\`\`354355## Trade-offs356357| Approach | Pros | Cons |358|----------|------|------|359| Build flag | No file changes | Must remember flag |360| Dockerfile | Explicit, versioned | Affects all builds |361| Compose | Convenient for dev | Requires compose |362363## Performance Note364365Running AMD64 images on ARM64 uses Rosetta 2 emulation. This works366for development but may be slower. For production, find ARM-native367alternatives when possible.368369## Source370371- Learning ID: LRN-20250118-001372- Category: best_practice373- Extraction Date: 2025-01-18374```375