From 64dcd9321d5617089530c7a40a28e6d3f3c65f2c Mon Sep 17 00:00:00 2001 From: peptiderepo <273788462+peptiderepo@users.noreply.github.com> Date: Fri, 12 Jun 2026 13:48:18 +0700 Subject: [PATCH] fix: restore truncated CHANGELOG.md and ARCHITECTURE.md (M1 fixup 2) Agent-Session: phase2-admin-m1-engineer --- ARCHITECTURE.md | 20 +++++++++++++++- CHANGELOG.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 79 insertions(+), 2 deletions(-) diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index 07bebb3..737cbf6 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -687,4 +687,22 @@ The primary admin screen is now a kanban board (Direction C "Editorial Record") columns: Generating | In Review | Published | Failed. A separate `class-board-page.php` registers the `Board` submenu first so it appears before Settings in the nav. `class-board-data-provider.php` computes column cards from existing tables -(`prab_generat \ No newline at end of file +(`prab_generation_log`, WordPress post meta) — no new schema required for M1. The data +provider uses the `prautoblogger_generation_status` transient (written by the Executor for +manual/daily runs) as the primary active-run signal, with a secondary query on recent +`prab_generation_log` run_ids that have no linked post as a fallback. M2 will rename Runs & +Audit → Articles and wire board cards to the Article Dossier. Poll interval and published +window are settings-backed, localized into board.js, never hardcoded. + +## Cross-System LLM Budget Coordination + +PRAutoBlogger and Peptide News both call OpenRouter and may share a single API key / billing account. Their combined spend should be considered when setting per-plugin budgets. + +| Plugin | Default Models | Typical Daily Spend | Budget Control | +|--------|---------------|--------------------:|----------------| +| PRAutoBlogger | Gemini 2.5 Flash Lite (analysis + editing), Claude Sonnet 4 (writing) | $0.05–$0.30 depending on article count | Hard-stop monthly budget in plugin settings | +| Peptide News | Google Gemini 2.0 Flash (keywords + summaries) | $0.01–$0.05 | No hard budget yet (planned) | + +**Important:** If your OpenRouter account has a global spending limit, set each plugin's budget to less than half the total. PRAutoBlogger will hard-stop when its budget is exhausted, but Peptide News currently has no budget enforcement — a spike in news fetches could consume shared quota. + +**Future improvement:** A shared `wp_options` key (e.g., `ecosystem_monthly_llm_budget`) that both plugins read, with each plugin reserving its allocation on startup. This requires coordination at the ecosystem level and is tracked as a medium-term goal. diff --git a/CHANGELOG.md b/CHANGELOG.md index b178e93..750b6d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -988,4 +988,63 @@ swap with no user-visible change in article quality. - Configurable research cache TTL (1–72 hours) in Sources tab. - Reddit time window selector (24h / week / month) in Sources tab. - Posts-per-subreddit limit (5–100) in Sources tab. -- LiteSpeed cache purge step in CI/CD d \ No newline at end of file +- LiteSpeed cache purge step in CI/CD deploy pipeline. +## [0.2.1] — 2026-04-12 + +### Changed +- **Reddit data source switched to RSS primary, .json fallback.** + PullPush.io was frequently stale/unavailable. Reddit RSS/Atom feeds work + reliably from datacenter IPs (Hostinger) where .json gets 403. Comments + are still fetched via .json (unavailable in RSS). +- Updated "Enabled Sources" checkbox label to "Reddit (RSS + .json)". +- Updated "Test Connections" to show RSS + .json status. +- Source status indicator now shows Reddit RSS (Primary) and .json (Fallback). + +### Removed +- `class-pull-push-client.php` — replaced by RSS feeds in `class-reddit-json-client.php`. +- All PullPush.io references from admin UI, docs, and provider code. + +### Fixed +- Generate Now button now always sends `force: '1'` to clear stale generation locks. +- Fixed encryption double-encryption bug with `enc:` prefix detection. + +## [0.2.0] — 2026-04-12 + +### Changed +- **Reddit data source migrated from OAuth to RSS + .json (no auth required).** + Reddit rejected our API application; RSS feeds and .json endpoints are free + and require no authentication. +- Removed Reddit Client ID and Client Secret fields from admin API Keys tab. +- Updated "Test Connections" results to show Reddit source status. + +### Added +- Source status indicator in API Keys tab showing RSS and .json + availability with live status dots and last-collection timestamp. +- Configurable research cache TTL (1–72 hours) in Sources tab. +- Reddit time window selector (24h / week / month) in Sources tab. +- Posts-per-subreddit limit (5–100) in Sources tab. +- LiteSpeed cache purge step in CI/CD deploy pipeline. + +## [0.1.0] — 2026-04-10 + +### Added +- Initial plugin scaffold with WordPress-native architecture. +- OpenRouter LLM provider with configurable model selection and retry logic. +- Reddit API source provider (OAuth2 script app) for collecting posts and comments. +- Content analysis engine: detects recurring questions, complaints, and comparisons. +- Idea scorer with deduplication against existing posts. +- Configurable writer agent pipeline (single-pass or multi-step: outline → draft → polish). +- Chief editor agent for LLM-powered editorial review before publishing. +- Publisher with full generation metadata stored as post_meta. +- Cost tracker with per-call logging, monthly budget enforcement, and hard-stop. +- Metrics collector: WordPress native + GA4 integration + composite content scoring. +- Admin settings page with sections for API keys, models, content, sources, schedule, and analytics. +- Metrics dashboard showing monthly spend, budget utilization, cost by stage, and daily spend. +- Post metabox showing generation metadata on PRAutoBlogger-generated posts. +- Admin notices for missing API keys, budget warnings, and configuration hints. +- Stub providers for TikTok, Instagram, and YouTube (future implementation). +- Encrypted storage for API keys using AES-256-CBC with wp_salt(). +- AJAX-powered "Generate Now" and "Test Connections" buttons. +- Custom database tables for source data, analysis results, generation logs, and content scores. +- Clean uninstall handler removing all plugin data. +- ARCHITECTURE.md and CONVENTIONS.md for AI-readable codebase documentation.