उदाहरण
कस्टम नियम
अपनी परियोजना के लिए एक कस्टम सदैव-सक्रिय नियम लिखना।
यह उदाहरण एक परियोजना-विशिष्ट सदैव-सक्रिय नियम जोड़ता है जो सभी फ़ाइलों में एक नामकरण कन्वेंशन लागू करता है।
नियम फ़ाइल
---
name: "kebab-filenames"
description: "Enforce kebab-case filenames in the src/ tree"
pathFilter: ""
alwaysApply: true
---
# Kebab-case filenames
All new files created under `src/` MUST use kebab-case naming
(lowercase letters, digits, and hyphens only — no underscores,
no camelCase, no PascalCase).
**Correct:** `src/styles/button-group.css`, `src/components/nav-bar.css`
**Incorrect:** `src/styles/buttonGroup.css`, `src/components/NavBar.css`
When in doubt, err on the side of more hyphens.इसे अपने हार्नेस इंस्टॉल रूट के भीतर rules/kebab-filenames.md में सहेजें (Claude Code अडैप्टर के लिए ~/.claude/; अन्यथा हार्नेस-नेटिव पथ प्रतिस्थापित करें)।
नियम सही रूप में बना है, इसकी पुष्टि करें
अभी लिखी गई नियम फ़ाइल पर frontmatter वैलिडेटर चलाएँ। Apothem चेकआउट से पहली कमांड का उपयोग करें, जहाँ PYTHONPATH=src पैकेज को आयात-योग्य बनाता है। स्क्रिप्ट इंस्टॉल के बाद दूसरी कमांड का उपयोग करें, जहाँ स्रोत $HOME/.apothem/src के अंतर्गत रहता है:
# From an Apothem checkout
PYTHONPATH=src python -m apothem.conformity.gate --check frontmatter-grep ~/.claude/rules/kebab-filenames.md
# After a script install
PYTHONPATH="$HOME/.apothem/src" python -m apothem.conformity.gate --check frontmatter-grep ~/.claude/rules/kebab-filenames.mdसही रूप में बना नियम एक साफ़ पास रिपोर्ट करता है:
{
"orchestrator": "conformity-gate",
"passed": true,
"grep_count": 1
}हार्नेस में प्रसारित करें
हर इंस्टॉल किए गए हार्नेस के लिए अपडेट कमांड एक बार चलाएँ:
apothem update --harness claude-code
apothem update --harness cursor --project /path/to/project