From baa8e7bb925db423a1b0e2c64d17390832eb69cd Mon Sep 17 00:00:00 2001 From: Mateusz Stomski Date: Sat, 3 Oct 2026 06:33:58 +0200 Subject: [PATCH] docs(plans): enforce documentation triad, man page, and CLI help standards --- docs/plans/linux-backuper/00-status.md | 8 +++++++- docs/plans/linux-backuper/01-spec.md | 13 +++++++++++++ docs/plans/linux-backuper/03-program-design.md | 8 +++++++- docs/plans/linux-backuper/04-slices.md | 14 +++++++++----- 4 files changed, 36 insertions(+), 7 deletions(-) diff --git a/docs/plans/linux-backuper/00-status.md b/docs/plans/linux-backuper/00-status.md index 63dcc29..508d898 100644 --- a/docs/plans/linux-backuper/00-status.md +++ b/docs/plans/linux-backuper/00-status.md @@ -13,7 +13,7 @@ - [ ] Slice 5 — retention policy & pruning engine (`--keep-last`, `--keep-daily`, automated cleanup) - [ ] Slice 6 — remote destination engine (SFTP / SCP / rsync / NFS export sync) - [ ] Slice 7 — packaging & distribution (.deb, .rpm, .tar.gz standalone) -- [ ] Slice 8 — documentation, man page (Section 8) & Gitea Actions CI/CD release workflow +- [ ] Slice 8 — full documentation (user, admin & developer guides), man page (Section 8), CLI -h/--help & Gitea Actions CI/CD release workflow ## Notes for a fresh session - Project: Enterprise-grade Linux system snapshot and configuration backup utility. @@ -22,5 +22,11 @@ - Platforms: Debian 11/12, Ubuntu 20.04/22.04/24.04, RHEL 8/9, AlmaLinux 8/9, Rocky Linux 8/9, Fedora 39/40/41, Arch Linux. - Target Python runtime: Python >= 3.6 (RHEL 8 compatibility). - Dependencies: Zero mandatory external dependencies (pure Python standard library). Optional `cryptography` for encrypted snapshots. +- Documentation Standard (Mandatory parity with linux-updater): + - User Guide: `docs/user-guide.md` (comprehensive operator workflow and snapshot recovery). + - Administrator Guide: `docs/admin-guide.md` (automation, systemd timer/cron setup, logrotate, monitoring, JSON parsing). + - Developer Guide: `docs/developer-guide.md` (internal architecture, adapter extension, test suite). + - System Manual Page: `man/linux-backuper.8` (complete Section 8 man page). + - Rich CLI Help: Complete `-h` and `--help` for root and all sub-commands with syntax, argument descriptions, and realistic examples. - Testing environment: Proxmox VE cluster (`alma-crash`, `arch-crash`, `debian-crash`, `fedora-crash`, `ubuntu-crash`) and Podman on macOS. - Repository: `https://gitea.wired.synology.me/soda64/linux-backuper.git` on branch `main`. diff --git a/docs/plans/linux-backuper/01-spec.md b/docs/plans/linux-backuper/01-spec.md index 117fe7f..27ed52c 100644 --- a/docs/plans/linux-backuper/01-spec.md +++ b/docs/plans/linux-backuper/01-spec.md @@ -93,3 +93,16 @@ Configuration files modified: - Config: `/etc/linux-backuper.json` - Default local backup directory: `/var/backups/linux-backuper/` - Logs: `/var/log/linux-backuper/` + +--- + +## 6. Documentation Deliverables & CLI Help Standards (Parity with linux-updater) +To guarantee consistency across the homelab tooling ecosystem, `linux-backuper` delivers four full documentation artifacts and a rich CLI help interface: +1. **User Guide (`docs/user-guide.md`):** Practical, scenario-driven walkthroughs for operators (routine backups, checking status, inspecting snapshot metadata, diffing configurations, selective single-file restores). +2. **Administrator Guide (`docs/admin-guide.md`):** System administration, automated scheduling (systemd timer, cron), log rotation (`/etc/logrotate.d/linux-backuper`), monitoring integration (Prometheus/Zabbix/Wazuh JSON parsing), and remote NAS retention management. +3. **Developer Guide (`docs/developer-guide.md`):** Codebase architecture, adding new system inspector modules, implementing storage backends, and executing containerized test suites. +4. **System Manual Page (`man/linux-backuper.8`):** Full troff/groff UNIX Section 8 man page detailing all options, environment variables, exit codes, and examples. +5. **Interactive CLI Help (`-h` / `--help`):** + - Root `linux-backuper -h` outputs an intuitive summary of all sub-commands with usage hints. + - Each sub-command (`snapshot -h`, `list -h`, `show -h`, `diff -h`, `verify -h`, `extract -h`, `prune -h`) provides full argument descriptions, default values, and concrete examples. + diff --git a/docs/plans/linux-backuper/03-program-design.md b/docs/plans/linux-backuper/03-program-design.md index b660102..61bbe42 100644 --- a/docs/plans/linux-backuper/03-program-design.md +++ b/docs/plans/linux-backuper/03-program-design.md @@ -33,8 +33,14 @@ linux-backuper/ │ ├── install.sh # Tarball installer script │ ├── deb/ │ └── rpm/ +├── docs/ +│ ├── user-guide.md # End-user operator guide +│ ├── admin-guide.md # Admin, automation & monitoring guide +│ ├── developer-guide.md # Architecture & developer guide +│ └── plans/ +│ └── linux-backuper/ # Software Factory planning artifacts ├── man/ -│ └── linux-backuper.8 # Man page +│ └── linux-backuper.8 # Complete Section 8 UNIX man page ├── tests/ │ ├── __init__.py │ ├── test_cli.py diff --git a/docs/plans/linux-backuper/04-slices.md b/docs/plans/linux-backuper/04-slices.md index 8710c59..2709d90 100644 --- a/docs/plans/linux-backuper/04-slices.md +++ b/docs/plans/linux-backuper/04-slices.md @@ -78,10 +78,14 @@ This roadmap defines the implementation order for `linux-backuper` in thin, inde --- -### Slice 8 — Documentation & Gitea Actions CI/CD Workflow -- **Goal:** Production-ready release automation. +### Slice 8 — Full Documentation, Man Page, CLI Help & Gitea Actions CI/CD Workflow +- **Goal:** Production-ready release automation and complete operator, admin, and developer documentation. - **Components:** - - Man page in `man/linux-backuper.8`. - - Comprehensive documentation (`README.md`, `docs/admin-guide.md`). + - `docs/user-guide.md`: Comprehensive operator scenarios, routine backups, inspection, diffing, and single-file extracts. + - `docs/admin-guide.md`: Automation via systemd timer/cron, `/etc/logrotate.d/` rule, monitoring JSON integration, and remote SFTP/NFS retention. + - `docs/developer-guide.md`: Internal architecture, extending package/storage managers, and testing runbook. + - `man/linux-backuper.8`: Full UNIX Section 8 man page (`man 8 linux-backuper`). + - Interactive CLI Help: Complete `-h` and `--help` for root and all sub-commands with usage examples. - `.gitea/workflows/release.yml`: Gitea Actions pipeline targeting `runs-on: fedora`, running tests, building `.rpm`/`.deb`, publishing to Gitea Package Registry and Release assets. -- **Verification:** Validate workflow syntax and verify package linking API requests. +- **Verification:** Unit tests verifying `linux-backuper -h` and each sub-command `--help` return exit code 0; man page syntax verified with `man -l man/linux-backuper.8`. +