chore(agents): keep agent instructions inside runtime settings - #519
Conversation
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
PR SummaryLow Risk Overview Introduces a frozen agent-instructions research corpus (harness survey, prompt-management notes, index) as evidence for that ADR and future revisits. Updates Reviewed by Cursor Bugbot for commit 3f27612. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (3)
WalkthroughThe change adds research on agent-instruction formats, adds ADR#0043 on instruction ownership and shape, links the ADR in the index, and updates ChangesAgent instruction ownership
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
docs/research/agent-instructions/prompt-management.md (1)
27-46: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd primary-source anchors for the LangChain and provider claims.
The corpus method requires each document to name the sources checked. The LangChain and provider API claims in this range have no anchor or source path. Add official references so the frozen corpus remains auditable.
🤖 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/research/agent-instructions/prompt-management.md` around lines 27 - 46, Add official primary-source references for the claims in the LangChain and Provider APIs sections, naming the specific LangChain documentation and Anthropic/OpenAI API source paths checked. Keep the existing technical content unchanged and place the anchors directly with the corresponding claims so the frozen corpus remains auditable.
🤖 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 `@docs/research/agent-instructions/prompt-management.md`:
- Around line 27-46: Add official primary-source references for the claims in
the LangChain and Provider APIs sections, naming the specific LangChain
documentation and Anthropic/OpenAI API source paths checked. Keep the existing
technical content unchanged and place the anchors directly with the
corresponding claims so the frozen corpus remains auditable.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: aa9dcae9-6d67-4a3c-8827-a9932a506d8c
⛔ Files ignored due to path filters (5)
rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.agent.__view.rsis excluded by!**/gen/**rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.agent.rsis excluded by!**/gen/**rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.instructions.__view.rsis excluded by!**/gen/**rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.instructions.rsis excluded by!**/gen/**rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.mod.rsis excluded by!**/gen/**
📒 Files selected for processing (9)
docs/adr/0042-agent-instructions-ownership-and-shape.mddocs/adr/index.mddocs/research/agent-instructions/harness-survey.mddocs/research/agent-instructions/index.mddocs/research/agent-instructions/prompt-management.mddocs/research/session-store/products/claude-agent-sdk.mddocs/research/session-store/products/opencode.mdproto/trogonai/agents/agents/v1/agent.protoproto/trogonai/agents/agents/v1/instructions.proto
💤 Files with no reviewable changes (1)
- docs/research/session-store/products/opencode.md
…ions-oneof Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com> # Conflicts: # docs/adr/index.md # docs/research/session-store/products/claude-agent-sdk.md
Code Coverage SummaryDetailsDiff against mainResults for commit: 3f27612 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/research/agent-instructions/harness-survey.md (2)
255-257: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReplace “standardized” with a qualified term.
The survey also records differing nested-file semantics and proposed specification changes. That evidence supports “de facto” or “widely adopted,” not “standardized.” Use a qualified term to avoid implying a shared contract.
🤖 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/research/agent-instructions/harness-survey.md` around lines 255 - 257, Update the description in the survey’s dominant-form statement by replacing “standardized” with a qualified term such as “de facto” or “widely adopted,” without changing the surrounding scope or document examples.
13-17: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winCorrect Claude Agent SDK instructions to match the documented variants.
The TypeScript entry omits the
{ type: 'preset', preset: 'claude_code', ... }branch, and both line 13 and lines 259-260 list unsupported variants such asstring[]and Python{ type: 'file', path: str }before they were removed. Use the exact API forms documented for the pinned evidence date.🤖 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/research/agent-instructions/harness-survey.md` around lines 13 - 17, Update the Claude Agent SDK entries in the survey table and the corresponding entries around lines 259-260 to match the pinned-date documentation: include the TypeScript `{ type: 'preset', preset: 'claude_code', ... }` instruction branch, and remove unsupported `string[]` and Python `{ type: 'file', path: str }` variants. Retain only the documented API forms.Source: MCP tools
🤖 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 `@docs/adr/0043-agent-instructions-ownership-and-shape.md`:
- Around line 39-53: Update the systemPrompt contract in the ADR evidence to
allow only a plain string or the named preset object, removing string[] from the
type. Correct the subsequent runtime claim to acknowledge that Claude accepts a
raw platform markdown string through the string form, while preserving the
distinction from Codex and Gemini surfaces used in the lossiness argument.
- Around line 150-154: The protobuf evolution statement should qualify adding
fields as wire-safe rather than unconditionally safe, while noting that
ProtoJSON may discard unknown fields by default. Restrict the oneof claim to
wire compatibility when an existing explicit-presence field is moved into a
newly created oneof, and remove any implication that existing mutually exclusive
members can be migrated this way.
In `@proto/trogonai/agents/agents/v1/agent.proto`:
- Around line 24-27: Enforce validation of populated AgentConfiguration.settings
before persisting or processing configuration: require settings.type_url to
match the configured AgentConfiguration.runtime, and reject mismatches in both
the provisioning flow and decider path. Preserve the existing default behavior
for absent settings.
---
Outside diff comments:
In `@docs/research/agent-instructions/harness-survey.md`:
- Around line 255-257: Update the description in the survey’s dominant-form
statement by replacing “standardized” with a qualified term such as “de facto”
or “widely adopted,” without changing the surrounding scope or document
examples.
- Around line 13-17: Update the Claude Agent SDK entries in the survey table and
the corresponding entries around lines 259-260 to match the pinned-date
documentation: include the TypeScript `{ type: 'preset', preset: 'claude_code',
... }` instruction branch, and remove unsupported `string[]` and Python `{ type:
'file', path: str }` variants. Retain only the documented API forms.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 87b374b8-8899-495b-baf0-f4abd5753091
⛔ Files ignored due to path filters (2)
rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.agent.__view.rsis excluded by!**/gen/**rsworkspace/crates/platform/trogonai-proto/src/gen/trogonai.agents.agents.v1.agent.rsis excluded by!**/gen/**
📒 Files selected for processing (6)
docs/adr/0043-agent-instructions-ownership-and-shape.mddocs/adr/index.mddocs/research/agent-instructions/harness-survey.mddocs/research/agent-instructions/index.mddocs/research/agent-instructions/prompt-management.mdproto/trogonai/agents/agents/v1/agent.proto
🚧 Files skipped from review as they are similar to previous changes (2)
- docs/research/agent-instructions/prompt-management.md
- docs/research/agent-instructions/index.md
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
Related