Cookbook: Scaffolding, Developing, and Deploying Governed Enterprise Applications with DevEx Pack, CLI, and Vibe
This guide walks through an end-to-end journey in an enterprise environment: from AEP blueprint discovery → CLI scaffolding → Vibe agentic pair programming → 5-layer test pyramid validation → AEP production release & GitOps deployment.
1. Architectural Mental Model: Three-Layer Triad
In modern enterprise application engineering, systems are not written from raw unconstrained templates. Instead, applications are composed of three structured layers:
┌────────────────────────────────────────────────────────────────────────┐
│ [Layer 1] 5 Standard DevEx Packs (Technology stack, SDKs & Sandbox) │
│ · aix-governed-admin-pack (Governed CRUD) · aix-agentic-workbench-pack│
│ · aix-lakehouse-dataproduct-pack · aix-feishu-copilot-pack │
│ · aix-autonomous-pipeline-pack │
└───────────────────────────────────┬────────────────────────────────────┘
│ Binds to
┌───────────────────────────────────▼────────────────────────────────────┐
│ [Layer 2] 5 Generic UI Shell Archetypes (Interaction flows & layout) │
│ · admin-datatable (Admin Tables) · split-workbench (Dual-pane) │
│ · conversational-chat (Copilot) · metrics-dashboard (KPI Dashboard) │
│ · feishu-card (Interactive Card) │
└───────────────────────────────────┬────────────────────────────────────┘
│ Business Context Injection
┌───────────────────────────────────▼────────────────────────────────────┐
│ [Layer 3] Enterprise Business Instances │
│ • Cross-Border Channel Commission Rules Admin (with Diff Auditing) │
│ • Amazon PPC Ad ACOS Optimizer Copilot (with Circuit Breaker) │
│ • Ocean Demurrage Triage Workbench (with Last Free Day Alerts) │
└────────────────────────────────────────────────────────────────────────┘2. Step 1: Discovering Foundation Packs & Blueprints
Check all available enterprise packs and certified blueprints via the CLI:
# 1. View 5 standard generic DevEx Packs
aix aep packsOutput:
📦 Registered DevEx Packs (5 Enterprise Standards):
• aix-governed-admin-pack (v1.0.0)
Name: Governed Enterprise Admin & CRUD DevEx Pack | Connector: aix_admin
Capabilities: admin-crud-datatable, config-dictionary-desk, audit-trail-recorder
Description: Enterprise-grade governed CRUD and admin suites with built-in audit diff snapshots.
• aix-agentic-workbench-pack (v1.0.0)
Name: Governed Agentic Workbench DevEx Pack | Connector: aix_agent
Capabilities: agentic-split-workbench, conversational-copilot, mcp-tool-integrator
Description: Human-in-the-loop AI workbench and conversational copilots.
...# 2. View available scenario templates
aix aep templates3. Step 2: Scaffolding Projects via CLI
We demonstrate two core enterprise application archetypes:
Scenario A: Governed Admin Application (CRUD + Diff Audit Trail)
Business Context: Operations teams maintain commission ratios and minimum gross margin guardrails across Amazon, TikTok Shop, and Walmart. Every change requires immutable before/after diff snapshots.
aix aep init my-channel-admin \
--template tpl-sn-channel-rules-admin \
--pack aix-governed-admin-pack \
--project proj-commercial-tower \
--dir ./my-channel-adminOutput:
✨ [AEP] Successfully initialized governed application project!
• App ID: app-sn-channel-rules-admin
• Directory: ./my-channel-admin
• DevEx Pack: aix-governed-admin-pack
• Blueprint: tpl-sn-channel-rules-admin
• Archetype: Governed Admin CRUD (Immutable Diff Audit)Scenario B: Governed Agentic Copilot (AI + Sandbox + Evidence)
Business Context: Ad managers require an AI assistant monitoring Amazon PPC campaign ACOS. When ACOS degrades beyond 25%, it safely throttles bids and records signed structured evidence.
aix aep init my-ad-optimizer \
--template tpl-sn-amazon-ad-optimizer \
--pack aix-agentic-workbench-pack \
--project proj-marketing-growth \
--dir ./my-ad-optimizer4. Step 3: Exploring Generated Project Structure
Inspect the generated project directory:
cd my-channel-admin
tree ..
├── aep-app.yaml # AEP governed application contract declaration
├── pyproject.toml # Dependencies and test configuration
├── src/
│ ├── admin.py # GovernedRecordStore: CRUD logic with Before/After Diff snapshots
│ └── app.py # GovernedAdminApp: Tenant isolation, RBAC checks & mutation gates
└── tests/
├── test_admin.py # Business and safety unit tests
└── test_cdd_contracts.py # CDD contract compliance tests1. aep-app.yaml Contract Manifest
schema_version: aep.governed-application/v1
id: app-sn-channel-rules-admin
name: Cross-Border Channel Commission & Pricing Rules Admin Desk
organization_id: org-production
project_id: proj-commercial-tower
template_id: tpl-sn-channel-rules-admin
pack_id: aix-governed-admin-pack
lifecycle: draft
technology_stack: aix-admin
governance:
audit_trail: immutable_diff
mutation_approval_gate: true
two_person_rule: true2. Diff Audit Implementation in src/admin.py
def update_record(self, record_id: str, patch: dict, actor: str) -> dict:
old_data = dict(self._records[record_id]["data"])
new_data = dict(old_data)
new_data.update(patch)
audit_entry = {
"action": "UPDATE",
"record_id": record_id,
"actor": actor,
"diff": {"before": old_data, "after": new_data}, # Explicit field-level diff
"timestamp": time.time(),
"verified": True,
}
self._audit_log.append(audit_entry)
return self._records[record_id]5. Step 4: Local Test Pyramid Verification (Pytest)
Run tests locally to verify adherence to all AEP platform security and business contracts:
pytest -vOutput:
tests/test_admin.py::test_create_record_generates_diff_audit PASSED [ 25%]
tests/test_admin.py::test_update_record_tracks_diff PASSED [ 50%]
tests/test_admin.py::test_invalid_record_rejected PASSED [ 75%]
tests/test_admin.py::test_governed_admin_app_tenant_isolation PASSED [100%]
tests/test_cdd_contracts.py::test_aep_application_manifest_conformance PASSED
============================== 5 passed in 0.08s ===============================All business validation, audit snapshot generation, and aep-app.yaml compliance tests pass 100%.
6. Step 5: AI-SDLC Pair Programming with Vibe
Developers can summon specialized engineering agents via vibe to extend features under contract guardrails:
# Summon an engineering agent to connect to production schemas and expand test suites
aix vibe run "Integrate real channel commission schema and add alert tests for >30% fee rates" --unit my-channel-adminVibe follows CDD contract specifications, practicing Test-Driven Development (TDD) to implement logic and automatically run regression test suites.
7. Step 6: Submitting to AEP Governance & Production Deployment
Once local verification completes, submit metadata and test evidence to the AEP control plane:
# Submit AEP application release application
aix aep release apply --app-id app-sn-channel-rules-admin
# Inspect release status and cryptographic evidence signatures
aix aep release status --app-id app-sn-channel-rules-adminFollowing approval, the AEP GitOps controller deploys workloads directly to the enterprise Kubernetes cluster and makes them accessible in the enterprise portal.