Skip to content
Apothem
الاستخدام

كتابة القواعد

أنشئ قواعد سلوك 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

On this page