diff --git a/TASKS.md b/TASKS.md index 1c02743..8e50e16 100644 --- a/TASKS.md +++ b/TASKS.md @@ -7,9 +7,10 @@ | P0 | [x] | `!help ` pastes docstring detail via FlaskPaste, appends URL | | P0 | [x] | `!help ` pastes all plugin command details | | P0 | [x] | `!help` (no args) pastes full reference grouped by plugin | +| P1 | [x] | 3-level hierarchy: plugin (col 0), command (indent 4), docstring (indent 8) | | P1 | [x] | Graceful fallback when FlaskPaste not loaded or paste fails | -| P1 | [x] | Helper functions: `_build_cmd_detail`, `_paste` | -| P1 | [x] | Tests: 5 new cases in test_core.py (9 total) | +| P1 | [x] | Helper functions: `_build_cmd_detail(indent=)`, `_paste` | +| P1 | [x] | Tests: 7 new cases in test_core.py (11 total) | | P2 | [x] | Documentation update (USAGE.md, CHEATSHEET.md, TASKS.md) | ## Previous Sprint -- MusicBrainz Fallback (2026-02-23) diff --git a/docs/CHEATSHEET.md b/docs/CHEATSHEET.md index 77c78a7..deae1d4 100644 --- a/docs/CHEATSHEET.md +++ b/docs/CHEATSHEET.md @@ -95,9 +95,10 @@ Profile data written on graceful shutdown when bot runs with `--cprofile`. !h # Shorthand (any unambiguous prefix works) ``` -Detailed help output (docstrings, subcommands, examples) is pasted to -FlaskPaste and appended as a URL. Falls back gracefully if FlaskPaste -is not loaded. +Detailed help is pasted to FlaskPaste and appended as a URL. Paste +layout uses a 3-level hierarchy: `[plugin]` at column 0, `!command` +at indent 4, docstring body at indent 8. Falls back gracefully if +FlaskPaste is not loaded. ## Permission Tiers diff --git a/docs/USAGE.md b/docs/USAGE.md index 8831da7..8bc0d3f 100644 --- a/docs/USAGE.md +++ b/docs/USAGE.md @@ -206,6 +206,30 @@ unchanged. The server name is derived from the hostname automatically. | `!cron ` | Scheduled command execution (admin) | | `!webhook` | Show webhook listener status (admin) | +### Detailed Help (FlaskPaste) + +`!help` pastes detailed reference output to FlaskPaste and appends the +URL. The paste uses a 3-level indentation hierarchy: + +``` +[plugin-name] + Plugin description. + + !command -- short help + Full docstring with usage, subcommands, + and examples. + + !other -- another command + Its docstring here. +``` + +- `!help` (no args) -- pastes the full reference grouped by plugin +- `!help ` -- pastes the command's docstring (command at column 0) +- `!help ` -- pastes all commands under the plugin header + +If FlaskPaste is not loaded or the paste fails, the short IRC reply +still works -- no regression. + ### Command Shorthand Commands can be abbreviated to any unambiguous prefix: