Skip to content

feat(author): require network-first strategy evidence#1809

Merged
jackwener merged 1 commit into
mainfrom
codex/network-first-authoring
Jun 1, 2026
Merged

feat(author): require network-first strategy evidence#1809
jackwener merged 1 commit into
mainfrom
codex/network-first-authoring

Conversation

@jackwener
Copy link
Copy Markdown
Owner

@jackwener jackwener commented Jun 1, 2026

Summary

  • add a mandatory contract-first strategy note to opencli-adapter-author before writing adapter code
  • define six strategy levels: PUBLIC_API, COOKIE_API, UI_SELECTOR, DOM_STATE, PAGE_FETCH, INTERCEPT
  • frame the decision around source contract strength, not "API > DOM": PUBLIC/COOKIE APIs are preferred, UI/DOM can be valid when semantically stable, PAGE_FETCH/INTERCEPT require explicit high-maintenance justification
  • add browser analyze api_candidates with real_data_score/verdict/reasons/sample_paths so agents do not treat raw XHR count as API evidence
  • make Pattern A require real-data-like captured responses; telemetry-only JSON now falls back to Pattern C guidance

Validation

  • npx vitest run src/browser/analyze.test.ts --project unit
  • npx vitest run src/cli.test.ts --project unit -t "browser analyze"
  • npm run typecheck
  • npm run docs:build
  • npm run build
  • git diff --check

Note: full src/cli.test.ts has unrelated local failures from this machine's existing OpenCLI profile contextId being injected into browserConnect expectations; the targeted browser analyze tests pass.

@jackwener jackwener force-pushed the codex/network-first-authoring branch from 348877b to e591f70 Compare June 1, 2026 05:59
@jackwener jackwener merged commit 55d9190 into main Jun 1, 2026
11 checks passed
@jackwener jackwener deleted the codex/network-first-authoring branch June 1, 2026 06:03
jackwener added a commit that referenced this pull request Jun 1, 2026
…t ladder (#1810)

Companion deep reference for the SKILL.md strategy gate (#1809):

- New `references/strategy-selection.md` with contract-based ladder model,
  empirical fixes/adapter-year data (837 adapters / 30-day window), Pattern A
  judgment rules from `api_candidates` verdicts, and reference cases
  (booking #1680, Twitter GraphQL, xhs signed URL, weread-official).
- Cross-link from SKILL.md inline strategy gate to the deep reference, plus
  one-line empirical hook ("PAGE_FETCH/INTERCEPT 7-8x PUBLIC_API fix rate").
- coverage-matrix.md: Strategy row renamed to 6-enum (PUBLIC_API / COOKIE_API
  / UI_SELECTOR / DOM_STATE / PAGE_FETCH / INTERCEPT) with fixes/adapter-year
  on each entry.
- site-recon.md: Pattern A note that hit alone is not a `PAGE_FETCH` signal —
  must check `api_candidates` verdicts (booking #1680 reference).
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.

1 participant