feat: enhance silva AI compatibility - #1391
Conversation
There was a problem hiding this comment.
Pull request overview
Adds repo-level and frontend-specific agent guidance to make AI-assisted development more consistent across Silva (domain context, workflows, conventions, testing expectations), plus Copilot instruction metadata and skill documentation alignment.
Changes:
- Added top-level
AGENTS.mddocumenting Silva domain context, stack, and full-stack workflow expectations. - Added
frontend/AGENTS.mddocumenting React/TypeScript/Carbon conventions, styling rules, API usage patterns, and testing structure. - Added Copilot instruction entry point and updated Caveman/Ponytail skill docs to align with the repo’s agent setup.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/AGENTS.md |
New frontend agent conventions for screens/components, styling, API usage, and tests |
AGENTS.md |
New top-level Silva overview + cross-layer workflow/testing expectations |
.github/copilot-instructions.md |
Enables Copilot instruction metadata pointing to skill docs |
.agents/skills/ponytail/SKILL.md |
Adds Ponytail skill doc (YAGNI/lazy-dev ladder) |
.agents/skills/caveman/SKILL.md |
Updates Caveman skill doc metadata and wording |
Suppressed comments (4)
frontend/AGENTS.md:768
- This section says the entire
src/services/folder is auto-generated and that onlyAPI.tsshould be modified. In this repo, onlysrc/services/OpenApi/**is generated;API.ts,AuthService.ts, andOpeningSearchService.tsare hand-written. Clarifying prevents accidental edits to the wrong files.
The `/src/services/` folder is **auto-generated** from the backend's OpenAPI specification.
### Rules
- **Never modify auto-generated files** (e.g., individual service files)
frontend/AGENTS.md:843
- Unit testing guidance says “Use Jest”, but the repo is set up to run unit tests with Vitest (and uses
@testing-library/jest-dommatchers viasrc/setupTests.ts). Also, the example path uses__tests__while this repo usessrc/__test__/.
Use **Jest** and **React Testing Library** for component tests:
```typescript
// src/components/Avatar/__tests__/Avatar.test.tsx
import { render, screen } from '@testing-library/react';
frontend/AGENTS.md:718
- The remainder of this example continues with
API.updateOpening(...)/ cache updates for anopeningslist, but those methods aren’t available on theAPIexport here. Rewriting the rest of the snippet to match a real endpoint keeps the guidance copy/paste-safe.
const updateMutation = useMutation({
mutationFn: (opening: Opening) =>
API.updateOpening(opening.id, opening),
onSuccess: (updatedOpening) => {
// Invalidate cache
frontend/AGENTS.md:478
- This calls out “Jest configurations” as the reason
@/might not resolve in tests, but the frontend test runner here is Vitest and there’s no Jest config in the repo. Suggest generalizing this to “test runner configuration” (or Vitest specifically) to match reality.
- **Exception in tests:** Relative paths may be necessary if `@/` doesn't resolve (e.g., in Jest configurations)
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
paulushcgcj
left a comment
There was a problem hiding this comment.
The PR does a good job of keeping the Copilot entry point small and putting the detailed behavior in focused skills. That separation reduces duplication and gives us a cleaner place to evolve the instructions over time.
|
Paulo's comment are fixed, will merge this in for now |
Summary
This PR adds structured repository and frontend guidance for AI-assisted development, improving consistency and reducing incorrect assumptions across the Silva project.
It introduces repo-level instructions for how agents should work within the codebase, reinforces project conventions, and adds frontend-specific guidance for React, TypeScript, styling, and testing patterns. The goal is to make multi-agent and AI-assisted workflows more predictable and easier to maintain.
Changes
Added a top-level project guide in AGENTS.md covering:
Added Copilot instruction metadata in .github/copilot-instructions.md to enable the repository’s AI workflow and skill setup.
Added frontend contributor guidance in frontend/AGENTS.md, including:
Updated the Caveman skill documentation to align with the repo-specific instruction setup.
Impact
This is a documentation and workflow enhancement only. There are no changes to runtime application behavior or business logic.
Thanks for the PR!
Deployments, as required, will be available below:
Please create PRs in draft mode. Mark as ready to enable:
After merge, new images are deployed in: