Skip to content

Commit f9d3c69

Browse files
committed
docs: update README for v3.0.0 — params command, 13 MCP tools, validation workflow
1 parent 050018b commit f9d3c69

1 file changed

Lines changed: 51 additions & 11 deletions

File tree

‎README.md‎

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</p>
99

1010
<p align="center">
11-
<a href="https://github.com/raylanlin/smarttune-cli/releases"><img src="https://img.shields.io/badge/version-2.3.1-blue?logo=github" alt="v2.3.1" /></a>
11+
<a href="https://github.com/raylanlin/smarttune-cli/releases"><img src="https://img.shields.io/badge/version-3.0.0-blue?logo=github" alt="v3.0.0" /></a>
1212
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-green" alt="License" /></a>
1313
<a href="https://www.python.org"><img src="https://img.shields.io/badge/python-3.9%2B-3776AB?logo=python" alt="Python 3.9+" /></a>
14-
<a href="https://github.com/raylanlin/smarttune-cli/actions"><img src="https://img.shields.io/badge/tests-96%20passed-brightgreen" alt="Tests" /></a>
14+
<a href="https://github.com/raylanlin/smarttune-cli/actions"><img src="https://img.shields.io/badge/tests-141%20passed-brightgreen" alt="Tests" /></a>
1515
</p>
1616

1717
<p align="center">
@@ -25,8 +25,8 @@
2525

2626
---
2727

28-
> **Pip-install SmartTune, point it at a flight log, and your agent comes back with exact parameter deltas — not vague "try lowering P."**
29-
> Every output is structured JSON or Markdown. No TUI, no blocking prompts, no ANSI escape codes to strip. The CLI was designed from day one to be invoked by an LLM agent as a subprocess tool — OpenClaw, Hermes, QwenPaw, Codex, Claude Code. Any agent that can shell out to `subprocess.run()` can use it.
28+
> **Pip-install SmartTune, point it at a flight log, and your agent comes back with exact parameter deltas — validated against real firmware parameter tables.**
29+
> No more guessing: `stune params --validate` checks every recommendation before it reaches the user.
3030
>
3131
> Under the hood: ArduPilot step-response analysis replicates WebTools PIDReview.js via Wiener deconvolution. Betaflight blackbox logs are parsed by a 1000+ line pure-Python decoder (no C extensions, no Node.js). All three platforms output to one `FlightData` dataclass so analyzers work identically across APM/BF/PX4. The 6-layer knowledge base is plain JSON — agents can read rules and propose new ones by editing `~/.smarttune/knowledge/`.
3232
@@ -103,16 +103,31 @@ smarttune-mcp # stdio transport (for agent frameworks)
103103
python -m smarttune.mcp_server
104104
```
105105

106-
**Available MCP tools:**
106+
**Available MCP tools (13 total):**
107107

108108
| Tool | Purpose |
109109
|------|---------|
110110
| `smarttune_list_platforms` | List supported platforms, extensions, and capabilities |
111-
| `smarttune_log_quality` | Parse a log and return quality score, data availability, validation issues |
112-
| `smarttune_analyze_log` | Run full analysis (PID + FFT + MagFit + hardware) and return structured JSON or Markdown |
111+
| `smarttune_log_quality` | Parse log and return quality score, data availability, validation issues |
112+
| `smarttune_analyze_log` | Full analysis (PID + FFT + Filter + Mag + SysID + Hardware) as JSON/Markdown |
113+
| `smarttune_analyze_pid` | PID step response analysis per axis |
114+
| `smarttune_analyze_fft` | FFT vibration spectrum with peak detection |
115+
| `smarttune_analyze_magfit` | Magnetometer calibration analysis |
116+
| `smarttune_analyze_sysid` | ARX system identification (natural freq, damping ratio) |
117+
| `smarttune_analyze_filter` | Filter transfer function analysis (Bode plot data) |
118+
| `smarttune_analyze_hardware` | Hardware configuration report |
119+
| `smarttune_generate_plot` | Generate analysis chart as base64 PNG |
120+
| `smarttune_list_params` | **NEW v3.0** — List firmware parameters for a platform |
121+
| `smarttune_search_params` | **NEW v3.0** — Search parameters by keyword across platforms |
122+
| `smarttune_validate_param` | **NEW v3.0** — ⚠️ Validate param exists + value in range before recommending |
113123

114124
All tools are annotated `readOnlyHint=True`, `destructiveHint=False`, `idempotentHint=True`.
115125

126+
**⚠️ Parameter validation is mandatory.** Before recommending ANY parameter change, call `smarttune_validate_param(param_name, value, platform)`. This prevents agents from suggesting parameters that don't exist in the target firmware — a critical issue because:
127+
- Betaflight 4.5+ renamed many parameters (`d_min_roll` → `d_max_roll`, `gyro_lowpass_hz` → `gyro_lpf1_static_hz`)
128+
- Parameter names differ between firmware versions
129+
- Some parameters have strict value ranges that must be respected
130+
116131
**Security boundary:**
117132

118133
- No shell execution — library calls only
@@ -297,6 +312,30 @@ List all available platform adapters and their capabilities.
297312
stune platforms
298313
```
299314

315+
### `stune params` 🆕 v3.0
316+
317+
Query and validate firmware parameter tables. Data scraped from official firmware source code.
318+
319+
```bash
320+
# List all parameters for a platform
321+
stune params ap # ArduPilot (2,574 params)
322+
stune params bf # Betaflight (45 params, BF 4.5+ names)
323+
stune params px4 # PX4 (20 params)
324+
325+
# Show parameter details
326+
stune params ATC_RAT_RLL_P # Auto-detects platform
327+
328+
# ⚠️ Validate before recommending (exit 0 = valid, 1 = invalid)
329+
stune params --validate ATC_RAT_RLL_P 0.15 -p ardupilot
330+
stune params --validate p_roll 999 -p betaflight # fails: exceeds max
331+
332+
# Search and filter
333+
stune params --search notch # Cross-platform search
334+
stune params --category pid -p betaflight
335+
```
336+
337+
**Architecture**: Parameters stored in `smarttune/knowledge/params/<platform>.json`. Update JSON to refresh — no code changes needed. See [Knowledge Base](#knowledge-base).
338+
300339
---
301340

302341
## Supported Platforms
@@ -575,10 +614,11 @@ stune analyze -i flight.bin
575614
| v1.x | ArduPilot full support | ✅ |
576615
| v2.0 Phase 1 | Multi-platform architecture | ✅ |
577616
| v2.0 Phase 2 | Betaflight BBL parser + analytics | ✅ |
578-
| **v2.1** | Platform-specific analyzers + Protocol constraints | ✅ |
579-
| **v2.2** | Full English docs, CLI --help, OpenClaw SKILL.md | ✅ |
580-
| v2.x | PX4 ULog adapter | 🔲 |
581-
| v3.0 | Tool-calling manifest, plugin system, web UI | 🔲 |
617+
| v2.1 | Platform-specific analyzers + Protocol constraints | ✅ |
618+
| v2.2 | Full English docs, CLI --help, OpenClaw SKILL.md | ✅ |
619+
| v2.4 | Technical debt cleanup + HTML report parity | ✅ |
620+
| **v3.0** | **Firmware parameter tables + MCP validation tools + knowledge base** | ✅ |
621+
| v3.x | PX4 ULog adapter, tool-calling manifest, web UI | 🔲 |
582622

583623
---
584624

0 commit comments

Comments
 (0)