参考
规则
常驻与路径过滤的行为规则,在整个行为规则集中治理问题求解、代码工艺、整洁架构、规划与质量。
行为规则以扁平文件形式存放于 src/apothem/rules/ 下,带 *.md
后缀。每条规则都是自包含的——Purpose、Obligations、Seriousness
Scaling、Anti-Patterns、Enforcement、Bindings——并且要么常驻、要么路径过滤。
活动规则
规范的注册表是规则集。同一集合的扁平形式:
| 规则 | 范围 | 实现 |
|---|---|---|
| Auto Memory | 常驻 | CM-26 |
| Clean-Room Generation | 常驻 | CM-5 / CM-7 / CM-21 |
| Cognitive Identity | 常驻 | CM-21 |
| Context Management | 常驻 | CM-12 / CM-14 / CM-18 / CM-19 / CM-24 |
| Context Management Scratch | 路径过滤 | CM-12 / CM-24(companion) |
| Conventions Vigilance | 常驻 | CM-22 |
| Interactive Questions | 常驻 | CM-2 extension |
| Interactive Questions Sweep Matchers | 路径过滤 | CM-2 extension(companion) |
| Operational Mandates | 常驻 | CM-1–10 |
| Worker Orchestration | 常驻 | CM-17 / CM-25 |
| Clean Architecture | 路径过滤 | CM-27 |
| Large File Generation | 路径过滤 | CM-23 |
| Performance Discipline | 路径过滤 | Performance axis |
| Planning Techniques | 路径过滤 | CM-20 / CM-21 |
| Python Senior Architect | 路径过滤 | CM-28 |
Frontmatter 契约
每个规则文件都携带:
---
name: <rule name>
description: <one-line role>
pathFilter: <glob list; empty string "" on always-on rules>
alwaysApply: <true | false>
---pathFilter 字段在常驻规则上省略,在路径过滤规则上存在。校验器的
frontmatter-cohort 检查会在每个规则文件上核实该契约。
编写规律
- 自包含。 每条规则都有自己的 Purpose、Obligations、Anti-Patterns 与 Enforcement 章节。
- Bindings 块。 每条规则都以规范的五方向 Bindings 块收尾(Drives → / Driven by ← / Satisfies → / Established by ↑ / Cross-bound with ↔)。
- 仅用领域语言。 不含计划内部引用——参见
CLAUDE.mdCM-7。
生成的规则清单
| Name | Description | Source |
|---|---|---|
README | Behavioral instruction rules — flat .md files, each a self-contained directive set the harness loads to govern agent behavior. Each carries YAML frontmatter declaring name, `de | src/apothem/rules/README.md |
agent-capability-discipline-matrix | Path-filtered companion to agent-capability-discipline.md — carries the per-harness agentic-capability matrix (§1), the per-harness MCP-surface catalog (§3), and the per-harness agent-memory-convention catalog (§7) the parent rule's anchors delegate to. Demand-loaded when the assistant edits any adapter sub-package, cross-harness capability-matrix input, or per-harness MCP-config artifact. | src/apothem/rules/agent-capability-discipline-matrix.md |
agent-capability-discipline | Cross-harness agentic discipline — the 17-harness adapter cohort is recognized as sophisticated AI agent systems; core and supplemental agentic capabilities converge via M14, anchor to per-adapter STANDARD CONVENTION PIN, validate at materializer time, and attest through adapter capability coverage. Demand-loaded on adapter / capability / MCP-config touches, co-triggering with its matrix companion. | src/apothem/rules/agent-capability-discipline.md |
agent-orchestration-patterns | Path-filtered companion sub-rule carrying the team-pattern catalog, agent-type selection, launch protocol, return-contract enforcement, isolation discipline, error handling, decision tree, and anti-patterns that the parent agent-orchestration.md rule's anchors declare. | src/apothem/rules/agent-orchestration-patterns.md |
agent-orchestration | Agent and agent team orchestration — the six canonical team patterns (Research, Audit, Implementation, Generation, Quality, Documentation), the deploy-when threshold (3+ independent parallel operations, multi-path exploration, heavy reads, multi-dimension verification, multi-file generation), the single-message parallel-launch invariant, explicit return contracts, and context isolation. Canonical specification for CM-17 / CM-25. | src/apothem/rules/agent-orchestration.md |
agents-md-convention | The repository carries a single agent-facing canon at the root AGENTS.md; per-folder operating guidance lives in each folder's README.md, which serves both the human and the agent reader. Per-folder AGENTS.md companions are not required; any present companion stays current with its folder and the root AGENTS.md stays coherent with the AI-surface canon. | src/apothem/rules/agents-md-convention.md |
agile-sprints-elements | Path-filtered companion rule carrying the canonical sprint-element bodies (Sprint Goal, Backlog INVEST, DoR, DoD, Review, Retrospective, Velocity), the Three Pillars detail, the Surface Imposition table, and the Failure Recovery table; demand-loaded when the parent agile-sprints.md rule's anchors surface. | src/apothem/rules/agile-sprints-elements.md |
agile-sprints | Non-trivial multi-step work in host projects runs as disciplined Agile sprints — Sprint Goal + Backlog + Definition of Ready + Definition of Done + Sprint Review + Retrospective + Velocity tracking. The trivial-vs-non-trivial threshold is the ratifiable choice (line-count + scope hybrid). Empirical process control — transparency, inspection, adaptation — applies throughout. | src/apothem/rules/agile-sprints.md |
agnostic-posture-checklist | Path-filtered companion to agnostic-posture.md: the default-off and opt-in invariant checklist, each with a concrete verification step, that every phase's definition of done satisfies and the planning-pipeline commands and learning loop consult. | src/apothem/rules/agnostic-posture-checklist.md |
agnostic-posture | Default-off, opt-in posture for every shipped behavior; correctness gates stay advisory; every surface is harness-neutral; model, effort, and workflow preference resolve only from an explicit in-conversation choice. | src/apothem/rules/agnostic-posture.md |
authoritative-referencing-homes | Path-filtered companion to authoritative-referencing carrying the four per-surface referencing-home consolidation list (ten-dimension dim 9, sota named-exemplar, disclosure-ledger rationale, output-style citations), the four-level seriousness-scaling table, and the failure-tells enumeration, declared at the parent rule's §3, §Seriousness-Scaling, and §Failure-tells anchors; demand-loaded on documentation, site, and rule/output-style authoring surfaces where a claim is cited. | src/apothem/rules/authoritative-referencing-homes.md |
authoritative-referencing-quotation | Quotation-ceiling / paraphrase-default companion to authoritative-referencing — paraphrase a cited source by default with attribution; quote sparingly and briefly (a short excerpt, never a full third-party work); attribute the source without offering a legal or fair-use opinion. Path-filtered to prose surfaces where source material is reproduced. | src/apothem/rules/authoritative-referencing-quotation.md |
authoritative-referencing | Every claim, argument, hypothesis, and asserted fact cites an authoritative, official, current source — the scattered referencing discipline (ten-dimension dim 9, sota named-exemplar, disclosure-ledger rationale, output-style citations) consolidated by reference; folklore and 'industry standard' appeals are non-conformant. | src/apothem/rules/authoritative-referencing.md |
authority-inquiry-categories | Path-filtered companion sub-rule carrying the seven-category inquiry catalog (full forbidden-to-invent + inquire-because columns), the required-vs-optional explanatory paragraph, the carved-out auto-decisions catalog, and the failure-tells enumeration declared at the parent authority-inquiry.md rule's anchors; demand-loaded on host-project artifact authoring. | src/apothem/rules/authority-inquiry-categories.md |
authority-inquiry | Inquire, do not invent — names, emails, handles, hostnames, organizations, scope, security, naming, infrastructure, and version pins are discovered or asked, never fabricated. Routes through the canonical structured-inquiry channel. | src/apothem/rules/authority-inquiry.md |
auto-memory-topic-files | Path-filtered companion sub-rule carrying the topic-file management discipline, ecosystem-specific memory hygiene, session-end evaluation procedure, decision tree, and anti-patterns declared at the parent auto-memory.md rule's anchors; demand-loaded when the assistant edits any memory artifact. | src/apothem/rules/auto-memory-topic-files.md |
auto-memory | Auto memory lifecycle augmenting the harness built-in — classifies memory against PROGRESS.md / PLAN-NOTES.md / skills (stable fact/convention/preference/insight → memory; plan/task-specific → PROGRESS/PLAN-NOTES; reusable technique with detection signal → skill), bans session-specific context / incomplete info / CLAUDE.md duplicates / plan-specific decisions / ephemeral facts, and anchors topic-file hygiene to the path-filtered companion. | src/apothem/rules/auto-memory.md |
bidirectional-binding | Every substantive structural element carries reciprocal bindings to its peers in canonical five-direction notation — Drives → / Driven by ← / Satisfies → / Established by ↑ / Cross-bound with ↔. Every binding declared in one direction has a reciprocal back-pointer at the other end; half-edges are structural failures. A Bidirectional Binding Matrix appendix summarizes the graph where structure permits. | src/apothem/rules/bidirectional-binding.md |
canonical-layout-reporting-tiers | Path-filtered companion rule carrying the operational depth of rules/canonical-layout.md — the two-tier reporting body (per-sub-phase + phase rollup), the numeric-prefix discipline, the orphan-output recovery surface, the reciprocal producer / consumer cross-reference body, the surface-imposition table, and the M11 ↔ M12 correspondence table; demand-loaded on plan-suite / phase / migration touches. | src/apothem/rules/canonical-layout-reporting-tiers.md |
canonical-layout | Non-trivial multi-step work emits two-tier reporting (per-sub-phase report + phase-level rollup that aggregates rather than concatenates) and lays generated outputs at the host's discovered canonical layout with reciprocal producer / consumer cross-references and provenance. Orphan outputs (generated artifacts with no consumer / no index entry / no producer attribution) are structural failures. | src/apothem/rules/canonical-layout.md |
clean-architecture-layers | Clean architecture layer discipline — Domain / Application / Infrastructure / Presentation separation under the inward-only dependency rule (Domain depends on nothing; outer layers implement inner-layer interfaces injected at the composition root; no inner layer imports a concrete outer class). Mandatory at 3+ modules or SHARED+; relaxed for throwaway scripts and trivial scopes. Path-filtered to src / lib / app / packages source trees. | src/apothem/rules/clean-architecture-layers.md |
clean-room-generation-protocols | Path-filtered companion rule carrying the full Writing Protocol (§2), Re-Writing Protocol (§3), Code Generation (§4), Prose and Documentation (§5), Plan and Artifact Generation (§6), Decision Tree, and Anti-Patterns specifications anchored at the parent rules/clean-room-generation.md rule's pointer sections; demand-loaded when the assistant edits any code, prose, plan, or artifact surface. | src/apothem/rules/clean-room-generation-protocols.md |
clean-room-generation | Clean-room generation methodology for every output — code, prose, plans, artifacts: each is a fresh derivation from an understood specification (independently re-derivable from its inputs), never a memorized template nor a cosmetic edit of existing content. Routes CM-4 search outcomes into the Writing vs. Re-Writing protocols and gates every re-write on quality elevation against a named deficiency. Implements CM-5 / CM-7 / CM-21. | src/apothem/rules/clean-room-generation.md |
code-craft-conventions | Universal code-craft delegation stub for languages without a dedicated per-language rule. Discovers the host's ratified formatter / linter / type-checker / test framework / per-language idioms and honors them per M1; surfaces silence as inquiry per M5; defers to a per-language sibling rule (code-craft-python, code-craft-shell, code-craft-markdown) when one matches the artifact's path. | src/apothem/rules/code-craft-conventions.md |
code-craft-markdown | Per-language code-craft for Markdown / prose artifacts — purpose-driven structure, sentence-level justification, precision over politeness, active-voice construction, hedge-elimination per the clean-room generation projection. Honors host's ratified Markdown linter (markdownlint, vale, prose-linter) and frontmatter conventions; passes the host's lint clean. | src/apothem/rules/code-craft-markdown.md |
code-craft-python | Per-language code-craft for Python — strict SOLID compliance, modern type hinting (3.10+ syntax, no Any), Google-style docstrings, specific exception handling, pytest discipline, security guardrails (no hardcoded secrets, no shell injection, no unsafe deserialization), and architectural anti-pattern interception. Path-filtered to Python source files and configuration manifests. | src/apothem/rules/code-craft-python.md |
code-craft-shell | Per-language code-craft for shell artifacts — POSIX bash idioms (set -euo pipefail; quoted variables; no eval on untrusted input; trap-based cleanup) and PowerShell idioms (Set-StrictMode -Version Latest; verb-noun cmdlet naming; no Invoke-Expression on untrusted input; structured error records). Honor shellcheck for bash and Invoke-ScriptAnalyzer for PowerShell; pass the host's ratified shell linter clean. | src/apothem/rules/code-craft-shell.md |
cognitive-identity-techniques | Path-filtered companion to rules/cognitive-identity.md carrying the detailed bodies of the five cognitive filters, the six ideation techniques (with detection signals and decision tree), the language-standards forbidden-phrase / required-quality / structural-format catalogs, and the five philosophical principles. Demand-loaded on substantive-output authoring surfaces. | src/apothem/rules/cognitive-identity-techniques.md |
cognitive-identity | The cognitive identity and creative architecture governing every substantive output — the cognitive-insurgent posture and Senior Software Architect role, the five sequential cognitive filters (obvious-purge through aesthetic-demand), the six on-detection ideation techniques, the forbidden / required language standards, and the seven-axs-of-breadth expertise taxonomy. Implements CM-21. | src/apothem/rules/cognitive-identity.md |
context-management-budget | Path-filtered companion rule carrying the §7 Context Budget Discipline (budget awareness, demand loading, pressure signals) and §7.4 Per-Task Effort Calibration (CM-12d) declared at the parent context-management.md rule's §7 anchor; demand-loaded on commands / PROGRESS / plan-suite artifact touches. | src/apothem/rules/context-management-budget.md |
context-management-protocol | Path-filtered companion rule carrying the detailed externalization sub-clauses, compaction-trigger catalog, long-conversation resilience procedures, graceful-degradation priorities, blind-execution protocol full body, and error-classification table declared at the parent context-management.md rule's §2/§3/§4/§5/§6/§8 anchors; demand-loaded on plan-workflow entry. | src/apothem/rules/context-management-protocol.md |
context-management-scratch | Path-filtered companion rule carrying the plan-workflow directory convention (_inputs/ working state, _spec/ authored specifications, and _outputs/ durable generated emissions) declared at the parent context-management.md rule's §2.6 anchor; demand-loaded on plan-workflow entry. | src/apothem/rules/context-management-scratch.md |
context-management | Systematic context management under the blind-execution invariant — every turn must be executable by a fresh session with zero prior history, so all state lives in durable files and active context is acceleration, not storage. Covers context-rot monitoring, proactive externalization, compaction discipline, opt-in continuous single-session execution, and context-budget calibration. Implements CM-12 / CM-14 / CM-18 / CM-19 / CM-24. | src/apothem/rules/context-management.md |
definitiveness-virtues | Path-filtered companion to rules/definitiveness.md carrying the operational depth of M8 — Definitiveness, Airtightness, and the Family of Rigorous-Systems Virtues. Demand-loaded when the assistant edits authoring surfaces (Markdown, rules, skills, agents, commands, docs) where prescriptive prose lands: the three hedge-resolution paths with worked examples, the seven-virtue floor, the definitive-form Right/Wrong examples, the airtightness checks, and the failure tells. | src/apothem/rules/definitiveness-virtues.md |
definitiveness | Every emitted statement is definitive and airtight — hedging vocabulary is eliminated where binding prescription is possible; every contract carries pre / post / failure conditions; every TBD / TODO / FIXME is closed in place or surfaced as an inquiry; the family of rigorous-systems virtues governs every artifact. | src/apothem/rules/definitiveness.md |
determinism | Every rendered option set carries the (Recommended) marker in its answer header, every terminal surface closes with a named next step, and every command, skill, output-style, and statusline surface holds a deterministic output shape — identical inputs produce identically-shaped output. The determinism harness proves the contract mechanically; the marker and next-step semantics are owned by their dedicated rules and this rule consolidates them under the determinism contract. | src/apothem/rules/determinism.md |
disclosure-ledger-markers | Path-filtered companion rule carrying the full marker-class enumeration, ledger-completeness detail, rationale-specificity detail, and failure-tells body declared at the parent disclosure-ledger.md rule's anchor; demand-loaded on disclosure-bearing artifact touches. | src/apothem/rules/disclosure-ledger-markers.md |
disclosure-ledger | Disclosed amendments, never silent — every change of meaningful scope carries an explicit ledger of what was asked, what was amended, what was extended, and what was deferred, with cited rationale. | src/apothem/rules/disclosure-ledger.md |
dynamism | No static substitutions for dynamic-source-of-truth values — every version, badge, release-reference, and docs-version surface renders dynamically from a single source of truth; static-string embeds across the 7 closed-set surfaces are structural failures. | src/apothem/rules/dynamism.md |
etc-extension | Enumerations are seeds, not ceilings — every 'etc.', 'e.g.', 'such as', 'like', 'including', and '…' is a directive to extend the set comprehensively from intent; only an enumeration explicitly marked closed is exhaustive. | src/apothem/rules/etc-extension.md |
expertise-posture-elements | Path-filtered companion rule carrying the seven sub-elements of expertise (full prose bodies), the four-rung calibration ladder, the disclosure marker enumeration, and the failure tells declared at the parent expertise-posture.md rule's anchors; demand-loaded on artifact-authoring touches. | src/apothem/rules/expertise-posture-elements.md |
expertise-posture | Read intent before literal text — amend proactively when literal request leaves a known defect; extend on adjacent gaps; refine with cited rationale; anticipate second-order consequences; calibrate depth to task; import lessons from adjacent domains. Never silent override of authority, agnosticism, or arrogance. | src/apothem/rules/expertise-posture.md |
freshness-facade | Shipped public surfaces carry no AI-disclosure, backward/legacy/obsolete/retired/deprecated, placeholder/TBD/coming-soon, or fix/refinement narrative — a current-version-only facade; the freshness-token-grep matcher gives the closed token-class list mechanical teeth on README plus site copy. | src/apothem/rules/freshness-facade.md |
harness-adapter-shape-schemas | Path-filtered companion to rules/harness-adapter-shape.md — carries the per-harness schema catalog, convergence-vs-divergence table, per-harness pre-emission gate adaptation, the 7-column adapter-test matrix template, the cross-harness redundancy hoist heuristic, and the per-harness STANDARD CONVENTION PIN templates for the 17-harness cohort. | src/apothem/rules/harness-adapter-shape-schemas.md |
harness-adapter-shape | Per-harness adapter discipline — discovery walk per harness, sibling-convention convergence, per-harness pre-emission gate adaptation, 7-column adapter-test matrix shape, cross-harness redundancy elimination, and the per-harness STANDARD CONVENTION PIN schema (vendor doc URL + commit-SHA + snapshot date + canonical filename + canonical schema). Demand-loaded on adapter-sub-package touches, co-triggering with its schemas companion. | src/apothem/rules/harness-adapter-shape.md |
host-discovery-manifests | Path-filtered companion rule carrying the per-language manifest catalog, the discovery-record provenance schema, the failure-tells enumeration, and the Derived Project Context Block definition declared at the parent host-discovery.md rule's §1, §4, Failure-tells, and §Derived Project Context Block anchors; demand-loaded on host-manifest or convention-document touches. | src/apothem/rules/host-discovery-manifests.md |
host-discovery | Discover host-project conventions before emitting any artifact — language, formatter, linter, layout, naming, idioms, sibling-file patterns. Honor discoveries; surface silence as an authoritative inquiry per the canonical channel. | src/apothem/rules/host-discovery.md |
i18n-discipline-locale-cohorts | Path-filtered companion sub-rule to i18n-discipline.md — carries the Modern Dev Cohort selection rationale + per-locale reach data, the RTL CSS-token catalog, and the hreflang link-tag shape + canonical-URL discipline. Demand-loaded on site / docs / locale-glossary / i18n-config touches. | src/apothem/rules/i18n-discipline-locale-cohorts.md |
i18n-discipline | Locale-cohort selection, framework i18n integration, machine-seed translation with optional human review, per-locale glossary, RTL discipline, and hreflang / lang attribute discipline for every host-project translated surface. | src/apothem/rules/i18n-discipline.md |
interactive-questions-canonical-shapes | Path-filtered companion rule carrying the canonical invocation shapes, worked examples, recommendation-taxonomy details, harness-fallback shape, destructive-op canonical option-set templates, and default-pointer worked examples for the parent interactive-questions.md rule; demand-loaded on path match. | src/apothem/rules/interactive-questions-canonical-shapes.md |
interactive-questions-detail | Path-filtered companion to interactive-questions.md carrying the authoring-discipline procedure and the anti-pattern catalog; demand-loaded on path match when a surface authors structured-inquiry invocations. | src/apothem/rules/interactive-questions-detail.md |
interactive-questions-sweep-matchers | Path-filtered companion rule carrying the canonical-channel sweep matcher specifications (H1–H7); demand-loaded when the parent interactive-questions.md rule's §8 anchor surfaces. | src/apothem/rules/interactive-questions-sweep-matchers.md |
interactive-questions | Canonical discipline for soliciting user input — the harness-neutral structured-inquiry channel is the sanctioned abstraction; every invocation carries a structured option annotation; destructive operations and ambiguity resolution route through this rule; a prose fallback shape covers harnesses that lack a native tool. | src/apothem/rules/interactive-questions.md |
large-file-generation | Large file generation via incremental appends — assess size (Small <200 / Medium 200–500 / Large 500–1500 / Massive >1500 lines), then for Large+ plan sections first and append via Write-then-Edit so documents are never silently truncated or abandoned. | src/apothem/rules/large-file-generation.md |
large-file-reading | Large file reading via targeted segments — Grep to locate, Glob for traversal, Read with offset/limit; never load a full file when a segment suffices. Read-side analogue of large-file-generation. Demand-loaded on file-consult touches; the always-on read-side budget invariant lives in context-management.md §7. | src/apothem/rules/large-file-reading.md |
living-docs | Every change to a documented public surface — a CLI command or flag, a harness adapter, a profile field, an installer flag or environment variable, a configuration key, or any surface with a page under site/content/docs/ — MUST update its documentation page in the same change-set; source-generated reference pages are kept current by re-running the reference-inventory generator and committing the regenerated pages. | src/apothem/rules/living-docs.md |
multi-agent-workflow-shape | Path-filtered companion sub-rule to multi-agent-workflow.md — carries the four-property capability-shape enumeration (independent agents, adversarial critique, open-loop dynamics, dynamic pacing), the model- and effort-agnostic detail, the synthesis-quality-and-lean-main-thread form, and the seriousness-scaling recommendation table declared at the parent rule's §1, §3, and §Seriousness-Scaling anchors; demand-loaded on agent / workflow-command / workflow-skill and multi-agent authoring surfaces. | src/apothem/rules/multi-agent-workflow-shape.md |
multi-agent-workflow | Independent-critique, open-loop, dynamic multi-agent execution is an available, specified capability — opt-in and default-off under the agnostic posture, never imposed on a clean install; the orchestration mechanics are owned by agent-orchestration. | src/apothem/rules/multi-agent-workflow.md |
operational-mandates-expanded | Path-filtered companion to operational-mandates — carries the per-mandate Violation indicators and Recovery sub-blocks for CM-1 through CM-10; demand-loaded on Markdown / governed-core surface touches. | src/apothem/rules/operational-mandates-expanded.md |
operational-mandates | The ten always-on behavioral mandates CM-1–CM-10 as canonical one-line directives — critical evaluation, zero assumptions, configuration-driven, search-before-implement, best solution, self-improvement, coherent product, bottleneck-first focus, decision velocity, and brutal honesty. The behavioral floor every other rule reads through; per-mandate violation indicators and recovery actions live at the path-filtered companion. | src/apothem/rules/operational-mandates.md |
option-annotation-form | Path-filtered companion rule carrying the prose-and-document annotation form, rationale-specificity citations, cross-channel consistency invariant, cardinality bounds, and failure-tells enumeration declared at the parent option-annotation.md rule's anchor lines; demand-loaded on prose-and-document artifact touches. | src/apothem/rules/option-annotation-form.md |
option-annotation | Every multi-option choice carries a Recommended marker plus principle-linked rationale — silent picks and un-annotated option lists are forbidden in authoritative territory. The structured-inquiry subset delegates to the canonical structured inquiry schema; this rule extends the discipline to prose-and-document option sets. | src/apothem/rules/option-annotation.md |
own-voice-reimplementation | Every reference-derived feature is reauthored in apothem's own voice with zero verbatim code/text/branding, is demonstrably more elegant and effective than the reference, and cites the relevant harness's own latest official documentation (a convention-pin snapshot dated within the prior 90 days). | src/apothem/rules/own-voice-reimplementation.md |
performance-discipline | Per-class runtime performance budgets with quantitative pass/fail gates — each artifact class (hook handlers, the conformity sweep, the test suite, agent spawn, install resolution) carries a runtime ceiling, a measurement boundary, and a benchmark verifier that exits zero on compliance; budget exceedances surface as findings routed to the expertise-gap log. Closes the Performance axis of the seven-axs-of-breadth taxonomy. | src/apothem/rules/performance-discipline.md |
persistent-conventions-vigilance-checklist | Path-filtered companion sub-rule carrying the Convention Awareness checklist (§1) and the Ecosystem Gap Detection artifact-class triggers (§4) for the parent persistent-conventions-vigilance.md rule; demand-loaded on touches of governed-core surfaces. | src/apothem/rules/persistent-conventions-vigilance-checklist.md |
persistent-conventions-vigilance | Adhere to the harness ecosystem's conventions and proactively evolve its artifacts — per-artifact-class convention awareness (naming, layout, frontmatter shape), the five-step proactive-evolution cycle (detect → search → act → validate → retire), bidirectional cross-reference coherence, and ecosystem gap detection that surfaces a missing rule / skill / command / hook before it is needed. Implements CM-22. | src/apothem/rules/persistent-conventions-vigilance.md |
plain-language | User-facing apothem narrative reads as human-authored with zero process-tooling leak — a closed-set forbidden vocabulary (AI / agent / LLM / attestation / ratified / cutover-rehearsal / harness brand identifiers / plan-stage tokens) is eliminated from in-scope codebase-artifact surfaces; the product noun harness is a domain carve-out; dev-facing tech-spec, rule-tier, and per-harness materializer modules are out-of-scope process artifacts that retain their native vocabulary. | src/apothem/rules/plain-language.md |
planning-techniques | Nine planning-review techniques — each pairing a Detect signal, a verification Procedure, and the Anti-pattern it guards against: iteration-loop safety, campaign dependency ordering, clean-slate artifact conflict, identity-claim verification, asymmetric-fix propagation, blind-review value, added-task completeness, severity-count verification, and strict-gate remediation. Applied on detection across plan generation, review, audit, and execution. Implements CM-20 / CM-21. | src/apothem/rules/planning-techniques.md |
pre-emission-gate-bars | Path-filtered companion rule carrying the full Fifteen-Bars table (M1–M15 detailed Check + Failure→action columns), the Attestation Schema YAML block, and the iteration-on-failure protocol declared at the parent pre-emission-gate.md rule's anchor; demand-loaded when the assistant edits any artifact whose emission triggers the fifteen-bar gate. | src/apothem/rules/pre-emission-gate-bars.md |
pre-emission-gate | Fifteen-bar pre-emission gate — every host-project artifact passes M1 through M15 before emission, with a recorded YAML attestation and explicit n/a reasoning where a bar does not apply. | src/apothem/rules/pre-emission-gate.md |
production-ready-prs-surfaces | Path-filtered companion to rules/production-ready-prs.md carrying the operational depth of M15: the seven visibility surfaces, the supply-chain posture catalog, the release-engineering invariants, the commit-message convention (with the human-only authorship clause), the CI-green discipline, and the modern-project-surface specification. Demand-loaded when the assistant edits any visibility-surface artifact (README / CHANGELOG / CONTRIBUTING / LICENSE / SECURITY / .github/** / install / update / uninstall scripts). | src/apothem/rules/production-ready-prs-surfaces.md |
production-ready-prs | Every change the agent makes in a host project is delivered in production-ready form — tests + docs + CHANGELOG entry + conformant commit message + CI green in the same change-set. The seven visibility surfaces (what-is-this / how-to-install / is-it-alive / is-it-safe / how-to-contribute / can-I-trust / what-changed) are honored; gaps surface as findings rather than silently entrenched. | src/apothem/rules/production-ready-prs.md |
propagation | Every mutation of any artifact propagates, in the SAME change-set, to every dependent reference across the whole repository's reference graph — code, tests, docs, root files, .github, CHANGELOG, harness-rendered templates, the harness registry, plugin manifests, and cross-rule bindings. A mutation (add / edit / remove / rename / move / split / merge / deprecate) that lands without its reference updates is an orphan / half-edge finding. Unifies the docs-tier (living-docs) and component-tier (systemic-participation) propagation disciplines to the full reference graph; the existing drift gates are its mechanical arm. | src/apothem/rules/propagation.md |
recommend-next-step | Every command, skill, and phase artifact closes with a Recommended Next Step block — canonical heading, named action, optional rationale — so terminal output never leaves the operator without a definitive forward move. Hedged or absent next-step blocks are structural failures; the mechanical matcher operationalises the check at the pre-emission gate. | src/apothem/rules/recommend-next-step.md |
refactoring-discipline | Agent-driven refactoring is test-gated, one-at-a-time, plan-first, and continuous: a behavior-preserving refactor holds a GREEN test baseline before the first edit and after (the before-and-after contract); addresses exactly one concern in an isolated workspace; proceeds only from a reviewed plan after maximal context-gathering; and runs continuously as the codebase drifts rather than deferred to a crisis. Demand-loaded on refactor-class source edits; the detection signals and full procedure live in the body. | src/apothem/rules/refactoring-discipline.md |
session-closure-scaling | Path-filtered companion sub-rule to session-closure.md — carries the universality-and-scaling clause (the close binds every session; depth scales to session weight), the single-canonical-close no-repetition discipline (emit once, report only the delta on re-engagement), and the plan-touching residual detail (plan open items zeroed or explained-or-waived on every plan-touching close). Demand-loaded on plan-suite / context-management / recommend-next-step touches. | src/apothem/rules/session-closure-scaling.md |
session-closure | Every session — ad-hoc conversational sessions included, not only plan phases — ends with a formal, verifiable close: a terminal Recommended Next Step, a done/deferred ledger, and a verification attestation. A session that trails off mid-thread, claims done without a checked outcome, or buries deferred work silently is a structural failure. Harness-agnostic; the close is rules text every harness honors. | src/apothem/rules/session-closure.md |
sota-elevation-exemplars | Path-filtered companion to sota-elevation.md carrying the eight-surface SOTA evaluation lens, the named-exemplar catalogue (cpython / shadcn-ui / Bun / Fumadocs / vite / vitest), per-surface exemplar walks, the upper-bound calibration binding, the Filter-5 aesthetic-demand binding, the gap-surfacing protocol, the disclosure markers, and the failure tells; demand-loaded on README / docs / .github/ / site/ touches. | src/apothem/rules/sota-elevation-exemplars.md |
sota-elevation | SOTA elevation as default posture for OSS distribution projects — every user-facing surface targets the upper bound of contemporary best-practice, calibrated against named exemplar projects (cpython, shadcn-ui, Bun, Fumadocs, vite, vitest) and audited across the eight SOTA evaluation surfaces. | src/apothem/rules/sota-elevation.md |
source-accessibility-scaling-tells | Path-filtered companion to source-accessibility carrying the four-level seriousness-scaling table and the failure-tells enumeration for source-trust-outranks-reachability selection, declared at the parent rule's §Seriousness-Scaling and §Failure-tells anchors; demand-loaded on documentation, site, and configuration-manifest surfaces where a claim's source is selected and cited. | src/apothem/rules/source-accessibility-scaling-tells.md |
source-accessibility | Source trust outranks source accessibility — reach a trusted but inaccessible source via browser then operator interview; never prefer an untrusted-but-free source over a trusted-but-inaccessible one; record the source-trust decision in the ledger. | src/apothem/rules/source-accessibility.md |
surgical-manipulation | Every mutation of an existing artifact is surgical — a precise, minimal, anchor-bounded or managed-block edit that touches only the span the change requires, never a blunt whole-file overwrite where a scoped edit suffices, and never a strip of a surrounding banner or unrelated content. The mutation produces a minimal diff attested against the host's green conformity baseline (the golden-corpus invariant). The surgical-edit + reactive-guard mechanism is the surgical-guard skill. | src/apothem/rules/surgical-manipulation.md |
systemic-participation-relations | Path-filtered companion rule carrying the operational detail of M14 systemic participation — the four systemic relations table, sibling-convention convergence detail, index/registry update table, the three orphan classes, the three silo classes, retirement discipline, and the cross-component reference graph invariant. Demand-loaded when the parent systemic-participation.md rule's anchors surface on host-project component touches. | src/apothem/rules/systemic-participation-relations.md |
systemic-participation | Every artifact apothem introduces into a host project joins the host as a systemic participant — declares its upstream / downstream / peers / enforcers; honors sibling conventions; lands at the host's canonical layout; updates the host's index registries in the same change. Silos (self-contained artifacts diverging from sibling conventions) and orphans (artifacts with no consumer / no index entry / no producer attribution) are structural failures, not aesthetic preferences. | src/apothem/rules/systemic-participation.md |
ten-dimension-check-dimensions | Path-filtered companion sub-rule carrying the verbatim per-dimension bodies (rigor / coherence / configurability / readability / orphanism / structurality / architecture / naming / scholarly referencing / examples-tests-docs) and per-dimension failure tells declared at the parent ten-dimension-check.md rule's anchor; demand-loaded on artifact-emission surfaces. | src/apothem/rules/ten-dimension-check-dimensions.md |
ten-dimension-check | Ten quality dimensions every host-project artifact passes before emission — rigor, coherence, configurability, readability, orphanism, structurality, architecture, naming, scholarly referencing, examples / tests / docs. | src/apothem/rules/ten-dimension-check.md |
token-budget-discipline | Caps every always-on rule body at 500 substantive tokens; over-budget bodies decompose into path-filtered companion sub-rules per the established demand-load pattern; mechanical matcher and PreToolUse hook enforce the budget at write time. | src/apothem/rules/token-budget-discipline.md |
token-efficiency-rewrite-protocol | The full token-efficiency rewrite protocol the always-on parent rule references: the L1 prose-scaffolding elimination classes (filler / throat-clearing / restatement / hedge-padding / ceremonial-scaffolding / connective-bloat), the per-class compression heuristics, the extract-discard-re-derive-verify procedure, and worked before/after examples. Demand-loads when the assistant rewrites an authoring surface for token efficiency. | src/apothem/rules/token-efficiency-rewrite-protocol.md |
token-efficiency-rewrite | Rewrite protocol for token-efficient content — re-derives prose to a minimal surface while preserving L2 substantive semantics and L3 structural / load-bearing anchors; pairs with token-budget-discipline (sizing) and clean-room-generation §3 (re-writing protocol). | src/apothem/rules/token-efficiency-rewrite.md |
tool-use-discipline-failure-tells | Path-filtered companion to tool-use-discipline carrying the failure-tells enumeration for the three tool-loop disciplines — sequential-where-parallel, act-without-observe, no-verifiable-exit, fixed-count-stop, and false-sequencing — declared at the parent rule's §Failure-tells anchor; demand-loaded on rule, command, skill, agent, and hook authoring surfaces where tool-loop cadence is exercised. | src/apothem/rules/tool-use-discipline-failure-tells.md |
tool-use-discipline | Ordinary tool use runs as a disciplined loop: independent tool calls go in one turn, never sequentially; the agent works an observe → decide → act cadence; the loop iterates until a verifiable exit condition is met, never a fixed count. Generalizes the agent-tier single-message parallel-launch discipline down to every tool call. Harness-agnostic; advisory under the agnostic posture. | src/apothem/rules/tool-use-discipline.md |
visual-leverage | Structural subject matter — architecture, control flow, data flow, dependency graph, state machine, sequence, decision tree, hierarchy, precedence stack, lifecycle, permission matrix — carries a current-reality diagram alongside its prose, with provenance and a verification date. Mermaid is the recommended default for Markdown-centric ecosystems; the host's existing notation is honored per M1 host-discovery. | src/apothem/rules/visual-leverage.md |