streamd/CLAUDE.md
Konstantin Fickel 4116a7042d
All checks were successful
Continuous Integration / Lint, Check & Test (push) Successful in 2m32s
Continuous Integration / Build Package (push) Successful in 3m0s
refactor: rewrite in rust
2026-03-29 18:23:21 +02:00

1.4 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Build & Test Commands

nix develop              # Enter dev shell with Rust toolchain
nix build                # Build the package
nix flake check          # Run all checks (clippy, fmt, tests, pre-commit)

# Inside nix develop:
cargo test               # Run all tests
cargo test test_name     # Run a specific test
cargo clippy             # Lint
cargo fmt                # Format

Architecture

Streamd parses markdown files into hierarchical Shards, then localizes them by assigning temporal moments and dimensional placements based on @Tag markers.

Data flow: Markdown → extract::parserShard tree → localize::shardLocalizedShard tree

Key modules:

  • models/ — Core types: Shard, LocalizedShard, Dimension, Marker, Timecard
  • extract/ — Tag extraction (tag_extraction.rs) and markdown parsing (parser.rs)
  • localize/ — DateTime extraction, configuration merging, shard localization
  • timesheet/ — State machine that converts localized shards into timecards
  • query/ — Recursive search functions for finding shards by predicate
  • cli/ — Clap-based CLI commands

Requirements

REQUIREMENTS.md contains the formal specification. Update it along with the README.md whenever implementing or changing features.