Skip to content

OLS-2882 Align spec structure and fix health issues#2000

Open
xrajesh wants to merge 1 commit into
openshift:mainfrom
xrajesh:xav/spec-first-update
Open

OLS-2882 Align spec structure and fix health issues#2000
xrajesh wants to merge 1 commit into
openshift:mainfrom
xrajesh:xav/spec-first-update

Conversation

@xrajesh
Copy link
Copy Markdown
Contributor

@xrajesh xrajesh commented May 29, 2026

Summary

  • Restructure .ai/spec/README.md with Structure table, Cross-Reference table, and standard Conventions section
  • Absorb what/README.md and how/README.md into the main spec README and remove them
  • Create ARCHITECTURE.md with Mermaid diagrams (system context, component architecture, data flow)
  • Add ## Specs pointer to AGENTS.md
  • Fix spec health issues: remove stale CloseButton.tsx/Modal.tsx refs, add missing pageContext.ts/validation.ts/CSS files to module map, remove completed tickets from Planned Changes

Test plan

  • Verify all spec file links resolve correctly
  • Verify Mermaid diagrams render in GitHub markdown preview
  • Confirm no behavioral spec content was changed (only structural alignment)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Restructured and expanded the central spec index with clear "what" vs "how" sections and a cross-reference mapping.
    • Consolidated and clarified guidance on spec structure, conventions, and when to create or extend specs.
    • Added full architecture documentation detailing system design, flows, and key decisions.
    • Updated project-structure and component/test documentation (including e2e/test guidance).
    • Revised planned roadmaps for attachments and tools features and added a spec pointer in AGENTS.md.

@openshift-ci openshift-ci Bot requested review from joshuawilson and kyoto May 29, 2026 21:21
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

📝 Walkthrough

Walkthrough

This PR consolidates and reorganizes project specifications and documentation: it rewrites the spec index, updates project-structure notes and planned-feature tables, adds a top-level contributor pointer, and introduces a new ARCHITECTURE.md describing runtime patterns and design decisions.

Changes

Documentation and Specification System

Layer / File(s) Summary
Spec Index and Conventions
.ai/spec/README.md
Rewrote top-level spec README with Structure (what/ how), listed spec files, cross-reference matrix, Quick Start layout, and updated conventions for spec authorship.
Project structure and helpers
.ai/spec/how/project-structure.md
Documented src/pageContext.ts (model-key resolution) and src/validation.ts (alertingRuleID hashing, isValidAlertName), updated component list (removed CloseButton), added Component CSS subsection, and noted tests switch to Cypress plus unit-test scope expansions.
Feature Planning updates
.ai/spec/what/attachments.md, .ai/spec/what/tools.md
Updated “Planned Changes” tables: attachments.md replaced OLS-1401 with new ACM-related items; tools.md replaced completed OLS-2683 with new planned Jira entries.
Top-level contributor guidance
AGENTS.md
Inserted a “Specs” section pointing contributors to .ai/spec/ and the new spec README as the entry point.
Architecture Documentation
ARCHITECTURE.md
Added a full architecture document covering plugin responsibilities, system/context diagrams, SSE query lifecycle and event handling, human-in-the-loop tool approval, MCP iframe communication patterns, Immutable.js Redux state approach, proxied API surface, extension points, technology stack, and key architectural decisions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

lgtm

Suggested reviewers

  • joshuawilson
  • syedriko

Poem

🐰 I hopped through specs both What and How,
Cataloged rules and architecture now,
Plans updated, README neat and bright,
Docs and diagrams—organized right!
A tiny rabbit claps in delight.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly reflects the main changes: restructuring .ai/spec/ to align spec structure and addressing health issues (removing stale references, adding missing files, updating Planned Changes).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.ai/spec/how/project-structure.md (1)

66-80: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix duplicate heading and mislabeled CSS section.

Line 74 repeats the same heading text, and Lines 70-72 list src/components/*.css under a src/assets/ heading. This makes the module map ambiguous and can trigger markdown lint noise.

Suggested doc fix
-### `src/assets/` -- Static assets
+### `src/components/` -- Component CSS assets

 | Path | Purpose |
 |---|---|
 | `src/components/general-page.css` | Styles for the GeneralPage chat interface |
 | `src/components/mcp-app.css` | Styles for MCP App card and iframe container |
 | `src/components/popover.css` | Styles for the Popover modal and floating button |

 ### `src/assets/` -- Static assets

As per coding guidelines: “All specifications live in .ai/spec/. Start with .ai/spec/README.md for project overview, reading order, and structure guide.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.ai/spec/how/project-structure.md around lines 66 - 80, The markdown has a
duplicated "src/assets/" heading and the components CSS entries are
miscategorized; change the first heading (the one above the CSS table) from
"src/assets/" to "src/components/" (or remove the duplicate and rename
accordingly), leave the second "src/assets/" section for logo/user asset rows
only, and ensure the `src/components/*.css` entries (GeneralPage, mcp-app,
popover) appear under the corrected "src/components/" heading so the module map
and linting are consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.ai/spec/how/project-structure.md:
- Around line 66-80: The markdown has a duplicated "src/assets/" heading and the
components CSS entries are miscategorized; change the first heading (the one
above the CSS table) from "src/assets/" to "src/components/" (or remove the
duplicate and rename accordingly), leave the second "src/assets/" section for
logo/user asset rows only, and ensure the `src/components/*.css` entries
(GeneralPage, mcp-app, popover) appear under the corrected "src/components/"
heading so the module map and linting are consistent.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 8c057fc8-6a26-4007-9886-59e5044dd735

📥 Commits

Reviewing files that changed from the base of the PR and between 136c5b9 and 25579e5.

📒 Files selected for processing (9)
  • .ai/spec/README.md
  • .ai/spec/health-report.md
  • .ai/spec/how/README.md
  • .ai/spec/how/project-structure.md
  • .ai/spec/what/README.md
  • .ai/spec/what/attachments.md
  • .ai/spec/what/tools.md
  • AGENTS.md
  • ARCHITECTURE.md
💤 Files with no reviewable changes (4)
  • .ai/spec/how/README.md
  • .ai/spec/what/tools.md
  • .ai/spec/what/attachments.md
  • .ai/spec/what/README.md

Comment thread .ai/spec/health-report.md Outdated
@@ -0,0 +1,35 @@
# Spec health report
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems like this file should not be part of the PR, but these details could be included in the commit message / PR description instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@kyoto thank you . Fixed , Please take a look

@openshift-ci openshift-ci Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 2, 2026
@kyoto
Copy link
Copy Markdown
Member

kyoto commented Jun 2, 2026

@xrajesh LGTM, but could you please resolve the conflicts and squash the commits?

/approve

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 2, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@xrajesh xrajesh force-pushed the xav/spec-first-update branch from 73a0b94 to 78f4a2e Compare June 3, 2026 20:51
@openshift-ci openshift-ci Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 3, 2026
@xrajesh
Copy link
Copy Markdown
Contributor Author

xrajesh commented Jun 3, 2026

/approve

@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 3, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kyoto, xrajesh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
ARCHITECTURE.md (1)

147-147: 💤 Low value

Consider simplifying the redundant phrasing.

The phrase "adds an additional" contains redundancy. Consider either "adds a proxy" or "adds another proxy" for clearer writing.

✏️ Suggested simplification
-**Plugin proxy for all API calls** — The plugin never connects directly to the OLS service. The console's proxy handles authentication, TLS, and routing. In development, `start-console.sh` adds an additional proxy from the console container to `localhost:8080`.
+**Plugin proxy for all API calls** — The plugin never connects directly to the OLS service. The console's proxy handles authentication, TLS, and routing. In development, `start-console.sh` adds a proxy from the console container to `localhost:8080`.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@ARCHITECTURE.md` at line 147, The sentence under "**Plugin proxy for all API
calls**" is redundant — change "start-console.sh adds an additional proxy from
the console container to `localhost:8080`" to a simpler phrasing such as
"start-console.sh adds a proxy from the console container to `localhost:8080`"
(or "adds another proxy") to remove the unnecessary word "additional"; update
the ARCHITECTURE.md text accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@ARCHITECTURE.md`:
- Line 147: The sentence under "**Plugin proxy for all API calls**" is redundant
— change "start-console.sh adds an additional proxy from the console container
to `localhost:8080`" to a simpler phrasing such as "start-console.sh adds a
proxy from the console container to `localhost:8080`" (or "adds another proxy")
to remove the unnecessary word "additional"; update the ARCHITECTURE.md text
accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b305aa71-88bc-4b1e-8fe4-52a8f958aee7

📥 Commits

Reviewing files that changed from the base of the PR and between 73a0b94 and 78f4a2e.

📒 Files selected for processing (8)
  • .ai/spec/README.md
  • .ai/spec/how/README.md
  • .ai/spec/how/project-structure.md
  • .ai/spec/what/README.md
  • .ai/spec/what/attachments.md
  • .ai/spec/what/tools.md
  • AGENTS.md
  • ARCHITECTURE.md
💤 Files with no reviewable changes (4)
  • .ai/spec/what/README.md
  • .ai/spec/how/README.md
  • .ai/spec/what/tools.md
  • .ai/spec/what/attachments.md
✅ Files skipped from review due to trivial changes (3)
  • AGENTS.md
  • .ai/spec/how/project-structure.md
  • .ai/spec/README.md

@joshuawilson
Copy link
Copy Markdown
Contributor

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants