mirror of
https://github.com/instructkr/claw-code.git
synced 2026-04-06 16:14:49 +08:00
feat(rust): surface workspace skill discovery in /skills
The TypeScript CLI exposes a skills browser backed by workspace/user skill discovery, while the Rust port only had partial local loading and an inconsistent slash-command view. This change adds a shared runtime skill discovery path, teaches the Skill tool to resolve workspace `.codex/.claw` skills plus legacy `/commands`, and makes `/skills` report the checked local skill directories in the current workspace context. Constraint: Keep scope limited to local/workspace skill discovery without inventing bundled or remote registries yet Rejected: Add a bundled skill registry surface now | too broad for this parity increment Rejected: Leave tool resolution and /skills discovery separate | misleading output and weaker parity with TS Confidence: high Scope-risk: moderate Reversibility: clean Directive: Extend the shared runtime skill discovery path before adding new skill sources so the tool surface and /skills stay aligned Tested: cargo fmt --all; cargo test -p runtime skills:: -- --nocapture; cargo test -p commands skills -- --nocapture; cargo test -p tools skill_ -- --nocapture; cargo test -p claw-cli skills -- --nocapture; cargo test -p claw-cli init_help_mentions_direct_subcommand -- --nocapture Not-tested: Full workspace-wide cargo test sweep
This commit is contained in:
10
PARITY.md
10
PARITY.md
@@ -104,18 +104,18 @@ Evidence:
|
||||
|
||||
### Rust exists
|
||||
Evidence:
|
||||
- `Skill` tool in `rust/crates/tools/src/lib.rs` resolves and reads local `SKILL.md` files.
|
||||
- `Skill` tool in `rust/crates/tools/src/lib.rs` now resolves workspace-local `.codex/.claw` skills plus legacy `/commands` entries through shared runtime discovery.
|
||||
- `/skills` exists in `rust/crates/commands/src/lib.rs` and `rust/crates/claw-cli/src/main.rs`, listing discoverable local skills and checked skill directories in the current workspace context.
|
||||
- CLAW.md discovery is implemented in `rust/crates/runtime/src/prompt.rs`.
|
||||
- Rust supports `/memory` and `/init` via `rust/crates/commands/src/lib.rs` and `rust/crates/claw-cli/src/main.rs`.
|
||||
|
||||
### Missing or broken in Rust
|
||||
- No bundled skill registry equivalent.
|
||||
- No `/skills` command.
|
||||
- No MCP skill-builder pipeline.
|
||||
- No TS-style live skill discovery/reload/change handling.
|
||||
- No comparable session-memory / team-memory integration around skills.
|
||||
|
||||
**Status:** basic local skill loading only.
|
||||
**Status:** local/workspace skill loading plus minimal `/skills` discovery; bundled/MCP parity still missing.
|
||||
|
||||
---
|
||||
|
||||
@@ -130,11 +130,11 @@ Evidence:
|
||||
### Rust exists
|
||||
Evidence:
|
||||
- Shared slash command registry in `rust/crates/commands/src/lib.rs`.
|
||||
- Rust slash commands currently cover `help`, `status`, `compact`, `model`, `permissions`, `clear`, `cost`, `resume`, `config`, `memory`, `init`, `diff`, `version`, `export`, `session`.
|
||||
- Rust slash commands currently cover `help`, `status`, `compact`, `model`, `permissions`, `clear`, `cost`, `resume`, `config`, `memory`, `init`, `diff`, `version`, `export`, `session`, `plugin`, `agents`, and `skills`.
|
||||
- Main CLI/repl/prompt handling lives in `rust/crates/claw-cli/src/main.rs`.
|
||||
|
||||
### Missing or broken in Rust
|
||||
- Missing major TS command families: `/agents`, `/hooks`, `/mcp`, `/plugin`, `/skills`, `/plan`, `/review`, `/tasks`, and many others.
|
||||
- Missing major TS command families: `/hooks`, `/mcp`, `/plan`, `/review`, `/tasks`, and many others.
|
||||
- No Rust equivalent to TS structured IO / remote transport layers.
|
||||
- No TS-style handler decomposition for auth/plugins/MCP/agents.
|
||||
- JSON prompt mode now maintains clean transport output in tool-capable runs; targeted CLI coverage should guard against regressions.
|
||||
|
||||
Reference in New Issue
Block a user