feat(ga): make BrewPress site-agnostic and production-ready#4
Merged
Conversation
- Remove hardcoded DevelopersCoffee.com from draft_agent.py; replace with configurable BREWPRESS_SITE_NAME / BREWPRESS_SITE_FOCUS env vars - Add _build_style_guide() that injects tone.json fingerprint when available - Add brewpress doctor command for env/connectivity pre-flight checks - Add PyInstaller binary matrix (Linux/macOS/Windows) to release workflow - Rewrite README for GA: no user-specific content, clear install and config docs - Update .env.example with site customization vars and usage notes - Fix all ruff lint errors across src/ and tests/ Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Implements the Blog Boost Assistant ADK spec as a first-class BrewPress module: - BlogBoostAgent: Gemini-backed optimizer with 8 task types (seo_audit, rewrite, title_suggestions, meta_description, content_feedback, topic_ideas, internal_linking, engagement_message) - BoostRequest / BoostResult: Pydantic models matching the ADK I/O schema - Per-task prompt builders with SEO heuristics baked in (title 50-60 chars, meta 120-160 chars, keyword in first 100 words, H1/H2/H3 rules, keyword density guardrails, no clickbait/stuffing) - brewpress boost CLI command: runs any task, supports --from-draft to load the current saved draft, --json for structured output, --content as inline text or path to a .md file - 31 tests covering construction, parsing, prompt builders, agent runs, and error paths Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…rytelling layer Generator + Critic loop: - CriticAgent evaluates a BlogJob on 4 dimensions (SEO, clarity, technical accuracy, publish readiness), returns pass/revise verdict + revision_instruction - Deterministic rule overrides model verdict when any score < PASS_THRESHOLD (4) - brewpress critic [--apply] [--eval] command wires it into the review loop - brewpress draft --auto-critic runs the critic inline after generation Deterministic eval (no API): - boost_eval.run_checks() performs 8 checks: title length, meta length, keyword presence, keyword in intro, heading hierarchy, keyword density (stuffing guard), code block language hints, hook quality - Zero external dependencies; instant feedback before burning API tokens Multimedia attachment: - upload_image_file() now returns UploadedMedia(id, url, filename) instead of int - publish() accepts gallery_media list; appended as <figure> tags in post content - brewpress approve-publish --attach FILE [FILE...] uploads and attaches media - Orchestrator.publish() accepts extra_media_paths for programmatic use Storytelling layer (from ADK blog structure spec): - DraftAgent system prompt extended with Problem→Solution→Expansion arc, narrative structure rules (Hook, Prerequisites, Core, Run/Debug, CTA), and storytelling techniques (show don't tell, reader as hero, real friction) - DraftSchema gains hook and cta fields; BlogJob gains hook and cta content fields - blog_boost.py system prompt versioned as v1.0 62 new tests across test_critic_agent.py and test_boost_eval.py Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.
Summary
DevelopersCoffee.comreference fromdraft_agent.py. Style guide and prompts now useBREWPRESS_SITE_NAME/BREWPRESS_SITE_FOCUSenv vars (both optional, sane defaults)DraftAgent.__init__loads~/.brewpress/tone.jsonwhen present and appends it to the system prompt automatically — silent miss if calibrate hasn't runbrewpress doctor: new pre-flight command that checks Python version, all four env vars, HTTPS enforcement, WordPress connectivity, Gemini package install, and tone fingerprint presence.env.exampleupdate: addedBREWPRESS_SITE_NAMEandBREWPRESS_SITE_FOCUSwith commented-out defaultssrc/andtests/(unused imports, line length, import ordering, unused variables)Test plan
python -m pytest tests/— 496 tests, all passpython -m ruff check src/ tests/— no errorsbrewpress doctorexits 0 with valid.env, exits 1 with missing varsbrewpress draft --topic "..."uses default site name in generated contentBREWPRESS_SITE_NAME="Acme Blog"and confirm draft prompt reflects itbrewpress calibratewrites~/.brewpress/tone.json, next draft picks it up🤖 Generated with Claude Code