OLS-2882: Add spec files to the projects for AI-assisted development#1536
OLS-2882: Add spec files to the projects for AI-assisted development#1536joshuawilson wants to merge 2 commits intoopenshift:mainfrom
Conversation
Two-layer spec structure under .ai/spec/: - what/ (11 files): behavioral rules for system-overview, CRD API, reconciliation, app-server, lcore, postgres, console-ui, TLS, security, external-resources, and observability - how/ (4 files): architecture specs for project-structure, reconciliation, deployment-generation, and config-generation Specs are optimized for AI agent consumption and document the operator thoroughly enough to enable a from-scratch rewrite. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@joshuawilson: This pull request references OLS-2882 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@joshuawilson: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
| 3. The operator is fully event-driven. It does not use periodic/timer-based reconciliation. All changes are detected via Kubernetes watches on owned resources and annotated external resources. | ||
| 4. The operator selects between two mutually exclusive backend implementations at startup via the `--use-lcore` flag: AppServer (legacy, direct LLM proxy) or LCore (new, agent-based with Llama Stack). Both implement the same Lightspeed API surface. | ||
|
|
||
| ### Component Inventory |
There was a problem hiding this comment.
shouldn't we expand this to match the list of components from https://konflux-ui.apps.stone-prd-rh01.pg1f.p1.openshiftapps.com/ns/crt-nshift-lightspeed-tenant/applications/ols/components?
There was a problem hiding this comment.
We can but the spec files are specific to the repo.
Could create a higher level set of specs that cover all repos and konflux.
| 1. The Llama Stack database name is hardcoded by the Llama Stack project and must not be changed. | ||
| 2. Llama Stack Generic mode cannot be mixed with legacy provider-specific fields (deploymentName, projectID, url, apiVersion). | ||
| 3. The Lightspeed Stack always connects to Llama Stack via localhost, even in server mode (they share a pod). | ||
| 4. Vector database IDs are sanitized from RAG image names if indexID is not explicitly provided. |
There was a problem hiding this comment.
This whole thing is going to be removed in this sprint
| |---|---|---|---| | ||
| | `--use-lcore` | bool | `false` | Select LCore backend instead of AppServer | | ||
| | `--lcore-server` | bool | `true` | LCore server mode (two containers) vs library mode (one container) | | ||
| | `--namespace` | string | `WATCH_NAMESPACE` env or `openshift-lightspeed` | Operator namespace | |
There was a problem hiding this comment.
Lcore is going away this sprint
| | OLS-2322 | Streamline OLSConfig CR deployment configuration | | ||
| | OLS-2323 | Extend OLSConfig CR to report specific deployment errors | | ||
| | OLS-2325 | Create type-safe log-level definition in the operator CR | | ||
| | OLS-2140 | Remove time-based operator reconciliation (completed -- now fully event-driven) | |
There was a problem hiding this comment.
Maybe add here “delivery map” subsection: one short table or bullet list that maps repo components → Konflux application names (or “see Konflux UI → ols app → components”) with a disclaimer: operator repo spec describes operator-managed workloads; Konflux may list additional CI/catalog components. That answers JoaoFula’s question without duplicating Konflux in every spec.
|
|
||
| ### Operator Role | ||
|
|
||
| 1. The operator manages exactly one OLSConfig CR per cluster, named "cluster". CRs with any other name must be ignored. |
There was a problem hiding this comment.
OLSConfig is treated as a singleton per cluster: the operator only reconciles the cluster-scoped instance named cluster. Any other OLSConfig objects are ignored. Reconciled workloads are created in the openshift-lightspeed namespace.
| ### Operator Role | ||
|
|
||
| 1. The operator manages exactly one OLSConfig CR per cluster, named "cluster". CRs with any other name must be ignored. | ||
| 2. The operator deploys and manages four components: an application backend (AppServer or LCore), a PostgreSQL database, a Console UI plugin, and operator-level monitoring/networking resources. |
There was a problem hiding this comment.
mixing external resources with the operator's own infrastructure
| 1. The operator manages exactly one OLSConfig CR per cluster, named "cluster". CRs with any other name must be ignored. | ||
| 2. The operator deploys and manages four components: an application backend (AppServer or LCore), a PostgreSQL database, a Console UI plugin, and operator-level monitoring/networking resources. | ||
| 3. The operator is fully event-driven. It does not use periodic/timer-based reconciliation. All changes are detected via Kubernetes watches on owned resources and annotated external resources. | ||
| 4. The operator selects between two mutually exclusive backend implementations at startup via the `--use-lcore` flag: AppServer (legacy, direct LLM proxy) or LCore (new, agent-based with Llama Stack). Both implement the same Lightspeed API surface. |
There was a problem hiding this comment.
this is going away in this sprint
| 6. Console UI Plugin: OpenShift console extension that provides the Lightspeed chat interface. Integrates via ConsolePlugin CR and proxies requests to the backend. | ||
| 7. AppServer backend: Python/FastAPI application that handles LLM queries, RAG retrieval, conversation management, and tool execution. Talks to LLM providers directly. | ||
| 8. LCore backend: Dual-container deployment (Llama Stack + Lightspeed Stack) that provides the same API but routes through Llama Stack for LLM communication, enabling agent-based tool use and provider abstraction. | ||
| 9. Operator-level resources: ServiceMonitor for operator metrics, NetworkPolicy restricting operator pod access. |
There was a problem hiding this comment.
I would suggest separating external with operator-level resources (observability support), and also add a cross-reference here to the specific docs
Description
Initial set of spec files to enable Agentic SDLC.
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing