Fix: verify touch gestures in adapt, audit, and harden (#805) (#807)

* Fix: verify touch gestures in adapt, audit, and harden (#805)

The verification sections of adapt.md, audit.md, and harden.md listed
environments and layout properties but never had the agent exercise a
control's primary gesture, so an emulated viewport plus screenshots
could pass as touch testing. adapt now exercises the primary gesture
and the scroll-across trade and reports what produced the evidence,
audit checks broken touch interaction with code-level tells, harden
covers interrupted gestures and recovery, and a reference-contract
test pins the three sections.

Prepared with AI assistance (Claude Code), directed by @abdulwahabone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

* Pin the scroll, exercise, and cleanup sentences in the reference test (#805)

Greptile flagged that the contract test pinned the new labels but not
adapt's scroll-across trade, audit's instruction to exercise the
gesture, or harden's drag-state and capture cleanup.

Prepared with AI assistance (Claude Code), directed by @abdulwahabone.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Abdul Wahab
2026-09-10 13:45:37 -07:00
committed by GitHub
co-authored by Claude Fable 5.1
parent 7a7579858c
commit 0c09f4c7e2
4 changed files with 39 additions and 1 deletions
+22
View File
@@ -67,4 +67,26 @@ describe('skill reference authoring contracts', () => {
assert.match(polish, /if a newer critique landed meanwhile, its backlog stays live/);
assert.doesNotMatch(polish, /git status|git log/);
});
it('keeps touch-gesture verification in the adapt, audit, and harden references', () => {
const adapt = readFileSync(join(ROOT, 'skill/reference/adapt.md'), 'utf-8').replace(/\r\n?/g, '\n');
const audit = readFileSync(join(ROOT, 'skill/reference/audit.md'), 'utf-8').replace(/\r\n?/g, '\n');
const harden = readFileSync(join(ROOT, 'skill/reference/harden.md'), 'utf-8').replace(/\r\n?/g, '\n');
const verifyAdaptations = adapt.match(/## Verify Adaptations\n([\s\S]*?)\n## /)?.[1] ?? '';
const responsive = audit.match(/### 4\. Responsive Design\n([\s\S]*?)\n### 5\./)?.[1] ?? '';
const edgeCases = harden.match(/### Edge Cases & Boundary Conditions\n([\s\S]*?)\n### /)?.[1] ?? '';
const verifyHardening = harden.match(/## Verify Hardening\n([\s\S]*?)(?:\n## |$)/)?.[1] ?? '';
assert.match(verifyAdaptations, /\*\*Primary gesture\*\*/);
assert.match(verifyAdaptations, /produced the evidence/);
assert.match(verifyAdaptations, /verify layout, never a gesture/);
assert.match(verifyAdaptations, /reported gap, not a blocker/);
assert.match(verifyAdaptations, /\*\*Scroll across it\*\*[\s\S]*without activating it/);
assert.match(responsive, /\*\*Broken touch interaction\*\*/);
assert.match(responsive, /what stayed untested/);
assert.match(responsive, /Exercise the gesture when a browser tool can synthesize touch/);
assert.match(edgeCases, /\*\*Interrupted gestures\*\*[\s\S]*works without a reload/);
assert.match(edgeCases, /clear the dragging state and release capture/);
assert.match(verifyHardening, /\*\*Interrupted gestures\*\*/);
});
});