ca4f046777
Enhancements: - Added search skill with 10 HTTP API endpoints for memory queries - Refactored version-bump and troubleshoot skills using progressive disclosure pattern - Added operations/ subdirectories for detailed skill documentation - Updated CLAUDE.md with skill-based search architecture - Enhanced worker service with search API endpoints - Updated CHANGELOG.md with v5.4.0 migration details Technical changes: - New plugin/skills/search/ directory with SKILL.md - New .claude/skills/version-bump/operations/ (workflow.md, scenarios.md) - New plugin/skills/troubleshoot/operations/ (common-issues.md, worker.md) - Modified src/services/worker-service.ts (added search endpoints) - Modified plugin/scripts/worker-service.cjs (rebuilt with search API) - Reduced main skill files by 89% using progressive disclosure - Token savings: ~2,250 tokens per session start 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
97 lines
2.5 KiB
Markdown
97 lines
2.5 KiB
Markdown
# Search Observations (Full-Text)
|
|
|
|
Search all observations using natural language queries.
|
|
|
|
## When to Use
|
|
|
|
- User asks: "How did we implement authentication?"
|
|
- User asks: "What bugs did we fix?"
|
|
- User asks: "What features did we add?"
|
|
- Looking for past work by keyword or topic
|
|
|
|
## Command
|
|
|
|
```bash
|
|
curl -s "http://localhost:37777/api/search/observations?query=authentication&format=index&limit=20"
|
|
```
|
|
|
|
## Parameters
|
|
|
|
- **query** (required): Search terms (e.g., "authentication", "bug fix", "database migration")
|
|
- **format**: "index" (summary) or "full" (complete details). Default: "full"
|
|
- **limit**: Number of results (default: 20, max: 100)
|
|
- **project**: Filter by project name (optional)
|
|
|
|
## When to Use Each Format
|
|
|
|
**Use format=index for:**
|
|
- Quick overviews
|
|
- Finding IDs for deeper investigation
|
|
- Listing multiple results
|
|
|
|
**Use format=full for:**
|
|
- Complete details including narrative, facts, files, concepts
|
|
- Understanding the full context of specific observations
|
|
|
|
## Example Response (format=index)
|
|
|
|
```json
|
|
{
|
|
"query": "authentication",
|
|
"count": 5,
|
|
"format": "index",
|
|
"results": [
|
|
{
|
|
"id": 1234,
|
|
"type": "feature",
|
|
"title": "Implemented JWT authentication",
|
|
"subtitle": "Added token-based auth with refresh tokens",
|
|
"created_at_epoch": 1699564800000,
|
|
"project": "api-server",
|
|
"score": 0.95
|
|
}
|
|
]
|
|
}
|
|
```
|
|
|
|
## How to Present Results
|
|
|
|
For format=index, present as a compact list:
|
|
|
|
```markdown
|
|
Found 5 results for "authentication":
|
|
|
|
1. **#1234** [feature] Implemented JWT authentication
|
|
> Added token-based auth with refresh tokens
|
|
> Nov 9, 2024 • api-server
|
|
|
|
2. **#1235** [bugfix] Fixed token expiration edge case
|
|
> Handled race condition in refresh flow
|
|
> Nov 9, 2024 • api-server
|
|
```
|
|
|
|
**Include:** ID (for follow-up), type emoji (🔴 bugfix, 🟣 feature, 🔄 refactor, 🔵 discovery, 🧠 decision, ✅ change), title, subtitle, date, project.
|
|
|
|
For complete formatting guidelines, see [formatting.md](formatting.md).
|
|
|
|
## Error Handling
|
|
|
|
**Missing query parameter:**
|
|
```json
|
|
{"error": "Missing required parameter: query"}
|
|
```
|
|
Fix: Add the query parameter
|
|
|
|
**No results found:**
|
|
```json
|
|
{"query": "foobar", "count": 0, "results": []}
|
|
```
|
|
Response: "No results found for 'foobar'. Try different search terms."
|
|
|
|
## Tips
|
|
|
|
1. Be specific: "authentication JWT" > "auth"
|
|
2. Start with format=index and limit=5-10
|
|
3. Use project filtering when working on one codebase
|
|
4. If no results, try broader terms or check spelling
|