Repository navigation
Local Ollama notes-to-YAML ingest: format-aware prompt, never-guess checks, folder mode - #6
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
src/agent_prompt.py(new): the model's instructions are built fromdocs/YAML_FORMAT.mdplus real records fromdata/(one movement-only example with nulls, one watch-only example, one "not enough information" example).python3 src/agent_prompt.py --modelfileregeneratesModelfile.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.--dir FOLDER(.txt/.md, recursive),--dry-run,--overwrite. Rejected records + reasons and a report go toingest_runs/<date-time>/(gitignored).tests/test_agent_ingest.py: 12 tests with a fake model (no Ollama needed):python3 -m pytest -q.--type watchexample; 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