failproofai 0.0.6-beta.0 → 0.0.6-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/.next/standalone/.failproofai/policies/review-policies.mjs +113 -0
  2. package/.next/standalone/.next/BUILD_ID +1 -1
  3. package/.next/standalone/.next/build-manifest.json +5 -5
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
  7. package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  8. package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
  9. package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
  12. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  13. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
  14. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
  15. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
  16. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
  18. package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  19. package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  20. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.html +2 -2
  22. package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
  23. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
  24. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
  25. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
  26. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  27. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
  28. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/index.html +1 -1
  30. package/.next/standalone/.next/server/app/index.rsc +15 -15
  31. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  32. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
  33. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
  34. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
  35. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/page/build-manifest.json +2 -2
  37. package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
  38. package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
  39. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  40. package/.next/standalone/.next/server/app/policies/page/build-manifest.json +2 -2
  41. package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
  42. package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
  43. package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
  44. package/.next/standalone/.next/server/app/project/[name]/page/build-manifest.json +2 -2
  45. package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
  46. package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
  47. package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
  48. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/build-manifest.json +2 -2
  49. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
  50. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
  51. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
  52. package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
  53. package/.next/standalone/.next/server/app/projects/page/build-manifest.json +2 -2
  54. package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
  55. package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  56. package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  57. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
  58. package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
  59. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0a.nuas._.js → [root-of-the-server]__05akje6._.js} +2 -2
  60. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
  61. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
  62. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +2 -2
  63. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +2 -2
  64. package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0.~fd7s._.js → [root-of-the-server]__0i5kvry._.js} +2 -2
  65. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0okos0k._.js +2 -2
  66. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +6 -6
  67. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +2 -2
  68. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +2 -2
  69. package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
  70. package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
  71. package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
  72. package/.next/standalone/.next/server/middleware-build-manifest.js +5 -5
  73. package/.next/standalone/.next/server/pages/404.html +2 -2
  74. package/.next/standalone/.next/server/pages/500.html +1 -1
  75. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  76. package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
  77. package/.next/standalone/.next/static/chunks/{0teq8wdh3po1n.js → 00j0rr7rh8ef8.js} +1 -1
  78. package/.next/standalone/.next/static/chunks/{0maq.q1t.ri85.js → 05j1px0r8yzh6.js} +2 -2
  79. package/.next/standalone/.next/static/chunks/0badv41uxa56..js +4 -0
  80. package/.next/standalone/.next/static/chunks/{0hplx-8c-4vpv.js → 0ijk_kek9_wyx.js} +1 -1
  81. package/.next/standalone/.next/static/chunks/{0uc0um_uz51m_.js → 0npb~873.wvg3.js} +1 -1
  82. package/.next/standalone/.next/static/chunks/{0hctoh28rg838.js → 0xpl.oscrakvx.js} +1 -1
  83. package/.next/standalone/.next/static/chunks/{0.z51twd.0l5z.js → 1052sguyd-.ka.js} +1 -1
  84. package/.next/standalone/.next/static/chunks/{09e7drilkf1sn.js → 12simlrcfk3g2.js} +1 -1
  85. package/.next/standalone/.next/static/chunks/{0ul6fk-z.6k-0.js → 14cl9poem30dq.js} +1 -1
  86. package/.next/standalone/.next/static/chunks/{turbopack-0r26pc8h0y_-e.js → turbopack-0o7k.hakttp4k.js} +1 -1
  87. package/.next/standalone/CHANGELOG.md +19 -0
  88. package/.next/standalone/README.md +2 -2
  89. package/.next/standalone/bun.lock +43 -85
  90. package/.next/standalone/dist/cli.mjs +91 -4
  91. package/.next/standalone/docs/ar/built-in-policies.mdx +124 -87
  92. package/.next/standalone/docs/ar/custom-policies.mdx +72 -72
  93. package/.next/standalone/docs/ar/examples.mdx +86 -33
  94. package/.next/standalone/docs/ar/getting-started.mdx +82 -29
  95. package/.next/standalone/docs/built-in-policies.mdx +38 -1
  96. package/.next/standalone/docs/custom-policies.mdx +1 -1
  97. package/.next/standalone/docs/de/built-in-policies.mdx +93 -56
  98. package/.next/standalone/docs/de/custom-policies.mdx +56 -56
  99. package/.next/standalone/docs/de/examples.mdx +72 -18
  100. package/.next/standalone/docs/de/getting-started.mdx +72 -20
  101. package/.next/standalone/docs/es/built-in-policies.mdx +115 -78
  102. package/.next/standalone/docs/es/custom-policies.mdx +55 -55
  103. package/.next/standalone/docs/es/examples.mdx +73 -19
  104. package/.next/standalone/docs/es/getting-started.mdx +72 -20
  105. package/.next/standalone/docs/examples.mdx +54 -0
  106. package/.next/standalone/docs/fr/built-in-policies.mdx +83 -46
  107. package/.next/standalone/docs/fr/custom-policies.mdx +51 -51
  108. package/.next/standalone/docs/fr/examples.mdx +78 -24
  109. package/.next/standalone/docs/fr/getting-started.mdx +65 -13
  110. package/.next/standalone/docs/getting-started.mdx +52 -0
  111. package/.next/standalone/docs/he/built-in-policies.mdx +156 -117
  112. package/.next/standalone/docs/he/custom-policies.mdx +75 -75
  113. package/.next/standalone/docs/he/examples.mdx +87 -33
  114. package/.next/standalone/docs/he/getting-started.mdx +84 -33
  115. package/.next/standalone/docs/hi/built-in-policies.mdx +101 -60
  116. package/.next/standalone/docs/hi/custom-policies.mdx +71 -70
  117. package/.next/standalone/docs/hi/examples.mdx +90 -36
  118. package/.next/standalone/docs/hi/getting-started.mdx +80 -27
  119. package/.next/standalone/docs/i18n/README.ar.md +69 -69
  120. package/.next/standalone/docs/i18n/README.de.md +46 -46
  121. package/.next/standalone/docs/i18n/README.es.md +42 -42
  122. package/.next/standalone/docs/i18n/README.fr.md +39 -39
  123. package/.next/standalone/docs/i18n/README.he.md +83 -83
  124. package/.next/standalone/docs/i18n/README.hi.md +69 -69
  125. package/.next/standalone/docs/i18n/README.it.md +72 -72
  126. package/.next/standalone/docs/i18n/README.ja.md +71 -71
  127. package/.next/standalone/docs/i18n/README.ko.md +52 -52
  128. package/.next/standalone/docs/i18n/README.pt-br.md +44 -44
  129. package/.next/standalone/docs/i18n/README.ru.md +66 -66
  130. package/.next/standalone/docs/i18n/README.tr.md +82 -83
  131. package/.next/standalone/docs/i18n/README.vi.md +70 -71
  132. package/.next/standalone/docs/i18n/README.zh.md +51 -51
  133. package/.next/standalone/docs/it/built-in-policies.mdx +118 -81
  134. package/.next/standalone/docs/it/custom-policies.mdx +69 -69
  135. package/.next/standalone/docs/it/examples.mdx +93 -39
  136. package/.next/standalone/docs/it/getting-started.mdx +73 -21
  137. package/.next/standalone/docs/ja/built-in-policies.mdx +98 -61
  138. package/.next/standalone/docs/ja/custom-policies.mdx +71 -71
  139. package/.next/standalone/docs/ja/examples.mdx +76 -22
  140. package/.next/standalone/docs/ja/getting-started.mdx +65 -13
  141. package/.next/standalone/docs/ko/built-in-policies.mdx +137 -100
  142. package/.next/standalone/docs/ko/custom-policies.mdx +67 -67
  143. package/.next/standalone/docs/ko/examples.mdx +87 -33
  144. package/.next/standalone/docs/ko/getting-started.mdx +61 -9
  145. package/.next/standalone/docs/pt-br/built-in-policies.mdx +94 -57
  146. package/.next/standalone/docs/pt-br/custom-policies.mdx +56 -56
  147. package/.next/standalone/docs/pt-br/examples.mdx +78 -24
  148. package/.next/standalone/docs/pt-br/getting-started.mdx +64 -12
  149. package/.next/standalone/docs/ru/built-in-policies.mdx +142 -105
  150. package/.next/standalone/docs/ru/custom-policies.mdx +82 -81
  151. package/.next/standalone/docs/ru/examples.mdx +77 -22
  152. package/.next/standalone/docs/ru/getting-started.mdx +74 -22
  153. package/.next/standalone/docs/tr/built-in-policies.mdx +104 -67
  154. package/.next/standalone/docs/tr/custom-policies.mdx +59 -60
  155. package/.next/standalone/docs/tr/examples.mdx +97 -42
  156. package/.next/standalone/docs/tr/getting-started.mdx +75 -23
  157. package/.next/standalone/docs/vi/built-in-policies.mdx +110 -72
  158. package/.next/standalone/docs/vi/custom-policies.mdx +68 -68
  159. package/.next/standalone/docs/vi/examples.mdx +93 -38
  160. package/.next/standalone/docs/vi/getting-started.mdx +74 -22
  161. package/.next/standalone/docs/zh/built-in-policies.mdx +132 -95
  162. package/.next/standalone/docs/zh/custom-policies.mdx +49 -49
  163. package/.next/standalone/docs/zh/examples.mdx +90 -36
  164. package/.next/standalone/docs/zh/getting-started.mdx +73 -21
  165. package/.next/standalone/node_modules/@next/env/package.json +1 -1
  166. package/.next/standalone/node_modules/next/dist/build/swc/index.js +1 -1
  167. package/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +7 -7
  168. package/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +3 -3
  169. package/.next/standalone/node_modules/next/dist/server/config-schema.js +10 -2
  170. package/.next/standalone/node_modules/next/dist/server/config.js +1 -1
  171. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +2 -2
  172. package/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1 -1
  173. package/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +1 -1
  174. package/.next/standalone/node_modules/next/dist/server/lib/start-server.js +1 -1
  175. package/.next/standalone/node_modules/next/dist/server/render.js +27 -20
  176. package/.next/standalone/node_modules/next/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  177. package/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
  178. package/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
  179. package/.next/standalone/node_modules/next/dist/telemetry/events/version.js +2 -2
  180. package/.next/standalone/node_modules/next/package.json +15 -15
  181. package/.next/standalone/package.json +2 -2
  182. package/.next/standalone/server.js +1 -1
  183. package/.next/standalone/src/hooks/builtin-policies.ts +106 -1
  184. package/README.md +2 -2
  185. package/dist/cli.mjs +91 -4
  186. package/package.json +2 -2
  187. package/src/hooks/builtin-policies.ts +106 -1
  188. package/.next/standalone/.next/static/chunks/0w9lwqy0-v1dk.js +0 -4
  189. /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → A9pNTZdoYJTVyPAYwQMx5}/_buildManifest.js +0 -0
  190. /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → A9pNTZdoYJTVyPAYwQMx5}/_clientMiddlewareManifest.js +0 -0
  191. /package/.next/standalone/.next/static/{8mygPGI5bzrtWK36ZYO59 → A9pNTZdoYJTVyPAYwQMx5}/_ssgManifest.js +0 -0
@@ -1,4 +1,5 @@
1
1
  ---
2
+ ---
2
3
  title: البدء السريع
3
4
  description: "ثبّت failproofai، فعّل السياسات، واترك وكلاءك يعملون بموثوقية"
4
5
  icon: rocket
@@ -30,74 +31,126 @@ bun add -g failproofai
30
31
  ## البدء السريع
31
32
 
32
33
  <Steps>
33
- <Step title="تفعيل السياسات">
34
- السياسات هي قواعد تعمل قبل وبعد كل استدعاء أداة من الوكيل. فهي تقبض على الأوامر المدمرة، تسرب الأسرار، وأوجه الفشل الأخرى قبل أن تسبب الضرر.
34
+ <Step title="فعّل السياسات">
35
+ السياسات هي قواعد تعمل قبل وبعد كل استدعاء أداة للوكيل. تحتفظ بالأوامر التدميرية، تسرب الأسرار، ومشاكل الأعطال الأخرى قبل أن تسبب ضررًا.
35
36
 
36
37
  ```bash
37
38
  failproofai policies --install
38
39
  ```
39
40
 
40
- يكتب هذا مدخلات hook في `settings.json` الخاص بـ Claude Code. يمكنك أيضاً التثبيت لمشروع واحد أو اختيار سياسات محددة:
41
+ هذا يكتب إدخالات hook في `settings.json` الخاص بـ Claude Code. يمكنك أيضًا التثبيت لمشروع واحد أو اختيار سياسات محددة:
41
42
 
42
43
  ```bash
43
44
  failproofai policies --install --scope project
44
45
  failproofai policies --install block-sudo block-rm-rf sanitize-api-keys
45
46
  ```
46
47
  </Step>
47
- <Step title="التحقق">
48
+ <Step title="تحقق">
48
49
  ```bash
49
50
  failproofai policies
50
51
  ```
51
52
 
52
- يعرض كل سياسة، ما إذا كانت مفعلة، وأي معاملات مكونة.
53
+ يعرض كل سياسة، وما إذا كانت مفعلة، وأي معاملات مكونة.
53
54
  </Step>
54
- <Step title="تشغيل لوحة المعلومات">
55
+ <Step title="شغّل لوحة المعلومات">
55
56
  ```bash
56
57
  failproofai
57
58
  ```
58
59
 
59
- يفتح لوحة معلومات محلية على `http://localhost:8020` حيث يمكنك تصفح الجلسات، فحص استدعاءات الأدوات، وإدارة السياسات.
60
+ يفتح لوحة معلومات محلية في `http://localhost:8020` حيث يمكنك استعراض الجلسات، فحص استدعاءات الأدوات، وإدارة السياسات.
60
61
  </Step>
61
- <Step title="تشغيل وكيلك">
62
- شغّل Claude Code كالمعتاد. إذا حاول الوكيل شيئاً محفوفاً بالمخاطر، فإن failproofai يقاطعه تلقائياً. اتركه يعمل دون مراقبة وراجع ما حدث في لوحة المعلومات.
62
+ <Step title="شغّل وكيلك">
63
+ ابدأ Claude Code كالمعتاد. إذا حاول الوكيل فعل شيء محفوف بالمخاطر، يقطعه failproofai تلقائيًا. اتركه يعمل بلا مراقبة واستعرض ما حدث في لوحة المعلومات.
63
64
  </Step>
64
65
  </Steps>
65
66
 
66
67
  ---
67
68
 
68
- ## كيفية عمل السياسات
69
+ ## كيف تعمل السياسات
69
70
 
70
- في كل مرة يشغل فيها الوكيل أداة، يستدعي Claude Code failproofai كعملية فرعية:
71
+ في كل مرة يشغل الوكيل أداة، يستدعي Claude Code failproofai كعملية فرعية:
71
72
 
72
73
  ```text
73
- Claude Code → failproofai --hook PreToolUse → قراءة JSON من stdin
74
- تقييم السياسات
75
- كتابة القرار إلى stdout
74
+ Claude Code → failproofai --hook PreToolUse → يقرأ JSON من stdin
75
+ يقيّم السياسات
76
+ يكتب القرار إلى stdout
76
77
  ```
77
78
 
78
- كل سياسة ترجع أحد ثلاثة قرارات:
79
+ تُرجع كل سياسة أحد ثلاثة قرارات:
79
80
 
80
- - **allow** - يستمر الوكيل بشكل طبيعي
81
- - **deny** - يتم حظر الإجراء، ويُخبر الوكيل عن السبب
82
- - **instruct** - يُضاف سياق إضافي إلى فوری الوكيل
81
+ - **allow** - يمضي الوكيل قدمًا بشكل طبيعي
82
+ - **deny** - تُحجب الإجراء، يُخبر الوكيل لماذا
83
+ - **instruct** - يُضاف سياق إضافي إلى موجه الوكيل
83
84
 
84
85
  <Note>
85
- تعمل السياسات في عمليتك المحلية. لا يتم إرسال أي شيء إلى خدمة بعيدة.
86
+ السياسات تعمل في عمليتك المحلية. لا يُرسل شيء إلى خدمة بعيدة.
86
87
  </Note>
87
88
 
88
89
  ---
89
90
 
91
+ ## أعد إعداد سياسات الفريق باستخدام السياسات المستندة إلى الاتفاقية
92
+
93
+ أسرع طريقة لتأسيس معايير الجودة عبر فريقك هي اتفاقية `.failproofai/policies/`. ضع ملفات السياسات في هذا الدليل وسيتم تحميلها تلقائيًا — بلا أعلام، بلا تغييرات في الإعدادات، بلا أوامر تثبيت.
94
+
95
+ <Steps>
96
+ <Step title="أنشئ دليل السياسات">
97
+ ```bash
98
+ mkdir -p .failproofai/policies
99
+ ```
100
+ </Step>
101
+ <Step title="أضف ملفات السياسات">
102
+ انسخ الأمثلة الأولية أو اكتب ملفك الخاص:
103
+
104
+ ```bash
105
+ cp node_modules/failproofai/examples/convention-policies/*.mjs .failproofai/policies/
106
+ ```
107
+
108
+ أو أنشئ واحدة جديدة:
109
+
110
+ ```js
111
+ // .failproofai/policies/team-policies.mjs
112
+ import { customPolicies, allow, deny, instruct } from "failproofai";
113
+
114
+ customPolicies.add({
115
+ name: "test-before-commit",
116
+ match: { events: ["PreToolUse"] },
117
+ fn: async (ctx) => {
118
+ if (ctx.toolName !== "Bash") return allow();
119
+ if (/git\s+commit/.test(ctx.toolInput?.command ?? "")) {
120
+ return instruct("Run tests before committing.");
121
+ }
122
+ return allow();
123
+ },
124
+ });
125
+ ```
126
+ </Step>
127
+ <Step title="أسقط في git">
128
+ ```bash
129
+ git add .failproofai/policies/
130
+ git commit -m "Add team quality policies"
131
+ ```
132
+
133
+ كل عضو في الفريق لديه failproofai مثبت يلتقط هذه السياسات تلقائيًا. لا حاجة إلى إعداد لكل مطور.
134
+ </Step>
135
+ </Steps>
136
+
137
+ <Tip>
138
+ أسقط `.failproofai/policies/` في مستودع ملفك بحيث يشاركها الفريق بأكمله بنفس المعايير. مع اكتشاف فريقك لأنماط فشل جديدة، أضف السياسات وادفع — يحصل الجميع على التحديث في `git pull` التالي لهم. بمرور الوقت، تصبح هذه السياسات معيار جودة حي يستمر في التحسن.
139
+ </Tip>
140
+
141
+ ---
142
+
90
143
  ## تخزين البيانات
91
144
 
92
145
  جميع الإعدادات والسجلات تبقى على جهازك:
93
146
 
94
- | المسار | ما يخزنه |
147
+ | المسار | ما يتم تخزينه |
95
148
  |------|----------------|
96
- | `~/.failproofai/policies-config.json` | إعدادات السياسة العامة |
149
+ | `~/.failproofai/policies-config.json` | إعدادات السياسة العام |
97
150
  | `~/.failproofai/hook-activity.jsonl` | سجل تنفيذ Hook |
98
- | `~/.failproofai/hook.log` | سجل تصحيح الأخطاء لأخطاء hook المخصصة |
99
- | `.failproofai/policies-config.json` | إعدادات لكل مشروع (مرتكبة) |
100
- | `.failproofai/policies-config.local.json` | التجاوزات الشخصية (مستثناة من git) |
151
+ | `~/.failproofai/hook.log` | سجل التصحيح لأخطاء Hook المخصصة |
152
+ | `.failproofai/policies-config.json` | إعدادات لكل مشروع (مسجل) |
153
+ | `.failproofai/policies-config.local.json` | تجاوزات شخصية (مُتجاهل) |
101
154
 
102
155
  ---
103
156
 
@@ -107,7 +160,7 @@ Claude Code → failproofai --hook PreToolUse → قراءة JSON من stdin
107
160
  failproofai policies --uninstall
108
161
  ```
109
162
 
110
- يزيل مدخلات hook من `~/.claude/settings.json`. يتم الاحتفاظ بملفات الإعدادات في `~/.failproofai/`.
163
+ يزيل إدخالات hook من `~/.claude/settings.json`. ملفات الإعدادات في `~/.failproofai/` تُحفظ.
111
164
 
112
165
  ---
113
166
 
@@ -116,19 +169,19 @@ failproofai policies --uninstall
116
169
  <CardGroup cols={2}>
117
170
 
118
171
  <Card title="الإعدادات" icon="gear" href="/ar/configuration">
119
- النطاقات وصيغة ملف الإعدادات
172
+ النطاقات وتنسيق ملف الإعدادات
120
173
  </Card>
121
174
 
122
175
  <Card title="السياسات المدمجة" icon="shield" href="/ar/built-in-policies">
123
- جميع 26 سياسة مع المعاملات
176
+ جميع السياسات الـ 26 مع المعاملات
124
177
  </Card>
125
178
 
126
179
  <Card title="السياسات المخصصة" icon="code" href="/ar/custom-policies">
127
- اكتب سياساتك الخاصة بلغة JavaScript
180
+ اكتب سياساتك الخاصة في JavaScript
128
181
  </Card>
129
182
 
130
183
  <Card title="مراقب الوكيل" icon="chart-line" href="/ar/dashboard">
131
- راقب الجلسات واستعرض نشاط السياسة
184
+ راقب الجلسات واستعرض نشاط السياسات
132
185
  </Card>
133
186
 
134
187
  </CardGroup>
@@ -21,6 +21,7 @@ Policies are grouped into categories:
21
21
  | [Git](#git) | block-push-master, block-work-on-main, block-force-push, warn-git-amend, warn-git-stash-drop, warn-all-files-staged | PreToolUse |
22
22
  | [Database](#database) | warn-destructive-sql, warn-schema-alteration | PreToolUse |
23
23
  | [Warnings](#warnings) | warn-large-file-write, warn-package-publish, warn-background-process, warn-global-package-install | PreToolUse |
24
+ | [Package managers](#package-managers) | prefer-package-manager | PreToolUse |
24
25
  | [Workflow](#workflow) | require-commit-before-stop, require-push-before-stop, require-pr-before-stop, require-ci-green-before-stop | Stop |
25
26
 
26
27
  - **`block-`** — stop the agent from proceeding.
@@ -436,6 +437,42 @@ No parameters.
436
437
 
437
438
  ---
438
439
 
440
+ ## Package managers
441
+
442
+ Enforce which package managers the agent is allowed to use.
443
+
444
+ ### `prefer-package-manager`
445
+
446
+ **Event:** PreToolUse (Bash)
447
+ **Default:** Disabled. When enabled, blocks any package manager command not in the `allowed` list and tells Claude to rewrite the command using an allowed manager.
448
+
449
+ Detects: pip, pip3, python -m pip, npm, npx, yarn, pnpm, pnpx, bun, bunx, uv, poetry, pipenv, conda, cargo.
450
+
451
+ | Parameter | Type | Default | Description |
452
+ |-----------|------|---------|-------------|
453
+ | `allowed` | string[] | `[]` | Allowed package manager names. Any detected manager not in this list is blocked. When empty, the policy is a no-op. |
454
+ | `blocked` | string[] | `[]` | Additional manager names to block beyond the built-in list (e.g. `['pdm', 'pipx']`). |
455
+
456
+ The built-in block list covers: pip, pip3, npm, npx, yarn, pnpm, pnpx, bun, bunx, uv, poetry, pipenv, conda, cargo. Use `blocked` to append managers not in this list.
457
+
458
+ **Example configuration:**
459
+
460
+ ```json
461
+ {
462
+ "enabledPolicies": ["prefer-package-manager"],
463
+ "policyParams": {
464
+ "prefer-package-manager": {
465
+ "allowed": ["uv", "bun"],
466
+ "blocked": ["pdm", "pipx"]
467
+ }
468
+ }
469
+ }
470
+ ```
471
+
472
+ With this config, `pip install flask` and `pdm install flask` are both denied with a message telling Claude to use `uv` or `bun` instead. Commands like `uv pip install flask` are allowed because `uv` is in the allowlist and is checked first.
473
+
474
+ ---
475
+
439
476
  ## AI behavior
440
477
 
441
478
  Detect when agents get stuck or behave unexpectedly.
@@ -507,7 +544,7 @@ pull requests. If `gh` is not installed or not authenticated, the policy fails o
507
544
  ### `require-ci-green-before-stop`
508
545
 
509
546
  **Event:** Stop
510
- **Default:** Denies stopping when CI checks are failing or still running on the current branch. Checks both GitHub Actions workflow runs and third-party bot checks (e.g. CodeRabbit, SonarCloud, Codecov). Treats `skipped` conclusions as success. Returns an informational message when all checks pass.
547
+ **Default:** Denies stopping when CI checks are failing or still running on the current branch. Checks both GitHub Actions workflow runs and third-party bot checks (e.g. CodeRabbit, SonarCloud, Codecov). Treats `skipped` and `cancelled` conclusions as success. Returns an informational message when all checks pass.
511
548
 
512
549
  No parameters.
513
550
 
@@ -60,7 +60,7 @@ Drop `*policies.{js,mjs,ts}` files into `.failproofai/policies/` and they're aut
60
60
  - Works alongside explicit `--custom` and built-in policies
61
61
 
62
62
  <Tip>
63
- Convention policies are the easiest way to share policies across a team. Commit `.failproofai/policies/` to git and every team member gets them automatically.
63
+ Convention policies are the easiest way to build a quality standard for your org. Commit `.failproofai/policies/` to git and every team member gets the same rules automatically — no per-developer setup needed. As your team discovers new failure modes, add a policy and push. Over time these become a living quality standard that keeps improving with every contribution.
64
64
  </Tip>
65
65
 
66
66
  ### Option 2: Explicit file path
@@ -1,10 +1,10 @@
1
1
  ---
2
- title: Eingebaute Richtlinien
3
- description: "Alle 30 eingebauten Richtlinien, die häufige Agent-Fehlerszenarien abfangen"
2
+ title: Integrierte Richtlinien
3
+ description: "Alle 30 integrierten Richtlinien, die häufige Fehlerquellen bei Agenten abdecken"
4
4
  icon: shield
5
5
  ---
6
6
 
7
- failproofai wird mit 30 eingebauten Richtlinien ausgeliefert, die häufige Agent-Fehlerszenarien abfangen. Jede Richtlinie wird bei einem bestimmten Hook-Ereignistyp und Tool-Namen ausgelöst. Neun Richtlinien akzeptieren Parameter, mit denen Sie ihr Verhalten anpassen können, ohne Code schreiben zu müssen. Vier Workflow-Richtlinien erzwingen eine Commit → Push → PR → CI-Pipeline, bevor Claude stoppt.
7
+ failproofai wird mit 30 integrierten Richtlinien geliefert, die häufige Fehlerquellen bei Agenten abdecken. Jede Richtlinie wird bei einem bestimmten Hook-Ereignistyp und Toolnamen ausgelöst. Neun Richtlinien akzeptieren Parameter, mit denen Sie ihr Verhalten anpassen können, ohne Code zu schreiben. Vier Workflow-Richtlinien erzwingen eine Commit → Push → PR → CI-Pipeline, bevor Claude anhält.
8
8
 
9
9
  ---
10
10
 
@@ -13,7 +13,7 @@ failproofai wird mit 30 eingebauten Richtlinien ausgeliefert, die häufige Agent
13
13
  Richtlinien sind in Kategorien gruppiert:
14
14
 
15
15
  | Kategorie | Richtlinien | Hook-Typ |
16
- |----------|----------|-----------|
16
+ |-----------|-------------|----------|
17
17
  | [Gefährliche Befehle](#dangerous-commands) | block-sudo, block-rm-rf, block-curl-pipe-sh, block-failproofai-commands | PreToolUse |
18
18
  | [Secrets (Sanitizer)](#secrets-sanitizers) | sanitize-jwt, sanitize-api-keys, sanitize-connection-strings, sanitize-private-key-content, sanitize-bearer-tokens | PostToolUse |
19
19
  | [Umgebung](#environment) | block-env-files, protect-env-vars | PreToolUse |
@@ -21,17 +21,18 @@ Richtlinien sind in Kategorien gruppiert:
21
21
  | [Git](#git) | block-push-master, block-work-on-main, block-force-push, warn-git-amend, warn-git-stash-drop, warn-all-files-staged | PreToolUse |
22
22
  | [Datenbank](#database) | warn-destructive-sql, warn-schema-alteration | PreToolUse |
23
23
  | [Warnungen](#warnings) | warn-large-file-write, warn-package-publish, warn-background-process, warn-global-package-install | PreToolUse |
24
+ | [Paketmanager](#package-managers) | prefer-package-manager | PreToolUse |
24
25
  | [Workflow](#workflow) | require-commit-before-stop, require-push-before-stop, require-pr-before-stop, require-ci-green-before-stop | Stop |
25
26
 
26
- - **`block-`** — verhindert, dass der Agent fortfährt.
27
+ - **`block-`** — verhindert, dass der Agent fortfahren kann.
27
28
  - **`warn-`** — gibt dem Agenten zusätzlichen Kontext, damit er sich selbst korrigieren kann.
28
29
  - **`sanitize-`** — bereinigt sensible Daten aus der Tool-Ausgabe, bevor der Agent sie sieht.
29
- - **`require-`** — blockiert das Stop-Ereignis, bis Bedingungen erfüllt sind.
30
+ - **`require-`** — blockiert das Stop-Ereignis, bis die Bedingungen erfüllt sind.
30
31
 
31
32
  ---
32
33
 
33
34
  <Tip>
34
- Jede Richtlinie unterstützt ein optionales `hint`-Feld in `policyParams`. Der Hinweis wird an die deny- oder instruct-Nachricht angehängt, die Claude sieht, und bietet umsetzbare Orientierung, ohne den Richtlinien-Code zu ändern. Funktioniert mit eingebauten, benutzerdefinierten und konventionsbasierten Richtlinien. Weitere Details unter [Konfiguration → hint](/de/configuration#hint-cross-cutting).
35
+ Jede Richtlinie unterstützt ein optionales `hint`-Feld in `policyParams`. Der Hinweis wird an die deny- oder instruct-Nachricht angehängt, die Claude sieht, und bietet umsetzbare Hinweise, ohne den Richtliniencode zu ändern. Funktioniert mit integrierten, benutzerdefinierten und konventionsbasierten Richtlinien. Weitere Informationen finden Sie unter [Konfiguration → hint](/de/configuration#hint-cross-cutting).
35
36
  </Tip>
36
37
 
37
38
  ---
@@ -45,12 +46,12 @@ Verhindert, dass Agenten Operationen ausführen, die schwer rückgängig zu mach
45
46
  **Ereignis:** PreToolUse (Bash)
46
47
  **Standard:** Verweigert jeden `sudo`-Befehl.
47
48
 
48
- Blockiert Aufrufe, die das Schlüsselwort `sudo` enthalten. Der Musterabgleich erfolgt auf geparsten Befehlstokens, nicht auf dem rohen String, um Umgehungen durch Shell-Operator-Injektion zu verhindern.
49
+ Blockiert Aufrufe, die das Schlüsselwort `sudo` enthalten. Die Mustererkennung erfolgt auf geparsten Befehls-Tokens, nicht auf dem rohen String, um Umgehungsversuche über Shell-Operator-Injection zu verhindern.
49
50
 
50
51
  **Parameter:**
51
52
 
52
- | Param | Typ | Standard | Beschreibung |
53
- |-------|------|---------|-------------|
53
+ | Parameter | Typ | Standard | Beschreibung |
54
+ |-----------|-----|----------|--------------|
54
55
  | `allowPatterns` | `string[]` | `[]` | Exakte Befehlspräfixe, die erlaubt sind. Jeder Eintrag wird gegen die geparsten argv-Tokens abgeglichen. |
55
56
 
56
57
  **Beispiel:**
@@ -68,7 +69,7 @@ Blockiert Aufrufe, die das Schlüsselwort `sudo` enthalten. Der Musterabgleich e
68
69
  Mit dieser Konfiguration ist `sudo systemctl status nginx` erlaubt, aber `sudo rm /etc/hosts` wird verweigert.
69
70
 
70
71
  <Note>
71
- Muster werden gegen geparste Tokens abgeglichen, nicht gegen den rohen Befehlsstring. Dies verhindert Umgehungen über angehängte Shell-Operatoren (z. B. `sudo systemctl status x; rm -rf /` stimmt nicht mit `sudo systemctl status *` überein).
72
+ Muster werden gegen geparste Tokens abgeglichen, nicht gegen den rohen Befehlsstring. Dies verhindert Umgehungsversuche über angehängte Shell-Operatoren (z. B. entspricht `sudo systemctl status x; rm -rf /` nicht `sudo systemctl status *`).
72
73
  </Note>
73
74
 
74
75
  ---
@@ -80,8 +81,8 @@ Muster werden gegen geparste Tokens abgeglichen, nicht gegen den rohen Befehlsst
80
81
 
81
82
  **Parameter:**
82
83
 
83
- | Param | Typ | Standard | Beschreibung |
84
- |-------|------|---------|-------------|
84
+ | Parameter | Typ | Standard | Beschreibung |
85
+ |-----------|-----|----------|--------------|
85
86
  | `allowPaths` | `string[]` | `[]` | Pfade, die sicher rekursiv gelöscht werden dürfen (z. B. `/tmp`). |
86
87
 
87
88
  **Beispiel:**
@@ -118,7 +119,7 @@ Keine Parameter.
118
119
 
119
120
  ## Secrets (Sanitizer)
120
121
 
121
- Verhindert, dass Agenten Anmeldeinformationen in ihren Kontext oder ihre Ausgabe leaken. Sanitizer-Richtlinien werden bei **PostToolUse**-Ereignissen ausgelöst. Wenn Claude einen Bash-Befehl ausführt, eine Datei liest oder ein beliebiges Tool aufruft, prüfen diese Richtlinien die Ausgabe, bevor sie an Claude zurückgegeben wird. Wird ein Secret-Muster erkannt, gibt die Richtlinie eine deny-Entscheidung zurück, die verhindert, dass die Ausgabe zurückgeleitet wird.
122
+ Verhindert, dass Agenten Zugangsdaten in ihren Kontext oder ihre Ausgabe weitergeben. Sanitizer-Richtlinien werden bei **PostToolUse**-Ereignissen ausgelöst. Wenn Claude einen Bash-Befehl ausführt, eine Datei liest oder ein beliebiges Tool aufruft, prüfen diese Richtlinien die Ausgabe, bevor sie an Claude zurückgegeben wird. Wird ein Secret-Muster erkannt, gibt die Richtlinie eine Deny-Entscheidung zurück, die verhindert, dass die Ausgabe weitergeleitet wird.
122
123
 
123
124
  ### `sanitize-jwt`
124
125
 
@@ -136,8 +137,8 @@ Keine Parameter.
136
137
 
137
138
  **Parameter:**
138
139
 
139
- | Param | Typ | Standard | Beschreibung |
140
- |-------|------|---------|-------------|
140
+ | Parameter | Typ | Standard | Beschreibung |
141
+ |-----------|-----|----------|--------------|
141
142
  | `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` | Zusätzliche Regex-Muster, die als Secrets behandelt werden sollen. |
142
143
 
143
144
  **Beispiel:**
@@ -160,7 +161,7 @@ Keine Parameter.
160
161
  ### `sanitize-connection-strings`
161
162
 
162
163
  **Ereignis:** PostToolUse (alle Tools)
163
- **Standard:** Schwärzt Datenbankverbindungsstrings, die eingebettete Anmeldeinformationen enthalten (z. B. `postgresql://user:password@host/db`).
164
+ **Standard:** Schwärzt Datenbankverbindungsstrings mit eingebetteten Zugangsdaten (z. B. `postgresql://user:password@host/db`).
164
165
 
165
166
  Keine Parameter.
166
167
 
@@ -178,7 +179,7 @@ Keine Parameter.
178
179
  ### `sanitize-bearer-tokens`
179
180
 
180
181
  **Ereignis:** PostToolUse (alle Tools)
181
- **Standard:** Schwärzt `Authorization: Bearer <token>`-Header, bei denen das Token 20 oder mehr Zeichen lang ist.
182
+ **Standard:** Schwärzt `Authorization: Bearer <token>`-Header, bei denen der Token 20 oder mehr Zeichen hat.
182
183
 
183
184
  Keine Parameter.
184
185
 
@@ -193,7 +194,7 @@ Schützt sensible Umgebungskonfigurationen davor, von Agenten gelesen oder offen
193
194
  **Ereignis:** PreToolUse (Bash, Read)
194
195
  **Standard:** Verweigert das Lesen von `.env`-Dateien über `cat .env`, `Read`-Tool-Aufrufe mit `.env` als Dateipfad usw.
195
196
 
196
- Blockiert nicht `.envrc` oder andere umgebungsbezogene Dateien – nur Dateien, die exakt `.env` heißen.
197
+ Blockiert keine `.envrc`- oder anderen umgebungsnahen Dateien – nur Dateien, die exakt `.env` heißen.
197
198
 
198
199
  Keine Parameter.
199
200
 
@@ -210,18 +211,18 @@ Keine Parameter.
210
211
 
211
212
  ## Dateizugriff
212
213
 
213
- Hält Agenten innerhalb der Projektgrenzen und fern von sensiblen Dateien.
214
+ Hält Agenten innerhalb der Projektgrenzen und fernab von sensiblen Dateien.
214
215
 
215
216
  ### `block-read-outside-cwd`
216
217
 
217
218
  **Ereignis:** PreToolUse (Read, Bash)
218
- **Standard:** Verweigert das Lesen von Dateien außerhalb des aktuellen Arbeitsverzeichnisses (dem Projektstamm).
219
+ **Standard:** Verweigert das Lesen von Dateien außerhalb des aktuellen Arbeitsverzeichnisses (des Projektstamms).
219
220
 
220
221
  **Parameter:**
221
222
 
222
- | Param | Typ | Standard | Beschreibung |
223
- |-------|------|---------|-------------|
224
- | `allowPaths` | `string[]` | `[]` | Absolute Pfadpräfixe, die erlaubt sind, auch wenn sie außerhalb des cwd liegen. |
223
+ | Parameter | Typ | Standard | Beschreibung |
224
+ |-----------|-----|----------|--------------|
225
+ | `allowPaths` | `string[]` | `[]` | Absolute Pfadpräfixe, die auch außerhalb des aktuellen Verzeichnisses erlaubt sind. |
225
226
 
226
227
  **Beispiel:**
227
228
 
@@ -244,9 +245,9 @@ Hält Agenten innerhalb der Projektgrenzen und fern von sensiblen Dateien.
244
245
 
245
246
  **Parameter:**
246
247
 
247
- | Param | Typ | Standard | Beschreibung |
248
- |-------|------|---------|-------------|
249
- | `additionalPatterns` | `string[]` | `[]` | Zusätzliche Dateinamen-Muster (Glob-Stil) zum Blockieren. |
248
+ | Parameter | Typ | Standard | Beschreibung |
249
+ |-----------|-----|----------|--------------|
250
+ | `additionalPatterns` | `string[]` | `[]` | Zusätzliche Dateinamenmuster (Glob-Format) zum Blockieren. |
250
251
 
251
252
  **Beispiel:**
252
253
 
@@ -273,9 +274,9 @@ Verhindert versehentliche Pushes, Force-Pushes und Branch-Fehler, die schwer rü
273
274
 
274
275
  **Parameter:**
275
276
 
276
- | Param | Typ | Standard | Beschreibung |
277
- |-------|------|---------|-------------|
278
- | `protectedBranches` | `string[]` | `["main", "master"]` | Branch-Namen, in die nicht direkt gepusht werden darf. |
277
+ | Parameter | Typ | Standard | Beschreibung |
278
+ |-----------|-----|----------|--------------|
279
+ | `protectedBranches` | `string[]` | `["main", "master"]` | Branch-Namen, auf die nicht direkt gepusht werden darf. |
279
280
 
280
281
  **Beispiel:**
281
282
 
@@ -290,7 +291,7 @@ Verhindert versehentliche Pushes, Force-Pushes und Branch-Fehler, die schwer rü
290
291
  ```
291
292
 
292
293
  <Tip>
293
- Um Pushes in alle Branches zu erlauben (und diese Richtlinie effektiv zu deaktivieren, ohne sie aus `enabledPolicies` zu entfernen), setzen Sie `protectedBranches: []`.
294
+ Um das Pushen auf alle Branches zu erlauben (und diese Richtlinie damit effektiv zu deaktivieren, ohne sie aus `enabledPolicies` zu entfernen), setzen Sie `protectedBranches: []`.
294
295
  </Tip>
295
296
 
296
297
  ---
@@ -302,8 +303,8 @@ Um Pushes in alle Branches zu erlauben (und diese Richtlinie effektiv zu deaktiv
302
303
 
303
304
  **Parameter:**
304
305
 
305
- | Param | Typ | Standard | Beschreibung |
306
- |-------|------|---------|-------------|
306
+ | Parameter | Typ | Standard | Beschreibung |
307
+ |-----------|-----|----------|--------------|
307
308
  | `protectedBranches` | `string[]` | `["main", "master"]` | Branch-Namen, die nicht direkt ausgecheckt werden dürfen. |
308
309
 
309
310
  ---
@@ -330,7 +331,7 @@ Keine richtlinienspezifischen Parameter. Verwenden Sie das übergreifende [`hint
330
331
  ### `warn-git-amend`
331
332
 
332
333
  **Ereignis:** PreToolUse (Bash)
333
- **Standard:** Weist Claude an, beim Ausführen von `git commit --amend` vorsichtig vorzugehen. Blockiert den Befehl nicht.
334
+ **Standard:** Weist Claude an, vorsichtig vorzugehen, wenn `git commit --amend` ausgeführt wird. Blockiert den Befehl nicht.
334
335
 
335
336
  Keine Parameter.
336
337
 
@@ -339,7 +340,7 @@ Keine Parameter.
339
340
  ### `warn-git-stash-drop`
340
341
 
341
342
  **Ereignis:** PreToolUse (Bash)
342
- **Standard:** Weist Claude an, vor dem Ausführen von `git stash drop` zu bestätigen. Blockiert den Befehl nicht.
343
+ **Standard:** Weist Claude an, zu bestätigen, bevor `git stash drop` ausgeführt wird. Blockiert den Befehl nicht.
343
344
 
344
345
  Keine Parameter.
345
346
 
@@ -348,7 +349,7 @@ Keine Parameter.
348
349
  ### `warn-all-files-staged`
349
350
 
350
351
  **Ereignis:** PreToolUse (Bash)
351
- **Standard:** Weist Claude an, zu überprüfen, was es staged, wenn es `git add -A` oder `git add .` ausführt. Blockiert den Befehl nicht.
352
+ **Standard:** Weist Claude an, zu überprüfen, was es staged, wenn `git add -A` oder `git add .` ausgeführt wird. Blockiert den Befehl nicht.
352
353
 
353
354
  Keine Parameter.
354
355
 
@@ -356,12 +357,12 @@ Keine Parameter.
356
357
 
357
358
  ## Datenbank
358
359
 
359
- Fängt destruktive SQL-Operationen ab, bevor sie gegen Ihre Datenbank ausgeführt werden.
360
+ Erkennt destruktive SQL-Operationen, bevor sie gegen Ihre Datenbank ausgeführt werden.
360
361
 
361
362
  ### `warn-destructive-sql`
362
363
 
363
364
  **Ereignis:** PreToolUse (Bash)
364
- **Standard:** Weist Claude an, zu bestätigen, bevor SQL ausgeführt wird, das `DROP TABLE`, `DROP DATABASE` oder `DELETE` ohne eine `WHERE`-Klausel enthält.
365
+ **Standard:** Weist Claude an, zu bestätigen, bevor SQL mit `DROP TABLE`, `DROP DATABASE` oder `DELETE` ohne `WHERE`-Klausel ausgeführt wird.
365
366
 
366
367
  Keine Parameter.
367
368
 
@@ -383,12 +384,12 @@ Gibt Agenten zusätzlichen Kontext vor potenziell riskanten, aber nicht destrukt
383
384
  ### `warn-large-file-write`
384
385
 
385
386
  **Ereignis:** PreToolUse (Write)
386
- **Standard:** Weist Claude an, zu bestätigen, bevor Dateien größer als 1024 KB geschrieben werden.
387
+ **Standard:** Weist Claude an, zu bestätigen, bevor Dateien geschrieben werden, die größer als 1024 KB sind.
387
388
 
388
389
  **Parameter:**
389
390
 
390
- | Param | Typ | Standard | Beschreibung |
391
- |-------|------|---------|-------------|
391
+ | Parameter | Typ | Standard | Beschreibung |
392
+ |-----------|-----|----------|--------------|
392
393
  | `thresholdKb` | `number` | `1024` | Dateigrößenschwellenwert in Kilobyte, ab dem eine Warnung ausgegeben wird. |
393
394
 
394
395
  **Beispiel:**
@@ -404,7 +405,7 @@ Gibt Agenten zusätzlichen Kontext vor potenziell riskanten, aber nicht destrukt
404
405
  ```
405
406
 
406
407
  <Note>
407
- Der Hook-Handler erzwingt ein stdin-Limit von 1 MB für Payloads. Um diese Richtlinie mit kleinen Inhalten zu testen, setzen Sie `thresholdKb` auf einen Wert deutlich unter 1024.
408
+ Der Hook-Handler erzwingt ein 1-MB-stdin-Limit für Payloads. Um diese Richtlinie mit kleinen Inhalten zu testen, setzen Sie `thresholdKb` auf einen Wert deutlich unter 1024.
408
409
  </Note>
409
410
 
410
411
  ---
@@ -436,6 +437,42 @@ Keine Parameter.
436
437
 
437
438
  ---
438
439
 
440
+ ## Paketmanager
441
+
442
+ Legt fest, welche Paketmanager der Agent verwenden darf.
443
+
444
+ ### `prefer-package-manager`
445
+
446
+ **Ereignis:** PreToolUse (Bash)
447
+ **Standard:** Deaktiviert. Wenn aktiviert, blockiert es jeden Paketmanager-Befehl, der nicht in der `allowed`-Liste steht, und weist Claude an, den Befehl mit einem erlaubten Manager umzuschreiben.
448
+
449
+ Erkennt: pip, pip3, python -m pip, npm, npx, yarn, pnpm, pnpx, bun, bunx, uv, poetry, pipenv, conda, cargo.
450
+
451
+ | Parameter | Typ | Standard | Beschreibung |
452
+ |-----------|-----|----------|--------------|
453
+ | `allowed` | string[] | `[]` | Erlaubte Paketmanager-Namen. Jeder erkannte Manager, der nicht in dieser Liste steht, wird blockiert. Bei leer ist die Richtlinie wirkungslos. |
454
+ | `blocked` | string[] | `[]` | Zusätzliche Manager-Namen, die über die integrierte Liste hinaus blockiert werden sollen (z. B. `['pdm', 'pipx']`). |
455
+
456
+ Die integrierte Sperrliste umfasst: pip, pip3, npm, npx, yarn, pnpm, pnpx, bun, bunx, uv, poetry, pipenv, conda, cargo. Verwenden Sie `blocked`, um Manager hinzuzufügen, die nicht in dieser Liste enthalten sind.
457
+
458
+ **Beispielkonfiguration:**
459
+
460
+ ```json
461
+ {
462
+ "enabledPolicies": ["prefer-package-manager"],
463
+ "policyParams": {
464
+ "prefer-package-manager": {
465
+ "allowed": ["uv", "bun"],
466
+ "blocked": ["pdm", "pipx"]
467
+ }
468
+ }
469
+ }
470
+ ```
471
+
472
+ Mit dieser Konfiguration werden sowohl `pip install flask` als auch `pdm install flask` verweigert, mit einer Meldung, die Claude anweist, stattdessen `uv` oder `bun` zu verwenden. Befehle wie `uv pip install flask` sind erlaubt, da `uv` in der Allowlist steht und zuerst geprüft wird.
473
+
474
+ ---
475
+
439
476
  ## KI-Verhalten
440
477
 
441
478
  Erkennt, wenn Agenten feststecken oder sich unerwartet verhalten.
@@ -443,7 +480,7 @@ Erkennt, wenn Agenten feststecken oder sich unerwartet verhalten.
443
480
  ### `warn-repeated-tool-calls`
444
481
 
445
482
  **Ereignis:** PreToolUse (alle Tools)
446
- **Standard:** Weist Claude an, zu überdenken, wenn dasselbe Tool 3+ mal mit identischen Parametern aufgerufen wird – ein häufiges Zeichen dafür, dass der Agent in einer Schleife feststeckt.
483
+ **Standard:** Weist Claude an, zu überdenken, wenn dasselbe Tool 3 oder mehr Mal mit identischen Parametern aufgerufen wird – ein häufiges Zeichen dafür, dass der Agent in einer Schleife feststeckt.
447
484
 
448
485
  Keine Parameter.
449
486
 
@@ -451,14 +488,14 @@ Keine Parameter.
451
488
 
452
489
  ## Workflow
453
490
 
454
- Erzwingt einen disziplinierten Workflow am Sitzungsende. Diese Richtlinien werden beim **Stop**-Ereignis ausgelöst und verweigern Claude das Stoppen, bis jede Bedingung erfüllt ist. Sie folgen einer natürlichen Abhängigkeitskette: Commit → Push → PR → CI. Wenn eine Richtlinie verweigert, werden spätere Richtlinien in der Kette übersprungen (deny schließt kurz).
491
+ Erzwingt einen disziplinierten Sitzungsabschluss-Workflow. Diese Richtlinien werden beim **Stop**-Ereignis ausgelöst und verhindern, dass Claude anhält, bis jede Bedingung erfüllt ist. Sie folgen einer natürlichen Abhängigkeitskette: Commit → Push → PR → CI. Wenn eine Richtlinie verweigert, werden spätere Richtlinien in der Kette übersprungen (Deny schließt kurz).
455
492
 
456
- Alle Workflow-Richtlinien sind **fail-open**: Wenn das erforderliche Tool nicht verfügbar ist (z. B. `gh` nicht installiert, kein Git-Remote), erlaubt die Richtlinie den Vorgang mit einer informativen Meldung, die erklärt, warum die Prüfung übersprungen wurde.
493
+ Alle Workflow-Richtlinien sind **fail-open**: Wenn das erforderliche Tool nicht verfügbar ist (z. B. `gh` nicht installiert, kein Git-Remote vorhanden), lässt die Richtlinie den Vorgang zu und gibt eine informative Nachricht aus, warum die Prüfung übersprungen wurde.
457
494
 
458
495
  ### `require-commit-before-stop`
459
496
 
460
497
  **Ereignis:** Stop
461
- **Standard:** Verweigert das Stoppen, wenn es nicht committete Änderungen gibt (geänderte, gestagete oder nicht verfolgte Dateien). Gibt eine informative Meldung zurück, wenn das Arbeitsverzeichnis sauber ist.
498
+ **Standard:** Verweigert das Anhalten, wenn uncommittete Änderungen vorhanden sind (geänderte, gestagte oder nicht verfolgte Dateien). Gibt eine informative Nachricht zurück, wenn das Arbeitsverzeichnis sauber ist.
462
499
 
463
500
  Keine Parameter.
464
501
 
@@ -467,13 +504,13 @@ Keine Parameter.
467
504
  ### `require-push-before-stop`
468
505
 
469
506
  **Ereignis:** Stop
470
- **Standard:** Verweigert das Stoppen, wenn es nicht gepushte Commits gibt oder der aktuelle Branch keinen Remote-Tracking-Branch hat. Schlägt `git push -u` vor, um bei Bedarf einen Tracking-Branch zu erstellen. Fail-open, wenn kein Remote konfiguriert ist.
507
+ **Standard:** Verweigert das Anhalten, wenn es nicht gepushte Commits gibt oder wenn der aktuelle Branch keinen Remote-Tracking-Branch hat. Schlägt `git push -u` vor, um bei Bedarf einen Tracking-Branch zu erstellen. Schlägt fehl-offen, wenn kein Remote konfiguriert ist.
471
508
 
472
509
  **Parameter:**
473
510
 
474
- | Param | Typ | Standard | Beschreibung |
475
- |-------|------|---------|-------------|
476
- | `remote` | `string` | `"origin"` | Remote-Name, an den gepusht werden soll. |
511
+ | Parameter | Typ | Standard | Beschreibung |
512
+ |-----------|-----|----------|--------------|
513
+ | `remote` | `string` | `"origin"` | Remote-Name, auf den gepusht werden soll. |
477
514
 
478
515
  **Beispiel:**
479
516
 
@@ -492,14 +529,14 @@ Keine Parameter.
492
529
  ### `require-pr-before-stop`
493
530
 
494
531
  **Ereignis:** Stop
495
- **Standard:** Verweigert das Stoppen, wenn für den aktuellen Branch kein Pull Request existiert oder der vorhandene PR geschlossen/gemergt ist. Weist Claude an, einen PR mit `gh pr create` zu erstellen.
532
+ **Standard:** Verweigert das Anhalten, wenn für den aktuellen Branch kein Pull Request existiert oder wenn der vorhandene PR geschlossen/gemergt wurde. Weist Claude an, mit `gh pr create` einen PR zu erstellen.
496
533
 
497
534
  Keine Parameter.
498
535
 
499
536
  <Note>
500
- Diese Richtlinie erfordert, dass die [GitHub CLI](https://cli.github.com/) (`gh`) installiert und authentifiziert ist.
537
+ Diese Richtlinie erfordert, dass [GitHub CLI](https://cli.github.com/) (`gh`) installiert und authentifiziert ist.
501
538
  Führen Sie `gh auth login` mit einem Personal Access Token aus, das den `repo`-Scope für Lesezugriff auf
502
- Pull Requests hat. Wenn `gh` nicht installiert oder nicht authentifiziert ist, schlägt die Richtlinie offen fehl und meldet den Grund an Claude.
539
+ Pull Requests hat. Wenn `gh` nicht installiert oder nicht authentifiziert ist, schlägt die Richtlinie fail-open fehl und meldet den Grund an Claude.
503
540
  </Note>
504
541
 
505
542
  ---
@@ -507,14 +544,14 @@ Pull Requests hat. Wenn `gh` nicht installiert oder nicht authentifiziert ist, s
507
544
  ### `require-ci-green-before-stop`
508
545
 
509
546
  **Ereignis:** Stop
510
- **Standard:** Verweigert das Stoppen, wenn CI-Prüfungen fehlschlagen oder auf dem aktuellen Branch noch laufen. Prüft sowohl GitHub Actions Workflow-Läufe als auch Drittanbieter-Bot-Prüfungen (z. B. CodeRabbit, SonarCloud, Codecov). Behandelt `skipped`-Ergebnisse als Erfolg. Gibt eine informative Meldung zurück, wenn alle Prüfungen bestanden sind.
547
+ **Standard:** Verweigert das Anhalten, wenn CI-Prüfungen für den aktuellen Branch fehlschlagen oder noch laufen. Prüft sowohl GitHub Actions-Workflow-Ausführungen als auch Drittanbieter-Bot-Prüfungen (z. B. CodeRabbit, SonarCloud, Codecov). Behandelt `skipped`-Abschlüsse als Erfolg. Gibt eine informative Nachricht zurück, wenn alle Prüfungen bestanden sind.
511
548
 
512
549
  Keine Parameter.
513
550
 
514
551
  <Note>
515
- Diese Richtlinie erfordert, dass die [GitHub CLI](https://cli.github.com/) (`gh`) installiert und authentifiziert ist.
552
+ Diese Richtlinie erfordert, dass [GitHub CLI](https://cli.github.com/) (`gh`) installiert und authentifiziert ist.
516
553
  Führen Sie `gh auth login` mit einem Personal Access Token aus, das den `repo`-Scope für Lesezugriff auf
517
- Actions Workflow-Läufe und die Checks API hat. Wenn `gh` nicht installiert oder nicht authentifiziert ist, schlägt die Richtlinie offen fehl und meldet den Grund an Claude.
554
+ Actions-Workflow-Ausführungen und die Checks API hat. Wenn `gh` nicht installiert oder nicht authentifiziert ist, schlägt die Richtlinie fail-open fehl und meldet den Grund an Claude.
518
555
  </Note>
519
556
 
520
557
  ---