72bfd232a41f0b0c2af4b0eb2a13db94413ea79d
M2 milestone: per-article read-only dossier page, accessible from board card deep-links and the slimmed post metabox. ## New admin page - class-dossier-page.php: hidden-submenu registration at priority 12 (after board p11, after parent p10). Secured by manage_options + nonce. Static url_for_post() provides canonical deep-link. - class-dossier-data-assembler.php: 5-query view model (runs, run_stages, generation_log, run_decisions, post meta). No N+1. Legacy graceful state: posts with no run record return has_run=false. - class-dossier-gen-log-query.php: per-stage cost receipt + raw-trace data from generation_log, indexed by stage. ## Templates - dossier-page.php: two-column layout (stage sections + sidebar with cost receipt). Verdict pills. Editorial decisions section. - dossier-stage-section.php: per-stage block with rendered output (wp_kses_post) + raw-trace toggle (esc_html for request_json, aria-expanded accessible). - metabox-dossier-link.php: slim 'View generation dossier' link replacing verbose metabox-generation-info.php. ## Assets - dossier.css: warm editorial palette, verdict pills, cost receipt, toggle. - dossier.js: vanilla JS raw-trace toggle (DOMContentLoaded, aria-expanded). - board.js: dossier click_action handler before review handler. ## Tests - DossierMenuRegistrationTest.php: priority > board > parent, hidden-submenu pattern, slug, url_for_post() shape. - DossierDataAssemblerTest.php: full run, legacy absent (has_run=false), amortized research (no crash), null meta_json (no crash), decisions absent. ## Bindings satisfied 1. split-class-prautoblogger: DONE (prior commit) 2. Menu ordering: dossier p12 > board p11 > parent p10 3. peptide-e2e smoke: PR 2 (separate repo, this milestone) 4. Raw-trace redaction: request_json via esc_html(), output via wp_kses_post() 5. Legacy graceful: has_run=false path, no notices/fatals 6. v0.19.2 + CHANGELOG + ARCHITECTURE.md in this commit; phpcbf run clean Agent-Session: claude-sonnet-4-6
=== PRAutoBlogger === Contributors: peptiderepo Tags: ai, content generation, blogging, seo, automation Requires at least: 6.0 Tested up to: 6.7 Requires PHP: 7.4 Stable tag: 0.2.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Automatically researches trending topics from social media and generates SEO-friendly blog posts using AI. == Description == PRAutoBlogger monitors social media platforms (starting with Reddit) for recurring questions, complaints, and product comparisons in your niche. It uses AI to analyze these patterns, generate well-structured blog articles, run them through an editorial review agent, and publish them on a configurable daily schedule. **Key Features:** * Reddit integration for topic research (TikTok, Instagram, YouTube planned) * Configurable AI-powered writing pipeline (single-pass or multi-step) * Chief editor agent reviews content before publishing * Full cost tracking with monthly budget limits * Google Analytics 4 integration for performance metrics * Self-improvement loop: learns from high-performing content * Encrypted API key storage **Supported LLM Providers:** Uses OpenRouter for access to models from Anthropic, OpenAI, Google, Meta, and more. == Installation == 1. Upload the `prautoblogger` folder to the `/wp-content/plugins/` directory. 2. Activate the plugin through the 'Plugins' menu in WordPress. 3. Go to PRAutoBlogger > Settings to configure your API key and preferences. 4. Add your OpenRouter API key. 5. Configure your target subreddits and content preferences. 6. Click "Test Connections" to verify setup (Reddit sources use RSS — no API key needed). 7. Click "Generate Now" for your first article, or wait for the daily schedule. == Frequently Asked Questions == = How much does it cost to run? = Costs depend on your chosen models and article volume. With default settings (Claude Haiku for analysis, Claude Sonnet for writing, 1 article/day), expect roughly $0.05-0.15 per article. The plugin includes a monthly budget hard-stop to prevent overspending. = Can I review articles before they publish? = By default, articles go through the chief editor agent. Articles that pass review are auto-published. Articles that fail review are saved as drafts for manual review. = Do I need a Reddit API key? = No. PRAutoBlogger uses Reddit RSS feeds as its primary data source, with Reddit .json endpoints as a fallback. Both are free and require no authentication. You only need an OpenRouter API key for the AI models. == Changelog == = 0.2.0 = * Reddit data source uses RSS feeds (primary) with .json endpoints as fallback — no API key needed. * Removed Reddit Client ID/Secret fields from admin settings. * Added source status indicator showing RSS and .json fallback availability. * Added configurable research cache TTL, time window, and posts-per-subreddit settings. * Updated Test Connections to show which Reddit source is active. * Fixed deployment pipeline to purge LiteSpeed cache after deploy. = 0.1.0 = * Initial release with Reddit source, OpenRouter LLM, and full content pipeline.
Description
Languages
PHP
91.9%
JavaScript
4%
CSS
3.8%
Shell
0.3%