Skip to content

Commit 8456f02

Browse files
committed
feat: add AGENTS.md to protected files list
1 parent 2fc7bf5 commit 8456f02

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/core/protect/RooProtectedController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export class RooProtectedController {
2020
".roo/**",
2121
".vscode/**",
2222
".rooprotected", // For future use
23+
"AGENTS.md",
2324
]
2425

2526
constructor(cwd: string) {

src/core/protect/__tests__/RooProtectedController.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ describe("RooProtectedController", () => {
4444
expect(controller.isWriteProtected(".vscode/tasks.json")).toBe(true)
4545
})
4646

47+
it("should protect AGENTS.md file", () => {
48+
expect(controller.isWriteProtected("AGENTS.md")).toBe(true)
49+
})
50+
4751
it("should not protect other files starting with .roo", () => {
4852
expect(controller.isWriteProtected(".roosettings")).toBe(false)
4953
expect(controller.isWriteProtected(".rooconfig")).toBe(false)
@@ -142,6 +146,7 @@ describe("RooProtectedController", () => {
142146
".roo/**",
143147
".vscode/**",
144148
".rooprotected",
149+
"AGENTS.md",
145150
])
146151
})
147152
})

0 commit comments

Comments
 (0)