Spec Word Cloud

scripts/spec_word_cloud.py is a small, dependency-free (stdlib-only) tool that scans every spec directory under specs/*/ (concatenating each spec's spec.md and requirements.md) and computes a TF-IDF term-prominence ranking across the whole corpus. It is meant to surface the "important objects and nodes" of the project at a glance -- the identifiers, subsystems, and recurring concepts that specs and requirements keep coming back to -- both as a quick visual (the word cloud below) and as a structured JSON report (plans/spec_term_prominence.json) that other tooling (or a human) can consume.

The tokenizer treats two kinds of terms specially. CamelCase and snake_case identifiers (e.g. PipelineRunner, CXPPacket, intent_broker) are counted twice: once intact, under their original casing and with a 2x weight boost, because they read as concrete "objects" or graph nodes in the codebase; and once split into their lowercase constituent words (pipeline, runner, cxp, packet, intent, broker), so ordinary word-frequency statistics are not skewed purely toward compound identifiers. A standard TF-IDF weighting is then applied: term frequency per spec-document, times a corpus-wide inverse document frequency (log(N_docs / (1 + df))), summed across documents for the global ranking below. This means a term that is rare but concentrated in a single spec can outrank a term that appears everywhere with the same raw count -- exactly the signal that makes a term "prominent" rather than merely "common."

The ranking pipeline:

Diagram projects-orchestrata-ultimate-word-cloud-1

Optionally (--apply-to-graph), the tool writes a prominence property onto matching entities in the semantic graph (Memgraph/Neo4j-compatible bolt backend), so GraphRAG retrieval and other graph-aware tooling can weight nodes by how central they are to the specs and requirements that describe them. This path is fail-soft: if the graph is unreachable it prints a message and exits cleanly rather than erroring.

Top 40 global terms

Rank Term Weight Count
1 plugin 1588.78 690
2 worktree 1036.21 417
3 calendar 891.11 262
4 goal 872.2 351
5 tool 802.66 1158
6 provider 643.54 613
7 fireflies 608.81 179
8 team 568.77 451
9 mcp 567.19 264
10 session 534.36 1604
11 kg 521.52 341
12 volk 473.97 754
13 driver 457.21 241
14 WebSocket 433.68 298
15 job 386.72 180
16 PowerShell 371.47 124
17 div 370.73 109
18 task 369.38 911
19 CalDAV 353.72 104
20 deception 353.5 118
21 branch 348.7 228
22 junior 343.38 181
23 hook 341.48 180
24 tui 340.43 190
25 gateway 338.26 244
26 server 332.72 347
27 llm 331.38 415
28 git 330.68 301
29 browser 324.4 161
30 sac 323.04 130
31 packet 322.53 352
32 claude 319.15 304
33 self 318.84 1028
34 fix_issues 313.15 136
35 alarm 312.91 92
36 string 312.33 1279
37 gate 311.77 174
38 meeting 311.56 104
39 transcript 308.56 103
40 CheetahClaws 308.55 134

Word cloud

type plugin session str tool system string error worktree test context self task provider volk goal agent api calendar code none all err file json team class orchestrata description py project async any kg name review mcp model user fireflies output list llm response WebSocket log path request resource event dict driver neo4j cxp server packet schema def execution return tests git claude result init__ command message integration python time files client gateway search branch support max criteria job sync