fix(instructions): add startup rule only for existing custom instructions

This commit is contained in:
Julian lechner committed 2026-10-08 15:16:07 +02:00
1 parent 6a981bd7f2
commit 83091d247a
7 files changed
+114 -6

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ import unittest
ROOT = Path(__file__).resolve().parent.parent.parent
sys.path.insert(0, str(ROOT / 'scripts/lib'))
SPEC = importlib.util.spec_from_file_location('install_options', ROOT / 'scripts/lib/install-options.py')
OPTIONS = importlib.util.module_from_spec(SPEC)
SPEC.loader.exec_module(OPTIONS)
@@ -21,6 +21,10 @@ class UserCustomizationTests(unittest.TestCase):
self.assertEqual(0, result.returncode, result.stderr)
self.assertIn('with-credential.ps1', (ROOT / 'generated/codex-powershell/AGENTS.md').read_text())
self.assertIn('with-credential.sh', (ROOT / 'generated/claude-bash/CLAUDE.md').read_text())
for client, name in (('codex', 'AGENTS.md'), ('claude', 'CLAUDE.md')):
for shell in ('powershell', 'bash'):
self.assertNotIn('.my-ai-configuration/instructions/',
(ROOT / 'generated' / f'{client}-{shell}' / name).read_text())
def test_add_instruction_creates_client_overlays_outside_managed_configuration(self):
powershell = shutil.which('powershell') or shutil.which('pwsh')