docs(agents): add AGENTS.md documentation files for site agents

This commit is contained in:
Prad Nukala
2026-06-30 13:05:16 -04:00
parent 2178cef232
commit 241442e772
6 changed files with 206 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
<!-- Parent: ../AGENTS.md -->
<!-- Generated: 2026-06-30 | Updated: 2026-06-30 -->
# utils
## Purpose
Pure, framework-agnostic helper functions used across components, pages, and data helpers.
## Key Files
| File | Description |
|------|-------------|
| `date.ts` | `getFormattedDate` (locale-aware, per `siteConfig.date`) and `collectionDateSort` — sorts `writing`/`projects`/`speaking`/etc. by `publishDate` descending. |
| `generateToc.ts` | Builds a nested table-of-contents tree from Astro markdown headings (used by `TOC.astro`). |
| `remark.ts` | Shared remark/markdown helpers. |
| `domElement.ts` | Small DOM helpers for client-side scripts. |
| `webmentions.ts` | Fetches and caches webmentions from webmention.io for the webmention components. |
## For AI Agents
### Working In This Directory
- `collectionDateSort` is typed for entries with a `publishDate`; experience entries (which use `startDate`/`endDate`) are sorted in `@/data/experience.ts` instead.
- Keep these pure and side-effect-free where possible; `webmentions.ts` is the exception (network + cache).
## Dependencies
### Internal
- `@/site.config` (date locale), `@/types`.
<!-- MANUAL: -->