Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.5 KB

File metadata and controls

51 lines (36 loc) · 1.5 KB

tinyhttp - Project Instructions

Project Type

Guided learning project using the project-lab workflow. This is NOT a typical codebase - it exists to teach Node.js internals through hands-on implementation.

Authorship Model

Code is split between AI and Human. Every commit message MUST document which files/lines were written by whom.

AI writes (the boring 70%):

  • Project scaffolding, config, directory structure
  • Type definitions, interfaces, enums
  • Function signatures with doc comments
  • Glue code connecting modules
  • Test cases (after human implements the logic)
  • Helper utilities (logging, error types, config parsing)

Human writes (the learning 30%):

  • Core algorithms (parsers, state machines)
  • Design decisions with multiple valid approaches
  • Performance-critical code paths
  • Protocol implementations
  • The "interesting" conditional logic

Commit message format:

Step N: [description]

## Authorship

### AI-generated:
- [file]: [what]

### HUMAN-written:
- [file] lines X-Y: [what they implemented]

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

TODO(human) Pattern

  • Exactly ONE TODO(human) block per implementation step
  • Surrounding code must compile with the TODO replaced by a stub (throw/panic)
  • Include input/output contract in comments above the TODO
  • Do NOT write the TODO(human) logic for the user unless they explicitly ask (push back once first)

Stack

  • Bun runtime, TypeScript strict mode, vitest
  • node:net for raw TCP - no http module, no Express