Skip to content
Apothem
Penggunaan

Menulis aturan

Tulis, batasi cakupan, dan pelihara aturan perilaku Apothem.

Aturan adalah berkas Markdown di src/apothem/rules/ dengan ekstensi .md.

Frontmatter aturan

---
name: "..."
description: "..."
pathFilter: ""            # empty string for always-on; a glob for path-filtered
alwaysApply: true         # true for always-on; false for path-filtered
---

Cakupan aturan

CakupanKapan diterapkan
always-onSetiap sesi, setiap berkas
path-filteredHanya ketika berkas aktif cocok dengan path-filter
operator-selectedOperator mengaktifkannya secara eksplisit di settings.json

Contoh aturan

---
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.

Menerapkan aturan ke harness

Setelah menulis aturan, perbarui setiap adapter harness yang terpasang. Jalankan apothem harnesses list untuk melihat himpunan yang terpasang, lalu panggil update sekali untuk tiap harness:

apothem update --harness claude-code
apothem update --harness cursor

Validasi aturan

python -m apothem.conformity.gate --check frontmatter

On this page