Skip to content

Local Ollama notes-to-YAML ingest: format-aware prompt, never-guess checks, folder mode - #6

Merged
wdjoyner merged 1 commit into
mainfrom
local-ollama-ingest
Oct 15, 2026
Merged

wdjoyner merged 1 commit into
mainfrom
local-ollama-ingest

Conversation

@wdjoyner

Copy link
Copy Markdown
Owner
  • src/agent_prompt.py (new): the model's instructions are built from docs/YAML_FORMAT.md plus real records from data/ (one movement-only example with nulls, one watch-only example, one "not enough information" example). python3 src/agent_prompt.py --modelfile regenerates Modelfile.
  • src/agent_ingest.py: notes may contain only a movement, only a watch, or several of each. Every record is checked individually: schema, watch → movement link (existing or new), and a never guess check that numbers, caliber numbers and reference numbers actually appear in the notes (Hz→vph, m↔bar, days→hours allowed). Failures go back to the model; only passing records are written.
  • Folder mode: --dir FOLDER (.txt/.md, recursive), --dry-run, --overwrite. Rejected records + reasons and a report go to ingest_runs/<date-time>/ (gitignored).
  • tests/test_agent_ingest.py: 12 tests with a fake model (no Ollama needed): python3 -m pytest -q.
  • README: fixed the nonexistent --type watch example; documented the above.

The AI Curator workflow keeps working (stdin + --build).

🤖 Generated with Claude Code

https://claude.ai/code/session_013ztzMpV5cuo4i2WoiRSQ4v


Generated by Claude Code

- agent_prompt.py builds the model's instructions from docs/YAML_FORMAT.md
  plus real records in data/ as worked examples; regenerates the Modelfile.
- agent_ingest.py: notes may hold only a movement, only a watch, or several;
  per-record schema + caliber_id link checks; "never guess" check that
  numbers, caliber and reference numbers appear in the notes; problems fed
  back to the model; --dir for a folder of notes; only passing records are
  written, rejects and a report go to ingest_runs/ (gitignored); --dry-run.
- tests/test_agent_ingest.py (no Ollama needed); README usage fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ztzMpV5cuo4i2WoiRSQ4v
@wdjoyner
wdjoyner merged commit 25544f3 into main Oct 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant