--- name: library-extractor description: Extract patterns from completed project artifacts into the self-learning patterns library. tags: ['library', 'extract', 'learning'] --- # Library Extractor ## Purpose Capture reusable patterns from completed project work and store them in the patterns library for future reuse. ## When to Use - After a major project milestone - When a novel design decision is made - When an error is resolved with a non-obvious solution - When a best practice is discovered ## When Not to Use - For trivial implementations (CRUD, boilerplate) - For project-specific code (not reusable) - For incomplete work (wait for validation) ## Procedure 1. Identify the pattern: what worked, why it worked, when to reuse it 2. Categorize: architecture_decision, best_practice, error_solution, design_pattern, etc. 3. Capture: title, description, content (with code if relevant), tags, project_id 4. Call the library-extractor API: ``` POST /api/plugins/a0_software_orchestrator/library_extract {"title": "...", "description": "...", "category": "...", "content": "...", "tags": [...], "project_id": "..."} ``` 5. Verify the pattern was stored (check via library-query) ## See Also - Help: `library/query.md` - API: `/api/plugins/a0_software_orchestrator/library_extract`