Scope: this file applies to the entire repository. There are no nested AGENTS.md files.
Lumen is a pnpm workspace: src/ is the published ESM package @theojs/lumen, while docs/ is its VitePress
documentation site and integration consumer through workspace:*.
The stack is Vue, VitePress, Vite, TypeScript, CSS, and Biome. Read the package-manager pin from the root
package.json; read dependency and peer constraints from the applicable package manifests and
pnpm-workspace.yaml; read resolved versions from pnpm-lock.yaml; and read tool versions from config or schema
metadata. Do not copy version snapshots into this file. Cloudflare Pages builds the documentation site from main.
The npm package is not bundled before publication. It ships .ts, .vue, CSS, and declaration files directly, so
source paths and package metadata are part of the consumer contract.
| Path | Responsibility |
|---|---|
src/components/ |
Public Vue components exported by src/components/index.ts; common/ contains internal helpers. |
src/composables/ |
Public analytics helpers and VitePress utilities. |
src/types/ |
Package root entry, public types, and generated declaration shims. |
src/style/ |
Public CSS and the CSS subpath exports declared in src/package.json. |
docs/ |
User guides plus VitePress configuration, theme integration, and workspace-package consumer. |
.github/workflows/ |
Package previews, tag release notes, and the scheduled npm download report. |
docs/public/; readme.md |
Static documentation assets copied into the build output; root README symlink to src/readme.md. |
- Confirm the repository, branch, upstream, ahead/behind state, worktree, index, untracked files, and in-progress Git operations. Preserve existing work; do not stash, reset, clean, or overwrite it.
- Read the relevant manifests, configuration, source entry points, and this file before editing.
- When the worktree is clean and the current branch tracks the intended remote, synchronize with
git pull --ff-only. Otherwise report the state instead of forcing synchronization. - Keep changes scoped. Dependency changes must use pnpm and include the matching
pnpm-lock.yamlupdate. - Use
pnpm install --frozen-lockfileto reproduce an already-aligned manifest and lockfile.
Do not use pnpm clean or its subcommands as routine validation; they delete dependencies, output, and the lockfile.
Keep registry credentials outside the repository; .npmrc is absent by design, and publish authentication belongs in
user or CI configuration.
pnpm install --frozen-lockfile
pnpm run dev
pnpm run preview
pnpm run format:check
pnpm -C src exec tsc --noEmit -p tsconfig.json
pnpm run build
npm_config_cache=/tmp/lumen-npm-cache npm pack --dry-run --json ./src
git diff --checkRun commands from the repository root. pnpm run format writes safe Biome formatting, lint, and import-order fixes;
format:check checks the formatter, recommended linter rules, and assist actions without writing files.
- Treat component names and props, exported functions and types, CSS variables, package export paths, the
filesallowlist, andsideEffectsas public compatibility surfaces. Do not make breaking changes without explicit scope. src/types/index.tsis the runtime package entry. Itscomponents-var.cssandiconify-iconimports are intentional side effects, not dead imports.- Keep top-level Vue
definePropsruntime keys in an inline object shape. Imported types may be used as property value types, but directdefineProps<ImportedInterface>()can fail during SFC runtime prop extraction;pnpm run buildis the authoritative integration check. pnpm run generate:dtsrewritessrc/types/index.d.ts,src/types/shims.d.ts, andsrc/types/style.d.ts. Run it only when changing their generator or intended output, then review all three tracked files.- Keep VitePress sidebar links absolute (for example,
/guide/getting-started). Do not combine a sidebar sectionbasewith relative links;vitepress-plugin-llmsmay fail to match those pages. - The docs build generates
llms.txtandllms-full.txtat the output root. Production redirects/llms.mdand/llms-full.mdto those files through Cloudflare; the.mdpaths are aliases, not build artifacts. - The docs theme imports the package root, styles, components, analytics, and public data types. A docs build is the primary integration check; the repository has no separate test suite.
minimumReleaseAge: 0is an intentional install policy override. Changing or removing it can alter dependency resolution; verify its current semantics against the pinned pnpm version andpnpm-workspace.yamlbefore editing. KeepallowBuildslimited to installed dependencies that actually run lifecycle scripts.
| Change | Required checks |
|---|---|
AGENTS.md only |
git diff --check; verify every documented command/path; confirm only AGENTS.md changed. |
| Docs or VitePress/Cloudflare Pages config | pnpm run format:check, pnpm run build, git diff --check. |
| Components, composables, or public types | Format check, source TypeScript check, docs build, package dry-run, diff check. |
| CSS | Format check, docs build, package dry-run, diff check. |
| Dependencies, exports, package files, or release config | Frozen install after manifests/lockfile align, then the full checks above and review the dry-run file list. |
Publish Commitrunspkg-pr-newforsrc/**changes. It previews the package but does not run Biome, TypeScript, or the docs build; do not treat it as full CI.- Cloudflare Pages tracks
s-theo/lumenonmain, runspnpm run build, and publishesdocs/.vitepress/dist. - CodeQL default setup, SonarCloud, and Cloudflare Pages checks are external integrations, not local workflow files.
pnpm run releaserunsbumpp, creates a signed release commit/tag, and publishessrc/to npm. Av*tag then triggers the GitHub release-notes workflow. Run release commands only with explicit release authorization.- Do not commit, push, create or mutate a PR, merge, publish, deploy, or delete branches unless Theo explicitly authorizes it. Before handoff, inspect the diff/status and report validations, warnings, Git state, and blockers.