feat(assistant): add engineering principles to system prompt - #250
Conversation
|
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe change adds engineering principles to ChangesEngineering Principles
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
internal/assistant/agent_runtime_wrappers_internal_test.go (1)
147-151: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert all seven engineering principles.
The test checks five principle strings. It does not fail if the compatibility, incremental-delivery, or dependency-reuse guidance is removed from
baseSystemPrompt. Add all seven expected strings, preferably in a table-driven loop, to protect theAGENTS.mdand runtime prompt contract.As per coding guidelines,
**/*_test.goshould prefer table-driven tests for core behavior.🤖 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 `@internal/assistant/agent_runtime_wrappers_internal_test.go` around lines 147 - 151, Update the test around the prompt assertions in the relevant test function to cover all seven engineering principles, adding the missing compatibility, incremental-delivery, and dependency-reuse strings from baseSystemPrompt. Prefer a table-driven loop over individual assert.Contains calls while preserving the existing prompt validation.Source: Coding guidelines
internal/assistant/runtime_context.go (1)
92-107: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winKeep engineering principles in one source.
LoadAgentInstructionsincludes the repository-rootAGENTS.md, whose seven engineering principles duplicateengineeringPrinciplesPrompt. This duplicate text increasesSystemTokens. De-duplicate the principles or retain only one source of truth.🤖 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 `@internal/assistant/runtime_context.go` around lines 92 - 107, Update LoadAgentInstructions and engineeringPrinciplesPrompt so the seven engineering principles are supplied from only one source of truth; remove the duplicated principle text from the runtime prompt or exclude it from the AGENTS.md instructions, while preserving the remaining agent guidance and reducing SystemTokens.
🤖 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 `@internal/assistant/agent_runtime_wrappers_internal_test.go`:
- Around line 147-151: Update the test around the prompt assertions in the
relevant test function to cover all seven engineering principles, adding the
missing compatibility, incremental-delivery, and dependency-reuse strings from
baseSystemPrompt. Prefer a table-driven loop over individual assert.Contains
calls while preserving the existing prompt validation.
In `@internal/assistant/runtime_context.go`:
- Around line 92-107: Update LoadAgentInstructions and
engineeringPrinciplesPrompt so the seven engineering principles are supplied
from only one source of truth; remove the duplicated principle text from the
runtime prompt or exclude it from the AGENTS.md instructions, while preserving
the remaining agent guidance and reducing SystemTokens.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: dfc21abc-1d51-4cdb-a3cb-5cb6ea2ed382
📒 Files selected for processing (3)
AGENTS.mdinternal/assistant/agent_runtime_wrappers_internal_test.gointernal/assistant/runtime_context.go
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #250 +/- ##
==========================================
- Coverage 84.81% 84.80% -0.02%
==========================================
Files 320 320
Lines 30586 30588 +2
==========================================
- Hits 25943 25940 -3
- Misses 3172 3176 +4
- Partials 1471 1472 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Summary
Validation