Casey Knott
Menu

Project 03 · Automation

TinyClaw

Locally hosted scheduled market reporting that would rather skip than lie.

LLM workflow · AppliedIndependent project

Applied — locally hosted scheduled workflow

Mission

Remove the daily manual gather of prior-day, overnight, and pre-market information without publishing partial or stale output as if it were fresh.

Problem

Producing a morning market report meant gathering prior-day, overnight, and pre-market information by hand every day. A naive cron job that calls an LLM breaks in ordinary ways: duplicate reports, partial output on a failed fetch, and stale data presented as fresh and authoritative.

Constraints

  • Locally hosted; scheduled execution.
  • Model scoped narrowly to analysis and summarization.
  • Skip a run cleanly rather than publish a partial or misleadingly fresh report.

My role

Built and run TinyClaw as a locally hosted, scheduled workflow. I designed the pipeline shape and the failure-handling behavior.

Architecture

Idempotent runs so re-running a period never duplicates or corrupts prior output. An explicit normalization step precedes the model call. Failure path is retry → fallback source → flag stale data → clean skip.

Schedule

Collect sources

Normalize

Before the model

Gemini analysis

Structured report

Clean skip

No partial publish

A time-triggered pipeline collects, normalizes, and summarizes market data into a consistently formatted report, with an explicit retry-and-skip path instead of ever publishing a partial or stale result.
Schedule
tool
Collect sources
data
Normalize
validation — Before the model
Gemini analysis
agent
Structured report
output
Clean skip
policy — No partial publish

AI architecture

Model
Gemini, analysis and summarization only
Automation
Locally hosted schedule
Context
Normalized, timestamped inputs — not raw scraped text
Validation
Idempotence, freshness, structured output

Security architecture

Failure handling
Retry, fallback, flag stale, skip
Integrity
Do not present incomplete data as authoritative
Scope
No open-ended browsing agent

Build process

  1. Pipeline shape designed around collection → normalize → analyze → deliver.
  2. Idempotent period keys so reruns are safe.
  3. Structured output contract so downstream consumption does not silently break.

Validation

  • Manual source comparison

    Reviewed report output against source data across multiple runs

    Checked specifically for hallucinated figures or misattributed numbers before trusting the automation

Challenges

The dangerous failure is not a crash. It is a confident report built on a failed fetch.

Investigation

Ordinary breaks — duplicates, partial fetches, stale sources — were treated as first-class design cases rather than exceptions.

Resolution

Normalize before the model, record source timing, and skip rather than guess.

Lessons

  • Quality is bounded upstream

    AI output quality is bounded by upstream data quality. A reliable system has to validate its inputs, record source timing, expose uncertainty, and refuse to present incomplete data as authoritative.

Cybersecurity equivalent

  • Freshness checksmaps toIntegrity of evidence before use
  • Clean skipmaps toFail closed rather than fail noisy
  • Idempotent runsmaps toRepeatable, non-corrupting change

AI principles applied

  • LLMs as bounded components

    Models draft, classify, and summarize. They do not own authority, publication, or remediation.

    Where learned: First as specialized GPTs on a service-desk publishing workflow, then as Gemini inside TinyClaw and a domain Gem.

    See in the AI map

  • LLM workflows

    A predefined sequence of LLM and non-LLM steps. Reliable, path largely fixed.

    Where learned: Chelan County PUD Self Help pipeline; TinyClaw scheduled reporting.

    See in the AI map

  • Trusted retrieval / source timing

    Normalize and timestamp sources before the model sees them. Forum consensus is not a specification.

    Where learned: TinyClaw freshness path; Jeep source-verification instruction.

    See in the AI map

  • Structured outputs

    Contracts the next stage can consume: HTML stages, morning reports, triage JSON, workbook tables.

    Where learned: If formatting can drift, downstream consumption silently breaks.

    See in the AI map

  • Model limitations

    Models will guess, blur evidence and inference, and treat injected text as instructions unless the design forbids it.

    Where learned: Most clearly when attacking the triage agent.

    See in the AI map

Concepts exercised in this project

  • Scheduled automation
  • LLM workflows
  • Input validation
  • Idempotence

Security principles applied

  • Validation

    Schema, hashes, required fields, RLS tests, and visual review — not the generator marking its own homework.

    Where learned: Clearward formula/package QA; Basaltborne Zod + pgTAP; TinyClaw source checks.

    See in the security map

  • Security automation

    Accelerate gathering and documentation without substituting the model for judgment.

    Where learned: Stated cybersecurity application of this portfolio: analyst control remains the point.

    See in the security map

Controls exercised in this project

  • Fail closed
  • Data freshness
  • Error handling

Technologies

  • Local hosting
  • Scheduled execution
  • Gemini
  • Structured output

Skills demonstrated

  • Local Hosting
  • Scheduled Execution
  • External Data Collection
  • Gemini Analysis
  • Prompt Design for Consistent Structure
  • Idempotence
  • Error Handling
  • Data Freshness Awareness
  • Output Reliability