Skip to content
Apothem
अनुरूपता गेट

अनुरूपता गेट

Apothem अनुरूपता गेट — पंद्रह-बार प्री-एमिशन गेट (M1-M15) का यांत्रिक अंश, जिसे हर उत्सर्जित आर्टिफ़ैक्ट को पास करना होगा।

पंद्रह बार

बारIDमैंडेटजाँच वर्गविफलता → कार्रवाई
1M1होस्ट-प्रोजेक्ट अज्ञेयतातर्क-आधारितहोस्ट परिपाटियों से मेल खाने के लिए संशोधित करें
2M2संपादकीय अनुशासन (प्रकटीकरण बही)तर्क-आधारितप्रकटीकरण चिह्न जोड़ें
3M3दस गुणवत्ता आयामयांत्रिक + तर्क-आधारितविफल आयामों पर संशोधित करें
4M4स्व-अनुप्रयोग (सत्यापन ब्लॉक मौजूद)तर्क-आधारितसत्यापन ब्लॉक दर्ज करें
5M5प्राधिकार सिद्धांत (कोई गढ़ी हुई पहचान / एंडपॉइंट / सीक्रेट नहीं)यांत्रिकपूछताछ की ओर भेजें
6M6विशेषज्ञता समावेशन (उजागर की गई कमियाँ)तर्क-आधारितकमियाँ उजागर करें; परिष्कारों का हवाला दें
7M7विकल्प एनोटेशन (अनुशंसित मार्कर + निर्णायक कारक का औचित्य)यांत्रिकविकल्प समुच्चयों को एनोटेट करें
8M8निश्चयात्मकता (निर्देशात्मक गद्य में कोई ढुलमुल भाषा नहीं)यांत्रिकढुलमुल कथनों को शर्त-आधारित कथनों में बदलें
9M9दृश्य उत्तोलन (संरचनात्मक विषय आरेख वहन करते हैं)यांत्रिक + तर्क-आधारितआरेख बनाएँ / ताज़ा करें
10M10द्विदिश बंधन (पारस्परिक पश्च-संकेतक बंद)यांत्रिकअर्ध-किनारे बंद करें
11M11एजाइल स्प्रिंट (Goal / Backlog / DoR / DoD / Review / Retrospective)तर्क-आधारितस्प्रिंट के रूप में पुनर्गठित करें
12M12चरण रिपोर्टिंग और कैनोनिकल लेआउटयांत्रिक + तर्क-आधारितरोलअप लिखें; कैनोनिकल लेआउट में स्थानांतरित करें
13M13कोड शिल्प (लिंट / फ़ॉर्मैट / टाइप-जाँच; मैजिक नंबर; bare-except)यांत्रिकप्रति-भाषा कोड-शिल्प नियम लागू करें
14M14प्रणालीगतता (अपस्ट्रीम / डाउनस्ट्रीम / समकक्ष / प्रवर्तक घोषित करता है)यांत्रिक + तर्क-आधारितघोषित करें; रजिस्ट्रियों में अनुक्रमित करें
15M15प्रोडक्शन-तैयार (टेस्ट + दस्तावेज़ + CHANGELOG + अनुरूप कमिट + CI हरा + semver-स्थिरता)यांत्रिक + तर्क-आधारितलुप्त सतहें जोड़ें

गेट केवल मशीन-जाँच-योग्य वैलिडेटर चलाता है। तर्क-आधारित बार जिस तर्क-आधारित निर्णय की माँग करते हैं, और प्रत्येक यांत्रिक + तर्क-आधारित बार का तर्क-आधारित अंश, उसका मूल्यांकन समीक्षा में होता है।

गंभीरता सीढ़ी

गेट में गंभीर, महत्वपूर्ण या परामर्शी स्तर की कोई सीढ़ी नहीं है, और दो-निष्कर्ष की कोई सीमा नहीं है। --strict (या APOTHEM_CONFORMITY_STRICT=1) के बिना गेट निष्कर्ष रिपोर्ट करता है और 0 के साथ बाहर निकलता है। --strict के साथ, एकल-फ़ाइल या हुक जाँच किसी भी मैचर के विफल होने पर 2 के साथ बाहर निकलती है, और कॉर्पस रन (--all या --all-perwrite) जब कोई ब्लॉकिंग वैलिडेटर या मैचर विफल होता है तो 2 के साथ बाहर निकलता है; परामर्शी निष्कर्ष केवल रिपोर्ट किए जाते हैं। इंस्टॉल किया गया Write/Edit हुक --strict पास नहीं करता, इसलिए वह निष्कर्ष रिपोर्ट करता है और लेखन आगे बढ़ता है, जब तक उसके एनवायरनमेंट में APOTHEM_CONFORMITY_STRICT=1 सेट न हो।

वैलिडेटर

यांत्रिक अंश src/apothem/conformity/ में रहता है, और src/apothem/conformity/gate.py इसका संचालन करता है। प्रत्येक वैलिडेटर तीन में से किसी एक तरीके से चलता है:

  • per-write: हर लंबित लेखन पर (--hook), या --all-perwrite के साथ हर ट्रैक की गई फ़ाइल पर।
  • standalone: --all के साथ पूरी रिपॉज़िटरी पर, या --check <name> के साथ एक-एक करके।
  • change-set: किसी स्टेज किए गए डिफ़ के विरुद्ध, सीधे python -m apothem.conformity.semver_stability_grep --staged के रूप में चलाया जाता है, गेट के माध्यम से नहीं।

नीचे दी गई तालिका वैलिडेटर मॉड्यूल से उत्पन्न होती है।

The conformity package ships 54 validators: 22 per-write, 31 standalone and 1 change-set. The gate registers the per-write and standalone ones.

ValidatorRunsRule anchorWhat it checks
agent-capability-grepstandaloneagent-capability-discipline (per-harness capability matrix)Verify every harness declares its agentic-capability matrix.
agents-md-coverage-grepstandalonerules/agents-md-convention.mdFlag stale agent-companion files under the root-only AGENTS.md convention.
agnosticism-grepstandalonerules/agnostic-posture.md §3 (harness neutrality) + §1 (default-off)Flag harness bias and re-introduced enforcement presets in shipped surfaces.
always-on-budget-grepper-writeD1 token-budget-discipline §Always-on body budgetBody-budget conformity matcher for always-on rules. Pointed at a rules directory it also holds the loaded always-on set and the rule index to byte ceilings.
bare-except-grepper-writeM13.3 error handlingFlag bare except clauses without typed exceptions or re-raise.
binding-five-direction-grepstandaloneM10 bidirectional-binding §1 (five-direction Bindings section)Require the five-direction Bindings section on every rule, command, agent, and skill.
binding-reciprocity-corpus-grepstandaloneM10 bidirectional-binding §2 (↔ self-reciprocal)Cross-file binding-reciprocity corpus walk — the ↔-symmetric half-edge check.
binding-reciprocity-grepper-writeM10 bidirectional-binding §NotationFlag binding declarations using non-canonical arrow notation.
brand-mark-grepper-writerules/plain-language.md (brand-mark display/identifier casing)Flag brand-mark display/identifier form drift on brand-touched surfaces.
commented-out-code-grepper-writeM13.1 why-not-what commentsFlag substantial commented-out code blocks left in source.
completion-claim-grepper-writerules/session-closure.md (verifiable-close output honesty)Flag unsupported completion / guarantee claims in cohort prose.
conventional-commit-grepstandaloneCLAUDE.md Coding Conventions — Conventional CommitsFlag HEAD commit messages that drift from the Conventional-Commits grammar.
copilot-instructions-presence-grepper-write—GitHub Copilot surface presence check.
cross-platform-matrix-grepstandalonecross-platform OS x Python CI matrixVerify CI declares a cross-platform OS x Python matrix.
determinism-grepstandalonerules/determinism.mdProve every command and skill surface has a deterministic output shape.
diagram-staleness-grepper-writeM9 visual-leverage §FidelityFlag diagrams whose verification date is missing or stale.
dynamism-grepstandalonerules/dynamism.md (static-version embeds)Flag static-string version embeds in dynamism-required surfaces.
editorconfig-presence-grepstandalonesupply-chain SOTA-rigor §editorconfigVerify a canonical .editorconfig is present at the project root.
file-header-grepper-write—Authorship-header presence and canonical-form check.
freshness-token-grepstandalonerules/freshness-facade.mdFlag freshness-narrative phrases on shipped public surfaces.
frontmatter-grepper-writethe per-class frontmatter JSON Schemas (src/apothem/schemas/)Validate per-artifact-class YAML frontmatter against required-key sets.
frontmatter-value-grepstandaloneper-class JSON Schema enum/pattern value constraintsValidate frontmatter VALUES against the per-class JSON Schema enum/pattern constraints.
gate-evidence-grepstandalonecommands/plan-execute.md Gate evidence; rules/pre-emission-gate-bars.md section 2 (attestation schema)Advisory: flag plan-suite gate claims that lack a command, an exit status or output, and a HEAD SHA beside them, and fifteen-bar attestations that omit a field of the rule's schema.
gitattributes-presence-grepstandalonesupply-chain .gitattributes contractVerify the repo-root .gitattributes carries the canonical contract.
harden-runner-grepstandaloneharden-runner egress baselineVerify every workflow job opens with a conformant harden-runner step.
hedging-grepper-writeM8 definitiveness §HedgingFlag hedging vocabulary in prescriptive contexts.
license-author-consistency-grepper-write—LICENSE author-identity presence check.
link-checkper-writerules/code-craft-markdown.md §6 Link DisciplineValidate Markdown internal links against the on-disk reference graph.
magic-number-grepper-writeM13.10 magic numbersFlag magic numbers in source code.
multi-surface-coherence-grepper-write—Shared-claim coherence across AI-conventions surfaces.
naming-grepstandaloneCLAUDE.md Coding Conventions (kebab-case naming)Validate filesystem paths against the canonical naming convention.
no-global-plans-grepstandaloneCLAUDE.md Plans Discipline (no global plans)Walk the git index for tracked plans paths; fail when found.
no-toplevel-docs-grepstandalonesingle-source-of-truth (docs live in site/, not root docs/)Fail when a top-level docs/ directory exists at the repository root.
oidc-trusted-publishing-grepstandaloneOIDC trusted publishingVerify release workflows use OIDC trusted publishing.
option-annotation-grepper-writeM7 option-annotation (H6 per-option bind)Enforce the per-option Recommended label-to-body bind (H6).
orphan-output-grepper-writeM12 canonical-layout + M14 systemicityFlag artifacts emitted to non-canonical locations or without provenance.
permissions-minimum-scope-grepstandaloneminimum-scope workflow permissionsVerify every GitHub Actions workflow declares a minimum-scope permissions: block.
plain-language-grepstandalonerules/plain-language.md — user-facing proseFlag mechanistic / harness-internal vocabulary in user-facing prose.
plan-next-step-consistency-grepstandalonerules/recommend-next-step.mdAdvisory: flag plan-suite infra files whose Recommended-Next-Step footer drifts from the suite's recorded next pipeline stage.
plan-suite-structure-grepstandalonecontext-management-scratch 2 (suite-locality + closed vocab) + canonical-layout-reporting-tiers 2.1 (numeric-prefix discipline)Validate plan-suite structure: suite-locality, closed vocab, numeric prefix.
plans-discipline-language-grepstandaloneCLAUDE.md Plans Discipline (multi-surface language)Verify the canonical Plans Discipline language reaches every required surface.
production-ready-pr-grepper-writeM15 production-ready §Same-change-setFlag commits whose change-set lacks the production-ready four-class shape.
recommend-next-step-grepstandalonerules/recommend-next-step.mdVerify every command file carries a ## Recommended Next Step block.
redundancy-grepstandalonerules/operational-mandates.md §CM-7 coherent-product non-redundancyFlag substantively-duplicated paragraphs across the governed corpus.
reference-token-grepstandalonerules/own-voice-reimplementation.mdFlag leaked reference-platform branding tokens on authored surfaces.
registry-capability-consistency-grepstandalonerules/agent-capability-discipline.md — registry capability cells backed by evidenceFlag registry capability cells not backed by install / materializer / projection evidence.
secret-leak-grepper-writeM13.8 security + M15 production-readyBlock emission of artifacts containing hardcoded credentials.
semver-stability-grepchange-setM15 semver-stabilitySemver stability matcher (M15 mechanical fraction).
smoke-install-grepstandaloneproduction-ready section 8.1 paired install scriptsSmoke-test the paired install scripts at the repository root.
static-version-grepstandalonerules/dynamism.md §static-version-resolutionVerify version-bearing sites resolve dynamically, not as static literals.
token-efficiency-grepper-writeclean-room-generation §5 + token-efficiency-rewriteFlag filler phrases, throat-clearing openers, and content-free qualifiers.
unpinned-action-grepper-writeM15 production-ready §Supply-chainFlag GitHub Actions workflows that pin actions to mutable refs.
user-confirm-grepper-writeM5 authority-inquiry §10Block emission of artifacts containing unresolved authority placeholders.
workflow-concurrency-grepstandaloneworkflow concurrency + per-job timeoutsEnforce concurrency + per-job timeout discipline on GitHub workflows.

गेट चलाना

इंस्टॉल किए गए हार्नेस पर गेट अपने आप चलता है: Claude Code की settings.json इसे एक PreToolUse हुक के रूप में जोड़ती है, जो हर Write/Edit से पहले ~/.claude/.apothem/support/conformity/gate.py पर मौजूद मटेरियलाइज़ की गई प्रति को चलाता है। इसके बाद गेट केवल अपने हुक-दायरे के अंतर्गत आने वाले लेखनों की जाँच करता है, और दायरे के बाहर का लेखन चुपचाप पास हो जाता है; दायरा अनुरूपता गेट चलाना में सूचीबद्ध है। स्रोत चेकआउट से, मॉड्यूल रूप वही कोड चलाता है; नीचे दिए गए हर python कमांड से पहले PYTHONPATH=src जोड़ें। गेट डिफ़ॉल्ट रूप से परामर्शी है: यह निष्कर्षों की रिपोर्ट करता है और 0 के साथ बाहर निकलता है। किसी अवरोधक निष्कर्ष पर 2 के साथ बाहर निकलने के लिए --strict जोड़ें। अज्ञात वैलिडेटर नाम 3 के साथ बाहर निकलता है।

# Every standalone validator across the repository:
python -m apothem.conformity.gate --all .

# The same sweep, failing on a blocking finding (the CI form):
python -m apothem.conformity.gate --all --strict .

# Every per-write validator against every tracked file:
python -m apothem.conformity.gate --all-perwrite .

# One validator by name (names come from --list):
python -m apothem.conformity.gate --check naming-grep .

# List every registered validator as JSON:
python -m apothem.conformity.gate --list

# Single-file dispatch (mimics the PreToolUse hook):
echo '{"tool_input": {"file_path": "path/to/file", "content": "..."}}' \
    | python -m apothem.conformity.gate --hook

python -m apothem.conformity.gate --help उपयोग-सारांश प्रिंट करता है। पूरी प्रक्रिया के लिए अनुरूपता गेट चलाना देखें।

संदर्भ

On this page