diff --git a/.agent/AGENTS.md b/.agents/AGENTS.md
similarity index 99%
rename from .agent/AGENTS.md
rename to .agents/AGENTS.md
index ac227cb97..82a1617c2 100644
--- a/.agent/AGENTS.md
+++ b/.agents/AGENTS.md
@@ -11,4 +11,3 @@ Custom vocabulary mapped to GitHub labels (e.g., `needs triage`, `needs more inf
### Domain docs
Single-context layout with `CONTEXT.md` in the `docs/` directory. See `.agent/docs/domain.md`.
-
diff --git a/.agent/README.md b/.agents/README.md
similarity index 94%
rename from .agent/README.md
rename to .agents/README.md
index 4d00de0f5..ffd1caa31 100644
--- a/.agent/README.md
+++ b/.agents/README.md
@@ -1,4 +1,5 @@
-
+{/* This file is for human eyes to understand the .agent directory structure and conventions */}
+
# Agent configuration & documentation
This directory is the central hub for AI agent metadata, configuration, and guidance. It is designed to keep the project root clean while providing agents with the context they need to operate effectively.
@@ -6,16 +7,21 @@ This directory is the central hub for AI agent metadata, configuration, and guid
## Directory overview
### Core metadata
+
- **`AGENTS.md`**: The primary entry point for agents. It contains the "Agent Skills" block that defines how skills like `triage`, `to-prd`, and `diagnose` should operate in this repo.
### Skill configuration (matt pocock's engineering skills)
+
Instructional documentation for automated skills, located in `.agent/docs/`:
+
- **`docs/issue-tracker.md`**: How to use the `gh` CLI to manage issues and PRDs.
- **`docs/triage-labels.md`**: Mapping of canonical triage roles (e.g., `needs-triage`) to this repo's specific GitHub labels.
- **`docs/domain.md`**: Rules for consuming and contributing to the project's domain documentation (`docs/CONTEXT.md` and ADRs).
### Archived platforms (`/platforms`)
+
Configuration for other AI platforms that are not currently the primary agent. To use these, move them to the root as described in their metadata:
+
- `.cursor/`: Cursor IDE configuration.
- `.claude/`: Claude Dev / Cline configuration.
- `copilot-instructions.md`: Custom instructions for GitHub Copilot.
diff --git a/.agent/docs/CONTEXT.md b/.agents/docs/CONTEXT.md
similarity index 100%
rename from .agent/docs/CONTEXT.md
rename to .agents/docs/CONTEXT.md
diff --git a/.agent/docs/domain.md b/.agents/docs/domain.md
similarity index 100%
rename from .agent/docs/domain.md
rename to .agents/docs/domain.md
diff --git a/.agent/docs/issue-tracker.md b/.agents/docs/issue-tracker.md
similarity index 100%
rename from .agent/docs/issue-tracker.md
rename to .agents/docs/issue-tracker.md
diff --git a/.agent/docs/triage-labels.md b/.agents/docs/triage-labels.md
similarity index 100%
rename from .agent/docs/triage-labels.md
rename to .agents/docs/triage-labels.md
diff --git a/.agent/platforms/.claude/CLAUDE.md b/.agents/platforms/.claude/CLAUDE.md
similarity index 100%
rename from .agent/platforms/.claude/CLAUDE.md
rename to .agents/platforms/.claude/CLAUDE.md
diff --git a/.agent/platforms/.claude/settings.json b/.agents/platforms/.claude/settings.json
similarity index 100%
rename from .agent/platforms/.claude/settings.json
rename to .agents/platforms/.claude/settings.json
diff --git a/.agent/platforms/.claude/skills b/.agents/platforms/.claude/skills
similarity index 100%
rename from .agent/platforms/.claude/skills
rename to .agents/platforms/.claude/skills
diff --git a/.agent/platforms/.cursor/rules/arktype.mdc b/.agents/platforms/.cursor/rules/arktype.mdc
similarity index 100%
rename from .agent/platforms/.cursor/rules/arktype.mdc
rename to .agents/platforms/.cursor/rules/arktype.mdc
diff --git a/.agent/platforms/.cursor/rules/coding-guidelines.mdc b/.agents/platforms/.cursor/rules/coding-guidelines.mdc
similarity index 100%
rename from .agent/platforms/.cursor/rules/coding-guidelines.mdc
rename to .agents/platforms/.cursor/rules/coding-guidelines.mdc
diff --git a/.agent/platforms/.cursor/rules/monorepo.mdc b/.agents/platforms/.cursor/rules/monorepo.mdc
similarity index 100%
rename from .agent/platforms/.cursor/rules/monorepo.mdc
rename to .agents/platforms/.cursor/rules/monorepo.mdc
diff --git a/.agent/platforms/.cursor/rules/pnpm.mdc b/.agents/platforms/.cursor/rules/pnpm.mdc
similarity index 100%
rename from .agent/platforms/.cursor/rules/pnpm.mdc
rename to .agents/platforms/.cursor/rules/pnpm.mdc
diff --git a/.agent/platforms/.cursor/rules/test-patterns.mdc b/.agents/platforms/.cursor/rules/test-patterns.mdc
similarity index 100%
rename from .agent/platforms/.cursor/rules/test-patterns.mdc
rename to .agents/platforms/.cursor/rules/test-patterns.mdc
diff --git a/.agent/platforms/.cursor/skills b/.agents/platforms/.cursor/skills
similarity index 100%
rename from .agent/platforms/.cursor/skills
rename to .agents/platforms/.cursor/skills
diff --git a/.agent/platforms/copilot-instructions.md b/.agents/platforms/copilot-instructions.md
similarity index 98%
rename from .agent/platforms/copilot-instructions.md
rename to .agents/platforms/copilot-instructions.md
index f981d5bcc..cdf06e658 100644
--- a/.agent/platforms/copilot-instructions.md
+++ b/.agents/platforms/copilot-instructions.md
@@ -5,7 +5,8 @@
ArkEnv is a TypeScript library that provides typesafe environment variable parsing and validation, powered by ArkType. It enables developers to define environment variable schemas with full TypeScript type inference and runtime validation.
### Key features
-- **Typesafe**: Full TypeScript support with inferred types
+
+- **Typesafe**: Full TypeScript support with inferred types
- **Runtime validation**: Catch missing or invalid environment variables early
- **Powered by ArkType**: Leverage ArkType's powerful type system
- **Lightweight**: Zero external, tiny bundle size
@@ -31,6 +32,7 @@ arkenv/
## Development setup
The project uses modern tooling:
+
- **pnpm**: Package manager with workspace support
- **Turbo**: Monorepo build system for fast, incremental builds
- **Biome**: Fast linting and formatting (replaces ESLint + Prettier)
@@ -39,6 +41,7 @@ The project uses modern tooling:
- **Changesets**: Version management and changelog generation
### Common commands
+
- `pnpm install` - Install dependencies
- `pnpm build` - Build all packages
- `pnpm build:packages` - Build only packages (not apps)
@@ -59,6 +62,7 @@ The core package provides:
4. **Type inference** - Full TypeScript type inference from schemas
### Key files
+
- `src/create-env.ts` - Core `createEnv` implementation
- `src/types.ts` - Built-in type validators (host, port, url, etc.)
- `src/errors.ts` - Error handling and formatting
@@ -67,6 +71,7 @@ The core package provides:
## Coding patterns
### Environment schema definition
+
```typescript
import arkenv from 'arkenv';
@@ -80,14 +85,18 @@ const env = arkenv({
```
### Built-in validators
+
The library provides common validators in `src/types.ts`:
+
- `host` - Valid IP address or hostname
- `port` - Valid port number (0-65535)
- `url` - Valid URL
- `email` - Valid email address
### Error handling
+
Environment validation errors are thrown early with descriptive messages showing:
+
- Which variables are missing or invalid
- Expected vs actual values
- Helpful suggestions for fixing issues
@@ -99,9 +108,11 @@ Environment validation errors are thrown early with descriptive messages showing
The project uses three types of tests:
#### Unit tests (`*.test.ts` or `*.test.tsx`)
+
**What:** Test individual functions, components, and hooks in isolation with mocked dependencies.
Tests are located alongside source files with `.test.ts` suffix:
+
- `create-env.test.ts` - Tests for main `createEnv` functionality
- `types.test.ts` - Tests for built-in validators
- `errors.test.ts` - Tests for error handling
@@ -109,14 +120,17 @@ Tests are located alongside source files with `.test.ts` suffix:
- `copy-button.test.tsx` - Tests `CopyButton` component with mocked dependencies
**Key Characteristics:**
-- Fast execution (< 100ms per test)
+
+- Fast execution (\< 100ms per test)
- Mocked external dependencies (clipboard, network, etc.)
- Focused on single unit behavior
#### Integration tests (`*.integration.test.ts` or `*.integration.test.tsx`)
+
**What:** Test how multiple units work together without mocking their interactions.
**Examples:**
+
- `custom-types.integration.test.ts` - Tests `createEnv` + `scope` + custom types working together
- `error.integration.test.ts` - Tests error propagation through validation pipeline
- `copy-button.integration.test.tsx` - Tests `CopyButton` + `useToast` + `Toaster` flow
@@ -124,26 +138,31 @@ Tests are located alongside source files with `.test.ts` suffix:
- `toaster.integration.test.tsx` - Tests `useToast` + `Toaster` state synchronization
**Key Characteristics:**
+
- Slower than unit tests (100ms - 2000ms per test)
- Real interactions between units (not mocked)
- External APIs still mocked (clipboard, network)
- Naming convention: `*.integration.test.ts` suffix
#### End-to-end tests (`tooling/playwright-www/`)
+
**What:** Test complete user workflows in real browsers.
**Key Characteristics:**
+
- Slowest tests (multiple seconds)
- No mocking - tests real application
- Cross-browser compatibility testing
### Testing patterns
+
- Use Vitest's `describe`/`it` structure
- Test both success and failure cases
- Mock `process.env` for testing different scenarios
- Verify both runtime behavior and TypeScript types
### Unit test example
+
```typescript
import { beforeEach, afterEach, it, expect } from 'vitest';
@@ -165,6 +184,7 @@ it('should validate environment variables', () => {
```
### Integration test example
+
```typescript
import { render, screen, waitFor } from "@testing-library/react";
import userEvent from "@testing-library/user-event";
@@ -195,6 +215,7 @@ describe("CopyButton + useToast + Toaster integration", () => {
```
### Running tests
+
```bash
# Run all tests (unit + integration)
pnpm test -- --run
@@ -219,6 +240,7 @@ pnpm run test:e2e
6. **Examples**: Add examples for new functionality
### Changeset guidelines
+
- **patch**: Bug fixes, internal improvements
- **minor**: New features, new validators
- **major**: Breaking changes to API
@@ -226,7 +248,9 @@ pnpm run test:e2e
## Plugin development
### Vite plugin (`packages/vite-plugin`)
+
The Vite plugin validates environment variables at build time:
+
- Integrates with Vite's build process
- Provides early validation feedback
- Supports development and production builds
@@ -241,17 +265,21 @@ The Vite plugin validates environment variables at build time:
## Common issues & solutions
### Missing environment variables
+
The library provides clear error messages with:
+
- List of missing variables
- Expected types/formats
- Suggestions for `.env` file setup
### Type inference issues
+
- Ensure ArkType schemas are properly typed
- Use built-in validators when possible
- Check TypeScript version compatibility
### Build issues
+
- Run `pnpm build:packages` for library builds
- Use `turbo run build` for full monorepo builds
- Check for TypeScript errors with `pnpm typecheck`
@@ -268,6 +296,7 @@ The library provides clear error messages with:
## Examples reference
Check the `examples/` directory for practical usage patterns:
+
- `basic/` - Simple Node.js application
- `with-bun/` - Bun runtime integration
@@ -276,21 +305,25 @@ These examples demonstrate real-world usage and can serve as templates for new i
## Boundaries
### Do not
+
- **Never commit secrets** or API keys, even in test files
- **Never modify `.env` files** in examples or apps - these may contain sensitive configuration
- **Avoid breaking changes** to the public API without explicit approval and a major version changeset
- **Don't modify generated files** like `pnpm-lock.yaml` directly - use `pnpm install` instead
- **Don't skip changesets** for published packages - always run `pnpm changeset` for version bumps
-- **Avoid adding new dependencies** without considering bundle size impact (aspirational goal: <2kB gzipped, enforced limit: 2kB gzipped)
+- **Avoid adding new dependencies** without considering bundle size impact (aspirational goal: \<2kB gzipped, enforced limit: 2kB gzipped)
+
### Security considerations
+
- Always validate user input in examples and documentation
- Use `ArkEnvError` for environment variable errors, not generic errors
- Never log environment variable values in production code
- Ensure examples demonstrate secure default practices
### Architecture decision records (adrs)
+
This repository uses Architecture Decision Records (ADRs) to document significant, trade-off-driven design decisions.
+
- **Reviewing Decisions**: Read the files in `docs/adr/` to understand existing architectural constraints and choices.
- **Historical Context**: The `.github/openspec/changes/archive/` folder contains archived specs from past features for historical reference only. It is not an active workflow.
- **Process**: New architectural choices are documented by adding sequential markdown files in `docs/adr/`, starting with a process overview at `0000-use-architecture-decision-records.md`.
-
diff --git a/.agent/skills b/.agents/skills
similarity index 100%
rename from .agent/skills
rename to .agents/skills
diff --git a/.hallmark/log.json b/.hallmark/log.json
new file mode 100644
index 000000000..ac495e491
--- /dev/null
+++ b/.hallmark/log.json
@@ -0,0 +1,40 @@
+[
+ {
+ "date": "2026-06-02",
+ "macrostructure": "Bento Grid",
+ "theme": "custom",
+ "theme_axes": "light / geometric-sans / cool",
+ "vibe": "clean precision, terminal-honed, technical",
+ "enrichment": "none",
+ "brief": "ArkEnv · alt-cli page v2 — CLI-inspired alternative homepage"
+ },
+ {
+ "date": "2026-06-02",
+ "macrostructure": "Workbench",
+ "theme": "studied-DNA (source: linear.app) — dark near-black · periwinkle accent",
+ "theme_axes": "dark / geometric-sans / cool",
+ "enrichment": "none",
+ "brief": "ArkEnv · alt page — Linear-inspired alternative homepage"
+ },
+ {
+ "date": "2026-06-02",
+ "macrostructure": "Workbench",
+ "theme": "Quiet",
+ "enrichment": "none",
+ "brief": "ArkEnv · homepage redesign"
+ },
+ {
+ "date": "2026-06-02",
+ "macrostructure": "Marquee Hero",
+ "theme": "Coral",
+ "enrichment": "none",
+ "brief": "ArkEnv · homepage redesign — confident"
+ },
+ {
+ "date": "2026-06-02",
+ "macrostructure": "Split Studio",
+ "theme": "Quiet",
+ "enrichment": "none",
+ "brief": "ArkEnv · homepage redesign — confident"
+ }
+]
diff --git a/apps/www/app/(home)/alt/page.tsx b/apps/www/app/(home)/alt/page.tsx
new file mode 100644
index 000000000..742a539f7
--- /dev/null
+++ b/apps/www/app/(home)/alt/page.tsx
@@ -0,0 +1,339 @@
+import { ExternalLink } from "@arkenv/fumadocs-ui/components";
+import type { Metadata } from "next";
+import {
+ CLICommand,
+ CodeFrame,
+ CompatibilityRails,
+ QuickstartButton,
+} from "~/components/page";
+
+export const metadata: Metadata = {
+ title: "ArkEnv — typesafe env vars",
+ description: "Environment variable validation from editor to runtime",
+};
+
+const headline = "Your env vars. Fully typed.".split(" ");
+const subheadline =
+ "Type-safe environment variable validation from editor to deployment.";
+
+const envTsCode = `import arkenv from "arkenv";
+
+const env = arkenv({
+ PORT: "number",
+ API_KEY: "string",
+ DATABASE_URL: "string",
+ NODE_ENV: "'development' | 'production'",
+});
+
+// env.PORT is typed as number
+// env.NODE_ENV is typed as "development" | "production"`;
+
+const pluginCode = `// next.config.ts
+import arkenv from "arkenv";
+import withArkEnv from "@arkenv/nextjs";
+
+const env = arkenv({
+ API_URL: "string",
+ AUTH_SECRET: "string",
+});
+
+// @ts-expect-error nextConfig is defined in the actual config
+export default withArkEnv(nextConfig, env);
+
+// Build-time validation.
+// Client/server boundary enforcement.
+// Editor autocomplete — every variable.`;
+
+const sectionHeadline = (text: string) => text.split(" ");
+
+export default function AltHomePage() {
+ return (
+
+ Write your schema in a single `env.ts` file. ArkEnv wraps ArkType's inference
+ to give you full autocomplete across every framework — with zero runtime
+ dependencies and no build step.
+
+ Drop in a single plugin per framework. Build-time env validation, client/server
+ boundary enforcement, and full type inference — no config files, no runtime
+ overhead.
+
+
+
+
+
+
+ Compatible with
+
+
+
+
+
+
+
+
+ {/* 3.0 · Ship */}
+
+
+
+
+
+
+ $ npx @arkenv/cli@latest check
+
+
+ ✓ API_URL is set
+ ✓ AUTH_SECRET is set
+ ✓ DATABASE_URL is set
+ ────
+ All 12 variables resolved.
+
+
+
+
+
3.0
+
+ Ship with confidence.
+
+
+ CI checks catch missing or misconfigured env vars before they reach production.
+ CLI, editor, and runtime — every layer validates the same schema.
+