Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,18 @@ jobs:
- name: Setup dependencies
uses: ./.github/actions/setup-deps

- name: Lint WordPress styles
run: npm run lint:css

- name: Setup WP-Env
uses: ./.github/actions/setup-wp-env

- name: Run PHP unit tests
run: npm run test:unit:backend

- name: Run Personal Stuff block and search tests
run: npm run test:unit:stuff

build-and-publish:
if: ${{ github.event.pull_request.state == 'open' && github.event.pull_request.draft == false }}
needs: [test]
Expand All @@ -116,6 +122,7 @@ jobs:
- personal-evernote-sync
- personal-todo
- personal-ai-chat
- personal-stuff
steps:
- name: Checkout PR merge ref
uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- personal-evernote-sync
- personal-todo
- personal-ai-chat
- personal-stuff

steps:
- name: Checkout Repository
Expand Down
10 changes: 10 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Generated output and bundled dependencies.
**/build/**
**/dist/**
**/out/**
**/vendor/**
**/coverage/**
**/.next/**

# Separate Next.js project; it does not use WordPress CSS conventions.
src-chatbot/**
3 changes: 2 additions & 1 deletion .wp-env.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"./packages/personal-readwise-sync",
"./packages/personal-evernote-sync",
"./packages/personal-todo",
"./packages/personal-ai-chat"
"./packages/personal-ai-chat",
"./packages/personal-stuff"
],
"config": {
"WP_DEBUG": true,
Expand Down
19 changes: 19 additions & 0 deletions .wp-env.personal-stuff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"plugins": [
"https://downloads.wordpress.org/plugin/gutenberg.23.7.0.zip",
"./packages/personal-stuff"
],
"config": {
"WP_DEBUG": true,
"WP_DEBUG_LOG": true,
"SCRIPT_DEBUG": true,
"WP_DEBUG_DISPLAY": true
},
"mappings": {
"wp-content/shared/php": "./shared/php",
"wp-content/vendor": "./vendor"
},
"lifecycleScripts": {
"afterStart": "wp-env run cli wp option update gutenberg-experiments '{\"gutenberg-guidelines\":true}' --format=json"
}
}
16 changes: 16 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,22 @@ Assume environment is set up.
- IMPORTANT: When you learn something about the codebase or how I want you to operate, add it to lessons below.

### Lessons
- Personal Stuff UX should keep search and uncropped photos prominent, minimize mobile header clutter, and use a full-viewport add/edit flow on phones with inputs at least 16px and persistent save/progress controls. Keep secondary photo controls and block settings optional. `docs/personal-stuff-ux-feedback.md` records applicable feedback mined from the original Stuff sessions; no PRs were available there.
- DataViews grid `layout.previewSize` is a column count, not a pixel width. Leave it unset for responsive defaults; a value such as 240 produces an unusable grid below the library's mobile breakpoint.
- On M5, offer the optional Tailscale hostname setup when working with wp-env WordPress projects, but never enable it automatically or treat this project's approval as consent for other projects. The shared machine-context skill and M5 profile hold the reusable procedure; localhost remains the default until the user accepts.
- Host-specific wp-env domains belong in ignored `.wp-env.override.json` under `env.development.config` (`WP_HOME` and `WP_SITEURL`), leaving the PHPUnit site's URL local. Back up and replace stored development URLs with serialization-aware WP-CLI search-replace, skipping GUIDs. Normal wp-env startup reactivates configured packages on both sites, so a standalone ZIP test copy must not remain active alongside the same source plugin when returning to the suite.
- Keep CSS lint dependencies compatible with the installed WordPress scripts: scripts 30.7.0 uses `@wordpress/stylelint-config/scss-stylistic` from config 23.6.0 and Stylelint 16.12.0. Declare the config and binary explicitly, preserve the lockfile, and validate with `npm ci`; ignore generated/bundled CSS and the separate Next.js project, while linting all WordPress source styles without disabling rules.
- Personal Stuff creates a private empty Knowledge row before opening its editor so every upload surface has a saved authorized parent. Use both upload and sideload prefilters for filename randomization: Gutenberg/core REST supports raw-body and multipart uploads, while the native Media Library uses verified `post_id`. Keep originals and derivatives on the same random basename.
- Browser tests confirmed Stuff and Personal Notes share native Gutenberg content without adding the `note` identity to Stuff items; Notes continues to list note records. Moving/tagging an item must omit unchanged `content` so gallery captions, order and custom blocks remain intact.
- Personal Stuff is planned as a standalone plugin replicating `~/GIT/stuff`; its physical places must be hierarchical `wp_knowledge_type` terms in a tree rooted at the top-level `stuff` Knowledge Type, not separate place posts or `post_parent` relationships. Items remain individual Knowledge posts, and location is a taxonomy assignment.
- Personal Stuff item photos and galleries belong in `post_content` as native Gutenberg image/gallery blocks, with block order determining photo order and cover. Both Gutenberg and the native Stuff UI must edit the same content losslessly; do not store a parallel gallery in meta. Include a required operating skill, but no importing affordances or importer phase. `docs/personal-stuff-plan.md` holds the revised lean plan.
- Personal Stuff has no quantity field and no linked place-content posts or `personal_stuff_content_id`. Places/tags are raw taxonomy terms using native name, slug, parent and description; omit place galleries and custom Stuff post/term meta. Photos belong to item posts only; existing Knowledge provenance and normal WordPress attachment metadata may remain.
- Personal Stuff is primarily a JS app over existing Knowledge, Knowledge Type and Media REST APIs. Add no custom REST namespace, server projection API, package-specific Abilities, storage schema, ACL registry or persistent lock/idempotency store. Keep PHP thin: fixed-term provisioning, WpApp/assets/editor integration, scoped upload filename randomization and narrow native hooks as needed; rely on existing WordPress permissions and editing behavior.
- Prefer the simplest Personal Stuff implementation: a small PHP bootstrap for terms and required integration, with JS using existing WordPress APIs/components. Do not prebuild controllers/services, custom permissions/concurrency, a separate editor engine, media reference scanner, repair framework or offline subsystem. Preserve the requested inventory UI using native facilities; add abstractions only when concrete implementation needs justify them.
- Personal Stuff should expose a private top-level `/stuff/` app through the existing bundled WpApp helper, with wp-admin entries acting as launchers and My Apps integration when available. The user meant WpApps, not a my.wordpress.net-specific browser runtime; do not add browser-local deployment requirements from that reference.
- Personal Stuff routing terms such as `stuff`, `stuff-places` and `stuff-tags` must be recognized by stable slugs and created idempotently on activation, with deferred provisioning when Knowledge becomes available. Do not store root term IDs, installed/schema flags or other speculative persistent plugin options; derive readiness from actual terms and use native WordPress relationships.
- Personal Stuff must replace new upload basenames with cryptographically random names before files enter WordPress's public Media uploads directory, preserving validated extensions and applying the rule in both the Stuff UI and its Gutenberg upload context. Original/scaled/thumbnail filenames must retain the unpredictable basename. These remain public URLs that are hard to guess, not private media; do not rename unrelated uploads or existing attachments retroactively, and do not add an option for this rule.
- When porting Stuff, inspect its current code as well as its PRD: the app includes filtered collection links, Print / PDF, contextual previous/next and swipe navigation, inline description editing, photo recovery/publication, and cached read-only browsing. Do not copy its broad same-origin service-worker caching into an authenticated WordPress app.
- For the plugin split, prefer a lean Personal-branded, Knowledge-centered target: Notes UI, Readwise sync, Evernote sync, TODO+ICS, and AI Chat; remove/defer OpenAI, Perplexity, IMAP/email responder, podcast/ElevenLabs, transcription, and voice/realtime instead of extracting every old module.
- TODO should store each task as its own `wp_knowledge` post tagged `artifact` and `todo` so non-PersonalOS Knowledge consumers can discover tasks; do not use `plan` or `personalos` for ordinary TODO rows.
- Current GitHub Actions build one monolithic `wp-personal-os.zip`; the plugin split needs a package matrix that builds and uploads separate ZIPs for Notes, Readwise, Evernote, TODO, and AI Chat.
Expand Down
Loading
Loading