Skip to content

Commit 6e98cf4

Browse files
committed
chore: initialize beads issue tracking
1 parent fd9bf41 commit 6e98cf4

12 files changed

Lines changed: 344 additions & 0 deletions

.beads/.gitignore

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Dolt database (managed by Dolt, not git)
2+
dolt/
3+
dolt-access.lock
4+
5+
# Runtime files
6+
bd.sock
7+
bd.sock.startlock
8+
sync-state.json
9+
last-touched
10+
11+
# Local version tracking (prevents upgrade notification spam after git ops)
12+
.local_version
13+
14+
# Worktree redirect file (contains relative path to main repo's .beads/)
15+
# Must not be committed as paths would be wrong in other clones
16+
redirect
17+
18+
# Sync state (local-only, per-machine)
19+
# These files are machine-specific and should not be shared across clones
20+
.sync.lock
21+
.jsonl.lock
22+
sync_base.jsonl
23+
export-state/
24+
25+
# Ephemeral store (SQLite - wisps/molecules, intentionally not versioned)
26+
ephemeral.sqlite3
27+
ephemeral.sqlite3-journal
28+
ephemeral.sqlite3-wal
29+
ephemeral.sqlite3-shm
30+
31+
# Legacy files (from pre-Dolt versions)
32+
*.db
33+
*.db?*
34+
*.db-journal
35+
*.db-wal
36+
*.db-shm
37+
db.sqlite
38+
bd.db
39+
daemon.lock
40+
daemon.log
41+
daemon-*.log.gz
42+
daemon.pid
43+
beads.base.jsonl
44+
beads.base.meta.json
45+
beads.left.jsonl
46+
beads.left.meta.json
47+
beads.right.jsonl
48+
beads.right.meta.json
49+
50+
# NOTE: Do NOT add negation patterns (e.g., !issues.jsonl) here.
51+
# They would override fork protection in .git/info/exclude, allowing
52+
# contributors to accidentally commit upstream issue databases.
53+
# The JSONL files (issues.jsonl, interactions.jsonl) and config files
54+
# are tracked by git by default since no pattern above ignores them.

.beads/README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Beads - AI-Native Issue Tracking
2+
3+
Welcome to Beads! This repository uses **Beads** for issue tracking - a modern, AI-native tool designed to live directly in your codebase alongside your code.
4+
5+
## What is Beads?
6+
7+
Beads is issue tracking that lives in your repo, making it perfect for AI coding agents and developers who want their issues close to their code. No web UI required - everything works through the CLI and integrates seamlessly with git.
8+
9+
**Learn more:** [github.com/steveyegge/beads](https://github.com/steveyegge/beads)
10+
11+
## Quick Start
12+
13+
### Essential Commands
14+
15+
```bash
16+
# Create new issues
17+
bd create "Add user authentication"
18+
19+
# View all issues
20+
bd list
21+
22+
# View issue details
23+
bd show <issue-id>
24+
25+
# Update issue status
26+
bd update <issue-id> --status in_progress
27+
bd update <issue-id> --status done
28+
29+
# Sync with git remote
30+
bd sync
31+
```
32+
33+
### Working with Issues
34+
35+
Issues in Beads are:
36+
- **Git-native**: Stored in `.beads/issues.jsonl` and synced like code
37+
- **AI-friendly**: CLI-first design works perfectly with AI coding agents
38+
- **Branch-aware**: Issues can follow your branch workflow
39+
- **Always in sync**: Auto-syncs with your commits
40+
41+
## Why Beads?
42+
43+
**AI-Native Design**
44+
- Built specifically for AI-assisted development workflows
45+
- CLI-first interface works seamlessly with AI coding agents
46+
- No context switching to web UIs
47+
48+
🚀 **Developer Focused**
49+
- Issues live in your repo, right next to your code
50+
- Works offline, syncs when you push
51+
- Fast, lightweight, and stays out of your way
52+
53+
🔧 **Git Integration**
54+
- Automatic sync with git commits
55+
- Branch-aware issue tracking
56+
- Intelligent JSONL merge resolution
57+
58+
## Get Started with Beads
59+
60+
Try Beads in your own projects:
61+
62+
```bash
63+
# Install Beads
64+
curl -sSL https://raw.githubusercontent.com/steveyegge/beads/main/scripts/install.sh | bash
65+
66+
# Initialize in your repo
67+
bd init
68+
69+
# Create your first issue
70+
bd create "Try out Beads"
71+
```
72+
73+
## Learn More
74+
75+
- **Documentation**: [github.com/steveyegge/beads/docs](https://github.com/steveyegge/beads/tree/main/docs)
76+
- **Quick Start Guide**: Run `bd quickstart`
77+
- **Examples**: [github.com/steveyegge/beads/examples](https://github.com/steveyegge/beads/tree/main/examples)
78+
79+
---
80+
81+
*Beads: Issue tracking that moves at the speed of thought*

.beads/config.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Beads Configuration File
2+
# This file configures default behavior for all bd commands in this repository
3+
# All settings can also be set via environment variables (BD_* prefix)
4+
# or overridden with command-line flags
5+
6+
# Issue prefix for this repository (used by bd init)
7+
# If not set, bd init will auto-detect from directory name
8+
# Example: issue-prefix: "myproject" creates issues like "myproject-1", "myproject-2", etc.
9+
# issue-prefix: ""
10+
11+
# Use no-db mode: load from JSONL, write back after each command
12+
# When true, bd will use .beads/issues.jsonl as the source of truth
13+
# instead of the Dolt database
14+
# no-db: false
15+
16+
# Enable JSON output by default
17+
# json: false
18+
19+
# Default actor for audit trails (overridden by BD_ACTOR or --actor)
20+
# actor: ""
21+
22+
# Export events (audit trail) to .beads/events.jsonl on each flush/sync
23+
# When enabled, new events are appended incrementally using a high-water mark.
24+
# Use 'bd export --events' to trigger manually regardless of this setting.
25+
# events-export: false
26+
27+
# Multi-repo configuration (experimental - bd-307)
28+
# Allows hydrating from multiple repositories and routing writes to the correct JSONL
29+
# repos:
30+
# primary: "." # Primary repo (where this database lives)
31+
# additional: # Additional repos to hydrate from (read-only)
32+
# - ~/beads-planning # Personal planning repo
33+
# - ~/work-planning # Work planning repo
34+
35+
# Integration settings (access with 'bd config get/set')
36+
# These are stored in the database, not in this file:
37+
# - jira.url
38+
# - jira.project
39+
# - linear.url
40+
# - linear.api-key
41+
# - github.org
42+
# - github.repo

.beads/hooks/post-checkout

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env sh
2+
# bd-shim v1
3+
# bd-hooks-version: 0.55.4
4+
#
5+
# bd (beads) post-checkout hook - thin shim
6+
#
7+
# This shim delegates to 'bd hook post-checkout' which contains
8+
# the actual hook logic. This pattern ensures hook behavior is always
9+
# in sync with the installed bd version - no manual updates needed.
10+
#
11+
# The 'bd hook' command (singular) supports:
12+
# - Guard against frequent firing (only imports if JSONL changed)
13+
# - Per-worktree state tracking
14+
# - Dolt branch-then-merge pattern
15+
# - Hook chaining configuration
16+
17+
# Check if bd is available
18+
if ! command -v bd >/dev/null 2>&1; then
19+
# Silently skip - post-checkout is called frequently
20+
exit 0
21+
fi
22+
23+
exec bd hook post-checkout "$@"

.beads/hooks/post-merge

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env sh
2+
# bd-shim v1
3+
# bd-hooks-version: 0.55.4
4+
#
5+
# bd (beads) post-merge hook - thin shim
6+
#
7+
# This shim delegates to 'bd hook post-merge' which contains
8+
# the actual hook logic. This pattern ensures hook behavior is always
9+
# in sync with the installed bd version - no manual updates needed.
10+
#
11+
# The 'bd hook' command (singular) supports:
12+
# - Branch-then-merge pattern for Dolt (cell-level conflict resolution)
13+
# - Per-worktree state tracking
14+
# - Hook chaining configuration
15+
16+
# Check if bd is available
17+
if ! command -v bd >/dev/null 2>&1; then
18+
echo "Warning: bd command not found in PATH, skipping post-merge hook" >&2
19+
echo " Install bd: brew install beads" >&2
20+
echo " Or add bd to your PATH" >&2
21+
exit 0
22+
fi
23+
24+
exec bd hook post-merge "$@"

.beads/hooks/pre-commit

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env sh
2+
# bd-shim v2
3+
# bd-hooks-version: 0.55.4
4+
#
5+
# bd (beads) pre-commit hook — thin shim
6+
#
7+
# Delegates to 'bd hook pre-commit' which contains the actual hook logic.
8+
# This pattern ensures hook behavior is always in sync with the installed
9+
# bd version — no manual updates needed.
10+
#
11+
# The 'bd hook' command supports:
12+
# - Per-worktree export state tracking
13+
# - Dolt in-process export (no lock deadlocks)
14+
# - Sync-branch routing
15+
# - Hook chaining configuration
16+
17+
# Check if bd is available
18+
if ! command -v bd >/dev/null 2>&1; then
19+
echo "Warning: bd command not found in PATH, skipping pre-commit hook" >&2
20+
echo " Install bd: brew install beads" >&2
21+
echo " Or add bd to your PATH" >&2
22+
exit 0
23+
fi
24+
25+
exec bd hook pre-commit "$@"

.beads/hooks/pre-push

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env sh
2+
# bd-shim v1
3+
# bd-hooks-version: 0.55.4
4+
#
5+
# bd (beads) pre-push hook - thin shim
6+
#
7+
# This shim delegates to 'bd hooks run pre-push' which contains
8+
# the actual hook logic. This pattern ensures hook behavior is always
9+
# in sync with the installed bd version - no manual updates needed.
10+
11+
# Check if bd is available
12+
if ! command -v bd >/dev/null 2>&1; then
13+
echo "Warning: bd command not found in PATH, skipping pre-push hook" >&2
14+
echo " Install bd: brew install beads" >&2
15+
echo " Or add bd to your PATH" >&2
16+
exit 0
17+
fi
18+
19+
exec bd hooks run pre-push "$@"

.beads/hooks/prepare-commit-msg

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env sh
2+
# bd-shim v1
3+
# bd-hooks-version: 0.48.0
4+
#
5+
# bd (beads) prepare-commit-msg hook - thin shim
6+
#
7+
# This shim delegates to 'bd hooks run prepare-commit-msg' which contains
8+
# the actual hook logic. This pattern ensures hook behavior is always
9+
# in sync with the installed bd version - no manual updates needed.
10+
#
11+
# Arguments:
12+
# $1 = path to the commit message file
13+
# $2 = source of commit message (message, template, merge, squash, commit)
14+
# $3 = commit SHA-1 (if -c, -C, or --amend)
15+
16+
# Check if bd is available
17+
if ! command -v bd >/dev/null 2>&1; then
18+
echo "Warning: bd command not found in PATH, skipping prepare-commit-msg hook" >&2
19+
echo " Install bd: brew install beads" >&2
20+
echo " Or add bd to your PATH" >&2
21+
exit 0
22+
fi
23+
24+
exec bd hooks run prepare-commit-msg "$@"

.beads/interactions.jsonl

Whitespace-only changes.

.beads/issues.jsonl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{"id":"fastsqla-0nf","title":"Add Agent Skills to FastSQLA","description":"Add Agent Skills (agentskills.io) to FastSQLA so AI coding agents can discover and use FastSQLA more effectively. Skills are SKILL.md files in folders under skills/ that teach agents how to perform specific tasks with the library. Each skill follows the Agent Skills spec: YAML frontmatter (name, description) + markdown instructions with progressive disclosure.\n\n## Skills to create\n\n1. **fastsqla-setup** — Installation, env var configuration, lifespan setup, composing lifespans\n2. **fastsqla-session** — Session dependency, open_session(), flush vs commit, IntegrityError handling\n3. **fastsqla-pagination** — Paginate dependency, Page/Item/Collection models, new_pagination() customization\n4. **fastsqla-models** — Base (DeclarativeBase + DeferredReflection), SQLModel integration, reflection patterns\n5. **fastsqla-testing** — Fixture chains, ASGI testing with httpx + asgi-lifespan, teardown, SQLModel test marks\n\n## Directory structure\n\n```\nskills/\n├── fastsqla-setup/\n│ └── SKILL.md\n├── fastsqla-session/\n│ └── SKILL.md\n├── fastsqla-pagination/\n│ └── SKILL.md\n├── fastsqla-models/\n│ └── SKILL.md\n└── fastsqla-testing/\n └── SKILL.md\n```\n\n## References\n\n- Spec: https://agentskills.io/specification\n- Examples: https://github.com/anthropics/skills\n- FastSQLA source: src/fastsqla.py (single 437-line module)","status":"in_progress","priority":2,"issue_type":"epic","owner":"hadrien@ectobal.com","created_at":"2026-02-26T17:32:20Z","created_by":"Hadrien David","updated_at":"2026-02-26T17:35:40Z"}
2+
{"id":"fastsqla-0nf.1","title":"Create fastsqla-setup skill","description":"Create `skills/fastsqla-setup/SKILL.md` covering:\n\n- Installation (`pip install FastSQLA`, optional `[sqlmodel]` extra)\n- Required async driver packages (asyncpg, aiosqlite, aiomysql) and URL schemes\n- **Environment variable configuration** (`fastsqla.lifespan`): `SQLALCHEMY_URL` required, all `SQLALCHEMY_*` env vars passed to `async_engine_from_config`, case-insensitive\n- **Programmatic configuration** (`new_lifespan()`): same args as `create_async_engine`\n- **Composing multiple lifespans** with `AsyncExitStack` pattern\n- What the lifespan does on startup (engine creation, `Base.prepare()`, `SessionFactory.configure()`) and shutdown\n- Warning about stray `SQLALCHEMY_*` env vars\n- Startup error message when URL is missing\n\n## Acceptance criteria\n\n- SKILL.md has valid frontmatter (name matches directory, description \u003c 1024 chars)\n- Content \u003c 500 lines\n- Covers both env var and programmatic setup paths\n- Includes lifespan composition example","status":"in_progress","priority":2,"issue_type":"task","owner":"hadrien@ectobal.com","estimated_minutes":30,"created_at":"2026-02-26T17:32:31Z","created_by":"Hadrien David","updated_at":"2026-02-26T17:35:43Z","dependencies":[{"issue_id":"fastsqla-0nf.1","depends_on_id":"fastsqla-0nf","type":"parent-child","created_at":"2026-02-26T12:32:30Z","created_by":"Hadrien David","metadata":"{}"}]}
3+
{"id":"fastsqla-0nf.2","title":"Create fastsqla-session skill","description":"Create `skills/fastsqla-session/SKILL.md` covering:\n\nThis is the **highest-value skill** — session management is the most error-prone area for users.\n\n- **Session dependency** (`Session`): type annotation for endpoint injection, auto-commit on success, rollback on exception, close always\n- **flush() vs commit()**: never call `session.commit()` in endpoints, use `session.flush()` to get server-generated data (auto-increment IDs). Include correct and incorrect examples.\n- **IntegrityError handling**: catch after `flush()`, re-raise as `HTTPException` to trigger automatic rollback. Explain why silent catch leaves session in broken state.\n- **open_session()**: async context manager for background tasks, scripts, startup routines. Same commit/rollback/close semantics. Document the edge case: if context body succeeds but `commit()` fails, it rolls back and re-raises.\n- Summary of rules\n\n## Source reference\n\nSession lifecycle: `src/fastsqla.py:205-258` (`open_session`)\nSession dependency: `src/fastsqla.py:260-320` (`new_session`, `Session`)\n\n## Acceptance criteria\n\n- SKILL.md has valid frontmatter\n- Content \u003c 500 lines\n- Includes both correct and incorrect code examples for flush vs commit\n- Covers IntegrityError pattern from test_session_dependency.py","status":"in_progress","priority":1,"issue_type":"task","owner":"hadrien@ectobal.com","estimated_minutes":30,"created_at":"2026-02-26T17:32:42Z","created_by":"Hadrien David","updated_at":"2026-02-26T17:35:44Z","dependencies":[{"issue_id":"fastsqla-0nf.2","depends_on_id":"fastsqla-0nf","type":"parent-child","created_at":"2026-02-26T12:32:42Z","created_by":"Hadrien David","metadata":"{}"}]}
4+
{"id":"fastsqla-0nf.3","title":"Create fastsqla-pagination skill","description":"Create `skills/fastsqla-pagination/SKILL.md` covering:\n\n- **Response models**: `Page[T]` (data + meta with offset/total_items/total_pages/page_number), `Item[T]` (single item), `Collection[T]` (unpaginated list)\n- **Default Paginate dependency**: adds `offset` (default 0, min 0) and `limit` (default 10, min 1, max 100) query params. Show basic usage with `select(Model)`.\n- **Adding filters**: combine Paginate with additional query parameters\n- **new_pagination() factory**: 4 parameters (`min_page_size`, `max_page_size`, `query_count_dependency`, `result_processor`)\n- **Custom page sizes**: example with `Annotated[PaginateType, Depends(new_pagination(...))]`\n- **Custom count query**: `query_count_dependency` is a FastAPI dependency returning `int`. Default is `SELECT COUNT(*) FROM (subquery)`. Provide example for joins.\n- **Custom result processor**: default is `lambda r: iter(r.unique().scalars())`. Show `lambda result: iter(result.mappings())` for multi-column select.\n- **PaginateType[T]** type alias: `Callable[[Select], Awaitable[Page[T]]]`\n- **SQLModel example**: models serve as both ORM and response models\n\n## Source reference\n\nPagination: `src/fastsqla.py:323-437`\nTest examples: `tests/integration/test_pagination.py`\n\n## Acceptance criteria\n\n- SKILL.md has valid frontmatter\n- Content \u003c 500 lines\n- Includes both default and custom pagination examples\n- Shows the Annotated + Depends pattern for custom pagination","status":"in_progress","priority":2,"issue_type":"task","owner":"hadrien@ectobal.com","estimated_minutes":30,"created_at":"2026-02-26T17:32:56Z","created_by":"Hadrien David","updated_at":"2026-02-26T17:35:44Z","dependencies":[{"issue_id":"fastsqla-0nf.3","depends_on_id":"fastsqla-0nf","type":"parent-child","created_at":"2026-02-26T12:32:55Z","created_by":"Hadrien David","metadata":"{}"}]}
5+
{"id":"fastsqla-0nf.4","title":"Create fastsqla-models skill","description":"Create `skills/fastsqla-models/SKILL.md` covering:\n\n- **fastsqla.Base**: inherits from `DeclarativeBase` + `DeferredReflection` (`__abstract__ = True`)\n- **Fully declared models**: standard SQLAlchemy ORM with `Mapped` and `mapped_column`\n- **Reflected models**: declare only `__tablename__`, columns auto-reflected from DB during `Base.prepare()` at lifespan startup\n- **How DeferredReflection works**: attributes not available until `Base.prepare()` is called inside a connection during lifespan\n- **Pydantic response models**: separate `BaseModel` with `ConfigDict(from_attributes=True)` when using Base\n- **SQLModel alternative**: `pip install FastSQLA[sqlmodel]`, no need for Base, models are both ORM and Pydantic\n- **SQLModel session swap**: when sqlmodel is installed, FastSQLA silently uses SQLModel's AsyncSession\n- **extend_existing**: `__table_args__ = {'extend_existing': True}` for SQLModel when table already exists\n- **Comparison table**: Base vs SQLModel tradeoffs (reflection, validation, dependencies, relationships)\n\n## Source reference\n\nBase: `src/fastsqla.py:57-85`\nSQLModel import: `src/fastsqla.py:23-27`\n\n## Acceptance criteria\n\n- SKILL.md has valid frontmatter\n- Content \u003c 500 lines\n- Shows both fully declared and reflected model patterns\n- Includes Base vs SQLModel comparison","status":"in_progress","priority":2,"issue_type":"task","owner":"hadrien@ectobal.com","estimated_minutes":25,"created_at":"2026-02-26T17:33:06Z","created_by":"Hadrien David","updated_at":"2026-02-26T17:35:45Z","dependencies":[{"issue_id":"fastsqla-0nf.4","depends_on_id":"fastsqla-0nf","type":"parent-child","created_at":"2026-02-26T12:33:06Z","created_by":"Hadrien David","metadata":"{}"}]}
6+
{"id":"fastsqla-0nf.5","title":"Create fastsqla-testing skill","description":"Create `skills/fastsqla-testing/SKILL.md` covering:\n\n- **Test dependencies**: pytest, pytest-asyncio, pytest-cov, httpx, asgi-lifespan, aiosqlite, faker\n- **pytest config**: `asyncio_mode = 'auto'`, `asyncio_default_fixture_loop_scope = 'function'`\n- **Fixture chain** (critical ordering): `sqlalchemy_url` → `environ` (patched with clear=True) → `engine` → `setup_tear_down` (CREATE TABLE via raw SQL) → `app` (define models + routes) → `client` (LifespanManager + httpx)\n- **ASGI client pattern**: `LifespanManager(app)` triggers startup/shutdown, `ASGITransport` + `AsyncClient` for HTTP\n- **Critical teardown** (autouse fixture): `Base.metadata.clear()` + `clear_mappers()` after every test to prevent model leakage\n- **Direct data verification**: separate `session` fixture bound to same engine for querying DB outside the app\n- **SQLModel test marks**: `@mark.require_sqlmodel` with autouse `check_sqlmodel` fixture that skips when not installed\n- **Table setup**: raw SQL in fixtures, not ORM (tables must exist before Base.prepare)\n\n## Source reference\n\nRoot conftest: `tests/conftest.py`\nIntegration conftest: `tests/integration/conftest.py`\nSession tests: `tests/integration/test_session_dependency.py`\nPagination tests: `tests/integration/test_pagination.py`\nSQLModel tests: `tests/integration/test_sqlmodel.py`\n\n## Acceptance criteria\n\n- SKILL.md has valid frontmatter\n- Content \u003c 500 lines\n- Documents the full fixture chain with dependency ordering\n- Includes teardown fixture (this is the most common testing pitfall)","status":"in_progress","priority":2,"issue_type":"task","owner":"hadrien@ectobal.com","estimated_minutes":30,"created_at":"2026-02-26T17:33:19Z","created_by":"Hadrien David","updated_at":"2026-02-26T17:35:45Z","dependencies":[{"issue_id":"fastsqla-0nf.5","depends_on_id":"fastsqla-0nf","type":"parent-child","created_at":"2026-02-26T12:33:18Z","created_by":"Hadrien David","metadata":"{}"}]}

0 commit comments

Comments
 (0)