Greatpractice
A codification system. Memory notes become the trigger; recurring patterns get promoted into auto-enforced practices.
Memory-triggered codification discipline. memory feedback → maturation gate → ratified entry in a 3-tier tree, enforced by 7-event lifecycle hooks. Frontmatter governance SSoT.
A memory-triggered codification discipline distilled from a 9-axis cross-domain deep-research synthesis. 5-stage capture → mature → codify → enforce → revisit pipeline + 3-backbone architecture. Normative grounding via Distributed Cognition + Organizational Anthropology.
The problem Greatpractice solves
What Greatpractice is
Overview
Memory notes are the trigger. Patterns that recur in memory with sufficient cost get promoted into auto-enforced practices.
Memory feedback in → 5-axis maturation gate → 3-tier macro/mezzo/micro tree out, enforced by 7-event lifecycle hooks. phronesis_boundary protects un-codifiable work.
A memory-triggered codification discipline distilled from a 9-axis cross-domain deep-research synthesis. 5-stage pipeline + 3-backbone architecture. Frontmatter governance SSoT. Normative grounding via Distributed Cognition + Organizational Anthropology.
The core idea
Central thesis
Central thesis
Quiet omissions aren't a memory problem — they're missing automation. Greatpractice watches memory and promotes solid patterns into automation.
Memory is the input signal, not the storage. Promotion moves obligations from memory-readable to hook-enforceable. Frontmatter schema is the single largest lever.
Representational substitution — replacing what the model must remember with what the runtime must enforce — is the load-bearing transformation. Memory is the trigger surface; frontmatter is the locus.
What's in the v0.1.0 cut
v0.1.0 first cut scope
v0.1.0 release artefacts
First cut keeps moving parts minimal: the full design doc + one obligation actually promoted out of memory into the runtime + the small machinery that makes it real.
v0.1.0 scope: spec (2220 lines) + 1 mezzo + 1 micro + 1 hook. v0.2-v0.4 roadmap defined (manifest hash / renderers / voice linter / MESI / CMMI L4 effectiveness).
v0.1.0 = full spec + canonical tree skeleton + plugin scaffold. §11 deferred roadmap (v0.2/v0.3/v0.4) + §11.5 v1.0 readiness rubric. 9-axis research backing with explicit contradiction + gap audit.
The first ratified rule — Outbox JSON Validation
Reference entry: outbox-json-validation
Reference entry: outbox-json-validation
An obligation that lived in memory moved into the runtime. Now the system blocks the unsafe path before it can run.
Memory signal → notability gate (3 + 2 independent + verifiable) → 5-axis maturity score 21/25 → ratify. Backing PreToolUse contact hook + 1-line memory redirect stub.
Operational existence proof of memory-trigger → runtime-enforcement substitution. Notability gate + 5-axis 21/25 → ratified at v2.5.50 with mandatory PreToolUse hook + memory_stub redirect.
How it gets used — turning "don't forget to do X" into rules the computer enforces
Use cases — 5 worked examples of memory-to-runtime promotion
Use case taxonomy — 5 representative promotion exemplars across hook subtypes + enforcement levels
Five real-life examples showing how Greatpractice takes a small chore that the AI has been forgetting and turns it into a rule the system itself watches for.
Five worked examples mapping memory signals → 5-axis maturation gate → ratified entry + backing hook. Covers all three poka-yoke subtypes + phronesis_boundary.
5 promotion exemplars spanning hook architecture's orthogonal axes (3 poka-yoke subtypes × 4 lifecycle events × 3 enforcement levels). Instantiates §4 + §5 + §6.3 as the operational existence proof set.
Stopping messages from disappearing without anyone noticing
Outbox JSON validation — contact-subtype PreToolUse hook
Outbox JSON invariant enforcement (mezzo · contact poka-yoke · mandatory)
When the artificial intelligence (AI) helpers in this project send messages to each other, sometimes the message goes out in a wrong shape and ends up empty inside — but no one notices at the time, so the actual content is lost.
A2A messages to collab/outbox.jsonl require valid single-line JSON per row. Bash HEREDOC redirects silently inject trailing content, malforming the row + triggering bridge fallback to say transport.
Source: feedback_outbox_json_validation.md capturing recurrent malformed-payload at Constellation A2A append. Silent-drift class failure: transport Ack succeeds while payload never reaches recipient handler.
- The first time the problem happens, write a short note about it in the memory folder (a folder where the AI keeps reminders for itself).
- Each time the same problem comes back, add a note about what was different that time — was it a different kind of work? a different time of day? — so we can see whether the pattern is real or just a one-off.
- When the same problem has happened at least 3 times, in at least 2 different situations, and we can actually measure how much trouble it caused — the system automatically writes up a draft rule.
- Confirm the rule and mark it as "must follow" (so the system will block any attempt that breaks it, not just warn).
- Hook up a small checker (a tiny background program that runs at the right moment) that examines every outgoing message before it leaves, and refuses to send if the shape is wrong.
- Replace the original memory note with a single line that just points to the new rule — so nothing is duplicated, but anyone who looks at the note still knows where the rule lives.
- First incident → write
memory/feedback_outbox_json_validation.mdcapturing context + recovery cost. - Each recurrence → append delta (different cycle phase? different payload class? same shell?) to support cross-context independence check.
- Notability gate: ≥3 occurrences + ≥2 independent triggers + verifiable effect (recovery cost in agent-cycles).
- 5-axis maturity score: frequency 3 + depth 4 + recency 5 + cost 4 + predictability 5 = 21 (threshold ≥ 18). Ratify as mezzo with enforcement_level=mandatory.
- Wire PreToolUse contact hook (
plugins/greatpractice/hooks/contact/outbox-json-validate.cjs): matches Write tool onoutbox.jsonl+ Bash tool referencing it; blocks HEREDOC pattern + direct shell redirect; allowsscripts/eg_outbox_push.cjspath. Exit 2 + voice-checked block message on violation. - Replace raw memory file with 1-line redirect stub pointing at
greatpractice/mezzo/outbox-json-validation.md— preserves cross-reference graph without duplicate content.
- Capture stage (§5.1): incident-evidence file
memory/feedback_outbox_json_validation.mdrecords first manifestation with context envelope (cycle phase, payload class, shell identifier, recovery cost in agent-cycles). - Mature stage (§5.2): each recurrence appended as delta-record establishing cross-context independence — distinct cycle phase + distinct payload class qualifies as independent triggers under the notability gate (modeled on Wikipedia Notability §1.3 multiple independent sources + Six Sigma DMAIC measure phase).
- Notability gate (§5.3): 3-criterion conjunction — significant coverage (≥3 occurrences) ∧ independent triggers (≥2 distinct context classes) ∧ verifiable effect (concrete recovery cost). All three satisfied; advances to maturation scoring.
- Maturation gate (§5.4): 5-axis weighted sum = frequency(3) + depth(4) + recency(5) + cost(4) + predictability(5) = 21, exceeding threshold ≥ 18. Codify stage (§5.5): ratify as mezzo entry at v2.5.50 with enforcement_level=mandatory; voice-pass (§6) confirms blameless second-story framing; SSoT propagation (§8) updates INDEX.md + cross-reference graph.
- Enforce stage (§5.6 / §4.2): PreToolUse contact hook
outbox-json-validate.cjsinstantiates the contact poka-yoke subtype — admission-time interception with exit 2 on Write(outbox.jsonl) + Bash matching HEREDOC pattern or direct shell-redirect signature, allowlistingscripts/eg_outbox_push.cjs. Block message follows §6 blameless template (no blame attribution; multi-causal framing; canonical-entry reference). - Revisit stage (§5.7 / §7): raw memory superseded by memory_stub surface (1-line redirect to
greatpractice/mezzo/outbox-json-validation.md); freshness telemetry tracks hook-fire count + bypass-attempt count for §10.5 retirement-eligibility evaluation. Cross-reference graph integrity preserved without duplicate content.
Making sure the work session can't start with something broken
SessionStart bridge-liveness probe — fixed-value blocking hook
SessionStart precondition enforcement (mezzo · fixed-value poka-yoke · mandatory blocking)
When you start a work session with the artificial intelligence (AI), there's a connection that needs to be alive — a bridge that lets different AI helpers talk to each other. If the bridge is dead and the session starts anyway, you only find out later when something silently fails. We want the session to refuse to start until the bridge is confirmed alive.
Session resume / IDE reboot / cold boot leaves the Constellation WS bridge unspawned. Outbox pushes during the dead-bridge window succeed at file-write but never reach the server. Captured at feedback_session_resume_bridge_spawn.md.
Source: feedback_session_resume_bridge_spawn.md. Runtime-precondition class — file write succeeds at POSIX layer while no WS reader exists; silent inbox miss at all counterparties; recovery via ws-history/<sender>.jsonl probe.
- Write a rule that says: "When a session starts, first check that the bridge is alive."
- Mark this rule as "must follow" so that until the bridge check passes, the AI can't use any of its tools — no editing files, no running commands, nothing.
- The check runs at the very moment the session starts. If the bridge is alive, work proceeds normally. If not, the session is blocked with a friendly explanation (no scolding — just "here's what's wrong and here's how to fix it").
- Keep a small tally of how often the check actually catches a dead bridge, so we can see if the rule is earning its keep or if the underlying problem has been fixed and we can retire the rule.
- Ratify mezzo entry
greatpractice/mezzo/session-resume-bridge-spawn.mdwith trigger.if="SessionStart event fires" · trigger.then="verify WS bridge process + outbox connectivity before any tool admission" · enforcement_level=mandatory. - Wire SessionStart blocking hook (
plugins/greatpractice/hooks/fixed-value/bridge-liveness.cjs) — fixed-value subtype: probescollab/.bridge-pid+ sends a heartbeat ping to the WS endpoint, asserts both succeed before returning continue. Exit 2 + injected guidance message on failure; all subsequent tool calls suppressed until reverification. - Block message follows §6 blameless template: surfaces the spawn command (
node collab/collab-client.cjswith required env vars) + reference to the canonical entry; no agent-fault attribution. - Telemetry: hook-fire count + block-vs-pass ratio logged to
collab/practice_telemetry.jsonl(deferred to v0.2). Feeds §10.5 retirement-eligibility evaluation should bridge spawn become harness-automatic.
- Ratify mezzo entry with trigger.if bound to the SessionStart lifecycle event (§4.1 lifecycle hook event #1) and enforcement_level=mandatory — selected because file-system-only validation (the contact subtype option) cannot detect a runtime-process liveness condition; only a fixed-value runtime probe can.
- Instantiate fixed-value poka-yoke subtype (§4.2.2): hook
bridge-liveness.cjsprobes the bridge-pid sentinel + dispatches a heartbeat round-trip to the WS endpoint, asserts both succeed within bounded timeout before returning continue. Registered as blocking — exit 2 suppresses all subsequent tool admissions until reverification (working-memory recall preempted at harness layer, not model layer). - Voice surface (§6): block message follows the blameless second-story template — surfaces canonical spawn invocation, references the entry by path, omits agent-fault attribution. Aligns with psychology §1.8 Gollwitzer implementation-intention discipline (if-then DSL form), d≈0.65 effect-size justified in the underlying research.
- Telemetry instrumentation (§7 freshness + §10.5 retirement): hook-fire-count + block-vs-pass ratio + bypass-attempt count logged to
collab/practice_telemetry.jsonl. Feeds §10.5 retirement-eligibility scoring; tombstone graduation rationale per §10.5 when the invariant becomes harness-guaranteed.
Catching the moment when copies fall out of sync with the original
N-way SSoT propagation — PostToolUse motion-step hook
SSoT propagation invariant (mezzo · motion-step poka-yoke · recommended with escalation)
When you change a main document (like an official entry, or the version number shown on the homepage), there are usually a few other places that quietly show the same information — other webpages, settings files, short summaries. They're all supposed to update at the same time. But sometimes one or two get forgotten, and now the original says one thing while the copies still say the old thing — and nobody notices for a while.
EG N-way sync registry (AGENTS.md §5.8): version + module-version bumps touch multiple downstream surfaces. SSoT update without propagation produces silent staleness across the doc surface.
Source: N-way SSoT sync drift class. Structural-consistency invariant — partial propagation observable only by N-way cross-comparison. motion-step poka-yoke domain.
- Write a rule that says: "Whenever someone changes the original document, check all the copies that should match it."
- When the original is changed, the system goes through every copy and notes which ones still have the old date and which were updated together.
- Mark this rule as "strongly suggested" rather than "must follow" — falling out of sync is a real problem, but it's not the kind of thing where you want to slam on the brakes mid-work. A clear warning is enough to make sure no one misses it.
- If someone ignores the warning more than once, the system gets gradually firmer: first a clear reminder, then asking the person to revert and acknowledge, and if it keeps happening, a full discussion is triggered.
- The check fires right after the original is saved — that way the warning appears at exactly the moment the person is still thinking about the change, not hours later when they've moved on.
- Ratify mezzo entry
greatpractice/mezzo/ssot-propagation.mdwith sync_registry frontmatter field enumerating dependent surfaces. - Wire PostToolUse motion-step hook (
plugins/greatpractice/hooks/motion-step/ssot-propagation.cjs): on Write/Edit to a registered SSoT path, diff the registry against the current commit's working tree + emit warnings for surfaces not co-modified within the same commit boundary. - enforcement_level=recommended (not mandatory) — sync drift is real but not the class to hard-block mid-work; a clear warning surfaces the gap. Aligns with §6 voice (no blame, multi-causal framing).
- Progressive escalation ladder (§10): repeat misses bump severity — clear reminder → revert-and-acknowledge prompt → full Hyperbrief escalation. Tracked via miss_count field (deferred to v0.2).
- PostToolUse lifecycle event timing (immediately after SSoT write) maximizes context-correction win — warning surfaces while the change is still in working memory, not hours later when context has rotated.
- Ratify mezzo entry with
sync_registryfrontmatter field (§3 schema extension) declaratively enumerating dependent surfaces. Registry doubles as hook fire-condition + lint coverage + §8 propagation diff source — instantiating the single-definition-N-enforcement-points thesis. - Instantiate motion-step poka-yoke subtype (§4.2.3): hook binds to PostToolUse event (§4.1 event #4) — diff registry membership against commit-boundary co-modification set; per-surface warnings on missing co-mods. Diff semantics modeled on functional-memoization dependency-tracked invalidation (axis 8 convergence).
- enforcement_level=recommended over mandatory — trade-off: hard-block on partial write disrupts editorial flow disproportionately to drift cost (registry gaps remain post-commit-correctable, unlike silent-drift). Voice maintains blameless framing.
- Progressive escalation ladder (§10.2-§10.4):
miss_counttelemetry drives stepped severity — recommended warning → revert-and-ack prompt → Hyperbrief escalation. Models §10 graduated enforcement (axis 7 SRE error-budget convergence). - PostToolUse event timing maximizes intra-cycle context-correction win — working-memory-resident surfacing minimizes recovery load; deferred surfacing amortizes away the §1.8 implementation-intention timing advantage.
Making sure the steps happen in the right order — every time
Pre-send inbound check — PreToolUse motion-step ordering hook
Temporal-ordering enforcement (mezzo · motion-step poka-yoke · mandatory · dual-predicate)
When a job has several steps that must happen in a specific order — first check the mailbox, then read the new messages, then send your reply, then mark the mailbox as "up to date" — and the artificial intelligence (AI) sometimes skips or shuffles a step. Skipping or shuffling causes messages to get lost or for the system to think it's caught up when it isn't.
Constellation A2A: probe → read → classify → incorporate-or-abort → emit → advance cursor. A2A has no in-flight rejection — stale sends silently "succeed". Captured at feedback_pre_send_inbound_check.md.
Source: feedback_pre_send_inbound_check.md. Constellation transport is at-most-once with no in-flight rejection — stale-context emits indistinguishable from context-current at wire layer. Dual-predicate motion-step (prerequisite-completion ∧ payload-match).
- Write a rule that knows the correct order of steps and quietly keeps track of which step was finished last in this session.
- When the artificial intelligence (AI) is about to do a step (say, "send the reply"), the rule pauses for a moment and checks: "Was the previous step actually finished first?"
- The rule also confirms that the step it's about to do matches what was just read — so it can't accidentally reply to the wrong message.
- Mark this rule as "must follow" — getting the order wrong can quietly lose work, so the system needs to actually stop the wrong-order step from happening, not just warn.
- If the order is wrong, the step is blocked, and a gentle message explains what the correct next step should be — no scolding, just helpful guidance.
- Ratify mezzo entry
greatpractice/mezzo/pre-send-inbound-check.mdwith dual-check trigger.then + enforcement_level=mandatory. - Wire PreToolUse motion-step hook (
pre-send-inbound.cjs): on outbox-emit signature, dual-check (a) cursor mtime > previous-emit (prerequisite-completion) + (b) payload references latest surfaced message-id (payload-match). Exit 2 on either failure. - State tracking:
collab/.last-emit-cursorcompanion file records cursor-mtime per successful emit; hook compares current.last-surfaced-cursorto detect missing probe-between-emits. - enforcement_level=mandatory — at-most-once + no in-flight rejection means warning-only is insufficient (failure structurally undetectable post-emit). Block-then-guidance preserves agent agency.
- Block message (§6): surfaces missing antecedent + canonical sequence; multi-causal framing; no attribution.
- Ratify mezzo entry encoding dual-predicate trigger.then in if-then DSL form (§4.2). (a) prerequisite-completion:
(.last-surfaced-cursor.mtime > .last-emit-cursor.mtime); (b) payload-match:in_response_tofield references latest surfaced message-id. Conjunction required for admission. - Instantiate motion-step subtype (§4.2.3) on PreToolUse (§4.1 event #3): hook intercepts outbox-emit signatures + evaluates dual predicate; exit 2 with predicate-specific guidance. PreToolUse over PostToolUse — silent stale-emit class is unrecoverable post-emit at transport tier.
- State-tracking:
.last-emit-cursorcompanion records cursor mtime per emit; (a) check compares against this baseline, catching missing-probe-between-emits which pure mtime-vs-now cannot. - enforcement_level=mandatory: at-most-once + no in-flight rejection produces silent stale-emit class structurally undetectable post-emit. Only admission-gating prevents it. Trade-off: bounded false-positive (forced re-probe) vs unbounded silent-drift.
- Voice (§6.2 second-story): block surfaces specific missing antecedent + canonical path; multi-causal framing ("the cursor hasn't advanced..." not "you forgot..."). Grounded in §1.8 Gollwitzer if-then DSL (d≈0.65).
Leaving room for judgment when a rule shouldn't be absolute
phronesis_boundary — explicit non-codification carve-out
phronesis_boundary scope marker (§6.3 · informational lock · manifest-validator integrity gate)
Some patterns happen a lot, and they really do cost something when missed — but the right thing to do depends on the situation. "Always do X" sounds clean, but in real life X is right for most cases and wrong for a few. If we force the rule to be absolute, we take away the artificial intelligence (AI)'s ability to make the right call in the cases where the rule shouldn't apply.
Dual failure: under-codification + over-codification. Judgement-heavy patterns (rare + high-context + stakeholder-balancing) shouldn't graduate to mandatory enforcement; blind enforcement strips judgement-capacity precisely where it's needed.
Meta-failure of codification itself: naive maturation misclassifies judgement-heavy patterns (Dreyfus §1.7 phronesis-class) as mandatory-eligible. Blind enforcement inverts the original failure — agent now executes a rule where the rule itself is wrong. Cross-refs: humanities axis 2 + management axis 4 + canonical axis 9.
- When the system is deciding whether to promote a memory note into a rule, also check three questions: does this only come up in unusual situations? does the same trigger lead to opposite decisions depending on context? does the right answer involve weighing several people's needs against each other?
- If two or more of those are true, mark the rule as "needs judgment" — a clear flag that this is the kind of pattern where blind enforcement would do harm.
- Even if the rule otherwise scores high enough to be made mandatory, mark it as "informational only" instead — never "must follow."
- At the moment the pattern would apply, the system quietly shows the rule and the reasoning behind it as a note in the corner — the AI can read it, take it into account, and still decide for itself what to do.
- An automatic format-checker makes sure no one accidentally turns a "needs judgment" rule into a "must follow" rule later — that combination is blocked at the configuration level.
- At maturation evaluation, run 3-question phronesis screen: (a) rare-context (<10% of nominal cases)? (b) context-inverting (same trigger → opposite right-action across contexts)? (c) stakeholder-balancing?
- If ≥2 of (a)/(b)/(c) hold, set
phronesis_boundary: truein frontmatter — declarative flag marking the pattern as non-codifiable-as-mandatory regardless of maturity score. - Schema constraint:
phronesis_boundary: trueforcesenforcement_level: informational— JSON Schema validator rejects other combinations. Maturity score + tier unaffected; only enforcement axis is locked. - At fire moment, hook injects entry reasoning as context note (not block) — agent reads, considers, retains decision authority. UserPromptSubmit lifecycle event (§4.1 event #2) with path-scoped inject is the typical surface.
- Manifest validator checks (
phronesis_boundary,enforcement_level) tuple at lint time — invalid combinations fail CI. Prevents subsequent-edit drift.
- Augment §5 maturation with parallel §6.3 phronesis screen: 3 normative questions probing Dreyfus §1.7 phronesis-class characteristics. ≥2 affirmative → phronesis-bounded region.
- Declare
phronesis_boundary: trueas frontmatter field (§3) — declarative scope marker per humanities axis 2 (Polanyi tacit/explicit dialectic) + management axis 4 (ISO 9001 §4.3 documented-information scope-bounding) + canonical axis 9 (Wikipedia What Wikipedia Is Not). 9/9 frontmatter-as-SSoT means single declaration constrains all downstream behaviour. - Schema-level integrity invariant: JSON Schema constrains (
phronesis_boundary,enforcement_level) tuple —true∧≠ informationalrejected. Maturity + tier orthogonal; lock affects only enforcement axis. Prevents automation-drift graduation to mandatory. - Operational surface: hook injects entry body as UserPromptSubmit context note (§4.1 event #2 + path-scoped inject) — §6.2 second-story voice; no directive verb implying enforcement. Agent retains full decision authority; entry serves as anamnetic surface, not admission gate.
- Manifest validator runtime executes tuple-integrity check at lint + CI time — guards against edit-drift bumping enforcement axis without flag-re-evaluation. Load-bearing mechanism preventing §6.3 scope marker degradation. Appendix B 4-strong-isomorphism maps phronesis_boundary to Powell-DiMaggio normative-isomorphism limits — codification has a domain, and the domain has a boundary.
If you'd like to read more
Read the full spec
Read the specification
The full design document is on GitHub — 12 chapters plus 3 appendices. It covers, in plain order: how rules are organized into big / mid / small-step groups; how the system enforces rules so the AI doesn't have to remember them; how the check decides whether a memory note is ready to become a rule; and how we mark off work that needs judgment.
Greatpractice.md = v0.1.0 spec. reports/2026-06-04-greatpractice-research/ = research backing (~8108 lines).
Greatpractice.md = v0.1.0 specification. reports/2026-06-04-greatpractice-research/ = 9-axis research backing (~8108 lines). §11.5 v1.0 readiness rubric + §11.2-§11.4 v0.2-v0.4 roadmap.