docs(01): create phase plan
Phase 01: Foundation - 1 plan created - 3 total tasks defined - Ready for execution Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
154
.planning/phases/01-foundation/01-01-PLAN.md
Normal file
154
.planning/phases/01-foundation/01-01-PLAN.md
Normal file
@@ -0,0 +1,154 @@
|
||||
---
|
||||
phase: 01-foundation
|
||||
plan: 01
|
||||
type: execute
|
||||
depends_on: []
|
||||
files_modified: [umzugsliste.php, includes/class-cpt.php, includes/class-admin-menu.php]
|
||||
---
|
||||
|
||||
<objective>
|
||||
Establish WordPress plugin infrastructure with CPT for storing form submissions and admin menu structure.
|
||||
|
||||
Purpose: Create the foundation that all subsequent features depend on — a properly registered plugin with data storage and admin interface.
|
||||
Output: Working WordPress plugin with CPT registration, admin menu, and proper activation hooks.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
~/.claude/get-shit-done/workflows/execute-plan.md
|
||||
./summary.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@.planning/PROJECT.md
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
|
||||
**Project context:**
|
||||
- Local by WP Engine development environment
|
||||
- WordPress with Salient theme installed
|
||||
- Plugin directory: `/Users/vmiller/Local Sites/siegel-liste/app/public/wp-content/plugins/umzugsliste/`
|
||||
- Currently empty except for .planning/ and .git/
|
||||
|
||||
**WordPress standards:**
|
||||
- Follow WordPress Coding Standards
|
||||
- Use proper text domain: `umzugsliste`
|
||||
- Namespace classes to avoid conflicts
|
||||
- Security: Capability checks, nonce verification (where applicable)
|
||||
</context>
|
||||
|
||||
<tasks>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 1: Create main plugin file with bootstrap code</name>
|
||||
<files>umzugsliste.php</files>
|
||||
<action>
|
||||
Create main plugin file with:
|
||||
- WordPress plugin header (Plugin Name: Umzugsliste, Description, Version: 1.0.0, Author: Siegel Umzüge, Text Domain: umzugsliste, Domain Path: /languages)
|
||||
- Security check (ABSPATH defined)
|
||||
- Plugin version constant
|
||||
- Main plugin class skeleton
|
||||
- Activation/deactivation hooks (flush_rewrite_rules on activation for CPT)
|
||||
- Autoloader or require statements for includes/
|
||||
- Init hook to initialize plugin components
|
||||
|
||||
DO NOT use namespaces (WordPress core doesn't require them). Prefix class names with `Umzugsliste_` to avoid conflicts.
|
||||
DO NOT add extensive inline documentation yet — focus on working code.
|
||||
</action>
|
||||
<verify>Plugin appears in wp-admin Plugins list, can be activated without errors</verify>
|
||||
<done>umzugsliste.php exists, has valid plugin header, activates successfully, no PHP errors</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 2: Register Custom Post Type for form submissions</name>
|
||||
<files>includes/class-cpt.php</files>
|
||||
<action>
|
||||
Create CPT registration class:
|
||||
- Class: `Umzugsliste_CPT`
|
||||
- Register `umzugsliste_entry` post type with labels (German: "Einträge", "Eintrag")
|
||||
- Settings: public=false, show_ui=true, show_in_menu=false (we'll add to custom menu in Task 3), capability_type='post', supports=['title'], has_archive=false
|
||||
- Title should be auto-generated from submission data in later phases — for now just support title
|
||||
- No custom fields yet (Phase 6 will add email content storage)
|
||||
- Register on `init` hook
|
||||
|
||||
WHY show_in_menu=false: We want full control over menu structure in Task 3, not WordPress default placement.
|
||||
</action>
|
||||
<verify>After activation, CPT registered (check with get_post_types() or inspect database wp_posts table capabilities)</verify>
|
||||
<done>CPT `umzugsliste_entry` registered, appears in WordPress (visible once we add menu in Task 3), no errors</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 3: Create admin menu structure</name>
|
||||
<files>includes/class-admin-menu.php</files>
|
||||
<action>
|
||||
Create admin menu class:
|
||||
- Class: `Umzugsliste_Admin_Menu`
|
||||
- Add top-level menu on `admin_menu` hook: "Umzugsliste" with dashicons-list-view icon
|
||||
- Position: 25 (below Comments, above Appearance)
|
||||
- Capability: 'edit_posts' (editors and above can access)
|
||||
- First submenu: "Einträge" (Entries) - links to edit.php?post_type=umzugsliste_entry (CPT list view)
|
||||
- Second submenu: "Einstellungen" (Settings) - callback to placeholder function that displays "Settings coming in Phase 3" notice
|
||||
- Remove the duplicate top-level menu item that WordPress auto-creates (remove_submenu_page)
|
||||
|
||||
WHY remove duplicate: WordPress auto-adds first submenu as duplicate of parent — we want clean "Einträge" and "Einstellungen" only.
|
||||
</action>
|
||||
<verify>Admin menu shows "Umzugsliste" with icon, contains "Einträge" and "Einstellungen" submenus, no duplicate entries</verify>
|
||||
<done>Top-level menu visible in wp-admin, submenus functional, Einträge shows CPT list (empty), Einstellungen shows placeholder message</done>
|
||||
</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
<verification>
|
||||
Before declaring plan complete:
|
||||
- [ ] Plugin activates without PHP errors or warnings
|
||||
- [ ] Admin menu "Umzugsliste" appears with icon in left sidebar
|
||||
- [ ] Submenus "Einträge" and "Einstellungen" both functional
|
||||
- [ ] Einträge shows CPT list view (empty but working)
|
||||
- [ ] Einstellungen shows "coming in Phase 3" placeholder
|
||||
- [ ] No JavaScript console errors
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- All tasks completed
|
||||
- All verification checks pass
|
||||
- Plugin foundation ready for Phase 2 (data extraction)
|
||||
- Clean activation/deactivation (no orphaned data)
|
||||
- Admin interface accessible to editors and above
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
After completion, create `.planning/phases/01-foundation/01-01-SUMMARY.md`:
|
||||
|
||||
# Phase 1 Plan 1: Foundation Summary
|
||||
|
||||
**WordPress plugin infrastructure established with CPT and admin menu**
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Main plugin file created with proper WordPress header and activation hooks
|
||||
- Custom Post Type `umzugsliste_entry` registered for storing form submissions
|
||||
- Admin menu structure created with Einträge and Einstellungen submenus
|
||||
- Plugin activates cleanly in Local by WP Engine environment
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `umzugsliste.php` - Main plugin bootstrap file
|
||||
- `includes/class-cpt.php` - CPT registration class
|
||||
- `includes/class-admin-menu.php` - Admin menu structure class
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- Used `Umzugsliste_` class prefix instead of namespaces (WordPress compatibility)
|
||||
- Set CPT capability to 'edit_posts' (editors and above)
|
||||
- Menu position 25 (below Comments)
|
||||
- Text domain: `umzugsliste` for i18n readiness
|
||||
|
||||
## Issues Encountered
|
||||
|
||||
[None expected - standard WordPress patterns]
|
||||
|
||||
## Next Phase Readiness
|
||||
|
||||
Phase 1 complete. Ready for Phase 2: Legacy Data Extraction.
|
||||
Phase 2 will extract furniture data from legacy PHP files into structured arrays.
|
||||
</output>
|
||||
Reference in New Issue
Block a user