Skip to content

feat: unified content management with authorship separation#680

Merged
bokelley merged 4 commits into
mainfrom
bokelley/unified-content-management
Jan 9, 2026
Merged

feat: unified content management with authorship separation#680
bokelley merged 4 commits into
mainfrom
bokelley/unified-content-management

Conversation

@bokelley

@bokelley bokelley commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements unified content management system (#670) that separates authorship from ownership, enabling:

  • Co-authoring support: Multiple authors can be credited on content
  • Proposal workflow: Members can propose content; leads/admins review
  • Committee content ownership: Committee leads own their committee's content
  • Proactive notifications: Addie tells leads/admins about pending reviews

Changes

Database (Migration 150)

  • content_authors table for co-authoring with display_order
  • New perspectives columns: proposer_user_id, proposed_at, reviewed_by_user_id, reviewed_at, rejection_reason
  • Updated status constraint: pending_review, rejected
  • Helper functions: is_committee_lead(), is_content_owner()

Content Routes (/api/content)

  • POST /propose - Submit content to personal or committee collections
  • GET /pending - List pending content for review
  • POST /:id/approve - Approve pending content
  • POST /:id/reject - Reject with reason

My Content Routes (/api/me/content)

  • GET / - Unified view of user's content (author/proposer/owner)
  • PUT /:id - Update owned content
  • POST /:id/authors - Add co-author
  • DELETE /:id/authors/:authorId - Remove co-author

Addie Tools

  • propose_content - Create content targeting personal or committee
  • get_my_content - View all user's content with relationships
  • list_pending_content - Review queue for leads/admins
  • approve_content - Approve and publish
  • reject_content - Reject with feedback

Proactive Notifications

  • pending_content added to MemberContext
  • Committee leads and admins see pending counts
  • Addie prompted to mention pending items

Test plan

  • Run database migration successfully
  • Verify proposal workflow: member submits → lead reviews → approve/reject
  • Test co-authoring: add/remove authors via API
  • Confirm leads can publish directly to their committees
  • Verify admins can review all pending content
  • Test Addie tools respond correctly
  • Check proactive notifications appear in context

🤖 Generated with Claude Code

bokelley and others added 4 commits January 8, 2026 07:39
Implements unified content management system with separation of authorship
from ownership, supporting co-authored content and proposal workflows:

**Database Migration (150):**
- Create content_authors table for co-authoring support
- Add proposer tracking fields to perspectives table
- Add review tracking (reviewed_by_user_id, reviewed_at, rejection_reason)
- Update status constraint to include pending_review and rejected
- Create helper functions: is_committee_lead(), is_content_owner()

**Content Routes (/api/content):**
- POST /propose - Submit content to personal or committee collections
- GET /pending - List pending content for review (leads/admins)
- POST /:id/approve - Approve pending content
- POST /:id/reject - Reject with reason

**My Content Routes (/api/me/content):**
- GET / - Unified view of user's content (author/proposer/owner)
- PUT /:id - Update content user owns
- POST /:id/authors - Add co-author
- DELETE /:id/authors/:authorId - Remove co-author

**Addie Tools:**
- propose_content - Create content targeting personal or committee
- get_my_content - View all user's content with relationships
- list_pending_content - Review queue for leads/admins
- approve_content - Approve and publish pending content
- reject_content - Reject with feedback

**Proactive Notifications:**
- Added pending_content to MemberContext interface
- Committee leads and admins see pending counts in context
- Addie proactively mentions pending items needing review

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create my-content.html with unified content management UI
  - Shows user's content (authored, proposed, owned)
  - Pending review tab for committee leads and admins
  - Create/edit content with committee targeting
  - Approve/reject workflow for reviewers
  - Filter by status and collection

- Update /admin/perspectives to redirect to /my-content
- Update admin APIs to accept pending_review and rejected statuses

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix SQL queries to use correct column names (workos_user_id)
- Add GET /api/content/collections endpoint for public and user committees
- Add migration 151 for public content collections (Editorial, Training)
- Update my-content.html status hint logic to use collection data
- Remove deprecated admin-perspectives.html

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Resolved import conflict in http.ts (added queuePerspectiveLink and InsightsDatabase)
- Renumbered migrations to avoid version conflicts:
  - 150_unified_content_management.sql → 152_unified_content_management.sql
  - 151_public_content_collections.sql → 153_public_content_collections.sql

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley merged commit ef9f7d3 into main Jan 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant