Site logo

Engineering Update: AI-Powered Development & Payment Infrastructure






Engineering Update: AI-Powered Development & Payment Infrastructure | HiLucy


๐Ÿ”ง Engineering Update

AI-Powered Development & Payment Infrastructure

A Technical Deep-Dive into HiLucy’s Latest Platform Improvements

February 4, 2026 ยท Waseem Gorgi, Tech Lead ยท 12 min read

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.

54
Commits

5,200+
Lines Changed

3
Major Features

2
AI Agents

1. AI-Powered Development Workflow

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   โ”‚
                                                        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            
Figure 1: AI Workflow System Architecture

How It Works

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 Commits: All AI-generated code is committed with Co-Authored-By: Claude <[email protected]> to maintain transparency in our Git history.

2. Deposit & Split Payment System

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            โ”‚                         โ”‚
     โ”‚  โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”‚                         โ”‚

            
Figure 2: Deposit Payment Sequence

Implementation Details

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.

3. Activity Products REST API

We built a complete CRUD API for activity products, enabling the staff manager dashboard to create, update, and list activities programmatically.

Endpoints

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

Activity Finder Shortcode

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.

4. Multi-Currency Price Display

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)

5. Test Infrastructure Improvements

We significantly improved our CI/CD pipeline with better test reporting and reliability:

๐Ÿ“Š

Allure Reports

Beautiful test reports with screenshots, step-by-step traces, and failure analysis published to tests.dev.hilucy.com

๐Ÿฅ’

Cucumber BDD

Fixed parallel execution issues causing lost scenarios. Tests now run reliably with JUnit formatter.

โฑ๏ธ

Resilient Assertions

Added timeouts and retry logic to waitForLoadState calls preventing flaky test failures.

๐Ÿ“ฑ

WhatsApp Verification

Split check-in verification into separate template assertions for granular test coverage.

What’s Next

This week’s work lays the foundation for several upcoming features:

  • Automated Refunds: Using saved payment methods to process partial refunds for cancelled bookings
  • AI-Generated Activity Descriptions: Leveraging our LangGraph infrastructure to auto-generate SEO-optimized product descriptions
  • Real-Time Currency Rates: Moving from static conversion to live exchange rate API integration
  • Staff Performance Dashboard: Aggregating activity bookings, deposits collected, and guest satisfaction scores
Want to learn more? Our AI concierge Lucy is available 24/7 to answer questions about activities, spa services, and local recommendations. Message us on WhatsApp to experience the technology firsthand.

Technical Summary

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


Comments

  • No comments yet.
  • Add a comment