framework symbols
why
path symbols (_, $, ()) carry meaning only because a specific parser in
a specific directory gives them behavior. reused elsewhere they become
decorative lies: readers assume grammar that does not exist, import paths
expecting special handling, and tribal naming rules form around symbols that
mean nothing. keeping symbols inside their owning parser preserves the
invariant that a name's shape predicts its behavior.
rule
symbols in files and folders are framework grammar, not a project-wide naming palette: use a symbol only in the directory and framework that parses it, never as decorative shorthand elsewhere.
reusing a routing symbol outside its parsing context creates false meaning:
services/_internal/billing reads as a pathless layout, but no parser
enforces it — readers open files instead of trusting names, and eventually
someone writes a rule "all internal services start with _" based on a lie
(tribal memory instead of enforced grammar).
symbol adoption test
before creating or using a symbolic filename/folder convention, answer: which parser recognizes it, which directory enables that grammar, what behavior it causes, where the authoritative framework documentation is. any answer missing → use ordinary domain/responsibility names.
| symbol source | permitted meaning | prohibited meaning |
|---|---|---|
| framework route grammar | route segment, layout, parameter, group, or generated-tree behavior in that framework's route directory | a general way to classify files elsewhere. |
| platform entrypoint convention | framework-invoked resource shell in the declared source root | a business domain, provider adapter, or utility category. |
| package import alias | source-root/module resolution at configured compiler/runtime boundaries | a substitute for a workspace package api. |
| locally invented prefix | only after a documented parser/tool contract enforces it | visual organization without a machine or explicit team contract. |
verification
for each symbol-bearing path, locate the framework/parser configuration and prove the generated route/resource behavior. list symbol-prefixed folders in the source tree; each must be explainable by one row of this document, not by local convention memory.
cloudflare resource prefix
the ~ source-root prefix and its resource families are owned by the
cloudflare stack; this file
defers to that owner and does not restate its rules.
tanstack router
| symbol | meaning in the routes directory |
|---|---|
. | nested route separator. |
$name | dynamic URL parameter. |
_name | pathless layout route. |
name_ | exclude route from parent nesting. |
-name | ignore from generated route tree. |
(name) | route group omitted from the url. |
[x] | escape a special filename character. |
index / route | exact parent route / directory route file. |
TanStack router does not assign a general filename meaning to +.
next.js app router
| symbol | meaning in app/ |
|---|---|
[name] / [...name] / [[...name]] | dynamic, catch-all, and optional catch-all segments. |
_name | private implementation folder. |
(name) | route group omitted from the url. |
@name | parallel route slot. |
(.), (..), (...) | intercepted route matchers. |
sveltekit
| symbol | meaning in src/routes/ |
|---|---|
+page, +layout, +error | framework route files. |
[name] / [[name]] / [...name] | dynamic, optional, and rest parameters. |
(name) | route group omitted from the url. |
@ | layout hierarchy reset in +page@ or +layout@. |
remix
| symbol | meaning in app/routes/ |
|---|---|
. | URL and layout nesting delimiter. |
$name / $ | dynamic parameter / splat route. |
_name | pathless layout route. |
name_ | URL segment without parent layout nesting. |
[x] | escape a routing character. |
nuxt
| symbol | meaning in pages/ |
|---|---|
[name] / [[name]] / [...name] | dynamic, optional, and catch-all parameters. |
.client / .server | client-only or server-only page variant. |
good and bad
bad
app/(features)/billing/ // route group grammar outside app directoryservices/_internal/ // pathless-layout token, no parser reads it herecomponents/+panel.tsx // sveltekit route file token on a componentutils/[cacheKey]/index.ts // next.js dynamic segment syntax in utils folder
routing symbols are reused where no parser reads them: services/_internal/logging
reads as "internal", the parser never enforces it, imitators create
services/_helpers expecting the same behavior, and the tokens become tribal
memory instead of enforced grammar.
good
app/(features)/billing/page.tsx // next.js route group in app/: parser enforces url-omittingsrc/routes/_auth.login.tsx // tanstack pathless layout in src/routes/: parser recognizes itsrc/routes/+page.svelte // sveltekit route file in src/routes/: framework-invokedcomponents/AuthPanel.tsx // ordinary PascalCase component name: no parsing context neededinfra/database/index.ts // folder barrel for schema/mapper leaves: documented nesting rule
each symbol lives only in the directory and framework whose parser assigns it that exact meaning; outside that context, use plain explicit names. a symbol seen in the tree is either enforced grammar or nothing, never a guess — new team members and agents navigate by that contract instead of opening files.
do not
- reuse routing tokens in unrelated source folders.
- invent a special symbol without documenting its parser, scope, and owner.
- treat the same symbol as having the same meaning across frameworks.
TanStack Router, Next.js App Router, SvelteKit, Remix, and Nuxt publish the authoritative naming lists for their own symbols; this standard defers to them by name, not by link.