tools tier

tools-book-report

Generate a book-inventory report (SKU/title/author/ISBN/summary) from inventory_ai and email it via mm as an ASCII table in the body plus a prose summary. Repeatable (Rule 14): the daily cron runs this, never an ad-hoc script. PDF attachment is a later iteration (mm attachment sprint).

Generate a book-inventory report (SKU/title/author/ISBN/summary) from inventory_ai and email it via mm as an ASCII table in the body plus a prose summary. Repeatable (Rule 14): the daily cron runs this, never an ad-hoc script. PDF attachment is a later iteration (mm attachment sprint).

Tiertools
Roleunclassified (baselined)
Pathcrates/tools/book-report
Edition2021
Targetstools-book-report, tools_book_report
Public items4 across 0 modules
Tests7

What it is for

Pure rendering for the book-inventory report: an ASCII table and a prose summary that go in the email body. No I/O here — the binary queries inventory_ai and calls mm send; this module is what the tests pin.

Capabilities

ReportRow

Pure rendering for the book-inventory report: an ASCII table and a prose

Item
pub struct ReportRow
fn ascii_table(rows : & ReportRow) -> String
fn prose_summary(category : & str, rows : & ReportRow, generated : & str) -> String
fn email_body(category : & str, rows : & ReportRow, generated : & str) -> String

How to use it

No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.

Module structure

No public modules: the crate root is its whole surface.

Public surface

`crate root`

ItemWhat it is
pub struct ReportRowOne report line
fn ascii_table(rows : & ReportRow) -> StringRender the rows as a bordered fixed-width ASCII table (header + rule + one line per row)
fn prose_summary(category : & str, rows : & ReportRow, generated : & str) -> StringA prose paragraph for the top of the email body: how many, on what, and where it came from
fn email_body(category : & str, rows : & ReportRow, generated : & str) -> StringThe full email body: prose, then the ASCII table.

No pub use re-exports: every item above is declared in this crate.

Boundary

Reaches into foundation.

Shares tier tools with 84 other crates: tools-advisory-reach, tools-archive-guard, tools-artifact-scaffold, tools-ask-ai-core, tools-ask-ais, tools-ask-gemini, tools-book, tools-boundary-scan, … (84 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)tools
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/tools/book-report
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_tools["tools"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-bounded-io`foundationnoalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
anyhow^1noalways
chrono^0.4clocknoalways
clap^4derivenoalways
sqlx^0.8runtime-tokio, postgres, uuidnoalways
tokio^1rt-multi-thread, macrosnoalways
uuid^1v4noalways

Development, in this workspace.

CrateTierOptionalOnly on
`tools-cli-conformance`toolsnoalways

Build. None.

Depended on by. Nothing in this workspace.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  SELF["tools-book-report"]
  SELF -->|development| n_tools_cli_conformance["tools-cli-conformance"]
  SELF -->|runtime| n_foundation_bounded_io["foundation-bounded-io"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.

Targets

KindNameSource
bintools-book-report`src/main.rs`
libtools_book_report`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimeyes
database accessyes
network I/Onone detected
unsafe codenone detected
environment variablesyes

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

VariableRead in
INVENTORY_DBsrc/main.rs

No workspace crate depends on this one.

Verification

KindCount
Unit tests7
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root400

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc44
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 4
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files2
Source lines356
Code lines297
Public API items4
Public modules0
Tests7
Examples0
Cargo features0
Direct runtime dependencies7
Workspace reverse dependencies0
pie showData
    title Public API by kind
    "function" : 3
    "struct" : 1
pie showData
    title Rust source composition
    "Code" : 297
    "Blank or comment" : 59

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

All tools · Manual