Section-based personalization for AEM Edge Delivery Services (DA) pages: Section Metadata rows let rules (geo, device, visitor, URL/UTM param, page state, custom audiences), a decision engine (v1 API, OF1), an A/B split or Adobe Target (inline or popup) pick the EDS fragment a section shows, with the authored content as default. Consent first, measurement events per decision, a client runtime plus an optional Cloudflare edge worker, a simulator and Playwright checks.
88%
Does it follow best practices?
Impact
83%
0.83x1 of 3 eval scenarios. Add 2 more for a full score.
Low
Low-risk findings worth noting
/*
* The runtime is copied into sites that lint with airbnb-base (the
* boilerplate's `npm run lint`). This catches the rules the runtime has
* tripped before; the acceptance run lints a real site with the full config.
*/
import assert from 'node:assert/strict';
import { readdirSync, readFileSync } from 'node:fs';
import { join, relative } from 'node:path';
import { describe, it } from 'node:test';
import { RUNTIME_DIR } from '../lib.mjs';
const files = readdirSync(RUNTIME_DIR, { recursive: true })
.filter((name) => String(name).endsWith('.js'))
.map((name) => join(RUNTIME_DIR, String(name)));
// airbnb max-len: 100, lines with strings, template literals, URLs or
// regular expressions exempt.
const exempt = (line) => /['"`]|:\/\/|\/[^/*\s].*\/[dgimsuy]*[.,;)]/.test(line);
describe('runtime style', () => {
it('finds the runtime files', () => assert.ok(files.length > 10));
it('keeps lines within 100 characters', () => {
const long = files.flatMap((file) => readFileSync(file, 'utf8').split('\n')
.map((line, index) => [line, index])
.filter(([line]) => line.length > 100 && !exempt(line))
.map(([line, index]) => `${relative(RUNTIME_DIR, file)}:${index + 1} (${line.length})`));
assert.deepEqual(long, []);
});
it('uses no for...of loops (airbnb no-restricted-syntax)', () => {
const loops = files.flatMap((file) => readFileSync(file, 'utf8').split('\n')
.map((line, index) => [line, index])
.filter(([line]) => /\bfor\s*\((const|let|var)\s+[^;]*\s(of|in)\s/.test(line))
.map(([, index]) => `${relative(RUNTIME_DIR, file)}:${index + 1}`));
assert.deepEqual(loops, []);
});
});.tessl-plugin
skills
personalize
assets
reference
scripts
test
fixtures
browser
contract
examples
decision-feedback
decision-request
decision-response
measurement-event
invalid
section
site-config
site
content
scripts
personalization