Project 03 · Automation
TinyClaw
Locally hosted scheduled market reporting that would rather skip than lie.
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
- 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
- Pipeline shape designed around collection → normalize → analyze → deliver.
- Idempotent period keys so reruns are safe.
- 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
| Check | Method | Result |
|---|---|---|
| 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.
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.
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.
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.
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.
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.
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.
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