Skip to content

Non-functional requirements baseline (ARCHITECT role, MCP, screenshots) - #2

Merged
msetkowski merged 3 commits into
mainfrom
feature/nfr-baseline
Nov 9, 2026
Merged

msetkowski merged 3 commits into
mainfrom
feature/nfr-baseline

Conversation

@msetkowski

Copy link
Copy Markdown
Owner

Summary

NFR baseline: global non-functional requirements (BL-01, …) with a category (performance, availability, security, usability, …), managed from a new Baseline button next to Workspaces.

  • Every project shows them as read-only, inherited items: in the side navigation ("Baseline NFRs"), on the overview next to its own NFRs, in the read view, and in the PRD export (Markdown/PDF).
  • They are not part of project snapshots, so adding, changing or removing one never changes a project's state, content hash or approved versions. Approved version pages show the current baseline, labelled as not part of the version.
  • PDF cache keys include a baseline fingerprint, so cached exports pick up baseline changes.
  • Removed BL- keys stay retired, like element keys.

ARCHITECT role: only architects edit the baseline. The service enforces this and returns 403 otherwise.

  • Mapped at sign-in from an IDP roles claim: REQLITH_IDP_ROLES_CLAIM (default roles; dotted names such as realm_access.roles reach nested claims) and REQLITH_IDP_ARCHITECT_ROLES (default ARCHITECT, comma-separated, case-insensitive).
  • Local Keycloak realm: realm role ARCHITECT, a mapper that puts realm roles into the ID token's roles claim, and the test user architect1 / password.
  • README documents the Keycloak and Entra ID setup (Entra: app role with value ARCHITECT).

MCP:

  • New tool list_baseline_requirements (filter by category and text).
  • get_prd includes the baseline.
  • search_requirements returns matching baseline items (project "baseline") unless the type excludes NFRs.
  • get_requirement accepts BL- keys with any project key.

README screenshots: recaptured from four sample projects. Overview and requirement show the usual "Draft after v1" state, review and compare show an open v2-rc1 review, and two images are new: the projects home page and the baseline.

Notes for reviewers

  • Migration V7__nfr_baseline.sql adds the baseline_requirement table.
  • Existing local Keycloak containers must be recreated to pick up the realm changes (podman rm -f reqlith-keycloak, then src/main/dev/scripts/podman-dev.sh up).
  • A role change in the IDP takes effect at the user's next sign-in.
  • Not included: trace links from project elements to BL- keys are still reported as broken references.

Test plan

  • src/main/dev/scripts/test.sh verify: 152 tests pass. New: BaselineServiceIT, BaselinePagesIT, ProvisioningOidcUserServiceTest, the baseline case in McpServerIT, plus additions to IdpClaimsTest, PrdMarkdownWriterTest and ExportServiceTest.
  • Keycloak: example ID token for architect1 contains roles: [..., ARCHITECT]; owner1's does not.
  • End to end against the dev pod: signing in as architect1 shows the add form on /baseline; owner1 sees the baseline read-only.

🤖 Generated with Claude Code

msetkowski and others added 3 commits November 9, 2026 23:01
Global NFRs (BL-01, ...) with a category such as performance, availability,
security or usability. Every project shows them as read-only items: in the side
navigation, on the overview next to its own NFRs, in the read view and in the
PRD export. They are not part of project snapshots, so adding, changing or
removing one never changes a project's state, content hash or approved versions.
PDF cache keys include a baseline fingerprint so cached exports follow changes.

Only users with the application role ARCHITECT edit the baseline. It is mapped
at sign-in from an IDP roles claim: REQLITH_IDP_ROLES_CLAIM (default "roles",
dotted names reach nested claims) and REQLITH_IDP_ARCHITECT_ROLES (default
ARCHITECT). The local realm gets the realm role ARCHITECT, a mapper that puts
realm roles into the ID token's "roles" claim, and the test user architect1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New tool list_baseline_requirements (filter by category and text). get_prd
includes the baseline like the PRD export, search_requirements returns matching
baseline items (project "baseline") unless the type excludes NFRs, and
get_requirement accepts BL- keys with any project key. The server instructions
tell agents the baseline applies to every project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eline

Recaptured from four sample projects seeded through the app as the test users:
overview and requirement in the usual "Draft after v1" state, review and
compare on an open v2-rc1 review, plus the projects home page and the NFR
baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@msetkowski
msetkowski merged commit 1b2a901 into main Nov 9, 2026
5 checks passed
@msetkowski
msetkowski deleted the feature/nfr-baseline branch November 9, 2026 22:08
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