Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f19b534
fix(api): replace no-op snapshot restore with content-level replacement
braden-w Mar 13, 2026
27dcfad
Merge remote-tracking branch 'origin/main' into opencode/calm-comet
braden-w Mar 15, 2026
ec85ea9
feat(workspace): move snapshot restore from DO to client via timeline
braden-w Mar 15, 2026
ff86def
refactor(timeline): inline restoreFromSnapshot into timeline.ts
braden-w Mar 15, 2026
2992f8f
fix(timeline): preserve richtext formatting during snapshot restore
braden-w Mar 15, 2026
ff47bbd
refactor(timeline): typed push returns, replaceCurrentText, pushRicht…
braden-w Mar 15, 2026
ed3e28c
refactor(timeline): reuse entry types for push returns, inline via this
braden-w Mar 15, 2026
e93d2e0
docs(specs): add flatten-timeline-into-handle specification
braden-w Mar 15, 2026
dcdfb25
refactor(timeline): flatten DocumentHandle into Timeline
braden-w Mar 15, 2026
fbb6568
refactor(timeline): remove readAsString alias
braden-w Mar 15, 2026
7f048fe
refactor(timeline): internalize push methods, restoreFromSnapshot bec…
braden-w Mar 15, 2026
cc1dd49
refactor(timeline): currentEntry returns ValidatedEntry, internalize …
braden-w Mar 15, 2026
894f7d4
refactor(timeline): unify entry types into timeline.ts, use 'mode' di…
braden-w Mar 15, 2026
c31b3f0
feat(timeline): add observe() for structural timeline changes
braden-w Mar 15, 2026
e46ad18
docs(timeline): document restore helpers and hydrate→read→write flow
braden-w Mar 15, 2026
a7f7f52
refactor(timeline): rename 'mode' discriminant to 'type' across entry…
braden-w Mar 15, 2026
500a0fc
fix(timeline): preserve sheet column metadata during snapshot restore
braden-w Mar 15, 2026
2190e34
feat(timeline): add writeSheet() and close consumer API gaps
braden-w Mar 15, 2026
8995ec2
refactor(timeline): improve naming, types, and JSDoc accuracy
braden-w Mar 15, 2026
beb421c
refactor(timeline): rename write() to writeText(), move SheetBinding …
braden-w Mar 15, 2026
c99d576
refactor(timeline): unify writeText/writeSheet into mode-aware write()
braden-w Mar 15, 2026
5d9cb1e
feat(timeline): add markdown → Y.XmlFragment converter
braden-w Mar 15, 2026
7f488e0
refactor(timeline): remove parseSheetFromCsv/serializeSheetToCsv from…
braden-w Mar 16, 2026
aa293f3
docs(yjs): add abstraction boundary patterns to skill and article
braden-w Mar 16, 2026
58db180
fix(workspace): seal abstraction boundary — add loadSnapshot API, cap…
braden-w Mar 16, 2026
5d13f33
refactor(workspace): type observe() transaction param as TransactionMeta
braden-w Mar 16, 2026
cba05a5
feat(timeline): add appendText() to seal Y.Text mutation leak
braden-w Mar 16, 2026
16e4239
feat(workspace): add timeline to DocumentContext type
braden-w Mar 16, 2026
dd8ae42
feat(workspace): pass timeline to document extension factories
braden-w Mar 16, 2026
79e0473
feat(workspace): add SharedExtensionContext for type-safe dual-scope …
braden-w Mar 16, 2026
e114f56
refactor(workspace): make SharedExtensionContext a discriminated unio…
braden-w Mar 16, 2026
66c275d
refactor(workspace): extract LIFO cleanup to lifecycle.ts
braden-w Mar 16, 2026
6364522
refactor(workspace): inline makeHandle/resolveGuid, verify zone ordering
braden-w Mar 16, 2026
bb0ed55
docs(spec): complete refactor-create-document review and findings
braden-w Mar 16, 2026
85e7337
refactor(workspace): simplify withExtension to thin sugar over scoped…
braden-w Mar 16, 2026
ef048d1
fix(workspace): simplify row deletion observer in createDocuments
braden-w Mar 16, 2026
0c6b3b0
refactor(workspace): remove unused onRowDeleted callback
braden-w Mar 16, 2026
818101e
docs(workspace): update README, JSDoc, and spec to reflect DualScopeC…
braden-w Mar 16, 2026
ea881e3
feat(workspace): sync extension now supports both workspace and docum…
braden-w Mar 16, 2026
98fcabe
refactor(timeline): inline ValidatedEntry type and single-use write h…
braden-w Mar 16, 2026
3aad75d
refactor(workspace): make sync a DualScopeFactory — one line syncs ev…
braden-w Mar 16, 2026
af643fd
refactor(timeline): replace validated()/currentType() closures with t…
braden-w Mar 16, 2026
4f25f75
refactor(workspace): rename DualScopeContext to SharedExtensionContex…
braden-w Mar 16, 2026
19d108a
refactor(timeline): remove pushSheetFromCsv, compose pushSheet + pars…
braden-w Mar 16, 2026
c4f8ddc
refactor(timeline): move SheetBinding to sheet.ts, accept it as singl…
braden-w Mar 16, 2026
86923a1
refactor(timeline): inline pushRichtextFromFragment and pushSheetFrom…
braden-w Mar 16, 2026
d146820
refactor(timeline): eliminate double lastEntry() call in write()
braden-w Mar 16, 2026
6675a9b
refactor(timeline): move readEntry inside createTimeline closure
braden-w Mar 16, 2026
df82e75
refactor(timeline): derive SheetEntry from SheetBinding via intersection
braden-w Mar 16, 2026
9b22d7b
refactor(timeline): route all access through typed currentEntry, elim…
braden-w Mar 16, 2026
13d20e2
refactor(timeline): convert write() and appendText() to switch on ent…
braden-w Mar 16, 2026
d6c910c
style: format
braden-w Mar 16, 2026
ed5ad00
fix: toggle braces in inline arrow functions in forEach loop
braden-w Mar 16, 2026
ea9bba9
refactor(timeline): inline known-behavior calls to replaceCurrentText
braden-w Mar 16, 2026
9569480
refactor(timeline): inline replaceCurrentText, collapse as*() via thi…
braden-w Mar 17, 2026
3f5fe8e
refactor(timeline): collapse appendText() richtext/sheet branches via…
braden-w Mar 17, 2026
ca06732
docs(richtext): fix module JSDoc referencing removed DocumentHandle
braden-w Mar 17, 2026
5d22359
feat(skills): add refactoring methodology skill
braden-w Mar 17, 2026
2e56384
docs(skills): add cross-reference callouts to 13 related skills
braden-w Mar 17, 2026
d568d39
docs(skills): add metadata blocks to 30 skills missing them
braden-w Mar 17, 2026
7d1ec91
docs(skills): add 'When to Apply This Skill' sections to 29 skills
braden-w Mar 17, 2026
46d6451
refactor(workspace): derive SharedExtensionContext via Pick, fix Docu…
braden-w Mar 17, 2026
60aafd3
Merge remote-tracking branch 'origin/main' into opencode/calm-comet
braden-w Mar 18, 2026
c0574c5
docs(workspace): update lifecycle.ts docstring, export DOCUMENTS_ORIGIN
braden-w Mar 18, 2026
f1accce
Merge remote-tracking branch 'origin/main' into opencode/calm-comet
braden-w Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .agents/skills/arktype/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: arktype
description: Arktype patterns for discriminated unions using .merge() and .or(), spread key syntax, and type composition. Use when building union types, combining base schemas with variants, or defining command/event schemas with arktype.
metadata:
author: epicenter
version: '1.0'
---

# Arktype Discriminated Unions
Expand Down
15 changes: 14 additions & 1 deletion .agents/skills/better-auth-best-practices/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
---
name: better-auth-best-practices
description: Configure Better Auth server and client, set up database adapters, manage sessions, add plugins, and handle environment variables. Use when users mention Better Auth, betterauth, auth.ts, or need to set up TypeScript authentication with email/password, OAuth, or plugin configuration.
metadata:
author: epicenter
version: '1.0'
---

# Better Auth Integration Guide

**Always consult [better-auth.com/docs](https://better-auth.com/docs) for code examples and latest API.**

## When to Apply This Skill

Use this pattern when you need to:

- Configure Better Auth server/client setup in TypeScript projects.
- Wire environment variables, database adapters, and CLI migrations.
- Set up sessions, cookie cache strategy, and security/rate-limit options.
- Add and configure Better Auth plugins plus corresponding client plugins.
- Troubleshoot common Better Auth model, schema, and storage pitfalls.

---

## Setup Workflow
Expand Down Expand Up @@ -172,4 +185,4 @@ For separate client/server projects: `createAuthClient<typeof auth>()`.
- [Options Reference](https://better-auth.com/docs/reference/options)
- [LLMs.txt](https://better-auth.com/llms.txt)
- [GitHub](https://github.com/better-auth/better-auth)
- [Init Options Source](https://github.com/better-auth/better-auth/blob/main/packages/core/src/types/init-options.ts)
- [Init Options Source](https://github.com/better-auth/better-auth/blob/main/packages/core/src/types/init-options.ts)
3 changes: 3 additions & 0 deletions .agents/skills/better-auth-security-best-practices/SKILL.MD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: better-auth-security-best-practices
description: Configure rate limiting, manage auth secrets, set up CSRF protection, define trusted origins, secure sessions and cookies, encrypt OAuth tokens, track IP addresses, and implement audit logging for Better Auth. Use when users need to secure their auth setup, prevent brute force attacks, or harden a Better Auth deployment.
metadata:
author: epicenter
version: '1.0'
---

## Secret Management
Expand Down
14 changes: 14 additions & 0 deletions .agents/skills/control-flow/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
---
name: control-flow
description: Human-readable control flow patterns for early returns, guard clauses, and linearizing nested logic. Use when refactoring nested conditionals, replacing try-catch with linear flow, or restructuring decision logic.
metadata:
author: epicenter
version: '1.0'
---

# Human-Readable Control Flow

When refactoring complex control flow, mirror natural human reasoning patterns:

> **Related Skills**: See `refactoring` for systematic code audit methodology including branch collapsing and caller counting.

## When to Apply This Skill

Use this pattern when you need to:

- Refactor nested conditionals into linear guard-clause control flow.
- Replace mixed `throw`/`return` try-catch logic with readable early returns.
- Name booleans and branches to read like natural human reasoning.
- Restructure handlers so failure paths are explicit before the happy path.

1. **Ask the human question first**: "Can I use what I already have?" -> early return for happy path
2. **Assess the situation**: "What's my current state and what do I need to do?" -> clear, mutually exclusive conditions
3. **Take action**: "Get what I need" -> consolidated logic at the end
Expand Down
13 changes: 13 additions & 0 deletions .agents/skills/create-auth-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: create-auth-skill
description: Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.
metadata:
author: epicenter
version: '1.0'
---

# Create Auth Skill
Expand All @@ -9,6 +12,16 @@ Guide for adding authentication to TypeScript/JavaScript applications using Bett

**For code examples and syntax, see [better-auth.com/docs](https://better-auth.com/docs).**

## When to Apply This Skill

Use this pattern when you need to:

- Add Better Auth login/sign-up to a new or existing TypeScript/JavaScript app.
- Plan auth implementation by detecting framework, DB, and existing auth stack.
- Configure `auth.ts`, client setup, route handlers, and migrations.
- Add OAuth providers, plugins, and auth pages based on project requirements.
- Migrate incrementally from another auth library to Better Auth.

---

## Phase 1: Planning (REQUIRED before implementation)
Expand Down
12 changes: 12 additions & 0 deletions .agents/skills/define-errors/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@ metadata:

# defineErrors

> **Related Skills**: See `error-handling` for trySync/tryAsync usage. See `services-layer` for service architecture and namespace exports.

## When to Apply This Skill

Use this pattern when you need to:

- Define or refactor domain error variants using `defineErrors`.
- Add error variants that include structured fields and `cause: unknown`.
- Centralize `extractErrorMessage(cause)` inside variant factories.
- Infer union and single-variant types via `InferErrors`/`InferError`.
- Replace old `createTaggedError` and split Err-pair patterns.

## Import

```typescript
Expand Down
12 changes: 12 additions & 0 deletions .agents/skills/documentation/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: documentation
description: In-code documentation, folder READMEs, and code comments. Use when writing README.md files, JSDoc comments, or explaining code organization.
metadata:
author: epicenter
version: '1.0'
---

# Documentation
Expand All @@ -9,6 +12,15 @@ Follow [writing-voice](../writing-voice/SKILL.md) for tone.

Documentation explains **why**, not **what**. Users can read code to see what it does. They need you to explain the reasoning.

## When to Apply This Skill

Use this pattern when you need to:

- Write or update folder `README.md` files with architecture intent.
- Add JSDoc to public APIs with usage context and examples.
- Review docs/comments that currently restate code without rationale.
- Add code comments for non-obvious decisions, constraints, or workarounds.

## Folder READMEs

Primary job: explain **why** this folder exists and the mental model.
Expand Down
12 changes: 12 additions & 0 deletions .agents/skills/drizzle-orm/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
---
name: drizzle-orm
description: Drizzle ORM patterns for type branding and custom types. Use when working with Drizzle column definitions, branded types, or custom type conversions.
metadata:
author: epicenter
version: '1.0'
---

# Drizzle ORM Guidelines

## When to Apply This Skill

Use this pattern when you need to:

- Define Drizzle columns that use branded TypeScript string types.
- Choose between `$type<T>()` and `customType` for column definitions.
- Remove identity `toDriver`/`fromDriver` conversions that add runtime overhead.
- Keep data serialized through the storage layer and parse at UI edges.

## Use $type<T>() for Branded Strings, Not customType

When you need a column with a branded TypeScript type but no actual data transformation, use `$type<T>()` instead of `customType`.
Expand Down
10 changes: 10 additions & 0 deletions .agents/skills/elysia/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ metadata:

# Elysia.js Patterns (v1.2+)

## When to Apply This Skill

Use this pattern when you need to:

- Write or refactor Elysia handlers to use `status()` responses.
- Define per-status response schemas for Eden Treaty type safety.
- Migrate handlers away from `set.status` plus error-object returns.
- Compose Elysia plugins/guards for shared auth and route behavior.
- Choose between `return status(...)` and `throw status(...)` by control-flow context.

## The `status()` Helper (ALWAYS use this)

**Never use `set.status` + return object.** Always destructure `status` from the handler context and use it for all non-200 responses. This gives you:
Expand Down
13 changes: 13 additions & 0 deletions .agents/skills/email-and-password-best-practices/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
---
name: email-and-password-best-practices
description: Configure email verification, implement password reset flows, set password policies, and customise hashing algorithms for Better Auth email/password authentication. Use when users need to set up login, sign-in, sign-up, credential authentication, or password security with Better Auth.
metadata:
author: epicenter
version: '1.0'
---

## When to Apply This Skill

Use this pattern when you need to:

- Set up Better Auth email/password sign-up and sign-in flows.
- Implement email verification requirements and delivery hooks.
- Build password reset request and reset-token handling.
- Configure password policies, reset token expiry, and session revocation.
- Customize password hashing/verification algorithms for credential auth.

## Quick Start

1. Enable email/password: `emailAndPassword: { enabled: true }`
Expand Down
10 changes: 10 additions & 0 deletions .agents/skills/error-handling/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ metadata:

# Error Handling with wellcrafted trySync and tryAsync

## When to Apply This Skill

Use this pattern when you need to:

- Replace recoverable `try-catch` blocks with `trySync` or `tryAsync`.
- Handle fallback success paths via `Ok(...)` and propagate failures with `Err(...)`.
- Wrap caught exceptions as `cause` for typed domain error constructors.
- Refactor nested error branches into immediate-return linear control flow.
- Convert handler failures into HTTP status responses with explicit guards.

## Use trySync/tryAsync Instead of try-catch for Graceful Error Handling

When handling errors that can be gracefully recovered from, use `trySync` (for synchronous code) or `tryAsync` (for asynchronous code) from wellcrafted instead of traditional try-catch blocks. This provides better type safety and explicit error handling.
Expand Down
2 changes: 2 additions & 0 deletions .agents/skills/factory-function-composition/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:

This skill helps you apply factory function patterns for clean dependency injection and function composition in TypeScript.

> **Related Skills**: See `method-shorthand-jsdoc` for when to move helpers into the return object. See `refactoring` for caller counting and inlining single-use extractions.

## When to Apply This Skill

Use this pattern when you see:
Expand Down
13 changes: 13 additions & 0 deletions .agents/skills/frontend-design/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
---
name: frontend-design
description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
metadata:
author: epicenter
version: '1.0'
license: Complete terms in LICENSE.txt
---

This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.

The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.

## When to Apply This Skill

Use this pattern when you need to:

- Build or redesign a frontend component, page, or full interface.
- Define and execute a strong aesthetic direction before coding.
- Produce polished UI with intentional typography, color, motion, and composition.
- Avoid generic, repetitive AI-style design choices.
- Match implementation complexity to the chosen visual direction.

## Design Thinking

Before coding, understand the context and commit to a BOLD aesthetic direction:
Expand Down
15 changes: 15 additions & 0 deletions .agents/skills/git/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
---
name: git
description: Git commit and pull request guidelines using conventional commits. Use when creating commits, writing commit messages, creating PRs, or reviewing PR descriptions.
metadata:
author: epicenter
version: '1.0'
---

# Git Commit and Pull Request Guidelines

> **Related Skills**: See `incremental-commits` for breaking multi-file changes into atomic commits.

## When to Apply This Skill

Use this pattern when you need to:

- Write commit messages that follow conventional commit rules.
- Decide commit type/scope formatting and breaking-change notation.
- Draft PR descriptions that open with WHAT then WHY.
- Add required user-facing changelog entries for `feat:`/`fix:` PRs.
- Review commit/PR text for anti-patterns like AI/tool attribution.

## Conventional Commits Format

```
Expand Down
13 changes: 13 additions & 0 deletions .agents/skills/github-issues/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
---
name: github-issues
description: GitHub issue comment guidelines for community interaction. Use when responding to GitHub issues, bug reports, feature requests, or any GitHub discussion.
metadata:
author: epicenter
version: '1.0'
---

# GitHub Issue & PR Comment Guidelines

## When to Apply This Skill

Use this pattern when you need to:

- Reply to GitHub issues, PR threads, or feature/bug discussions.
- Write acknowledgments, follow-up questions, and troubleshooting replies.
- Announce fixes with clear credit and community-friendly tone.
- Offer direct debugging help with scheduling links when needed.
- Avoid over-structured, corporate-style comment responses.

## Anti-Patterns (Avoid These)

- **Over-structured responses**: Don't use headers, numbered sections, or bullet lists for simple replies. A conversational paragraph is usually better.
Expand Down
11 changes: 11 additions & 0 deletions .agents/skills/honesty/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
---
name: honesty
description: Behavioral guideline for providing brutally honest feedback. Use always - this skill defines core interaction expectations for code review and technical discussions.
metadata:
author: epicenter
version: '1.0'
---

# Honesty

Be brutally honest, don't be a yes man.
If I am wrong, point it out bluntly.
I need honest feedback on my code.

## When to Apply This Skill

Use this pattern when you need to:

- Review code and call out flawed decisions directly.
- Correct incorrect assumptions instead of politely agreeing.
- Give blunt technical feedback in design or implementation discussions.
5 changes: 5 additions & 0 deletions .agents/skills/incremental-commits/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
---
name: incremental-commits
description: Break multi-file changes into atomic commits ordered by dependency. Use for refactors, breaking API changes, or features touching 3+ files.
metadata:
author: epicenter
version: '1.0'
---

# Incremental Commits

When a feature touches multiple files, implement in **waves**. Each wave is one logical concern, one commit. This creates a clean git history that tells a story.

> **Related Skills**: See `git` for commit message conventions and PR guidelines.

## The Pattern

```
Expand Down
2 changes: 2 additions & 0 deletions .agents/skills/method-shorthand-jsdoc/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ metadata:

When factory functions have helper functions that are only used by returned methods, move them INTO the return object using method shorthand. This ensures JSDoc comments are properly passed through to consumers.

> **Related Skills**: See `factory-function-composition` for the four-zone factory anatomy and the `this` decision rule.

## The Problem

You write a factory function with a well-documented helper:
Expand Down
11 changes: 11 additions & 0 deletions .agents/skills/monorepo/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
---
name: monorepo
description: Monorepo script commands and conventions for this codebase. Use when running builds, tests, formatting, linting, or type checking.
metadata:
author: epicenter
version: '1.0'
---

# Script Commands

The monorepo uses consistent script naming conventions:

## When to Apply This Skill

Use this pattern when you need to:

- Run formatting, linting, or type-check scripts in this monorepo.
- Choose between auto-fix commands and `:check` CI-only variants.
- Verify final changes with the repo-standard `bun typecheck` workflow.

| Command | Purpose | When to use |
| ------------------ | ---------------------------------------------- | ----------- |
| `bun format` | **Fix** formatting (biome) | Development |
Expand Down
Loading
Loading