Session log: Ollama + GrepAI setup, coordinator review policy
Installed Ollama with GPU support (qwen3:14b, codestral:22b, nomic-embed-text), configured GrepAI semantic code search with optimized 256-token chunks and context file boosting, added MCP server integration and deep-explore agent. Updated claude.md with local AI usage guidelines and 4-tier output review policy. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -419,3 +419,125 @@ sudo chown -R azcomputerguru:staff /Users/azcomputerguru/ClaudeTools/.git/object
|
||||
1. **KVOI bio** — Ready to publish, may need similar for radio.azcomputerguru.com
|
||||
2. **VMware scan at VWP** — Need VPN access to scan 192.168.0.x and 192.168.3.x
|
||||
3. **Install nmap on MacBook Air** — Would improve network scanning: `brew install nmap`
|
||||
|
||||
---
|
||||
|
||||
## Update: 15:45 — Ollama + GrepAI Setup on CachyOS Workstation
|
||||
|
||||
### Session Summary
|
||||
|
||||
Set up local AI infrastructure on acg-guru-5070 (CachyOS workstation). Installed Ollama with NVIDIA GPU support, pulled three models, installed and configured GrepAI for semantic code search, configured MCP server integration for Claude Code, and updated coordinator directives in `.claude/claude.md` with Ollama usage policies and review thresholds.
|
||||
|
||||
### Work Completed
|
||||
|
||||
#### 1. Ollama Installation
|
||||
- **Install method:** Official install script (`curl -fsSL https://ollama.com/install.sh | sh`)
|
||||
- **Location:** `/usr/local/bin/ollama`
|
||||
- **Service:** systemd (`ollama.service`), enabled on boot, auto-starts
|
||||
- **GPU:** NVIDIA RTX 5070 Ti Mobile detected automatically
|
||||
|
||||
#### 2. Models Pulled
|
||||
|
||||
| Model | Size | Purpose |
|
||||
|-------|------|---------|
|
||||
| `qwen3:14b` | 9.3 GB | General sub-tasks: summarization, classification, data extraction, drafting |
|
||||
| `codestral:22b` | 12 GB | Code-specific sub-tasks: code generation, refactoring suggestions |
|
||||
| `nomic-embed-text` | 274 MB | Embeddings for GrepAI semantic search |
|
||||
|
||||
#### 3. GrepAI Installation & Configuration
|
||||
- **Version:** v0.35.0
|
||||
- **Install:** Official install script (`curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh`)
|
||||
- **Location:** `/usr/local/bin/grepai`
|
||||
- **Config:** `/home/guru/ClaudeTools/.grepai/config.yaml`
|
||||
- **Index stats:** 1,437 files / 20,945 chunks / 118.3 MB
|
||||
- **Chunk size:** 256 tokens (optimized from default 512, matching previous Windows setup)
|
||||
- **Watcher:** Running as background daemon (PID 2665677)
|
||||
- **Watcher log:** `/home/guru/.local/state/grepai/logs/grepai-worktree-37becac32343.log`
|
||||
|
||||
**Search boost config applied:**
|
||||
- `credentials.md` — 1.5x boost
|
||||
- `directives.md` — 1.5x boost
|
||||
- `/session-logs/` — 1.4x boost
|
||||
- `/.claude/` — 1.3x boost
|
||||
- `.md` penalty removed (was 0.6x default, now neutral)
|
||||
|
||||
**Verified working:** `grepai search "SSH credentials"` correctly ranked `credentials.md` first (score 1.08)
|
||||
|
||||
#### 4. MCP Server Integration
|
||||
- **Config file:** `/home/guru/.claude/projects/-home-guru-ClaudeTools/settings.json`
|
||||
- **Server:** `grepai mcp-serve` with cwd `/home/guru/ClaudeTools`
|
||||
- **Requires:** Claude Code restart to load
|
||||
|
||||
#### 5. deep-explore Agent
|
||||
- Created by `grepai agent-setup --with-subagent`
|
||||
- **File:** `.claude/agents/deep-explore.md`
|
||||
- Provides semantic search + call graph tracing via Bash commands to grepai CLI
|
||||
|
||||
#### 6. claude.md Updates (Coordinator Directives)
|
||||
|
||||
Added to `.claude/claude.md` (syncs to all stations via Gitea):
|
||||
|
||||
**a) Delegation table:** Added `deep-explore` agent for semantic code search
|
||||
|
||||
**b) Local AI (Ollama) section:**
|
||||
- Available models table
|
||||
- GrepAI usage guidance (when to use vs Grep/Glob, how to use via MCP/agent/CLI)
|
||||
- Ollama sub-task guidance (when to offload vs use Claude, API examples)
|
||||
|
||||
**c) Ollama Output Review Policy — 4 impact tiers:**
|
||||
|
||||
| Level | Review Required | Examples |
|
||||
|-------|----------------|----------|
|
||||
| Critical | ALWAYS review + verify against source | Auth/security code, credentials, DB migrations, production config, user-facing output |
|
||||
| High | Review for correctness, spot-check | API logic, business rules, infra scripts, client work |
|
||||
| Medium | Skim for obvious errors | Internal docs, session summaries, boilerplate |
|
||||
| Low | Trust without review | Classification, reformatting, placeholders |
|
||||
|
||||
- Batch processing rule: review first 2-3 items before trusting the rest
|
||||
- Flag-to-user rule: if local model output is Critical and review is uncertain, explicitly tell user
|
||||
|
||||
**d) Cross-platform fix:** SSH path note updated to cover both Windows and Linux
|
||||
|
||||
### Problems Encountered & Solutions
|
||||
|
||||
| Problem | Solution |
|
||||
|---------|----------|
|
||||
| `grepai index --force` command not found | v0.35.0 removed standalone `index` command — indexing is handled by `grepai watch` |
|
||||
| GrepAI watcher log directory missing | Created `/home/guru/.local/state/grepai/logs/` manually |
|
||||
| Both model pulls interrupted by wifi change | Ollama handles reconnection automatically — pulls resumed fine |
|
||||
|
||||
### Files Created
|
||||
- `/home/guru/.claude/projects/-home-guru-ClaudeTools/settings.json` — MCP server config for GrepAI
|
||||
- `/home/guru/ClaudeTools/.grepai/config.yaml` — GrepAI config (customized)
|
||||
- `/home/guru/ClaudeTools/.claude/agents/deep-explore.md` — GrepAI exploration subagent
|
||||
|
||||
### Files Modified
|
||||
- `/home/guru/ClaudeTools/.claude/claude.md` — Added Ollama section, review policy, delegation update, date bump
|
||||
|
||||
### Key Commands Reference
|
||||
```bash
|
||||
# Ollama
|
||||
ollama list # Show installed models
|
||||
ollama run qwen3:14b # Interactive general chat
|
||||
ollama run codestral:22b # Interactive code chat
|
||||
systemctl status ollama # Check service
|
||||
|
||||
# Ollama API
|
||||
curl -s http://localhost:11434/api/generate -d '{"model":"qwen3:14b","prompt":"...","stream":false}' | jq -r '.response'
|
||||
curl -s http://localhost:11434/api/chat -d '{"model":"codestral:22b","messages":[{"role":"user","content":"..."}],"stream":false}' | jq -r '.message.content'
|
||||
|
||||
# GrepAI
|
||||
grepai status # Index health
|
||||
grepai search "query" --json --compact # Semantic search
|
||||
grepai watch --status # Watcher status
|
||||
grepai watch --stop # Stop watcher
|
||||
grepai watch --background # Start watcher daemon
|
||||
grepai trace callers "FuncName" # Call graph
|
||||
```
|
||||
|
||||
### Pending/Incomplete
|
||||
1. **Restart Claude Code** — Required to load GrepAI MCP server
|
||||
2. **Verify MCP integration** — Test `grepai` tools work after restart
|
||||
3. **Commit and push** — `.claude/claude.md` changes need to sync to Gitea for other stations
|
||||
4. **GrepAI watcher auto-start** — Currently a backgrounded process, not a systemd service. Consider creating `~/.config/systemd/user/grepai-watcher.service` for persistence across reboots
|
||||
5. **Java 8 still default JRE** — Switch back if needed: `sudo archlinux-java set java-25-openjdk`
|
||||
|
||||
Reference in New Issue
Block a user