الاستخدام
كتابة القواعد
أنشئ قواعد سلوك Apothem وحدِّد نطاقها وصُنها.
القواعد هي ملفّات Markdown في src/apothem/rules/ بامتداد
.md.
الـfrontmatter الخاص بالقاعدة
---
name: "..."
description: "..."
pathFilter: "" # empty string for always-on; a glob for path-filtered
alwaysApply: true # true for always-on; false for path-filtered
---نطاقات القاعدة
| النطاق | متى يُطبَّق |
|---|---|
always-on | كلّ جلسة، كلّ ملف |
path-filtered | فقط عندما يطابق الملفّ النشط path-filter |
operator-selected | يُفعِّلها المُشغِّل صراحةً في settings.json |
مثال على قاعدة
---
name: "python-conventions"
description: "Python style conventions for this project"
pathFilter: "**/*.py"
alwaysApply: false
---
# Python conventions
- Use type annotations on all public functions.
- Maximum line length: 88 characters.
- Prefer explicit over implicit.تطبيق القواعد على الـharnesses
بعد كتابة قاعدة، حدِّث كلّ محوِّل harness مُثبَّت. شغِّل
apothem harnesses list لرؤية المجموعة المُثبَّتة، ثم استدعِ
update مرّة واحدة لكلّ harness:
apothem update --harness claude-code
apothem update --harness cursorالتحقّق من القواعد
python -m apothem.conformity.gate --check frontmatter