Individual skill
linguistic-semantic-algorithms
Mapping out an unfamiliar codebase via NLP and graph algorithms — 40 algorithms across topic modelling, semantic embeddings, code graphs, repository mining, clone detection, IR-based bug localization, identifier linguistics, and complexity metrics. Trigger when hunting bugs across many files, scoping a new feature, identifying domain entities, or analyzing commit history — even if the user doesn't explicitly mention algorithms — apply when they ask "where does X live in this codebase?", "what is this codebase about?", "find duplicated logic", "what changed recently?", "who owns this code?", or "is this function risky?".
skills/.experimental/linguistic-semantic-algorithms/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Network or broad shell
- Last checked
- Nov 11, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 224
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 13,020 bytesSKILL.mdcore · 11,048 bytesSKILL.mdcore · 11,048 bytesSKILL.mdcore · 11,048 bytesassets/templates/_template.mddoc · 2,921 bytesmetadata.jsonasset · 2,475 bytesreferences/_sections.mddoc · 3,797 bytesreferences/clone-ast-gumtree.mddoc · 4,252 bytesreferences/clone-minhash-lsh.mddoc · 4,419 bytesreferences/clone-simhash.mddoc · 4,514 bytesreferences/clone-suffix-array-cpd.mddoc · 5,075 bytesreferences/clone-zhang-shasha-ted.mddoc · 4,981 bytesreferences/concept-bounded-context-detection.mddoc · 5,000 bytesreferences/concept-entity-name-resolution.mddoc · 4,798 bytesreferences/concept-identifier-cooccurrence-network.mddoc · 4,213 bytesreferences/concept-lda-topic-modeling.mddoc · 3,515 bytesreferences/concept-noun-phrase-mining.mddoc · 3,494 bytesreferences/concept-tfidf-rare-terms.mddoc · 3,722 bytesreferences/graph-betweenness-bottlenecks.mddoc · 3,915 bytesreferences/graph-feedback-arcs.mddoc · 4,761 bytesreferences/graph-louvain-modules.mddoc · 4,148 bytesreferences/graph-pagerank-core.mddoc · 4,047 bytesreferences/graph-scc-cycle-tangles.mddoc · 4,020 bytesreferences/ling-abbreviation-expansion.mddoc · 5,385 bytesreferences/ling-camel-snake-split.mddoc · 4,172 bytesreferences/ling-porter-stemming.mddoc · 4,415 bytesreferences/ling-pos-tagging-identifiers.mddoc · 4,939 bytesreferences/local-bm25-saturation.mddoc · 4,371 bytesreferences/local-embedding-bug-text.mddoc · 4,882 bytesreferences/local-history-prior-localization.mddoc · 4,879 bytesreferences/local-tfidf-bug-reports.mddoc · 4,228 bytesreferences/mine-bug-fix-density.mddoc · 5,049 bytesreferences/mine-bus-factor.mddoc · 4,994 bytesreferences/mine-change-coupling.mddoc · 5,364 bytesreferences/mine-codebase-aging.mddoc · 4,764 bytesreferences/mine-commit-topic-modeling.mddoc · 5,056 bytesreferences/mine-hotspots-churn-complexity.mddoc · 4,983 bytesreferences/risk-cognitive-complexity.mddoc · 4,914 bytesreferences/risk-cyclomatic-mccabe.mddoc · 4,130 bytesreferences/risk-halstead-volume.mddoc · 4,784 bytesreferences/risk-shannon-entropy-naming.mddoc · 5,398 bytesreferences/sim-call-pattern-similarity.mddoc · 4,526 bytesreferences/sim-codebert-embeddings.mddoc · 4,479 bytesreferences/sim-cosine-vsm-files.mddoc · 3,915 bytesreferences/sim-cross-pr-feature-mapping.mddoc · 4,097 bytesreferences/sim-doc-code-alignment.mddoc · 4,648 bytesreferences/sim-pdg-semantic-clones.mddoc · 4,351 bytes
Read excerpt
# pproenca Linguistic and Semantic Algorithms Best Practices
Reference of 40 algorithms an agent should reach for when extracting structure, meaning, history, or risk signals from source code and commit data. Categories are ordered by **insight-per-effort** — how much non-obvious truth the technique exposes relative to how easy it is to apply. The first two categories target the highest-leverage questions: *what business entities live in this code?* and *where else does this concept already exist?* — questions that grep and intuition cannot answer.
## When to Apply
Reach for these algorithms when:
- **Orienting in an unfamiliar codebase**: PageRank the import graph to find the core, run LDA over identifier tokens to discover business themes, mine change coupling to surface hidden architectural couplings.
- **Hunting a bug from a description**: BM25 + history prior + embedding re-rank produces a ranked file shortlist far better than grep.
- **Scoping a feature**: find prior PRs that did similar work via embedding similarity; map the feature's vocabulary against the codebase's domain via TF-IDF and noun-phrase mining.
- **Reviewing a refactor**: AST-level GumTree diff reveals semantic impact text diff hides; PDG isomorphism finds the "same logic, different code" twin you should also update.
- **Auditing risk**: hotspots (churn × complexity), bus factor, defect-magnet density, dead-code candidates — together they direct attention to the parts of the codebase that pay back attention.
- **Identifying domain entities and bounded contexts**: noun-phrase mining + TF-IDF rare-term extraction + Louvain communities + Jensen-Shannon divergence on per-cluster vocabulary.