Skip to main content

Crate promptjar

Crate promptjar 

Source
Expand description

Core library for pj, the promptjar CLI.

A Git repository of Markdown prompt archives is treated as a queryable database: directory = project, file = thread, YAML frontmatter = thread metadata, top-level --- thematic break = record separator. See SPEC.md in the repository for the full design.

Re-exports§

pub use thread::Diagnostic;
pub use thread::Parsed;
pub use thread::Record;
pub use thread::Severity;
pub use thread::Thread;

Modules§

cli
The pj command surface and command implementations. main.rs stays thin: it calls run and exits with the returned code.
frontmatter
Frontmatter extraction and the hand-rolled YAML-to-thread mapping.
output
Output helpers. TSV is the default surface: stable column order, one row per item, no decoration, and never any ANSI escape sequences.
records
Record splitting: find top-level dash-style thematic breaks with a real Markdown parser, never with line matching (SPEC.md section 6.2).
scan
Root discovery and the stateless tree scan. Every invocation walks the tree; there is no index and no cache.
thread
The data model and the file-level parser: one Markdown file in, one Parsed out (a thread if the frontmatter is valid, plus diagnostics).

Enums§

Error
Typed library errors; the CLI maps these to messages and exit code 1.