Skip to content

Improve agent context: restructure skills, slim AGENTS.md#1292

Open
noisysocks wants to merge 4 commits intomainfrom
randerson/context-engineering
Open

Improve agent context: restructure skills, slim AGENTS.md#1292
noisysocks wants to merge 4 commits intomainfrom
randerson/context-engineering

Conversation

@noisysocks
Copy link
Copy Markdown
Contributor

@noisysocks noisysocks commented Apr 16, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/276630244458377/task/1214072784815658

Description:

Improves context engineering for AI agents creating autoconsent CMP rules. Changes were validated through a 7-run benchmark (details in the Asana task).

  • Cut AGENTS.md from 357 to ~90 lines — removed PR review checklists, CI pipeline details, flaky test debugging, verbose rule syntax. Kept project layout, commands, code style. Added CMP-vs-site-specific guidance and CSS module hash warnings.
  • Created cmp-rule skill (275 lines) — full workflow for creating/fixing rules: diagnosis, CMP identification, rule type decision tree, selector strategy with anti-patterns, iframe/shadow DOM, cosmetic breakage fixes, eval snippets, example rules, verification checklist.
  • Created publicwww-search skill (57 lines) — source code search via PublicWWW API for identifying whether a popup is from a widely-used CMP or site-specific.
  • Created verify-pr skill (71 lines) — PR verification checklist covering local CI, rule review, Jenkins E2E, browser testing.
  • Added YAML frontmatter to all skills for agent discoverability.
  • Set up .claude/skills/ pointers to .agents/skills/ for Claude Code compatibility.

Steps to test this PR:

  • npm run lint passes
  • npm run rule-syntax-check passes
  • Skills exist at .agents/skills/{cmp-rule,publicwww-search,verify-pr}/SKILL.md
  • .claude/skills/ pointers resolve correctly
  • AGENTS.md reads coherently as project context and points to cmp-rule skill for rule work

noisysocks and others added 4 commits April 15, 2026 21:03
Consolidated create/fix skills into single cmp-rule skill, added verify-pr
skill, trimmed AGENTS.md to focused project context, added YAML frontmatter
for agent discovery.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ross-references

- Expand step 2b with structured CMP investigation techniques (DOM inspection,
  JS source analysis, cross-site prevalence)
- Add iframes and shadow DOM section to reference.md (chained selectors,
  limitations, cross-origin workaround)
- Add cross-reference links between SKILL.md and reference.md sections
- Simplify AGENTS.md cookie popup section to point to cmp-rule skill
- Improve skill description with explicit trigger conditions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses recurring agent failures: lint/test:lib in verification
checklist, prehide/visible interaction warning, cross-origin iframe
guidance, cosmetic rule heuristic, engine modification guard, and
runContext empty-string constraint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Agents weren't reading the separate files. Merged selector strategy,
cosmetic breakage fixes, iframe/shadow DOM patterns, diagnosis table,
and example rules directly into the workflow steps where they're needed.
Removed dangling cross-file references from AGENTS.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants