agentleFS
hoophqhoophq/hoop/webapp/CLAUDE.md

hoop / webapp

CLAUDE.md848 starsChanged 24 days agoMITView on GitHub

Status: This is the legacy ClojureScript app, being migrated to React in ../webapp_v2/. New pages should be built in webapp_v2/; touch this codebase only to maintain not-yet-migrated pages. See the root CLAUDE.md ("Frontend Migration in Progress") and webapp_v2/CONTEXT_MIGRATION.md for the split.

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

27 rules. About 0 are common, 17 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a CLJS change, hard-reload the browser tab (Vite proxies the bundle and can't HMR it)

    line 8
  2. Distinctive:

    ClojureScript: Follow idiomatic ClojureScript style

    line 11
  3. Very specific:

    Components: Prefer small, reusable components in webapp.components.*

    line 13
  4. Very specific:

    Use full Reagent (functional components) instead of create-class

    line 14
  5. Distinctive:

    Follow colocation pattern - keep related code close together (see newer code examples)

    line 15
  6. Distinctive:

    State Management: Use re-frame for app state with proper subscriptions/events

    line 16
  7. Very specific:

    Avoid dereferencing atoms (@) in the first layer - add atoms in the first layer and call them in the second layer

    line 17
  8. Distinctive:

    Keep code organization clean by maintaining proper atom usage patterns

    line 18
  9. Very specific:

    CSS: Use Tailwind utility classes, see tailwind.config.js

    line 19
  10. Distinctive:

    Error Handling: Use re-frame effects for async error handling

    line 20
  11. Distinctive:

    Naming: Use kebab-case for functions/variables, PascalCase for React components

    line 21
  12. Distinctive:

    UI Components: Prefer using existing components from the codebase

    line 23
  13. Distinctive:

    Modal/Dialog: Use app's modal system with re-frame events (:modal->open/:modal->close)

    line 24
  14. Distinctive:

    Accessibility: Ensure basic W3C accessibility standards

    line 25
  15. Very specific:

    Add proper label attributes for form inputs

    line 26
  16. Distinctive:

    Follow W3C best practices for users with visual impairments

    line 28
  17. Very specific:

    Import Pattern: Import Radix components from "@radix-ui/themes" using the :refer syntax

    line 31
  18. Very specific:

    Usage Pattern: Use Reagent interop syntax [:> Component {}] for Radix components

    line 32
  19. Very specific:

    Styling: Use Radix's built-in props (:size, :variant, :color) and Tailwind for custom styling

    line 42
  20. Very specific:

    Screen readers: Use semantic HTML and Radix primitives where they provide roles/labels.

    line 48
  21. Distinctive:

    Mindset: When implementing UI, default to asking whether keyboard and screen-reader users can complete the same tasks.

    line 50
  22. Distinctive:

    Use existing UI components when possible before creating new ones

    line 54
  23. Distinctive:

    Follow existing event/subscription patterns for state management

    line 55
  24. Very specific:

    Namespacing: Use namespaced keywords (e.g., :module-name/event-name)

    line 77
  25. Distinctive:

    Prefer concise and objective responses

    line 85
  26. Distinctive:

    Use real code examples from the project whenever possible

    line 87
  27. Distinctive:

    When suggesting changes, consider the impact on existing structure

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 27,641 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

HOOP WebApp Development Guidelines

Status: This is the legacy ClojureScript app, being migrated to React in ../webapp_v2/. New pages should be built in webapp_v2/; touch this codebase only to maintain not-yet-migrated pages. See the root CLAUDE.md ("Frontend Migration in Progress") and webapp_v2/CONTEXT_MIGRATION.md for the split.

Commands

  • Dev (shadow-cljs on :8280): cd webapp && npm run dev
  • Build bundle into the gateway: make build-dev-webapp (from repo root)
  • After a CLJS change, hard-reload the browser tab (Vite proxies the bundle and can't HMR it)

Code Style Guidelines

  • ClojureScript: Follow idiomatic ClojureScript style
  • Namespaces: Organized by feature (connections, webclient, components)
  • Components: Prefer small, reusable components in webapp.components.*
    • Use full Reagent (functional components) instead of create-class
    • Follow colocation pattern - keep related code close together (see newer code examples)
  • State Management: Use re-frame for app state with proper subscriptions/events
    • Avoid dereferencing atoms (@) in the first layer - add atoms in the first layer and call them in the second layer
    • Keep code organization clean by maintaining proper atom usage patterns
  • CSS: Use Tailwind utility classes, see tailwind.config.js
  • Error Handling: Use re-frame effects for async error handling
  • Naming: Use kebab-case for functions/variables, PascalCase for React components
  • Imports: Group by source (external JS libraries first, then ClojureScript)
  • UI Components: Prefer using existing components from the codebase
  • Modal/Dialog: Use app's modal system with re-frame events (:modal->open/:modal->close)
  • Accessibility: Ensure basic W3C accessibility standards
    • Add proper label attributes for form inputs
    • Include alt text for images
    • Follow W3C best practices for users with visual impairments

Radix UI Components

  • Import Pattern: Import Radix components from "@radix-ui/themes" using the :refer syntax
  • Usage Pattern: Use Reagent interop syntax [:> Component {}] for Radix components
  • Common Components:
    • Box - For layout containers with spacing (e.g., :class "space-y-radix-7")
    • Flex - For flexbox layouts
    • Grid - For grid layouts, commonly using span patterns like span-2/span-5
    • Table - Use full table components (Table.Root, Table.Header, Table.Body)
    • Text/Heading - For typography with consistent sizing
    • Badge - For status indicators
    • Button - For actions with consistent styling
    • Select - For dropdown selections
  • Styling: Use Radix's built-in props (:size, :variant, :color) and Tailwind for custom styling
  • Reference Components: Copy only from a feature that is still CLJS-owned. Migrated trees stay on disk for a while after their React replacement ships, so "the file exists" is not evidence it is live — check the routing table in ../webapp_v2/CONTEXT_MIGRATION.md ("All CLJS Routes") before using anything as a reference. As of this writing webapp.features.runbooks.* qualifies; guardrails, jira-templates, access-control, access-request and ai-session-analyzer do not — all five are React now. Only jira-templates still has a full dead tree on disk; the rest were deleted by EVL-147 / EVL-184 / EVL-228, and webapp.features.ai-session-analyzer.* is down to a trimmed events.cljs/subs.cljs plus the three session-analysis cards.

Accessibility

  • Baseline: Ship basic accessibility on every UI change—keyboard navigation and screen-reader support are not optional extras.
  • Keyboard: Interactive controls must be reachable and operable with Tab / Shift+Tab; preserve a sensible focus order; visible focus states; avoid trapping focus except in modals (then follow the modal pattern and restore focus on close).
  • Screen readers: Use semantic HTML and Radix primitives where they provide roles/labels; associate labels with inputs; use aria-* when semantics alone are insufficient.
  • Images and icons: Meaningful images need descriptive alt text; decorative images/icons should use empty alt="" (or equivalent aria-hidden when appropriate) so assistive tech can skip them. Do not leave img without an intentional alt decision.
  • Mindset: When implementing UI, default to asking whether keyboard and screen-reader users can complete the same tasks; fix gaps in the same change when feasible.

Common Patterns

  • New features should follow existing patterns in similar components
  • Use existing UI components when possible before creating new ones
  • Follow existing event/subscription patterns for state management
  • For forms and tables, refer to the runbooks implementation (verify it is still CLJS-owned first — see "Reference Components" above)

Module Organization

  • Feature Modules: Organize features in their own directories with local events.cljs and subs.cljs
  • Structure Pattern:
    src/webapp/
    ├── features/
    │   └── feature_name/
    │       ├── events.cljs     # re-frame events
    │       ├── subs.cljs       # re-frame subscriptions
    │       └── views/          # UI components
    └── module_name/
        ├── events.cljs         # Module-specific events
        ├── subs.cljs           # Module-specific subscriptions
        ├── main.cljs           # Main component
        └── *.cljs              # Other module files
  • Global vs Local:
    • /src/webapp/events/ and /src/webapp/subs.cljs are for GLOBAL events/subs only
    • Feature/module-specific events and subs should live within their module directory
  • Namespacing: Use namespaced keywords (e.g., :module-name/event-name)
  • Initial State: Define in /src/webapp/db.cljs under the module key
  • Examples: See webapp.features.runbooks.* and webapp.audit_logs.* (webapp.features.access_request.* and webapp.features.ai_session_analyzer.* used to be the canonical examples; both moved to React — the first is gone, the second is down to a trimmed events.cljs/subs.cljs)

Response Guidelines

  • Prefer concise and objective responses
  • Focus on project architecture and patterns (ClojureScript, Reagent, re-frame, Radix UI)
  • Use real code examples from the project whenever possible
  • When suggesting changes, consider the impact on existing structure
  • Maintain colocation pattern and keep related code organized together

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.