Skip to content

docs: add mdBook user manual - #41

Merged
BraCR10 merged 1 commit into
developmentfrom
docs/book
Jul 30, 2026
Merged

docs: add mdBook user manual#41
BraCR10 merged 1 commit into
developmentfrom
docs/book

Conversation

@BraCR10

@BraCR10 BraCR10 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds book/, an mdBook covering:

  • Installation and basic usage
  • Full CLI flags reference and date-shorthand rules
  • The configuration file format, precedence, and all-or-nothing validation
  • Output formats (console/plain/json) and the JSON fatal-error envelope
  • Every report metric, including the activity grid's automatic granularity
    thresholds (90-day/730-day boundaries, reasoned from table row-count
    practicality) and the progress-indicator's 3-second threshold (measured
    from 3 real connect-and-fetch round trips)

Deferred until after Phase 4/5 implementation so it documents real, verified
behavior instead of the original spec's proposed shape.

Test plan

  • mdbook build succeeds with no warnings
  • Content cross-checked against src/cli/args.rs help text and src/stats/grid.rs thresholds

Summary by CodeRabbit

  • Documentation
    • Added comprehensive mdBook documentation for installation, introduction, basic usage, configuration, command-line flags, and output formats.
    • Documented all report metrics, including activity, longevity, liveness, trade consistency, disputes, bond policy, and context signals.
    • Added guidance on metric interpretation, unavailable data, date ranges, output behavior, and configuration precedence.
    • Added navigation and metadata for building and publishing the documentation book.

Adds the book/ mdBook covering installation, CLI flags, the
configuration file, output formats, and every report metric,
including the activity grid's granularity thresholds and the
progress-indicator latency threshold. Deferred until after
implementation so it documents real, verified behavior instead of
the original spec's proposed shape.
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds an mdBook for mostro-score with navigation, installation and usage guides, output-format documentation, and detailed definitions for activity and reputation metrics.

Changes

Project documentation

Layer / File(s) Summary
Book structure and entry pages
.gitignore, book/book.toml, book/src/SUMMARY.md, book/src/introduction.md, book/src/installation.md
Configures mdBook, registers documentation pages, and adds introductory and installation content.
CLI usage and output behavior
book/src/usage/*, book/src/output-formats.md
Documents invocation, flags, date shorthands, configuration precedence and validation, and console/plain/JSON output behavior.
Metric scope and activity behavior
book/src/metrics/README.md, book/src/metrics/activity-grid.md
Defines event filtering, missing-data handling, activity-grid range selection, granularity, boundaries, and fetch progress messaging.
Metric definitions
book/src/metrics/longevity-liveness.md, book/src/metrics/trade-size-consistency.md, book/src/metrics/disputes-bond-policy.md, book/src/metrics/context-signals.md
Documents longevity, liveness, consistency, trade-size, dispute, bond-policy, fiat, payment-method, and premium metrics.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a rabbit with pages to spare,
Hopping through metrics with care.
From relays to reports,
In three output sorts,
A tidy new book blooms there.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding an mdBook user manual in docs.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/book

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@BraCR10
BraCR10 merged commit e1ccb44 into development Jul 30, 2026
3 of 4 checks passed
@BraCR10
BraCR10 deleted the docs/book branch July 30, 2026 12:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@book/src/usage/flags.md`:
- Line 6: Update the --relays option description in the flags reference to use
the grammatically correct “comma-separated” compound modifier, preserving the
existing relay fallback behavior text.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a293a692-64c1-4524-a4a3-a2b64d59b8c0

📥 Commits

Reviewing files that changed from the base of the PR and between 38994a3 and e76d12d.

📒 Files selected for processing (15)
  • .gitignore
  • book/book.toml
  • book/src/SUMMARY.md
  • book/src/installation.md
  • book/src/introduction.md
  • book/src/metrics/README.md
  • book/src/metrics/activity-grid.md
  • book/src/metrics/context-signals.md
  • book/src/metrics/disputes-bond-policy.md
  • book/src/metrics/longevity-liveness.md
  • book/src/metrics/trade-size-consistency.md
  • book/src/output-formats.md
  • book/src/usage/basic.md
  • book/src/usage/config-file.md
  • book/src/usage/flags.md

Comment thread book/src/usage/flags.md
| Flag | Description |
|---|---|
| `-p`, `--pubkey <PUBKEY>` | The node's public key to look up (npub or hex). Falls back to `MOSTRO_SCORE_PUBKEY`, then a saved configuration file. Not required with `--init-config`. |
| `-r`, `--relays <RELAYS>` | Nostr relays to query, comma separated. Falls back to `MOSTRO_SCORE_RELAYS`, then a saved configuration file, then the compiled-in default relay. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use “comma-separated” in the relay description.

This is the grammatically correct compound modifier for the user-facing flag reference.

🧰 Tools
🪛 LanguageTool

[grammar] ~6-~6: Use a hyphen to join words.
Context: ...| Nostr relays to query, comma separated. Falls back toMOSTRO_SCORE_R...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@book/src/usage/flags.md` at line 6, Update the --relays option description in
the flags reference to use the grammatically correct “comma-separated” compound
modifier, preserving the existing relay fallback behavior text.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant