research-library
Local-first multimedia research library for hardware projects. Capture code, CAD, PDFs, images. Search with material-type weighting. Project isolation with cross-references. Async extraction. Backup + restore.
- License 许可
- MIT
- 最近更新
- 2026-05-17
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- research-library
- tags
- [ "knowledge-management", "research", "hardware", "documentation", "sqlite", "fts5" ]
- author
- Sage (for Jon Buckles)
- license
- MIT
- version
- 0.1.0
- keywords
- [ "library", "search", "extraction", "project-management", "knowledge-base" ]
- repository
- https://github.com/[user]/research-library
- description
- Local-first multimedia research library for hardware projects. Capture code, CAD, PDFs, images. Search with material-type weighting. Project isolation with cross-references. Async extraction. Backup + restore.
02 资源文件 30
- 参考文档_meta.json288 B
- 参考文档BUILD_LOG.md3.5 KB
- 参考文档docs/CLI-REFERENCE.md12.1 KB
- 参考文档docs/EXTRACTION-GUIDE.md8.9 KB
- 参考文档docs/SEARCH-GUIDE.md10.4 KB
- 参考文档docs/WORKER-GUIDE.md11.8 KB
- 参考文档PHASE1-FINAL-METRICS.md5.0 KB
- 参考文档RESEARCH-LIBRARY-SKILL.md10.4 KB
- 脚本reslib/__init__.py2.1 KB
- 脚本reslib/__main__.py190 B
- 脚本reslib/cli.py54.8 KB
- 脚本reslib/database.py13.0 KB
- 脚本reslib/extractor.py53.7 KB
- 脚本reslib/models.py4.9 KB
- 脚本reslib/queue.py22.7 KB
- 脚本reslib/ranking.py24.4 KB
- 脚本reslib/schema.py20.8 KB
- 脚本reslib/search.py55.4 KB
- 脚本reslib/smoke_test.sh9.5 KB
- 脚本reslib/worker.py38.1 KB
- 参考文档TECHNICAL-NOTES.md6.5 KB
- 脚本tests/__init__.py34 B
- 脚本tests/test_cli.py28.2 KB
- 脚本tests/test_extractor.py32.7 KB
- 脚本tests/test_integration.py67.2 KB
- 脚本tests/test_schema.py18.9 KB
- 脚本tests/test_search.py33.0 KB
- 脚本tests/test_worker.py25.6 KB
- 参考文档war-room/BUILD_LOG.md5.8 KB
- 参考文档war-room/DECISIONS.md2.4 KB
03 SKILL.md 正文
Research Library Skill
A local-first multimedia research library for capturing, organizing, and searching hardware project knowledge.
What It Does
- Store documents — Code, PDFs, CAD files, images, schematics
- Extract automatically — Text from PDFs, EXIF from images, functions from code
- Search intelligently — Full-text with material-type weighting (your work ranks higher than external research)
- Project isolation — Arduino separate from CNC; no contamination
- Cross-reference — Link knowledge: "this servo tuning applies to that project"
- Async extraction — Searches never block while OCR runs
- Backup daily — 30-day rolling snapshots
Installation
clawhub install research-library
# OR
pip install /path/to/research-library
Quick Start
# Initialize database
reslib status
# Add a project
reslib add ~/projects/arduino/servo.py --project arduino --material-type reference
# Search
reslib search "servo tuning"
# Link knowledge
reslib link 5 12 --type applies_to
Features
CLI Commands
reslib add— Import documents (auto-detect + extract)reslib search— Full-text search with filtersreslib get— View document detailsreslib archive/reslib unarchive— Manage documentsreslib export— Export as JSON/Markdownreslib link— Create document relationshipsreslib projects— Manage projectsreslib tags— Manage tagsreslib status— System overviewreslib backup/reslib restore— Snapshotsreslib smoke_test.sh— Quick validation
Technical
- Storage: SQLite 3.45+ with FTS5 virtual table
- Extraction: PDF (pdfplumber + OCR), images (EXIF + OCR), code (AST + regex)
- Confidence Scoring: 0.0-1.0 based on quality + source
- Material Weighting: Reference (1.0) vs Research (0.5)
- Project Isolation: Scoped searches, no contamination
- Async Workers: 2-4 configurable extraction workers
- Catalog Separation: real_world vs openclaw projects
- Backup: Daily snapshots, 30-day retention
Configuration
Copy reslib/config.json and customize:
{
"db_path": "~/.openclaw/research/library.db",
"num_workers": 2,
"worker_timeout_sec": 300,
"max_retries": 3,
"backup_retention_days": 30,
"backup_dir": "~/.openclaw/research/backups",
"file_size_limit_mb": 200,
"project_size_limit_gb": 2
}
Integration with War Room
Use RL1 protocol in war room DNA:
from reslib import ResearchDatabase, ResearchSearch
db = ResearchDatabase()
search = ResearchSearch(db)
# Before researching, check existing knowledge
prior = search.search("servo tuning", project="rc-quadcopter")
if prior:
print(f"Found {len(prior)} prior items")
else:
# New research needed...
db.add_research(title="...", content="...", ...)
Performance
All targets exceeded:
| Operation | Target | Actual |
|---|---|---|
| PDF extraction | <100ms | 20.6ms |
| Search (50 docs) | <100ms | 0.33ms |
| Worker throughput | >6/sec | 414.69/sec |
Testing
# Run all tests
pytest tests/
# Quick smoke test
bash reslib/smoke_test.sh
# Performance tests
pytest tests/test_integration.py -v -k stress
Known Limitations (Phase 2)
- OCR quality varies on hand-drawn sketches
- FTS5 designed for <10K documents (PostgreSQL path for scale)
- No automatic web research gathering (manual only)
- Vector embeddings ready but inactive
- CAD file parsing is metadata-only
Documentation
See /docs/:
CLI-REFERENCE.md— All commands + examplesEXTRACTION-GUIDE.md— How extraction worksSEARCH-GUIDE.md— Ranking + weightingWORKER-GUIDE.md— Async queue detailsINTEGRATION.md— War room RL1 protocol
Phase 2 Roadmap
- Real-world PDF calibration
- FTS5 scaling tests (10K docs)
- Auto-detection (reference vs research)
- Web research enrichment
- Vector embeddings (semantic search)
- PostgreSQL upgrade path
Building From Source
cd research-library
pip install -e .
pytest tests/
python -m reslib status
Support
Issues? See TECHNICAL-NOTES.md for troubleshooting.
Production-ready MVP. 214 tests passing. 15K lines. Ready to use.
04 同仓库更多 Skills
zvukogram
Text-to-Speech via Zvukogram API with SSML support. Use when you need to generate speech from text, create podcasts, voice notifications, or work with audio. Supports speed control, stress marks, English word transcription, and audio fragment merging.
zohomail
Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-recruit
Zoho Recruit API integration with managed OAuth. Manage candidates, job openings, interviews, and recruitment workflows. Use this skill when users want to read, create, update, or search recruitment data like candidates, job openings, interviews, and applications in Zoho Recruit. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-people
Zoho People API integration with managed OAuth. Manage employees, departments, designations, attendance, and leave. Use this skill when users want to read, create, update, or query HR data like employees, departments, designations, and forms in Zoho People. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-mail
Zoho Mail API integration with managed OAuth. Send, receive, and manage emails, folders, and labels. Use this skill when users want to send emails, read messages, manage folders, or work with email labels in Zoho Mail. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.
zoho-inventory
Zoho Inventory API integration with managed OAuth. Manage items, sales orders, invoices, purchase orders, bills, contacts, and shipments. Use this skill when users want to read, create, update, or delete inventory items, sales orders, invoices, purchase orders, bills, or other inventory records in Zoho Inventory. For other third party apps, use the api-gateway skill (https://clawhub.ai/byungkyu/api-gateway). Requires network access and valid Maton API key.