docs(01): create phase 1 plans
Phase 01: Foundation & Setup - 3 plans created (all independent, can run parallel) - 7 total tasks defined - Ready for execution Plans: - 01-01: Plugin structure and activation hooks - 01-02: Register job_offer CPT with capabilities - 01-03: Register ddhh_provider role and ACF fields Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
157
.planning/phases/01-foundation-setup/01-01-PLAN.md
Normal file
157
.planning/phases/01-foundation-setup/01-01-PLAN.md
Normal file
@@ -0,0 +1,157 @@
|
||||
---
|
||||
phase: 01-foundation-setup
|
||||
plan: 01
|
||||
type: execute
|
||||
depends_on: []
|
||||
files_modified: [ddhh-job-manager.php, includes/class-ddhh-job-manager.php, includes/class-activator.php, includes/class-deactivator.php]
|
||||
---
|
||||
|
||||
<objective>
|
||||
Create WordPress plugin boilerplate with proper structure, activation/deactivation hooks, and autoloading.
|
||||
|
||||
Purpose: Establish the foundation that all other features will build upon.
|
||||
Output: Functional WordPress plugin that can be activated without errors.
|
||||
</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
|
||||
|
||||
**Tech stack:** WordPress 6.x, ACF Pro, Formidable Forms Pro, Elementor Pro
|
||||
**Constraints:** Must follow WordPress plugin standards, security best practices
|
||||
</context>
|
||||
|
||||
<tasks>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 1: Create main plugin file with header</name>
|
||||
<files>ddhh-job-manager.php</files>
|
||||
<action>
|
||||
Create main plugin file with WordPress plugin header:
|
||||
- Plugin Name: Digital Dabei Job Manager
|
||||
- Description: Closed job board for provider self-registration and mentor applications
|
||||
- Version: 1.0.0
|
||||
- Author: digital dabei Hamburg
|
||||
- Text Domain: ddhh-job-manager
|
||||
- Domain Path: /languages
|
||||
|
||||
Add security check: `defined('ABSPATH') || exit;`
|
||||
|
||||
Define constants: DDHH_JM_VERSION, DDHH_JM_PLUGIN_DIR, DDHH_JM_PLUGIN_URL
|
||||
|
||||
Include autoloader and main class file.
|
||||
Instantiate main class on plugins_loaded hook (priority 10).
|
||||
|
||||
DO NOT use namespace yet — WordPress plugins traditionally use class prefixes for compatibility.
|
||||
</action>
|
||||
<verify>Plugin appears in WordPress admin plugins list (check Plugin Name: header is valid)</verify>
|
||||
<done>Main plugin file exists with valid header, constants defined, autoloader included</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 2: Create main plugin class with activation/deactivation</name>
|
||||
<files>includes/class-ddhh-job-manager.php, includes/class-activator.php, includes/class-deactivator.php</files>
|
||||
<action>
|
||||
Create `includes/class-ddhh-job-manager.php`:
|
||||
- Singleton pattern (private constructor, getInstance() method)
|
||||
- register_activation_hook() → DDHH_JM_Activator::activate()
|
||||
- register_deactivation_hook() → DDHH_JM_Deactivator::deactivate()
|
||||
- Store version in options on activation
|
||||
|
||||
Create `includes/class-activator.php`:
|
||||
- activate() method
|
||||
- Check WordPress version >= 6.0 (wp_die if older)
|
||||
- Check PHP version >= 7.4 (wp_die if older)
|
||||
- Set option 'ddhh_jm_version' to current version
|
||||
- Flush rewrite rules ONCE (set transient flag, flush on next init if flag exists)
|
||||
|
||||
Create `includes/class-deactivator.php`:
|
||||
- deactivate() method
|
||||
- Flush rewrite rules on deactivation
|
||||
- DO NOT delete data (user may reactivate)
|
||||
|
||||
Use `wp_die()` for version checks, not exceptions. WordPress doesn't handle exceptions well during activation.
|
||||
</action>
|
||||
<verify>Code follows WordPress Coding Standards, no syntax errors</verify>
|
||||
<done>Classes created, activation checks present, rewrite rules flushed properly</done>
|
||||
</task>
|
||||
|
||||
<task type="auto">
|
||||
<name>Task 3: Test plugin activation in Local WP environment</name>
|
||||
<files>N/A</files>
|
||||
<action>
|
||||
IMPORTANT: This task documents the testing steps but CANNOT be automated without access to Local WP environment.
|
||||
|
||||
Manual verification required:
|
||||
1. Copy plugin to Local WP: wp-content/plugins/ddhh-job-manager/
|
||||
2. Activate plugin in WordPress admin
|
||||
3. Check for activation errors
|
||||
4. Check admin notices
|
||||
5. Verify version stored in options table
|
||||
|
||||
This is a DOCUMENTATION task — the actual testing must be done by the user in their Local WP environment.
|
||||
</action>
|
||||
<verify>User confirms plugin activates without errors in Local WP</verify>
|
||||
<done>Plugin structure complete and ready for user testing in Local WP</done>
|
||||
</task>
|
||||
|
||||
</tasks>
|
||||
|
||||
<verification>
|
||||
Before declaring plan complete:
|
||||
- [ ] All PHP files have `defined('ABSPATH') || exit;` security check
|
||||
- [ ] Plugin header is valid and parseable
|
||||
- [ ] Activation/deactivation hooks are registered
|
||||
- [ ] Version checks prevent activation on incompatible environments
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- All tasks completed
|
||||
- Plugin structure follows WordPress standards
|
||||
- Activation/deactivation hooks functional
|
||||
- Ready for user verification in Local WP environment
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
After completion, create `.planning/phases/01-foundation-setup/01-01-SUMMARY.md`:
|
||||
|
||||
# Phase 1 Plan 1: Plugin Structure Summary
|
||||
|
||||
**WordPress plugin boilerplate created with activation/deactivation hooks**
|
||||
|
||||
## Accomplishments
|
||||
|
||||
- Main plugin file with proper header and constants
|
||||
- Singleton pattern for main class
|
||||
- Activation with version/PHP/WP checks
|
||||
- Deactivation with rewrite flush
|
||||
- Security checks on all files
|
||||
|
||||
## Files Created/Modified
|
||||
|
||||
- `ddhh-job-manager.php` - Main plugin file with header
|
||||
- `includes/class-ddhh-job-manager.php` - Main singleton class
|
||||
- `includes/class-activator.php` - Activation logic with checks
|
||||
- `includes/class-deactivator.php` - Deactivation logic
|
||||
|
||||
## Decisions Made
|
||||
|
||||
- Used class prefix instead of namespace for WordPress compatibility
|
||||
- Singleton pattern for main class (WordPress convention)
|
||||
- Flush rewrites via transient to avoid multiple flushes
|
||||
|
||||
## Issues Encountered
|
||||
|
||||
None
|
||||
|
||||
## Next Step
|
||||
|
||||
Ready for 01-02-PLAN.md (can run in parallel)
|
||||
</output>
|
||||
Reference in New Issue
Block a user