Skip to content

Conversation

@brianium
Copy link
Owner

Summary

  • Add new keyword-based discoverability API that matches how elements are used in hiccup markup
  • element - lookup metadata by keyword tag (e.g., :ns/button)
  • element-tags - list all registered element keywords
  • elements - list elements with optional namespace filtering (symbol or regex)
  • search-elements - search by documentation text (string or regex)
  • Remove old symbol-based describe/attributes functions

The implementation uses a hybrid approach: enumerate via Chassis multimethod, lookup via var metadata. No new mutable state required.

Test plan

  • All existing tests pass
  • New tests for element lookup by keyword
  • New tests for element-tags listing
  • New tests for elements with namespace filters
  • New tests for search-elements with string and regex patterns

🤖 Generated with Claude Code

brianium and others added 7 commits January 24, 2026 20:16
Hybrid approach using Chassis multimethod + var metadata:
- Enumerate via (keys (methods c/resolve-alias))
- Lookup via keyword -> var -> metadata resolution
- Zero new mutable state, no stale entries on reload

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace symbol-based `describe`/`attributes` functions with a new keyword-based
API that matches how elements are used in hiccup markup:

- `element` - lookup metadata by keyword tag (e.g. `:ns/element`)
- `element-tags` - list all registered element keywords
- `elements` - list elements with optional namespace filtering (symbol or regex)
- `search-elements` - search by documentation text (string or regex)

The implementation uses a hybrid approach: enumerate via Chassis multimethod,
lookup via var metadata. No new mutable state required.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implementation completed in commit 2ea1e18.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace symbol-based `describe`/`attributes` examples with `element`
- Add new "Discoverability API" section documenting all functions
- Update `::merge` property example to use new API
- Update `generate` example to use keyword tags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove generated specs UI files from tracking and add to .gitignore.
These are generated by `/specs ui` command and shouldn't be committed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document breaking changes to discoverability API and migration path.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use :dev/daisy-button keyword instead of var reference to match
how elements are used in hiccup markup.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@brianium brianium merged commit b9251a8 into main Jan 25, 2026
6 checks passed
@brianium brianium deleted the feat/better-discoverability-api branch January 25, 2026 01:47
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