From cb390ad6afda81d77047c1fd130d10d05c121b26 Mon Sep 17 00:00:00 2001 From: curo1305 Date: Tue, 19 May 2026 14:35:44 +0200 Subject: [PATCH] docs: update README and CLAUDE.md to reflect current state Add daemon subcommands to README command table (Stage 6 stubs), add Multi-step Planning section, add chat/planner.py to CLAUDE.md architecture table, add TaskPlanner to internal classes inventory, and remove stale test count. Co-Authored-By: Claude Sonnet 4.6 --- CLAUDE.md | 4 +++- README.md | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/CLAUDE.md b/CLAUDE.md index b11c559..85cd00b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -99,6 +99,7 @@ the vault under namespaced keys (`plugin:{name}:{key}`). | `config/manager.py` | ruamel.yaml round-trip config read/write, chmod 600 enforced | | `config/dirs.py` | `bootstrap()` — creates `~/.pyra/` tree, checks vault sentinel every startup | | `chat/session.py` | prompt_toolkit REPL loop, AI tool-use loop, plugin slash commands | +| `chat/planner.py` | `TaskPlanner` — multi-step plan approval loop, per-step AI execution and verification | | `chat/renderer.py` | Streaming + non-streaming markdown via rich, injection warning panel | | `chat/history.py` | Conversation list, token budget trimming, tool message support | | `memory/database.py` | SQLite+FTS5 — `init_db()`, `upsert()`, `remove()`, `search()`, `list_all()`, `migrate_from_files()` | @@ -243,7 +244,7 @@ uv pip install -e ".[all-plugins]" # Everything ## Running Tests ```bash -pytest tests/ -v # all unit + security tests (161 tests) +pytest tests/ -v # all unit + security tests pytest tests/integration/test_lmstudio.py # requires LM Studio at localhost:1234 ``` @@ -524,3 +525,4 @@ Import `console` from here; do not create a second `rich.Console()` in new code. | `Tool` | `plugins.base` | Dataclass — `name`, `description`, `parameters` (JSON Schema), `handler`, `requires_approval` | | `PyraPlugin` | `plugins.base` | `@runtime_checkable` Protocol — the plugin interface | | `BasePlugin` | `plugins.base` | Concrete base with no-op defaults; plugins should inherit this | +| `TaskPlanner` | `chat.planner` | Multi-step plan runner; `make_tool_handler()` returns the callable wired into the chat session; presents plan for user approval, executes each step via litellm with up to 5 tool-use iterations, verifies output before proceeding | diff --git a/README.md b/README.md index 92aa3b2..e13f8e2 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,12 @@ pyra chat # start talking | `pyra plugin enable ` | Enable an installed plugin | | `pyra plugin disable ` | Disable a plugin (keeps it installed) | | `pyra plugin setup ` | Run a plugin's credential setup wizard | +| `pyra daemon start` | Start the background daemon *(Stage 6, not yet implemented)* | +| `pyra daemon stop` | Stop the running daemon *(Stage 6, not yet implemented)* | +| `pyra daemon status` | Show daemon status *(Stage 6, not yet implemented)* | +| `pyra daemon restart` | Restart the daemon *(Stage 6, not yet implemented)* | +| `pyra daemon install` | Register Pyra as a system service *(Stage 6, not yet implemented)* | +| `pyra daemon uninstall` | Remove the system service *(Stage 6, not yet implemented)* | ### In-chat slash commands @@ -69,6 +75,14 @@ pyra plugin setup # enter credentials (stored in vault) pyra plugin enable # activate for the next chat session ``` +## Multi-step Planning + +When given a complex task the AI can propose a **multi-step plan** using the built-in +`plan_and_execute` tool. Pyra prints the plan and asks for approval before executing +anything. Each step runs as a separate AI call with access to enabled plugin tools; each +result is verified before moving on to the next step. You can decline the plan or +interrupt at any point. + ## Memory Pyra reads your memory files at the start of each session and injects them as context.