Athenian Platform Kernel (APK)
Overview
Athenian Platform Kernel (APK) provides a shared WordPress runtime for named events, asynchronous workflow execution, run logging, schema registration, and guarded REST/GraphQL inspection surfaces. This baseline is source-grounded against the installed 0.2.4 main file and a read-only Athenian Brands runtime inspection.
Use cases
- Order and payment workflow coordination
- Background automation through Action Scheduler or WP-Cron
- Shared schema inspection across connected plugins
- Admin-only workflow testing and run inspection
Developer
Verified baseline
APK 0.2.4 is active on athenianbrands.com. The installed main file matches the local repository source at SHA-256 ef3da460fd512475e78ab760ad382ca58814554becde5f361bdade4148a0b49d. The reviewed repository identity is commit 721e49116698ede4d0b5c104081b59152d3f99c8.
Emit a platform event with do_action('apk/event', 'order.placed', ['order_id' => 123], ['source' => 'woocommerce']);. Published workflows matching the event are queued through Action Scheduler when available, with WP-Cron fallback.
Full-tree parity boundary — 2026-10-07
The normalized comparison covers 19 non-vendor/non-backup/non-archive source files. The live Athenian Brands tree contains 14 files, with 14/14 common files matching exactly by both raw and normalized SHA-256, no live-only files, and five repository-only artifacts: docs/apk-marketing-document.md, docs/athenian-platform-marketing.md, docs/athenian-platform-technical.md, docs/technical-marketing.md, and athenian-platform-kernel-icon.png.
This closes deployed runtime parity for the shared implementation files while preserving an honest boundary: the installed package does not contain the repository's documentation and icon artifacts, so exact full-tree parity is not claimed. Keep the source repository as the documentation reference and do not treat the missing repository-only artifacts as a runtime failure without an owner-approved packaging decision.
Install
- Plugin: athenian-platform-kernel/athenian-platform-kernel.php
- Installed version: 0.2.4; status: active on athenianbrands.com
- Main-file SHA-256: ef3da460fd512475e78ab760ad382ca58814554becde5f361bdade4148a0b49d
- Repository commit recorded by the reviewed inventory: 721e49116698ede4d0b5c104081b59152d3f99c8
- Canonical source comparison: 19 normalized non-vendor/non-backup/non-archive files.
- Athenian Brands live tree: 14 files; all 14 common files match the local source exactly by raw and normalized SHA-256.
- Repository-only artifacts not installed: four documentation files and the APK icon PNG; live-only files: none.
- The main-file parity is exact, but the installed package is not a byte-complete copy of the repository tree.
Configuration
- enabled: 1; async_mode: action_scheduler
- log_retention: 30 days; max_payload_kb: 64
- allow_test_tools: 0; public_schema: 0; enable_graphql: 1
- Schema REST access is admin-only unless public_schema is explicitly enabled; workflow inspection requires manage_options.
Usage
Emit an event:
do_action('apk/event', 'order.placed', ['order_id' => 123], ['source' => 'woocommerce']);Create a private
apk_workflowrecord, select a trigger, and provide{conditions:[{type,params}], actions:[{type,params}]}JSON.Built-in triggers:
order.placed,order.paid,stock.low,media.approved,ai.intent_detected.Built-in actions:
log.notice,email.send,webhook.post,hook.fire.- WooCommerce integration emits order.placed after checkout processing and order.paid when an order reaches processing or completed, with duplicate-emission guards in order metadata.
Shortcodes
- No shortcode registration was found in the reviewed source. APK is exposed through admin screens, hooks, REST routes, and optional GraphQL fields.
REST Endpoints
GET /wp-json/apk/v1/schemau2014 list safe public schema definitions; optional entity and namespace filters.GET /wp-json/apk/v1/schema/{id}u2014 retrieve one schema definition.POST /wp-json/apk/v1/inspectu2014 inspect entity data; requiresmanage_optionsand entity/id parameters.- Live runtime registered all three routes; schema access is not public under the observed configuration.
Hooks
plugins_loaded,init,rest_api_init,admin_menu,admin_init,add_meta_boxes,save_post_apk_workflow, andadmin_post_apk_test_trigger.apk/event,apk/run_event, andapk/prune_logsare the core runtime hooks.woocommerce_checkout_order_processedemits order.placed;woocommerce_order_status_changedemits order.paid for processing/completed transitions.
Data Model
Private workflow post type:
apk_workflow, with title support and admin UI enabled.Workflow metadata:
_apk_enabled,_apk_trigger,_apk_spec, and_apk_spec_error.WooCommerce emission guards:
_apk_emitted_order_placedand_apk_emitted_order_paid.Run log table:
wp_apk_runs, with event, workflow, status, message, payload, result, and GMT timestamp columns.Built-in schema namespaces include
apc,afm,awgs, andwc; REST/GraphQL exposure is field-specific and capability-gated.
API Reference
Conditions:
always,user.role_in,order.total_gte,order.has_shipping_class.The engine queues
apk/run_event, evaluates published enabled workflows, and records statuses including running, skipped, done, and error.The daily
apk/prune_logstask removes run records older than the configured retention window.- Runtime inspection observed 5 triggers, 4 conditions, 4 actions, and 14 registered schema fields.
- Repository commit reviewed: 721e49116698ede4d0b5c104081b59152d3f99c8.
- Common runtime implementation files: 14 exact matches; normalized content mismatches: 0; line-ending-only differences: 0.
- Repository-only documentation and icon artifacts are source references, not installed runtime modules.
Troubleshooting
If events do not run, confirm APK is enabled and Action Scheduler or WP-Cron is processing the queued
apk/run_eventhook.If run history is unavailable, confirm the
wp_apk_runstable exists and the database user can write to it.If schema routes return authorization errors, confirm
public_schemaand the requesting user capability; the observed production setting is admin-only.- Test tools were disabled in the observed production configuration; avoid enabling them on a public-facing runtime without an explicit review.
- If a runtime implementation file differs, compare the normalized file manifest before investigating line endings or archive packaging.
- If a documentation or icon file is absent from the live plugin, classify it as a repository-only packaging artifact unless a runtime loader explicitly requires it.
- Before packaging changes, capture a new rollback archive and rerun the 14-file common-tree comparison plus the public nine-group DevDocs smoke.