Skip to main content

browser-capability

Author or review fail-closed Threads browser capabilities, Playwright recognition contracts, and staged mutations. Not for official Meta API integration.

소스 정보

저장소
pumni/thread
최근 소스 활동
2026년 10월 5일 02:27
감지된 SKILL.md 언어
영어
스타
0
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
browser-capability
description
Author or review fail-closed Threads browser capabilities, Playwright recognition contracts, and staged mutations. Not for official Meta API integration.
# Browser Capability Skill ## Purpose Guide the development and review of Worker browser automation capabilities, ensuring strict fail-closed DOM recognition, human intervention boundaries, and staged mutation safeguards without copying capability-specific selector contracts into generic procedure. ## Trigger Conditions Use this skill when a task involves: - Implementing, editing, or testing browser capabilities in `src/threads_platform/workers/browser.py`. - Defining or refining synthetic DOM recognition contracts for Threads web UI interactions. - Adding or modifying Playwright locator strategies, bounded ancestor traversals, or response recognition. - Handling browser session challenges, login state detection, or uncertain outcomes. ## Non-Trigger Conditions Do NOT use this skill for: - Official Meta Threads Graph API client integration (use `threads-api-contract`). - Worker WebSocket protocol framing or lease renewal (use `worker-protocol`). - Tauri desktop shell, supervisor, or React Console development (use `apps/desktop/AGENTS.md`). ## Canonical References Inspect these sources before modifying browser capabilities: - `docs/adr/0005-browser-capability-boundary.md`. - `docs/adr/0006-playwright-browser-adapter.md`. - `docs/WORKER_BROWSER_CAPABILITY_PACK_V1.md`. - `src/threads_platform/workers/browser.py`. - Canonical tests: `tests/unit/test_browser_adapter.py`, `tests/unit/test_browser_capabilities.py`, or the unit test matching the specific capability (e.g. `tests/unit/test_feed_browse.py`, `test_thread_open.py`, `test_profile_open.py`, `test_media_local_upload.py`). ## Invariants & Design Rules 1. **Explicit & Versioned Capabilities:** Every browser action corresponds to an explicit, versioned capability approved in architecture. 2. **Fail-Closed Recognition:** Never guess selectors or use unstable generated CSS classes. Ambiguous elements, redirects, unexpected DOM layouts, or missing target associations must fail closed. 3. **Strict Human Intervention Boundary:** Captchas, 2FA, session challenges, login prompts, and account checkpoints require human operator intervention. Automated evasion, stealth plugins, and fingerprint spoofing are strictly prohibited. 4. **Contract-Driven Mutation Safeguards:** Any browser mutation must strictly adhere to that specific capability's declared preconditions, irreversible boundary, evidence-of-success contract, lease behavior, and reconciliation policy. Ambiguous post-boundary outcomes must trigger reconciliation or operator intervention rather than blind retries. 5. **Lease Loss Discipline:** Lease expiration or heartbeat loss immediately blocks new irreversible browser actions. ## Step-by-Step Procedure 1. **Inspect canonical contract:** Review the target capability specification in `docs/WORKER_BROWSER_CAPABILITY_PACK_V1.md` and inspect existing implementation in `src/threads_platform/workers/browser.py`. 2. **Consult matching tests:** Examine existing contract tests for the capability (e.g. `tests/unit/test_browser_capabilities.py` or capability-specific unit tests). 3. **Implement fail-closed behavior:** Ensure unmatched, ambiguous, redirected, or challenged states fail closed using the exact typed outcome or human intervention specified by the capability's contract (rather than hard-coding a generic error code). 4. **Verify locally:** ```bash uv run pytest tests/unit/test_browser_adapter.py tests/unit/test_browser_capabilities.py ```
GitHub에서 보기