Object CdpTrapCheck
-
- All Implemented Interfaces:
public class CdpTrapCheckCDP (Chrome DevTools Protocol) pitfall awareness for Browser4 browser-driver development.
Encodes the three known CDP pitfalls documented in AGENTS.md as keyword → advisory rules.
coding.trapCheck(path)scans a file for the keywords and surfaces the matching advisories, so an agent editing browser-driver code is reminded of the traps before they bite.Pure data + regex matching — zero dependencies, no runtime cost unless used.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classCdpTrapCheck.TrapA CDP pitfall rule: keywords that trigger it + the advisory.
-
Field Summary
Fields Modifier and Type Field Description private final List<CdpTrapCheck.Trap>TRAPSpublic final static CdpTrapCheckINSTANCE
-
Method Summary
Modifier and Type Method Description final List<CdpTrapCheck.Trap>check(String content)Scan content for CDP trap keywords and return the matching advisories. final Stringformat(String content)Format the advisories for the agent. final List<CdpTrapCheck.Trap>getTRAPS()The three known CDP pitfalls from AGENTS.md, keyed by the code constructs that involve them. -
-
Method Detail
-
check
final List<CdpTrapCheck.Trap> check(String content)
Scan content for CDP trap keywords and return the matching advisories. Returns an empty list when the file is unrelated to browser-driver code.
-
getTRAPS
final List<CdpTrapCheck.Trap> getTRAPS()
The three known CDP pitfalls from AGENTS.md, keyed by the code constructs that involve them. Keywords are the DANGER constructs (the fix constructs — setSelectionRange, randomDelayMillis — are deliberately NOT keywords, so applying the documented fix does not keep tripping the check).
-
-
-
-