Skip to content

Graphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.

feat(core): add 26 non-code language configs with filename-based detection

Lum1104c76b0a1f2d43
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/batch.ts b/understand-anything-plugin/packages/core/src/languages/configs/batch.ts
new file mode 100644
index 00000000..3fc19055
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/batch.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const batchConfig = {
+ id: "batch",
+ displayName: "Batch Script",
+ extensions: [".bat", ".cmd"],
+ concepts: ["commands", "variables", "labels", "goto", "call", "echo", "set", "for loops", "if conditions"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/css.ts b/understand-anything-plugin/packages/core/src/languages/configs/css.ts
new file mode 100644
index 00000000..e8b4de40
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/css.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const cssConfig = {
+ id: "css",
+ displayName: "CSS",
+ extensions: [".css", ".scss", ".less"],
+ concepts: ["selectors", "properties", "media queries", "flexbox", "grid", "variables", "animations", "specificity"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/csv.ts b/understand-anything-plugin/packages/core/src/languages/configs/csv.ts
new file mode 100644
index 00000000..d7f6e062
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/csv.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const csvConfig = {
+ id: "csv",
+ displayName: "CSV",
+ extensions: [".csv", ".tsv"],
+ concepts: ["headers", "rows", "delimiters", "quoting", "escaping"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/docker-compose.ts b/understand-anything-plugin/packages/core/src/languages/configs/docker-compose.ts
new file mode 100644
index 00000000..d9fadd49
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/docker-compose.ts
@@ -0,0 +1,15 @@
+import type { LanguageConfig } from "../types.js";
+
+export const dockerComposeConfig = {
+ id: "docker-compose",
+ displayName: "Docker Compose",
+ extensions: [],
+ filenames: ["docker-compose.yml", "docker-compose.yaml", "compose.yml", "compose.yaml"],
+ concepts: ["services", "networks", "volumes", "ports", "environment", "depends_on", "build context", "healthchecks"],
+ filePatterns: {
+ entryPoints: ["docker-compose.yml", "compose.yml"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/dockerfile.ts b/understand-anything-plugin/packages/core/src/languages/configs/dockerfile.ts
new file mode 100644
index 00000000..918bcbce
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/dockerfile.ts
@@ -0,0 +1,15 @@
+import type { LanguageConfig } from "../types.js";
+
+export const dockerfileConfig = {
+ id: "dockerfile",
+ displayName: "Dockerfile",
+ extensions: [],
+ filenames: ["Dockerfile", "Dockerfile.dev", "Dockerfile.prod", "Dockerfile.test"],
+ concepts: ["multi-stage builds", "layers", "base images", "COPY/ADD", "EXPOSE", "ENTRYPOINT", "CMD", "ARG", "ENV"],
+ filePatterns: {
+ entryPoints: ["Dockerfile"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/env.ts b/understand-anything-plugin/packages/core/src/languages/configs/env.ts
new file mode 100644
index 00000000..791b4b01
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/env.ts
@@ -0,0 +1,15 @@
+import type { LanguageConfig } from "../types.js";
+
+export const envConfig = {
+ id: "env",
+ displayName: "Environment Variables",
+ extensions: [".env"],
+ filenames: [".env", ".env.local", ".env.development", ".env.production", ".env.test", ".env.example"],
+ concepts: ["key-value pairs", "variable interpolation", "secrets", "environment-specific config"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [".env", ".env.*"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/github-actions.ts b/understand-anything-plugin/packages/core/src/languages/configs/github-actions.ts
new file mode 100644
index 00000000..a37a5666
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/github-actions.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const githubActionsConfig = {
+ id: "github-actions",
+ displayName: "GitHub Actions",
+ extensions: [],
+ concepts: ["workflows", "jobs", "steps", "actions", "triggers", "secrets", "matrix strategy", "artifacts"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [".github/workflows/*.yml"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/graphql.ts b/understand-anything-plugin/packages/core/src/languages/configs/graphql.ts
new file mode 100644
index 00000000..b91e862d
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/graphql.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const graphqlConfig = {
+ id: "graphql",
+ displayName: "GraphQL",
+ extensions: [".graphql", ".gql"],
+ concepts: ["types", "queries", "mutations", "subscriptions", "resolvers", "directives", "fragments", "schema"],
+ filePatterns: {
+ entryPoints: ["schema.graphql"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/html.ts b/understand-anything-plugin/packages/core/src/languages/configs/html.ts
new file mode 100644
index 00000000..9708f850
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/html.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const htmlConfig = {
+ id: "html",
+ displayName: "HTML",
+ extensions: [".html", ".htm"],
+ concepts: ["elements", "attributes", "semantic tags", "forms", "meta tags", "scripts", "stylesheets", "accessibility"],
+ filePatterns: {
+ entryPoints: ["index.html"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/index.ts b/understand-anything-plugin/packages/core/src/languages/configs/index.ts
index f0a76766..5db66162 100644
--- a/understand-anything-plugin/packages/core/src/languages/configs/index.ts
+++ b/understand-anything-plugin/packages/core/src/languages/configs/index.ts
@@ -11,8 +11,36 @@ import { swiftConfig } from "./swift.js";
import { kotlinConfig } from "./kotlin.js";
import { cppConfig } from "./cpp.js";
import { csharpConfig } from "./csharp.js";
+// Non-code language configs
+import { markdownConfig } from "./markdown.js";
+import { yamlConfig } from "./yaml.js";
+import { jsonConfigConfig } from "./json-config.js";
+import { tomlConfig } from "./toml.js";
+import { envConfig } from "./env.js";
+import { xmlConfig } from "./xml.js";
+import { dockerfileConfig } from "./dockerfile.js";
+import { sqlConfig } from "./sql.js";
+import { graphqlConfig } from "./graphql.js";
+import { protobufConfig } from "./protobuf.js";
+import { terraformConfig } from "./terraform.js";
+import { githubActionsConfig } from "./github-actions.js";
+import { makefileConfig } from "./makefile.js";
+import { shellConfig } from "./shell.js";
+import { htmlConfig } from "./html.js";
+import { cssConfig } from "./css.js";
+import { openapiConfig } from "./openapi.js";
+import { kubernetesConfig } from "./kubernetes.js";
+import { dockerComposeConfig } from "./docker-compose.js";
+import { jsonSchemaConfig } from "./json-schema.js";
+import { csvConfig } from "./csv.js";
+import { restructuredtextConfig } from "./restructuredtext.js";
+import { powershellConfig } from "./powershell.js";
+import { batchConfig } from "./batch.js";
+import { jenkinsfileConfig } from "./jenkinsfile.js";
+import { plaintextConfig } from "./plaintext.js";
export const builtinLanguageConfigs: LanguageConfig[] = [
+ // Code languages
typescriptConfig,
javascriptConfig,
pythonConfig,
@@ -25,9 +53,37 @@ export const builtinLanguageConfigs: LanguageConfig[] = [
kotlinConfig,
cppConfig,
csharpConfig,
+ // Non-code languages
+ markdownConfig,
+ yamlConfig,
+ jsonConfigConfig,
+ tomlConfig,
+ envConfig,
+ xmlConfig,
+ dockerfileConfig,
+ sqlConfig,
+ graphqlConfig,
+ protobufConfig,
+ terraformConfig,
+ githubActionsConfig,
+ makefileConfig,
+ shellConfig,
+ htmlConfig,
+ cssConfig,
+ openapiConfig,
+ kubernetesConfig,
+ dockerComposeConfig,
+ jsonSchemaConfig,
+ csvConfig,
+ restructuredtextConfig,
+ powershellConfig,
+ batchConfig,
+ jenkinsfileConfig,
+ plaintextConfig,
];
export {
+ // Code languages
typescriptConfig,
javascriptConfig,
pythonConfig,
@@ -40,4 +96,31 @@ export {
kotlinConfig,
cppConfig,
csharpConfig,
+ // Non-code languages
+ markdownConfig,
+ yamlConfig,
+ jsonConfigConfig,
+ tomlConfig,
+ envConfig,
+ xmlConfig,
+ dockerfileConfig,
+ sqlConfig,
+ graphqlConfig,
+ protobufConfig,
+ terraformConfig,
+ githubActionsConfig,
+ makefileConfig,
+ shellConfig,
+ htmlConfig,
+ cssConfig,
+ openapiConfig,
+ kubernetesConfig,
+ dockerComposeConfig,
+ jsonSchemaConfig,
+ csvConfig,
+ restructuredtextConfig,
+ powershellConfig,
+ batchConfig,
+ jenkinsfileConfig,
+ plaintextConfig,
};
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/jenkinsfile.ts b/understand-anything-plugin/packages/core/src/languages/configs/jenkinsfile.ts
new file mode 100644
index 00000000..383fb361
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/jenkinsfile.ts
@@ -0,0 +1,15 @@
+import type { LanguageConfig } from "../types.js";
+
+export const jenkinsfileConfig = {
+ id: "jenkinsfile",
+ displayName: "Jenkinsfile",
+ extensions: [],
+ filenames: ["Jenkinsfile"],
+ concepts: ["pipeline", "stages", "steps", "agents", "environment", "post actions", "parallel execution", "shared libraries"],
+ filePatterns: {
+ entryPoints: ["Jenkinsfile"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/json-config.ts b/understand-anything-plugin/packages/core/src/languages/configs/json-config.ts
new file mode 100644
index 00000000..549deec0
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/json-config.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const jsonConfigConfig = {
+ id: "json",
+ displayName: "JSON",
+ extensions: [".json", ".jsonc"],
+ concepts: ["objects", "arrays", "nesting", "schema references", "comments (JSONC)"],
+ filePatterns: {
+ entryPoints: ["package.json"],
+ barrels: [],
+ tests: [],
+ config: ["tsconfig.json", "package.json", ".eslintrc.json"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/json-schema.ts b/understand-anything-plugin/packages/core/src/languages/configs/json-schema.ts
new file mode 100644
index 00000000..8a132c8c
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/json-schema.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const jsonSchemaConfig = {
+ id: "json-schema",
+ displayName: "JSON Schema",
+ extensions: [],
+ concepts: ["types", "properties", "required fields", "$ref", "$defs", "allOf/anyOf/oneOf", "patterns", "validation"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/kubernetes.ts b/understand-anything-plugin/packages/core/src/languages/configs/kubernetes.ts
new file mode 100644
index 00000000..93803192
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/kubernetes.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const kubernetesConfig = {
+ id: "kubernetes",
+ displayName: "Kubernetes",
+ extensions: [],
+ concepts: ["deployments", "services", "pods", "configmaps", "secrets", "ingress", "volumes", "namespaces"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: ["k8s/*.yaml", "kubernetes/*.yaml"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/makefile.ts b/understand-anything-plugin/packages/core/src/languages/configs/makefile.ts
new file mode 100644
index 00000000..f8c679a3
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/makefile.ts
@@ -0,0 +1,15 @@
+import type { LanguageConfig } from "../types.js";
+
+export const makefileConfig = {
+ id: "makefile",
+ displayName: "Makefile",
+ extensions: [".mk"],
+ filenames: ["Makefile", "GNUmakefile", "makefile"],
+ concepts: ["targets", "dependencies", "recipes", "variables", "pattern rules", "phony targets", "includes"],
+ filePatterns: {
+ entryPoints: ["Makefile"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/markdown.ts b/understand-anything-plugin/packages/core/src/languages/configs/markdown.ts
new file mode 100644
index 00000000..f20de859
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/markdown.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const markdownConfig = {
+ id: "markdown",
+ displayName: "Markdown",
+ extensions: [".md", ".mdx"],
+ concepts: ["headings", "links", "code blocks", "front matter", "lists", "tables", "images"],
+ filePatterns: {
+ entryPoints: ["README.md"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/openapi.ts b/understand-anything-plugin/packages/core/src/languages/configs/openapi.ts
new file mode 100644
index 00000000..ae250e52
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/openapi.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const openapiConfig = {
+ id: "openapi",
+ displayName: "OpenAPI",
+ extensions: [],
+ concepts: ["paths", "operations", "schemas", "parameters", "responses", "security schemes", "tags", "servers"],
+ filePatterns: {
+ entryPoints: ["openapi.yaml", "swagger.yaml"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/plaintext.ts b/understand-anything-plugin/packages/core/src/languages/configs/plaintext.ts
new file mode 100644
index 00000000..e9e737d7
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/plaintext.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const plaintextConfig = {
+ id: "plaintext",
+ displayName: "Plain Text",
+ extensions: [".txt", ".text"],
+ concepts: ["paragraphs", "lists", "sections"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/powershell.ts b/understand-anything-plugin/packages/core/src/languages/configs/powershell.ts
new file mode 100644
index 00000000..409c30d2
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/powershell.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const powershellConfig = {
+ id: "powershell",
+ displayName: "PowerShell",
+ extensions: [".ps1", ".psm1", ".psd1"],
+ concepts: ["cmdlets", "pipelines", "modules", "functions", "parameters", "variables", "error handling"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/protobuf.ts b/understand-anything-plugin/packages/core/src/languages/configs/protobuf.ts
new file mode 100644
index 00000000..4ae5fe9f
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/protobuf.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const protobufConfig = {
+ id: "protobuf",
+ displayName: "Protocol Buffers",
+ extensions: [".proto"],
+ concepts: ["messages", "services", "enums", "oneof", "repeated fields", "maps", "packages", "imports"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/restructuredtext.ts b/understand-anything-plugin/packages/core/src/languages/configs/restructuredtext.ts
new file mode 100644
index 00000000..42cc732f
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/restructuredtext.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const restructuredtextConfig = {
+ id: "restructuredtext",
+ displayName: "reStructuredText",
+ extensions: [".rst"],
+ concepts: ["headings", "directives", "roles", "cross-references", "toctree", "code blocks", "admonitions"],
+ filePatterns: {
+ entryPoints: ["index.rst"],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/shell.ts b/understand-anything-plugin/packages/core/src/languages/configs/shell.ts
new file mode 100644
index 00000000..e3448fcd
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/shell.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const shellConfig = {
+ id: "shell",
+ displayName: "Shell Script",
+ extensions: [".sh", ".bash", ".zsh"],
+ concepts: ["variables", "functions", "conditionals", "loops", "pipes", "redirection", "subshells", "exit codes"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [".bashrc", ".zshrc", ".profile"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/sql.ts b/understand-anything-plugin/packages/core/src/languages/configs/sql.ts
new file mode 100644
index 00000000..cad3ca4a
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/sql.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const sqlConfig = {
+ id: "sql",
+ displayName: "SQL",
+ extensions: [".sql"],
+ concepts: ["tables", "columns", "indexes", "foreign keys", "views", "stored procedures", "triggers", "migrations"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: [],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/terraform.ts b/understand-anything-plugin/packages/core/src/languages/configs/terraform.ts
new file mode 100644
index 00000000..23edb2f2
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/terraform.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const terraformConfig = {
+ id: "terraform",
+ displayName: "Terraform",
+ extensions: [".tf", ".tfvars"],
+ concepts: ["resources", "data sources", "variables", "outputs", "modules", "providers", "state", "workspaces"],
+ filePatterns: {
+ entryPoints: ["main.tf"],
+ barrels: [],
+ tests: [],
+ config: ["terraform.tfvars", "variables.tf"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/toml.ts b/understand-anything-plugin/packages/core/src/languages/configs/toml.ts
new file mode 100644
index 00000000..70e444cf
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/toml.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const tomlConfig = {
+ id: "toml",
+ displayName: "TOML",
+ extensions: [".toml"],
+ concepts: ["tables", "inline tables", "arrays of tables", "key-value pairs", "dotted keys"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: ["Cargo.toml", "pyproject.toml", "netlify.toml"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/xml.ts b/understand-anything-plugin/packages/core/src/languages/configs/xml.ts
new file mode 100644
index 00000000..31b512a2
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/xml.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const xmlConfig = {
+ id: "xml",
+ displayName: "XML",
+ extensions: [".xml", ".xsl", ".xsd", ".svg", ".plist"],
+ concepts: ["elements", "attributes", "namespaces", "DTD", "XPath", "XSLT", "schemas"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: ["pom.xml", "web.xml", "AndroidManifest.xml"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/configs/yaml.ts b/understand-anything-plugin/packages/core/src/languages/configs/yaml.ts
new file mode 100644
index 00000000..1fb5427b
--- /dev/null
+++ b/understand-anything-plugin/packages/core/src/languages/configs/yaml.ts
@@ -0,0 +1,14 @@
+import type { LanguageConfig } from "../types.js";
+
+export const yamlConfig = {
+ id: "yaml",
+ displayName: "YAML",
+ extensions: [".yaml", ".yml"],
+ concepts: ["mappings", "sequences", "anchors", "aliases", "multi-document", "tags"],
+ filePatterns: {
+ entryPoints: [],
+ barrels: [],
+ tests: [],
+ config: ["*.yaml", "*.yml"],
+ },
+} satisfies LanguageConfig;
diff --git a/understand-anything-plugin/packages/core/src/languages/language-registry.ts b/understand-anything-plugin/packages/core/src/languages/language-registry.ts
index 542cd1de..d8eb0c28 100644
--- a/understand-anything-plugin/packages/core/src/languages/language-registry.ts
+++ b/understand-anything-plugin/packages/core/src/languages/language-registry.ts
@@ -9,6 +9,7 @@ import { builtinLanguageConfigs } from "./configs/index.js";
export class LanguageRegistry {
private byId = new Map<string, LanguageConfig>();
private byExtension = new Map<string, LanguageConfig>();
+ private byFilename = new Map<string, LanguageConfig>();
register(config: LanguageConfig): void {
const parsed = LanguageConfigSchema.parse(config);
@@ -18,6 +19,11 @@ export class LanguageRegistry {
const key = ext.startsWith(".") ? ext : `.${ext}`;
this.byExtension.set(key, parsed);
}
+ if (parsed.filenames) {
+ for (const filename of parsed.filenames) {
+ this.byFilename.set(filename.toLowerCase(), parsed);
+ }
+ }
}
getById(id: string): LanguageConfig | null {
@@ -30,6 +36,11 @@ export class LanguageRegistry {
}
getForFile(filePath: string): LanguageConfig | null {
+ // Try filename-based lookup first (more specific: docker-compose.yml, Makefile, etc.)
+ const basename = filePath.split("/").pop() ?? filePath;
+ const filenameMatch = this.byFilename.get(basename.toLowerCase());
+ if (filenameMatch) return filenameMatch;
+ // Fall back to extension-based lookup
const lastDot = filePath.lastIndexOf(".");
if (lastDot === -1) return null;
const ext = filePath.slice(lastDot).toLowerCase();
diff --git a/understand-anything-plugin/packages/core/src/languages/types.ts b/understand-anything-plugin/packages/core/src/languages/types.ts
index 7d06c3ae..c5499a9a 100644
--- a/understand-anything-plugin/packages/core/src/languages/types.ts
+++ b/understand-anything-plugin/packages/core/src/languages/types.ts
@@ -26,7 +26,8 @@ export type FilePatternConfig = z.infer<typeof FilePatternConfigSchema>;
export const LanguageConfigSchema = z.object({
id: z.string().min(1),
displayName: z.string().min(1),
- extensions: z.array(z.string()).min(1),
+ extensions: z.array(z.string()),
+ filenames: z.array(z.string()).optional(),
treeSitter: TreeSitterConfigSchema.optional(),
concepts: z.array(z.string()),
filePatterns: FilePatternConfigSchema,