OLS-2882 add spec files into what/how two-layer structure - #2896
Conversation
Rewrite all 14 OLS service spec files and add new ones, organized into two layers under .ai/spec/: what/ (16 behavioral specs + README): Testable rules defining WHAT the system must do. Technology-neutral, with [PLANNED: OLS-XXXX] markers for open Jira work. Covers: system-overview, api, query-processing, agent-modes, conversation-history, llm-providers, rag, auth, tools, skills, quota, config, security, observability, prompts, mcp-apps. how/ (6 architecture specs + README): HOW the current implementation is structured. Module maps, data flow, design patterns, extension guides. Covers: project-structure, query-pipeline, llm-providers, tools, config, cache. Also updates .ai/jira-*.md files with current open/planned Jira items. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Value-add vs. token cost — compare with how ambient-code/platform approached the same problem I looked at this PR through the lens of the current spec-driven development landscape (Fowler's SDD taxonomy, Anthropic's harness research, PragSpec, Speculate, etc.) and also compared it to ambient-code/platform#1307, which tackled the same goal — giving AI agents better codebase context — but with a very different delivery. The intent is right. Agents working in this codebase benefit from knowing cross-cutting invariants, intentional behaviors, and planned changes. The what/how split is a thoughtful structure. But the delivery has three problems. Most content restates the code. Nothing connects these specs to agent workflows. No skill, no AGENTS.md directive, and no hook tells an agent to read Centralized location means specs won't be found or maintained. When an agent works in What I'd suggest:
|
|
Interesting feedback. I agree that we need a reference in Agents.md so that the AI will know to use it. This was only meant to be step one. Your approach feels like is it human focused. I was attempting to enable the AI. For example; I give claude a jira ticket and tell it to do the work, agents.md brings in the spec, it reads that for context, it knows where to go to work on the code, and then it can check with the spec and run the tests. This is just my initial idea. Let's discuss this and work out the details. |
|
Thanks Joshua — we're aligned on the goal. Two things to add. The single-run workflow is where this gets hard. Jira → read spec → implement → check spec → run tests is a lot of context for one agent session. Anthropic's harness research found this "do everything at once" pattern is the primary agent failure mode — context exhaustion mid-task. Splitting into phases gives each agent run a focused context window:
I've started landing these as skills in lightspeed-team-harness#7 ( This shapes where specs should live and how big they should be. In a phased workflow, the implement agent is working in The genuinely valuable content here — cross-cutting invariants, intentional-not-a-bug behaviors, |
|
My idea has been a phased approach. So I think we are on the same page there. For the dev phase I think it starts with giving the AI a jira ticket, letting it plan and then execute a solution. After it is finished the human reviews. If that is the case, I don't understand how specs in features work. Maybe a hybrid approach with some at the root and some in the features? I do agree that some of this may be token heavy. However, if you wanted to ask AI to rewrite the whole thing with, for example, a completely new ephemeral agent approach, you would need it at the root level. |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: onmete The full list of commands accepted by this bot can be found here. The pull request process is described 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. |
Create 14 OLS service spec files and add new ones, organized into two layers under .ai/spec/:
what/ (16 behavioral specs + README):
Testable rules defining WHAT the system must do. Technology-neutral,
with [PLANNED: OLS-XXXX] markers for open Jira work. Covers:
system-overview, api, query-processing, agent-modes, conversation-history,
llm-providers, rag, auth, tools, skills, quota, config, security,
observability, prompts, mcp-apps.
how/ (6 architecture specs + README):
HOW the current implementation is structured. Module maps, data flow,
design patterns, extension guides. Covers: project-structure,
query-pipeline, llm-providers, tools, config, cache.
Also updates .ai/jira-*.md files with current open/planned Jira items.
Description
Type of change
Related Tickets & Documents
Checklist before requesting a review
Testing