maragudk / maragudk/gomponents-htmx
htmx 4: conventions, decisions, and pinned example
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 124
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Part of #18. First step of the htmx 4 port; the other sub-issues build on this.
## Decisions to record
- `main` targets htmx 4 from v0.7.0. The htmx 2 line stays at v0.6.x. Breaking changes ship in minor bumps while pre-1.0.
- Core attributes and headers only. Extension attributes (`hx-prompt`, `hx-pending`, `hx-preload`, `hx-sse:*`, `hx-ws:*`) are out of scope unless requested.
- Conventions follow gomponents-datastar: doc comments taken verbatim from the htmx docs with a link back, every helper has a test and a godoc `Example`, attribute names are not validated, panics only on unambiguous programmer bugs.
## Scope
- Add `AGENTS.md` (symlinked as `CLAUDE.md`) with the conventions above and the compatibility statement "This library is compatible with htmx v4.0.0 and above."
- Add `docs/decisions.md` with the versioning and core-only decisions.
- Pin htmx 4.0.0 for the example: `make deps` fetches `htmx.org@4.0.0` into the example directory instead of loading `unpkg.com/htmx.org` unpinned (which resolves to 2.x).
- README: state which module versions target which htmx major.
## Acceptance criteria
- `AGENTS.md`, `docs/decisions.md` exist with the content above.
- `cmd/example` loads the pinned htmx 4.0.0 file.
- README has the version matrix.
## Out of scope
Any change to the Go API.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing make deps entry point, cmd/example, README, and the repository documentation layout. Add AGENTS.md, its CLAUDE.md symlink, and docs/decisions.md using the stated conventions, then update the example dependency handling and README version matrix. Done means the listed files exist, make deps provides htmx 4.0.0 to cmd/example, and no Go API changes are made.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100