diff --git a/CHANGELOG.md b/CHANGELOG.md index ef60239..ed1a4c9 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to PRAutoBlogger will be documented in this file. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project uses [Semantic Versioning](https://semver.org/). +## [0.4.5] — 2026-04-19 + +### Added +- **Analysis Instructions setting.** Custom instructions appended to the analysis + LLM's system prompt. Steers how source data is evaluated and which topic ideas + get surfaced. +- **Editor Instructions setting.** Custom instructions appended to the chief + editor's system prompt. Controls what the editorial review looks for and how + it decides to approve, revise, or reject articles. + ## [0.4.4] — 2026-04-19 ### Added diff --git a/includes/admin/class-settings-fields.php b/includes/admin/class-settings-fields.php index cd80873..d9c2667 100755 --- a/includes/admin/class-settings-fields.php +++ b/includes/admin/class-settings-fields.php @@ -161,6 +161,14 @@ class PRAutoBlogger_Settings_Fields { 'section' => 'prautoblogger_content', 'description' => __( 'Describe your site\'s niche. Guides content analysis and generation.', 'prautoblogger' ), ], + [ + 'id' => 'prautoblogger_analysis_instructions', + 'label' => __( 'Analysis Instructions', 'prautoblogger' ), + 'type' => 'textarea', + 'section' => 'prautoblogger_content', + 'default' => '', + 'description' => __( 'Custom instructions for the topic analysis LLM. Steers how source data is evaluated and which ideas get surfaced — e.g. "Prioritize questions over news. Ignore price-related discussions."', 'prautoblogger' ), + ], [ 'id' => 'prautoblogger_tone', 'label' => __( 'Content Tone', 'prautoblogger' ), @@ -210,6 +218,14 @@ class PRAutoBlogger_Settings_Fields { 'default' => '', 'description' => __( 'Custom instructions appended to the LLM\'s system prompt when writing articles. Use this to steer style, structure, voice, and formatting — e.g. "Always open with a hook question. Use short paragraphs. Cite at least two studies."', 'prautoblogger' ), ], + [ + 'id' => 'prautoblogger_editor_instructions', + 'label' => __( 'Editor Instructions', 'prautoblogger' ), + 'type' => 'textarea', + 'section' => 'prautoblogger_content', + 'default' => '', + 'description' => __( 'Custom instructions for the chief editor LLM review pass. Steers what the editor looks for and how it revises — e.g. "Be strict about medical disclaimers. Reject any article under 800 words."', 'prautoblogger' ), + ], [ 'id' => 'prautoblogger_topic_exclusions', 'label' => __( 'Topic Exclusions', 'prautoblogger' ), diff --git a/includes/core/class-analysis-prompts.php b/includes/core/class-analysis-prompts.php index c0ef94f..09a4613 100644 --- a/includes/core/class-analysis-prompts.php +++ b/includes/core/class-analysis-prompts.php @@ -61,6 +61,12 @@ class PRAutoBlogger_Analysis_Prompts { $prompt .= $recent_context . "\n\n"; } + // Append user-defined analysis instructions if configured. + $instructions = trim( (string) get_option( 'prautoblogger_analysis_instructions', '' ) ); + if ( '' !== $instructions ) { + $prompt .= "Additional instructions:\n" . $instructions . "\n\n"; + } + $prompt .= "Respond with valid JSON containing exactly {$target_count} patterns:\n"; $prompt .= '{"patterns": [{"type": "...", "topic": "...", "summary": "...", "frequency": N, "relevance_score": 0.X, "suggested_title": "...", "key_points": [...], "target_keywords": [...]}]}'; diff --git a/includes/core/class-chief-editor.php b/includes/core/class-chief-editor.php index 007ae57..0d741c3 100755 --- a/includes/core/class-chief-editor.php +++ b/includes/core/class-chief-editor.php @@ -110,6 +110,12 @@ class PRAutoBlogger_Chief_Editor { $prompt .= "- REJECT only if the content is fundamentally flawed or off-topic\n"; $prompt .= "- When revising, fix the issues yourself. Don't just describe them.\n"; + // Append user-defined editor instructions if configured. + $instructions = trim( (string) get_option( 'prautoblogger_editor_instructions', '' ) ); + if ( '' !== $instructions ) { + $prompt .= "\nAdditional instructions:\n" . $instructions . "\n"; + } + return $prompt; } diff --git a/prautoblogger.php b/prautoblogger.php index 16559b2..748b151 100644 --- a/prautoblogger.php +++ b/prautoblogger.php @@ -8,7 +8,7 @@ declare(strict_types=1); * Plugin Name: PRAutoBlogger * Plugin URI: https://peptiderepo.com/prautoblogger * Description: Monitors social media for trending topics, generates SEO-friendly blog posts using AI, and publishes them on a daily schedule with full cost tracking and self-improvement metrics. - * Version: 0.4.4 + * Version: 0.4.5 * Requires at least: 6.0 * Requires PHP: 7.4 * Author: PeptideRepo @@ -35,7 +35,7 @@ if ( ! defined( 'ABSPATH' ) ) { | and limits without magic strings. */ -define( 'PRAUTOBLOGGER_VERSION', '0.4.4' ); +define( 'PRAUTOBLOGGER_VERSION', '0.4.5' ); define( 'PRAUTOBLOGGER_DB_VERSION', '1.1.0' ); define( 'PRAUTOBLOGGER_PLUGIN_FILE', __FILE__ ); define( 'PRAUTOBLOGGER_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );