ambrosiana-document-intake/README.md
John A. Hoeven bddbd552d2
Add Textual intake TUI, reach Beta (v0.1.0)
Implements the human-facing front door to the Ambrosiana RAG pipeline:
a Textual TUI that collects document-intake metadata (source location,
type, tier, licence, priority, optional title/notes) and writes a
structured markdown ticket for Claude Code to act on. The app never
touches the pipeline, any agent, or any model.

- Tickets write flat into a configured tickets_root (no immediate/
  queue subdirectories); priority is encoded in the filename instead
  (immediate_ prefix vs. no prefix for normal queue/order-of-arrival).
- tickets_root is read from ~/.config/ambrosiana-intake/config.toml,
  auto-created with a sensible default on first run rather than
  hardcoded.
- Save clears the form and fires a toast notification, fixing a bug
  where the confirmation message rendered below the visible viewport
  on any normal terminal size, giving no visible sign a save succeeded.
- Verified clean against flake8 and pylint per the CE OS script
  styleguide.
- Adds TODO.md tracking open items, including a cross-project link
  with the RIS design spec on multi-page document-set handling.

Created by John A. Hoeven with the ethical assistance of Claude AI.
2026-08-02 14:03:35 +02:00

2.7 KiB

Ambrosiana Document Intake

Status: Beta (v0.1.0)

Document intake UI for the Ambrosiana RAG library.

A minimal Textual TUI that collects the metadata needed to start a document's journey into an Ambrosiana instance's RAG corpus. It does not touch the pipeline, any agent, or any model — its only job is to turn what a human knows about an incoming document into a structured ticket that Claude Code (or a human) then acts on.

Deployed per-device: each Ambrosiana instance gets its own copy, and an intake ticket always targets that device's own RAG — there is no cross-device routing field.

Requirements

  • Python 3.11+ (uses stdlib tomllib)
  • textual (see requirements.txt)
pip install -r requirements.txt

Running

python3 ambrosiana_intake.py

Configuration

The ticket output directory is read from ~/.config/ambrosiana-intake/config.toml (tickets_root key). If the config file doesn't exist yet, it's created automatically on first run with a default of ~/documents/rag-administration/ticket-queue. Edit the file directly to point at a different location.

Fields

Field Required Type Notes
Source location Yes filepath or URL
Source type Yes upstream-doc | ce-authored | ce-experience
Source tier Yes primary | secondary | forum/unmoderated
Licence Yes text
Priority Yes immediate need | add to queue
Title / description No text used for the ticket filename slug if given
Notes / context No text free-form, passed through to the ticket body

Output

Each submission writes a markdown file with YAML front matter directly into the configured tickets_root — there are no immediate//queue/ subdirectories; priority is encoded in the filename instead:

  • Priority "immediate need" → immediate_YYYYMMDD-HHMMSS_slug.md
  • Priority "add to queue" → YYYYMMDD-HHMMSS_slug.md (no tag — the absence of a tag means normal, order-of-arrival handling)

slug comes from the title if provided, otherwise the source location's basename.

On a successful save the form clears itself and a toast notification confirms the ticket path — no need to scroll to see confirmation.

The ticket is the handoff artefact: a human (or Claude Code, on request) picks it up from tickets_root and runs the actual scrape → vet → transform → commit → index pipeline against it.

Keybindings

Key Action
Ctrl+S Save ticket
Ctrl+N Clear form
Ctrl+Q Quit

Built standing on the shoulders of billions of dwarves Created by John A. Hoeven with the ethical assistance of Claude AI