Skip to content

docs: comprehensive rewrite of .agent/ documentation suite#36

Merged
arvarik merged 1 commit into
mainfrom
chore/harden-agent-docs-comprehensive
Apr 14, 2026
Merged

docs: comprehensive rewrite of .agent/ documentation suite#36
arvarik merged 1 commit into
mainfrom
chore/harden-agent-docs-comprehensive

Conversation

@arvarik

@arvarik arvarik commented Apr 14, 2026

Copy link
Copy Markdown
Owner

Summary

Production-grade rewrite of all five .agent/ documentation files based on a deep file-by-file audit of every source file, test file, CI config, Makefile, and git hook in the repository.

What Changed

ARCHITECTURE.md

  • Added complete repository file tree with all directories and files
  • Documented custom http.Transport configuration (connection pools, timeouts, HTTP/2)
  • Added SSRF and open-redirect protection documentation
  • Documented dual deserialization paths (do() vs doRaw())
  • Added originURL() caching with double-checked locking pattern
  • Full client struct field table with types and purposes
  • CI/CD pipeline and Makefile target documentation

PHILOSOPHY.md

  • Corrected error handling docs (errors.As() only — removed incorrect errors.Is() claim)
  • Added SSRF/open-redirect defense-in-depth rationale
  • Documented User-Agent spoofing strategy
  • Added EeroTime dual-format resilience as a philosophy point
  • Expanded the anti-pattern list with concrete examples

STYLE.md

  • Added net/url and sync to allowed packages (were missing)
  • Documented all 5 test file naming patterns (was only showing 3)
  • Added HTTP method usage table (GET/POST/PUT patterns)
  • Documented request construction patterns (newRequest vs newRequestFromURL)
  • Expanded anti-patterns from 5 to 9 items

TESTING.md

  • Removed phantom tests that didn't exist (TestClient_HitPayloadLimit, fabricated 10-goroutine race test)
  • Added complete 12-file test inventory with every test name
  • Documented all 7 benchmarks across 3 files
  • Added BaseURL configuration rules for httptest mocking
  • Documented session cookie seeding patterns for tests
  • Added internal vs external test package conventions

STATUS.md

  • Replaced stale task table with complete API method inventory (9 methods)
  • Added full data model count (60+ exported structs across 8 files)
  • Added build/CI status dashboard
  • Documented known limitations and 6-item roadmap

Verification

  • All tests pass with race detection: go test -v -race ./...
  • No source code changes — documentation only

- ARCHITECTURE.md: Added complete file tree, custom http.Transport details,
  SSRF/open-redirect protection docs, dual deserialization paths (do vs doRaw),
  originURL caching with double-checked locking, full client struct field table,
  CI/CD pipeline docs, and 8 Makefile target descriptions

- PHILOSOPHY.md: Corrected error handling docs (errors.As only, not errors.Is),
  added SSRF/open-redirect defense-in-depth rationale, User-Agent spoofing
  strategy explanation, EeroTime dual-format resilience, dual deserialization
  strategy, explicit security boundary model, and concrete anti-pattern list

- STYLE.md: Added net/url and sync to allowed packages list, documented all 5
  test file naming patterns (was only showing 3), added HTTP method usage table,
  request construction patterns (newRequest vs newRequestFromURL), buildRequest
  factory pattern, and expanded anti-pattern list from 5 to 9 items

- TESTING.md: Removed phantom tests (TestClient_HitPayloadLimit, fabricated
  10-goroutine race test), added complete 12-file test inventory with all test
  names, documented 7 benchmarks, BaseURL configuration rules for httptest,
  session cookie seeding patterns, internal vs external test packages, and
  verified regression matrix with exact test run commands

- STATUS.md: Replaced stale task table with complete API method inventory (9
  methods), full data model count (60+ exported structs), build/CI status
  dashboard, known limitations, development lifecycle guide, and concrete
  roadmap with 6 future items

Verified: All tests pass with race detection (go test -v -race ./...)
@arvarik
arvarik merged commit 8a1e2fe into main Apr 14, 2026
1 check passed
@arvarik
arvarik deleted the chore/harden-agent-docs-comprehensive branch April 14, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant