Make research skill self-contained without external scripts
- Rewrite SKILL.md with inline instructions to spawn g3 --agent scout directly - Extend read_file to handle embedded skill paths (<embedded:name>/SKILL.md) - Remove scripts field from EmbeddedSkill struct (no longer needed) - Delete extraction.rs module (was only for script extraction) - Delete g3-research bash script - Remove obsolete Async Research Tool section from workspace memory Skills are now fully portable - they work when g3 is installed as a binary without access to source files. Agents can read embedded skill content via read_file with the special <embedded:...> path syntax.
This commit is contained in:
@@ -211,37 +211,6 @@ max_tokens = 4096
|
||||
gpu_layers = 99
|
||||
```
|
||||
|
||||
### Async Research Tool
|
||||
Research tool is asynchronous - spawns scout agent in background, returns immediately with research_id.
|
||||
|
||||
- `crates/g3-core/src/pending_research.rs`
|
||||
- `PendingResearchManager` [80..100] - thread-safe task storage (Arc<Mutex<HashMap>>)
|
||||
- `ResearchTask` [40..75] - id, query, status, result, started_at, injected
|
||||
- `ResearchStatus` [20..35] - Pending, Complete, Failed enum
|
||||
- `register()` [110..125] - creates task, returns research_id
|
||||
- `complete()` / `fail()` [130..150] - update task status
|
||||
- `take_completed()` [180..200] - returns completed tasks, marks as injected
|
||||
- `list_all()` [165..170] - returns all tasks for /research command
|
||||
|
||||
- `crates/g3-core/src/tools/research.rs`
|
||||
- `execute_research()` [150..210] - spawns scout in tokio::spawn, returns placeholder
|
||||
- `run_scout_agent()` [215..300] - async fn that runs in background task
|
||||
- `execute_research_status()` [305..380] - check status of pending research
|
||||
|
||||
- `crates/g3-core/src/lib.rs`
|
||||
- `inject_completed_research()` [1080..1120] - injects completed research into context
|
||||
- Called at start of each tool iteration and before user prompt in interactive mode
|
||||
|
||||
- `crates/g3-cli/src/commands.rs`
|
||||
- `/research` command [125..160] - lists all research tasks with status
|
||||
|
||||
**Flow:**
|
||||
1. Agent calls `research(query)` → returns immediately with research_id
|
||||
2. Scout agent runs in background tokio task
|
||||
3. On completion, `PendingResearchManager.complete()` stores result
|
||||
4. At next iteration start or user prompt, `inject_completed_research()` adds to context
|
||||
5. Agent can check status with `research_status` tool or user with `/research` command
|
||||
|
||||
### Plan Mode (replaces TODO system)
|
||||
Structured task planning with cognitive forcing - requires happy/negative/boundary checks.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user