Athenian Plug-in Forge for WordPress
Overview
Product overview
Athenian Plug-in Forge is an AI-assisted WordPress and WooCommerce plugin planning, scaffolding, packaging, and delivery workspace. It is designed to take loose plugin requests and move them through a structured discovery process before generation begins. Instead of producing code from a single vague prompt, the plugin creates a readiness-scored build record, proposes a file structure, highlights missing implementation details, generates a scaffolded ZIP package, and gives admins or customers a tracked build dashboard.
The current implementation is intentionally staged as a practical planning and mock-generation environment. It uses a local mock AI planner and generator for workflow validation, while leaving a clear path to replace the mock layer with Athenian Platform Core AI services or another production model provider later.
Use cases
- Plugin packaging
- Internal development workflows
- Build review
- WordPress extension operations
Developer
Developer starting point
This baseline is generated from the reviewed local technical reference and source folder. Deployed-version parity and external-provider effects remain separate verification steps.
User Workflows
Admin Operator Workflow
- Admin opens the Plug-in Forge dashboard in WordPress admin.
- Admin enters the plugin request, touchpoints, rules, and delivery notes.
- Admin chooses surfaces and planning mode.
- Planner returns readiness lights, missing details, recommendations, and proposed file structure.
- Admin refines the request until the build is ready or chooses to package a draft.
- Plugin Forge generates scaffold files, writes a README and manifest, builds a ZIP, and exposes download controls.
Customer-Facing Workflow
- A page embeds the
[pif]shortcode. - Guest or signed-in customer enters a plugin request.
- A browser session token or user ID ties the build to that viewer.
- Customer reviews questions, recommendations, and build state.
- Customer can refresh the plan or package the current build state when allowed by the interface.
- Available ZIP builds appear in the build desk for the matching owner context.
Developer CLI Workflow
- Developer runs
wp pif planwith a prompt. - Plugin creates a manifest in uploads.
- Developer runs
wp pif generateto write scaffold files. - Developer runs
wp pif zipto package the generated scaffold. - Developer checks
wp pif status,wp pif list, or deletes older builds.
Technical Architecture
Bootstrap
Primary plugin file:
athenian-plugin-forge.phpThe plugin initializes on plugins_loaded through PIF_Core::init().
Core Classes
| Class | File | Purpose | | --- | --- | --- | | PIF_Core | includes/class-pif-core.php | Loads dependencies, initializes customer context, workflow handlers, CLI, admin UI, and shortcode UI. | | PIF_Admin | includes/admin/class-pif-admin.php | Registers the admin menu and admin assets for the Plug-in Forge dashboard. | | PIF_Shortcode | includes/shortcodes/class-pif-shortcode.php | Registers [pif] and frontend assets for customer-facing plugin planning. | | PIF_UI | includes/class-pif-ui.php | Renders the shared planning interface used by both admin and frontend surfaces. | | PIF_Customer | includes/class-pif-customer.php | Maintains viewer ownership context for admins, logged-in users, and guest browser sessions. | | PIF_Workflow | includes/build/class-pif-workflow.php | Handles AJAX planning, build listing, scaffold packaging, downloading, scoring, questions, recommendations, and dashboard records. | | PIF_Build_State | includes/build/class-pif-build-state.php | Manages build directories, manifests, generated files, logs, ZIP paths, owner matching, and deletion. | | PIF_Mock_AI | includes/build/class-pif-mock-ai.php | Provides the current mock planning and file generation layer. | | PIF_Protocol | includes/build/class-pif-protocol.php | Parses tagged AI event and JSON structure payloads. | | PIF_Zip | includes/build/class-pif-zip.php | Packages generated build files into ZIP artifacts. | | PIF_CLI | includes/cli/class-pif-cli.php | Registers and implements WP-CLI commands for build operations. |
Asset Files
| Asset | Purpose | | --- | --- | | assets/app.css | Shared application styling for the planning interface. | | assets/app.js | Shared interface behavior, AJAX calls, readiness rendering, dashboard rendering, and packaging triggers. | | assets/admin.css | Admin-specific presentation adjustments. | | assets/frontend.css | Frontend-specific presentation adjustments. | | assets/admin.js | Admin-side script file included in the package. | | assets/frontend.js | Frontend-side script file included in the package. |
WordPress Integration Points
Admin Menu
The plugin registers a top-level admin page:
- Page title: Plug-in Forge
- Menu title: Plug-in Forge
- Capability:
manage_options - Slug:
pif - Icon:
dashicons-hammer
Shortcode
[pif]The shortcode renders the customer-facing planning studio.
AJAX Actions
The plugin registers authenticated and unauthenticated AJAX handlers:
| Action | Purpose | | --- | --- | | pif_plan_workflow | Creates a plan payload from request fields and stores a build manifest. | | pif_list_builds | Lists build dashboard records for the current owner context. | | pif_generate_build | Generates scaffold files and packages the current build into a ZIP. | | pif_download_build | Streams the completed ZIP artifact to the browser. |
Each AJAX route uses the pif_plan_workflow nonce.
WP-CLI Commands
| Command | Purpose | | --- | --- | | wp pif | Confirms CLI installation and prints usage. | | wp pif plan | Creates a build manifest and mock AI plan. | | wp pif generate | Generates scaffold files from the planned structure. | | wp pif zip | Packages generated files into a ZIP. | | wp pif status | Prints build status JSON. | | wp pif list | Lists recent builds in table format. | | wp pif delete | Deletes a build directory. | | wp pif protocol-test | Tests extraction of PIF event and structure protocol tags. |
Data Model and Storage
Plugin Forge does not register a custom database table, custom post type, taxonomy, option, or post meta model in the reviewed version. Instead, build state is file-backed under WordPress uploads.
Build Storage
Builds are stored under:
wp-content/uploads/pif/builds/<build_id>/Each build directory can contain:
manifest.json
logs.txt
files/
output.zipManifest Structure
The manifest stores:
build_idcreated_gmtmodepromptownerpluginstructurefeaturesfilesreviewartifactsstatus
Owner Context
Build ownership is determined by:
- Admin viewer: full build access when the user can
manage_options. - Logged-in user: build access by WordPress user ID.
- Guest browser session: build access by
pif_client_tokencookie.
The guest token is generated with wp_generate_uuid4() and stored as an HTTP-only cookie for one year.
Security and Validation Notes
The reviewed implementation includes several important safeguards:
defined('ABSPATH') || exitguard in PHP files.manage_optionscapability for the admin menu.- Nonce validation for AJAX actions through
check_ajax_referer(). - Sanitization for textarea input, keys, build IDs, owner labels, and cookie tokens.
- Owner checks before listing, packaging, or downloading builds.
- ZIP download responses include
X-Content-Type-Options: nosniff. - Guest builds are isolated by an HTTP-only session token.
- File write paths strip parent-directory traversal fragments before writing generated files.
Technical Summary
Athenian Plug-in Forge is a WordPress plugin with a shared admin/frontend UI, AJAX-based planning and packaging actions, file-backed build manifests, guest/customer ownership tracking, mock AI planning, scaffold file generation, ZIP packaging, and WP-CLI command support. It currently acts as a guided planning and mock-generation platform that can later be connected to a production AI provider or broader Athenian Platform services.
Install
- Reviewed source folder: athenian-plugin-forge
- Plugin version reviewed: 0.3.0
- Local source inventory: 25 files (vendor, temporary, test, and Git metadata excluded).
- GitHub baseline: https://github.com/Athenian-Brands/athenian-plugin-forge at main / aec3b59f68fd19301d874434cc830c816581ff2f.
- WordPress and the PHP filesystem/runtime capabilities declared by the source.
- Generated ZIP contents and deployment activation require separate review before use in production.
Configuration
- Executive Summary — see the linked technical reference excerpt.
- Marketing Positioning — see the linked technical reference excerpt.
- Short Description — see the linked technical reference excerpt.
- Long Description — see the linked technical reference excerpt.
- Core Value Propositions — see the linked technical reference excerpt.
- Primary Audiences — see the linked technical reference excerpt.
- Feature Overview — see the linked technical reference excerpt.
- User Workflows — see the linked technical reference excerpt.
- Technical Architecture — see the linked technical reference excerpt.
- WordPress Integration Points — see the linked technical reference excerpt.
- Data Model and Storage — see the linked technical reference excerpt.
- Build Lifecycle — see the linked technical reference excerpt.
- Mock AI Planner Behavior — see the linked technical reference excerpt.
- Protocol Parser — see the linked technical reference excerpt.
Usage
- Shortcodes detected in local PHP source: 2
- Static action/filter hooks detected in local PHP source: 16
- REST route registrations detected in local PHP source: 0
Shortcodes
- pif — includes/shortcodes/class-pif-shortcode.php
- {$slug} — includes/build/class-pif-mock-ai.php
REST Endpoints
- No register_rest_route calls were detected by the baseline scanner.
Hooks
- admin_enqueue_scripts — includes/admin/class-pif-admin.php
- admin_enqueue_scripts — includes/build/class-pif-mock-ai.php
- admin_menu — includes/admin/class-pif-admin.php
- admin_menu — includes/build/class-pif-mock-ai.php
- init — includes/class-pif-customer.php
- plugins_loaded — athenian-plugin-forge.php
- plugins_loaded — includes/build/class-pif-mock-ai.php
- wp_ajax_nopriv_pif_download_build — includes/build/class-pif-workflow.php
- wp_ajax_nopriv_pif_generate_build — includes/build/class-pif-workflow.php
- wp_ajax_nopriv_pif_list_builds — includes/build/class-pif-workflow.php
- wp_ajax_nopriv_pif_plan_workflow — includes/build/class-pif-workflow.php
- wp_ajax_pif_download_build — includes/build/class-pif-workflow.php
- wp_ajax_pif_generate_build — includes/build/class-pif-workflow.php
- wp_ajax_pif_list_builds — includes/build/class-pif-workflow.php
- wp_ajax_pif_plan_workflow — includes/build/class-pif-workflow.php
- wp_enqueue_scripts — includes/shortcodes/class-pif-shortcode.php
Data Model
- WordPress Integration Points — described in the local technical reference.
- Data Model and Storage — described in the local technical reference.
API Reference
- Local source digest: 0afcf78f8dbb0aff3c3ad130c77a8410cbd41281c24994e11f5ae8a78d2489bb
- Repository URL: https://github.com/Athenian-Brands/athenian-plugin-forge
- Repository reference: main
- Repository commit: aec3b59f68fd19301d874434cc830c816581ff2f
Source files include: README.md, assets/admin.css, assets/admin.js, assets/app.css, assets/app.js, assets/frontend.css, assets/frontend.js, athenian-plugin-forge-icon.png, athenian-plugin-forge.php, athenian-plugin-forge.zip, docs/athenian-platform-marketing.md, docs/athenian-platform-technical.md, docs/technical-marketing.md, includes/admin/class-pif-admin.php, includes/build/class-pif-build-state.php, includes/build/class-pif-mock-ai.php, includes/build/class-pif-protocol.php, includes/build/class-pif-workflow.php, includes/build/class-pif-zip.php, includes/class-pif-core.php, includes/class-pif-customer.php, includes/class-pif-ui.php, includes/cli/class-pif-cli.php, includes/shortcodes/class-pif-shortcode.php, pif-marketing-document.md
Troubleshooting
- This baseline is generated from the reviewed local technical reference and source folder. Deployed-version parity and external-provider effects remain separate verification steps.
- Confirm the deployed plugin version, active dependencies, and current repository tree before using implementation details as a release contract.
- Treat payment, carrier, vendor, shipment, inventory, account, credential, and external-provider behavior as integration-dependent until exercised in the target environment.
FAQ
What is this page intended to establish?
A versioned, product-linked starting point for iterative developer documentation. It combines the local implementation reference with a compact detected-code inventory and a committed GitHub baseline.
Is the linked repository baseline verified?
Yes. The repository URL, ref, and commit recorded on this page were verified from the clean GitHub baseline prepared for this documentation pass. That does not by itself prove fleet deployment parity.
What remains for release-grade documentation?
Reconcile the recorded source baseline with the deployed plugin version, then exercise the relevant authenticated, store, provider, payment, carrier, or generated-artifact paths in the target environment.