142 Commits (b6f03fd967f28de1b3f68cf7afe78bbc957724a2)
 

Author SHA1 Message Date
Elijah Voigt a7b2d6fd4e feat(quotesdb): add QuoteRepository trait, migrations, and thiserror dependency
- db/mod.rs: QuoteRepository async trait + ListResult/DeleteResult/DbError types
- db/migrations.rs: SQL DDL strings for quotes, quote_tags, and indexes
- lib.rs: fix rand 0.9 trait import (SliceRandom → IndexedRandom)
- Cargo.toml: add thiserror = "2" for DbError derive

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 83f4aacdf5 feat(quotesdb): set up Trunk.toml and index.html for UI build
- Trunk.toml: target index.html, proxy /api/* to localhost:3000
- index.html: link CSS, Rust wasm binary (ui), copy _redirects

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 8da0d754a0 chore(quotesdb): merge 9ef703 - add _redirects SPA fallback 3 months ago
Elijah Voigt af8c476305 chore(quotesdb): add _redirects SPA fallback for Cloudflare Pages routing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 9f28d99a93 feat(quotesdb): add build.rs to convert api/openapi.yaml to JSON at compile time
- Create build.rs at crate root using serde_yaml (build-dep only) to parse
  api/openapi.yaml and write compact JSON to $OUT_DIR/openapi.json
- cargo:rerun-if-changed ensures re-conversion only when spec changes
- serde_yaml never enters the Workers or native binary (build-dep only)
- Downstream GET /api/ handler consumes via include_str!(concat!(env!("OUT_DIR"), "/openapi.json"))

Closes ticket 8892d5
3 months ago
Elijah Voigt b695cb5b6d feat(quotesdb): add Yew/Wasm UI dependencies to Cargo.toml
- Add yew 0.22 with csr feature for Rust/Wasm SPA frontend
- Add yew-router 0.19 for client-side routing
- Add gloo 0.11 for Web API utilities (timers, fetch, events)
- Add wasm-bindgen 0.2 matching Nix wasm-bindgen-cli 0.2.108
- Add wasm-bindgen-futures 0.4 for async fetch support
- Add web-sys 0.3 for raw DOM/browser API bindings
All UI deps scoped to wasm32 cfg target to avoid host build pollution

Closes ticket 93515e
3 months ago
Elijah Voigt 7bd2bf4ed5 chore(quotesdb): set up Cargo.toml with api and ui dependencies
- Add axum 0.8 + tokio 1 (native-only) for the HTTP API server
- Add rusqlite 0.32 + tokio-rusqlite 0.6 (native-only) for local SQLite
- Add async-trait 0.1 (native-only) for QuoteRepository abstraction
- Add worker 0.5 with d1 feature (wasm32-only) for Cloudflare Workers
- Add rand 0.9 + serde + serde_json (shared) for passphrase/serialisation
- Add build-dependencies: serde_json 1 + serde_yaml 0.9 for build.rs
- Pin rusqlite to 0.32 to match tokio-rusqlite 0.6 transitive dependency

Closes ticket 1f5bb5

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt b0cf17ec83 feat(quotesdb): add generate_id() using UUID v4 — WASM-compatible ID generation
- Add uuid = { version = "1", features = ["v4", "serde"] } to [dependencies]
- Add getrandom = { version = "0.4", features = ["wasm_js"] } under wasm32 cfg
- Implement generate_id() in src/lib.rs with rustdoc and doctest
- Add unit tests for length, hyphen count, and uniqueness

Closes ticket 7a0d9f

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt dc73fc8f69 plan to implement the current batch of tickets 3 months ago
Elijah Voigt 5926d33bcc chore(quotesdb): resolve all triage tickets and create implementation tickets
- All 21 TRIAGE decision tickets resolved with chosen approaches documented
- This session: e2bd9b (SPA routing → _redirects), 2ec8b1 (OpenAPI → build.rs),
  0d84fa (HTTP client → reqwest), 0bc655 (auth code → session storage)
- New implementation tickets created: 9ef703, 8892d5, 5379eb
- Downstream tickets updated with resolved approaches and correct dependencies
- ARCHITECTURE.md updated with pinned WASM dependency versions (yew 0.22,
  yew-router 0.19, wasm-bindgen 0.2)
- XML tags added to all tickets for improved LLM guidance

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt ec2a4055ca docs(quotesdb): add XML tags to all tickets for improved LLM guidance
All 80 nbd tickets updated with structured XML tags:
- Task tickets: <context>, <goal>, <constraints>, <skills>, <validation>, <commit>
- TRIAGE tickets: <context>, <question>, <options>, <resolution>, <commit>
- Project tickets: <context>, <goal>, <skills>, <validation>
- ec118c (root): <skills>, <goal>, <context>, <design>, <phases>, <verification>
- b38032 (done): <goal>, <current-state>, <target-state>, <changes>, <constraints>, <validation>, <summary>

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 65b0fdf1e2 some tickets marked in progress 3 months ago
Elijah Voigt 91ecd91176 refactor(quotesdb): collapse to single crate with api and ui binaries
Replaces the three separate sub-crates (api/, ui/, tests/) with a single
Cargo crate at the quotesdb/ root. Shared code lives in src/lib.rs; the
api and ui are multi-binary targets; integration tests use the standard
Cargo tests/ layout. Trunk files moved to project root with data-bin="ui".

Closes ticket b38032.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt de99f1c047 chore(quotesdb): bootstrap project skeleton and design doc
- Scaffold api/, ui/, tests/, infra/, docs/ directories
- Stub Cargo.toml for api, ui, and tests crates
- Write finalized design doc to docs/plans/2026-02-27-quotesdb-design.md
- Add placeholder PLANNING.md, ARCHITECTURE.md, README.md per domain
- Add stub main.rs and tests.rs for api and ui
- Add index.html and Trunk.toml for ui
- Add placeholder infra/main.tf with Cloudflare provider stub

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt ba6425793a docs: add shell conventions — no python3, always use jq
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 7c9d058ce6 feat(nbd): scope nbd next/ready by dependency subtree (#818598)
Add an optional positional `<id>` argument to `nbd next` and `nbd ready`
that restricts results to the dependency subtree of the given ticket.
The scoping ticket itself is excluded from results.

- CLI: add `id: Option<String>` to `Commands::Next` and `Commands::Ready`
- Logic: build a `TicketGraph`, call `subtree()`, restrict candidate pool
- Tests: 4 new integration tests covering scoped next/ready and --filter

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 3c0665314a tickets(nbd): triage TODO.md → 818598 scope next/ready by subtree
- 818598: Scope nbd next and nbd ready by dependency subtree

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 7e0ba78240 docs: improve CLAUDE.md structure and clarity
- Add working-directory rule to root and all project docs
- Generalize root from "HTTP web services" to "independent projects"
- Add @../CLAUDE.md inheritance to nbd, edu, quotesdb project docs
- Remove sections duplicated from root in project-level docs
- Wrap all sections in semantic XML tags for clearer agent parsing
- Rename Tech Stack → Common Patterns (framed as defaults, not requirements)
- Rename Running Services Locally → Running Projects Locally
3 months ago
Elijah Voigt c2c5fe923e markov chain exercise skeleton 3 months ago
Elijah Voigt 8232946b6e Merge development flakes 3 months ago
Elijah Voigt 75876988e0 claude generated openapi spec 3 months ago
Elijah Voigt 1c90c0fac1 tickets(quotesdb): assign all tickets to domain sub-projects with dependency graph
Evaluated all quotesdb tickets and assigned each to the correct sub-project
dependency (api/f3dc74, ui/c3503b, qa/ce1e4f, infra/25c413). Also wired
inter-ticket dependencies to enforce correct implementation order within each
domain and cross-domain (e.g. QA test suites depend on the API handlers they
exercise). Validated with `nbd graph --json` — 78 nodes, 200 edges, no cycles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 6d40671f28 fix(nbd): fix graph orientation to show goals at root, prerequisites as leaves
Roots are now tickets with no dependents (nobody depends on them —
top-level goals), and the ASCII tree traverses dependency edges so
prerequisites appear indented beneath the goal that needs them.

JSON edges are now {from: dependent, to: dependency} rather than
{from: blocker, to: blocked}.

All graph-related unit and integration tests updated to match the
new semantics.

Closes #668150

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 380cfee6ca tickets(nbd): triage graph inversion bug into two tickets
- 668150: Fix graph orientation: show goals at root, prerequisites as leaves
- 06ca62: Fix nbd graph <id>: show ancestry path through ticket, not just subtree

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt bc17a9ae07 plan(quotesdb): create domain planning tickets for api, ui, qa, and infra
Adds 84 tickets across 4 sub-domains with a full dependency graph:

- quotesdb/api (f3dc74): 15 work tickets + 6 TRIAGE tickets
  Covers Cargo.toml, Workers entry point, DB migrations, all 7 endpoints,
  auth code gen, tag handling, error envelope, unit tests, and docs.

- quotesdb/ui (c3503b): 15 work tickets + 5 TRIAGE tickets
  Covers Yew/Wasm setup, Trunk config, app shell, API client, 5 pages,
  shared components (QuoteCard, auth modal, pagination, tag filter), and docs.

- quotesdb/qa (ce1e4f): 12 work tickets + 4 TRIAGE tickets
  Covers test harness, one test suite per endpoint, router ordering,
  tag operations, and README.

- quotesdb/infra (25c413): 10 work tickets + 6 TRIAGE tickets
  Covers OpenTofu setup, D1 database, Worker script + route, Pages project,
  custom domain (quotes.elijah.run), migration workflow, secrets, and README.

Dependency graph:
- Root ticket (ec118c) blocked on all 4 sub-project tickets
- Sub-project tickets blocked on their leaf work tickets
- Work tickets have intra-domain sequential deps (e.g. Cargo.toml → DB → handlers)
- QA test harness has a cross-domain dep on the completed api sub-project
- All 21 TRIAGE tickets are immediately unblocked as the highest-priority starting work

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 04b659ee7c quotesdb scaffolding 3 months ago
Elijah Voigt 4c48370373 docs(quotesdb): add project CLAUDE.md with workflow and design reference
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 05bad425a7 chore(quotesdb): init nbd and create root project ticket 3 months ago
Elijah Voigt 955cf029ab docs(edu): add lisp-to-C compiler course with stubs and tickets [67e284]
18-section interactive course teaching compiler construction in Rust
using nom. Covers MiniLisp parsing, AST design, semantic analysis,
and C code generation. All sections stubbed; one nbd task ticket per
section plus a project ticket (67e284) tracking completion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt b8a3b9ddfe edu claude.md 3 months ago
Elijah Voigt f552040f9f mdbook 3 months ago
Elijah Voigt d01b5db905 docs(edu): write git worktrees reference; update project status
Mark git worktrees and Markov Chains as complete in PROJECTS.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt ce48ffac5a build: add nbd to nix devshell
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 826bf235f1 chore(edu): close markov course project [fb7f74]
All 10 sections of edu/markov.md are complete. Mark the project ticket
and remaining section tickets as done/archived.
3 months ago
Elijah Voigt 4d1950f4c8 docs(edu): write markov §2 states and transitions [738be2]
Replaces the stub in Section 2 with full prose covering:
- State space definition (finite vs countably infinite)
- Transitions as directed, probability-labelled edges
- ASCII state-transition diagram for the weather model
- Absorbing, transient, and recurrent state classification
3 months ago
Elijah Voigt f78c9ba637 docs(edu): write markov §7 bigram text generator exercise [74be50]
Full Exercise 3 — Bigram Text Generator section replacing the stub:
- Setup instructions (cargo new, cargo add rand)
- Starter code skeleton with BigramModel struct
- Step 1: tokenize corpus with split_whitespace + to_lowercase
- Step 2: build transition table via windows(2) with count tracking
- Step 3: integer weighted sampling helper (sample_weighted)
- Step 4: generate implementation with dead-end handling
- Step 5: run the generator with the Alice corpus and seeded RNG
- Step 6: guidance for trying a larger Project Gutenberg corpus
- Full reference solution in a collapsible details block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt e31316f863 docs(edu): write markov §1 what is a markov chain [fbf323] 3 months ago
Elijah Voigt a75b310129 docs(edu): write markov §5 random walk exercise [64826a] 3 months ago
Elijah Voigt 85d5d3ec2b docs(edu): write markov §8 n-gram generalization exercise [1f995a]
Full Exercise 4 content: setup, starter code, five guided steps
(tokenize + sliding windows, weighted sampling, VecDeque-based
generate, n=1–4 comparison, memorisation vs novelty discussion),
character-level n-gram stretch goal, and reference solution.
3 months ago
Elijah Voigt 09371b9c4a docs(edu): write markov §9 stationary distributions [68ee16]
Replace stub with full prose covering the stationary equation,
long-run frequency interpretation, irreducibility and aperiodicity,
a worked 2×2 analytical solution for the weather chain, and a power
iteration pseudocode + Rust sketch.
3 months ago
Elijah Voigt 0f772edb7a docs(edu): write markov §10 applications and further reading [5994a6]
Survey PageRank, MCMC, HMMs, RL, bioinformatics, queueing theory, and
language models; add annotated reading list and Rust ecosystem pointers.
3 months ago
Elijah Voigt 401ad5f750 docs(edu): write markov §4 weather model exercise [257a2a]
Add full content for Exercise 1 — Weather Model:
- Setup instructions (cargo new, cargo add rand)
- Starter code skeleton with todo!() bodies
- Step-by-step hints: index conversion, weighted random draw,
  simulate loop, running with the 2-state matrix, comparing
  empirical frequencies to the stationary distribution (2/3, 1/3)
- Collapsed reference solution

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 79c21df6a0 docs(edu): write markov §3 transition probabilities and matrices [44ebe7]
Replaces the stub with full lesson content:
- Defines the transition matrix P[i][j] and stochastic matrix constraints
- Derives multi-step probabilities via π_k = π₀ · P^k
- Works through the 2-state weather chain by hand (1- and 2-step calculations)
- Bridges to §9 stationary distributions
3 months ago
Elijah Voigt 36bf848b63 docs(edu): write markov §6 text generation lesson [92a829]
- Words as states paragraph
- Bigrams and transition tables explanation
- Worked bigram example with two-sentence corpus and transition table
- Why generated text sounds locally plausible but globally incoherent
- Order-n chains and the coherence/novelty tradeoff

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 507d3944e5 Update triage skill 3 months ago
Elijah Voigt 3ce8b16581 chore(nbd): triage TODO into 9 tickets
- d9713b: open/start/complete/close convenience sub-commands
- 53fdbe: list <status> positional arg shortcuts
- 1c686c: next <type> positional arg shortcuts
- 4aceeb: nbd init adds cache.db to .nbd/.gitignore
- 1c5783: VERSION file + nbd version subcommand + /work skill bump
- 3ba7f9: .nbd/config.toml per-project defaults
- e222cd: triage status (new default, excluded from ready/next/list)
- 67209c: [backlog] investigate project-based ticket filtering
- 0f577a: [backlog] investigate user-configurable type/status strings

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 5ddf9a56e1 feat(nbd): add Turso/libsql cache for list performance [833807]
Migrate async runtime from async-std to tokio (required by libsql),
then add a mtime-based libsql cache at .nbd/cache.db that accelerates
nbd list, nbd ready, and nbd next by avoiding redundant file reads.

- Cargo.toml: replace async-std with tokio + libsql = "0.6"
- src/store.rs: async_std → tokio fs API; add open_cache() and
  list_tickets_cached() with fallback to list_tickets on error
- src/main.rs: tokio::main, tokio::fs::remove_file; wire cmd_list,
  cmd_ready, cmd_next to list_tickets_cached
- src/tests.rs: async_std::test → tokio::test, async_std::fs → tokio::fs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 61ac72aee4 fix(nbd): change graph repeat-node marker from [cycle] to * [8b4041]
The [cycle] label was misleading — a node marked this way is not
necessarily in a true cycle, it is simply a shared dependency appearing
in multiple branches of the tree. The `*` marker is more neutral and
concise.

Changes: render_node in display.rs, test in tests.rs, README.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 00f144bb33 chore(nbd): add --json to all claude-md snippet examples [9344a5]
Ensures every command in the embedded snippet uses --json for structured
output, consistent with the guideline at the bottom of the snippet.

Also adds --json to nbd ready and nbd next, and --ftype md to the create
workflow step.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago
Elijah Voigt 16635a908d feat(nbd): add --version flag with X.Y.Z+GitSha format [c24ee8]
build.rs captures the short git SHA at compile time via
`git rev-parse --short HEAD` and emits it as GIT_SHORT_SHA. Falls back
to "unknown" when git is unavailable (e.g. Nix sandboxed builds).

main.rs adds a VERSION const (`env!("CARGO_PKG_VERSION") + "+" + SHA`)
and passes it to clap's `version =` attribute, enabling both -V and
--version flags.

Example output: `nbd 0.1.0+8f4d25b`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 months ago