Skip to content

docs: add AI agent specs under .ai/spec/#1

Closed
onmete wants to merge 210 commits into
mainfrom
docs/add-ai-agent-specs
Closed

docs: add AI agent specs under .ai/spec/#1
onmete wants to merge 210 commits into
mainfrom
docs/add-ai-agent-specs

Conversation

@onmete
Copy link
Copy Markdown
Owner

@onmete onmete commented May 14, 2026

Adds behavioral (what/) and architecture (how/) specifications for the console plugin: proposal UI flows, approval UX, dynamic components, and plugin wiring. No code changes.

Made with Cursor

spadgett and others added 30 commits December 13, 2021 15:04
Use an OpenShift template to deploy the plugin. This avoids needing to
manually replace the plugin name, namespace, and image in the previous
manifest.yaml file.
Add background on OpenShift dynamic plugins and flesh out the getting
started section.
This avoids problems with live reloading in some environments.
file-loader is deprecated in webpack 5. Use `asset/resource` instead.
Allow users to run console in a container for plugin development without
requiring the VSCode Remote Containers plugin. This adds a `yarn run
start-console` command that will pull the latest console image and run
it locally configured for your plugin. It requires either Docker or
podman to be installed.
Update local development instructions to add a link to the
locally-running console.
On Fedora 35, running `yarn run start-console` can result in network
unreachable errors with podman. Use host networking to avoid the problem.
Add a link for creating an OpenShift cluster via OCM and link to the OCM
Downloads page for oc.
Remove out-of-date references to manifest.yaml and improve the help text
on the example page.
This version contains a fix for collisions on internal webpack module IDs.
You must specify the correct target platform to run in-cluster.
Since `yarn run start-console` defaults to the `latest` tag, always pull
the image. Otherwise, you can run an old console version.
* add cpu and memory requests
* increase replicas to 2
* update security context for 4.11
This package has been deprecated since webpack-dev-server provides its
own types.

https://www.npmjs.com/package/@types/webpack-dev-server
harche and others added 28 commits April 28, 2026 17:18
- Split 1131-line DynamicComponent.tsx into dynamic/ folder with 10 files
  by domain (types, utils, DataTable, Visualization, ResourceDiff,
  ActionPicker, EvidenceTable, StatusTimeline, RevisedComponents,
  CmoComponents)
- Extract shared markdown rendering into src/utils/markdown.ts
- Extract shared SSE parsing into src/utils/streaming.ts
- Both ChatMessage components now use shared renderMarkdown
- Both chat hooks now use shared SSE parsers
- SandboxLogViewer: replace O(n²) string concat with array buffer
  + 200ms debounced flush
- Add MAX_MESSAGES=200 limit to useChat and useAgentChat hooks

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update TypeScript types and UI components to match the operator's
CRD restructure (ProposalTemplate + inline tools replaces Workflow +
ComponentTools).

- Update LightspeedProposal spec type: templateRef, tools, per-step tools
- ProposalListPage: "Workflow" column → "Template"
- ProposalDetailPage: show template name, remove WorkflowOverride section
- EscalateModal: copy templateRef + tools to child proposal
- Chat context: workflow → template

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The console model referenced ols.openshift.io/LightspeedProposal but
the actual CRD on the cluster is agentic.openshift.io/Proposal.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Approve button: always show "Approve" (was "Acknowledge" for advisory)
- Verification checks: use result (Passed/Failed) instead of passed (bool)
- Rollback plan: conditionally render only when present
- PhaseIcon: show warning for Completed with failed execution/verification
- SandboxLogViewer: show "ended" instead of "searching" when pod disappears
  after streaming
- Extract ProposalStatus type for reuse

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e fixes

- Add derivePhaseFromConditions() to derive phase from conditions (no more
  status.phase field). Matches Go DerivePhase() in the operator.
- Update ProposalListPage filters and display to use derived phase
- Update ProposalDetailPage: compute phase once via currentPhase variable,
  fix broken useMemo dependency, remove phase patch from approve/deny,
  update handleVerifyNow to patch AwaitingSync condition
- Fix conditionImproved→conditionOutcome enum (Improved/Unchanged/Degraded)
- Fix attempt→attempts field rename
- Remove Validating from ProposalPhase type (legacy leftover)
- Align approve/deny reason strings with operator (UserApproved/UserDenied)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Proposed phase type, display (teal), and derivePhaseFromConditions
- Fix buildApprovalPatch for ProposalApproval CRs with missing spec
  (patches /spec directly when spec is undefined)
- Add vitest test framework with approval utility tests, hook tests,
  and phase derivation tests (55 tests total)
- Add test helpers: makeApproval, makeApprovalNoSpec, cond

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Move Approve/Deny buttons inside the selected option's card via
  actionButtons prop on RemediationOptionsView
- Add Refine button with inline textarea for revision feedback,
  patches spec.revision and spec.revisionFeedback via k8sPatch
- Show "Re-analyzing with feedback..." when revision is pending
  (spec.revision > observedRevision), clearing stale options
- Fix hooks ordering: refine state declared before revisionPending
  early return to avoid React Rules of Hooks violation
- Add mutual exclusion: all buttons disabled when any operation
  is in progress (busy flag)
- Split error alerts so refine and approval errors show independently
- Use native textarea with PF CSS variables (PF TextArea crashes
  via module federation in console plugin)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…t CRDs

Add K8sModel definitions and TypeScript types for the three new result
CRDs. ProposalDetailPage now watches result CRs via label selector and
reads step data (options, actions, checks) from them instead of inline
Proposal status. Remove PreviousAttempt type and section.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add Escalating phase to type system, derivePhaseFromConditions, PhaseIcon,
and list filters. Add EscalationResult model/types and Escalation approval
stage. Rewrite EscalateModal to approve the Escalation stage via
useStageApproval hook instead of creating a child Proposal. Remove
parentRef and EscalationTrigger (no longer used).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add EscalationTab component with approval card, sandbox log viewer,
  and result display (summary, content, failure reason)
- Tab only visible when proposal has an Escalated condition
- Wire useStageApproval hook for Escalation stage approval/deny
- Fetch EscalationResult CRs via useK8sWatchResource
- Map Escalating phase to escalation tab in activePhaseTab

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct outcome/startTime/completionTime fields on result CR
types with status.conditions. Add resultOutcome() helper that reads
the Completed condition reason. Cache outcome computations per
component to avoid redundant condition scanning.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sandbox pod lifecycle is tracked by SandboxClaim conditions, not
denormalized fields. Remove startedAt/completedAt from the type
and the SandboxDisplay component.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove maxAttempts from Proposal spec type, patch on ProposalApproval instead
- Remove revision from spec, use metadata.generation for revision detection
- Replace denied bool with decision enum (Approved|Denied)
- Remove components from ExecutionResultCR and VerificationResultCR types
- Fix derivePhaseFromConditions test for RetriesExhausted
- Update MAX_RETRIES from 20 to 3

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Result data fields (options, actionsTaken, checks, summary, etc.) now
accessed via .status on all Result CRDs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rollbackPlan belongs on AgentProposal, not AgentVerification.
Updated types and UI rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Required for revision detection via metadata.generation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
proposalName, attempt, retryIndex now under spec on all Result CRDs.
Added TODO to auto-generate types from CRD OpenAPI schema.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove attempts from ProposalStatus type
- Remove attempt from all Result CR spec types
- Use Analyzed condition's observedGeneration for revision detection
- Add observedGeneration to ProposalCondition type
- Remove dead attempt display code from UI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ToolsSpec: remove outputSchema (moved to ProposalSpec)
- LightspeedProposal.spec: add outputSchema field
- AnalysisResultCR.status: remove redundant top-level components
- RemediationOption.components: change from AdapterComponent[] to
  unknown to accept any schema-defined shape
- AdapterComponents: handle both object and array components

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The operator now trims analysis options on execution approval instead
of tracking a selected index. Simplify option auto-selection to check
options.length === 1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The ApprovalCard and execution approve flow only sent the agent to the
ProposalApproval CR when the user changed it from the default. When
unchanged, agent was undefined and the operator fell back to the
"default" Agent CR — ignoring per-step agent refs in the Proposal spec.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace outputSchema with analysisOutput (mode + schema) on the proposal
type. Make diagnosis and proposal optional on RemediationOption to support
Minimal mode. Guard opt.proposal access in multi-option view to prevent
crash when proposal field is absent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add agentic console plugin for proposal management
- Use UBI9 minimal base image
- Use npm instead of yarn for building
- Move any dependency that is needed for building the production build
  from devDependencies to dependencies so that we can exclude
  devDependencies during the npm build
OLS-2942: Update image build for Konflux
Behavioral (what/) and architecture (how/) specifications for the
console plugin: proposal UI, approval flows, and plugin layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@onmete
Copy link
Copy Markdown
Owner Author

onmete commented May 14, 2026

Superseded by openshift#4 (PR was opened against fork by mistake).

@onmete onmete closed this May 14, 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.