Skip to content

Add vapour llm command and refresh docs/llm - #16

Merged
madhavkhoslaa merged 3 commits into
mainfrom
feat/llm-txt
Oct 16, 2026
Merged

madhavkhoslaa merged 3 commits into
mainfrom
feat/llm-txt

Conversation

@madhavkhoslaa

Copy link
Copy Markdown
Contributor

Summary

  • add vapour llm command with --refresh, --offline, and --url
  • fetch default docs URL with 10 second timeout, 1 MiB size cap, content-type check, and heading check
  • support VAPOUR_LLM_URL override
  • add user cache storage with ETag and If-None-Match handling
  • serve cache on 304 and on network failure when cache exists
  • embed fallback snapshot (go:embed) for first run without network
  • print stderr notes when fallback or stale cache is used
  • add command tests: fresh fetch, 304 with cache, offline fallback, bad content rejection, size cap
  • add scaffold README hint: "For AI assistants: run vapour llm"
  • refresh docs/llm/*.md for merged behavior updates and add docs/llm/llm-txt.md

Validation

  • gofmt -l .
  • go vet ./...
  • go test ./...

@madhavkhoslaa

Copy link
Copy Markdown
Contributor Author

Addressed review in latest push:

  • Changed vapour llm fallback behavior: when there is no cache, any fetch failure now falls back to embedded cmd/llm_fallback.txt (network, HTTP status, content-type/body/header validation, size cap), with stderr reason.
  • Added scripts/sync-llm.sh to sync fallback from vapour-dev-docs main book/llm.txt and validate required header.
  • Added test that embedded fallback starts with required header.
  • Updated docs (docs/llm/llm-txt.md, docs/llm/release.md) to document fallback behavior and pre-release sync step.
  • Refreshed cmd/llm_fallback.txt from final book/llm.txt content after docs fixes.

Validation rerun:

  • gofmt -l .
  • go vet ./...
  • go test ./...

@madhavkhoslaa
madhavkhoslaa merged commit cfda644 into main Oct 16, 2026
1 check passed
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