Skip to Content
Docs

Architecture

Stack

+---------------------------------------------+
|  StruggleTime tray / CLI (`struggletime`) |
+--------------------+------------------------+
                     | starts / pauses / links
+--------------------v------------------------+
|  struggletime daemon  (native, ~1s loop)    |
|  - watch saves and build caches             |
|  - optional hooks and IDE adapters          |
|  - seal -> .aitime-ledger.json              |
+--------------------+------------------------+
                     | POST /v1/buckets/batch
+--------------------v------------------------+
|  struggletime serve  (native HTTP)         |
|  - auth, projects, stats                    |
|  - allowlist schema                         |
|  - static SPA + Fumadocs under /docs        |
+--------------------+------------------------+
                     | same scoring rules
+--------------------v------------------------+
|  rust/crates/st-core + weighting/rules-*.yaml |
+---------------------------------------------+

L1: Passive file tracking

No OCR. Structural footprints only:

  • Scrambled file IDs (sha256(salt:path))
  • Build/test cache directory presence/mtime classes
  • Exec category events from shell hooks (name/category, not argv)

L2: Scoring what “counts”

st-core turns a sealed time slice into weighted seconds. FORMULA_VERSION is stamped on every accepted bucket.

Provenance

  • Local append-only log with prev_hash
  • Offline queue flushes in order when connectivity returns

In-repo packages

PathPurpose
rust/crates/st-daemonTracker binary
rust/crates/st-serverHTTP API + static UI
rust/crates/st-helper / st-trayCLI + supervisor
rust/crates/st-coreShared verify / scoring
weighting/YAML rules + calibration notes
docs-site/Fumadocs MDX source
adapters/Optional L2 enrichment
scripts/verify_adapters.shAdapter emit/presence checks

On this page