Sitemap
Sathish Sivananinthaperumal

Sathish Sivananinthaperumal

Adobe commerce certified master, Technical Architect at Adobe, Adobe Campaign Certified Developer Expert

Agentic Development Lifecycle for Adobe Commerce

8 min readJul 21, 2026

--

The Agentic Development Life Cycle (ADLC) extends traditional Adobe Commerce development by introducing AI agents as active participants throughout the software lifecycle. Rather than using AI only for code generation, agents collaborate across planning, architecture, implementation, testing, deployment, operations, and continuous optimization.

Press enter or click to view image in full size
ADLC Design

The lifecycle breaks into six phases from a developer’s standpoint:

  1. Plan & Architect
  2. Configure
  3. Develop
  4. Test
  5. Deploy
  6. Monitor & Iterate
Press enter or click to view image in full size
ADLC Life Cycle

1. Plan & Architect

Define module scope, dependencies, and extension points. Decide between plugins, observers, or service contracts. Map out API integrations and third-party MCPs (Adobe Journey Optimizer, AEM, Workfront, etc.). Identify which Adobe Commerce extension point fits your need: plugin (intercept methods), observer (react to events), preference (replace a class), or UI component (admin UI).

Decide which Adobe MCP services your module will consume — for example, AEM for content delivery, AJO for campaign triggers, or Real-Time CDP for behavioural personalization.

Press enter or click to view image in full size
Press enter or click to view image in full size

2. Configure

Set up the module skeleton (registration.php, module.xml, di.xml, composer.json). Define service contracts (interfaces), repositories, and models. Configure dependency injection and virtual types.

Every module needs the triad: registration.php (registers the module with Adobe Commerce), etc/module.xml (declares name + version), and di.xml (wires interfaces to implementations). Use composer.json to declare PHP dependencies and autoloading.

Every Adobe Commerce module follows this directory convention. Create this skeleton before writing any PHP.

Press enter or click to view image in full size

3. Develop

Build business logic using plugins (before/around/after), observers/events, GraphQL/REST APIs, and UI components. Integrate Adobe MCPs for AI-powered workflows (content generation, marketing automation, analytics).

The four core patterns:

  • Plugins — intercept any public method on any class without modifying core
  • Observers — subscribe to catalog_product_save_after, checkout_submit_all_after, etc.
  • GraphQL/REST — add custom resolvers or extend existing schemas for headless/PWA frontends
  • UI Components — build admin grids, forms, and modals with <uiComponent> XML config

For agentic workflows, call Adobe MCPs directly from your service layer using OAuth tokens — for example, triggering an AJO journey when an order event fires.

Phase 3 has five core areas: Plugins, Observers, GraphQL/REST APIs, UI Components, and Adobe MCP Integration.

Press enter or click to view image in full size

Plugin (interceptor pattern)

Intercepts any public method on any class without modifying core. Three hook types — before, around, after — each with a distinct signature and use case.

Press enter or click to view image in full size

di.xml declaration:

<type name="Magento\Catalog\Model\Product">
<plugin
name="vendor_module_product_plugin"
type="Vendor\Module\Plugin\ProductPlugin"
sortOrder="10"
disabled="false"
/>
</type>
<?php
namespace Vendor\Module\Plugin;

use Magento\Catalog\Model\Product;

class ProductPlugin
{
// BEFORE — modify getName() arguments (none here, so return null)
public function beforeGetName(Product $subject): void
{
// Log or validate before getName() runs
}

// AROUND — wrap setName(), enforce uppercase rule
public function aroundSetName(
Product $subject,
callable $proceed,
string $name
): Product {
$name = strtoupper($name); // transform arg
return $proceed($name); // call original
}

// AFTER — append suffix to getName() result
public function afterGetName(
Product $subject,
string $result
): string {
return $result . ' [Verified]';
}
}

REST API & GraphQL

Expose your module’s data over REST for mobile/integrations and GraphQL for PWA/headless storefronts. Both map to the same service contract interfaces.

<routes xmlns:xsi="...">

<!-- GET /V1/vendor/entities/:id (token auth) -->
<route url="/V1/vendor/entities/:id" method="GET">
<service
class="Vendor\Module\Api\MyEntityRepositoryInterface"
method="getById"
/>
<resources>
<resource ref="self"/> <!-- customer token -->
</resources>
</route>

<!-- POST /V1/vendor/entities (admin token) -->
<route url="/V1/vendor/entities" method="POST">
<service
class="Vendor\Module\Api\MyEntityRepositoryInterface"
method="save"
/>
<resources>
<resource ref="Vendor_Module::entities_manage"/>
</resources>
</route>

</routes>
type Query {
vendorEntity(id: Int! @doc(description: "Entity ID")): VendorEntity
@resolver(class: "Vendor\\Module\\Model\\Resolver\\EntityResolver")
@doc(description: "Fetch a custom entity by ID")
@cache(cacheIdentity: "Vendor\\Module\\Model\\Resolver\\EntityIdentity")
}

type VendorEntity {
entity_id: Int @doc(description: "Entity ID")
name: String @doc(description: "Entity name")
description: String @doc(description: "Full description")
is_active: Boolean @doc(description: "Active status")
created_at: String @doc(description: "Creation timestamp")
}
<?php
namespace Vendor\Module\Model\Resolver;

use Magento\Framework\GraphQl\Query\ResolverInterface;

class EntityResolver implements ResolverInterface
{
public function __construct(
private readonly \Vendor\Module\Api\MyEntityRepositoryInterface $repo
) {}

public function resolve($field, $context, $info, array $value = null, array $args = null): array
{
$entity = $this->repo->getById((int)$args['id']);
return [
'entity_id' => $entity->getId(),
'name' => $entity->getName(),
'description' => $entity->getDescription(),
'is_active' => (bool)$entity->getIsActive(),
'created_at' => $entity->getCreatedAt(),
];
}
}

Adobe MCP integration

Call Adobe Experience Cloud services from your module’s service layer using OAuth 2.0 IMS tokens. Each Adobe MCP exposes tools your PHP code invokes via HTTP — no separate SDK needed.

Get Sathish Sivananinthaperumal’s stories in your inbox

Join Medium for free to get updates from this writer.

Integration flow

Press enter or click to view image in full size
Integration Details
<?php
namespace Vendor\Module\Service;

use Magento\Framework\HTTP\Client\Curl;
use Magento\Framework\App\CacheInterface;

class AjoTriggerService
{
private const AJO_MCP_URL = 'https://ajo-mcp.adobe.io/mcp';
private const IMS_TOKEN_URL = 'https://ims-na1.adobelogin.com/ims/token/v3';
private const TOKEN_CACHE_KEY = 'vendor_module_ims_token';

public function __construct(
private readonly Curl $curl,
private readonly CacheInterface $cache,
private readonly \Magento\Framework\App\Config\ScopeConfigInterface $config
) {}

public function triggerJourney(string $eventName, array $data): void
{
$token = $this->getToken();

$this->curl->addHeader('Authorization', 'Bearer ' . $token);
$this->curl->addHeader('Content-Type', 'application/json');
$this->curl->post(self::AJO_MCP_URL, json_encode([
'tool' => 'trigger_journey',
'input' => ['event' => $eventName, 'payload' => $data],
]));
}

private function getToken(): string
{
if ($cached = $this->cache->load(self::TOKEN_CACHE_KEY)) {
return $cached;
}
$this->curl->post(self::IMS_TOKEN_URL, [
'grant_type' => 'client_credentials',
'client_id' => $this->config->getValue('vendor_module/ims/client_id'),
'client_secret' => $this->config->getValue('vendor_module/ims/client_secret'),
'scope' => 'AdobeID,openid,ajo_api',
]);
$resp = json_decode($this->curl->getBody(), true);
$token = $resp['access_token'];
$this->cache->save($token, self::TOKEN_CACHE_KEY, [], (int)$resp['expires_in'] - 60);
return $token;
}
}

4. Test

Phase 4 has five layers: Unit Tests, Integration Tests, Functional Tests (MFTF), Static Analysis, and the CI/CD test pipeline that ties them all together.

Press enter or click to view image in full size

Unit tests — PHPUnit

Test a single class in complete isolation. Every dependency is mocked. No database, no filesystem, no HTTP — just pure PHP logic. These run in milliseconds and are your first safety net.

Press enter or click to view image in full size

Run vendor/bin/phpunit for unit tests and vendor/bin/phpunit -c dev/tests/integration for integration. Use vendor/bin/phpcs --standard=Magento2 for coding standards. Write MFTF (Magento Functional Testing Framework) tests for end-to-end flows.

Static analysis — PHPCS, PHPStan & more

Catch bugs, code style violations, and type errors without running a single request. Runs in seconds. Mandatory before any merge. Adobe Commerce Marketplace submission requires zero PHPCS errors.

Press enter or click to view image in full size
# Check your module (zero warnings target)
vendor/bin/phpcs \
--standard=Magento2 \
--extensions=php,phtml \
app/code/Vendor/Module/

# Fix auto-fixable issues
vendor/bin/phpcbf \
--standard=Magento2 \
app/code/Vendor/Module/

# Show full details per violation
vendor/bin/phpcs --standard=Magento2 -s app/code/Vendor/Module/

5. Deploy

Run setup:upgrade, setup:di:compile, setup:static-content:deploy. Use CI/CD pipelines (GitHub Actions, Bitbucket). Validate on staging with Adobe Commerce Cloud environments.

The deploy sequence on Adobe Commerce Cloud: php bin/magento setup:upgrade → setup:di:compile → setup:static-content:deploy. Gate everything behind a CI/CD pipeline (GitHub Actions or Bitbucket Pipelines) with automated test runs before staging promotion.

Phase 5 has six areas: pre-deploy checklist, the deploy command sequence, Adobe Commerce Cloud pipeline, environment configuration, zero-downtime strategies, and rollback procedures.

Press enter or click to view image in full size

Pre-deploy checklist

Every item below must be green before a deploy is triggered. Skipping any one of these is the leading cause of production incidents on Commerce Cloud.

Press enter or click to view image in full size
Press enter or click to view image in full size

Deploy command sequence

This is the exact order of CLI commands for deploying a module to a Commerce instance. Order matters critically — running di:compile before setup:upgrade causes DI graph errors against an outdated schema.

##═══════════════════════════════════════════════
## STEP 1 — Enable maintenance mode
##═══════════════════════════════════════════════
bin/magento maintenance:enable
# Visitors see the maintenance page. Admin still accessible.

##═══════════════════════════════════════════════
## STEP 2 — Enable your module (first deploy only)
##═══════════════════════════════════════════════
bin/magento module:enable Vendor_ModuleName
# Adds entry to app/etc/config.php

##═══════════════════════════════════════════════
## STEP 3 — Apply DB schema + data patches
##═══════════════════════════════════════════════
bin/magento setup:upgrade
# Creates/alters tables from db_schema.xml
# Runs pending Data patches from Setup/Patch/Data/
# Updates module version in setup_module table

##═══════════════════════════════════════════════
## STEP 4 — Compile DI (generates factories/proxies)
##═══════════════════════════════════════════════
bin/magento setup:di:compile
# Generates var/generation/ classes
# Validates all DI wiring — catches missing interfaces early
# MUST run after setup:upgrade, never before

##═══════════════════════════════════════════════
## STEP 5 — Deploy static assets
##═══════════════════════════════════════════════
bin/magento setup:static-content:deploy \
en_US en_GB \
--area frontend \
--area adminhtml \
--jobs 4
# Compiles Less → CSS, copies JS/images to pub/static/
# --jobs 4 parallelises across 4 workers (use CPU count)
# Only deploy locales your store actually uses

##═══════════════════════════════════════════════
## STEP 6 — Generate db_schema whitelist
##═══════════════════════════════════════════════
bin/magento setup:db-declaration:generate-whitelist \
--module-name=Vendor_ModuleName
# Run once after first deploy, commit the JSON file
# Required before any future column drops will work

##═══════════════════════════════════════════════
## STEP 7 — Flush all caches
##═══════════════════════════════════════════════
bin/magento cache:flush
# Clears config, layout, block_html, collections,
# reflection, db_ddl, compiled_config, full_page

##═══════════════════════════════════════════════
## STEP 8 — Warm full-page cache (optional but recommended)
##═══════════════════════════════════════════════
bin/magento cache:warm --varnish-tag-prefix=mcm_

##═══════════════════════════════════════════════
## STEP 9 — Disable maintenance mode
##═══════════════════════════════════════════════
bin/magento maintenance:disable
bin/magento module:status Vendor_ModuleName # verify enabled

Adobe Commerce Cloud pipeline

Commerce Cloud runs a three-phase automated pipeline on every git push: Build → Deploy → Post-deploy. You never run bin/magento commands manually on production — the pipeline does it for you via .magento.env.yaml and .magento.app.yaml.

Press enter or click to view image in full size

Environment configuration

Commerce has a four-layer config hierarchy. Each layer overrides the previous. Understanding this prevents “why does my config value not apply?” issues.

Press enter or click to view image in full size

Zero-downtime deploy strategies

The ~3-minute maintenance window on Commerce Cloud is the smallest window possible with a standard deploy. These strategies reduce it further or eliminate it for non-schema-changing deployments.

Rollback procedures

Two rollback paths: a fast code rollback (git revert + redeploy, ~10 min) and a full snapshot restore (DB + code, ~20 min).

6. Monitor & Iterate

Track performance with New Relic, Adobe Analytics, and Customer Journey Analytics. Use Adobe Real-Time CDP for behavior signals. Feed insights back into the next sprint.

Post-deploy, use New Relic for APM and error tracking, Adobe Analytics + CJA for conversion funnels, and Real-Time CDP for audience signals. These insights feed back directly into Phase 1 for the next feature iteration.

Press enter or click to view image in full size

New Relic APM — performance & error tracking

Commerce Cloud includes New Relic APM pre-configured. It instruments every PHP request automatically. Your job is to add custom instrumentation for module-specific operations and set up meaningful alerts.

Press enter or click to view image in full size

--

Sathish Sivananinthaperumal
Sathish Sivananinthaperumal

Written by Sathish Sivananinthaperumal

Adobe commerce certified master, Technical Architect at Adobe, Adobe Campaign Certified Developer Expert