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