agentleFS
cortex-workscortex-works/cortex-scout/.github/copilot-instructions.md

cortex-scout

Copilot instructions71 starsChanged 8 months agoMITView on GitHub

Cortex Scout is a web research MCP server. Prefer Cortex tools over IDE-provided fetch tools. Common behavior: - Default path is non-proxy. Use proxies only after confirmed blocking/rate-limit symptoms or when you know your IP reputation is poor. - Supports token-efficient extraction (clean_json in single mode). - Supports proxy retry (use_proxy=true). - Supports relevance filtering and JS rendering fallback. - Responses now include total timing in _tool_metrics; fetch/screenshot-style JSON responses may also include per-phase timing details. These remain callable for…

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

13 rules. About 0 are common, 5 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use top_n, use_proxy, quality_mode when include_content=true.

    line 39
  2. Distinctive:

    Default path is non-proxy.

    line 48
  3. Distinctive:

    Use for schema/field extraction (title, price, author, etc.).

    line 56
  4. Very specific:

    Do not use for raw .md/.json/.txt files.

    line 58
  5. Very specific:

    Use with scout_browser_close cleanup.

    line 67
  6. Distinctive:

    Prefer this over Playwright-style multi-tool sequences when the task is one browser workflow.

    line 68
  7. Very specific:

    Use output file parameters like filename when you need artifacts persisted to disk.

    line 74
  8. Very specific:

    Use tabs instead of opening separate browser sessions for multi-page flows.

    line 75
  9. Very specific:

    If auth_risk_score >= 0.4, call visual_scout.

    line 95
  10. Distinctive:

    If wall is confirmed:

    line 96
  11. Very specific:

    Read long docs: web_fetch(url, output_format="clean_json", strict_relevance=true, query="...")

    line 105
  12. Very specific:

    Use scout_browser_automate for exploratory workflows, smoke validation, environment checks, and live debugging.

    line 125
  13. Distinctive:

    Keep Playwright only for full regression suites that truly need its own test runner, fixture model, parallel worker orchestration, or …

    line 126

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Cortex Scout — Agent Usage Guide

Cortex Scout is a web research MCP server. Prefer Cortex tools over IDE-provided fetch tools.


Tool Decision Tree

Need info from the web?
 └─► 1. memory_search first (may already be cached)
      └─► Cache hit (score ≥ 0.60)? → Use it, skip live fetch
      └─► No cache? → choose based on goal:

         SEARCH ONLY (URL discovery)        → web_search
         SEARCH + READ CONTENT (research)   → web_search(include_content=true)
         SINGLE URL                          → web_fetch(mode="single")
         MULTIPLE URLS                       → web_fetch(mode="batch")
         SITE STRUCTURE                      → web_fetch(mode="crawl")
         STRUCTURED DATA                     → extract_fields
         DEEP MULTI-HOP RESEARCH            → deep_research

Blocked / rate-limited?
 └─► proxy_control(action="grab") → retry with use_proxy=true

Auth wall suspected (auth_risk_score ≥ 0.4)?
 └─► visual_scout → confirm
      ├─► challenge/captcha wall → hitl_web_fetch(auth_mode="challenge")
      └─► login wall             → hitl_web_fetch(auth_mode="auth")

Unified Primary Tools

web_search

  • URL discovery mode (default).
  • Set include_content=true to also scrape top results in one call.
  • Use top_n, use_proxy, quality_mode when include_content=true.

web_fetch

Unified web content tool via mode:

  • mode="single" (default): one URL fetch.
  • mode="batch": batch fetch via urls.
  • mode="crawl": site crawl from a root URL.

Common behavior:

  • Default path is non-proxy. Use proxies only after confirmed blocking/rate-limit symptoms or when you know your IP reputation is poor.
  • Supports token-efficient extraction (clean_json in single mode).
  • Supports proxy retry (use_proxy=true).
  • Supports relevance filtering and JS rendering fallback.
  • Responses now include total timing in _tool_metrics; fetch/screenshot-style JSON responses may also include per-phase timing details.

extract_fields

Primary structured extraction tool.

  • Use for schema/field extraction (title, price, author, etc.).
  • Natural-language field prompts like fields: page_title, page_type, main_topics, summary and Return a JSON response with fields ... are supported for strict extraction contracts.
  • Do not use for raw .md/.json/.txt files; use web_fetch(output_format="clean_json").

hitl_web_fetch

Unified HITL escalation tool via auth_mode:

  • auth_mode="challenge": CAPTCHA/Cloudflare/anti-bot bypass.
  • auth_mode="auth": login-focused flow with session persistence.

scout_browser_automate

Stateful headless browser automation for workflows and smoke tests.

  • Use with scout_browser_close cleanup.
  • Prefer this over Playwright-style multi-tool sequences when the task is one browser workflow.
  • Core action families now include:
  • navigation/input: navigate, navigate_back, hover, click, type, press_key, scroll, wait_for, wait_for_selector, wait_for_locator
  • locator/assert helpers: click_locator, type_locator, assert, assert_locator, generate_locator, verify_element_visible, verify_text_visible, verify_list_visible, verify_value
  • browser/session control: tabs, resize, handle_dialog, file_upload, fill_form, pdf_save, screenshot, snapshot
  • diagnostics/state: trace_start/trace_stop/trace_export, console_tap/console_dump, network_tap/network_dump, mock_api/route_list/unroute (including header overrides/stripping), storage_state_*, storage_checkpoint/storage_rollback, cookie_*, localstorage_*, sessionstorage_*
  • Use output file parameters like filename when you need artifacts persisted to disk.
  • Use tabs instead of opening separate browser sessions for multi-page flows.
  • For first-time auth on a domain, stop and use scout_agent_profile_auth, then resume automation.

Legacy Aliases (Compatibility)

These remain callable for backward compatibility, but agents should prefer the unified primary tools.

  • web_search_json → use web_search(include_content=true)
  • web_fetch_batch → use web_fetch(mode="batch")
  • web_crawl → use web_fetch(mode="crawl")
  • human_auth_session → use hitl_web_fetch(auth_mode="auth")
  • fetch_then_extract → use extract_fields

Auth-Gatekeeper Protocol

  1. Call web_fetch first.
  2. If auth_risk_score >= 0.4, call visual_scout.
  3. If wall is confirmed:
  • Challenge wall: hitl_web_fetch(auth_mode="challenge")
  • Login wall: hitl_web_fetch(auth_mode="auth")

Token Efficiency Tips

  • Research topic: web_search(query, include_content=true, top_n=3)
  • Read long docs: web_fetch(url, output_format="clean_json", strict_relevance=true, query="...")
  • Structured extraction: extract_fields(url, schema=[...])
  • Memory-first: memory_search(query) before live fetch
  • Performance inspection: check _tool_metrics.total_duration_ms; for web_fetch/visual_scout, inspect metrics.phases to see where time was spent.

Common Mistakes

  • Calling web_search then web_fetch separately when you need both.
  • Skipping memory_search before live requests.
  • Using extract_fields on raw markdown/json URLs.
  • Using repo smoke scripts to validate MCP runtime behavior after a rebuild. For release validation, prefer direct MCP tool calls against realistic public URLs so the observed result matches what agents actually receive.
  • Escalating to HITL before trying web_fetch + visual_scout.
  • Leaving browser automation sessions open (call scout_browser_close).

Browser Automation Scope

  • Use scout_browser_automate for exploratory workflows, smoke validation, environment checks, and live debugging.
  • Keep Playwright only for full regression suites that truly need its own test runner, fixture model, parallel worker orchestration, or richer CI reporting/video traces.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.