Skip to content

Access development context files#528

Merged
eguerrant merged 2 commits into
mainfrom
claude_context_files
Jul 14, 2026
Merged

Access development context files#528
eguerrant merged 2 commits into
mainfrom
claude_context_files

Conversation

@eguerrant

Copy link
Copy Markdown
Contributor

Claude context files for Access development

CLAUDE.md: should be automatically loaded when a session is started, contains stack, security/RBAC goals, backend architecture, async patterns, data model, authorization, and common gotchas and an index pointing to the three companion docs

access-dev-frontend.md : frontend guide including the generated src/api/ client, React Query v5, layout/design principles
access-dev-testing.md: local dev, testing, migrations using the uv/ruff/ty toolchain and Alembic
access-dev-sync.md: okta Okta syncer's authority model and notification cadence

@eguerrant eguerrant marked this pull request as ready for review July 13, 2026 23:34
Comment thread .claude/access-dev-sync.md Outdated
Comment thread .claude/access-dev-testing.md Outdated
Comment thread .claude/CLAUDE.md Outdated

@Jeff-Rowell Jeff-Rowell left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few small suggestions, but nothing blocking. These files will be a huge help in getting better consistency and fewer errors/bugs!

@eguerrant eguerrant requested a review from Jeff-Rowell July 14, 2026 00:38
@eguerrant eguerrant enabled auto-merge (squash) July 14, 2026 00:41
@eguerrant eguerrant merged commit e047a0a into main Jul 14, 2026
6 checks passed
@eguerrant eguerrant deleted the claude_context_files branch July 14, 2026 00:42
Comment thread .claude/CLAUDE.md
to a group over paths that add individual users to groups directly. Access is designed to make the role-based path
the natural default.

**Principle of least privilege.** When implementing permission checks or approval flows, be

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also highlight that we want Access to be transparent, so broad read-only access to all pages is a core design decision in the API and UI.

Comment thread .claude/CLAUDE.md
):
```

**Don't use Flask patterns:** no `g`, no `request` globals, no `abort()` — raise

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is necessary anymore since Flask is gone

Comment thread .claude/CLAUDE.md
...
```

Plugin hooks fire from inside `execute()`. Side-effecting Okta/notification work is spawned as

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all changing in #511

Comment thread .claude/CLAUDE.md
types by the API-provided `type` field rather than by parsing name prefixes, and validates
names against `ACCESS_CONFIG.NAME_VALIDATION_PATTERN`.

When querying polymorphically, always use `with_polymorphic` or `selectin_polymorphic` to

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should mention that with_polymorphic should be used when loading from many-to-one or one-to-one relationships whereas selectin_polymorphic should be used when loading many-to-many or one-to-many relationships where possible for query efficiency.

Comment thread .claude/CLAUDE.md
relationships on the model you're querying. Many relationships already exist with the correct
eager loading strategy and active-record filters baked in (e.g. `active_group_memberships`,
`active_group_ownerships`, `active_role_associated_group_mappings`). Using a pre-defined
relationship via `joinedload` or `selectinload` is almost always preferable to writing a

@somethingnew2-0 somethingnew2-0 Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should also mention that joinedload should be used when loading from many-to-one or one-to-one relationships whereas selectinload should be used when loading many-to-many or one-to-many relationships where possible for query efficiency.

Comment thread .claude/CLAUDE.md
- `OktaUserGroupMember`, `RoleGroupMap`, `OktaGroupTagMap`, `AppTagMap`: time-bounded via
`ended_at`. Active records: `ended_at.is_(None) OR ended_at > now()`.

Never query these tables without both filters. Missing one silently returns stale data.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filterless queries are allowed when viewing prior data is the intention such as on audit pages or the access/role/group request/renewal pages

somethingnew2-0 added a commit that referenced this pull request Jul 14, 2026
The development context files merged in #528 describe the pre-2.0 plugin
behavior; this PR makes the interface async, so bring the two plugin-facing
sections up to date. Plugin hooks are now awaited via run_hooks_to_completion
(asyncio.wait, not gather) and a failing hook logs at ERROR without breaking the
committed operation. The Plugin system section now states that hook impls must
be async def across all four surfaces (with the sync metadata/config/status/
validation exceptions), how to do blocking I/O off the event loop, and that
app-group-lifecycle mutating hooks receive an AsyncSession.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@eguerrant eguerrant mentioned this pull request Jul 15, 2026
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.

3 participants