diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1ae582b --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,32 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- `Sources/SwiftUIHTML` holds the reusable rendering core; `Example` contains the SwiftUI host app and its unit/UI test targets. +- `SwiftUIHTMLExampleTests` and `SwiftUIHTMLExampleUITests` live next to the example project and keep the snapshot/test helpers, including `ViewSnapshotTester.swift`. +- `SwiftUIHTMLExampleTests/__Snapshots__/HTMLBasicTests` stores the PNG baselines and HTML payloads. +- `scripts/` hosts the snapshot-reporting helpers, OCR utilities, and the new `run_ios_snapshots.sh` driver. +- `mise.toml` defines high-level automation tasks invoked with `mise ` while `Package.swift` drives SwiftPM dependency resolution. + +## Build, Test, and Development Commands +- `mise ios-snapshots`: boots the current iOS simulator, records every snapshot with `SWIFTUIHTML_SNAPSHOT_RECORD=1`, and produces `/tmp/swiftuihtml-ios-snapshot-report-*/index.html`. +- `mise ios-snapshot-single TEST_ONLY=...`: focuses on one XCTest and emits a mini report for that snapshot. +- `python3 scripts/snapshot_report.py --artifacts --baseline SwiftUIHTMLExampleTests/__Snapshots__/HTMLBasicTests --title "