Trigger-rule-pair

Description

The meta-criterion: a heuristic only earns its keep when it is paired with an identifiable invocation condition. A bare rule (“do X”) is not yet a trigger-rule pair — it’s an aspiration or an instruction that may never be retrieved at the moment it’s relevant. A trigger-rule pair has the form: “When [situation-shape S], apply [rule R].” The trigger is what makes the rule addressable at the right moment; without it, the rule sits inert in memory and fails to execute when the situation calls for it.

This form is directly architecturally relevant to the analogical inference engine: the engine’s retrieval layer needs trigger patterns to know when to surface a form or insight, not just what the insight says. A catalog entry without a trigger_keywords field or a “When it applies” section is an incomplete trigger-rule pair — it has the rule but lacks the invocation condition.

Composition

= doctrine (the rule half) + surface (the exposed activation interface) + cadence (optional — timing of the trigger).

The rule half is what gets executed; the surface half is what the situation must present for the rule to activate; cadence constrains when within a cycle the trigger fires (e.g., “at session start,” “when a new dependency is introduced,” “after each deployment”). Cadence is optional — some triggers are event-driven rather than cadence-driven.

Encounters

  • CLAUDE.md instructions — “Read X before doing Y” is a trigger-rule pair; “write good code” is not. The quality of CLAUDE.md files correlates with trigger-rule-pair density.
  • The engine’s three failure-mode gates — each gate is an explicit trigger-rule pair: “if [label-without-mapping detected], apply [discount].” The gates work precisely because their triggers are articulable.
  • Code review norms — “when you see a function over N lines, flag it” (trigger-rule pair) vs. “keep functions short” (bare rule).
  • Analogy retrieval — the observation that the corpus’s defining mature pattern is trigger-rule pairing: mature insights in the corpus all have an explicit “when does this apply” component.
  • Architectural decision records (ADRs) — good ADRs state “when this architectural question arises (trigger), prefer approach X (rule).”

When it applies / triggers on

User-initiated: User is writing or reviewing instructions, rules, heuristics, principles, or guidelines. Any time a rule is stated without a “when”: that’s the moment to surface the trigger-rule-pair form and prompt for the invocation condition.

Agent-initiated: Engine scans an insight or rule-like statement and detects a bare principle (rule without trigger). Candidate inference: “this heuristic is missing its invocation condition — what situation-shape should fire it?”

Vocabulary cues: “heuristic,” “rule,” “principle,” “always,” “never,” “our convention is,” “best practice,” “standing instruction” — followed by a content statement but not preceded by a conditional (“when X,” “if X,” “in situations where”).

Situation-shape signals: A document containing many bare rules (style guides, wikis, CLAUDE.md files) is a trigger-rule-pair audit target — each rule is a candidate for trigger-elicitation.

Composes with

  • doctrine (creation relationship) — trigger-rule-pair is the structural criterion that turns a doctrine fragment into a complete doctrine. Every complete doctrine is a trigger-rule pair; not every trigger-rule pair is elevated to doctrine status.
  • cadence (composition relationship) — cadence-driven triggers fire at temporal intervals (“at session start”) rather than event-based; the combination is trigger-rule-pair with a cadence-shaped trigger.
  • asymmetric-gate (specialization relationship) — an asymmetric gate is a trigger-rule pair where the rule is “apply the expensive check” and the trigger is “when the cheap gate passes.” Trigger-rule-pair is the containing category.
  • active-gate-vs-passive-audit (composition relationship) — the “gate vs. audit” choice is a downstream decision from the trigger: what does the rule do when triggered? Gate (block) or audit (record)?

When it doesn’t apply

  • Truly unconditional rules — some invariants apply everywhere with no trigger needed (e.g., “never use plaintext for credentials”). The trigger is effectively “always” and stating it explicitly adds no information.
  • Exploratory context — in a brainstorm or divergent-thinking mode, pairing every heuristic with a trigger prematurely constrains exploration. The form earns its keep when converging on operationalizable rules.
  • When the trigger is fully obvious from context — “when reviewing code, look for security vulnerabilities” — the trigger adds little if the document is already scoped to code review.

Sources

  • Emerged from full-corpus synthesis of James’s insights, 2026-05-17: “the corpus’s defining mature pattern is the trigger-rule pair.”
  • Cognitive science: production rules in ACT-R have the same structure (condition → action). The trigger half corresponds to the condition side of a production.
  • Pattern-language tradition (Alexander et al.): each pattern has a “forces” section describing the situation that calls for the pattern — equivalent to the trigger.
  • Directly architecturally relevant to the engine’s catalog schema (OPEN DECISION 11.10, resolved: both trigger_keywords frontmatter + prose section).

Canonical exemplars from corpus (T2 2026-05-17)

Caveat — very low corpus support. Only 2 backfill-only matches at score ≥ 2, both via <task-notification> flavor — neither is from a direct user message. This is unsurprising: trigger-rule-pair was itself coined during the 2026-05-17 corpus-synthesis pass that produced the analogy-engine spec, so it hasn’t had time to propagate as corpus prose. The form’s catalog claim — that the corpus’s defining mature pattern is trigger-rule pairing — is best read against the aggregate of mature CLAUDE.md doctrines and engine spec entries, rather than against this slim 2-match sample.

  • Trigger-rule pair as architectural primitive the engine should surface (cwd: campconnect, 2026-05-17, task-notification): “The trigger-rule pair finding is the kind of architectural primitive the engine should eventually surface on its own, and it landed as an exemplary case of what the engine is built for. A meta-pattern about the corpus itself — ‘useful stored heuristics need an invocation condition, not just a principle’ — has surfaced from analyzing 1,136 instances of stored heuristics, found via the same kind…” — the form’s coining moment in the task-notification flavor; the elephant evaluating a goldfish’s synthesis output and recognizing the form as architecturally load-bearing.
  • Trigger-rule pair finding ADDED an entirely new decision (11.10) (cwd: campconnect, 2026-05-17, task-notification): “the trigger-rule pair finding ADDED an entirely new decision (11.10) that wasn’t visible until the corpus was analyzed at scale; the promotion-readiness findings ADDED 11.11. Net result: the synthesis reshaped the spec’s decision space, not just informed it.” — confirms the form’s meta-architectural role: it identified a gap in the spec that was invisible until empirical synthesis surfaced it.

Trigger pattern (T2): Trigger-rule-pair surfaces when the user is writing/reviewing instructions, rules, heuristics, principles, or guidelines — and an agent (or self-review) notices a bare rule that’s missing its invocation condition. Caveat: with n=2 (both task-notification flavor), the trigger pattern is best read as anticipated from the catalog’s ACT-R + pattern-language lineage and from the aggregate corpus-shape (1,136 instances of stored heuristics, per the synthesis findings) rather than from this slim sample. Expect this exemplar set to thicken as the form is invoked by name in audit-passes over CLAUDE.md and forms catalog entries.