{"slug": "cursor-vs-copilot-repo-footprint-12-steps-70-min", "title": "Cursor vs Copilot Repo Footprint: 12 Steps, 70 Min", "summary": "A recount of the 2026 Stack Overflow Developer Survey by Stackness puts GitHub Copilot at 61.3% and Cursor at 26.6% of the 11,739 respondents who ticked at least one coding tool, with Claude Code ahead of both at 68.4%. The survey collected 30,903 valid responses from 169 countries between June 23 and August 5, 2026, and Stack Overflow published results on October 6, 2026. The analysis argues these self-reported shares measure respondents rather than repositories, and proposes a public-repo footprint method — counting tool config files via GitHub code search, sampling hits into repositories, stripping bulk-committed templates, and reporting a range — built on standard-library Python 3.12.3 with one GitHub token in about 70 minutes.", "body_md": "Survey ticks and repository files answer different questions. A tick says a developer admits to using Cursor or GitHub Copilot. A committed rules file says someone cared enough to configure the tool for a codebase, in public. In the 2026 Stack Overflow Developer Survey, a recount by [Stackness](https://stackness.dev/blog/stack-overflow-developer-survey-2026-tool-changes-year-over-year) reportedly puts Copilot at 61.3% and Cursor at 26.6% of the 11,739 respondents who ticked at least one coding tool, with Claude Code ahead of both at 68.4%. Those shares say little about how many repositories carry either tool’s setup files, and that second number is what a footprint measures.\n\nA public repo footprint works in four moves. Count marker files per tool through GitHub code search. Sample the hits to turn files into repositories. Strip out accounts that bulk-commit the same template. Then report a range instead of one tidy percentage. The kit runs on standard-library Python 3.12.3, needs a single GitHub token, and takes about 70 minutes to build and test.\n\nSurvey work still matters, and the site already covers it from several sides. The [Stack Overflow survey pandas walkthrough](https://shattered.io/cursor-vs-copilot-stack-overflow-survey-pandas-12-steps-2026/) counts tool mentions with explicit denominators, and the [market share audit](https://shattered.io/cursor-vs-github-copilot-market-share-audit-12-steps-2026/) adds seat exports and a pulse survey. A footprint adds a third angle that none of those cover: what developers commit to public code when nobody is asking them anything.\n\nDon't miss new tech stories on Google\n\nAdd Shattered once in the Google app and our stories show up in your news suggestions.\n\n[Add now](https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F)\n\n## What a Repo Footprint Measures in Cursor vs Copilot Comparisons\n\nEvery popular claim about Cursor vs Copilot rests on a unit. A survey counts respondents. A vendor page counts companies, revenue or seats. A footprint counts repositories that contain a tool’s configuration file. None of these is market share in the way a stock analyst would use the phrase, because none of them counts paid, active developers. They are three partial views, and each one fails in a different direction.\n\nStack Overflow’s own 2025 press release said, in its words, [“Cursor was used by 18% of surveyed developers as an AI-enabled IDE.”](https://stackoverflow.co/company/press/archive/stack-overflow-2025-developer-survey) That sentence is careful. It names a share of surveyed developers, not of all developers. The 2026 edition collected 30,903 valid responses from 169 countries between June 23 and August 5, 2026, and Stack Overflow published the results on October 6, 2026. Anyone quoting those percentages inherits the same limit: they describe people who chose to answer.\n\n| Signal | Unit counted | Who is counted | Main bias | Example | \n|---|---|---|---|---|\n| Developer survey | Respondents who tick a tool | Self-selected survey takers | Wording, base size, non-response | Stack Overflow 2026: 30,903 valid responses from 169 countries | \n| Vendor claim | Companies, revenue or seats | Customers the vendor chooses to cite | Undefined denominators | GitHub’s Copilot page says more than 90% of the Fortune 100 use it | \n| Vendor revenue headline | Recurring revenue | Paying accounts | No user count attached | A headline on Cursor’s site says recurring revenue doubled in three months to $2 billion | \n| Seat export | Licences assigned | Your own organization | Assigned is not active | Covered in the Copilot usage audit | \n| Repo footprint | Repos with a config file | Public-code authors who opt in | Public only, template spam, power-user skew | The kit in this tutorial | \n\nThe footprint row has one property the others lack. It records behavior that someone chose to commit, timestamped by the search index, with no questionnaire in the way. It also has blind spots you must accept up front. Private repositories are invisible, which is where most enterprise Copilot seats live. Free-tier and student users may never write a rules file. And a team that uses Cursor daily but never commits a rules file leaves no trace at all. The kit below handles some of that bias and flags the rest. If you want a seat-level view of one organization, the [Copilot usage audit](https://shattered.io/github-copilot-usage-audit-cursor-installs-seats-12-steps-2026/) is the better tool.\n\n## Prerequisites and Versions for the Footprint Kit\n\nThe kit uses only the Python standard library at runtime, so there is no dependency tree to audit. Pytest is the single dev dependency. Every command below was run on Linux with the versions in this table.\n\n| Requirement | Version or detail | Why it matters | \n|---|---|---|\n| Python | 3.12.3 | urllib, json and pathlib cover the whole client | \n| pytest | Not listed | Runs the 10 tests against a local mock server | \n| GitHub account | Free tier works | Code search needs an authenticated request | \n| Personal access token | No scopes for public data | Raises you from a 401 to a working search | \n| jq | Any recent release (optional) | Inspect JSONL snapshots from the shell | \n| Disk | Under 5 MB | Snapshots, samples and a response cache | \n| Time | About 70 minutes | Most of it is writing and testing, not waiting | \n\nOne honest caveat shapes everything that follows. The outputs shown in this tutorial come from the bundled mock server, so every count is synthetic. I did not run the kit against the live index with a real token, and the numbers would not be reproducible anyway because the index changes daily. The code paths are identical in both modes. You switch by setting BASE_URL to https://api.github.com and exporting your own GITHUB_TOKEN.\n\n## Steps 1 to 3: Project, Probes and Token\n\n### Step 1: Create the project and pin the tooling\n\nStart with an empty directory and a virtual environment. Pinning pytest keeps the test output in this tutorial reproducible. The data directory holds three things: the JSONL snapshots you will compare over time, the repository samples, and an HTTP cache that stops a rerun from burning your search quota.\n\n```\nmkdir footprint && cd footprint\npython3 -m venv .venv && . .venv/bin/activate\nprintf 'pytest==9.2.0\\n' > requirements.txt\npip install -r requirements.txt\nmkdir -p tests data/snapshots data/samples\npython3 --version\nPython 3.12.3\n```\n\n### Step 2: Choose marker files for each tool\n\nA probe is a code search query that matches one kind of configuration file. Pick markers that a tool documents and that developers commit on purpose. The five below cover Cursor’s project rules directory, Cursor’s older single-file format, Copilot’s repository instructions, the agent-neutral AGENTS.md file, and Claude Code’s CLAUDE.md. Check each vendor’s documentation for current filenames before you trust a probe, because formats change. The older rules format is one reason the [Cursor rules linter](https://shattered.io/cursor-rules-linter-agents-md-cursorignore-12-steps-2026/) exists.\n\n| Probe id | Tool | Query | Unit | \n|---|---|---|---|\n| cursor_rules_mdc | Cursor | path:.cursor/rules extension:mdc | Many files per repo | \n| cursor_legacy | Cursor | filename:.cursorrules | One file per repo | \n| copilot_instructions | Copilot | filename:copilot-instructions.md path:.github | One file per repo | \n| agents_md | Shared | filename:AGENTS.md | One file per repo | \n| claude_md | Claude Code | filename:CLAUDE.md | One file per repo | \n\nThe Unit column is the first trap. A Cursor project can hold several .mdc files, so a raw file count in this tutorial’s demo data is not a repository count. Copilot’s instructions file is a single path per repo. Comparing the two raw counts would inflate Cursor, which Step 7 corrects. The config also defines two slices: all files, and files over 1,000 bytes.\n\n```\n{\n  \"probes\": [\n    {\"id\": \"cursor_rules_mdc\", \"tool\": \"cursor\", \"unit\": \"many_files_per_repo\",\n     \"q\": \"path:.cursor/rules extension:mdc\"},\n    {\"id\": \"cursor_legacy\", \"tool\": \"cursor\", \"unit\": \"one_file_per_repo\",\n     \"q\": \"filename:.cursorrules\"},\n    {\"id\": \"copilot_instructions\", \"tool\": \"copilot\", \"unit\": \"one_file_per_repo\",\n     \"q\": \"filename:copilot-instructions.md path:.github\"},\n    {\"id\": \"agents_md\", \"tool\": \"shared\", \"unit\": \"one_file_per_repo\",\n     \"q\": \"filename:AGENTS.md\"},\n    {\"id\": \"claude_md\", \"tool\": \"claude_code\", \"unit\": \"one_file_per_repo\",\n     \"q\": \"filename:CLAUDE.md\"}\n  ],\n  \"slices\": [\n    {\"id\": \"all\", \"suffix\": \"\"},\n    {\"id\": \"substantive\", \"suffix\": \" size:>1000\"}\n  ]\n}\n```\n\n### Step 3: Create a token and test the quota\n\nCode search refuses anonymous callers. A plain curl returns HTTP 401 with the message *Requires authentication*, which is exactly what the client will translate into a readable error. Create a fine-grained or classic personal access token with no extra scopes, since you only read public data. Export it, then check the quota before any long run.\n\n```\nexport GITHUB_TOKEN=ghp_your_token_here\ncurl -s -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\n  https://api.github.com/rate_limit | jq '.resources.code_search'\n```\n\nRead the limit and remaining fields your account reports and plan around them. The search quota is tracked apart from the general API quota and resets on a short window. That is why the collector pauses between calls instead of firing all ten queries at once.\n\n## Steps 4 and 5: API Client and Snapshot Collector\n\n### Step 4: Write the API client\n\nThe client does four jobs. It adds the auth header, caches successful responses on disk, retries transient failures, and turns a 401 into an actionable message. Retry logic follows one rule: wait only when waiting can help. A Retry-After header wins, then an exhausted rate-limit header with its reset time, then a 403 whose body mentions a rate limit. Server errors back off exponentially. Anything else, such as a 422, raises immediately because retrying will not change the answer.\n\n```\n\"\"\"Small GitHub REST client: auth header, retries, rate-limit waits, disk cache.\"\"\"\nimport hashlib\nimport json\nimport sys\nimport time\nimport urllib.error\nimport urllib.parse\nimport urllib.request\nfrom pathlib import Path\n\nclass AuthError(RuntimeError):\n    pass\n\nclass GitHub:\n    def __init__(self, base_url=\"https://api.github.com\", token=None,\n                 cache_dir=\"data/cache\", ttl=6 * 3600, sleep=time.sleep,\n                 max_retries=4):\n        self.base_url = base_url.rstrip(\"/\")\n        self.token = token\n        self.cache_dir = Path(cache_dir)\n        self.cache_dir.mkdir(parents=True, exist_ok=True)\n        self.ttl = ttl\n        self.sleep = sleep\n        self.max_retries = max_retries\n        self.requests_made = 0\n\n    def _headers(self):\n        h = {\"Accept\": \"application/vnd.github+json\",\n             \"X-GitHub-Api-Version\": \"2022-11-28\",\n             \"User-Agent\": \"footprint-probe/1.0\"}\n        if self.token:\n            h[\"Authorization\"] = f\"Bearer {self.token}\"\n        return h\n\n    def _cache_file(self, url):\n        return self.cache_dir / (hashlib.sha256(url.encode()).hexdigest()[:24] + \".json\")\n\n    def _read_cache(self, url):\n        f = self._cache_file(url)\n        if f.exists() and time.time() - f.stat().st_mtime < self.ttl:\n            return json.loads(f.read_text())\n        return None\n\n    def _wait_for(self, err, attempt):\n        \"\"\"Seconds to wait before retrying, or None when retrying cannot help.\"\"\"\n        code = err.code\n        if code in (403, 429):\n            retry_after = err.headers.get(\"Retry-After\")\n            if retry_after:\n                return int(retry_after)\n            if err.headers.get(\"X-RateLimit-Remaining\") == \"0\":\n                reset = int(err.headers.get(\"X-RateLimit-Reset\", \"0\"))\n                return max(1, reset - int(time.time()) + 1)\n            body = err.read().decode(errors=\"replace\").lower()\n            if \"rate limit\" in body:\n                return 60 * (attempt + 1)\n            return None\n        if code >= 500:\n            return 2 ** attempt\n        return None\n\n    def get(self, path, **params):\n        url = f\"{self.base_url}{path}?{urllib.parse.urlencode(params)}\"\n        cached = self._read_cache(url)\n        if cached is not None:\n            return cached\n        for attempt in range(self.max_retries + 1):\n            req = urllib.request.Request(url, headers=self._headers())\n            try:\n                with urllib.request.urlopen(req, timeout=30) as resp:\n                    self.requests_made += 1\n                    body = json.load(resp)\n                    self._cache_file(url).write_text(json.dumps(body))\n                    return body\n            except urllib.error.HTTPError as err:\n                if err.code == 401:\n                    raise AuthError(\"401 from GitHub: code search needs a token \"\n                                    \"(set GITHUB_TOKEN)\") from err\n                wait = self._wait_for(err, attempt)\n                if wait is None or attempt == self.max_retries:\n                    raise\n                print(f\"retry {attempt + 1}: HTTP {err.code}, waiting {wait}s\",\n                      file=sys.stderr)\n                self.sleep(wait)\n        raise RuntimeError(\"unreachable\")\n\n    def search_code(self, q, per_page=1, page=1):\n        return self.get(\"/search/code\", q=q, per_page=per_page, page=page)\n```\n\nThe sleep argument is injectable on purpose. Tests pass a list’s append method instead of time.sleep, so the retry path runs in milliseconds and still proves that the client waited the right number of seconds.\n\n### Step 5: Count markers and save a snapshot\n\nThe collector runs every probe in every slice with per_page=1, because only total_count matters at this stage. It stamps all rows from one run with the same UTC timestamp and appends them to a file named after the date. Appending matters. A second run on the same day adds rows instead of overwriting, and the report always reads the newest timestamp.\n\n```\n\"\"\"Count marker files per probe and slice, append one JSONL snapshot.\"\"\"\nimport argparse\nimport json\nimport os\nimport sys\nimport time\nfrom datetime import datetime, timezone\nfrom pathlib import Path\n\nfrom ghclient import AuthError, GitHub\n\ndef run(gh, config, pause):\n    stamp = datetime.now(timezone.utc).isoformat(timespec=\"seconds\")\n    rows = []\n    for probe in config[\"probes\"]:\n        for sl in config[\"slices\"]:\n            q = probe[\"q\"] + sl[\"suffix\"]\n            data = gh.search_code(q, per_page=1)\n            rows.append({\n                \"ts\": stamp, \"probe\": probe[\"id\"], \"tool\": probe[\"tool\"],\n                \"unit\": probe[\"unit\"], \"slice\": sl[\"id\"], \"query\": q,\n                \"total_count\": data[\"total_count\"],\n                \"incomplete\": data.get(\"incomplete_results\", False),\n            })\n            print(f\"{probe['id']:<22}{sl['id']:<12}{data['total_count']:>8}\")\n            time.sleep(pause)\n    return rows\n\ndef main():\n    ap = argparse.ArgumentParser()\n    ap.add_argument(\"--probes\", default=\"probes.json\")\n    ap.add_argument(\"--base-url\", default=\"https://api.github.com\")\n    ap.add_argument(\"--out\", default=\"data/snapshots\")\n    ap.add_argument(\"--pause\", type=float, default=7.0)\n    args = ap.parse_args()\n\n    gh = GitHub(base_url=args.base_url, token=os.environ.get(\"GITHUB_TOKEN\"))\n    config = json.loads(Path(args.probes).read_text())\n    try:\n        rows = run(gh, config, args.pause)\n    except AuthError as e:\n        sys.exit(str(e))\n    out = Path(args.out)\n    out.mkdir(parents=True, exist_ok=True)\n    target = out / f\"{rows[0]['ts'][:10]}.jsonl\"\n    with target.open(\"a\") as fh:\n        for r in rows:\n            fh.write(json.dumps(r) + \"\\n\")\n    print(f\"wrote {len(rows)} rows to {target}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nRun it first without a token to confirm the failure mode, then with one. The demo below targets the mock server in flaky mode, which injects one 403 and one 502 so you can watch the retries.\n\n```\npython3 collect.py --base-url http://127.0.0.1:8765 --pause 0\n401 from GitHub: code search needs a token (set GITHUB_TOKEN)\nGITHUB_TOKEN=ghp_demo python3 collect.py --base-url http://127.0.0.1:8765 --pause 0.1\nretry 1: HTTP 403, waiting 1s\nretry 1: HTTP 502, waiting 1s\ncursor_rules_mdc      all             4800\ncursor_rules_mdc      substantive     3840\ncursor_legacy         all             3200\ncursor_legacy         substantive     2240\ncopilot_instructions  all             2600\ncopilot_instructions  substantive     1170\nagents_md             all             9000\nagents_md             substantive     4500\nclaude_md             all             5100\nclaude_md             substantive     3315\nwrote 10 rows to data/snapshots/2026-11-29.jsonl\n```\n\nAgainst the real API, keep the default seven-second pause. Ten queries then take about 70 seconds, which is cheap insurance against a secondary rate limit.\n\n## Steps 6 and 7: Slices and Repository Sampling\n\n### Step 6: Compare the all-files and substantive slices\n\nRaw counts reward spam. A repository can commit a one-line copilot-instructions.md stub from a template, and the search index counts it the same as a 4 KB file full of project conventions. The substantive slice appends size:>1000 to every query, which keeps only files over 1,000 bytes. The threshold is a judgment call, so store it in the config and change it when you disagree.\n\n```\njq -r 'select(.slice==\"substantive\") | [.probe,.total_count] | @tsv' data/snapshots/2026-11-29.jsonl\ncursor_rules_mdc\t3840\ncursor_legacy\t2240\ncopilot_instructions\t1170\nagents_md\t4500\nclaude_md\t3315\n```\n\nIn the synthetic data, only 45% of Copilot instruction files clear 1,000 bytes, against 70% of legacy Cursor files. That asymmetry is invented for the demo, but real stub-heavy markers behave the same way. Any slice that moves the ratio by this much is a reason to publish both views.\n\n### Step 7: Sample hits to convert files into repositories\n\nCode search returns at most 1,000 results per query, served 100 per page, so a full crawl is impossible. The sampler pages through the first few hundred hits and stores (repository, path) pairs. From those pairs, the analysis derives files per repository for the many-files probes and the owner mix for every probe. The sample is biased toward whatever the index ranks first, so treat the derived ratios as estimates.\n\n```\n\"\"\"Page through the first results of each probe and save (repo, path) pairs.\"\"\"\nimport argparse\nimport json\nimport os\nimport sys\nimport time\nfrom pathlib import Path\n\nfrom ghclient import AuthError, GitHub\n\ndef sample_probe(gh, q, max_pages, per_page=100, pause=7.0):\n    pairs = []\n    for page in range(1, max_pages + 1):\n        data = gh.search_code(q, per_page=per_page, page=page)\n        batch = data.get(\"items\", [])\n        pairs += [[i[\"repository\"][\"full_name\"], i[\"path\"]] for i in batch]\n        if len(batch) < per_page or len(pairs) >= data[\"total_count\"]:\n            break\n        time.sleep(pause)\n    return pairs\n\ndef main():\n    ap = argparse.ArgumentParser()\n    ap.add_argument(\"--probes\", default=\"probes.json\")\n    ap.add_argument(\"--base-url\", default=\"https://api.github.com\")\n    ap.add_argument(\"--out\", default=\"data/samples\")\n    ap.add_argument(\"--max-pages\", type=int, default=3)\n    ap.add_argument(\"--pause\", type=float, default=7.0)\n    args = ap.parse_args()\n\n    gh = GitHub(base_url=args.base_url, token=os.environ.get(\"GITHUB_TOKEN\"))\n    config = json.loads(Path(args.probes).read_text())\n    out = Path(args.out)\n    out.mkdir(parents=True, exist_ok=True)\n    try:\n        for probe in config[\"probes\"]:\n            pairs = sample_probe(gh, probe[\"q\"], args.max_pages, pause=args.pause)\n            (out / f\"{probe['id']}.json\").write_text(json.dumps(pairs))\n            print(f\"{probe['id']:<22}{len(pairs):>6} files sampled\")\n    except AuthError as e:\n        sys.exit(str(e))\n\nif __name__ == \"__main__\":\n    main()\nGITHUB_TOKEN=ghp_demo python3 sample.py --base-url http://127.0.0.1:8765 --max-pages 3 --pause 0.1\ncursor_rules_mdc         300 files sampled\ncursor_legacy            300 files sampled\ncopilot_instructions     300 files sampled\nagents_md                300 files sampled\nclaude_md                300 files sampled\n```\n\n## Steps 8 and 9: Estimates, Bounds and Bulk Owners\n\n### Step 8: Write the analysis module\n\nFour ideas live in analysis.py. First, files per repository converts a many-files marker into a repo estimate. Second, tool bounds handle the fact that one repo may carry two markers for the same tool. The lower bound is the largest single marker, which assumes full overlap. The upper bound is the sum of markers, which assumes none. Third, share bounds combine both tools’ ranges into the widest honest interval for Cursor’s slice of the pair. Fourth, owner concentration and bulk adjustment catch templates.\n\n```\n\"\"\"Turn counts and samples into repo estimates, bounds and drift flags.\"\"\"\nfrom collections import Counter\n\ndef files_per_repo(pairs):\n    repos = {repo for repo, _ in pairs}\n    return len(pairs) / len(repos) if repos else 1.0\n\ndef owner_concentration(pairs, top=10):\n    owners = Counter(repo.split(\"/\")[0] for repo, _ in pairs)\n    total = sum(owners.values())\n    if not total:\n        return 0.0, []\n    leaders = owners.most_common(top)\n    return sum(n for _, n in leaders) / total, [o for o, _ in leaders]\n\ndef bulk_owners(pairs, threshold=0.05):\n    \"\"\"Owners that hold more than `threshold` of the sampled files.\"\"\"\n    owners = Counter(repo.split(\"/\")[0] for repo, _ in pairs)\n    total = sum(owners.values())\n    return {o for o, n in owners.items() if total and n / total > threshold}\n\ndef repo_estimate(total_count, pairs, unit):\n    if unit == \"one_file_per_repo\" or not pairs:\n        return float(total_count)\n    return total_count / files_per_repo(pairs)\n\ndef adjust_for_bulk(estimate, pairs):\n    \"\"\"Remove the sampled share held by bulk owners (rough, sample-based).\"\"\"\n    if not pairs:\n        return estimate\n    bulk = bulk_owners(pairs)\n    share = sum(1 for repo, _ in pairs if repo.split(\"/\")[0] in bulk) / len(pairs)\n    return estimate * (1 - share)\n\ndef tool_bounds(estimates):\n    \"\"\"Lower bound: biggest single marker. Upper bound: markers summed (no overlap).\"\"\"\n    if not estimates:\n        return 0.0, 0.0\n    return max(estimates), sum(estimates)\n\ndef share_bounds(a, b):\n    \"\"\"Range for A / (A + B) when each side only has (lo, hi) repo bounds.\"\"\"\n    (a_lo, a_hi), (b_lo, b_hi) = a, b\n    low = a_lo / (a_lo + b_hi) if (a_lo + b_hi) else 0.0\n    high = a_hi / (a_hi + b_lo) if (a_hi + b_lo) else 0.0\n    return low, high\n\ndef compare_snapshots(old, new, shock=0.4):\n    \"\"\"Per (probe, slice) change between two snapshots, flagged when it jumps.\"\"\"\n    index = {(r[\"probe\"], r[\"slice\"]): r for r in old}\n    out = []\n    for r in new:\n        prev = index.get((r[\"probe\"], r[\"slice\"]))\n        if not prev or not prev[\"total_count\"]:\n            continue\n        change = (r[\"total_count\"] - prev[\"total_count\"]) / prev[\"total_count\"]\n        out.append({\"probe\": r[\"probe\"], \"slice\": r[\"slice\"],\n                    \"old\": prev[\"total_count\"], \"new\": r[\"total_count\"],\n                    \"change\": change, \"shock\": abs(change) > shock})\n    return out\n```\n\nBounds are not confidence intervals. They say what the data allows, not how likely each value is. If you want a probabilistic range instead, feed the repo counts into the [Bayesian beta-binomial model](https://shattered.io/cursor-vs-copilot-share-bayesian-beta-binomial-pooling-12-steps-2026/) and compare. The two approaches answer different questions, and agreement between them is reassuring.\n\n### Step 9: Flag and remove bulk owners\n\nBulk committers distort footprints more than sampling noise does. Some accounts generate hundreds of near-identical repositories, each with the same instructions file. The kit flags any owner holding more than 5% of the sampled files and removes that sampled share from the estimate. The adjustment is rough because it assumes the sample mirrors the full result set, so report it next to the raw figure, never instead of it.\n\n``` python\npython3 - <<'EOF'\nimport json, analysis as an\npairs = json.load(open('data/samples/copilot_instructions.json'))\nshare, leaders = an.owner_concentration(pairs)\nprint('sampled files:', len(pairs))\nprint('top-10 owner share: %.1f%%' % (share * 100))\nprint('bulk owners:', sorted(an.bulk_owners(pairs)))\nprint('estimate 2600 -> adjusted %.0f' % an.adjust_for_bulk(2600.0, pairs))\nEOF\nsampled files: 300\ntop-10 owner share: 28.0%\nbulk owners: ['template-factory']\nestimate 2600 -> adjusted 1950\n```\n\nOne synthetic account, template-factory, holds a quarter of the sampled Copilot files. Strip it out and the estimate drops sharply. In a real run, look at the flagged account by hand before you trust the adjustment. Sometimes a prolific owner is a legitimate open-source organization with many real projects.\n\n## Steps 10 and 11: Report and Drift Check\n\n### Step 10: Render the report\n\nThe report reads the newest snapshot and all samples, then prints a markdown table per slice with the raw estimate and the bulk-adjusted one. It ends with the Cursor share of the Cursor-plus-Copilot pair as a range, and a concentration section that prints FLAG when the top ten owners hold more than a quarter of the sampled files.\n\n``` python\n\"\"\"Read the newest snapshot and samples, print a markdown report.\"\"\"\nimport argparse\nimport json\nfrom pathlib import Path\n\nimport analysis as an\n\ndef latest_rows(snap_dir):\n    files = sorted(Path(snap_dir).glob(\"*.jsonl\"))\n    if not files:\n        raise SystemExit(\"no snapshots yet: run collect.py first\")\n    rows = [json.loads(line) for line in files[-1].read_text().splitlines() if line]\n    last_ts = max(r[\"ts\"] for r in rows)\n    return [r for r in rows if r[\"ts\"] == last_ts]\n\ndef load_samples(sample_dir):\n    return {p.stem: json.loads(p.read_text()) for p in Path(sample_dir).glob(\"*.json\")}\n\ndef build(rows, samples, sl=\"all\"):\n    est = {}\n    for r in rows:\n        if r[\"slice\"] != sl:\n            continue\n        pairs = samples.get(r[\"probe\"], [])\n        repos = an.repo_estimate(r[\"total_count\"], pairs, r[\"unit\"])\n        est[r[\"probe\"]] = {\"tool\": r[\"tool\"], \"files\": r[\"total_count\"],\n                           \"repos\": repos,\n                           \"adjusted\": an.adjust_for_bulk(repos, pairs),\n                           \"incomplete\": r[\"incomplete\"]}\n    return est\n\ndef tool_range(est, tool, key):\n    vals = [v[key] for v in est.values() if v[\"tool\"] == tool]\n    return an.tool_bounds(vals)\n\ndef render(rows, samples):\n    lines = [\"# Public repo footprint\", \"\"]\n    for sl in (\"all\", \"substantive\"):\n        est = build(rows, samples, sl)\n        lines += [f\"## Slice: {sl}\", \"\",\n                  \"| Probe | Tool | Files | Est. repos | Bulk-adjusted |\",\n                  \"|---|---|---:|---:|---:|\"]\n        for pid, v in est.items():\n            lines.append(f\"| {pid} | {v['tool']} | {v['files']:,} | \"\n                         f\"{v['repos']:,.0f} | {v['adjusted']:,.0f} |\")\n        for key, label in ((\"repos\", \"raw\"), (\"adjusted\", \"bulk-adjusted\")):\n            cur, cop = tool_range(est, \"cursor\", key), tool_range(est, \"copilot\", key)\n            lo, hi = an.share_bounds(cur, cop)\n            lines.append(\"\")\n            lines.append(f\"Cursor share of Cursor+Copilot markers ({label}): \"\n                         f\"{lo:.1%} to {hi:.1%}\")\n        lines.append(\"\")\n    lines += [\"## Concentration (top-10 owners, share of sampled files)\", \"\"]\n    for pid, pairs in samples.items():\n        share, leaders = an.owner_concentration(pairs)\n        flag = \"FLAG\" if share > 0.25 else \"ok\"\n        lines.append(f\"- {pid}: {share:.1%} {flag} (bulk owners: \"\n                     f\"{', '.join(sorted(an.bulk_owners(pairs))) or 'none'})\")\n    return \"\\n\".join(lines)\n\ndef main():\n    ap = argparse.ArgumentParser()\n    ap.add_argument(\"--snapshots\", default=\"data/snapshots\")\n    ap.add_argument(\"--samples\", default=\"data/samples\")\n    args = ap.parse_args()\n    print(render(latest_rows(args.snapshots), load_samples(args.samples)))\n\nif __name__ == \"__main__\":\n    main()\npython3 report.py\n# Public repo footprint\n\n## Slice: all\n\n| Probe | Tool | Files | Est. repos | Bulk-adjusted |\n|---|---|---:|---:|---:|\n| cursor_rules_mdc | cursor | 4,800 | 1,200 | 1,200 |\n| cursor_legacy | cursor | 3,200 | 3,200 | 2,933 |\n| copilot_instructions | copilot | 2,600 | 2,600 | 1,950 |\n| agents_md | shared | 9,000 | 9,000 | 9,000 |\n| claude_md | claude_code | 5,100 | 5,100 | 5,100 |\n\nCursor share of Cursor+Copilot markers (raw): 55.2% to 62.9%\n\nCursor share of Cursor+Copilot markers (bulk-adjusted): 60.1% to 67.9%\n\n## Slice: substantive\n\n| Probe | Tool | Files | Est. repos | Bulk-adjusted |\n|---|---|---:|---:|---:|\n| cursor_rules_mdc | cursor | 3,840 | 960 | 960 |\n| cursor_legacy | cursor | 2,240 | 2,240 | 2,053 |\n| copilot_instructions | copilot | 1,170 | 1,170 | 878 |\n| agents_md | shared | 4,500 | 4,500 | 4,500 |\n| claude_md | claude_code | 3,315 | 3,315 | 3,315 |\n\nCursor share of Cursor+Copilot markers (raw): 65.7% to 73.2%\n\nCursor share of Cursor+Copilot markers (bulk-adjusted): 70.1% to 77.4%\n\n## Concentration (top-10 owners, share of sampled files)\n\n- agents_md: 3.3% ok (bulk owners: none)\n- cursor_legacy: 11.3% ok (bulk owners: template-factory)\n- cursor_rules_mdc: 13.3% ok (bulk owners: none)\n- claude_md: 3.3% ok (bulk owners: none)\n- copilot_instructions: 28.0% FLAG (bulk owners: template-factory)\n```\n\nRead the ranges as a pair. Under the all-files slice, Cursor holds one range of the combined markers. Remove bulk owners and the range moves. Switch to the substantive slice and it moves again. A large swing from filters alone is the finding. It tells you that the choice of definition matters more than any sampling error, which is also the lesson from survey denominators.\n\n### Step 11: Compare snapshots to catch index shocks\n\nWeekly snapshots turn a single reading into a trend, and they expose index changes. If a probe’s count falls by more than 40% in a week, the cause is rarely developers deleting files. More often GitHub re-indexed, changed a qualifier’s behavior, or rate-limited you into a partial result. The compare script prints each probe’s change and tags the big ones.\n\n```\n\"\"\"Compare two snapshot files and flag jumps that look like index changes.\"\"\"\nimport argparse\nimport json\nfrom pathlib import Path\n\nimport analysis as an\n\ndef load(path):\n    rows = [json.loads(l) for l in Path(path).read_text().splitlines() if l]\n    last = max(r[\"ts\"] for r in rows)\n    return [r for r in rows if r[\"ts\"] == last]\n\ndef main():\n    ap = argparse.ArgumentParser()\n    ap.add_argument(\"old\")\n    ap.add_argument(\"new\")\n    ap.add_argument(\"--shock\", type=float, default=0.4)\n    a = ap.parse_args()\n    for r in an.compare_snapshots(load(a.old), load(a.new), a.shock):\n        tag = \"SHOCK\" if r[\"shock\"] else \"ok\"\n        print(f\"{r['probe']:<22}{r['slice']:<12}{r['old']:>7} -> {r['new']:>7}\"\n              f\"  {r['change']:+7.1%}  {tag}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nThe demo below compares a doctored last-week file against today’s snapshot. I edited the older counts by hand to simulate a re-index, so the SHOCK tag is by design.\n\n```\npython3 compare.py data/snapshots/2026-11-22.jsonl data/snapshots/2026-11-29.jsonl\nphp\ncursor_rules_mdc      all            4400 ->    4800    +9.1%  ok\ncursor_rules_mdc      substantive    3500 ->    3840    +9.7%  ok\ncursor_legacy         all            3050 ->    3200    +4.9%  ok\ncursor_legacy         substantive    2150 ->    2240    +4.2%  ok\ncopilot_instructions  all            5800 ->    2600   -55.2%  SHOCK\ncopilot_instructions  substantive    2600 ->    1170   -55.0%  SHOCK\nagents_md             all            7600 ->    9000   +18.4%  ok\nagents_md             substantive    3800 ->    4500   +18.4%  ok\nclaude_md             all            4900 ->    5100    +4.1%  ok\nclaude_md             substantive    3200 ->    3315    +3.6%  ok\n```\n\n## Step 12: Tests, Mock Server and Scheduling\n\nTests matter here because the failure modes are quiet. A wrong denominator still prints a plausible percentage. The ten tests pin the arithmetic, the retry behavior, the cache, the auth error and the 1,000-result cap. They run against a small local server that mimics GitHub’s code search response shape, including the 401, a secondary rate limit, a 502 and the 422 returned past page ten.\n\n```\n\"\"\"Offline stand-in for GitHub code search. All numbers are synthetic.\"\"\"\nimport argparse\nimport json\nimport threading\nfrom http.server import BaseHTTPRequestHandler, ThreadingHTTPServer\nfrom urllib.parse import parse_qs, urlparse\n\n# marker -> (name, synthetic total, files per repo, 1-in-N repos owned by one\n# bulk account, fraction of files over 1,000 bytes)\nKINDS = {\n    \".cursor/rules\": (\"cursor_rules_mdc\", 4800, 4.0, 0, 0.80),\n    \".cursorrules\": (\"cursor_legacy\", 3200, 1.0, 12, 0.70),\n    \"copilot-instructions\": (\"copilot_instructions\", 2600, 1.0, 4, 0.45),\n    \"AGENTS.md\": (\"agents_md\", 9000, 1.0, 0, 0.50),\n    \"CLAUDE.md\": (\"claude_md\", 5100, 1.0, 0, 0.65),\n}\n\ndef kind_for(q):\n    for marker, spec in KINDS.items():\n        if marker in q:\n            return spec\n    return None\n\ndef make_items(spec, total, start, count):\n    name, _, fpr, bulk, _ = spec\n    items = []\n    for i in range(start, min(start + count, total, 1000)):\n        repo_idx = int(i / fpr)\n        owner = \"template-factory\" if bulk and repo_idx % bulk == 0 else f\"dev{repo_idx % 480}\"\n        items.append({\"path\": f\"{name}/{i}.md\",\n                      \"repository\": {\"full_name\": f\"{owner}/{name}-{repo_idx}\"}})\n    return items\n\nclass Handler(BaseHTTPRequestHandler):\n    calls = 0\n    flaky = False\n    lock = threading.Lock()\n\n    def log_message(self, *a):\n        pass\n\n    def _send(self, code, body, headers=None):\n        raw = json.dumps(body).encode()\n        self.send_response(code)\n        self.send_header(\"Content-Type\", \"application/json\")\n        self.send_header(\"Content-Length\", str(len(raw)))\n        for k, v in (headers or {}).items():\n            self.send_header(k, v)\n        self.end_headers()\n        self.wfile.write(raw)\n\n    def do_GET(self):\n        url = urlparse(self.path)\n        qs = parse_qs(url.query)\n        with Handler.lock:\n            Handler.calls += 1\n            n = Handler.calls\n        if url.path != \"/search/code\":\n            return self._send(404, {\"message\": \"Not Found\"})\n        if not self.headers.get(\"Authorization\"):\n            return self._send(401, {\"message\": \"Requires authentication\"})\n        if Handler.flaky and n == 3:\n            return self._send(403, {\"message\": \"You have exceeded a secondary rate limit.\"},\n                              {\"Retry-After\": \"1\"})\n        if Handler.flaky and n == 5:\n            return self._send(502, {\"message\": \"Bad Gateway\"})\n        q = qs[\"q\"][0]\n        per_page = int(qs.get(\"per_page\", [\"30\"])[0])\n        page = int(qs.get(\"page\", [\"1\"])[0])\n        spec = kind_for(q)\n        if not spec:\n            return self._send(200, {\"total_count\": 0, \"incomplete_results\": False, \"items\": []})\n        total = spec[1]\n        if \"size:>1000\" in q:\n            total = int(total * spec[4])\n        start = (page - 1) * per_page\n        if start >= 1000:\n            return self._send(422, {\"message\": \"Only the first 1000 search results are available\"})\n        self._send(200, {\"total_count\": total, \"incomplete_results\": False,\n                         \"items\": make_items(spec, total, start, per_page)})\n\ndef serve(port=8765, flaky=False):\n    Handler.flaky = flaky\n    Handler.calls = 0\n    server = ThreadingHTTPServer((\"127.0.0.1\", port), Handler)\n    return server\n\nif __name__ == \"__main__\":\n    ap = argparse.ArgumentParser()\n    ap.add_argument(\"--port\", type=int, default=8765)\n    ap.add_argument(\"--flaky\", action=\"store_true\")\n    a = ap.parse_args()\n    s = serve(a.port, a.flaky)\n    print(f\"mock GitHub on http://127.0.0.1:{a.port} (synthetic data)\")\n    s.serve_forever()\npython\nimport sys\nimport threading\nfrom pathlib import Path\n\nimport pytest\n\nsys.path.insert(0, str(Path(__file__).resolve().parents[1]))\n\nimport mock_github  # noqa: E402\n\n@pytest.fixture()\ndef server():\n    srv = mock_github.serve(port=0, flaky=False)\n    t = threading.Thread(target=srv.serve_forever, daemon=True)\n    t.start()\n    yield f\"http://127.0.0.1:{srv.server_address[1]}\"\n    srv.shutdown()\npython\nimport analysis as an\n\ndef test_files_per_repo():\n    pairs = [[\"a/x\", \"1\"], [\"a/x\", \"2\"], [\"b/y\", \"1\"], [\"b/y\", \"2\"]]\n    assert an.files_per_repo(pairs) == 2.0\n\ndef test_repo_estimate_many_files():\n    pairs = [[\"a/x\", \"1\"], [\"a/x\", \"2\"]]\n    assert an.repo_estimate(1000, pairs, \"many_files_per_repo\") == 500.0\n    assert an.repo_estimate(1000, pairs, \"one_file_per_repo\") == 1000.0\n\ndef test_bounds_use_max_and_sum():\n    assert an.tool_bounds([3200, 1200]) == (3200, 4400)\n\ndef test_share_bounds_order():\n    low, high = an.share_bounds((3000, 4000), (2000, 2500))\n    assert low < high\n    assert round(low, 3) == round(3000 / 5500, 3)\n    assert round(high, 3) == round(4000 / 6000, 3)\n\ndef test_concentration_flags_bulk_owner():\n    pairs = [[\"factory/r%d\" % i, \"p\"] for i in range(30)] + [[\"u%d/r\" % i, \"p\"] for i in range(70)]\n    share, leaders = an.owner_concentration(pairs, top=1)\n    assert share == 0.30 and leaders == [\"factory\"]\n    assert an.bulk_owners(pairs) == {\"factory\"}\n    assert an.adjust_for_bulk(1000, pairs) == 700.0\n\ndef test_snapshot_shock_flag():\n    old = [{\"probe\": \"a\", \"slice\": \"all\", \"total_count\": 1000}]\n    new = [{\"probe\": \"a\", \"slice\": \"all\", \"total_count\": 400}]\n    out = an.compare_snapshots(old, new)\n    assert out[0][\"shock\"] is True and round(out[0][\"change\"], 2) == -0.60\npython\nimport pytest\n\nfrom ghclient import AuthError, GitHub\nimport mock_github\n\ndef test_requires_token(server, tmp_path):\n    gh = GitHub(base_url=server, token=None, cache_dir=tmp_path)\n    with pytest.raises(AuthError):\n        gh.search_code(\"filename:AGENTS.md\")\n\ndef test_count_and_cache(server, tmp_path):\n    gh = GitHub(base_url=server, token=\"x\", cache_dir=tmp_path)\n    first = gh.search_code(\"filename:CLAUDE.md\")\n    again = gh.search_code(\"filename:CLAUDE.md\")\n    assert first[\"total_count\"] == 5100 == again[\"total_count\"]\n    assert gh.requests_made == 1\n\ndef test_retries_rate_limit_and_5xx(tmp_path):\n    srv = mock_github.serve(port=0, flaky=True)\n    import threading\n    threading.Thread(target=srv.serve_forever, daemon=True).start()\n    waits = []\n    gh = GitHub(base_url=f\"http://127.0.0.1:{srv.server_address[1]}\", token=\"x\",\n                cache_dir=tmp_path, sleep=waits.append)\n    for q in (\"filename:AGENTS.md\", \"filename:CLAUDE.md\", \".cursorrules\", \"copilot-instructions\"):\n        assert gh.search_code(q)[\"total_count\"] > 0\n    srv.shutdown()\n    assert 1 in waits\n\ndef test_page_cap_raises_422(server, tmp_path):\n    import urllib.error\n    gh = GitHub(base_url=server, token=\"x\", cache_dir=tmp_path)\n    with pytest.raises(urllib.error.HTTPError) as e:\n        gh.search_code(\"filename:AGENTS.md\", per_page=100, page=11)\n    assert e.value.code == 422\npython3 -m pytest -v\ntests/test_analysis.py::test_files_per_repo PASSED\ntests/test_analysis.py::test_repo_estimate_many_files PASSED\ntests/test_analysis.py::test_bounds_use_max_and_sum PASSED\ntests/test_analysis.py::test_share_bounds_order PASSED\ntests/test_analysis.py::test_concentration_flags_bulk_owner PASSED\ntests/test_analysis.py::test_snapshot_shock_flag PASSED\ntests/test_client.py::test_requires_token PASSED\ntests/test_client.py::test_count_and_cache PASSED\ntests/test_client.py::test_retries_rate_limit_and_5xx PASSED\ntests/test_client.py::test_page_cap_raises_422 PASSED\n============================== 10 passed in 2.09s ==============================\n```\n\nFinally, schedule the collector. A weekly cron entry is enough, since the search index does not move fast enough to justify daily runs. Keep the snapshot directory under version control or back it up. Those JSONL files are the only record of what the index said on a given day, and you cannot recreate them later.\n\n```\n17 6 * * 1 cd /srv/footprint && . .venv/bin/activate && GITHUB_TOKEN=ghp_your_token_here ./run_all.sh >> data/cron.log 2>&1\n```\n\n## Reading the Footprint Against the 2026 Survey Numbers\n\nPut the footprint next to the survey and the disagreement teaches you something. Suppose the survey puts Cursor at well under half of the Copilot figure, as the Stackness recount reportedly does (26.6% against 61.3%), while your footprint says Cursor holds more than half of the marker files. That gap does not mean one source lies. A plausible reading is that Cursor users commit configuration more often, while a large share of Copilot use leaves no repository trace because it happens in private enterprise code.\n\nPrice floors help explain who leaves a trace. Copilot’s plan lineup includes Free, Student, Pro, Pro+, Max, Business and Enterprise tiers. According to [GitHub’s plan documentation](https://docs.github.com/en/copilot/get-started/plans?ref=vanja.io), Pro+ costs $39 a month and Max costs $100 a month. Cursor’s current lineup runs from Free through Plus at $8 a month to Ultra at $200. For a side-by-side of limits and usage rules, see the [Claude Code vs Cursor vs Copilot pricing comparison](https://shattered.io/claude-code-vs-cursor-vs-github-copilot-pricing-limits-2026/).\n\n| Plan | Monthly price | Footprint implication | \n|---|---|---|\n| Cursor Plus | $8 | Low entry price, so casual users can configure rules | \n| Cursor Premium | $30 | Listed as the most popular tier, likely where heavy rules use happens | \n| Cursor Ultra | $200 | Power users, few in number, many files per repo | \n| Copilot Pro+ | $39 | Individual power users, but instructions files are optional | \n| Copilot Max | $100 | Heavy users, same optional-file caveat | \n\nProduct churn adds another blind spot. GitHub’s changelog reports that Gemini 4 Neon became generally available in Copilot on [November 18, 2026](https://github.blog/changelog/type/new-releases/page/2/), following other model additions earlier that month. Switching models changes nothing in a repository, so a footprint cannot see it. The same applies to a developer who moves from one tool to another without touching a config file. The footprint lags real behavior, and sometimes by months.\n\nAccording to Stackness, the 2025 coding-tool list was shown only to people who use AI agents, so the two editions are not directly comparable. Stack Overflow’s [2025 results post](https://stackoverflow.blog/2025/12/29/developers-remain-willing-but-reluctant-to-use-ai-the-2025-developer-survey-results-are-here) is worth reading for how it frames adoption. To reconcile the editions properly, look at the [survey reweighting tutorial](https://shattered.io/cursor-vs-copilot-survey-raking-reweight-python-12-steps-2026/), which rebuilds a like-for-like base.\n\n## Common Pitfalls When Measuring Cursor vs GitHub Copilot Market Share\n\nSeven mistakes account for most bad footprints. Each one produces a clean number that looks fine in a chart.\n\n- **Counting files as repositories.** A Cursor rules directory can hold many .mdc files. Always convert with files per repo, or choose single-file markers for a like-for-like comparison.\n- **Assigning AGENTS.md to a tool.** More than one tool reads the file, so it measures agent-config adoption in general. Keep it in the report as context and exclude it from the Cursor-versus-Copilot ratio.\n- **Ignoring bulk committers.** One account with hundreds of template repos can shift a ratio by several points. Run the concentration check on every probe, every time.\n- **Treating total_count as exact.** GitHub’s search counts can be approximate, and incomplete_results can be true. Store the flag in each snapshot row and rerun when it fires.\n- **Mixing marker ages.** A legacy format fades while its replacement grows, so summing both without care double-counts migrating repos. The lower and upper bounds exist for this reason, and the[Copilot-to-Cursor rules migration guide](https://shattered.io/cursor-rules-migrate-github-copilot-2026/) explains how instructions move between the two tools.\n- **Forgetting the public-only limit.** Enterprise teams rarely commit rules to public repos. A footprint says nothing about them, which is a large blind spot given the vendor claims about enterprise reach.\n- **Publishing one number.** A single percentage hides the filter choices behind it. Publish the range, the slice, the snapshot date and the query strings together.\n\nA footprint also cannot tell you which tool is better. If that is your real question, run the [Cursor vs Copilot benchmark](https://shattered.io/benchmark-cursor-vs-github-copilot-2026/) on your own repositories instead of inferring quality from popularity.\n\n## Troubleshooting: 10 Failures and Their Fixes\n\n- **HTTP 401, *Requires authentication*.** Code search rejects anonymous calls. Export GITHUB_TOKEN in the same shell that runs the script, and confirm with the rate_limit curl from Step 3.\n- **HTTP 403 with a rate-limit message.** You hit a primary or secondary limit. The client honors Retry-After, but if it keeps firing, raise –pause to 10 seconds or more and run fewer probes per hour.\n- **HTTP 422, *Only the first 1000 search results are available*.** You asked for a page past the cap. Keep –max-pages at 10 or below, and split large probes with size ranges to reach deeper.\n- **total_count is 0 for a file you know exists.** The qualifier syntax probably missed. Try the filename alone, then add path: back, and check that the repo is public and not archived out of the index.\n- **incomplete_results is true.** The search timed out server-side and returned a partial set. Wait a few minutes, delete the cached response, and rerun that probe.\n- **Counts jump by half overnight.** Run compare.py. A SHOCK tag across several unrelated probes points to an index change, not real behavior. Do not publish that week’s reading.\n- **The report shows yesterday’s numbers.** The 6-hour response cache served old data. Delete data/cache, or lower the ttl argument when you build the client.\n- **SSL: CERTIFICATE_VERIFY_FAILED.** Python cannot find your CA bundle, which is common on freshly installed macOS builds and behind corporate proxies. Point SSL_CERT_FILE at your bundle rather than disabling verification.\n- **The no snapshots yet message from report.py.** The report looks for JSONL files under data/snapshots. Run collect.py first, and check that you ran it from the project root.\n- **Tests fail with an address-already-in-use error.** A hand-started mock server holds port 8765. Stop it, because the tests bind to a random free port and do not need it.\n\n## Advanced Tips for a Sharper Footprint\n\n- **Fingerprint file contents.** Fetch a sample of raw files and hash them. If 40% of a probe’s sampled files share a handful of hashes, you are counting template copies, and no owner-based filter would have caught it.\n- **Slice by file size ranges.** Queries such as size:100..500 and size:500..2000 return separate result sets, each with its own 1,000-result cap. Sum several slices to reach deeper than a single query allows.\n- **Scope to one organization.** Add org:yourcompany to a probe and run it with a token that can see private repositories. You get an internal footprint that shows which teams configured which tool, with no survey required.\n- **Compute a configuration-intensity ratio.** Divide each tool’s footprint share by its survey share. A ratio above 1 means users of that tool commit configuration more often than the survey headcount predicts.\n- **Check claims alongside counts.** Pair the footprint with the[share-claim linter](https://shattered.io/cursor-vs-copilot-share-claim-linter-python-12-steps-2026/) so every public percentage you cite carries its denominator and date.\n- **Respect the platform.** Use the REST API as documented, keep your pauses, and never scrape the HTML search pages. For wider context on developer tooling, browse the[coding tools section](https://shattered.io/category/software/) .\n\n## The Complete Project, Layout and One-Command Run\n\nCopy the files from Steps 2 to 12 into this layout. The runner script below wires collect, sample and report together.\n\n```\nfootprint/\n  probes.json\n  ghclient.py\n  collect.py\n  sample.py\n  analysis.py\n  report.py\n  compare.py\n  mock_github.py\n  run_all.sh\n  requirements.txt\n  tests/\n    conftest.py\n    test_analysis.py\n    test_client.py\n  data/\n    snapshots/   (JSONL, one file per day)\n    samples/     (one JSON per probe)\n    cache/       (HTTP responses)\nbash\n#!/bin/sh\n# One command: count, sample, report. Set GITHUB_TOKEN first.\nset -eu\nBASE=\"${BASE_URL:-https://api.github.com}\"\npython3 collect.py --base-url \"$BASE\"\npython3 sample.py --base-url \"$BASE\" --max-pages 3\npython3 report.py > data/report.md\ncat data/report.md\n```\n\nTo rehearse offline, start the mock with python3 mock_github.py in one terminal, set BASE_URL to the local address the mock serves on and a dummy token, then run ./run_all.sh. To go live, drop BASE_URL and use a real token. In both modes, run python3 -m pytest first. A green suite confirms the arithmetic before you trust any percentage.\n\n## FAQ: Cursor vs Copilot Repo Footprint\n\n### Is a repo footprint the same as market share?\n\nNo. It counts public repositories that contain a configuration file, which is a narrow behavioral signal. It ignores private code, free users who skip configuration, and anyone who uses a tool without committing a file. Treat it as one lens next to surveys and seat data.\n\n### Can I run the kit without a token?\n\nNo. GitHub’s code search returns HTTP 401 with the message *Requires authentication* for anonymous requests. A token with no scopes is enough for public data.\n\n### Why include AGENTS.md if it belongs to neither tool?\n\nIt shows how much agent configuration exists overall, which gives the tool-specific markers a baseline. Excluding it from the Cursor-versus-Copilot ratio keeps the comparison clean.\n\n### How often should I take a snapshot?\n\nWeekly is plenty. The index moves slowly, and more frequent runs mostly spend quota. Keep every snapshot so you can spot index changes later.\n\n### Why do the survey and the footprint disagree?\n\nThey count different things. A survey counts people who chose to answer and tick a box, and a footprint counts repositories where someone committed a file. Configuration habits differ by tool, plan and company, so the ratios should differ.\n\n### How wide should I expect the range to be?\n\nWide enough to be uncomfortable. In the synthetic demo, filters alone moved Cursor’s share by about ten points. A real range depends on your probes, slices and bulk-owner handling, so publish all three alongside the numbers.\n\n### Does this work for private repositories?\n\nYes, with a token that can read them. Add an org qualifier to scope the search to your own company, and you get an internal view of which teams configured Cursor or Copilot.\n\n### What is the best next step after building this?\n\nRun it weekly for a month, then compare the trend against your internal seat data. Agreement between independent signals is worth far more than any single percentage.", "url": "https://wpnews.pro/news/cursor-vs-copilot-repo-footprint-12-steps-70-min", "canonical_source": "https://shattered.io/cursor-vs-copilot-public-repo-footprint-github-code-search-12-steps-2026/", "published_at": "2026-11-29 02:16:38+00:00", "updated_at": "2026-11-29 02:45:29.964219+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-products"], "entities": ["Cursor", "GitHub Copilot", "Claude Code", "Stack Overflow", "Stackness", "GitHub"], "also_reported_by": [], "takeaway": "Survey shares (Copilot 61.3%, Cursor 26.6%, Claude Code 68.4% of 11,739 tool-using respondents) count self-selected respondents, so measure repo footprint instead by counting config files via GitHub code search, sampling hits into repositories, stripping bulk-committed templates, and reporting a ran", "recommendation": {"advice": "When comparing coding-tool adoption, pair survey shares with a repo footprint: count config files via GitHub code search, sample hits into repositories, strip bulk-committed templates, and report a range rather than one percentage.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/cursor-vs-copilot-repo-footprint-12-steps-70-min", "markdown": "https://wpnews.pro/news/cursor-vs-copilot-repo-footprint-12-steps-70-min.md", "text": "https://wpnews.pro/news/cursor-vs-copilot-repo-footprint-12-steps-70-min.txt", "jsonld": "https://wpnews.pro/news/cursor-vs-copilot-repo-footprint-12-steps-70-min.jsonld"}}