Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 35 additions & 9 deletions docs/public/llms-full.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3984,19 +3984,45 @@ Archgate collects **anonymous usage data** to help us understand how the CLI is
When you run an Archgate command, we record:

- **Command name** and **which flags were used** (e.g., `check --json` — only flag presence, never flag values)
- **Exit code** (0, 1, or 2) and **execution duration** (milliseconds)
- **Environment**: OS, architecture, Bun version, Archgate version, CI detection, TTY detection, WSL detection
- **Exit code** (0, 1, 2, or 130) and **execution duration** (milliseconds), plus a short **outcome** tag (`success`, `user_error`, `internal_error`, `cancelled`)
- **Environment**: OS, architecture, Bun version, Archgate version, CI detection (including provider: GitHub Actions / GitLab CI / CircleCI / etc.), TTY detection, WSL detection, shell (bash, zsh, pwsh...), and locale
- **Install context**: how the CLI was installed (binary, proto, local dev dependency, or global package manager)
- **Project context**: whether an Archgate project exists in the current directory, how many ADRs it has, and how many have automated rules
- **Project context**: whether an Archgate project exists in the current directory, how many ADRs it has, how many have automated rules, and how many distinct ADR domains are used
- **Repo context** (non-identifying): whether the current directory is a git repository, the host bucket (`github` / `gitlab` / `bitbucket` / `azure-devops` / `other`), a **hashed `repo_id`** (SHA-256 of the normalized remote URL, truncated to 16 hex characters — not reversible), and the default branch name
- **Coarse location**: country and region (resolved server-side from your IP, then the IP is discarded — see [IP anonymization](#ip-anonymization))
- **Anonymous install ID**: a random UUID generated on first run — not derived from any personal data

In addition to the general command lifecycle events (`command_executed` / `command_completed`), specific commands send enriched outcome events:

- **`check`**: aggregate rule counts (total, passed, failed, warnings, errors), output format used, and whether filters were applied — no file paths or violation content
- **`init`**: editor choice, whether the plugin was installed, and whether the project already existed
- **`upgrade`**: version transition (from → to), install method, and success/failure
- **`login`**: subcommand used (login, logout, refresh, status) and success/failure
- **`check`**: aggregate rule counts (total, passed, failed, warnings, errors), output format used, whether filters were applied, files scanned, load duration, check duration — no file paths or violation content
- **`init`**: editor choice, whether the plugin was installed, whether the project already existed. A separate one-time `project_initialized` event is emitted with the repo host bucket, `repo_is_git`, and a `repo_public` flag. For repos confirmed public on GitHub / GitLab / Bitbucket, this event also carries the remote URL, owner, and repo name — see [Repo identity](#repo-identity). Private and self-hosted repos never have identity shared.
- **`upgrade`**: version transition (from → to), install method, success/failure, and an optional failure reason
- **`login`**: subcommand used (login, logout, refresh, status), success/failure, and a failure bucket (`network`, `tls`, `denied`, `other`) when it fails
- **`telemetry_preference_changed`**: fires once when you enable or disable telemetry, so we can understand opt-out rates

## Repo identity

Archgate sends a **hashed** `repo_id` with every event so we can count distinct repositories using the CLI without learning their names. The raw remote URL, owner, and repository name are **not** included in the common event stream.

On `archgate init`, a one-time `project_initialized` event is emitted. If — and only if — the repository is confirmed **public** on GitHub, GitLab, Bitbucket, or Azure DevOps (via an unauthenticated API probe against the host), that event additionally includes `remote_url`, `repo_owner`, and `repo_name`. This lets us see which public repositories are adopting Archgate without ever exposing private ones.

**What's never shared:**

- Private repositories (API probe returns 404, 401, or `private: true`)
- Self-hosted Git hosts (the probe skips these entirely)
- Repositories where the probe times out, is rate-limited, or otherwise fails to return a definitive public answer

**Don't want the event at all?** Disable telemetry entirely — the whole `project_initialized` event is then suppressed along with everything else:

```bash
# Per-shell / per-invocation
export ARCHGATE_TELEMETRY=0

# Or persistently
archgate telemetry disable
```

See [How to opt out](#how-to-opt-out) below for the full details.

### Error tracking (Sentry)

Expand All @@ -4008,8 +4034,8 @@ When the CLI crashes (exit code 2), we send:

## What we do NOT collect

- **No personal information**: no usernames, emails, IP addresses, or GitHub identifiers
- **No file content**: no ADR content, source code, project names, or file paths
- **No personal information**: no usernames, emails, or IP addresses. GitHub / GitLab / Bitbucket owner/repository names are only sent on the one-time `project_initialized` event for repositories that are confirmed public by their host — see [Repo identity](#repo-identity). Private and self-hosted repos never have identity shared.
- **No file content**: no ADR content, source code, or file paths
- **No prompt or AI context**: nothing from agent interactions, prompts, or AI-generated content
- **No flag values**: we record that `--json` was used, not what the JSON output contained
- **No network activity**: no URLs, API keys, or tokens
Expand Down
44 changes: 35 additions & 9 deletions docs/src/content/docs/pt-br/reference/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,45 @@ O Archgate coleta **dados de uso anônimos** para nos ajudar a entender como a C
Quando você executa um comando do Archgate, registramos:

- **Nome do comando** e **quais flags foram usadas** (ex: `check --json` — apenas a presença da flag, nunca valores)
- **Código de saída** (0, 1 ou 2) e **duração da execução** (milissegundos)
- **Ambiente**: SO, arquitetura, versão do Bun, versão do Archgate, detecção de CI, detecção de TTY, detecção de WSL
- **Código de saída** (0, 1, 2 ou 130) e **duração da execução** (milissegundos), além de um **tag de desfecho** resumida (`success`, `user_error`, `internal_error`, `cancelled`)
- **Ambiente**: SO, arquitetura, versão do Bun, versão do Archgate, detecção de CI (incluindo provedor: GitHub Actions / GitLab CI / CircleCI / etc.), detecção de TTY, detecção de WSL, shell (bash, zsh, pwsh...) e locale
- **Contexto de instalação**: como a CLI foi instalada (binário, proto, dependência local ou gerenciador de pacotes global)
- **Contexto do projeto**: se existe um projeto Archgate no diretório atual, quantas ADRs possui e quantas têm regras automatizadas
- **Contexto do projeto**: se existe um projeto Archgate no diretório atual, quantas ADRs possui, quantas têm regras automatizadas e quantos domínios distintos de ADR estão em uso
- **Contexto do repositório** (não identificável): se o diretório atual é um repositório git, o bucket do host (`github` / `gitlab` / `bitbucket` / `azure-devops` / `other`), um **`repo_id` com hash** (SHA-256 da URL remota normalizada, truncado em 16 caracteres hex — não reversível) e o nome do branch padrão
- **Localização aproximada**: país e região (resolvidos no servidor a partir do seu IP, que é descartado em seguida — veja [Anonimização de IP](#anonimização-de-ip))
- **ID de instalação anônimo**: um UUID aleatório gerado na primeira execução — não derivado de nenhum dado pessoal

Além dos eventos gerais do ciclo de vida do comando (`command_executed` / `command_completed`), comandos específicos enviam eventos enriquecidos:

- **`check`**: contagens agregadas de regras (total, aprovadas, reprovadas, avisos, erros), formato de saída usado e se filtros foram aplicados — sem caminhos de arquivo ou conteúdo de violação
- **`init`**: escolha do editor, se o plugin foi instalado e se o projeto já existia
- **`upgrade`**: transição de versão (de → para), método de instalação e sucesso/falha
- **`login`**: subcomando usado (login, logout, refresh, status) e sucesso/falha
- **`check`**: contagens agregadas de regras (total, aprovadas, reprovadas, avisos, erros), formato de saída usado, se filtros foram aplicados, arquivos analisados, duração de carregamento, duração da verificação — sem caminhos de arquivo ou conteúdo de violação
- **`init`**: escolha do editor, se o plugin foi instalado, se o projeto já existia. Um evento separado `project_initialized` é enviado uma única vez, contendo o bucket do host do repositório, `repo_is_git` e um flag `repo_public`. Para repositórios confirmados como públicos no GitHub / GitLab / Bitbucket, esse evento também leva URL remota, owner e nome do repositório — veja [Identidade do repositório](#identidade-do-repositório). Repositórios privados e auto-hospedados nunca têm identidade compartilhada.
- **`upgrade`**: transição de versão (de → para), método de instalação, sucesso/falha e uma razão de falha opcional
- **`login`**: subcomando usado (login, logout, refresh, status), sucesso/falha e um bucket de falha (`network`, `tls`, `denied`, `other`) quando falha
- **`telemetry_preference_changed`**: disparado uma vez quando você ativa ou desativa a telemetria, para que possamos entender as taxas de opt-out

## Identidade do repositório

O Archgate envia um `repo_id` **com hash** em todo evento para que possamos contar repositórios distintos usando a CLI sem aprender seus nomes. A URL remota bruta, o owner e o nome do repositório **não** são incluídos no fluxo comum de eventos.

Em `archgate init`, um evento `project_initialized` único é enviado. Se — e somente se — o repositório for confirmado como **público** no GitHub, GitLab, Bitbucket ou Azure DevOps (via consulta não autenticada à API do host), esse evento também inclui `remote_url`, `repo_owner` e `repo_name`. Isso nos permite ver quais repositórios públicos estão adotando o Archgate sem jamais expor os privados.

**O que nunca é compartilhado:**

- Repositórios privados (a consulta retorna 404, 401 ou `private: true`)
- Hosts Git auto-hospedados (a verificação pula esses completamente)
- Repositórios em que a consulta expira, é limitada por rate-limit ou não retorna uma resposta pública definitiva

**Não quer o evento de forma alguma?** Desative a telemetria por completo — o evento `project_initialized` é suprimido junto com todos os outros:

```bash
# Por shell / por invocação
export ARCHGATE_TELEMETRY=0

# Ou persistentemente
archgate telemetry disable
```

Veja [Como desativar](#como-desativar) abaixo para detalhes completos.

### Rastreamento de erros (Sentry)

Expand All @@ -36,8 +62,8 @@ Quando a CLI falha (código de saída 2), enviamos:

## O que NÃO coletamos

- **Nenhuma informação pessoal**: nenhum nome de usuário, email, endereço IP ou identificador do GitHub
- **Nenhum conteúdo de arquivo**: nenhum conteúdo de ADR, código-fonte, nome de projeto ou caminho de arquivo
- **Nenhuma informação pessoal**: nenhum nome de usuário, email ou endereço IP. Owners e nomes de repositórios no GitHub / GitLab / Bitbucket só são enviados no evento único `project_initialized` para repositórios confirmados como públicos pelo host — veja [Identidade do repositório](#identidade-do-repositório). Repositórios privados e auto-hospedados nunca têm identidade compartilhada.
- **Nenhum conteúdo de arquivo**: nenhum conteúdo de ADR, código-fonte ou caminho de arquivo
- **Nenhum contexto de IA**: nada de interações com agentes, prompts ou conteúdo gerado por IA
- **Nenhum valor de flag**: registramos que `--json` foi usado, não o conteúdo da saída JSON
- **Nenhuma atividade de rede**: nenhuma URL, chave de API ou token
Expand Down
44 changes: 35 additions & 9 deletions docs/src/content/docs/reference/telemetry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,45 @@ Archgate collects **anonymous usage data** to help us understand how the CLI is
When you run an Archgate command, we record:

- **Command name** and **which flags were used** (e.g., `check --json` — only flag presence, never flag values)
- **Exit code** (0, 1, or 2) and **execution duration** (milliseconds)
- **Environment**: OS, architecture, Bun version, Archgate version, CI detection, TTY detection, WSL detection
- **Exit code** (0, 1, 2, or 130) and **execution duration** (milliseconds), plus a short **outcome** tag (`success`, `user_error`, `internal_error`, `cancelled`)
- **Environment**: OS, architecture, Bun version, Archgate version, CI detection (including provider: GitHub Actions / GitLab CI / CircleCI / etc.), TTY detection, WSL detection, shell (bash, zsh, pwsh...), and locale
- **Install context**: how the CLI was installed (binary, proto, local dev dependency, or global package manager)
- **Project context**: whether an Archgate project exists in the current directory, how many ADRs it has, and how many have automated rules
- **Project context**: whether an Archgate project exists in the current directory, how many ADRs it has, how many have automated rules, and how many distinct ADR domains are used
- **Repo context** (non-identifying): whether the current directory is a git repository, the host bucket (`github` / `gitlab` / `bitbucket` / `azure-devops` / `other`), a **hashed `repo_id`** (SHA-256 of the normalized remote URL, truncated to 16 hex characters — not reversible), and the default branch name
- **Coarse location**: country and region (resolved server-side from your IP, then the IP is discarded — see [IP anonymization](#ip-anonymization))
- **Anonymous install ID**: a random UUID generated on first run — not derived from any personal data

In addition to the general command lifecycle events (`command_executed` / `command_completed`), specific commands send enriched outcome events:

- **`check`**: aggregate rule counts (total, passed, failed, warnings, errors), output format used, and whether filters were applied — no file paths or violation content
- **`init`**: editor choice, whether the plugin was installed, and whether the project already existed
- **`upgrade`**: version transition (from → to), install method, and success/failure
- **`login`**: subcommand used (login, logout, refresh, status) and success/failure
- **`check`**: aggregate rule counts (total, passed, failed, warnings, errors), output format used, whether filters were applied, files scanned, load duration, check duration — no file paths or violation content
- **`init`**: editor choice, whether the plugin was installed, whether the project already existed. A separate one-time `project_initialized` event is emitted with the repo host bucket, `repo_is_git`, and a `repo_public` flag. For repos confirmed public on GitHub / GitLab / Bitbucket, this event also carries the remote URL, owner, and repo name — see [Repo identity](#repo-identity). Private and self-hosted repos never have identity shared.
- **`upgrade`**: version transition (from → to), install method, success/failure, and an optional failure reason
- **`login`**: subcommand used (login, logout, refresh, status), success/failure, and a failure bucket (`network`, `tls`, `denied`, `other`) when it fails
- **`telemetry_preference_changed`**: fires once when you enable or disable telemetry, so we can understand opt-out rates

## Repo identity

Archgate sends a **hashed** `repo_id` with every event so we can count distinct repositories using the CLI without learning their names. The raw remote URL, owner, and repository name are **not** included in the common event stream.

On `archgate init`, a one-time `project_initialized` event is emitted. If — and only if — the repository is confirmed **public** on GitHub, GitLab, Bitbucket, or Azure DevOps (via an unauthenticated API probe against the host), that event additionally includes `remote_url`, `repo_owner`, and `repo_name`. This lets us see which public repositories are adopting Archgate without ever exposing private ones.

**What's never shared:**

- Private repositories (API probe returns 404, 401, or `private: true`)
- Self-hosted Git hosts (the probe skips these entirely)
- Repositories where the probe times out, is rate-limited, or otherwise fails to return a definitive public answer

**Don't want the event at all?** Disable telemetry entirely — the whole `project_initialized` event is then suppressed along with everything else:

```bash
# Per-shell / per-invocation
export ARCHGATE_TELEMETRY=0

# Or persistently
archgate telemetry disable
```

See [How to opt out](#how-to-opt-out) below for the full details.

### Error tracking (Sentry)

Expand All @@ -36,8 +62,8 @@ When the CLI crashes (exit code 2), we send:

## What we do NOT collect

- **No personal information**: no usernames, emails, IP addresses, or GitHub identifiers
- **No file content**: no ADR content, source code, project names, or file paths
- **No personal information**: no usernames, emails, or IP addresses. GitHub / GitLab / Bitbucket owner/repository names are only sent on the one-time `project_initialized` event for repositories that are confirmed public by their host — see [Repo identity](#repo-identity). Private and self-hosted repos never have identity shared.
- **No file content**: no ADR content, source code, or file paths
- **No prompt or AI context**: nothing from agent interactions, prompts, or AI-generated content
- **No flag values**: we record that `--json` was used, not what the JSON output contained
- **No network activity**: no URLs, API keys, or tokens
Expand Down
Loading
Loading