diff --git a/README.md b/README.md index 544af36d7..53e4b5fb4 100644 --- a/README.md +++ b/README.md @@ -369,6 +369,16 @@ See the [full command reference](#full-command-reference) below. --- +## Labeling and rendering limits + +- **`--batch-size`**: 100 communities per labeling call by default, sized for a ~16k-token context (~150 tokens/community). Use `--batch-size 40` for an 8k window. Context overflow is not split-retried; failed batches keep hub-derived names. +- **`--missing-only`**: `label --missing-only` keeps existing labels and names only unnamed / `Community N` entries. Use `label` (full relabel) to refresh names after the community set changes. +- **`.graphify_labels.json.sig`**: records the community membership signature; labels survive a re-cluster only while it matches. +- **`export html`**: 5,000-node default; above it graphify renders an aggregated community view. Use `--node-limit N`. `GRAPHIFY_VIZ_NODE_LIMIT` / `.graphifyrc` `viz_node_limit=N` apply to `cluster-only`, `update`, `watch`, and hooks, not `export html`. +- **Leiden fallback**: without the `leiden` extra, clustering silently uses networkx Louvain. Switching later reshuffles every community, so plan a full relabel. + +--- + ## Ignoring files graphify honors `.gitignore` and supports `--exclude` patterns and a project `.graphifyignore`. Details: **[Configuration](https://docs.graphify.com/reference/configuration)**. diff --git a/graphify/__main__.py b/graphify/__main__.py index fa453e971..2c293ba9a 100644 --- a/graphify/__main__.py +++ b/graphify/__main__.py @@ -911,7 +911,7 @@ def _run_cli() -> None: print(" --backend= backend to use for community naming (default: auto-detect)") print(" --model= model to use for community naming") print(" --max-concurrency=N parallel community-labeling LLM calls (default 4; forced to 1 for ollama/claude-cli)") - print(" --batch-size=N communities per labeling LLM call (default 100)") + print(" --batch-size=N communities per labeling LLM call (default 100, sized for ~16k context; use 40 for 8k)") print(" label (re)name communities with the configured LLM backend, regenerate report") print(" --missing-only keep existing labels and only name missing/placeholder communities") print(" --backend= backend to use (default: auto-detect from API keys)") @@ -995,7 +995,7 @@ def _run_cli() -> None: print(" global list list repos in the global graph") print(" global path print path to the global graph file") print(" benchmark [graph.json] measure token reduction vs naive full-corpus approach") - print(" export html emit interactive graph.html [--graph PATH] [--labels PATH] [--node-limit N] [--no-viz]") + print(" export html emit interactive graph.html [--graph PATH] [--labels PATH] [--node-limit N, default 5000] [--no-viz]") print(" export callflow-html emit Mermaid-based architecture/call-flow HTML") print(" [GRAPH|DIR] [--graph PATH] [--labels PATH] [--report PATH] [--sections PATH] [--output HTML]") print(" [--lang auto|zh-CN|en] [--max-sections N] [--diagram-scale N]")