# cuttie1979/day3-repo architecture

> Architecture diagram of the GitHub repository cuttie1979/day3-repo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cuttie1979/day3-repo
- Repository: https://github.com/cuttie1979/day3-repo

## Overview

This repository is session material for teaching test-first, spec-driven development and context engineering. Its executable demonstration compares a deliberately flawed AES implementation with a hardened implementation behind the same public API: learners run round-trip and property tests to see what tests reveal, then inspect protections supplied by types and crypto crates. The graph covers the demo’s runtime selection and crypto behavior; research and prompt materials are supporting session content, not runtime components. Evidence is limited to the README and the excerpted Rust sources.

Main entry points: [`rust-aes-demo/src/lib.rs`](https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/lib.rs) (Public API and errors), [`rust-aes-demo/src/naive.rs`](https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/naive.rs) (Naive AES-CBC), [`rust-aes-demo/src/hardened.rs`](https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/hardened.rs) (Hardened AES-GCM), [`research`](https://github.com/cuttie1979/day3-repo/tree/main/research) (Research outputs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Demo API"]
  node_api["Public API and errors<br/>[lib.rs]"]
end

subgraph group_impl["Crypto implementations"]
  node_naive["Naive AES-CBC<br/>[naive.rs]"]
  node_hard["Hardened AES-GCM<br/>[hardened.rs]"]
end

subgraph group_session["Session materials"]
  node_session["Session materials"]
  node_research["Research outputs"]
  node_prompts["Slide prompts"]
  node_itinerary["Itinerary and criteria<br/>[itinerary.md]"]
end

node_learner(("Learner"))
node_crypto["Crypto crates"]
node_feynman["Feynman DeepResearch"]

node_learner -->|"uses"| node_api
node_api -->|"selects default"| node_naive
node_api -->|"selects feature"| node_hard
node_naive -->|"uses AES and RNG"| node_crypto
node_hard -->|"uses AEAD and secrets"| node_crypto
node_learner -->|"studies"| node_session
node_session -->|"includes"| node_research
node_session -->|"includes"| node_prompts
node_session -->|"directs work"| node_itinerary
node_feynman -->|"produces outputs"| node_research

click node_api "https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/lib.rs"
click node_naive "https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/naive.rs"
click node_hard "https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/hardened.rs"
click node_research "https://github.com/cuttie1979/day3-repo/tree/main/research"
click node_prompts "https://github.com/cuttie1979/day3-repo/tree/main/prompts"
click node_itinerary "https://github.com/cuttie1979/day3-repo/blob/main/itinerary.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api toneBlue
class node_naive,node_hard toneAmber
class node_session,node_research,node_prompts,node_itinerary toneMint
class node_learner,node_crypto,node_feynman toneIndigo
```

## Components

### Demo API

- [Public API and errors](https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/lib.rs): `rust-aes-demo/src/lib.rs`

### Crypto implementations

- [Naive AES-CBC](https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/naive.rs): `rust-aes-demo/src/naive.rs`
- [Hardened AES-GCM](https://github.com/cuttie1979/day3-repo/blob/main/rust-aes-demo/src/hardened.rs): `rust-aes-demo/src/hardened.rs`

### Session materials

- **Session materials**
- [Research outputs](https://github.com/cuttie1979/day3-repo/tree/main/research): `research`
- [Slide prompts](https://github.com/cuttie1979/day3-repo/tree/main/prompts): `prompts`
- [Itinerary and criteria](https://github.com/cuttie1979/day3-repo/blob/main/itinerary.md): `itinerary.md`

### Other components

- **Learner**
- **Crypto crates**
- **Feynman DeepResearch**

## Connections

- Learner → Public API and errors: uses (evidence: `rust-aes-demo/src/lib.rs`)
- Public API and errors → Naive AES-CBC: selects default (evidence: `rust-aes-demo/src/lib.rs`)
- Public API and errors → Hardened AES-GCM: selects feature (evidence: `rust-aes-demo/src/lib.rs`)
- Naive AES-CBC → Crypto crates: uses AES and RNG (evidence: `rust-aes-demo/src/naive.rs`)
- Hardened AES-GCM → Crypto crates: uses AEAD and secrets (evidence: `rust-aes-demo/src/hardened.rs`)
- Learner → Session materials: studies (evidence: `README.md`)
- Session materials → Research outputs: includes (evidence: `README.md`)
- Session materials → Slide prompts: includes (evidence: `README.md`)
- Session materials → Itinerary and criteria: directs work (evidence: `README.md`)
- Feynman DeepResearch → Research outputs: produces outputs (evidence: `README.md`)
