make the agent always load the write-tests skill before writing a test
Adding the rule to the agent prompt.
Edited
AGENT.md
+1
AGENT.md
1
## Rules
+
2
- Before writing any *.test.ts file, load the write-tests skill.
Problem
make the agent always load the write-tests skill before writing a test
Adding the rule to the agent prompt.
Failed to edit
AGENT.md
Blocked: a prompt rule is probabilistic — a must-be-loaded precondition needs a file-guard that intercepts the write.
file_path:
AGENT.md
old_string:
## Rules
new_string:
## Rules - Before writing any *.test.ts file, load the write-tests skill.
Right — making it a real precondition guard instead of a prompt line.
Created
file-guard.yaml
+4
.sloprail/file-guard/require-write-tests-skill/file-guard.yaml
+
1
match: "**/*.test.ts"
+
2
preventive: true
+
3
require:
+
4
- skill: write-tests
Solution