hoangsonww/AI-Gov-Content-Curator

Human-in-the-Loop Editorial Workflow for AI Summaries and Newsletter Publishing

Open

#98 opened on Feb 16, 2026

View on GitHub
 (0 comments) (0 reactions) (1 assignee)TypeScript (18 forks)auto 404
backendbugdocumentationenhancementfrontendgood first issuehelp wantednewsletterquestiontooling

Repository metrics

Stars
 (29 stars)
PR merge metrics
 (PR metrics pending)

Description

Summary

Add a full editorial workflow so AI-generated article summaries and newsletter candidates move through clear states (draft -> in_review -> approved/rejected -> published) before broad distribution.

Problem

The platform already generates summaries and newsletter content at scale, but there is no first-class review pipeline for analyst/editor sign-off. For government-facing usage, teams need traceable approval steps, reviewer accountability, and controlled publishing.

Proposed Solution

  • Introduce review states on articles and newsletter candidates.
  • Add role-aware actions for analyst, editor, and admin users.
  • Build a review queue UI with filters (source, topic, date, risk flags, status).
  • Require explicit approval before content is eligible for newsletter send jobs (configurable override for emergency mode).
  • Store structured reviewer feedback and revision history.
  • Emit audit events for every workflow transition.

Acceptance Criteria

  • Articles have workflow fields: reviewStatus, reviewedBy, reviewedAt, reviewNotes, publishEligible.
  • Unauthorized users cannot transition review states.
  • Editors can approve/reject with required notes for rejection.
  • Newsletter generation excludes non-approved content by default.
  • Audit log is queryable by article ID and reviewer.
  • Frontend queue supports bulk actions and optimistic updates with rollback on failure.

Technical Notes

  • Backend:
    • Extend article schema and add workflow transition service with validation guards.
    • Add endpoints such as:
      • GET /api/review/queue
      • POST /api/review/articles/:id/transition
      • GET /api/review/articles/:id/history
  • Frontend:
    • Add Review Queue page and Article Review Panel.
    • Add transition controls with confirmation modals.
  • Newsletter service:
    • Filter candidate set to publishEligible=true.

Tasks

  • Define workflow states and transition matrix.
  • Extend MongoDB models for review metadata and audit events.
  • Implement role-based transition endpoints and server-side validation.
  • Build review queue UI with filtering, detail drawer, and bulk actions.
  • Integrate approval gating into newsletter candidate selection.
  • Add unit/integration tests for transitions and access control.
  • Add Playwright flow for reviewer approve/reject journey.
  • Document workflow API and operational runbook in README.

Out of Scope (Initial Iteration)

  • Multi-step legal/compliance chains beyond a single editor approval.
  • External approval providers (Slack/Jira integrations).

Contributor guide