docs: describe 3-level help paste hierarchy
Some checks failed
CI / gitleaks (push) Failing after 3s
CI / lint (push) Failing after 23s
CI / test (3.11) (push) Has been skipped
CI / test (3.12) (push) Has been skipped
CI / test (3.13) (push) Has been skipped
CI / build (push) Has been skipped

USAGE.md: add Detailed Help section with format example.
CHEATSHEET.md: note hierarchy layout in help description.
TASKS.md: update sprint with hierarchy task and test count.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
user
2026-02-23 23:22:49 +01:00
parent 20c1d738be
commit b658053711
3 changed files with 31 additions and 5 deletions

View File

@@ -7,9 +7,10 @@
| P0 | [x] | `!help <cmd>` pastes docstring detail via FlaskPaste, appends URL |
| P0 | [x] | `!help <plugin>` 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)

View File

@@ -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

View File

@@ -206,6 +206,30 @@ unchanged. The server name is derived from the hostname automatically.
| `!cron <add\|del\|list>` | 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 <cmd>` -- pastes the command's docstring (command at column 0)
- `!help <plugin>` -- 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: