A Technical Deep-Dive into HiLucy’s Latest Platform Improvements
This week marked a significant milestone in HiLucy’s technical evolution. We shipped 50+ commits across our WordPress plugin and AI infrastructure, introducing autonomous development workflows, a complete deposit payment system, and new activity management capabilities. Here’s a technical breakdown of what we built and how it works.
The most significant architectural addition is our AI Workflow System β a fully autonomous development pipeline that takes Monday.com tasks and executes them via Claude or Codex agents. When a task moves to “AI: Plan”, “AI: Refine”, or “AI: Build” status, our system takes over.
βββββββββββββββββββ webhook βββββββββββββββββββββββ
β Monday.com β ββββββββββββββββΆ β WordPress REST API β
β (Task Board) β β /ai-workflow/{act} β
βββββββββββββββββββ ββββββββββββ¬βββββββββββ
β
ββββββββββββΌβββββββββββ
β Job Queue β
β wp_hilucy_ai_jobs β
ββββββββββββ¬βββββββββββ
β
βββββββββββββββββββΌββββββββββββββββββ
β β β
βββββββββββΌββββββββ βββββββββΌββββββββ βββββββββΌββββββββ
β AI: Plan β β AI: Refine β β AI: Build β
β β β β β β
β β’ Analyze task β β β’ Review plan β β β’ Execute β
β β’ Write plan.md β β β’ Incorporate β β β’ Run tests β
β β’ List files β β feedback β β β’ Commit β
βββββββββββββββββββ βββββββββββββββββ βββββββββ¬ββββββββ
β
βββββββββββΌββββββββββ
β Git Repository β
β hilucy.wp β
βββββββββββ¬ββββββββββ
β
βββββββββββΌββββββββββ
β GitHub Actions β
β CI/CD Pipeline β
βββββββββββββββββββββ
The workflow leverages Monday.com’s webhook system to trigger WordPress REST endpoints. When a task status changes:
// REST endpoint registration
register_rest_route('hilucy/v1', '/ai-workflow/(?P<action>plan|refine|build)', [
'methods' => 'POST',
'callback' => 'hilucy_ai_workflow_webhook_handler',
'permission_callback' => 'hilucy_verify_monday_webhook',
]);
The system fetches the task details including any linked Epic for broader context. This is critical β the AI agent receives not just the task description, but the entire epic scope, acceptance criteria, and related context.
// Fetch parent epic context
function hilucy_monday_get_parent_epic($item_id) {
$query = <<<GRAPHQL
query GetLinkedEpic(\$itemId: [ID!]) {
items(ids: \$itemId) {
column_values {
id
... on BoardRelationValue {
linked_item_ids
}
}
}
}
GRAPHQL;
// ... fetch and return epic details
}
Co-Authored-By: Claude <[email protected]> to maintain transparency in our Git history.
We implemented a complete deposit payment infrastructure for service bookings. Guests can now pay a partial deposit upfront with the remaining balance handled separately β crucial for high-value spa packages and activities.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PAYMENT FLOW β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Guest HiLucy Stripe
β β β
β 1. Select service β β
β ββββββββββββββββββββΆ β β
β β β
β 2. Show deposit UI β β
β ββββββββββββββββββββ β β
β β β
β 3. Pay deposit (30%) β β
β ββββββββββββββββββββΆ β 4. Create PaymentIntentβ
β β ββββββββββββββββββββββΆ β
β β β
β β 5. payment_intent.id β
β β ββββββββββββββββββββββ β
β β β
β 6. Confirm deposit β β
β ββββββββββββββββββββ β β
β β β
β ...time passes (service delivered)... β
β β β
β 7. Pay balance (70%) β β
β ββββββββββββββββββββΆ β 8. Charge saved card β
β β ββββββββββββββββββββββΆ β
β β β
β 9. Receipt β β
β ββββββββββββββββββββ β β
The deposit system extends WooCommerce’s payment gateway architecture with a new WC_Gateway_COD_Deposit class:
/**
* Create a PaymentIntent for a service deposit.
*
* @param int $user_id WordPress user ID
* @param float $amount Deposit amount in dollars
* @param array $metadata Tracking data (staff_id, listing_id)
* @return array Result with payment_intent_id or checkout_url
*/
public function create_deposit_intent($user_id, $amount, $metadata = []) {
$stripe = new \Stripe\StripeClient(STRIPE_SECRET_KEY);
return $stripe->paymentIntents->create([
'amount' => $amount * 100, // Convert to cents
'currency' => 'usd',
'metadata' => array_merge($metadata, [
'type' => 'deposit',
'user_id' => $user_id,
]),
'setup_future_usage' => 'off_session', // Save for balance charge
]);
}
The balance payment leverages Stripe’s saved payment methods, allowing us to charge the remaining amount after service delivery without requiring the guest to re-enter card details.
We built a complete CRUD API for activity products, enabling the staff manager dashboard to create, update, and list activities programmatically.
| Method | Endpoint | Description |
|---|---|---|
GET |
/hilucy/v1/activity-products |
List activities with pagination & filters |
POST |
/hilucy/v1/activity-products |
Create new activity product |
PUT |
/hilucy/v1/activity-products/{id} |
Update existing activity |
DELETE |
/hilucy/v1/activity-products/{id} |
Delete activity |
Alongside the API, we shipped a Vue.js-powered Activity Finder component that hotel staff can embed on any page:
[activity_finder category="spa,wellness" columns="3" show_price="true"]
The component fetches from our REST API and renders a filterable grid of activities with real-time search, category filtering, and responsive layouts.
For our Mexico-based properties, we implemented inline MXN pricing alongside USD. Guests see both currencies without navigating away or using a currency switcher.
// Convert and display MXN inline
add_filter('woocommerce_get_price_html', 'hilucy_add_mxn_inline_price', 200, 2);
function hilucy_add_mxn_inline_price($price_html, $product) {
if ($product->get_type() !== 'activity') return $price_html;
$usd_price = floatval($product->get_price());
$mxn_price = $usd_price * 17.5; // Current rate
$mxn_formatted = number_format($mxn_price, 0, '.', ',');
return $price_html . "<span class='mxn-price'> (MXN {$mxn_formatted})</span>";
}
Result: $125.71 USD (MXN 2,200)
We significantly improved our CI/CD pipeline with better test reporting and reliability:
Beautiful test reports with screenshots, step-by-step traces, and failure analysis published to tests.dev.hilucy.com
Fixed parallel execution issues causing lost scenarios. Tests now run reliably with JUnit formatter.
Added timeouts and retry logic to waitForLoadState calls preventing flaky test failures.
Split check-in verification into separate template assertions for granular test coverage.
This week’s work lays the foundation for several upcoming features:
| Component | Files Changed | Key Technology |
|---|---|---|
| AI Workflow System | ai-workflow-*.php (4 files) | Monday GraphQL, Claude API, WP-Cron |
| Deposit Payments | stripe/*.php (3 files) | Stripe PaymentIntents, WooCommerce |
| Activity API | hilucy-manager-endpoints.php | WP REST API, WooCommerce Products |
| Activity Finder | activity-finder.* (3 files) | Vue.js, REST API, CSS Grid |
| Multi-Currency | price-display.php | WooCommerce Filters |
| Test Infrastructure | tests/integration/* (8 files) | Playwright, Cucumber, Allure |