Skip to content

[codex] Split PersonalOS into independent plugins#74

Draft
artpi wants to merge 2 commits into
mainfrom
codex/independent-plugin-split-plan
Draft

[codex] Split PersonalOS into independent plugins#74
artpi wants to merge 2 commits into
mainfrom
codex/independent-plugin-split-plan

Conversation

@artpi

@artpi artpi commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

This PR splits the PersonalOS monolith into a lean family of independently installable, WordPress.org-ready Personal plugins built around the shared Knowledge/Guidelines runtime.

The split keeps shared runtime behavior in bundled helper classes, not a required base plugin, so every generated ZIP can install on its own and interoperate through WordPress-native surfaces: Knowledge posts, Knowledge type terms, REST, cron, post meta, user meta, and the Abilities API.

Sub-plugin features

Personal Notes (personal-notes)

  • Adds a standalone Notes admin UI over resolved Knowledge rows.
  • Creates and edits private user-authored note artifacts tagged with artifact, note, and source terms such as manual.
  • Owns PARA/Knowledge type management for note-like content, including child term creation under supported containers.
  • Registers the package-owned pos/note block and package-local editor assets.
  • Displays note-like Knowledge from manual notes and synced sources without requiring Readwise or Evernote plugins.

Personal Readwise Sync (personal-readwise-sync)

  • Stores per-user Readwise settings: token, autotag, cursor, and last sync state.
  • Syncs Readwise export data into private Knowledge records tagged with artifact, note, readwise, synced, and reference.
  • Preserves Readwise metadata such as readwise_id, category, author, source URL, and source hashes.
  • Registers package-owned pos/readwise and pos/book-summary blocks.
  • Reworks the book summary block to use a package REST endpoint backed by WordPress AI Client/Connectors instead of the old /pos/v1/openai/* route.
  • Documents Readwise API and optional AI summary privacy behavior in the package readme.

Personal Evernote Sync (personal-evernote-sync)

  • Stores per-user Evernote settings: token, active flag, synced notebook GUIDs, USN, last sync/update count, and cached notebook/tag metadata.
  • Adds package-owned one-way Evernote import transport that loads the bundled Evernote SDK runtime when available.
  • Imports matching sync-chunk notes into private Knowledge rows tagged with artifact, note, evernote, synced, and reference.
  • Preserves evernote_guid, evernote_content_hash, source URLs, source hashes, and per-user ownership.
  • Bundles only the standalone runtime vendor files needed by the ZIP: Evernote Cloud SDK plus PSR Log license/runtime files.
  • Keeps normalized transport seams for tests and future SDK refinement without depending on the old Notes module.

Personal TODO (personal-todo)

  • Adds a standalone TODO admin app and fallback UI over Knowledge task artifacts.
  • Stores each actionable task as its own Knowledge post tagged with artifact and todo, without using plan or ordinary personalos terms.
  • Preserves task operational meta such as reminders_id, pos_blocked_by, pos_blocked_pending_term, pos_recurring_days, and URL.
  • Keeps task history as todo_note comments attached to the task Knowledge post.
  • Supports create, list, update, complete, search, term filtering, recurrence, scheduled tasks, and unblock side effects.
  • Folds in the per-user ICS feed and resolves feed tokens back to the owning user before querying private tasks.
  • Registers TODO Abilities API tools for list/create/update/complete when the Abilities API is available.

Personal AI Chat (personal-ai-chat)

  • Adds a standalone AI Chat admin app over Knowledge conversation rows.
  • Stores chat transcripts as private Knowledge conversations tagged with artifact, conversation, ai-chat, and personalos.
  • Registers AI message and AI tool blocks as package-owned blocks.
  • Provides REST endpoints for conversations, messages, generation, setup status, and ability discovery.
  • Uses WordPress AI Client through wp_ai_client_prompt()->generate_text() when available, with Connectors/provider setup kept outside the package.
  • Discovers tools through wp_get_abilities() instead of depending on TODO or Notes PHP classes.
  • Activates without sibling Personal packages and shows setup status when AI Client or Abilities are missing.

Shared split foundation

  • Adds bundled helper classes for Knowledge runtime resolution, Knowledge type vocabulary, package settings, assets, notices, health checks, plugin base behavior, and sync base behavior.
  • Resolves future Knowledge identifiers first and falls back to current Guidelines identifiers.
  • Normalizes the PARA-inspired Knowledge type vocabulary with container-only parent terms and assignable child terms.
  • Keeps shared helpers source-controlled once under shared/php and copies them into each ZIP under includes/shared during packaging.
  • Uses package-local text domains for standalone WordPress.org packages.

Build, packaging, and local dev

  • Adds package-aware webpack entries and syncs built assets into packages/<slug>/build after npm run build.
  • Adds tools/package-plugin.mjs to build one ZIP per package.
  • Adds tools/verify-split-packages.mjs as a store-readiness gate for headers, readmes, privacy disclosures, ZIP shape, bundled helpers, block assets, vendor runtime files, and monolith/sibling coupling.
  • Updates GitHub Actions to build and upload a ZIP matrix for all five packages.
  • Updates release workflow to upload all five package ZIPs.
  • Replaces default .wp-env.json with the split package suite and adds one-package wp-env configs plus a legacy Abilities config.

Validation

Passed locally:

  • npm run build
  • npm run package:plugins
  • npm run verify:split-packages
  • focused PHPCS/PHP syntax checks for package PHP and split tests
  • focused JS lint checks for changed package/tooling files
  • git diff --check

Known local environment blocker:

  • npm run test:unit:backend could not run because wp-env reports service "tests-cli" is not running container #1. Per repo instructions, I did not try to repair the wp-env environment.

Build warnings observed but not introduced by the split package path:

  • stale Browserslist data
  • existing root monolith warning for src/notebooks/notebooks.js importing missing flag from @wordpress/icons
  • existing root index.js bundle size warnings

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