Skip to content

Add risk level rubric to AGENTS.md#2025

Open
xrajesh wants to merge 4 commits into
openshift:mainfrom
xrajesh:risk-levels-in-agents-md
Open

Add risk level rubric to AGENTS.md#2025
xrajesh wants to merge 4 commits into
openshift:mainfrom
xrajesh:risk-levels-in-agents-md

Conversation

@xrajesh
Copy link
Copy Markdown
Contributor

@xrajesh xrajesh commented Jun 2, 2026

Adds a Risk Levels section to AGENTS.md defining risk 1/2/3 classification with repo-specific examples and Jira description format.

Summary by CodeRabbit

  • Documentation
    • Added a “Risk Levels” guidance section describing enforced risk checks for Jira create/edit actions and linking to the maintained risk rubric/examples.
    • Added a design spec for a single unified UI container image that supports OCP versions 4.16–4.25.
    • Added an implementation plan detailing build, image, and pipeline changes required to consolidate multiple UI images into one.

xrajesh and others added 3 commits June 2, 2026 09:59
Ship one OLS UI image containing builds for all OCP versions instead of
three separate images. Uses git submodules for hermetic Konflux builds,
multi-stage Dockerfile, and entrypoint-based version switching.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
8 tasks covering: submodule setup, entrypoint, multi-stage Dockerfile,
Konflux pipeline config, operator simplification, and spec updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@openshift-ci openshift-ci Bot requested review from joshuawilson and syedriko June 2, 2026 16:19
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented Jun 2, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign joshuawilson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: af0866df-7823-4ebe-a1e1-11ef91c54172

📥 Commits

Reviewing files that changed from the base of the PR and between 8b7f970 and a2051f6.

📒 Files selected for processing (1)
  • AGENTS.md
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md

📝 Walkthrough

Walkthrough

Adds detailed plan and design specs to consolidate three console UI images into a single multi-variant image (PF5, 4.19, main) with an OCP_VERSION-driven entrypoint, plus pipeline and operator change instructions; also adds a “Risk Levels” section to AGENTS.md referencing a risk rubric and PreToolUse enforcement.

Changes

Single Console UI Image Consolidation

Layer / File(s) Summary
Design problem statement and solution overview
docs/superpowers/specs/2026-06-02-single-ui-image-design.md, docs/superpowers/plans/2026-06-02-single-ui-image.md
Defines the requirement to align PF/React/console SDK across OCP ranges and proposes a unified image with OCP_VERSION-driven runtime selection.
Container image implementation: submodules, entrypoint, and multi-stage Dockerfile
docs/superpowers/plans/2026-06-02-single-ui-image.md, docs/superpowers/specs/2026-06-02-single-ui-image-design.md
Tasks and spec describe adding PF5/4.19 git submodules, creating entrypoint.sh to map OCP_VERSION to /builds/* and symlink into nginx, and rewriting the Dockerfile into multi-stage builds that copy all artifacts into the runtime image.
Konflux/Tekton pipeline configuration for multi-variant builds
docs/superpowers/plans/2026-06-02-single-ui-image.md, docs/superpowers/specs/2026-06-02-single-ui-image-design.md
Plan and spec instruct enabling submodule fetching in git-clone tasks and extending Cachi2 prefetch-input to include npm paths for submodules.
Operator console deployment and OCP version detection
docs/superpowers/plans/2026-06-02-single-ui-image.md, docs/superpowers/specs/2026-06-02-single-ui-image-design.md
Remove PF5/4.19-specific image variables, collapse to a single console image, derive OCP version and inject OCP_VERSION into the Deployment env, and remove obsolete constants and related_images.json entries.
Documentation updates and architecture trade-offs
docs/superpowers/plans/2026-06-02-single-ui-image.md, docs/superpowers/specs/2026-06-02-single-ui-image-design.md
Update project structure docs, document .gitmodules and entrypoint.sh, and include a trade-offs comparison table.

Jira Risk Classification Guidance

Layer / File(s) Summary
Risk levels, rubric, and classification guidance
AGENTS.md
Adds a “Risk Levels” section noting Jira risk enforcement via a PreToolUse hook and referencing lightspeed-team-harness/hooks/risk-rubric.md.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

lgtm, approved

Suggested reviewers

  • joshuawilson
  • syedriko

Poem

🐰 One image to rule the console bright,
Entrypoint picks the build that's right,
Pipelines fetch modules, nginx serves the site,
Risk levels tidy tickets in the night,
Hooray — a single image takes flight!

🚥 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 PR title accurately describes the main change: adding risk level guidance to AGENTS.md. However, the title is somewhat narrow given that the PR also includes two substantial design/plan documents for a single UI image initiative, making the title incomplete relative to the full changeset scope.
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.

Actionable comments posted: 5

🤖 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.

Inline comments:
In `@AGENTS.md`:
- Line 188: The fenced code block shown as "```" (the snippet containing "##
Risk Level" and example Risk {1|2|3}") is missing a language tag and triggers
MD040; update that opening fence to include a language identifier (e.g., change
"```" to "```md") so the block is recognized as Markdown and the linter passes.

In `@docs/superpowers/plans/2026-06-02-single-ui-image.md`:
- Line 316: Replace the machine-specific absolute paths (instances of
"/Users/xavi/...") in the plan text with portable placeholders or relative paths
(e.g., project-root, ./, or $HOME) so contributors and CI can follow the steps;
update the occurrences referenced (the "/Users/xavi/" strings around lines 316
and 356-357) to use a repo-root placeholder or relative path and add a brief
note explaining how to resolve the placeholder locally.
- Line 17: Change the Task 1 heading from H3 to H2 by replacing "### Task 1: Add
git submodules for PF5 and 4.19 branches" with "## Task 1: Add git submodules
for PF5 and 4.19 branches" so the document heading hierarchy is consistent and
satisfies markdownlint (locate the line containing the exact heading text to
update).

In `@docs/superpowers/specs/2026-06-02-single-ui-image-design.md`:
- Around line 30-37: The fenced code block showing the /builds/ directory layout
is missing a language hint; update the block delimiter from ``` to ```text so
markdownlint and tooling treat it as plain text. Locate the fenced block
containing the /builds/ listing (the block that begins with "/builds/") and add
the "text" language tag to the opening fence, leaving the content unchanged.
- Around line 76-80: The PF5/4-19 build steps run npm ci --omit=dev then npm run
build but the branch package.json files may list build tooling (webpack,
webpack-cli, typescript, ts-node) under devDependencies; inspect the
package.json in branches/pf5 (and branches/4-19) and ensure those tooling
packages are placed in "dependencies" (not "devDependencies") or modify the
Dockerfile build steps to install devDependencies for those branch contexts
(e.g., run npm ci without --omit=dev or run npm ci in the branches/pf5 directory
with dev deps) so that npm run build can find webpack/ts-node/etc at build time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 817cd7a6-88f8-42f4-958a-37b623834ac0

📥 Commits

Reviewing files that changed from the base of the PR and between f62f15c and 8b7f970.

📒 Files selected for processing (3)
  • AGENTS.md
  • docs/superpowers/plans/2026-06-02-single-ui-image.md
  • docs/superpowers/specs/2026-06-02-single-ui-image-design.md

Comment thread AGENTS.md Outdated

---

### Task 1: Add git submodules for PF5 and 4.19 branches
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Fix heading level increment at Task 1.

The first task heading jumps from H1 to H3; make it H2 to satisfy markdownlint and keep hierarchy consistent.

Suggested doc fix
-### Task 1: Add git submodules for PF5 and 4.19 branches
+## Task 1: Add git submodules for PF5 and 4.19 branches
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Task 1: Add git submodules for PF5 and 4.19 branches
## Task 1: Add git submodules for PF5 and 4.19 branches
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 17-17: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3

(MD001, heading-increment)

🤖 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 `@docs/superpowers/plans/2026-06-02-single-ui-image.md` at line 17, Change the
Task 1 heading from H3 to H2 by replacing "### Task 1: Add git submodules for
PF5 and 4.19 branches" with "## Task 1: Add git submodules for PF5 and 4.19
branches" so the document heading hierarchy is consistent and satisfies
markdownlint (locate the line containing the exact heading text to update).


### Task 5: Remove multi-image selection from operator (`cmd/main.go`)

**Repo:** `lightspeed-operator` (`/Users/xavi/street/github.com/ols/lightspeed/lightspeed-operator`)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Avoid machine-specific absolute paths in shared implementation instructions.

Using /Users/xavi/... makes this plan non-portable for other contributors and CI environments.

Suggested doc fix
-**Repo:** `lightspeed-operator` (`/Users/xavi/street/github.com/ols/lightspeed/lightspeed-operator`)
+**Repo:** `lightspeed-operator` (local checkout path varies by environment)
...
-cd /Users/xavi/street/github.com/ols/lightspeed/lightspeed-operator
+cd /path/to/lightspeed-operator

Also applies to: 356-357

🤖 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 `@docs/superpowers/plans/2026-06-02-single-ui-image.md` at line 316, Replace
the machine-specific absolute paths (instances of "/Users/xavi/...") in the plan
text with portable placeholders or relative paths (e.g., project-root, ./, or
$HOME) so contributors and CI can follow the steps; update the occurrences
referenced (the "/Users/xavi/" strings around lines 316 and 356-357) to use a
repo-root placeholder or relative path and add a brief note explaining how to
resolve the placeholder locally.

Comment on lines +30 to +37
```
/builds/
pf5/ # pattern-fly-5 build output (OCP 4.16-4.18)
4-19/ # release-4.19 build output (OCP 4.19-4.21)
main/ # main build output (OCP 4.22+)
/entrypoint.sh
/usr/share/nginx/html # symlink target (set by entrypoint at startup)
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Add a language hint to the fenced code block.

The /builds/ layout block is missing a fence language, which triggers markdownlint and hurts readability tooling.

Suggested doc fix
-```
+```text
 /builds/
   pf5/          # pattern-fly-5 build output (OCP 4.16-4.18)
   4-19/         # release-4.19 build output (OCP 4.19-4.21)
   main/         # main build output (OCP 4.22+)
 /entrypoint.sh
 /usr/share/nginx/html   # symlink target (set by entrypoint at startup)
</details>

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 markdownlint-cli2 (0.22.1)</summary>

[warning] 30-30: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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

In @docs/superpowers/specs/2026-06-02-single-ui-image-design.md around lines 30

  • 37, The fenced code block showing the /builds/ directory layout is missing a
    language hint; update the block delimiter from totext so markdownlint
    and tooling treat it as plain text. Locate the fenced block containing the
    /builds/ listing (the block that begins with "/builds/") and add the "text"
    language tag to the opening fence, leaving the content unchanged.

</details>

<!-- fingerprinting:phantom:triton:hawk -->

<!-- This is an auto-generated comment by CodeRabbit -->

Comment on lines +76 to +80
RUN NODE_OPTIONS=--max-old-space-size=4096 npm ci --omit=dev --omit=optional --ignore-scripts --no-fund
COPY branches/pf5/console-extensions.json branches/pf5/LICENSE branches/pf5/tsconfig.json branches/pf5/types.d.ts branches/pf5/webpack.config.ts ./
COPY branches/pf5/locales ./locales
COPY branches/pf5/src ./src
RUN npm run build
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

❓ Verification inconclusive

🏁 Script executed:

#!/bin/bash
# Verify whether build scripts likely need devDependencies in each variant.
# Read-only reconnaissance.

python - <<'PY'
import json, os
paths = ["package.json", "branches/pf5/package.json", "branches/4-19/package.json"]
for p in paths:
    if not os.path.exists(p):
        print(f"[missing] {p}")
        continue
    with open(p) as f:
        pkg = json.load(f)
    scripts = pkg.get("scripts", {})
    build = scripts.get("build", "")
    dev = pkg.get("devDependencies", {}) or {}
    deps = pkg.get("dependencies", {}) or {}
    likely_tools = ["webpack", "webpack-cli", "typescript", "ts-node", "vite", "rollup", "babel", "react-scripts"]
    in_dev = [t for t in likely_tools if t in dev]
    in_dep = [t for t in likely_tools if t in deps]
    print(f"\n== {p} ==")
    print(f"build script: {build}")
    print(f"tooling in devDependencies: {in_dev}")
    print(f"tooling in dependencies: {in_dep}")
PY

Repository: openshift/lightspeed-console

Length of output: 366


npm ci --omit=dev should be validated for the PF5 (and 4-19) build stages

Root package.json keeps build tooling (webpack, webpack-cli, typescript, ts-node) in dependencies, so the main-stage npm ci --omit=dev + npm run build pairing is compatible. The PF5 and 4-19 stages install from branches/pf5 and branches/4-19, so ensure those packages have their build tooling in dependencies as well (or install dev deps during those build steps); otherwise npm ci --omit=dev can omit required build tooling before npm run build.

🤖 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 `@docs/superpowers/specs/2026-06-02-single-ui-image-design.md` around lines 76
- 80, The PF5/4-19 build steps run npm ci --omit=dev then npm run build but the
branch package.json files may list build tooling (webpack, webpack-cli,
typescript, ts-node) under devDependencies; inspect the package.json in
branches/pf5 (and branches/4-19) and ensure those tooling packages are placed in
"dependencies" (not "devDependencies") or modify the Dockerfile build steps to
install devDependencies for those branch contexts (e.g., run npm ci without
--omit=dev or run npm ci in the branches/pf5 directory with dev deps) so that
npm run build can find webpack/ts-node/etc at build time.

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