38 lines
1.1 KiB
Markdown
38 lines
1.1 KiB
Markdown
|
|
---
|
||
|
|
name: library-query
|
||
|
|
description: Query the patterns library for relevant patterns, best practices, and known errors.
|
||
|
|
tags: ['library', 'query', 'search']
|
||
|
|
---
|
||
|
|
|
||
|
|
# Library Query
|
||
|
|
|
||
|
|
## Purpose
|
||
|
|
Find relevant patterns from the self-learning library before starting work, to avoid reinventing solutions and to apply known best practices.
|
||
|
|
|
||
|
|
## When to Use
|
||
|
|
- At the start of any new project or task
|
||
|
|
- When designing architecture for a new feature
|
||
|
|
- When debugging an error (find prior solutions)
|
||
|
|
- When planning a phase
|
||
|
|
|
||
|
|
## When Not to Use
|
||
|
|
- For trivial questions (just ask)
|
||
|
|
- For project-specific state (read the project files)
|
||
|
|
|
||
|
|
## Procedure
|
||
|
|
1. Formulate query keywords: technology, problem type, domain, project type
|
||
|
|
2. Call the library-query API:
|
||
|
|
```
|
||
|
|
GET /api/plugins/a0_software_orchestrator/library_search?q=<keywords>
|
||
|
|
```
|
||
|
|
3. Review top results by relevance
|
||
|
|
4. For each relevant pattern, read the full content via:
|
||
|
|
```
|
||
|
|
GET /api/plugins/a0_software_orchestrator/library_get?id=<pattern_id>
|
||
|
|
```
|
||
|
|
5. Apply the pattern to the current work, citing the pattern_id
|
||
|
|
|
||
|
|
## See Also
|
||
|
|
- Help: `library/extract.md`
|
||
|
|
- API: `/api/plugins/a0_software_orchestrator/library_search`
|