feat(vision): title + describe commands + engine refactor#74
Merged
Conversation
Companions to `caption` that generate WP title (short noun phrase) and
description (2-3 sentences) using the same Ollama vision plumbing.
Foundation for the broader vision-AI metadata expansion.
Engine refactor:
- CaptionOptions gains `kind: 'alt' | 'title' | 'description' | 'classify' | 'tags'`
- Per-kind prompt templates in buildPrompt(kind, language)
- Per-kind post-processors:
- cleanCaption (existing, used for alt + description default)
- cleanTitle — strip "Title:" labels, trim trailing punctuation,
80-char word-boundary truncate
- cleanClassify — closed-set label match (groundwork for Tier 2)
- cleanTags / cleanTagsArray — normalize + dedupe (groundwork for Tier 2)
- New shared runBulkVision in engine/caption/run-bulk.ts that handles the
per-item loop, time-machine snapshots, FK-safe processing_history,
and graceful failure. Caption.ts stays as-is for safety; future PR
can migrate it once the abstraction proves itself.
CLI:
localpress title [ids...] [--missing-title] [--all] [--apply] [--language]
localpress describe [ids...] [--missing-description] [--all] [--apply]
The --missing-title filter auto-detects machine-generated WP titles:
Screenshot-…, IMG_…, DSC_…, hex hashes, untitled, bare numbers.
MCP:
- generate_title
- generate_description
Both honor concurrency, dry-run-by-default for bulk, defaults.captionModel.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Closes #73. See issue for full design. CI green required before merge.