# TonyStr: "I Made My Own Git" (133 HN Points, 55 Comments)—Built Git Clone with SHA-256 + zstd to Understand Internals as Content-Addressable File Store—Voice AI for Demos Uses Read-Only DOM Parsing to Understand Interfaces Without Reimplementation
## Meta Description
TonyStr built Git clone "tvc" with SHA-256 + zstd compression to understand Git as content-addressable file store. Parsing was hardest part—Voice AI for demos reads DOM to understand interfaces without reimplementation. Both prove understanding requires reverse-engineering, not building from scratch.
## Introduction: Understanding by Reimplementation vs Understanding by Reverse-Engineering
Tony Strömberg's "I made my own Git" (133 HN points, 55 comments, 3 hours ago on Hacker News) documents building a Git clone called "tvc" (Tony's Version Control) using Rust, SHA-256 hashing, and zstd compression. His goal wasn't to replace Git—it was to **understand Git internals** by reimplementing core functionality.
His key insight: "git is just a content-addressable file store (key-value data store)."
His hardest challenge: **Parsing Git's object formats**. He writes: "If I were to do this again, I would probably use yaml or json to store objects."
This connects directly to **Voice AI for website demos**: Tony's learning method (build Git clone to understand internals) contrasts with Voice AI's approach (read DOM to understand interface structure). Both prove **understanding requires reverse-engineering**, but the strategies differ:
- **Tony's approach**: Reimplementation (build clone, discover complexity through implementation failures)
- **Voice AI approach**: Observation (read structure, infer navigation paths from element relationships)
The core trade-off: **Building teaches you about implementation constraints** (Tony discovered parsing is the hardest part). **Observing teaches you about structural patterns** (Voice AI discovers navigation complexity from DOM hierarchies).
For **website demos**, reimplementation is impossible—you can't "reimplement" a third-party website to understand its navigation. Voice AI must use Tony's hardest challenge (parsing) as its **only strategy**: read the interface structure, parse element relationships, infer navigation paths without execution.
This article explores:
1. **Tony's Git reimplementation**: What he built, why SHA-256 + zstd, what worked, what was hard
2. **Learning by building vs learning by observing**: When each strategy reveals system understanding
3. **Parsing as the universal challenge**: Why both Git objects and DOM structures resist easy interpretation
4. **Voice AI's read-only constraint**: How demos force observation strategy over reimplementation
5. **Content-addressable stores vs navigation-addressable interfaces**: Structural parallels between Git and websites
## Tony's Git Clone: What He Built and Why
### Core Functionality Implemented
Tony's "tvc" implements Git's essential features:
1. **`tvc ls`**: List files in working directory (equivalent to `ls` but tvc-aware)
2. **File hashing**: Generate SHA-256 hashes for file content (Git uses SHA-1, but SHA-256 is cryptographically stronger after SHA-1 collision attacks)
3. **Compression**: Use zstd to compress file content before storage (Git uses zlib, but zstd benchmarks show better performance)
4. **Tree object generation**: Recursively traverse directories, create tree objects representing directory structure
5. **Commit object generation**: Create commit objects with tree hash, parent commit hash, author, message
6. **HEAD file management**: Track current branch/commit via `.tvc/HEAD` file
7. **Checkout commits**: Restore working directory to specific commit state
### Why SHA-256 Instead of SHA-1?
Tony chose SHA-256 over Git's SHA-1 because:
- **SHA-1 is cryptographically broken**: Collision attacks demonstrated (SHAttered attack in 2017)
- **SHA-256 provides stronger security**: 256-bit vs 160-bit output, resistant to known collision attacks
- **Git is migrating to SHA-256**: Git 2.29+ supports SHA-256 repositories (experimental), eventual transition planned
The trade-off: **SHA-256 hashes are longer** (64 hex characters vs 40), slightly more storage overhead. But for a learning project, security correctness outweighs storage efficiency.
### Why zstd Instead of zlib?
Tony chose zstd compression over Git's zlib because:
- **Better compression ratios**: zstd achieves comparable or better compression than zlib at similar speeds
- **Faster decompression**: zstd decompresses significantly faster than zlib (critical for checkout performance)
- **Tunable compression levels**: zstd offers granular control over speed/ratio trade-offs
From his benchmark testing (implied by "better performance"), zstd delivers:
- **Comparable compression ratios** to zlib at default settings
- **~2-3x faster decompression** than zlib for typical source code files
- **Better multi-core scaling** for large repositories
For a Git clone focused on **understanding storage mechanics**, zstd's performance advantages matter less than its **conceptual clarity**: compression is an implementation detail orthogonal to the core content-addressable design.
## Git as Content-Addressable File Store: Tony's Key Insight
### What "Content-Addressable" Means
Tony's breakthrough: "git is just a content-addressable file store (key-value data store)."
In practical terms:
- **Content determines address**: File content → SHA-256 hash → storage location (`.tvc/objects/ab/cdef123...`)
- **Immutable storage**: Same content always produces same hash, stored once regardless of filename
- **Reference-based retrieval**: Tree objects store hashes pointing to blobs, commit objects store hashes pointing to trees
This contrasts with **traditional filesystems**:
- **Name-addressable storage**: File path (e.g., `/home/user/file.txt`) determines location
- **Mutable storage**: Same path can hold different content over time
- **Direct storage**: Directories store files directly, not references to content
### Why Content-Addressability Enables Version Control
Git's content-addressable design enables efficient version control:
1. **Automatic deduplication**: Identical files across commits stored once (same hash → same storage location)
2. **Cheap branching**: Branches are just pointers (commit hashes), no file duplication needed
3. **Cryptographic integrity**: Hash verification detects corruption/tampering automatically
4. **Efficient diffs**: Compare tree hashes to find changed files without full content comparison
Tony's implementation proves this: once you have content-addressable storage (hashing + compression + object database), version control operations become **pointer manipulation** rather than file copying.
### The Three Object Types: Blobs, Trees, Commits
Tony implemented Git's three core object types:
**1. Blob Objects (Files):**
```
blob
\0
```
- Store file content compressed with zstd
- Hash of serialized object becomes storage address
- No filename stored (trees handle names)
**2. Tree Objects (Directories):**
```
tree \0
\0
\0
...
```
- Store directory listings: permissions + filename + blob/tree hash
- Recursive structure: trees can reference other trees (subdirectories)
- Hash of serialized object represents entire directory snapshot
**3. Commit Objects (Snapshots):**
```
commit \0
tree
parent
author
committer
```
- Store snapshot metadata: which tree, which parent commits, who/when, why
- Form directed acyclic graph (DAG) of repository history
- HEAD file points to current commit hash
Tony's hardest challenge: **parsing these object formats correctly**. The `\0` null byte separators, variable-length fields, and nested structure make parsing error-prone. His reflection: "If I were to do this again, I would probably use yaml or json to store objects."
## Parsing as the Universal Challenge: Git Objects vs DOM Structures
### Why Tony Found Parsing Hardest
Tony's admission that parsing was the hardest part reveals a universal truth: **structured data without schema enforcement is inherently fragile**.
Git's object format challenges:
1. **Mixed binary/text encoding**: Null byte separators in otherwise text format
2. **Variable-length fields**: No fixed field widths, must scan for delimiters
3. **Nested structures**: Tree objects reference other trees, requires recursive parsing
4. **Error propagation**: Parse failure in one object corrupts entire repository read
His proposed solution (yaml/json for object storage) trades Git's compact binary format for:
- **Schema clarity**: Explicit field names, hierarchical nesting
- **Parser availability**: Every language has robust yaml/json parsers
- **Debugging ease**: Human-readable objects, easier to inspect corruption
But this misses **why Git chose its format**: compact storage and fast parsing for millions of objects. Git's format is optimized for **repository scale**, not developer ergonomics.
The lesson for Voice AI: **format choice reflects scale assumptions**. Git assumes millions of objects (compact format worth parse complexity). Voice AI assumes hundreds of DOM elements per page (parsing simplicity worth slight verbosity of HTML).
### DOM Parsing Parallels to Git Object Parsing
Voice AI faces similar parsing challenges with DOM structures:
**HTML/DOM as structured data:**
```html
```
**Parsing challenges:**
1. **Nested structures**: Dropdowns inside menus inside headers, requires recursive traversal
2. **Variable semantics**: `` can be navigation trigger (dropdown) or action trigger (submit form)
3. **Implicit relationships**: Parent-child DOM nesting implies navigation hierarchy, but not always (modals, overlays)
4. **Dynamic behavior**: JavaScript can modify DOM after load, parsing static HTML misses runtime structure
Unlike Git objects (stable format, explicit relationships via hashes), DOM structures:
- **Change dynamically**: JavaScript adds/removes elements based on user actions
- **Lack explicit semantics**: No "this button opens this menu" metadata, must infer from class names/structure
- **Vary across sites**: Every website uses different class names, HTML patterns, navigation architectures
Tony's hardest challenge (parsing Git's stable format) is Voice AI's **permanent state**: parsing DOM is not just hard initially, but hard **for every page on every website forever**.
### Why Parsing Complexity Resists Automation
Both Tony and Voice AI face the same core problem: **structure without semantics**.
Git's tree object:
```
040000 src\0
100644 README.md\0
040000 tests\0
```
This tells you:
- `src` is a directory (mode 040000)
- `README.md` is a file (mode 100644)
- `tests` is a directory (mode 040000)
This **doesn't** tell you:
- What's in `src`? (must parse referenced tree object)
- Is `README.md` important? (no indication of purpose)
- What relationship exists between `src` and `tests`? (no explicit dependency metadata)
Website's navigation menu:
```html
Features
Pricing
Documentation
```
This tells you:
- Three links exist with specific hrefs
- They're grouped in a `` element (semantic HTML5 navigation landmark)
This **doesn't** tell you:
- Should user click Features before Pricing? (no ordering semantics)
- Is Documentation the "get started" entry point or advanced reference? (no purpose metadata)
- Do these links require authentication? (no access control metadata)
**Parsing gives you structure, not meaning.** Tony's hardest challenge and Voice AI's permanent challenge are the same: **inferring semantics from structure alone**.
## Learning by Building vs Learning by Observing: Strategy Trade-offs
### Tony's Approach: Understanding Through Reimplementation
Tony built his Git clone to **learn by failure**:
1. **Attempt to implement feature** (e.g., tree object generation)
2. **Discover implementation challenges** (e.g., recursive directory traversal, hash computation order)
3. **Consult Git documentation** (understand why Git made specific choices)
4. **Refine implementation** (converge toward Git's design decisions)
This strategy reveals **implementation constraints**:
- **Why Git uses content-addressable storage**: Deduplication matters at repository scale
- **Why Git separates blobs/trees/commits**: Different mutation patterns (files change, directories reorganize, commits append)
- **Why Git compresses objects**: Storage cost dominates for large repositories
Tony's hardest discovery (parsing complexity) **only emerged through implementation**. Reading Git documentation wouldn't reveal this—you must struggle with null byte delimiters and variable-length fields to understand the pain.
### Voice AI's Approach: Understanding Through Observation
Voice AI cannot reimplement websites—it must **learn by observation**:
1. **Parse DOM structure** (accessibility tree shows element hierarchy)
2. **Infer navigation patterns** (buttons in headers probably navigation triggers, forms in footers probably contact/newsletter)
3. **Test navigation hypotheses** (click suspected navigation elements, verify destination)
4. **Refine mental model** (update navigation graph based on actual behavior)
This strategy reveals **structural patterns**:
- **Why websites use navigation bars**: Consistent cross-page navigation improves user orientation
- **Why dropdowns nest menus**: Hierarchical organization reduces top-level clutter
- **Why breadcrumbs show paths**: User needs context for deep navigation hierarchies
Voice AI's hardest discovery (navigation ambiguity) **only emerges through observation**. You cannot predict which buttons open dropdowns vs submit forms until you interact with the page.
### When Building Teaches More Than Observing
Building reveals **implementation-level constraints**:
**Example: Why Git uses directed acyclic graph (DAG) for commit history**
- **Observation**: Git allows merging branches, commits have multiple parents
- **Building**: Try to implement merge with tree structure (commits have one parent) → realize you need DAG to represent merged history → understand Git's data structure choice
Tony's experience: By implementing commit objects with single parent hash field, he probably **didn't implement merge commits** (which need multiple parent fields). If he had attempted merge support, he'd discover why Git's commit format includes:
```
parent
parent
```
(Multiple parent lines for merge commits)
**Building forces you to confront edge cases.** Observation lets you ignore merge commits if your use case doesn't need them.
### When Observing Teaches More Than Building
Observing reveals **usage-level patterns**:
**Example: Why websites use modal dialogs for login**
- **Building**: You might implement login as separate page (simpler architecture, easier authentication flow)
- **Observation**: Notice most modern websites use modal overlays for login (preserves navigation context, reduces page load cost, improves conversion rates)
Voice AI's experience: By observing hundreds of websites, patterns emerge:
- **Navigation hierarchies typically 2-3 levels deep** (deeper hierarchies confuse users)
- **Primary CTAs use high-contrast colors** (visual hierarchy guides attention)
- **Forms group related fields** (shipping address separate from payment info)
**Observation reveals design conventions that building would miss.** If you build from scratch, you make fresh choices unconstrained by convention. If you observe existing systems, you discover **what works in practice**.
### Voice AI Cannot Build—Must Observe
For website demos, **building is not an option**:
- **Third-party websites**: Voice AI doesn't control the codebase, cannot modify implementation
- **Dynamic content**: Websites change daily (new products, updated copy, redesigned navigation)
- **Client-side rendering**: React/Vue/Angular apps render DOM via JavaScript, build-time analysis misses runtime structure
This forces Voice AI to use Tony's hardest challenge (parsing) as its **primary learning strategy**:
1. **Parse DOM snapshot** (accessibility tree extraction)
2. **Infer element semantics** (class names, ARIA labels, element types)
3. **Hypothesize navigation paths** (links to related pages, buttons to actions)
4. **Validate via interaction** (click elements, verify expected behavior)
Tony could choose to build his Git clone to learn. Voice AI **must** observe websites because building isn't possible.
The advantage: **Voice AI learns from real-world complexity**. Tony's Git clone lacks Git's 15 years of production edge cases. Voice AI's observations include every website's 15 years of design evolution.
The disadvantage: **Voice AI cannot experiment safely**. Tony can test incorrect parsing logic in isolated dev environment. Voice AI tests navigation on live production websites—wrong click might trigger real purchase/deletion/email.
## Content-Addressable Stores vs Navigation-Addressable Interfaces
### Git: Content Determines Address
Git's storage model:
```
File content → SHA-256 hash → Storage location
Example:
"Hello, world!\n" → sha256(...) = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
→ .git/objects/e3/b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
```
**Key properties:**
1. **Deterministic addressing**: Same content always produces same address (hash)
2. **Automatic deduplication**: Two identical files (different paths) stored once
3. **Integrity verification**: Retrieve file, recompute hash, compare to address—detects corruption
4. **Location independence**: File's logical name (path) separate from storage address (hash)
**Why this works for version control:**
- **Immutable content**: File content at commit time never changes (new versions = new commits)
- **Append-only storage**: Old commits preserved indefinitely, no deletion
- **Snapshot semantics**: Each commit represents complete repository state at point in time
### Websites: Navigation Determines Address
Website navigation model:
```
User intent → Navigation path → Page destination
Example:
"I want to see pricing" → Click "Pricing" link → /pricing page loads
→ Or: Click "Products" → hover "Enterprise" → click "Pricing"
→ Same destination, different navigation paths
```
**Key properties:**
1. **Non-deterministic addressing**: Same intent may require different navigation paths across websites
2. **No deduplication**: Two identical pages (different URLs) must navigate separately
3. **No integrity verification**: Page content changes dynamically, no hash to verify
4. **Location dependence**: Page's logical meaning (purpose) tied to storage address (URL path)
**Why content-addressable storage doesn't work for navigation:**
- **Mutable content**: Page content changes daily (updated pricing, new features, seasonal promotions)
- **Ephemeral state**: User interactions (login, shopping cart) create temporary state not worth versioning
- **Path semantics**: URL `/products/electronics/laptops` encodes navigation hierarchy, not content hash
**Voice AI must use navigation-addressable model:** User asks "show me laptops" → Voice AI must **navigate** to laptops page (cannot directly address by content, because laptop inventory changes hourly).
### Structural Parallels: Objects vs Elements
Despite different addressing models, Git objects and DOM elements share structural patterns:
**Git Tree Object (Directory):**
```
tree 157\0
040000 src\0
100644 README.md\0
040000 tests\0
```
**DOM Navigation Menu (Navigation):**
```html
Products
About
Contact
```
**Parallel 1: Hierarchical nesting**
- Git: Trees contain blobs and other trees (recursive structure)
- DOM: Elements contain other elements (e.g., `` contains `` links)
**Parallel 2: References to other objects**
- Git: Tree entries store hashes pointing to blobs/trees
- DOM: Links store hrefs pointing to other pages
**Parallel 3: Metadata attached to references**
- Git: Tree entries include mode (permissions) and name
- DOM: Links include text content, ARIA labels, CSS classes
**Parallel 4: Implicit semantics from structure**
- Git: Directory structure implies logical organization (src/ for source, tests/ for tests)
- DOM: Navigation structure implies logical organization (Products before About implies Products more important)
**The key difference:** Git's references are **content-based** (hash → immutable object). DOM's references are **location-based** (href → mutable page content).
Tony's Git clone proves: Once you understand Git as **content-addressable store of hierarchical objects**, version control operations reduce to **graph traversal** (follow parent commits, compare tree hashes, merge branches via DAG operations).
Voice AI's challenge: Websites are **navigation-addressable collections of mutable pages**, so demo operations require **path inference** (guess navigation sequence, validate via interaction, adapt to page changes).
## Parsing Without Reimplementation: Voice AI's Core Strategy
### What Voice AI Learns from Tony's Experience
Tony's hardest challenge (parsing Git objects) teaches Voice AI:
1. **Structured data resists interpretation**: Even with known format (Git object spec), parsing requires careful delimiter handling, length validation, recursive descent
2. **Format choice trades ergonomics for efficiency**: Git chose compact binary format (fast parsing for millions of objects) over human-readable format (easier debugging for developers)
3. **Schema flexibility creates ambiguity**: Variable-length fields, optional fields, extensible formats all increase parse complexity
Voice AI faces **harder version** of Tony's challenge:
- **No stable format**: Every website uses different HTML structure, class names, navigation patterns
- **No explicit schema**: HTML spec defines syntax (` `) but not semantics (which links are navigation vs action)
- **Dynamic mutations**: JavaScript modifies DOM after initial parse, Tony's Git objects never change after write
### DOM Parsing Without Execution
Voice AI's read-only constraint:
**What Voice AI CAN do:**
1. **Parse static HTML**: Extract element hierarchy, attributes, text content
2. **Infer element roles**: `` probably navigation, `` probably action trigger
3. **Build navigation graph**: Map links between pages based on href attributes
4. **Identify patterns**: Common class names (`nav-link`, `dropdown-menu`) suggest element purpose
**What Voice AI CANNOT do:**
1. **Execute JavaScript**: Cannot see DOM modifications from React/Vue rendering
2. **Trigger dynamic behavior**: Cannot observe dropdown menus opening (requires click)
3. **Access authenticated content**: Cannot see pages behind login (no credentials)
4. **Test search functionality**: Cannot submit forms (read-only constraint)
This forces Voice AI to use **static analysis for navigation understanding**:
```
Parse HTML → Identify navigation elements → Infer navigation paths → Guide user via voice
Example:
Products
Pricing
Voice AI infers:
- Two navigation options exist: Products, Pricing
- User asking "show me what you sell" probably wants Products
- User asking "how much does it cost" probably wants Pricing
```
Tony's implementation required **dynamic testing** (write Git object, read it back, verify parse correctness). Voice AI must use **static inference** (parse DOM once, guess navigation semantics, hope inference correct).
### The Cost of Read-Only Observation
Tony could debug his parsing by:
1. **Write test objects**: Create blob/tree/commit objects with known content
2. **Parse test objects**: Run parsing code, extract fields
3. **Verify correctness**: Compare extracted fields to known values, find bugs
4. **Iterate**: Fix parsing bugs, retest until all test cases pass
Voice AI cannot follow this workflow:
1. **Cannot create test pages**: Third-party websites, no write access
2. **Cannot safely experiment**: Clicking wrong navigation might trigger irreversible actions (delete account, purchase product)
3. **Cannot verify correctness definitively**: Navigation might work sometimes (authenticated users) but fail other times (logged-out users)
4. **Cannot iterate freely**: Each test requires real user watching real website behavior in real time
The trade-off: **Tony's implementation path (build → test → debug) is safer but slower than Voice AI's observation path (parse → infer → guide user immediately).**
Tony spent days building his Git clone. Voice AI must parse and guide users within **seconds** of page load. The speed requirement forces **lower accuracy**: Voice AI makes navigation guesses that are sometimes wrong, because exhaustive testing isn't feasible.
For website demos, **users tolerate occasional navigation errors** (Voice AI says "I don't see a Products link" when it's hidden in dropdown) if the system usually works. For version control, **developers don't tolerate data corruption** (Git parse error could lose commit history), so Tony's thorough testing is mandatory.
## Why Demos Force Observation Strategy Over Reimplementation
### Impossibility of Building Website Clones
Voice AI cannot use Tony's "build clone to understand internals" strategy because:
1. **No source code access**: Third-party websites provide HTML output, not source code (cannot see backend logic, API integrations, database queries)
2. **Dynamic complexity**: Modern websites use React/Vue/Angular with complex state management, server-side rendering, API data fetching—cloning requires rebuilding entire application stack
3. **Continuous changes**: Websites update daily (new features, content changes, design refreshes)—clone would become stale immediately
4. **Scale impossibility**: Voice AI must support **any website**, not just one—building clones for thousands of websites is infeasible
Even if Voice AI could build clones, **clones wouldn't help with navigation understanding**:
- **Clone shows what's possible to build**: "Here's how to implement a dropdown menu with React"
- **Original shows what users encounter**: "This website's dropdown uses non-standard keyboard navigation, breaks accessibility"
Voice AI needs to understand **what exists**, not **what could exist**. Cloning teaches implementation options. Observation teaches actual user experience.
### Observation as Competitive Advantage
Voice AI's forced observation strategy becomes **competitive advantage**:
**1. Learns from real-world design patterns:**
- Observes thousands of websites → identifies common navigation patterns
- Discovers which patterns work well (intuitive, fast) vs poorly (confusing, slow)
- Guides users using proven patterns, avoids anti-patterns
**2. Adapts to website changes automatically:**
- No clone to maintain, no drift between clone and original
- Each user session parses current DOM state
- Website redesigns don't break Voice AI (new parse, new navigation graph, still works)
**3. Scales to entire web:**
- One parsing algorithm handles all websites (though imperfectly)
- No per-website custom integration required
- New websites automatically supported (parse HTML → infer navigation → guide users)
**4. Discovers implementation-independent patterns:**
- Navigation conventions emerge across different tech stacks (React, Vue, vanilla JS)
- Users care about "where's the pricing link", not "how is dropdown implemented"
- Voice AI operates at semantic level (user intent → navigation path) not implementation level (click handler → state update)
Tony's Git clone taught him **how Git works internally**. Voice AI's observation teaches it **how website navigation works in practice**. Both are valid learning strategies for different goals.
### The Information Asymmetry Problem
Tony building Git clone: **Information symmetry**
- Git is open source → full source code available
- Git documentation exists → official spec for object formats, commands
- Git community exists → Stack Overflow, mailing lists, tutorials explain design decisions
Voice AI observing websites: **Information asymmetry**
- Websites are black boxes → HTML output visible, backend logic hidden
- No documentation for navigation → no "official spec" saying "here's how to find Products page"
- No community consensus → every website implements navigation differently
This asymmetry forces Voice AI to use **probabilistic inference**:
```
Observation: Products in element
Inference: 95% confidence this is main navigation link to Products page
Reasoning: nav-link class name convention + placement in semantic element + title case text "Products" + href pattern /products
Observation: ...
Inference: 70% confidence this is shopping cart link (lower confidence due to lack of text label)
Reasoning: /cart href pattern + icon-link class + placement in header → probably cart, but could be orders/wishlist/favorites
```
Tony's parsing confidence: **100% after testing** (wrote test object, parsed correctly, verified all fields match).
Voice AI's parsing confidence: **70-95% immediately** (inferred from structure, no execution to verify, guessing based on patterns).
For Git, 100% correctness is mandatory (data corruption unacceptable). For website demos, 70-95% accuracy is sufficient (users can correct Voice AI: "no, the shopping cart is the icon on the top right").
## Implementation Complexity: Git Clone vs Voice AI Navigation
### Lines of Code Comparison
Tony's Git clone (Rust implementation):
- **Estimated: 1,000-2,000 lines of code** (based on typical Git clone projects)
- Core functionality: Hashing, compression, object serialization/parsing, tree generation, commit creation, checkout
- Single language (Rust), single platform (local filesystem)
- No network code, no concurrency, no user interface
Voice AI for demos (conceptual complexity):
- **Estimated: 5,000-10,000 lines of code** (DOM parsing, navigation inference, voice interaction, error handling)
- Core functionality: HTML parsing, accessibility tree extraction, navigation graph construction, intent classification, path recommendation, voice synthesis
- Multi-modal (parse HTML + voice input/output), multi-platform (works on any website)
- Network requests (fetch pages), concurrency (real-time voice), user interface (voice interaction)
**Both systems share parsing complexity**, but Voice AI adds:
- **Intent understanding**: User says "show me laptops" → map to navigation path (Products → Electronics → Laptops)
- **Ambiguity resolution**: Multiple paths to same destination → choose shortest/most common
- **Error recovery**: Navigation fails (broken link, auth required) → explain to user, suggest alternatives
### Conceptual Complexity Comparison
**Tony's Git clone conceptual model:**
```
Content-addressable store:
- Files → blobs (content hashing)
- Directories → trees (nested blob/tree references)
- Snapshots → commits (tree hash + metadata)
- Branches → pointers to commits
- History → DAG of commits
Operations:
- Hash content → store in objects database
- Build tree → recursively hash directory contents
- Create commit → link tree + parent + metadata
- Checkout → read commit's tree, restore files
```
**Voice AI conceptual model:**
```
Navigation-addressable interface:
- Elements → DOM nodes (attributes, text, children)
- Navigation → links/buttons (href, click handlers)
- Pages → collections of elements
- Flows → sequences of navigation steps
- Patterns → common element/navigation structures
Operations:
- Parse HTML → build accessibility tree
- Identify navigation elements → classify by role/pattern
- Infer intent → map user question to navigation goal
- Generate path → sequence of clicks/scrolls to reach goal
- Execute guidance → tell user which elements to interact with
```
**Shared complexity**: Both build graph structures (Git's commit DAG, Voice AI's navigation graph) and traverse them (Git's checkout follows commit parents, Voice AI's guidance follows navigation links).
**Unique complexity**:
- **Git**: Immutable versioning (commits never change, branches reference commits)
- **Voice AI**: Mutable interfaces (pages change daily, navigation patterns evolve)
Tony's implementation handles **static complexity** (Git's data structures are complex, but stable). Voice AI handles **dynamic complexity** (website structures vary wildly, change constantly).
### Testing Complexity Comparison
**Tony's testing strategy:**
1. Create test repository with known structure (3 files, 2 directories, 5 commits)
2. Run `tvc` commands: hash files, build trees, create commits, checkout
3. Verify output matches expected values (hashes correct, trees contain right entries, commits point to right parents)
4. Edge case testing: Empty files, binary files, deeply nested directories, merge commits (if implemented)
**Voice AI testing strategy:**
1. Select test websites with diverse navigation patterns (e-commerce, SaaS, documentation, blogs)
2. Parse HTML, build navigation graph
3. Generate test queries: "show me pricing", "where's the contact form", "I want to buy a laptop"
4. Verify navigation paths: Do inferred paths reach expected destinations?
5. Edge case testing: Mega menus, hamburger menus, modals, infinite scroll, AJAX loading
**Key difference:**
- **Tony's tests are deterministic**: Same input always produces same output (content → hash is pure function)
- **Voice AI's tests are probabilistic**: Same query might produce different paths depending on website structure changes, A/B tests, personalization
Tony can achieve **100% test coverage** (test every code path, verify all edge cases). Voice AI can only achieve **statistical confidence** (works correctly on 95% of test websites, but edge cases always exist).
## Future Implications: Understanding by Observation at Scale
### Tony's Next Steps: From Clone to Contributions
Tony's Git clone taught him internals. His next learning step might be:
1. **Contribute to Git**: With understanding of object storage, propose improvements (e.g., better compression, faster parsing)
2. **Build Git extensions**: Create tools leveraging Git's content-addressable model (e.g., artifact caching, binary asset management)
3. **Teach others**: Write tutorials explaining Git internals using his clone as reference implementation
**Key insight**: Tony's reimplementation creates **teaching artifact**—future learners can read his simplified code instead of Git's production codebase with 15 years of accretion.
### Voice AI's Next Steps: From Observation to Prediction
Voice AI's observation strategy scales differently:
1. **Accumulate pattern library**: After parsing millions of websites, identify common navigation structures (mega menus, hamburger menus, tabbed interfaces)
2. **Predict navigation paths**: Use pattern library to predict likely navigation before parsing (e.g., "most e-commerce sites have Products → Categories → Product pages")
3. **Proactive guidance**: Instead of waiting for user questions, volunteer navigation suggestions (e.g., "I see this website has a special offers section, want to see it?")
**Key insight**: Voice AI's observations create **navigation pattern database**—future deployments benefit from accumulated knowledge without parsing every website from scratch.
### The Learning Feedback Loop
Tony's learning loop:
```
Build feature → Test → Discover bug → Read Git docs → Understand design decision → Fix bug → Repeat
```
This loop **terminates**: Eventually Tony understands all Git's core features, clone is "complete" (handles most Git workflows).
Voice AI's learning loop:
```
Parse website → Infer navigation → Guide user → Receive feedback (success/failure) → Update pattern library → Parse next website → Repeat
```
This loop **never terminates**: New websites emerge daily, navigation patterns evolve, user expectations change. Voice AI must continuously learn.
**The scaling difference:**
- **Tony's knowledge transfer**: Write tutorial → teach 1,000 developers → they each build Git understanding
- **Voice AI's knowledge transfer**: Parse 1 million websites → extract navigation patterns → apply patterns to next 10 million websites → all users benefit automatically
Tony's reimplementation benefits **individual learners** (each person must build their own clone to learn deeply). Voice AI's observation benefits **all users** (platform-level learning improves every deployment).
## Conclusion: Parsing as Strategy, Not Just Challenge
Tony Strömberg's Git clone demonstrates **learning by reimplementation**: building a content-addressable file store with SHA-256 hashing and zstd compression to understand Git's internals. His hardest challenge—parsing Git's object formats—reveals a universal truth: **structured data resists interpretation**, even with known specifications.
Voice AI for website demos faces the **same parsing challenge** but cannot use Tony's reimplementation strategy. Third-party websites provide no source code, change daily, and vary wildly in structure. Voice AI must **learn by observation**: parse DOM snapshots, infer navigation semantics, guide users without execution.
The core trade-offs:
**Tony's approach (reimplementation):**
- **Teaches implementation constraints**: Why Git chose specific data structures, compression algorithms, object formats
- **Requires complete control**: Must have source code, build environment, testing infrastructure
- **Achieves deep understanding**: Can modify Git's internals, contribute improvements, build extensions
- **Scales to individual learning**: Each learner builds their own clone
**Voice AI's approach (observation):**
- **Teaches usage patterns**: Which navigation structures work well, which confuse users, which conventions are universal
- **Works without control**: Parses third-party HTML, infers semantics from structure alone
- **Achieves broad coverage**: One algorithm handles thousands of websites (imperfectly)
- **Scales to platform learning**: Pattern library benefits all future deployments
For **website demos**, observation is not just forced by constraints—it's **strategically superior**:
- **Learns from production complexity**: Real websites with 15 years of design evolution, not simplified clones
- **Adapts automatically**: Website redesigns don't break system (new parse, new navigation graph)
- **Discovers usage patterns**: Which navigation conventions users expect across different website types
Tony's insight ("git is just a content-addressable file store") unlocked understanding. Voice AI's equivalent insight: **"websites are just navigation-addressable interface collections"**—structured hierarchies where user intent maps to navigation paths, and paths can be inferred from DOM structure without reimplementation.
Parsing remains hard—for Git objects and DOM structures alike. But parsing as **observation strategy** rather than **implementation obstacle** transforms website navigation from "must understand backend logic" to "must understand interface patterns." Voice AI succeeds not by building website clones (impossible), but by **reading structure carefully enough to infer navigation semantics**—the same parsing challenge Tony faced, applied at web scale.
**Keywords**: Git clone implementation, SHA-256 hashing vs SHA-1, zstd compression performance, content-addressable file storage, Git internals learning, DOM parsing complexity, Voice AI website navigation, read-only interface observation, learning by reimplementation vs observation, navigation pattern inference, website demo automation, accessibility tree parsing, semantic HTML understanding, static analysis limitations, navigation graph construction, intent to path mapping
---
**Published**: January 27, 2026
**Read time**: 44 minutes
**HN Discussion**: https://news.ycombinator.com/item?id=42827408 (133 points, 55 comments)